linux_dsm_epyc7002/arch
Eric W. Biederman 530621b79f signal/um: More carefully relay signals in relay_signal.
There is a bug in relay signal.  It assumes that when a signal is
relayed the signal never uses a signal independent si_code, such
as SI_USER, SI_KERNEL, SI_QUEUE, ... SI_SIGIO etc.  In practice
siginfo was assuming it was relaying a signal with the SIL_FAULT
layout.  As that is the common cases for the signals it supported
that is a reasonable assumption.

Further user mode linux must be very careful when relaying different
kinds of signals to prevent an information leak.  This means simply
increasing the kinds of signals that are handled in relay_signal
is non-trivial.

Therefore use siginfo_layout and force_sig_fault to simplify
the signal relaying in relay_signal.

By taking advantage of the fact that user mode linux only works
on x86 and x86_64 we can assume that si_trapno can be ignored,
and that si_errno is always zero.

For the signals SIGLL, SIGFPE, SIGSEGV, SIGBUS, and SIGTRAP the only
fault handler I know of that sets si_errno is SIGTRAP TRAP_HWBKPT on a
few oddball architectures.  Those architectures have been modified to
use force_sig_ptrace_errno_trap.

Similarly only a few architectures set __ARCH_SI_TRAPNO.

At the point uml supports those architectures again these additional
cases can be examined and supported if desired in relay_signal.

Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
Cc: Martin Pärtel <martin.partel@gmail.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: linux-um@lists.infradead.org
Fixes: d3c1cfcdb4 ("um: pass siginfo to guest process")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-04-28 08:46:49 -05:00
..
alpha signal/alpha: Use force_sig_fault where appropriate 2018-04-25 10:40:59 -05:00
arc signal: Ensure every siginfo we send has all bits initialized 2018-04-25 10:40:51 -05:00
arm signal: Ensure every siginfo we send has all bits initialized 2018-04-25 10:40:51 -05:00
arm64 signal: Ensure every siginfo we send has all bits initialized 2018-04-25 10:40:51 -05:00
c6x signal/c6x: Use force_sig_fault where appropriate 2018-04-25 10:40:59 -05:00
h8300 h8300: remove extraneous __BIG_ENDIAN definition 2018-03-22 17:07:01 -07:00
hexagon signal/hexagon: Use force_sig_fault as appropriate 2018-04-25 10:41:00 -05:00
ia64 signal/ia64: Replace FPE_FIXME with FPE_FLTUNK 2018-04-25 10:40:55 -05:00
m68k signal/m68k: Use force_sig_fault where appropriate 2018-04-25 10:41:01 -05:00
microblaze signal/microblaze: Use force_sig_fault where appropriate 2018-04-25 10:41:02 -05:00
mips signal/mips: Use force_sig_fault where appropriate 2018-04-25 10:41:02 -05:00
nds32 signal/nds32: Use force_sig_fault where appropriate 2018-04-25 10:42:47 -05:00
nios2 signal/nios2: Use force_sig_fault where appropriate 2018-04-25 10:44:04 -05:00
openrisc signal/openrisc: Use force_sig_fault where appropriate 2018-04-25 10:44:05 -05:00
parisc signal/parisc: Use force_sig_fault where appropriate 2018-04-25 10:44:06 -05:00
powerpc signal/powerpc: Replace TRAP_FIXME with TRAP_UNK 2018-04-25 10:40:58 -05:00
riscv signal/riscv: Replace do_trap_siginfo with force_sig_fault 2018-04-25 10:44:07 -05:00
s390 signal/s390: Use force_sig_fault where appropriate 2018-04-25 10:44:08 -05:00
sh signal/sh: Use force_sig_fault where appropriate 2018-04-25 10:44:09 -05:00
sparc signal/sparc: Use force_sig_fault where appropriate 2018-04-25 10:44:10 -05:00
um signal/um: More carefully relay signals in relay_signal. 2018-04-28 08:46:49 -05:00
unicore32 signal/unicore32: Use FPE_FLTUNK instead of 0 in ucf64_raise_sigfpe 2018-04-25 10:40:56 -05:00
x86 signal: Add TRAP_UNK si_code for undiagnosted trap exceptions 2018-04-25 10:40:56 -05:00
xtensa signal/xtensa: Use force_sig_fault where appropriate 2018-04-25 10:44:12 -05:00
.gitignore
Kconfig kbuild: remove incremental linking option 2018-03-26 02:01:19 +09:00