1. 27 4月, 2019 2 次提交
  2. 17 4月, 2019 1 次提交
    • M
      kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used · 23605a46
      Masahiro Yamada 提交于
      [ 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: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      23605a46
  3. 03 4月, 2019 1 次提交
    • F
      kbuild: modversions: Fix relative CRC byte order interpretation · aa7f29f8
      Fredrik Noring 提交于
      commit 54a7151b1496cddbb7a83546b7998103e98edc88 upstream.
      
      Fix commit 56067812 ("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: 56067812 ("kbuild: modversions: add infrastructure for emitting relative CRCs")
      Signed-off-by: NFredrik Noring <noring@nocrew.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aa7f29f8
  4. 24 3月, 2019 1 次提交
  5. 13 2月, 2019 3 次提交
  6. 26 1月, 2019 2 次提交
    • M
      kconfig: fix memory leak when EOF is encountered in quotation · 46199110
      Masahiro Yamada 提交于
      [ 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: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      46199110
    • M
      kconfig: fix file name and line number of warn_ignored_character() · ba8efcdc
      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:
      
        <none>:0:warning: ignoring unsupported character '/'
      
        After the fix:
      
        Kconfig:1:warning: ignoring unsupported character '/'
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      ba8efcdc
  7. 17 1月, 2019 1 次提交
    • W
      x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE · 4bef2bac
      WANG Chao 提交于
      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: NWANG Chao <chao.wang@ucloud.cn>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Reviewed-by: NZhenzhong Duan <zhenzhong.duan@oracle.com>
      Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: David Woodhouse <dwmw@amazon.co.uk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
      Cc: Michal Marek <michal.lkml@markovi.net>
      Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: linux-kbuild@vger.kernel.org
      Cc: srinivas.eeda@oracle.com
      Cc: stable <stable@vger.kernel.org>
      Cc: x86-ml <x86@kernel.org>
      Link: https://lkml.kernel.org/r/20181210163725.95977-1-chao.wang@ucloud.cnSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4bef2bac
  8. 13 1月, 2019 1 次提交
  9. 20 12月, 2018 1 次提交
  10. 08 12月, 2018 1 次提交
  11. 06 12月, 2018 1 次提交
  12. 27 11月, 2018 2 次提交
    • G
      Revert "scripts/setlocalversion: git: Make -dirty check more robust" · 62b5dea3
      Guenter Roeck 提交于
      [ Upstream commit 8ef14c2c41d962756d314f1d7dc972b0ea7a180f ]
      
      This reverts commit 6147b1cf.
      
      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: 6147b1cf ("scripts/setlocalversion: git: Make -dirty check more robust"
      Cc: Genki Sky <sky@genki.is>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      62b5dea3
    • M
      kbuild: deb-pkg: fix too low build version number · 4d17f22e
      Masahiro Yamada 提交于
      [ Upstream commit bbcde0a7241261cd0ca8d8e6b94a4113a4b71443 ]
      
      Since commit b41d920a ("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: b41d920a ("kbuild: deb-pkg: split generating packaging and build")
      Reported-by: NDoug Smythies <dsmythies@telus.net>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: NDoug Smythies <dsmythies@telus.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      4d17f22e
  13. 21 11月, 2018 1 次提交
  14. 19 9月, 2018 1 次提交
  15. 09 9月, 2018 1 次提交
  16. 05 9月, 2018 3 次提交
  17. 04 9月, 2018 1 次提交
  18. 03 9月, 2018 2 次提交
    • R
      kbuild: make missing $DEPMOD a Warning instead of an Error · 914b087f
      Randy Dunlap 提交于
      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: 934193a6 ("kbuild: verify that $DEPMOD is installed")
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Reported-by: NH. Nikolaus Schaller <hns@goldelico.com>
      Cc: stable@vger.kernel.org
      Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
      Cc: Lucas De Marchi <lucas.de.marchi@gmail.com>
      Cc: Michal Marek <michal.lkml@markovi.net>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: Chih-Wei Huang <cwhuang@linux.org.tw>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      914b087f
    • M
      kconfig: do not require pkg-config on make {menu,n}config · fd65465b
      Masahiro Yamada 提交于
      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: 4ab3b801 ("kconfig: check for pkg-config on make {menu,n,g,x}config")
      Reported-by: NMeelis Roos <mroos@linux.ee>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: NMeelis Roos <mroos@linux.ee>
      Tested-by: NRandy Dunlap <rdunlap@infradead.org>
      fd65465b
  19. 01 9月, 2018 2 次提交
  20. 30 8月, 2018 2 次提交
  21. 24 8月, 2018 4 次提交
  22. 23 8月, 2018 6 次提交