Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1346000pxk; Thu, 10 Sep 2020 13:06:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNuXa0BoQ59PRZ88q/z/MUFv3Sh6pfJ38MLO1RFlq5XRtLK8uF6gQBaBrMWLe08hFujh50 X-Received: by 2002:a17:906:b756:: with SMTP id fx22mr10271655ejb.245.1599768411644; Thu, 10 Sep 2020 13:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599768411; cv=none; d=google.com; s=arc-20160816; b=uzpnip7VINfCIonlOUTHlar+wAp5mMcDuyhihfEl6hP5JWs6krpPCZnTZ9tocoUlhT t9XUvPUCvOEUduw6t08Hstph94P2PGz/wSphroN/EekQAYzjJvlO86ts16NSNXuQmS4o ovXW8JHzN2ZLQvzCAf811D7MchUqFdzlOkbm5g5aihCa+4b3pmzLGNIkrOGhAEwyV7A3 NLxJTUfrzTjrKFHPWbObaYG9PJkSBBg2azwc9sDxgFeT3riFRpOEzlPKMoMXG9mawXfD 3JZHYYKPxmPQ440VrRz/YYnWINqKC8jGZXjPaOkjHGsJSo8z01x8OkNg0TtG+w8cKNf5 UNlg== 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=PZNXZZSzCh1krKQPSFnSbudyuA1tX4R1PAhIpRsh7G0=; b=RHV1FgJQgkFn95dCBgtUuKhPhelRCc0dwWOmUDCv4Prfx7kg8x8t//HDOsg617lhPC uDkYl963TdGqJmcwVDuAFmCCAUGNWf/Av90B2eIZzvnNJCtvqODx9q4B1uoN/mxAw7b3 NCrE283ZRTalYXnlrZdGg7448Rnp9+lOmwW0dSzW6ODUrsivA0SJ7YROflMMM3URLcKB YEdl56ASkXeyXHYLVG31UEHX/v7b3iFPKf7ZbBlETdR3ZYQGgjLJqdLsXb/bI5jlFXk5 NXw5SjI3doXCYkkqUKgmo+eZ7uV4tnooCouSNdM3lvl7F5LL1xGBPPYaFlK0DxHbvlRM rqnA== 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 h9si4381928ejg.735.2020.09.10.13.06.29; Thu, 10 Sep 2020 13:06:51 -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 S1726480AbgIJUFt (ORCPT + 99 others); Thu, 10 Sep 2020 16:05:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726639AbgIJUAy (ORCPT ); Thu, 10 Sep 2020 16:00:54 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6317C061757; Thu, 10 Sep 2020 13:00:47 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGSjq-00DvEU-NI; Thu, 10 Sep 2020 20:00:10 +0000 Date: Thu, 10 Sep 2020 21:00:10 +0100 From: Al Viro To: Matthew Wilcox Cc: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Mimi Zohar , linux-kernel@vger.kernel.org, Aleksa Sarai , Alexei Starovoitov , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Casey Schaufler , 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 , 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 v9 0/3] Add introspect_access(2) (was O_MAYEXEC) Message-ID: <20200910200010.GF1236603@ZenIV.linux.org.uk> References: <20200910164612.114215-1-mic@digikod.net> <20200910170424.GU6583@casper.infradead.org> <880bb4ee-89a2-b9b0-747b-0f779ceda995@digikod.net> <20200910184033.GX6583@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200910184033.GX6583@casper.infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 07:40:33PM +0100, Matthew Wilcox wrote: > On Thu, Sep 10, 2020 at 08:38:21PM +0200, Micka?l Sala?n wrote: > > There is also the use case of noexec mounts and file permissions. From > > user space point of view, it doesn't matter which kernel component is in > > charge of defining the policy. The syscall should then not be tied with > > a verification/integrity/signature/appraisal vocabulary, but simply an > > access control one. > > permission()? int lsm(int fd, const char *how, char *error, int size); Seriously, this is "ask LSM to apply special policy to file"; let's _not_ mess with flags, etc. for that; give it decent bandwidth and since it's completely opaque for the rest of the kernel, just a pass a string to be parsed by LSM as it sees fit.