From: kernel test robot <lkp@intel.com>
To: Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
jochensp@jochen.sprickerhof.de
Subject: Re: [PATCH] ftrace: Implement :mod: cache filtering on kernel command line
Date: Sat, 11 Jan 2025 03:57:57 +0800 [thread overview]
Message-ID: <202501110314.8tTxSS0N-lkp@intel.com> (raw)
In-Reply-To: <20250109174639.32e6f43a@gandalf.local.home>
Hi Steven,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.13-rc6 next-20250110]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Steven-Rostedt/ftrace-Implement-mod-cache-filtering-on-kernel-command-line/20250110-064649
base: linus/master
patch link: https://lore.kernel.org/r/20250109174639.32e6f43a%40gandalf.local.home
patch subject: [PATCH] ftrace: Implement :mod: cache filtering on kernel command line
config: i386-randconfig-013-20250111 (https://download.01.org/0day-ci/archive/20250111/202501110314.8tTxSS0N-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250111/202501110314.8tTxSS0N-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501110314.8tTxSS0N-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/trace/ftrace.c:6232:6: warning: variable 'mod' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
6232 | if (next) {
| ^~~~
kernel/trace/ftrace.c:6246:67: note: uninitialized use occurs here
6246 | ret = ftrace_set_hash(ops, func, len, NULL, 0, 0, reset, enable, mod);
| ^~~
kernel/trace/ftrace.c:6232:2: note: remove the 'if' if its condition is always true
6232 | if (next) {
| ^~~~~~~~~
kernel/trace/ftrace.c:6224:11: note: initialize the variable 'mod' to silence this warning
6224 | char *mod, *func, *command, *next = buf;
| ^
| = NULL
1 warning generated.
vim +6232 kernel/trace/ftrace.c
6219
6220 static int
6221 ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len,
6222 int reset, int enable)
6223 {
6224 char *mod, *func, *command, *next = buf;
6225 char *tmp __free(kfree) = NULL;
6226 struct trace_array *tr = ops->private;
6227 int ret;
6228
6229 func = strsep(&next, ":");
6230
6231 /* This can also handle :mod: parsing */
> 6232 if (next) {
6233 if (!tr)
6234 return -EINVAL;
6235
6236 command = strsep(&next, ":");
6237 if (strcmp(command, "mod") != 0)
6238 return -EINVAL;
6239
6240 mod = next;
6241 len = command - func;
6242 /* Save the original func as ftrace_set_hash() can modify it */
6243 tmp = kstrdup(func, GFP_KERNEL);
6244 }
6245
6246 ret = ftrace_set_hash(ops, func, len, NULL, 0, 0, reset, enable, mod);
6247
6248 if (tr && mod && ret < 0) {
6249 /* Did tmp fail to allocate? */
6250 if (!tmp)
6251 return -ENOMEM;
6252 ret = cache_mod(tr, tmp, mod, enable);
6253 }
6254
6255 return ret;
6256 }
6257
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-01-10 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 22:46 [PATCH] ftrace: Implement :mod: cache filtering on kernel command line Steven Rostedt
2025-01-10 19:35 ` kernel test robot
2025-01-10 19:57 ` kernel test robot [this message]
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=202501110314.8tTxSS0N-lkp@intel.com \
--to=lkp@intel.com \
--cc=jochensp@jochen.sprickerhof.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--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;
as well as URLs for NNTP newsgroup(s).