From: "Bret Barkelew" <bret.barkelew@microsoft.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"michael.kubacki@outlook.com" <michael.kubacki@outlook.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>,
Hao A Wu <hao.a.wu@intel.com>,
Jian J Wang <jian.j.wang@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Sean Brogan <sean.brogan@microsoft.com>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v2 7/7] SecurityPkg/HddPassword: Use BaseLib linked list iteration macros
Date: Fri, 10 Apr 2020 23:36:48 +0000 [thread overview]
Message-ID: <CY4PR21MB0743DDD978EEF6292439E82DEFDE0@CY4PR21MB0743.namprd21.prod.outlook.com> (raw)
In-Reply-To: <MWHPR07MB3440E9AEE5950CD0F15F8D7CE9DE0@MWHPR07MB3440.namprd07.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 5371 bytes --]
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
- Bret
________________________________
From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Michael Kubacki via groups.io <michael.kubacki=outlook.com@groups.io>
Sent: Friday, April 10, 2020 1:02:18 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Chao Zhang <chao.b.zhang@intel.com>; Hao A Wu <hao.a.wu@intel.com>; Jian J Wang <jian.j.wang@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Sean Brogan <sean.brogan@microsoft.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v2 7/7] SecurityPkg/HddPassword: Use BaseLib linked list iteration macros
From: Michael Kubacki <michael.kubacki@microsoft.com>
REF:https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D1959&data=02%7C01%7CBret.Barkelew%40microsoft.com%7C0cb7a3e5e3ef4f9c776808d7dd8a2c7e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637221457829007406&sdata=TzvNo4r7FXEx%2BLEifMTR8HHL%2BGGpl8WkOiABJS1IqF8%3D&reserved=0
Replaces usage of the linked list iteration macros defined in
HddPasswordDxe.h with the common definition in BaseLib.h.
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
---
SecurityPkg/HddPassword/HddPasswordDxe.c | 13 +++++++------
SecurityPkg/HddPassword/HddPasswordDxe.h | 7 +------
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/SecurityPkg/HddPassword/HddPasswordDxe.c b/SecurityPkg/HddPassword/HddPasswordDxe.c
index a25b3471d073..32b55a6a8b72 100644
--- a/SecurityPkg/HddPassword/HddPasswordDxe.c
+++ b/SecurityPkg/HddPassword/HddPasswordDxe.c
@@ -2,6 +2,7 @@
HDD password driver which is used to support HDD security feature.
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) Microsoft Corporation.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -115,7 +116,7 @@ BuildHddPasswordDeviceInfo (
// Build HDD password device info and save them to LockBox.
//
DevInfoLength = 0;
- EFI_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
+ BASE_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
ConfigFormEntry = BASE_CR (Entry, HDD_PASSWORD_CONFIG_FORM_ENTRY, Link);
//
@@ -164,7 +165,7 @@ BuildHddPasswordDeviceInfo (
ASSERT (DevInfo != NULL);
TempDevInfo = DevInfo;
- EFI_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
+ BASE_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
ConfigFormEntry = BASE_CR (Entry, HDD_PASSWORD_CONFIG_FORM_ENTRY, Link);
if ((!PasswordIsFullZero (ConfigFormEntry->Password)) ||
@@ -472,7 +473,7 @@ HddPasswordEndOfDxeEventNotify (
//
// Zero passsword and freeze lock device.
//
- EFI_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
+ BASE_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
ConfigFormEntry = BASE_CR (Entry, HDD_PASSWORD_CONFIG_FORM_ENTRY, Link);
ZeroMem (ConfigFormEntry->Password, HDD_PASSWORD_MAX_LENGTH);
@@ -2026,7 +2027,7 @@ HddPasswordGetConfigFormEntryByIndex (
CurrentIndex = 0;
ConfigFormEntry = NULL;
- EFI_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
+ BASE_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
if (CurrentIndex == Index) {
ConfigFormEntry = BASE_CR (Entry, HDD_PASSWORD_CONFIG_FORM_ENTRY, Link);
break;
@@ -2408,7 +2409,7 @@ HddPasswordConfigUpdateForm (
ConfigFormEntry = NULL;
EntryExisted = FALSE;
- EFI_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
+ BASE_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
ConfigFormEntry = BASE_CR (Entry, HDD_PASSWORD_CONFIG_FORM_ENTRY, Link);
if ((ConfigFormEntry->Bus == Bus) &&
@@ -2503,7 +2504,7 @@ HddPasswordConfigUpdateForm (
EndLabel->Number = HDD_DEVICE_LABEL_END;
mNumberOfHddDevices = 0;
- EFI_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
+ BASE_LIST_FOR_EACH (Entry, &mHddPasswordConfigFormList) {
ConfigFormEntry = BASE_CR (Entry, HDD_PASSWORD_CONFIG_FORM_ENTRY, Link);
HiiCreateGotoOpCode (
diff --git a/SecurityPkg/HddPassword/HddPasswordDxe.h b/SecurityPkg/HddPassword/HddPasswordDxe.h
index 87db587eb6f0..a6c87169dc59 100644
--- a/SecurityPkg/HddPassword/HddPasswordDxe.h
+++ b/SecurityPkg/HddPassword/HddPasswordDxe.h
@@ -1,6 +1,7 @@
/** @file
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) Microsoft Corporation.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -87,12 +88,6 @@ typedef struct _HDD_PASSWORD_DXE_PRIVATE_DATA {
#define HDD_PASSWORD_DXE_PRIVATE_FROM_THIS(a) CR (a, HDD_PASSWORD_DXE_PRIVATE_DATA, ConfigAccess, HDD_PASSWORD_DXE_PRIVATE_SIGNATURE)
-//
-//Iterate through the double linked list. NOT delete safe
-//
-#define EFI_LIST_FOR_EACH(Entry, ListHead) \
- for (Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink)
-
#define PASSWORD_SALT_SIZE 32
#define HDD_PASSWORD_REQUEST_VARIABLE_NAME L"HddPasswordRequest"
--
2.16.3.windows.1
[-- Attachment #2: Type: text/html, Size: 8721 bytes --]
prev parent reply other threads:[~2020-04-10 23:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200410200218.24992-1-michael.kubacki@outlook.com>
2020-04-10 20:02 ` [PATCH v2 1/7] MdePkg/BaseLib: Add linked list iteration macros Michael Kubacki
2020-04-10 23:43 ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2020-04-17 1:44 ` Zhiguang Liu
2020-04-10 20:02 ` [PATCH v2 2/7] MdeModulePkg/EhciDxe: Use BaseLib " Michael Kubacki
2020-04-10 23:42 ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2020-04-10 20:02 ` [PATCH v2 3/7] MdeModulePkg/EhciPei: " Michael Kubacki
2020-04-10 23:38 ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2020-04-10 20:02 ` [PATCH v2 4/7] MdeModulePkg/XhciDxe: " Michael Kubacki
2020-04-10 23:37 ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2020-04-10 20:02 ` [PATCH v2 5/7] MdeModulePkg/UfsPassThruDxe: " Michael Kubacki
2020-04-10 23:37 ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2020-04-10 20:02 ` [PATCH v2 6/7] MdeModulePkg/RamDiskDxe: " Michael Kubacki
2020-04-10 23:37 ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2020-04-10 20:02 ` [PATCH v2 7/7] SecurityPkg/HddPassword: " Michael Kubacki
2020-04-10 23:36 ` Bret Barkelew [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CY4PR21MB0743DDD978EEF6292439E82DEFDE0@CY4PR21MB0743.namprd21.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox