[PATCH v2 3/6] LSM: security_lsmblob_to_secctx module selection
kernel test robot
lkp at intel.com
Sat Mar 8 15:52:59 UTC 2025
Hi Casey,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pcmoore-selinux/next]
[also build test WARNING on linus/master v6.14-rc5 next-20250307]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Casey-Schaufler/Audit-Create-audit_stamp-structure/20250308-024950
base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next
patch link: https://lore.kernel.org/r/20250307183701.16970-4-casey%40schaufler-ca.com
patch subject: [PATCH v2 3/6] LSM: security_lsmblob_to_secctx module selection
config: arc-randconfig-001-20250308 (https://download.01.org/0day-ci/archive/20250308/202503082328.C7GyGU63-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250308/202503082328.C7GyGU63-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503082328.C7GyGU63-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> security/security.c:4325: warning: Excess function parameter 'lsmid' description in 'security_secid_to_secctx'
>> security/security.c:4344: warning: Function parameter or struct member 'lsmid' not described in 'security_lsmprop_to_secctx'
vim +4325 security/security.c
746df9b59c8a5f1 David Quigley 2013-05-22 4310
e261301c851aee4 Paul Moore 2023-02-16 4311 /**
e261301c851aee4 Paul Moore 2023-02-16 4312 * security_secid_to_secctx() - Convert a secid to a secctx
e261301c851aee4 Paul Moore 2023-02-16 4313 * @secid: secid
2d470c778120d3c Casey Schaufler 2024-10-23 4314 * @cp: the LSM context
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4315 * @lsmid: which security module to report
e261301c851aee4 Paul Moore 2023-02-16 4316 *
2d470c778120d3c Casey Schaufler 2024-10-23 4317 * Convert secid to security context. If @cp is NULL the length of the
2d470c778120d3c Casey Schaufler 2024-10-23 4318 * result will be returned, but no data will be returned. This
e261301c851aee4 Paul Moore 2023-02-16 4319 * does mean that the length could change between calls to check the length and
2d470c778120d3c Casey Schaufler 2024-10-23 4320 * the next call which actually allocates and returns the data.
e261301c851aee4 Paul Moore 2023-02-16 4321 *
2d470c778120d3c Casey Schaufler 2024-10-23 4322 * Return: Return length of data on success, error on failure.
e261301c851aee4 Paul Moore 2023-02-16 4323 */
2d470c778120d3c Casey Schaufler 2024-10-23 4324 int security_secid_to_secctx(u32 secid, struct lsm_context *cp)
20510f2f4e2dabb James Morris 2007-10-16 @4325 {
2d470c778120d3c Casey Schaufler 2024-10-23 4326 return call_int_hook(secid_to_secctx, secid, cp);
20510f2f4e2dabb James Morris 2007-10-16 4327 }
20510f2f4e2dabb James Morris 2007-10-16 4328 EXPORT_SYMBOL(security_secid_to_secctx);
20510f2f4e2dabb James Morris 2007-10-16 4329
6f2f724f0e116d9 Casey Schaufler 2024-10-09 4330 /**
6f2f724f0e116d9 Casey Schaufler 2024-10-09 4331 * security_lsmprop_to_secctx() - Convert a lsm_prop to a secctx
6f2f724f0e116d9 Casey Schaufler 2024-10-09 4332 * @prop: lsm specific information
2d470c778120d3c Casey Schaufler 2024-10-23 4333 * @cp: the LSM context
6f2f724f0e116d9 Casey Schaufler 2024-10-09 4334 *
2d470c778120d3c Casey Schaufler 2024-10-23 4335 * Convert a @prop entry to security context. If @cp is NULL the
2d470c778120d3c Casey Schaufler 2024-10-23 4336 * length of the result will be returned. This does mean that the
2d470c778120d3c Casey Schaufler 2024-10-23 4337 * length could change between calls to check the length and the
2d470c778120d3c Casey Schaufler 2024-10-23 4338 * next call which actually allocates and returns the @cp.
6f2f724f0e116d9 Casey Schaufler 2024-10-09 4339 *
2d470c778120d3c Casey Schaufler 2024-10-23 4340 * Return: Return length of data on success, error on failure.
6f2f724f0e116d9 Casey Schaufler 2024-10-09 4341 */
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4342 int security_lsmprop_to_secctx(struct lsm_prop *prop, struct lsm_context *cp,
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4343 int lsmid)
6f2f724f0e116d9 Casey Schaufler 2024-10-09 @4344 {
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4345 struct lsm_static_call *scall;
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4346
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4347 lsm_for_each_hook(scall, lsmprop_to_secctx) {
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4348 if (lsmid != 0 && lsmid != scall->hl->lsmid->id)
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4349 continue;
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4350 return scall->hl->hook.lsmprop_to_secctx(prop, cp);
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4351 }
c6b93968f3f6d88 Casey Schaufler 2025-03-07 4352 return LSM_RET_DEFAULT(lsmprop_to_secctx);
6f2f724f0e116d9 Casey Schaufler 2024-10-09 4353 }
6f2f724f0e116d9 Casey Schaufler 2024-10-09 4354 EXPORT_SYMBOL(security_lsmprop_to_secctx);
6f2f724f0e116d9 Casey Schaufler 2024-10-09 4355
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-security-module-archive
mailing list