1. 03 8月, 2020 1 次提交
  2. 27 7月, 2020 1 次提交
  3. 23 7月, 2020 1 次提交
  4. 20 7月, 2020 1 次提交
  5. 13 7月, 2020 1 次提交
  6. 11 7月, 2020 1 次提交
  7. 06 7月, 2020 1 次提交
  8. 01 7月, 2020 1 次提交
  9. 29 6月, 2020 1 次提交
  10. 22 6月, 2020 1 次提交
  11. 21 6月, 2020 1 次提交
  12. 15 6月, 2020 2 次提交
    • A
      Makefile: Improve compressed debug info support detection · 7b169944
      Arvind Sankar 提交于
      Commit
        10e68b02 ("Makefile: support compressed debug info")
      added support for compressed debug sections.
      
      Support is detected by checking
      - does the compiler support -gz=zlib
      - does the assembler support --compressed-debug-sections=zlib
      - does the linker support --compressed-debug-sections=zlib
      
      However, the gcc driver's support for this option is somewhat
      convoluted. The driver's builtin specs are set based on the version of
      binutils that it was configured with. It reports an error if the
      configure-time linker/assembler (i.e., not necessarily the actual
      assembler that will be run) do not support the option, but only if the
      assembler (or linker) is actually invoked when -gz=zlib is passed.
      
      The cc-option check in scripts/Kconfig.include does not invoke the
      assembler, so the gcc driver reports success even if it does not support
      the option being passed to the assembler.
      
      Because the as-option check passes the option directly to the assembler
      via -Wa,--compressed-debug-sections=zlib, the gcc driver does not see
      this option and will never report an error.
      
      Combined with an installed version of binutils that is more recent than
      the one the compiler was built with, it is possible for all three tests
      to succeed, yet an actual compilation with -gz=zlib to fail.
      
      Moreover, it is unnecessary to explicitly pass
      --compressed-debug-sections=zlib to the assembler via -Wa, since the
      driver will do that automatically when it supports -gz=zlib.
      
      Convert the as-option to just -gz=zlib, simplifying it as well as
      performing a better test of the gcc driver's capabilities.
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NArvind Sankar <nivedita@alum.mit.edu>
      Reviewed-by: NNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      7b169944
    • L
      Linux 5.8-rc1 · b3a9e3b9
      Linus Torvalds 提交于
      b3a9e3b9
  13. 11 6月, 2020 1 次提交
  14. 06 6月, 2020 4 次提交
    • D
      kbuild: add variables for compression tools · 8dfb61dc
      Denis Efremov 提交于
      Allow user to use alternative implementations of compression tools,
      such as pigz, pbzip2, pxz. For example, multi-threaded tools to
      speed up the build:
      $ make GZIP=pigz BZIP2=pbzip2
      
      Variables _GZIP, _BZIP2, _LZOP are used internally because original env
      vars are reserved by the tools. The use of GZIP in gzip tool is obsolete
      since 2015. However, alternative implementations (e.g., pigz) still rely
      on it. BZIP2, BZIP, LZOP vars are not obsolescent.
      
      The credit goes to @grsecurity.
      
      As a sidenote, for multi-threaded lzma, xz compression one can use:
      $ export XZ_OPT="--threads=0"
      Signed-off-by: NDenis Efremov <efremov@linux.com>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      8dfb61dc
    • J
      Makefile: install modules.builtin even if CONFIG_MODULES=n · e0b250b5
      Jonas Zeiger 提交于
      Many applications check for available kernel features via:
      
        - /proc/modules (loaded modules, present if CONFIG_MODULES=y)
        - $(MODLIB)/modules.builtin (builtin modules)
      
      They fail to detect features if the kernel was built with CONFIG_MODULES=n
      and modules.builtin isn't installed.
      
      Therefore, add the target "_builtin_inst_" and make "install" and
      "modules_install" depend on it.
      
      Tests results:
      
        - make install: kernel image is copied as before, modules.builtin copied
        - make modules_install: (CONFIG_MODULES=n) nothing is copied, exit 1
      Signed-off-by: NJonas Zeiger <jonas.zeiger@talpidae.net>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      e0b250b5
    • M
      modpost: show warning if any of symbol dump files is missing · 48a0f727
      Masahiro Yamada 提交于
      If modpost fails to load a symbol dump file, it cannot check unresolved
      symbols, hence module dependency will not be added. Nor CRCs can be added.
      
      Currently, external module builds check only $(objtree)/Module.symvers,
      but it should check files specified by KBUILD_EXTRA_SYMBOLS as well.
      
      Move the warning message from the top Makefile to scripts/Makefile.modpost
      and print the warning if any dump file is missing.
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      48a0f727
    • M
      modpost: generate vmlinux.symvers and reuse it for the second modpost · 269a535c
      Masahiro Yamada 提交于
      The full build runs modpost twice, first for vmlinux.o and second for
      modules.
      
      The first pass dumps all the vmlinux symbols into Module.symvers, but
      the second pass parses vmlinux again instead of reusing the dump file,
      presumably because it needs to avoid accumulating stale symbols.
      
      Loading symbol info from a dump file is faster than parsing an ELF object.
      Besides, modpost deals with various issues to parse vmlinux in the second
      pass.
      
      A solution is to make the first pass dumps symbols into a separate file,
      vmlinux.symvers. The second pass reads it, and parses module .o files.
      The merged symbol information is dumped into Module.symvers in the same
      way as before.
      
      This makes further modpost cleanups possible.
      
      Also, it fixes the problem of 'make vmlinux', which previously overwrote
      Module.symvers, throwing away module symbols.
      
      I slightly touched scripts/link-vmlinux.sh so that vmlinux is re-linked
      when you cross this commit. Otherwise, vmlinux.symvers would not be
      generated.
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      269a535c
  15. 03 6月, 2020 2 次提交
  16. 01 6月, 2020 5 次提交
  17. 29 5月, 2020 2 次提交
    • N
      Makefile: support compressed debug info · 10e68b02
      Nick Desaulniers 提交于
      As debug information gets larger and larger, it helps significantly save
      the size of vmlinux images to compress the information in the debug
      information sections. Note: this debug info is typically split off from
      the final compressed kernel image, which is why vmlinux is what's used
      in conjunction with GDB. Minimizing the debug info size should have no
      impact on boot times, or final compressed kernel image size.
      
      All of the debug sections will have a `C` flag set.
      $ readelf -S <object file>
      
      $ bloaty vmlinux.gcc75.compressed.dwarf4 -- \
          vmlinux.gcc75.uncompressed.dwarf4
      
          FILE SIZE        VM SIZE
       --------------  --------------
        +0.0%     +18  [ = ]       0    [Unmapped]
       -73.3%  -114Ki  [ = ]       0    .debug_aranges
       -76.2% -2.01Mi  [ = ]       0    .debug_frame
       -73.6% -2.89Mi  [ = ]       0    .debug_str
       -80.7% -4.66Mi  [ = ]       0    .debug_abbrev
       -82.9% -4.88Mi  [ = ]       0    .debug_ranges
       -70.5% -9.04Mi  [ = ]       0    .debug_line
       -79.3% -10.9Mi  [ = ]       0    .debug_loc
       -39.5% -88.6Mi  [ = ]       0    .debug_info
       -18.2%  -123Mi  [ = ]       0    TOTAL
      
      $ bloaty vmlinux.clang11.compressed.dwarf4 -- \
          vmlinux.clang11.uncompressed.dwarf4
      
          FILE SIZE        VM SIZE
       --------------  --------------
        +0.0%     +23  [ = ]       0    [Unmapped]
       -65.6%    -871  [ = ]       0    .debug_aranges
       -77.4% -1.84Mi  [ = ]       0    .debug_frame
       -82.9% -2.33Mi  [ = ]       0    .debug_abbrev
       -73.1% -2.43Mi  [ = ]       0    .debug_str
       -84.8% -3.07Mi  [ = ]       0    .debug_ranges
       -65.9% -8.62Mi  [ = ]       0    .debug_line
       -86.2% -40.0Mi  [ = ]       0    .debug_loc
       -42.0% -64.1Mi  [ = ]       0    .debug_info
       -22.1%  -122Mi  [ = ]       0    TOTAL
      
      For x86_64 defconfig + LLVM=1 (before):
      Elapsed (wall clock) time (h:mm:ss or m:ss): 3:22.03
      Maximum resident set size (kbytes): 43856
      
      For x86_64 defconfig + LLVM=1 (after):
      Elapsed (wall clock) time (h:mm:ss or m:ss): 3:32.52
      Maximum resident set size (kbytes): 1566776
      
      Thanks to:
      Nick Clifton helped us to provide the minimal binutils version.
      Sedat Dilek found an increase in size of debug .deb package.
      
      Cc: Nick Clifton <nickc@redhat.com>
      Suggested-by: NDavid Blaikie <blaikie@google.com>
      Reviewed-by: NFangrui Song <maskray@google.com>
      Tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: NNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      10e68b02
    • M
      kbuild: disallow multi-word in M= or KBUILD_EXTMOD · e9e81b63
      Masahiro Yamada 提交于
      $(firstword ...) in scripts/Makefile.modpost was added by commit
      3f3fd3c0 ("[PATCH] kbuild: allow multi-word $M in Makefile.modpost")
      to build multiple external module directories.
      
      It was a solution to resolve symbol dependencies when an external
      module depends on another external module.
      
      Commit 0d96fb20 ("kbuild: Add new Kbuild variable
      KBUILD_EXTRA_SYMBOLS") introduced another solution by passing symbol
      info via KBUILD_EXTRA_SYMBOLS, then broke the multi-word M= support.
      
        include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
                     $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
      
      ... does not work if KBUILD_EXTMOD contains multiple words.
      
      This feature has been broken for more than a decade. Remove the
      bitrotten code, and stop parsing if M or KBUILD_EXTMOD contains
      multiple words.
      
      As Documentation/kbuild/modules.rst explains, if your module depends
      on another one, there are two solutions:
        - add a common top-level Kbuild file
        - use KBUILD_EXTRA_SYMBOLS
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      e9e81b63
  18. 25 5月, 2020 8 次提交
  19. 18 5月, 2020 1 次提交
  20. 17 5月, 2020 1 次提交
    • M
      kbuild: add infrastructure to build userspace programs · 7f3a59db
      Masahiro Yamada 提交于
      Kbuild supports the infrastructure to build host programs, but there
      was no support to build userspace programs for the target architecture
      (i.e. the same architecture as the kernel).
      
      Sam Ravnborg worked on this in 2014 (https://lkml.org/lkml/2014/7/13/154),
      but it was not merged. One problem at that time was, there was no good way
      to know whether $(CC) can link standalone programs. In fact, pre-built
      kernel.org toolchains [1] are often used for building the kernel, but they
      do not provide libc.
      
      Now, we can handle this cleanly because the compiler capability is
      evaluated at the Kconfig time. If $(CC) cannot link standalone programs,
      the relevant options are hidden by 'depends on CC_CAN_LINK'.
      
      The implementation just mimics scripts/Makefile.host
      
      The userspace programs are compiled with the same flags as the host
      programs. In addition, it uses -m32 or -m64 if it is found in
      $(KBUILD_CFLAGS).
      
      This new syntax has two usecases.
      
      - Sample programs
      
        Several userspace programs under samples/ include UAPI headers
        installed in usr/include. Most of them were previously built for
        the host architecture just to use the 'hostprogs' syntax.
      
        However, 'make headers' always works for the target architecture.
        This caused the arch mismatch in cross-compiling. To fix this
        distortion, sample code should be built for the target architecture.
      
      - Bpfilter
      
        net/bpfilter/Makefile compiles bpfilter_umh as the user mode helper,
        and embeds it into the kernel. Currently, it overrides HOSTCC with
        CC to use the 'hostprogs' syntax. This hack should go away.
      
      [1]: https://mirrors.edge.kernel.org/pub/tools/crosstool/Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      7f3a59db
  21. 15 5月, 2020 1 次提交
  22. 12 5月, 2020 1 次提交
  23. 11 5月, 2020 1 次提交