mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-11 12:30:39 +00:00
Merge branch 'for-next/stacktrace' into for-next/core
Remove synthetic frame record from exception stack when entering from userspace. * for-next/stacktrace: arm64: remove EL0 exception frame record
This commit is contained in:
commit
d23fa87cde
@ -261,16 +261,16 @@ alternative_else_nop_endif
|
|||||||
stp lr, x21, [sp, #S_LR]
|
stp lr, x21, [sp, #S_LR]
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In order to be able to dump the contents of struct pt_regs at the
|
* For exceptions from EL0, terminate the callchain here.
|
||||||
* time the exception was taken (in case we attempt to walk the call
|
* For exceptions from EL1, create a synthetic frame record so the
|
||||||
* stack later), chain it together with the stack frames.
|
* interrupted code shows up in the backtrace.
|
||||||
*/
|
*/
|
||||||
.if \el == 0
|
.if \el == 0
|
||||||
stp xzr, xzr, [sp, #S_STACKFRAME]
|
mov x29, xzr
|
||||||
.else
|
.else
|
||||||
stp x29, x22, [sp, #S_STACKFRAME]
|
stp x29, x22, [sp, #S_STACKFRAME]
|
||||||
.endif
|
|
||||||
add x29, sp, #S_STACKFRAME
|
add x29, sp, #S_STACKFRAME
|
||||||
|
.endif
|
||||||
|
|
||||||
#ifdef CONFIG_ARM64_SW_TTBR0_PAN
|
#ifdef CONFIG_ARM64_SW_TTBR0_PAN
|
||||||
alternative_if_not ARM64_HAS_PAN
|
alternative_if_not ARM64_HAS_PAN
|
||||||
|
|||||||
@ -44,6 +44,10 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
|
|||||||
unsigned long fp = frame->fp;
|
unsigned long fp = frame->fp;
|
||||||
struct stack_info info;
|
struct stack_info info;
|
||||||
|
|
||||||
|
/* Terminal record; nothing to unwind */
|
||||||
|
if (!fp)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (fp & 0xf)
|
if (fp & 0xf)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@ -104,15 +108,6 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
|
|||||||
|
|
||||||
frame->pc = ptrauth_strip_insn_pac(frame->pc);
|
frame->pc = ptrauth_strip_insn_pac(frame->pc);
|
||||||
|
|
||||||
/*
|
|
||||||
* Frames created upon entry from EL0 have NULL FP and PC values, so
|
|
||||||
* don't bother reporting these. Frames created by __noreturn functions
|
|
||||||
* might have a valid FP even if PC is bogus, so only terminate where
|
|
||||||
* both are NULL.
|
|
||||||
*/
|
|
||||||
if (!frame->fp && !frame->pc)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
NOKPROBE_SYMBOL(unwind_frame);
|
NOKPROBE_SYMBOL(unwind_frame);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user