Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1609388pxb; Wed, 10 Feb 2021 12:20:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9dbaJZ1QgbN1v+U/uPT27xG1aBLwM6NgNA8orcC3W5GQwU3Hsi6wR+YWtzPgUg9GmZM+n X-Received: by 2002:a17:906:1447:: with SMTP id q7mr4907417ejc.27.1612988402404; Wed, 10 Feb 2021 12:20:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612988402; cv=none; d=google.com; s=arc-20160816; b=kZHBHFf40ev6HFnL+ttsOZV1VtF3D52f1f7G8sBvbffaNLx3IV45aDFSvVl5FLlVSV o9+smAYhpqkwljH2a+8OPWrC/yDzZT8seQ8fXBF9LVmyExUzF2JP6QSWyJ7trkFYBZfM 7wrevuF68IZCqWQ6TAq/2hsM/owVJHKGzd8qe5+fLyoBW9aKXYbsvi84qTed9DGlz8Yd D9YNZafKS5mKfuIiWa5FOiaKpzJBIlDIw1L4Wn6yMDvkKrEySQhzvtaRiCMtDZl/C2Uy UGZzc1Dgr9zp6Xp9RyCwga51wjWWqvIRR2CubjjUzTkDVviXYItdnzV7/EIlVtzwqnew ciTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=46JkSkzkLjmcli7PJwlZrIixiNe3HU3nIjR7gkTj9wY=; b=qrgB9Gfyk26NNix+JcHmfUIeEb1SLm+d9FaGmhgZGRuZ3gocfu/8RRO8IqYaCrCodF 9zL4JLhYdKzzlhX4C0iVPrKKFw2pTuL4Nd11fPtJLWfLl1n/+FqzwD4gI3P5RIkA/yCd YrehFkxuKm7wSLEDonPbP4wcbFiGWt+rEYN04cNt1GMUku0iPs9c52jwHdjPgRyBbjEb FW7FlsJzVCD7yQxuphvyr2ji5yfAZpJbEMXN9cGsWh3Dgopn2u4WX83sxiW3/jEdCZP/ vpQjKO+v/5olQS+NfAUdNIlL3vnZpnbsWZEYLS6GHFInIFboKZb++pFnsM1IChsacJmY qJcw== 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 j16si2036600ejy.305.2021.02.10.12.19.37; Wed, 10 Feb 2021 12:20:02 -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 S233222AbhBJUR6 (ORCPT + 99 others); Wed, 10 Feb 2021 15:17:58 -0500 Received: from smtp-bc0a.mail.infomaniak.ch ([45.157.188.10]:47009 "EHLO smtp-bc0a.mail.infomaniak.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233035AbhBJURq (ORCPT ); Wed, 10 Feb 2021 15:17:46 -0500 Received: from smtp-2-0000.mail.infomaniak.ch (unknown [10.5.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4DbWJ96DZ5zMq18p; Wed, 10 Feb 2021 21:16:57 +0100 (CET) Received: from ns3096276.ip-94-23-54.eu (unknown [23.97.221.149]) by smtp-2-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4DbWJ66tgwzlppyf; Wed, 10 Feb 2021 21:16:54 +0100 (CET) Subject: Re: [PATCH v28 07/12] landlock: Support filesystem access-control To: "Serge E. Hallyn" Cc: 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, =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= References: <20210202162710.657398-1-mic@digikod.net> <20210202162710.657398-8-mic@digikod.net> <20210210193624.GA29893@mail.hallyn.com> From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= Message-ID: Date: Wed, 10 Feb 2021 21:17:25 +0100 User-Agent: MIME-Version: 1.0 In-Reply-To: <20210210193624.GA29893@mail.hallyn.com> Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > >> 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 >