Messages in this thread | | | Date | Wed, 1 Jul 2020 20:59:14 +0100 | From | Al Viro <> | Subject | Re: objtool clac/stac handling change.. |
| |
On Wed, Jul 01, 2020 at 12:04:36PM -0700, Linus Torvalds wrote: > On Wed, Jul 1, 2020 at 11:41 AM Al Viro <viro@zeniv.linux.org.uk> wrote: > > > > Rather nasty for ppc; they have separate user_read_access_end() and > > user_write_access_end(). > > That's actually for the access granting. Shutting the access down ends > up always doing the same thing anyway..
#define user_read_access_end prevent_current_read_from_user #define user_write_access_end prevent_current_write_to_user static inline void prevent_current_read_from_user(void) { prevent_user_access(NULL, NULL, ~0UL, KUAP_CURRENT_READ); }
static inline void prevent_current_write_to_user(void) { prevent_user_access(NULL, NULL, ~0UL, KUAP_CURRENT_WRITE); }
and prevent_user_access() has instances that do care about the direction...
| |