android_kernel_msm-6.1_noth.../arch/powerpc/kernel
Raoni Fassina Firmino 24321ac668 powerpc/64/signal: Fix regression in __kernel_sigtramp_rt64() semantics
Commit 0138ba5783 ("powerpc/64/signal: Balance return predictor
stack in signal trampoline") changed __kernel_sigtramp_rt64() VDSO and
trampoline code, and introduced a regression in the way glibc's
backtrace()[1] detects the signal-handler stack frame. Apart from the
practical implications, __kernel_sigtramp_rt64() was a VDSO function
with the semantics that it is a function you can call from userspace
to end a signal handling. Now this semantics are no longer valid.

I believe the aforementioned change affects all releases since 5.9.

This patch tries to fix both the semantics and practical aspect of
__kernel_sigtramp_rt64() returning it to the previous code, whilst
keeping the intended behaviour of 0138ba5783 by adding a new symbol
to serve as the jump target from the kernel to the trampoline. Now the
trampoline has two parts, a new entry point and the old return point.

[1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2021-January/223194.html

Fixes: 0138ba5783 ("powerpc/64/signal: Balance return predictor stack in signal trampoline")
Cc: stable@vger.kernel.org # v5.9+
Signed-off-by: Raoni Fassina Firmino <raoni@linux.ibm.com>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Minor tweaks to change log formatting, add stable tag]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210201200505.iz46ubcizipnkcxe@work-tp
2021-02-02 22:14:41 +11:00
..
ptrace powerpc/ptrace-view: Use pt_regs values instead of thread_struct based one. 2020-12-04 01:01:26 +11:00
syscalls epoll: wire up syscall epoll_pwait2 2020-12-19 11:18:38 -08:00
trace
vdso32 powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o 2021-01-30 22:23:42 +11:00
vdso64 powerpc/64/signal: Fix regression in __kernel_sigtramp_rt64() semantics 2021-02-02 22:14:41 +11:00
.gitignore
align.c
asm-offsets.c powerpc/book3s64/pkeys: Store/restore userspace AMR/IAMR correctly on entry and exit from kernel 2020-12-04 01:01:25 +11:00
audit.c
btext.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
cacheinfo.c powerpc/cacheinfo: Print correct cache-sibling map/list for L2 cache 2020-12-11 00:10:25 +11:00
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_fsl_booke.S powerpc: Retire e200 core (mpc555x processor) 2020-12-05 21:49:18 +11:00
cpu_setup_pa6t.S
cpu_setup_power.c powerpc/perf: MMCR0 control for PMU registers under PMCC=00 2020-12-04 01:01:29 +11:00
cpu_setup_ppc970.S
cputable.c powerpc/32s: Make support for 603 and 604+ selectable 2020-12-09 16:48:59 +11:00
crash_dump.c
dawr.c
dbell.c
dma-iommu.c powerpc/dma: Fallback to dma_ops when persistent memory present 2020-11-27 10:33:42 +01:00
dma-mask.c
dma-swiotlb.c
dt_cpu_ftrs.c powerpc/64s: Remove idle workaround code from restore_cpu_cpufeatures 2020-12-10 23:13:26 +11:00
early_32.c
eeh.c powerpc/eeh: Fix eeh_dev_check_failure() for PE#0 2020-10-22 10:38:53 +11:00
eeh_cache.c powerpc/eeh_cache: Fix a possible debugfs deadlock 2020-11-02 12:54:20 +11:00
eeh_driver.c
eeh_event.c
eeh_pe.c powerpc/eeh: Delete eeh_pe->config_addr 2020-10-07 22:34:47 +11:00
eeh_sysfs.c
entry_32.S powerpc/fault: Perform exception fixup in do_page_fault() 2020-12-09 23:48:14 +11:00
entry_64.S powerpc/64s: fix scv entry fallback flush vs interrupt 2021-01-20 15:58:19 +11:00
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S powerpc/fault: Perform exception fixup in do_page_fault() 2020-12-09 23:48:14 +11:00
exceptions-64s.S powerpc/64s: fix scv entry fallback flush vs interrupt 2021-01-20 15:58:19 +11:00
fadump.c powerpc updates for 5.10 2020-10-16 12:21:15 -07:00
firmware.c powerpc: Reintroduce is_kvm_guest() as a fast-path check 2020-12-04 01:01:22 +11:00
fpu.S powerpc: Drop SYNC_601() ISYNC_601() and SYNC() 2020-10-08 21:17:13 +11:00
fsl_booke_entry_mapping.S
head_8xx.S powerpc/8xx: Use SPRN_SPRG_SCRATCH2 in DTLB miss exception 2020-12-09 23:48:13 +11:00
head_32.h powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too 2020-12-21 22:24:00 +11:00
head_40x.S powerpc/40x: Always fault when _PAGE_ACCESSED is not set 2020-11-05 23:34:16 +11:00
head_44x.S
head_64.S powerpc/64s: Remove MSR[ISF] bit 2020-12-09 23:48:14 +11:00
head_book3s_32.S powerpc/32s: Fix RTAS machine check with VMAP stack 2021-01-04 23:59:25 +11:00
head_booke.h powerpc: Retire e200 core (mpc555x processor) 2020-12-05 21:49:18 +11:00
head_fsl_booke.S powerpc: Retire e200 core (mpc555x processor) 2020-12-05 21:49:18 +11:00
hw_breakpoint.c powerpc/watchpoint: Workaround P10 DD1 issue with VSX-32 byte instructions 2020-12-11 00:09:10 +11:00
hw_breakpoint_constraints.c powerpc/watchpoint: Move DAWR detection logic outside of hw_breakpoint.c 2020-09-15 22:13:19 +10:00
idle.c sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
idle_6xx.S
idle_book3e.S
idle_book3s.S
idle_e500.S
ima_arch.c
io-workarounds.c
io.c
iomap.c powerpc: inline iomap accessors 2020-12-04 01:01:09 +11:00
iommu.c dma-mapping: introduce dma_get_seg_boundary_nr_pages() 2020-09-03 18:12:15 +02:00
irq.c powerpc/64s: prevent recursive replay_soft_interrupts causing superfluous interrupt 2021-01-24 22:27:24 +11:00
isa-bridge.c
jump_label.c
kgdb.c
kprobes-ftrace.c ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs 2020-11-13 12:14:55 -05:00
kprobes.c powerpc: kprobes: Use generic kretprobe trampoline handler 2020-09-08 11:52:34 +02:00
kvm.c
kvm_emul.S
l2cr_6xx.S powerpc: Drop SYNC_601() ISYNC_601() and SYNC() 2020-10-08 21:17:13 +11:00
legacy_serial.c
Makefile powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o 2021-01-30 22:23:42 +11:00
mce.c powerpc/64s: Remove "Host" from MCE logging 2020-12-04 01:01:23 +11:00
mce_power.c powerpc/64s/pseries: Add ERAT specific machine check handler 2020-12-04 01:01:23 +11:00
misc.S
misc_32.S powerpc: Rewrite FSL_BOOKE flush_cache_instruction() in C 2020-09-02 11:00:21 +10:00
misc_64.S powerpc: Remove SYNC on non 6xx 2020-10-08 21:17:12 +11:00
module.c
module_32.c
module_64.c
msi.c
note.S
nvram_64.c
of_platform.c
optprobes.c
optprobes_head.S
paca.c powerpc: Avoid broken GCC __attribute__((optimize)) 2020-11-19 14:50:14 +11:00
pci-common.c powerpc/pci: Remove LSI mappings on device teardown 2020-12-04 01:01:34 +11:00
pci-hotplug.c
pci_32.c
pci_64.c
pci_dn.c
pci_of_scan.c
pmc.c
ppc32.h
ppc_save_regs.S
proc_powerpc.c
process.c powerpc/process: Remove target specific __set_dabr() 2020-12-09 17:01:40 +11:00
prom.c powerpc/feature: Remove CPU_FTR_NODSISRALIGN 2020-12-04 01:01:34 +11:00
prom_init.c powerpc: fix -Wimplicit-fallthrough 2020-11-18 14:18:09 -06:00
prom_init_check.sh
prom_parse.c
reloc_32.S
reloc_64.S
rtas-proc.c
rtas-rtc.c
rtas.c powerpc/rtas: Fix typo of ibm,open-errinjct in RTAS filter 2020-12-09 13:36:51 +11:00
rtas_flash.c
rtas_pci.c
rtasd.c
secure_boot.c
security.c powerpc/security: Fix link stack flush instruction 2020-10-08 12:50:52 +11:00
secvar-ops.c
secvar-sysfs.c
setup-common.c powerpc: Remove ucache_bsize 2020-12-05 21:49:52 +11:00
setup.h powerpc: Avoid broken GCC __attribute__((optimize)) 2020-11-19 14:50:14 +11:00
setup_32.c powerpc: Remove ucache_bsize 2020-12-05 21:49:52 +11:00
setup_64.c Merge branch 'fixes' into next 2020-11-25 23:17:31 +11:00
signal.c powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
signal.h powerpc/signal: Create 'unsafe' versions of copy_[ck][fpr/vsx]_to_user() 2020-12-04 01:01:14 +11:00
signal_32.c powerpc/vdso: Retrieve sigtramp offsets at buildtime 2020-12-04 01:01:17 +11:00
signal_64.c powerpc/vdso: Retrieve sigtramp offsets at buildtime 2020-12-04 01:01:17 +11:00
smp-tbsync.c
smp.c powerpc/smp: Add __init to init_big_cores() 2020-12-21 22:06:10 +11:00
stacktrace.c
suspend.c
swsusp.c
swsusp_32.S
swsusp_64.c
swsusp_asm64.S
swsusp_booke.S
sys_ppc32.c
syscall_64.c powerpc/book3s64/pkeys: Optimize KUAP and KUEP feature disabled case 2020-12-04 01:01:28 +11:00
syscalls.c
sysfs.c powerpc/sysfs: Remove unused 'err' variable in sysfs_create_dscr_default() 2020-09-18 20:05:24 +10:00
systbl.S
systbl_chk.sh
tau_6xx.c powerpc/tau: Disable TAU between measurements 2020-09-15 22:13:30 +10:00
time.c powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
tm.S powerpc/tm: Save and restore AMR on treclaim and trechkpt 2020-10-06 23:22:25 +11:00
traps.c powerpc: Retire e200 core (mpc555x processor) 2020-12-05 21:49:18 +11:00
ucall.S
udbg.c
udbg_16550.c
uprobes.c powerpc: fix -Wimplicit-fallthrough 2020-11-18 14:18:09 -06:00
vdso.c powerpc/vdso: Remove DBG() 2020-12-04 01:01:19 +11:00
vdso32_wrapper.S powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o 2021-01-30 22:23:42 +11:00
vdso64_wrapper.S powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o 2021-01-30 22:23:42 +11:00
vecemu.c
vector.S
vmlinux.lds.S powerpc/64s: fix scv entry fallback flush vs interrupt 2021-01-20 15:58:19 +11:00
watchdog.c