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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202401201403.aTEbo79S-lkp@intel.com>
Date: Sat, 20 Jan 2024 14:27:25 +0800
From: kernel test robot <lkp@...el.com>
To: Ye Bin <yebin10@...wei.com>, rostedt@...dmis.org, mhiramat@...nel.org,
	mathieu.desnoyers@...icios.com, linux-trace-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	yebin10@...wei.com
Subject: Re: [PATCH 1/3] tracing/probes: support '%pd' type for print struct
 dentry's name

Hi Ye,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.7 next-20240119]
[cannot apply to rostedt-trace/for-next rostedt-trace/for-next-urgent]
[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/Ye-Bin/tracing-probes-support-pd-type-for-print-struct-dentry-s-name/20240119-093912
base:   linus/master
patch link:    https://lore.kernel.org/r/20240119013848.3111364-2-yebin10%40huawei.com
patch subject: [PATCH 1/3] tracing/probes: support '%pd' type for print struct dentry's name
config: i386-randconfig-051-20240120 (https://download.01.org/0day-ci/archive/20240120/202401201403.aTEbo79S-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240120/202401201403.aTEbo79S-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401201403.aTEbo79S-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/trace/trace_probe.c:1107:8: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
    1106 |         if (snprintf(new_argv, len, "+0x%lx(%s)",
         |                                         ~~~
         |                                         %x
    1107 |                      offsetof(struct dentry, d_name.name), argv) >= len) {
         |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:16:32: note: expanded from macro 'offsetof'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +1107 kernel/trace/trace_probe.c

  1095	
  1096	static char* traceprobe_expand_dentry(const char *argv)
  1097	{
  1098		#define DENTRY_EXPAND_LEN 7  /* +0xXX() */
  1099		char *new_argv;
  1100		int len = strlen(argv) + 1 + DENTRY_EXPAND_LEN;
  1101	
  1102		new_argv = kmalloc(len, GFP_KERNEL);
  1103		if (!new_argv)
  1104			return NULL;
  1105	
  1106		if (snprintf(new_argv, len, "+0x%lx(%s)",
> 1107			     offsetof(struct dentry, d_name.name), argv) >= len) {
  1108			kfree(new_argv);
  1109			return NULL;
  1110		}
  1111	
  1112		return new_argv;
  1113	}
  1114	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ