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]
Date:   Wed, 13 Jan 2021 13:44:12 +0000
From:   Will Deacon <will@...nel.org>
To:     Mark Rutland <mark.rutland@....com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Arnd Bergmann <arnd@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Arnd Bergmann <arnd@...db.de>,
        Nathan Chancellor <natechancellor@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-arch@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH] arm64: make atomic helpers __always_inline

On Tue, Jan 12, 2021 at 10:23:12AM +0000, Mark Rutland wrote:
> On Fri, Jan 08, 2021 at 09:39:53PM +0100, Peter Zijlstra wrote:
> > On Fri, Jan 08, 2021 at 09:32:58AM +0000, Will Deacon wrote:
> > > Hi Arnd,
> > > 
> > > On Fri, Jan 08, 2021 at 10:19:56AM +0100, Arnd Bergmann wrote:
> > > > From: Arnd Bergmann <arnd@...db.de>
> > > > 
> > > > With UBSAN enabled and building with clang, there are occasionally
> > > > warnings like
> > > > 
> > > > WARNING: modpost: vmlinux.o(.text+0xc533ec): Section mismatch in reference from the function arch_atomic64_or() to the variable .init.data:numa_nodes_parsed
> > > > The function arch_atomic64_or() references
> > > > the variable __initdata numa_nodes_parsed.
> > > > This is often because arch_atomic64_or lacks a __initdata
> > > > annotation or the annotation of numa_nodes_parsed is wrong.
> > > > 
> > > > for functions that end up not being inlined as intended but operating
> > > > on __initdata variables. Mark these as __always_inline, along with
> > > > the corresponding asm-generic wrappers.
> > > 
> > > Hmm, I don't fully grok this. Why does it matter if a non '__init' function
> > > is called with a pointer to some '__initdata'? Or is the reference coming
> > > from somewhere else? (where?).
> > 
> > FWIW the x86 atomics are __always_inline in part due to the noinstr
> > crud, which I imagine resulted in much the same 'fun'.
> 
> FWIW, I was planning on doing the same here as part of making arm64
> noinstr safe, so I reckon we should probably do this regardless of
> whether it's a complete fix for the section mismatch issue.

Fair enough:

Acked-by: Will Deacon <will@...nel.org>

Will

Powered by blists - more mailing lists