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:   Tue, 5 Jun 2018 17:10:17 +0300
From:   "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Zi Yan <zi.yan@...rutgers.edu>,
        Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: mark native_set_p4d() as __always_inline

On Tue, Jun 05, 2018 at 11:35:15AM +0000, Arnd Bergmann wrote:
> When CONFIG_OPTIMIZE_INLINING is enabled, the function native_set_p4d()
> may not be fully inlined into the caller, resulting in a false-positive
> warning about an access to the __pgtable_l5_enabled variable from a
> non-__init function, despite the original caller being an __init function:
> 
> WARNING: vmlinux.o(.text.unlikely+0x1429): Section mismatch in reference from the function native_set_p4d() to the variable .init.data:__pgtable_l5_enabled
> WARNING: vmlinux.o(.text.unlikely+0x1429): Section mismatch in reference from the function native_p4d_clear() to the variable .init.data:__pgtable_l5_enabled
> The function native_set_p4d() references
> the variable __initdata __pgtable_l5_enabled.
> This is often because native_set_p4d lacks a __initdata
> annotation or the annotation of __pgtable_l5_enabled is wrong.
> 
> Marking the native_set_p4d function and its caller native_p4d_clear()
> avoids this problem.
> 
> I did not bisect the original cause, but I assume this is related to
> the recent rework that turned pgtable_l5_enabled() into an inline
> function, which in turn caused the compiler to make different inlining
> decisions.
> 
> Fixes: ad3fe525b950 ("x86/mm: Unify pgtable_l5_enabled usage in early boot code")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks for fixing this.

Acked-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>

Do you have a clue which native_set_p4d() call causes the issue?

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ