12 Mar, 2020

1 commit

  • This patch changes the check condition for the validity/authentication
    of the session.

    1. The Host Session Number(HSN) in the response should match the HSN for
    the session.
    2. The TPER Session Number(TSN) can never be less than 4096 for a regular
    session.

    Reference:
    Section 3.2.2.1 of https://trustedcomputinggroup.org/wp-content/uploads/TCG_Storage_Opal_SSC_Application_Note_1-00_1-00-Final.pdf
    Section 3.3.7.1.1 of https://trustedcomputinggroup.org/wp-content/uploads/TCG_Storage_Architecture_Core_Spec_v2.01_r1.00.pdf

    Co-developed-by: Andrzej Jakowski
    Signed-off-by: Andrzej Jakowski
    Signed-off-by: Revanth Rajashekar
    Signed-off-by: Jens Axboe

    Revanth Rajashekar
     

19 Nov, 2019

1 commit

  • In function 'activate_lsp', rather than hard-coding the short atom
    header(0x83), we need to let the function 'add_short_atom_header' append
    the header based on the parameter being appended.

    The parameter has been defined in Section 3.1.2.1 of
    https://trustedcomputinggroup.org/wp-content/uploads/TCG_Storage-Opal_Feature_Set_Single_User_Mode_v1-00_r1-00-Final.pdf

    Reviewed-by: Jon Derrick
    Signed-off-by: Revanth Rajashekar
    Signed-off-by: Jens Axboe

    Revanth Rajashekar
     

04 Nov, 2019

2 commits

  • This patch introduces Opal Datastore UID.
    The generic read/write table ioctl can use this UID
    to access the Opal Datastore.

    Reviewed-by: Scott Bauer
    Reviewed-by: Jon Derrick
    Signed-off-by: Revanth Rajashekar
    Signed-off-by: Jens Axboe

    Revanth Rajashekar
     
  • This feature gives the user RW access to any opal table with admin1
    authority. The flags described in the new structure determines if the user
    wants to read/write the data. Flags are checked for valid values in
    order to allow future features to be added to the ioctl.

    The user can provide the desired table's UID. Also, the ioctl provides a
    size and offset field and internally will loop data accesses to return
    the full data block. Read overrun is prevented by the initiator's
    sec_send_recv() backend. The ioctl provides a private field with the
    intention to accommodate any future expansions to the ioctl.

    Reviewed-by: Scott Bauer
    Reviewed-by: Jon Derrick
    Signed-off-by: Revanth Rajashekar
    Signed-off-by: Jens Axboe

    Revanth Rajashekar
     

20 Aug, 2019

2 commits


30 Jun, 2019

1 commit

  • Check whether the shadow mbr does fit in the provided space on the
    target. Also a proper firmware should handle this case and return an
    error we may prevent problems or even damage with crappy firmwares.

    Signed-off-by: Jonas Rabenstein
    Signed-off-by: David Kozub
    Reviewed-by: Scott Bauer
    Reviewed-by: Jon Derrick
    Signed-off-by: Jens Axboe

    Jonas Rabenstein
     

01 May, 2019

1 commit


07 Apr, 2019

1 commit


11 Sep, 2017

1 commit

  • Users who are booting off their Opal enabled drives are having
    issues when they have a shadow MBR set up after s3/resume cycle.
    When the Drive has a shadow MBR setup the MBRDone flag is set to
    false upon power loss (S3/S4/S5). When the MBRDone flag is false
    I/O to LBA 0 -> LBA_END_MBR are remapped to the shadow mbr
    of the drive. If the drive contains useful data in the 0 -> end_mbr
    range upon s3 resume the user can never get to that data as the
    drive will keep remapping it to the MBR. To fix this when we unlock
    on S3 resume, we need to tell the drive that we're done with the
    shadow mbr (even though we didnt use it) by setting true to MBRDone.
    This way the drive will stop the remapping and the user can access
    their data.

    Acked-by Jon Derrick:
    Signed-off-by: Scott Bauer
    Signed-off-by: Jens Axboe

    Scott Bauer
     

18 Feb, 2017

1 commit

  • Insted of bloating the containing structure with it all the time this
    allocates struct opal_dev dynamically. Additionally this allows moving
    the definition of struct opal_dev into sed-opal.c. For this a new
    private data field is added to it that is passed to the send/receive
    callback. After that a lot of internals can be made private as well.

    Signed-off-by: Christoph Hellwig
    Tested-by: Scott Bauer
    Reviewed-by: Scott Bauer
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

07 Feb, 2017

1 commit

  • This patch implements the necessary logic to bring an Opal
    enabled drive out of a factory-enabled into a working
    Opal state.

    This patch set also enables logic to save a password to
    be replayed during a resume from suspend.

    Signed-off-by: Scott Bauer
    Signed-off-by: Rafael Antognolli
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Scott Bauer