x86/dumpstack: Fix off-by-one errors in stack identification
authorAndy Lutomirski <luto@kernel.org>
Sun, 14 Apr 2019 15:59:39 +0000 (17:59 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 17 Apr 2019 10:26:50 +0000 (12:26 +0200)
commitfa33215422fd415a07ec2a00e9f1acdaf0fa8e94
tree253c63fbef954c557fb8cf6eb445b02410cac5b4
parent7dbcf2b0b770eeb803a416ee8dcbef78e6389d40
x86/dumpstack: Fix off-by-one errors in stack identification

The get_stack_info() function is off-by-one when checking whether an
address is on a IRQ stack or a IST stack. This prevents an overflowed
IRQ or IST stack from being dumped properly.

[ tglx: Do the same for 32-bit ]

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190414160143.785651055@linutronix.de
arch/x86/kernel/dumpstack_32.c
arch/x86/kernel/dumpstack_64.c