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 CA310940F26 for ; Thu, 30 Nov 2023 02:20:43 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=nGHVVqZ4u1udcPW+5mzMBQ1bkBGXlxmODWkKMs0Nr/M=; 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=1701310842; v=1; b=B1CSc4UrRPY37HHgO8wwJm8+qUaLX3ywerPQ6/0TtV6lywgm/QzkuZbN+ICT16rrz5X8nGPc FcEaz85xIDzHK4F9RpRI85BGOnmZplEq0w5vmeEsjoTJVHxaTmWBQZzPjkqrJfZH5388yigB8jw G79zHwirgSOPOiXXwZy1gf3I= X-Received: by 127.0.0.2 with SMTP id o14FYY7687511xXSLjv0JpDH; Wed, 29 Nov 2023 18:20:42 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web11.62948.1701310841537450951 for ; Wed, 29 Nov 2023 18:20:41 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I7MXOfDNrCfRMAtR72+KvC4zP9oiquNk/yE6xVki59cxAgamzDCPQ9Vr8llRWv4jKVKxcce0rpXso+4XKm3q40NToeE5ti/iNjR2igegzFCCDKWX/rC1mfJtN7TAA2ODr8STY22UPkf2vVWONzehQ0/DVNxwKTtcevbEyk3fJ25muXkl6gewtHMfCpD9dQ09kLpa8LgKFzzu05kMwXmzjM5jdryZsx/bpWFD5uar2Xi/PXmVmkoj6uHHZJLf4+F81SHEXgWXIYuQyOEm1ceUbDz1BSs4cZ5SzmX27lBvJdfc5rKRFWU2xYGq/U0G0MTXqOdKDxEmfuhmqXRdPqEKag== 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=xFGJjY4adHqOTrCDfHY1pzmjW0XenajhFbE03XQB+TA=; b=khOcZYJTtJDT4nkawcZAqUpJpZulkNieyXxApIP78Se56Lf9GxsihFtbD7W0vi7H5TAo4EbtZS3tezWcShEw+2cpjUISjqTOckIzuvf4mbSZK0AMwmbw9vsdWmmWpppnB/VkTbiJ1S72M6fL88dCDCYDdgVPcIYgbU4OvK1ZkmwdKhVdO5vExqYCLXVXJIMOXkDfwzcSte8EpSdiixabd5kHyR7LnZHwTHVh7iROGHIwAfAEZh4sKP3sQWBXkEUOA3OB/rHcWMCIa2Gkn8tFFr5n8qlbro96tHDCr2YQJiV475IgN8etjoztkEZv6aF+/KQoDwuYFVg5sAGRLJk8Rw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none X-Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by SN7PR12MB7909.namprd12.prod.outlook.com (2603:10b6:806:340::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.23; Thu, 30 Nov 2023 02:20:38 +0000 X-Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::91d9:e679:32a3:dd05]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::91d9:e679:32a3:dd05%5]) with mapi id 15.20.7046.015; Thu, 30 Nov 2023 02:20:38 +0000 From: "Chang, Abner via groups.io" To: Ashish Singhal , "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: AQHaF3GYlWbIQ8+McEGjG/g0U9xKYLCDJb1QgAB8SACAAGqn4IANiQiAgACgopCAAAD2gIAAAKDw Date: Thu, 30 Nov 2023 02:20:38 +0000 Message-ID: References: <3ab879ada6d9f2b01496ecc05102510564888044.1700008662.git.ashishsingha@nvidia.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=True;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-11-20T12:08:47.0000000Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|SN7PR12MB7909:EE_ x-ms-office365-filtering-correlation-id: afd18f8a-009c-4f3b-831d-08dbf14af13f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: EBzb3m+w8CcwbaZEO9nyQ86GZDgfSwrhiJjlR4crVi9zfthobYFHJEumswYWAr4jyUYjV/qM1vkcdIRu7wTBvcozwGRFzldHtSa1o0BMaw/H+wZjOB6ZIH85vpcbQ2EAAVv7m/PEvrQ/nnY7YVSbGUXGDM6tJrM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RR45fFR9hrFAN/U4MdlyoiF1kboHyWp2V7P4oIFmm4?= =?us-ascii?Q?VmDH8D0SmtgQHsUEpyxBGXYyzb+na3SUOInJlmz7zhvufhYKWHNIo99vg87o?= =?us-ascii?Q?B/wBOluAUPKf59aRBFi8lq9FaefJuHR38CYl7X5b20yWDPJheZ4cP+pceM/0?= =?us-ascii?Q?FrVIcamRKbTFYodWXqGnbUEtGs4Ndv2EXZ0/XaCjRG+CDeQq5d4j2qyADPC3?= =?us-ascii?Q?ESlZxm8AurqHvyISTJbPxY7R4DoLOcgG+gSMaxIinze36xO71aQgp1eXlxWu?= =?us-ascii?Q?8jiMozBI5XpKqS5TDymJErUCsEsaj9LkQZroW6YjicXLLRYFXiWbmftGec7f?= =?us-ascii?Q?rdojB5BzbnpK2/XdjHOGwmPWAClj6Z/ewdJCOm5g?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: afd18f8a-009c-4f3b-831d-08dbf14af13f X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2023 02:20:38.0384 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: iJLGGikf8Z573m/gjbJZjBEbUrCaX0+xSDL40NJx/hXUl4FamVhEM2xvKBucdymDYLuaKwlwM+kYVKNt3LQe6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7909 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,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zl3RHYAeJCl9sWLQ3ZKqlaArx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN2PR12MB39662960467C1BC1B6220F28EA82AMN2PR12MB3966namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=B1CSc4Ur; 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_MN2PR12MB39662960467C1BC1B6220F28EA82AMN2PR12MB3966namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] We need a PR to trigger CI test and then maintainer can set the label to "P= ush" to merge the code if the change passes all CI tests. I think I done t= his way for a long time. Regards, Abner From: Ashish Singhal Sent: Thursday, November 30, 2023 10:16 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. 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@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. 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 (#111881): https://edk2.groups.io/g/devel/message/111881 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_MN2PR12MB39662960467C1BC1B6220F28EA82AMN2PR12MB3966namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

[AMD Official Use Only - General]


We need a PR to trigger CI test and then maintainer = can set the label to “Push” to merge the code if the change pas= ses all CI tests.  I think I done this way for a long time.=

 

Regards,

Abner

 

From: Ashish Singhal <ashishsingha@nvidia.= com>
Sent: Thursday, November 30, 2023 10:16 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]<= /o:p>

 

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

 

I thought the process was to share the patch via ema= il and maintainers create the PR. Author creating PR used to be optional. H= as that changed recently?

 

Thanks

Ashish


From: Chang, Abner <Abner.Chang@amd.com>
Sent: Wednesday, November 29, 2023 7:13:24 PM
To: Ashish Singhal <as= hishsingha@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 Command Li= ne Length Bug

 

External email: Use caution opening l= inks or attachments

 

[AMD Official Use Only - General]<= /o:p>

 

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

 

Abner

 

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

 

[AMD Official Use Only - General]

 

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

 

Hello,

 

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

 

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 attach= ments


[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%2Fed= k2.groups.io%2Fg%2Frfc%2Fmessage%2F827&data=3D05%7C01%7Cashishsingha%40= nvidia.com%7C772572ba91f04cdfdf0108dbea352cbb%7C43083d15727340c1b7db39efd9c= cc17a%7C0%7C0%7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw= MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdat= a=3DwWhH%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.g= roups.io%2Fg%2Frfc%2Fmessage%2F827&data=3D05%7C01%7Cashishsingha%40nvid= ia.com%7C772572ba91f04cdfdf0108dbea352cbb%7C43083d15727340c1b7db39efd9ccc17= a%7C0%7C0%7C638361286344293715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAi= LCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3D= wWhH%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 (#111881) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN2PR12MB39662960467C1BC1B6220F28EA82AMN2PR12MB3966namp_--