Redundant barrier_nospec() added by commit 74e19ef0ff80 ("uaccess: Add speculation barrier to copy_from_user()")
Christophe Leroy
christophe.leroy at csgroup.eu
Thu Jun 19 18:42:13 AEST 2025
Hello Dave,
In commit 74e19ef0ff80 ("uaccess: Add speculation barrier to
copy_from_user()") you add barrier_nospec() to copy_from_user().
There is already a barrier_nospec() in allow_read_from_user() which is
called by raw_copy_from_user(), see commit 8524e2e76441
("powerpc/uaccess: Perform barrier_nospec() in KUAP allowance helpers").
Why do you need an additional one ?
And why only copy_from_user() and not also other places like
copy_from_user_iter() for instance ?
Thanks
Christophe
More information about the Linuxppc-dev
mailing list