Go to file
Viktor Malik 06f9e1dcad
kbuild: avoid too many execution of scripts/pahole-flags.sh
JIRA: https://issues.redhat.com/browse/RHEL-30773

Conflicts: context changes due to main Makefile being different from
           upstream

commit 72d091846de935e0942a8a0f1fe24ff739d85d76
Author: Masahiro Yamada <masahiroy@kernel.org>
Date:   Thu Oct 19 00:19:48 2023 +0900

    kbuild: avoid too many execution of scripts/pahole-flags.sh

    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: Masahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
    Tested-by: Alan Maguire <alan.maguire@oracle.com>
    Reviewed-by: Nicolas Schier <n.schier@avm.de>
    Tested-by: Miguel Ojeda <ojeda@kernel.org>
    Acked-by: Miguel Ojeda <ojeda@kernel.org>
    Acked-by: Jiri Olsa <jolsa@kernel.org>
    Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>

Signed-off-by: Viktor Malik <vmalik@redhat.com>
2024-11-13 09:39:16 +01:00
Documentation bpf, docs: Clarify PC use in instruction-set.rst 2024-11-11 07:44:54 +01:00
LICENSES
arch bpf, arm64: Add support for lse atomics in bpf_arena 2024-11-13 09:39:15 +01:00
block
certs
crypto
drivers Merge: USB/TBT code rebase of supported drivers to upstream v6.10 2024-11-06 08:32:22 +00:00
fs Merge: xfs: XFS update #1 for RHEL9.6 2024-11-06 08:27:23 +00:00
include bpf: Add support for kprobe session attach 2024-11-11 07:44:56 +01:00
init
io_uring
ipc
kernel bpf: Remove redundant page mask of vmf->address 2024-11-13 09:39:12 +01:00
lib bpf, tests: Fix typos in comments 2024-11-11 07:44:47 +01:00
mm
net bpf: check bpf_dummy_struct_ops program params for test runs 2024-11-11 07:44:53 +01:00
redhat [redhat] kernel-5.14.0-527.el9 2024-11-06 08:36:08 +00:00
samples samples/bpf: Add valid info for VMLINUX_BTF 2024-11-11 07:44:54 +01:00
scripts kbuild: avoid too many execution of scripts/pahole-flags.sh 2024-11-13 09:39:16 +01:00
security
sound Merge: CNB96: timekeeping: add clocksource ID and infrastructure for converting to/from a base clock 2024-11-05 11:41:13 +00:00
tools bpf: Avoid uninitialized value in BPF_CORE_READ_BITFIELD 2024-11-13 09:39:16 +01:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.gitlab-ci.yml
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
Kconfig.redhat
MAINTAINERS kbuild: avoid too many execution of scripts/pahole-flags.sh 2024-11-13 09:39:16 +01:00
Makefile kbuild: avoid too many execution of scripts/pahole-flags.sh 2024-11-13 09:39:16 +01:00
Makefile.rhelver [redhat] kernel-5.14.0-527.el9 2024-11-06 08:36:08 +00:00
README
makefile

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.