lkml.org 
[lkml]   [2018]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 5/6] Initialize the mapping of KASan shadow memory
On Mon, 2 Apr 2018, Russell King - ARM Linux wrote:

> On Mon, Apr 02, 2018 at 02:08:13PM -0400, Nicolas Pitre wrote:
> > On Mon, 2 Apr 2018, Abbott Liu wrote:
> >
> > > index c79b829..20161e2 100644
> > > --- a/arch/arm/kernel/head-common.S
> > > +++ b/arch/arm/kernel/head-common.S
> > > @@ -115,6 +115,9 @@ __mmap_switched:
> > > str r8, [r2] @ Save atags pointer
> > > cmp r3, #0
> > > strne r10, [r3] @ Save control register values
> > > +#ifdef CONFIG_KASAN
> > > + bl kasan_early_init
> > > +#endif
> > > mov lr, #0
> > > b start_kernel
> > > ENDPROC(__mmap_switched)
> >
> > Would be better if lr was cleared before calling kasan_early_init.
>
> No. The code is correct - please remember that "bl" writes to LR.

You're right of course.

/me giving up on patch review and going back to bed


Nicolas

\
 
 \ /
  Last update: 2018-04-02 20:20    [W:0.047 / U:4.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site