[GH-ISSUE #323] new warning and build failure in bleeding-jumbo with OMP enabled #64

Closed
opened 2026-10-14 02:51:05 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @kholia on GitHub (Jun 8, 2013).
Original GitHub issue: https://github.com/openwall/john/issues/323

Originally assigned to: @jfoug on GitHub.


### Enable OMP ###

$ make linux-x86-64-opencl -j8 1> /dev/null;
sse-intrinsics.c:127:0: warning: "_mm_roti16_epi32" redefined [enabled by default]
sse-intrinsics.c:85:0: note: this is the location of the previous definition
nt2_fmt_plug.c: In function ‘crypt_all’:
nt2_fmt_plug.c:530:3: warning: passing argument 3 of ‘SSEmd4body’ makes pointer from integer without a cast [enabled by default]
sse-intrinsics.h:50:6: note: expected ‘ARCH_WORD_32 *’ but argument is of type ‘int’
nt2_fmt_plug.c:530:3: error: too few arguments to function ‘SSEmd4body’
sse-intrinsics.h:50:6: note: declared here

$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"

$ git rev-parse HEAD  
ce2d7720ca0aa129b51f36ea3ed886652b5f7c42

These problems can be reproduced on our development machine "bull" easily.

Surprisingly, I can't reproduce these problems on my 64-bit Fedora 18 machine.

Originally created by @kholia on GitHub (Jun 8, 2013). Original GitHub issue: https://github.com/openwall/john/issues/323 Originally assigned to: @jfoug on GitHub. ``` ### Enable OMP ### $ make linux-x86-64-opencl -j8 1> /dev/null; sse-intrinsics.c:127:0: warning: "_mm_roti16_epi32" redefined [enabled by default] sse-intrinsics.c:85:0: note: this is the location of the previous definition nt2_fmt_plug.c: In function ‘crypt_all’: nt2_fmt_plug.c:530:3: warning: passing argument 3 of ‘SSEmd4body’ makes pointer from integer without a cast [enabled by default] sse-intrinsics.h:50:6: note: expected ‘ARCH_WORD_32 *’ but argument is of type ‘int’ nt2_fmt_plug.c:530:3: error: too few arguments to function ‘SSEmd4body’ sse-intrinsics.h:50:6: note: declared here $ gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS" $ git rev-parse HEAD ce2d7720ca0aa129b51f36ea3ed886652b5f7c42 ``` These problems can be reproduced on our development machine "bull" easily. Surprisingly, I can't reproduce these problems on my 64-bit Fedora 18 machine.
Author
Owner

@kholia commented on GitHub (Jun 8, 2013):

Jim,

Can you please take a look?

<!-- gh-comment-id:19143947 --> @kholia commented on GitHub (Jun 8, 2013): Jim, Can you please take a look?
Author
Owner

@kholia commented on GitHub (Jun 8, 2013):

Does commit 2537b06a16 look okay?

I have no idea how the call actually works though ;)

<!-- gh-comment-id:19144005 --> @kholia commented on GitHub (Jun 8, 2013): Does commit 2537b06a16733052650e7c5e7fec70efda7820f1 look okay? I have no idea how the call actually works though ;)
Author
Owner

@jfoug commented on GitHub (Jun 8, 2013):

2537b06* looks fine.

What it does, is to use a new 'interface' into the SSE. The output pointer, and the pointer to any 'reload' data have been separated. They CAN use pointers to the same location in memory, but do not have to.

Also the last param is now a bitmap that tells each function a LOT of information. Whether it should use the IV (i.e. first limb of each type loads the state from a fixed IV), or whether the state should be reloaded from data from the prior limb's state. This was the only piece of information in that final param before. A 1 said to use the IV, a 0 said to use the output pointer (which is now the reload state pointer). The new format also lists whether the input data is in min BINARY format, or in input format (of 1, 2 or 4 limbs). Also if the output format is in min BINARY format, or in an input format. These input formats matter when you get into *_PARA > 1. There also is a bit added listing whether the data is already in 'mixed' MMX_COEF format, which is 4 packed values for 32 bit formats, or 2 packed values for 64 bit formats, or if the data is in 'flat' format. Flat format is 64 byte buffers (or 128 double, or 256 quadruple buffers). The buffers have been properly 'finalized' (i.e. the 0x80 bit appended, all tail bytes set to 0x00 and the number of bits is located in the proper ending location).

So what your patch did, was to convert a call from the old format of:

SSEmd4body(in_data_ptr, out_data_ptr, 1);

into the new format of

SSEmd4body(in_data_ptr, out_data_ptr, reload_data_ptr, int_processing_bits);

The reload_data_ptr is set to null (there is no reload), and the only bit used is the SSEi_MIXED_IN, which simply tells the SIMD code that the data in the in_data_ptr location is already 'mixed' format of interleaved 4 candidate values * MD4_SSE_PARA, which the nt format has been using all along for the data.

So pretty much any SSEhashbody() that is SSEhashbody(in, out, 1) is a straight port to the new SSEhashbody(in, out, NULL, SSEi_MIXED_IN) format.

Jim.

---- Dhiru Kholia notifications@github.com wrote:

Does commit 2537b06a16 look okay?

I have no idea how the call actually works though ;)


Reply to this email directly or view it on GitHub:
https://github.com/magnumripper/JohnTheRipper/issues/323#issuecomment-19144005

<!-- gh-comment-id:19144668 --> @jfoug commented on GitHub (Jun 8, 2013): 2537b06\* looks fine. What it does, is to use a new 'interface' into the SSE. The output pointer, and the pointer to any 'reload' data have been separated. They CAN use pointers to the same location in memory, but do not have to. Also the last param is now a bitmap that tells each function a LOT of information. Whether it should use the IV (i.e. first limb of each type loads the state from a fixed IV), or whether the state should be reloaded from data from the prior limb's state. This was the only piece of information in that final param before. A 1 said to use the IV, a 0 said to use the output pointer (which is now the reload state pointer). The new format also lists whether the input data is in min BINARY format, or in input format (of 1, 2 or 4 limbs). Also if the output format is in min BINARY format, or in an input format. These input formats matter when you get into *_PARA > 1. There also is a bit added listing whether the data is already in 'mixed' MMX_COEF format, which is 4 packed values for 32 bit formats, or 2 packed values for 64 bit formats, or if the data is in 'flat' format. Flat format is 64 byte buffers (or 128 double, or 256 quadruple buffers). The buffers have been properly 'finalized' (i.e. the 0x80 bit appended, all tail bytes set to 0x00 and the number of bits is located in the proper ending location). So what your patch did, was to convert a call from the old format of: SSEmd4body(in_data_ptr, out_data_ptr, 1); into the new format of SSEmd4body(in_data_ptr, out_data_ptr, reload_data_ptr, int_processing_bits); The reload_data_ptr is set to null (there is no reload), and the only bit used is the SSEi_MIXED_IN, which simply tells the SIMD code that the data in the in_data_ptr location is already 'mixed' format of interleaved 4 candidate values \* MD4_SSE_PARA, which the nt format has been using all along for the data. So pretty much any SSEhashbody() that is SSEhashbody(in, out, 1) is a straight port to the new SSEhashbody(in, out, NULL, SSEi_MIXED_IN) format. Jim. ---- Dhiru Kholia notifications@github.com wrote: > Does commit 2537b06a16733052650e7c5e7fec70efda7820f1 look okay? > > I have no idea how the call actually works though ;) > > --- > > Reply to this email directly or view it on GitHub: > https://github.com/magnumripper/JohnTheRipper/issues/323#issuecomment-19144005
Author
Owner

@jfoug commented on GitHub (Jun 8, 2013):

Please test with github.com/magnumripper/JohnTheRipper@d086dd7326 which was corrected github.com/magnumripper/JohnTheRipper@736a782b34

This should fix this on XOP systems.

Jim.

<!-- gh-comment-id:19144842 --> @jfoug commented on GitHub (Jun 8, 2013): Please test with https://github.com/magnumripper/JohnTheRipper/commit/d086dd73264d0b2bd9b7c391af004f345bdf278c which was corrected https://github.com/magnumripper/JohnTheRipper/commit/736a782b34295d081921f7990aa6a1f6834bc12e This should fix this on XOP systems. Jim.
Author
Owner

@kholia commented on GitHub (Jun 8, 2013):

The problem is fixed. Thanks Jim!

<!-- gh-comment-id:19144896 --> @kholia commented on GitHub (Jun 8, 2013): The problem is fixed. Thanks Jim!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#64
No description provided.