From nobody Mon Sep 25 10:24:55 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 4RvJsM65Whz4vLfC; Mon, 25 Sep 2023 10:24:55 +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 4RvJsM5dBDz3HRq; Mon, 25 Sep 2023 10:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695637495; 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=TefoKLiiA3ZMCDnfnUv6q5z/GTs/wcAQyPTc4++2Rq4=; b=RPbbWoU3mzy7EEcLt58MikvN5sr94zX3DzKyNrBG2kQkCuYSRXoU4GeXd+tCseIL5RZV3k sypZ7KkYCfQEcOwsb/aOpIA1xz0AfdwjWF+IRkz/U3f675w66aa592Pt+2ttHmvzfxsA5L PQsVfSVFJRxtzDBy3d70jmbC1e2ncsB13EaQ9c4HBs/hvmAuEczeW3vYr7+C6lwmKTSYFx zkqNMj0wH/K+dW9KXwKk0vtsI76dyrCt/gVfG+Sa4QdhTMIYifx6MT73KjJAgS7vsJDOs0 QhrZrjhBCFI91arYzCqYm7gatdPnPgVJd/1QWEHkiIgweu+5YmD6My+qHWUB7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695637495; a=rsa-sha256; cv=none; b=K0pkyQmQ9zP/sI9wcieaQBJJQBXjpUQfd05TZ/u9G9y5DM41To3MVlA5ke0FFhihkZqAEI +38k8mqlTfop4WhMByzAVlzEOwoc0nm07u38KaIvCsdkRF3MEyAUHUxtn++Y/Yu41ZXSAQ rvR2rTxqqZRQCUSPVnz3nUtpYckpmxhpYRnvTvHxENjXbEFbdY5Ee+g0Fzme21OaLVvCta Hx8AmIzepg+x4VeeL5spMR/729DFwQVAqoqBZd1DBgnjFaEKXw7aZyseBBuk8vX6wMmcz5 MLep2QSx7sucOJEDN7bU8sZdpQZW3lHmf/PdOn/yZ3bg4gmP15yimpnLxljBmQ== 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=1695637495; 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=TefoKLiiA3ZMCDnfnUv6q5z/GTs/wcAQyPTc4++2Rq4=; b=Xq927YaZw2WjRprvW1745hwPH/qzLOtuk7cY7v0Z8MaI1YRD4Jzq02iBZ7FIcHp8M1pu42 PPmtStoagsceT6QI4G0W5MKl7J3F7+GaS+QYKu80ZpOqn5ssC90l0G6537tHUlYvayvM5U 6cPQDCcRpje7z8ScubMjMQaUx303m7OjCoy/Fg1bq+IQHdVIj/aNpmBqMVxJ7K3pYU4IWT 6Z6FzcR62c5CF3o12JC0hcbEQ4UFr0qVvHhCfk2M2mIql++qj0h1TJIgir7AgJdYGJJka5 CaH6wkDyBM9OHNwX+GNzc1FNgVt7aHnnqil0/E4XTUYEbv7cUBQwmsMH3kWp3A== 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 4RvJsM4kj3z1Ppx; Mon, 25 Sep 2023 10:24:55 +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 38PAOt3N092840; Mon, 25 Sep 2023 10:24:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PAOtK5092837; Mon, 25 Sep 2023 10:24:55 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:24:55 GMT Message-Id: <202309251024.38PAOtK5092837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: a08bb9bdd20b - stable/14 - linux(4): On Linux SIGKILL can not be reset to default 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a08bb9bdd20b4226d83f1f643116275e7af7e3f9 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=a08bb9bdd20b4226d83f1f643116275e7af7e3f9 commit a08bb9bdd20b4226d83f1f643116275e7af7e3f9 Author: Dmitry Chagin AuthorDate: 2023-09-18 14:53:01 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-25 10:18:55 +0000 linux(4): On Linux SIGKILL can not be reset to default MFC after: 1 week (cherry picked from commit 227d01c1bc7caf2e838ee6eef1e6a3cc81d79d1b) --- sys/compat/linux/linux_signal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index e3e3fc74a6a9..9a84700b3949 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -170,6 +170,7 @@ linux_do_sigaction(struct thread *td, int linux_sig, l_sigaction_t *linux_nsa, if (!LINUX_SIG_VALID(linux_sig)) return (EINVAL); + sig = linux_to_bsd_signal(linux_sig); osa = (linux_osa != NULL) ? &oact : NULL; if (linux_nsa != NULL) { @@ -180,9 +181,11 @@ linux_do_sigaction(struct thread *td, int linux_sig, l_sigaction_t *linux_nsa, linux_ktrsigset(&linux_nsa->lsa_mask, sizeof(linux_nsa->lsa_mask)); #endif + if ((sig == SIGKILL || sig == SIGSTOP) && + nsa->sa_handler == SIG_DFL) + return (EINVAL); } else nsa = NULL; - sig = linux_to_bsd_signal(linux_sig); error = kern_sigaction(td, sig, nsa, osa, 0); if (error != 0)