From patchwork Sat May 13 11:51:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9725215 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 810FA60381 for ; Sat, 13 May 2017 11:56:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E58A288DD for ; Sat, 13 May 2017 11:56:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62CB6288E2; Sat, 13 May 2017 11:56:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAF4A288DD for ; Sat, 13 May 2017 11:56:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754134AbdEMLzU (ORCPT ); Sat, 13 May 2017 07:55:20 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35457 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753564AbdEMLwF (ORCPT ); Sat, 13 May 2017 07:52:05 -0400 Received: by mail-pf0-f176.google.com with SMTP id n23so36786890pfb.2 for ; Sat, 13 May 2017 04:52:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sIknlHIlWfLS8yDuwV+aXizJa1pVSdx9POw0xVvllVk=; b=GHheNX505Pe2pPlfJzJ5zChK6sRPn5qsa0jT42JYrCp8Qqt1UILCZPENsugFTNY3hg avCltNsEjsGRQTuDPyczrZOkwJNdLiXfWJupGiXddJFrMjiuh9UO/B65pNGwD/nrKAIZ rrQ/4IC2qu96XuDP0qoQA4Qw/z04UKLB7y+tE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sIknlHIlWfLS8yDuwV+aXizJa1pVSdx9POw0xVvllVk=; b=G5vVLXKoPx82iKEBkWmGfJwDjPBKPf95RWl+QFAD8M6yjVkfUeRaqIowvYU0Z7h5FK +eCdzIMhBUg5L36GjhsHl2NpMI8C1W9uhcBCINVquI26x0+AY25U9NdbXZr6DMTqYqll VDU2hVnmrZhmFZ67kidKid3zKM9MzIc5gTNqpEsVkdV30tsaGWmi8p3qQ6zzIaVoqHNu GBca0h/fa8rrgOxoBdLZiMz/e9e13BU67VrJ0LsrpZYVkrfkUfjAzrDIn0LOIdTNk/ij rT1GaopAZJfun7AUDVahx+4Ypd36TjajS4B29sRg6plqrPg1dLns7fOOidLmdtcmHY3J tW/Q== X-Gm-Message-State: AODbwcCWMtm1WTROIpLVkpRX/5zVcs1xhzm9p0eL0Gf4C2m3CRCvK0RW /+hPJIwVwL8Pq3kQ X-Received: by 10.98.198.4 with SMTP id m4mr9406994pfg.160.1494676324786; Sat, 13 May 2017 04:52:04 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id a87sm2529168pfj.50.2017.05.13.04.52.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 04:52:02 -0700 (PDT) From: Kees Cook To: Jonathan Corbet Cc: Kees Cook , James Morris , John Johansen , Tetsuo Handa , Paul Moore , David Howells , Mimi Zohar , Casey Schaufler , Tyler Hicks , David Safford , linux-doc@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/17] doc: ReSTify and split LSM.txt Date: Sat, 13 May 2017 04:51:43 -0700 Message-Id: <1494676313-144890-8-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494676313-144890-1-git-send-email-keescook@chromium.org> References: <1494676313-144890-1-git-send-email-keescook@chromium.org> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The existing LSM.txt file covered both usage and development, so split this into two files, one under admin-guide and one under kernel development. Cc: James Morris Signed-off-by: Kees Cook --- .../LSM.txt => admin-guide/LSM/index.rst} | 22 ++++++---------------- Documentation/admin-guide/index.rst | 1 + Documentation/security/00-INDEX | 2 -- Documentation/security/LSM.rst | 14 ++++++++++++++ Documentation/security/index.rst | 1 + 5 files changed, 22 insertions(+), 18 deletions(-) rename Documentation/{security/LSM.txt => admin-guide/LSM/index.rst} (62%) create mode 100644 Documentation/security/LSM.rst diff --git a/Documentation/security/LSM.txt b/Documentation/admin-guide/LSM/index.rst similarity index 62% rename from Documentation/security/LSM.txt rename to Documentation/admin-guide/LSM/index.rst index c2683f28ed36..7e892b9b58aa 100644 --- a/Documentation/security/LSM.txt +++ b/Documentation/admin-guide/LSM/index.rst @@ -1,12 +1,13 @@ -Linux Security Module framework -------------------------------- +=========================== +Linux Security Module Usage +=========================== The Linux Security Module (LSM) framework provides a mechanism for various security checks to be hooked by new kernel extensions. The name "module" is a bit of a misnomer since these extensions are not actually loadable kernel modules. Instead, they are selectable at build-time via CONFIG_DEFAULT_SECURITY and can be overridden at boot-time via the -"security=..." kernel command line argument, in the case where multiple +``"security=..."`` kernel command line argument, in the case where multiple LSMs were built into a given kernel. The primary users of the LSM interface are Mandatory Access Control @@ -19,23 +20,12 @@ in the core functionality of Linux itself. Without a specific LSM built into the kernel, the default LSM will be the Linux capabilities system. Most LSMs choose to extend the capabilities system, building their checks on top of the defined capability hooks. -For more details on capabilities, see capabilities(7) in the Linux +For more details on capabilities, see ``capabilities(7)`` in the Linux man-pages project. A list of the active security modules can be found by reading -/sys/kernel/security/lsm. This is a comma separated list, and +``/sys/kernel/security/lsm``. This is a comma separated list, and will always include the capability module. The list reflects the order in which checks are made. The capability module will always be first, followed by any "minor" modules (e.g. Yama) and then the one "major" module (e.g. SELinux) if there is one configured. - -Based on https://lkml.org/lkml/2007/10/26/215, -a new LSM is accepted into the kernel when its intent (a description of -what it tries to protect against and in what cases one would expect to -use it) has been appropriately documented in Documentation/security/. -This allows an LSM's code to be easily compared to its goals, and so -that end users and distros can make a more informed decision about which -LSMs suit their requirements. - -For extensive documentation on the available LSM hook interfaces, please -see include/linux/security.h. diff --git a/Documentation/admin-guide/index.rst b/Documentation/admin-guide/index.rst index 8c60a8a32a1a..e14c374aaf60 100644 --- a/Documentation/admin-guide/index.rst +++ b/Documentation/admin-guide/index.rst @@ -61,6 +61,7 @@ configure specific aspects of kernel behavior to your liking. java ras pm/index + LSM/index .. only:: subproject and html diff --git a/Documentation/security/00-INDEX b/Documentation/security/00-INDEX index c4df62a9ae5b..190a023a7e72 100644 --- a/Documentation/security/00-INDEX +++ b/Documentation/security/00-INDEX @@ -1,7 +1,5 @@ 00-INDEX - this file. -LSM.txt - - description of the Linux Security Module framework. SELinux.txt - how to get started with the SELinux security enhancement. Smack.txt diff --git a/Documentation/security/LSM.rst b/Documentation/security/LSM.rst new file mode 100644 index 000000000000..d75778b0fa10 --- /dev/null +++ b/Documentation/security/LSM.rst @@ -0,0 +1,14 @@ +================================= +Linux Security Module Development +================================= + +Based on https://lkml.org/lkml/2007/10/26/215, +a new LSM is accepted into the kernel when its intent (a description of +what it tries to protect against and in what cases one would expect to +use it) has been appropriately documented in ``Documentation/security/LSM``. +This allows an LSM's code to be easily compared to its goals, and so +that end users and distros can make a more informed decision about which +LSMs suit their requirements. + +For extensive documentation on the available LSM hook interfaces, please +see ``include/linux/lsm_hooks.h``. diff --git a/Documentation/security/index.rst b/Documentation/security/index.rst index 4212d7ac58b6..94ba1cfc01c5 100644 --- a/Documentation/security/index.rst +++ b/Documentation/security/index.rst @@ -7,5 +7,6 @@ Security Documentation credentials IMA-templates + LSM self-protection tpm/index