]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86: rename and clean up __copy_from_user_inatomic_nocache()
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 30 Mar 2026 20:11:07 +0000 (13:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 30 Mar 2026 22:05:57 +0000 (15:05 -0700)
commit5de7bcaadf160c1716b20a263cf8f5b06f658959
tree33bd3f1656b89a0e592523b330789fbfa6647a89
parentd187a86de793f84766ea40b9ade7ac60aabbb4fe
x86: rename and clean up __copy_from_user_inatomic_nocache()

Similarly to the previous commit, this renames the somewhat confusingly
named function.  But in this case, it was at least less confusing: the
__copy_from_user_inatomic_nocache is indeed copying from user memory,
and it is indeed ok to be used in an atomic context, so it will not warn
about it.

But the previous commit also removed the NTB mis-use of the
__copy_from_user_inatomic_nocache() function, and as a result every
call-site is now _actually_ doing a real user copy.  That means that we
can now do the proper user pointer verification too.

End result: add proper address checking, remove the double underscores,
and change the "nocache" to "nontemporal" to more accurately describe
what this x86-only function actually does.  It might be worth noting
that only the target is non-temporal: the actual user accesses are
normal memory accesses.

Also worth noting is that non-x86 targets (and on older 32-bit x86 CPU's
before XMM2 in the Pentium III) we end up just falling back on a regular
user copy, so nothing can actually depend on the non-temporal semantics,
but that has always been true.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/include/asm/uaccess.h
arch/x86/include/asm/uaccess_32.h
arch/x86/include/asm/uaccess_64.h
arch/x86/lib/usercopy_32.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/qxl/qxl_ioctl.c
include/linux/uaccess.h
lib/iov_iter.c