commit ddace9720fe7582cd2c92000f75f1f261daa53fd
Author: Dave Anderson <anderson@redhat.com>
Date: Fri Feb 9 16:26:27 2018 -0500
Fix for the ARM64 "bt" command in kernels that contain commit
30d88c0e3ace625a92eead9ca0ad94093a8f59fe, titled "arm64: entry:
Apply BP hardening for suspicious interrupts from EL0". Without
the patch, there may be invalid kernel kernel exception frames
displayed on an active task's kernel stack, often below a stackframe
of the "do_el0_ia_bp_hardening" function; the address translation
of the PC and LR values in the the bogus exception frame will
display "[unknown or invalid address]".
(anderson@redhat.com)
--- crash-7.2.0/arm64.c.orig
+++ crash-7.2.0/arm64.c
@@ -2411,8 +2411,10 @@ arm64_back_trace_cmd(struct bt_info *bt)
if (arm64_in_exception_text(bt->instptr) && INSTACK(stackframe.fp, bt)) {
if (!(bt->flags & BT_IRQSTACK) ||
- (((stackframe.sp + SIZE(pt_regs)) < bt->stacktop)))
- exception_frame = stackframe.fp - KERN_EFRAME_OFFSET;
+ ((stackframe.sp + SIZE(pt_regs)) < bt->stacktop)) {
+ if (arm64_is_kernel_exception_frame(bt, stackframe.fp - KERN_EFRAME_OFFSET))
+ exception_frame = stackframe.fp - KERN_EFRAME_OFFSET;
+ }
}
if ((bt->flags & BT_IRQSTACK) &&