Re: [PATCH -tip urgent] x86/unwind/orc: Fix error handling in __unwind_start()

From: Miroslav Benes
Date: Fri May 15 2020 - 05:03:23 EST


On Thu, 14 May 2020, Josh Poimboeuf wrote:

> 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: af085d9084b4 ("stacktrace/x86: add function for detecting reliable stack traces")
> Fixes: d3a09104018c ("x86/unwinder/orc: Dont bail on stack overflow")
> Fixes: 98d0c8ebf77e ("x86/unwind/orc: Prevent unwinding before ORC initialization")
> Reported-by: Pavel Machek <pavel@xxxxxxx>
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

Reviewed-by: Miroslav Benes <mbenes@xxxxxxx>

M