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

SessionID creation is backwards #1424

Closed
steven-bellock opened this issue Nov 23, 2022 · 4 comments · Fixed by #1450
Closed

SessionID creation is backwards #1424

steven-bellock opened this issue Nov 23, 2022 · 4 comments · Fixed by #1450
Assignees
Labels
bug Something isn't working stable For upcoming stable release
Milestone

Comments

@steven-bellock
Copy link
Contributor

The specification says

The final session ID (SessionID) = Concatenate (ReqSessionID, RspSessionID).

where presumably ReqSessionID occupies the least-significant bytes and RspSessionID occupies the most-significant bytes. However in libspdm it is the opposite :

*session_id = (req_session_id << 16) | rsp_session_id;

@steven-bellock steven-bellock added the bug Something isn't working label Nov 23, 2022
@steven-bellock steven-bellock added this to the Q4 2022 milestone Nov 23, 2022
@steven-bellock
Copy link
Contributor Author

Additionally the specification doesn't formally define Concatenate(), which it should. I'll file an issue against the specification.

@steven-bellock
Copy link
Contributor Author

Issue has been filed at https://github.com/DMTF/SPDM-WG/issues/2281

@jyao1
Copy link
Member

jyao1 commented Nov 28, 2022

This will break the compatibility. We need highlight in release notes.

@steven-bellock
Copy link
Contributor Author

(req_session_id << 16) | rsp_session_id is in enough places (four) that it should be its own function.

uint32_t libspdm_generate_session_id (uint16_t req_session_id, uint16_t rsp_session_id)

Wenxing-hou added a commit to Wenxing-hou/libspdm that referenced this issue Dec 1, 2022
Fix the issue: DMTF#1424
Make session_id generate right.

Signed-off-by: Wenxing Hou <[email protected]>
steven-bellock pushed a commit that referenced this issue Dec 1, 2022
Fix the issue: #1424
Make session_id generate right.

Signed-off-by: Wenxing Hou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stable For upcoming stable release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants