1549 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
775dfa8c1c Linux 4.9.221 2020-05-02 17:23:20 +02:00
Greg Kroah-Hartman
0661b3d6cf Linux 4.9.220 2020-04-24 07:59:16 +02:00
Greg Kroah-Hartman
5188957a31 Linux 4.9.219 2020-04-13 10:32:59 +02:00
Greg Kroah-Hartman
a5ad06fc4b Linux 4.9.218 2020-04-02 17:20:41 +02:00
Greg Kroah-Hartman
10a20903d7 Linux 4.9.217 2020-03-20 09:07:59 +01:00
Greg Kroah-Hartman
19c646f01e Linux 4.9.216 2020-03-11 07:53:14 +01:00
Greg Kroah-Hartman
4cd444443b Linux 4.9.215 2020-02-28 15:42:57 +01:00
Greg Kroah-Hartman
7ce439266f Linux 4.9.214 2020-02-14 16:31:10 -05:00
Greg Kroah-Hartman
0e96b1eb0e Linux 4.9.213 2020-02-05 13:05:57 +00:00
Greg Kroah-Hartman
6f8dc95670 Linux 4.9.212 2020-01-29 10:24:41 +01:00
Greg Kroah-Hartman
80f0831c72 Linux 4.9.211 2020-01-23 08:19:43 +01:00
Greg Kroah-Hartman
36fa7559a1 Linux 4.9.210 2020-01-14 20:04:32 +01:00
Greg Kroah-Hartman
753a4bcdbe Linux 4.9.209 2020-01-12 11:24:28 +01:00
Greg Kroah-Hartman
e77ff35fa7 Linux 4.9.208 2020-01-04 13:41:15 +01:00
Greg Kroah-Hartman
5b7a2c7d46 Linux 4.9.207 2019-12-21 10:42:35 +01:00
Masahiro Yamada
b1335cdef4 kbuild: fix single target build for external module
[ Upstream commit e07db28eea38ed4e332b3a89f3995c86b713cb5b ]

Building a single target in an external module fails due to missing
.tmp_versions directory.

For example,

  $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o

will fail in the following way:

  CC [M]  /home/masahiro/foo/foo.o
/bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent

This is because $(cmd_crmodverdir) is executed only before building
/, %/, %.ko single targets of external modules. Create .tmp_versions
in the 'prepare' target.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-21 10:41:18 +01:00
Greg Kroah-Hartman
de84c554e3 Linux 4.9.206 2019-12-05 15:35:34 +01:00
Greg Kroah-Hartman
6620daa748 Linux 4.9.205 2019-11-29 09:31:25 +01:00
Greg Kroah-Hartman
95e55e41e6 Linux 4.9.204 2019-11-28 18:29:06 +01:00
Greg Kroah-Hartman
a777e9dd40 Linux 4.9.203 2019-11-25 09:53:54 +01:00
Greg Kroah-Hartman
a86e4a77b5 Linux 4.9.202 2019-11-16 10:29:58 +01:00
Greg Kroah-Hartman
9829ecfd82 Linux 4.9.201 2019-11-12 19:16:25 +01:00
Greg Kroah-Hartman
574a61d201 Linux 4.9.200 2019-11-10 11:23:33 +01:00
Seth Forshee
0446b0300c kbuild: add -fcf-protection=none when using retpoline flags
[ Upstream commit 29be86d7f9cb18df4123f309ac7857570513e8bc ]

The gcc -fcf-protection=branch option is not compatible with
-mindirect-branch=thunk-extern. The latter is used when
CONFIG_RETPOLINE is selected, and this will fail to build with
a gcc which has -fcf-protection=branch enabled by default. Adding
-fcf-protection=none when building with retpoline enabled
prevents such build failures.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-10 11:23:30 +01:00
Masahiro Yamada
2e1dff7b0d kbuild: use -fmacro-prefix-map to make __FILE__ a relative path
[ Upstream commit a73619a845d5625079cc1b3b820f44c899618388 ]

The __FILE__ macro is used everywhere in the kernel to locate the file
printing the log message, such as WARN_ON(), etc.  If the kernel is
built out of tree, this can be a long absolute path, like this:

  WARNING: CPU: 1 PID: 1 at /path/to/build/directory/arch/arm64/kernel/foo.c:...

This is because Kbuild runs in the objtree instead of the srctree,
then __FILE__ is expanded to a file path prefixed with $(srctree)/.

Commit 9da0763bdd82 ("kbuild: Use relative path when building in a
subdir of the source tree") improved this to some extent; $(srctree)
becomes ".." if the objtree is a child of the srctree.

For other cases of out-of-tree build, __FILE__ is still the absolute
path.  It also means the kernel image depends on where it was built.

A brand-new option from GCC, -fmacro-prefix-map, solves this problem.
If your compiler supports it, __FILE__ is the relative path from the
srctree regardless of O= option.  This provides more readable log and
more reproducible builds.

Please note __FILE__ is always an absolute path for external modules.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-10 11:23:30 +01:00
Kees Cook
a250cab009 Kbuild: make designated_init attribute fatal
[ Upstream commit c834f0e8a8bb3025aac38e802fca2e686720f544 ]

If a structure is marked with __attribute__((designated_init)) from
GCC or Sparse, it needs to have all static initializers using designated
initialization. Fail the build for any missing cases. This attribute will
be used by the randstruct plugin to make sure randomized structures are
being correctly initialized.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-10 11:23:29 +01:00
Greg Kroah-Hartman
352b498db8 Linux 4.9.199 2019-11-06 12:18:29 +01:00
Greg Kroah-Hartman
9e48f0c28d Linux 4.9.198 2019-10-29 09:15:27 +01:00
Greg Kroah-Hartman
364ef83db0 Linux 4.9.197 2019-10-17 13:42:47 -07:00
Greg Kroah-Hartman
140fcbee3e Linux 4.9.196 2019-10-07 18:53:25 +02:00
Greg Kroah-Hartman
6eea609ac3 Linux 4.9.195 2019-10-05 12:30:37 +02:00
Greg Kroah-Hartman
1b2be6d75a Linux 4.9.194 2019-09-21 07:14:23 +02:00
Greg Kroah-Hartman
779cde69dc Linux 4.9.193 2019-09-16 08:19:34 +02:00
Greg Kroah-Hartman
5ce2e06002 Linux 4.9.192 2019-09-10 10:31:05 +01:00
Greg Kroah-Hartman
bf489db05e Linux 4.9.191 2019-09-06 10:19:54 +02:00
Greg Kroah-Hartman
228e87c35b Linux 4.9.190 2019-08-25 10:51:53 +02:00
Greg Kroah-Hartman
4bd718dba6 Linux 4.9.189 2019-08-11 12:22:20 +02:00
Greg Kroah-Hartman
fa897d1731 Linux 4.9.188 2019-08-06 18:29:42 +02:00
Masahiro Yamada
757ee02703 kbuild: initialize CLANG_FLAGS correctly in the top Makefile
commit 5241ab4cf42d3a93b933b55d3d53f43049081fa1 upstream.

CLANG_FLAGS is initialized by the following line:

  CLANG_FLAGS     := --target=$(notdir $(CROSS_COMPILE:%-=%))

..., which is run only when CROSS_COMPILE is set.

Some build targets (bindeb-pkg etc.) recurse to the top Makefile.

When you build the kernel with Clang but without CROSS_COMPILE,
the same compiler flags such as -no-integrated-as are accumulated
into CLANG_FLAGS.

If you run 'make CC=clang' and then 'make CC=clang bindeb-pkg',
Kbuild will recompile everything needlessly due to the build command
change.

Fix this by correctly initializing CLANG_FLAGS.

Fixes: 238bcbc4e07f ("kbuild: consolidate Clang compiler flags")
Cc: <stable@vger.kernel.org> # v5.0+
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-06 18:29:40 +02:00
Greg Kroah-Hartman
97d7530b83 Linux 4.9.187 2019-08-04 09:33:45 +02:00
Nathan Chancellor
7caebf6db7 kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS
[ Upstream commit 589834b3a0097a4908f4112eac0ca2feb486fa32 ]

In commit ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI
drift"), the arm64 Makefile added -Wno-psabi to KBUILD_CFLAGS, which is
a GCC only option so clang rightfully complains:

warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option]

https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option

However, by default, this is merely a warning so the build happily goes
on with a slew of these warnings in the process.

Commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to cc-option to
support clang") worked around this behavior in cc-option by adding
-Werror so that unknown flags cause an error. However, this all happens
silently and when an unknown flag is added to the build unconditionally
like -Wno-psabi, cc-option will always fail because there is always an
unknown flag in the list of flags. This manifested as link time failures
in the arm64 libstub because -fno-stack-protector didn't get added to
KBUILD_CFLAGS.

To avoid these weird cryptic failures in the future, make clang behave
like gcc and immediately error when it encounters an unknown flag by
adding -Werror=unknown-warning-option to CLANG_FLAGS. This can be added
unconditionally for clang because it is supported by at least 3.0.0,
according to godbolt [1] and 4.0.0, according to its documentation [2],
which is far earlier than we typically support.

[1]: https://godbolt.org/z/7F7rm3
[2]: https://releases.llvm.org/4.0.0/tools/clang/docs/DiagnosticsReference.html#wunknown-warning-option

Link: https://github.com/ClangBuiltLinux/linux/issues/511
Link: https://github.com/ClangBuiltLinux/linux/issues/517
Suggested-by: Peter Smith <peter.smith@linaro.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-08-04 09:33:38 +02:00
Greg Kroah-Hartman
35c308d782 Linux 4.9.186 2019-07-21 09:06:09 +02:00
Greg Kroah-Hartman
9c51e1102c Linux 4.9.185 2019-07-10 09:55:47 +02:00
Linus Torvalds
7601d81506 gcc-9: silence 'address-of-packed-member' warning
commit 6f303d60534c46aa1a239f29c321f95c83dda748 upstream.

We already did this for clang, but now gcc has that warning too.  Yes,
yes, the address may be unaligned.  And that's kind of the point.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-10 09:55:28 +02:00
Greg Kroah-Hartman
09a7068360 Linux 4.9.184 2019-06-27 08:14:21 +08:00
Greg Kroah-Hartman
72f67fd749 Linux 4.9.183 2019-06-22 08:17:25 +02:00
Greg Kroah-Hartman
f4e2dd989e Linux 4.9.182 2019-06-17 19:53:33 +02:00
Greg Kroah-Hartman
3ffb2407c5 Linux 4.9.181 2019-06-11 12:22:50 +02:00
Greg Kroah-Hartman
b16a5334ed Linux 4.9.180 2019-05-31 06:48:32 -07:00
Greg Kroah-Hartman
2584e66ffb Linux 4.9.179 2019-05-25 18:26:58 +02:00