Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp480908pxk; Wed, 9 Sep 2020 10:14:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkHcqRbR3gNUGmIg+kFhLEtTYpFfBAUCTMJLbBSeeomR/eYex6SzwMMbnzomjLiwGz8w2D X-Received: by 2002:a17:907:444f:: with SMTP id on23mr4548953ejb.392.1599671690497; Wed, 09 Sep 2020 10:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599671690; cv=none; d=google.com; s=arc-20160816; b=K8khX9SvRXhzjqq4iQ8NdLYszKapv2ivL7wOdLDkpmnSoxiKXy10eVBCj/4C2YqCex A79ZXKDm5fz/7RxI1r7VCT0KULw59HPSQLQMdhibONP5pviS/yD7s+ZwgJz5QBTlOKMX 1GzyPmh/6Uv2BemfEQvQoUrL82xSHUpRtql+oQGLXRPBJvDRgeeLnMx2Mr4zR6UTMvbD 0I6xMv0NNyhGO+3siUMRSAH6rdnmxXmgo4wPm0n6y1bF4OFLKrH+E+GnQtR1hInVPprs /6jXbWkatjvmUOCoswxGuNzGyMReflI9Ym4avqHoHBEjHBlfh9ucr0GdPqqZpEbXMT02 b0eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=SS74sZl8CXrsWj+oeIQmESa5/i5UKxklViV3ZbnNPFA=; b=qQTOlEANKqjK9CNHOQcDhe3Y2XU3C51lFwh7459oRGI5nqKxzPwBgNBRGXtRZf+lY9 wO9h885e6y2z/F9CqPXY/YqdSmGxHsPzG5yg7varB95sVbyalne6rDSYwSe1Ce09oEDk CSfHeXcekG1dd8vqQT08AxZ+4XQtbRaAXSp0RSvZtsvnxLKvW/suGSBbCoEkJYpkvISL qoDKMwKiZrTCiYPz3r8a/bMx8H4yjIlxq5m3te1hIfnRt7b0umJzsnrkQNKO8FUdOess tKiobFS2Wb4hpXVojhVdQrcOGpHdCmlFK9beQRh7QfnoAxH+RsQJTN953Bw9NzjgJ0HY lzxA== 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 h24si1963370ejt.641.2020.09.09.10.14.27; Wed, 09 Sep 2020 10:14:50 -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 S1730748AbgIIRNq (ORCPT + 99 others); Wed, 9 Sep 2020 13:13:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730293AbgIIRNh (ORCPT ); Wed, 9 Sep 2020 13:13:37 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BB65C061573; Wed, 9 Sep 2020 10:13:37 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG3em-00DIaQ-My; Wed, 09 Sep 2020 17:13:16 +0000 Date: Wed, 9 Sep 2020 18:13:16 +0100 From: Al Viro To: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= Cc: 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 , Matthew Wilcox , Michael Kerrisk , Miklos Szeredi , Mimi Zohar , Philippe =?iso-8859-1?Q?Tr=E9buchet?= , 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 Subject: Re: [RFC PATCH v8 0/3] Add support for AT_INTERPRETED (was O_MAYEXEC) Message-ID: <20200909171316.GW1236603@ZenIV.linux.org.uk> References: <20200908075956.1069018-1-mic@digikod.net> <20200908185026.GU1236603@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Once more, with feeling: don't hide that behind existing syscalls. If you want to tell LSM have a look at given fs object in a special way, *add* *a* *new* *system* *call* *for* *doing* *just* *that*.