All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: oe-kbuild-all@lists.linux.dev, linux-fsdevel@vger.kernel.org
Subject: [viro-vfs:untested.securityfs 6/8] security/integrity/ima/ima_fs.c:524:27: error: 'ima_policy' undeclared; did you mean 'vma_policy'?
Date: Fri, 9 May 2025 23:47:36 +0800	[thread overview]
Message-ID: <202505092310.0UXOhVZP-lkp@intel.com> (raw)

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@intel.com/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@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/202505092310.0UXOhVZP-lkp@intel.com/

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@linux.vnet.ibm.com>
:::::: CC: James Morris <jmorris@namei.org>

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

             reply	other threads:[~2025-05-09 15:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09 15:47 kernel test robot [this message]
2025-05-09 16:11 ` [viro-vfs:untested.securityfs 6/8] security/integrity/ima/ima_fs.c:524:27: error: 'ima_policy' undeclared; did you mean 'vma_policy'? Al Viro

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=202505092310.0UXOhVZP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    /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.