From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=chao.b.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 2A83321E49037 for ; Wed, 14 Mar 2018 01:40:16 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2018 01:46:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,469,1515484800"; d="scan'208";a="24400398" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga008.fm.intel.com with ESMTP; 14 Mar 2018 01:46:38 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 14 Mar 2018 01:46:38 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 14 Mar 2018 01:46:37 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.80]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.235]) with mapi id 14.03.0319.002; Wed, 14 Mar 2018 16:46:37 +0800 From: "Zhang, Chao B" To: "Chen, Chen A" , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" Thread-Topic: [PATCH] ShellPkg/Dmpstore: Enhance display information for Auth3 variable. Thread-Index: AQHTup4MSwadlfg0/0K/pD/uN+B52aPPa/Uw Date: Wed, 14 Mar 2018 08:46:35 +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-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzE4MjA0MjEtMDUwOS00YWRjLTllY2UtMmEyZWU1ZDJmYjg3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJtTXVLR0d4RHVvNlhtM0sxdUFicmh5aFhia2xVMnBRXC9sZzBmSHBjTXJoYzNNN1gxeDdrcGR4ZHBQMXVnYkZ6aSJ9 dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] 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: Wed, 14 Mar 2018 08:40:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Chen Chen: Please update license header. Others are good to me.=20 Reviewed-by: Chao Zhang -----Original Message----- From: Chen, Chen A=20 Sent: Tuesday, March 13, 2018 3:37 PM To: edk2-devel@lists.01.org Cc: Chen, Chen A ; Ni, Ruiyu ; Z= hang, Chao B Subject: [PATCH] ShellPkg/Dmpstore: Enhance display information for Auth3 v= ariable. Add "EA" flag for dumping auth3 variable. When dumping Auth3 variable, it w= ill not only displaying variable content but also in addition to metadata. Give a warning message when dumping auth3 variable. 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(+) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c b/Shell= Pkg/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), gS= hellDebug1HiiHandle + ); + } + if (StandardFormatOutput) { HexString =3D AllocatePool ((DataSize * 2 + 1) * sizeof (CHAR16)= ); if (HexString !=3D NULL) { diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Com= mandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1C= ommandsLib.uni index 011a7bfc2d..90ce69c932 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLi= b.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Command +++ sLib.uni @@ -394,6 +394,7 @@ #string STR_DMPSTORE_NO_VAR_FOUND_G #language en-US "%H%s%N: No matchin= g 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 Authenti= cated 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