From nobody Fri May 3 21:38:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1520926607777817.7903217691701; Tue, 13 Mar 2018 00:36:47 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 998D52244888E; Tue, 13 Mar 2018 00:30:24 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 4ABDC223522AD for ; Tue, 13 Mar 2018 00:30:23 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 00:36:44 -0700 Received: from chenche4.ccr.corp.intel.com ([10.239.158.50]) by fmsmga001.fm.intel.com with ESMTP; 13 Mar 2018 00:36:43 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=chen.a.chen@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,464,1515484800"; d="scan'208";a="37697352" From: chenc2 To: edk2-devel@lists.01.org Date: Tue, 13 Mar 2018 15:36:41 +0800 Message-Id: <20180313073641.2392-1-chen.a.chen@intel.com> X-Mailer: git-send-email 2.13.2.windows.1 Subject: [edk2] [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: , Cc: Ni Ruiyu , Zhang Chao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add "EA" flag for dumping auth3 variable. When dumping Auth3 variable, it will 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 Reviewed-by: Jaben Carsey --- 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/UefiShellDebug1CommandsLi= b.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" --=20 2.13.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel