[Bug 15236] [1.36] SIGILL on accessing sha256 on some CPUs
bugzilla at busybox.net
bugzilla at busybox.net
Sat Mar 4 14:40:10 UTC 2023
https://bugs.busybox.net/show_bug.cgi?id=15236
--- Comment #3 from Ben <ben.busybox at backplane.be> ---
Intel has a documented C function (with inline assembly) to check for the SHA
processor extensions:
<https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sha-extensions.html#inpage-nav-5>
... in their CheckForIntelShaExtensions function after the CPUID call, the
relevant bit is:
> // Intel® SHA Extensions feature bit is EBX[29]
> return ((b >> 29) & 1);
BusyBox v1.36.0 seems to perform this check differently:
shaNI = ((ebx >> 29) << 1) - 1;
if (shaNI > 0) ...
I was able to make the sha256sum function work on 8272CL by applying the
attached patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list