01 Aug, 2014

2 commits

  • Greg Kroah-Hartman
     
  • commit 2062afb4f804afef61cbe62a30cac9a46e58e067 upstream.

    Michel Dänzer and a couple of other people reported inexplicable random
    oopses in the scheduler, and the cause turns out to be gcc mis-compiling
    the load_balance() function when debugging is enabled. The gcc bug
    apparently goes back to gcc-4.5, but slight optimization changes means
    that it now showed up as a problem in 4.9.0 and 4.9.1.

    The instruction scheduling problem causes gcc to schedule a spill
    operation to before the stack frame has been created, which in turn can
    corrupt the spilled value if an interrupt comes in. There may be other
    effects of this bug too, but that's the code generation problem seen in
    Michel's case.

    This is fixed in current gcc HEAD, but the workaround as suggested by
    Markus Trippelsdorf is pretty simple: use -fno-var-tracking-assignments
    when compiling the kernel, which disables the gcc code that causes the
    problem. This can result in slightly worse debug information for
    variable accesses, but that is infinitely preferable to actual code
    generation problems.

    Doing this unconditionally (not just for CONFIG_DEBUG_INFO) also allows
    non-debug builds to verify that the debug build would be identical: we
    can do

    export GCC_COMPARE_DEBUG=1

    to make gcc internally verify that the result of the build is
    independent of the "-g" flag (it will make the compiler build everything
    twice, toggling the debug flag, and compare the results).

    Without the "-fno-var-tracking-assignments" option, the build would fail
    (even with 4.8.3 that didn't show the actual stack frame bug) with a gcc
    compare failure.

    See also gcc bugzilla:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801

    Reported-by: Michel Dänzer
    Suggested-by: Markus Trippelsdorf
    Cc: Jakub Jelinek
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Linus Torvalds
     

28 Jul, 2014

1 commit


18 Jul, 2014

1 commit


10 Jul, 2014

1 commit


07 Jul, 2014

1 commit


01 Jul, 2014

1 commit


27 Jun, 2014

1 commit


17 Jun, 2014

1 commit


09 Jun, 2014

1 commit


02 Jun, 2014

1 commit


26 May, 2014

1 commit


22 May, 2014

1 commit


10 May, 2014

1 commit


05 May, 2014

1 commit


28 Apr, 2014

1 commit


21 Apr, 2014

1 commit


14 Apr, 2014

1 commit


13 Apr, 2014

1 commit

  • Pull misc kbuild changes from Michal Marek:
    "Here is the non-critical part of kbuild:
    - One bogus coccinelle check removed, one check fixed not to suggest
    the obsolete PTR_RET macro
    - scripts/tags.sh does not index the generated *.mod.c files
    - new objdiff tool to list differences between two versions of an
    object file
    - A fix for scripts/bootgraph.pl"

    * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    scripts/coccinelle: Use PTR_ERR_OR_ZERO
    scripts/bootgraph.pl: Add graphic header
    scripts: objdiff: detect object code changes between two commits
    Coccicheck: Remove memcpy to struct assignment test
    scripts/tags.sh: Ignore *.mod.c

    Linus Torvalds
     

10 Apr, 2014

1 commit

  • Add support to toplevel Makefile for compiling with clang, both for
    HOSTCC and CC. Use cc-option to prevent gcc option from breaking clang, and
    from clang options from breaking gcc.

    Clang 3.4 semantics are the same as gcc semantics for unsupported flags. For
    unsupported warnings clang 3.4 returns true but shows a warning and gcc shows
    a warning and returns false.

    Signed-off-by: Behan Webster
    Signed-off-by: Jan-Simon Möller
    Signed-off-by: Mark Charlebois
    Cc: PaX Team

    Behan Webster
     

08 Apr, 2014

2 commits

  • objdiff is useful when doing large code cleanups. For example, when
    removing checkpatch warnings and errors from new drivers in the staging
    tree.

    objdiff can be used in conjunction with a git rebase to confirm that
    each commit made no changes to the resulting object code. It has the
    same return values as diff(1).

    This was written specifically to support adding the skein and threefish
    cryto drivers to the staging tree. I needed a programmatic way to
    confirm that commits changing >90% of the lines didn't inadvertently
    change the code.

    Temporary files (objdump output) are stored in

    /path/to/linux/.tmp_objdiff

    'make mrproper' will remove this directory.

    Signed-off-by: Jason Cooper
    Signed-off-by: Michal Marek

    Jason Cooper
     
  • Pull kbuild changes from Michal Marek:
    - cleanups in the main Makefiles and Documentation/DocBook/Makefile
    - make O=... directory is automatically created if needed
    - mrproper/distclean removes the old include/linux/version.h to make
    life easier when bisecting across the commit that moved the version.h
    file

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: docbook: fix the include error when executing "make help"
    kbuild: create a build directory automatically for out-of-tree build
    kbuild: remove redundant '.*.cmd' pattern from make distclean
    kbuild: move "quote" to Kbuild.include to be consistent
    kbuild: docbook: use $(obj) and $(src) rather than specific path
    kbuild: unconditionally clobber include/linux/version.h on distclean
    kbuild: docbook: specify KERNELDOC dependency correctly
    kbuild: docbook: include cmd files more simply
    kbuild: specify build_docproc as a phony target

    Linus Torvalds
     

03 Apr, 2014

1 commit

  • Pull devicetree changes from Grant Likely:
    "Updates to devicetree core code. This branch contains the following
    notable changes:

    - add reserved memory binding
    - make struct device_node a kobject and remove legacy
    /proc/device-tree
    - ePAPR conformance fixes
    - update in-kernel DTC copy to version v1.4.0
    - preparatory changes for dynamic device tree overlays
    - minor bug fixes and documentation changes

    The most significant change in this branch is the conversion of struct
    device_node to be a kobject that is exposed via sysfs and removal of
    the old /proc/device-tree code. This simplifies the device tree
    handling code and tightens up the lifecycle on device tree nodes.

    [updated: added fix for dangling select PROC_DEVICETREE]"

    * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux: (29 commits)
    dt: Remove dangling "select PROC_DEVICETREE"
    of: Add support for ePAPR "stdout-path" property
    of: device_node kobject lifecycle fixes
    of: only scan for reserved mem when fdt present
    powerpc: add support for reserved memory defined by device tree
    arm64: add support for reserved memory defined by device tree
    of: add missing major vendors
    of: add vendor prefix for SMSC
    of: remove /proc/device-tree
    of/selftest: Add self tests for manipulation of properties
    of: Make device nodes kobjects so they show up in sysfs
    arm: add support for reserved memory defined by device tree
    drivers: of: add support for custom reserved memory drivers
    drivers: of: add initialization code for dynamic reserved memory
    drivers: of: add initialization code for static reserved memory
    of: document bindings for reserved-memory nodes
    Revert "of: fix of_update_property()"
    kbuild: dtbs_install: new make target
    ARM: mvebu: Allows to get the SoC ID even without PCI enabled
    of: Allows to use the PCI translator without the PCI core
    ...

    Linus Torvalds
     

01 Apr, 2014

2 commits


31 Mar, 2014

2 commits


30 Mar, 2014

1 commit

  • As of v3.7, the UAPI changes relocated headers around such that the
    kernel version header lived in a new place.

    If a person is bisecting and if you go back to pre-UAPI days,
    you will create an include/linux/version.h -- then if you checkout a
    post-UAPI kernel, and even run "make distclean" it still won't delete
    that old version file. So you get a situation like this:

    $ grep -R LINUX_VERSION_CODE include/
    include/generated/uapi/linux/version.h:#define LINUX_VERSION_CODE 200192
    include/linux/version.h:#define LINUX_VERSION_CODE 132646

    The value in that second line is representative of a v2.6.38 version.
    And it will be sourced/used, hence leading to strange behaviours, such
    as drivers/staging content (which typically hasn't been purged of version
    ifdefs) failing to build.

    Since it is a subtle mode of failure, lets always clobber the old
    file when doing a distclean.

    Signed-off-by: Paul Gortmaker
    Acked-by: David Howells
    Signed-off-by: Michal Marek

    Paul Gortmaker
     

25 Mar, 2014

1 commit


17 Mar, 2014

1 commit


10 Mar, 2014

1 commit


04 Mar, 2014

1 commit


03 Mar, 2014

1 commit


26 Feb, 2014

2 commits

  • According to Documentation/Changes, make 3.80 is still being supported
    for building the kernel, hence make files must not make (unconditional)
    use of features introduced only in newer versions. Commit 8779657d29c0
    ("stackprotector: Introduce CONFIG_CC_STACKPROTECTOR_STRONG") however
    introduced an "else ifdef" construct which make 3.80 doesn't understand.

    Also correct a warning message still referencing the old config option
    name.

    Apart from that I question the use of "ifdef" here (but it was used that
    way already prior to said commit): ifeq (,y) would seem more to the
    point.

    Signed-off-by: Jan Beulich
    Acked-by: Kees Cook
    Cc: Ingo Molnar
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • An extra parenthesis typo introduced in 19952a92037e ("stackprotector:
    Unify the HAVE_CC_STACKPROTECTOR logic between architectures") is
    causing the following error when CONFIG_CC_STACKPROTECTOR_REGULAR is
    enabled:

    Makefile:608: Cannot use CONFIG_CC_STACKPROTECTOR: -fstack-protector not supported by compiler
    Makefile:608: *** missing separator. Stop.

    Signed-off-by: Fathi Boudra
    Acked-by: Kees Cook
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fathi Boudra
     

24 Feb, 2014

1 commit


20 Feb, 2014

1 commit

  • Unlike other build products in the Linux kernel, there is no 'make
    *install' mechanism to put devicetree blobs in a standard place.

    This commit adds a new 'dtbs_install' make target which copies all of
    the dtbs into the INSTALL_DTBS_PATH directory. INSTALL_DTBS_PATH can be
    set before calling make to change the default install directory. If not
    set then it defaults to:

    $INSTALL_PATH/dtbs/$KERNELRELEASE.

    This is done to keep dtbs from different kernel versions separate until
    things have settled down. Once the dtbs are stable, and not so strongly
    linked to the kernel version, the devicetree files will most likely move
    to their own repo. Users will need to upgrade install scripts at that
    time.

    v7: (reworked by Grant Likely)
    - Moved rules from arch/arm/Makefile to arch/arm/boot/dts/Makefile so
    that each dtb install could have a separate target and be reported as
    part of the make output.
    - Fixed dependency problem to ensure $KERNELRELEASE is calculated before
    attempting to install
    - Removed option to call external script. Copying the files should be
    sufficient and a build system can post-process the install directory.
    Despite the fact an external script is used for installing the kernel,
    I don't think that is a pattern that should be encouraged. I would
    rather see buildroot type tools post process the install directory to
    rename or move dtb files after installing to a staging directory.
    - Plus it is easy to add a hook after the fact without blocking the
    rest of this feature.
    - Move the helper targets into scripts/Makefile.lib with the rest of the
    common dtb rules

    Signed-off-by: Jason Cooper
    Signed-off-by: Grant Likely
    Cc: Michal Marek
    Cc: Russell King
    Cc: Rob Herring

    Jason Cooper
     

17 Feb, 2014

1 commit


10 Feb, 2014

1 commit


06 Feb, 2014

1 commit

  • CONFIG_MODVERSIONS=y results in a .mod.c for every compiled file in the
    kernel. Issuing a 'make cscope' on a compiled kernel tree results in
    the cscope files containing *.mod.c files.

    [prarit@prarit linux]# make cscope
    [prarit@prarit linux]# cat cscope.files | grep mod.c | wc -l
    4807

    These files are not useful for cscope and should be ignored. For example,

    # line filename / context / line
    1 105 arch/x86/kvm/kvm-intel.mod.c <>
    { 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
    2 508 drivers/block/mtip32xx/mtip32xx.h <>
    int numa_node;
    3 55 drivers/block/mtip32xx/mtip32xx.mod.c <>
    { 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
    4 37 drivers/cpufreq/acpi-cpufreq.mod.c <>
    { 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },

    Add an export to RCS_FIND_IGNORE so it can be used in scripts/tags.sh
    and add explicitly ignore *.mod.c files.

    Signed-off-by: Prarit Bhargava
    Cc: Andrew Morton
    Cc: Kirill Tkhai
    Cc: Michael Opdenacker
    Cc: Rusty Russell
    Signed-off-by: Michal Marek

    Prarit Bhargava