From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751007AbdE3XHK (ORCPT ); Tue, 30 May 2017 19:07:10 -0400 Received: from namei.org ([65.99.196.166]:53061 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbdE3XHJ (ORCPT ); Tue, 30 May 2017 19:07:09 -0400 Date: Wed, 31 May 2017 09:06:04 +1000 (AEST) From: James Morris To: Alan Cox cc: Tetsuo Handa , keescook@chromium.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, casey@schaufler-ca.com, hch@infradead.org, igor.stoppa@huawei.com, james.l.morris@oracle.com, paul@paul-moore.com, sds@tycho.nsa.gov Subject: Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head In-Reply-To: <20170530162550.19ba1811@alans-desktop> Message-ID: References: <1495883858-3336-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <201705281026.EHD04622.HJFOLQFMSOtFOV@I-love.SAKURA.ne.jp> <201705302329.IEB05735.FLJOFHSQVtOOFM@I-love.SAKURA.ne.jp> <20170530162550.19ba1811@alans-desktop> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1665246916-223913274-1496185566=:6920" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1665246916-223913274-1496185566=:6920 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Tue, 30 May 2017, Alan Cox wrote: > On Tue, 30 May 2017 23:29:10 +0900 > Tetsuo Handa wrote: > > > James Morris wrote: > > > On Sun, 28 May 2017, Tetsuo Handa wrote: > > > > > > > can afford enabling". And we know that we cannot merge all security modules > > > > into mainline. Thus, allowing LKM-based LSM modules is inevitable. > > > > > > Nope, it's not inevitable. The LSM API only caters to in-tree users. > > > > > > I'm not sure why you persist against this. > > > > Then, we are willing to accept LSM modules with users less than 10, aren't we? > > Why not if they are properly written and maintained. Historically we've > supported an entire architecture that had one machine ever built. We > supported a strange subclass of x86 machines for many years because James > Bottomley cared enough to do the work. We still support M68K, PA-RISC and > other stuff as well as plenty of hardware which probably has few users - > providing it doesn't cause maintenance problems. This is what we as a community came up with in 2008: "Essentially, any new security project—not limited to LSMs—should be accompanied by a clear and concise document outlining its requirements and expected uses. This is to allow both security and regular folk to perform review of the code in terms of how it meets the specified requirements, and to avoid getting bogged down in unresolvable discussions about the project’s security model." >>From https://blog.namei.org/2008/12/11/the-arjan-protocol/ (Not sure if the original document at Kernel Trap still exists, alas). So what we need is clear design documentation that the code can be reviewed against. There is nothing about the number of users. If the code is simply using the existing API and meets its design goals, it's pretty straightforward. If changes to the API or core kernel are also required, then more discussion and review will be needed. - James -- James Morris --1665246916-223913274-1496185566=:6920-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: jmorris@namei.org (James Morris) Date: Wed, 31 May 2017 09:06:04 +1000 (AEST) Subject: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head In-Reply-To: <20170530162550.19ba1811@alans-desktop> References: <1495883858-3336-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <201705281026.EHD04622.HJFOLQFMSOtFOV@I-love.SAKURA.ne.jp> <201705302329.IEB05735.FLJOFHSQVtOOFM@I-love.SAKURA.ne.jp> <20170530162550.19ba1811@alans-desktop> Message-ID: To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org On Tue, 30 May 2017, Alan Cox wrote: > On Tue, 30 May 2017 23:29:10 +0900 > Tetsuo Handa wrote: > > > James Morris wrote: > > > On Sun, 28 May 2017, Tetsuo Handa wrote: > > > > > > > can afford enabling". And we know that we cannot merge all security modules > > > > into mainline. Thus, allowing LKM-based LSM modules is inevitable. > > > > > > Nope, it's not inevitable. The LSM API only caters to in-tree users. > > > > > > I'm not sure why you persist against this. > > > > Then, we are willing to accept LSM modules with users less than 10, aren't we? > > Why not if they are properly written and maintained. Historically we've > supported an entire architecture that had one machine ever built. We > supported a strange subclass of x86 machines for many years because James > Bottomley cared enough to do the work. We still support M68K, PA-RISC and > other stuff as well as plenty of hardware which probably has few users - > providing it doesn't cause maintenance problems. This is what we as a community came up with in 2008: "Essentially, any new security project?not limited to LSMs?should be accompanied by a clear and concise document outlining its requirements and expected uses. This is to allow both security and regular folk to perform review of the code in terms of how it meets the specified requirements, and to avoid getting bogged down in unresolvable discussions about the project?s security model." >>From https://blog.namei.org/2008/12/11/the-arjan-protocol/ (Not sure if the original document at Kernel Trap still exists, alas). So what we need is clear design documentation that the code can be reviewed against. There is nothing about the number of users. If the code is simply using the existing API and meets its design goals, it's pretty straightforward. If changes to the API or core kernel are also required, then more discussion and review will be needed. - James -- James Morris From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 31 May 2017 09:06:04 +1000 (AEST) From: James Morris In-Reply-To: <20170530162550.19ba1811@alans-desktop> Message-ID: References: <1495883858-3336-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <201705281026.EHD04622.HJFOLQFMSOtFOV@I-love.SAKURA.ne.jp> <201705302329.IEB05735.FLJOFHSQVtOOFM@I-love.SAKURA.ne.jp> <20170530162550.19ba1811@alans-desktop> MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1665246916-223913274-1496185566=:6920" Subject: [kernel-hardening] Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head To: Alan Cox Cc: Tetsuo Handa , keescook@chromium.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, casey@schaufler-ca.com, hch@infradead.org, igor.stoppa@huawei.com, james.l.morris@oracle.com, paul@paul-moore.com, sds@tycho.nsa.gov List-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1665246916-223913274-1496185566=:6920 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Tue, 30 May 2017, Alan Cox wrote: > On Tue, 30 May 2017 23:29:10 +0900 > Tetsuo Handa wrote: > > > James Morris wrote: > > > On Sun, 28 May 2017, Tetsuo Handa wrote: > > > > > > > can afford enabling". And we know that we cannot merge all security modules > > > > into mainline. Thus, allowing LKM-based LSM modules is inevitable. > > > > > > Nope, it's not inevitable. The LSM API only caters to in-tree users. > > > > > > I'm not sure why you persist against this. > > > > Then, we are willing to accept LSM modules with users less than 10, aren't we? > > Why not if they are properly written and maintained. Historically we've > supported an entire architecture that had one machine ever built. We > supported a strange subclass of x86 machines for many years because James > Bottomley cared enough to do the work. We still support M68K, PA-RISC and > other stuff as well as plenty of hardware which probably has few users - > providing it doesn't cause maintenance problems. This is what we as a community came up with in 2008: "Essentially, any new security project—not limited to LSMs—should be accompanied by a clear and concise document outlining its requirements and expected uses. This is to allow both security and regular folk to perform review of the code in terms of how it meets the specified requirements, and to avoid getting bogged down in unresolvable discussions about the project’s security model." >>From https://blog.namei.org/2008/12/11/the-arjan-protocol/ (Not sure if the original document at Kernel Trap still exists, alas). So what we need is clear design documentation that the code can be reviewed against. There is nothing about the number of users. If the code is simply using the existing API and meets its design goals, it's pretty straightforward. If changes to the API or core kernel are also required, then more discussion and review will be needed. - James -- James Morris --1665246916-223913274-1496185566=:6920--