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

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git keys-acl
head:   06a67e452fb9c5815f6181878949ab31178c6d67
commit: eed986d8643280beed60cf7e7b9599f768706a53 [23/24] keys: Split the search perms between KEY_NEED_USE and KEY_NEED_SEARCH
config: c6x-randconfig-r031-20210209 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=eed986d8643280beed60cf7e7b9599f768706a53
        git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
        git fetch --no-tags dhowells-fs keys-acl
        git checkout eed986d8643280beed60cf7e7b9599f768706a53
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x 

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:434:18: note: declared here
     434 | 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:434:18: note: declared here
     434 | extern key_ref_t keyring_search(key_ref_t keyring,
         |                  ^~~~~~~~~~~~~~
--
   lib/digsig.c: In function 'digsig_verify':
>> lib/digsig.c:220:10: error: too few arguments to function 'keyring_search'
     220 |   kref = keyring_search(make_key_ref(keyring, 1UL),
         |          ^~~~~~~~~~~~~~
   In file included from lib/digsig.c:20:
   include/linux/key.h:434:18: note: declared here
     434 | 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 {
d136eb9630296f 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)) {
8c2f516c99f0b7 Bruno Meneguele 2020-09-04  58  		if (keyring)
8c2f516c99f0b7 Bruno Meneguele 2020-09-04  59  			pr_err_ratelimited("Request for unknown key '%s' in '%s' keyring. err %ld\n",
8c2f516c99f0b7 Bruno Meneguele 2020-09-04  60  					   name, keyring->description,
8c2f516c99f0b7 Bruno Meneguele 2020-09-04  61  					   PTR_ERR(key));
8c2f516c99f0b7 Bruno Meneguele 2020-09-04  62  		else
d9a2e5d788d39f Dmitry Kasatkin 2014-07-02  63  			pr_err_ratelimited("Request for unknown key '%s' err %ld\n",
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  64  					   name, PTR_ERR(key));
8c2f516c99f0b7 Bruno Meneguele 2020-09-04  65  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  66  		switch (PTR_ERR(key)) {
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  67  			/* Hide some search errors */
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  68  		case -EACCES:
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  69  		case -ENOTDIR:
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  70  		case -EAGAIN:
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  71  			return ERR_PTR(-ENOKEY);
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  72  		default:
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  73  			return key;
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  74  		}
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  75  	}
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  76  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  77  	pr_debug("%s() = 0 [%x]\n", __func__, key_serial(key));
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  78  
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  79  	return key;
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  80  }
e0751257a64ea1 Dmitry Kasatkin 2013-02-07  81  

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

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

only message in thread, other threads:[~2021-02-09 21:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 21:34 [dhowells-fs:keys-acl 23/24] 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.