From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id EAC17940F3B for ; Thu, 30 Nov 2023 02:15:37 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=zevv+OrtKN3Uqp6rxvHhx5skEpJ5wX7yw04WsUfGclQ=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20140610; t=1701310536; v=1; b=M392KtJdyIXTHLV0fgirdjsGjSbBtblmo5mNkcHEWvS42K450N8QMK0VROGSi8X7uqBPFuv3 e4LJnP44yDhGSrbxgcsQzy2+o7DjUqlXnF9LrOLynTRCHX7SzXyZVmJoNhu/pOCGp0VnDNHbsnr F4NVeQVrwGHm3JZKuuthovzA= X-Received: by 127.0.0.2 with SMTP id p0JyYY7687511xIZllV4qYOs; Wed, 29 Nov 2023 18:15:36 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.62]) by mx.groups.io with SMTP id smtpd.web11.62801.1701310535631612211 for ; Wed, 29 Nov 2023 18:15:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mLuq0u4YZb1RDTDleQHL9vWzjl3oBXRaJZsvO7KQy0uw6AHfuPJxLNRdff0ny8UXvk8LVw5C+BXjO425rqLTTE4mmW1xVRXnrXNX/K6p42tFBsV8LQ7axOjLfeqmaoFHGdMotTVFmjw8X/aOtXff6VgMiqyO9sRINLu4LCAhnfVuM8p23XXphibRsD6JzNBRc7zvojfB1vx/Uv7IWYLnuFEsWIGk4Duhy3oJ1F5eQQ3ENBMHVo4CHB/4KLbtYV+zEX2DgCDLlwO0wRgVd/qwpAD6SIXHQdHCt3bRHsn403yOihMXBb8eHQ5p6QNe7UT1rtn3IvYmoDzMZXYE1jlLbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c7RmFFvDTtN+1JOkWGEBtDEaExwQilIjCvsrakNc7E0=; b=e5TSt3tozthj3ZQIXCqLd+HpzdRj79fKl7lL51jSk6gSLQNb+SGbqj1kMhHCHdlRovCuE8Dpg5zbXEL7Khw8udSkAIvnvuZq4BqBfuDiZOKbtb/MuE7uLg+0OcxMRSEpEBtSk2vNhe0dMjon7gWQjSr9Mngtg86x+OQ+y43zt3Y9UOOeoCEtl468uPr/LJCWTOdpqPb0UCEAYQIrtUnnzTtUWV9ubpwCuUukn7QGCccFkvQimkLadLlArd4A1rLp9RLgYe6jk3LRPJZXLTXuzQR4cHOQXICCy/SRntqXyMZOHQ59IDADnMj4USvKsuQ6jEnqtDNK26HFPDGF8YNZBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none X-Received: from BY5PR12MB5544.namprd12.prod.outlook.com (2603:10b6:a03:1d9::22) by DM6PR12MB4203.namprd12.prod.outlook.com (2603:10b6:5:21f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29; Thu, 30 Nov 2023 02:15:31 +0000 X-Received: from BY5PR12MB5544.namprd12.prod.outlook.com ([fe80::108e:2378:282b:6d89]) by BY5PR12MB5544.namprd12.prod.outlook.com ([fe80::108e:2378:282b:6d89%4]) with mapi id 15.20.7046.024; Thu, 30 Nov 2023 02:15:31 +0000 From: "Ashish Singhal via groups.io" To: "Chang, Abner" , "devel@edk2.groups.io" , "quic_llindhol@quicinc.com" , "ardb+tianocore@kernel.org" , "git@danielschaefer.me" , Jeff Brasen Subject: Re: [edk2-devel] [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Length Bug Thread-Topic: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Length Bug Thread-Index: AQHaF3GVaLL9rqM9m0WkO4ZgZ9RIwLCDJvcAgAB5hWeAAGyvAIANiEVMgAChRACAAABMEQ== Date: Thu, 30 Nov 2023 02:15:31 +0000 Message-ID: References: <3ab879ada6d9f2b01496ecc05102510564888044.1700008662.git.ashishsingha@nvidia.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=True;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-11-20T12:08:47.0000000Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY5PR12MB5544:EE_|DM6PR12MB4203:EE_ x-ms-office365-filtering-correlation-id: ca6dced6-c6da-421f-848a-08dbf14a3a6a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: VsvnSItoA5r/L7vKTBpRqIBnRgFLMO/R8zHx4Sy3AOFKxyjFqQrDMfw++MXKzzlDMcOHCr15+T8m4qO0qF0lyhf6CJFP/vfBRZIyIC/xp8MU6mb/6eiG/yw3m5Nuh4QWgzPcDg+nKAyRh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RIdzGKKkUslRS?= =?us-ascii?Q?J1JUExRWQBrcdoX2GgpYhnfiZs0fAWR76kl7LKVo+QzaJoRE5IsCeX7eDjuM?= =?us-ascii?Q?6HPV6U8W3tX2FjINqGsWzyCB3NsXCzDd95ZpxAzqQT7WAKiQ83coKPlYbjeE?= =?us-ascii?Q?c5l5NkcXZ0qtciq3Ih0vZTS6s0pQwSUvWziuxKZZRgsWVb1KJrVAl5QfTAGL?= =?us-ascii?Q?B/V8bqG5c0Du/TX9xL/udfbeK4r7ur6/mCdsh7LhRYUm7IqglwCMu8fk0VdH?= =?us-ascii?Q?5FRH45UjEmd2TsQbJfRH5A6Xla1EIc3EG90ex9kM/+4PzjMpqO01tAUIpVWb?= =?us-ascii?Q?QWgrGikaFyNfJTl/OVu9Dolzu8b2JKCXThzX3QU3weVZtkVasSSFzBjLxDFa?= =?us-ascii?Q?/bTU/7I6kBesEGJNPg/2MA4=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB5544.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca6dced6-c6da-421f-848a-08dbf14a3a6a X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2023 02:15:31.2560 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: WYChGZELmnwmtsBQ8lZdLBGgMAoVWoTjRf1rjlZVrkYl7MxWnwNUT0HJHAe0qeupY4BGWBMkt5+Qvj5gjHs1Gw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4203 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ashishsingha@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: dvacPL80kiUXioMpMVAXA1bCx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BY5PR12MB55447CEE258B019BCB7EE913BA82ABY5PR12MB5544namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=M392KtJd; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_BY5PR12MB55447CEE258B019BCB7EE913BA82ABY5PR12MB5544namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I thought the process was to share the patch via email and maintainers crea= te the PR. Author creating PR used to be optional. Has that changed recentl= y? Thanks Ashish Get Outlook for iOS ________________________________ From: Chang, Abner Sent: Wednesday, November 29, 2023 7:13:24 PM To: Ashish Singhal ; devel@edk2.groups.io ; quic_llindhol@quicinc.com ; ardb= +tianocore@kernel.org ; git@danielschaefer.me ; Jeff Brasen Subject: RE: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Leng= th Bug External email: Use caution opening links or attachments [AMD Official Use Only - General] Ah sure. I can do it at anytime. Could you please create a PR for this cha= nge and let me know? Abner From: Ashish Singhal Sent: Thursday, November 30, 2023 12:37 AM To: Chang, Abner ; devel@edk2.groups.io; quic_llindhol= @quicinc.com; ardb+tianocore@kernel.org; git@danielschaefer.me; Jeff Brasen= Subject: Re: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Leng= th Bug [AMD Official Use Only - General] Caution: This message originated from an External Source. Use proper cautio= n when opening attachments, clicking links, or responding. Hello, Checking if there is a timeline for this patchset to be merged. Thanks Ashish ________________________________ From: Chang, Abner > Sent: Monday, November 20, 2023 6:57 PM To: Ashish Singhal = >; devel@edk2.groups.io >; quic_llindhol@quicinc.com >; ardb+tianocore@kernel.org >; git@danielschaefer.me >; Jeff Brasen > Subject: RE: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Leng= th Bug External email: Use caution opening links or attachments [AMD Official Use Only - General] >I did not add this intentionally and even sent out an email asking the sam= e on edk2-rfc if this should be done by maintainers unless you want me to d= o it as a ??separate patch set. >Link to the message is https://nam11.safelinks.protection.outlook.com/?url= =3Dhttps%3A%2F%2Fedk2.groups.io%2Fg%2Frfc%2Fmessage%2F827&data=3D05%7C01%7C= ashishsingha%40nvidia.com%7C772572ba91f04cdfdf0108dbea352cbb%7C43083d157273= 40c1b7db39efd9ccc17a%7C0%7C0%7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8e= yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C= %7C%7C&sdata=3DwWhH%2BkdVGcCCs5uAWz0mwJ9ROrZ6OZ0lWkdHHnXcaMc%3D&reserved=3D= 0 That's fine. > String comes in from the https://nam11.safelinks.protection.outlook.com/?= url=3Dhttps%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmbedde= dPkg%2FInclude%2FLibrary%2FAndroidBootImgLib.h%23L43&data=3D05%7C01%7Cashis= hsingha%40nvidia.com%7C772572ba91f04cdfdf0108dbea352cbb%7C43083d15727340c1b= 7db39efd9ccc17a%7C0%7C0%7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8eyJWIj= oiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7= C&sdata=3DQZqBxMHLxQRlMNWVAqGTOq1pwtsQf6LYQG8UwTkEjmE%3D&reserved=3D0 header so it should ideally be self-contained. If you st= ill think we should check for it, I can add a separate patch while keeping = this one unaffected. Reviewed-by: Abner Chang > Abner From: Ashish Singhal > Sent: Tuesday, November 21, 2023 3:34 AM To: Chang, Abner >; devel@e= dk2.groups.io; quic_llindhol@quicinc.com; ardb+tianocore@kernel.org; git@danielschaefer.me; Jeff B= rasen > Subject: Re: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Leng= th Bug [AMD Official Use Only - General] Caution: This message originated from an External Source. Use proper cautio= n when opening attachments, clicking links, or responding. ________________________________________ From: Chang, Abner Sent: Monday, November 20, 2023 5:13 AM To: Ashish Singhal ; mailto:devel@edk2.grou= ps.io ; mailto:quic_llindhol@quicinc.com ; mailto:ardb+tianocore@kernel.org ; mailto:git@danielschaefer.me ; Jeff Brasen Subject: RE: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Leng= th Bug External email: Use caution opening links or attachments [AMD Official Use Only - General] Thanks for this update and two more comments, > -----Original Message----- > From: Ashish Singhal > Sent: Wednesday, November 15, 2023 11:12 AM > To: mailto:devel@edk2.groups.io; mailto:quic_llindhol@quicinc.com; > mailto:ardb+tianocore@kernel.org; Chang, Abner ; > mailto:git@danielschaefer.me; mailto:jbrasen@nvidia.com > Cc: Ashish Singhal > Subject: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line > Length Bug > > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. > > > Curently, AndroidBootImgLib expects input kernel command line > to never exceed 256 unicode characters where the image header > allows for 512 ascii characters. If image header allows 512 > ascii characters, similar number of unicode characters should be > allowed at the minimum. > > Signed-off-by: Ashish Singhal > --- > .../AndroidBootImgLib/AndroidBootImgLib.c | 31 +++++++++++-------- > 1 file changed, 18 insertions(+), 13 deletions(-) > > diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c > b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c > index 1359a66db2..f63648e60d 100644 > --- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c > +++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c > @@ -322,11 +322,12 @@ AndroidBootImgGetFdt ( > EFI_STATUS > AndroidBootImgUpdateArgs ( > IN VOID *BootImg, > - OUT VOID *KernelArgs > + OUT VOID **KernelArgs > ) I know the original code doesn't have the function header. Would you mind t= o add it as we change the prototype of this function? Or you probably would like to keep it as it for the consistence, as no func= tion header for any of functions in this file. I did not add this intentionally and even sent out an email asking the same= on edk2-rfc if this should be done by maintainers unless you want me to do= it as a separate patch set. Link to the message is https://nam11.safelinks.protection.outlook.com/?url= =3Dhttps%3A%2F%2Fedk2.groups.io%2Fg%2Frfc%2Fmessage%2F827&data=3D05%7C01%7C= ashishsingha%40nvidia.com%7C772572ba91f04cdfdf0108dbea352cbb%7C43083d157273= 40c1b7db39efd9ccc17a%7C0%7C0%7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8e= yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C= %7C%7C&sdata=3DwWhH%2BkdVGcCCs5uAWz0mwJ9ROrZ6OZ0lWkdHHnXcaMc%3D&reserved=3D= 0 > { > CHAR8 ImageKernelArgs[ANDROID_BOOTIMG_KERNEL_ARGS_SIZE]; > EFI_STATUS Status; > + UINT32 NewKernelArgSize; > > // Get kernel arguments from Android boot image > Status =3D AndroidBootImgGetKernelArgs (BootImg, ImageKernelArgs); > @@ -334,16 +335,23 @@ AndroidBootImgUpdateArgs ( > return Status; > } > Do you think we have to check if the ASCII string size in ImageKernelArgs g= reater than ANDROID_BOOTIMG_KERNEL_ARGS_SIZE? Thanks Abner String comes in from the https://nam11.safelinks.protection.outlook.com/?ur= l=3Dhttps%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmbeddedP= kg%2FInclude%2FLibrary%2FAndroidBootImgLib.h%23L43&data=3D05%7C01%7Cashishs= ingha%40nvidia.com%7C772572ba91f04cdfdf0108dbea352cbb%7C43083d15727340c1b7d= b39efd9ccc17a%7C0%7C0%7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi= MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&= sdata=3DQZqBxMHLxQRlMNWVAqGTOq1pwtsQf6LYQG8UwTkEjmE%3D&reserved=3D0 header so it should ideally be self-contained. If you stil= l think we should check for it, I can add a separate patch while keeping th= is one unaffected. Thanks Ashish > + NewKernelArgSize =3D ANDROID_BOOTIMG_KERNEL_ARGS_SIZE; > + *KernelArgs =3D AllocateZeroPool (sizeof (CHAR16) * NewKernelArgS= ize); > + if (*KernelArgs =3D=3D NULL) { > + DEBUG ((DEBUG_ERROR, "Fail to allocate memory\n")); > + return EFI_OUT_OF_RESOURCES; > + } > + > AsciiStrToUnicodeStrS ( > ImageKernelArgs, > - KernelArgs, > - ANDROID_BOOTIMG_KERNEL_ARGS_SIZE >> 1 > + *KernelArgs, > + NewKernelArgSize > ); > // Append platform kernel arguments > if (mAndroidBootImg->AppendArgs) { > Status =3D mAndroidBootImg->AppendArgs ( > - KernelArgs, > - ANDROID_BOOTIMG_KERNEL_ARGS_SIZE > + *KernelArgs, > + NewKernelArgSize > ); > } > > @@ -616,6 +624,10 @@ AndroidBootImgBoot ( > UINTN RamdiskSize; > IN VOID *FdtBase; > > + if ((Buffer =3D=3D NULL) || (BufferSize =3D=3D 0)) { > + return EFI_INVALID_PARAMETER; > + } > + > NewKernelArg =3D NULL; > ImageHandle =3D NULL; > > @@ -637,14 +649,7 @@ AndroidBootImgBoot ( > goto Exit; > } > > - NewKernelArg =3D AllocateZeroPool > (ANDROID_BOOTIMG_KERNEL_ARGS_SIZE); > - if (NewKernelArg =3D=3D NULL) { > - DEBUG ((DEBUG_ERROR, "Fail to allocate memory\n")); > - Status =3D EFI_OUT_OF_RESOURCES; > - goto Exit; > - } > - > - Status =3D AndroidBootImgUpdateArgs (Buffer, NewKernelArg); > + Status =3D AndroidBootImgUpdateArgs (Buffer, &NewKernelArg); > if (EFI_ERROR (Status)) { > goto Exit; > } > -- > 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111880): https://edk2.groups.io/g/devel/message/111880 Mute This Topic: https://groups.io/mt/102598724/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_BY5PR12MB55447CEE258B019BCB7EE913BA82ABY5PR12MB5544namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
I thought the process was to share the patch via email and= maintainers create the PR. Author creating PR used to be optional. Has tha= t changed recently?

Thanks
Ashish

From: Chang, Abner <Abne= r.Chang@amd.com>
Sent: Wednesday, November 29, 2023 7:13:24 PM
To: Ashish Singhal <ashishsingha@nvidia.com>; devel@edk2.group= s.io <devel@edk2.groups.io>; quic_llindhol@quicinc.com <quic_llind= hol@quicinc.com>; ardb+tianocore@kernel.org <ardb+tianocore@kernel.or= g>; git@danielschaefer.me <git@danielschaefer.me>; Jeff Brasen <jbrasen@nvidia.com>
Subject: RE: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Li= ne Length Bug
 
External email: Us= e caution opening links or attachments

[AMD Official Use Only - General]


Ah sure.  I can do it at anytime. Could you p= lease create a PR for this change and let me know?

 

Abner

 

From: Ashish Singhal <ashishsingha@nvidi= a.com>
Sent: Thursday, November 30, 2023 12:37 AM
To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io; = quic_llindhol@quicinc.com; ardb+tianocore@kernel.org; git@danielschaefer.me= ; Jeff Brasen <jbrasen@nvidia.com>
Subject: Re: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Li= ne Length Bug

 

[AMD Official Use Only - General]

 

Cautio= n: This message originated from an= External Source. Use proper caution when opening attachments, clicking lin= ks, or responding.

 

Hello,

 

Checking if there is a timeline for this patchset to be= merged.

 

Thanks

Ashish

 


From: Chang, Abner <Abner.Chang@amd.com>
Sent: Monday, November 20, 2023 6:57 PM
To: Ashish Singhal <ashishsingha@nvidia.com>; devel@edk2.groups.io <devel@edk2.groups.io>; quic_llindhol@quicinc.com = <quic_llindhol@quicinc.com<= /a>>; ardb+tianocore@kernel.org = <ardb+tianocore@kernel.org<= /a>>; git@danielschaefer.me <git@danielschaefer.me>; Jeff Br= asen <jbrasen@nvidia.com> Subject: RE: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Comma= nd Line Length Bug

 

External email: Use caution opening links or attac= hments


[AMD Official Use Only - General]

>I did not add this intentionally and even sent out an email asking the = same on edk2-rfc if this should be done by maintainers unless you want me t= o do it as a ??separate patch set.
>Link to the message is https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.gr= oups.io%2Fg%2Frfc%2Fmessage%2F827&data=3D05%7C01%7Cashishsingha%40nvidi= a.com%7C772572ba91f04cdfdf0108dbea352cbb%7C43083d15727340c1b7db39efd9ccc17a= %7C0%7C0%7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL= CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3Dw= WhH%2BkdVGcCCs5uAWz0mwJ9ROrZ6OZ0lWkdHHnXcaMc%3D&reserved=3D0
That's fine.

> String comes in from the https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.= com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmbeddedPkg%2FInclude%2FLibrary%2F= AndroidBootImgLib.h%23L43&data=3D05%7C01%7Cashishsingha%40nvidia.com%7C= 772572ba91f04cdfdf0108dbea352cbb%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0= %7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV= 2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3DQZqBxMHLx= QRlMNWVAqGTOq1pwtsQf6LYQG8UwTkEjmE%3D&reserved=3D0 header so it should ideally be self-contained. If you still think we should check= for it, I can add a separate patch while keeping this one unaffected.

Reviewed-by: Abner Chang <abner.c= hang@amd.com>

Abner


From: Ashish Singhal <ashishs= ingha@nvidia.com>
Sent: Tuesday, November 21, 2023 3:34 AM
To: Chang, Abner <Abner.Chang@amd= .com>; devel@edk2.groups.io; quic= _llindhol@quicinc.com; ardb+tianocore@kernel.org;= git@danielschaefer.me; Jeff Brasen <jbrasen@nvidia.com>
Subject: Re: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Leng= th Bug

[AMD Official Use Only - General]


Caution: This message originated from an External Source. Use proper cautio= n when opening attachments, clicking links, or responding.



________________________________________
From: Chang, Abner <mailto:Abner.= Chang@amd.com>
Sent: Monday, November 20, 2023 5:13 AM
To: Ashish Singhal <mailto:as= hishsingha@nvidia.com>; mailto:devel@edk2.groups.io&nbs= p;<mailto:devel@edk2.groups.io>; mailto:quic_llindhol@quicinc.c= om <mailto:quic_ll= indhol@quicinc.com>; mailto:ardb+tianocore@kernel.o= rg <mailto:ardb+ti= anocore@kernel.org>; mailto:git@danielschaefer.me&n= bsp;<mailto:git@danielschaefer.= me>; Jeff Brasen <mailto:jb= rasen@nvidia.com>
Subject: RE: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Leng= th Bug

External email: Use caution opening links or attachments


[AMD Official Use Only - General]

Thanks for this update and two more comments,

> -----Original Message-----
> From: Ashish Singhal <ma= ilto:ashishsingha@nvidia.com>
> Sent: Wednesday, November 15, 2023 11:12 AM
> To: mailto:devel@edk2.groups.i= o; mailto:quic_llindhol@quicinc.com;
> mailto:ardb+tianocore@ker= nel.org; Chang, Abner <mailto= :Abner.Chang@amd.com>;
> mailto:git@danielschaefer.me<= /a>; mailto:jbrasen@nvidia.com
> Cc: Ashish Singhal <mail= to:ashishsingha@nvidia.com>
> Subject: [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line
> Length Bug
>
> Caution: This message originated from an External Source. Use proper c= aution
> when opening attachments, clicking links, or responding.
>
>
> Curently, AndroidBootImgLib expects input kernel command line
> to never exceed 256 unicode characters where the image header
> allows for 512 ascii characters. If image header allows 512
> ascii characters, similar number of unicode characters should be
> allowed at the minimum.
>
> Signed-off-by: Ashish Singhal <mailto:ashishsingha@nvidia.com>
> ---
>  .../AndroidBootImgLib/AndroidBootImgLib.c    = ; | 31 +++++++++++--------
>  1 file changed, 18 insertions(+), 13 deletions(-)
>
> diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c=
> b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> index 1359a66db2..f63648e60d 100644
> --- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> +++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> @@ -322,11 +322,12 @@ AndroidBootImgGetFdt (
>  EFI_STATUS
>  AndroidBootImgUpdateArgs (
>    IN  VOID  *BootImg,
> -  OUT VOID  *KernelArgs
> +  OUT VOID  **KernelArgs
>    )
I know the original code doesn't have the function header. Would you mind t= o add it as we change the prototype of this function?
Or you probably would like to keep it as it for the consistence, as no func= tion header for any of functions in this file.

I did not add this intentionally and even sent out an email asking the same= on edk2-rfc if this should be done by maintainers unless you want me to do= it as a separate patch set.

Link to the message is https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.gr= oups.io%2Fg%2Frfc%2Fmessage%2F827&data=3D05%7C01%7Cashishsingha%40nvidi= a.com%7C772572ba91f04cdfdf0108dbea352cbb%7C43083d15727340c1b7db39efd9ccc17a= %7C0%7C0%7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL= CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3Dw= WhH%2BkdVGcCCs5uAWz0mwJ9ROrZ6OZ0lWkdHHnXcaMc%3D&reserved=3D0


>  {
>    CHAR8       ImageKerne= lArgs[ANDROID_BOOTIMG_KERNEL_ARGS_SIZE];
>    EFI_STATUS  Status;
> +  UINT32      NewKernelArgSize;
>
>    // Get kernel arguments from Android boot image
>    Status =3D AndroidBootImgGetKernelArgs (BootImg, Ima= geKernelArgs);
> @@ -334,16 +335,23 @@ AndroidBootImgUpdateArgs (
>      return Status;
>    }
>
Do you think we have to check if the ASCII string size in ImageKernelArgs g= reater than ANDROID_BOOTIMG_KERNEL_ARGS_SIZE?

Thanks
Abner

String comes in from the https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.= com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmbeddedPkg%2FInclude%2FLibrary%2F= AndroidBootImgLib.h%23L43&data=3D05%7C01%7Cashishsingha%40nvidia.com%7C= 772572ba91f04cdfdf0108dbea352cbb%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0= %7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV= 2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3DQZqBxMHLx= QRlMNWVAqGTOq1pwtsQf6LYQG8UwTkEjmE%3D&reserved=3D0 header so it should ideally be self-contained. If you still think we should check= for it, I can add a separate patch while keeping this one unaffected.

Thanks
Ashish


> +  NewKernelArgSize =3D ANDROID_BOOTIMG_KERNEL_ARGS_SIZE;
> +  *KernelArgs      =3D AllocateZeroPool= (sizeof (CHAR16) * NewKernelArgSize);
> +  if (*KernelArgs =3D=3D NULL) {
> +    DEBUG ((DEBUG_ERROR, "Fail to allocate memory= \n"));
> +    return EFI_OUT_OF_RESOURCES;
> +  }
> +
>    AsciiStrToUnicodeStrS (
>      ImageKernelArgs,
> -    KernelArgs,
> -    ANDROID_BOOTIMG_KERNEL_ARGS_SIZE >> 1
> +    *KernelArgs,
> +    NewKernelArgSize
>      );
>    // Append platform kernel arguments
>    if (mAndroidBootImg->AppendArgs) {
>      Status =3D mAndroidBootImg->AppendArg= s (
> -           &nb= sp;            =         KernelArgs,
> -           &nb= sp;            =         ANDROID_BOOTIMG_KERNEL_ARGS_SIZE=
> +           &nb= sp;            =         *KernelArgs,
> +           &nb= sp;            =         NewKernelArgSize
>            = ;            &n= bsp;         );
>    }
>
> @@ -616,6 +624,10 @@ AndroidBootImgBoot (
>    UINTN        = ;            &n= bsp; RamdiskSize;
>    IN  VOID      &nb= sp;            *FdtB= ase;
>
> +  if ((Buffer =3D=3D NULL) || (BufferSize =3D=3D 0)) {
> +    return EFI_INVALID_PARAMETER;
> +  }
> +
>    NewKernelArg =3D NULL;
>    ImageHandle  =3D NULL;
>
> @@ -637,14 +649,7 @@ AndroidBootImgBoot (
>      goto Exit;
>    }
>
> -  NewKernelArg =3D AllocateZeroPool
> (ANDROID_BOOTIMG_KERNEL_ARGS_SIZE);
> -  if (NewKernelArg =3D=3D NULL) {
> -    DEBUG ((DEBUG_ERROR, "Fail to allocate memory= \n"));
> -    Status =3D EFI_OUT_OF_RESOURCES;
> -    goto Exit;
> -  }
> -
> -  Status =3D AndroidBootImgUpdateArgs (Buffer, NewKernelArg); > +  Status =3D AndroidBootImgUpdateArgs (Buffer, &NewKernelArg= );
>    if (EFI_ERROR (Status)) {
>      goto Exit;
>    }
> --
> 2.17.1

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#111880) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_BY5PR12MB55447CEE258B019BCB7EE913BA82ABY5PR12MB5544namp_--