Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934575AbdDFKnc (ORCPT ); Thu, 6 Apr 2017 06:43:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57412 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932442AbdDFKnY (ORCPT ); Thu, 6 Apr 2017 06:43:24 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BA7CB80F7C Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dhowells@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BA7CB80F7C Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <149141219387.31282.6648284836568938717.stgit@warthog.procyon.org.uk> <149141221365.31282.16276273075946694481.stgit@warthog.procyon.org.uk> To: James Morris Cc: dhowells@redhat.com, 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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32239.1491475400.1@warthog.procyon.org.uk> Date: Thu, 06 Apr 2017 11:43:20 +0100 Message-ID: <32240.1491475400@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 06 Apr 2017 10:43:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 364 Lines: 13 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. Also, the implementation of lift_kernel_lockdown() should be conditional on CONFIG_ALLOW_LOCKDOWN_LIFT. David