s390/unwind: add stack pointer alignment sanity checks
ABI requires SP to be aligned 8 bytes, report unwinding error otherwise. Link: https://lkml.kernel.org/r/20191106095601.29986-5-mbenes@suse.cz Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Tested-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:

committed by
Vasily Gorbik

parent
bf018ee644
commit
be2d11b2a1
@@ -92,6 +92,10 @@ bool unwind_next_frame(struct unwind_state *state)
|
||||
}
|
||||
}
|
||||
|
||||
/* Sanity check: ABI requires SP to be aligned 8 bytes. */
|
||||
if (sp & 0x7)
|
||||
goto out_err;
|
||||
|
||||
ip = ftrace_graph_ret_addr(state->task, &state->graph_idx, ip, (void *) sp);
|
||||
|
||||
/* Update unwind state */
|
||||
|
Reference in New Issue
Block a user