lkml.org 
[lkml]   [2017]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] jump label: fix passing kbuild_cflags when checking for asm goto support
On Fri, Mar 10, 2017 at 12:04:22PM -0500, Steven Rostedt wrote:
> On Fri, 10 Mar 2017 19:24:18 +0300
> Gleb Fotengauer-Malinovskiy <glebfm@altlinux.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?

Actually, this is not quite a race. When you run "make bzImage" followed
by "make modules", the kernel is always built with HAVE_JUMP_LABEL
disabled, while the modules are built depending on CONFIG_JUMP_LABEL.
If HAVE_JUMP_LABEL macro happens to be different, modules are built
with undefined references:

ERROR: "static_key_slow_inc" [net/netfilter/xt_TEE.ko] undefined!
ERROR: "static_key_slow_dec" [net/netfilter/xt_TEE.ko] undefined!
ERROR: "static_key_slow_dec" [net/netfilter/nft_meta.ko] undefined!
ERROR: "static_key_slow_inc" [net/netfilter/nft_meta.ko] undefined!
ERROR: "nf_hooks_needed" [net/netfilter/ipvs/ip_vs.ko] undefined!
ERROR: "nf_hooks_needed" [net/ipv6/ipv6.ko] undefined!
ERROR: "static_key_count" [net/ipv6/ipv6.ko] undefined!
ERROR: "static_key_slow_inc" [net/ipv6/ipv6.ko] undefined!
ERROR: "nf_hooks_needed" [net/decnet/decnet.ko] undefined!

--
glebfm

\
 
 \ /
  Last update: 2017-03-10 18:42    [W:0.074 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site