From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD455C433DF for ; Thu, 15 Oct 2020 12:32:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74E0922267 for ; Thu, 15 Oct 2020 12:32:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbgJOMcE (ORCPT ); Thu, 15 Oct 2020 08:32:04 -0400 Received: from smtp-8fae.mail.infomaniak.ch ([83.166.143.174]:42087 "EHLO smtp-8fae.mail.infomaniak.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726814AbgJOMcE (ORCPT ); Thu, 15 Oct 2020 08:32:04 -0400 X-Greylist: delayed 63590 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Oct 2020 08:32:04 EDT Received: from smtp-2-0000.mail.infomaniak.ch (unknown [10.5.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4CBpZB5fPXzlhTQt; Thu, 15 Oct 2020 14:32:02 +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 4CBpZ66ymBzlh8V2; Thu, 15 Oct 2020 14:31:58 +0200 (CEST) Subject: Re: [PATCH v21 12/12] landlock: Add user and kernel documentation To: James Morris , "Serge E . Hallyn" , Jonathan Corbet Cc: linux-kernel@vger.kernel.org, Al Viro , Richard Weinberger , Andy Lutomirski , Anton Ivanov , Arnd Bergmann , Casey Schaufler , Jann Horn , Jeff Dike , Kees Cook , Michael Kerrisk , 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, =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= References: <20201008153103.1155388-1-mic@digikod.net> <20201008153103.1155388-13-mic@digikod.net> From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= Message-ID: Date: Thu, 15 Oct 2020 14:31:58 +0200 User-Agent: MIME-Version: 1.0 In-Reply-To: <20201008153103.1155388-13-mic@digikod.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 08/10/2020 17:31, Mickaël Salaün wrote: > From: Mickaël Salaün > > This documentation can be built with the Sphinx framework. > > Cc: James Morris > Cc: Jann Horn > Cc: Kees Cook > Cc: Serge E. Hallyn > Signed-off-by: Mickaël Salaün > Reviewed-by: Vincent Dagonneau > --- > > Changes since v20: > * Update examples and documentation with the new syscalls. > > Changes since v19: > * Update examples and documentation with the new syscalls. > > Changes since v15: > * Add current limitations. > > Changes since v14: > * Fix spelling (contributed by Randy Dunlap). > * Extend documentation about inheritance and explain layer levels. > * Remove the use of now-removed access rights. > * Use GitHub links. > * Improve kernel documentation. > * Add section for tests. > * Update example. > > Changes since v13: > * Rewrote the documentation according to the major revamp. > > Previous changes: > https://lore.kernel.org/lkml/20191104172146.30797-8-mic@digikod.net/ > --- > Documentation/security/index.rst | 1 + > Documentation/security/landlock/index.rst | 18 ++ > Documentation/security/landlock/kernel.rst | 69 ++++++ > Documentation/security/landlock/user.rst | 242 +++++++++++++++++++++ > 4 files changed, 330 insertions(+) > create mode 100644 Documentation/security/landlock/index.rst > create mode 100644 Documentation/security/landlock/kernel.rst > create mode 100644 Documentation/security/landlock/user.rst > > diff --git a/Documentation/security/index.rst b/Documentation/security/index.rst > index 8129405eb2cc..e3f2bf4fef77 100644 > --- a/Documentation/security/index.rst > +++ b/Documentation/security/index.rst > @@ -16,3 +16,4 @@ Security Documentation > siphash > tpm/index > digsig > + landlock/index > diff --git a/Documentation/security/landlock/index.rst b/Documentation/security/landlock/index.rst > new file mode 100644 > index 000000000000..2520f8f33f5e > --- /dev/null > +++ b/Documentation/security/landlock/index.rst > @@ -0,0 +1,18 @@ > +========================================= > +Landlock LSM: unprivileged access control > +========================================= > + > +:Author: Mickaël Salaün > + > +The goal of Landlock is to enable to restrict ambient rights (e.g. global > +filesystem access) for a set of processes. Because Landlock is a stackable > +LSM, it makes possible to create safe security sandboxes as new security layers > +in addition to the existing system-wide access-controls. This kind of sandbox > +is expected to help mitigate the security impact of bugs or > +unexpected/malicious behaviors in user-space applications. Landlock empowers > +any process, including unprivileged ones, to securely restrict themselves. > + > +.. toctree:: > + > + user > + kernel > diff --git a/Documentation/security/landlock/kernel.rst b/Documentation/security/landlock/kernel.rst > new file mode 100644 > index 000000000000..27c0933a0b6e > --- /dev/null > +++ b/Documentation/security/landlock/kernel.rst > @@ -0,0 +1,69 @@ > +============================== > +Landlock: kernel documentation > +============================== Cf. https://landlock.io/linux-doc/landlock-v21/security/landlock/kernel.html I guess this is the good place for kernel API documentation. > diff --git a/Documentation/security/landlock/user.rst b/Documentation/security/landlock/user.rst > new file mode 100644 > index 000000000000..e6fbc75c1af1 > --- /dev/null > +++ b/Documentation/security/landlock/user.rst > @@ -0,0 +1,242 @@ > +================================= > +Landlock: userspace documentation > +================================= Cf. https://landlock.io/linux-doc/landlock-v21/security/landlock/user.html Shouldn't this go in Documentation/userspace-api/ instead? Documentation/security/lsm-development.rst says that LSM documentation should go to Documentation/admin-guide/LSM/ but this is not (like seccomp) an admin documentation. Should the Documentation/userspace-api/landlock.rst be linked from Documentation/admin-guide/LSM/index.rst too?