mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Tadeusz Struk <tadeusz.struk@intel.com>
Cc: kbuild-all@01.org, dhowells@redhat.com,
	herbert@gondor.apana.org.au, tadeusz.struk@intel.com,
	smueller@chronox.de, linux-api@vger.kernel.org,
	marcel@holtmann.org, linux-kernel@vger.kernel.org,
	keyrings@vger.kernel.org, linux-crypto@vger.kernel.org,
	dwmw2@infradead.org, davem@davemloft.net
Subject: Re: [PATCH v5 6/6] crypto: AF_ALG - add support for key_id
Date: Sat, 16 Apr 2016 05:32:58 +0800	[thread overview]
Message-ID: <201604160521.QBqFNMI6%fengguang.wu@intel.com> (raw)
In-Reply-To: <20160415202317.29343.93424.stgit@tstruk-mobl1>

[-- Attachment #1: Type: text/plain, Size: 8075 bytes --]

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 #2: .config.gz --]
[-- Type: application/octet-stream, Size: 54442 bytes --]

  reply	other threads:[~2016-04-15 21:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 20:22 [PATCH v5 0/6] crypto: algif - add akcipher Tadeusz Struk
2016-04-15 20:22 ` [PATCH v5 1/6] crypto: AF_ALG -- add sign/verify API Tadeusz Struk
2016-04-15 20:22 ` [PATCH v5 2/6] crypto: AF_ALG -- add setpubkey setsockopt call Tadeusz Struk
2016-04-15 20:23 ` [PATCH v5 3/6] crypto: AF_ALG -- add asymmetric cipher interface Tadeusz Struk
2016-04-15 20:23 ` [PATCH v5 4/6] crypto: algif_akcipher - enable compilation Tadeusz Struk
2016-04-15 20:23 ` [PATCH v5 5/6] crypto: algif_akcipher - add ops_nokey Tadeusz Struk
2016-04-15 20:23 ` [PATCH v5 6/6] crypto: AF_ALG - add support for key_id Tadeusz Struk
2016-04-15 21:32   ` kbuild test robot [this message]
2016-04-15 21:32     ` Tadeusz Struk
2016-04-19 10:25       ` Philip Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201604160521.QBqFNMI6%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kbuild-all@01.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=smueller@chronox.de \
    --cc=tadeusz.struk@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®