[Crash-utility] [PATCH v2] Determine the ARM64 kernel's Pointer Authentication mask value by reading the new KERNELPACMASK vmcoreinfo entry.
Dave Anderson
anderson at redhat.com
Wed Apr 22 13:59:12 UTC 2020
Hi Amit,
Two more questions below...
----- Original Message -----
> > But here's where I'm confused: when an in-kernel exception frame occurs, and the
> > processor lays down the full register set on the stack, are both the PC and LR (regs[30])
> > text values written on the stack as obfuscated values?
> >
>
> In arm64 case arch/arm64/include/asm/kexec.h + crash_setup_regs()
> function sets up the kernel exception frame. As can be seen PC does not
> have obfuscated (PAC) values but LR can be obfuscated.
Ok, so that's when it's setting up the registers for a kexec/kdump operation.
But what about exceptions that occur during the normal course of events, such as
when an interrupt or page fault occurs?
> > ...
> >
> > When it gathers the starting hooks for non-active tasks, it does this:
> >
> > static int
> > arm64_get_stackframe(struct bt_info *bt, struct arm64_stackframe *frame)crash_setup_regs
> > {
> > if (!fill_task_struct(bt->task))
> > return FALSE;
> >
> > frame->sp = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_sp));
> > frame->pc = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_pc));
> > frame->fp = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_fp));
> >
> > return TRUE;
> > }
> >
> > When a task is put to sleep, is the PC text address in the task's thread_struct.cpu_context
> > obfuscated?
And again, what happens in this case?
Thanks,
Dave
More information about the Crash-utility
mailing list