From nobody Mon Oct 09 03:43:07 2023 X-Original-To: dev-commits-src-branches@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 4S3lHJ1ntBz4wBrk; Mon, 9 Oct 2023 03:43:08 +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 4S3lHH65gvz4FQ4; Mon, 9 Oct 2023 03:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696822987; 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=LQcPhVIJWR+VGu1piNq+5P8jF5k0cF7S7h+3SU6CJWs=; b=LJ7vL5g9+FXgw+lhdexcI2MC9jeR3Rwo8YUlkKXsLgeoMR9/juavoaPkBQI0euOOh3nzlK tV4SRBWH0Eq2bf7eNsk/JXJXP5Ju9cOkX9DGehnGYBanH4SwJIwlhZYsRFn1PcGqjK3L1c a/4ylwM0NxzdodmSBMpN3G0sfS2ucjMXRtf67N0kr03EWt3beMPIfIrA6xmMtcgGyDZ8zb HX1MomwhcURuaJGqeSqYaUReFzSuYlI5e0Mw82susm/pK+msu3ZA75Vx6bnFDPczZwKKyN OvtOj8SLx9CQzycNmOZz3wizopf7ed1evnGhJImXRByrqXEQz//PoQMbXzANXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696822987; a=rsa-sha256; cv=none; b=NSUdcn1D134t6mHUsKMKtrWHyBj2b6RK2QNZnljKNiUEKRBXdWwXjq8kATMsa1dIgiHuDE 55pkCrv7+O2QzWJ9jGVyeIId9GEdTA7gaPWRrLxKH6B+XPQJ8aCfjQAWnAog7TYgnZ6Nd8 Sjda4/mnbJe3Akzb5PdecPsXbvkZntm+fON+NP+xnRE4CCM1iE/iJP7xN8KMvAGG1Z7Lrl 6Oae9wMZWUsAxMrLcVTHKYYHasbbQWHZcc2xPbEEZ9vIslvaHOLhQoCLqIkUahMJzy0+0z /nTd7NMwQptLBckeXUveQDJNRTXlwDe9zFNOFAjS4HIg2zBsmgFT9ORRBfdZwQ== 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=1696822987; 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=LQcPhVIJWR+VGu1piNq+5P8jF5k0cF7S7h+3SU6CJWs=; b=Y3o/gKrOwnLau3XeBdkuJ8o/1UJg+JUsmYTKh5cxmM8YRDcOtkyhuPjXN7SxRHouCOQAKt u40W5IRCDdvDsdheFq5OCGwGhciWcePXaAru6FFPAVxONhnvd4Tj1bzUzKAeORySAlHSE/ zVX0U3eEGx0/07hUXZ7Jxgcel01kbuGHq4/9zta2UHMVTy59wWtlgTqPYiKivyxpWIJV1C NEIfbw2vyCr8iXI/gRrsb5S/se0P50uvOTsXdnsmcDWQvLit8g4E4qaWAOQQHT/m1d53LT ou481h0zloyrrEaHs8RkMfvxS78jiSoACtFqk6nOVlq6ivCnPjtHuLvLtCCalw== 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 4S3lHH5Cl8zfvJ; Mon, 9 Oct 2023 03:43:07 +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 3993h7C9024169; Mon, 9 Oct 2023 03:43:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3993h7MJ024166; Mon, 9 Oct 2023 03:43:07 GMT (envelope-from git) Date: Mon, 9 Oct 2023 03:43:07 GMT Message-Id: <202310090343.3993h7MJ024166@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: ff4e7f52471d - stable/13 - nosys(): add kern.signosys tunable/sysctl to control SIGSYS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: ff4e7f52471d7ce6d3ca8fe563f64bda6a88bb28 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ff4e7f52471d7ce6d3ca8fe563f64bda6a88bb28 commit ff4e7f52471d7ce6d3ca8fe563f64bda6a88bb28 Author: Konstantin Belousov AuthorDate: 2023-09-25 16:36:04 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-09 03:42:17 +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 5dd56e0ec851..f25ff1ed55a6 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, @@ -4128,7 +4132,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);