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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Mar 2015 17:03:37 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Aravind Gopalakrishnan <aravind.gopalakrishnan@....com>
Cc:	"Luck, Tony" <tony.luck@...el.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"hpa@...or.com" <hpa@...or.com>,
	"slaoub@...il.com" <slaoub@...il.com>,
	"luto@...capital.net" <luto@...capital.net>,
	"x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>
Subject: Re: [PATCH] x86, mce, severities: Add AMD severities function

On Fri, Mar 20, 2015 at 10:59:33AM -0500, Aravind Gopalakrishnan wrote:
> Ok, Here's how I have it currently:
> void __init mcheck_vendor_init_severity(void)
> {
>         struct cpuinfo_x86 *c = &boot_cpu_data;
> 
>         switch (c->x86_vendor) {
>         case X86_VENDOR_INTEL:
>                 mce_severity = mce_severity_intel;
>                 break;
>         case X86_VENDOR_AMD:
>                 mce_severity = mce_severity_amd;
>                 break;
>         default:
>                 break;
>         }
> }
> And I call this from mcheck_init().
> I tested the above bits on AMD and the severities grading works fine.
> 
> Should we also come up with a '_default' function to assign to mce_severity
> function pointer?

I think that should be

	default:
		WARN_ONCE("WTF?!");
		break;

above.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ