mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Jones <pjones@redhat.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Robin Holt <holt@sgi.com>,
	hpa@sgi.com, Yinghai Lu <yinghai@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: Revert commit 5dcd14ecd4 - breaks EFI boot with SLES11 elilo.efi
Date: Wed, 6 Mar 2013 12:32:07 -0500	[thread overview]
Message-ID: <20130306173207.GB25932@fenchurch.internal.datastacks.com> (raw)
In-Reply-To: <51377973.3070005@zytor.com>

On Wed, Mar 06, 2013 at 09:14:27AM -0800, H. Peter Anvin wrote:
> On 03/06/2013 08:55 AM, Peter Jones wrote:
> > 
> > So, the problem here seems to be that there's never been widespread
> > compliance with this paragraph, but this patch assumes there has.  A
> > brief survey concludes:
> 
> No, this patch doesn't assume there is widespread compliance, it is
> trying to address the bits that are not complied with.

Right, but that's basically every x86_64 UEFI machine ever deployed.

[lots trimmed]
> > So it's certainly worth trying to find a better way to check this, but I
> > don't think this patch is it.  If we're going to enforce it, we have to
> > make sure that a bootloader that's conforming to what was de facto the
> > standard in 0x020b still works.  Otherwise we're just breaking
> > bootloaders for no reason, and that will end poorly.
> > 
> > I'd suggest we add a field for the bootloader to make a positive
> > declaration of what version it is using, and only check for the sentinel
> > if the field claims it's doing 0x020c or newer.
> 
> Except it doesn't quite work.  The problem is that these broken
> bootloaders aren't just a matter of 2.11 vs 2.12, they are implicitly
> assuming that the kernel image itself doesn't happen to contain anything
> harmful in the fields that they don't bother initializing.  This would
> be nice and good, except that the demands for the boot sector space is
> fairly high and it gets very cantankerous to turn that into a minefield.

If your only objection is real estate, we can find a way to be clever
about what we do that uses already existing space.  For instance, write
back the version number that's supported in the version field, but
byte-swapped, so we can tell it changed (we don't anticipate ever
supporting protocol 0x20b from a kernel that advertises 0xb02, right?)

Just one example - we don't have to do this the exact way I said; we
just need a positive assertion from the bootloader to start doing
enforcement.  Versions would be nice, but they're not strictly required.

> In fact, your suggestion is exactly equivalent to the sentinel, except
> you want it to be pre-initialized with 0x20b instead of 0xffff.

No, I want the bootloader to communicate that it understands the boot
protocol revision is 0x020c, so we can /safely/ enter a world where
we're forbidding booting from an older bootloader.

> As such, I don't really know anything better we can do other than:
> 
> 1. detect the *properly working* case of the structure properly
>    initialized

Which is easy, but it doesn't seem to be anything anybody has ever
shipped on UEFI machines.

> 2. doing legacy bootloader-specific clearing based on the bootloader ID
>    if the sentinel triggers -- if you can think of better heuristics
>    then that would be good;

This heuristic is "all UEFI bootloaders anybody uses".  You can list
them individually, but it's the same as reverting the patch, just with
more code.

> 3. try to get bootloaders switched from case #2 to case #1.

And I'm for that, but I think we should delay enforcement until they've
got a way to express that.

-- 
        Peter

      reply	other threads:[~2013-03-06 17:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 20:52 Robin Holt
2013-02-28 21:05 ` H. Peter Anvin
2013-02-28 21:09   ` Robin Holt
2013-02-28 21:12     ` H. Peter Anvin
2013-02-28 23:02       ` Yinghai Lu
2013-02-28 23:09         ` H. Peter Anvin
2013-03-05  8:15           ` Robin Holt
2013-03-05 15:22             ` H. Peter Anvin
2013-03-05 19:12               ` Yinghai Lu
2013-03-05 19:52                 ` Robin Holt
2013-03-05 20:14                   ` Yinghai Lu
2013-03-05 20:22                     ` Robin Holt
2013-03-06 16:53                 ` Josh Boyer
2013-03-06 17:26                   ` H. Peter Anvin
2013-03-06 17:36                     ` Josh Boyer
2013-03-06 17:37                       ` H. Peter Anvin
2013-03-06 20:40                         ` Josh Boyer
2013-03-06 20:43                           ` H. Peter Anvin
2013-03-07  4:53                       ` [tip:x86/urgent] x86: Don' t clear efi_info even if the sentinel hits tip-bot for Josh Boyer
2013-03-06 18:00                     ` [PATCH] Be explicit about what the x86 0x020c boot parameter version requires Peter Jones
2013-03-07  4:31                       ` H. Peter Anvin
2013-03-07  8:39                         ` Matt Fleming
2013-03-07  4:54                       ` [tip:x86/urgent] x86, doc: Be explicit about what the x86 struct boot_params requires tip-bot for Peter Jones
2013-03-06 16:55       ` Revert commit 5dcd14ecd4 - breaks EFI boot with SLES11 elilo.efi Peter Jones
2013-03-06 17:14         ` H. Peter Anvin
2013-03-06 17:32           ` Peter Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130306173207.GB25932@fenchurch.internal.datastacks.com \
    --to=pjones@redhat.com \
    --cc=holt@sgi.com \
    --cc=hpa@sgi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome