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: <202510161858.5hz4HLnc-lkp@intel.com>
Date: Thu, 16 Oct 2025 19:05:27 +0800
From: kernel test robot <lkp@...el.com>
To: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
	linux-trace-kernel@...r.kernel.org,
	linux-perf-users@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Masami Hiramatsu <mhiramat@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Memory Management List <linux-mm@...ck.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Takaya Saeki <takayas@...gle.com>, Tom Zanussi <zanussi@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ian Rogers <irogers@...gle.com>,
	Douglas Raillard <douglas.raillard@....com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v3 03/13] perf: tracing: Simplify
 perf_sysenter_enable/disable() with guards

Hi Steven,

kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.18-rc1 next-20251015]
[cannot apply to trace/for-next acme/perf/core]
[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/Steven-Rostedt/tracing-Make-trace_user_fault_read-exposed-to-rest-of-tracing/20251016-014059
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20251015173548.540984239%40kernel.org
patch subject: [PATCH v3 03/13] perf: tracing: Simplify perf_sysenter_enable/disable() with guards
config: x86_64-randconfig-r073-20251016 (https://download.01.org/0day-ci/archive/20251016/202510161858.5hz4HLnc-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251016/202510161858.5hz4HLnc-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/202510161858.5hz4HLnc-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/trace/trace_syscalls.c:1018:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    1018 |         if (!sys_perf_refcount_enter) {
         |             ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/trace_syscalls.c:1027:9: note: uninitialized use occurs here
    1027 |         return ret;
         |                ^~~
   kernel/trace/trace_syscalls.c:1018:2: note: remove the 'if' if its condition is always true
    1018 |         if (!sys_perf_refcount_enter) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/trace_syscalls.c:1012:9: note: initialize the variable 'ret' to silence this warning
    1012 |         int ret;
         |                ^
         |                 = 0
   kernel/trace/trace_syscalls.c:1123:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    1123 |         if (!sys_perf_refcount_exit) {
         |             ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/trace_syscalls.c:1132:9: note: uninitialized use occurs here
    1132 |         return ret;
         |                ^~~
   kernel/trace/trace_syscalls.c:1123:2: note: remove the 'if' if its condition is always true
    1123 |         if (!sys_perf_refcount_exit) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/trace_syscalls.c:1117:9: note: initialize the variable 'ret' to silence this warning
    1117 |         int ret;
         |                ^
         |                 = 0
   2 warnings generated.


vim +1018 kernel/trace/trace_syscalls.c

  1009	
  1010	static int perf_sysenter_enable(struct trace_event_call *call)
  1011	{
  1012		int ret;
  1013		int num;
  1014	
  1015		num = ((struct syscall_metadata *)call->data)->syscall_nr;
  1016	
  1017		guard(mutex)(&syscall_trace_lock);
> 1018		if (!sys_perf_refcount_enter) {
  1019			ret = register_trace_sys_enter(perf_syscall_enter, NULL);
  1020			if (ret) {
  1021				pr_info("event trace: Could not activate syscall entry trace point");
  1022				return ret;
  1023			}
  1024		}
  1025		set_bit(num, enabled_perf_enter_syscalls);
  1026		sys_perf_refcount_enter++;
  1027		return ret;
  1028	}
  1029	

-- 
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