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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 22 Aug 2021 10:31:51 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     linux-kernel@...r.kernel.org
Cc:     linux-tip-commits@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Borislav Petkov <bp@...e.de>,
        Nathan Chancellor <nathan@...nel.org>, x86@...nel.org
Subject: Re: [tip: x86/build] x86/build: Remove stale cc-option checks


* tip-bot2 for Nick Desaulniers <tip-bot2@...utronix.de> wrote:

> The following commit has been merged into the x86/build branch of tip:
> 
> Commit-ID:     1463c2a27d59c69358ad1cbd869d3a8649695d8c
> Gitweb:        https://git.kernel.org/tip/1463c2a27d59c69358ad1cbd869d3a8649695d8c
> Author:        Nick Desaulniers <ndesaulniers@...gle.com>
> AuthorDate:    Thu, 12 Aug 2021 11:38:48 -07:00
> Committer:     Borislav Petkov <bp@...e.de>
> CommitterDate: Sun, 15 Aug 2021 10:32:52 +02:00
> 
> x86/build: Remove stale cc-option checks
> 
> -mpreferred-stack-boundary= is specific to GCC, while -mstack-alignment=
> is specific to Clang. Rather than test for this three times via
> cc-option and __cc-option, rely on CONFIG_CC_IS_* from Kconfig.
> 
> GCC did not support values less than 4 for -mpreferred-stack-boundary=
> until GCC 7+. Change the cc-option test to check for a value of 2,
> rather than 4.

> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -14,10 +14,13 @@ endif
>  
>  # For gcc stack alignment is specified with -mpreferred-stack-boundary,
>  # clang has the option -mstack-alignment for that purpose.
> -ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
> +ifdef CONFIG_CC_IS_GCC
> +ifneq ($(call cc-option, -mpreferred-stack-boundary=2),)
>        cc_stack_align4 := -mpreferred-stack-boundary=2
>        cc_stack_align8 := -mpreferred-stack-boundary=3
> -else ifneq ($(call cc-option, -mstack-alignment=16),)
> +endif
> +endif
> +ifdef CONFIG_CC_IS_CLANG
>        cc_stack_align4 := -mstack-alignment=4
>        cc_stack_align8 := -mstack-alignment=8

So I spent most of yesterday bisecting a hard to diagnose bug that looked 
like a GPU driver bug - but the bisect somewhat surprisingly ended up at 
this commit.

Doing the partial revert below solves the regression - as the above hunk is 
not obviously an identity transformation. I have a pretty usual GCC 10.3.0 
build environment with nothing exotic.

I amdended the commit with the partial revert in tip:x86/build.

Thanks,

	Ingo

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 0d33ba013683..88fb2bca6a3e 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -14,13 +14,10 @@ endif
 
 # For gcc stack alignment is specified with -mpreferred-stack-boundary,
 # clang has the option -mstack-alignment for that purpose.
-ifdef CONFIG_CC_IS_GCC
-ifneq ($(call cc-option, -mpreferred-stack-boundary=2),)
+ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
       cc_stack_align4 := -mpreferred-stack-boundary=2
       cc_stack_align8 := -mpreferred-stack-boundary=3
-endif
-endif
-ifdef CONFIG_CC_IS_CLANG
+else ifneq ($(call cc-option, -mstack-alignment=16),)
       cc_stack_align4 := -mstack-alignment=4
       cc_stack_align8 := -mstack-alignment=8
 endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ