From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751931AbdAaL6K (ORCPT ); Tue, 31 Jan 2017 06:58:10 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:36467 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751656AbdAaL5t (ORCPT ); Tue, 31 Jan 2017 06:57:49 -0500 Date: Tue, 31 Jan 2017 11:57:01 +0000 From: Matt Fleming To: David Howells Cc: Peter Jones , mjg59@srcf.ucam.org, ard.biesheuvel@linaro.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "H. Peter Anvin" , Michael Chang Subject: Re: What should the default lockdown mode be if the bootloader sentinel triggers sanitization? Message-ID: <20170131115701.GN31613@codeblueprint.co.uk> References: <20170123212642.GA2766@codeblueprint.co.uk> <20170116144954.GB27351@codeblueprint.co.uk> <20170111143304.GA29649@codeblueprint.co.uk> <148120020832.5854.5448601415491330495.stgit@warthog.procyon.org.uk> <148120024570.5854.10638278395097394138.stgit@warthog.procyon.org.uk> <7948.1484148443@warthog.procyon.org.uk> <794.1484581158@warthog.procyon.org.uk> <6306.1485209503@warthog.procyon.org.uk> <25118.1485778229@warthog.procyon.org.uk> <12081.1485784892@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12081.1485784892@warthog.procyon.org.uk> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 Jan, at 02:01:32PM, David Howells wrote: > Matt Fleming wrote: > > > > Matt argues, however, that boot_params->secure_boot should be propagated from > > > the bootloader and if the bootloader wants to set it, then we should skip the > > > check in efi_main() and go with the bootloader's opinion. This is something > > > we probably want to do with kexec() so that the lockdown state is propagated > > > there. > > > > Actually what I was arguing for was that if the boot loader wants to > > set it and bypass the EFI boot stub, e.g. by going via the legacy > > 64-bit entry point, startup_64, then we should allow that as well as > > setting the flag in the EFI boot stub. > > That brings up another question: Should the non-EFI entry points clear the > secure_boot mode flag and set a default? There are no non-EFI boot entry points. EFI worked before we added the EFI boot stub. The boot stub just provides new features (and allows us to bundle firmware/boot fixes workarounds with kernel updates). This is exactly why we should allow, or at least not actively prohibit, the boot loader to set ->secure_boot and jump to the old entry point if it wants to do that.