diff options
| author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2025-12-24 12:20:49 +0100 |
|---|---|---|
| committer | Madhavan Srinivasan <maddy@linux.ibm.com> | 2026-01-07 09:31:04 +0530 |
| commit | 5fbc09eb0b4f4b1a4b33abebacbeee0d29f195e9 (patch) | |
| tree | 71b38a1394fe4fb627662bc24350d5cf3df21d0f /include/linux/i2c/git@git.tavy.me:linux.git | |
| parent | 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb (diff) | |
powerpc/uaccess: Move barrier_nospec() out of allow_read_{from/write}_user()
Commit 74e19ef0ff80 ("uaccess: Add speculation barrier to
copy_from_user()") added a redundant barrier_nospec() in
copy_from_user(), because powerpc is already calling
barrier_nospec() in allow_read_from_user() and
allow_read_write_user(). But on other architectures that
call to barrier_nospec() was missing. So change powerpc
instead of reverting the above commit and having to fix
other architectures one by one. This is now possible
because barrier_nospec() has also been added in
copy_from_user_iter().
Move barrier_nospec() out of allow_read_from_user() and
allow_read_write_user(). This will also allow reuse of those
functions when implementing masked user access which doesn't
require barrier_nospec().
Don't add it back in raw_copy_from_user() as it is already called
by copy_from_user() and copy_from_user_iter().
Fixes: 74e19ef0ff80 ("uaccess: Add speculation barrier to copy_from_user()")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/f29612105c5fcbc8ceb7303808ddc1a781f0f6b5.1766574657.git.chleroy@kernel.org
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
