mbox series

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

Message ID cover.1730166635.git.jpoimboe@kernel.org (mailing list archive)
Headers show
Series x86/uaccess: avoid barrier_nospec() | expand

Message

Josh Poimboeuf Oct. 29, 2024, 1:56 a.m. UTC
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(-)