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: <202507032226.1sEv2EJM-lkp@intel.com>
Date: Thu, 3 Jul 2025 22:36:38 +0800
From: kernel test robot <lkp@...el.com>
To: Petr Mladek <pmladek@...e.com>,
	Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
	John Ogness <john.ogness@...utronix.de>,
	Dan Carpenter <error27@...il.com>
Cc: oe-kbuild-all@...ts.linux.dev, Steven Rostedt <rostedt@...dmis.org>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	Kees Cook <kees@...nel.org>,
	"Gustavo A . R . Silva" <gustavoars@...nel.org>,
	David Gow <davidgow@...gle.com>, Arnd Bergmann <arnd@...nel.org>,
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org,
	Petr Mladek <pmladek@...e.com>
Subject: Re: [PATCH 2/3] printk: kunit: support offstack cpumask

Hi Petr,

kernel test robot noticed the following build errors:

[auto build test ERROR on linux-next/master]
[cannot apply to linus/master v6.16-rc4]
[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/Petr-Mladek/printk-ringbuffer-Explain-why-the-KUnit-test-ignores-failed-writes/20250702-175422
base:   linux-next/master
patch link:    https://lore.kernel.org/r/20250702095157.110916-3-pmladek%40suse.com
patch subject: [PATCH 2/3] printk: kunit: support offstack cpumask
config: riscv-randconfig-001-20250703 (https://download.01.org/0day-ci/archive/20250703/202507032226.1sEv2EJM-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250703/202507032226.1sEv2EJM-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/202507032226.1sEv2EJM-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/printk/printk_ringbuffer_kunit_test.c:14:
   kernel/printk/printk_ringbuffer_kunit_test.c: In function 'prbtest_cpumask_cleanup':
>> include/kunit/resource.h:409:32: error: cast specifies array type
     409 |                 arg_type arg = (arg_type)in;                    \
         |                                ^
   kernel/printk/printk_ringbuffer_kunit_test.c:219:1: note: in expansion of macro 'KUNIT_DEFINE_ACTION_WRAPPER'
     219 | KUNIT_DEFINE_ACTION_WRAPPER(prbtest_cpumask_cleanup, free_cpumask_var, cpumask_var_t);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from printk_ringbuffer_kunit_test.c:14:
   printk_ringbuffer_kunit_test.c: In function 'prbtest_cpumask_cleanup':
>> include/kunit/resource.h:409:32: error: cast specifies array type
     409 |                 arg_type arg = (arg_type)in;                    \
         |                                ^
   printk_ringbuffer_kunit_test.c:219:1: note: in expansion of macro 'KUNIT_DEFINE_ACTION_WRAPPER'
     219 | KUNIT_DEFINE_ACTION_WRAPPER(prbtest_cpumask_cleanup, free_cpumask_var, cpumask_var_t);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +409 include/kunit/resource.h

b9dce8a1ed3efe David Gow 2023-05-25  392  
56778b49c9a2cb David Gow 2023-11-28  393  /**
56778b49c9a2cb David Gow 2023-11-28  394   * KUNIT_DEFINE_ACTION_WRAPPER() - Wrap a function for use as a deferred action.
56778b49c9a2cb David Gow 2023-11-28  395   *
56778b49c9a2cb David Gow 2023-11-28  396   * @wrapper: The name of the new wrapper function define.
56778b49c9a2cb David Gow 2023-11-28  397   * @orig: The original function to wrap.
56778b49c9a2cb David Gow 2023-11-28  398   * @arg_type: The type of the argument accepted by @orig.
56778b49c9a2cb David Gow 2023-11-28  399   *
56778b49c9a2cb David Gow 2023-11-28  400   * Defines a wrapper for a function which accepts a single, pointer-sized
56778b49c9a2cb David Gow 2023-11-28  401   * argument. This wrapper can then be passed to kunit_add_action() and
56778b49c9a2cb David Gow 2023-11-28  402   * similar. This should be used in preference to casting a function
56778b49c9a2cb David Gow 2023-11-28  403   * directly to kunit_action_t, as casting function pointers will break
56778b49c9a2cb David Gow 2023-11-28  404   * control flow integrity (CFI), leading to crashes.
56778b49c9a2cb David Gow 2023-11-28  405   */
56778b49c9a2cb David Gow 2023-11-28  406  #define KUNIT_DEFINE_ACTION_WRAPPER(wrapper, orig, arg_type)	\
56778b49c9a2cb David Gow 2023-11-28  407  	static void wrapper(void *in)				\
56778b49c9a2cb David Gow 2023-11-28  408  	{							\
56778b49c9a2cb David Gow 2023-11-28 @409  		arg_type arg = (arg_type)in;			\
56778b49c9a2cb David Gow 2023-11-28  410  		orig(arg);					\
56778b49c9a2cb David Gow 2023-11-28  411  	}
56778b49c9a2cb David Gow 2023-11-28  412  
56778b49c9a2cb David Gow 2023-11-28  413  

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