]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Use barrier_nospec in copy_from_user()
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 24 Apr 2018 04:15:58 +0000 (14:15 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 10:43:45 +0000 (20:43 +1000)
commita1dfdfb07b3282a30f63001fd66f025f1d841629
treeedebc20a9689231fd62d857d9a9e51f9bf3850c3
parentcda191505a9e9b294a3d80fd3f7743fec158d7be
powerpc: Use barrier_nospec in copy_from_user()

Based on the x86 commit doing the same.

See commit 80438831ea56 ("x86/uaccess: Use __uaccess_begin_nospec()
and uaccess_try_nospec") and ab104ec843c5 ("x86: Introduce
__uaccess_begin_nospec() and uaccess_try_nospec") for more detail.

In all cases we are ordering the load from the potentially
user-controlled pointer vs a previous branch based on an access_ok()
check or similar.

Base on a patch from Michal Suchanek.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/uaccess.h