Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp506802pxk; Wed, 9 Sep 2020 10:58:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKvMZS6wHLFD4Rt5D1myDVpFnJ9i3ZYkmi0QY8gmQjarmPtTqisic8YIoDygGmOqmSKAu7 X-Received: by 2002:a17:907:72cc:: with SMTP id du12mr4705448ejc.150.1599674309064; Wed, 09 Sep 2020 10:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674309; cv=none; d=google.com; s=arc-20160816; b=sfNNZPZRAj/AQu/3FnzCgw7rNnXDIInhOubo/0lQqwjz+mNWYF+XGR4EhVHcHCiHDO NFeYQ3oMkmArSQtiyMcWoEDGIZvhkokU06oMFDRdEDrynAT68yd1PUT9P21I6yM/R68R l7ODI5nVR9zLj3lZG/LCwsd+riOK3QWQDh03FyBq34YxCb+s0t6tICTsMcsq/TbSnQ0s 2F/wqIbYIvsESOu60gHNcCL48ylEpdcfZz/LIGS+IGx5LS1H1O2o9esJrqj1yAYfOBaG 5IArsH/s4YB+x1C3Xx8jBxB9mG3hHmqNosd3qFAd276a1GHkV2S2CzFZLyjzs3wotIKc Bsng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=WKQ7gNg+kO48fXjsIO9E4DkdF/oMTiE+Lx0e3r3cLQs=; b=Sohtvjlwv6vaYf3A2yy/yIJFUj5P9FlxT5HZRIwMl7OEuwHPI35Z3zlNAVvXOx6/Kn hodPkcIIHem2/letkRTs02CfEfZfOZCmu52BNi6BQvoAbtnmNZeU0pYCb6g90CaCv3AE U4n3x5KJtJ7LTKwdeumv4PKLQ9LnjB+MgEQQuOHrVxPGF7IBMJc19ORX69IkVmJIJGf2 bTe1uqswN+DkAUSzNOfmmEwz0veETfwXKCg3jkRE14mzo8pkZIO+tMwWT9sI8dixMafj ubEnJTxngRkd6IBl1spn2l8ljfI5gF2rZ6KTqlXVhOhL46scXg+hTWiiOZnd/HIrmBaw RPPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si1974727edr.490.2020.09.09.10.58.05; Wed, 09 Sep 2020 10:58:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727010AbgIIR4U (ORCPT + 99 others); Wed, 9 Sep 2020 13:56:20 -0400 Received: from smtp-42aa.mail.infomaniak.ch ([84.16.66.170]:52637 "EHLO smtp-42aa.mail.infomaniak.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbgIIR4T (ORCPT ); Wed, 9 Sep 2020 13:56:19 -0400 Received: from smtp-3-0001.mail.infomaniak.ch (unknown [10.4.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4BmqSL5vl0zlhLB1; Wed, 9 Sep 2020 19:55:46 +0200 (CEST) Received: from ns3096276.ip-94-23-54.eu (unknown [94.23.54.103]) by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4BmqSH5cwXzlh8TF; Wed, 9 Sep 2020 19:55:43 +0200 (CEST) Subject: Re: [RFC PATCH v8 0/3] Add support for AT_INTERPRETED (was O_MAYEXEC) To: Matthew Wilcox Cc: Al Viro , linux-kernel@vger.kernel.org, Aleksa Sarai , Alexei Starovoitov , Andrew Morton , Andy Lutomirski , Christian Brauner , Christian Heimes , Daniel Borkmann , Deven Bowers , Dmitry Vyukov , Eric Biggers , Eric Chiang , Florian Weimer , James Morris , Jan Kara , Jann Horn , Jonathan Corbet , Kees Cook , Lakshmi Ramasubramanian , Matthew Garrett , Michael Kerrisk , Miklos Szeredi , Mimi Zohar , =?UTF-8?Q?Philippe_Tr=c3=a9buchet?= , Scott Shell , Sean Christopherson , Shuah Khan , Steve Dower , Steve Grubb , Tetsuo Handa , Thibaut Sautereau , Vincent Strubel , kernel-hardening@lists.openwall.com, linux-api@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <20200908075956.1069018-1-mic@digikod.net> <20200908185026.GU1236603@ZenIV.linux.org.uk> <20200909170851.GL6583@casper.infradead.org> From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= Message-ID: <3e83b98e-a99d-2e7d-a205-aa83ce94f3fe@digikod.net> Date: Wed, 9 Sep 2020 19:55:48 +0200 User-Agent: MIME-Version: 1.0 In-Reply-To: <20200909170851.GL6583@casper.infradead.org> Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/09/2020 19:08, Matthew Wilcox wrote: > On Wed, Sep 09, 2020 at 09:19:11AM +0200, Micka?l Sala?n wrote: >> >> On 08/09/2020 20:50, Al Viro wrote: >>> On Tue, Sep 08, 2020 at 09:59:53AM +0200, Micka?l Sala?n wrote: >>>> Hi, >>>> >>>> This height patch series rework the previous O_MAYEXEC series by not >>>> adding a new flag to openat2(2) but to faccessat2(2) instead. As >>>> suggested, this enables to perform the access check on a file descriptor >>>> instead of on a file path (while opening it). This may require two >>>> checks (one on open and then with faccessat2) but it is a more generic >>>> approach [8]. >>> >>> Again, why is that folded into lookup/open/whatnot, rather than being >>> an operation applied to a file (e.g. O_PATH one)? >> >> I don't understand your question. AT_INTERPRETED can and should be used >> with AT_EMPTY_PATH. The two checks I wrote about was for IMA. > > Al is saying you should add a new syscall, not try to fold it into > some existing syscall. > > I agree with him. Add a new syscall, just like you were told to do it > last time. > OK, but I didn't receive a response for my proposition to extend faccessat2(2).