Repository navigation
Tidy up aarch64 feature detection code in armcap.c - #20305
tom-cosgrove-arm wants to merge 1 commit into
Conversation
Make the SIGILL-based code easier to read, and don't use it on Apple Silicon. Also fix "error: 'HWCAP(2)_*' macro redefined" warnings on FreeBSD. Fixes openssl#20188 Change-Id: I5618bbe9444cc40cb5705c6ccbdc331c16bab794
|
This patch has been reviewed internally, it looks good to me. |
|
Is it feasible to drop the SIGILL probing entirely? |
The SIGILL probing works (tested on Ubuntu, anyway) and is only used as a compile-time fallback. It's not used if there's another way to get the information: i.e. not used on Windows (where Regarding the "big.LITTLE" problem: I asked this ages ago, and have been trying to find a reference, but basically there is a recommendation to pair architecturally compatible cores, so in (best) practice this shouldn't be an issue. |
|
Ping for a second reviewer? |
|
This pull request is ready to merge |
|
Merged, thanks for the contribution. |
Make the SIGILL-based code easier to read, and don't use it on Apple Silicon. Also fix "error: 'HWCAP(2)_*' macro redefined" warnings on FreeBSD. Fixes #20188 Change-Id: I5618bbe9444cc40cb5705c6ccbdc331c16bab794 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from #20305)
Make the SIGILL-based code easier to read, and don't use it on Apple Silicon. Also fix "error: 'HWCAP(2)_*' macro redefined" warnings on FreeBSD. Fixes openssl#20188 Change-Id: I5618bbe9444cc40cb5705c6ccbdc331c16bab794 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20305) (cherry picked from commit openssl@52a3814)
Make the SIGILL-based code easier to read, and don't use it on Apple Silicon.
Also fix "error: 'HWCAP(2)_*' macro redefined" warnings on FreeBSD.
Fixes #20188
Much of the code is just moved, but on Apple Silicon we no longer fall through to the SIGILL detection, instead setting those bits that we know will be present, and (continuing) to detect the rest via sysctl().
The SIGILL probing has been refactored to make it (hopefully) simpler to read.
Tested on various systems (Ubuntu, Darwin, FreeBSD) and verified we got the same results before and after.
Note: something that came out of this is that the SIGILL detection for aarch64 RNG doesn't work - we'll look at this later.
Checklist
(none applicable)