mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
To: mhiramat@kernel.org
Cc: rostedt@goodmis.org, linux-trace-kernel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] tools/bootconfig: Fix enabling all events in bconf2ftrace.sh
Date: Wed, 21 Oct 2026 20:16:26 +0200	[thread overview]
Message-ID: <20261021181626.2004489-1-edumucelli@gmail.com> (raw)

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


                 reply	other threads:[~2026-10-21 18:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261021181626.2004489-1-edumucelli@gmail.com \
    --to=edumucelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®