On Sat, 7 Jun 2025 13:37:42 +0200 Christophe Leroy <christophe.le...@csgroup.eu> wrote:
> With user access protection (Called SMAP on x86 or KUAP on powerpc) > each and every call to get_user() or put_user() performs heavy > operations to unlock and lock kernel access to userspace. > > To avoid that, perform user accesses by blocks using > user_access_begin/user_access_end() and unsafe_get_user()/ > unsafe_put_user() and alike. Did you consider using masked_user_access_begin() ? It removes a conditional branch and lfence as well. David