Thread (20 messages) flat view 20 messages, 3 authors, 2020-01-24

Re: [PATCH v2 5/6] powerpc/32s: prepare prevent_user_access() for user_access_end()

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2020-01-23 10:59:31
Also in: linux-fsdevel, linux-mm, lkml

Christophe Leroy [off-list ref] writes:
In preparation of implementing user_access_begin and friends
on powerpc, the book3s/32 version of prevent_user_access() need
to be prepared for user_access_end().

user_access_end() doesn't provide the address and size which
were passed to user_access_begin(), required by prevent_user_access()
to know which segment to modify.

The list of segments which where unprotected by allow_user_access()
are available in current->kuap. But we don't want prevent_user_access()
to read this all the time, especially everytime it is 0 (for instance
because the access was not a write access).

Implement a special direction case named KUAP_SELF. In this case only,
the addr and end are retrieved from current->kuap.
Can we call it KUAP_CURRENT?

ie. "use the KUAP state in current"

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