From: Yasuaki Ishimatsu <isimatu.yasuaki-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
To: "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Matthew Garrett
<matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org>,
"matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"jlee-IBi9RG/b67k@public.gmane.org"
<jlee-IBi9RG/b67k@public.gmane.org>,
"matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org"
<matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>,
"richard-/L3Ra7n9ekc@public.gmane.org"
<richard-/L3Ra7n9ekc@public.gmane.org>,
"cxie-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<cxie-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH] x86, efi: add efi_whitelist_table to use all efi variable storage
Date: Fri, 22 Nov 2013 15:29:34 +0900 [thread overview]
Message-ID: <528EF9CE.2070305@jp.fujitsu.com> (raw)
In-Reply-To: <528EF87D.4050300-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
By following works, my system very often fails set_variable() to set new
variable to efi variable storage and shows "efivars: set_variable() failed:
status=-28" message.
- commit 68d929862e29a8b52a7f2f2f86a0600423b093cd
efi: be more paranoid about available space when creating variables
- commit 31ff2f20d9003e74991d135f56e503fe776c127c
efi: Distinguish between "remaining space" and actually used space
- commit 8c58bf3eec3b8fc8162fe557e9361891c20758f2
x86,efi: Implement efi_no_storage_paranoia parameter
- commit f8b8404337de4e2466e2e1139ea68b1f8295974f
Modify UEFI anti-bricking code
When booting my system, remaining space of efi variable storage is about
5KB. So there is no room that sets a new variable to the storage. On my
system, trigger of gc is when EFI_OUT_OF_RESOURCES occurs on pre OS
environment with UEFI. So if EFI_OUT_OF_RESOURCES occurs by the 5Kbyte
threshold, nvram storage cannot be used until EFI_OUT_OF_RESOURCES occurs
on pre OS environment with UEFI.
This patch adds whitelist. If a server is in the whitelist,
efi_no_storage_paranoia is set to true. And the system can use all efi
variable storage.
Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
CC: Matthew Garrett <matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org>
CC: Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>
CC: Lee, Chun-Y <jlee-IBi9RG/b67k@public.gmane.org>
CC: Madper Xie <cxie-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
CC: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
arch/x86/platform/efi/efi.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index c7e22ab..f9fad62 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -42,6 +42,7 @@
#include <linux/io.h>
#include <linux/reboot.h>
#include <linux/bcd.h>
+#include <linux/dmi.h>
#include <asm/setup.h>
#include <asm/efi.h>
@@ -116,6 +117,24 @@ static int __init setup_storage_paranoia(char *arg)
}
early_param("efi_no_storage_paranoia", setup_storage_paranoia);
+static struct dmi_system_id efi_whitelist_table[] __initdata = {
+ {
+ /* FUJITSU PRIMEQUEST */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEQUEST"),
+ },
+ },
+ {}
+};
+
+static int __init init_efi_no_storage_paranoia(void)
+{
+ if (dmi_check_system(efi_whitelist_table))
+ efi_no_storage_paranoia = true;
+ return 0;
+}
+late_initcall(init_efi_no_storage_paranoia);
static efi_status_t virt_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
{
next prev parent reply other threads:[~2013-11-22 6:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 8:34 [PATCH] x86, efi: add no_bricked_efi whitelist Yasuaki Ishimatsu
[not found] ` <528C740A.6010407-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2013-11-20 8:54 ` Richard Weinberger
2013-11-21 9:25 ` Yasuaki Ishimatsu
2013-11-20 16:02 ` Matthew Garrett
2013-11-21 9:35 ` Yasuaki Ishimatsu
[not found] ` <528DD3E0.3050606-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2013-11-21 20:12 ` Matthew Garrett
2013-11-22 0:00 ` Yasuaki Ishimatsu
[not found] ` <528E9EB2.3060808-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2013-11-22 0:03 ` Matthew Garrett
2013-11-22 6:23 ` Yasuaki Ishimatsu
[not found] ` <528EF87D.4050300-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2013-11-22 6:29 ` Yasuaki Ishimatsu [this message]
2013-11-22 17:47 ` [PATCH] x86, efi: add efi_whitelist_table to use all efi variable storage Matthew Garrett
2013-12-03 3:20 ` Yasuaki Ishimatsu
[not found] ` <529D4DF5.80502-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2013-12-03 3:45 ` Matthew Garrett
[not found] ` <25e63f3b748741998d2b3e04bbc53064-jH1ztPcg5hENpgVgjDfI3Wu6+pknBqLbXA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2013-12-03 4:49 ` Yasuaki Ishimatsu
2013-12-03 5:04 ` Matthew Garrett
[not found] ` <20131203050450.GA30967-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2013-12-03 5:12 ` Yasuaki Ishimatsu
2013-11-22 17:48 ` [PATCH] x86, efi: add no_bricked_efi whitelist Matthew Garrett
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=528EF9CE.2070305@jp.fujitsu.com \
--to=isimatu.yasuaki-+cum20s59erqfuhtdcdx3a@public.gmane.org \
--cc=cxie-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jlee-IBi9RG/b67k@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org \
--cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org \
--cc=richard-/L3Ra7n9ekc@public.gmane.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;
as well as URLs for NNTP newsgroup(s).