Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp999811ybl; Fri, 24 Jan 2020 13:30:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxEwfw7qkeVOwxv7wn0zUASJx8U0FRg1ijd5OKhiOioZ/3JlyzhHR62Kj1WwNBrrQXcgmwb X-Received: by 2002:a9d:7ad9:: with SMTP id m25mr4134233otn.13.1579901453363; Fri, 24 Jan 2020 13:30:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579901453; cv=none; d=google.com; s=arc-20160816; b=nuYtiGiIG/GLAJXQqLn1ZeVvRP5T5riIrnjaIuYvEk7GfylCVAHSduzOBRKXs0yg5N dX9/cXxJOQIoLqTXkwxtLYfz2HguJzKoc8GVvL09Ae1AANnuhq3reDlzlRq8p3PLsn+K 2iIops40vAtpbfqzt8zi0H166SRAtQxC/kI+T4qBunP8GZdU4ppZ4VRn0R9jpO1UYqbv PGgwz+bEcWG1jC88IlvWGtyAhhHOWkBXxfxuY031R+81zhYliQuUGX+R3RUtSIuZ5YUg Sqvlu4QY27hWueG0oUVYKNB4MhnZsL6zn9tvadGmOWI9xTQAuvWmytzHv3rUKIUNqap7 zyHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EW6Y/EZHZi/ttUxTUSXyYBrJLM6UmlUPE/P/09OJMp8=; b=olPA00B5yiKu6pkd1Wx2fikI/7yaRJYCQT5xM5uCsVHP/GcPwJRGrbtmmZXc7hYLkh TyelD1kUAPMbnegRvgcb4M++Xt5YVr+Zt0/GOdwqT1g4406jwcItxAcuTZuRnEFpqgK6 vlXxOkh7X75Qee/p3pBuiyWuxUYkfm0ZHBDBhmH0LguywCD+8VZmrQS06l0ffcci3rTU b1+n3NyB2gZZrhQbMwmu2M0Tv58Riewqp9gG5HEk4wzb8VpJIdxenSd/2+0CCTBMXloT +bwrMcoftzR7kwLz8FV+N4h7MbI3kHy6Cr2lHnQaBGkw3R1YYhHUmktuo2wvxQiQWagq 0mDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sargun.me header.s=google header.b=D57LaX6f; 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 s68si345436oih.275.2020.01.24.13.30.41; Fri, 24 Jan 2020 13:30:53 -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; dkim=pass header.i=@sargun.me header.s=google header.b=D57LaX6f; 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 S2403875AbgAXUKP (ORCPT + 99 others); Fri, 24 Jan 2020 15:10:15 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:42385 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729683AbgAXUKP (ORCPT ); Fri, 24 Jan 2020 15:10:15 -0500 Received: by mail-ed1-f67.google.com with SMTP id e10so3797585edv.9 for ; Fri, 24 Jan 2020 12:10:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sargun.me; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EW6Y/EZHZi/ttUxTUSXyYBrJLM6UmlUPE/P/09OJMp8=; b=D57LaX6fPIH9yUp1n9+Oi2UloLj6giH8ArlR4WpiryOjEWH0YZzmHpB7st9eYWD7TS 3j+v+LFsCXuf38Ry79+XOYI8bX8rWiHVP83p0KFyhcNBtyplhPLMBFeQgyCznZeNhu4d bnUnov6ftmIi4qUTGqr5SEUrcbtZUY6nZZ2nI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EW6Y/EZHZi/ttUxTUSXyYBrJLM6UmlUPE/P/09OJMp8=; b=bvQq6Q9wIRe0cwBAoJvCWK9FnITy1inhx9Z2pU3yYJLy6ZbJe+FVkM5UaCaIXiSaE9 FY7Z7y953CgIoS20ao7xbu2Adlq4rJp67D/esJW+OUTgaZS4HrsIvx+0CaswEYV7MSA9 4oUlU+rZk8iDJ0n7sAUgoW6Zj+A9+nGOf9vgtm/qxdUMvqvk4vmgtHO9PgPvZa4R9otv mb2hJ35rXe6SebpGhswWxeN80X26oeaMEt7IwYGd9VdQxmltZLkFwO2tESKJySA1BGtU 04GLOXhAe0wmqMfjo+0jcrsS0Yhro7k+hf2HodqiWcrMzXsEwU9xKO7UcXVu7h2+MNS4 iWkw== X-Gm-Message-State: APjAAAV5IhTo0pP4veBuzu/kBdsnqi2s8dG54QU2UwteaMJiNqvPuh3Z 6ToDx1+7GUx8kswBD0xULIKzcyPYHcrtOrRu6nTbRA== X-Received: by 2002:a17:906:680b:: with SMTP id k11mr4160436ejr.0.1579896613104; Fri, 24 Jan 2020 12:10:13 -0800 (PST) MIME-Version: 1.0 References: <20200124091743.3357-1-sargun@sargun.me> <20200124091743.3357-4-sargun@sargun.me> <20200124180332.GA4151@cisco> In-Reply-To: <20200124180332.GA4151@cisco> From: Sargun Dhillon Date: Fri, 24 Jan 2020 12:09:37 -0800 Message-ID: Subject: Re: [PATCH 3/4] seccomp: Add SECCOMP_USER_NOTIF_FLAG_PIDFD to get pidfd on listener trap To: Tycho Andersen Cc: LKML , Linux Containers , Linux API , Linux FS-devel Mailing List , Christian Brauner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 24, 2020 at 10:03 AM Tycho Andersen wrote: > > On Fri, Jan 24, 2020 at 01:17:42AM -0800, Sargun Dhillon wrote: > > Currently, this just opens the group leader of the thread that triggere > > the event, as pidfds (currently) are limited to group leaders. > > I don't love the semantics of this; when they're not limited to thread > group leaders any more, we won't be able to change this. Is that work > far off? > > Tycho We would be able to change this in the future if we introduced a flag like SECCOMP_USER_NOTIF_FLAG_PIDFD_THREAD which would send a pidfd that's for the thread, and not just the group leader. The flag could either be XOR with SECCOMP_USER_NOTIF_FLAG_PIDFD, or could require both. Alternatively, we can rename SECCOMP_USER_NOTIF_FLAG_PIDFD to SECCOMP_USER_NOTIF_FLAG_GROUP_LEADER_PIDFD.