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]
Message-ID: <202210121654.e3XVv7Wu-lkp@intel.com>
Date:   Wed, 12 Oct 2022 16:29:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Steven Rostedt (Google)" <rostedt@...dmis.org>
Cc:     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:47: warning: passing argument 1 of
 'kern_fetch_store_strlen' makes integer from pointer without a cast

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-a011
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # 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
        make 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: In function 'trace_string':
>> kernel/trace/trace_events_synth.c:423:47: warning: passing argument 1 of 'kern_fetch_store_strlen' makes integer from pointer without a cast [-Wint-conversion]
     423 |                 len = kern_fetch_store_strlen(str_val) + 1;
         |                                               ^~~~~~~
         |                                               |
         |                                               char *
   In file included from kernel/trace/trace_events_synth.c:21:
   kernel/trace/trace_probe_kernel.h:22:39: note: expected 'long unsigned int' but argument is of type 'char *'
      22 | kern_fetch_store_strlen(unsigned long addr)
         |                         ~~~~~~~~~~~~~~^~~~
   kernel/trace/trace_events_synth.c: In function 'trace_event_raw_event_synth':
   kernel/trace/trace_events_synth.c:477:47: warning: passing argument 1 of 'kern_fetch_store_strlen' makes integer from pointer without a cast [-Wint-conversion]
     477 |                 len = kern_fetch_store_strlen(str_val) + 1;
         |                                               ^~~~~~~
         |                                               |
         |                                               char *
   In file included from kernel/trace/trace_events_synth.c:21:
   kernel/trace/trace_probe_kernel.h:22:39: note: expected 'long unsigned int' but argument is of type 'char *'
      22 | kern_fetch_store_strlen(unsigned long addr)
         |                         ~~~~~~~~~~~~~~^~~~


vim +/kern_fetch_store_strlen +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" (156378 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ