freebsd-dev/sys
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
..
amd64 Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
arm Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
arm64 Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
bsm
cam cam_iosched: use tunable flag and make a bool really a bool 2021-07-13 14:13:21 -06:00
cddl
compat linuxkpi: Add spin_trylock_irqsave() macro 2021-07-15 07:52:42 -07:00
conf libkern: import strnstr from libc 2021-07-14 17:55:08 -07:00
contrib zfs: merge openzfs/zfs@07a4c76e9 (master) into main 2021-07-12 23:24:45 +02:00
crypto ossl: Use crypto_cursor_segment(). 2021-05-25 16:59:19 -07:00
ddb fix style nit: space after if 2021-05-05 15:26:09 -06:00
dev ixgbe: Print FW NVM and Option ROM versions 2021-07-15 23:53:23 -07:00
dts dts: Bump the freebsd branding version to 5.13 2021-07-01 18:48:56 +02:00
fs nfssvc: Zero the buffer copied out when NFSSVC_DUMPMNTOPTS is set 2021-07-15 22:41:10 -04:00
gdb
geom eli: Zero pad bytes that arise when certain auth algorithms are used 2021-07-15 12:23:04 -04:00
gnu
i386 Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
isa newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf 2021-06-22 20:52:06 -06:00
kern Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
kgssapi
libkern Add missing libkern/strnstr.c file 2021-07-14 17:56:03 -07:00
mips Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
modules pccard: remove pccard module 2021-07-13 20:39:31 -06:00
net pf: add DIOCGETSTATESV2 2021-07-09 10:29:53 +02:00
net80211 net80211: ieee80211_probereq_ie fix length calculation for hw scans 2021-06-28 12:17:11 +00:00
netgraph Consistently use the SOLISTENING() macro 2021-06-14 17:32:27 -04:00
netinet tcp: Lro needs to validate that it does not go beyond the end of the mbuf as it parses. 2021-07-16 06:07:13 -04:00
netinet6 sctp: Fix errno in case of association setup failures 2021-07-09 23:19:25 +02:00
netipsec ipsec: globalize lft zone and zero out buffers at allocation time 2021-06-28 08:14:26 +00:00
netpfil pf: Constify tag name and queue name helper functions 2021-07-15 12:17:58 -04:00
netsmb netsmb: Avoid a read-after-free in smb_t2_request_int() 2021-05-26 10:45:40 -04:00
nfs
nfsclient
nfsserver
nlm
ofed Fix LINT kernel build issues after c3987b8ea7 . 2021-07-12 18:00:30 +02:00
opencrypto crypto: Remove now-unused crypto_cursor_seg{base,len}. 2021-06-16 15:23:16 -07:00
powerpc Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
riscv Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
rpc Consistently use the SOLISTENING() macro 2021-06-14 17:32:27 -04:00
security mac: cheaper check for ifnet_create_mbuf and ifnet_check_transmit 2021-06-29 15:06:45 +02:00
sys Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
teken
tests tests: Revise FIB lookups per second benchmarking routines 2021-06-17 08:49:09 +02:00
tools makesyscalls.lua: improve generated file style(9) compliance 2021-05-13 13:59:25 -04:00
ufs ffs_softdep: force sync if journal is low in journal_check_space 2021-06-23 23:47:05 +03:00
vm uma: Fix a few problems with KASAN integration 2021-07-09 20:38:50 -04:00
x86 x86: Mark the trapframe as initialized in ipi_bitmap_handler() 2021-07-09 20:38:50 -04:00
xdr
xen x86/xen: remove PVHv1 code 2021-05-17 11:41:21 +02:00
Makefile