From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH] x86: Lock down MSR writing in secure boot Date: Fri, 08 Feb 2013 17:22:20 -0800 Message-ID: <5115A4CC.3080102@zytor.com> References: <20130208191213.GA25081@www.outflux.net> <00780235-deac-4f80-b936-867834e05661@email.android.com> <5115553A.5000708@zytor.com> <1360355671.18083.18.camel@x230.lan> <51157C9C.6030501@zytor.com> <20130208230655.GB28990@pd.tnic> <1360366012.18083.21.camel@x230.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1360366012.18083.21.camel-+5W/JHIUVxg@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matthew Garrett Cc: Borislav Petkov , Kees Cook , LKML , Thomas Gleixner , Ingo Molnar , "x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , linux-security-module List-Id: linux-efi@vger.kernel.org On 02/08/2013 03:26 PM, Matthew Garrett wrote: > On Sat, 2013-02-09 at 00:06 +0100, Borislav Petkov wrote: >> On Fri, Feb 08, 2013 at 02:30:52PM -0800, H. Peter Anvin wrote: >>> Also, keep in mind that there is a very simple way to deny MSR access >>> completely, which is to not include the driver in your kernel (and not >>> allow module loading, but if you can load modules you can just load a >>> module to muck with whatever MSR you want.) >> >> I was contemplating that too. What is the use case of having >> msr.ko in a secure boot environment? Isn't that an all-no-tools, >> you-can't-do-sh*t-except-what-you're-explicitly-allowed-to environment which >> simply doesn't need to write MSRs in the first place? > > Well, sure, distributions could build every kernel twice. That seems a > little excessive, though. > You don't have to build the kernel twice to exclude a loadable module. -hpa