* [sforshee:fscaps-vfsid 14/26] security/smack/smack_lsm.c:1545: warning: Function parameter or struct member 'idmap' not described in 'smack_inode_set_fscaps'
@ 2024-02-22 12:39 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-22 12:39 UTC (permalink / raw)
To: Seth Forshee (DigitalOcean); +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/linux.git fscaps-vfsid
head: 5ce094a334396397b1fc55565f035ffd4c68e612
commit: c7be21ad30b98381b1354b23fbdef08bc7b0b47f [14/26] smack: add hooks for fscaps operations
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240222/202402222012.SCZWOago-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240222/202402222012.SCZWOago-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/202402222012.SCZWOago-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> security/smack/smack_lsm.c:1545: warning: Function parameter or struct member 'idmap' not described in 'smack_inode_set_fscaps'
>> security/smack/smack_lsm.c:1545: warning: Function parameter or struct member 'dentry' not described in 'smack_inode_set_fscaps'
>> security/smack/smack_lsm.c:1545: warning: Excess function parameter 'mnt_userns' description in 'smack_inode_set_fscaps'
>> security/smack/smack_lsm.c:1545: warning: Excess function parameter 'detry' description in 'smack_inode_set_fscaps'
>> security/smack/smack_lsm.c:1564: warning: Function parameter or struct member 'idmap' not described in 'smack_inode_get_fscaps'
>> security/smack/smack_lsm.c:1585: warning: expecting prototype for smack_inode_remove_acl(). Prototype was for smack_inode_remove_fscaps() instead
vim +1545 security/smack/smack_lsm.c
1532
1533 /**
1534 * smack_inode_set_fscaps - Smack check for setting file capabilities
1535 * @mnt_userns: the userns attached to the source mnt for this request
1536 * @detry: the object
1537 * @caps: the file capabilities
1538 * @flags: unused
1539 *
1540 * Returns 0 if the access is permitted, or an error code otherwise.
1541 */
1542 static int smack_inode_set_fscaps(struct mnt_idmap *idmap,
1543 struct dentry *dentry,
1544 const struct vfs_caps *caps, int flags)
> 1545 {
1546 struct smk_audit_info ad;
1547 int rc;
1548
1549 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY);
1550 smk_ad_setfield_u_fs_path_dentry(&ad, dentry);
1551 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad);
1552 rc = smk_bu_inode(d_backing_inode(dentry), MAY_WRITE, rc);
1553 return rc;
1554 }
1555
1556 /**
1557 * smack_inode_get_fscaps - Smack check for getting file capabilities
1558 * @dentry: the object
1559 *
1560 * Returns 0 if access is permitted, an error code otherwise
1561 */
1562 static int smack_inode_get_fscaps(struct mnt_idmap *idmap,
1563 struct dentry *dentry)
> 1564 {
1565 struct smk_audit_info ad;
1566 int rc;
1567
1568 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY);
1569 smk_ad_setfield_u_fs_path_dentry(&ad, dentry);
1570
1571 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_READ, &ad);
1572 rc = smk_bu_inode(d_backing_inode(dentry), MAY_READ, rc);
1573 return rc;
1574 }
1575
1576 /**
1577 * smack_inode_remove_acl - Smack check for removing file capabilities
1578 * @idmap: idmap of the mnt this request came from
1579 * @dentry: the object
1580 *
1581 * Returns 0 if access is permitted, an error code otherwise
1582 */
1583 static int smack_inode_remove_fscaps(struct mnt_idmap *idmap,
1584 struct dentry *dentry)
> 1585 {
1586 struct smk_audit_info ad;
1587 int rc;
1588
1589 rc = cap_inode_removexattr(idmap, dentry, XATTR_NAME_CAPS);
1590 if (rc != 0)
1591 return rc;
1592
1593 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY);
1594 smk_ad_setfield_u_fs_path_dentry(&ad, dentry);
1595
1596 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad);
1597 rc = smk_bu_inode(d_backing_inode(dentry), MAY_WRITE, rc);
1598 return rc;
1599 }
1600
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-22 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-22 12:39 [sforshee:fscaps-vfsid 14/26] security/smack/smack_lsm.c:1545: warning: Function parameter or struct member 'idmap' not described in 'smack_inode_set_fscaps' 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.