Messages in this thread | | | From | David Laight <> | Subject | RE: [RESEND PATCH v4 8/8] arm64: Allow 64-bit tasks to invoke compat syscalls | Date | Mon, 24 May 2021 12:38:19 +0000 |
| |
From: Steven Price > Sent: 24 May 2021 12:21 ... > So a "generic" way of requested the kernel limit the address space for > allocations would be potentially useful for other purposes. Adding a new > syscall for this purpose would be sensible. We already have (at least) > two "hacks" in mmap for controlling the address range that can be used: > > * MAP_32BIT - x86 only, and really "31 bit" > > * Providing a mmap() hint with the top bits set to opt-in to 52-bit VAs. > > A well defined mechanism for controlling the valid VA range for > allocations would be much better than adding more hacks - and bonus > points if it works for all the different types of allocation unlike the > above.
I'd have thought a 'MAP_BELOW' flag (cf MAP_FIXED) would suffice. I'm sort of surprised MAP_32BIT wasn't implemented that way. 'man mmap' says MAP_32BIT was added for x64 thread stacks - I though the requirement can from 32bit wine (windows has a 2G user/kernel boundary).
David
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
| |