Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp478100pxk; Wed, 9 Sep 2020 10:10:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7IFA7isRXKoZYxNmMSwVD8+gUAJbwphLzFUhYA7F/auaeYHhPDNLFy5JKqkAP5C9VLgEK X-Received: by 2002:a17:906:8559:: with SMTP id h25mr4581802ejy.536.1599671437815; Wed, 09 Sep 2020 10:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599671437; cv=none; d=google.com; s=arc-20160816; b=kKH+KsSQKWEPCZYneMyyY7gHwjXUWB5MNxMdbdxYMtOK97A8F2+R+7tGfBDPshh4zM WcRCGxGN6pLpZXafGVA0VFsTTjUAbCWUz1JBafxFsRZhVhK4hem5LHZEtx/ItStUHstp Ez14mEDeJuK8Jq77/DfwzbWf5bIwXTbiovp7mt5aZzvLNO7X92CyBPNT9ENZLSuh6bcT PlRTyrm/e9pKuWifyKxqy0kxZCGD8LceU4rlqbSp+JWGWQon86oPTbJsC4NVi4FH/wm2 3ryWlj2xrBK09vZnOBoieDpK3gs4sbML9N48lUgXY6DCQgJ5QVWCmgTwNea/AMtaSOlC nYJQ== 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:dkim-signature; bh=MRdA/hKdv0ZcdKd+zTHc7r+qLakKPSZ3f21yjj7iix8=; b=SdGNWoj7k7J042/rIh5+VAN5/h3raiBoSJZE8ZadKWi3vV7qTYBbZ2vfWSl1wYqWNl i8n8cXA0G5JTANUMCtUC9NmvcpVpfxb7mbMqylCnvkg1L/LpdwiIvYs6Yozcw0JGHnPJ 7z9Px1USVRnHzMY7Z23eFjtBbI2mzbwO1oSrRblUEjifSuf/eVLbQtQeR+nkywOam6ou gFpCH6nzcG7xOU6rDOGmfHSp14XREUzOTsZZm4NKvV1NHdc/Poyv8z51NzoW0OBHeG9/ D+q/zSZTV5ogEtfYGrZwapXoFtamkyfTLhSXDeTcIq5eMrQBolpQoO1smQbPgdLUTm18 6N4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=W0z7Ggqi; 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 c12si1840202edq.362.2020.09.09.10.10.14; Wed, 09 Sep 2020 10:10:37 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=W0z7Ggqi; 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 S1731065AbgIIRJT (ORCPT + 99 others); Wed, 9 Sep 2020 13:09:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730478AbgIIRJA (ORCPT ); Wed, 9 Sep 2020 13:09:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D83C1C061573; Wed, 9 Sep 2020 10:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=MRdA/hKdv0ZcdKd+zTHc7r+qLakKPSZ3f21yjj7iix8=; b=W0z7GgqihZ/V4Z7UeVxZGpUsGi fNtN2kOEVeoJg5PsX4hYNOL9UiKCDC1aL6S8iu96XC/lfTSWIcTebCpqJ42vX/9r6SALHImHwdpEA w7x5dNWyxDOj35NtO6bfUn0jhcKHgNnDIik72Xdto/v3qNPbg2L8s335x9JHltpJEUoFNxzi0jMZM 56LECQWH4AagiWAmkERe4aycbsVrjyL+mF0zcaH9PgyWiPunyhED6QEeXT32E2RCY2sPDVmsdl36+ X1Kl0YB/gsqBOMjd8Swoai7DBdYFxORo1iIW5YcAOH8/JyAJQk3ipHD1bhuZmBnXCqF23m8pepW8E GSsMNYIg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG3aV-0008Hj-Iu; Wed, 09 Sep 2020 17:08:51 +0000 Date: Wed, 9 Sep 2020 18:08:51 +0100 From: Matthew Wilcox To: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= 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 , 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: <20200909170851.GL6583@casper.infradead.org> 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. 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.