diff options
author | Andy Lutomirski <luto@kernel.org> | 2017-03-23 00:32:29 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-03-23 10:25:07 +0300 |
commit | 65973dd3fd31151823f4b8c289eebbb3fb7e6bc0 (patch) | |
tree | 0f735a38353f254e2d415664fcf783d545cba23e /arch/x86/include/asm/desc.h | |
parent | ef37bc361442545a5be3c56c49a08c3153032127 (diff) | |
download | linux-65973dd3fd31151823f4b8c289eebbb3fb7e6bc0.tar.xz |
selftests/x86/ldt_gdt_32: Work around a glibc sigaction() bug
i386 glibc is buggy and calls the sigaction syscall incorrectly.
This is asymptomatic for normal programs, but it blows up on
programs that do evil things with segmentation. The ldt_gdt
self-test is an example of such an evil program.
This doesn't appear to be a regression -- I think I just got lucky
with the uninitialized memory that glibc threw at the kernel when I
wrote the test.
This hackish fix manually issues sigaction(2) syscalls to undo the
damage. Without the fix, ldt_gdt_32 segfaults; with the fix, it
passes for me.
See: https://sourceware.org/bugzilla/show_bug.cgi?id=21269
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Garnier <thgarnie@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/aaab0f9f93c9af25396f01232608c163a760a668.1490218061.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/desc.h')
0 files changed, 0 insertions, 0 deletions