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

[sw,kmac_endianess] Make sure to use word-aligned message #26398

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

pamaury
Copy link
Contributor

@pamaury pamaury commented Feb 23, 2025

The use of unaligned pointers leads to DIf to write the content byte by byte and therefore the swap is not applied.

Issue identified in #26354 by @luismarques

@pamaury pamaury requested a review from a team as a code owner February 23, 2025 20:45
@pamaury pamaury requested review from HU90m, luismarques, nasahlpa, vogelpi and a team and removed request for a team February 23, 2025 20:45
Copy link
Contributor

@luismarques luismarques left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, but I'd suggest addressing the inline nit and taking the time to improve dif_kmac_absorb, msg_fifo_write, etc to check for this condition (as you suggested).

The use of unaligned data leads the DIF to write the content byte
by byte and therefore the swap is not applied.

Signed-off-by: Amaury Pouly <[email protected]>
@luismarques luismarques changed the title [sw,kmac_endianess] Make sure to use aligned pointers [sw,kmac_endianess] Make sure to use word-aligned message Feb 23, 2025
Copy link
Member

@nasahlpa nasahlpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting & fixing this!

@HU90m HU90m merged commit b680e30 into lowRISC:master Feb 24, 2025
42 checks passed
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.

5 participants