]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
selftests/x86/ldt_get: Add a few additional tests for limits
authorAndy Lutomirski <luto@kernel.org>
Sat, 4 Nov 2017 11:19:52 +0000 (04:19 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Sat, 6 Jan 2018 12:23:02 +0000 (13:23 +0100)
commita1cdabf77d7ed9ba02697ad8beb04adf46a7c7b8
treeca72b23bcdad23ea846a59202610b8fd4c551720
parentf05c092307d8479094d83d4337d66e6e86e730a9
selftests/x86/ldt_get: Add a few additional tests for limits

CVE-2017-5754

We weren't testing the .limit and .limit_in_pages fields very well.
Add more tests.

This addition seems to trigger the "bits 16:19 are undefined" issue
that was fixed in an earlier patch.  I think that, at least on my
CPU, the high nibble of the limit ends in LAR bits 16:19.

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/5601c15ea9b3113d288953fd2838b18bedf6bc67.1509794321.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit fec8f5ae1715a01c72ad52cb2ecd8aacaf142302)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
tools/testing/selftests/x86/ldt_gdt.c