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: Quote CPU masks containing comma-separated words
Date: Mon, 19 Oct 2026 14:03:32 +0200 [thread overview]
Message-ID: <20261019120332.553567-1-edumucelli@gmail.com> (raw)
ftrace2bconf.sh writes the CPU mask without quotes. For a mask selecting
CPUs 0 and 32, the output is:
ftrace.cpumask = 00000001,00000001
Bootconfig reads the two comma-separated words as separate array values.
When bconf2ftrace.sh applies the saved settings, it writes those values
on separate lines instead of restoring the original CPU mask.
Quote the mask so the commas remain part of a single value.
Fixes: 2b86062a34a8 ("tools/bootconfig: Add a script to generates bootconfig from ftrace")
Signed-off-by: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
---
This is my first kernel contribution, so I'd appreciate any feedback.
Tested with the exporter, bootconfig parser and generated replay commands
using tracefs fixtures for 00000001,00000001, 0f,ffffffff and 1.
The masks containing commas fail before the fix and pass afterwards;
the single-word mask passes in both cases.
tools/bootconfig/scripts/ftrace2bconf.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bootconfig/scripts/ftrace2bconf.sh b/tools/bootconfig/scripts/ftrace2bconf.sh
index 8eed445c2..f8f288f90 100755
--- a/tools/bootconfig/scripts/ftrace2bconf.sh
+++ b/tools/bootconfig/scripts/ftrace2bconf.sh
@@ -238,7 +238,7 @@ instance_options() { # [instance-name]
fi
val=`cat $INSTANCE/tracing_cpumask`
if [ `echo $val | sed -e s/f//g`x != x ]; then
- emit_kv $PREFIX.cpumask = $val
+ emit_kv $PREFIX.cpumask = "\"$val\""
fi
val=`cat $INSTANCE/tracing_on`
if [ "$val" = "0" ]; then
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
--
2.53.0
reply other threads:[~2026-10-19 12:03 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=20261019120332.553567-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®