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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 11 Apr 2015 01:07:51 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Andi Kleen <andi@...stfloor.org>, x86@...nel.org, luto@...nel.org,
	linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 6/8] x86: Enumerate kernel FSGS capability in AT_HWCAP2

> > +++ b/arch/x86/include/uapi/asm/hwcap.h
> > @@ -0,0 +1,7 @@
> > +#ifndef _ASM_HWCAP_H
> > +#define _ASM_HWCAP_H 1
> > +
> > +#define HWCAP2_FSGSBASE	(1 << 0) 	/* Kernel enabled RD/WR FS/GS BASE */
> 
> BIT()

We cannot use BIT in uapi headers for obvious reasons.

> >  cpumask_var_t cpu_initialized_mask;
> >  cpumask_var_t cpu_callout_mask;
> > @@ -958,8 +961,10 @@ static void identify_cpu(struct cpuinfo_x86 *c)
> >  	numa_add_cpu(smp_processor_id());
> >  #endif
> >  
> > -	if (cpu_has(c, X86_FEATURE_FSGSBASE))
> > +	if (cpu_has(c, X86_FEATURE_FSGSBASE)) {
> 
> static_cpu_has_safe()

That checks the boot cpu? We want to check the current CPU.

-Andi


-- 
ak@...ux.intel.com -- Speaking for myself only.
--
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