Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1348839pxk; Thu, 10 Sep 2020 13:11:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoFOeX+gKSObOxPDlbLMCmX+48Gxr3Lq8vI06LkNyoLbYG+dO7nuqzKphoOg3u3Yywp/QO X-Received: by 2002:a17:906:2985:: with SMTP id x5mr10416914eje.136.1599768672452; Thu, 10 Sep 2020 13:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599768672; cv=none; d=google.com; s=arc-20160816; b=yLRGd8/l23GWLPMplOz++mp1fux5UP2JzBG93AYbe9CEnm/qn0u1m1cWMxZg1jeLkc 8pnkzW0kHAv/3hcVzqo4SddfEiJiHK7MFwa3MbIBdayvjmSJQ85LoPfU7qW1t86pDaLp IQc4fvYJe9YHsg/CtBD2tYnMKPLN9Pyak8Hbn9rh3WeXuIcPju6TUAnHaXR+p244nZEq Yqic1MZ7Qi5TovGw3HW8Tkm21VQiSzTrvc+6zaopPdd1A1DsFVsbX4lAC/AxjWvAfiLi en9CTHQR2QmziBRZOWZpLzzRcXSm612NKrOjzqz4xmQeXrCRIBNwsfjViYECy9PcLY6/ KMoQ== 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=c2OmDmw3CBNdMhbSUreC74RlMC1GtRl7G6wTRWdIDhg=; b=iNKCrfuUB1kjwYN9nQq8Enf/XOhLmsFF6k4NPtQQJyOXE/KYUR8s8U3NDroOhPQXZ4 CxQWTa+8hKGW8j74yLj7YRWX+nXC2ySprSqYLZlhxJp6w/4ZX57sekIuB/MUcceusKV6 PD4eJCriyRygmNtsoxMrru+hGxiInbQgUadEZaUKbd0phXUXkIRzNnQ4etcnUCGKjKrU ar9taQfZmcNSXfPGgqOFj48fjWbAPDvFDoNwTx2gvqfnxub1YpStQCGe9Yn+3hom/EFM i6r7J6T5jD47v3ShU19Cs2Ri+cK1G9uEhm2Bz1773cK/c55uAATV2IjMotgMScYplMuR UEgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=oalS+ESh; 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 j33si4438186edc.537.2020.09.10.13.10.49; Thu, 10 Sep 2020 13:11:12 -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=oalS+ESh; 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 S1726694AbgIJUII (ORCPT + 99 others); Thu, 10 Sep 2020 16:08:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726901AbgIJUF6 (ORCPT ); Thu, 10 Sep 2020 16:05:58 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BBD9C061573; Thu, 10 Sep 2020 13:05:58 -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=c2OmDmw3CBNdMhbSUreC74RlMC1GtRl7G6wTRWdIDhg=; b=oalS+EShumiM+wP4ntMj+va6+Q Nh1j9337AoOX5aS6ehlDvYBnbeH5wAQR/9ls36am10xynQpwjAzNspdirI5ohbUmCjgytsp6ExJhu 61TqiAGlfQvDFqi1JocYtyt1E3SBqZt+RHR5ElNE0185BXyGVupHaZe0djMdV/ttf1KoyzZ8hdeFJ z0CoXaDzfHr5fh5hlf6Gt1AywT/4OZMjRpww4aVwjYJG+OoB5dzIFkkHg42E79TUXRRyuDmQBueyp KAqaQ+Hi5YPbc5abQpTeFLdmAJTJqOQETXvwfl9CDwTes6XA46M10L1IXyJSp5ODcSg+CifPThbbA V4gIP2hA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGSpD-0003dj-CF; Thu, 10 Sep 2020 20:05:43 +0000 Date: Thu, 10 Sep 2020 21:05:43 +0100 From: Matthew Wilcox To: Al Viro 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: <20200910200543.GY6583@casper.infradead.org> References: <20200910164612.114215-1-mic@digikod.net> <20200910170424.GU6583@casper.infradead.org> <880bb4ee-89a2-b9b0-747b-0f779ceda995@digikod.net> <20200910184033.GX6583@casper.infradead.org> <20200910200010.GF1236603@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: <20200910200010.GF1236603@ZenIV.linux.org.uk> 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 09:00:10PM +0100, Al Viro wrote: > 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. Hang on, it does have some things which aren't BD^W^WLSM. It lets the interpreter honour the mount -o noexec option. I presume it's not easily defeated by cat /home/salaun/bin/bad.pl | perl -