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

Improve checks for MCTP control protocol messages #33

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Conversation

jk-ozlabs
Copy link
Member

This series implements more checking on MCTP control protocol responses: that they have the correct opcode and IID values from the request.

In doing so, we use a common error checking path.

@jk-ozlabs
Copy link
Member Author

I have some improvements in mind for this, converting to draft.

@jk-ozlabs jk-ozlabs marked this pull request as draft February 6, 2024 23:44
Currently we ignore the IID and opcode fields in control protocol
response messages. This means we may get a delayed response from an
endpoint, it may be interpreted incorrectly as a response to the next
message.

Instead, allocate new IIDs for each message, then check the IIDs in
responses. We do this through a new common response validation function,
mctp_ctrl_validate_response.

This requires some additional string building for error messages.

Signed-off-by: Jeremy Kerr <[email protected]>
@jk-ozlabs jk-ozlabs marked this pull request as ready for review October 21, 2024 07:20
@jk-ozlabs jk-ozlabs merged commit e7d64b0 into main Oct 21, 2024
2 checks passed
@jk-ozlabs jk-ozlabs deleted the pr/resp-checks branch October 21, 2024 08:06
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.

1 participant