All of lore.kernel.org
 help / color / mirror / Atom feed
* [mic:next 1/1] security/landlock/tsync.c:492:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2026-11-23 14:57 kernel test robot
  2026-11-23 16:17 ` Oleg Nesterov
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2026-11-23 14:57 UTC (permalink / raw)
  To:  Mickaël Salaün ; +Cc: oe-kbuild-all, Oleg Nesterov

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git next
head:   afa0df0854578e41f8fb321bddf61c9e5bdb49df
commit: afa0df0854578e41f8fb321bddf61c9e5bdb49df [1/1] landlock: Do not hold exec_update_lock across the TSYNC wait
config: hexagon-randconfig-r2301-20261123 (https://download.01.org/0day-ci/archive/20261123/20261123155122.GQ2URc4f-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 8db60b003f961f25c5cafe91ee44176f61374279)
sparse: v0.6.5-rc1-21-g84ec0658
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261123/20261123155122.GQ2URc4f-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261123155122.GQ2URc4f-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> security/landlock/tsync.c:492:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *_T @@     got struct spinlock [noderef] __rcu * @@
   security/landlock/tsync.c:492:9: sparse:     expected struct spinlock [usertype] *_T
   security/landlock/tsync.c:492:9: sparse:     got struct spinlock [noderef] __rcu *
   security/landlock/tsync.c:515:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *_T @@     got struct spinlock [noderef] __rcu * @@
   security/landlock/tsync.c:515:9: sparse:     expected struct spinlock [usertype] *_T
   security/landlock/tsync.c:515:9: sparse:     got struct spinlock [noderef] __rcu *

vim +492 security/landlock/tsync.c

   482	
   483	/*
   484	 * try_set_current_tsync_marker - mark the current thread group as under TSYNC
   485	 *
   486	 * Returns false if another TSYNC operation, group exit, or exec is in progress.
   487	 */
   488	static bool try_set_current_tsync_marker(void)
   489	{
   490		struct signal_struct *const signal = current->signal;
   491	
 > 492		guard(spinlock_irq)(&current->sighand->siglock);
   493	
   494		/*
   495		 * Group-exit paths may replace all signal flags, including an active
   496		 * marker.  Treat SIGNAL_GROUP_EXIT as a held marker to prevent another
   497		 * TSYNC operation from starting during group teardown.
   498		 *
   499		 * Like de_thread(), also treat an ongoing exec as a group action in
   500		 * progress.  de_thread() sets group_exec_task in the same siglock
   501		 * critical section that sends SIGKILL to all other threads, including
   502		 * current.  Instead of queuing task_work for exiting threads,
   503		 * restart_syscall() lets current handle its pending SIGKILL.
   504		 */
   505		if ((signal->flags & (SIGNAL_GROUP_EXIT | SIGNAL_LANDLOCK_TSYNC)) ||
   506		    signal->group_exec_task)
   507			return false;
   508	
   509		signal->flags |= SIGNAL_LANDLOCK_TSYNC;
   510		return true;
   511	}
   512	

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [mic:next 1/1] security/landlock/tsync.c:492:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
  2026-11-23 14:57 [mic:next 1/1] security/landlock/tsync.c:492:9: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
@ 2026-11-23 16:17 ` Oleg Nesterov
  2026-11-30 14:21   ` Mickaël Salaün
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2026-11-23 16:17 UTC (permalink / raw)
  To: kernel test robot; +Cc: Mickaël Salaün, oe-kbuild-all

On 11/23, kernel test robot wrote:
>
> sparse warnings: (new ones prefixed by >>)
> >> security/landlock/tsync.c:492:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *_T @@     got struct spinlock [noderef] __rcu * @@

do we still care about the sparse warnings?

As for this one, we have a lot of ->sighand users which do not use rcu_dereference(),
so I think we don't care.

Oleg.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [mic:next 1/1] security/landlock/tsync.c:492:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
  2026-11-23 16:17 ` Oleg Nesterov
@ 2026-11-30 14:21   ` Mickaël Salaün
  0 siblings, 0 replies; 3+ messages in thread
From: Mickaël Salaün @ 2026-11-30 14:21 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: kernel test robot, oe-kbuild-all, Günther Noack

On Mon, Nov 23, 2026 at 05:17:27PM +0100, Oleg Nesterov wrote:
> On 11/23, kernel test robot wrote:
> >
> > sparse warnings: (new ones prefixed by >>)
> > >> security/landlock/tsync.c:492:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *_T @@     got struct spinlock [noderef] __rcu * @@
> 
> do we still care about the sparse warnings?

It's indeed a false positive, but I'll send a v2 to mute this warning.

> 
> As for this one, we have a lot of ->sighand users which do not use rcu_dereference(),
> so I think we don't care.
> 
> Oleg.
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-30 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 14:57 [mic:next 1/1] security/landlock/tsync.c:492:9: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2026-11-23 16:17 ` Oleg Nesterov
2026-11-30 14:21   ` Mickaël Salaün

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.