linux-mainline/arch
Linus Torvalds d5ed10bb80 Merge branch 'x86-uaccess-cleanup': x86 uaccess header cleanups
Merge my x86 uaccess updates branch.

The LAM ("Linear Address Masking") updates in this release made me
unhappy about how "access_ok()" was done, and it actually turned out to
have a couple of small bugs in it too.  This is my cleanup of the code:

 - use the sign bit of the __user pointer rather than masking the
   address and checking it against the TASK_SIZE range.

   We already did this part for the get/put_user() side, but
   'access_ok()' did the naïve "mask and range check" thing, which not
   only generates nasty code, but also ended up meaning that __access_ok
   itself didn't do a good job, and so copy_from_user_nmi() didn't get
   the check right.

 - move all the code that is 64-bit only into the 64-bit version of the
   header file, so that we don't unnecessarily pollute the shared x86
   code and make it look like LAM might work in 32-bit too.

 - fix a bug in the address masking (that doesn't end up mattering: in
   this case the fix was to just remove the buggy code entirely).

 - a couple of trivial cleanups and added commentary about the
   access_ok() rules.

* x86-uaccess-cleanup:
  x86-64: mm: clarify the 'positive addresses' user address rules
  x86: mm: remove 'sign' games from LAM untagged_addr*() macros
  x86: uaccess: move 32-bit and 64-bit parts into proper <asm/uaccess_N.h> header
  x86: mm: remove architecture-specific 'access_ok()' define
  x86-64: make access_ok() independent of LAM
2023-05-05 12:29:57 -07:00
..
alpha
arc
arm Input updates for 6.4 merge window: 2023-05-01 17:18:56 -07:00
arm64 arm64 fixes for -rc1 2023-05-04 12:45:32 -07:00
csky arch/csky patches for 6.4 2023-05-04 12:25:05 -07:00
hexagon
ia64
loongarch LoongArch changes for v6.4 2023-05-04 12:40:16 -07:00
m68k
microblaze
mips
nios2
openrisc
parisc parisc: Fix argument pointer in real64_call_asm() 2023-05-03 17:43:26 +02:00
powerpc
riscv RISC-V Patches for the 6.4 Merge Window, Part 2 2023-05-05 12:23:33 -07:00
s390 RISC-V: 2023-05-05 12:17:01 -07:00
sh
sparc
um This pull request contains the following changes for UML: 2023-05-03 19:02:03 -07:00
x86 Merge branch 'x86-uaccess-cleanup': x86 uaccess header cleanups 2023-05-05 12:29:57 -07:00
xtensa
.gitignore
Kconfig