Re: [PATCH] x86, cpu: X86_FEATURE_NOPL should be disabled on32-bit only

From: Borislav Petkov
Date: Sun Oct 03 2010 - 16:12:44 EST


From: "H. Peter Anvin" <hpa@xxxxxxxxx>
Date: Sun, Oct 03, 2010 at 11:19:18AM -0700

> I think we actually need to set it on 64 bits.

Ok, correct me if I'm wrong but I think it is already "indirectly" set
on 64-bits through REQUIRED_MASK3:

#define REQUIRED_MASK3 (NEED_NOPL)

which is defined as

#define NEED_NOPL (1<<(X86_FEATURE_NOPL & 31))

when either CONFIG_X86_P6_NOP or CONFIG_X86_64 are selected.

and cpu_has() does

#define cpu_has(c, bit) \
(__builtin_constant_p(bit) && \
...
(((bit)>>5)==3 && (1UL<<((bit)&31) & REQUIRED_MASK3)) || \
...
? 1 : test_cpu_cap(c, bit))

which returns 1 when testing for X86_FEATURE_NOPL, no?

--
Regards/Gruss,
Boris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/