Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5009570imu; Tue, 8 Jan 2019 09:55:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN62td61Wbk2BozrdHARZyb0bC72MSSXCbw5RNpcf5rtXE1YKx+VPiGmAOOB3B/LoYwgmj18 X-Received: by 2002:a63:f65:: with SMTP id 37mr2353523pgp.238.1546970146057; Tue, 08 Jan 2019 09:55:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546970146; cv=none; d=google.com; s=arc-20160816; b=LRpTKhaGpewObToX1U6MTXAK1OPTzWsGNck1Ao9zWPItKbB71jBNRFd1hP28vCIe6A 5BqRE6hf+KynOHnlch0EIZMfc8QVYP5XX+m3YCHJyMkOzckk/2oZGHvgT9H9Kdpq744R 4dyGfyZ8c6FNG++ZELcZDEur0EOH3ZZpSbNMqBsaLpoFFMtZrNbkBtbBgi/PU9u2yarw E8GDs8O3cWIw0ae6t1jx6J6WM3EYNAPD6WcridgQVxVJ5ldlZ9LqjWumUF6UkK4t6/An Bss+kOgXlSc1T8XJN3O1exS+sd2YjBlgQ5eZOYY4ugtdbNoz2VcfWw6ddy1CSx46caqv 1fQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cN70vQeCP29bV4a+EWWyynERX07KcD1IM+7xEN1fGaM=; b=OqQXq3d+jeTRloc63f6Nsrycnu65GdfeAKPMIj23R4kxaWJYXOhUbx6diJ3S75tj5N WiknhV1VL850lTmMxfBLA1qpRS48q6K398hCHzG/CN5Z/47GwiuW0ugjpLH870ykvmO7 XSS5Kq0vxibzY0ob3XKCOmyBTxD5eIGxsOKnS1Nswrmo4QYIX0hrvUqLjWLexJoqvwHj ZLYFcEDAKhMDxg0kl3kmgRzm8L7RNuF/GXZdFhUwPkvfTnnt7AW9/OJqpWE8PEAUu6q0 tZWXA2rQopJ1v/T475cE8xeyCAG9ocPN/LN7DNH9ed6E2zHTo0wy0ygL5PDH/o2Cy038 x9wQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12si4632639plq.190.2019.01.08.09.55.30; Tue, 08 Jan 2019 09:55:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729095AbfAHRyR (ORCPT + 99 others); Tue, 8 Jan 2019 12:54:17 -0500 Received: from mail.hallyn.com ([178.63.66.53]:40684 "EHLO mail.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727484AbfAHRyR (ORCPT ); Tue, 8 Jan 2019 12:54:17 -0500 Received: by mail.hallyn.com (Postfix, from userid 1001) id 52252107D; Tue, 8 Jan 2019 11:54:15 -0600 (CST) Date: Tue, 8 Jan 2019 11:54:15 -0600 From: "Serge E. Hallyn" To: Tycho Andersen Cc: Christian Brauner , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, luto@kernel.org, arnd@arndb.de, serge@hallyn.com, keescook@chromium.org, akpm@linux-foundation.org, jannh@google.com, oleg@redhat.com, cyphar@cyphar.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, dancol@google.com, timmurray@google.com, fweimer@redhat.com, tglx@linutronix.de, x86@kernel.org, ebiederm@xmission.com Subject: Re: [PATCH v7 2/2] selftests: add tests for pidfd_send_signal() Message-ID: <20190108175415.GA22353@mail.hallyn.com> References: <20190102161654.9093-1-christian@brauner.io> <20190102161654.9093-2-christian@brauner.io> <20190108175306.GF29009@cisco> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190108175306.GF29009@cisco> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 08, 2019 at 10:53:06AM -0700, Tycho Andersen wrote: > On Wed, Jan 02, 2019 at 05:16:54PM +0100, Christian Brauner wrote: > > + /* > > + * Stop the child so we can inspect whether we have > > + * recycled pid PID_RECYCLE. > > + */ > > + close(pipe_fds[0]); > > + ret = kill(recycled_pid, SIGSTOP); > > + close(pipe_fds[1]); > > + if (ret) { > > + (void)wait_for_pid(recycled_pid); > > + _exit(PIDFD_ERROR); > > + } > > Sorry for being late to the party, but I wonder if this whole thing > couldn't be simplified with /proc/sys/kenrel/ns_last_pid? no, bc it's not namespaced :)