12 Jan, 2017

1 commit

  • commit 81d873a87114b05dbb74d1fbf0c4322ba4bfdee4 upstream.

    This updates gcc-common.h from Emese Revfy for gcc 7. This fixes issues seen
    by Kugan and Arnd. Build tested with gcc 5.4 and 7 snapshot.

    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

09 Jan, 2017

2 commits

  • commit 79e51b5c2deea542b3bb8c66e0d502230b017dde upstream.

    Currently it is impossible to edit the value of a config symbol with a
    prompt longer than (terminal width - 2) characters. dialog_inputbox()
    calculates a negative x-offset for the input window and newwin() fails
    as this is invalid. It also doesn't check for this failure, so it
    busy-loops calling wgetch(NULL) which immediately returns -1.

    The additions in the offset calculations also don't match the intended
    size of the window.

    Limit the window size and calculate the offset similarly to
    show_scroll_win().

    Fixes: 692d97c380c6 ("kconfig: new configuration interface (nconfig)")
    Signed-off-by: Ben Hutchings
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     
  • commit 9988f4d577f42f43b7612d755477585f35424af7 upstream.

    This fixes build errors seen on gcc-4.9.3 or gcc-5.3.1 for an ARM:

    arm-soc/init/initramfs.c: In function 'error':
    arm-soc/init/initramfs.c:50:1: error: unrecognizable insn:
    }
    ^
    (insn 26 25 27 5 (set (reg:SI 111 [ local_entropy.243 ])
    (rotatert:SI (reg:SI 116 [ local_entropy.243 ])
    (const_int -30 [0xffffffffffffffe2]))) -1
    (nil))

    Patch from PaX Team

    Reported-by: Arnd Bergmann
    Reported-by: Brad Spengler
    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

06 Jan, 2017

1 commit

  • commit 152b695d74376bfe55cd2a6265ccc75b0d39dd19 upstream.

    Both Debian and kernel archs are "arm64" but UTS_MACHINE and gcc say
    "aarch64". Recognizing just the latter should be enough but let's
    accept both in case something regresses again or an user sets
    UTS_MACHINE=arm64.

    Regressed in cfa88c7: arm64: Set UTS_MACHINE in the Makefile.

    Signed-off-by: Adam Borowski
    Acked-by: Riku Voipio
    Signed-off-by: Michal Marek
    Signed-off-by: Greg Kroah-Hartman

    Adam Borowski
     

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
     

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
     

12 Nov, 2016

4 commits

  • Merge fixes for -Wmaybe-uninitialized from Arnd Bergmann:
    "It took a while for some patches to make it into mainline through
    maintainer trees, but the 28-patch series is now reduced to 10, with
    one tiny patch added at the end.

    Aside from patches that are no longer required, I did these changes
    compared to version 1:

    - Dropped "iio: maxim_thermocouple: detect invalid storage size in
    read()", which is currently in linux-next as commit 32cb7d27e65d.
    This is the only remaining warning I see for a couple of corner
    cases (kbuild bot reports it on blackfin, kernelci bot and arm-soc
    bot both report it on arm64)

    - Dropped "brcmfmac: avoid maybe-uninitialized warning in
    brcmf_cfg80211_start_ap", which is currently in net/master merge
    pending.

    - Dropped two x86 patches, "x86: math-emu: possible uninitialized
    variable use" and "x86: mark target address as output in 'insb'
    asm" as they do not seem to trigger for a default build, and I got
    no feedback on them. Both of these are ancient issues and seem
    harmless, I will send them again to the x86 maintainers once the
    rest is merged.

    - Dropped "rbd: false-postive gcc-4.9 -Wmaybe-uninitialized" based on
    feedback from Ilya Dryomov, who already has a different fix queued
    up for v4.10. The kbuild bot reports this as a warning for xtensa.

    - Replaced "crypto: aesni: avoid -Wmaybe-uninitialized warning" with
    a simpler patch, this one always triggers but my first solution
    would not be safe for linux-4.9 any more at this point. I'll follow
    up with the larger patch as a cleanup for 4.10.

    - Replaced "dib0700: fix nec repeat handling" with a better one,
    contributed by Sean Young"

    * -Wmaybe-uninitialized fixes:
    Kbuild: enable -Wmaybe-uninitialized warnings by default
    pcmcia: fix return value of soc_pcmcia_regulator_set
    infiniband: shut up a maybe-uninitialized warning
    crypto: aesni: shut up -Wmaybe-uninitialized warning
    rc: print correct variable for z8f0811
    dib0700: fix nec repeat handling
    s390: pci: don't print uninitialized data for debugging
    nios2: fix timer initcall return value
    x86: apm: avoid uninitialized data
    NFSv4.1: work around -Wmaybe-uninitialized warning
    Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"

    Linus Torvalds
     
  • Previously the warnings were added back at the W=1 level and above, this
    now turns them on again by default, assuming that we have addressed all
    warnings and again have a clean build for v4.10.

    I found a number of new warnings in linux-next already and submitted
    bugfixes for those. Hopefully they are caught by the 0day builder in
    the future as soon as this patch is merged.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • 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
     
  • Fix piping output to a program which quickly exits (read: head -n1)

    $ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux | head -n1
    add/remove: 0/0 grow/shrink: 9/60 up/down: 124/-305 (-181)
    close failed in file object destructor:
    sys.excepthook is missing
    lost sys.stderr

    Link: http://lkml.kernel.org/r/20161028204618.GA29923@avx2
    Signed-off-by: Alexey Dobriyan
    Cc: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

10 Nov, 2016

2 commits

  • The CRC code for asm exports grabs the preprocessed asm, finds the
    ___EXPORT_SYMBOL and turns those into EXPORT_SYMBOL in a C program
    that can be preprocessed and parsed to create the CRC signatures from
    the type.

    The existing regex matching and replacement is too strict, and doesn't
    deal well with whitespace among other things. The line
    " EXPORT_SYMBOL(sym)" in a .S file would not match due to initial
    whitespace, for example, which resulted in x86's ___preempt_schedule
    failing to get CRCs.

    Reported-by: Philip Müller
    Signed-off-by: Nicholas Piggin
    Signed-off-by: Michal Marek

    Nicholas Piggin
     
  • Adding -no-PIE to the fstack protector check. -no-PIE was introduced
    before -fstack-protector so there is no need for a runtime check.

    Without it the build stops:
    |Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong available but compiler is broken

    due to -mcmodel=kernel + -fPIE if -fPIE is enabled by default.

    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
     

01 Nov, 2016

3 commits


23 Oct, 2016

1 commit


16 Oct, 2016

1 commit

  • Pull gcc plugins update from Kees Cook:
    "This adds a new gcc plugin named "latent_entropy". It is designed to
    extract as much possible uncertainty from a running system at boot
    time as possible, hoping to capitalize on any possible variation in
    CPU operation (due to runtime data differences, hardware differences,
    SMP ordering, thermal timing variation, cache behavior, etc).

    At the very least, this plugin is a much more comprehensive example
    for how to manipulate kernel code using the gcc plugin internals"

    * tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    latent_entropy: Mark functions with __latent_entropy
    gcc-plugins: Add latent_entropy plugin

    Linus Torvalds
     

15 Oct, 2016

2 commits

  • Pull misc kbuild changes from Michal Marek:
    "Just a few patches on the kbuild.git#misc branch this time:

    - New Coccinelle patch by Nicholas Mc Guire
    - Existing patch fixes by Julia Lawall
    - Minor comment fix by Markus Elfring"

    * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    Coccinelle: flag conditions with no effect
    scripts/coccicheck: Update reference for the corresponding documentation
    Coccinelle: pm_runtime: ensure relevance of pm_runtime reports
    Coccinelle: limit memdup_user transformation to GFP_KERNEL case

    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
     

12 Oct, 2016

14 commits

  • Vim, with the omnicppcomplete(#1) plugin, can do code completion using
    information build by ctags. Add flags needed by omnicppcomplete(#2) to
    have completion on member of structure.

    1: https://github.com/vim-scripts/omnicppcomplete
    2: https://github.com/vim-scripts/OmniCppComplete/blob/master/doc/omnicppcomplete.txt#L93

    Link: http://lkml.kernel.org/r/20160830191546.4469-1-mathieu.maret@gmail.com
    Signed-off-by: Mathieu Maret
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Maret
     
  • The function calls with octal permissions commonly span multiple lines.
    The current test is line oriented and fails to find some matches.

    Make the test use the $stat variable instead of the $line variable to span
    multiple lines.

    Also add a few functions to the known functions with permissions list.

    Move the SYMBOLIC_PERMS test to a separate section to find all the S_
    permissions in any form not just those that have specific function names.

    This can now find and fix permissions uses like:
    .mode = S_ | S_;

    Link: http://lkml.kernel.org/r/b51bab60530912aae4ac420119d465c5b206f19f.1475030406.git.joe@perches.com
    Signed-off-by: Joe Perches
    Tested-by: Ramiro Oliveira
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Function definitions without identifiers like
    int foo(int)
    are not preferred. Emit a warning when they occur.

    Link: http://lkml.kernel.org/r/94fe6378504745991b650f48fc92bb4648f25706.1474925354.git.joe@perches.com
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • It is possible for a multiple line macro definition to have a false positive
    report when an argument is used on a line after a continuation \.

    This line might have a leading '+' as the initial character that could be
    confused by checkpatch as an operator.

    Avoid the leading character on multiple line macro definitions.

    Link: http://lkml.kernel.org/r/60229d13399f9b6509db5a32e30d4c16951a60cd.1473836073.git.joe@perches.com
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add a test for macro arguents that have a non-comma leading or trailing
    operator where the argument isn't parenthesized to avoid possible precedence
    issues.

    Link: http://lkml.kernel.org/r/47715508972f8d786f435e583ff881dbeee3a114.1473745855.git.joe@perches.com
    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Cc: Julia Lawall
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • If a macro argument is used multiple times in the macro definition, the
    macro argument may have an unexpected side-effect.

    Add a test (MACRO_ARG_REUSE) for that condition which is only
    emitted with command-line option --strict.

    Link: http://lkml.kernel.org/r/b6d67a87cafcafd15499e91780dc63b15dec0aa0.1473744906.git.joe@perches.com
    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Cc: Julia Lawall
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • An "uninitialized value" is emitted when a block comment starts on
    the same line as a statement.

    Fix this and make the test use a little fewer cpu cycles too.

    Link: http://lkml.kernel.org/r/3c9993320c2182d37f53ac540878cfef59c3f62d.1473365956.git.joe@perches.com
    Signed-off-by: Joe Perches
    Reported-by: Charlemagne Lasse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Adding -f to the get_maintainer.pl invocation means git isn't invoked
    by get_maintainer.pl for known filenames.

    This reduces the overall time to run checkpatch.

    Link: http://lkml.kernel.org/r/22991e3a295aeb399b43af0478b6e5809106ccee.1472684066.git.joe@perches.com
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Using const is generally a good idea.

    Julia Lawall has created a list of always const and almost always const
    structs in the kernel sources.

    Link: https://lkml.org/lkml/2016/8/28/95

    Add the most frequently used (> 50 cases) that are almost always or
    always const.

    Link: http://lkml.kernel.org/r/1e16020f8027654db0095bbfbcc11da51025365c.1472664220.git.joe@perches.com
    Signed-off-by: Joe Perches
    Acked-by: Kees Cook
    Cc: Julia Lawall
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Make it easier to add new structs that should be const.

    Link: http://lkml.kernel.org/r/e5a8da43e7c11525bafbda1ca69a8323614dd942.1472664220.git.joe@perches.com
    Signed-off-by: Joe Perches
    Cc: Julia Lawall
    Cc: Kees Cook
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • < sigh > Comment these tests out.

    These are just too enticing to people that don't verify that
    both source and dest addresses really must be __aligned(2).

    It helps make Dan Carpenter happy too.

    Link: http://lkml.kernel.org/r/dc32ec66d24647f4cdf824c8dfbbc59aa7ce7b7d.1472665676.git.joe@perches.com
    Signed-off-by: Joe Perches
    Cc: Dan Carpenter
    Cc: Greg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Warn when block comments are not aligned on the *

    /*
    * block comment, no warning
    */

    /*
    * block comment, emit warning
    */

    Link: http://lkml.kernel.org/r/edb57bd330adfe024b95ec2a807d4aa7f0c8b112.1472261299.git.joe@perches.com
    Signed-off-by: Joe Perches
    Reported-by: Sudip Mukherjee
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • S_ uses should be avoided where octal is more intelligible.

    Linus didst say:

    : It's *much* easier to parse and understand the octal numbers, while the
    : symbolic macro names are just random line noise and hard as hell to
    : understand. You really have to think about it.
    :
    : So we should rather go the other way: convert existing bad symbolic
    : permission bit macro use to just use the octal numbers.
    :
    : The symbolic names are good for the *other* bits (ie sticky bit, and the
    : inode mode _type_ numbers etc), but for the permission bits, the symbolic
    : names are just insane crap. Nobody sane should ever use them. Not in the
    : kernel, not in user space.
    (http://lkml.kernel.org/r/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com)

    Link: http://lkml.kernel.org/r/7232ef011d05a92f4caa86a5e9830d87966a2eaf.1470180926.git.joe@perches.com
    Signed-off-by: Joe Perches
    Cc: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Use get_maintainer to check the status of individual files. If
    "obsolete", suggest leaving the files alone.

    Link: http://lkml.kernel.org/r/7ceaa510dc9d2df05ec4b456baed7bb1415550b3.1471889575.git.joe@perches.com
    Signed-off-by: Joe Perches
    Cc: SF Markus Elfring
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

11 Oct, 2016

3 commits

  • Report code constructs where the if and else branch are functionally
    identical. In cases where this is intended it really should be
    documented - most reported cases probably are bugs.

    Signed-off-by: Nicholas Mc Guire
    Signed-off-by: Michal Marek

    Nicholas Mc Guire
     
  • Use the current name (in a comment at the beginning of this script) for
    the file which was converted to the documentation format "reStructuredText"
    in August 2016.

    Fixes: 4b9033a33494 ("docs: sphinxify coccinelle.txt and add it to dev-tools")
    Signed-off-by: Markus Elfring
    Acked-by: Julia Lawall
    Signed-off-by: Michal Marek

    Markus Elfring
     
  • This adds a new gcc plugin named "latent_entropy". It is designed to
    extract as much possible uncertainty from a running system at boot time as
    possible, hoping to capitalize on any possible variation in CPU operation
    (due to runtime data differences, hardware differences, SMP ordering,
    thermal timing variation, cache behavior, etc).

    At the very least, this plugin is a much more comprehensive example for
    how to manipulate kernel code using the gcc plugin internals.

    The need for very-early boot entropy tends to be very architecture or
    system design specific, so this plugin is more suited for those sorts
    of special cases. The existing kernel RNG already attempts to extract
    entropy from reliable runtime variation, but this plugin takes the idea to
    a logical extreme by permuting a global variable based on any variation
    in code execution (e.g. a different value (and permutation function)
    is used to permute the global based on loop count, case statement,
    if/then/else branching, etc).

    To do this, the plugin starts by inserting a local variable in every
    marked function. The plugin then adds logic so that the value of this
    variable is modified by randomly chosen operations (add, xor and rol) and
    random values (gcc generates separate static values for each location at
    compile time and also injects the stack pointer at runtime). The resulting
    value depends on the control flow path (e.g., loops and branches taken).

    Before the function returns, the plugin mixes this local variable into
    the latent_entropy global variable. The value of this global variable
    is added to the kernel entropy pool in do_one_initcall() and _do_fork(),
    though it does not credit any bytes of entropy to the pool; the contents
    of the global are just used to mix the pool.

    Additionally, the plugin can pre-initialize arrays with build-time
    random contents, so that two different kernel builds running on identical
    hardware will not have the same starting values.

    Signed-off-by: Emese Revfy
    [kees: expanded commit message and code comments]
    Signed-off-by: Kees Cook

    Emese Revfy
     

08 Oct, 2016

2 commits

  • No need to correct the correct.

    Link: http://lkml.kernel.org/r/1472490791.3425.38.camel@perches.com
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • When doing an nmi backtrace of many cores, most of which are idle, the
    output is a little overwhelming and very uninformative. Suppress
    messages for cpus that are idling when they are interrupted and just
    emit one line, "NMI backtrace for N skipped: idling at pc 0xNNN".

    We do this by grouping all the cpuidle code together into a new
    .cpuidle.text section, and then checking the address of the interrupted
    PC to see if it lies within that section.

    This commit suitably tags x86 and tile idle routines, and only adds in
    the minimal framework for other architectures.

    Link: http://lkml.kernel.org/r/1472487169-14923-5-git-send-email-cmetcalf@mellanox.com
    Signed-off-by: Chris Metcalf
    Acked-by: Peter Zijlstra (Intel)
    Tested-by: Peter Zijlstra (Intel)
    Tested-by: Daniel Thompson [arm]
    Tested-by: Petr Mladek
    Cc: Aaron Tomlin
    Cc: Peter Zijlstra (Intel)
    Cc: "Rafael J. Wysocki"
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     

07 Oct, 2016

1 commit

  • Pull tracing updates from Steven Rostedt:
    "This release cycle is rather small. Just a few fixes to tracing.

    The big change is the addition of the hwlat tracer. It not only
    detects SMIs, but also other latency that's caused by the hardware. I
    have detected some latency from large boxes having bus contention"

    * tag 'trace-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Call traceoff trigger after event is recorded
    ftrace/scripts: Add helper script to bisect function tracing problem functions
    tracing: Have max_latency be defined for HWLAT_TRACER as well
    tracing: Add NMI tracing in hwlat detector
    tracing: Have hwlat trace migrate across tracing_cpumask CPUs
    tracing: Add documentation for hwlat_detector tracer
    tracing: Added hardware latency tracer
    ftrace: Access ret_stack->subtime only in the function profiler
    function_graph: Handle TRACE_BPUTS in print_graph_comment
    tracing/uprobe: Drop isdigit() check in create_trace_uprobe

    Linus Torvalds
     

05 Oct, 2016

1 commit

  • Pull s390 updates from Martin Schwidefsky:
    "The new features and main improvements in this merge for v4.9

    - Support for the UBSAN sanitizer

    - Set HAVE_EFFICIENT_UNALIGNED_ACCESS, it improves the code in some
    places

    - Improvements for the in-kernel fpu code, in particular the overhead
    for multiple consecutive in kernel fpu users is recuded

    - Add a SIMD implementation for the RAID6 gen and xor operations

    - Add RAID6 recovery based on the XC instruction

    - The PCI DMA flush logic has been improved to increase the speed of
    the map / unmap operations

    - The time synchronization code has seen some updates

    And bug fixes all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (48 commits)
    s390/con3270: fix insufficient space padding
    s390/con3270: fix use of uninitialised data
    MAINTAINERS: update DASD maintainer
    s390/cio: fix accidental interrupt enabling during resume
    s390/dasd: add missing \n to end of dev_err messages
    s390/config: Enable config options for Docker
    s390/dasd: make query host access interruptible
    s390/dasd: fix panic during offline processing
    s390/dasd: fix hanging offline processing
    s390/pci_dma: improve lazy flush for unmap
    s390/pci_dma: split dma_update_trans
    s390/pci_dma: improve map_sg
    s390/pci_dma: simplify dma address calculation
    s390/pci_dma: remove dma address range check
    iommu/s390: simplify registration of I/O address translation parameters
    s390: migrate exception table users off module.h and onto extable.h
    s390: export header for CLP ioctl
    s390/vmur: fix irq pointer dereference in int handler
    s390/dasd: add missing KOBJ_CHANGE event for unformatted devices
    s390: enable UBSAN
    ...

    Linus Torvalds