Skip to content
Snippets Groups Projects
  1. Nov 28, 2023
  2. Nov 27, 2023
  3. Nov 19, 2023
  4. Nov 13, 2023
  5. Oct 30, 2023
  6. Oct 28, 2023
    • Simon Glass's avatar
      kbuild: Correct missing architecture-specific hyphens · 766b7007
      Simon Glass authored
      
      These should add a hyphen to indicate that it makes a adjective. Fix
      them.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      766b7007
    • Masahiro Yamada's avatar
      kbuild: avoid too many execution of scripts/pahole-flags.sh · 72d09184
      Masahiro Yamada authored
      scripts/pahole-flags.sh is executed so many times.
      
      You can confirm it, as follows:
      
        $ cat <<EOF >> scripts/pahole-flags.sh
        > echo "scripts/pahole-flags.sh was executed" >&2
        > EOF
      
        $ make -s
        scripts/pahole-flags.sh was executed
        scripts/pahole-flags.sh was executed
        scripts/pahole-flags.sh was executed
        scripts/pahole-flags.sh was executed
        scripts/pahole-flags.sh was executed
          [ lots of repeated lines... ]
      
      This scripts is executed more than 20 times during the kernel build
      because PAHOLE_FLAGS is a recursively expanded variable and exported
      to sub-processes.
      
      With GNU Make >= 4.4, it is executed more than 60 times because
      exported variables are also passed to other $(shell ) invocations.
      Without careful coding, it is known to cause an exponential fork
      explosion. [1]
      
      The use of $(shell ) in an exported recursive variable is likely wrong
      because $(shell ) is always evaluated due to the 'export' keyword, and
      the evaluation can occur multiple times by the nature of recursive
      variables.
      
      Convert the shell script to a Makefile, which is included only when
      CONFIG_DEBUG_INFO_BTF=y.
      
      [1]: https://savannah.gnu.org/bugs/index.php?64746
      
      
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarAlan Maguire <alan.maguire@oracle.com>
      Tested-by: default avatarAlan Maguire <alan.maguire@oracle.com>
      Reviewed-by: default avatarNicolas Schier <n.schier@avm.de>
      Tested-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      Acked-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Reviewed-by: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
      72d09184
    • Masahiro Yamada's avatar
      kbuild: unify no-compiler-targets and no-sync-config-targets · 9d361173
      Masahiro Yamada authored
      
      Now that vdso_install does not depend on any in-tree build artifact,
      it no longer needs a compiler, making no-compiler-targets the same
      as no-sync-config-targets.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      9d361173
    • Masahiro Yamada's avatar
      kbuild: unify vdso_install rules · 56769ba4
      Masahiro Yamada authored
      
      Currently, there is no standard implementation for vdso_install,
      leading to various issues:
      
       1. Code duplication
      
          Many architectures duplicate similar code just for copying files
          to the install destination.
      
          Some architectures (arm, sparc, x86) create build-id symlinks,
          introducing more code duplication.
      
       2. Unintended updates of in-tree build artifacts
      
          The vdso_install rule depends on the vdso files to install.
          It may update in-tree build artifacts. This can be problematic,
          as explained in commit 19514fc6 ("arm, kbuild: make
          "make install" not depend on vmlinux").
      
       3. Broken code in some architectures
      
          Makefile code is often copied from one architecture to another
          without proper adaptation.
      
          'make vdso_install' for parisc does not work.
      
          'make vdso_install' for s390 installs vdso64, but not vdso32.
      
      To address these problems, this commit introduces a generic vdso_install
      rule.
      
      Architectures that support vdso_install need to define vdso-install-y
      in arch/*/Makefile. vdso-install-y lists the files to install.
      
      For example, arch/x86/Makefile looks like this:
      
        vdso-install-$(CONFIG_X86_64)           += arch/x86/entry/vdso/vdso64.so.dbg
        vdso-install-$(CONFIG_X86_X32_ABI)      += arch/x86/entry/vdso/vdsox32.so.dbg
        vdso-install-$(CONFIG_X86_32)           += arch/x86/entry/vdso/vdso32.so.dbg
        vdso-install-$(CONFIG_IA32_EMULATION)   += arch/x86/entry/vdso/vdso32.so.dbg
      
      These files will be installed to $(MODLIB)/vdso/ with the .dbg suffix,
      if exists, stripped away.
      
      vdso-install-y can optionally take the second field after the colon
      separator. This is needed because some architectures install a vdso
      file as a different base name.
      
      The following is a snippet from arch/arm64/Makefile.
      
        vdso-install-$(CONFIG_COMPAT_VDSO)      += arch/arm64/kernel/vdso32/vdso.so.dbg:vdso32.so
      
      This will rename vdso.so.dbg to vdso32.so during installation. If such
      architectures change their implementation so that the base names match,
      this workaround will go away.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: Sven Schnelle <svens@linux.ibm.com> # s390
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      Reviewed-by: default avatarGuo Ren <guoren@kernel.org>
      Acked-by: Helge Deller <deller@gmx.de>  # parisc
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      56769ba4
  7. Oct 22, 2023
  8. Oct 19, 2023
  9. Oct 15, 2023
  10. Oct 08, 2023
  11. Oct 05, 2023
  12. Oct 03, 2023
  13. Oct 01, 2023
  14. Sep 24, 2023
  15. Sep 17, 2023
  16. Sep 11, 2023
  17. Sep 10, 2023
  18. Sep 03, 2023
  19. Sep 01, 2023
  20. Aug 29, 2023
  21. Aug 27, 2023
  22. Aug 22, 2023
  23. Aug 20, 2023
  24. Aug 14, 2023
  25. Aug 13, 2023
  26. Aug 09, 2023
  27. Aug 07, 2023
  28. Aug 06, 2023
  29. Jul 30, 2023
Loading