Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp506476pxk; Wed, 9 Sep 2020 10:57:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfZ9A0BrCwLHLzaCbo+CMJs8Wspx5+nq63y9SU6vI9DvzpPvR2hm1Oy6IaByvD0K2PiJQP X-Received: by 2002:a17:906:3bca:: with SMTP id v10mr4731444ejf.57.1599674272898; Wed, 09 Sep 2020 10:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674272; cv=none; d=google.com; s=arc-20160816; b=gmgBqirJWk7+2e5kXvWh6L0mmubZ9JB0fWLW2YCxQN0f/dSC3jM1HeMEQMxNdPwnVY 2QOyDJy74oQlag3G/mUyGwvvuIfVo+qGj0HB5mofzZxW/fvFzsE4OFk8c1j2FWHKifOl B9y+H/VQ4Kcmw+E5vpn+XV/PdIcbV095IgeBAniiYmxvG4CL5xidnICOwXfzOUZ8BeXx uM6KYJn+GGrZFuvNlpSMKBUuBTpzt1o4QuKasv66wR623hOYHHpJ8qI0Ehk2QNQrqSvB 1iqnkobhkjCi6mTbIDe3O1nFfLl1AzLPXihCG6drNnVVyA93SiYuz3SRQkT2p8XrAN+f iLkw== 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=TYE5/BosAFwsQ06VwGfPU6eeiUtJnEdQAI/F7h/TRso=; b=cdtCwHy8Y5gBStM7bmHB0ohgxyvAZE72r3pr6Pg8T9wPqWaehuw07XXJPGo5Wk6PC/ wQViC27lSPraeASylD05zxhlxPK91b4Ffg2seiGfG0ut2A5KqBoW+wEclpx06yxw8A7+ b86Y6gkXxB2++2Gee7w1jFAPv/KJrpZmQmPM9xA0juJKpy+iZkbbKZmHrMMGw3IP4N+r UrX3E1pu02i6OKvSQ7qTjdaJ3+siYK4632zfKDsbCb2GBuOYdqbZAx+gIAi7Uj1ADH8l 8EhpAQLSsBA8aXdgu7/+NP2lm5TX3l3q8p6OncsiFaMv39xnE+oJVSX2UIatW2mcHnET dU2g== 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 x21si1850741ejb.137.2020.09.09.10.57.28; Wed, 09 Sep 2020 10:57:52 -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 S1726714AbgIIR40 (ORCPT + 99 others); Wed, 9 Sep 2020 13:56:26 -0400 Received: from smtp-bc0d.mail.infomaniak.ch ([45.157.188.13]:53097 "EHLO smtp-bc0d.mail.infomaniak.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726414AbgIIR4U (ORCPT ); Wed, 9 Sep 2020 13:56:20 -0400 Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4BmqSx64STzlhXmq; Wed, 9 Sep 2020 19:56:17 +0200 (CEST) Received: from ns3096276.ip-94-23-54.eu (unknown [94.23.54.103]) by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4BmqSv6SZnzlh8TH; Wed, 9 Sep 2020 19:56:15 +0200 (CEST) Subject: Re: [RFC PATCH v8 0/3] Add support for AT_INTERPRETED (was O_MAYEXEC) To: Al Viro 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 , =?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> <20200909171316.GW1236603@ZenIV.linux.org.uk> From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= Message-ID: <2ed377c4-3500-3ddc-7181-a5bc114ddf94@digikod.net> Date: Wed, 9 Sep 2020 19:56:20 +0200 User-Agent: MIME-Version: 1.0 In-Reply-To: <20200909171316.GW1236603@ZenIV.linux.org.uk> 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:13, Al Viro 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. > > 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*. > Fine, I'll do it. It will look a lot like this one though.