]> git.ipfire.org Git - people/arne_f/kernel.git/commit
x86/unwind: Align stack pointer in unwinder dump
authorJosh Poimboeuf <jpoimboe@redhat.com>
Tue, 10 Oct 2017 01:20:04 +0000 (20:20 -0500)
committerIngo Molnar <mingo@kernel.org>
Tue, 10 Oct 2017 10:49:49 +0000 (12:49 +0200)
commit99bd28a49b150e4b938313a63b5532d95ba77885
treec60a884f170b380829d741ddf1ffb46b4790c079
parent5c99b692cfd62f6915ed7ee7ed3c38d65ba3feab
x86/unwind: Align stack pointer in unwinder dump

When printing the unwinder dump, the stack pointer could be unaligned,
for one of two reasons:

- stack corruption; or

- GCC created an unaligned stack.

There's no way for the unwinder to tell the difference between the two,
so we have to assume one or the other.  GCC unaligned stacks are very
rare, and have only been spotted before GCC 5.  Presumably, if we're
doing an unwinder stack dump, stack corruption is more likely than a
GCC unaligned stack.  So always align the stack before starting the
dump.

Reported-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-and-tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Byungchul Park <byungchul.park@lge.com>
Cc: LKP <lkp@01.org>
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/2f540c515946ab09ed267e1a1d6421202a0cce08.1507597785.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/unwind_frame.c