* [dhowells-fs:keys-next 15/18] fs//crypto/keysetup_v1.c:107:8: error: too few arguments to function 'request_key'
@ 2020-01-16 22:14 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-01-16 22:14 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 11882 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git keys-next
head: 8c58642085386f9f76727acdca7263c6c668e336
commit: 66ee6ca570cc63e32904403dd8f6bb7db326712e [15/18] keys: Replace uid/gid/perm permissions checking with an ACL
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 66ee6ca570cc63e32904403dd8f6bb7db326712e
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: the dhowells-fs/keys-next HEAD 8c58642085386f9f76727acdca7263c6c668e336 builds fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
In file included from include/linux/keyctl.h:11:0,
from include/linux/key.h:35,
from include/linux/key-type.h:11,
from fs//crypto/keyring.c:22:
fs//crypto/keyring.c: In function 'allocate_filesystem_keyring':
>> include/uapi/linux/keyctl.h:52:24: warning: passing argument 5 of 'keyring_alloc' makes pointer from integer without a cast [-Wint-conversion]
#define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
^
>> fs//crypto/keyring.c:208:21: note: in expansion of macro 'KEY_POS_SEARCH'
current_cred(), KEY_POS_SEARCH |
^~~~~~~~~~~~~~
In file included from include/linux/key-type.h:11:0,
from fs//crypto/keyring.c:22:
include/linux/key.h:387:20: note: expected 'struct key_acl *' but argument is of type 'int'
extern struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid,
^~~~~~~~~~~~~
In file included from include/linux/keyctl.h:11:0,
from include/linux/key.h:35,
from include/linux/key-type.h:11,
from fs//crypto/keyring.c:22:
fs//crypto/keyring.c: In function 'allocate_master_key_users_keyring':
>> include/uapi/linux/keyctl.h:52:24: warning: passing argument 5 of 'keyring_alloc' makes pointer from integer without a cast [-Wint-conversion]
#define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
^
fs//crypto/keyring.c:252:21: note: in expansion of macro 'KEY_POS_SEARCH'
current_cred(), KEY_POS_SEARCH |
^~~~~~~~~~~~~~
In file included from include/linux/key-type.h:11:0,
from fs//crypto/keyring.c:22:
include/linux/key.h:387:20: note: expected 'struct key_acl *' but argument is of type 'int'
extern struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid,
^~~~~~~~~~~~~
In file included from include/linux/keyctl.h:11:0,
from include/linux/key.h:35,
from include/linux/key-type.h:11,
from fs//crypto/keyring.c:22:
fs//crypto/keyring.c: In function 'add_master_key_user':
>> include/uapi/linux/keyctl.h:52:24: warning: passing argument 6 of 'key_alloc' makes pointer from integer without a cast [-Wint-conversion]
#define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
^
fs//crypto/keyring.c:290:8: note: in expansion of macro 'KEY_POS_SEARCH'
KEY_POS_SEARCH | KEY_USR_VIEW, 0, NULL);
^~~~~~~~~~~~~~
In file included from include/linux/key-type.h:11:0,
from fs//crypto/keyring.c:22:
include/linux/key.h:253:20: note: expected 'struct key_acl *' but argument is of type 'int'
extern struct key *key_alloc(struct key_type *type,
^~~~~~~~~
In file included from include/linux/keyctl.h:11:0,
from include/linux/key.h:35,
from include/linux/key-type.h:11,
from fs//crypto/keyring.c:22:
fs//crypto/keyring.c: In function 'add_new_master_key':
>> include/uapi/linux/keyctl.h:52:24: warning: passing argument 6 of 'key_alloc' makes pointer from integer without a cast [-Wint-conversion]
#define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
^
fs//crypto/keyring.c:362:4: note: in expansion of macro 'KEY_POS_SEARCH'
KEY_POS_SEARCH | KEY_USR_SEARCH | KEY_USR_VIEW,
^~~~~~~~~~~~~~
In file included from include/linux/key-type.h:11:0,
from fs//crypto/keyring.c:22:
include/linux/key.h:253:20: note: expected 'struct key_acl *' but argument is of type 'int'
extern struct key *key_alloc(struct key_type *type,
^~~~~~~~~
--
fs//crypto/keysetup_v1.c: In function 'find_and_lock_process_key':
>> fs//crypto/keysetup_v1.c:107:8: error: too few arguments to function 'request_key'
key = request_key(&key_type_logon, description, NULL);
^~~~~~~~~~~
In file included from include/keys/user-type.h:11:0,
from fs//crypto/keysetup_v1.c:25:
include/linux/key.h:318:27: note: declared here
static inline struct key *request_key(struct key_type *type,
^~~~~~~~~~~
--
In file included from include/linux/keyctl.h:11:0,
from include/linux/key.h:35,
from include/linux/cred.h:13,
from fs//verity/signature.c:10:
fs//verity/signature.c: In function 'fsverity_init_signature':
>> include/uapi/linux/keyctl.h:52:24: warning: passing argument 5 of 'keyring_alloc' makes pointer from integer without a cast [-Wint-conversion]
#define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
^
>> fs//verity/signature.c:140:25: note: in expansion of macro 'KEY_POS_SEARCH'
current_cred(), KEY_POS_SEARCH |
^~~~~~~~~~~~~~
In file included from include/linux/cred.h:13:0,
from fs//verity/signature.c:10:
include/linux/key.h:387:20: note: expected 'struct key_acl *' but argument is of type 'int'
extern struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid,
^~~~~~~~~~~~~
--
drivers//md/dm-verity-verify-sig.c: In function 'verity_verify_get_sig_from_key':
>> drivers//md/dm-verity-verify-sig.c:38:8: error: too few arguments to function 'request_key'
key = request_key(&key_type_user,
^~~~~~~~~~~
In file included from include/keys/user-type.h:11:0,
from drivers//md/dm-verity-verify-sig.c:10:
include/linux/key.h:318:27: note: declared here
static inline struct key *request_key(struct key_type *type,
^~~~~~~~~~~
vim +/request_key +107 fs//crypto/keysetup_v1.c
0109ce76dd6e9e Eric Biggers 2019-08-04 85
0109ce76dd6e9e Eric Biggers 2019-08-04 86 /*
0109ce76dd6e9e Eric Biggers 2019-08-04 87 * Search the current task's subscribed keyrings for a "logon" key with
0109ce76dd6e9e Eric Biggers 2019-08-04 88 * description prefix:descriptor, and if found acquire a read lock on it and
0109ce76dd6e9e Eric Biggers 2019-08-04 89 * return a pointer to its validated payload in *payload_ret.
0109ce76dd6e9e Eric Biggers 2019-08-04 90 */
0109ce76dd6e9e Eric Biggers 2019-08-04 91 static struct key *
0109ce76dd6e9e Eric Biggers 2019-08-04 92 find_and_lock_process_key(const char *prefix,
0109ce76dd6e9e Eric Biggers 2019-08-04 93 const u8 descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE],
0109ce76dd6e9e Eric Biggers 2019-08-04 94 unsigned int min_keysize,
0109ce76dd6e9e Eric Biggers 2019-08-04 95 const struct fscrypt_key **payload_ret)
0109ce76dd6e9e Eric Biggers 2019-08-04 96 {
0109ce76dd6e9e Eric Biggers 2019-08-04 97 char *description;
0109ce76dd6e9e Eric Biggers 2019-08-04 98 struct key *key;
0109ce76dd6e9e Eric Biggers 2019-08-04 99 const struct user_key_payload *ukp;
0109ce76dd6e9e Eric Biggers 2019-08-04 100 const struct fscrypt_key *payload;
0109ce76dd6e9e Eric Biggers 2019-08-04 101
0109ce76dd6e9e Eric Biggers 2019-08-04 102 description = kasprintf(GFP_NOFS, "%s%*phN", prefix,
0109ce76dd6e9e Eric Biggers 2019-08-04 103 FSCRYPT_KEY_DESCRIPTOR_SIZE, descriptor);
0109ce76dd6e9e Eric Biggers 2019-08-04 104 if (!description)
0109ce76dd6e9e Eric Biggers 2019-08-04 105 return ERR_PTR(-ENOMEM);
0109ce76dd6e9e Eric Biggers 2019-08-04 106
0109ce76dd6e9e Eric Biggers 2019-08-04 @107 key = request_key(&key_type_logon, description, NULL);
0109ce76dd6e9e Eric Biggers 2019-08-04 108 kfree(description);
0109ce76dd6e9e Eric Biggers 2019-08-04 109 if (IS_ERR(key))
0109ce76dd6e9e Eric Biggers 2019-08-04 110 return key;
0109ce76dd6e9e Eric Biggers 2019-08-04 111
0109ce76dd6e9e Eric Biggers 2019-08-04 112 down_read(&key->sem);
0109ce76dd6e9e Eric Biggers 2019-08-04 113 ukp = user_key_payload_locked(key);
0109ce76dd6e9e Eric Biggers 2019-08-04 114
0109ce76dd6e9e Eric Biggers 2019-08-04 115 if (!ukp) /* was the key revoked before we acquired its semaphore? */
0109ce76dd6e9e Eric Biggers 2019-08-04 116 goto invalid;
0109ce76dd6e9e Eric Biggers 2019-08-04 117
0109ce76dd6e9e Eric Biggers 2019-08-04 118 payload = (const struct fscrypt_key *)ukp->data;
0109ce76dd6e9e Eric Biggers 2019-08-04 119
0109ce76dd6e9e Eric Biggers 2019-08-04 120 if (ukp->datalen != sizeof(struct fscrypt_key) ||
0109ce76dd6e9e Eric Biggers 2019-08-04 121 payload->size < 1 || payload->size > FSCRYPT_MAX_KEY_SIZE) {
0109ce76dd6e9e Eric Biggers 2019-08-04 122 fscrypt_warn(NULL,
0109ce76dd6e9e Eric Biggers 2019-08-04 123 "key with description '%s' has invalid payload",
0109ce76dd6e9e Eric Biggers 2019-08-04 124 key->description);
0109ce76dd6e9e Eric Biggers 2019-08-04 125 goto invalid;
0109ce76dd6e9e Eric Biggers 2019-08-04 126 }
0109ce76dd6e9e Eric Biggers 2019-08-04 127
0109ce76dd6e9e Eric Biggers 2019-08-04 128 if (payload->size < min_keysize) {
0109ce76dd6e9e Eric Biggers 2019-08-04 129 fscrypt_warn(NULL,
0109ce76dd6e9e Eric Biggers 2019-08-04 130 "key with description '%s' is too short (got %u bytes, need %u+ bytes)",
0109ce76dd6e9e Eric Biggers 2019-08-04 131 key->description, payload->size, min_keysize);
0109ce76dd6e9e Eric Biggers 2019-08-04 132 goto invalid;
0109ce76dd6e9e Eric Biggers 2019-08-04 133 }
0109ce76dd6e9e Eric Biggers 2019-08-04 134
0109ce76dd6e9e Eric Biggers 2019-08-04 135 *payload_ret = payload;
0109ce76dd6e9e Eric Biggers 2019-08-04 136 return key;
0109ce76dd6e9e Eric Biggers 2019-08-04 137
0109ce76dd6e9e Eric Biggers 2019-08-04 138 invalid:
0109ce76dd6e9e Eric Biggers 2019-08-04 139 up_read(&key->sem);
0109ce76dd6e9e Eric Biggers 2019-08-04 140 key_put(key);
0109ce76dd6e9e Eric Biggers 2019-08-04 141 return ERR_PTR(-ENOKEY);
0109ce76dd6e9e Eric Biggers 2019-08-04 142 }
0109ce76dd6e9e Eric Biggers 2019-08-04 143
:::::: The code at line 107 was first introduced by commit
:::::: 0109ce76dd6e9e69559e56ea9f10d1e12ca4a50b fscrypt: move v1 policy key setup to keysetup_v1.c
:::::: TO: Eric Biggers <ebiggers@google.com>
:::::: CC: Eric Biggers <ebiggers@google.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 50685 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-16 22:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 22:14 [dhowells-fs:keys-next 15/18] fs//crypto/keysetup_v1.c:107:8: error: too few arguments to function 'request_key' kbuild 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.