From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mimi Zohar Subject: Re: [PATCH 3/3] x86/ima: retry detecting secure boot mode Date: Mon, 11 Mar 2019 12:54:52 -0400 Message-ID: <1552323292.6100.45.camel@linux.ibm.com> References: <1542657371-7019-1-git-send-email-zohar@linux.ibm.com> <1542657371-7019-4-git-send-email-zohar@linux.ibm.com> <1551998897.31706.461.camel@linux.ibm.com> <1552052377.4134.23.camel@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Matthew Garrett Cc: Justin Forbes , linux-integrity , LSM List , linux-efi , Linux Kernel Mailing List , David Howells , Seth Forshee , kexec@lists.infradead.org, Nayna Jain List-Id: linux-efi@vger.kernel.org On Fri, 2019-03-08 at 09:51 -0800, Matthew Garrett wrote: > On Fri, Mar 8, 2019 at 5:40 AM Mimi Zohar wrote: > > > > On Thu, 2019-03-07 at 14:50 -0800, Matthew Garrett wrote: > > > Is the issue that it gives incorrect results on the first read, or is > > > the issue that it gives incorrect results before ExitBootServices() is > > > called? If the former then we should read twice in the boot stub, if > > > the latter then we should figure out a way to do this immediately > > > after ExitBootServices() instead. > > > > Detecting the secure boot mode isn't the problem. On boot, I am > > seeing "EFI stub: UEFI Secure Boot is enabled", but setup_arch() emits > > "Secure boot could not be determined". > > > > In efi_main() the secure_boot mode is initially unset, so > > efi_get_secureboot() is called. efi_get_secureboot() returns the > > secure_boot mode correctly as enabled. The problem seems to be in > > saving the secure_boot mode for later use. > > Hm. And this only happens on certain firmware versions? If something's > stepping on boot_params then we have bigger problems. I was seeing this problem before and after updating the system firmware on my laptop last summer.  If updating the firmware had resolved the problem, I wouldn't have included this patch. Mimi