freebsd-dev/sys/i386/i386
David Chisnall cf98bc28d3 Pass the syscall number to capsicum permission-denied signals
The syscall number is stored in the same register as the syscall return
on amd64 (and possibly other architectures) and so it is impossible to
recover in the signal handler after the call has returned.  This small
tweak delivers it in the `si_value` field of the signal, which is
sufficient to catch capability violations and emulate them with a call
to a more-privileged process in the signal handler.

This reapplies 3a522ba1bc with a fix for
the static assertion failure on i386.

Approved by:	markj (mentor)

Reviewed by:	kib, bcr (manpages)

Differential Revision: https://reviews.freebsd.org/D29185
2021-07-16 18:06:44 +01:00
..
apic_vector.s x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
atpic_vector.s x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
bios.c i386: clean up empty lines in .c and .h files 2020-09-01 21:19:39 +00:00
bioscall.s
bpf_jit_machdep.c malloc: delegate M_EXEC handling to dedicacted routines 2020-10-30 20:02:32 +00:00
bpf_jit_machdep.h
copyout_fast.s
copyout.c Provide protection against starvation of the ll/sc loops when accessing userpace. 2019-07-12 18:43:24 +00:00
db_disasm.c i386: clean up empty lines in .c and .h files 2020-09-01 21:19:39 +00:00
db_interface.c x86: Report per-cpu IPI TLB shootdown generation in ddb 'show pcpu' output. 2019-01-04 17:25:47 +00:00
db_trace.c ddb: replace watchpoint set/clear functions 2021-03-29 12:05:44 -03:00
elan-mmcr.c i386: clean up empty lines in .c and .h files 2020-09-01 21:19:39 +00:00
elf_machdep.c Do not call FreeBSD-ABI specific code for all ABIs 2021-07-07 14:12:07 +03:00
exception.s hyperv: Fix vmbus after the i386 4/4 split 2021-06-08 09:40:30 -04:00
gdb_machdep.c gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
genassym.c Mitigations for Microarchitectural Data Sampling. 2019-05-14 17:02:20 +00:00
geode.c i386: clean up empty lines in .c and .h files 2020-09-01 21:19:39 +00:00
in_cksum.c Remove support for intel compiler from i386 in_cksum 2020-10-24 23:21:27 +00:00
initcpu.c i386: Fix a few typos 2021-03-13 16:10:01 +01:00
io.c
k6_mem.c
locore.s x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
longrun.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
machdep.c i386: Make setidt_disp a size_t instead of uintptr_t 2021-06-01 19:37:50 -04:00
mem.c Add the MEM_EXTRACT_PADDR ioctl to /dev/mem. 2020-09-02 18:12:47 +00:00
minidump_machdep_base.c Honor the vm page's PG_NODUMP flag on arm and i386. 2021-01-04 16:15:42 -06:00
minidump_machdep_nopae.c i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
minidump_machdep_pae.c i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
minidump_machdep.c Move vm_page_dump bitset array definition to MI code 2020-09-21 22:20:37 +00:00
mp_clock.c i386: clean up empty lines in .c and .h files 2020-09-01 21:19:39 +00:00
mp_machdep.c i386: clean up empty lines in .c and .h files 2020-09-01 21:19:39 +00:00
mpboot.s x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
npx.c x86: initialize initial FPU state earlier 2021-05-28 21:38:32 +03:00
perfmon.c
pmap_base.c Skip the vm.pmap.kernel_maps sysctl by default. 2020-12-18 20:41:23 +00:00
pmap_nopae.c Define a unified pmap structure for i386. 2020-01-07 15:59:31 +00:00
pmap_pae.c Define a unified pmap structure for i386. 2020-01-07 15:59:31 +00:00
pmap.c Assert that valid PTEs are not overwritten when installing a new PTP 2021-07-15 12:17:33 -04:00
ptrace_machdep.c
sigtramp.s x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
support.s x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
swtch.s
sys_machdep.c x86: Always use clean FPU and segment base state for new kthreads. 2021-03-12 09:48:36 -08:00
trap.c Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
uio_machdep.c
vm86.c i386: clean up empty lines in .c and .h files 2020-09-01 21:19:39 +00:00
vm86bios.s x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
vm_machdep.c x86: use x86_clear_dbregs() on fork 2021-04-10 04:25:02 +03:00