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 3024ED80D4E for ; Tue, 12 Sep 2023 07:04:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ehyy+279V9HmzwoW5WNcDRbpbQpD0K/bzIPZsAnFsYc=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language: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:Content-Transfer-Encoding; s=20140610; t=1694502290; v=1; b=DBjYiVCW7Etf3F3sqGwmEQWg7Uk0D5ArMI9yoErQdS3Hdc3ZSavnw3bM9qgbnOgL46dOdx5d dPefFHGTGVva/s/9TbuFns+9GwT0aryVS/hcGe+dZpWZPHBy1JHqVV1c2k5vBRbSGQ00VopmjUX 9YgbBRt62BjeFx3TiZS91AZY= X-Received: by 127.0.0.2 with SMTP id hUAbYY7687511xclrzpcEZFA; Tue, 12 Sep 2023 00:04:50 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.64]) by mx.groups.io with SMTP id smtpd.web10.19511.1694502290308718017 for ; Tue, 12 Sep 2023 00:04:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HP3NRJSND15rL/jpT04EdKx5aUc5f+iQHxgcuo2S2wZfoD6W5Vl32pmmFTZdbhVVBTM+Yca+tc5qcQHW3UqIelk3SEyoT3iSQUD6iz5d49iCN5a0c9nUaGsaZFbPqfiEW7SgZ3Ve8f6xYQO08hUA6q2BSbfOzOhUjDM+HQ9BOOZD7fyKTBomA49X9t1z6RT19JTZsj7IK9Ms7nhNOlxwwXbvRfce4/j9YfAKVzWWXzN5fh55/r5Y7JulVrTc03r5szO0bocAmZrfVY3+1yoKqyDAe1yeaLL6pYLqxHx/9y3Q2NnCKuSps7EOSKyahlrON+lX2VfJOAScZqB4QfFSxg== 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=/RlULkb7SSY7xpwD/lOAc7lQCTEy48VZUK8K0TJC1xo=; b=UI3hx3R5Etcts0/nEZeboO7SVJ7wg3W/lfl5BJD2DDK3Ttshd46BTgNYk2QvUC1G7xpuDD1eumjn1Bc+BG6hdLk0gN08uw4eAwFVHvEYsH/zccVL11TyRijaw4xyKTZRavOK5fYq+dSGNmhHa039NdaP5gESG6iaWix8vDgPfkvFbRtW6z1wTIEVvEM8W2YZrVLc9X3ex9k7P4p4u9VZo27dWe5HdzWt5oBcOihRnqvKw3b8CDBXPILOxmkSzrLlGOs4nLZUIcitl6jZzS5onvwbCoAfgqmtZuOGNvIoQ8BLLicjsGO3w1qYy7rLMFqvllvdUl1JpCZXKl2A95TUVA== 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 MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by BL1PR12MB5029.namprd12.prod.outlook.com (2603:10b6:208:31d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.37; Tue, 12 Sep 2023 07:04:47 +0000 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::1390:de0a:6b46:9837]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::1390:de0a:6b46:9837%7]) with mapi id 15.20.6768.029; Tue, 12 Sep 2023 07:04:47 +0000 From: "Nickle Wang via groups.io" To: Igor Kulchytskyy , "devel@edk2.groups.io" CC: Abner Chang , Nick Ramirez Subject: Re: [edk2-devel] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix can not set one-of option issue. Thread-Topic: [EXTERNAL] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix can not set one-of option issue. Thread-Index: AQHZvHUapqG9/YfwuUqIspyvEWT8ga/IJ4oggA/96NCAAH4IEIA+cdIA Date: Tue, 12 Sep 2023 07:04:46 +0000 Message-ID: References: <20230722081816.212-1-nicklew@nvidia.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|BL1PR12MB5029:EE_ x-ms-office365-filtering-correlation-id: ab916335-77d6-4189-b54f-08dbb35e8c9a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: znE5tJP8UM7icP58YzDeMpcMkH6XOSqXuRcT2akzBrMwAJB2VHvmDYQBJQXHpxu8bNClafS/7MKiszU4WjrT5xgy+XY1z2cDXdUMIEKasuqYI6rUHFL6k+ZWy7gy2BQAGA5W+wbHv6+qNesGplFMSUi+sh51dyk+vIlc27/Ysz+VtIHJRwPARCTuIb5QWWxlEmaL+6NyuMKTRjMW4CB+T0HvArY9yz78xqvf7aqAFctrCYocvplgUafvxhlnQ997b5mdnCgKY4mejDj2QhI+yQtGf141W2RK2Px1Yz6LcGn3jCvAUPzZB6nUVITBYL1iuHcB9UbGFdteWh0rKzyzDzKSbjQJduwswpq+YJUF3spd2/c7LBETsLTqjPpWyT/heVdvGLKauEooQOqAdOTff2xsJz/8zhSd4N+Bx8tskiI6AoJiHHuYSm2Y4uZQXED2+Gh2hbm7szT+u9FyJBgmyqXNr+7wlqE9pNPrjVP+43Zq6QyouJbKwsk1riH8pGrJrqvEzN2oM/bJYQxfGQ+zZHVJMIvvj47YeUkNwAO4jbLaOSXzDCwSj2UTvEacVFb8lR2GAUv+e7vo2X7Ht2K/8tyDlfdmVjpjXZKDLGasBMk= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?AxKNZBvLFsBWKC+A8rx8zAV6ffQ7/ALP0g4ugx+3viknJ80cPD505/YZSTkt?= =?us-ascii?Q?PWAJx93Pe1Q+P/rshr789iFjfzwjqGoh9HcEArSruQQDBfIJOZVZ48l4qP7o?= =?us-ascii?Q?Il88G2AAIYEcq2xjL9nYV9mrwXo+vqn/msjGmqYPn22Gmz7G5YkYMJT/LDg3?= =?us-ascii?Q?EDguGFqjFhs6GDvmJgCAK57UYHBWJgs7bPt2pnQd000VvMeaqhjdItRL7N93?= =?us-ascii?Q?qLGQm0VmTnV623jBROS6iwaFs/9cwwVUxfy4MURtwy6a09PwpH2Gdqmf3gsj?= =?us-ascii?Q?XJ6LFrX5NexdmfTMRvj/QFxz61ALPkHGJUTphAOsapQQAqwOUKtFWNoqXzSP?= =?us-ascii?Q?j64B97VmWFAhYdir4XBJ/jmPq2Rca4c9P7LeS7Sv4cSaRbkcJPxWGAreGHR4?= =?us-ascii?Q?HZSB7nrxqHkU0TuenNfc7OG+v0gUuP6Ewx3pMr3VUQBX4ZfQn/bSpHoGEh4d?= =?us-ascii?Q?vMrauk+dn4dehS/nIN7k0rZYodY7v367vbQ52NfQaYnQExxqvU0TZYtlm0wM?= =?us-ascii?Q?l0nJxmSBhT7MokGAXOAwnqCorwCXZj3JibLE8lnAZQbAhdQFx0RkAZ1ojkG6?= =?us-ascii?Q?y1AtlSxNly6Jy3AFX3md8X8GzdKVxxFzq1nQicC1guaZC+ZKiyHTQx8T8jX0?= =?us-ascii?Q?1Yx4NTy3DDtvShIZMb+2QoEHn93jv3rHnDqDcROZHX8sCJ9E0i6lvvU9lTYZ?= =?us-ascii?Q?GRgNDPOqBr0vZybmygDUap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P0aari2R9M4+XZlcLPA8=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab916335-77d6-4189-b54f-08dbb35e8c9a X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Sep 2023 07:04:46.9973 (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: GJ3qKqkljfoh2ixRk1oEPgGtQ7HpGGEvIRbb0pT42M5vfJyYunz0Md01W5exyoPMBLS+KpF6PQV7bpjgtEiS+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5029 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,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hA3MFLACcrzjvaz60RdM1A1Ox7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=DBjYiVCW; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Hi Igor, Version 2 is here: https://edk2.groups.io/g/devel/message/108516 Please hel= p me to review this while you have chance. Thanks, Nickle > -----Original Message----- > From: Igor Kulchytskyy > Sent: Thursday, August 3, 2023 9:27 PM > To: Nickle Wang ; devel@edk2.groups.io > Cc: Abner Chang ; Nick Ramirez > > Subject: RE: [EXTERNAL] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix = can > not set one-of option issue. >=20 > External email: Use caution opening links or attachments >=20 >=20 > Thank you, Nickle. >=20 > -----Original Message----- > From: Nickle Wang > Sent: Thursday, August 03, 2023 2:00 AM > To: Igor Kulchytskyy ; devel@edk2.groups.io > Cc: Abner Chang ; Nick Ramirez > > Subject: RE: [EXTERNAL] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix = can > not set one-of option issue. >=20 > Hi Igor, >=20 > Thanks for your review. I think this is feasible. Let me try it and provi= de version 2 > patch. >=20 > Thanks, > Nickle >=20 > > -----Original Message----- > > From: Igor Kulchytskyy > > Sent: Monday, July 24, 2023 9:49 AM > > To: Nickle Wang ; devel@edk2.groups.io > > Cc: Abner Chang ; Nick Ramirez > > > > Subject: RE: [EXTERNAL] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: > > fix can not set one-of option issue. > > > > External email: Use caution opening links or attachments > > > > > > Hi Nickle, > > May I ask you a question. What is the point to allocate and copy > > buffer. Then delete the original buffer. > > Could we just assign StatementValue->Buffer to TempBuffer and then > > assign NULL to StatementValue->Buffer? > > > > TempBuffer =3D StatementValue->Buffer; > > StatementValue->Buffer =3D NULL; > > > > Result would be the same, but we do not need to allocate and free memor= y. > > Or I do not understand something? > > Thank you, > > Igor > > > > -----Original Message----- > > From: Nickle Wang > > Sent: Saturday, July 22, 2023 4:18 AM > > To: devel@edk2.groups.io > > Cc: Abner Chang ; Igor Kulchytskyy > > ; Nick Ramirez > > Subject: [EXTERNAL] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix > > can not set one-of option issue. > > > > > > **CAUTION: The e-mail below is from an external source. Please > > exercise caution before opening attachments, clicking links, or > > following guidance.** > > > > StatementValue->Buffer is converted from ASCII to Unicode by caller > > already so we don't have to convert it again. > > > > Signed-off-by: Nickle Wang > > Cc: Abner Chang > > Cc: Igor Kulchytskyy > > Cc: Nick Ramirez > > --- > > .../RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git > > a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > > index f2a8e77d9b00..648f3d2de7aa 100644 > > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > > @@ -1660,7 +1660,11 @@ RedfishPlatformConfigSetStatementCommon ( > > // in string format from HII point of view. Do a patch here. > > // > > if ((TargetStatement->HiiStatement->Operand =3D=3D EFI_IFR_ONE_OF_= OP) > > && (StatementValue->Type =3D=3D EFI_IFR_TYPE_STRING)) { > > - TempBuffer =3D StrToUnicodeStr ((CHAR8 *)StatementValue->Buffer)= ; > > + // > > + // Make a copy of input buffer to TempBuffer because StatementVa= lue will > be > > + // assigned in HiiStringToOneOfOptionValue(). > > + // > > + TempBuffer =3D AllocateCopyPool (StrSize > > + ((EFI_STRING)StatementValue- > > >Buffer), StatementValue->Buffer); > > if (TempBuffer =3D=3D NULL) { > > return EFI_OUT_OF_RESOURCES; > > } > > -- > > 2.17.1 > > > > -The information contained in this message may be confidential and > > proprietary to American Megatrends (AMI). This communication is > > intended to be read only by the individual or entity to whom it is > > addressed or by their designee. If the reader of this message is not > > the intended recipient, you are on notice that any distribution of > > this message, in any form, is strictly prohibited. Please promptly > > notify the sender by reply e-mail or by telephone at 770-246-8600, and = then > delete or destroy all copies of the transmission. > -The information contained in this message may be confidential and propri= etary > to American Megatrends (AMI). This communication is intended to be read o= nly by > the individual or entity to whom it is addressed or by their designee. If= the reader > of this message is not the intended recipient, you are on notice that any > distribution of this message, in any form, is strictly prohibited. Please= promptly > notify the sender by reply e-mail or by telephone at 770-246-8600, and th= en > delete or destroy all copies of the transmission. -=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 (#108517): https://edk2.groups.io/g/devel/message/108517 Mute This Topic: https://groups.io/mt/100292370/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-