llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: GUO Zihua <guozihua@huawei.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Paul Moore <paul@paul-moore.com>,
	Mimi Zohar <zohar@linux.ibm.com>,
	Casey Schaufler <casey@schaufler-ca.com>
Subject: [linux-next:master 5295/5501] security/integrity/ima/ima_policy.c:430:10: error: too many arguments to function call, expected 4, have 5
Date: Thu, 13 Jun 2024 17:08:05 +0800	[thread overview]
Message-ID: <202406131636.cCrcJztc-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6906a84c482f098d31486df8dc98cead21cce2d0
commit: 29f5bedff494c278af5f804ebfe0637c5f50f3bd [5295/5501] ima: Avoid blocking in RCU read-side critical section
config: i386-buildonly-randconfig-004-20240613 (https://download.01.org/0day-ci/archive/20240613/202406131636.cCrcJztc-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/20240613/202406131636.cCrcJztc-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/202406131636.cCrcJztc-lkp@intel.com/

All errors (new ones prefixed by >>):

>> security/integrity/ima/ima_policy.c:430:10: error: too many arguments to function call, expected 4, have 5
     427 |                 ima_filter_rule_init(nentry->lsm[i].type, Audit_equal,
         |                 ~~~~~~~~~~~~~~~~~~~~
     428 |                                      nentry->lsm[i].args_p,
     429 |                                      &nentry->lsm[i].rule,
     430 |                                      gfp);
         |                                      ^~~
   security/integrity/ima/ima.h:548:19: note: 'ima_filter_rule_init' declared here
     548 | static inline int ima_filter_rule_init(u32 field, u32 op, char *rulestr,
         |                   ^                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     549 |                                        void **lsmrule)
         |                                        ~~~~~~~~~~~~~~
   security/integrity/ima/ima_policy.c:1146:11: error: too many arguments to function call, expected 4, have 5
    1143 |         result = ima_filter_rule_init(entry->lsm[lsm_rule].type, Audit_equal,
         |                  ~~~~~~~~~~~~~~~~~~~~
    1144 |                                       entry->lsm[lsm_rule].args_p,
    1145 |                                       &entry->lsm[lsm_rule].rule,
    1146 |                                       GFP_KERNEL);
         |                                       ^~~~~~~~~~
   include/linux/gfp_types.h:374:20: note: expanded from macro 'GFP_KERNEL'
     374 | #define GFP_KERNEL      (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima.h:548:19: note: 'ima_filter_rule_init' declared here
     548 | static inline int ima_filter_rule_init(u32 field, u32 op, char *rulestr,
         |                   ^                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     549 |                                        void **lsmrule)
         |                                        ~~~~~~~~~~~~~~
   2 errors generated.


vim +430 security/integrity/ima/ima_policy.c

   403	
   404	static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry,
   405							gfp_t gfp)
   406	{
   407		struct ima_rule_entry *nentry;
   408		int i;
   409	
   410		/*
   411		 * Immutable elements are copied over as pointers and data; only
   412		 * lsm rules can change
   413		 */
   414		nentry = kmemdup(entry, sizeof(*nentry), gfp);
   415		if (!nentry)
   416			return NULL;
   417	
   418		memset(nentry->lsm, 0, sizeof_field(struct ima_rule_entry, lsm));
   419	
   420		for (i = 0; i < MAX_LSM_RULES; i++) {
   421			if (!entry->lsm[i].args_p)
   422				continue;
   423	
   424			nentry->lsm[i].type = entry->lsm[i].type;
   425			nentry->lsm[i].args_p = entry->lsm[i].args_p;
   426	
   427			ima_filter_rule_init(nentry->lsm[i].type, Audit_equal,
   428					     nentry->lsm[i].args_p,
   429					     &nentry->lsm[i].rule,
 > 430					     gfp);
   431			if (!nentry->lsm[i].rule)
   432				pr_warn("rule for LSM \'%s\' is undefined\n",
   433					nentry->lsm[i].args_p);
   434		}
   435		return nentry;
   436	}
   437	

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

                 reply	other threads:[~2024-06-13  9:08 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=202406131636.cCrcJztc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=casey@schaufler-ca.com \
    --cc=guozihua@huawei.com \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paul@paul-moore.com \
    --cc=zohar@linux.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).