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:	Thu, 23 Aug 2007 13:03:18 +0100
From:	Andy Whitcroft <apw@...dowen.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Mel Gorman <mel@....ul.ie>, linux-kernel@...r.kernel.org,
	Sam Ravnborg <sam@...nborg.org>, Andi Kleen <ak@...e.de>
Subject: Re: 2.6.23-rc3-mm1

On Wed, Aug 22, 2007 at 11:10:29AM -0700, Andrew Morton wrote:
[...]
> >   CC      arch/x86_64/kernel/asm-offsets.s
> > arch/x86_64/kernel/asm-offsets.c:1: error: -mpreferred-stack-boundary=3
> > is not between 4 and 12
> > make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
[...]
> x86_64-mm-less-stack-alignment.patch has
> 
> cflags-y += $(call cc-option,-mpreferred-stack-boundary=3)
> 
> So we _should_ have detected that gcc didn't like =3, so it
> should not have been used.
> 
> I am suspecting a kbuild glitch: asm-offsets.c tends to be handled
> in special ways (ie: it's usually the thing which blows up first)
> so perhaps it is somehow avoiding the above does-gcc-support-this test.
> 
> Suitable cc's added ;)

It seems that this is a problem caused by the way we check for
compiler options in x86_64.  Each compiler flag is checked for
individually and if available added to cflags-y, later that is
added to CFLAGS.  However, this means that each flag is checked
in total isolation.  On x86_64 (on this compiler at least) the
-mpreferred-stack-boundary and -m{32,64} flags are actually mutually
dependant, the alignment constraints vary based on the word size.
This leads to the compile failure:

    # gcc -mpreferred-stack-boundary=3 -S -xc /dev/null  -o FOO
    # echo $?
    0
    # gcc -m64 -mpreferred-stack-boundary=3 -S -xc /dev/null  -o FOO
    /dev/null:1: error: -mpreferred-stack-boundary=3 is not between 4 and 12
    # echo $?
    1

In the main Makefile we always add each flag directly to CFLAGS
which means we check them all in combination, perhaps this is
prudent here also?  Either way I suspect that changing the -m64
check to add itself directly to CFLAGS will fix this us.

-apw
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ