briansmith / ring

Safe, fast, small crypto using Rust
Other
3.74k stars 704 forks source link

cpu arm: Fix static feature detection initialization. #1842

Closed briansmith closed 11 months ago

briansmith commented 11 months ago

Commit f932b941bd1f59782cb3db8f7cd7b8b2c9842ee9 was incomplete and wrong. On targets where we do any static or dynamic feature detection and where we have these global variables, we need to unconditionally write the detected features to the global variable so that assembly can see them. Since we do static feature detection regardless of operating system, the initialization of the global most be done without any conditions on the operating system.

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e530025) 96.01% compared to head (c89a870) 96.01%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1842 +/- ## ========================================== - Coverage 96.01% 96.01% -0.01% ========================================== Files 136 136 Lines 20687 20677 -10 Branches 226 226 ========================================== - Hits 19863 19852 -11 Misses 791 791 - Partials 33 34 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

briansmith commented 11 months ago

I expanded the CI testing in #1843 and verified that such testing would have prevented this bug.