- 13 Nov, 2016 1 commit
-
-
Linus Torvalds authored
-
- 11 Nov, 2016 1 commit
-
-
Arnd Bergmann authored
Traditionally, we have always had warnings about uninitialized variables enabled, as this is part of -Wall, and generally a good idea [1], but it also always produced false positives, mainly because this is a variation of the halting problem and provably impossible to get right in all cases [2]. Various people have identified cases that are particularly bad for false positives, and in commit e74fc973 ("Turn off -Wmaybe-uninitialized when building with -Os"), I turned off the warning for any build that was done with CC_OPTIMIZE_FOR_SIZE. This drastically reduced the number of false positive warnings in the default build but unfortunately had the side effect of turning the warning off completely in 'allmodconfig' builds, which in turn led to a lot of warnings (both actual bugs, and remaining false positives) to go in unnoticed. With commit 877417e6 ("Kbuild: change CC_OPTIMIZE_FOR_SIZE definition") enabled the warning again for allmodcon...
-
- 05 Nov, 2016 1 commit
-
-
Linus Torvalds authored
-
- 29 Oct, 2016 1 commit
-
-
Linus Torvalds authored
-
- 24 Oct, 2016 1 commit
-
-
Linus Torvalds authored
-
- 15 Oct, 2016 1 commit
-
-
Linus Torvalds authored
-
- 12 Oct, 2016 1 commit
-
-
Linus Torvalds authored
This affectively reverts commit 377ccbb4 ("Makefile: Mute warning for __builtin_return_address(>0) for tracing only") because it turns out that it really isn't tracing only - it's all over the tree. We already also had the warning disabled separately for mm/usercopy.c (which this commit also removes), and it turns out that we will also want to disable it for get_lock_parent_ip(), that is used for at least TRACE_IRQFLAGS. Which (when enabled) ends up being all over the tree. Steven Rostedt had a patch that tried to limit it to just the config options that actually triggered this, but quite frankly, the extra complexity and abstraction just isn't worth it. We have never actually had a case where the warning is actually useful, so let's just disable it globally and not worry about it. Acked-by:
Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Anvin <hpa@zytor.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 10 Oct, 2016 1 commit
-
-
Shuah Khan authored
Move blackfin gptimers-example to samples and remove it from Documentation Makefile. Update samples Kconfig and Makefile to build gptimers-example. blackfin is the last CONFIG_BUILD_DOCSRC target in Documentation/Makefile. Hence this patch also includes changes to remove CONFIG_BUILD_DOCSRC from Makefile and lib/Kconfig.debug and updates VIDEO_PCI_SKELETON dependency on BUILD_DOCSRC. Documentation/Makefile is not deleted to avoid braking make htmldocs and make distclean. Acked-by:
Michal Marek <mmarek@suse.com> Acked-by:
Jonathan Corbet <corbet@lwn.net> Reviewed-by:
Kees Cook <keescook@chromium.org> Reported-by:
Valentin Rothberg <valentinrothberg@gmail.com> Reported-by:
Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by:
Shuah Khan <shuahkh@osg.samsung.com>
-
- 02 Oct, 2016 1 commit
-
-
Linus Torvalds authored
-
- 26 Sep, 2016 1 commit
-
-
Linus Torvalds authored
-
- 19 Sep, 2016 1 commit
-
-
Linus Torvalds authored
-
- 12 Sep, 2016 1 commit
-
-
Linus Torvalds authored
-
- 09 Sep, 2016 2 commits
-
-
Nicholas Piggin authored
Allow architectures to create arch/xxx/Makefile.postlink with targets for vmlinux, modules.ko, and clean, which will be invoked after final linking of vmlinux and modules. powerpc will use this to check vmlinux linker relocations for sanity, and may use it to fix up alternate instruction patch branch addresses. Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Signed-off-by:
Michal Marek <mmarek@suse.com>
-
Nicholas Piggin authored
Introduce LD_DEAD_CODE_DATA_ELIMINATION option for architectures to select to build with -ffunction-sections, -fdata-sections, and link with --gc-sections. It requires some work (documented) to ensure all unreferenced entrypoints are live, and requires toolchain and build verification, so it is made a per-arch option for now. On a random powerpc64le build, this yelds a significant size saving, it boots and runs fine, but there is a lot I haven't tested as yet, so these savings may be reduced if there are bugs in the link. text data bss dec filename 11169741 1180744 1923176 14273661 vmlinux 10445269 1004127 1919707 13369103 vmlinux.dce ~700K text, ~170K data, 6% removed from kernel image size. Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Signed-off-by:
Michal Marek <mmarek@suse.com>
-
- 04 Sep, 2016 1 commit
-
-
Linus Torvalds authored
-
- 28 Aug, 2016 1 commit
-
-
Linus Torvalds authored
-
- 22 Aug, 2016 1 commit
-
-
Mauro Carvalho Chehab authored
Sphinx supports LaTeX output. Sometimes, it is interesting to call it directly, instead of also generating a PDF. As it comes for free, add a target for it. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- 21 Aug, 2016 1 commit
-
-
Linus Torvalds authored
-
- 15 Aug, 2016 1 commit
-
-
Linus Torvalds authored
-
- 09 Aug, 2016 1 commit
-
-
Kees Cook authored
When the compiler doesn't support gcc plugins (either due to missing headers or too old a version), report the problem and abort the build instead of emitting a warning and letting the build founder with arcane compiler errors. Signed-off-by:
Kees Cook <keescook@chromium.org>
-
- 08 Aug, 2016 1 commit
-
-
Linus Torvalds authored
-
- 02 Aug, 2016 1 commit
-
-
Steven Rostedt authored
With the latest gcc compilers, they give a warning if __builtin_return_address() parameter is greater than 0. That is because if it is used by a function called by a top level function (or in the case of the kernel, by assembly), it can try to access stack frames outside the stack and crash the system. The tracing system uses __builtin_return_address() of up to 2! But it is well aware of the dangers that it may have, and has even added precautions to protect against it (see the thunk code in arch/x86/entry/thunk*.S) Linus originally added KBUILD_CFLAGS that would suppress the warning for the entire kernel, as simply adding KBUILD_CFLAGS to the tracing directory wouldn't work. The tracing directory plays a bit with the CFLAGS and requires a little more logic. This adds that special logic to only suppress the warning for the tracing directory. If it is used anywhere else outside of tracing, the warning will still be triggered. Link: http://lkml.kernel.org/r/20160728223043.51996267@grimm.local.home Tested-by:
Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by:
Steven Rostedt <rostedt@goodmis.org>
-
- 28 Jul, 2016 2 commits
-
-
Mauro Carvalho Chehab authored
Now that all media documentation was converted to Sphinx, we should get rid of the old DocBook one, as we don't want people to submit patches against the old stuff. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com>
-
Linus Torvalds authored
Newer versions of gcc warn about the use of __builtin_return_address() with a non-zero argument when "-Wall" is specified: kernel/trace/trace_irqsoff.c: In function ‘stop_critical_timings’: kernel/trace/trace_irqsoff.c:433:86: warning: calling ‘__builtin_return_address’ with a nonzero argument is unsafe [-Wframe-address] stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1); [ .. repeats a few times for other similar cases .. ] It is true that a non-zero argument is somewhat dangerous, and we do not actually have very many uses of that in the kernel - but the ftrace code does use it, and as Stephen Rostedt says: "We are well aware of the danger of using __builtin_return_address() of > 0. In fact that's part of the reason for having the "thunk" code in x86 (See arch/x86/entry/thunk_{64,32}.S). [..] it adds extra frames when tracking irqs off sections, to prevent __builtin_return_address() from accessing bad areas. In fact the thunk_32.S states: 'Trampoline to trace irqs off. (otherwise CALLER_ADDR1 might crash)'." For now, __builtin_return_address() with a non-zero argument is the best we can do, and the warning is not helpful and can end up making people miss other warnings for real problems. So disable the frame-address warning on compilers that need it. Acked-by:
Steven Rostedt <rostedt@goodmis.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 27 Jul, 2016 1 commit
-
-
Linus Torvalds authored
Several build configurations had already disabled this warning because it generates a lot of false positives. But some had not, and it was still enabled for "allmodconfig" builds, for example. Looking at the warnings produced, every single one I looked at was a false positive, and the warnings are frequent enough (and big enough) that they can easily hide real problems that you don't notice in the noise generated by -Wmaybe-uninitialized. The warning is good in theory, but this is a classic case of a warning that causes more problems than the warning can solve. If gcc gets better at avoiding false positives, we may be able to re-enable this warning. But as is, we're better off without it, and I want to be able to see the *real* warnings. Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 26 Jul, 2016 2 commits
-
-
Kees Cook authored
Before, the stack protector flag was sanity checked before .config had been reprocessed. This meant the build couldn't be aborted early, and only a warning could be emitted followed later by the compiler blowing up with an unknown flag. This has caused a lot of confusion over time, so this splits the flag selection from sanity checking and performs the sanity checking after the make has been restarted from a reprocessed .config, so builds can be aborted as early as possible now. Additionally moves the x86-specific sanity check to the same location, since it suffered from the same warn-then-wait-for-compiler-failure problem. Link: http://lkml.kernel.org/r/20160712223043.GA11664@www.outflux.net Signed-off-by:
Kees Cook <keescook@chromium.org> Cc: Michal Marek <mmarek@suse.com> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Kees Cook authored
Before, the stack protector flag was sanity checked before .config had been reprocessed. This meant the build couldn't be aborted early, and only a warning could be emitted followed later by the compiler blowing up with an unknown flag. This has caused a lot of confusion over time, so this splits the flag selection from sanity checking and performs the sanity checking after the make has been restarted from a reprocessed .config, so builds can be aborted as early as possible now. Additionally moves the x86-specific sanity check to the same location, since it suffered from the same warn-then-wait-for-compiler-failure problem. Signed-off-by:
Kees Cook <keescook@chromium.org> Signed-off-by:
Michal Marek <mmarek@suse.com>
-
- 24 Jul, 2016 1 commit
-
-
Linus Torvalds authored
-
- 22 Jul, 2016 1 commit
-
-
Arnd Bergmann authored
Olof's build test setup keeps failing to compile arm64 kernels because of a toolchain that uses outdated kernel headers: /work/build/batch/samples/seccomp/bpf-fancy.c:13:27: fatal error: linux/seccomp.h: No such file or directory This is of course something he could change, but it also indicates that others may run into the same problem. Running 'make headers_install' avoids the issue by ensuring that the kernel headers are put into the $(objdir)/usr/include path before we build the samples. The same problem happened for the Documentation build in the past and was fixed up with commit 8e2faea8 ("Make Documenation depend on headers_install"). This adds an identical Makefile dependency for the samples/ subdirectory. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Michal Marek <mmarek@suse.com>
-
- 18 Jul, 2016 2 commits
-
-
Arnd Bergmann authored
When $(LINUXINCLUDE) is added to the cflags of a target that normall doesn't have it (e.g. HOSTCFLAGS), each entry in the list is expanded so that we search both $(objtree) and $(srctree), which is a bit silly, as we already know which of the two we want for each entry in LINUXINCLUDE. Also, a follow-up patch changes the behavior so we only look in $(srctree) for manually added include path, and that breaks finding the generated headers. This adds an explicit $(objtree) for each tree that we want to look for generated files. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Michal Marek <mmarek@suse.com>
-
Arnd Bergmann authored
arch/$(hdr-arch)/include/generated/uapi is included twice in the header search path, which is unnecessary, so this changes the top-level Makefile to drop the second instance by filtering out everything from USERINCLUDE that was already part of LINUXINCLUDE. This should have very little effect other than making the 'make V=1' output slightly smaller and making the build time faster by a miniscule amount, but it seems to be cleaner. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Michal Marek <mmarek@suse.com>
-
- 11 Jul, 2016 1 commit
-
-
Linus Torvalds authored
-
- 04 Jul, 2016 1 commit
-
-
Linus Torvalds authored
-
- 01 Jul, 2016 1 commit
-
-
Jani Nikula authored
This was broken when updating the documentation targets for the Sphinx build, and moving from %docs target pattern to explicitly listed targets. Cc: Markus Heiser <markus.heiser@darmarit.de> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Fixes: 22cba31b ("Documentation/sphinx: add basic working Sphinx configuration and build") Signed-off-by:
Jani Nikula <jani.nikula@intel.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- 27 Jun, 2016 1 commit
-
-
Linus Torvalds authored
-
- 23 Jun, 2016 1 commit
-
-
Jani Nikula authored
While there's slight overlap with the DocBook help now, this can stay intact when the DocBook help goes away. Signed-off-by:
Jani Nikula <jani.nikula@intel.com>
-
- 21 Jun, 2016 1 commit
-
-
Jean Delvare authored
On openSUSE, the libelf development files are in package libelf-devel. Signed-off-by:
Jean Delvare <jdelvare@suse.de> Acked-by:
Josh Poimboeuf <jpoimboe@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Michal Marek <mmarek@suse.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/n/tip-s8nyk3pyy2927sd7qp7u42oi@git.kernel.org Signed-off-by:
Arnaldo Carvalho de Melo <acme@redhat.com>
-
- 20 Jun, 2016 1 commit
-
-
Linus Torvalds authored
-
- 12 Jun, 2016 1 commit
-
-
Linus Torvalds authored
-
- 07 Jun, 2016 1 commit
-
-
Michal Marek authored
The NOSTDINC_FLAGS variable is exported, so it needs to be cleared to avoid duplicating its content when running make from within make (e.g. in the packaging targets). This became an issue after commit 9c8fa9bc ("kbuild: fix if_change and friends to consider argument order"), which no longer ignores the duplicate options. As Paulo Zanoni points out, the LDFLAGS_vmlinux variable has the same problem. Reported-by:
"Zanoni, Paulo R" <paulo.r.zanoni@intel.com> Fixes: 9c8fa9bc ("kbuild: fix if_change and friends to consider argument order") Signed-off-by:
Michal Marek <mmarek@suse.com>
-