From: kernel test robot <lkp@intel.com>
To: Paul Moore <paul@paul-moore.com>
Cc: oe-kbuild-all@lists.linux.dev, Kees Cook <kees@kernel.org>,
John Johansen <john.johansen@canonical.com>,
Casey Schaufler <casey@schaufler-ca.com>
Subject: [pcmoore-lsm:working-lsm_init_rework 9/41] security/lsm_init.c:400:25: sparse: sparse: cast removes address space '__rcu' of expression
Date: Wed, 17 Sep 2025 20:59:41 +0800 [thread overview]
Message-ID: <202509172014.2AWygxKf-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git working-lsm_init_rework
head: 8ea7358ca612bb85eef9179ae746edeb5f1dc9ac
commit: 9cb4dac58e465101fea4aa4f9169f1ea04149da8 [9/41] lsm: split the init code out into lsm_init.c
config: nios2-randconfig-r133-20250917 (https://download.01.org/0day-ci/archive/20250917/202509172014.2AWygxKf-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250917/202509172014.2AWygxKf-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/202509172014.2AWygxKf-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> security/lsm_init.c:400:25: sparse: sparse: cast removes address space '__rcu' of expression
vim +/__rcu +400 security/lsm_init.c
348
349 static void __init ordered_lsm_init(void)
350 {
351 struct lsm_info **lsm;
352
353 if (chosen_lsm_order) {
354 if (chosen_major_lsm) {
355 pr_warn("security=%s is ignored because it is superseded by lsm=%s\n",
356 chosen_major_lsm, chosen_lsm_order);
357 chosen_major_lsm = NULL;
358 }
359 ordered_lsm_parse(chosen_lsm_order, "cmdline");
360 } else
361 ordered_lsm_parse(builtin_lsm_order, "builtin");
362
363 for (lsm = ordered_lsms; *lsm; lsm++)
364 prepare_lsm(*lsm);
365
366 report_lsm_order();
367
368 init_debug("cred blob size = %d\n", blob_sizes.lbs_cred);
369 init_debug("file blob size = %d\n", blob_sizes.lbs_file);
370 init_debug("ib blob size = %d\n", blob_sizes.lbs_ib);
371 init_debug("inode blob size = %d\n", blob_sizes.lbs_inode);
372 init_debug("ipc blob size = %d\n", blob_sizes.lbs_ipc);
373 #ifdef CONFIG_KEYS
374 init_debug("key blob size = %d\n", blob_sizes.lbs_key);
375 #endif /* CONFIG_KEYS */
376 init_debug("msg_msg blob size = %d\n", blob_sizes.lbs_msg_msg);
377 init_debug("sock blob size = %d\n", blob_sizes.lbs_sock);
378 init_debug("superblock blob size = %d\n", blob_sizes.lbs_superblock);
379 init_debug("perf event blob size = %d\n", blob_sizes.lbs_perf_event);
380 init_debug("task blob size = %d\n", blob_sizes.lbs_task);
381 init_debug("tun device blob size = %d\n", blob_sizes.lbs_tun_dev);
382 init_debug("xattr slots = %d\n", blob_sizes.lbs_xattr_count);
383 init_debug("bdev blob size = %d\n", blob_sizes.lbs_bdev);
384 init_debug("bpf map blob size = %d\n", blob_sizes.lbs_bpf_map);
385 init_debug("bpf prog blob size = %d\n", blob_sizes.lbs_bpf_prog);
386 init_debug("bpf token blob size = %d\n", blob_sizes.lbs_bpf_token);
387
388 /*
389 * Create any kmem_caches needed for blobs
390 */
391 if (blob_sizes.lbs_file)
392 lsm_file_cache = kmem_cache_create("lsm_file_cache",
393 blob_sizes.lbs_file, 0,
394 SLAB_PANIC, NULL);
395 if (blob_sizes.lbs_inode)
396 lsm_inode_cache = kmem_cache_create("lsm_inode_cache",
397 blob_sizes.lbs_inode, 0,
398 SLAB_PANIC, NULL);
399
> 400 lsm_early_cred((struct cred *) current->cred);
401 lsm_early_task(current);
402 for (lsm = ordered_lsms; *lsm; lsm++)
403 initialize_lsm(*lsm);
404 }
405
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-09-17 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 12:59 kernel test robot [this message]
2025-09-17 18:02 ` [pcmoore-lsm:working-lsm_init_rework 9/41] security/lsm_init.c:400:25: sparse: sparse: cast removes address space '__rcu' of expression Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202509172014.2AWygxKf-lkp@intel.com \
--to=lkp@intel.com \
--cc=casey@schaufler-ca.com \
--cc=john.johansen@canonical.com \
--cc=kees@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paul@paul-moore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.