From nobody Wed May 29 13:58:14 2024 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 4Vq9vV2HzXz5MYwD; Wed, 29 May 2024 13:58:14 +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 4Vq9vV1cbkz4NDm; Wed, 29 May 2024 13:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716991094; 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=zeaK9PsclLgMMGiyellYX4Nz7FpY9e3axED2Nf6LEi8=; b=u5GCryA3205U7G7u6DEQaFm22wqqqwMLZEChBxYmqbRcN5Vn4KzFacN4fxSGMdGtQQbrVt 5s7S2OrxJ26Mz+fYPpgNOdbwy9TAYJjj8O3Cn554Lngn8puMZWjeuipwES1ze3Ok1ND8YZ I+F40jhf1tPKUIJiKTs0QiPG6Pwtor5sRwHkSUaJXudcndh8FmtPMtKy1TVeKc+s+vXbD+ qPofJrl6aLdwwKrL3QMxz64bd7Hp5GwF+N67lNgEJx/V84sn1Fw821ULF3A5ugmX5TaZhD r+5jS9FHgQY452Mt3rX/CFrKUsqjB3z3wvgREjp9oDLb6UltiZg8x44sWgMwRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716991094; a=rsa-sha256; cv=none; b=emWGYMKQLuWmEjPXJ6bsZhLdUkVTJwiNeCuhODtpq/YlFGSwD+/uLKjJgl9QB6kmqvFYyh 60set0c4HxSAWMPi8NumXJabQOWM/LgLujTmnYkxA2XOaJ+B1pbwIk1eoKhMJvcHJzd9KW /nNsuPrvysjGO9JJg+HRbA7xbotrnor/Mwd/2vwdHud1i/TSX/+hlUvpSZ9zRBuJ1/3Nd5 VBs9sIpDeHVjvctiVlPOHnEnyLuu6A49Lg7ubyJtSFXEXsEFVfdlR9C/msEF5SClfGdRn7 QTWsxyBcBIbrKLvS3ymjGLS/aSyDMnAs1hnZGuUl0Ui5hLUCgagl0oEJbtJ7LQ== 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=1716991094; 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=zeaK9PsclLgMMGiyellYX4Nz7FpY9e3axED2Nf6LEi8=; b=N01KQrk2caMKU9Tgx7Y0QDKGTB44lMiLzAF0Ev6WAv24f75CdlYEcFQtgSc0lg7RnOFya2 HO5nUW1Ojt8COYsZBcGCnrnAshCqQ2HRe+R6st3mUtKqVMB1gcSoM0/T7lkOC3lL43kLRw t17v76YrHD+2ighZbru9Ij5eHCVHQqWF0r9dmAVro/zwYJPoTh/XoG+I3oZfXIUbJNLa4m u8P+RRq/BpNIjpwURq5BElAQw+P4BS+oKSeZ7/XGnOPQeHEuZ82WKwoOWKLpq2bskVpwdq Yk/gY82hpz6Ia9O7H1xxLExfOIw967AyR35pCgqEvgkDUvPzn4esC6bWwkWMFQ== 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 4Vq9vV1F0Dzyf4; Wed, 29 May 2024 13:58:14 +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 44TDwEvf029732; Wed, 29 May 2024 13:58:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44TDwEWY029729; Wed, 29 May 2024 13:58:14 GMT (envelope-from git) Date: Wed, 29 May 2024 13:58:14 GMT Message-Id: <202405291358.44TDwEWY029729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6d849754b996 - main - linux: implement PR_CHILD_SET_SUBREAPER 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d849754b996703093ca474604c4d8b596c22bf3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d849754b996703093ca474604c4d8b596c22bf3 commit 6d849754b996703093ca474604c4d8b596c22bf3 Author: Son Phan Trung AuthorDate: 2024-05-28 09:51:16 +0000 Commit: Warner Losh CommitDate: 2024-05-29 13:56:23 +0000 linux: implement PR_CHILD_SET_SUBREAPER Reviewed by: imp, dchagin Pull Request: https://github.com/freebsd/freebsd-src/pull/1260 --- sys/compat/linux/linux_misc.c | 8 ++++++++ sys/compat/linux/linux_misc.h | 1 + 2 files changed, 9 insertions(+) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index aa6c3923067f..73a4c49a1a6f 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1819,6 +1819,14 @@ linux_prctl(struct thread *td, struct linux_prctl_args *args) #endif error = EINVAL; break; + case LINUX_PR_SET_CHILD_SUBREAPER: + if (args->arg2 == 0){ + return (kern_procctl(td, P_PID, 0, PROC_REAP_RELEASE, + NULL)); + } + + return (kern_procctl(td, P_PID, 0, PROC_REAP_ACQUIRE, + NULL)); case LINUX_PR_SET_NO_NEW_PRIVS: arg = args->arg2 == 1 ? PROC_NO_NEW_PRIVS_ENABLE : PROC_NO_NEW_PRIVS_DISABLE; diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h index cc025f89d5ff..445110c598cc 100644 --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -57,6 +57,7 @@ #define LINUX_PR_GET_SECCOMP 21 #define LINUX_PR_SET_SECCOMP 22 #define LINUX_PR_CAPBSET_READ 23 +#define LINUX_PR_SET_CHILD_SUBREAPER 36 #define LINUX_PR_SET_NO_NEW_PRIVS 38 #define LINUX_PR_SET_PTRACER 1499557217