Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1555348ybk; Thu, 14 May 2020 11:51:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxz2Rj59zn0Zmd3jMbWN7f9pSywMIoNVHwm7ojth8ozE+Zny9BUR26eaybku45HMlgwEBcm X-Received: by 2002:a17:906:5004:: with SMTP id s4mr5374538ejj.13.1589482274869; Thu, 14 May 2020 11:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589482274; cv=none; d=google.com; s=arc-20160816; b=Jj/LP9L1gyr5XqnbIfO3sgTqESO3gqP530/U2Edusyyma7B1kG2c5ubqOfmvWtCX59 i+5EhRfjduCR9hibe+r/YzZK4Ct8ikoPTQzL4qTtqSuK1EaPlLRYAwxvNAQtj2AcdIOV WdIQccjwDplcjKI+gcGIhPK/nJqI9j50Pq08rl5Njts4txsaVunFHkKoR76xV2N0ruiq +z+/haT0+z6ZbVOwYgcDZSHNyIal4cGFYkjd4Rh08GxnVUyNU6zl9oQorLHe7TyL+Hd3 tf2lwQYAQHhCsYr6wGss8avH/y0gn9EPO6qP6mpEyhULsF0IIYLQ6muJcDdszJDlfGGF UseA== 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=zsKYKNKvtDzY7qIsLkgHEhIg8GfUr75JSG0S9IQ0H3Y=; b=sr+Om8MpZH5K5lnlXffHUJzylKJ8xI9Ye85d+p2eHrVVbQg1kD5AP8eXcgWLeYcYoi ePYhiGibSF6Hbp0CjZd4G5i9RoH6c6hbJXhyJIVDTBPD+RsyyKPRRLVaXAjcJ3xcR46F 75BwnVb5+XKWWKBAt7/An/KkXYwdKoKdixn3TiTBqs8LWNcslcmPxU5/QSTO9HrIzcRy 1FMb9iZFzOJskBnnJjipSXdJjlOHU9aVPUf6cOUc3cOwGLtrexrkpDho7uxAY0/kd9rc 44BpiHL28AeHNDIlQfKSYBJYctLUdum4XAWBrsjeDEizur0gg+lLkTgR6s27NUCQ67NA KUmg== 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 g17si2352092ejo.179.2020.05.14.11.50.51; Thu, 14 May 2020 11:51:14 -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 S1727777AbgENSqp (ORCPT + 99 others); Thu, 14 May 2020 14:46:45 -0400 Received: from smtp-42ac.mail.infomaniak.ch ([84.16.66.172]:46207 "EHLO smtp-42ac.mail.infomaniak.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbgENSqp (ORCPT ); Thu, 14 May 2020 14:46:45 -0400 Received: from smtp-2-0001.mail.infomaniak.ch (unknown [10.5.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 49NL912MZTzlhTr0; Thu, 14 May 2020 20:46:13 +0200 (CEST) Received: from ns3096276.ip-94-23-54.eu (unknown [94.23.54.103]) by smtp-2-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 49NL8x2tM0zljT02; Thu, 14 May 2020 20:46:09 +0200 (CEST) Subject: Re: [PATCH v17 05/10] fs,landlock: Support filesystem access-control To: Casey Schaufler , James Morris Cc: 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: <2d781760-341e-2f7a-9586-558fcf41a097@digikod.net> Date: Thu, 14 May 2020 20:46:08 +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 17:58, Casey Schaufler wrote: > On 5/14/2020 3:39 AM, Mickaël Salaün wrote: >> On 14/05/2020 05:37, James Morris wrote: >>> On Mon, 11 May 2020, Mickaël Salaün wrote: >>> >>> >>>> diff --git a/include/linux/fs.h b/include/linux/fs.h >>>> index 45cc10cdf6dd..2276642f8e05 100644 >>>> --- a/include/linux/fs.h >>>> +++ b/include/linux/fs.h >>>> @@ -1517,6 +1517,11 @@ struct super_block { >>>> /* Pending fsnotify inode refs */ >>>> atomic_long_t s_fsnotify_inode_refs; >>>> >>>> +#ifdef CONFIG_SECURITY_LANDLOCK >>>> + /* References to Landlock underlying objects */ >>>> + atomic_long_t s_landlock_inode_refs; >>>> +#endif >>>> + >>> 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? > > As no currently stackable modules conflict over the superblock > (SELinux and Smack are the existing users) there has been no need > to move its management into the infrastructure. The active push for > stacking does not (yet) include everything needed for SELinux+Smack. > It includes what is needed for SELinux+AppArmor and Smack+AppArmor. > That does not include the superblock blob. > > You can include a patch in the landlock set that provides infrastructure > management of the superblock blob. Feel free to glean it from my proposal. OK, I'll add it to the next series.