Commit graph

1173 commits

Author SHA1 Message Date
Greg Kroah-Hartman
ece78cd779 Linux 4.4.78 2017-07-21 07:45:10 +02:00
Greg Kroah-Hartman
9e0499d7d3 Linux 4.4.77 2017-07-15 11:58:03 +02:00
Greg Kroah-Hartman
4282d39575 Linux 4.4.76 2017-07-05 14:39:21 +02:00
Gleb Fotengauer-Malinovskiy
736b342cc9 jump label: fix passing kbuild_cflags when checking for asm goto support
commit 7292ae3d5a18fb922be496e6bb687647193569b4 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: 35f860f9ba6a ("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-07-05 14:37:21 +02:00
Greg Kroah-Hartman
6ee496d721 Linux 4.4.75 2017-06-29 12:49:08 +02:00
Greg Kroah-Hartman
22da7ca81a Linux 4.4.74 2017-06-26 07:13:24 +02:00
Greg Kroah-Hartman
1bd30958ec Linux 4.4.73 2017-06-17 06:40:54 +02:00
David Lin
1948d0afe4 jump label: pass kbuild_cflags when checking for asm goto support
[ Upstream commit 35f860f9ba6aac56cc38e8b18916d833a83f1157 ]

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:39:36 +02:00
Greg Kroah-Hartman
30c9187fa8 Linux 4.4.72 2017-06-14 13:43:38 +02:00
Greg Kroah-Hartman
4bbbc76964 Linux 4.4.71 2017-06-07 12:06:14 +02:00
Greg Kroah-Hartman
b409ba3b05 Linux 4.4.70 2017-05-25 14:50:50 +02:00
Greg Kroah-Hartman
bb56ca2913 Linux 4.4.69 2017-05-20 14:27:22 +02:00
Greg Kroah-Hartman
be90e26014 Linux 4.4.68 2017-05-14 13:33:15 +02:00
Greg Kroah-Hartman
dec1dc2a0e Linux 4.4.67 2017-05-08 07:46:17 +02:00
Greg Kroah-Hartman
0c49a2c16c Linux 4.4.66 2017-05-02 21:20:09 -07:00
Greg Kroah-Hartman
418b99042b Linux 4.4.65 2017-04-30 05:50:11 +02:00
Greg Kroah-Hartman
12f4e1f54a Linux 4.4.64 2017-04-27 09:09:53 +02:00
Greg Kroah-Hartman
81af21fe95 Linux 4.4.63 2017-04-21 09:30:24 +02:00
Greg Kroah-Hartman
a80c068fbf Linux 4.4.62 2017-04-18 07:15:37 +02:00
Greg Kroah-Hartman
ec5e61608a Linux 4.4.61 2017-04-12 12:38:50 +02:00
Greg Kroah-Hartman
8f8ee9706b Linux 4.4.60 2017-04-08 09:53:53 +02:00
Greg Kroah-Hartman
61a4577c9a Linux 4.4.59 2017-03-31 10:17:09 +02:00
Greg Kroah-Hartman
0a5766a6a7 Linux 4.4.58 2017-03-30 09:36:33 +02:00
Greg Kroah-Hartman
a5c3f390eb Linux 4.4.57 2017-03-26 12:13:55 +02:00
Greg Kroah-Hartman
0136bca4e0 Linux 4.4.56 2017-03-22 12:17:51 +01:00
Greg Kroah-Hartman
28ec98bc2e Linux 4.4.55 2017-03-18 19:10:23 +08:00
Greg Kroah-Hartman
804a935963 Linux 4.4.54 2017-03-15 09:57:56 +08:00
Greg Kroah-Hartman
49616e7150 Linux 4.4.53 2017-03-12 06:37:49 +01:00
Greg Kroah-Hartman
dd4534d88b Linux 4.4.52 2017-02-26 11:08:29 +01:00
Greg Kroah-Hartman
f1924ac09c Linux 4.4.51 2017-02-23 17:43:20 +01:00
Greg Kroah-Hartman
c50b74d886 Linux 4.4.50 2017-02-18 16:39:37 +01:00
Greg Kroah-Hartman
702c0ce9a7 Linux 4.4.49 2017-02-14 15:23:09 -08:00
Greg Kroah-Hartman
6a1bd90632 Linux 4.4.48 2017-02-09 08:02:59 +01:00
Greg Kroah-Hartman
4686ea264f Linux 4.4.47 2017-02-04 09:45:26 +01:00
Greg Kroah-Hartman
6c1ed78cb0 Linux 4.4.46 2017-02-01 08:31:11 +01:00
Greg Kroah-Hartman
ef30573ef2 Linux 4.4.45 2017-01-26 08:24:03 +01:00
Greg Kroah-Hartman
a7dd347a67 Linux 4.4.44 2017-01-20 10:56:50 +01:00
Greg Kroah-Hartman
d9ea51a9be Linux 4.4.43 2017-01-15 13:41:49 +01:00
Greg Kroah-Hartman
49c4446a2e Linux 4.4.42 2017-01-12 11:23:02 +01:00
Greg Kroah-Hartman
cdd86b9722 Linux 4.4.41 2017-01-09 08:08:10 +01:00
Greg Kroah-Hartman
a3edc7b2e5 Linux 4.4.40 2017-01-06 11:16:31 +01:00
Greg Kroah-Hartman
a34f0e8a2f Linux 4.4.39 2016-12-15 08:49:34 -08:00
Greg Kroah-Hartman
c95b7f1fab Linux 4.4.38 2016-12-10 19:08:05 +01:00
Greg Kroah-Hartman
e5f84c1444 Linux 4.4.37 2016-12-08 07:15:46 +01:00
Greg Kroah-Hartman
87c6c6ef5b Linux 4.4.36 2016-12-02 09:09:18 +01:00
Greg Kroah-Hartman
0a5b451a53 Linux 4.4.35 2016-11-26 09:55:04 +01:00
Borislav Petkov
147117cf23 kbuild: Steal gcc's pie from the very beginning
commit c6a385539175ebc603da53aafb7753d39089f32e upstream.

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: Ben Hutchings <ben@decadent.org.uk>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-26 09:54:52 +01:00
Sebastian Andrzej Siewior
f740b5cc39 kbuild: add -fno-PIE
commit 8ae94224c9d72fc4d9aaac93b2d7833cf46d7141 upstream.

Debian started to build the gcc with -fPIE by default so the kernel
build ends before it starts properly with:
|kernel/bounds.c:1:0: error: code model kernel does not support PIC mode

Also add to KBUILD_AFLAGS due to:

|gcc -Wp,-MD,arch/x86/entry/vdso/vdso32/.note.o.d … -mfentry -DCC_USING_FENTRY … vdso/vdso32/note.S
|arch/x86/entry/vdso/vdso32/note.S:1:0: sorry, unimplemented: -mfentry isn’t supported for 32-bit in combination with -fpic

Tagging it stable so it is possible to compile recent stable kernels as
well.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-26 09:54:52 +01:00
Greg Kroah-Hartman
4eb9a81002 Linux 4.4.34 2016-11-21 10:06:53 +01:00
Greg Kroah-Hartman
86429bd405 Linux 4.4.33 2016-11-18 10:49:03 +01:00