[PATCH v3 0/6] x86/uaccess: avoid barrier_nospec()

Josh Poimboeuf jpoimboe at kernel.org
Tue Oct 29 12:56:13 AEDT 2024


v3:

- rebase on Linus' patch (v6.12-rc5)

- remove putuser(), copy_to_user(), clear_user() changes: as Linus
  points out, they don't produce a value that could be used in a
  dependent load to leak anything.

- convert 32-bit versions of copy_from_user(), get_user() and
  __get_user() and converge code.


Josh Poimboeuf (6):
  x86/uaccess: Avoid barrier_nospec() in 64-bit copy_from_user()
  x86/uaccess: Avoid barrier_nospec() in 64-bit __get_user()
  x86/uaccess: Avoid barrier_nospec() in 32-bit copy_from_user()
  x86/uaccess: Convert 32-bit get_user() to unconditional pointer
    masking
  x86/uaccess: Avoid barrier_nospec() in 32-bit __get_user()
  x86/uaccess: Converge [__]get_user() implementations

 arch/powerpc/include/asm/uaccess.h |  2 +
 arch/x86/include/asm/uaccess.h     | 34 ++++++++++++
 arch/x86/include/asm/uaccess_32.h  |  1 +
 arch/x86/include/asm/uaccess_64.h  | 30 +----------
 arch/x86/lib/getuser.S             | 85 ++++++++----------------------
 include/linux/uaccess.h            |  6 ---
 6 files changed, 61 insertions(+), 97 deletions(-)

-- 
2.47.0



More information about the Linuxppc-dev mailing list