All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-linux-stable:queue-5.4 146/215] security/integrity/ima/ima_policy.c:1280:3: error: implicit declaration of function 'ima_free_rule'
@ 2020-08-16  9:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-16  9:39 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3492 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head:   dcf7104e8ee83d0a2555bff0701e88b899a07710
commit: 1950f718bed0c32e4404121532351f2f5576e1b7 [146/215] ima: Free the entire rule if it fails to parse
config: x86_64-randconfig-r002-20200816 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout 1950f718bed0c32e4404121532351f2f5576e1b7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> security/integrity/ima/ima_policy.c:1280:3: error: implicit declaration of function 'ima_free_rule' [-Werror,-Wimplicit-function-declaration]
                   ima_free_rule(entry);
                   ^
   security/integrity/ima/ima_policy.c:1280:3: note: did you mean 'ima_parse_rule'?
   security/integrity/ima/ima_policy.c:894:12: note: 'ima_parse_rule' declared here
   static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
              ^
   1 error generated.

# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=1950f718bed0c32e4404121532351f2f5576e1b7
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 1950f718bed0c32e4404121532351f2f5576e1b7
vim +/ima_free_rule +1280 security/integrity/ima/ima_policy.c

  1246	
  1247	/**
  1248	 * ima_parse_add_rule - add a rule to ima_policy_rules
  1249	 * @rule - ima measurement policy rule
  1250	 *
  1251	 * Avoid locking by allowing just one writer at a time in ima_write_policy()
  1252	 * Returns the length of the rule parsed, an error code on failure
  1253	 */
  1254	ssize_t ima_parse_add_rule(char *rule)
  1255	{
  1256		static const char op[] = "update_policy";
  1257		char *p;
  1258		struct ima_rule_entry *entry;
  1259		ssize_t result, len;
  1260		int audit_info = 0;
  1261	
  1262		p = strsep(&rule, "\n");
  1263		len = strlen(p) + 1;
  1264		p += strspn(p, " \t");
  1265	
  1266		if (*p == '#' || *p == '\0')
  1267			return len;
  1268	
  1269		entry = kzalloc(sizeof(*entry), GFP_KERNEL);
  1270		if (!entry) {
  1271			integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL,
  1272					    NULL, op, "-ENOMEM", -ENOMEM, audit_info);
  1273			return -ENOMEM;
  1274		}
  1275	
  1276		INIT_LIST_HEAD(&entry->list);
  1277	
  1278		result = ima_parse_rule(p, entry);
  1279		if (result) {
> 1280			ima_free_rule(entry);
  1281			integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL,
  1282					    NULL, op, "invalid-policy", result,
  1283					    audit_info);
  1284			return result;
  1285		}
  1286	
  1287		list_add_tail(&entry->list, &ima_temp_rules);
  1288	
  1289		return len;
  1290	}
  1291	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31725 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-16  9:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-16  9:39 [sashal-linux-stable:queue-5.4 146/215] security/integrity/ima/ima_policy.c:1280:3: error: implicit declaration of function 'ima_free_rule' kernel test robot

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.