1. 24 Apr, 2017 1 commit
  2. 23 Apr, 2017 2 commits
  3. 18 Apr, 2017 1 commit
    • Masahiro Yamada's avatar
      kbuild: avoid conflict between -ffunction-sections and -pg on gcc-4.7 · 90ad4052
      Masahiro Yamada authored
      Arnd Bergmann reported:
        "When ftrace is enabled and we build with gcc-4.7 or older, we
        get a warning for each file on architectures that select
        warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default]
      Since commit c3f0d0bc ("kbuild, LLVMLinux: Add -Werror to
      cc-option to support clang"), warnings are treated as errors in
      cc-option checks.  CC_FLAGS_FTRACE is blindly added to KBUILD_CFLAGS,
      so $(call cc-option,-ffunction-sections,) should be moved below it
      in order to detect the conflict between the two options.
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
  4. 12 Apr, 2017 1 commit
  5. 21 Mar, 2017 1 commit
  6. 14 Mar, 2017 1 commit
  7. 11 Mar, 2017 1 commit
  8. 05 Mar, 2017 1 commit
  9. 20 Feb, 2017 1 commit
  10. 19 Feb, 2017 1 commit
  11. 15 Feb, 2017 1 commit
  12. 12 Feb, 2017 1 commit
  13. 05 Feb, 2017 1 commit
  14. 03 Feb, 2017 1 commit
  15. 29 Jan, 2017 1 commit
  16. 26 Jan, 2017 1 commit
  17. 22 Jan, 2017 1 commit
  18. 16 Jan, 2017 1 commit
  19. 08 Jan, 2017 1 commit
  20. 01 Jan, 2017 1 commit
  21. 26 Dec, 2016 1 commit
  22. 11 Dec, 2016 1 commit
  23. 04 Dec, 2016 1 commit
  24. 02 Dec, 2016 1 commit
  25. 01 Dec, 2016 1 commit
  26. 27 Nov, 2016 1 commit
  27. 20 Nov, 2016 1 commit
  28. 15 Nov, 2016 1 commit
    • Borislav Petkov's avatar
      kbuild: Steal gcc's pie from the very beginning · c6a38553
      Borislav Petkov authored
      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: default avatarBorislav 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: default avatarMichal Marek <mmarek@suse.com>
  29. 13 Nov, 2016 1 commit
  30. 11 Nov, 2016 1 commit
    • Arnd Bergmann's avatar
      Kbuild: enable -Wmaybe-uninitialized warning for "make W=1" · a76bcf55
      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
      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 allmodconfig builds in v4.7
      and in v4.8-rc1, I had finally managed to address all warnings I get in
      an ARM allmodconfig build and most other maybe-uninitialized warnings
      for ARM randconfig builds.
      However, commit 6e8d666e ("Disable "maybe-uninitialized" warning
      globally") was merged at the same time and disabled it completely for
      all configurations, because of false-positive warnings on x86 that I had
      not addressed until then.  This caused a lot of actual bugs to get
      merged into mainline, and I sent several dozen patches for these during
      the v4.9 development cycle.  Most of these are actual bugs, some are for
      correct code that is safe because it is only called under external
      constraints that make it impossible to run into the case that gcc sees,
      and in a few cases gcc is just stupid and finds something that can
      obviously never happen.
      I have now done a few thousand randconfig builds on x86 and collected
      all patches that I needed to address every single warning I got (I can
      provide the combined patch for the other warnings if anyone is
      interested), so I hope we can get the warning back and let people catch
      the actual bugs earlier.
      This reverts the change to disable the warning completely and for now
      brings it back at the "make W=1" level, so we can get it merged into
      mainline without introducing false positives.  A follow-up patch enables
      it on all levels unless some configuration option turns it off because
      of false-positives.
      Link: https://rusty.ozlabs.org/?p=232 [1]
      Link: https://gcc.gnu.org/wiki/Better_Uninitialized_Warnings [2]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  31. 08 Nov, 2016 1 commit
    • Sebastian Andrzej Siewior's avatar
      kbuild: add -fno-PIE · 8ae94224
      Sebastian Andrzej Siewior authored
      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
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
  32. 05 Nov, 2016 1 commit
  33. 29 Oct, 2016 1 commit
  34. 24 Oct, 2016 1 commit
  35. 15 Oct, 2016 1 commit
  36. 12 Oct, 2016 1 commit
    • Linus Torvalds's avatar
      Disable the __builtin_return_address() warning globally after all · ef6000b4
      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: default avatarSteven 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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  37. 10 Oct, 2016 1 commit
  38. 02 Oct, 2016 1 commit
  39. 26 Sep, 2016 1 commit