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: <4F217585.2070302@msgid.tls.msk.ru>
Date:	Thu, 26 Jan 2012 19:47:17 +0400
From:	Michael Tokarev <mjt@....msk.ru>
To:	"Kirill A. Shutemov" <kirill@...temov.name>
CC:	Greg KH <gregkh@...e.de>, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
	Thomas Renninger <trenn@...e.de>,
	Bruno Friedmann <bruno@...a-net.ch>,
	Len Brown <len.brown@...el.com>
Subject: Re: [67/90] intel idle: Make idle driver more robust

26.01.2012 18:45, Kirill A. Shutemov wrote:

>> From: Thomas Renninger<trenn@...e.de>
>>
>> commit 5c2a9f06a9cd7194f884cdc88144866235dec07d upstream.
>>
>> kvm -cpu host passes the original cpuid info to the guest.
>>
>> Latest kvm version seem to return true for mwait_leaf cpuid
>> function on recent Intel CPUs. But it does not return mwait
>> C-states (mwait_substates), instead zero is returned.
>>
[]
>>   drivers/idle/intel_idle.c |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> --- a/drivers/idle/intel_idle.c
>> +++ b/drivers/idle/intel_idle.c
>> @@ -321,7 +321,8 @@ static int intel_idle_probe(void)
>>   	cpuid(CPUID_MWAIT_LEAF,&eax,&ebx,&ecx,&mwait_substates);
>>
>>   	if (!(ecx&  CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
>> -		!(ecx&  CPUID5_ECX_INTERRUPT_BREAK))
>> +	    !(ecx&  CPUID5_ECX_INTERRUPT_BREAK) ||
>> +	    !mwait_substates)
>>   			return -ENODEV;
>
> It breaks build for me.
[]
>    CC      drivers/idle/intel_idle.o
> /home/space/kas/git/public/linux-3.0-mid/drivers/idle/intel_idle.c: In function ‘intel_idle_probe’:
> /home/space/kas/git/public/linux-3.0-mid/drivers/idle/intel_idle.c:508:7: error: ‘mwait_substates’ undeclared (first use in this function)
> /home/space/kas/git/public/linux-3.0-mid/drivers/idle/intel_idle.c:508:7: note: each undeclared identifier is reported only once for each function it appears in
> make[3]: *** [drivers/idle/intel_idle.o] Error 1
>
> Variable 'substates' hasn't renamed to 'mwait_substates' in 3.0.
> See c423628 intel_idle: delete substates DEBUG modparam

I wonder why in my 3.0.18 this variable is properly defined
in the same file, in line 77:

...
74 /* intel_idle.max_cstate=0 disables driver */
75 static int max_cstate = MWAIT_MAX_NUM_CSTATES - 1;
76
77 static unsigned int mwait_substates;
78
79 #define LAPIC_TIMER_ALWAYS_RELIABLE 0xFFFFFFFF
...

> Signed-off-by: Kirill A. Shutemov<kirill.shutemov@...ux.intel.com>
> ---
>   drivers/idle/intel_idle.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 15d72ca..a1aecc3 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -505,7 +505,7 @@ static int intel_idle_probe(void)
>
>   	if (!(ecx&  CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
>   	    !(ecx&  CPUID5_ECX_INTERRUPT_BREAK) ||
> -	    !mwait_substates)
> +	    !substates)

With this patch my build of 3.0.18 fails with "substates undeclared"
message...

>
>   	if (substates == 0)	/* can over-ride via modparam */

And I don't have this context line in my version.

It is 3.0 from kernel.org patched by patch-3.0.18.xz

Thanks,

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