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

Add s2n_stuffer_shift #4458

Merged
merged 4 commits into from
Mar 15, 2024
Merged

Add s2n_stuffer_shift #4458

merged 4 commits into from
Mar 15, 2024

Conversation

lrstewart
Copy link
Contributor

@lrstewart lrstewart commented Mar 13, 2024

Description of changes:

Add a "s2n_stuffer_shift" method needed by an upcoming feature. It shifts all the unread data in a stuffer back to the beginning of the stuffer, freeing up more existing memory for new data.

Call-outs:

When I ran the CBMC proof with either real memcpy or real memmove, it consumed so many resources for so long that I lost access to my EC2 instance and had to replace it. But I wanted to be able to assert correct behavior, so I wrote a simple stub replacement.

Testing:

Unit tests, and a new CBMC proof.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Mar 13, 2024
@lrstewart lrstewart marked this pull request as ready for review March 14, 2024 00:03
@lrstewart lrstewart requested review from camshaft and goatgoose March 14, 2024 00:03
stuffer/s2n_stuffer.c Outdated Show resolved Hide resolved
@lrstewart lrstewart requested a review from camshaft March 14, 2024 20:31
@lrstewart lrstewart enabled auto-merge (squash) March 15, 2024 16:22
@lrstewart lrstewart merged commit 1f8ac93 into aws:main Mar 15, 2024
31 checks passed
@lrstewart lrstewart deleted the fix2 branch March 15, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants