diff options
| author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2025-12-24 12:20:49 +0100 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2026-03-04 07:19:36 -0500 |
| commit | c43e0a0353e50b52a2d1a3b479e109b38fc460a5 (patch) | |
| tree | 659457b5378d3846b81208e9c4f09d8bcba2db0a /drivers/soc | |
| parent | ac2c85d2a2f6dc01008f0414a4eb173898ec716c (diff) | |
| download | linux-c43e0a0353e50b52a2d1a3b479e109b38fc460a5.tar.gz linux-c43e0a0353e50b52a2d1a3b479e109b38fc460a5.tar.bz2 linux-c43e0a0353e50b52a2d1a3b479e109b38fc460a5.zip | |
powerpc/uaccess: Move barrier_nospec() out of allow_read_{from/write}_user()
[ Upstream commit 5fbc09eb0b4f4b1a4b33abebacbeee0d29f195e9 ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/soc')
0 files changed, 0 insertions, 0 deletions
