linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Fleming <matt@codeblueprint.co.uk>
To: josh@joshtriplett.org
Cc: Borislav Petkov <bp@alien8.de>, Tom Yan <tom.ty89@gmail.com>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	linux-efi@vger.kernel.org, linux-acpi@vger.kernel.org,
	Matt Fleming <matt.fleming@intel.com>
Subject: Re: [PATCH] x86/efi-bgrt: Switch pr_err() to pr_debug() for invalid BGRT
Date: Tue, 30 Jun 2015 10:31:59 +0100	[thread overview]
Message-ID: <20150630093159.GH28334@codeblueprint.co.uk> (raw)
In-Reply-To: <20150629163553.GB1348@cloud>

On Mon, 29 Jun, at 09:35:53AM, Josh Triplett wrote:
> On Mon, Jun 29, 2015 at 05:44:58PM +0200, Borislav Petkov wrote:
> > On Mon, Jun 29, 2015 at 03:49:40PM +0100, Matt Fleming wrote:
> > > It still makes sense to have the error message because the kernel
> > > literally does not know what the firmware is trying to achieve by
> > > setting those bits.
> > > 
> > > But I agree with Josh that for the specific case of "reserved bits",
> > > FW_BUG is wrong, because if in some future version of the spec those
> > > bits get used, seeing,
> > > 
> > >   "[Firmware Bug]: Ignoring BGRT: reserved bits are non-zero 0x3"
> > 
> > I still don't see what that message brings if some kernel complains that
> > some bits are !0 then. Are they valid bits which the kernel doesn't know
> > about or are they erroneously set and reserved. This, IMHO, is confusing
> > because the error message is not correct in all cases.
> > 
> > Thus my suggestion to either check the spec version before looking at
> > the bits or find out in some other way which bits are defined and which
> > are reserved and warn only about the reserved ones which are 1b.
> 
> The version is already checked *before* the status bits: if the version
> is not 1, the kernel stops there and ignores the BGRT, before printing a
> message about status.

If we're performing version[1] checks then I think it's fair game to use
FW_BUG, since these bits are reserved for that version.

[1] Note the version of the BGRT table is checked, not the ACPI spec
version, and it's not clear which would get a bump if new bits were
defined for the 'status' field. Historically, new bits have been added
to the EFI memory map without bumping the expected "memory descriptor"
version - a spec version update was considered to be sufficient (see
EFI_MEMORY_RO).

-- 
Matt Fleming, Intel Open Source Technology Center

  reply	other threads:[~2015-06-30  9:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29 12:06 [PATCH] x86/efi-bgrt: Switch pr_err() to pr_debug() for invalid BGRT Matt Fleming
     [not found] ` <1435579602-6612-1-git-send-email-matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-06-29 13:13   ` Borislav Petkov
     [not found]     ` <20150629131305.GB13113-fF5Pk5pvG8Y@public.gmane.org>
2015-06-29 14:00       ` Josh Triplett
2015-06-29 14:17         ` Borislav Petkov
     [not found]           ` <20150629141724.GG12383-fF5Pk5pvG8Y@public.gmane.org>
2015-06-29 14:45             ` josh-iaAMLnmF4UmaiuxdJuQwMA
2015-06-29 14:49           ` Matt Fleming
     [not found]             ` <20150629144940.GF28334-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-06-29 14:53               ` josh-iaAMLnmF4UmaiuxdJuQwMA
2015-06-29 15:44               ` Borislav Petkov
2015-06-29 16:35                 ` josh
2015-06-30  9:31                   ` Matt Fleming [this message]
2015-06-29 14:02   ` Josh Triplett
2015-06-29 21:52   ` Tom Yan
2015-06-30 10:00     ` Matt Fleming

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=20150630093159.GH28334@codeblueprint.co.uk \
    --to=matt@codeblueprint.co.uk \
    --cc=bp@alien8.de \
    --cc=josh@joshtriplett.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=tom.ty89@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).