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

Apple M1 (and likely some other arm64) patches #4587

Merged
merged 3 commits into from
Mar 8, 2021

Conversation

magnumripper
Copy link
Member

See #4585

@magnumripper magnumripper self-assigned this Mar 3, 2021
@magnumripper magnumripper marked this pull request as draft March 3, 2021 19:56
@magnumripper magnumripper mentioned this pull request Mar 3, 2021
@magnumripper magnumripper marked this pull request as ready for review March 7, 2021 16:50
@magnumripper magnumripper changed the title Autoconf: Fix arch.h selection for Apple M1 (and likely some other arm64) Apple M1 (and likely some other arm64) patches Mar 7, 2021
@magnumripper
Copy link
Member Author

magnumripper commented Mar 7, 2021

Tested for regression on Raspberry Pi, 32-bit and 64-bit. No problem seen - on the contrary, both got the RAR format again, which was disabled in 2017 by ddeabc6.

…m64)

It would end up picking arm32le.h due to flaws in the detecting macro.
See openwall#4585
This allows the RAR format to build, where applicable.  See openwall#4585
MacOS native (clang) gcc wouldn't allow rotations larger than width
so we simply mask the argument correctly.

Closes openwall#4585
Copy link
Member

@solardiz solardiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks good to me. We might address my nitpick about the configure tests separately.

[[#include <arm_neon.h>
#include <stdio.h>
extern void exit(int);
int main(){uint32x4_t t;*((long*)&t)=1;t=veorq_u32(t,t);if((*(unsigned*)&t)==88)printf(".");exit(0);}]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not great that we have C aliasing violations in these configure test programs. I recall us discussing this before (for some other arch), but I don't recall what the outcome of the discussion was.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While at that we could drop the need for stdio and just end with a calculated exitcode, expected 0 - the current test of "88" is most everywhere and doesn't test correctness, we only look for build ok/fail and run ok/segfault. Let's make a separate issue for it.

@magnumripper magnumripper merged commit c9825e6 into openwall:bleeding-jumbo Mar 8, 2021
@magnumripper magnumripper deleted the apple-m1 branch March 8, 2021 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants