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)
Jan 10 2024, 7:09 PM
Unknown Object (File)
Dec 23 2023, 3:43 AM
Unknown Object (File)
Dec 13 2023, 4:13 PM
Unknown Object (File)
Nov 18 2023, 10:05 PM
Unknown Object (File)
Oct 23 2023, 4:56 PM
Unknown Object (File)
Sep 26 2023, 8:59 PM
Unknown Object (File)
Sep 3 2023, 8:20 AM
Unknown Object (File)
Sep 3 2023, 8:16 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