diff options
| author | Christophe Leroy <[email protected]> | 2021-02-07 10:08:11 +0000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2021-02-09 01:10:15 +1100 |
| commit | 8524e2e76441fc615a3b5c1415823e051cc79eae (patch) | |
| tree | bb1e0ac0b2a89d748ba13ac69b81ded0ab696120 /tools/perf/scripts/python | |
| parent | 22b89ba178dd0a66a26699ead014a3e73ff8e044 (diff) | |
powerpc/uaccess: Perform barrier_nospec() in KUAP allowance helpers
barrier_nospec() in uaccess helpers is there to protect against
speculative accesses around access_ok().
When using user_access_begin() sequences together with
unsafe_get_user() like macros, barrier_nospec() is called for
every single read although we know the access_ok() is done
onece.
Since all user accesses must be granted by a call to either
allow_read_from_user() or allow_read_write_user() which will
always happen after the access_ok() check, move the barrier_nospec()
there.
Reported-by: Christopher M. Riedl <[email protected]>
Signed-off-by: Christophe Leroy <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/c72f014730823b413528e90ab6c4d3bcb79f8497.1612692067.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions