[viro-vfs:untested.securityfs 6/8] security/integrity/ima/ima_fs.c:524:27: error: 'ima_policy' undeclared; did you mean 'vma_policy'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git untested.securityfs
head:   b0b8e25f92ec20e266859de5f823b4e39b8e2f9d
commit: 08433f2507554980bc891d8b17c1968c81cb144b [6/8] ima_fs: don't bother with removal of files in directory we'll be removing
config: i386-buildonly-randconfig-006-20250509 (https://download.01.org/0day-ci/archive/20250509/202505092310.0UXOhVZP-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/202505092310.0UXOhVZP-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505092310.0UXOhVZP-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   security/integrity/ima/ima_fs.c: In function 'ima_release_policy':
>> security/integrity/ima/ima_fs.c:524:27: error: 'ima_policy' undeclared (first use in this function); did you mean 'vma_policy'?
     524 |         securityfs_remove(ima_policy);
         |                           ^~~~~~~~~~
         |                           vma_policy
   security/integrity/ima/ima_fs.c:524:27: note: each undeclared identifier is reported only once for each function it appears in


vim +524 security/integrity/ima/ima_fs.c

f4bd857bc8ed99 Mimi Zohar      2009-02-04  491  
4af4662fa4a9dc Mimi Zohar      2009-02-04  492  /*
4af4662fa4a9dc Mimi Zohar      2009-02-04  493   * ima_release_policy - start using the new measure policy rules.
4af4662fa4a9dc Mimi Zohar      2009-02-04  494   *
4af4662fa4a9dc Mimi Zohar      2009-02-04  495   * Initially, ima_measure points to the default policy rules, now
f4bd857bc8ed99 Mimi Zohar      2009-02-04  496   * point to the new policy rules, and remove the securityfs policy file,
f4bd857bc8ed99 Mimi Zohar      2009-02-04  497   * assuming a valid policy.
4af4662fa4a9dc Mimi Zohar      2009-02-04  498   */
4af4662fa4a9dc Mimi Zohar      2009-02-04  499  static int ima_release_policy(struct inode *inode, struct file *file)
4af4662fa4a9dc Mimi Zohar      2009-02-04  500  {
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03  501  	const char *cause = valid_policy ? "completed" : "failed";
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03  502  
80eae209d63ac6 Petko Manolov   2015-12-02  503  	if ((file->f_flags & O_ACCMODE) == O_RDONLY)
9a11a18902bc3b Eric Richter    2016-10-13  504  		return seq_release(inode, file);
80eae209d63ac6 Petko Manolov   2015-12-02  505  
0112721df4edbd Sasha Levin     2015-12-22  506  	if (valid_policy && ima_check_policy() < 0) {
0112721df4edbd Sasha Levin     2015-12-22  507  		cause = "failed";
0112721df4edbd Sasha Levin     2015-12-22  508  		valid_policy = 0;
0112721df4edbd Sasha Levin     2015-12-22  509  	}
0112721df4edbd Sasha Levin     2015-12-22  510  
de636769c8c735 Petr Vorel      2018-04-24  511  	pr_info("policy update %s\n", cause);
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03  512  	integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL, NULL,
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03  513  			    "policy_update", cause, !valid_policy, 0);
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03  514  
4af4662fa4a9dc Mimi Zohar      2009-02-04  515  	if (!valid_policy) {
4af4662fa4a9dc Mimi Zohar      2009-02-04  516  		ima_delete_rules();
f4bd857bc8ed99 Mimi Zohar      2009-02-04  517  		valid_policy = 1;
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03  518  		clear_bit(IMA_FS_BUSY, &ima_fs_flags);
4af4662fa4a9dc Mimi Zohar      2009-02-04  519  		return 0;
4af4662fa4a9dc Mimi Zohar      2009-02-04  520  	}
80eae209d63ac6 Petko Manolov   2015-12-02  521  
4af4662fa4a9dc Mimi Zohar      2009-02-04  522  	ima_update_policy();
2068626d1345f2 Mimi Zohar      2017-06-27  523  #if !defined(CONFIG_IMA_WRITE_POLICY) && !defined(CONFIG_IMA_READ_POLICY)
4af4662fa4a9dc Mimi Zohar      2009-02-04 @524  	securityfs_remove(ima_policy);
4af4662fa4a9dc Mimi Zohar      2009-02-04  525  	ima_policy = NULL;
2068626d1345f2 Mimi Zohar      2017-06-27  526  #elif defined(CONFIG_IMA_WRITE_POLICY)
38d859f991f3a0 Petko Manolov   2015-12-02  527  	clear_bit(IMA_FS_BUSY, &ima_fs_flags);
ffb122de9a60bd Petr Vorel      2018-04-20  528  #elif defined(CONFIG_IMA_READ_POLICY)
ffb122de9a60bd Petr Vorel      2018-04-20  529  	inode->i_mode &= ~S_IWUSR;
38d859f991f3a0 Petko Manolov   2015-12-02  530  #endif
4af4662fa4a9dc Mimi Zohar      2009-02-04  531  	return 0;
4af4662fa4a9dc Mimi Zohar      2009-02-04  532  }
4af4662fa4a9dc Mimi Zohar      2009-02-04  533  

:::::: The code at line 524 was first introduced by commit
:::::: 4af4662fa4a9dc62289c580337ae2506339c4729 integrity: IMA policy

:::::: TO: Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx>
:::::: CC: James Morris <jmorris@xxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux