18 Feb, 2017

1 commit


15 Feb, 2017

1 commit


09 Feb, 2017

1 commit


04 Feb, 2017

1 commit


01 Feb, 2017

1 commit


26 Jan, 2017

1 commit


20 Jan, 2017

1 commit


15 Jan, 2017

1 commit


12 Jan, 2017

1 commit


09 Jan, 2017

1 commit


06 Jan, 2017

1 commit


12 Dec, 2016

1 commit


05 Dec, 2016

1 commit


03 Dec, 2016

1 commit

  • When building a specific target such as bzImage, modules aren't normally
    built. However if CONFIG_TRIM_UNUSED_KSYMS is enabled, no built modules
    means none of the exported symbols are used and therefore they will all
    be trimmed away from the final kernel. A subsequent "make modules" will
    fail because modpost cannot find the needed symbols for those modules in
    the kernel binary.

    Let's make sure modules are also built whenever CONFIG_TRIM_UNUSED_KSYMS
    is enabled and that the kernel binary is properly rebuilt accordingly.

    Signed-off-by: Nicolas Pitre
    Tested-by: Jarod Wilson
    Signed-off-by: Linus Torvalds

    Nicolas Pitre
     

02 Dec, 2016

1 commit

  • Some people are able to trigger a race where autoksyms.h is used before
    its empty version is even created. Let's create it at the same time as
    the directory holding it is created.

    Signed-off-by: Nicolas Pitre
    Tested-by: Prarit Bhargava
    Tested-by: Jarod Wilson
    Signed-off-by: Linus Torvalds

    Nicolas Pitre
     

28 Nov, 2016

1 commit


21 Nov, 2016

1 commit


19 Nov, 2016

1 commit

  • Pull kbuild fixes from Michal Marek:
    "Here are some regression fixes for kbuild:

    - modversion support for exported asm symbols (Nick Piggin). The
    affected architectures need separate patches adding
    asm-prototypes.h.

    - fix rebuilds of lib-ksyms.o (Nick Piggin)

    - -fno-PIE builds (Sebastian Siewior and Borislav Petkov). This is
    not a kernel regression, but one of the Debian gcc package.
    Nevertheless, it's quite annoying, so I think it should go into
    mainline and stable now"

    * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: Steal gcc's pie from the very beginning
    kbuild: be more careful about matching preprocessed asm ___EXPORT_SYMBOL
    x86/kexec: add -fno-PIE
    scripts/has-stack-protector: add -fno-PIE
    kbuild: add -fno-PIE
    kbuild: modversions for EXPORT_SYMBOL() for asm
    kbuild: prevent lib-ksyms.o rebuilds

    Linus Torvalds
     

16 Nov, 2016

1 commit

  • 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
    Cc: stable@vger.kernel.org
    Cc: Ben Hutchings
    Cc: Sebastian Andrzej Siewior
    Signed-off-by: Michal Marek

    Borislav Petkov
     

14 Nov, 2016

1 commit


12 Nov, 2016

1 commit

  • 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 e74fc973b6e5 ("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 877417e6ffb9 ("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 6e8d666e9253 ("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: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

09 Nov, 2016

1 commit

  • 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.

    Cc: stable@vger.kernel.org
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Michal Marek

    Sebastian Andrzej Siewior
     

06 Nov, 2016

1 commit


30 Oct, 2016

1 commit


24 Oct, 2016

1 commit


16 Oct, 2016

1 commit


15 Oct, 2016

2 commits

  • …/kernel/git/shuah/linux-kselftest

    Pull kselftest updates from Shuah Khan:
    "This update consists of:

    - Fixes and improvements to existing tests

    - Moving code from Documentation to selftests, samples, and tools:

    * Moves dnotify_test, prctl, ptp, vDSO, ia64, watchdog, and
    networking tests from Documentation to selftests.

    * Moves mic/mpssd, misc-devices/mei, timers, watchdog, auxdisplay,
    and blackfin examples from Documentation to samples.

    * Moves accounting, laptops/dslm, and pcmcia/crc32hash tools from
    Documentation to tools.

    * Deletes BUILD_DOCSRC and its dependencies"

    * tag 'linux-kselftest-4.9-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (21 commits)
    selftests/futex: Check ANSI terminal color support
    Doc: update 00-INDEX files to reflect the runnable code move
    samples: move blackfin gptimers-example from Documentation
    tools: move pcmcia crc32hash tool from Documentation
    tools: move laptops dslm tool from Documentation
    tools: move accounting tool from Documentation
    samples: move auxdisplay example code from Documentation
    samples: move watchdog example code from Documentation
    samples: move timers example code from Documentation
    samples: move misc-devices/mei example code from Documentation
    samples: move mic/mpssd example code from Documentation
    selftests: Move networking/timestamping from Documentation
    selftests: move watchdog tests from Documentation/watchdog
    selftests: move ia64 tests from Documentation/ia64
    selftests: move vDSO tests from Documentation/vDSO
    selftests: move ptp tests from Documentation/ptp
    selftests: move prctl tests from Documentation/prctl
    selftests: move dnotify_test from Documentation/filesystems
    selftests/timers: Add missing error code assignment before test
    selftests/zram: replace ZRAM_LZ4_COMPRESS
    ...

    Linus Torvalds
     
  • Pull kbuild updates from Michal Marek:

    - EXPORT_SYMBOL for asm source by Al Viro.

    This does bring a regression, because genksyms no longer generates
    checksums for these symbols (CONFIG_MODVERSIONS). Nick Piggin is
    working on a patch to fix this.

    Plus, we are talking about functions like strcpy(), which rarely
    change prototypes.

    - Fixes for PPC fallout of the above by Stephen Rothwell and Nick
    Piggin

    - fixdep speedup by Alexey Dobriyan.

    - preparatory work by Nick Piggin to allow architectures to build with
    -ffunction-sections, -fdata-sections and --gc-sections

    - CONFIG_THIN_ARCHIVES support by Stephen Rothwell

    - fix for filenames with colons in the initramfs source by me.

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (22 commits)
    initramfs: Escape colons in depfile
    ppc: there is no clear_pages to export
    powerpc/64: whitelist unresolved modversions CRCs
    kbuild: -ffunction-sections fix for archs with conflicting sections
    kbuild: add arch specific post-link Makefile
    kbuild: allow archs to select link dead code/data elimination
    kbuild: allow architectures to use thin archives instead of ld -r
    kbuild: Regenerate genksyms lexer
    kbuild: genksyms fix for typeof handling
    fixdep: faster CONFIG_ search
    ia64: move exports to definitions
    sparc32: debride memcpy.S a bit
    [sparc] unify 32bit and 64bit string.h
    sparc: move exports to definitions
    ppc: move exports to definitions
    arm: move exports to definitions
    s390: move exports to definitions
    m68k: move exports to definitions
    alpha: move exports to actual definitions
    x86: move exports to actual definitions
    ...

    Linus Torvalds
     

13 Oct, 2016

1 commit

  • This affectively reverts commit 377ccbb48373 ("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
    Cc: Thomas Gleixner
    Cc: Andrew Morton
    Cc: Ingo Molnar
    Cc: Peter Anvin
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

10 Oct, 2016

1 commit

  • 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
    Acked-by: Jonathan Corbet
    Reviewed-by: Kees Cook
    Reported-by: Valentin Rothberg
    Reported-by: Paul Gortmaker
    Signed-off-by: Shuah Khan

    Shuah Khan
     

05 Oct, 2016

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "This is the documentation update pull for the 4.9 merge window.

    The Sphinx transition is still creating a fair amount of work. Here we
    have a number of fixes and, importantly, a proper PDF output solution,
    thanks to Jani Nikula, Mauro Carvalho Chehab and Markus Heiser.

    I've started a couple of new books: a driver API book (based on the
    old device-drivers.tmpl) and a development tools book. Both are meant
    to show how we can integrate together our existing documentation into
    a more coherent and accessible whole. It involves moving some stuff
    around and formatting changes, but, I think, the results are worth it.
    The good news is that most of our existing Documentation/*.txt files
    are *almost* in RST format already; the amount of messing around
    required is minimal.

    And, of course, there's the usual set of updates, typo fixes, and
    more"

    * tag 'docs-4.9' of git://git.lwn.net/linux: (120 commits)
    URL changed for Linux Foundation TAB
    dax : Fix documentation with respect to struct pages
    iio: Documentation: Correct the path used to create triggers.
    docs: Remove space-before-label guidance from CodingStyle
    docs-rst: add inter-document cross references
    Documentation/email-clients.txt: convert it to ReST markup
    Documentation/kernel-docs.txt: reorder based on timestamp
    Documentation/kernel-docs.txt: Add dates for online docs
    Documentation/kernel-docs.txt: get rid of broken docs
    Documentation/kernel-docs.txt: move in-kernel docs
    Documentation/kernel-docs.txt: remove more legacy references
    Documentation/kernel-docs.txt: add two published books
    Documentation/kernel-docs.txt: sort books per publication date
    Documentation/kernel-docs.txt: adjust LDD references
    Documentation/kernel-docs.txt: some improvements on the ReST output
    Documentation/kernel-docs.txt: Consistent indenting: 4 spaces
    Documentation/kernel-docs.txt: Add 4 paper/book references
    Documentation/kernel-docs.txt: Improve layouting of book list
    Documentation/kernel-docs.txt: Remove offline or outdated entries
    docs: Clean up bare :: lines
    ...

    Linus Torvalds
     

03 Oct, 2016

1 commit


26 Sep, 2016

1 commit


19 Sep, 2016

1 commit


12 Sep, 2016

1 commit


09 Sep, 2016

2 commits

  • 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
    Signed-off-by: Michal Marek

    Nicholas Piggin
     
  • 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
    Signed-off-by: Michal Marek

    Nicholas Piggin
     

05 Sep, 2016

1 commit


29 Aug, 2016

1 commit


23 Aug, 2016

1 commit