Le 02/03/2026 à 14:27, [email protected] a écrit :
From: David Laight <[email protected]>

Mechanically change the access_ok() and __get/put_user() to use
scoped_user_read/write_access() and unsafe_get/put_user().

This generates better code with fewer STAC/CLAC pairs.

It also ensures that access_ok() is called near the user accesses.
I failed to find the one for __save_altstack().

On arm64 it's done in get_sigframe() it seems.


Looking at the change, perhaps there should be aliases:
#define scoped_put_user unsafe_put_user
#define scoped_get_user unsafe_get_user

Might be confusing to have two macros doing exactly the same thing.

And the churn might be unnecessary on some code that already widely use unsafe_xxx macros and that we want to convert to scoped user access, like for instance arch/powerpc/kernel/signal_32.c

Christophe


Reply via email to