mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1093] bleeding-jumbo fails to build on Fedora Rawhide (F23) #683
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#683
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 @kholia on GitHub (Mar 10, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1093
Originally assigned to: @jfoug on GitHub.
@magnumripper commented on GitHub (Mar 10, 2015):
Is this about using gcc v5 or something like that, or did it work before some recent commit? Latest code works fine here using gcc 4.9.2
@kholia commented on GitHub (Mar 10, 2015):
Something is up when I use GCC 5 to compile JtR. I haven't done any further investigations to see what exactly causes the problem.
@jfoug commented on GitHub (Mar 10, 2015):
MD5_thread_for_body is in MD5_std.c It gets 'used' by dynamic under certain conditions (which used to be when it was compiled for md5crypt). I will check to see if these have changed somehow. Using those (MD5_body and MD5_thread_for_body) can be faster than oSSL, that is why they are used.
@jfoug commented on GitHub (Mar 10, 2015):
can you do a make clean then make, just to be sure.
@jfoug commented on GitHub (Mar 10, 2015):
This might be the 'MAYBE_INLINE' working differently. @magnumripper how would we easily disable that?
How about adding these lines to the very bottom of common.h (NOTE, this is only to 'test' that this is what is happening).
#undef MAYBE_INLINE
#define MAYBE_INLINE
Put that at the bottom of common.h make clean and make and see if link problem goes away.
@magnumripper commented on GitHub (Mar 10, 2015):
I see nothing in the release notes about changed syntax for inline.
@jfoug commented on GitHub (Mar 10, 2015):
It would have NOTHING to do with syntax. It would have everything to do with implementation. This is a link error, meaning that the compiler is not emitting that function to the object code. That is all. To me it sounds like implementation differences.
I am not able to test, just guess. @kholia will have to tell whether that guess is right or not. Once we know, then we can see what is needed to 'fix' it.
@kholia commented on GitHub (Mar 10, 2015):
@jfoug I started with a clean tree. After the build failed, I ran "make clean" again, just to be sure.
@jfoug commented on GitHub (Mar 10, 2015):
Please try to remove the MAYBE_INLINE and see if problem goes away. I really think this is what is happening. That now, with 5.0 nothing gets output into the object file, thus the link fails, where before, even if it was being done inline, it still ended up in the .o file, so that dyna could use it.
If this is the case, then we have 1 of 3 choices. 1, remove the inline. 2. someone compile the function twice, once with inline, and once without. 3. remove its usage from dyna, and fall back to oSSL (for gcc 5).
I would really like to find out just how big a deal the 'inline' really is within cryptmd5. It really WAS nice to be able to share that code, but often times the code in JtR is poorly written to allow code share (static functions, inlines, etc), all for often just an insignificant gain.
@magnumripper commented on GitHub (Mar 10, 2015):
I would regard that as a compiler bug. As long as the function is not static, a non-inlined copy should be emitted too.
@magnumripper commented on GitHub (Mar 10, 2015):
Seems you are right, and it's about C11 vs C89: http://www.gnu.org/software/gcc/gcc-5/porting_to.html
@magnumripper commented on GitHub (Mar 10, 2015):
So one obvious solution is adding
-std=gnu89using JTR_FLAG_CHECK in autoconf.@jfoug commented on GitHub (Mar 10, 2015):
Also:
So we 'may' be able to use extern, still get the inline for md5crypt, but force the compiler to jam it into the .o file also.
@jfoug commented on GitHub (Mar 10, 2015):
But since I do not have this version, @kholia may have to do the experimentation on getting this working. I can propose things, but it will be his testing that is required.
@jfoug commented on GitHub (Mar 10, 2015):
I made these changes:
Here were timings with inline
Here were timings without
In other words, a bunch of problems for nothing. There are WAY too many of these, they end up meaning nothing but a huge JtR image. No gain in speed, and makes things more difficult for code sharing. Inlines ARE very important, but they have to be the right ones. Inlining a monster like body gains little to nothing, and may at times lose performance, due to a larger working set, and caches being blown.
@jfoug commented on GitHub (Mar 10, 2015):
@kholia
Please try the patch in the message I sent just prior to this (that clears out the MAYBE_INLINE_BODY), and see if that change alone is enough to make this work.
IF that is the case, and from what I have seen, there is almost NO gain trying to inline the body, then I would propose to either remove the inlining, OR remove the inlining of body if GCC 5 is detected (or C99 semantics are being used).
@kholia commented on GitHub (Mar 10, 2015):
@jfoug
The patch fixes the build problem 👍
@jfoug commented on GitHub (Mar 10, 2015):
Ok, if we now KNOW the problem, lets look at a solution.
Again, the solution 'I' would prefer, is to scrap the MAYBE_INLINE_BODY fully. IT DOES NOT provide any benefits of speed (possibly less than 1%, but it seems to be within the margin of fluctuation). But there are other options. With the inline, it appears that gcc5 is not happy to provide the extern function any more for us.
@kholia commented on GitHub (Mar 10, 2015):
@jfoug I will be online for next 2 hours or so (before I hit the bed). I can try alternate patches too :)
@magnumripper commented on GitHub (Mar 10, 2015):
This is core stuff so we could opt to just hand it over to Solar. He will have to fix it in core asap and I'd prefer to just go with whatever fix he picks.
@kholia could you try checking out the master branch and build it without any fix? Do you get similar errors?
@magnumripper commented on GitHub (Mar 10, 2015):
@jfoug your tests were done with AVX, I'm not sure this inline macro is involved at all then? I think it's not.
@kholia commented on GitHub (Mar 10, 2015):
@magnumripper "make clean linux-x86-64" on
masterbranch works without any problem.@magnumripper commented on GitHub (Mar 10, 2015):
OK, then we can leave Solar out of this discussion.
@jfoug commented on GitHub (Mar 10, 2015):
@magnumripper XOP also had zero gain (well, about 1% also).
@jfoug commented on GitHub (Mar 10, 2015):
Also SSSE4.1 had about a 1% loss (VM). Inlining of those GIANT functions is not going to gain speed, or just a super tiny amount. The total amount of time creating and tearing down the stack frame is simply meaningless, compared with amount of time used in the function. there is WAY too much inline requests in JtR where they should not be. This is just one example. Yes, there ARE times where it is hugely helpful, and other times where it is used to make fake functions to put into a header. But simply jamming an
__inline__to every 'hot' function is not always going to make things faster.@magnumripper commented on GitHub (Mar 10, 2015):
My point was that this MAYBE_INLINE_BODY is not used at all for SIMD. You are just seeing random variations from unaltered code.
@magnumripper commented on GitHub (Mar 10, 2015):
Here's a relevant test that is actually affected by that macro (this is CORE john without SIMD)
This is still less than one percent so your reasoning holds true anyway. This is on core i7 mobile.
@jfoug commented on GitHub (Mar 10, 2015):
My bad. You are 100% right.
@magnumripper commented on GitHub (Mar 10, 2015):
So when is this code used in Jumbo on an x86-64? It's only in a few Dynamic formats that need large input, right?
@magnumripper commented on GitHub (Mar 10, 2015):
I'm still kind of fond of the idea to just add
-std=gnu89using JTR_FLAG_CHECK in autoconf. Not only should it fix this problem, it will likely hold back other problems as well.@magnumripper commented on GitHub (Mar 10, 2015):
BTW I can't build gcc-5 on OSX yet. Well I probably could, but I'm too lazy... I'll just wait till my packager has it nicely wrapped up.
@magnumripper commented on GitHub (Mar 10, 2015):
I added
-std=gnu89inf310326. @kholia please try with that (you need to re-configure).@jfoug commented on GitHub (Mar 10, 2015):
For SIMD builds, yes, that is correct. But it IS used, and this is required at link time.
@Titotix commented on GitHub (May 3, 2016):
I mentioned that the source provided at openwall.com/john/ for john-1.8.0-jumbo include this issue.
I have no idea who is in charge of updating this, I just mention it =)
@bjornfor commented on GitHub (May 17, 2016):
I just hit this too (on NixOS 16.03). Please make a release with the fix.
@magnumripper commented on GitHub (May 17, 2016):
We are in no position to release right now. It's likely several months away.
@maximlomans commented on GitHub (Nov 1, 2017):
hello earth to planet ripper the year down here is 2017 staring 2018 in the face Santa with his sleigh is the only thing in the way :p where is that patch , i see the issue is closed ,
make[1]: Leaving directory '/home/mpiuser/john-1.8.0-jumbo-1/src/escrypt'
In file included from /usr/include/stdio.h:27:0,
from jumbo.h:20,
from os-autoconf.h:29,
from os.h:20,
from bench.c:25:
/usr/include/features.h:148:3: warning:
warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
^
gpg2john.c: In function ‘pkt_type’:
gpg2john.c:1194:7: warning: type of ‘tag’ defaults to ‘int’ [-Wimplicit-int]
char *pkt_type(tag) {
^
/usr/bin/ar: creating aes.a
dynamic_fmt.o: In function
DynamicFunc__crypt_md5_to_input_raw_Overwrite_NoLen': /home/mpiuser/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4989: undefined reference toMD5_body_for_thread'dynamic_fmt.o: In function
DynamicFunc__crypt_md5': /home/mpiuser/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4425: undefined reference toMD5_body_for_thread'dynamic_fmt.o: In function
DynamicFunc__crypt_md5_in1_to_out2': /home/mpiuser/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4732: undefined reference toMD5_body_for_thread'dynamic_fmt.o: In function
DynamicFunc__crypt_md5_to_input_raw': /home/mpiuser/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4903: undefined reference toMD5_body_for_thread'dynamic_fmt.o: In function
DynamicFunc__crypt_md5_to_input_raw_Overwrite_NoLen_but_setlen_in_SSE': /home/mpiuser/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4946: undefined reference toMD5_body_for_thread'dynamic_fmt.o:/home/mpiuser/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4817: more undefined references to `MD5_body_for_thread' follow
collect2: error: ld returned 1 exit status
Makefile:294: recipe for target '../run/john' failed
make[1]: *** [../run/john] Error 1
Makefile:185: recipe for target 'default' failed
make: *** [default] Error 2
... maybe i'll take it up with him, Santa
Openwall's version
this one here compiled
@ghost commented on GitHub (Nov 1, 2017):
@marxenegls, have you tried to apply the patch seen in #2743?
Why don't you use the one that works
"one here compiled"? (call it bleeding-jumbo).@DenisNovac commented on GitHub (Oct 10, 2018):
This one is still working on Xubuntu 18.04. Thank you!