linux/include
Linus Torvalds 0fc810ae3a x86/uaccess: Avoid barrier_nospec() in 64-bit copy_from_user()
The barrier_nospec() in 64-bit copy_from_user() is slow. Instead use
pointer masking to force the user pointer to all 1's for an invalid
address.

The kernel test robot reports a 2.6% improvement in the per_thread_ops
benchmark [1].

This is a variation on a patch originally by Josh Poimboeuf [2].

Link: https://lore.kernel.org/202410281344.d02c72a2-oliver.sang@intel.com [1]
Link: https://lore.kernel.org/5b887fe4c580214900e21f6c61095adf9a142735.1730166635.git.jpoimboe@kernel.org [2]
Tested-and-reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-10-30 11:38:10 -10:00
..
acpi
asm-generic
clocksource
crypto
cxl
drm
dt-bindings
keys
kunit
kvm
linux x86/uaccess: Avoid barrier_nospec() in 64-bit copy_from_user() 2024-10-30 11:38:10 -10:00
math-emu
media
memory
misc
net Including fixes from netfiler, xfrm and bluetooth. 2024-10-24 16:43:50 -07:00
pcmcia
ras
rdma
rv
scsi
soc
sound
target
trace vfs-6.12-rc5.fixes 2024-10-21 10:48:24 -07:00
uapi sound fixes for 6.12-rc5 2024-10-25 10:35:29 -07:00
ufs
vdso
video
xen