[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-248fbcd5aee00f6519a12c5ed3bc3dc0f5e84de5@git.kernel.org>
Date: Sun, 9 Aug 2015 03:23:40 -0700
From: tip-bot for Matt Fleming <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mjg59@...f.ucam.org, tglx@...utronix.de, mingo@...nel.org,
hpa@...or.com, linux-kernel@...r.kernel.org, josh@...htriplett.org,
tom.ty89@...il.com, torvalds@...ux-foundation.org,
matt.fleming@...el.com, peterz@...radead.org
Subject: [tip:core/efi] x86/efi-bgrt: Switch pr_err() to pr_debug()
for invalid BGRT
Commit-ID: 248fbcd5aee00f6519a12c5ed3bc3dc0f5e84de5
Gitweb: http://git.kernel.org/tip/248fbcd5aee00f6519a12c5ed3bc3dc0f5e84de5
Author: Matt Fleming <matt.fleming@...el.com>
AuthorDate: Fri, 7 Aug 2015 09:36:55 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sat, 8 Aug 2015 10:37:39 +0200
x86/efi-bgrt: Switch pr_err() to pr_debug() for invalid BGRT
It's totally legitimate, per the ACPI spec, for the firmware to
set the BGRT 'status' field to zero to indicate that the BGRT
image isn't being displayed, and we shouldn't be printing an
error message in that case because it's just noise for users. So
swap pr_err() for pr_debug().
However, Josh points that out it still makes sense to test the
validity of the upper 7 bits of the 'status' field, since
they're marked as "reserved" in the spec and must be zero. If
firmware violates this it really *is* an error.
Reported-by: Tom Yan <tom.ty89@...il.com>
Tested-by: Tom Yan <tom.ty89@...il.com>
Signed-off-by: Matt Fleming <matt.fleming@...el.com>
Reviewed-by: Josh Triplett <josh@...htriplett.org>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Matthew Garrett <mjg59@...f.ucam.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1438936621-5215-2-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/platform/efi/efi-bgrt.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c
index d7f997f..ea48449 100644
--- a/arch/x86/platform/efi/efi-bgrt.c
+++ b/arch/x86/platform/efi/efi-bgrt.c
@@ -50,11 +50,16 @@ void __init efi_bgrt_init(void)
bgrt_tab->version);
return;
}
- if (bgrt_tab->status != 1) {
- pr_err("Ignoring BGRT: invalid status %u (expected 1)\n",
+ if (bgrt_tab->status & 0xfe) {
+ pr_err("Ignoring BGRT: reserved status bits are non-zero %u\n",
bgrt_tab->status);
return;
}
+ if (bgrt_tab->status != 1) {
+ pr_debug("Ignoring BGRT: invalid status %u (expected 1)\n",
+ bgrt_tab->status);
+ return;
+ }
if (bgrt_tab->image_type != 0) {
pr_err("Ignoring BGRT: invalid image type %u (expected 0)\n",
bgrt_tab->image_type);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists