-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x86_64 build using crypto acceleration(ASM_X86) produces SHA extension instructions not available on many microarchitectures? #3
Comments
That shouldnt happen as the code that uses sha instructions wont do so without checking for the returned flags from cpuid first. I looked at the asm and its definitely only running sha instructions when the cpu returns support for it. |
These are the values in the "gnutls_x86_cpuid_s" array just after "gnutls_cpuid" returns: |
I managed to track this one down as it appears it was a version inconsistency between the older asm gnutls code expects and the asm used in the project (gnutls pulls all its asm from openssl repo but is incompatible with any of the more recent asm versions). I pushed an update to the repo and updated the latest release on the release page with the appropriate fixes. Let me know if this corrects the problem for you. |
A crash occur in my app that uses gnutls13 early data, stack trace: #0 free (libc.so.6 + 0x97bf0) #1 _gnutls_buffer_clear (libgnutls.so.30 + 0x77c8c) #2 _gnutls13_recv_end_of_early_data (libgnutls.so.30 + 0xaf308) #3 _gnutls13_handshake_server (libgnutls.so.30 + 0x42d6c) #4 handshake_server (libgnutls.so.30 + 0x4ff6c) The root cause is that _gnutls_buffer_clear() was trying to free 'buf' that is not initialized or set if GNUTLS_NO_END_OF_EARLY_DATA flag is set on server side. This patch fixes it by simply initializing buf at the begginning of _gnutls13_recv_end_of_early_data(). Signed-off-by: Xin Long <lucien.xin@gmail.com>
The 64bit versions of the .asm files produced from the .s files have SHA extention instructions in them, which compile but don't run on the Broadwell-U system I work on. From what I've read on wikipedia and in Intel's docs, it seems these extensions are only available on Goldmont core systems which were unveiled in April. Disabling accelerated crypto is the work around I can find for now.
The text was updated successfully, but these errors were encountered: