summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/libbpf.c
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2025-07-18 16:18:44 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-20 18:30:29 +0200
commit1d325fed242d44c322d41d23396ee3148894c4d2 (patch)
treefa7807d269f31be423e496fa2984abfc8e516200 /tools/lib/bpf/libbpf.c
parent2ef17d1476ab26bce89764e2f16833d7f52acc38 (diff)
ktest.pl: Prevent recursion of default variable options
[ Upstream commit 61f7e318e99d3b398670518dd3f4f8510d1800fc ] If a default variable contains itself, do not recurse on it. For example: ADD_CONFIG := ${CONFIG_DIR}/temp_config DEFAULTS ADD_CONFIG = ${CONFIG_DIR}/default_config ${ADD_CONFIG} The above works because the temp variable ADD_CONFIG (is a temp because it is created with ":=") is already defined, it will be substituted in the variable option. But if it gets commented out: # ADD_CONFIG := ${CONFIG_DIR}/temp_config DEFAULTS ADD_CONFIG = ${CONFIG_DIR}/default_config ${ADD_CONFIG} Then the above will go into a recursive loop where ${ADD_CONFIG} will get replaced with the current definition of ADD_CONFIG which contains the ${ADD_CONFIG} and that will also try to get converted. ktest.pl will error after 100 attempts of recursion and fail. When replacing a variable with the default variable, if the default variable contains itself, do not replace it. Cc: "John Warthog9 Hawley" <warthog9@kernel.org> Cc: Dhaval Giani <dhaval.giani@gmail.com> Cc: Greg KH <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/20250718202053.732189428@kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions