* [linux-next:master 2260/2421] security/selinux/hooks.c:216:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2022-01-27 13:19 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-27 13:19 UTC (permalink / raw)
To: Christian Göttsche
Cc: kbuild-all, Linux Memory Management List, Paul Moore
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@intel.com/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@intel.com>
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@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* [linux-next:master 2260/2421] security/selinux/hooks.c:216:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2022-01-27 13:19 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-27 13:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3557 bytes --]
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(a)intel.com/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@intel.com>
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(a)lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-27 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 13:19 [linux-next:master 2260/2421] security/selinux/hooks.c:216:36: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2022-01-27 13:19 ` kernel 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.