lkml.org 
[lkml]   [2020]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v6 14/15] arm64: implement Shadow Call Stack
On Thu, Jan 16, 2020 at 10:24 AM Will Deacon <will@kernel.org> wrote:
> > .macro irq_stack_entry
> > mov x19, sp // preserve the original sp
> > +#ifdef CONFIG_SHADOW_CALL_STACK
> > + mov x20, x18 // preserve the original shadow stack
> > +#endif
>
> Hmm, not sure about corrupting x20 here. Doesn't it hold the PMR value from
> kernel_entry?

You're right, and it's used in el1_irq after irq_handler if
CONFIG_ARM64_PSEUDO_NMI is enabled. Thanks for pointing this out.
Looks like one of x24-x29 should be safe here, and the comment needs
to be updated to explain why x20-x23 shouldn't be corrupted.

Sami

\
 
 \ /
  Last update: 2020-01-16 22:58    [W:0.205 / U:13.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site