All of lore.kernel.org
 help / color / mirror / Atom feed
* [dhowells-fs:keys-acl 4/5] security/integrity/digsig_asymmetric.c:35:10: error: too few arguments to function 'keyring_search'
@ 2020-07-16 21:32 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-16 21:32 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git keys-acl
head:   2a3c3edfc979691a7dc4733da827f508da90995a
commit: d1aa67ba9c4d53ddb95f6b5ec73968287df65fb4 [4/5] keys: Split the search perms between KEY_NEED_USE and KEY_NEED_SEARCH
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        git checkout d1aa67ba9c4d53ddb95f6b5ec73968287df65fb4
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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/digsig_asymmetric.c: In function 'request_asymmetric_key':
>> security/integrity/digsig_asymmetric.c:35:10: error: too few arguments to function 'keyring_search'
      35 |   kref = keyring_search(make_key_ref(key, 1),
         |          ^~~~~~~~~~~~~~
   In file included from include/linux/key-type.h:11,
                    from security/integrity/digsig_asymmetric.c:11:
   include/linux/key.h:433:18: note: declared here
     433 | extern key_ref_t keyring_search(key_ref_t keyring,
         |                  ^~~~~~~~~~~~~~
   security/integrity/digsig_asymmetric.c:47:10: error: too few arguments to function 'keyring_search'
      47 |   kref = keyring_search(make_key_ref(keyring, 1),
         |          ^~~~~~~~~~~~~~
   In file included from include/linux/key-type.h:11,
                    from security/integrity/digsig_asymmetric.c:11:
   include/linux/key.h:433:18: note: declared here
     433 | extern key_ref_t keyring_search(key_ref_t keyring,
         |                  ^~~~~~~~~~~~~~
--
   fs/crypto/keyring.c: In function 'search_fscrypt_keyring':
>> fs/crypto/keyring.c:145:11: error: too few arguments to function 'keyring_search'
     145 |  keyref = keyring_search(keyref, type, description, false);
         |           ^~~~~~~~~~~~~~
   In file included from include/linux/key-type.h:11,
                    from fs/crypto/keyring.c:22:
   include/linux/key.h:433:18: note: declared here
     433 | extern key_ref_t keyring_search(key_ref_t keyring,
         |                  ^~~~~~~~~~~~~~

vim +/keyring_search +35 security/integrity/digsig_asymmetric.c

e0751257a64ea1 Dmitry Kasatkin 2013-02-07  18  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  19  /*
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  20   * Request an asymmetric key.
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  21   */
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  22  static struct key *request_asymmetric_key(struct key *keyring, uint32_t keyid)
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  23  {
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  24  	struct key *key;
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  25  	char name[12];
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  26  
594081ee7145cc Dmitry Kasatkin 2014-10-06  27  	sprintf(name, "id:%08x", keyid);
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  28  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  29  	pr_debug("key search: \"%s\"\n", name);
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  30  
41c89b64d7184a Petko Manolov   2015-12-02  31  	key = get_ima_blacklist_keyring();
41c89b64d7184a Petko Manolov   2015-12-02  32  	if (key) {
41c89b64d7184a Petko Manolov   2015-12-02  33  		key_ref_t kref;
41c89b64d7184a Petko Manolov   2015-12-02  34  
41c89b64d7184a Petko Manolov   2015-12-02 @35  		kref = keyring_search(make_key_ref(key, 1),
dcf49dbc8077e2 David Howells   2019-06-26  36  				      &key_type_asymmetric, name, true);
41c89b64d7184a Petko Manolov   2015-12-02  37  		if (!IS_ERR(kref)) {
41c89b64d7184a Petko Manolov   2015-12-02  38  			pr_err("Key '%s' is in ima_blacklist_keyring\n", name);
41c89b64d7184a Petko Manolov   2015-12-02  39  			return ERR_PTR(-EKEYREJECTED);
41c89b64d7184a Petko Manolov   2015-12-02  40  		}
41c89b64d7184a Petko Manolov   2015-12-02  41  	}
41c89b64d7184a Petko Manolov   2015-12-02  42  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  43  	if (keyring) {
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  44  		/* search in specific keyring */
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  45  		key_ref_t kref;
41c89b64d7184a Petko Manolov   2015-12-02  46  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  47  		kref = keyring_search(make_key_ref(keyring, 1),
dcf49dbc8077e2 David Howells   2019-06-26  48  				      &key_type_asymmetric, name, true);
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  49  		if (IS_ERR(kref))
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  50  			key = ERR_CAST(kref);
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  51  		else
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  52  			key = key_ref_to_ptr(kref);
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  53  	} else {
dac087514d86cf David Howells   2020-02-12  54  		key = request_key(&key_type_asymmetric, name, NULL, NULL);
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  55  	}
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  56  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  57  	if (IS_ERR(key)) {
d9a2e5d788d39f Dmitry Kasatkin 2014-07-02  58  		pr_err_ratelimited("Request for unknown key '%s' err %ld\n",
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  59  				   name, PTR_ERR(key));
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  60  		switch (PTR_ERR(key)) {
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  61  			/* Hide some search errors */
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  62  		case -EACCES:
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  63  		case -ENOTDIR:
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  64  		case -EAGAIN:
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  65  			return ERR_PTR(-ENOKEY);
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  66  		default:
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  67  			return key;
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  68  		}
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  69  	}
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  70  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  71  	pr_debug("%s() = 0 [%x]\n", __func__, key_serial(key));
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  72  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  73  	return key;
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  74  }
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  75  

:::::: The code at line 35 was first introduced by commit
:::::: 41c89b64d7184a780f12f2cccdabe65cb2408893 IMA: create machine owner and blacklist keyrings

:::::: TO: Petko Manolov <petkan@mip-labs.com>
:::::: CC: Mimi Zohar <zohar@linux.vnet.ibm.com>

---
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: 74068 bytes --]

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

only message in thread, other threads:[~2020-07-16 21:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-16 21:32 [dhowells-fs:keys-acl 4/5] security/integrity/digsig_asymmetric.c:35:10: error: too few arguments to function 'keyring_search' 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.