From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 02387220C2A4C for ; Tue, 13 Mar 2018 07:41:43 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 07:48:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,465,1515484800"; d="scan'208";a="33468780" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 13 Mar 2018 07:48:05 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 13 Mar 2018 07:48:05 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.34]) by fmsmsx122.amr.corp.intel.com ([169.254.5.196]) with mapi id 14.03.0319.002; Tue, 13 Mar 2018 07:48:04 -0700 From: "Carsey, Jaben" To: "Chen, Chen A" , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" , "Zhang, Chao B" Thread-Topic: [edk2] [PATCH] ShellPkg/Dmpstore: Enhance display information for Auth3 variable. Thread-Index: AQHTup4U2wPVWmV/dUm8VWN0VuS9faPOPyvQ Date: Tue, 13 Mar 2018 14:48:04 +0000 Message-ID: References: <20180313073641.2392-1-chen.a.chen@intel.com> In-Reply-To: <20180313073641.2392-1-chen.a.chen@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzQwM2ZlMDItOTJjMS00NWFiLWE0YTItYzYzNTU3ZDhkMTE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlYrNDVzU21TQWxOSE5MYVhqbVd0OFBcL0h0Tk1HcUZJVUpwcm5QQ3kzR1Q0PSJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg/Dmpstore: Enhance display information for Auth3 variable. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 14:41:44 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey Looks good. Please clarify that this is an output flag, not a command lin= e flag in the commit log. > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > chenc2 > Sent: Tuesday, March 13, 2018 12:37 AM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Zhang, Chao B > > Subject: [edk2] [PATCH] ShellPkg/Dmpstore: Enhance display information fo= r > Auth3 variable. > Importance: High >=20 > Add "EA" flag for dumping auth3 variable. When dumping Auth3 variable, it > will not only displaying variable content but also in addition to metadat= a. > Give a warning message when dumping auth3 variable. >=20 > Cc: Ni Ruiyu > Cc: Zhang Chao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: chenc2 > --- > ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 9 > +++++++++ > .../UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 1 + > 2 files changed, 10 insertions(+) >=20 > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c > index 5791da9acc..adcec41992 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c > @@ -69,6 +69,9 @@ GetAttrType ( > if ((Atts & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) > !=3D 0) { > StrnCatGrow (&RetString, &BufLen, L"+AT", 0); > } > + if ((Atts & EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS) !=3D 0) { > + StrnCatGrow(&RetString, &BufLen, L"+EA", 0); > + } >=20 > if (RetString =3D=3D NULL) { > RetString =3D StrnCatGrow(&RetString, &BufLen, L"Invalid", 0); > @@ -507,6 +510,12 @@ CascadeProcessVariables ( > if (Type =3D=3D DmpStoreDisplay) { > if (!EFI_ERROR(Status) && (DataBuffer !=3D NULL) && (FoundVarName = !=3D > NULL)) { > AttrString =3D GetAttrType(Atts); > + if (StrStr (AttrString, L"EA") !=3D NULL) { > + ShellPrintHiiEx ( > + -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_VAR_EA_WARNING), > gShellDebug1HiiHandle > + ); > + } > + > if (StandardFormatOutput) { > HexString =3D AllocatePool ((DataSize * 2 + 1) * sizeof (CHAR1= 6)); > if (HexString !=3D NULL) { > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > index 011a7bfc2d..90ce69c932 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > @@ -394,6 +394,7 @@ > #string STR_DMPSTORE_NO_VAR_FOUND_G #language en-US "%H%s%N: > No matching variables found. Guid %g\r\n" > #string STR_DMPSTORE_NO_VAR_FOUND_G_SFO #language en-US > "VariableInfo,\"\",\"%g\",\"\",\"\",\"\"\r\n" > #string STR_DMPSTORE_VAR_SFO #language en-US > "VariableInfo,\"%s\",\"%g\",\"0x%x\",\"0x%x\",\"%s\"\r\n" > +#string STR_DMPSTORE_VAR_EA_WARNING #language en-US > "(Enhanced Authenticated Variable, Should be interpreted according to the > metadata headers!)\r\n" >=20 > #string STR_GET_HELP_COMP #language en-US "" > ".TH comp 0 "Compare 2 files"\r\n" > -- > 2.13.2.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel