x86/cpu: Probe the behavior of nulling out a segment at boot time
authorAndy Lutomirski <luto@kernel.org>
Fri, 8 Apr 2016 00:31:46 +0000 (17:31 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 13 Apr 2016 08:20:41 +0000 (10:20 +0200)
commit7a5d67048745e3eab62779c6d043a2e3d95dc848
treec3052c7d6e5b675ced4c3a7edb2f7a6c2c7bb65f
parentd47b50e7a111bb7a56fb1c974728b56209d7f515
x86/cpu: Probe the behavior of nulling out a segment at boot time

AMD and Intel do different things when writing zero to a segment
selector.  Since neither vendor documents the behavior well and it's
easy to test the behavior, try nulling fs to see what happens.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/61588ba0e0df35beafd363dc8b68a4c5878ef095.1460075211.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/common.c