Skip to content

Conversation

@jakemas
Copy link
Contributor

@jakemas jakemas commented Dec 12, 2025

Testing delocator, this is #2902 but with x86 NTT and iNTT hooked up (+5000 lines of x86 asmb).

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

github-actions[bot]

This comment was marked as duplicate.

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 88.15911% with 128 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.09%. Comparing base (ec39cb3) to head (ad9abfe).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
crypto/fipsmodule/ml_dsa/mldsa/sign.c 63.29% 98 Missing ⚠️
crypto/fipsmodule/ml_dsa/ml_dsa.c 82.85% 18 Missing ⚠️
crypto/fipsmodule/ml_dsa/mldsa/poly.c 96.89% 5 Missing ⚠️
crypto/fipsmodule/cipher/e_aes.c 66.66% 3 Missing ⚠️
crypto/fipsmodule/aes/mode_wrappers.c 77.77% 2 Missing ⚠️
crypto/fipsmodule/ml_dsa/mldsa/packing.c 98.21% 1 Missing ⚠️
crypto/fipsmodule/ml_dsa/mldsa/poly_kl.c 99.51% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2903      +/-   ##
==========================================
- Coverage   78.19%   78.09%   -0.10%     
==========================================
  Files         685      691       +6     
  Lines      118074   118641     +567     
  Branches    16617    16677      +60     
==========================================
+ Hits        92330    92658     +328     
- Misses      24856    25095     +239     
  Partials      888      888              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

github-actions[bot]

This comment was marked as duplicate.

github-actions[bot]

This comment was marked as duplicate.

jakemas added a commit that referenced this pull request Jan 14, 2026
…2919)

### Delocate AES, GCM, and cipher wrapper functions

On AArch64, the delocator can patch up the computation of function
pointers only if the pointers can be computed with a PC-relative offset
in the range (-1MB, 1MB).

For the function pointer computations in
`crypto/fipsmodule/aes/mode_wrappers.c`,
`crypto/fipsmodule/cipher/e_aes.c`, and `crypto/fipsmodule/modes/gcm.c`,
this bounds condition is about to be violated by further code additions
to AWS-LC, as witnessed in AES-unrelated PRs.

This commit preventatively fixes the issue by adding function pointer
trampolines to these files: These are stub functions immediately
branching into the desired assembly routines, but close enough to the C
code computing their address to ensure that their addresses will be
computable using a PC-relative offset.

This fix is similar to previous delocator fixes addressing the same
AArch64 PC-relative offset limitation, see
#2165,
#2294 for examples.

### AWS-LC-Verification

As there are SAW proofs for AES GCM, these changes affect the proofs
([formal-verification / fv-saw-x86_64-aes-gcm
(pull_request)](https://github.com/aws/aws-lc/actions/runs/20380843167/job/58570729683?pr=2919))
and require changes in aws-lc-verification to continue proof support --
this has been added in
awslabs/aws-lc-verification#180.

### Testing:
Stability of the fix was tested in
#2903 which added ~10,000 lines of
additional AVX2 backend.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
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.

2 participants