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: <20170310120422.14e19269@gandalf.local.home>
Date:   Fri, 10 Mar 2017 12:04:22 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Gleb Fotengauer-Malinovskiy <glebfm@...linux.org>
Cc:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        David Lin <dtwlin@...gle.com>,
        "Anton V. Boyarshinov" <boyarsh@...linux.org>,
        "Dmitry V. Levin" <ldv@...linux.org>,
        Michal Marek <mmarek@...e.com>, linux-kbuild@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] jump label: fix passing kbuild_cflags when checking for
 asm goto support

On Fri, 10 Mar 2017 19:24:18 +0300
Gleb Fotengauer-Malinovskiy <glebfm@...linux.org> wrote:

> The latest change of asm goto support check added passing of
> KBUILD_CFLAGS to compiler.  When these flags reference gcc plugins,
> there is a race condition between the build of these plugins and their
> use in this asm goto support check.
> 
> This change moves the check before all these references are added
> to KBUILD_CFLAGS.  This is correct because subsequent KBUILD_CFLAGS
> modifications are not relevant to this check.

What exactly breaks when the race happens?

-- Steve

> 
> Reported-by: Anton V. Boyarshinov <boyarsh@...linux.org>
> Fixes: 35f860f9ba6a ("jump label: pass kbuild_cflags when checking for asm goto support")
> Cc: stable@...r.kernel.org	# v4.10
> Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@...linux.org>
> Signed-off-by: Dmitry V. Levin <ldv@...linux.org>
> ---
>  Makefile | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 165cf97..7e3aade 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -653,6 +653,12 @@ KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, \
>  # Tell gcc to never replace conditional load with a non-conditional one
>  KBUILD_CFLAGS	+= $(call cc-option,--param=allow-store-data-races=0)
>  
> +# check for 'asm goto'
> +ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
> +	KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
> +	KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
> +endif
> +
>  include scripts/Makefile.gcc-plugins
>  
>  ifdef CONFIG_READABLE_ASM
> @@ -798,12 +804,6 @@ KBUILD_CFLAGS   += $(call cc-option,-Werror=incompatible-pointer-types)
>  # use the deterministic mode of AR if available
>  KBUILD_ARFLAGS := $(call ar-option,D)
>  
> -# check for 'asm goto'
> -ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
> -	KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
> -	KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
> -endif
> -
>  include scripts/Makefile.kasan
>  include scripts/Makefile.extrawarn
>  include scripts/Makefile.ubsan
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ