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: <202512242037.SviPrpZt-lkp@intel.com>
Date: Wed, 24 Dec 2025 20:30:42 +0800
From: kernel test robot <lkp@...el.com>
To: Khaled Saleh <khaled.saleh.req@...il.com>, rostedt@...dmis.org
Cc: oe-kbuild-all@...ts.linux.dev, mhiramat@...nel.org,
	mathieu.desnoyers@...icios.com, linux-kernel@...r.kernel.org,
	Khaled Saleh <khaled.saleh.req@...il.com>
Subject: Re: [PATCH] trace: make ftrace likely counters atomic

Hi Khaled,

kernel test robot noticed the following build errors:

[auto build test ERROR on trace/for-next]
[also build test ERROR on linus/master v6.19-rc2 next-20251219]
[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/Khaled-Saleh/trace-make-ftrace-likely-counters-atomic/20251224-044106
base:   https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link:    https://lore.kernel.org/r/20251223203715.10954-1-khaled.saleh.req%40gmail.com
patch subject: [PATCH] trace: make ftrace likely counters atomic
config: i386-randconfig-003-20251224 (https://download.01.org/0day-ci/archive/20251224/202512242037.SviPrpZt-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251224/202512242037.SviPrpZt-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/202512242037.SviPrpZt-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/trace/trace_branch.c: In function 'ftrace_likely_update':
>> kernel/trace/trace_branch.c:219:33: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type [-Wincompatible-pointer-types]
     219 |                 atomic_long_inc(&f->data.correct);
         |                                 ^~~~~~~~~~~~~~~~
         |                                 |
         |                                 long unsigned int *
   In file included from include/linux/atomic.h:82,
                    from include/linux/jump_label.h:257,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/irqflags.h:9,
                    from include/linux/irqflags.h:18,
                    from include/linux/spinlock.h:59,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/mm.h:7,
                    from include/linux/kallsyms.h:13,
                    from kernel/trace/trace_branch.c:7:
   include/linux/atomic/atomic-instrumented.h:3589:32: note: expected 'atomic_long_t *' {aka 'atomic_t *'} but argument is of type 'long unsigned int *'
    3589 | atomic_long_inc(atomic_long_t *v)
         |                 ~~~~~~~~~~~~~~~^
   kernel/trace/trace_branch.c:221:25: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type [-Wincompatible-pointer-types]
     221 |         atomic_long_inc(&f->data.incorrect);
         |                         ^~~~~~~~~~~~~~~~~~
         |                         |
         |                         long unsigned int *
   include/linux/atomic/atomic-instrumented.h:3589:32: note: expected 'atomic_long_t *' {aka 'atomic_t *'} but argument is of type 'long unsigned int *'
    3589 | atomic_long_inc(atomic_long_t *v)
         |                 ~~~~~~~~~~~~~~~^


vim +/atomic_long_inc +219 kernel/trace/trace_branch.c

   198	
   199	void ftrace_likely_update(struct ftrace_likely_data *f, int val,
   200				  int expect, int is_constant)
   201	{
   202		unsigned long flags = user_access_save();
   203	
   204		/* A constant is always correct */
   205		if (is_constant) {
   206			f->constant++;
   207			val = expect;
   208		}
   209		/*
   210		 * I would love to have a trace point here instead, but the
   211		 * trace point code is so inundated with unlikely and likely
   212		 * conditions that the recursive nightmare that exists is too
   213		 * much to try to get working. At least for now.
   214		 */
   215		trace_likely_condition(f, val, expect);
   216	
   217		/* FIXME: Make this atomic! */
   218		if (val == expect) {
 > 219			atomic_long_inc(&f->data.correct);
   220		} else {
   221		atomic_long_inc(&f->data.incorrect);
   222		}
   223	
   224		user_access_restore(flags);
   225	}
   226	EXPORT_SYMBOL(ftrace_likely_update);
   227	

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