From: kernel test robot <lkp@intel.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-fsdevel@vger.kernel.org
Subject: [viro-vfs:untested.persistency 57/58] security/integrity/ima/ima_fs.c:430:20: error: use of undeclared identifier 'ima_policy'
Date: Fri, 17 May 2024 04:47:01 +0800 [thread overview]
Message-ID: <202405170447.fAkCQdzn-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git untested.persistency
head: b3c987f7369f15318ee1284d9203737f09294b7e
commit: c6429afc4eb7e8fd9044f85e21c53285f1b96a8b [57/58] ima_fs: don't bother with removal of files in directory we'll be removing
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240517/202405170447.fAkCQdzn-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240517/202405170447.fAkCQdzn-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/202405170447.fAkCQdzn-lkp@intel.com/
All errors (new ones prefixed by >>):
>> security/integrity/ima/ima_fs.c:430:20: error: use of undeclared identifier 'ima_policy'
430 | securityfs_remove(ima_policy);
| ^
security/integrity/ima/ima_fs.c:431:2: error: use of undeclared identifier 'ima_policy'
431 | ima_policy = NULL;
| ^
2 errors generated.
vim +/ima_policy +430 security/integrity/ima/ima_fs.c
f4bd857bc8ed99 Mimi Zohar 2009-02-04 397
4af4662fa4a9dc Mimi Zohar 2009-02-04 398 /*
4af4662fa4a9dc Mimi Zohar 2009-02-04 399 * ima_release_policy - start using the new measure policy rules.
4af4662fa4a9dc Mimi Zohar 2009-02-04 400 *
4af4662fa4a9dc Mimi Zohar 2009-02-04 401 * Initially, ima_measure points to the default policy rules, now
f4bd857bc8ed99 Mimi Zohar 2009-02-04 402 * point to the new policy rules, and remove the securityfs policy file,
f4bd857bc8ed99 Mimi Zohar 2009-02-04 403 * assuming a valid policy.
4af4662fa4a9dc Mimi Zohar 2009-02-04 404 */
4af4662fa4a9dc Mimi Zohar 2009-02-04 405 static int ima_release_policy(struct inode *inode, struct file *file)
4af4662fa4a9dc Mimi Zohar 2009-02-04 406 {
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03 407 const char *cause = valid_policy ? "completed" : "failed";
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03 408
80eae209d63ac6 Petko Manolov 2015-12-02 409 if ((file->f_flags & O_ACCMODE) == O_RDONLY)
9a11a18902bc3b Eric Richter 2016-10-13 410 return seq_release(inode, file);
80eae209d63ac6 Petko Manolov 2015-12-02 411
0112721df4edbd Sasha Levin 2015-12-22 412 if (valid_policy && ima_check_policy() < 0) {
0112721df4edbd Sasha Levin 2015-12-22 413 cause = "failed";
0112721df4edbd Sasha Levin 2015-12-22 414 valid_policy = 0;
0112721df4edbd Sasha Levin 2015-12-22 415 }
0112721df4edbd Sasha Levin 2015-12-22 416
de636769c8c735 Petr Vorel 2018-04-24 417 pr_info("policy update %s\n", cause);
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03 418 integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL, NULL,
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03 419 "policy_update", cause, !valid_policy, 0);
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03 420
4af4662fa4a9dc Mimi Zohar 2009-02-04 421 if (!valid_policy) {
4af4662fa4a9dc Mimi Zohar 2009-02-04 422 ima_delete_rules();
f4bd857bc8ed99 Mimi Zohar 2009-02-04 423 valid_policy = 1;
0716abbb58e3c4 Dmitry Kasatkin 2014-10-03 424 clear_bit(IMA_FS_BUSY, &ima_fs_flags);
4af4662fa4a9dc Mimi Zohar 2009-02-04 425 return 0;
4af4662fa4a9dc Mimi Zohar 2009-02-04 426 }
80eae209d63ac6 Petko Manolov 2015-12-02 427
4af4662fa4a9dc Mimi Zohar 2009-02-04 428 ima_update_policy();
2068626d1345f2 Mimi Zohar 2017-06-27 429 #if !defined(CONFIG_IMA_WRITE_POLICY) && !defined(CONFIG_IMA_READ_POLICY)
4af4662fa4a9dc Mimi Zohar 2009-02-04 @430 securityfs_remove(ima_policy);
4af4662fa4a9dc Mimi Zohar 2009-02-04 431 ima_policy = NULL;
2068626d1345f2 Mimi Zohar 2017-06-27 432 #elif defined(CONFIG_IMA_WRITE_POLICY)
38d859f991f3a0 Petko Manolov 2015-12-02 433 clear_bit(IMA_FS_BUSY, &ima_fs_flags);
ffb122de9a60bd Petr Vorel 2018-04-20 434 #elif defined(CONFIG_IMA_READ_POLICY)
ffb122de9a60bd Petr Vorel 2018-04-20 435 inode->i_mode &= ~S_IWUSR;
38d859f991f3a0 Petko Manolov 2015-12-02 436 #endif
4af4662fa4a9dc Mimi Zohar 2009-02-04 437 return 0;
4af4662fa4a9dc Mimi Zohar 2009-02-04 438 }
4af4662fa4a9dc Mimi Zohar 2009-02-04 439
:::::: The code at line 430 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:[~2024-05-16 20:47 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=202405170447.fAkCQdzn-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--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.