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] [day] [month] [year] [list]
Date:	Mon, 27 Oct 2014 08:30:22 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 8/8 only] x86,vdso: Use LSL unconditionally for vgetcpu

On Mon, Oct 27, 2014 at 4:31 AM, Andi Kleen <andi@...stfloor.org> wrote:
> Andy Lutomirski <luto@...capital.net> writes:
>
>> LSL is faster than RDTSCP and works everywhere; there's no need to
>> switch between them depending on CPU.
>
> Yes it should have been done like this from day 1.
>
>> diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
>> index 9793322751e0..d14bb8faad16 100644
>> --- a/arch/x86/vdso/vclock_gettime.c
>> +++ b/arch/x86/vdso/vclock_gettime.c
>> @@ -11,6 +11,9 @@
>>   * Check with readelf after changing.
>>   */
>>
>> +/* Disable static_cpu_has debugging; it doesn't work in the vDSO */
>> +#undef CONFIG_X86_DEBUG_STATIC_CPU_HAS
>> +
>>  #include <uapi/linux/time.h>
>>  #include <asm/vgtod.h>
>>  #include <asm/hpet.h>
>> diff --git a/arch/x86/vdso/vgetcpu.c b/arch/x86/vdso/vgetcpu.c
>> index add1d98d2477..fd8470c98ab5 100644
>> --- a/arch/x86/vdso/vgetcpu.c
>> +++ b/arch/x86/vdso/vgetcpu.c
>> @@ -5,10 +5,12 @@
>>   * Fast user context implementation of getcpu()
>>   */
>>
>> +/* Disable static_cpu_has debugging; it doesn't work in the vDSO */
>> +#undef CONFIG_X86_DEBUG_STATIC_CPU_HAS
>
>
> These two hunks are unrelated?
>

They're related, but they're no longer necessary.  v1 of this patch
added a static_cpu_has call to vgtod.h, breaking compilation if this
hunk wasn't there.

I can send a v3 with these deleted, but I prefer keeping them, since
they may save whomever modifies these files next a compiler error.

--Andy

> -Andi
>
> --
> ak@...ux.intel.com -- Speaking for myself only



-- 
Andy Lutomirski
AMA Capital Management, LLC
--
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