Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp8109722pxb; Fri, 19 Feb 2021 07:37:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2VH3z3G7skPuEByJSNdYsQ53NxTXkYK3l7DdiboDJXHBhNt8yG8T/hfYeIOtzLR/xdZJ4 X-Received: by 2002:a17:906:1bf2:: with SMTP id t18mr9657044ejg.166.1613749077586; Fri, 19 Feb 2021 07:37:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613749077; cv=none; d=google.com; s=arc-20160816; b=LvJRD3PdLklb13T/DmZADMRmty8aN6f//hqnGu1uGRoX94gxY2AvPH7Ysqs1sFOOL4 vCRuZzR8EErMlcm0lGB5O8U0SpbzNa+pR0xDgGxShu6srlB3eej4u/9VP6G2YXJS4PML 98C1qttTfAQP/1Ey+JmxImb03x7Cu0gmggCNJIfRm6U+1hg3RRZgl48V1jByw62ntPfk 4T5Tj9hDllbbZJlCmojdom2JtIv2OIZyvw5NiGX1OLe60NjnH1yVa6XeEgKz8icQCfJ7 ykBY6oDQm2E844cCjne5XN5Yp8TKayTFFRj4zU8SricG8dK2bycpQogwg40yuqiKcqMC V0hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jUky6YBDXN6G0cgxs+q18ofWpq1AQW+yJupDRQbi7lQ=; b=T3VNMgvyFthqWjBaJIDlaUx77Vh8BEkZXiqzGyPvqxvShr3iiq7gI3/6xCreF3QUN7 YC0scjT7IXoXivpw379ktg5rcL6tA9glmx1Q6kpRlvc6JwL+zcYmK8k65ubDwqlH6fNr PWmS7E5yp5iFy7/gbac49E4Vjmyp6Mrz4xaAXe3p2vRn8/cX8virj0uxEWe+Ho7DirsO j44KHdg1qnVvLKod5W+IDsV72aBmlFgwGVxCuTkwtFz/hFuQg9BCUv/7m9h9DU0t8bTL gZIcr1lw8fuPgQWet8sTdjmyJrrGec8soEjEjVpY0T0ylKiTUF4U5eoEnuCBljW+RN9k 9tTw== 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 w25si6056945edv.77.2021.02.19.07.37.33; Fri, 19 Feb 2021 07:37:57 -0800 (PST) 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 S229871AbhBSPfJ (ORCPT + 99 others); Fri, 19 Feb 2021 10:35:09 -0500 Received: from mail.hallyn.com ([178.63.66.53]:51598 "EHLO mail.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbhBSPfE (ORCPT ); Fri, 19 Feb 2021 10:35:04 -0500 Received: by mail.hallyn.com (Postfix, from userid 1001) id 679722BF; Fri, 19 Feb 2021 09:34:14 -0600 (CST) Date: Fri, 19 Feb 2021 09:34:14 -0600 From: "Serge E. Hallyn" To: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= Cc: "Serge E. Hallyn" , James Morris , Jann Horn , Al Viro , Andrew Morton , Andy Lutomirski , Anton Ivanov , Arnd Bergmann , Casey Schaufler , Jeff Dike , Jonathan Corbet , Kees Cook , Michael Kerrisk , Richard Weinberger , Shuah Khan , Vincent Dagonneau , kernel-hardening@lists.openwall.com, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-security-module@vger.kernel.org, x86@kernel.org, =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= Subject: Re: [PATCH v28 07/12] landlock: Support filesystem access-control Message-ID: <20210219153414.GA18061@mail.hallyn.com> References: <20210202162710.657398-1-mic@digikod.net> <20210202162710.657398-8-mic@digikod.net> <20210210193624.GA29893@mail.hallyn.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 09:17:25PM +0100, Micka?l Sala?n wrote: > > On 10/02/2021 20:36, Serge E. Hallyn wrote: > > On Tue, Feb 02, 2021 at 05:27:05PM +0100, Micka?l Sala?n wrote: > >> From: Micka?l Sala?n > >> > >> Thanks to the Landlock objects and ruleset, it is possible to identify > >> inodes according to a process's domain. To enable an unprivileged > > > > This throws me off a bit. "identify inodes according to a process's domain". > > What exactly does it mean? "identify" how ? > > A domain is a set of rules (i.e. layers of rulesets) enforced on a set > of threads. Inodes are tagged per domain (i.e. not system-wide) and > actions are restricted thanks to these tags, which form rules. It means > that the created access-controls are scoped to a set of threads. Thanks, that's helpful. To me it would be much clearer if you used the word 'tagged' : Using the Landlock objects and ruleset, it is possible to tag inodes according to a process's domain. > >> process to express a file hierarchy, it first needs to open a directory > >> (or a file) and pass this file descriptor to the kernel through > >> landlock_add_rule(2). When checking if a file access request is > >> allowed, we walk from the requested dentry to the real root, following > >> the different mount layers. The access to each "tagged" inodes are > >> collected according to their rule layer level, and ANDed to create > >> access to the requested file hierarchy. This makes possible to identify > >> a lot of files without tagging every inodes nor modifying the > >> filesystem, while still following the view and understanding the user > >> has from the filesystem. > >> > >> Add a new ARCH_EPHEMERAL_INODES for UML because it currently does not > >> keep the same struct inodes for the same inodes whereas these inodes are > >> in use. > > > > -serge > >