lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 22 Mar 2019 19:05:27 +0000 From: "Ghannam, Yazen" <Yazen.Ghannam@....com> To: Borislav Petkov <bp@...en8.de> CC: "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "tony.luck@...el.com" <tony.luck@...el.com>, "x86@...nel.org" <x86@...nel.org>, "rafal@...ecki.pl" <rafal@...ecki.pl>, "clemej@...il.com" <clemej@...il.com> Subject: Re: [PATCH v2 1/2] x86/MCE: Add function to allow filtering of MCA errors On 3/22/2019 12:24 PM, Borislav Petkov wrote: > On Thu, Mar 21, 2019 at 08:25:17PM +0000, Ghannam, Yazen wrote: >> From: Yazen Ghannam <yazen.ghannam@....com> >> >> Some systems may report spurious MCA errors. In general, spurious MCA >> errors may be disabled by clearing a particular bit in MCA_CTL. However, >> clearing a bit in MCA_CTL may not be recommended for some errors, so the >> only option is to ignore them. >> >> An MCA error is printed and handled after it has been added to the MCE >> event pool. So an MCA error can be ignored by not adding it to the pool. >> >> Create a function pointer to filter MCA errors and use this when adding >> an error to the MCE event pool. >> >> Install a default function that does not filter any errors. >> >> Cc: <stable@...r.kernel.org> # 4.14.x >> Signed-off-by: Yazen Ghannam <yazen.ghannam@....com> >> --- >> Link: >> https://lkml.kernel.org/r/20190307212552.8865-1-Yazen.Ghannam@amd.com >> >> v1->v2: >> * This is a new patch replacing V1 Patch 1 which is no longer needed. >> >> arch/x86/include/asm/mce.h | 3 +++ >> arch/x86/kernel/cpu/mce/core.c | 6 ++++++ >> arch/x86/kernel/cpu/mce/genpool.c | 3 +++ >> 3 files changed, 12 insertions(+) >> >> diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h >> index 22d05e3835f0..0b0b797a959c 100644 >> --- a/arch/x86/include/asm/mce.h >> +++ b/arch/x86/include/asm/mce.h >> @@ -253,6 +253,9 @@ extern void mce_disable_bank(int bank); >> extern void (*machine_check_vector)(struct pt_regs *, long error_code); >> void do_machine_check(struct pt_regs *, long); >> >> +/* Filter MCEs from the decoder chain. */ > > That should be something like: > > /* Decides whether to add MCE records to the decoder chain or filter them out. */ > Okay. I'll make a change. >> +extern bool (*filter_mce)(struct mce *m); >> + >> /* >> * Threshold handler >> */ >> diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c >> index b7fb541a4873..effb40581f08 100644 >> --- a/arch/x86/kernel/cpu/mce/core.c >> +++ b/arch/x86/kernel/cpu/mce/core.c >> @@ -1771,6 +1771,12 @@ static void __mcheck_cpu_init_timer(void) >> mce_start_timer(t); >> } >> >> +/* >> + * Don't filter MCEs by default. Install a system-specific function, if needed. >> + */ > > That comment is kinda obvious. > Okay. I'll drop it. Thanks, Yazen
Powered by blists - more mailing lists