Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1555773ybk; Thu, 14 May 2020 11:52:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPFrhdzoSslXO1dikWzzdZtJiG5NXgSwoVAUp/JMWdCXiFop5CQ0S/w7+0offeWNAhgKbh X-Received: by 2002:a05:6402:12c1:: with SMTP id k1mr5297512edx.159.1589482321632; Thu, 14 May 2020 11:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589482321; cv=none; d=google.com; s=arc-20160816; b=g1FIXHKpOFxMSA0uUGJ9Nnnp6o7zsu4klu6TYGGfLAi+Gonn6MtXhZdEP54w7XIR9i y4hkX3w1in/QJh55WI3Vc9P5CKOxUq9cJRjVwWChBcl1GZ9jQBQsPACWaOMk3CEwMUVH v6qxhUrzNd2xvciOR2IgNkfAXbFNVosHvYLV3wf20xKK917NBLS8RVu6lvMUxJgMjaij eH4kDoivLFByqXZGZB54YofFaOv9ZazN1LbYPGZ6HcMb/GuAlxw98gB76mO01HEPZ5iW 50KP3Yogn9hHD3qD7eb3Bn1HxoY71lrYOGH49TNCl14x3Jwtq4ofvFuNavo4Wj2ZhQWr 5SoA== 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=hBVgSiP+r8dFiQeF98w37Wt068znDFhmGDEx9EYruzU=; b=pnk4t9w9MLIvJ6Nato0OhxJpSP+AgMECj6P4mMVsF8dLA0dVWSB+bv9y8gSF/xlUpG eUGXtjqgybxj14qi4nPpJt/wL8nB1WcIXBefprQhTI6EwI7JIjnhBx9g2/hAlN18kHBj rTEymhQUhY+Uv7VpRO++6kODfW7JSLdI1cp705Q3tAnYNTCOkUvMDR+Wfd9AGbzBJtnF AAldbfOB3HCGxgOuCKnp0lgn2UwlMp5AARHEBKLq1VsOBlfQkxHCbt53frGGykTstlCG D9AfyS1wOO03bUVsPixDbdK3rv372IQ+4fCVZV3fMXJdzvrTpLfSrPDzEr+69T0bP0CK dCOQ== 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 z15si409205eda.482.2020.05.14.11.51.39; Thu, 14 May 2020 11:52:01 -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 S1727770AbgENStf (ORCPT + 99 others); Thu, 14 May 2020 14:49:35 -0400 Received: from smtp-bc09.mail.infomaniak.ch ([45.157.188.9]:50611 "EHLO smtp-bc09.mail.infomaniak.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbgENStf (ORCPT ); Thu, 14 May 2020 14:49:35 -0400 Received: from smtp-2-0000.mail.infomaniak.ch (unknown [10.5.36.107]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 49NLDr72ydzlh8ns; Thu, 14 May 2020 20:49:32 +0200 (CEST) Received: from ns3096276.ip-94-23-54.eu (unknown [94.23.54.103]) by smtp-2-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 49NLDq6DNjzljZmr; Thu, 14 May 2020 20:49:31 +0200 (CEST) Subject: Re: [PATCH v17 05/10] fs,landlock: Support filesystem access-control To: James Morris Cc: Casey Schaufler , linux-kernel@vger.kernel.org, Al Viro , Andy Lutomirski , Arnd Bergmann , Jann Horn , Jonathan Corbet , Kees Cook , Michael Kerrisk , =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= , "Serge E . Hallyn" , 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-kselftest@vger.kernel.org, linux-security-module@vger.kernel.org, x86@kernel.org References: <20200511192156.1618284-1-mic@digikod.net> <20200511192156.1618284-6-mic@digikod.net> From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= Message-ID: <2561827e-020c-9a76-98ae-9514904c69f9@digikod.net> Date: Thu, 14 May 2020 20:49:31 +0200 User-Agent: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Antivirus: Dr.Web (R) for Unix mail servers drweb plugin ver.6.0.2.8 X-Antivirus-Code: 0x100000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/05/2020 19:31, James Morris wrote: > On Thu, 14 May 2020, Mickaël Salaün wrote: > >>> This needs to be converted to the LSM API via superblock blob stacking. >>> >>> See Casey's old patch: >>> https://lore.kernel.org/linux-security-module/20190829232935.7099-2-casey@schaufler-ca.com/ >> >> s_landlock_inode_refs is quite similar to s_fsnotify_inode_refs, but I >> can do it once the superblock security blob patch is upstream. Is it a >> blocker for now? What is the current status of lbs_superblock? > > Yes it is a blocker. Landlock should not be adding its own functions in > core code, it should be using the LSM API (and extending that as needed). OK, I'll use that in the next series. > >> Anyway, we also need to have a call to landlock_release_inodes() in >> generic_shutdown_super(), which does not fit the LSM framework, and I >> think it is not an issue. Landlock handling of inodes is quite similar >> to fsnotify. > > fsnotify is not an LSM. Yes, so I'll need to add a new LSM hook for this (release) call, right?