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]
Message-ID: <503B8E26.2050604@linux.vnet.ibm.com>
Date:	Mon, 27 Aug 2012 20:41:34 +0530
From:	"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
To:	Borislav Petkov <bp@...64.org>
CC:	tony.luck@...el.com, andi@...stfloor.org,
	gong.chen@...ux.intel.com, ananth@...ibm.com,
	masbock@...ux.vnet.ibm.com, x86@...nel.org,
	linux-kernel@...r.kernel.org, lcm@...ibm.com, mingo@...hat.com,
	tglx@...utronix.de, linux-edac@...r.kernel.org
Subject: Re: [PATCH 2/2] x86/mce: Honour bios-set CMCI threshold

On 08/27/2012 08:18 PM, Borislav Petkov wrote:
> On Mon, Aug 27, 2012 at 04:55:12PM +0530, Naveen N. Rao wrote:
>> The ACPI spec doesn't provide for a way for the bios to pass down
>> recommended thresholds to the OS on a _per-bank_ basis. This patch adds
>> a new boot option, which if passed, allows bios to initialize the CMCI
>> threshold. In such a case, we simply skip programming any threshold
>> value.
>>
>> As fail-safe, we initialize threshold to 1 if some banks have not been
>> initialized by the bios and warn the user.
>>
>> Changes:
>> - Use the mce_boot_flags structure.
>> - Expose bios_cmci_threshold via sysfs.
>>
>> Signed-off-by: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
>> ---
>
> ...
>
>> @@ -119,6 +146,12 @@ static void cmci_discover(int banks, int boot)
>>   	raw_spin_unlock_irqrestore(&cmci_discover_lock, flags);
>>   	if (hdr)
>>   		printk(KERN_CONT "\n");
>> +	if (boot && mce_boot_flags.bios_cmci_threshold && bios_wrong_thresh) {
>> +		printk_once(KERN_INFO
>> +			"bios_cmci_threshold: Some banks do not have valid thresholds set");
>> +		printk_once(KERN_INFO
>> +			"bios_cmci_threshold: Make sure your BIOS supports this boot option");
>> +	}
>
> All functional changes aside, why do you want to print this at all? Does
> it bring anything to the user?
>
> Because if BIOS is systematically b0rked and we keep issuing this every
> time do do cmci_discover, then we have a lotsa users to explain to what
> happens.
>
> Why not do a printk_once saying something along the lines of "BIOS
> hasn't setup thresholds properly, correcting..." and that's it?

Yes, that's the intent here. I am using printk_once() and if I'm not 
mistaken, we print the above only once during boot.

I am open to changing the message if the above two lines aren't good.


Thanks!
- Naveen

>
> Tony?
>

--
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