tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 0eb96e2c58c03e79fc2ee833ba88bf9226986564 commit: b084e189b01a7614d3098aca4f2381a759460d88 [2260/2421] selinux: simplify cred_init_security config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220127/202201272153.o6t8kbDn-lkp@xxxxxxxxx/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b084e189b01a7614d3098aca4f2381a759460d88 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout b084e189b01a7614d3098aca4f2381a759460d88 # save the config file to linux build tree mkdir build_dir make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash security/selinux/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) security/selinux/hooks.c: note: in included file: include/net/sctp/structs.h:335:41: sparse: sparse: array of flexible structures >> security/selinux/hooks.c:216:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct cred const *cred @@ got struct cred const [noderef] __rcu *real_cred @@ security/selinux/hooks.c:216:36: sparse: expected struct cred const *cred security/selinux/hooks.c:216:36: sparse: got struct cred const [noderef] __rcu *real_cred security/selinux/hooks.c:2537:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ security/selinux/hooks.c:2537:39: sparse: expected struct spinlock [usertype] *lock security/selinux/hooks.c:2537:39: sparse: got struct spinlock [noderef] __rcu * security/selinux/hooks.c:2545:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ security/selinux/hooks.c:2545:41: sparse: expected struct spinlock [usertype] *lock security/selinux/hooks.c:2545:41: sparse: got struct spinlock [noderef] __rcu * security/selinux/hooks.c:2551:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *parent @@ got struct task_struct [noderef] __rcu *real_parent @@ security/selinux/hooks.c:2551:42: sparse: expected struct task_struct *parent security/selinux/hooks.c:2551:42: sparse: got struct task_struct [noderef] __rcu *real_parent security/selinux/hooks.c:5423:22: sparse: sparse: restricted __be16 degrades to integer security/selinux/hooks.c:5424:22: sparse: sparse: restricted __be16 degrades to integer vim +216 security/selinux/hooks.c 208 209 /* 210 * initialise the security for the init task 211 */ 212 static void cred_init_security(void) 213 { 214 struct task_security_struct *tsec; 215 > 216 tsec = selinux_cred(current->real_cred); 217 tsec->osid = tsec->sid = SECINITSID_KERNEL; 218 } 219 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx