[PATCH v4 10/10] powerpc/uaccess: Implement masked user access
Peter Zijlstra
peterz at infradead.org
Thu Nov 6 23:35:50 AEDT 2025
On Thu, Nov 06, 2025 at 12:31:28PM +0100, Christophe Leroy wrote:
> On 32 bits it is more tricky. In theory user space can go up to
> 0xbfffffff while kernel will usually start at 0xc0000000. So a gap
> needs to be added in-between. Allthough in theory a single 4k page
> would suffice, it is easier and more efficient to enforce a 128k gap
> below kernel, as it simplifies the masking.
Do we have the requirement that the first access of a masked pointer is
within 4k of the initial address?
Suppose the pointer is to an 16k array, and the memcpy happens to like
going backwards. Then a 4k hole just won't do.
More information about the Linuxppc-dev
mailing list