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: i386-randconfig-c001-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
#
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
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
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
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:434:18: note: declared here
434 | extern key_ref_t keyring_search(key_ref_t keyring,
| ^~~~~~~~~~~~~~
vim +/keyring_search +145 fs/crypto/keyring.c
23c688b54016ee Eric Biggers 2019-08-04 133
23c688b54016ee Eric Biggers 2019-08-04 134 /* Search ->s_master_keys or ->mk_users
*/
22d94f493bfb40 Eric Biggers 2019-08-04 135 static struct key
*search_fscrypt_keyring(struct key *keyring,
22d94f493bfb40 Eric Biggers 2019-08-04 136 struct key_type *type,
22d94f493bfb40 Eric Biggers 2019-08-04 137 const char *description)
22d94f493bfb40 Eric Biggers 2019-08-04 138 {
22d94f493bfb40 Eric Biggers 2019-08-04 139 /*
22d94f493bfb40 Eric Biggers 2019-08-04 140 * We need to mark the keyring reference as
"possessed" so that we
22d94f493bfb40 Eric Biggers 2019-08-04 141 * acquire permission to search it, via the
KEY_POS_SEARCH permission.
22d94f493bfb40 Eric Biggers 2019-08-04 142 */
22d94f493bfb40 Eric Biggers 2019-08-04 143 key_ref_t keyref = make_key_ref(keyring,
true /* possessed */);
22d94f493bfb40 Eric Biggers 2019-08-04 144
22d94f493bfb40 Eric Biggers 2019-08-04 @145 keyref = keyring_search(keyref, type,
description, false);
22d94f493bfb40 Eric Biggers 2019-08-04 146 if (IS_ERR(keyref)) {
22d94f493bfb40 Eric Biggers 2019-08-04 147 if (PTR_ERR(keyref) == -EAGAIN || /* not
found */
22d94f493bfb40 Eric Biggers 2019-08-04 148 PTR_ERR(keyref) == -EKEYREVOKED) /*
recently invalidated */
22d94f493bfb40 Eric Biggers 2019-08-04 149 keyref = ERR_PTR(-ENOKEY);
22d94f493bfb40 Eric Biggers 2019-08-04 150 return ERR_CAST(keyref);
22d94f493bfb40 Eric Biggers 2019-08-04 151 }
22d94f493bfb40 Eric Biggers 2019-08-04 152 return key_ref_to_ptr(keyref);
22d94f493bfb40 Eric Biggers 2019-08-04 153 }
22d94f493bfb40 Eric Biggers 2019-08-04 154
:::::: The code at line 145 was first introduced by commit
:::::: 22d94f493bfb408fdd764f7b1d0363af2122fba5 fscrypt: add FS_IOC_ADD_ENCRYPTION_KEY
ioctl
:::::: TO: Eric Biggers <ebiggers(a)google.com>
:::::: CC: Eric Biggers <ebiggers(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org