From nobody Mon Oct 02 22:31:20 2023 X-Original-To: dev-commits-src-main@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 4RzwfK2F0qz4wZGr; Mon, 2 Oct 2023 22:31:21 +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 4RzwfK1Hn5z3W6L; Mon, 2 Oct 2023 22:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285881; 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=fqIfpP2OIAx4iiig2TZTCX/rSHWkVXwmh2pqAZps0mo=; b=WbtA6XlGCGffgX5wOSQgKfIb82/QBOdOI48xNq0o1cWVad/6upSQ03Txvtl18zqO63BCmY dyHesedsWFcrmBbqwzOf53XKs+4McOC+1Zsv9vp7bNOIjZoAR6gu5VYqLQZ1vNcEAWv8ud lu1/1E8RQCjYAxnB8AcjvF49Lf1X3EjlMpSaA2uU3hcQ0KldNeydpQ3eU0IpRud4algO0p sZUSSErKIkRBwpyYQUWdl19hK2IW1H+dpBN43eqOEmIVj8SCUcvUbTN1fVtS0pBZ1mKqQN uG5l9HabIxLK9wQhSgvEWuKFP3Ul9PHljAimAiCD/XAWU237AsdiIByo3Zrpyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696285881; a=rsa-sha256; cv=none; b=qrSOCQiTxPyxl9gCrcAuoZ/Nz8fNAHmI6cloJScjVPdXEMw0Oz+u2mJBIyPbpw9lZNz3uI kaEm9hREFKAvxHWdM7U+AHCVxsC6yalSkBqBT8deG/O6NandaORYUOenGYxH9GDrtzCGJ3 RYZCawkWL4F2V6dtyJukVig+Uzpk6pTOzGhcD42CNlx7MNUc/i9IDHcISoxk7SFliRLKQr GzFLjiO026xrgOBYLlSBuTKFEbskIOKqLksHCIanTP89sGQyAAl4/7J9x/B3qG87Qx5WwR W52mDbOzufYa+xZtBsj14JUlA7VHbqJx5LLD3ZXTTz0KWz714AIt7A+i9XLQeg== 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=1696285881; 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=fqIfpP2OIAx4iiig2TZTCX/rSHWkVXwmh2pqAZps0mo=; b=ROiDpgv++Kaa9aaGQl5HMEMGHtrNPh79RN8FVwbg5oux3aQassUevCn4R5yeNUoJbjQaSw SqHWx2okeexr6Isr2zGF7221Vm9vd37PQW0bm69DW7b7ZmsQzalKL3w1A6pXFUUFnf+ICx KQHRREVRye+oWMkYdSSz02lmOo4YN0zoQQUE2rHvt5gpimR0S/SsLqPKI5n4lsUPCW9umS 6xNov915dGWQ69lgN96aVKtwMCWhfAW8NnubbOCJnZVw5ldKPgDb8g10X+XaGODHp0UMyx SfTSOhI0DaArQZifD7NE4xD+dU39lVGFmrmlgEyFRbnCd5bx8PJbywpLVc9esg== 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 4RzwfK0HY0zVbk; Mon, 2 Oct 2023 22:31:21 +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 392MVKBl099060; Mon, 2 Oct 2023 22:31:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392MVK6Z099057; Mon, 2 Oct 2023 22:31:20 GMT (envelope-from git) Date: Mon, 2 Oct 2023 22:31:20 GMT Message-Id: <202310022231.392MVK6Z099057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5804a1623054 - main - nosys(): add kern.signosys tunable/sysctl to control SIGSYS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 5804a1623054d865618d77cfac86978f03b8111a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5804a1623054d865618d77cfac86978f03b8111a commit 5804a1623054d865618d77cfac86978f03b8111a Author: Konstantin Belousov AuthorDate: 2023-09-25 16:36:04 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-02 22:30:53 +0000 nosys(): add kern.signosys tunable/sysctl to control SIGSYS Reviewed by: dchagin, markj Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41976 --- 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);