From owner-dev-commits-src-main@freebsd.org Thu Aug 12 08:56:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4AAC5667B14; Thu, 12 Aug 2021 08:56:03 +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 4GlgX316Q7z4T5G; Thu, 12 Aug 2021 08:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0EEE51FEEB; Thu, 12 Aug 2021 08:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17C8u2MG064048; Thu, 12 Aug 2021 08:56:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17C8u25I064047; Thu, 12 Aug 2021 08:56:02 GMT (envelope-from git) Date: Thu, 12 Aug 2021 08:56:02 GMT Message-Id: <202108120856.17C8u25I064047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: c5fc9fe7f36a - main - linux(4): Implement CLONE_CLEAR_SIGHAND option bit. 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/main X-Git-Reftype: branch X-Git-Commit: c5fc9fe7f36a742e567173b2e3d65252140013d1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2021 08:56:03 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c5fc9fe7f36a742e567173b2e3d65252140013d1 commit c5fc9fe7f36a742e567173b2e3d65252140013d1 Author: Dmitry Chagin AuthorDate: 2021-08-12 08:55:35 +0000 Commit: Dmitry Chagin CommitDate: 2021-08-12 08:55:35 +0000 linux(4): Implement CLONE_CLEAR_SIGHAND option bit. CLONE_CLEAR_SIGHAND is designed to reset all signal handlers of the child not set to SIG_IGN to SIG_DFL. Reviewed by: kib Differential revision: https://reviews.freebsd.org/D31481 MFC after: 2 weeks --- sys/compat/linux/linux_fork.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index db3e9e1ea27b..77dd8446c588 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -151,6 +151,8 @@ linux_clone_proc(struct thread *td, struct l_clone_args *args) ff |= RFMEM; if (args->flags & LINUX_CLONE_SIGHAND) ff |= RFSIGSHARE; + if ((args->flags & LINUX_CLONE_CLEAR_SIGHAND) != 0) + f2 |= FR2_DROPSIG_CAUGHT; if (args->flags & LINUX_CLONE_FILES) { if (!(args->flags & LINUX_CLONE_FS)) f2 |= FR2_SHARE_PATHS;