From nobody Mon Oct 09 03:41:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S3lF51ptxz4wwWT; Mon, 9 Oct 2023 03:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S3lF50Qzdz3ggb; Mon, 9 Oct 2023 03:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696822873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J8UhPkPHXaA9LT+4kxOSfbasqNbfMKJ5M75qTw4jSl4=; b=DHN14oMIqZo7U0VmUWBw3lxzuraoSfqFpnErwic4oaSy+1vk+nfBn43HjrgdpBaQp93keO H07LEG6kFptBQHggJnki0kRO6ZWrGVeRGXVn055cn9rlGoG8w727czCdn+6VZecNLuP8Yu sBZsvDpDnZCtjY5jtN5Fzw9DS3zdSknDWhbAKwkwyGlyPGl8s26MRlS91bbf4MPS/sN6Ia eVn49NLe1b0Zx9y+CsyjTe//lTBHrdccRukFimRAo92jawOEnQMyedCBT+TkF41bzXdDUJ Hc0Oayguq7Ylcqa29uV7bF+Qm2ETg6XsiMoF6EEcBnnlhtm1jPh4hqfyjZZNlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696822873; a=rsa-sha256; cv=none; b=cpwtfBXkHffa7pSBba2527Q85J4W8/+cyUV2u9RzckBmC5GdqWWX0qzzw51l2bLiaj0zlZ L6JNwKj9Y/Tr/g+FTvGvEpugltgqddRSWsxI5QhnliNGAU8d546lsW8EFTsJsifBN8dRa2 tcjxUEhCJ63nQ/yHzRq01X6JFO07HHZE6u6K83c3Tt425RUZmdWfyESkn23/SMa5XiV91V G7CDLely5PHd9OcAxfAEvc0JyDXNTCHXMJr2xFzfPEb6nb8l04YmxZMHui8O/PXILsQjUi B57dn7Ww/QKDQvYhplqJXn+/gzsBdD8cXBKipwu/DOr16RapRE7B8poV7Z4PwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696822873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J8UhPkPHXaA9LT+4kxOSfbasqNbfMKJ5M75qTw4jSl4=; b=Ik38EakfrnCaXDYI1YlATJlBgyKpr5CXKndqS1brxa6o9zPFAKjZ3pt09cI4Ndi1IHibFk Mm9bLUELp7fPtQBeFkjz7dd8THEGPX3DBftopJIVls+YwB91jVbh0PaQoZWZ5yjL0hWQQg 3gLldJitlJgTZb/cw1XMpTWjg5wT6GWOxYnbZ7Yy0O/ot9aK7X2i9AjI1p5QbwdKFmj28y x33Om6dfSDDba3IjlyNO+SZ3lE1MJ+1VmFMQ9JKh6D5ISzKVQ+Mjg/sRD3nrN/VDk8Ot+E RS6yLwkL1MkMIjyma2XFMFBWleoUlgg4AD8hL9Y2uMX9Cs4gu0/xZnTffA7sbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S3lF46Yrnzg1S; Mon, 9 Oct 2023 03:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3993fCUg017860; Mon, 9 Oct 2023 03:41:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3993fCMS017858; Mon, 9 Oct 2023 03:41:12 GMT (envelope-from git) Date: Mon, 9 Oct 2023 03:41:12 GMT Message-Id: <202310090341.3993fCMS017858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3911b00c0ab0 - stable/14 - nosys(): add kern.signosys tunable/sysctl to control SIGSYS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3911b00c0ab0a4ac0a1113310dd39c1fb2dd4e24 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3911b00c0ab0a4ac0a1113310dd39c1fb2dd4e24 commit 3911b00c0ab0a4ac0a1113310dd39c1fb2dd4e24 Author: Konstantin Belousov AuthorDate: 2023-09-25 16:36:04 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-09 03:24:31 +0000 nosys(): add kern.signosys tunable/sysctl to control SIGSYS (cherry picked from commit 5804a1623054d865618d77cfac86978f03b8111a) --- sys/kern/kern_sig.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 16bc1e441119..c847783cd3da 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -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);