Skip to content
Commit 88d5e982 authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Paul Gortmaker
Browse files

x86/unwind/orc: Fix error handling in __unwind_start()

commit 71c95825 upstream.

The unwind_state 'error' field is used to inform the reliable unwinding
code that the stack trace can't be trusted.  Set this field for all
errors in __unwind_start().

Also, move the zeroing out of the unwind_state struct to before the ORC
table initialization check, to prevent the caller from reading
uninitialized data if the ORC table is corrupted.

Fixes: af085d90 ("stacktrace/x86: add function for detecting reliable stack traces")
Fixes: d3a09104 ("x86/unwinder/orc: Dont bail on stack overflow")
Fixes: 98d0c8eb

 ("x86/unwind/orc: Prevent unwinding before ORC initialization")
Reported-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/d6ac7215a84ca92b895fdd2e1aa546729417e6e6.1589487277.git.jpoimboe@redhat.com
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 23c7e66a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment