mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tools/bootconfig: Fix enabling all events in bconf2ftrace.sh
@ 2026-10-21 18:16 Eduardo Mucelli Rezende Oliveira
  0 siblings, 0 replies; only message in thread
From: Eduardo Mucelli Rezende Oliveira @ 2026-10-21 18:16 UTC (permalink / raw)
  To: mhiramat; +Cc: rostedt, linux-trace-kernel, linux-kernel

A bootconfig containing ftrace.event.enable makes bconf2ftrace.sh try to
write to events/enable/enable. The per-event loop treats the global
enable key as an event named "enable" in a group with the same name.

Since events/enable is a file, this write fails. With --apply, the script
exits before it reaches the code that enables all events. The same thing
happens with ftrace.instance.NAME.event.enable.

Skip the global enable key in the per-event loop and let the existing
global handler write to events/enable.

Fixes: 1d8365a553a7 ("tools/bootconfig: Support per-group/all event enabling option")
Signed-off-by: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
---
This is my second submission to the Linux kernel. Feedback is welcome.

Tested with --apply in a temporary tracefs instance on my Ubuntu machine,
running kernel 7.0.0-38-generic, with recording disabled. The original
script exits with status 2 and leaves events disabled. With the fix, it
exits successfully and the instance's events/enable reads 1. Per-group
enabling works with both versions.

 tools/bootconfig/scripts/bconf2ftrace.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/bootconfig/scripts/bconf2ftrace.sh b/tools/bootconfig/scripts/bconf2ftrace.sh
index 850c207343..7745c97e7a 100755
--- a/tools/bootconfig/scripts/bconf2ftrace.sh
+++ b/tools/bootconfig/scripts/bconf2ftrace.sh
@@ -218,6 +218,7 @@ setup_events() { # prefix("ftrace" or "ftrace.instance.INSTANCE") [instance]
 	prefix="${1}.event"
 	if xbc_has_branch ${1}.event; then
 		for grpev in `xbc_subkeys ${1}.event 2`; do
+			[ "$grpev" = "enable" ] && continue
 			setup_event $prefix ${grpev%.*} ${grpev#*.} $2
 		done
 	fi

base-commit: a804c5742bff224d4cb4d25dd383554d598be32b
-- 
2.53.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-21 18:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 18:16 [PATCH] tools/bootconfig: Fix enabling all events in bconf2ftrace.sh Eduardo Mucelli Rezende Oliveira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®