Skip to content
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

Fix AVX detection #121

Merged
merged 1 commit into from Nov 6, 2023
Merged

Fix AVX detection #121

merged 1 commit into from Nov 6, 2023

Commits on Nov 5, 2023

  1. Fix AVX detection

    The old/faulty code would try to use AVX/AVX2 if either the SSE bit or
    the AVX bit were set in XCR0, but did not check if both bits were set.
    
    In most cases, this still worked, but on some machines, enabling linux
    kernel mitigations for the "gather data sampling" vulnerability results
    in only the SSE bit but not the AVX bit being set, thus resulting in an
    illegal instruction and crashing the application.
    
    Fix this by checking that both bits are set.
    
    Fixes: 4bbb590 ("Proper check of CPU's AVX2 feature support (with MSVC support)")
    Signed-off-by: Pascal Ernster <git@hardfalcon.net>
    hardfalcon committed Nov 5, 2023
    Copy the full SHA
    9003f9b View commit details
    Browse the repository at this point in the history