Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932327AbdDFV4S (ORCPT ); Thu, 6 Apr 2017 17:56:18 -0400 Received: from namei.org ([65.99.196.166]:52537 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753975AbdDFV4J (ORCPT ); Thu, 6 Apr 2017 17:56:09 -0400 Date: Fri, 7 Apr 2017 07:55:54 +1000 (AEST) From: James Morris To: David Howells cc: linux-kernel@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk, linux-efi@vger.kernel.org, matthew.garrett@nebula.com, gregkh@linuxfoundation.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org Subject: Re: [PATCH 02/24] Add the ability to lock down access to the running kernel image In-Reply-To: <32240.1491475400@warthog.procyon.org.uk> Message-ID: References: <149141219387.31282.6648284836568938717.stgit@warthog.procyon.org.uk> <149141221365.31282.16276273075946694481.stgit@warthog.procyon.org.uk> <32240.1491475400@warthog.procyon.org.uk> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 489 Lines: 23 On Thu, 6 Apr 2017, David Howells wrote: > James Morris wrote: > > > > +static __read_mostly bool kernel_locked_down; > > > > How about marking this __ro_after_init if ALLOW_LOCKDOWN_LIFT is not > > configured? > > I guess lock_kernel_down() would need to be __init also in that case. Ideally, yes. > > Also, the implementation of lift_kernel_lockdown() should be conditional on > CONFIG_ALLOW_LOCKDOWN_LIFT. > > David > -- James Morris