From mboxrd@z Thu Jan 1 00:00:00 1970 From: dhowells@redhat.com (David Howells) Date: Fri, 25 Nov 2016 12:35:03 +0000 Subject: [PATCH 5/7] efi: Get the secure boot status [ver #3] In-Reply-To: References: <147990561294.7576.6464430479448167484.stgit@warthog.procyon.org.uk> <147990565051.7576.9673287945782426886.stgit@warthog.procyon.org.uk> <1480016487.2444.18.camel@HansenPartnership.com> <15173.1480066220@warthog.procyon.org.uk> <16661.1480075392@warthog.procyon.org.uk> Message-ID: <17565.1480077303@warthog.procyon.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Ard Biesheuvel wrote: > Yes. In pre-2.6, DeployedMode is not a reserved name, and so it may be > possible for someone to slip in a DeployedMode=0 on a secure boot > enabled system to trick the kernel into thinking lockdown should be > disabled. How does one get the version number? Unfortunately, searching the document for 'version' doesn't help as every page has that in the footer:-/ > > + if (val == 1) > > + return 0; > > I think the logic is the wrong way around here. Secure Boot is enabled > if SecureBoot=1 and SetupMode=0, unless DeployedMode=0. So you should > return 0 here if val == 0, but only when running on 2.6 or later. Good point. David