Hi Tadeusz,

[auto build test ERROR on cryptodev/master]
[also build test ERROR on v4.6-rc3 next-20160415]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improving the system]

url:    
https://github.com/0day-ci/linux/commits/Tadeusz-Struk/crypto-algif-add-akcipher/20160416-043207
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: i386-allmodconfig (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   crypto/algif_akcipher.c: In function 'asym_key_encrypt':
>> crypto/algif_akcipher.c:331:9: error: variable 'params' has initializer but 
>> incomplete type
     struct kernel_pkey_params params = {0};
            ^
>> crypto/algif_akcipher.c:331:38: warning: excess elements in struct 
>> initializer
     struct kernel_pkey_params params = {0};
                                         ^
   crypto/algif_akcipher.c:331:38: note: (near initialization for 'params')
>> crypto/algif_akcipher.c:331:28: error: storage size of 'params' isn't known
     struct kernel_pkey_params params = {0};
                               ^
>> crypto/algif_akcipher.c:357:8: error: implicit declaration of function 
>> 'encrypt_blob' [-Werror=implicit-function-declaration]
     ret = encrypt_blob(&params, in, out);
           ^
>> crypto/algif_akcipher.c:331:28: warning: unused variable 'params' 
>> [-Wunused-variable]
     struct kernel_pkey_params params = {0};
                               ^
   crypto/algif_akcipher.c: In function 'asym_key_decrypt':
   crypto/algif_akcipher.c:371:9: error: variable 'params' has initializer but 
incomplete type
     struct kernel_pkey_params params = {0};
            ^
   crypto/algif_akcipher.c:371:38: warning: excess elements in struct 
initializer
     struct kernel_pkey_params params = {0};
                                         ^
   crypto/algif_akcipher.c:371:38: note: (near initialization for 'params')
   crypto/algif_akcipher.c:371:28: error: storage size of 'params' isn't known
     struct kernel_pkey_params params = {0};
                               ^
>> crypto/algif_akcipher.c:397:8: error: implicit declaration of function 
>> 'decrypt_blob' [-Werror=implicit-function-declaration]
     ret = decrypt_blob(&params, in, out);
           ^
   crypto/algif_akcipher.c:371:28: warning: unused variable 'params' 
[-Wunused-variable]
     struct kernel_pkey_params params = {0};
                               ^
   crypto/algif_akcipher.c: In function 'asym_key_sign':
   crypto/algif_akcipher.c:411:9: error: variable 'params' has initializer but 
incomplete type
     struct kernel_pkey_params params = {0};
            ^
   crypto/algif_akcipher.c:411:38: warning: excess elements in struct 
initializer
     struct kernel_pkey_params params = {0};
                                         ^
   crypto/algif_akcipher.c:411:38: note: (near initialization for 'params')
   crypto/algif_akcipher.c:411:28: error: storage size of 'params' isn't known
     struct kernel_pkey_params params = {0};
                               ^
>> crypto/algif_akcipher.c:437:8: error: implicit declaration of function 
>> 'create_signature' [-Werror=implicit-function-declaration]
     ret = create_signature(&params, in, out);
           ^
   crypto/algif_akcipher.c:411:28: warning: unused variable 'params' 
[-Wunused-variable]
     struct kernel_pkey_params params = {0};
                               ^
   crypto/algif_akcipher.c: In function 'asym_key_verify':
>> crypto/algif_akcipher.c:465:5: error: 'struct public_key_signature' has no 
>> member named 'encoding'
     sig.encoding = "pkcs1";
        ^
   cc1: some warnings being treated as errors

vim +/params +331 crypto/algif_akcipher.c

   325  
   326          return err ? err : size;
   327  }
   328  
   329  static int asym_key_encrypt(const struct key *key, struct 
akcipher_request *req)
   330  {
 > 331          struct kernel_pkey_params params = {0};
   332          char *src = NULL, *dst = NULL, *in, *out;
   333          int ret;
   334  
   335          if (!sg_is_last(req->src)) {
   336                  src = kmalloc(req->src_len, GFP_KERNEL);
   337                  if (!src)
   338                          return -ENOMEM;
   339                  scatterwalk_map_and_copy(src, req->src, 0, 
req->src_len, 0);
   340                  in = src;
   341          } else {
   342                  in = sg_virt(req->src);
   343          }
   344          if (!sg_is_last(req->dst)) {
   345                  dst = kmalloc(req->dst_len, GFP_KERNEL);
   346                  if (!dst) {
   347                          kfree(src);
   348                          return -ENOMEM;
   349                  }
   350                  out = dst;
   351          } else {
   352                  out = sg_virt(req->dst);
   353          }
   354          params.key = (struct key *)key;
   355          params.data_len = req->src_len;
   356          params.enc_len = req->dst_len;
 > 357          ret = encrypt_blob(&params, in, out);
   358          if (ret)
   359                  goto free;
   360  
   361          if (dst)
   362                  scatterwalk_map_and_copy(dst, req->dst, 0, 
req->dst_len, 1);
   363  free:
   364          kfree(src);
   365          kfree(dst);
   366          return ret;
   367  }
   368  
   369  static int asym_key_decrypt(const struct key *key, struct 
akcipher_request *req)
   370  {
 > 371          struct kernel_pkey_params params = {0};
   372          char *src = NULL, *dst = NULL, *in, *out;
   373          int ret;
   374  
   375          if (!sg_is_last(req->src)) {
   376                  src = kmalloc(req->src_len, GFP_KERNEL);
   377                  if (!src)
   378                          return -ENOMEM;
   379                  scatterwalk_map_and_copy(src, req->src, 0, 
req->src_len, 0);
   380                  in = src;
   381          } else {
   382                  in = sg_virt(req->src);
   383          }
   384          if (!sg_is_last(req->dst)) {
   385                  dst = kmalloc(req->dst_len, GFP_KERNEL);
   386                  if (!dst) {
   387                          kfree(src);
   388                          return -ENOMEM;
   389                  }
   390                  out = dst;
   391          } else {
   392                  out = sg_virt(req->dst);
   393          }
   394          params.key = (struct key *)key;
   395          params.data_len = req->src_len;
   396          params.enc_len = req->dst_len;
 > 397          ret = decrypt_blob(&params, in, out);
   398          if (ret)
   399                  goto free;
   400  
   401          if (dst)
   402                  scatterwalk_map_and_copy(dst, req->dst, 0, 
req->dst_len, 1);
   403  free:
   404          kfree(src);
   405          kfree(dst);
   406          return ret;
   407  }
   408  
   409  static int asym_key_sign(const struct key *key, struct akcipher_request 
*req)
   410  {
 > 411          struct kernel_pkey_params params = {0};
   412          char *src = NULL, *dst = NULL, *in, *out;
   413          int ret;
   414  
   415          if (!sg_is_last(req->src)) {
   416                  src = kmalloc(req->src_len, GFP_KERNEL);
   417                  if (!src)
   418                          return -ENOMEM;
   419                  scatterwalk_map_and_copy(src, req->src, 0, 
req->src_len, 0);
   420                  in = src;
   421          } else {
   422                  in = sg_virt(req->src);
   423          }
   424          if (!sg_is_last(req->dst)) {
   425                  dst = kmalloc(req->dst_len, GFP_KERNEL);
   426                  if (!dst) {
   427                          kfree(src);
   428                          return -ENOMEM;
   429                  }
   430                  out = dst;
   431          } else {
   432                  out = sg_virt(req->dst);
   433          }
   434          params.key = (struct key *)key;
   435          params.data_len = req->src_len;
   436          params.enc_len = req->dst_len;
 > 437          ret = create_signature(&params, in, out);
   438          if (ret)
   439                  goto free;
   440  
   441          if (dst)
   442                  scatterwalk_map_and_copy(dst, req->dst, 0, 
req->dst_len, 1);
   443  free:
   444          kfree(src);
   445          kfree(dst);
   446          return ret;
   447  }
   448  
   449  static int asym_key_verify(const struct key *key, struct 
akcipher_request *req)
   450  {
   451          struct public_key_signature sig;
   452          char *src = NULL, *in;
   453          int ret;
   454  
   455          if (!sg_is_last(req->src)) {
   456                  src = kmalloc(req->src_len, GFP_KERNEL);
   457                  if (!src)
   458                          return -ENOMEM;
   459                  scatterwalk_map_and_copy(src, req->src, 0, 
req->src_len, 0);
   460                  in = src;
   461          } else {
   462                  in = sg_virt(req->src);
   463          }
   464          sig.pkey_algo = "rsa";
 > 465          sig.encoding = "pkcs1";
   466          /* Need to find a way to pass the hash param */
   467          sig.hash_algo = "sha1";
   468          sig.digest_size = 20;

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

Attachment: .config.gz
Description: Binary data

Reply via email to