* [PATCH 0/3] x86: Last-minute fixlets
@ 2017-06-26 12:35 Borislav Petkov
2017-06-26 12:35 ` [PATCH 1/3] x86/mce: Always save severity in machine_check_poll() Borislav Petkov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Borislav Petkov @ 2017-06-26 12:35 UTC (permalink / raw)
To: X86 ML; +Cc: LKML
From: Borislav Petkov <bp@suse.de>
Hi guys,
last three small fixlets for tip before the merge window. Two go to
tip:ras/core and one to tip:x86/microcode.
Please queue,
thanks.
Christophe JAILLET (1):
RAS/CEC: Check the correct variable in the debugfs error handling
Colin Ian King (1):
x86/microcode: Make a couple of symbols static
Yazen Ghannam (1):
x86/mce: Always save severity in machine_check_poll()
arch/x86/kernel/cpu/mcheck/mce.c | 7 +------
arch/x86/kernel/cpu/microcode/amd.c | 2 +-
arch/x86/kernel/cpu/microcode/intel.c | 2 +-
drivers/ras/cec.c | 2 +-
4 files changed, 4 insertions(+), 9 deletions(-)
--
2.13.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] x86/mce: Always save severity in machine_check_poll()
2017-06-26 12:35 [PATCH 0/3] x86: Last-minute fixlets Borislav Petkov
@ 2017-06-26 12:35 ` Borislav Petkov
2017-06-26 12:35 ` [PATCH 2/3] RAS/CEC: Check the correct variable in the debugfs error handling Borislav Petkov
2017-06-26 12:35 ` [PATCH 3/3] x86/microcode: Make a couple of symbols static Borislav Petkov
2 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2017-06-26 12:35 UTC (permalink / raw)
To: X86 ML; +Cc: LKML
From: Yazen Ghannam <yazen.ghannam@amd.com>
The MCE severity gives a hint as to how to handle the error. The
notifier blocks can then use the severity to decide on an action.
It's not necessary for machine_check_poll() to filter errors for
the notifier chain, since each block will check its own set of
conditions before handling an error.
Also, there isn't any urgency for machine_check_poll() to make decisions
based on severity like in do_machine_check().
If we can assume that a severity is set then we can use it in more
notifier blocks. For example, the CEC block could check for a "KEEP"
severity rather than checking bits in the status. This isn't possible
now since the severity is not set except for "DEFFRRED/UCNA" errors with
a valid address.
Save the severity since we have it, and let the notifier blocks decide
if they want to do anything.
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/1498074402-98633-1-git-send-email-Yazen.Ghannam@amd.com
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/kernel/cpu/mcheck/mce.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index b58b77808ce4..6dde0497efc7 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -673,7 +673,6 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
{
bool error_seen = false;
struct mce m;
- int severity;
int i;
this_cpu_inc(mce_poll_count);
@@ -710,11 +709,7 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
mce_read_aux(&m, i);
- severity = mce_severity(&m, mca_cfg.tolerant, NULL, false);
-
- if (severity == MCE_DEFERRED_SEVERITY && mce_is_memory_error(&m))
- if (m.status & MCI_STATUS_ADDRV)
- m.severity = severity;
+ m.severity = mce_severity(&m, mca_cfg.tolerant, NULL, false);
/*
* Don't get the IP here because it's unlikely to
--
2.13.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/3] RAS/CEC: Check the correct variable in the debugfs error handling
2017-06-26 12:35 [PATCH 0/3] x86: Last-minute fixlets Borislav Petkov
2017-06-26 12:35 ` [PATCH 1/3] x86/mce: Always save severity in machine_check_poll() Borislav Petkov
@ 2017-06-26 12:35 ` Borislav Petkov
2017-06-26 12:35 ` [PATCH 3/3] x86/microcode: Make a couple of symbols static Borislav Petkov
2 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2017-06-26 12:35 UTC (permalink / raw)
To: X86 ML; +Cc: LKML
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Check the correct variable when handling a potential error from
debugfs_create_file(). Most likely a copy-paste botch.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector")
Link: http://lkml.kernel.org/r/20170623062440.6726-1-christophe.jaillet@wanadoo.fr
[ Rewrite commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
---
drivers/ras/cec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
index 6aab46d91d33..d0e5d6ee882c 100644
--- a/drivers/ras/cec.c
+++ b/drivers/ras/cec.c
@@ -481,7 +481,7 @@ static int __init create_debugfs_nodes(void)
count = debugfs_create_file("count_threshold", S_IRUSR | S_IWUSR, d,
&count_threshold, &count_threshold_ops);
- if (!decay) {
+ if (!count) {
pr_warn("Error creating count_threshold debugfs node!\n");
goto err;
}
--
2.13.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] x86/microcode: Make a couple of symbols static
2017-06-26 12:35 [PATCH 0/3] x86: Last-minute fixlets Borislav Petkov
2017-06-26 12:35 ` [PATCH 1/3] x86/mce: Always save severity in machine_check_poll() Borislav Petkov
2017-06-26 12:35 ` [PATCH 2/3] RAS/CEC: Check the correct variable in the debugfs error handling Borislav Petkov
@ 2017-06-26 12:35 ` Borislav Petkov
2 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2017-06-26 12:35 UTC (permalink / raw)
To: X86 ML; +Cc: LKML
From: Colin Ian King <colin.king@canonical.com>
The helper function __load_ucode_amd() and pointer intel_ucode_patch do
not need to be in global scope, so make them static.
Fixes those sparse warnings:
"symbol '__load_ucode_amd' was not declared. Should it be static?"
"symbol 'intel_ucode_patch' was not declared. Should it be static?"
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/20170622095736.11937-1-colin.king@canonical.com
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/kernel/cpu/microcode/amd.c | 2 +-
arch/x86/kernel/cpu/microcode/intel.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index e9f4d762aa5b..21b185793c80 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -251,7 +251,7 @@ static bool get_builtin_microcode(struct cpio_data *cp, unsigned int family)
#endif
}
-void __load_ucode_amd(unsigned int cpuid_1_eax, struct cpio_data *ret)
+static void __load_ucode_amd(unsigned int cpuid_1_eax, struct cpio_data *ret)
{
struct ucode_cpu_info *uci;
struct cpio_data cp;
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index d525a0bd7d28..59edbe9d4ccb 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -42,7 +42,7 @@
static const char ucode_path[] = "kernel/x86/microcode/GenuineIntel.bin";
/* Current microcode patch used in early patching on the APs. */
-struct microcode_intel *intel_ucode_patch;
+static struct microcode_intel *intel_ucode_patch;
static inline bool cpu_signatures_match(unsigned int s1, unsigned int p1,
unsigned int s2, unsigned int p2)
--
2.13.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-26 12:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 12:35 [PATCH 0/3] x86: Last-minute fixlets Borislav Petkov
2017-06-26 12:35 ` [PATCH 1/3] x86/mce: Always save severity in machine_check_poll() Borislav Petkov
2017-06-26 12:35 ` [PATCH 2/3] RAS/CEC: Check the correct variable in the debugfs error handling Borislav Petkov
2017-06-26 12:35 ` [PATCH 3/3] x86/microcode: Make a couple of symbols static Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®