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: <20161117224445.n3nerymee5jnrq75@treble>
Date:   Thu, 17 Nov 2016 16:44:45 -0600
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     x86@...nel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: avoid warning for zero-filling .bss

On Thu, Nov 17, 2016 at 11:32:30PM +0100, Arnd Bergmann wrote:
> On Thursday, November 17, 2016 3:02:48 PM CET Josh Poimboeuf wrote:
> > On Wed, Nov 16, 2016 at 03:17:09PM +0100, Arnd Bergmann wrote:
> > > The latest binutils are warning about a .fill directive with an explicit
> > > value in a .bss section:
> > > 
> > > arch/x86/kernel/head_32.S: Assembler messages:
> > > arch/x86/kernel/head_32.S:677: Warning: ignoring fill value in section `.bss..page_aligned'
> > > arch/x86/kernel/head_32.S:679: Warning: ignoring fill value in section `.bss..page_aligned'
> > > 
> > > This comes from the 'ENTRY()' macro padding the space between the symbols
> > > with 'nop'. Open-coding the .globl directive without the padding
> > > avoids that warning.
> > 
> > How is there space between the symbols?  Aren't they already aligned?
> 
> My understanding is that they are aligned, it's just that gas complains
> about the .align directive with a nonzero fill value.

Ah, I see now.  In that case your patch looks fine to me.

Reviewed-by: Josh Poimboeuf <jpoimboe@...hat.com>

> 
> > Isn't the warning really about the fact that it's unnecessarily filling
> > a .bss section with zeros?  Would it make sense to use .align instead?
> 
> Filling with zeroes is allowed, and that's what we are intending anyway.
> .align would not do the right thing here as it only adds padding if it's
> not already aligned, but we know it is.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ