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:	Mon, 04 Feb 2013 08:50:33 -0500
From:	Rik van Riel <riel@...hat.com>
To:	Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>,
	linux-kernel@...r.kernel.org, aquini@...hat.com, walken@...gle.com,
	eric.dumazet@...il.com, lwoodman@...hat.com, knoel@...hat.com,
	chegu_vinod@...com, raghavendra.kt@...ux.vnet.ibm.com,
	mingo@...hat.com
Subject: Re: [PATCH -v4 5/5] x86,smp: limit spinlock delay on virtual machines

On 01/26/2013 07:47 AM, Borislav Petkov wrote:
> On Sat, Jan 26, 2013 at 01:00:43PM +0100, Ingo Molnar wrote:
>>> +void __init init_spinlock_delay(void)
>>> +{
>>> +	if (x86_hyper)
>>> +		max_spinlock_delay = MAX_SPINLOCK_DELAY_GUEST;
>>
>> I realize that you took existing code and extended it, but that
>> chunk of code looks pretty disgusting visually now - at minimum
>> it should be vertically aligned as most other kernel code does.
>>
>> The comment should also tell that the unit of these values is
>> 'spinlock-op loops' or so.

Will do.

> Also, with currently making PARAVIRT_GUEST optional, x86_hyper is maybe
> a bad choice of a variable to test.
>
> Maybe instead to this:
>
> 	if (IS_ENABLED(CONFIG_PARAVIRT_GUEST))
> 		...

We need to know whether we are actually running on top of a
hypervisor, not whether we have the code compiled in to do
so.

After all, the majority of distribution kernels will have
CONFIG_PARAVIRT_GUEST set, but the majority of those kernels
will be running bare metal...

-- 
All rights reversed
--
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