personality(2) already exists
personality(2) already exists
Posted Apr 28, 2024 18:07 UTC (Sun) by Hello71 (guest, #103412)Parent article: Support for the TSO memory model on Arm CPUs
Linux already has a system call to enable special compatibility logic in the kernel for old binaries. personality(2) was added 30 years ago in Linux 1.1.20 and has gained various "weird memory" modes over the years, including "ADDR_LIMIT_32BIT (since Linux 2.2): Limit the address space to 32 bits." and "ADDR_NO_RANDOMIZE (since Linux 2.6.12): With this flag set, disable address-space-layout randomization.". There has not been a surge of poorly-written programs relying on these modes.
Fundamentally, CPU emulation is a heavy compatibility mode. A reasonable argument could, and has endlessly been made that Wine and other emulators are detrimental to the long-term success of portable applications, but I see no principle why Wine, QEMU, ADDR_LIMIT_32BIT, and ADDR_NO_RANDOMIZE should be acceptable but PR_SET_MEM_MODEL_TSO shouldn't.
