linux/arch/riscv/kernel
Samuel Holland 7f1c3de137 riscv: Disallow PR_GET_TAGGED_ADDR_CTRL without Supm
When the prctl() interface for pointer masking was added, it did not
check that the pointer masking ISA extension was supported, only the
individual submodes. Userspace could still attempt to disable pointer
masking and query the pointer masking state. commit 81de1afb2dd1
("riscv: Fix kernel crash due to PR_SET_TAGGED_ADDR_CTRL") disallowed
the former, as the senvcfg write could crash on older systems.
PR_GET_TAGGED_ADDR_CTRL state does not crash, because it reads only
kernel-internal state and not senvcfg, but it should still be disallowed
for consistency.

Fixes: 09d6775f50 ("riscv: Add support for userspace pointer masking")
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Nam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/r/20250507145230.2272871-1-samuel.holland@sifive.com
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
2025-05-08 12:01:01 +00:00
..
compat_vdso
pi
probes riscv: uprobes: Add missing fence.i after building the XOL buffer 2025-04-24 13:20:02 -07:00
tests
vdso riscv: vdso: Switch to generic storage implementation 2025-02-21 09:54:02 +01:00
vendor_extensions
.gitignore
Makefile Fix mis-uses of 'cc-option' for warning disablement 2025-04-23 10:08:29 -07:00
Makefile.syscalls
acpi.c mm/ioremap: pass pgprot_t to ioremap_prot() instead of unsigned long 2025-03-16 22:06:23 -07:00
acpi_numa.c
alternative.c
asm-offsets.c riscv: Remove unused TASK_TI_FLAGS 2025-03-18 12:46:15 +00:00
bugs.c
cacheinfo.c riscv: cacheinfo: Use of_property_present() for non-boolean properties 2025-02-14 13:04:20 -08:00
cfi.c
compat_signal.c
compat_syscall_table.c
copy-unaligned.S
copy-unaligned.h
cpu-hotplug.c
cpu.c
cpu_ops.c
cpu_ops_sbi.c
cpu_ops_spinwait.c
cpufeature.c Merge patch series "Add some validation for vector, vector crypto and fp stuff" 2025-04-01 07:06:41 +00:00
crash_dump.c
crash_save_regs.S
efi-header.S
efi.c
elf_kexec.c riscv/kexec_file: Handle R_RISCV_64 in purgatory relocator 2025-04-01 07:07:12 +00:00
entry.S
fpu.S
ftrace.c riscv: Move nop definition to insn-def.h 2025-03-20 09:14:42 +00:00
head.S
head.h
hibernate-asm.S
hibernate.c
image-vars.h
irq.c
jump_label.c riscv: Move nop definition to insn-def.h 2025-03-20 09:14:42 +00:00
kernel_mode_fpu.c
kernel_mode_vector.c
kexec_relocate.S
kgdb.c riscv: KGDB: Remove ".option norvc/.option rvc" for kgdb_compiled_break 2025-04-16 07:29:34 -07:00
machine_kexec.c
machine_kexec_file.c
mcount-dyn.S
mcount.S riscv: fgraph: Fix stack layout to match __arch_ftrace_regs argument of ftrace_return_to_handler 2025-03-19 12:03:25 +00:00
module-sections.c riscv: module: Allocate PLT entries for R_RISCV_PLT32 2025-04-14 13:07:07 +00:00
module.c riscv: module: Fix out-of-bounds relocation access 2025-04-14 13:07:07 +00:00
paravirt.c
patch.c
perf_callchain.c
perf_regs.c
process.c riscv: Disallow PR_GET_TAGGED_ADDR_CTRL without Supm 2025-05-08 12:01:01 +00:00
ptrace.c
reset.c
return_address.c
riscv_ksyms.c
sbi-ipi.c
sbi.c
sbi_ecall.c
setup.c riscv: Properly export reserved regions in /proc/iomem 2025-04-14 13:07:07 +00:00
signal.c riscv: signal: fix signal frame size 2025-02-14 13:06:44 -08:00
smp.c riscv: print hartid on bringup 2025-04-01 07:03:03 +00:00
smpboot.c riscv: print hartid on bringup 2025-04-01 07:03:03 +00:00
soc.c
stacktrace.c riscv: remove useless pc check in stacktrace handling 2025-03-18 09:06:21 +00:00
suspend.c riscv: Add stimecmp save and restore 2025-03-18 12:59:03 +00:00
suspend_entry.S
sys_hwprobe.c RISC-V Patches for the 6.15 Merge Window, Part 1 2025-04-04 09:49:17 -07:00
sys_riscv.c
syscall_table.c
time.c
traps.c riscv: misaligned: enable IRQs while handling misaligned accesses 2025-05-08 12:00:36 +00:00
traps_misaligned.c riscv: misaligned: use get_user() instead of __get_user() 2025-05-08 12:00:58 +00:00
unaligned_access_speed.c riscv: Fix unaligned access info messages 2025-04-14 13:07:07 +00:00
vdso.c riscv: vdso: Switch to generic storage implementation 2025-02-21 09:54:02 +01:00
vec-copy-unaligned.S riscv: Fix the __riscv_copy_vec_words_unaligned implementation 2025-03-18 13:37:27 +00:00
vector.c RISC-V Patches for the 6.14 Merge Window, Part 1 2025-01-31 15:13:25 -08:00
vendor_extensions.c riscv: Simplify base extension checks and direct boolean return 2025-03-18 12:47:20 +00:00
vmcore_info.c
vmlinux-xip.lds.S
vmlinux.lds.S riscv: Add runtime constant support 2025-03-20 09:15:03 +00:00