From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [GIT PULL] Kernel lockdown for secure boot Date: Sun, 8 Apr 2018 10:23:06 +0200 Message-ID: <20180408082306.GB4965@amd> References: <9758.1522775763@warthog.procyon.org.uk> <13189.1522784944@warthog.procyon.org.uk> <9349.1522794769@warthog.procyon.org.uk> <10718.1522798745@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K8nIJk4ghYZn606h" Return-path: Content-Disposition: inline In-Reply-To: <10718.1522798745@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org To: David Howells Cc: Linus Torvalds , Andy Lutomirski , Matthew Garrett , Ard Biesheuvel , James Morris , Alan Cox , Greg Kroah-Hartman , Linux Kernel Mailing List , Justin Forbes , linux-man , joeyli , LSM List , Linux API , Kees Cook , linux-efi List-Id: linux-man@vger.kernel.org --K8nIJk4ghYZn606h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed 2018-04-04 00:39:05, David Howells wrote: > Linus Torvalds wrote: >=20 > > The same thing is true of some lockdown patch. Maybe it's a good thing > > in general. But whether it's a good thing is _entirely_ independent of > > any secure boot issue. I can see using secure boot without it, but I > > can very much also see using lockdown without secure boot. > >=20 > > The two things are simply entirely orthogonal. They have _zero_ > > overlap. I'm not seeing why they'd be linked at all in any way. >=20 > I'm not sure I agree. Here's my reasoning: >=20 > (1) Lockdown mode really needs to activated during kernel boot, before > userspace has a chance to run, otherwise there's a window of opportu= nity > in which the kernel *isn't* locked down. >=20 > (2) If the kernel isn't booted in secure boot mode, then there's the > opportunity to tamper before the kernel even starts booting. >=20 > (3) There doesn't seem any point in booting in secure boot mode if you d= on't > protect the running kernel image against tampering. What does it me= an to > be in "secure boot mode" in that case? If the kernel can be tampered > with, it would seem to be, by definition, insecure. This one is not true, either. If kernel does "printk(KERN_CRIT "loading unsigned module"); mdelay(10000);", it is useful for secure boot and provides way to owner to play. Nokia N9 / N950 uses this kind of "security" for example. It is rather annoying but better than not being able to run custom kernels at all. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --K8nIJk4ghYZn606h Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlrJ0WoACgkQMOfwapXb+vIUpgCfQTVxgQuJIcDh2bJZRy8WyNou NOMAmwboHWl217wYf3zGmTVqyXi9sm4P =judE -----END PGP SIGNATURE----- --K8nIJk4ghYZn606h--