Commit graph

1233 commits

Author SHA1 Message Date
Greg Kroah-Hartman
c03917de04 4.9.39 2017-07-21 07:42:36 +02:00
Greg Kroah-Hartman
f0cd77ded5 Linux 4.9.38 2017-07-15 12:17:55 +02:00
Greg Kroah-Hartman
c48f76d680 Linux 4.9.37 2017-07-12 15:42:41 +02:00
Greg Kroah-Hartman
9f86f302ec Linux 4.9.36 2017-07-05 14:40:44 +02:00
Greg Kroah-Hartman
92905e331a Linux 4.9.35 2017-06-29 13:00:49 +02:00
Gleb Fotengauer-Malinovskiy
21eaaa76b7 jump label: fix passing kbuild_cflags when checking for asm goto support
commit 7292ae3d5a upstream.

The latest change of asm goto support check added passing of KBUILD_CFLAGS
to compiler.  When these flags reference gcc plugins that are not built yet,
the check fails.

When one runs "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, e.g.:

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!

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.

Reported-by: Anton V. Boyarshinov <boyarsh@altlinux.org>
Fixes: 35f860f9ba ("jump label: pass kbuild_cflags when checking for asm goto support")
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: David Lin <dtwlin@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 13:00:31 +02:00
Greg Kroah-Hartman
493ecd5cd7 Linux 4.9.34 2017-06-24 07:14:26 +02:00
Greg Kroah-Hartman
050639ef58 Linux 4.9.33 2017-06-17 06:43:47 +02:00
David Lin
3ec4141c68 jump label: pass kbuild_cflags when checking for asm goto support
[ Upstream commit 35f860f9ba ]

Some versions of ARM GCC compiler such as Android toolchain throws in a
'-fpic' flag by default.  This causes the gcc-goto check script to fail
although some config would have '-fno-pic' flag in the KBUILD_CFLAGS.

This patch passes the KBUILD_CFLAGS to the check script so that the
script does not rely on the default config from different compilers.

Link: http://lkml.kernel.org/r/20170120234329.78868-1-dtwlin@google.com
Signed-off-by: David Lin <dtwlin@google.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Michal Marek <mmarek@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-17 06:41:51 +02:00
Greg Kroah-Hartman
05afd4c0af Linux 4.9.32 2017-06-14 15:06:16 +02:00
Greg Kroah-Hartman
f1aa865ae5 Linux 4.9.31 2017-06-07 12:08:04 +02:00
Greg Kroah-Hartman
db3fd4527e Linux 4.9.30 2017-05-25 15:45:05 +02:00
Greg Kroah-Hartman
f5eea276d8 Linux 4.9.29 2017-05-20 14:28:55 +02:00
Greg Kroah-Hartman
58cd97ff37 Linux 4.9.28 2017-05-14 14:00:37 +02:00
Greg Kroah-Hartman
89f3b8d5f2 Linux 4.9.27 2017-05-08 07:48:32 +02:00
Greg Kroah-Hartman
d071951e08 Linux 4.9.26 2017-05-03 08:36:50 -07:00
Greg Kroah-Hartman
a8c90ef622 Linux 4.9.25 2017-04-27 09:11:26 +02:00
Greg Kroah-Hartman
2f5e58ec79 Linux 4.9.24 2017-04-21 09:31:39 +02:00
Greg Kroah-Hartman
c3582cc56e Linux 4.9.23 2017-04-18 07:12:30 +02:00
Greg Kroah-Hartman
cf2586e60e Linux 4.9.22 2017-04-12 12:41:42 +02:00
Arnd Bergmann
c4fe79a44a Kbuild: use cc-disable-warning consistently for maybe-uninitialized
commit b334e19ae9 upstream.

In commit a76bcf557e ("Kbuild: enable -Wmaybe-uninitialized warning
for "make W=1""), I reverted another change that happened to fix a problem
with old compilers, and now we get this report again with old compilers
(prior to gcc-4.8) and GCOV enabled:

   cc1: warnings being treated as errors
   drivers/gpu/drm/i915/intel_ringbuffer.c: In function 'intel_ring_setup_status_page':
   drivers/gpu/drm/i915/intel_ringbuffer.c:438: error: 'mmio.reg' may be used uninitialized in this function
   At top level:
>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"

The problem is that we turn off the warning conditionally in a number
of places as we should, but one of them does it unconditionally.
Instead, change it to call cc-disable-warning as we do elsewhere.

The original patch that caused it was merged into linux-4.7, then
4.8 removed the change and 4.9 brought it back, so we probably want
a backport to 4.9 once this is merged.

Use a ':=' assignment instead of '=' to force the cc-disable-warning
call to only be evaluated once instead of every time.

Fixes: a76bcf557e ("Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"")
Fixes: e72e2dfe7c ("gcov: disable -Wmaybe-uninitialized warning")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-12 12:41:12 +02:00
Greg Kroah-Hartman
37feaf8095 Linux 4.9.21 2017-04-08 09:31:27 +02:00
Greg Kroah-Hartman
f676772746 Linux 4.9.20 2017-03-31 10:32:02 +02:00
Greg Kroah-Hartman
c8e131605d Linux 4.9.19 2017-03-30 09:41:57 +02:00
Greg Kroah-Hartman
2a486264b7 Linux 4.9.18 2017-03-26 13:06:11 +02:00
Greg Kroah-Hartman
c3825da143 Linux 4.9.17 2017-03-22 12:44:07 +01:00
Greg Kroah-Hartman
8a16224b40 Linux 4.9.16 2017-03-18 19:15:30 +08:00
Greg Kroah-Hartman
d962bf8dd9 Linux 4.9.15 2017-03-15 10:03:13 +08:00
Greg Kroah-Hartman
d379ab2707 Linux 4.9.14 2017-03-12 06:42:15 +01:00
Greg Kroah-Hartman
3737a5f722 Linux 4.9.13 2017-02-26 11:11:18 +01:00
Greg Kroah-Hartman
ae7d43192f Linux 4.9.12 2017-02-23 17:44:51 +01:00
Greg Kroah-Hartman
eee1550b3e Linux 4.9.11 2017-02-18 15:11:56 +01:00
Greg Kroah-Hartman
390caeedd4 Linux 4.9.10 2017-02-14 15:26:10 -08:00
Greg Kroah-Hartman
d2e4b66b4e Linux 4.9.9 2017-02-09 08:08:40 +01:00
Greg Kroah-Hartman
c8ea2f3b82 Linux 4.9.8 2017-02-04 09:47:29 +01:00
Greg Kroah-Hartman
fd2ffe57dd Linux 4.9.7 2017-02-01 08:33:31 +01:00
Greg Kroah-Hartman
09f886dc5a Linux 4.9.6 2017-01-26 08:25:24 +01:00
Greg Kroah-Hartman
40bf0662fe Linux 4.9.5 2017-01-20 10:56:02 +01:00
Greg Kroah-Hartman
75353ac8ff Linux 4.9.4 2017-01-15 13:43:07 +01:00
Greg Kroah-Hartman
584fd7872c Linux 4.9.3 2017-01-12 11:41:42 +01:00
Greg Kroah-Hartman
6f2fabab8d Linux 4.9.2 2017-01-09 08:32:38 +01:00
Greg Kroah-Hartman
6437abdb62 Linux 4.9.1 2017-01-06 10:40:28 +01:00
Linus Torvalds
69973b8308 Linux 4.9 2016-12-11 11:17:54 -08:00
Linus Torvalds
3e5de27e94 Linux 4.9-rc8 2016-12-04 12:50:51 -08:00
Nicolas Pitre
8655639240 kbuild: fix building bzImage with CONFIG_TRIM_UNUSED_KSYMS enabled
When building a specific target such as bzImage, modules aren't normally
built.  However if CONFIG_TRIM_UNUSED_KSYMS is enabled, no built modules
means none of the exported symbols are used and therefore they will all
be trimmed away from the final kernel.  A subsequent "make modules" will
fail because modpost cannot find the needed symbols for those modules in
the kernel binary.

Let's make sure modules are also built whenever CONFIG_TRIM_UNUSED_KSYMS
is enabled and that the kernel binary is properly rebuilt accordingly.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-02 14:46:42 -08:00
Nicolas Pitre
d3fc425e81 kbuild: make sure autoksyms.h exists early
Some people are able to trigger a race where autoksyms.h is used before
its empty version is even created.  Let's create it at the same time as
the directory holding it is created.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Prarit Bhargava <prarit@redhat.com>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-01 10:19:22 -08:00
Linus Torvalds
e5517c2a5a Linux 4.9-rc7 2016-11-27 13:08:04 -08:00
Linus Torvalds
9c763584b7 Linux 4.9-rc6 2016-11-20 13:52:19 -08:00
Linus Torvalds
04e36857d6 Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild fixes from Michal Marek:
 "Here are some regression fixes for kbuild:

   - modversion support for exported asm symbols (Nick Piggin). The
     affected architectures need separate patches adding
     asm-prototypes.h.

   - fix rebuilds of lib-ksyms.o (Nick Piggin)

   - -fno-PIE builds (Sebastian Siewior and Borislav Petkov). This is
     not a kernel regression, but one of the Debian gcc package.
     Nevertheless, it's quite annoying, so I think it should go into
     mainline and stable now"

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: Steal gcc's pie from the very beginning
  kbuild: be more careful about matching preprocessed asm ___EXPORT_SYMBOL
  x86/kexec: add -fno-PIE
  scripts/has-stack-protector: add -fno-PIE
  kbuild: add -fno-PIE
  kbuild: modversions for EXPORT_SYMBOL() for asm
  kbuild: prevent lib-ksyms.o rebuilds
2016-11-18 16:45:21 -08:00
Borislav Petkov
c6a3855391 kbuild: Steal gcc's pie from the very beginning
So Sebastian turned off the PIE for kernel builds but that was too late
- Kbuild.include already uses KBUILD_CFLAGS and trying to disable gcc
options with, say cc-disable-warning, fails:

  gcc -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
  ...
  -Wno-sign-compare -fno-asynchronous-unwind-tables -Wframe-address -c -x c /dev/null -o .31392.tmp
  /dev/null:1:0: error: code model kernel does not support PIC mode

because that returns an error and we can't disable the warning. For
example in this case:

KBUILD_CFLAGS   += $(call cc-disable-warning,frame-address,)

which leads to gcc issuing all those warnings again.

So let's turn off PIE/PIC at the earliest possible moment, when we
declare KBUILD_CFLAGS so that cc-disable-warning picks it up too.

Also, we need the $(call cc-option ...) because -fno-PIE is supported
since gcc v3.4 and our lowest supported gcc version is 3.2 right now.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: stable@vger.kernel.org
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-11-15 17:08:14 +01:00