[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202104080245.Cn25aFdH-lkp@intel.com>
Date: Thu, 8 Apr 2021 02:14:35 +0800
From: kernel test robot <lkp@...el.com>
To: Roberto Sassu <roberto.sassu@...wei.com>, zohar@...ux.ibm.com,
mjg59@...gle.com
Cc: kbuild-all@...ts.01.org, linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Roberto Sassu <roberto.sassu@...wei.com>,
Christian Brauner <christian.brauner@...ntu.com>,
Andreas Gruenbacher <agruenba@...hat.com>
Subject: Re: [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: nios2-randconfig-s031-20210407 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-279-g6d5d9b42-dirty
# 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=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
security/integrity/evm/evm_main.c: In function 'evm_xattr_acl_change':
>> security/integrity/evm/evm_main.c:365:7: error: implicit declaration of function 'posix_acl_update_mode'; did you mean 'posix_acl_equiv_mode'? [-Werror=implicit-function-declaration]
365 | rc = posix_acl_update_mode(mnt_userns, inode, &mode, &acl_res);
| ^~~~~~~~~~~~~~~~~~~~~
| posix_acl_equiv_mode
cc1: some warnings being treated as errors
vim +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
Download attachment ".config.gz" of type "application/gzip" (29037 bytes)
Powered by blists - more mailing lists