From: Takashi Iwai <tiwai@suse.de>
To: linux-efi@vger.kernel.org
Cc: Joey Lee <jlee@suse.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
linux-security-module@vger.kernel.org,
inux-kernel@vger.kernel.org
Subject: [PATCH] efi: Suppress spurious "Couldn't get size" error
Date: Mon, 17 Feb 2020 16:45:49 +0100 [thread overview]
Message-ID: <20200217154549.20895-1-tiwai@suse.de> (raw)
The current efi code emits the error message like
Couldn't get size: 0x800000000000000e
on various Dell and other machines. Although the whole problem is the
buggy firmware, showing this as an error level is rather annoying, as
the error message appears over the boot splash. Basically this is the
result of missing entry and we have no explicit way to fix it for such
a firmware problem, the error message may be suppressed.
This patch changes the error print condition and suppresses the error
message if status is EFI_NOT_FOUND. It's a partial patch from the
more comprehensive one Joey Lee submitted in the past.
Link: https://lore.kernel.org/linux-efi/20190322103350.27764-2-jlee@suse.com/
Cc: Joey Lee <jlee@suse.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
security/integrity/platform_certs/load_uefi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
index 111898aad56e..8501ea62cb3e 100644
--- a/security/integrity/platform_certs/load_uefi.c
+++ b/security/integrity/platform_certs/load_uefi.c
@@ -44,7 +44,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
status = efi.get_variable(name, guid, NULL, &lsize, &tmpdb);
if (status != EFI_BUFFER_TOO_SMALL) {
- pr_err("Couldn't get size: 0x%lx\n", status);
+ if (status != EFI_NOT_FOUND)
+ pr_err("Couldn't get size: 0x%lx\n", status);
return NULL;
}
--
2.16.4
next reply other threads:[~2020-02-17 15:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 15:45 Takashi Iwai [this message]
2020-02-17 16:06 ` [PATCH] efi: Suppress spurious "Couldn't get size" error Ard Biesheuvel
2020-02-17 16:10 ` Takashi Iwai
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=20200217154549.20895-1-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=ard.biesheuvel@linaro.org \
--cc=inux-kernel@vger.kernel.org \
--cc=jlee@suse.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-security-module@vger.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