Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transport: storage: add support for SPDM over the storage binding (DSP0286) #2827

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

twilfredo
Copy link
Contributor

This series adds libspdm transport support for SPDM over Storage Binding Specification [1]. This allows for example NVMe or SCSI devices that conform to [1] to communicate with a host requester using the storage transport medium as defined in [1].

[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0286_1.0.0WIP90.pdf

@twilfredo
Copy link
Contributor Author

@alistair23

@twilfredo twilfredo force-pushed the wilfred/add-trans-storage-05.9 branch 7 times, most recently from 8ab52c6 to 7a14888 Compare September 5, 2024 04:21
@steven-bellock
Copy link
Contributor

A couple of high level comments.

  1. This pull request will not be able to be merged until DSP0286 has been published, but that looks to be soonish.
  2. The WDC-authored files have a WDC copyright. I believe (not 100 % sure) that per the "DMTF Members’ Software Submission Policy" it should have the DMTF copyright. If you want to keep the WDC copyright we can talk to the DMTF open source folks to clarify things.

@twilfredo twilfredo force-pushed the wilfred/add-trans-storage-05.9 branch from 7a14888 to c63269b Compare September 6, 2024 04:50
@twilfredo
Copy link
Contributor Author

twilfredo commented Sep 6, 2024

A couple of high level comments.

1. This pull request will not be able to be merged until DSP0286 has been published, but that looks to be soonish.

Yeah that sounds good, just wanted to get comments early on

2. The WDC-authored files have a WDC copyright. I believe (not 100 % sure) that per the "DMTF Members’ Software Submission Policy" it should have the DMTF copyright. If you want to keep the WDC copyright we can talk to the DMTF open source folks to clarify things.

I've updated the license header with an author tag, is that sufficient? Diff: https://github.com/DMTF/libspdm/compare/7a14888587717c8a16e7390388fd39629e7a7076..c63269b162af091a35ef282052980087a378c68f

@steven-bellock
Copy link
Contributor

Presumably authorship is recorded in the commit log, but if you want to put it in the file itself:

/**
 *  Copyright Notice:
 *  Copyright 2024 DMTF. All rights reserved.
 *  License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md
 **/
 
 /**
  *  Author: Wilfred Mallawa <[email protected]>
  *          Alistair Francis <[email protected]>
  **/

include/industry_standard/storage.h Outdated Show resolved Hide resolved
include/industry_standard/storage.h Outdated Show resolved Hide resolved
include/industry_standard/storage.h Outdated Show resolved Hide resolved
include/industry_standard/storage.h Outdated Show resolved Hide resolved
include/industry_standard/storage.h Outdated Show resolved Hide resolved
library/spdm_transport_storage_lib/CMakeLists.txt Outdated Show resolved Hide resolved
library/spdm_transport_storage_lib/libspdm_storage.c Outdated Show resolved Hide resolved
@twilfredo twilfredo force-pushed the wilfred/add-trans-storage-05.9 branch 3 times, most recently from e50ff9f to 8fc10b2 Compare September 9, 2024 01:34
@jyao1
Copy link
Member

jyao1 commented Sep 11, 2024

Usually, the implementation for WIP should NOT be posted to main, but a WIP specific branch
For example, StorageBinding_WIP, in this case.

The WIP branch can be merged into main, after the WIP spec becomes official standard.

@twilfredo
Copy link
Contributor Author

twilfredo commented Sep 11, 2024

Usually, the implementation for WIP should NOT be posted to main, but a WIP specific branch For example, StorageBinding_WIP, in this case.

The WIP branch can be merged into main, after the WIP spec becomes official standard.

Okay noted, are you happy to keep this up for now? since review is in progress.

@jyao1
Copy link
Member

jyao1 commented Sep 11, 2024

Okay noted, are you happy to keep this up for now? since review is in progress.

That is fine. We can keep reviewing and address all feedback in this PR.

Whenever you think it is done and ready for merge, you can switch to branch merge request.

@twilfredo twilfredo force-pushed the wilfred/add-trans-storage-05.9 branch 5 times, most recently from 7d5dfea to 5569c6c Compare October 2, 2024 02:35
@jyao1
Copy link
Member

jyao1 commented Nov 1, 2024

@twilfredo , do you want to keep it in PR? or do you want to push to a branch, and keep updating the branch?

I am OK either way. But I just feel a branch might be more helpful.

@twilfredo
Copy link
Contributor Author

@twilfredo , do you want to keep it in PR? or do you want to push to a branch, and keep updating the branch?

I am OK either way. But I just feel a branch might be more helpful.

I'll stick to the PR is that's okay with everyone. I'm just waiting for the spec to be ratified so I can address all the changes in one go.

Add support for bswap16 and 32. Also rename the existing
`libspdm_le_to_be_64` to `libspdm_byte_swap_64` for consistency.

Signed-off-by: Wilfred Mallawa <[email protected]>
@twilfredo twilfredo force-pushed the wilfred/add-trans-storage-05.9 branch from 5569c6c to 9ca12b3 Compare November 27, 2024 06:23
@twilfredo
Copy link
Contributor Author

What is the correct way to generate a seed for the fuzzing tests to go here unit_test/fuzzing/seeds mapping to the respective tests.

As requested by @jyao1 I have added some unit tests to test the storage transport api, but I'm unsure about how the seeds are generated (hence why some of the the CI is failing also).

@twilfredo twilfredo force-pushed the wilfred/add-trans-storage-05.9 branch 3 times, most recently from 1e2c501 to a2c713e Compare November 29, 2024 02:36
alistair23 and others added 4 commits November 29, 2024 13:21
As defined by DSP0826, add support for SPDM storage transport. The
transport layer uses a virtual storage header that encapsulates SPDM
requests to allow the caller to generate the required parameters
for a storage SPDM request. SPDM responses are not transport encoded,
with this header, instead just the message is returned.

Signed-off-by: Wilfred Mallawa <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
This allows transports such as Storage (DSP0286) to determine if the
next response is protected via secured messages. Unlike other transport
layers, storage does not encode the message type in a response header.
As such, the requester must track the expected type.

The issue [1] discusses this implementation requirement in further
detail with regards to DSP0286.

[1] DMTF/SPDM-WG#3520

Signed-off-by: Wilfred Mallawa <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
Signed-off-by: Wilfred Mallawa <[email protected]>
@twilfredo twilfredo force-pushed the wilfred/add-trans-storage-05.9 branch from a2c713e to 10033fd Compare November 29, 2024 03:22
@twilfredo
Copy link
Contributor Author

ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants