lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 12 Oct 2022 12:33:02 +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: warning: 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: x86_64-randconfig-a005
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
        # 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=x86_64 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 warnings (new ones prefixed by >>):

>> kernel/trace/trace_events_synth.c:423:33: warning: 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: warning: 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 warnings 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" (138693 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ