selftests/x86/ldt_gdt: Add infrastructure to test set_thread_area()
authorAndy Lutomirski <luto@kernel.org>
Sat, 4 Nov 2017 11:19:50 +0000 (04:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:19 +0000 (14:26 +0100)
commit46e6a15b40c99402aedde940f157614e0c927c7e
tree22b8601955d39cc4d9e6da862592d3702bde029a
parentd9eb267780ff856580885df063c5f4a6630e345f
selftests/x86/ldt_gdt: Add infrastructure to test set_thread_area()

commit d744dcad39094c9187075e274d1cdef79c57c8b5 upstream.

Much of the test design could apply to set_thread_area() (i.e. GDT),
not just modify_ldt().  Add set_thread_area() to the
install_valid_mode() helper.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bpetkov@suse.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/02c23f8fba5547007f741dc24c3926e5284ede02.1509794321.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/x86/ldt_gdt.c