Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2269597ybl; Sat, 25 Jan 2020 21:49:34 -0800 (PST) X-Google-Smtp-Source: APXvYqys704BjIHHpzTTCrHpo27YfWlT7/5InFwSFzcE9zvAwz++OeCKvqelM+TxFW8ORJ4lp9Gw X-Received: by 2002:a05:6830:4d9:: with SMTP id s25mr8397903otd.171.1580017774065; Sat, 25 Jan 2020 21:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580017774; cv=none; d=google.com; s=arc-20160816; b=lKAJVzG2BLkty+GehWP6DGxyiMbNHbKZAJofhiZlsv4nvORhNTn94kdXZgJ2QwEh6O gkCsLlTE/qpuaFIYdPeTWalI7q9DpMC5FLwxWm6Nux9yGhtvdcD5si3YXou/FO6G/qRR 5W1CxzAx8hG8HXqBljg1Y8S78/DMakKhteba8szdH2t9LbEAky/WR6zgPXYvbF4I534X 6tBSGLOHOoAO4V6ONEOoK9WXfY+xS/y4ZC+U7nb7gvI2RcWPLKYrcRwS2dYRKul4ul8s /xZcWb3mhmaE3P2XQLPr0y/B0gBGh5hY2klp1IAC2lntbjjpffgqh7pnhfZ5lZ7p0yVr 39MQ== 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:dkim-signature; bh=0FozRu6Z46A1Ox9dVGHRP4DE9HvTC18OKQ2gVKB5H0I=; b=HeFv78RK450VQivPRxencdbrLqW3d1ziTsuisYT9o0odzwHG6+ReEYz9ejAghKb93H urmifJjpNi0yJ7ZbzNbKvka+v/dfQ0oRCFhosOLXaZljwCWoCCW2cW+PeglfO3ay4XdO ustS6Cfh4MIgdLFPff7NL4iapnaytoR5iBprvyBOMTQXoFDw9TJp/bGUy5wBREAQFKYT U7FsJwSwUW7kbA6ObEPaE/of+dTRTzR26iMzvSeyqVlMakQuUayNGkqsq9mzhbSitvhm gYFPRHXNat12zRd19rsM3kjWcyLzfrclV8RYZ9E9NaqsRCXpshJEaLa8BpOilXi43mY4 3GMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=btm3FgLJ; 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 c26si5779775otf.288.2020.01.25.21.48.56; Sat, 25 Jan 2020 21:49:34 -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=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=btm3FgLJ; 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 S1726252AbgAZFmy (ORCPT + 99 others); Sun, 26 Jan 2020 00:42:54 -0500 Received: from mail-il1-f193.google.com ([209.85.166.193]:34473 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725773AbgAZFmy (ORCPT ); Sun, 26 Jan 2020 00:42:54 -0500 Received: by mail-il1-f193.google.com with SMTP id l4so4929563ilj.1 for ; Sat, 25 Jan 2020 21:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho-ws.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0FozRu6Z46A1Ox9dVGHRP4DE9HvTC18OKQ2gVKB5H0I=; b=btm3FgLJ76pCbaN9E1aHd2oRO0ynyht6XDpRf1NqBO0KsxDdMPCDLlJSI+R/y7CzNp oTob9nBVf1guTbe87lKoYbuKDoC0Ql9g/TGdEcmgcKa22CDAGLFRuC4fp19A9o6yHTL3 BEFHMz/mK29Nu8bLopbByot+VLxOTUCq1nUjjgFkqgAQFOGrA9JRqBVEU3vbEbGYj1fY LhGd7pEFDzL3Fcljj7NX6cElajCJ0vMkdIgbIrk1Y9Hm6TS7KcKXSQp5DVDzoJYpi0Tb ww4IeJfARco7kUDRhNK5PuWzvJ0qetZih0El03fZ7BBrQRxw9DU0SwfvRfjIAlAKKCp4 kREA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0FozRu6Z46A1Ox9dVGHRP4DE9HvTC18OKQ2gVKB5H0I=; b=Kgv9A4P14VNLgaHktfxQ7bxUUqf+XbFpZMkIHM3RSz2wHqjFV/tM43h7X+iUD94FHB l6fOK++8XGgxKUlu8n4pcyEfca6zNmjjqGPbsnwGKAtCJ88JGeYritVPILGF/oh3OZHw 9XBW+/UhOU02xOaZKBcVHnJVbLwUC6iPCl8GvSDcVscrd6Jyy1estyKm/pluzgDbkkZQ ruovJUFlj/v6/w+DWRT060/7heNrDa/dlUDpWzPHHwQqHBRk3SGmK0dNU7+/rhSdwrUc Dmx9ttTHPhzuOUlbsQXs8KHxFqBda3Bz+u7LbXdDugDk03k8j7hvRWNqMqCpyi+noGx0 2yIA== X-Gm-Message-State: APjAAAV6WLjVXnFAN/hJtf8bzcaUYt+Uvdkf/M6rH0M1LOb35lGUBrIt 0cXc0CsMGcNhpGdENHWTGNdyWw== X-Received: by 2002:a92:de46:: with SMTP id e6mr9722912ilr.122.1580017373261; Sat, 25 Jan 2020 21:42:53 -0800 (PST) Received: from cisco ([2601:282:902:b340:51e3:9841:c212:5f6]) by smtp.gmail.com with ESMTPSA id t15sm3350809ili.50.2020.01.25.21.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jan 2020 21:42:52 -0800 (PST) Date: Sat, 25 Jan 2020 21:42:56 -0800 From: Tycho Andersen To: Sargun Dhillon Cc: LKML , Linux Containers , Linux API , Linux FS-devel Mailing List , Christian Brauner Subject: Re: [PATCH 3/4] seccomp: Add SECCOMP_USER_NOTIF_FLAG_PIDFD to get pidfd on listener trap Message-ID: <20200126054256.GB4151@cisco> References: <20200124091743.3357-1-sargun@sargun.me> <20200124091743.3357-4-sargun@sargun.me> <20200124180332.GA4151@cisco> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 12:09:37PM -0800, Sargun Dhillon wrote: > 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. Ok, but then isn't this just another temporary API? Seems like it's worth waiting until the Right Way exists. Tycho