From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.16760.1572925441488743953 for ; Mon, 04 Nov 2019 19:44:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=PHOtJD01; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: maggie.chu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Nov 2019 19:44:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,269,1569308400"; d="scan'208";a="220978986" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 04 Nov 2019 19:44:00 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 4 Nov 2019 19:44:00 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 4 Nov 2019 19:43:59 -0800 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 4 Nov 2019 19:43:59 -0800 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (104.47.41.56) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 4 Nov 2019 19:43:59 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZFnKfAo+wqKCVOCSon4YW02GN5ggfHXiMoLI/aDS5G/dZmZO+6LJPg5KHUGzNlehc1Kc6n7IKl3WhJpeLkI9hdY4kZqcZyEBlFqwdPatbt9mHHOiELH1TYDDuNwsq/5KOstqFLH5OdoYf5Y1GcBwLKJRhHkqzctvpYgYuZa5TlBC5kTMjNJnRPZF8Ie5QAcz1M67mdgRSBw8msIJ1yEJS+R3knrf3AK9z99D2vIxtwFn1tB5B/Ibkkf1/f85F4fR1xOSc+Z/nYOUt4fn6nNqbhcg1fbHiVgU/jIa4PvJDWboGQZoOWhSZI7pjgMcIuBRRrvW35WUvUdSZb7M7CIpWw== 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-SenderADCheck; bh=xZBBN/FCZdFgmyYGtuTIby2fG9+aUbUpnD2kzxZOz+U=; b=Le6/18J/F0YtXirQbk2YAx4AZ4qjkmly57GR43Bnr99N77iXPNnmxZCRjZti/AWvMzd2+pq3EeeQzDfYApXEUynkN9bemGfoaT+mQyFJtqd27IT+Z0p2fojuWcOZJaB/1sK5zvAvRViB49muZ65Zb7LfEQH+4xkxhaCek9r0UE+gKWVrUFd5WWtP0frYhCA8MXdk1HFhEVi8cJWvRVMQqNP4vNgG1zsCh1vBuIwm0t5zoLega8iiilhNaxjp641ueuZ5QpOKzlPNpd3o7T5N3nEJuD2lsBr8+MjNbWgYedqODQV8BG+EwM+ows9gC7yorsrkITXzGxz9MFTVhKu1LQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xZBBN/FCZdFgmyYGtuTIby2fG9+aUbUpnD2kzxZOz+U=; b=PHOtJD01s0Ca7BQ6ICnphYP1/eJP10InvB37Q5Z+/9Z6Hw4H8dbqv/UKPDFcmhwZ+l+fzGvGF0eJWXOsUk4IPl9kEl9TRO8FS25+LVV1JlDOgIZ35kXBBcym391yf7ulZhN/0/F+PN1BxCgTIHO2NQcIWW8RRsBsVTgflPPVmcE= Received: from BYAPR11MB3829.namprd11.prod.outlook.com (20.178.238.32) by BYAPR11MB3768.namprd11.prod.outlook.com (20.178.238.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.24; Tue, 5 Nov 2019 03:43:53 +0000 Received: from BYAPR11MB3829.namprd11.prod.outlook.com ([fe80::d41c:ae89:68f0:536b]) by BYAPR11MB3829.namprd11.prod.outlook.com ([fe80::d41c:ae89:68f0:536b%7]) with mapi id 15.20.2408.024; Tue, 5 Nov 2019 03:43:53 +0000 From: "Maggie Chu" To: "devel@edk2.groups.io" , "Yao, Jiewen" CC: "Dong, Eric" , "Zhang, Chao B" Subject: Re: [edk2-devel] [PATCH] SecurityPkg/OpalPassword: Remove dependency on EFI_BLOCK_IO_PROTOCOL Thread-Topic: [edk2-devel] [PATCH] SecurityPkg/OpalPassword: Remove dependency on EFI_BLOCK_IO_PROTOCOL Thread-Index: AQHVksT43+jtZdrS3U24SHXYHftIGqd6ZUaQgAGJnlA= Date: Tue, 5 Nov 2019 03:43:53 +0000 Message-ID: References: <20191104040428.1542-1-maggie.chu@intel.com> <74D8A39837DF1E4DA445A8C0B3885C503F8391FC@shsmsx102.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503F8391FC@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjI3OGQyMWMtY2JmZS00MTBmLWIwMzAtNjljZTE1MjA4OWM5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidjN3UUM1dVN0Y0xcL0NDQ0xjenIxektUUXFEbHM1dzk3MGJvblJMK2pGM1RMeVpORXNFV2hLckkzK3ExNFoyV28ifQ== dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=maggie.chu@intel.com; x-originating-ip: [192.55.79.126] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fe2d44cc-84aa-405c-bd52-08d761a260e7 x-ms-traffictypediagnostic: BYAPR11MB3768: x-ms-exchange-purlcount: 4 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0212BDE3BE x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(396003)(366004)(376002)(136003)(346002)(199004)(189003)(13464003)(99286004)(110136005)(186003)(54906003)(2906002)(81166006)(966005)(6246003)(55016002)(53546011)(6506007)(316002)(7696005)(6636002)(66556008)(7736002)(14444005)(102836004)(25786009)(76116006)(76176011)(107886003)(8936002)(66446008)(66946007)(71200400001)(305945005)(71190400001)(66476007)(64756008)(6116002)(3846002)(81156014)(8676002)(4326008)(446003)(86362001)(256004)(6436002)(14454004)(476003)(486006)(5660300002)(52536014)(33656002)(15650500001)(229853002)(6306002)(9686003)(66066001)(2501003)(74316002)(11346002)(478600001)(26005);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR11MB3768;H:BYAPR11MB3829.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3e20uoFLAu2hsitpn7tDk3+4ny+iSdgBcDWHlC4W/WEqtPaVIxLC5wyQLy6oJU8kwUeTRPxVCKBBT1hf/uEnXiwHYbS3D8u2lqGfzGabwv3ceD1LVkuUKXiAfdhAi0Kd0wIhkMvVzJb2zCkz6IhScT99gFR80ZtKwKpdF28U/CM01DDaUcMkWk2TYu+wFfzkLyaBpzoy4XBnGkSvY5FxHOJc7kQyOg0KILkN/0TtMS9DpnElH+bd+3lq/+8eFxnGK9qVk9img5bVwrcrOWtb5Ef3+UpEPPMIVlXPZ52gy/5QhV2ExgncUrfPFEJVu6po89ugVU0VXnbsoKyq8ywF+lDtEb41ptouAor3jeZPoLJbyygCxY0vl/H0AAxRcTEju8N0Ajn+hv4kEd46U5xLcMMJ6MlrwcFEoxaEK5x/A6jr/+MqW+ER7/C9zszNwPgIBoTqv2Z1n4W4cSlgjFA6KOOg7NBSlnlxGZqSzIpAGuE= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: fe2d44cc-84aa-405c-bd52-08d761a260e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2019 03:43:53.2891 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QEbtyMbvE/zkviijOAyI+ZEBmPJO1dStoL8EdhTP/OTeoA1QA8+Wo1DgE8yq/6qNa43EBNUABz2tw9+7fteyBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3768 Return-Path: maggie.chu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Jiewen, This patch has been added to client bios as override since last year and v= alidated on WHL/CFL/ICL and also CML. It was asked by RST team because BLOCK IO protocol is unable to be provide= d on each physical device when RAID volume created. Thanks, Maggie -----Original Message----- From: devel@edk2.groups.io On Behalf Of Yao, Jiewen Sent: Monday, November 4, 2019 12:08 PM To: Chu, Maggie ; devel@edk2.groups.io Cc: Dong, Eric ; Zhang, Chao B Subject: Re: [edk2-devel] [PATCH] SecurityPkg/OpalPassword: Remove depende= ncy on EFI_BLOCK_IO_PROTOCOL Hello May I know what test has been done for this patch? > -----Original Message----- > From: Chu, Maggie > Sent: Monday, November 4, 2019 12:04 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Zhang, Chao B=20 > ; Yao, Jiewen > Subject: [PATCH] SecurityPkg/OpalPassword: Remove dependency on=20 > EFI_BLOCK_IO_PROTOCOL >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2327 >=20 > RAID drivers abstract their physical drives that make up the array=20 > into a single unit, and do not supply individual EFI_BLOCK_IO_PROTOCOL= =20 > instances for each physical drive in the array. > This breaks support for the Security Storage Command Protocol, which=20 > currently requires an EFI_BLOCK_IO_PROTOCOL to be associated with the=20 > same device the protocol is installed on and provide all the same=20 > parameters. >=20 > This patch remove dependency on EFI_BLOCK_IO_PROTOCOL and allows=20 > access to Opal drive members of a RAID array. >=20 > Signed-off-by: Maggie Chu > Cc: Eric Dong > Cc: Chao Zhang > Cc: Jiewen Yao > --- > SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 70=20 > ++++++++++-------------- > -- > 1 file changed, 27 insertions(+), 43 deletions(-) >=20 > diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c > b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c > index 77905d2bf9..6bec54b932 100644 > --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c > +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c > @@ -2667,7 +2667,6 @@ OpalEfiDriverBindingSupported( { >=20 > EFI_STATUS Status; >=20 > EFI_STORAGE_SECURITY_COMMAND_PROTOCOL* SecurityCommand; >=20 > - EFI_BLOCK_IO_PROTOCOL* BlkIo; >=20 >=20 >=20 > if (mOpalEndOfDxe) { >=20 > return EFI_UNSUPPORTED; >=20 > @@ -2703,33 +2702,6 @@ OpalEfiDriverBindingSupported( > Controller >=20 > ); >=20 >=20 >=20 > - // >=20 > - // Test EFI_BLOCK_IO_PROTOCOL on controller Handle, required by=20 > EFI_STORAGE_SECURITY_COMMAND_PROTOCOL >=20 > - // function APIs >=20 > - // >=20 > - Status =3D gBS->OpenProtocol( >=20 > - Controller, >=20 > - &gEfiBlockIoProtocolGuid, >=20 > - (VOID **)&BlkIo, >=20 > - This->DriverBindingHandle, >=20 > - Controller, >=20 > - EFI_OPEN_PROTOCOL_BY_DRIVER >=20 > - ); >=20 > - >=20 > - if (EFI_ERROR(Status)) { >=20 > - DEBUG((DEBUG_INFO, "No EFI_BLOCK_IO_PROTOCOL on controller\n")); >=20 > - return Status; >=20 > - } >=20 > - >=20 > - // >=20 > - // Close protocol and reopen in Start call >=20 > - // >=20 > - gBS->CloseProtocol( >=20 > - Controller, >=20 > - &gEfiBlockIoProtocolGuid, >=20 > - This->DriverBindingHandle, >=20 > - Controller >=20 > - ); >=20 >=20 >=20 > return EFI_SUCCESS; >=20 > } >=20 > @@ -2827,30 +2799,42 @@ OpalEfiDriverBindingStart( > ); >=20 > if (EFI_ERROR(Status)) { >=20 > // >=20 > - // Close storage security that was opened >=20 > + // Block_IO not supported on handle >=20 > // >=20 > - gBS->CloseProtocol( >=20 > - Controller, >=20 > - &gEfiStorageSecurityCommandProtocolGuid, >=20 > - This->DriverBindingHandle, >=20 > - Controller >=20 > - ); >=20 > + if(Status =3D=3D EFI_UNSUPPORTED) { >=20 > + BlkIo =3D NULL; >=20 > + } else { >=20 > + // >=20 > + // Close storage security that was opened >=20 > + // >=20 > + gBS->CloseProtocol( >=20 > + Controller, >=20 > + &gEfiStorageSecurityCommandProtocolGuid, >=20 > + This->DriverBindingHandle, >=20 > + Controller >=20 > + ); >=20 >=20 >=20 > - FreePool(Dev); >=20 > - return Status; >=20 > + FreePool(Dev); >=20 > + return Status; >=20 > + } >=20 > } >=20 >=20 >=20 > // >=20 > // Save mediaId >=20 > // >=20 > - Dev->MediaId =3D BlkIo->Media->MediaId; >=20 > + if(BlkIo =3D=3D NULL) { >=20 > + // If no Block IO present, use defined MediaId value. >=20 > + Dev->MediaId =3D 0x0; >=20 > + } else { >=20 > + Dev->MediaId =3D BlkIo->Media->MediaId; >=20 >=20 >=20 > - gBS->CloseProtocol( >=20 > - Controller, >=20 > - &gEfiBlockIoProtocolGuid, >=20 > - This->DriverBindingHandle, >=20 > - Controller >=20 > + gBS->CloseProtocol( >=20 > + Controller, >=20 > + &gEfiBlockIoProtocolGuid, >=20 > + This->DriverBindingHandle, >=20 > + Controller >=20 > ); >=20 > + } >=20 >=20 >=20 > // >=20 > // Acquire Ascii printable name of child, if not found, then ignore= =20 > device >=20 > -- > 2.16.2.windows.1