From: Josh Triplett <josh@joshtriplett.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: [PATCH] efi: Work around bogus pointers in BGRT
Date: Sat, 25 May 2013 12:50:37 -0700 [thread overview]
Message-ID: <20130525195037.GA30094@leaf> (raw)
In-Reply-To: <CALCETrVz0W--YybyLatG1MW=pkdGa2PdR0d2hrfXUSXT0=K4fw@mail.gmail.com>
On Fri, May 24, 2013 at 06:15:16PM -0700, Andy Lutomirski wrote:
> On Thu, May 23, 2013 at 10:37 PM, Josh Triplett <josh@joshtriplett.org> wrote:
> > On Fri, May 17, 2013 at 02:05:33PM -0700, Andy Lutomirski wrote:
> >> The MSI MS-7760 supplies a BGRT marked "invalid" that contains a
> >> pointer to nowhere. Since an "invalid" BGRT isn't particularly
> >> useful (userspace isn't supposed to use it anyway), ignore the BGRT
> >> if it's marked "invalid" and the pointer points outside of EFI boot
> >> services space.
> >>
> >> Signed-off-by: Andy Lutomirski <luto@amacapital.net>
> >
> > I'd suggest generalizing the comment to not just mention the one system
> > you observed it on. In any case, I'm fine with this patch, but I seem
> > to recall Matthew Garrett having some objections to ignoring the BGRT
> > when the valid bit is not set. Also, if you're going to do so, you
> > might as well not expose the valid bit to userspace.
>
> Hmm.
>
> Not exposing the valid bit to userspace would be a bit odd -- it's
> part of a bitfield which (in principle, I think) could have other bits
> defined.
>
> One option would be to still load the bgrt table if invalid but to not
> try to load the image and to therefore not show that sysfs attribute.
> I don't know what this would break because I don't know what userspace
> programs actually use bgrt.
That sounds sensible to me: there's a BGRT, so load it and expose it,
but with "valid" not set, don't attempt to look at the image.
- Josh Triplett
prev parent reply other threads:[~2013-05-25 19:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-17 19:36 BGRT wild pointer Andy Lutomirski
2013-05-17 21:05 ` [PATCH] efi: Work around bogus pointers in BGRT Andy Lutomirski
2013-05-24 5:37 ` Josh Triplett
2013-05-25 1:15 ` Andy Lutomirski
2013-05-25 19:50 ` Josh Triplett [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=20130525195037.GA30094@leaf \
--to=josh@joshtriplett.org \
--cc=linux-acpi@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mjg59@srcf.ucam.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.