Christophe Leroy <christophe.leroy@xxxxxx> 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