lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 1 Jan 2017 07:23:15 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Richard Weinberger <richard@....at>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org
Subject: fs/crypto/keyinfo.c:110:8: error: implicit declaration of function
 'user_key_payload'

Hi Richard,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   238d1d0f79f619d75c2cc741d6770fb0986aef24
commit: d475a507457b5cafa428871a473d0dcc828c5f68 ubifs: Add skeleton for fscrypto
date:   3 weeks ago
config: i386-randconfig-a0-201701 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout d475a507457b5cafa428871a473d0dcc828c5f68
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   fs/crypto/keyinfo.c: In function 'validate_user_key':
   fs/crypto/keyinfo.c:98:16: error: implicit declaration of function 'request_key' [-Werror=implicit-function-declaration]
     keyring_key = request_key(&key_type_logon, full_key_descriptor, NULL);
                   ^~~~~~~~~~~
   fs/crypto/keyinfo.c:98:29: error: 'key_type_logon' undeclared (first use in this function)
     keyring_key = request_key(&key_type_logon, full_key_descriptor, NULL);
                                ^~~~~~~~~~~~~~
   fs/crypto/keyinfo.c:98:29: note: each undeclared identifier is reported only once for each function it appears in
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/key.h:18,
                    from include/keys/user-type.h:15,
                    from fs/crypto/keyinfo.c:11:
   fs/crypto/keyinfo.c:103:17: error: dereferencing pointer to incomplete type 'struct key'
     if (keyring_key->type != &key_type_logon) {
                    ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/keyinfo.c:103:2: note: in expansion of macro 'if'
     if (keyring_key->type != &key_type_logon) {
     ^~
>> fs/crypto/keyinfo.c:110:8: error: implicit declaration of function 'user_key_payload' [-Werror=implicit-function-declaration]
     ukp = user_key_payload(keyring_key);
           ^~~~~~~~~~~~~~~~
   fs/crypto/keyinfo.c:110:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     ukp = user_key_payload(keyring_key);
         ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/key.h:18,
                    from include/keys/user-type.h:15,
                    from fs/crypto/keyinfo.c:11:
   fs/crypto/keyinfo.c:111:9: error: dereferencing pointer to incomplete type 'const struct user_key_payload'
     if (ukp->datalen != sizeof(struct fscrypt_key)) {
            ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/keyinfo.c:111:2: note: in expansion of macro 'if'
     if (ukp->datalen != sizeof(struct fscrypt_key)) {
     ^~
   fs/crypto/keyinfo.c: In function 'fscrypt_get_encryption_info':
   fs/crypto/keyinfo.c:327:40: error: 'KEY_FLAG_INVALIDATED' undeclared (first use in this function)
       (ci->ci_keyring_key->flags & ((1 << KEY_FLAG_INVALIDATED) |
                                           ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/keyinfo.c:325:2: note: in expansion of macro 'if'
     if (!ci ||
     ^~
   fs/crypto/keyinfo.c:328:19: error: 'KEY_FLAG_REVOKED' undeclared (first use in this function)
                (1 << KEY_FLAG_REVOKED) |
                      ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/keyinfo.c:325:2: note: in expansion of macro 'if'
     if (!ci ||
     ^~
   fs/crypto/keyinfo.c:329:19: error: 'KEY_FLAG_DEAD' undeclared (first use in this function)
                (1 << KEY_FLAG_DEAD)))))
                      ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/keyinfo.c:325:2: note: in expansion of macro 'if'
     if (!ci ||
     ^~
   cc1: some warnings being treated as errors
--
   fs/crypto/crypto.c: In function 'fscrypt_zeroout_range':
   fs/crypto/crypto.c:355:9: error: implicit declaration of function 'bio_alloc' [-Werror=implicit-function-declaration]
      bio = bio_alloc(GFP_NOWAIT, 1);
            ^~~~~~~~~
   fs/crypto/crypto.c:355:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      bio = bio_alloc(GFP_NOWAIT, 1);
          ^
   fs/crypto/crypto.c:360:6: error: dereferencing pointer to incomplete type 'struct bio'
      bio->bi_bdev = inode->i_sb->s_bdev;
         ^~
   fs/crypto/crypto.c:363:3: error: implicit declaration of function 'bio_set_op_attrs' [-Werror=implicit-function-declaration]
      bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
      ^~~~~~~~~~~~~~~~
   fs/crypto/crypto.c:364:9: error: implicit declaration of function 'bio_add_page' [-Werror=implicit-function-declaration]
      ret = bio_add_page(bio, ciphertext_page,
            ^~~~~~~~~~~~
   fs/crypto/crypto.c:369:4: error: implicit declaration of function 'bio_put' [-Werror=implicit-function-declaration]
       bio_put(bio);
       ^~~~~~~
   fs/crypto/crypto.c:373:9: error: implicit declaration of function 'submit_bio_wait' [-Werror=implicit-function-declaration]
      err = submit_bio_wait(bio);
            ^~~~~~~~~~~~~~~
   In file included from include/asm-generic/bug.h:4:0,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/linux/mmdebug.h:4,
                    from include/linux/mm.h:8,
                    from include/linux/pagemap.h:7,
                    from fs/crypto/crypto.c:22:
   fs/crypto/crypto.c: In function 'fscrypt_d_revalidate':
>> fs/crypto/crypto.c:411:25: error: dereferencing pointer to incomplete type 'struct key'
         (ci->ci_keyring_key->flags & ((1 << KEY_FLAG_INVALIDATED) |
                            ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/crypto.c:410:2: note: in expansion of macro 'if'
     if (ci && ci->ci_keyring_key &&
     ^~
>> fs/crypto/crypto.c:411:42: error: 'KEY_FLAG_INVALIDATED' undeclared (first use in this function)
         (ci->ci_keyring_key->flags & ((1 << KEY_FLAG_INVALIDATED) |
                                             ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/crypto.c:410:2: note: in expansion of macro 'if'
     if (ci && ci->ci_keyring_key &&
     ^~
   fs/crypto/crypto.c:411:42: note: each undeclared identifier is reported only once for each function it appears in
         (ci->ci_keyring_key->flags & ((1 << KEY_FLAG_INVALIDATED) |
                                             ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/crypto.c:410:2: note: in expansion of macro 'if'
     if (ci && ci->ci_keyring_key &&
     ^~
>> fs/crypto/crypto.c:412:14: error: 'KEY_FLAG_REVOKED' undeclared (first use in this function)
           (1 << KEY_FLAG_REVOKED) |
                 ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/crypto.c:410:2: note: in expansion of macro 'if'
     if (ci && ci->ci_keyring_key &&
     ^~
>> fs/crypto/crypto.c:413:14: error: 'KEY_FLAG_DEAD' undeclared (first use in this function)
           (1 << KEY_FLAG_DEAD))))
                 ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/crypto/crypto.c:410:2: note: in expansion of macro 'if'
     if (ci && ci->ci_keyring_key &&
     ^~
   fs/crypto/crypto.c: In function 'completion_pages':
   fs/crypto/crypto.c:457:2: error: implicit declaration of function 'bio_for_each_segment_all' [-Werror=implicit-function-declaration]
     bio_for_each_segment_all(bv, bio, i) {
     ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/crypto/crypto.c:457:39: error: expected ';' before '{' token
     bio_for_each_segment_all(bv, bio, i) {
                                          ^
   cc1: some warnings being treated as errors

vim +/user_key_payload +110 fs/crypto/keyinfo.c

b5a7aef1 Jaegeuk Kim 2016-05-04   97  	full_key_descriptor[full_key_len - 1] = '\0';
b5a7aef1 Jaegeuk Kim 2016-05-04   98  	keyring_key = request_key(&key_type_logon, full_key_descriptor, NULL);
b5a7aef1 Jaegeuk Kim 2016-05-04   99  	kfree(full_key_descriptor);
b5a7aef1 Jaegeuk Kim 2016-05-04  100  	if (IS_ERR(keyring_key))
b5a7aef1 Jaegeuk Kim 2016-05-04  101  		return PTR_ERR(keyring_key);
b5a7aef1 Jaegeuk Kim 2016-05-04  102  
b5a7aef1 Jaegeuk Kim 2016-05-04 @103  	if (keyring_key->type != &key_type_logon) {
b5a7aef1 Jaegeuk Kim 2016-05-04  104  		printk_once(KERN_WARNING
b5a7aef1 Jaegeuk Kim 2016-05-04  105  				"%s: key type must be logon\n", __func__);
b5a7aef1 Jaegeuk Kim 2016-05-04  106  		res = -ENOKEY;
b5a7aef1 Jaegeuk Kim 2016-05-04  107  		goto out;
b5a7aef1 Jaegeuk Kim 2016-05-04  108  	}
b5a7aef1 Jaegeuk Kim 2016-05-04  109  	down_read(&keyring_key->sem);
b5a7aef1 Jaegeuk Kim 2016-05-04 @110  	ukp = user_key_payload(keyring_key);
b5a7aef1 Jaegeuk Kim 2016-05-04  111  	if (ukp->datalen != sizeof(struct fscrypt_key)) {
b5a7aef1 Jaegeuk Kim 2016-05-04  112  		res = -EINVAL;
b5a7aef1 Jaegeuk Kim 2016-05-04  113  		up_read(&keyring_key->sem);

:::::: The code at line 110 was first introduced by commit
:::::: b5a7aef1ef436ec005fef0efe31a676ec5f4ab31 fscrypto/f2fs: allow fs-specific key prefix for fs encryption

:::::: TO: Jaegeuk Kim <jaegeuk@...nel.org>
:::::: CC: Jaegeuk Kim <jaegeuk@...nel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (20645 bytes)

Powered by blists - more mailing lists