Page MenuHomeFreeBSD

Make Linux uname(2) return x86_64 to 32-bit apps
ClosedPublic

Authored by trasz on Jun 12 2020, 8:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 8:07 PM
Unknown Object (File)
Sun, Nov 17, 11:49 PM
Unknown Object (File)
Mon, Nov 11, 5:56 AM
Unknown Object (File)
Mon, Nov 11, 5:53 AM
Unknown Object (File)
Mon, Nov 11, 5:15 AM
Unknown Object (File)
Mon, Nov 11, 3:09 AM
Unknown Object (File)
Mon, Nov 11, 2:33 AM
Unknown Object (File)
Oct 17 2024, 1:45 AM
Subscribers

Details

Summary

Make Linux uname(2) return x86_64 to 32-bit apps.
This fixes PR 240432.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz requested review of this revision.Jun 12 2020, 8:24 PM

Curious, what Linux reports for arm 32bit binaries on arm64 host ?

lazytwitter turned up https://unix.stackexchange.com/questions/136407/is-my-linux-arm-32-or-64-bit for me,

On a 64-bit processor, you'd see a string starting with armv8 (or above) if the uname process itself is a 32-bit process, or aarch64 if it's a 64-bit process.

https://twitter.com/agentdero/status/1271570495041761281
looks like it's actually aarch64 for 32-bit uname on 64-bit kernel

We also need to know what's being returned by getauxval. You can use https://people.freebsd.org/~trasz/u.c to check it.

This revision is now accepted and ready to land.Jun 14 2020, 10:22 PM