From nobody Fri Jun 17 19:38:46 2022 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 5C1A385B676; Fri, 17 Jun 2022 19:38:47 +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 4LPq9259CVz3Qdl; Fri, 17 Jun 2022 19:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494726; 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=KLmVuC7bZrenIibT1Ia0QTHKUcienwxsh5ejBPPFTnM=; b=W4500jfc7lCZdDlsmR8WgwZh6FiEATPT47OO/hycl8TGgzY75GhQzfz2WfOnheTlcM803P Ppw4Y4S32+q1QvGuj+k6YwWAut3MkxsrZ21HTYHlwbhUF+b4MhK3eHHq5V64UAFppqb4HP sAz8oG4YiXVBqim0s+OCrjAj9vc2021SpI2QWxutgXwP7n/GxF75ppyKzzsWbHA7Yl6uql GNqvkLG/wn+JTGppO3FUNsV4chX3btb3789M1Z/A1nkEALiDbXDIW9h30+fo2/fbvsAItt 7B826kfoXLfnap+lDezMazBuMhrR6hdEwKqzc0FLMN/6sE1vi4GrqtDVmBAiDw== 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 865F2257D9; Fri, 17 Jun 2022 19:38:46 +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 25HJckX4015127; Fri, 17 Jun 2022 19:38:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJckeI015126; Fri, 17 Jun 2022 19:38:46 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:38:46 GMT Message-Id: <202206171938.25HJckeI015126@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: 638a0649cf18 - stable/13 - linux(4): Add support for __WALL wait option bit. 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/13 X-Git-Reftype: branch X-Git-Commit: 638a0649cf185da082b9cae6a5a6d0535db604b3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494726; 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=KLmVuC7bZrenIibT1Ia0QTHKUcienwxsh5ejBPPFTnM=; b=OjXrYJUWhY0meLjmKsnBzDXriwWla3SrezMBTQaTXnxbwJzZM3g8tKjyCn0m8VUGt0tTh1 Ip/T7DpOQsOG49HO8wAnymYxZtKX3eFxsMiMPSslzYXdRIorxj6VZCnjql+fYWc6bMDTmW VJx/biowi046SbJthrZF13LyC/nGtM7xAYQJhDkSkCTlaT1NNALQpCpr//EBLnQrGIHdDA rpEw6bqr6tKUFMLLm/1oRuYyrK4GuWTvGNuDsCZcZbUOb0vGbBeie1vwL6TuKu2bD9EQlO S9NVFwaYSR34eZvT48c9paiUqDkr5ANabU6/qNbMRdY+DNuCttAWHw/Wq8Qx2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494726; a=rsa-sha256; cv=none; b=EKOTp784z9QwMXbZKliL6DEajEypHPfjTGQjz9UQPl3Q6fy/Y8HzLDN5dV9BCTSZKdPAWA ZOHjVzf7cAJEneO2N7w/JY6kPl4KhgI3mks5CjSHBJgP0wcjrJHxfrOe91RPM4WCF4Z3M4 Kai+Jg0qDs6p8wWEPoOXSJBNn3YLzxLN8NlmWUUzkenMgK5EVVLuTpr3pJC8z9Qrp9MiU5 TzWpzMIWXTu1q+1QnwX7rr6QD4P8Do5SAzaU/Gi/lBwM2KOYvVAesRTr+vjxvtbiPTerTN IuAB6qbYZkpDwin5WpZ8+hz46EGvHzcVqcBuzTpUig4RW30774l73oMh+IPkZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=638a0649cf185da082b9cae6a5a6d0535db604b3 commit 638a0649cf185da082b9cae6a5a6d0535db604b3 Author: Dmitry Chagin AuthorDate: 2022-03-31 17:42:03 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:33:45 +0000 linux(4): Add support for __WALL wait option bit. As FreeBSD does not have __WALL option bit analogue explicitly set all possible option bits to emulate Linux __WALL wait option bit. Reviewed by: emaste Differential revision: https://reviews.freebsd.org/D31555 MFC after: 2 weeks (cherry picked from commit c7ef7c3facaf663c3da2d91916bcb2f162fc300e) --- sys/compat/linux/linux_misc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 00783091175c..b761917b2dc9 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1063,6 +1063,14 @@ linux_wait4(struct thread *td, struct linux_wait4_args *args) */ options |= WEXITED | WTRAPPED; + /* + * As FreeBSD does not have __WALL option bit analogue explicitly set all + * possible option bits to emulate Linux __WALL wait option bit. The same + * for waitid system call. + */ + if ((args->options & __WALL) != 0) + options |= WUNTRACED | WCONTINUED | WLINUXCLONE; + if (args->pid == WAIT_ANY) { idtype = P_ALL; id = 0; @@ -1096,6 +1104,9 @@ linux_waitid(struct thread *td, struct linux_waitid_args *args) options = 0; linux_to_bsd_waitopts(args->options, &options); + if ((args->options & __WALL) != 0) + options |= WEXITED | WTRAPPED | WUNTRACED | + WCONTINUED | WLINUXCLONE; switch (args->idtype) { case LINUX_P_ALL: