On Mon, Apr 25, 2022 at 12:31:51AM -0500, Zebediah Figura wrote:
- Linux has a personality(2) switch ADDR_LIMIT_32BIT. The documentation is
terse, so I'm not fully sure what this does, but it might be sufficient to ensure that new mappings are placed under 2 GB, while not breaking old mappings? And presumably it's also toggleable. It's not ideal exactly—we'd like to be able to set a 3 GB or 4 GB limit instead if the binary allows—but it's potentially already usable.
FWIW, currently this only appears to affect alpha and arm architectures. That's not to say we couldn't try to get something in for x86. If we want something more useful, we'd likely be better adding to the prctl(2) interface.
Huw.