]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/x86/sigreturn/64: Fix spurious failures on AMD CPUs
authorAndy Lutomirski <luto@kernel.org>
Wed, 27 Jun 2018 05:17:17 +0000 (22:17 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 Jun 2018 07:36:56 +0000 (09:36 +0200)
commit4b91f385a6e4cbc568ea188c32b70c2c64b7616f
tree14c164f98353e3e4fa1aa9f959448e423ef82b14
parent26454a9fc2efded041a86904e46cff80b5b53d27
selftests/x86/sigreturn/64: Fix spurious failures on AMD CPUs

When I wrote the sigreturn test, I didn't realize that AMD's busted
IRET behavior was different from Intel's busted IRET behavior:

On AMD CPUs, the CPU leaks the high 32 bits of the kernel stack pointer
to certain userspace contexts.  Gee, thanks.  There's very little
the kernel can do about it.  Modify the test so it passes.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/86e7fd3564497f657de30a36da4505799eebef01.1530076529.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/testing/selftests/x86/sigreturn.c