[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210121104.7pYnoapC-lkp@intel.com>
Date: Wed, 12 Oct 2022 11:10:29 +0800
From: kernel test robot <lkp@...el.com>
To: "Steven Rostedt (Google)" <rostedt@...dmis.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
Ammar Faizi <ammarfaizi2@...weeb.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:rostedt/linux-trace/ftrace/core 46/46]
kernel/trace/trace_events_synth.c:423:33: error: incompatible pointer to
integer conversion passing 'char *' to parameter of type 'unsigned long'
tree: https://github.com/ammarfaizi2/linux-block rostedt/linux-trace/ftrace/core
head: 36ac19d408fed20243e0901b038ade4bd6f5c8ad
commit: 36ac19d408fed20243e0901b038ade4bd6f5c8ad [46/46] tracing: Fix reading strings from synthetic events
config: powerpc-randconfig-r035-20221010
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/ammarfaizi2/linux-block/commit/36ac19d408fed20243e0901b038ade4bd6f5c8ad
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block rostedt/linux-trace/ftrace/core
git checkout 36ac19d408fed20243e0901b038ade4bd6f5c8ad
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> kernel/trace/trace_events_synth.c:423:33: error: incompatible pointer to integer conversion passing 'char *' to parameter of type 'unsigned long' [-Wint-conversion]
len = kern_fetch_store_strlen(str_val) + 1;
^~~~~~~
kernel/trace/trace_probe_kernel.h:22:39: note: passing argument to parameter 'addr' here
kern_fetch_store_strlen(unsigned long addr)
^
kernel/trace/trace_events_synth.c:477:33: error: incompatible pointer to integer conversion passing 'char *' to parameter of type 'unsigned long' [-Wint-conversion]
len = kern_fetch_store_strlen(str_val) + 1;
^~~~~~~
kernel/trace/trace_probe_kernel.h:22:39: note: passing argument to parameter 'addr' here
kern_fetch_store_strlen(unsigned long addr)
^
2 errors generated.
vim +423 kernel/trace/trace_events_synth.c
404
405 static unsigned int trace_string(struct synth_trace_event *entry,
406 struct synth_event *event,
407 char *str_val,
408 bool is_dynamic,
409 unsigned int data_size,
410 unsigned int *n_u64)
411 {
412 unsigned int len = 0;
413 char *str_field;
414 int ret;
415
416 if (is_dynamic) {
417 u32 data_offset;
418
419 data_offset = offsetof(typeof(*entry), fields);
420 data_offset += event->n_u64 * sizeof(u64);
421 data_offset += data_size;
422
> 423 len = kern_fetch_store_strlen(str_val) + 1;
424 if (len == 1)
425 len = strlen("fault") + 1;
426 data_offset |= len << 16;
427 *(u32 *)&entry->fields[*n_u64] = data_offset;
428
429 kern_fetch_store_string((unsigned long)str_val, &entry->fields[*n_u64], entry);
430
431 (*n_u64)++;
432 } else {
433 str_field = (char *)&entry->fields[*n_u64];
434
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (203848 bytes)
Powered by blists - more mailing lists