linux-stable/arch/parisc/kernel
Guenter Roeck 882a2a724e parisc: Fix stack unwinder
Debugging shows a large number of unaligned access traps in the unwinder
code. Code analysis reveals a number of issues with this code:

- handle_interruption is passed twice through
  dereference_kernel_function_descriptor()
- ret_from_kernel_thread, syscall_exit, intr_return,
  _switch_to_ret, and _call_on_stack are passed through
  dereference_kernel_function_descriptor() even though they are
  not declared as function pointers.

To fix the problems, drop one of the calls to
dereference_kernel_function_descriptor() for handle_interruption,
and compare the other pointers directly.

Fixes: 6414b30b39 ("parisc: unwind: Avoid missing prototype warning for handle_interruption()")
Fixes: 8e0ba125c2 ("parisc/unwind: fix unwinder when CONFIG_64BIT is enabled")
Cc: Helge Deller <deller@gmx.de>
Cc: Sven Schnelle <svens@stackframe.org>
Cc: John David Anglin <dave.anglin@bell.net>
Cc: Charlie Jenkins <charlie@rivosinc.com>
Cc: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Helge Deller <deller@gmx.de>
2024-02-19 21:55:22 +01:00
..
syscalls lsm/stable-6.8 PR 20240105 2024-01-09 12:57:46 -08:00
vdso32 parisc: Add missing FORCE prerequisites in Makefile 2022-12-18 22:18:49 +01:00
vdso64 parisc: Add missing FORCE prerequisites in Makefile 2022-12-18 22:18:49 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile parisc: Drop the pa7300lc LPMC handler 2023-08-20 20:23:46 +02:00
alternative.c parisc: Use num_present_cpus() in alternative patching code 2023-05-23 18:17:32 +02:00
asm-offsets.c parisc: Prepare for Block-TLB support on 32-bit kernel 2023-09-07 09:12:19 +02:00
audit.c parisc: Fold 32-bit compat code into audit_classify_syscall() 2023-06-30 17:14:14 +02:00
cache.c parisc: BTLB: Fix crash when setting up BTLB at CPU bringup 2024-01-31 13:51:26 +01:00
compat_audit.c parisc: Fold 32-bit compat code into audit_classify_syscall() 2023-06-30 17:14:14 +02:00
drivers.c parisc: Drop unneeded semicolon in parse_tree_node() 2024-01-28 09:49:47 +01:00
entry.S parisc/pgtable: Do not drop upper 5 address bits of physical address 2023-11-07 19:48:30 +01:00
firmware.c parisc/firmware: Fix F-extend for PDC addresses 2024-01-07 22:59:16 +01:00
ftrace.c parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check 2024-02-16 20:18:03 +01:00
hardware.c parisc: Clean up names in hardware database 2022-08-01 18:43:23 +02:00
head.S parisc: Prevent booting 64-bit kernels on PA1.x machines 2023-11-10 16:17:32 +01:00
hpmc.S parisc: Re-use toc_stack as hpmc_stack 2022-01-11 11:57:37 +01:00
inventory.c parisc: Add qemu fw_cfg interface 2020-10-15 08:10:37 +02:00
irq.c parisc: irq: Make irq_stack_union static to avoid sparse warning 2023-08-31 22:36:12 +02:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kexec.c parisc: kexec: include reboot.h 2023-05-09 14:04:56 +02:00
kexec_file.c kexec_file, parisc: print out debugging message if required 2023-12-20 15:02:57 -08:00
kgdb.c parisc: Drop duplicate kgdb_pdc console 2022-12-18 22:18:49 +01:00
kprobes.c parisc: Fix typos in comments 2022-05-08 20:01:12 +02:00
module.c parisc: module: Mark symindex __maybe_unused 2023-06-30 17:14:14 +02:00
pacache.S parisc: Ensure page alignment in flush functions 2023-05-03 17:43:26 +02:00
parisc_ksyms.c parisc: parisc_ksyms: Include libgcc.h for libgcc prototypes 2023-08-10 18:34:05 +02:00
patch.c parisc: Fix patch code locking and flushing 2022-05-17 21:52:59 +02:00
pci-dma.c parisc: Move proc_mckinley_root and proc_runway_root to sba_iommu 2023-08-10 22:22:03 +02:00
pci.c
pdc_chassis.c parisc: chassis: Do not overwrite string on LCD display 2023-08-28 17:58:14 +02:00
pdc_cons.c parisc: Drop locking in pdc console code 2022-12-18 22:18:49 +01:00
pdt.c parisc: pdt: Use PTR_ERR_OR_ZERO() to simplify code 2023-08-10 17:32:09 +02:00
perf.c parisc: perf: Make cpu_device variable static 2023-08-10 23:00:18 +02:00
perf_asm.S
perf_images.h
process.c parisc: Use generic mmap top-down layout and brk randomization 2023-08-22 10:24:46 +02:00
processor.c Revert "parisc: Only list existing CPUs in cpu_possible_mask" 2024-02-07 00:13:21 +01:00
ptrace.c parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case 2023-02-01 21:42:37 +01:00
real2.S parisc: Fix argument pointer in real64_call_asm() 2023-05-03 17:43:26 +02:00
relocate_kernel.S
setup.c parisc: Move parisc_narrow_firmware variable to header file 2023-10-30 14:54:40 +01:00
signal.c parisc: signal: Fix sparse incorrect type in assignment warning 2023-08-10 17:32:10 +02:00
signal32.c
signal32.h parisc: Add vDSO support 2022-03-11 19:49:30 +01:00
smp.c parisc: simplify smp_prepare_boot_cpu() 2023-10-30 14:54:41 +01:00
stacktrace.c parisc: Fix implicit declaration of function '__kernel_text_address' 2021-11-13 22:10:56 +01:00
sys_parisc.c parisc: fix mmap_base calculation when stack grows upwards 2023-11-15 15:30:09 -08:00
sys_parisc32.c
syscall.S parisc: Fix lightweight spinlock checks to not break futexes 2023-08-10 17:32:09 +02:00
time.c parisc: Mark cr16 clock unstable on all SMP machines 2022-05-08 20:01:12 +02:00
toc.c parisc: Fix missing prototype for 'toc_intr' warning in toc.c 2022-01-20 20:39:19 +01:00
toc_asm.S parisc: Enable TOC (transfer of contents) feature unconditionally 2022-01-11 11:57:37 +01:00
topology.c parisc: fix a crash with multicore scheduler 2022-06-03 09:54:01 +02:00
traps.c parisc: traps: Drop cpu_lpmc function pointer 2023-08-20 20:23:46 +02:00
unaligned.c parisc: Fix random data corruption from exception handler 2024-01-30 17:18:58 +01:00
unwind.c parisc: Fix stack unwinder 2024-02-19 21:55:22 +01:00
vdso.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vmlinux.lds.S parisc: Make RO_DATA page aligned in vmlinux.lds.S 2024-01-28 09:49:46 +01:00