lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180402181536.GJ16141@n2100.armlinux.org.uk>
Date:   Mon, 2 Apr 2018 19:15:37 +0100
From:   Russell King - ARM Linux <linux@...linux.org.uk>
To:     Nicolas Pitre <nicolas.pitre@...aro.org>
Cc:     Abbott Liu <liuwenliang@...wei.com>, kstewart@...uxfoundation.org,
        tixy@...aro.org, grygorii.strashko@...aro.org,
        julien.thierry@....com, Catalin Marinas <catalin.marinas@....com>,
        linux@...musvillemoes.dk, dhowells@...hat.com, linux-mm@...ck.org,
        mark.rutland@....com, kvmarm@...ts.cs.columbia.edu,
        f.fainelli@...il.com, Jonathan Corbet <corbet@....net>,
        linux-doc@...r.kernel.org, kasan-dev@...glegroups.com,
        geert@...ux-m68k.org, linux-arm-kernel@...ts.infradead.org,
        zhichao.huang@...aro.org, aryabinin@...tuozzo.com,
        labbott@...hat.com, vladimir.murzin@....com, keescook@...omium.org,
        Arnd Bergmann <arnd@...db.de>, marc.zyngier@....com,
        philip@....systems, jinb.park7@...il.com, opendmb@...il.com,
        tglx@...utronix.de, dvyukov@...gle.com, ard.biesheuvel@...aro.org,
        gregkh@...uxfoundation.org, mawilcox@...rosoft.com,
        linux-kernel@...r.kernel.org, alexander.levin@...izon.com,
        james.morse@....com, kirill.shutemov@...ux.intel.com,
        pombredanne@...b.com, Andrew Morton <akpm@...ux-foundation.org>,
        thgarnie@...gle.com, christoffer.dall@...aro.org
Subject: Re: [PATCH v3 5/6] Initialize the mapping of KASan shadow memory

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.

The point of clearing LR here is to ensure that start_kernel is called
with a zero link register, which it won't be if kasan_early_init is
moved after it.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ