lkml.org 
[lkml]   [2021]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 09/12] evm: Allow setxattr() and setattr() for unmodified metadata
Hi Roberto,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on security/next-testing]
[also build test ERROR on integrity/next-integrity linus/master v5.12-rc6 next-20210407]
[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]

url: https://github.com/0day-ci/linux/commits/Roberto-Sassu/evm-Improve-usability-of-portable-signatures/20210407-185747
base: https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-testing
config: s390-randconfig-r034-20210407 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c060945b23a1c54d4b2a053ff4b093a2277b303d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/0day-ci/linux/commit/1bdae98f0b81260a925cf7acf785dc10bb7787fe
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Roberto-Sassu/evm-Improve-usability-of-portable-signatures/20210407-185747
git checkout 1bdae98f0b81260a925cf7acf785dc10bb7787fe
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> security/integrity/evm/evm_main.c:365:7: error: implicit declaration of function 'posix_acl_update_mode' [-Werror,-Wimplicit-function-declaration]
rc = posix_acl_update_mode(mnt_userns, inode, &mode, &acl_res);
^
1 error generated.


vim +/posix_acl_update_mode +365 security/integrity/evm/evm_main.c

331
332 /*
333 * evm_xattr_acl_change - check if passed ACL changes the inode mode
334 * @mnt_userns: user namespace of the idmapped mount
335 * @dentry: pointer to the affected dentry
336 * @xattr_name: requested xattr
337 * @xattr_value: requested xattr value
338 * @xattr_value_len: requested xattr value length
339 *
340 * Check if passed ACL changes the inode mode, which is protected by EVM.
341 *
342 * Returns 1 if passed ACL causes inode mode change, 0 otherwise.
343 */
344 static int evm_xattr_acl_change(struct user_namespace *mnt_userns,
345 struct dentry *dentry, const char *xattr_name,
346 const void *xattr_value, size_t xattr_value_len)
347 {
348 umode_t mode;
349 struct posix_acl *acl = NULL, *acl_res;
350 struct inode *inode = d_backing_inode(dentry);
351 int rc;
352
353 /* user_ns is not relevant here, ACL_USER/ACL_GROUP don't have impact
354 * on the inode mode (see posix_acl_equiv_mode()).
355 */
356 acl = posix_acl_from_xattr(&init_user_ns, xattr_value, xattr_value_len);
357 if (IS_ERR_OR_NULL(acl))
358 return 1;
359
360 acl_res = acl;
361 /* Passing mnt_userns is necessary to correctly determine the GID in
362 * an idmapped mount, as the GID is used to clear the setgid bit in
363 * the inode mode.
364 */
> 365 rc = posix_acl_update_mode(mnt_userns, inode, &mode, &acl_res);
366
367 posix_acl_release(acl);
368
369 if (rc)
370 return 1;
371
372 if (inode->i_mode != mode)
373 return 1;
374
375 return 0;
376 }
377

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-04-07 17:25    [W:0.145 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site