selftests/x86: Add check_initial_reg_state()
authorAndy Lutomirski <luto@kernel.org>
Thu, 28 Jan 2016 23:11:20 +0000 (15:11 -0800)
committerIngo Molnar <mingo@kernel.org>
Fri, 29 Jan 2016 08:46:37 +0000 (09:46 +0100)
commite21d50f3864e2a8995f5d2a41dea3f0fa07758b4
tree5d4f98eab7691d014ca44ee00b6a679a2f733c3e
parentc31b34255b48d1a169693c9c70c49ad6418cfd20
selftests/x86: Add check_initial_reg_state()

This checks that ELF binaries are started with an appropriately
blank register state.

( There's currently a nasty special case in the entry asm to
  arrange for this. I'm planning on removing the special case,
  and this will help make sure I don't break it. )

Signed-off-by: Andy Lutomirski <luto@kernel.org>
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: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
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/ef54f8d066b30a3eb36bbf26300eebb242185700.1454022279.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/testing/selftests/x86/Makefile
tools/testing/selftests/x86/check_initial_reg_state.c [new file with mode: 0644]