All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-07-25 20:58 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-07-25 20:58 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5533 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   23ee3e4e5bd27bdbc0f1785eef7209ce872794c7
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date:   5 weeks ago
config: x86_64-randconfig-s021-20200726 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-93-g4c6cbe55-dirty
        git checkout 670d0a4b10704667765f7d18f7592993d02783aa
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   kernel/livepatch/transition.c:372:44: sparse:     expected struct spinlock [usertype] *lock
>> kernel/livepatch/transition.c:372:44: sparse:     got struct spinlock [noderef] __rcu *
   kernel/livepatch/transition.c:374:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   kernel/livepatch/transition.c:374:46: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:374:46: sparse:     got struct spinlock [noderef] __rcu *
--
   drivers/dma/idxd/submit.c: note: in included file (through include/linux/io.h, include/linux/pci.h):
>> arch/x86/include/asm/io.h:425:48: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct <noident> volatile *dst @@     got void [noderef] __iomem *__dst @@
   arch/x86/include/asm/io.h:425:48: sparse:     expected struct <noident> volatile *dst
>> arch/x86/include/asm/io.h:425:48: sparse:     got void [noderef] __iomem *__dst

vim +372 kernel/livepatch/transition.c

d83a7cb375eec2 Josh Poimboeuf 2017-02-13  338  
0b3d52790e1cfd Miroslav Benes 2019-01-15  339  /*
0b3d52790e1cfd Miroslav Benes 2019-01-15  340   * Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set.
0b3d52790e1cfd Miroslav Benes 2019-01-15  341   * Kthreads with TIF_PATCH_PENDING set are woken up.
0b3d52790e1cfd Miroslav Benes 2019-01-15  342   */
0b3d52790e1cfd Miroslav Benes 2019-01-15  343  static void klp_send_signals(void)
0b3d52790e1cfd Miroslav Benes 2019-01-15  344  {
0b3d52790e1cfd Miroslav Benes 2019-01-15  345  	struct task_struct *g, *task;
0b3d52790e1cfd Miroslav Benes 2019-01-15  346  
0b3d52790e1cfd Miroslav Benes 2019-01-15  347  	if (klp_signals_cnt == SIGNALS_TIMEOUT)
0b3d52790e1cfd Miroslav Benes 2019-01-15  348  		pr_notice("signaling remaining tasks\n");
0b3d52790e1cfd Miroslav Benes 2019-01-15  349  
0b3d52790e1cfd Miroslav Benes 2019-01-15  350  	read_lock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  351  	for_each_process_thread(g, task) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  352  		if (!klp_patch_pending(task))
0b3d52790e1cfd Miroslav Benes 2019-01-15  353  			continue;
0b3d52790e1cfd Miroslav Benes 2019-01-15  354  
0b3d52790e1cfd Miroslav Benes 2019-01-15  355  		/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  356  		 * There is a small race here. We could see TIF_PATCH_PENDING
0b3d52790e1cfd Miroslav Benes 2019-01-15  357  		 * set and decide to wake up a kthread or send a fake signal.
0b3d52790e1cfd Miroslav Benes 2019-01-15  358  		 * Meanwhile the task could migrate itself and the action
0b3d52790e1cfd Miroslav Benes 2019-01-15  359  		 * would be meaningless. It is not serious though.
0b3d52790e1cfd Miroslav Benes 2019-01-15  360  		 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  361  		if (task->flags & PF_KTHREAD) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  362  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  363  			 * Wake up a kthread which sleeps interruptedly and
0b3d52790e1cfd Miroslav Benes 2019-01-15  364  			 * still has not been migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  365  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  366  			wake_up_state(task, TASK_INTERRUPTIBLE);
0b3d52790e1cfd Miroslav Benes 2019-01-15  367  		} else {
0b3d52790e1cfd Miroslav Benes 2019-01-15  368  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  369  			 * Send fake signal to all non-kthread tasks which are
0b3d52790e1cfd Miroslav Benes 2019-01-15  370  			 * still not migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  371  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15 @372  			spin_lock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  373  			signal_wake_up(task, 0);
0b3d52790e1cfd Miroslav Benes 2019-01-15  374  			spin_unlock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  375  		}
0b3d52790e1cfd Miroslav Benes 2019-01-15  376  	}
0b3d52790e1cfd Miroslav Benes 2019-01-15  377  	read_unlock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  378  }
0b3d52790e1cfd Miroslav Benes 2019-01-15  379  

:::::: The code at line 372 was first introduced by commit
:::::: 0b3d52790e1cfd6b80b826a245d24859e89632f7 livepatch: Remove signal sysfs attribute

:::::: TO: Miroslav Benes <mbenes@suse.cz>
:::::: CC: Jiri Kosina <jkosina@suse.cz>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39270 bytes --]

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

* kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-07-25 20:58 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-07-25 20:58 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5620 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   23ee3e4e5bd27bdbc0f1785eef7209ce872794c7
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date:   5 weeks ago
config: x86_64-randconfig-s021-20200726 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-93-g4c6cbe55-dirty
        git checkout 670d0a4b10704667765f7d18f7592993d02783aa
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   kernel/livepatch/transition.c:372:44: sparse:     expected struct spinlock [usertype] *lock
>> kernel/livepatch/transition.c:372:44: sparse:     got struct spinlock [noderef] __rcu *
   kernel/livepatch/transition.c:374:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   kernel/livepatch/transition.c:374:46: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:374:46: sparse:     got struct spinlock [noderef] __rcu *
--
   drivers/dma/idxd/submit.c: note: in included file (through include/linux/io.h, include/linux/pci.h):
>> arch/x86/include/asm/io.h:425:48: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct <noident> volatile *dst @@     got void [noderef] __iomem *__dst @@
   arch/x86/include/asm/io.h:425:48: sparse:     expected struct <noident> volatile *dst
>> arch/x86/include/asm/io.h:425:48: sparse:     got void [noderef] __iomem *__dst

vim +372 kernel/livepatch/transition.c

d83a7cb375eec2 Josh Poimboeuf 2017-02-13  338  
0b3d52790e1cfd Miroslav Benes 2019-01-15  339  /*
0b3d52790e1cfd Miroslav Benes 2019-01-15  340   * Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set.
0b3d52790e1cfd Miroslav Benes 2019-01-15  341   * Kthreads with TIF_PATCH_PENDING set are woken up.
0b3d52790e1cfd Miroslav Benes 2019-01-15  342   */
0b3d52790e1cfd Miroslav Benes 2019-01-15  343  static void klp_send_signals(void)
0b3d52790e1cfd Miroslav Benes 2019-01-15  344  {
0b3d52790e1cfd Miroslav Benes 2019-01-15  345  	struct task_struct *g, *task;
0b3d52790e1cfd Miroslav Benes 2019-01-15  346  
0b3d52790e1cfd Miroslav Benes 2019-01-15  347  	if (klp_signals_cnt == SIGNALS_TIMEOUT)
0b3d52790e1cfd Miroslav Benes 2019-01-15  348  		pr_notice("signaling remaining tasks\n");
0b3d52790e1cfd Miroslav Benes 2019-01-15  349  
0b3d52790e1cfd Miroslav Benes 2019-01-15  350  	read_lock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  351  	for_each_process_thread(g, task) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  352  		if (!klp_patch_pending(task))
0b3d52790e1cfd Miroslav Benes 2019-01-15  353  			continue;
0b3d52790e1cfd Miroslav Benes 2019-01-15  354  
0b3d52790e1cfd Miroslav Benes 2019-01-15  355  		/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  356  		 * There is a small race here. We could see TIF_PATCH_PENDING
0b3d52790e1cfd Miroslav Benes 2019-01-15  357  		 * set and decide to wake up a kthread or send a fake signal.
0b3d52790e1cfd Miroslav Benes 2019-01-15  358  		 * Meanwhile the task could migrate itself and the action
0b3d52790e1cfd Miroslav Benes 2019-01-15  359  		 * would be meaningless. It is not serious though.
0b3d52790e1cfd Miroslav Benes 2019-01-15  360  		 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  361  		if (task->flags & PF_KTHREAD) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  362  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  363  			 * Wake up a kthread which sleeps interruptedly and
0b3d52790e1cfd Miroslav Benes 2019-01-15  364  			 * still has not been migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  365  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  366  			wake_up_state(task, TASK_INTERRUPTIBLE);
0b3d52790e1cfd Miroslav Benes 2019-01-15  367  		} else {
0b3d52790e1cfd Miroslav Benes 2019-01-15  368  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  369  			 * Send fake signal to all non-kthread tasks which are
0b3d52790e1cfd Miroslav Benes 2019-01-15  370  			 * still not migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  371  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15 @372  			spin_lock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  373  			signal_wake_up(task, 0);
0b3d52790e1cfd Miroslav Benes 2019-01-15  374  			spin_unlock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  375  		}
0b3d52790e1cfd Miroslav Benes 2019-01-15  376  	}
0b3d52790e1cfd Miroslav Benes 2019-01-15  377  	read_unlock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  378  }
0b3d52790e1cfd Miroslav Benes 2019-01-15  379  

:::::: The code at line 372 was first introduced by commit
:::::: 0b3d52790e1cfd6b80b826a245d24859e89632f7 livepatch: Remove signal sysfs attribute

:::::: TO: Miroslav Benes <mbenes@suse.cz>
:::::: CC: Jiri Kosina <jkosina@suse.cz>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39270 bytes --]

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

* kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-07-25 21:49 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-07-25 21:49 UTC (permalink / raw)
  To: Madhuparna Bhowmik; +Cc: kbuild-all, linux-kernel, Christian Brauner

[-- Attachment #1: Type: text/plain, Size: 5099 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   23ee3e4e5bd27bdbc0f1785eef7209ce872794c7
commit: 913292c97d750fe4188b4f5aa770e5e0ca1e5a91 sched.h: Annotate sighand_struct with __rcu
date:   6 months ago
config: x86_64-randconfig-s021-20200726 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-93-g4c6cbe55-dirty
        git checkout 913292c97d750fe4188b4f5aa770e5e0ca1e5a91
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
>> kernel/livepatch/transition.c:372:44: sparse:     expected struct spinlock [usertype] *lock
>> kernel/livepatch/transition.c:372:44: sparse:     got struct spinlock [noderef] <asn:4> *
   kernel/livepatch/transition.c:374:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
   kernel/livepatch/transition.c:374:46: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:374:46: sparse:     got struct spinlock [noderef] <asn:4> *

vim +372 kernel/livepatch/transition.c

d83a7cb375eec21 Josh Poimboeuf 2017-02-13  338  
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  339  /*
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  340   * Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  341   * Kthreads with TIF_PATCH_PENDING set are woken up.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  342   */
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  343  static void klp_send_signals(void)
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  344  {
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  345  	struct task_struct *g, *task;
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  346  
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  347  	if (klp_signals_cnt == SIGNALS_TIMEOUT)
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  348  		pr_notice("signaling remaining tasks\n");
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  349  
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  350  	read_lock(&tasklist_lock);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  351  	for_each_process_thread(g, task) {
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  352  		if (!klp_patch_pending(task))
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  353  			continue;
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  354  
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  355  		/*
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  356  		 * There is a small race here. We could see TIF_PATCH_PENDING
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  357  		 * set and decide to wake up a kthread or send a fake signal.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  358  		 * Meanwhile the task could migrate itself and the action
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  359  		 * would be meaningless. It is not serious though.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  360  		 */
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  361  		if (task->flags & PF_KTHREAD) {
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  362  			/*
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  363  			 * Wake up a kthread which sleeps interruptedly and
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  364  			 * still has not been migrated.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  365  			 */
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  366  			wake_up_state(task, TASK_INTERRUPTIBLE);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  367  		} else {
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  368  			/*
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  369  			 * Send fake signal to all non-kthread tasks which are
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  370  			 * still not migrated.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  371  			 */
0b3d52790e1cfd6 Miroslav Benes 2019-01-15 @372  			spin_lock_irq(&task->sighand->siglock);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  373  			signal_wake_up(task, 0);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  374  			spin_unlock_irq(&task->sighand->siglock);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  375  		}
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  376  	}
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  377  	read_unlock(&tasklist_lock);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  378  }
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  379  

:::::: The code at line 372 was first introduced by commit
:::::: 0b3d52790e1cfd6b80b826a245d24859e89632f7 livepatch: Remove signal sysfs attribute

:::::: TO: Miroslav Benes <mbenes@suse.cz>
:::::: CC: Jiri Kosina <jkosina@suse.cz>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37869 bytes --]

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

* kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-07-25 21:49 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-07-25 21:49 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5181 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   23ee3e4e5bd27bdbc0f1785eef7209ce872794c7
commit: 913292c97d750fe4188b4f5aa770e5e0ca1e5a91 sched.h: Annotate sighand_struct with __rcu
date:   6 months ago
config: x86_64-randconfig-s021-20200726 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-93-g4c6cbe55-dirty
        git checkout 913292c97d750fe4188b4f5aa770e5e0ca1e5a91
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
>> kernel/livepatch/transition.c:372:44: sparse:     expected struct spinlock [usertype] *lock
>> kernel/livepatch/transition.c:372:44: sparse:     got struct spinlock [noderef] <asn:4> *
   kernel/livepatch/transition.c:374:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
   kernel/livepatch/transition.c:374:46: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:374:46: sparse:     got struct spinlock [noderef] <asn:4> *

vim +372 kernel/livepatch/transition.c

d83a7cb375eec21 Josh Poimboeuf 2017-02-13  338  
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  339  /*
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  340   * Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  341   * Kthreads with TIF_PATCH_PENDING set are woken up.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  342   */
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  343  static void klp_send_signals(void)
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  344  {
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  345  	struct task_struct *g, *task;
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  346  
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  347  	if (klp_signals_cnt == SIGNALS_TIMEOUT)
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  348  		pr_notice("signaling remaining tasks\n");
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  349  
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  350  	read_lock(&tasklist_lock);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  351  	for_each_process_thread(g, task) {
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  352  		if (!klp_patch_pending(task))
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  353  			continue;
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  354  
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  355  		/*
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  356  		 * There is a small race here. We could see TIF_PATCH_PENDING
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  357  		 * set and decide to wake up a kthread or send a fake signal.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  358  		 * Meanwhile the task could migrate itself and the action
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  359  		 * would be meaningless. It is not serious though.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  360  		 */
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  361  		if (task->flags & PF_KTHREAD) {
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  362  			/*
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  363  			 * Wake up a kthread which sleeps interruptedly and
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  364  			 * still has not been migrated.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  365  			 */
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  366  			wake_up_state(task, TASK_INTERRUPTIBLE);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  367  		} else {
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  368  			/*
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  369  			 * Send fake signal to all non-kthread tasks which are
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  370  			 * still not migrated.
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  371  			 */
0b3d52790e1cfd6 Miroslav Benes 2019-01-15 @372  			spin_lock_irq(&task->sighand->siglock);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  373  			signal_wake_up(task, 0);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  374  			spin_unlock_irq(&task->sighand->siglock);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  375  		}
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  376  	}
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  377  	read_unlock(&tasklist_lock);
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  378  }
0b3d52790e1cfd6 Miroslav Benes 2019-01-15  379  

:::::: The code at line 372 was first introduced by commit
:::::: 0b3d52790e1cfd6b80b826a245d24859e89632f7 livepatch: Remove signal sysfs attribute

:::::: TO: Miroslav Benes <mbenes@suse.cz>
:::::: CC: Jiri Kosina <jkosina@suse.cz>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37869 bytes --]

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

* kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-05-28  8:03 ` kbuild test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2020-05-28  8:03 UTC (permalink / raw)
  To: Madhuparna Bhowmik; +Cc: kbuild-all, linux-kernel, Christian Brauner

[-- Attachment #1: Type: text/plain, Size: 5057 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b0c3ba31be3e45a130e13b278cf3b90f69bda6f6
commit: 913292c97d750fe4188b4f5aa770e5e0ca1e5a91 sched.h: Annotate sighand_struct with __rcu
date:   4 months ago
config: x86_64-randconfig-s022-20200528 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-240-gf0fe1cd9-dirty
        git checkout 913292c97d750fe4188b4f5aa770e5e0ca1e5a91
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
   kernel/livepatch/transition.c:372:44: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:372:44: sparse:     got struct spinlock [noderef] <asn:4> *
   kernel/livepatch/transition.c:374:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
   kernel/livepatch/transition.c:374:46: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:374:46: sparse:     got struct spinlock [noderef] <asn:4> *

vim +372 kernel/livepatch/transition.c

d83a7cb375eec2 Josh Poimboeuf 2017-02-13  338  
0b3d52790e1cfd Miroslav Benes 2019-01-15  339  /*
0b3d52790e1cfd Miroslav Benes 2019-01-15  340   * Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set.
0b3d52790e1cfd Miroslav Benes 2019-01-15  341   * Kthreads with TIF_PATCH_PENDING set are woken up.
0b3d52790e1cfd Miroslav Benes 2019-01-15  342   */
0b3d52790e1cfd Miroslav Benes 2019-01-15  343  static void klp_send_signals(void)
0b3d52790e1cfd Miroslav Benes 2019-01-15  344  {
0b3d52790e1cfd Miroslav Benes 2019-01-15  345  	struct task_struct *g, *task;
0b3d52790e1cfd Miroslav Benes 2019-01-15  346  
0b3d52790e1cfd Miroslav Benes 2019-01-15  347  	if (klp_signals_cnt == SIGNALS_TIMEOUT)
0b3d52790e1cfd Miroslav Benes 2019-01-15  348  		pr_notice("signaling remaining tasks\n");
0b3d52790e1cfd Miroslav Benes 2019-01-15  349  
0b3d52790e1cfd Miroslav Benes 2019-01-15  350  	read_lock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  351  	for_each_process_thread(g, task) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  352  		if (!klp_patch_pending(task))
0b3d52790e1cfd Miroslav Benes 2019-01-15  353  			continue;
0b3d52790e1cfd Miroslav Benes 2019-01-15  354  
0b3d52790e1cfd Miroslav Benes 2019-01-15  355  		/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  356  		 * There is a small race here. We could see TIF_PATCH_PENDING
0b3d52790e1cfd Miroslav Benes 2019-01-15  357  		 * set and decide to wake up a kthread or send a fake signal.
0b3d52790e1cfd Miroslav Benes 2019-01-15  358  		 * Meanwhile the task could migrate itself and the action
0b3d52790e1cfd Miroslav Benes 2019-01-15  359  		 * would be meaningless. It is not serious though.
0b3d52790e1cfd Miroslav Benes 2019-01-15  360  		 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  361  		if (task->flags & PF_KTHREAD) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  362  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  363  			 * Wake up a kthread which sleeps interruptedly and
0b3d52790e1cfd Miroslav Benes 2019-01-15  364  			 * still has not been migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  365  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  366  			wake_up_state(task, TASK_INTERRUPTIBLE);
0b3d52790e1cfd Miroslav Benes 2019-01-15  367  		} else {
0b3d52790e1cfd Miroslav Benes 2019-01-15  368  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  369  			 * Send fake signal to all non-kthread tasks which are
0b3d52790e1cfd Miroslav Benes 2019-01-15  370  			 * still not migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  371  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15 @372  			spin_lock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  373  			signal_wake_up(task, 0);
0b3d52790e1cfd Miroslav Benes 2019-01-15  374  			spin_unlock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  375  		}
0b3d52790e1cfd Miroslav Benes 2019-01-15  376  	}
0b3d52790e1cfd Miroslav Benes 2019-01-15  377  	read_unlock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  378  }
0b3d52790e1cfd Miroslav Benes 2019-01-15  379  

:::::: The code at line 372 was first introduced by commit
:::::: 0b3d52790e1cfd6b80b826a245d24859e89632f7 livepatch: Remove signal sysfs attribute

:::::: TO: Miroslav Benes <mbenes@suse.cz>
:::::: CC: Jiri Kosina <jkosina@suse.cz>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34127 bytes --]

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

* kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-05-28  8:03 ` kbuild test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2020-05-28  8:03 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5139 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b0c3ba31be3e45a130e13b278cf3b90f69bda6f6
commit: 913292c97d750fe4188b4f5aa770e5e0ca1e5a91 sched.h: Annotate sighand_struct with __rcu
date:   4 months ago
config: x86_64-randconfig-s022-20200528 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-240-gf0fe1cd9-dirty
        git checkout 913292c97d750fe4188b4f5aa770e5e0ca1e5a91
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
   kernel/livepatch/transition.c:372:44: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:372:44: sparse:     got struct spinlock [noderef] <asn:4> *
   kernel/livepatch/transition.c:374:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
   kernel/livepatch/transition.c:374:46: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:374:46: sparse:     got struct spinlock [noderef] <asn:4> *

vim +372 kernel/livepatch/transition.c

d83a7cb375eec2 Josh Poimboeuf 2017-02-13  338  
0b3d52790e1cfd Miroslav Benes 2019-01-15  339  /*
0b3d52790e1cfd Miroslav Benes 2019-01-15  340   * Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set.
0b3d52790e1cfd Miroslav Benes 2019-01-15  341   * Kthreads with TIF_PATCH_PENDING set are woken up.
0b3d52790e1cfd Miroslav Benes 2019-01-15  342   */
0b3d52790e1cfd Miroslav Benes 2019-01-15  343  static void klp_send_signals(void)
0b3d52790e1cfd Miroslav Benes 2019-01-15  344  {
0b3d52790e1cfd Miroslav Benes 2019-01-15  345  	struct task_struct *g, *task;
0b3d52790e1cfd Miroslav Benes 2019-01-15  346  
0b3d52790e1cfd Miroslav Benes 2019-01-15  347  	if (klp_signals_cnt == SIGNALS_TIMEOUT)
0b3d52790e1cfd Miroslav Benes 2019-01-15  348  		pr_notice("signaling remaining tasks\n");
0b3d52790e1cfd Miroslav Benes 2019-01-15  349  
0b3d52790e1cfd Miroslav Benes 2019-01-15  350  	read_lock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  351  	for_each_process_thread(g, task) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  352  		if (!klp_patch_pending(task))
0b3d52790e1cfd Miroslav Benes 2019-01-15  353  			continue;
0b3d52790e1cfd Miroslav Benes 2019-01-15  354  
0b3d52790e1cfd Miroslav Benes 2019-01-15  355  		/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  356  		 * There is a small race here. We could see TIF_PATCH_PENDING
0b3d52790e1cfd Miroslav Benes 2019-01-15  357  		 * set and decide to wake up a kthread or send a fake signal.
0b3d52790e1cfd Miroslav Benes 2019-01-15  358  		 * Meanwhile the task could migrate itself and the action
0b3d52790e1cfd Miroslav Benes 2019-01-15  359  		 * would be meaningless. It is not serious though.
0b3d52790e1cfd Miroslav Benes 2019-01-15  360  		 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  361  		if (task->flags & PF_KTHREAD) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  362  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  363  			 * Wake up a kthread which sleeps interruptedly and
0b3d52790e1cfd Miroslav Benes 2019-01-15  364  			 * still has not been migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  365  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  366  			wake_up_state(task, TASK_INTERRUPTIBLE);
0b3d52790e1cfd Miroslav Benes 2019-01-15  367  		} else {
0b3d52790e1cfd Miroslav Benes 2019-01-15  368  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  369  			 * Send fake signal to all non-kthread tasks which are
0b3d52790e1cfd Miroslav Benes 2019-01-15  370  			 * still not migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  371  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15 @372  			spin_lock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  373  			signal_wake_up(task, 0);
0b3d52790e1cfd Miroslav Benes 2019-01-15  374  			spin_unlock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  375  		}
0b3d52790e1cfd Miroslav Benes 2019-01-15  376  	}
0b3d52790e1cfd Miroslav Benes 2019-01-15  377  	read_unlock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  378  }
0b3d52790e1cfd Miroslav Benes 2019-01-15  379  

:::::: The code at line 372 was first introduced by commit
:::::: 0b3d52790e1cfd6b80b826a245d24859e89632f7 livepatch: Remove signal sysfs attribute

:::::: TO: Miroslav Benes <mbenes@suse.cz>
:::::: CC: Jiri Kosina <jkosina@suse.cz>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34127 bytes --]

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

end of thread, other threads:[~2020-07-25 22:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 20:58 kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2020-07-25 20:58 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-07-25 21:49 kernel test robot
2020-07-25 21:49 ` kernel test robot
2020-05-28  8:03 kbuild test robot
2020-05-28  8:03 ` kbuild test robot

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.