Re: [PATCH] powerpc/uaccess: Perform barrier_nospec() in KUAP allowance helpers

2021-02-10 Thread Michael Ellerman
On Sun, 7 Feb 2021 10:08:11 + (UTC), Christophe Leroy wrote: > barrier_nospec() in uaccess helpers is there to protect against > speculative accesses around access_ok(). > > When using user_access_begin() sequences together with > unsafe_get_user() like macros, barrier_nospec() is called for >

[PATCH] powerpc/uaccess: Perform barrier_nospec() in KUAP allowance helpers

2021-02-07 Thread Christophe Leroy
barrier_nospec() in uaccess helpers is there to protect against speculative accesses around access_ok(). When using user_access_begin() sequences together with unsafe_get_user() like macros, barrier_nospec() is called for every single read although we know the access_ok() is done onece. Since all