mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #2716] Change the AVX2 detection in x86.S and x86-64.S to check for features we actually need. #1748
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1748
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @magnumripper on GitHub (Sep 2, 2017).
Original GitHub issue: https://github.com/openwall/john/issues/2716
#2384
https://github.com/magnumripper/JohnTheRipper/issues/2674#issuecomment-326740705
We should check for actual AVX2 support (and whatever else we need, if anything) and not features that merely suggest we have AVX2.
@magnumripper commented on GitHub (Sep 2, 2017):
@solardiz I recall I was actually hoping for you to add such test to John proper so I could just merge that 😉
@magnumripper commented on GitHub (Sep 8, 2017):
@kholia from https://github.com/magnumripper/JohnTheRipper/issues/2674:
You fooled me there. That's not the latest commit to this file. The below is also there (but I forgot I already did this!):
Those are leaf 7 tests. Actually we do test everything that we should - and nothing else.
@solardiz from https://github.com/magnumripper/JohnTheRipper/issues/2674:
Dhiru's comment was incorrect, but the last part of what you say puzzles me. Of course we have to check for MOVBE and FMA3. How would we be sure some compiler doesn't emit them?! The tests I do are everything Intel says we have to check for and nothing else.
From Intel spec:
For 32-bit builds though, the AVX2 test is still quick'n'dirty. I don't intend to fix that. If someone else does (or John Proper gets it) it would be nice of course.
@solardiz commented on GitHub (Sep 8, 2017):
That's a good point. They're allowed to when we build with
-march=native, and MOVBE is likely to actually be used where we use__builtin_bswap32and__builtin_bswap64, which we do. We could avoid FMA3 but using-mno-fma, but that option is available only in recent versions of gcc, so we'd have to check whether it's supported first. Overall, it's probably OK to leave the CPU check as-is for now. Thanks!@magnumripper commented on GitHub (Sep 8, 2017):
I parsed the Intel document as that they're allowed to as soon as we build with
-mavx2. Anyway, the 64-bit code is fine. We should fix the 32-bit stuff some day. In fact, you should merge all AVX2 support into John Proper and do it for us - a properx86.Sis the only thing missing ;-)