You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Arm feature detection on Apple platforms should use sysctlbyname #20188
OpenSSL broadly uses sysctlbyname, but still runs the probing mechanism on Apple platforms. It just happens to filter out the not-always-available features on this line:
But then later PRs regressed this by not similarly guarding such features: #17916 and #15361. I ran into this because OpenSSL's regression here seems to interfere with debugging things on macOS with lldb, but the SIGILL mechanism is also not thread-safe.
But that limited __APPLE__ guard is also the wrong way to do this. Instead one should completely disable the SIGILL mechanism on platforms where a real API is available. Indeed, as it's not thread-safe, best not to have it at all and just use the correct APIs on all platforms, combined with the preprocessor defines from ACLE to handle always-available features since older Apple platforms didn't provide runtime detection for such features. (BoringSSL handles all its detection without SIGILL.)
Reacted by Georgi Valkov, Gregory P. Smith and Suraj
Yup, by removing the SIGILL probing as I've been suggesting. :-) BoringSSL does not have any SIGILL code and we've never run into any problems of that nature. The expectation is the OS APIs are supposed to smooth over differences across the cores.
I agree we shouldn't be doing the SIGILL probing on Apple Silicon. I've been working on a set of changes to tidy up armcap.c which include that. Note that in general operation these tests are benign as long as they pass, and as long as you're not in lldb (which has hit me too!).
It is a feature/refactoring. If someone backports it OTC can consider approving it for merge to 3.1 (possibly 3.0 as well).
Well, some change related to this between 3.0.8 & 3.1.0 ended up breaking debugging of CPython on osx-arm, which is causing people to have to come up with work-arounds (see python/cpython#99079).
That's why I said "or a minimal version of it" - it's a pity that the change is combined with a clean-up & refactoring, but it should be backported in some form. I'm glad @oraluben opened #20948 already, thanks!
For context (from discussion in the linked issue but primarily here), CPython maintainers (I am not one of them) are so concerned by the volume of problems with OpenSSL 3 that people have been seriously considering delaying the move to OpenSSL 3 even beyond the EOL of 1.1.1, or changing away from OpenSSL entirely. I mention the perception of one big downstream dependency in case people happen to care about such things, as not backporting a fix would likely pile onto that displeasure.
Activity
paulidale commentedon Feb 1, 2023
Is there any way to handle the big.LITTLE problems where features differ across cores and are wrongly attempted?
davidben commentedon Feb 1, 2023
Yup, by removing the SIGILL probing as I've been suggesting. :-) BoringSSL does not have any SIGILL code and we've never run into any problems of that nature. The expectation is the OS APIs are supposed to smooth over differences across the cores.
tom-cosgrove-arm commentedon Feb 1, 2023
I agree we shouldn't be doing the
SIGILLprobing on Apple Silicon. I've been working on a set of changes to tidy uparmcap.cwhich include that. Note that in general operation these tests are benign as long as they pass, and as long as you're not inlldb(which has hit me too!).paulidale commentedon Feb 1, 2023
Looking forward to the PR.
Tidy up aarch64 feature detection code in armcap.c
Add support for openssl-3.1.0
h-vetinari commentedon May 12, 2023
Could 52a3814 (or a minimal version of it) be backported to the 3.1 branch?
t8m commentedon May 12, 2023
It is a feature/refactoring. If someone backports it OTC can consider approving it for merge to 3.1 (possibly 3.0 as well).
Tidy up aarch64 feature detection code in armcap.c
h-vetinari commentedon May 13, 2023
Well, some change related to this between 3.0.8 & 3.1.0 ended up breaking debugging of CPython on osx-arm, which is causing people to have to come up with work-arounds (see python/cpython#99079).
That's why I said "or a minimal version of it" - it's a pity that the change is combined with a clean-up & refactoring, but it should be backported in some form. I'm glad @oraluben opened #20948 already, thanks!
For context (from discussion in the linked issue but primarily here), CPython maintainers (I am not one of them) are so concerned by the volume of problems with OpenSSL 3 that people have been seriously considering delaying the move to OpenSSL 3 even beyond the EOL of 1.1.1, or changing away from OpenSSL entirely. I mention the perception of one big downstream dependency in case people happen to care about such things, as not backporting a fix would likely pile onto that displeasure.
paulidale commentedon May 14, 2023
Added a note in the PR with the OTC question.
Tidy up aarch64 feature detection code in armcap.c