Thread (18 messages) 18 messages, 6 authors, 2025-11-17

Re: [PATCH v4 10/10] powerpc/uaccess: Implement masked user access

From: Peter Zijlstra <peterz@infradead.org>
Date: 2025-11-06 12:36:10
Also in: linux-block, linux-fsdevel, linuxppc-dev, lkml

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.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help