06 Oct, 2014

1 commit


18 Sep, 2014

1 commit


06 Sep, 2014

1 commit


14 Aug, 2014

1 commit


08 Aug, 2014

1 commit


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


12 Jun, 2014

1 commit


08 Jun, 2014

1 commit


01 Jun, 2014

1 commit


13 May, 2014

1 commit


06 May, 2014

1 commit


27 Apr, 2014

1 commit


14 Apr, 2014

1 commit


31 Mar, 2014

1 commit


25 Mar, 2014

1 commit


17 Mar, 2014

1 commit


10 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


17 Feb, 2014

1 commit


10 Feb, 2014

1 commit


03 Feb, 2014

1 commit


31 Jan, 2014

2 commits

  • Pull __TIME__/__DATE__ removal from Michal Marek:
    "This series by Josh finishes the removal of __DATE__ and __TIME__ from
    the kernel. The last patch adds -Werror=date-time to KBUILD_CFLAGS to
    stop these from reappearing.

    Part of the series went through Greg's trees during this merge window,
    which is why this pull request is not based on v3.13-rc1"

    * 'drop-time' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    Makefile: Build with -Werror=date-time if the compiler supports it
    x86: math-emu: Drop already-disabled print of build date
    net: wireless: brcm80211: Drop debug version with build date/time
    mtd: denali: Drop print of build date/time

    Linus Torvalds
     
  • Pull kbuild changes from Michal Marek:
    - fix make -s detection with make-4.0
    - fix for scripts/setlocalversion when the kernel repository is a
    submodule
    - do not hardcode ';' in macros that expand to assembler code, as some
    architectures' assemblers use a different character for newline
    - Fix passing --gdwarf-2 to the assembler

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    frv: Remove redundant debugging info flag
    mn10300: Remove redundant debugging info flag
    kbuild: Fix debugging info generation for .S files
    arch: use ASM_NL instead of ';' for assembler new line character in the macro
    kbuild: Fix silent builds with make-4
    Fix detectition of kernel git repository in setlocalversion script [take #2]

    Linus Torvalds
     

28 Jan, 2014

2 commits

  • GCC 4.9 and newer have a new warning -Wdate-time, which warns on any use
    of __DATE__, __TIME__, or __TIMESTAMP__, which would make the build
    non-deterministic. Now that the kernel does not use any of those
    macros, turn on -Werror=date-time if available, to keep it that way.

    The kernel already (optionally) records this information at build time
    in a single place; other kernel code should not duplicate that.

    Signed-off-by: Josh Triplett
    Signed-off-by: Michal Marek

    Josh Triplett
     
  • Change the debuging info generation flag in KBUILD_AFLAGS from '-gdwarf-2' to
    '-Wa,--gdwarf-2'. This will properly generate the debugging info for .S files
    when CONFIG_DEBUG_INFO=y.

    It seems current gcc does not pass a '--gdwarf-2' option on to the assembler
    when '-gdwarf-2' is on its command line (note the differece in the gcc and as
    flags). This change provides the correct assembler flag to gcc, and so does
    not rely on gcc to emit a flag for the assembler.

    Signed-off-by: Geoff Levand for Huawei, Linaro
    Signed-off-by: Michal Marek

    Geoff Levand
     

21 Jan, 2014

1 commit

  • …ux/kernel/git/tip/tip

    Pull strong stackprotector support from Ingo Molnar:
    "This tree adds a CONFIG_CC_STACKPROTECTOR_STRONG=y, a new, stronger
    stack canary checking method supported by the newest GCC versions (4.9
    and later).

    Here's the 'intensity comparison' between the various protection
    modes:

    - defconfig
    11430641 kernel text size
    36110 function bodies

    - defconfig + CONFIG_CC_STACKPROTECTOR_REGULAR
    11468490 kernel text size (+0.33%)
    1015 of 36110 functions are stack-protected (2.81%)

    - defconfig + CONFIG_CC_STACKPROTECTOR_STRONG via this patch
    11692790 kernel text size (+2.24%)
    7401 of 36110 functions are stack-protected (20.5%)

    the strong model comes with non-trivial costs, which is why we
    preserved the 'regular' and 'none' models as well"

    * 'core-stackprotector-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    stackprotector: Introduce CONFIG_CC_STACKPROTECTOR_STRONG
    stackprotector: Unify the HAVE_CC_STACKPROTECTOR logic between architectures

    Linus Torvalds
     

20 Jan, 2014

1 commit


12 Jan, 2014

1 commit


06 Jan, 2014

1 commit

  • make-4 changed the way/order it presents the command line options
    into MAKEFLAGS

    In make-3.8x, '-s' would always be first into a group of options
    with the '-'/hyphen removed

    $ make -p -s 2>/dev/null | grep ^MAKEFLAGS
    MAKEFLAGS = sp

    In make-4, '-s' seems to always be last into a group of options
    with the '-'/hyphen removed

    $ make -s -p 2>/dev/null | grep ^MAKEFLAGS
    MAKEFLAGS = ps

    Signed-off-by: Emil Medve
    Signed-off-by: Michal Marek

    Emil Medve