mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
nosys(): add kern.signosys tunable/sysctl to control SIGSYS
(cherry picked from commit 5804a1623054d865618d77cfac86978f03b8111a)
This commit is contained in:
parent
45ebb15ab1
commit
3911b00c0a
1 changed files with 5 additions and 1 deletions
|
|
@ -159,6 +159,10 @@ static int kern_lognosys = 0;
|
|||
SYSCTL_INT(_kern, OID_AUTO, lognosys, CTLFLAG_RWTUN, &kern_lognosys, 0,
|
||||
"Log invalid syscalls");
|
||||
|
||||
static int kern_signosys = 1;
|
||||
SYSCTL_INT(_kern, OID_AUTO, signosys, CTLFLAG_RWTUN, &kern_signosys, 0,
|
||||
"Send SIGSYS on return from invalid syscall");
|
||||
|
||||
__read_frequently bool sigfastblock_fetch_always = false;
|
||||
SYSCTL_BOOL(_kern, OID_AUTO, sigfastblock_fetch_always, CTLFLAG_RWTUN,
|
||||
&sigfastblock_fetch_always, 0,
|
||||
|
|
@ -4219,7 +4223,7 @@ nosys(struct thread *td, struct nosys_args *args)
|
|||
|
||||
p = td->td_proc;
|
||||
|
||||
if (SV_PROC_FLAG(p, SV_SIGSYS) != 0) {
|
||||
if (SV_PROC_FLAG(p, SV_SIGSYS) != 0 && kern_signosys) {
|
||||
PROC_LOCK(p);
|
||||
tdsignal(td, SIGSYS);
|
||||
PROC_UNLOCK(p);
|
||||
|
|
|
|||
Loading…
Reference in a new issue