From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503AbdFFJey convert rfc822-to-8bit (ORCPT ); Tue, 6 Jun 2017 05:34:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48930 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751383AbdFFJex (ORCPT ); Tue, 6 Jun 2017 05:34:53 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E043985545 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dhowells@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E043985545 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: <149563711758.9419.11406612723056598045.stgit@warthog.procyon.org.uk> <21606.1496222635@warthog.procyon.org.uk> To: Ard Biesheuvel Cc: dhowells@redhat.com, Matthew Garrett , linux-security-module , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 0/5] security, efi: Set lockdown if in secure boot mode MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25008.1496741691.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 06 Jun 2017 10:34:51 +0100 Message-ID: <25009.1496741691@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 06 Jun 2017 09:34:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ard Biesheuvel wrote: > and print a subsequent line for every lockdown feature that is enabled, e.g., > > lockdown: disabling MSRs > lockdown: disabling hibernate support There's another problem with this idea: the lockdown facility is passive - it doesn't go looking for things to lock down; rather, things that can be locked down inquire as to whether lockdown is in effect at the point someone tries to use them. Now, I could reserve a variable for each thing we lock down to make sure that we don't emit the message more than once, but I'm loathe to waste memory this way. I can't so easily switch the facility to being active either, since a lot of the lockdownables are in modules. David