linux/arch/parisc/include/asm
John David Anglin 89f686a0fb parisc: Revise __get_user() to probe user read access
Because of the way read access support is implemented, read access
interruptions are only triggered at privilege levels 2 and 3. The
kernel executes at privilege level 0, so __get_user() never triggers
a read access interruption (code 26). Thus, it is currently possible
for user code to access a read protected address via a system call.

Fix this by probing read access rights at privilege level 3 (PRIV_USER)
and setting __gu_err to -EFAULT (-14) if access isn't allowed.

Note the cmpiclr instruction does a 32-bit compare because COND macro
doesn't work inside asm.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v5.12+
2025-07-25 22:45:24 +02:00
..
alternative.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
asm-offsets.h
asmregs.h
assembly.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
atomic.h
barrier.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
bitops.h
bug.h
cache.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
cacheflush.h
cachetype.h
checksum.h
cmpxchg.h
compat.h
compat_ucontext.h
current.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
delay.h
dma-mapping.h
dma.h
dwarf.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
eisa_bus.h
eisa_eeprom.h
elf.h
extable.h
fixmap.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
floppy.h
ftrace.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
futex.h
grfioctl.h
hardirq.h
hardware.h
hash.h
hugetlb.h
io.h - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
irq.h
irqflags.h
jump_label.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
kbdleds.h
Kbuild
kexec.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
kfence.h
kgdb.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
kprobes.h
ldcw.h
led.h
linkage.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
mman.h
mmu.h
mmu_context.h
mmzone.h
module.h
page.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
parisc-device.h
parport.h
pci.h
pdc.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
pdc_chassis.h
pdcpat.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
perf.h
perf_event.h
pgalloc.h mm: pass mm down to pagetable_{pte,pmd}_ctor 2025-05-11 17:48:21 -07:00
pgtable.h parisc: Define and use set_pte_at() 2025-07-25 22:45:23 +02:00
prefetch.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
processor.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
psw.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
ptrace.h
ropes.h
rt_sigframe.h
runway.h
seccomp.h
sections.h
serial.h
shmparam.h
signal.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
smp.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
socket.h
sparsemem.h
special_insns.h parisc: Check region is readable by user in raw_copy_from_user() 2025-07-25 22:45:23 +02:00
spinlock.h
spinlock_types.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
string.h
superio.h
switch_to.h
syscall.h syscall.h: introduce syscall_set_nr() 2025-05-11 17:48:15 -07:00
text-patching.h
thread_info.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
timex.h
tlb.h
tlbflush.h
topology.h
traps.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
uaccess.h parisc: Revise __get_user() to probe user read access 2025-07-25 22:45:24 +02:00
ucontext.h
unistd.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
unwind.h
vdso.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
video.h
vmalloc.h