1566 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
a4d0a0910e Linux 4.9.154 2019-01-31 08:12:37 +01:00
Greg Kroah-Hartman
189b75ad3f Linux 4.9.153 2019-01-26 09:38:36 +01:00
Greg Kroah-Hartman
ef50e3059a Linux 4.9.152 2019-01-23 08:10:57 +01:00
Greg Kroah-Hartman
008bfb9312 Linux 4.9.151 2019-01-16 22:12:33 +01:00
Greg Kroah-Hartman
df6062688e Linux 4.9.150 2019-01-13 10:03:55 +01:00
Greg Kroah-Hartman
8a12358ba0 Linux 4.9.149 2019-01-09 16:16:45 +01:00
Greg Kroah-Hartman
d99748864f Linux 4.9.148 2018-12-29 13:40:16 +01:00
Greg Kroah-Hartman
bbfc30f29c Linux 4.9.147 2018-12-21 14:11:40 +01:00
Greg Kroah-Hartman
0cff89461d Linux 4.9.146 2018-12-17 09:38:35 +01:00
Greg Kroah-Hartman
9c2f007c3c Linux 4.9.145 2018-12-13 09:20:30 +01:00
Stefan Agner
4c219af48b kbuild: allow to use GCC toolchain not in Clang search path
(commit ef8c4ed9db80261f397f0c0bf723684601ae3b52 upstream)

When using a GCC cross toolchain which is not in a compiled in
Clang search path, Clang reverts to the system assembler and
linker. This leads to assembler or linker errors, depending on
which tool is first used for a given architecture.

It seems that Clang is not searching $PATH for a matching
assembler or linker.

Make sure that Clang picks up the correct assembler or linker by
passing the cross compilers bin directory as search path.

This allows to use Clang provided by distributions with GCC
toolchains not in /usr/bin.

Link: https://github.com/ClangBuiltLinux/linux/issues/78
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-and-tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[ND: adjusted to context, due to adjusting the context of my previous
backport of upstream's ae6b289a3789]
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13 09:20:30 +01:00
Greg Kroah-Hartman
1aa861ff23 Linux 4.9.144 2018-12-08 13:05:15 +01:00
Stephen Rothwell
5e2669c978 disable stringop truncation warnings for now
commit 217c3e0196758662aa0429863b09d1c13da1c5d6 upstream.

They are too noisy

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-08 13:05:04 +01:00
Greg Kroah-Hartman
b136f0e9e9 Linux 4.9.143 2018-12-05 19:42:42 +01:00
Chris Fries
740f140b5d kbuild: Set KBUILD_CFLAGS before incl. arch Makefile
(commit ae6b289a37890909fea0e4a1666e19377fa0ed2c upstream)

Set the clang KBUILD_CFLAGS up before including arch/ Makefiles,
so that ld-options (etc.) can work correctly.

This fixes errors with clang such as ld-options trying to CC
against your host architecture, but LD trying to link against
your target architecture.

Signed-off-by: Chris Fries <cfries@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[ND: adjusted context due to upstream having removed code above where I
placed this block in this backport]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 19:42:42 +01:00
Greg Kroah-Hartman
68ae960f6d Linux 4.9.142 2018-12-01 09:44:27 +01:00
Greg Kroah-Hartman
bb2d990b6f Linux 4.9.141 2018-11-27 16:09:42 +01:00
Greg Kroah-Hartman
e186413178 Linux 4.9.140 2018-11-23 12:57:41 +01:00
Greg Kroah-Hartman
44caf8b346 Linux 4.9.139 2018-11-23 08:20:39 +01:00
Arnd Bergmann
86e514306b Kbuild: use -fshort-wchar globally
commit 8c97023cf0518f172b8cb7a9fffc28b89401abbf upstream.

Commit 971a69db7dc0 ("Xen: don't warn about 2-byte wchar_t in efi")
added the --no-wchar-size-warning to the Makefile to avoid this
harmless warning:

arm-linux-gnueabi-ld: warning: drivers/xen/efi.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

Changing kbuild to use thin archives instead of recursive linking
unfortunately brings the same warning back during the final link.

The kernel does not use wchar_t string literals at this point, and
xen does not use wchar_t at all (only efi_char16_t), so the flag
has no effect, but as pointed out by Jan Beulich, adding a wchar_t
string literal would be bad here.

Since wchar_t is always defined as u16, independent of the toolchain
default, always passing -fshort-wchar is correct and lets us
remove the Xen specific hack along with fixing the warning.

Link: https://patchwork.kernel.org/patch/9275217/
Fixes: 971a69db7dc0 ("Xen: don't warn about 2-byte wchar_t in efi")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:37 +01:00
Matthias Kaehlcke
ebcc69a97a kbuild: clang: Disable 'address-of-packed-member' warning
commit bfb38988c51e440fd7062ddf3157f7d8b1dd5d70 upstream.

clang generates plenty of these warnings in different parts of the code,
to an extent that the warnings are little more than noise. Disable the
'address-of-packed-member' warning.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:36 +01:00
Matthias Kaehlcke
0605d5ebde kbuild: Add __cc-option macro
commit 9f3f1fd299768782465cb32cdf0dd4528d11f26b upstream.

cc-option uses KBUILD_CFLAGS and KBUILD_CPPFLAGS when it determines
whether an option is supported or not. This is fine for options used to
build the kernel itself, however some components like the x86 boot code
use a different set of flags.

Add the new macro __cc-option which is a more generic version of
cc-option with additional parameters. One parameter is the compiler
with which the check should be performed, the other the compiler options
to be used instead KBUILD_C*FLAGS.

Refactor cc-option and hostcc-option to use __cc-option and move
hostcc-option to scripts/Kbuild.include.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:35 +01:00
Vinícius Tinti
85ab13ffcc kbuild: Add support to generate LLVM assembly files
commit 433db3e260bc8134d4a46ddf20b3668937e12556 upstream.

Add rules to kbuild in order to generate LLVM assembly files with the .ll
extension when using clang.

  # from c code
  make CC=clang kernel/pid.ll

Signed-off-by: Vinícius Tinti <viniciustinti@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:35 +01:00
Behan Webster
d438cec073 kbuild: use -Oz instead of -Os when using clang
commit 6748cb3c299de1ffbe56733647b01dbcc398c419 upstream.

This generates smaller resulting object code when compiled with clang.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:35 +01:00
Masahiro Yamada
c466d17e3a kbuild: drop -Wno-unknown-warning-option from clang options
commit a0ae981eba8f07dbc74bce38fd3a462b69a5bc8e upstream.

Since commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to
cc-option to support clang"), cc-option and friends work nicely
for clang.

However, -Wno-unknown-warning-option makes clang happy with any
unknown warning options even if -Werror is specified.

Once -Wno-unknown-warning-option is added, any succeeding call of
cc-disable-warning is evaluated positive, then unknown warning
options are accepted.  This should be dropped.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:35 +01:00
Michael Davidson
cd9a7644a3 kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
commit a37c45cd82e62a361706b9688a984a3a63957321 upstream.

The Linux Kernel relies on GCC's acceptance of inline assembly as an
opaque object which will not have any validation performed on the content.
The current behaviour in LLVM is to perform validation of the contents by
means of parsing the input if the MC layer can handle it.

Disable clangs integrated assembler and use the GNU assembler instead.

Wording-mostly-from: Saleem Abdulrasool <compnerd@compnerd.org>
Signed-off-by: Michael Davidson <md@google.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:34 +01:00
Behan Webster
7135c75e00 kbuild: Add better clang cross build support
commit 785f11aa595bc3d4e74096cbd598ada54ecc0d81 upstream.

Add cross target to CC if using clang. Also add custom gcc toolchain
path for fallback gcc tools.

Clang will fallback to using things like ld, as, and libgcc if
(respectively) one of the llvm linkers isn't available, the integrated
assembler is turned off, or an appropriately cross-compiled version of
compiler-rt isn't available. To this end, you can specify the path to
this fallback gcc toolchain with GCC_TOOLCHAIN.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:34 +01:00
Greg Kroah-Hartman
7a4dc3f839 Linux 4.9.138 2018-11-21 09:26:04 +01:00
Greg Kroah-Hartman
5552683784 Linux 4.9.137 2018-11-13 11:17:06 -08:00
Greg Kroah-Hartman
0bb1a5e5aa Linux 4.9.136 2018-11-10 07:43:01 -08:00
Greg Kroah-Hartman
b24c9962b1 Linux 4.9.135 2018-10-20 09:51:33 +02:00
Greg Kroah-Hartman
1d326a94d1 Linux 4.9.134 2018-10-18 09:13:26 +02:00
Greg Kroah-Hartman
deb3303f66 Linux 4.9.133 2018-10-13 09:18:59 +02:00
Greg Kroah-Hartman
3622426cc9 Linux 4.9.132 2018-10-10 08:53:23 +02:00
Greg Kroah-Hartman
cdd48f386d Linux 4.9.131 2018-10-03 17:01:55 -07:00
Greg Kroah-Hartman
46f9f7c3c3 Linux 4.9.130 2018-09-29 03:07:35 -07:00
Greg Kroah-Hartman
6ceccdf5ca Linux 4.9.129 2018-09-26 08:36:41 +02:00
Greg Kroah-Hartman
70915e25e1 Linux 4.9.128 2018-09-19 22:47:17 +02:00
Greg Kroah-Hartman
927556eb3a Linux 4.9.127 2018-09-15 09:43:07 +02:00
Greg Kroah-Hartman
66f5a871e5 Linux 4.9.126 2018-09-09 20:01:26 +02:00
Greg Kroah-Hartman
9eabacaf4c Linux 4.9.125 2018-09-05 09:20:11 +02:00
Greg Kroah-Hartman
e8d49e4292 Linux 4.9.124 2018-08-24 13:12:43 +02:00
Greg Kroah-Hartman
676054232e Linux 4.9.123 2018-08-22 07:47:16 +02:00
Greg Kroah-Hartman
ea101a7026 Linux 4.9.122 2018-08-18 10:47:20 +02:00
Greg Kroah-Hartman
d0e3227f31 Linux 4.9.121 2018-08-17 20:59:30 +02:00
Andrey Konovalov
76b6f30f94 kasan: don't emit builtin calls when sanitization is off
commit 0e410e158e5baa1300bdf678cea4f4e0cf9d8b94 upstream.

With KASAN enabled the kernel has two different memset() functions, one
with KASAN checks (memset) and one without (__memset).  KASAN uses some
macro tricks to use the proper version where required.  For example
memset() calls in mm/slub.c are without KASAN checks, since they operate
on poisoned slab object metadata.

The issue is that clang emits memset() calls even when there is no
memset() in the source code.  They get linked with improper memset()
implementation and the kernel fails to boot due to a huge amount of KASAN
reports during early boot stages.

The solution is to add -fno-builtin flag for files with KASAN_SANITIZE :=
n marker.

Link: http://lkml.kernel.org/r/8ffecfffe04088c52c42b92739c2bd8a0bcb3f5e.1516384594.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ Sami: Backported to 4.9 avoiding c5caf21ab0cf8 and e7c52b84fb ]
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-17 20:59:29 +02:00
Greg Kroah-Hartman
93e02ae420 Linux 4.9.120 2018-08-15 18:14:55 +02:00
Greg Kroah-Hartman
8f21ecb424 Linux 4.9.119 2018-08-09 12:18:00 +02:00
Greg Kroah-Hartman
e01202b36f Linux 4.9.118 2018-08-06 16:23:04 +02:00
Greg Kroah-Hartman
ddd28fff50 Linux 4.9.117 2018-08-03 07:55:27 +02:00