Hi Ryan,
kernel test robot noticed the following build errors:
[auto build test ERROR on v6.17] [also build test ERROR on linus/master next-20251010] [cannot apply to trace/for-next] [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/Ryan-Chung/docs-tracing-fprob... base: v6.17 patch link: https://lore.kernel.org/r/20251004235001.133111-4-seokwoo.chung130%40gmail.c... patch subject: [PATCH v3 3/5] tracing: fprobe: support comma-separated symbols and :entry/:exit config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20251010/202510102331.y36ENO9m-lkp@i...) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251010/202510102331.y36ENO9m-lkp@i...)
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/202510102331.y36ENO9m-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
kernel/trace/trace_fprobe.c: In function 'parse_fprobe_spec':
kernel/trace/trace_fprobe.c:274:28: error: assignment of read-only location '*p'
274 | *p = '\0'; | ^ kernel/trace/trace_fprobe.c:276:28: error: assignment of read-only location '*p' 276 | *p = '\0'; | ^ kernel/trace/trace_fprobe.c: In function 'parse_symbol_and_return':
kernel/trace/trace_fprobe.c:1281:31: error: 'nofilter' undeclared (first use in this function); did you mean 'filter'?
1281 | char *filter = NULL; *nofilter = NULL; | ^~~~~~~~ | filter kernel/trace/trace_fprobe.c:1281:31: note: each undeclared identifier is reported only once for each function it appears in kernel/trace/trace_fprobe.c: In function 'trace_fprobe_create_internal': kernel/trace/trace_fprobe.c:1355:14: warning: unused variable 'has_wild' [-Wunused-variable] 1355 | bool has_wild = false; | ^~~~~~~~ kernel/trace/trace_fprobe.c: At top level:
kernel/trace/trace_fprobe.c:1275:12: warning: 'parse_symbol_and_return' defined but not used [-Wunused-function]
1275 | static int parse_symbol_and_return(int argc, const char *argv[], | ^~~~~~~~~~~~~~~~~~~~~~~
vim +274 kernel/trace/trace_fprobe.c
233 234 static int parse_fprobe_spec(const char *in, bool is_tracepoint, 235 char **base, bool *is_return, bool *list_mode, 236 char **filter, char **nofilter) 237 { 238 const char *p; 239 char *work = NULL; 240 char *b = NULL, *f = NULL, *nf = NULL; 241 bool legacy_ret = false; 242 bool list = false; 243 int ret = 0; 244 245 if (!in || !base || !is_return || !list_mode || !filter || !nofilter) 246 return -EINVAL; 247 248 *base = NULL; *filter = NULL; *nofilter = NULL; 249 *is_return = false; *list_mode = false; 250 251 if (is_tracepoint) { 252 if (strchr(in, ',') || strchr(in, ':')) 253 return -EINVAL; 254 if (strstr(in, "%return")) 255 return -EINVAL; 256 for (p = in; *p; p++) 257 if (!isalnum(*p) && *p != '_') 258 return -EINVAL; 259 b = kstrdup(in, GFP_KERNEL); 260 if (!b) 261 return -ENOMEM; 262 *base = b; 263 return 0; 264 } 265 266 work = kstrdup(in, GFP_KERNEL); 267 if (!work) 268 return -ENOMEM; 269 270 p = strstr(work, "%return"); 271 if (p) { 272 if (!strcmp(p, ":exit")) { 273 *is_return = true;
274 *p = '\0';
275 } else if (!strcmp(p, ":entry")) { 276 *p = '\0'; 277 } else { 278 ret = -EINVAL; 279 goto out; 280 } 281 } 282 283 list = !!strchr(work, ',') || has_wildcard(work); 284 if (legacy_ret) 285 *is_return = true; 286 287 b = kstrdup(work, GFP_KERNEL); 288 if (!b) { 289 ret = -ENOMEM; 290 goto out; 291 } 292 293 if (list) { 294 char *tmp = b, *tok; 295 size_t fsz = strlen(b) + 1, nfsz = strlen(b) + 1; 296 297 f = kzalloc(fsz, GFP_KERNEL); 298 nf = kzalloc(nfsz, GFP_KERNEL); 299 if (!f || !nf) { 300 ret = -ENOMEM; 301 goto out; 302 } 303 304 while ((tok = strsep(&tmp, ",")) != NULL) { 305 char *dst; 306 bool neg = (*tok == '!'); 307 308 if (*tok == '\0') 309 continue; 310 if (neg) 311 tok++; 312 dst = neg ? nf : f; 313 if (dst[0] != '\0') 314 strcat(dst, ","); 315 strcat(dst, tok); 316 } 317 *list_mode = true; 318 } 319 320 *base = b; b = NULL; 321 *filter = f; f = NULL; 322 *nofilter = nf; nf = NULL; 323 324 out: 325 kfree(work); 326 kfree(b); 327 kfree(f); 328 kfree(nf); 329 return ret; 330 } 331