8000 Capsules: SipHash respect leasable buffers and handle arbitrary buffer sizes by bradjc · Pull Request #3506 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Capsules: SipHash respect leasable buffers and handle arbitrary buffer sizes #3506

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

Closed
wants to merge 4 commits into from

Conversation

bradjc
Copy link
Contributor
@bradjc bradjc commented Jun 24, 2023

Pull Request Overview

This pull request updates the siphash capsule to correctly use leasable buffers and to accept data in units not a multiple of 8 bytes.

Testing Strategy

Updating the k-v stack and comparing hashes to an online calculator.

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

8000
@github-actions github-actions bot added kernel HIL This affects a Tock HIL interface. labels Jun 24, 2023
@bradjc bradjc force-pushed the capsules-siphash-update branch 2 times, most recently from 468f316 to 21ba455 Compare June 24, 2023 19:58
bradjc added a commit that referenced this pull request Jun 24, 2023
bradjc added a commit that referenced this pull request Jun 24, 2023
bradjc added a commit that referenced this pull request Jul 2, 2023
@hudson-ayers
Copy link
Contributor

These changes look good to me except for my complaint about the leasable buffer change on the other PR with those changes (#3505 (comment))

@bradjc bradjc force-pushed the capsules-siphash-update branch from c7aa1d9 to a1d11f4 Compare July 17, 2023 14:49
@bradjc bradjc changed the title Capsules siphash update Capsules: SipHash respect leasable buffers and handle arbitrary buffer sizes Jul 17, 2023
@bradjc
Copy link
Contributor Author
bradjc commented Jul 17, 2023

I rebased this and removed the leasable buffer api commit.

@github-actions github-actions bot removed the kernel label Jul 17, 2023
bradjc added a commit that referenced this pull request Jul 17, 2023
Comment on lines -152 to +156
let (int_bytes, _rest) = input.split_at(mem::size_of::<u64>());
u64::from_le_bytes(int_bytes.try_into().unwrap())
let mut eight_buf: [u8; 8] = [0; 8];
for i in 0..8 {
eight_buf[i] = *input.get(i).unwrap_or(&0);
}
u64::from_le_bytes(eight_buf)
Copy link
Member

Choose a reason for hiding this comment

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

I think this looks hideous, but it really seems like Rust doesn't have a better story to collect an iterator into a fixed size array yet...

@lschuermann lschuermann enabled auto-merge July 18, 2023 21:38
@bradjc bradjc force-pushed the capsules-siphash-update branch from a1d11f4 to cd5633c Compare July 18, 2023 21:41
@bradjc bradjc force-pushed the capsules-siphash-update branch from cd5633c to 1481f9b Compare July 19, 2023 13:36
@bradjc
Copy link
Contributor Author
bradjc commented Jul 19, 2023

Rebased.

@bradjc
Copy link
Contributor Author
bradjc commented Jul 19, 2023

Ok, sorry, I thought this would pass CI on its own. But it doesn't any trying to figure out which changes from the full PR (#3508) make it compile seems like too much work. We'll have to just go with the full PR at this point. These commits are verbatim in that PR, so it could still be helpful to look at this change set.

@bradjc
Copy link
Contributor Author
bradjc commented Jul 19, 2023

Merged in #3508.

@bradjc bradjc closed this Jul 19, 2023
auto-merge was automatically disabled July 19, 2023 21:59

Pull request was closed

@bradjc bradjc deleted the capsules-siphash-update branch July 20, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HIL This affects a Tock HIL interface.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0