Re: objtool clac/stac handling change..
From: Al Viro
Date: Wed Jul 01 2020 - 15:59:26 EST
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@xxxxxxxxxxxxxxxxxx> 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...