summaryrefslogtreecommitdiff
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2017-08-01 07:11:37 -0700
committerIngo Molnar <mingo@kernel.org>2017-08-10 17:15:13 +0200
commite137a4d8f4dd2e277e355495b6b2cb241a8693c3 (patch)
tree87139e3e55f9006fa1fbb402bc538a70451ccd5b /tools/objtool/check.c
parent23d98c204386a98d9ef9f9e744f41443ece4929f (diff)
downloadlinux-e137a4d8f4dd2e277e355495b6b2cb241a8693c3.tar.gz
linux-e137a4d8f4dd2e277e355495b6b2cb241a8693c3.tar.xz
x86/switch_to/64: Rewrite FS/GS switching yet again to fix AMD CPUs
Switching FS and GS is a mess, and the current code is still subtly wrong: it assumes that "Loading a nonzero value into FS sets the index and base", which is false on AMD CPUs if the value being loaded is 1, 2, or 3. (The current code came from commit 3e2b68d752c9 ("x86/asm, sched/x86: Rewrite the FS and GS context switch code"), which made it better but didn't fully fix it.) Rewrite it to be much simpler and more obviously correct. This should fix it fully on AMD CPUs and shouldn't adversely affect performance. Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bpetkov@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Chang Seok <chang.seok.bae@intel.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/objtool/check.c')
0 files changed, 0 insertions, 0 deletions