I fixed this ~3 minutes after pushing.. amazing how quick the kbuild test robot
is!
But thanks,
Mike
On Wed, Apr 22 2020 at 5:21pm -0400,
kbuild test robot wrote:
> tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
> for-next
> head: 2d56364c7c7ba64576c37a16c8af98f66b4bb16b
> commit: 5cacab0334b940164ad6aac39712f4d3b06076bc [27/28] dm crypt: support
> using encrypted keys
> config: i386-randconfig-e001-20200421 (attached as .config)
> compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> reproduce:
> git checkout 5cacab0334b940164ad6aac39712f4d3b06076bc
> # save the attached .config to linux build tree
> make ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot
>
> All errors (new ones prefixed by >>):
>
>ld: drivers/md/dm-crypt.o: in function `crypt_set_keyring_key':
> >> drivers/md/dm-crypt.c:2281: undefined reference to `key_type_encrypted'
>
> vim +2281 drivers/md/dm-crypt.c
>
> 2251
> 2252static int crypt_set_keyring_key(struct crypt_config *cc, const
> char *key_string)
> 2253{
> 2254char *new_key_string, *key_desc;
> 2255int ret;
> 2256struct key_type *type;
> 2257struct key *key;
> 2258int (*set_key)(struct crypt_config *cc, struct key
> *key);
> 2259
> 2260/*
> 2261 * Reject key_string with whitespace. dm core currently
> lacks code for
> 2262 * proper whitespace escaping in arguments on
> DM_TABLE_STATUS path.
> 2263 */
> 2264if (contains_whitespace(key_string)) {
> 2265DMERR("whitespace chars not allowed in key
> string");
> 2266return -EINVAL;
> 2267}
> 2268
> 2269/* look for next ':' separating key_type from
> key_description */
> 2270key_desc = strpbrk(key_string, ":");
> 2271if (!key_desc || key_desc == key_string ||
> !strlen(key_desc + 1))
> 2272return -EINVAL;
> 2273
> 2274if (!strncmp(key_string, "logon:", key_desc -
> key_string + 1)) {
> 2275type = _type_logon;
> 2276set_key = set_key_user;
> 2277} else if (!strncmp(key_string, "user:", key_desc -
> key_string + 1)) {
> 2278type = _type_user;
> 2279set_key = set_key_user;
> 2280} else if (!strncmp(key_string, "encrypted:", key_desc
> - key_string + 1)) {
> > 2281type = _type_encrypted;
> 2282set_key = set_key_encrypted;
> 2283} else {
> 2284return -EINVAL;
> 2285}
> 2286
> 2287new_key_string = kstrdup(key_string, GFP_KERNEL);
> 2288if (!new_key_string)
> 2289return -ENOMEM;
> 2290
> 2291key = request_key(type, key_desc + 1, NULL);
> 2292if (IS_ERR(key)) {
> 2293kzfree(new_key_string);
> 2294return PTR_ERR(key);
> 2295}
> 2296
> 2297down_read(>sem);
> 2298
> 2299ret = set_key(cc, key);
> 2300if (ret < 0) {
> 2301up_read(>sem);
> 2302key_put(key);
> 2303kzfree(new_key_string);
> 2304return ret;
> 2305}
> 2306
> 2307up_read(>sem);
> 2308key_put(key);
> 2309
> 2310/* clear the flag since following operations may
> invalidate previously valid key */
> 2311clear_bit(DM_CRYPT_KEY_VALID, >flags);
> 2312
> 2313ret = crypt_setkey(cc);
> 2314
> 2315if (!ret) {
> 2316set_bit(DM_CRYPT_KEY_VALID, >flags);
> 2317kzfree(cc->key_string);
> 2318cc->key_string = new_key_string;
> 2319} else
> 2320kzfree(new_key_string);
> 2321
> 2322return ret;
> 2323}
> 2324
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel