From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765204AbdEYSSa (ORCPT ); Thu, 25 May 2017 14:18:30 -0400 Received: from nm24-vm5.bullet.mail.ne1.yahoo.com ([98.138.91.246]:35475 "EHLO nm24-vm5.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762742AbdEYSS0 (ORCPT ); Thu, 25 May 2017 14:18:26 -0400 X-Yahoo-Newman-Id: 618830.86987.bm@smtp214.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: P0gzIecVM1mnCnDKuFOPnaypYDm0oQn3ojRx0MKUMAkzZkr Q1fbGCc9XWqTCgV5tl6ghE4tZZYBEERs6q57FDLVl5bTPuUYlDQ0nt9u8zQ9 pk8IvEX188hxmU5OS0yBPyLNk12Y4fejtajKWb9eatV6aZnl_NmS8w31FVfL .ut9H01HYIhFlcWgqUdM2WygWu0_oHf0.e4JGf2RPtK562HAoCJ2ekDd.rwE m08ZYtDbnYk058ioqLg0hPIy1Lj3nNIaLkreQP4wkajvJsQ89HnXYc2JVBro N_oi.tEmRXNijKtWDun_twkKdLi5arctr5smq2hXp2.t_ru9E33oT8afkeKZ Zrqs7FyqQ6YWL_b_qaGKqKBFak311pMFLI5nGVXAvGX462qdwsbFCP0.t8k7 H.a7cDHLWxtopIo1rtBcjfCjp34E91Cv3qPhK3vQ9TJ7uFNzB4frZcyyP2Rg SGt.HlMIFeO6qvdn98bIEqClI3s2zeYoeiWOKVF5l9dwwBMfoK7Qe.UGFrat cyQKEme3R8gm_nneJ17cUjC1KsQm5GEuXOGDrQy6zwQj060IBjc7OPGO4dtI 8nM83h2DL2MiiM_uUWg2fYDT9SA-- X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Subject: Re: [PATCH 3/5] Add the ability to lock down access to the running kernel image To: David Howells Cc: ard.biesheuvel@linaro.org, matthew.garrett@nebula.com, linux-security-module@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org References: <80bdc6c9-004b-800f-ffd0-4b5ebf8cdeba@schaufler-ca.com> <149563711758.9419.11406612723056598045.stgit@warthog.procyon.org.uk> <149563714531.9419.16811189348445249219.stgit@warthog.procyon.org.uk> <19783.1495695202@warthog.procyon.org.uk> From: Casey Schaufler Message-ID: Date: Thu, 25 May 2017 11:18:22 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <19783.1495695202@warthog.procyon.org.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/24/2017 11:53 PM, David Howells wrote: > Casey Schaufler wrote: > >>> +#ifdef CONFIG_LOCK_DOWN_KERNEL >>> +extern bool kernel_is_locked_down(void); >>> +#else >>> +static inline bool kernel_is_locked_down(void) >> Should this be a bool or an int? I can imagine that someone is going to want >> various different degrees of lock down for kernels. As an int you could >> return a bitmap indicating which features were locked. This would allow >> additional things to be locked down without changing the interface. > At the moment it makes no difference, since the return value is only ever > passed directly to an if-statement. > > Also, do you have an idea as to how is should be divided up? You called out five distinct features in 0/5, so how about a bit for each of those? Actually, I don't care which way you go. The current code works for me. I am just concerned that the granularity fiends might come around later. > > There aren't so many cases, at least not yet, that they can't be fixed up, > perhaps with a coccinelle script. > > David > -- > To unsubscribe from this list: send the line "unsubscribe linux-security-module" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >