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:	Tue, 17 Mar 2015 13:41:46 -0500
From:	Aravind Gopalakrishnan <aravind.gopalakrishnan@....com>
To:	Borislav Petkov <bp@...en8.de>
CC:	<tglx@...utronix.de>, <mingo@...hat.com>, <hpa@...or.com>,
	<tony.luck@...el.com>, <slaoub@...il.com>, <luto@...capital.net>,
	<x86@...nel.org>, <linux-kernel@...r.kernel.org>,
	<linux-edac@...r.kernel.org>
Subject: Re: [PATCH] x86, mce, severities: Add AMD severities function

On 3/17/2015 5:20 AM, Borislav Petkov wrote:
> On Mon, Mar 16, 2015 at 12:16:04PM -0500, Aravind Gopalakrishnan wrote:
>> +/* keeping amd_mce_severity in sync with AMD error scope heirarchy table */
>> +static int amd_mce_severity(struct mce *m, enum context ctx)
>> +{
>> +	/* Processor Context Corrupt, no need to fumble too much, die! */
>> +	if (m->status & MCI_STATUS_PCC)
>> +		return MCE_PANIC_SEVERITY;
>> +
>> +	if (m->status & MCI_STATUS_UC) {
>> +		/*
>> +		 * On older systems, where overflow_recov flag is not
>> +		 * present, we should simply PANIC if Overflow occurs.
>> +		 * If overflow_recov flag set, then SW can try
>> +		 * to at least kill process to salvage systen operation.
>> +		 */
>> +
>> +		/* at least one error was not logged */
>> +		if (m->status & MCI_STATUS_OVER && !mce_flags.overflow_recov)
>> +				return MCE_PANIC_SEVERITY;
>> +
>> +		/* software can try to contain */
>> +		if (!(m->mcgstatus & MCG_STATUS_RIPV) &&
>> +		      mce_flags.overflow_recov) {
>> +			if (ctx == IN_KERNEL)
>> +				return MCE_PANIC_SEVERITY;
> we're testing mce_flags.overflow_recov twice here, perhaps do instead:
>
> 	/*
> 	 * < Comment about overflow recovery bit>
> 	 */
> 	if (mce_flags.overflow_recov) {
> 		if (!(m->mcgstatus & MCG_STATUS_RIPV) && (ctx == IN_KERNEL))
> 			return MCE_PANIC_SEVERITY;

return MCE_AR_SEVERITY if ctx == IN_USER also needs to be within this 
block here.
Will do that and resend.

> 	} else {
> 		if (m->status & MCI_STATUS_OVER)
> 			return MCE_PANIC_SEVERITY;
> 	}
>

Thanks,
-Aravind
--
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