* kernel/fork.c:1605:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2023-12-01 21:21 kernel test robot
2023-12-04 2:30 ` Liu, Yujie
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-12-01 21:21 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "only kconfig file changed"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: YiFei Zhu <yifeifz2@illinois.edu>
CC: Kees Cook <keescook@chromium.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 994d5c58e50e91bb02c7be4a91d5186292a895c8
commit: 282a181b1a0d66de1f0894d82f395fcd478f51d1 seccomp: Move config option SECCOMP to arch/Kconfig
date: 3 years, 2 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 3 years, 2 months ago
config: s390-randconfig-r113-20231102 (https://download.01.org/0day-ci/archive/20231202/202312020532.PwEXoxyr-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231202/202312020532.PwEXoxyr-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/r/202312020532.PwEXoxyr-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/fork.c:989:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct [noderef] __rcu *owner @@ got struct task_struct *p @@
kernel/fork.c:989:19: sparse: expected struct task_struct [noderef] __rcu *owner
kernel/fork.c:989:19: sparse: got struct task_struct *p
kernel/fork.c:1501:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:1501:38: sparse: expected struct refcount_struct [usertype] *r
kernel/fork.c:1501:38: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:1510:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1510:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1510:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1511:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *src @@ got struct k_sigaction [noderef] __rcu * @@
kernel/fork.c:1511:36: sparse: expected void const *src
kernel/fork.c:1511:36: sparse: got struct k_sigaction [noderef] __rcu *
kernel/fork.c:1512:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1512:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1512:33: sparse: got struct spinlock [noderef] __rcu *
>> kernel/fork.c:1605:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct arch_spinlock_t [usertype] *lp @@ got struct arch_spinlock_t [noderef] __rcu * @@
kernel/fork.c:1605:9: sparse: expected struct arch_spinlock_t [usertype] *lp
kernel/fork.c:1605:9: sparse: got struct arch_spinlock_t [noderef] __rcu *
kernel/fork.c:1906:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1906:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1906:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1910:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1910:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1910:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2196:32: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct [noderef] __rcu *real_parent @@ got struct task_struct * @@
kernel/fork.c:2196:32: sparse: expected struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2196:32: sparse: got struct task_struct *
kernel/fork.c:2202:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2202:27: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2202:27: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2251:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct list_head *head @@ got struct list_head [noderef] __rcu * @@
kernel/fork.c:2251:54: sparse: expected struct list_head *head
kernel/fork.c:2251:54: sparse: got struct list_head [noderef] __rcu *
kernel/fork.c:2272:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2272:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2272:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2287:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2287:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2287:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2314:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sighand_struct *sighand @@ got struct sighand_struct [noderef] __rcu *sighand @@
kernel/fork.c:2314:28: sparse: expected struct sighand_struct *sighand
kernel/fork.c:2314:28: sparse: got struct sighand_struct [noderef] __rcu *sighand
kernel/fork.c:2342:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2342:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2342:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2344:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2344:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2344:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2731:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *[assigned] parent @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/fork.c:2731:24: sparse: expected struct task_struct *[assigned] parent
kernel/fork.c:2731:24: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2812:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct const [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:2812:43: sparse: expected struct refcount_struct const [usertype] *r
kernel/fork.c:2812:43: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:3030:47: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@
kernel/fork.c:3030:47: sparse: expected void *
kernel/fork.c:3030:47: sparse: got void [noderef] __user *buffer
kernel/fork.c:3016:5: sparse: sparse: symbol 'sysctl_max_threads' redeclared with different type (incompatible argument 3 (different address spaces)):
kernel/fork.c:3016:5: sparse: int extern [addressable] [signed] [toplevel] sysctl_max_threads( ... )
kernel/fork.c: note: in included file (through include/linux/key.h, include/linux/cred.h, include/linux/sched/signal.h, ...):
include/linux/sysctl.h:242:5: sparse: note: previously declared as:
include/linux/sysctl.h:242:5: sparse: int extern [addressable] [signed] [toplevel] sysctl_max_threads( ... )
kernel/fork.c:981:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/fork.c:981:23: sparse: struct task_struct [noderef] __rcu *
kernel/fork.c:981:23: sparse: struct task_struct *
--
kernel/seccomp.c:1098:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/seccomp.c:1098:31: sparse: expected struct spinlock [usertype] *lock
kernel/seccomp.c:1098:31: sparse: got struct spinlock [noderef] __rcu *
kernel/seccomp.c:1110:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/seccomp.c:1110:33: sparse: expected struct spinlock [usertype] *lock
kernel/seccomp.c:1110:33: sparse: got struct spinlock [noderef] __rcu *
>> kernel/seccomp.c:341:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct arch_spinlock_t [usertype] *lp @@ got struct arch_spinlock_t [noderef] __rcu * @@
kernel/seccomp.c:341:9: sparse: expected struct arch_spinlock_t [usertype] *lp
kernel/seccomp.c:341:9: sparse: got struct arch_spinlock_t [noderef] __rcu *
kernel/seccomp.c:355:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct arch_spinlock_t [usertype] *lp @@ got struct arch_spinlock_t [noderef] __rcu * @@
kernel/seccomp.c:355:9: sparse: expected struct arch_spinlock_t [usertype] *lp
kernel/seccomp.c:355:9: sparse: got struct arch_spinlock_t [noderef] __rcu *
vim +1605 kernel/fork.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1595
dbd952127d11bb Kees Cook 2014-06-27 1596 static void copy_seccomp(struct task_struct *p)
dbd952127d11bb Kees Cook 2014-06-27 1597 {
dbd952127d11bb Kees Cook 2014-06-27 1598 #ifdef CONFIG_SECCOMP
dbd952127d11bb Kees Cook 2014-06-27 1599 /*
dbd952127d11bb Kees Cook 2014-06-27 1600 * Must be called with sighand->lock held, which is common to
dbd952127d11bb Kees Cook 2014-06-27 1601 * all threads in the group. Holding cred_guard_mutex is not
dbd952127d11bb Kees Cook 2014-06-27 1602 * needed because this new task is not yet running and cannot
dbd952127d11bb Kees Cook 2014-06-27 1603 * be racing exec.
dbd952127d11bb Kees Cook 2014-06-27 1604 */
69f6a34bdeea4f Guenter Roeck 2014-08-10 @1605 assert_spin_locked(¤t->sighand->siglock);
dbd952127d11bb Kees Cook 2014-06-27 1606
dbd952127d11bb Kees Cook 2014-06-27 1607 /* Ref-count the new filter user, and assign it. */
dbd952127d11bb Kees Cook 2014-06-27 1608 get_seccomp_filter(current);
dbd952127d11bb Kees Cook 2014-06-27 1609 p->seccomp = current->seccomp;
dbd952127d11bb Kees Cook 2014-06-27 1610
dbd952127d11bb Kees Cook 2014-06-27 1611 /*
dbd952127d11bb Kees Cook 2014-06-27 1612 * Explicitly enable no_new_privs here in case it got set
dbd952127d11bb Kees Cook 2014-06-27 1613 * between the task_struct being duplicated and holding the
dbd952127d11bb Kees Cook 2014-06-27 1614 * sighand lock. The seccomp state and nnp must be in sync.
dbd952127d11bb Kees Cook 2014-06-27 1615 */
dbd952127d11bb Kees Cook 2014-06-27 1616 if (task_no_new_privs(current))
dbd952127d11bb Kees Cook 2014-06-27 1617 task_set_no_new_privs(p);
dbd952127d11bb Kees Cook 2014-06-27 1618
dbd952127d11bb Kees Cook 2014-06-27 1619 /*
dbd952127d11bb Kees Cook 2014-06-27 1620 * If the parent gained a seccomp mode after copying thread
dbd952127d11bb Kees Cook 2014-06-27 1621 * flags and between before we held the sighand lock, we have
dbd952127d11bb Kees Cook 2014-06-27 1622 * to manually enable the seccomp thread flag here.
dbd952127d11bb Kees Cook 2014-06-27 1623 */
dbd952127d11bb Kees Cook 2014-06-27 1624 if (p->seccomp.mode != SECCOMP_MODE_DISABLED)
dbd952127d11bb Kees Cook 2014-06-27 1625 set_tsk_thread_flag(p, TIF_SECCOMP);
dbd952127d11bb Kees Cook 2014-06-27 1626 #endif
dbd952127d11bb Kees Cook 2014-06-27 1627 }
dbd952127d11bb Kees Cook 2014-06-27 1628
:::::: The code at line 1605 was first introduced by commit
:::::: 69f6a34bdeea4fec50bb90619bc9602973119572 seccomp: Replace BUG(!spin_is_locked()) with assert_spin_lock
:::::: TO: Guenter Roeck <linux@roeck-us.net>
:::::: CC: Kees Cook <keescook@chromium.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: kernel/fork.c:1605:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
2023-12-01 21:21 kernel/fork.c:1605:9: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
@ 2023-12-04 2:30 ` Liu, Yujie
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yujie @ 2023-12-04 2:30 UTC (permalink / raw)
To: lkp, oe-kbuild@lists.linux.dev
not_report
only kconfig change:
arch/Kconfig | 30 ++++++++++++++++++++++++++++++
arch/arm/Kconfig | 15 +--------------
arch/arm64/Kconfig | 13 -------------
arch/csky/Kconfig | 13 -------------
arch/microblaze/Kconfig | 18 +-----------------
arch/mips/Kconfig | 17 -----------------
arch/parisc/Kconfig | 16 ----------------
arch/powerpc/Kconfig | 17 -----------------
arch/riscv/Kconfig | 13 -------------
arch/s390/Kconfig | 17 -----------------
arch/sh/Kconfig | 16 ----------------
arch/sparc/Kconfig | 18 +-----------------
arch/um/Kconfig | 16 ----------------
arch/x86/Kconfig | 16 ----------------
arch/xtensa/Kconfig | 14 --------------
15 files changed, 33 insertions(+), 216 deletions(-)
-----Original Message-----
From: lkp <lkp@intel.com>
Sent: Saturday, December 2, 2023 05:22
To: oe-kbuild@lists.linux.dev
Cc: lkp <lkp@intel.com>
Subject: kernel/fork.c:1605:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
::::::
:::::: Manual check reason: "only kconfig file changed"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: YiFei Zhu <yifeifz2@illinois.edu>
CC: Kees Cook <keescook@chromium.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 994d5c58e50e91bb02c7be4a91d5186292a895c8
commit: 282a181b1a0d66de1f0894d82f395fcd478f51d1 seccomp: Move config option SECCOMP to arch/Kconfig
date: 3 years, 2 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 3 years, 2 months ago
config: s390-randconfig-r113-20231102 (https://download.01.org/0day-ci/archive/20231202/202312020532.PwEXoxyr-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231202/202312020532.PwEXoxyr-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/r/202312020532.PwEXoxyr-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/fork.c:989:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct [noderef] __rcu *owner @@ got struct task_struct *p @@
kernel/fork.c:989:19: sparse: expected struct task_struct [noderef] __rcu *owner
kernel/fork.c:989:19: sparse: got struct task_struct *p
kernel/fork.c:1501:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:1501:38: sparse: expected struct refcount_struct [usertype] *r
kernel/fork.c:1501:38: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:1510:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1510:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1510:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1511:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *src @@ got struct k_sigaction [noderef] __rcu * @@
kernel/fork.c:1511:36: sparse: expected void const *src
kernel/fork.c:1511:36: sparse: got struct k_sigaction [noderef] __rcu *
kernel/fork.c:1512:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1512:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1512:33: sparse: got struct spinlock [noderef] __rcu *
>> kernel/fork.c:1605:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct arch_spinlock_t [usertype] *lp @@ got struct arch_spinlock_t [noderef] __rcu * @@
kernel/fork.c:1605:9: sparse: expected struct arch_spinlock_t [usertype] *lp
kernel/fork.c:1605:9: sparse: got struct arch_spinlock_t [noderef] __rcu *
kernel/fork.c:1906:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1906:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1906:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1910:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1910:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1910:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2196:32: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct [noderef] __rcu *real_parent @@ got struct task_struct * @@
kernel/fork.c:2196:32: sparse: expected struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2196:32: sparse: got struct task_struct *
kernel/fork.c:2202:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2202:27: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2202:27: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2251:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct list_head *head @@ got struct list_head [noderef] __rcu * @@
kernel/fork.c:2251:54: sparse: expected struct list_head *head
kernel/fork.c:2251:54: sparse: got struct list_head [noderef] __rcu *
kernel/fork.c:2272:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2272:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2272:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2287:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2287:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2287:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2314:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sighand_struct *sighand @@ got struct sighand_struct [noderef] __rcu *sighand @@
kernel/fork.c:2314:28: sparse: expected struct sighand_struct *sighand
kernel/fork.c:2314:28: sparse: got struct sighand_struct [noderef] __rcu *sighand
kernel/fork.c:2342:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2342:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2342:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2344:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2344:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2344:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2731:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *[assigned] parent @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/fork.c:2731:24: sparse: expected struct task_struct *[assigned] parent
kernel/fork.c:2731:24: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2812:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct const [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:2812:43: sparse: expected struct refcount_struct const [usertype] *r
kernel/fork.c:2812:43: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:3030:47: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@
kernel/fork.c:3030:47: sparse: expected void *
kernel/fork.c:3030:47: sparse: got void [noderef] __user *buffer
kernel/fork.c:3016:5: sparse: sparse: symbol 'sysctl_max_threads' redeclared with different type (incompatible argument 3 (different address spaces)):
kernel/fork.c:3016:5: sparse: int extern [addressable] [signed] [toplevel] sysctl_max_threads( ... )
kernel/fork.c: note: in included file (through include/linux/key.h, include/linux/cred.h, include/linux/sched/signal.h, ...):
include/linux/sysctl.h:242:5: sparse: note: previously declared as:
include/linux/sysctl.h:242:5: sparse: int extern [addressable] [signed] [toplevel] sysctl_max_threads( ... )
kernel/fork.c:981:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/fork.c:981:23: sparse: struct task_struct [noderef] __rcu *
kernel/fork.c:981:23: sparse: struct task_struct *
--
kernel/seccomp.c:1098:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/seccomp.c:1098:31: sparse: expected struct spinlock [usertype] *lock
kernel/seccomp.c:1098:31: sparse: got struct spinlock [noderef] __rcu *
kernel/seccomp.c:1110:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/seccomp.c:1110:33: sparse: expected struct spinlock [usertype] *lock
kernel/seccomp.c:1110:33: sparse: got struct spinlock [noderef] __rcu *
>> kernel/seccomp.c:341:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct arch_spinlock_t [usertype] *lp @@ got struct arch_spinlock_t [noderef] __rcu * @@
kernel/seccomp.c:341:9: sparse: expected struct arch_spinlock_t [usertype] *lp
kernel/seccomp.c:341:9: sparse: got struct arch_spinlock_t [noderef] __rcu *
kernel/seccomp.c:355:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct arch_spinlock_t [usertype] *lp @@ got struct arch_spinlock_t [noderef] __rcu * @@
kernel/seccomp.c:355:9: sparse: expected struct arch_spinlock_t [usertype] *lp
kernel/seccomp.c:355:9: sparse: got struct arch_spinlock_t [noderef] __rcu *
vim +1605 kernel/fork.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1595
dbd952127d11bb Kees Cook 2014-06-27 1596 static void copy_seccomp(struct task_struct *p)
dbd952127d11bb Kees Cook 2014-06-27 1597 {
dbd952127d11bb Kees Cook 2014-06-27 1598 #ifdef CONFIG_SECCOMP
dbd952127d11bb Kees Cook 2014-06-27 1599 /*
dbd952127d11bb Kees Cook 2014-06-27 1600 * Must be called with sighand->lock held, which is common to
dbd952127d11bb Kees Cook 2014-06-27 1601 * all threads in the group. Holding cred_guard_mutex is not
dbd952127d11bb Kees Cook 2014-06-27 1602 * needed because this new task is not yet running and cannot
dbd952127d11bb Kees Cook 2014-06-27 1603 * be racing exec.
dbd952127d11bb Kees Cook 2014-06-27 1604 */
69f6a34bdeea4f Guenter Roeck 2014-08-10 @1605 assert_spin_locked(¤t->sighand->siglock);
dbd952127d11bb Kees Cook 2014-06-27 1606
dbd952127d11bb Kees Cook 2014-06-27 1607 /* Ref-count the new filter user, and assign it. */
dbd952127d11bb Kees Cook 2014-06-27 1608 get_seccomp_filter(current);
dbd952127d11bb Kees Cook 2014-06-27 1609 p->seccomp = current->seccomp;
dbd952127d11bb Kees Cook 2014-06-27 1610
dbd952127d11bb Kees Cook 2014-06-27 1611 /*
dbd952127d11bb Kees Cook 2014-06-27 1612 * Explicitly enable no_new_privs here in case it got set
dbd952127d11bb Kees Cook 2014-06-27 1613 * between the task_struct being duplicated and holding the
dbd952127d11bb Kees Cook 2014-06-27 1614 * sighand lock. The seccomp state and nnp must be in sync.
dbd952127d11bb Kees Cook 2014-06-27 1615 */
dbd952127d11bb Kees Cook 2014-06-27 1616 if (task_no_new_privs(current))
dbd952127d11bb Kees Cook 2014-06-27 1617 task_set_no_new_privs(p);
dbd952127d11bb Kees Cook 2014-06-27 1618
dbd952127d11bb Kees Cook 2014-06-27 1619 /*
dbd952127d11bb Kees Cook 2014-06-27 1620 * If the parent gained a seccomp mode after copying thread
dbd952127d11bb Kees Cook 2014-06-27 1621 * flags and between before we held the sighand lock, we have
dbd952127d11bb Kees Cook 2014-06-27 1622 * to manually enable the seccomp thread flag here.
dbd952127d11bb Kees Cook 2014-06-27 1623 */
dbd952127d11bb Kees Cook 2014-06-27 1624 if (p->seccomp.mode != SECCOMP_MODE_DISABLED)
dbd952127d11bb Kees Cook 2014-06-27 1625 set_tsk_thread_flag(p, TIF_SECCOMP);
dbd952127d11bb Kees Cook 2014-06-27 1626 #endif
dbd952127d11bb Kees Cook 2014-06-27 1627 }
dbd952127d11bb Kees Cook 2014-06-27 1628
:::::: The code at line 1605 was first introduced by commit
:::::: 69f6a34bdeea4fec50bb90619bc9602973119572 seccomp: Replace BUG(!spin_is_locked()) with assert_spin_lock
:::::: TO: Guenter Roeck <linux@roeck-us.net>
:::::: CC: Kees Cook <keescook@chromium.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-04 2:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-01 21:21 kernel/fork.c:1605:9: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2023-12-04 2:30 ` Liu, Yujie
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.