linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: <oe-kbuild-all@lists.linux.dev>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-trace-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] tracing: Remove "__attribute__()" from the type field of event format
Date: Wed, 9 Jul 2025 09:06:10 +0800	[thread overview]
Message-ID: <aG3AghTb49v6BBYn@rli9-mobl> (raw)
In-Reply-To: <175197568917.977073.2201559708302320631.stgit@mhiramat.tok.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 4208 bytes --]

Hi Masami,

kernel test robot noticed the following build errors:

[auto build test ERROR on trace/for-next]
[also build test ERROR on linus/master v6.16-rc5 next-20250708]
[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/Masami-Hiramatsu-Google/tracing-Remove-__attribute__-from-the-type-field-of-event-format/20250708-195600
base:   https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link:    https://lore.kernel.org/r/175197568917.977073.2201559708302320631.stgit%40mhiramat.tok.corp.google.com
patch subject: [PATCH 1/2] tracing: Remove "__attribute__()" from the type field of event format
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
config: arc-randconfig-001-20250709 (attached as .config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (attached as 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/202507090856.swUa0d8T-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/trace/trace_events.c: In function 'sanitize_field_type':
>> kernel/trace/trace_events.c:120:30: error: initializer element is not constant
     static const int attr_len = strlen(ATTRIBUTE_STR);
                                 ^~~~~~


vim +120 kernel/trace/trace_events.c

c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  116) 
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  117) /* Remove all __attribute__() from type */
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  118) static void sanitize_field_type(char *type)
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  119) {
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08 @120) 	static const int attr_len = strlen(ATTRIBUTE_STR);
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  121) 	char *attr, *tmp, *next;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  122) 	int depth;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  123) 
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  124) 	next = type;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  125) 	while ((attr = strstr(next, ATTRIBUTE_STR))) {
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  126) 		next = attr + attr_len;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  127) 
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  128) 		/* Retry if __attribute__ is a part of type name. */
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  129) 		if ((attr != type && !isspace(attr[-1])) ||
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  130) 		    attr[attr_len] != '(')
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  131) 			continue;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  132) 
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  133) 		depth = 0;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  134) 		while ((tmp = strpbrk(next, "()"))) {
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  135) 			if (*tmp == '(')
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  136) 				depth++;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  137) 			else
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  138) 				depth--;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  139) 			next = tmp + 1;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  140) 			if (depth == 0)
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  141) 				break;
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  142) 		}
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  143) 		next = skip_spaces(next);
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  144) 		strcpy(attr, next);
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  145) 	}
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  146) }
c4415fcf8cbdb4 Masami Hiramatsu (Google  2025-07-08  147) 

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36116 bytes --]

[-- Attachment #3: reproduce --]
[-- Type: text/plain, Size: 778 bytes --]

reproduce (this is a W=1 build):
        git clone https://github.com/intel/lkp-tests.git ~/lkp-tests
        git remote add trace https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
        git fetch trace for-next
        git checkout trace/for-next
        b4 shazam https://lore.kernel.org/r/175197568917.977073.2201559708302320631.stgit@mhiramat.tok.corp.google.com
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-8.5.0 ~/lkp-tests/kbuild/make.cross W=1 O=build_dir ARCH=arc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-8.5.0 ~/lkp-tests/kbuild/make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/iio/imu/inv_icm42600/ fs/ kernel/trace/

  reply	other threads:[~2025-07-09  1:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08 11:54 [PATCH 0/2] tracing: Fix an event field filter issue Masami Hiramatsu (Google)
2025-07-08 11:54 ` [PATCH 1/2] tracing: Remove "__attribute__()" from the type field of event format Masami Hiramatsu (Google)
2025-07-09  1:06   ` kernel test robot [this message]
2025-07-09 16:51     ` Steven Rostedt
2025-07-10 13:47       ` Masami Hiramatsu
2025-07-09 17:11   ` Steven Rostedt
2025-07-10 13:45     ` Masami Hiramatsu
2025-07-10 13:53       ` Steven Rostedt
2025-07-11  1:44         ` Masami Hiramatsu
2025-07-11  5:37     ` Masami Hiramatsu
2025-07-11 16:03       ` Steven Rostedt
2025-07-12 11:45         ` Masami Hiramatsu
2025-07-12 14:37           ` Steven Rostedt
2025-07-12 15:13             ` Steven Rostedt
2025-07-14 14:14             ` Masami Hiramatsu
2025-07-14 14:32               ` Steven Rostedt
2025-07-08 11:54 ` [PATCH 2/2] tracing: Allocate field->type only if it needs to be sanitized Masami Hiramatsu (Google)

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=aG3AghTb49v6BBYn@rli9-mobl \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --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).