linux/arch/m68k
Eric W. Biederman a3616a3c02 signal/m68k: Use force_sigsegv(SIGSEGV) in fpsp040_die
In the fpsp040 code when copyin or copyout fails call
force_sigsegv(SIGSEGV) instead of do_exit(SIGSEGV).

This solves a couple of problems.  Because do_exit embeds the ptrace
stop PTRACE_EVENT_EXIT a complete stack frame needs to be present for
that to work correctly.  There is always the information needed for a
ptrace stop where get_signal is called.  So exiting with a signal
solves the ptrace issue.

Further exiting with a signal ensures that all of the threads in a
process are killed not just the thread that malfunctioned.  Which
avoids confusing userspace.

To make force_sigsegv(SIGSEGV) work in fpsp040_die modify the code to
save all of the registers and jump to ret_from_exception (which
ultimately calls get_signal) after fpsp040_die returns.

v2: Updated the branches to use gas's pseudo ops that automatically
    calculate the best branch instruction to use for the purpose.

v1: https://lkml.kernel.org/r/87a6m8kgtx.fsf_-_@disp2133
Link: https://lkml.kernel.org/r/87tukghjfs.fsf_-_@disp2133
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2021-08-26 09:59:15 -05:00
..
68000 m68knommu: fix missing LCD splash screen data initializer 2021-06-21 12:09:26 +10:00
amiga asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
apollo asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
atari m68k/q40: Replace q40ide driver with pata_falcon and falconide 2021-06-10 16:30:12 -06:00
bvme6000 asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
coldfire m68k: coldfire: remove private clk_get/clk_put 2021-06-08 17:00:09 +02:00
configs m68k updates for v5.14 2021-06-28 14:01:03 -07:00
emu TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
fpsp040 signal/m68k: Use force_sigsegv(SIGSEGV) in fpsp040_die 2021-08-26 09:59:15 -05:00
hp300 asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
ifpsp060 m68k: fpsp040,ifpsp060: Remove meaningless EXTRA_LDFLAGS 2021-04-06 09:33:20 +02:00
include mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t * 2021-07-08 11:48:22 -07:00
kernel signal/m68k: Use force_sigsegv(SIGSEGV) in fpsp040_die 2021-08-26 09:59:15 -05:00
lib m68k: get rid of zeroing destination on error in csum_and_copy_from_user() 2020-08-20 15:45:17 -04:00
mac m68k/mac: Replace macide driver with generic platform drivers 2021-06-10 16:30:11 -06:00
math-emu
mm m68k: remove support for DISCONTIGMEM 2021-06-29 10:53:55 -07:00
mvme16x m68k: mvme147,mvme16x: Don't wipe PCC timer config bits 2021-04-06 09:33:20 +02:00
mvme147 m68k: mvme147,mvme16x: Don't wipe PCC timer config bits 2021-04-06 09:33:20 +02:00
q40 m68k/q40: Replace q40ide driver with pata_falcon and falconide 2021-06-10 16:30:12 -06:00
sun3 m68k: remove timer_interrupt() function 2020-10-30 21:57:06 +01:00
sun3x asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
tools/amiga
install.sh
Kbuild m68k: sun3: Descend to prom from arch/m68k/sun3 2020-07-13 11:39:12 +02:00
Kconfig asm-generic/unaligned: Unify asm/unaligned.h around struct helper 2021-07-02 12:43:40 -07:00
Kconfig.bus
Kconfig.cpu m68k: remove support for DISCONTIGMEM 2021-06-29 10:53:55 -07:00
Kconfig.debug
Kconfig.devices treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig.machine m68k: atari: Fix ATARI_KBD_CORE kconfig unmet dependency warning 2021-06-07 16:28:51 +02:00
Makefile Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00