From: kernel test robot <lkp@intel.com>
To: "Seth Forshee (DigitalOcean)" <sforshee@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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'
Date: Thu, 22 Feb 2024 20:39:31 +0800 [thread overview]
Message-ID: <202402222012.SCZWOago-lkp@intel.com> (raw)
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
reply other threads:[~2024-02-22 12:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202402222012.SCZWOago-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sforshee@kernel.org \
/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.