[edk2-devel] [PATCH v4 0/2] Add SCSI Support for Storage Security Command Protocol

Zurcher, Christopher J posted 2 patches 1 week ago
Failed in applying to current master (apply log)
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf |   3 +-
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h      | 171 ++++++-
MdePkg/Include/IndustryStandard/Scsi.h            |  48 +-
MdePkg/Include/Library/UefiScsiLib.h              | 126 ++++-
MdePkg/Include/Protocol/ScsiIo.h                  |   9 +-
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c        |   5 +-
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c      | 522 +++++++++++++++++++-
MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c |  19 +-
MdePkg/Library/UefiScsiLib/UefiScsiLib.c          | 205 +++++++-
9 files changed, 1064 insertions(+), 44 deletions(-)

[edk2-devel] [PATCH v4 0/2] Add SCSI Support for Storage Security Command Protocol

Posted by Zurcher, Christopher J 1 week ago
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546

V4 changes:
Add SSC Protocol in addition to BlockIo instead of in place of BlockIo.
Add error handling for (BlockSize == 0) in Read and WriteBlocks commands
to handle partitions that do not support ReadCapacity().

V3 changes:
Initialize AlignedBuffer variable in ScsiDiskReceiveData and
ScsiDiskSendData functions. Remove redundant input validation and debug
message in ScsiDiskSendData.

V2 changes:
Split the patch into separate commits for separate packages.

To support RPMB access on UFS devices, support must be added to
the ScsiDiskDxe driver for the Storage Security Command Protocol.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>

Christopher J Zurcher (2):
  MdePkg: Implement SCSI commands for Security Protocol In/Out
  MdeModulePkg/ScsiDiskDxe: Support Storage Security Command Protocol

 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf |   3 +-
 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h      | 171 ++++++-
 MdePkg/Include/IndustryStandard/Scsi.h            |  48 +-
 MdePkg/Include/Library/UefiScsiLib.h              | 126 ++++-
 MdePkg/Include/Protocol/ScsiIo.h                  |   9 +-
 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c        |   5 +-
 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c      | 522 +++++++++++++++++++-
 MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c |  19 +-
 MdePkg/Library/UefiScsiLib/UefiScsiLib.c          | 205 +++++++-
 9 files changed, 1064 insertions(+), 44 deletions(-)

-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42321): https://edk2.groups.io/g/devel/message/42321
Mute This Topic: https://groups.io/mt/32048245/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v4 0/2] Add SCSI Support for Storage Security Command Protocol

Posted by Liming Gao 1 week ago
Zurcher:
  Can you share what test has been done for this feature?

Thanks
Liming
> -----Original Message-----
> From: Zurcher, Christopher J
> Sent: Thursday, June 13, 2019 10:05 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Gao,
> Liming <liming.gao@intel.com>
> Subject: [PATCH v4 0/2] Add SCSI Support for Storage Security Command Protocol
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546
> 
> V4 changes:
> Add SSC Protocol in addition to BlockIo instead of in place of BlockIo.
> Add error handling for (BlockSize == 0) in Read and WriteBlocks commands
> to handle partitions that do not support ReadCapacity().
> 
> V3 changes:
> Initialize AlignedBuffer variable in ScsiDiskReceiveData and
> ScsiDiskSendData functions. Remove redundant input validation and debug
> message in ScsiDiskSendData.
> 
> V2 changes:
> Split the patch into separate commits for separate packages.
> 
> To support RPMB access on UFS devices, support must be added to
> the ScsiDiskDxe driver for the Storage Security Command Protocol.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> 
> Christopher J Zurcher (2):
>   MdePkg: Implement SCSI commands for Security Protocol In/Out
>   MdeModulePkg/ScsiDiskDxe: Support Storage Security Command Protocol
> 
>  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf |   3 +-
>  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h      | 171 ++++++-
>  MdePkg/Include/IndustryStandard/Scsi.h            |  48 +-
>  MdePkg/Include/Library/UefiScsiLib.h              | 126 ++++-
>  MdePkg/Include/Protocol/ScsiIo.h                  |   9 +-
>  MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c        |   5 +-
>  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c      | 522 +++++++++++++++++++-
>  MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c |  19 +-
>  MdePkg/Library/UefiScsiLib/UefiScsiLib.c          | 205 +++++++-
>  9 files changed, 1064 insertions(+), 44 deletions(-)
> 
> --
> 2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42362): https://edk2.groups.io/g/devel/message/42362
Mute This Topic: https://groups.io/mt/32048245/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v4 0/2] Add SCSI Support for Storage Security Command Protocol

Posted by Zurcher, Christopher J 1 week ago
A unit test has been run which provisions RPMB key, writes data, and verifies it after reading on the following boot.
Further, this code is being exercised for secure storage on multiple platforms as part of standard boot flow.

Unit test files emailed separately.

Thanks,
Christopher Zurcher


-----Original Message-----
From: Gao, Liming 
Sent: Thursday, June 13, 2019 05:59
To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>; devel@edk2.groups.io
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>
Subject: RE: [PATCH v4 0/2] Add SCSI Support for Storage Security Command Protocol

Zurcher:
  Can you share what test has been done for this feature?

Thanks
Liming
> -----Original Message-----
> From: Zurcher, Christopher J
> Sent: Thursday, June 13, 2019 10:05 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Gao,
> Liming <liming.gao@intel.com>
> Subject: [PATCH v4 0/2] Add SCSI Support for Storage Security Command Protocol
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546
> 
> V4 changes:
> Add SSC Protocol in addition to BlockIo instead of in place of BlockIo.
> Add error handling for (BlockSize == 0) in Read and WriteBlocks commands
> to handle partitions that do not support ReadCapacity().
> 
> V3 changes:
> Initialize AlignedBuffer variable in ScsiDiskReceiveData and
> ScsiDiskSendData functions. Remove redundant input validation and debug
> message in ScsiDiskSendData.
> 
> V2 changes:
> Split the patch into separate commits for separate packages.
> 
> To support RPMB access on UFS devices, support must be added to
> the ScsiDiskDxe driver for the Storage Security Command Protocol.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> 
> Christopher J Zurcher (2):
>   MdePkg: Implement SCSI commands for Security Protocol In/Out
>   MdeModulePkg/ScsiDiskDxe: Support Storage Security Command Protocol
> 
>  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf |   3 +-
>  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h      | 171 ++++++-
>  MdePkg/Include/IndustryStandard/Scsi.h            |  48 +-
>  MdePkg/Include/Library/UefiScsiLib.h              | 126 ++++-
>  MdePkg/Include/Protocol/ScsiIo.h                  |   9 +-
>  MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c        |   5 +-
>  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c      | 522 +++++++++++++++++++-
>  MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c |  19 +-
>  MdePkg/Library/UefiScsiLib/UefiScsiLib.c          | 205 +++++++-
>  9 files changed, 1064 insertions(+), 44 deletions(-)
> 
> --
> 2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42394): https://edk2.groups.io/g/devel/message/42394
Mute This Topic: https://groups.io/mt/32048245/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v4 0/2] Add SCSI Support for Storage Security Command Protocol

Posted by Yao, Jiewen 1 week ago
Thank you Christopher.
Your code looks good to me.

I also recommend MdeModulePkg/SCSI owner take a look and give r-b.

Ray or Hao
Can you help on that?

Thank you
Yao Jiewen

> -----Original Message-----
> From: Zurcher, Christopher J
> Sent: Friday, June 14, 2019 6:26 AM
> To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>
> Subject: RE: [PATCH v4 0/2] Add SCSI Support for Storage Security Command
> Protocol
> 
> A unit test has been run which provisions RPMB key, writes data, and verifies
> it after reading on the following boot.
> Further, this code is being exercised for secure storage on multiple platforms
> as part of standard boot flow.
> 
> Unit test files emailed separately.
> 
> Thanks,
> Christopher Zurcher
> 
> 
> -----Original Message-----
> From: Gao, Liming
> Sent: Thursday, June 13, 2019 05:59
> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>
> Subject: RE: [PATCH v4 0/2] Add SCSI Support for Storage Security Command
> Protocol
> 
> Zurcher:
>   Can you share what test has been done for this feature?
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: Zurcher, Christopher J
> > Sent: Thursday, June 13, 2019 10:05 AM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Gao,
> > Liming <liming.gao@intel.com>
> > Subject: [PATCH v4 0/2] Add SCSI Support for Storage Security Command
> Protocol
> >
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546
> >
> > V4 changes:
> > Add SSC Protocol in addition to BlockIo instead of in place of BlockIo.
> > Add error handling for (BlockSize == 0) in Read and WriteBlocks commands
> > to handle partitions that do not support ReadCapacity().
> >
> > V3 changes:
> > Initialize AlignedBuffer variable in ScsiDiskReceiveData and
> > ScsiDiskSendData functions. Remove redundant input validation and debug
> > message in ScsiDiskSendData.
> >
> > V2 changes:
> > Split the patch into separate commits for separate packages.
> >
> > To support RPMB access on UFS devices, support must be added to
> > the ScsiDiskDxe driver for the Storage Security Command Protocol.
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> >
> > Christopher J Zurcher (2):
> >   MdePkg: Implement SCSI commands for Security Protocol In/Out
> >   MdeModulePkg/ScsiDiskDxe: Support Storage Security Command
> Protocol
> >
> >  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf |   3 +-
> >  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h      | 171 ++++++-
> >  MdePkg/Include/IndustryStandard/Scsi.h            |  48 +-
> >  MdePkg/Include/Library/UefiScsiLib.h              | 126 ++++-
> >  MdePkg/Include/Protocol/ScsiIo.h                  |   9 +-
> >  MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c        |   5 +-
> >  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c      | 522
> +++++++++++++++++++-
> >  MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c |  19 +-
> >  MdePkg/Library/UefiScsiLib/UefiScsiLib.c          | 205 +++++++-
> >  9 files changed, 1064 insertions(+), 44 deletions(-)
> >
> > --
> > 2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42395): https://edk2.groups.io/g/devel/message/42395
Mute This Topic: https://groups.io/mt/32048245/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v4 0/2] Add SCSI Support for Storage Security Command Protocol

Posted by Wu, Hao A 1 week ago
> -----Original Message-----
> From: Yao, Jiewen
> Sent: Friday, June 14, 2019 6:32 AM
> To: Zurcher, Christopher J; Gao, Liming; devel@edk2.groups.io
> Cc: Kinney, Michael D; Wang, Jian J; Ni, Ray; Wu, Hao A
> Subject: RE: [PATCH v4 0/2] Add SCSI Support for Storage Security Command
> Protocol
> 
> Thank you Christopher.
> Your code looks good to me.
> 
> I also recommend MdeModulePkg/SCSI owner take a look and give r-b.
> 
> Ray or Hao
> Can you help on that?


Yes, I will take a look.
Please grant me some time, will give my feedbacks early next week.

Best Regards,
Hao Wu


> 
> Thank you
> Yao Jiewen
> 
> > -----Original Message-----
> > From: Zurcher, Christopher J
> > Sent: Friday, June 14, 2019 6:26 AM
> > To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen
> > <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>
> > Subject: RE: [PATCH v4 0/2] Add SCSI Support for Storage Security
> Command
> > Protocol
> >
> > A unit test has been run which provisions RPMB key, writes data, and
> verifies
> > it after reading on the following boot.
> > Further, this code is being exercised for secure storage on multiple
> platforms
> > as part of standard boot flow.
> >
> > Unit test files emailed separately.
> >
> > Thanks,
> > Christopher Zurcher
> >
> >
> > -----Original Message-----
> > From: Gao, Liming
> > Sent: Thursday, June 13, 2019 05:59
> > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen
> > <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>
> > Subject: RE: [PATCH v4 0/2] Add SCSI Support for Storage Security
> Command
> > Protocol
> >
> > Zurcher:
> >   Can you share what test has been done for this feature?
> >
> > Thanks
> > Liming
> > > -----Original Message-----
> > > From: Zurcher, Christopher J
> > > Sent: Thursday, June 13, 2019 10:05 AM
> > > To: devel@edk2.groups.io
> > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Yao, Jiewen
> > <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Gao,
> > > Liming <liming.gao@intel.com>
> > > Subject: [PATCH v4 0/2] Add SCSI Support for Storage Security Command
> > Protocol
> > >
> > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546
> > >
> > > V4 changes:
> > > Add SSC Protocol in addition to BlockIo instead of in place of BlockIo.
> > > Add error handling for (BlockSize == 0) in Read and WriteBlocks
> commands
> > > to handle partitions that do not support ReadCapacity().
> > >
> > > V3 changes:
> > > Initialize AlignedBuffer variable in ScsiDiskReceiveData and
> > > ScsiDiskSendData functions. Remove redundant input validation and
> debug
> > > message in ScsiDiskSendData.
> > >
> > > V2 changes:
> > > Split the patch into separate commits for separate packages.
> > >
> > > To support RPMB access on UFS devices, support must be added to
> > > the ScsiDiskDxe driver for the Storage Security Command Protocol.
> > >
> > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > Cc: Liming Gao <liming.gao@intel.com>
> > >
> > > Christopher J Zurcher (2):
> > >   MdePkg: Implement SCSI commands for Security Protocol In/Out
> > >   MdeModulePkg/ScsiDiskDxe: Support Storage Security Command
> > Protocol
> > >
> > >  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf |   3 +-
> > >  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h      | 171 ++++++-
> > >  MdePkg/Include/IndustryStandard/Scsi.h            |  48 +-
> > >  MdePkg/Include/Library/UefiScsiLib.h              | 126 ++++-
> > >  MdePkg/Include/Protocol/ScsiIo.h                  |   9 +-
> > >  MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c        |   5 +-
> > >  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c      | 522
> > +++++++++++++++++++-
> > >  MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c |  19 +-
> > >  MdePkg/Library/UefiScsiLib/UefiScsiLib.c          | 205 +++++++-
> > >  9 files changed, 1064 insertions(+), 44 deletions(-)
> > >
> > > --
> > > 2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42399): https://edk2.groups.io/g/devel/message/42399
Mute This Topic: https://groups.io/mt/32048245/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-