17 Apr, 2019

1 commit

  • [ Upstream commit 02826a6ba301b72461c3706e1cc66d5571cd327e ]

    Ard Biesheuvel reports bindeb-pkg with O= option is broken in the
    following way:

    ...
    LD [M] sound/soc/rockchip/snd-soc-rk3399-gru-sound.ko
    LD [M] sound/soc/rockchip/snd-soc-rockchip-pcm.ko
    LD [M] sound/soc/rockchip/snd-soc-rockchip-rt5645.ko
    LD [M] sound/soc/rockchip/snd-soc-rockchip-spdif.ko
    LD [M] sound/soc/sh/rcar/snd-soc-rcar.ko
    fakeroot -u debian/rules binary
    make KERNELRELEASE=4.19.0-12677-g19beffaf7a99-dirty ARCH=arm64 KBUILD_SRC= intdeb-pkg
    /bin/bash /home/ard/linux/scripts/package/builddeb
    Makefile:600: include/config/auto.conf: No such file or directory
    ***
    *** Configuration file ".config" not found!
    ***
    *** Please run some configurator (e.g. "make oldconfig" or
    *** "make menuconfig" or "make xconfig").
    ***
    make[12]: *** [syncconfig] Error 1
    make[11]: *** [syncconfig] Error 2
    make[10]: *** [include/config/auto.conf] Error 2
    make[9]: *** [__sub-make] Error 2
    ...

    Prior to commit 80463f1b7bf9 ("kbuild: add --include-dir flag only
    for out-of-tree build"), both srctree and objtree were added to
    --include-dir redundantly, and the wrong code '$MAKE image_name'
    was working by relying on that. Now, the potential issue that had
    previously been hidden just showed up.

    '$MAKE image_name' recurses to the generated $(objtree)/Makefile and
    ends up with running in srctree, which is incorrect. It should be
    invoked with '-f $srctree/Makefile' (or KBUILD_SRC=) to be executed
    in objtree.

    Fixes: 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build")
    Reported-by: Ard Biesheuvel
    Signed-off-by: Masahiro Yamada
    Tested-by: Ard Biesheuvel
    Signed-off-by: Sasha Levin

    Masahiro Yamada
     

03 Apr, 2019

1 commit

  • commit 54a7151b1496cddbb7a83546b7998103e98edc88 upstream.

    Fix commit 56067812d5b0 ("kbuild: modversions: add infrastructure for
    emitting relative CRCs") where CRCs are interpreted in host byte order
    rather than proper kernel byte order. The bug is conditional on
    CONFIG_MODULE_REL_CRCS.

    For example, when loading a BE module into a BE kernel compiled with a LE
    system, the error "disagrees about version of symbol module_layout" is
    produced. A message such as "Found checksum D7FA6856 vs module 5668FAD7"
    will be given with debug enabled, which indicates an obvious endian
    problem within __kcrctab within the kernel image.

    The general solution is to use the macro TO_NATIVE, as is done in
    similar cases throughout modpost.c. With this correction it has been
    verified that a BE kernel compiled with a LE system accepts BE modules.

    This change has also been verified with a LE kernel compiled with a LE
    system, in which case TO_NATIVE returns its value unmodified since the
    byte orders match. This is by far the common case.

    Fixes: 56067812d5b0 ("kbuild: modversions: add infrastructure for emitting relative CRCs")
    Signed-off-by: Fredrik Noring
    Cc: stable@vger.kernel.org
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Greg Kroah-Hartman

    Fredrik Noring
     

24 Mar, 2019

1 commit

  • [ Upstream commit 6db2983cd8064808141ccefd75218f5b4345ffae ]

    When checking for symbols with excessively long names,
    account for null terminating character.

    Fixes: f3462aa952cf ("Kbuild: Handle longer symbols in kallsyms.c")
    Signed-off-by: Eugene Loh
    Acked-by: Ard Biesheuvel
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Sasha Levin

    Eugene Loh
     

13 Feb, 2019

3 commits

  • [ Upstream commit b058809bfc8faeb7b7cae047666e23375a060059 ]

    A bug is present in GDB which causes early string termination when
    parsing variables. This has been reported [0], but we should ensure
    that we can support at least basic printing of the core kernel strings.

    For current gdb version (has been tested with 7.3 and 8.1), 'lx-version'
    only prints one character.

    (gdb) lx-version
    L(gdb)

    This can be fixed by casting 'linux_banner' as (char *).

    (gdb) lx-version
    Linux version 4.19.0-rc1+ (changbin@acer) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #21 SMP Sat Sep 1 21:43:30 CST 2018

    [0] https://sourceware.org/bugzilla/show_bug.cgi?id=20077

    [kbingham@kernel.org: add detail to commit message]
    Link: http://lkml.kernel.org/r/20181111162035.8356-1-kieran.bingham@ideasonboard.com
    Fixes: 2d061d999424 ("scripts/gdb: add version command")
    Signed-off-by: Du Changbin
    Signed-off-by: Kieran Bingham
    Acked-by: Jan Kiszka
    Cc: Jan Kiszka
    Cc: Jason Wessel
    Cc: Daniel Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin

    Du Changbin
     
  • [ Upstream commit 67a28de47faa83585dd644bd4c31e5a1d9346c50 ]

    Running something like:

    decodecode vmlinux .

    leads to interested results where not only the leading "." gets stripped
    from the displayed paths, but also anywhere in the string, displaying
    something like:

    kvm_vcpu_check_block (arch/arm64/kvm/virt/kvm/kvm_mainc:2141)

    which doesn't help further processing.

    Fix it by only stripping the base path if it is a prefix of the path.

    Link: http://lkml.kernel.org/r/20181210174659.31054-3-marc.zyngier@arm.com
    Signed-off-by: Marc Zyngier
    Cc: Will Deacon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin

    Marc Zyngier
     
  • [ Upstream commit 5818c683a619c534c113e1f66d24f636defc29bc ]

    If an ARM mapping symbol shares an address with a valid symbol,
    find_elf_symbol can currently return the mapping symbol instead, as the
    symbol is not validated. This can result in confusing warnings:

    WARNING: vmlinux.o(.text+0x18f4028): Section mismatch in reference
    from the function set_reset_devices() to the variable .init.text:$x.0

    This change adds a call to is_valid_name to find_elf_symbol, similarly
    to how it's already used in find_elf_symbol2.

    Signed-off-by: Sami Tolvanen
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Sasha Levin

    Sami Tolvanen
     

26 Jan, 2019

2 commits

  • [ Upstream commit fbac5977d81cb2b2b7e37b11c459055d9585273c ]

    An unterminated string literal followed by new line is passed to the
    parser (with "multi-line strings not supported" warning shown), then
    handled properly there.

    On the other hand, an unterminated string literal at end of file is
    never passed to the parser, then results in memory leak.

    [Test Code]

    ----------(Kconfig begin)----------
    source "Kconfig.inc"

    config A
    bool "a"
    -----------(Kconfig end)-----------

    --------(Kconfig.inc begin)--------
    config B
    bool "b\No new line at end of file
    ---------(Kconfig.inc end)---------

    [Summary from Valgrind]

    Before the fix:

    LEAK SUMMARY:
    definitely lost: 16 bytes in 1 blocks
    ...

    After the fix:

    LEAK SUMMARY:
    definitely lost: 0 bytes in 0 blocks
    ...

    Eliminate the memory leak path by handling this case. Of course, such
    a Kconfig file is wrong already, so I will add an error message later.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Sasha Levin

    Masahiro Yamada
     
  • [ Upstream commit 77c1c0fa8b1477c5799bdad65026ea5ff676da44 ]

    Currently, warn_ignore_character() displays invalid file name and
    line number.

    The lexer should use current_file->name and yylineno, while the parser
    should use zconf_curname() and zconf_lineno().

    This difference comes from that the lexer is always going ahead
    of the parser. The parser needs to look ahead one token to make a
    shift/reduce decision, so the lexer is requested to scan more text
    from the input file.

    This commit fixes the warning message from warn_ignored_character().

    [Test Code]

    ----(Kconfig begin)----
    /
    -----(Kconfig end)-----

    [Output]

    Before the fix:

    :0:warning: ignoring unsupported character '/'

    After the fix:

    Kconfig:1:warning: ignoring unsupported character '/'

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Sasha Levin

    Masahiro Yamada
     

17 Jan, 2019

1 commit

  • commit e4f358916d528d479c3c12bd2fd03f2d5a576380 upstream.

    Commit

    4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support")

    replaced the RETPOLINE define with CONFIG_RETPOLINE checks. Remove the
    remaining pieces.

    [ bp: Massage commit message. ]

    Fixes: 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support")
    Signed-off-by: WANG Chao
    Signed-off-by: Borislav Petkov
    Reviewed-by: Zhenzhong Duan
    Reviewed-by: Masahiro Yamada
    Cc: "H. Peter Anvin"
    Cc: Andi Kleen
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Arnd Bergmann
    Cc: Daniel Borkmann
    Cc: David Woodhouse
    Cc: Geert Uytterhoeven
    Cc: Jessica Yu
    Cc: Jiri Kosina
    Cc: Kees Cook
    Cc: Konrad Rzeszutek Wilk
    Cc: Luc Van Oostenryck
    Cc: Michal Marek
    Cc: Miguel Ojeda
    Cc: Peter Zijlstra
    Cc: Tim Chen
    Cc: Vasily Gorbik
    Cc: linux-kbuild@vger.kernel.org
    Cc: srinivas.eeda@oracle.com
    Cc: stable
    Cc: x86-ml
    Link: https://lkml.kernel.org/r/20181210163725.95977-1-chao.wang@ucloud.cn
    Signed-off-by: Greg Kroah-Hartman

    WANG Chao
     

13 Jan, 2019

1 commit

  • [ Upstream commit f1733a1d3cd32a9492f4cf866be37bb46e10163d ]

    There is actually a space after "sp," like this,

    ffff2000080813c8: a9bb7bfd stp x29, x30, [sp, #-80]!

    Right now, checkstack.pl isn't able to print anything on aarch64,
    because it won't be able to match the stating objdump line of a function
    due to this missing space. Hence, it displays every stack as zero-size.

    After this patch, checkpatch.pl is able to match the start of a
    function's objdump, and is then able to calculate each function's stack
    correctly.

    Link: http://lkml.kernel.org/r/20181207195843.38528-1-cai@lca.pw
    Signed-off-by: Qian Cai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin

    Qian Cai
     

20 Dec, 2018

1 commit

  • commit 3a6ab5c7dc114057fd67750e308e1745dafc0e6a upstream.

    The spdxcheck script currently falls over when confronted with a binary
    file (such as Documentation/logo.gif). To avoid that, always open files
    in binary mode and decode line-by-line, ignoring encoding errors.

    One tricky case is when piping data into the script and reading it from
    standard input. By default, standard input will be opened in text mode,
    so we need to reopen it in binary mode.

    The breakage only happens with python3 and results in a
    UnicodeDecodeError (according to Uwe).

    Link: http://lkml.kernel.org/r/20181212131210.28024-1-thierry.reding@gmail.com
    Fixes: 6f4d29df66ac ("scripts/spdxcheck.py: make python3 compliant")
    Signed-off-by: Thierry Reding
    Reviewed-by: Jeremy Cline
    Cc: Thomas Gleixner
    Cc: Jonathan Corbet
    Cc: Joe Perches
    Cc: Uwe Kleine-König
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Thierry Reding
     

08 Dec, 2018

1 commit

  • commit 38c7b224ce22c25fed04007839edf974bd13439d upstream.

    New versions of gcc reasonably warn about the odd pattern of

    strncpy(p, q, strlen(q));

    which really doesn't make sense: the strncpy() ends up being just a slow
    and odd way to write memcpy() in this case.

    There was a comment about _why_ the code used strncpy - to avoid the
    terminating NUL byte, but memcpy does the same and avoids the warning.

    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Linus Torvalds
     

06 Dec, 2018

1 commit

  • commit 4cd24de3a0980bf3100c9dcb08ef65ca7c31af48 upstream

    Since retpoline capable compilers are widely available, make
    CONFIG_RETPOLINE hard depend on the compiler capability.

    Break the build when CONFIG_RETPOLINE is enabled and the compiler does not
    support it. Emit an error message in that case:

    "arch/x86/Makefile:226: *** You are building kernel with non-retpoline
    compiler, please update your compiler.. Stop."

    [dwmw: Fail the build with non-retpoline compiler]

    Suggested-by: Peter Zijlstra
    Signed-off-by: Zhenzhong Duan
    Signed-off-by: Thomas Gleixner
    Cc: David Woodhouse
    Cc: Borislav Petkov
    Cc: Daniel Borkmann
    Cc: H. Peter Anvin
    Cc: Konrad Rzeszutek Wilk
    Cc: Andy Lutomirski
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc:
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/cca0cb20-f9e2-4094-840b-fb0f8810cd34@default
    Signed-off-by: Greg Kroah-Hartman

    Zhenzhong Duan
     

27 Nov, 2018

2 commits

  • [ Upstream commit 8ef14c2c41d962756d314f1d7dc972b0ea7a180f ]

    This reverts commit 6147b1cf19651c7de297e69108b141fb30aa2349.

    The reverted patch results in attempted write access to the source
    repository, even if that repository is mounted read-only.

    Output from "strace git status -uno --porcelain":

    getcwd("/tmp/linux-test", 129) = 16
    open("/tmp/linux-test/.git/index.lock", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) =
    -1 EROFS (Read-only file system)

    While git appears to be able to handle this situation, a monitored
    build environment (such as the one used for Chrome OS kernel builds)
    may detect it and bail out with an access violation error. On top of
    that, the attempted write access suggests that git _will_ write to the
    file even if a build output directory is specified. Users may have the
    reasonable expectation that the source repository remains untouched in
    that situation.

    Fixes: 6147b1cf19651 ("scripts/setlocalversion: git: Make -dirty check more robust"
    Cc: Genki Sky
    Signed-off-by: Guenter Roeck
    Reviewed-by: Brian Norris
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Sasha Levin

    Guenter Roeck
     
  • [ Upstream commit bbcde0a7241261cd0ca8d8e6b94a4113a4b71443 ]

    Since commit b41d920acff8 ("kbuild: deb-pkg: split generating packaging
    and build"), the build version of the kernel contained in a deb package
    is too low by 1.

    Prior to the bad commit, the kernel was built first, then the number
    in .version file was read out, and written into the debian control file.

    Now, the debian control file is created before the kernel is actually
    compiled, which is causing the version number mismatch.

    Let the mkdebian script pass KBUILD_BUILD_VERSION=${revision} to require
    the build system to use the specified version number.

    Fixes: b41d920acff8 ("kbuild: deb-pkg: split generating packaging and build")
    Reported-by: Doug Smythies
    Signed-off-by: Masahiro Yamada
    Tested-by: Doug Smythies
    Signed-off-by: Sasha Levin

    Masahiro Yamada
     

21 Nov, 2018

1 commit

  • commit 6f4d29df66acd49303a99025046b85cabe7aa17a upstream.

    Without this change the following happens when using Python3 (3.6.6):

    $ echo "GPL-2.0" | python3 scripts/spdxcheck.py -
    FAIL: 'str' object has no attribute 'decode'
    Traceback (most recent call last):
    File "scripts/spdxcheck.py", line 253, in
    parser.parse_lines(sys.stdin, args.maxlines, '-')
    File "scripts/spdxcheck.py", line 171, in parse_lines
    line = line.decode(locale.getpreferredencoding(False), errors='ignore')
    AttributeError: 'str' object has no attribute 'decode'

    So as the line is already a string, there is no need to decode it and
    the line can be dropped.

    /usr/bin/python on Arch is Python 3. So this would indeed be worth
    going into 4.19.

    Link: http://lkml.kernel.org/r/20181023070802.22558-1-u.kleine-koenig@pengutronix.de
    Signed-off-by: Uwe Kleine-König
    Cc: Thomas Gleixner
    Cc: Joe Perches
    Cc: Greg Kroah-Hartman
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

12 Oct, 2018

1 commit

  • …t/masahiroy/linux-kbuild

    Masahiro writes:
    "Kbuild fixes for v4.19 (2nd)
    - Fix warnings from recordmcount.pl when building with Clang
    - Allow Clang to use GNU toolchains correctly
    - Disable CONFIG_SAMPLES for UML to avoid build error"

    * tag 'kbuild-fixes-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    samples: disable CONFIG_SAMPLES for UML
    kbuild: allow to use GCC toolchain not in Clang search path
    ftrace: Build with CPPFLAGS to get -Qunused-arguments

    Greg Kroah-Hartman
     

19 Sep, 2018

1 commit


17 Sep, 2018

1 commit


09 Sep, 2018

2 commits

  • …masahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - make setlocalversion more robust about -dirty check

    - loosen the pkg-config requirement for Kconfig

    - change missing depmod to a warning from an error

    - warn modules_install when System.map is missing

    * tag 'kbuild-fixes-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: modules_install: warn when missing System.map file
    kbuild: make missing $DEPMOD a Warning instead of an Error
    kconfig: do not require pkg-config on make {menu,n}config
    kconfig: remove a spurious self-assignment
    scripts/setlocalversion: git: Make -dirty check more robust

    Linus Torvalds
     
  • If there is no System.map file for "make modules_install",
    scripts/depmod.sh will silently exit with success, having done
    nothing. Since this is an unexpected situation, change it to
    report a Warning for the missing file. The behavior is not
    changed except for the Warning message.

    The (previous) silent success and new Warning can be reproduced
    by:
    $ make mrproper; make defconfig
    $ make modules; make modules_install

    and since System.map is produced by "make vmlinux", the steps
    above omit producing the System.map file.

    Reported-by: Masahiro Yamada
    Signed-off-by: Randy Dunlap
    Signed-off-by: Masahiro Yamada

    Randy Dunlap
     

06 Sep, 2018

1 commit

  • …el/git/greentime/linux

    Pull nds32 updates from Greentime Hu:
    "Contained in here are the bug fixes, building error fixes and ftrace
    support for nds32"

    * tag 'nds32-for-linus-4.19-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux:
    nds32: linker script: GCOV kernel may refers data in __exit
    nds32: fix build error because of wrong semicolon
    nds32: Fix a kernel panic issue because of wrong frame pointer access.
    nds32: Only print one page of stack when die to prevent printing too much information.
    nds32: Add macro definition for offset of lp register on stack
    nds32: Remove the deprecated ABI implementation
    nds32/stack: Get real return address by using ftrace_graph_ret_addr
    nds32/ftrace: Support dynamic function graph tracer
    nds32/ftrace: Support dynamic function tracer
    nds32/ftrace: Add RECORD_MCOUNT support
    nds32/ftrace: Support static function graph tracer
    nds32/ftrace: Support static function tracer
    nds32: Extract the checking and getting pointer to a macro
    nds32: Clean up the coding style
    nds32: Fix get_user/put_user macro expand pointer problem
    nds32: Fix empty call trace
    nds32: add NULL entry to the end of_device_id array
    nds32: fix logic for module

    Linus Torvalds
     

05 Sep, 2018

3 commits

  • If the kernel headers aren't installed we can't build all the tests.
    Add a new make target rule 'khdr' in the file lib.mk to generate the
    kernel headers and that gets include for every test-dir Makefile that
    includes lib.mk If the testdir in turn have its own sub-dirs the
    top_srcdir needs to be set to the linux-rootdir to be able to generate
    the kernel headers.

    Signed-off-by: Anders Roxell
    Reviewed-by: Fathi Boudra
    Signed-off-by: Shuah Khan (Samsung OSG)

    Anders Roxell
     
  • __ro_after_init is a specific __attribute__ that checkpatch does currently
    not understand.

    Add it to the known $Attribute types so that code that uses variables
    declared with __ro_after_init are not thought to be a modifier type.

    This appears as a defect in checkpatch output of code like:

    static bool trust_cpu __ro_after_init = IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
    [...]
    if (trust_cpu && arch_init) {

    where checkpatch reports:

    ERROR: space prohibited after that '&&' (ctx:WxW)
    if (trust_cpu && arch_init) {

    Link: http://lkml.kernel.org/r/0fa8a2cb83ade4c525e18261ecf6cfede3015983.camel@perches.com
    Signed-off-by: Joe Perches
    Reported-by: Kees Cook
    Tested-by: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Using a static const struct definition as part of a series of
    declarations produces a false positive "Missing a blank line after
    declarations" for code like:

    WARNING: Missing a blank line after declarations
    #710: FILE: drivers/gpu/drm/tidss/tidss_scale_coefs.c:137:
    + int inc;
    + static const struct {

    So fix it.

    Link: http://lkml.kernel.org/r/5905126e70b0ed1781e49265fd5c49c5090d0223.camel@perches.com
    Signed-off-by: Joe Perches
    Reported-by: Jyri Sarha
    Cc: "Valkeinen, Tomi"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

04 Sep, 2018

1 commit


03 Sep, 2018

3 commits

  • When $DEPMOD is not found, only print a warning instead of exiting
    with an error message and error status:

    Warning: 'make modules_install' requires /sbin/depmod. Please install it.
    This is probably in the kmod package.

    Change the Error to a Warning because "not all build hosts for cross
    compiling Linux are Linux systems and are able to provide a working
    port of depmod, especially at the file patch /sbin/depmod."

    I.e., "make modules_install" may be used to copy/install the
    loadable modules files to a target directory on a build system and
    then transferred to an embedded device where /sbin/depmod is run
    instead of it being run on the build system.

    Fixes: 934193a654c1 ("kbuild: verify that $DEPMOD is installed")
    Signed-off-by: Randy Dunlap
    Reported-by: H. Nikolaus Schaller
    Cc: stable@vger.kernel.org
    Cc: Lucas De Marchi
    Cc: Lucas De Marchi
    Cc: Michal Marek
    Cc: Jessica Yu
    Cc: Chih-Wei Huang
    Signed-off-by: Masahiro Yamada

    Randy Dunlap
     
  • Meelis Roos reported a {menu,n}config regression:
    "I have libncurses devel package installed in the default system
    location (as do 99%+ on actual developers probably) and in this
    case, pkg-config is useless. pkg-config is needed only when
    libraries and headers are installed in non-default locations but
    it is bad to require installation of pkg-config on all the machines
    where make menuconfig would be possibly run."

    For {menu,n}config, do not use pkg-config if it is not installed.
    For {g,x}config, keep checking pkg-config since we really rely on it
    for finding the installation paths of the required packages.

    Fixes: 4ab3b80159d4 ("kconfig: check for pkg-config on make {menu,n,g,x}config")
    Reported-by: Meelis Roos
    Signed-off-by: Masahiro Yamada
    Tested-by: Meelis Roos
    Tested-by: Randy Dunlap

    Masahiro Yamada
     
  • Pull x86 fixes from Thomas Gleixner:
    "Speculation:

    - Make the microcode check more robust

    - Make the L1TF memory limit depend on the internal cache physical
    address space and not on the CPUID advertised physical address
    space, which might be significantly smaller. This avoids disabling
    L1TF on machines which utilize the full physical address space.

    - Fix the GDT mapping for EFI calls on 32bit PTI

    - Fix the MCE nospec implementation to prevent #GP

    Fixes and robustness:

    - Use the proper operand order for LSL in the VDSO

    - Prevent NMI uaccess race against CR3 switching

    - Add a lockdep check to verify that text_mutex is held in
    text_poke() functions

    - Repair the fallout of giving native_restore_fl() a prototype

    - Prevent kernel memory dumps based on usermode RIP

    - Wipe KASAN shadow stack before rewinding the stack to prevent false
    positives

    - Move the AMS GOTO enforcement to the actual build stage to allow
    user API header extraction without a compiler

    - Fix a section mismatch introduced by the on demand VDSO mapping
    change

    Miscellaneous:

    - Trivial typo, GCC quirk removal and CC_SET/OUT() cleanups"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/pti: Fix section mismatch warning/error
    x86/vdso: Fix lsl operand order
    x86/mce: Fix set_mce_nospec() to avoid #GP fault
    x86/efi: Load fixmap GDT in efi_call_phys_epilog()
    x86/nmi: Fix NMI uaccess race against CR3 switching
    x86: Allow generating user-space headers without a compiler
    x86/dumpstack: Don't dump kernel memory based on usermode RIP
    x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember()
    x86/alternatives: Lockdep-enforce text_mutex in text_poke*()
    x86/entry/64: Wipe KASAN stack shadow before rewind_stack_do_exit()
    x86/irqflags: Mark native_restore_fl extern inline
    x86/build: Remove jump label quirk for GCC older than 4.5.2
    x86/Kconfig: Fix trivial typo
    x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+
    x86/spectre: Add missing family 6 check to microcode check

    Linus Torvalds
     

01 Sep, 2018

2 commits

  • The self assignment was probably introduced by an automated code
    refactoring in
    commit 694c49a7c01c ("kconfig: drop localization support").

    The issue was identified by a self-assign warning when running
    make menuconfig with clang.

    Fixes: 694c49a7c01c ("kconfig: drop localization support")
    Signed-off-by: Lukas Bulwahn
    Signed-off-by: Masahiro Yamada

    Lukas Bulwahn
     
  • $(git diff-index) relies on the index being refreshed. This refreshing
    of the index used to happen, but was removed in cdf2bc632ebc
    ("scripts/setlocalversion on write-protected source tree", 2013-06-14)
    due to issues with a read-only filesystem.

    If the index is not refreshed, one runs into problems. E.g. as
    described in [0], git stores the uid in its index, so even if just the
    uid has changed (or git is tricked into thinking so), then we will
    think the tree is dirty. So as in [1], if you package linux-git with a
    system that uses fakeroot(1), you get a "-dirty" version. Unless you
    manually $(git update-index --refresh) themselves.

    The simplest solution seems to be $(git status --porcelain), with an
    additional flag saying "ignore untracked files". It seems clearer
    about what it does, and avoids issues regarding cached indexes and
    writable filesystems, but still has stable output for scripting.

    [0]: https://public-inbox.org/git/0190ae30-b6c8-2a8b-b1fb-fd9d84e6dfdf@oracle.com/
    [1]: https://bbs.archlinux.org/viewtopic.php?id=236702

    Signed-off-by: Genki Sky
    Signed-off-by: Masahiro Yamada

    Genki Sky
     

30 Aug, 2018

2 commits

  • Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
    bumped the minimum GCC version to 4.6 for all architectures.

    This effectively reverts commit da541b20021c ("objtool: Skip unreachable
    warnings for GCC 4.4 and older"), which was a workaround for GCC 4.4 or
    older.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Thomas Gleixner
    Acked-by: Josh Poimboeuf
    Cc: Peter Zijlstra
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/1535341183-19994-1-git-send-email-yamada.masahiro@socionext.com

    Masahiro Yamada
     
  • Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
    bumped the minimum GCC version to 4.6 for all architectures.

    Remove the workaround code.

    It was the only user of cc-if-fullversion. Remove the macro as well.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/1535348714-25457-1-git-send-email-yamada.masahiro@socionext.com

    Masahiro Yamada
     

27 Aug, 2018

1 commit


26 Aug, 2018

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - add build_{menu,n,g,x}config targets for compile-testing Kconfig

    - fix and improve recursive dependency detection in Kconfig

    - fix parallel building of menuconfig/nconfig

    - fix syntax error in clang-version.sh

    - suppress distracting log from syncconfig

    - remove obsolete "rpm" target

    - remove VMLINUX_SYMBOL(_STR) macro entirely

    - fix microblaze build with CONFIG_DYNAMIC_FTRACE

    - move compiler test for dead code/data elimination to Kconfig

    - rename well-known LDFLAGS variable to KBUILD_LDFLAGS

    - misc fixes and cleanups

    * tag 'kbuild-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: rename LDFLAGS to KBUILD_LDFLAGS
    kbuild: pass LDFLAGS to recordmcount.pl
    kbuild: test dead code/data elimination support in Kconfig
    initramfs: move gen_initramfs_list.sh from scripts/ to usr/
    vmlinux.lds.h: remove stale include
    export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR()
    Coccinelle: remove pci_alloc_consistent semantic to detect in zalloc-simple.cocci
    kbuild: make sorting initramfs contents independent of locale
    kbuild: remove "rpm" target, which is alias of "rpm-pkg"
    kbuild: Fix LOADLIBES rename in Documentation/kbuild/makefiles.txt
    kconfig: suppress "configuration written to .config" for syncconfig
    kconfig: fix "Can't open ..." in parallel build
    kbuild: Add a space after `!` to prevent parsing as file pattern
    scripts: modpost: check memory allocation results
    kconfig: improve the recursive dependency report
    kconfig: report recursive dependency involving 'imply'
    kconfig: error out when seeing recursive dependency
    kconfig: add build-only configurator targets
    scripts/dtc: consolidate include path options in Makefile

    Linus Torvalds
     

24 Aug, 2018

4 commits

  • Also add these typos to spelling.txt so checkpatch.pl will look for them.

    Link: http://lkml.kernel.org/r/88af06b9de34d870cb0afc46cfd24e0458be2575.1529471371.git.fthain@telegraphics.com.au
    Signed-off-by: Finn Thain
    Cc: Masahiro Yamada
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Finn Thain
     
  • Commit a0f97e06a43c ("kbuild: enable 'make CFLAGS=...' to add
    additional options to CC") renamed CFLAGS to KBUILD_CFLAGS.

    Commit 222d394d30e7 ("kbuild: enable 'make AFLAGS=...' to add
    additional options to AS") renamed AFLAGS to KBUILD_AFLAGS.

    Commit 06c5040cdb13 ("kbuild: enable 'make CPPFLAGS=...' to add
    additional options to CPP") renamed CPPFLAGS to KBUILD_CPPFLAGS.

    For some reason, LDFLAGS was not renamed.

    Using a well-known variable like LDFLAGS may result in accidental
    override of the variable.

    Kbuild generally uses KBUILD_ prefixed variables for the internally
    appended options, so here is one more conversion to sanitize the
    naming convention.

    I did not touch Makefiles under tools/ since the tools build system
    is a different world.

    Signed-off-by: Masahiro Yamada
    Acked-by: Kirill A. Shutemov
    Reviewed-by: Palmer Dabbelt

    Masahiro Yamada
     
  • Since commit 0fbe9a245c60 ("microblaze: add endianness options to
    LDFLAGS instead of LD"), you cannot build the kernel for microblaze
    with CONFIG_DYNAMIC_FTRACE.

    Fixes: 0fbe9a245c60 ("microblaze: add endianness options to LDFLAGS instead of LD")
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Prior to doing compiler feature detection in Kconfig, attempts to build
    GCC plugins with Clang would fail the build, much in the same way missing
    GCC plugin headers would fail the build. However, now that this logic
    has been lifted into Kconfig, add an explicit test for GCC (instead of
    duplicating it in the feature-test script).

    Reported-by: Stefan Agner
    Signed-off-by: Kees Cook
    Reviewed-by: Masahiro Yamada

    Kees Cook
     

23 Aug, 2018

1 commit

  • Devicetree bindings should be their own patch as documented in
    Documentation/devicetree/bindings/submitting-patches.txt section I.1.
    This is because bindings are logically independent from a driver
    implementation, they have a different maintainer (even though they often
    are applied via the same tree), and it makes for a cleaner history in the
    DT only tree created with git-filter-branch.

    [robh@kernel.org: add doc pointer to warning, simplify logic]
    Link: http://lkml.kernel.org/r/20180810170513.26284-1-robh@kernel.org
    [robh@kernel.org: v3]
    Link: http://lkml.kernel.org/r/20180810225049.20452-1-robh@kernel.org
    Link: http://lkml.kernel.org/r/20180809205032.22205-1-robh@kernel.org
    Signed-off-by: Rob Herring
    Acked-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rob Herring