[cryptodev:master 81/86] htmldocs: include/linux/crypto.h:614: warning: Function parameter or member 'stats.aead' not described in 'crypto_alg'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 88d905e20b11f7ad841e3afddaf1d59b6693c4a1 commit: 17c18f9e33282a170458cb5ea20759bfcb0da7d8 [81/86] crypto: user - Split stats in multiple structures reproduce: make htmldocs All warnings (new ones prefixed by >>): WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick (https://www.imagemagick.org) kernel/resource.c:337: warning: Function parameter or member 'start' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'end' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'flags' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'desc' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'first_lvl' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'res' not described in 'find_next_iomem_res' kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc' kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc' kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc' kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc' include/linux/rcutree.h:1: warning: no structured comments found kernel/rcu/tree.c:684: warning: Excess function parameter 'irq' description in 'rcu_nmi_exit' include/linux/srcu.h:175: warning: Function parameter or member 'p' not described in 'srcu_dereference_notrace' include/linux/srcu.h:175: warning: Function parameter or member 'sp' not described in 'srcu_dereference_notrace' include/linux/gfp.h:1: warning: no structured comments found >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.aead' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.akcipher' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.cipher' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.compress' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.hash' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.rng' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.kpp' not described in 'crypto_alg' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.ibss' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.connect' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.keys' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.ie' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.ie_len' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function
[cryptodev:master 97/126] ERROR: "crypto_fpu_exit" [arch/x86/crypto/aesni-intel.ko] undefined!
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: a1c6fd4308d37f072e939a2782f24214115fc7e8 commit: 944585a64f5e37d11ff274a905304b565a88e147 [97/126] crypto: x86/aes-ni - remove special handling of AES in PCBC mode config: x86_64-randconfig-s4-10171815 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout 944585a64f5e37d11ff274a905304b565a88e147 # save the attached .config to linux build tree make ARCH=x86_64 Note: the cryptodev/master HEAD a1c6fd4308d37f072e939a2782f24214115fc7e8 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): >> ERROR: "crypto_fpu_exit" [arch/x86/crypto/aesni-intel.ko] undefined! >> ERROR: "crypto_fpu_init" [arch/x86/crypto/aesni-intel.ko] undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[cryptodev:master 97/126] arch/x86/crypto/aesni-intel_glue.c:1505: undefined reference to `crypto_fpu_exit'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: a1c6fd4308d37f072e939a2782f24214115fc7e8 commit: 944585a64f5e37d11ff274a905304b565a88e147 [97/126] crypto: x86/aes-ni - remove special handling of AES in PCBC mode config: x86_64-randconfig-u0-10171827 (attached as .config) compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010 reproduce: git checkout 944585a64f5e37d11ff274a905304b565a88e147 # save the attached .config to linux build tree make ARCH=x86_64 Note: the cryptodev/master HEAD a1c6fd4308d37f072e939a2782f24214115fc7e8 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): arch/x86/crypto/aesni-intel_glue.o: In function `aesni_exit': >> arch/x86/crypto/aesni-intel_glue.c:1505: undefined reference to >> `crypto_fpu_exit' arch/x86/crypto/aesni-intel_glue.o: In function `aesni_init': >> arch/x86/crypto/aesni-intel_glue.c:1452: undefined reference to >> `crypto_fpu_init' arch/x86/crypto/aesni-intel_glue.c:1493: undefined reference to `crypto_fpu_exit' vim +1505 arch/x86/crypto/aesni-intel_glue.c 0bd82f5f6 Tadeusz Struk 2010-11-04 1451 fa46ccb8e Jussi Kivilinna 2012-05-11 @1452 err = crypto_fpu_init(); fa46ccb8e Jussi Kivilinna 2012-05-11 1453 if (err) 54b6a1bd5 Huang Ying 2009-01-18 1454 return err; 54b6a1bd5 Huang Ying 2009-01-18 1455 af05b3009 Herbert Xu 2015-05-28 1456 err = crypto_register_algs(aesni_algs, ARRAY_SIZE(aesni_algs)); af05b3009 Herbert Xu 2015-05-28 1457 if (err) af05b3009 Herbert Xu 2015-05-28 1458 goto fpu_exit; af05b3009 Herbert Xu 2015-05-28 1459 85671860c Herbert Xu 2016-11-22 1460 err = crypto_register_skciphers(aesni_skciphers, 85671860c Herbert Xu 2016-11-22 1461 ARRAY_SIZE(aesni_skciphers)); 85671860c Herbert Xu 2016-11-22 1462 if (err) 85671860c Herbert Xu 2016-11-22 1463 goto unregister_algs; 85671860c Herbert Xu 2016-11-22 1464 af05b3009 Herbert Xu 2015-05-28 1465 err = crypto_register_aeads(aesni_aead_algs, af05b3009 Herbert Xu 2015-05-28 1466 ARRAY_SIZE(aesni_aead_algs)); af05b3009 Herbert Xu 2015-05-28 1467 if (err) 85671860c Herbert Xu 2016-11-22 1468 goto unregister_skciphers; af05b3009 Herbert Xu 2015-05-28 1469 85671860c Herbert Xu 2016-11-22 1470 for (i = 0; i < ARRAY_SIZE(aesni_skciphers); i++) { 85671860c Herbert Xu 2016-11-22 1471 algname = aesni_skciphers[i].base.cra_name + 2; 85671860c Herbert Xu 2016-11-22 1472 drvname = aesni_skciphers[i].base.cra_driver_name + 2; 85671860c Herbert Xu 2016-11-22 1473 basename = aesni_skciphers[i].base.cra_driver_name; 85671860c Herbert Xu 2016-11-22 1474 simd = simd_skcipher_create_compat(algname, drvname, basename); 85671860c Herbert Xu 2016-11-22 1475 err = PTR_ERR(simd); 85671860c Herbert Xu 2016-11-22 1476 if (IS_ERR(simd)) 85671860c Herbert Xu 2016-11-22 1477 goto unregister_simds; 85671860c Herbert Xu 2016-11-22 1478 85671860c Herbert Xu 2016-11-22 1479 aesni_simd_skciphers[i] = simd; 85671860c Herbert Xu 2016-11-22 1480 } af05b3009 Herbert Xu 2015-05-28 1481 85671860c Herbert Xu 2016-11-22 1482 return 0; 85671860c Herbert Xu 2016-11-22 1483 85671860c Herbert Xu 2016-11-22 1484 unregister_simds: 85671860c Herbert Xu 2016-11-22 1485 aesni_free_simds(); 85671860c Herbert Xu 2016-11-22 1486 crypto_unregister_aeads(aesni_aead_algs, ARRAY_SIZE(aesni_aead_algs)); 85671860c Herbert Xu 2016-11-22 1487 unregister_skciphers: 85671860c Herbert Xu 2016-11-22 1488 crypto_unregister_skciphers(aesni_skciphers, 85671860c Herbert Xu 2016-11-22 1489 ARRAY_SIZE(aesni_skciphers)); af05b3009 Herbert Xu 2015-05-28 1490 unregister_algs: af05b3009 Herbert Xu 2015-05-28 1491 crypto_unregister_algs(aesni_algs, ARRAY_SIZE(aesni_algs)); af05b3009 Herbert Xu 2015-05-28 1492 fpu_exit: af05b3009 Herbert Xu 2015-05-28 1493 crypto_fpu_exit(); af05b3009 Herbert Xu 2015-05-28 1494 return err; 54b6a1bd5 Huang Ying 2009-01-18 1495 } 54b6a1bd5 Huang Ying 2009-01-18 1496 54b6a1bd5 Huang Ying 2009-01-18 1497 static void __exit aesni_exit(void) 54b6a1bd5 Huang Ying 2009-01-18 1498 { 85671860c Herbert Xu 2016-11-22 1499 aesni_free_simds(); af05b3009 Herbert Xu 2015-05-28 1500 crypto_unregister_aeads(aesni_aead_algs, ARRAY_SIZE(aesni_aead_algs)); 85671860c Herbert Xu 2016-11-22 1501 crypto_unregister_skciphers(aesni_skciphers, 85671860c Herbert Xu
[cryptodev:master 22/24] lib/crc-t10dif.c:23:1: sparse: symbol 'crc_t10dif_mutex' was not declared. Should it be static?
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: a1b22a5f45fe884147a99e7c381bcc48d9b2acef commit: b76377543b738a6b58b0a7b0a42dd9e16436fee1 [22/24] crc-t10dif: Pick better transform if one becomes available reproduce: # apt-get install sparse git checkout b76377543b738a6b58b0a7b0a42dd9e16436fee1 make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> lib/crc-t10dif.c:23:1: sparse: symbol 'crc_t10dif_mutex' was not declared. >> Should it be static? >> lib/crc-t10dif.c:93:23: sparse: incorrect type in assignment (different >> address spaces) @@expected struct crypto_shash [noderef] *static >> [addressable] [toplevel] crct10dif_tfm @@got ressable] [toplevel] >> crct10dif_tfm @@ lib/crc-t10dif.c:93:23:expected struct crypto_shash [noderef] *static [addressable] [toplevel] crct10dif_tfm lib/crc-t10dif.c:93:23:got struct crypto_shash * >> lib/crc-t10dif.c:104:27: sparse: incorrect type in argument 1 (different >> address spaces) @@expected struct crypto_shash *tfm @@got struct >> crypto_shash [noderef] *static [addressable] [struct crypto_shash >> *tfm @@ lib/crc-t10dif.c:104:27:expected struct crypto_shash *tfm lib/crc-t10dif.c:104:27:got struct crypto_shash [noderef] *static [addressable] [toplevel] [assigned] crct10dif_tfm Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[RFC PATCH cryptodev] crc-t10dif: crc_t10dif_mutex can be static
Fixes: b76377543b73 ("crc-t10dif: Pick better transform if one becomes available") Signed-off-by: kbuild test robot --- crc-t10dif.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crc-t10dif.c b/lib/crc-t10dif.c index 52f577a3..8e144c3 100644 --- a/lib/crc-t10dif.c +++ b/lib/crc-t10dif.c @@ -20,7 +20,7 @@ static struct crypto_shash __rcu *crct10dif_tfm; static struct static_key crct10dif_fallback __read_mostly; -DEFINE_MUTEX(crc_t10dif_mutex); +static DEFINE_MUTEX(crc_t10dif_mutex); static int crc_t10dif_rehash(struct notifier_block *self, unsigned long val, void *data) {
[RFC PATCH cryptodev] crypto: sec_send_request() can be static
Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver") Signed-off-by: kbuild test robot --- sec_algs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sec/sec_algs.c b/drivers/crypto/hisilicon/sec/sec_algs.c index d69d3ce..f7d6d69 100644 --- a/drivers/crypto/hisilicon/sec/sec_algs.c +++ b/drivers/crypto/hisilicon/sec/sec_algs.c @@ -393,7 +393,7 @@ static void sec_alg_free_el(struct sec_request_el *el, } /* queuelock must be held */ -int sec_send_request(struct sec_request *sec_req, struct sec_queue *queue) +static int sec_send_request(struct sec_request *sec_req, struct sec_queue *queue) { struct sec_request_el *el, *temp; int ret = 0;
[cryptodev:master 99/119] drivers/crypto/hisilicon/sec/sec_algs.c:396:5: sparse: symbol 'sec_send_request' was not declared. Should it be static?
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: a94bfd5f50ddf114594f5c7f99686f1cfa2b7a76 commit: 915e4e8413dacc086efcef4de04fdfdca57e8b1c [99/119] crypto: hisilicon - SEC security accelerator driver reproduce: # apt-get install sparse git checkout 915e4e8413dacc086efcef4de04fdfdca57e8b1c make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/crypto/hisilicon/sec/sec_algs.c:396:5: sparse: symbol >> 'sec_send_request' was not declared. Should it be static? include/linux/slab.h:631:13: sparse: undefined identifier '__builtin_mul_overflow' include/linux/slab.h:631:13: sparse: not a function include/linux/slab.h:631:13: sparse: not a function include/linux/slab.h:631:13: sparse: call with no type! Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[cryptodev:master 45/63] drivers/crypto/inside-secure/safexcel_cipher.c:475:2: warning: 'first_rdesc' may be used uninitialized in this function
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 5c324a2ffa06f8b6fda59a77c6807acb9f45cfee commit: 9744fec95f0674fbf67b12c42c3784dc299dc904 [45/63] crypto: inside-secure - remove request list to improve performance config: powerpc-allmodconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 9744fec95f0674fbf67b12c42c3784dc299dc904 # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=powerpc Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): drivers/crypto/inside-secure/safexcel_cipher.c: In function 'safexcel_send_req': >> drivers/crypto/inside-secure/safexcel_cipher.c:475:2: warning: 'first_rdesc' >> may be used uninitialized in this function [-Wmaybe-uninitialized] safexcel_rdr_req_set(priv, ring, first_rdesc, base); ^~~ vim +/first_rdesc +475 drivers/crypto/inside-secure/safexcel_cipher.c 373 374 static int safexcel_send_req(struct crypto_async_request *base, int ring, 375 struct safexcel_cipher_req *sreq, 376 struct scatterlist *src, struct scatterlist *dst, 377 unsigned int cryptlen, unsigned int assoclen, 378 unsigned int digestsize, u8 *iv, int *commands, 379 int *results) 380 { 381 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); 382 struct safexcel_crypto_priv *priv = ctx->priv; 383 struct safexcel_command_desc *cdesc; 384 struct safexcel_result_desc *rdesc, *first_rdesc; 385 struct scatterlist *sg; 386 unsigned int totlen = cryptlen + assoclen; 387 int nr_src, nr_dst, n_cdesc = 0, n_rdesc = 0, queued = totlen; 388 int i, ret = 0; 389 390 if (src == dst) { 391 nr_src = dma_map_sg(priv->dev, src, 392 sg_nents_for_len(src, totlen), 393 DMA_BIDIRECTIONAL); 394 nr_dst = nr_src; 395 if (!nr_src) 396 return -EINVAL; 397 } else { 398 nr_src = dma_map_sg(priv->dev, src, 399 sg_nents_for_len(src, totlen), 400 DMA_TO_DEVICE); 401 if (!nr_src) 402 return -EINVAL; 403 404 nr_dst = dma_map_sg(priv->dev, dst, 405 sg_nents_for_len(dst, totlen), 406 DMA_FROM_DEVICE); 407 if (!nr_dst) { 408 dma_unmap_sg(priv->dev, src, 409 sg_nents_for_len(src, totlen), 410 DMA_TO_DEVICE); 411 return -EINVAL; 412 } 413 } 414 415 memcpy(ctx->base.ctxr->data, ctx->key, ctx->key_len); 416 417 if (ctx->aead) { 418 memcpy(ctx->base.ctxr->data + ctx->key_len / sizeof(u32), 419 ctx->ipad, ctx->state_sz); 420 memcpy(ctx->base.ctxr->data + (ctx->key_len + ctx->state_sz) / sizeof(u32), 421 ctx->opad, ctx->state_sz); 422 } 423 424 /* command descriptors */ 425 for_each_sg(src, sg, nr_src, i) { 426 int len = sg_dma_len(sg); 427 428 /* Do not overflow the request */ 429 if (queued - len < 0) 430 len = queued; 431 432 cdesc = safexcel_add_cdesc(priv, ring, !n_cdesc, !(queued - len), 433 sg_dma_address(sg), len, totlen, 434 ctx->base.ctxr_dma); 435 if (IS_ERR(cdesc)) { 436 /* No space left in the command descriptor ring */ 437 ret = PTR_ERR(cdesc); 438 goto cdesc_rollback; 439 } 440 n_cdesc++; 441 442 if (n_cdesc == 1) { 443 safexcel_context_control(ctx, base, sreq, cdesc); 444 if (ctx->aead) 445
[cryptodev:master 9/15] drivers/crypto/inside-secure/safexcel_hash.c:1373:25: sparse: cast truncates bits from constant value (cbbb9d5dc1059ed8 becomes c1059ed8)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 38641b83ebc54635151810eeef00b61da3097952 commit: 9e46eafdf82a67dd069eef27c48898b79379c9f2 [9/15] crypto: inside-secure - sha384 support reproduce: # apt-get install sparse git checkout 9e46eafdf82a67dd069eef27c48898b79379c9f2 make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) include/linux/slab.h:631:13: sparse: undefined identifier '__builtin_mul_overflow' drivers/crypto/inside-secure/safexcel_hash.c:1009:45: sparse: cast to restricted __le32 drivers/crypto/inside-secure/safexcel_hash.c:1010:45: sparse: cast to restricted __le32 include/linux/slab.h:631:13: sparse: call with no type! drivers/crypto/inside-secure/safexcel_hash.c:1303:25: sparse: cast truncates bits from constant value (6a09e667f3bcc908 becomes f3bcc908) drivers/crypto/inside-secure/safexcel_hash.c:1305:25: sparse: cast truncates bits from constant value (bb67ae8584caa73b becomes 84caa73b) drivers/crypto/inside-secure/safexcel_hash.c:1307:25: sparse: cast truncates bits from constant value (3c6ef372fe94f82b becomes fe94f82b) drivers/crypto/inside-secure/safexcel_hash.c:1309:25: sparse: cast truncates bits from constant value (a54ff53a5f1d36f1 becomes 5f1d36f1) drivers/crypto/inside-secure/safexcel_hash.c:1311:25: sparse: cast truncates bits from constant value (510e527fade682d1 becomes ade682d1) drivers/crypto/inside-secure/safexcel_hash.c:1313:26: sparse: cast truncates bits from constant value (9b05688c2b3e6c1f becomes 2b3e6c1f) drivers/crypto/inside-secure/safexcel_hash.c:1315:26: sparse: cast truncates bits from constant value (1f83d9abfb41bd6b becomes fb41bd6b) drivers/crypto/inside-secure/safexcel_hash.c:1317:26: sparse: cast truncates bits from constant value (5be0cd19137e2179 becomes 137e2179) >> drivers/crypto/inside-secure/safexcel_hash.c:1373:25: sparse: cast truncates >> bits from constant value (cbbb9d5dc1059ed8 becomes c1059ed8) >> drivers/crypto/inside-secure/safexcel_hash.c:1375:25: sparse: cast truncates >> bits from constant value (629a292a367cd507 becomes 367cd507) >> drivers/crypto/inside-secure/safexcel_hash.c:1377:25: sparse: cast truncates >> bits from constant value (9159015a3070dd17 becomes 3070dd17) >> drivers/crypto/inside-secure/safexcel_hash.c:1379:25: sparse: cast truncates >> bits from constant value (152fecd8f70e5939 becomes f70e5939) >> drivers/crypto/inside-secure/safexcel_hash.c:1381:25: sparse: cast truncates >> bits from constant value (67332667ffc00b31 becomes ffc00b31) >> drivers/crypto/inside-secure/safexcel_hash.c:1383:26: sparse: cast truncates >> bits from constant value (8eb44a8768581511 becomes 68581511) >> drivers/crypto/inside-secure/safexcel_hash.c:1385:26: sparse: cast truncates >> bits from constant value (db0c2e0d64f98fa7 becomes 64f98fa7) >> drivers/crypto/inside-secure/safexcel_hash.c:1387:26: sparse: cast truncates >> bits from constant value (47b5481dbefa4fa4 becomes befa4fa4) vim +1373 drivers/crypto/inside-secure/safexcel_hash.c 1295 1296 static int safexcel_sha512_init(struct ahash_request *areq) 1297 { 1298 struct safexcel_ahash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(areq)); 1299 struct safexcel_ahash_req *req = ahash_request_ctx(areq); 1300 1301 memset(req, 0, sizeof(*req)); 1302 > 1303 req->state[0] = lower_32_bits(SHA512_H0); 1304 req->state[1] = upper_32_bits(SHA512_H0); > 1305 req->state[2] = lower_32_bits(SHA512_H1); 1306 req->state[3] = upper_32_bits(SHA512_H1); > 1307 req->state[4] = lower_32_bits(SHA512_H2); 1308 req->state[5] = upper_32_bits(SHA512_H2); > 1309 req->state[6] = lower_32_bits(SHA512_H3); 1310 req->state[7] = upper_32_bits(SHA512_H3); > 1311 req->state[8] = lower_32_bits(SHA512_H4); 1312 req->state[9] = upper_32_bits(SHA512_H4); > 1313 req->state[10] = lower_32_bits(SHA512_H5); 1314 req->state[11] = upper_32_bits(SHA512_H5); > 1315 req->state[12] = lower_32_bits(SHA512_H6); 1316 req->state[13] = upper_32_bits(SHA512_H6); 1317 req->state[14] = lower_32_bits(SHA512_H7); 1318 req->state[15] = upper_32_bits(SHA512_H7); 1319 1320 ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA512; 1321 req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; 1322 req->state_sz = SHA512_DIGEST_SIZE; 1323 1324 return 0; 1325 } 1326 1327 static int safexcel_sha512_digest(struct ahash_request *areq) 1328 { 1329 int ret = safexcel_sha512_init(areq); 1330 1331 if (ret) 1332 return ret; 1333 1334 return safexcel_ahash_finup(areq); 1335 } 1336 1337 struct safexcel_alg_template safexcel_alg_sha512 = { 1338
[cryptodev:master 5/15] drivers/crypto/inside-secure/safexcel_hash.c:1299:25: sparse: cast truncates bits from constant value (6a09e667f3bcc908 becomes f3bcc908)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 38641b83ebc54635151810eeef00b61da3097952 commit: b460edb6230ac2877b0d176b9122736fed6f3c6e [5/15] crypto: inside-secure - sha512 support reproduce: # apt-get install sparse git checkout b460edb6230ac2877b0d176b9122736fed6f3c6e make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) include/linux/slab.h:631:13: sparse: undefined identifier '__builtin_mul_overflow' drivers/crypto/inside-secure/safexcel_hash.c:1005:45: sparse: cast to restricted __le32 drivers/crypto/inside-secure/safexcel_hash.c:1006:45: sparse: cast to restricted __le32 include/linux/slab.h:631:13: sparse: call with no type! >> drivers/crypto/inside-secure/safexcel_hash.c:1299:25: sparse: cast truncates >> bits from constant value (6a09e667f3bcc908 becomes f3bcc908) >> drivers/crypto/inside-secure/safexcel_hash.c:1301:25: sparse: cast truncates >> bits from constant value (bb67ae8584caa73b becomes 84caa73b) >> drivers/crypto/inside-secure/safexcel_hash.c:1303:25: sparse: cast truncates >> bits from constant value (3c6ef372fe94f82b becomes fe94f82b) >> drivers/crypto/inside-secure/safexcel_hash.c:1305:25: sparse: cast truncates >> bits from constant value (a54ff53a5f1d36f1 becomes 5f1d36f1) >> drivers/crypto/inside-secure/safexcel_hash.c:1307:25: sparse: cast truncates >> bits from constant value (510e527fade682d1 becomes ade682d1) >> drivers/crypto/inside-secure/safexcel_hash.c:1309:26: sparse: cast truncates >> bits from constant value (9b05688c2b3e6c1f becomes 2b3e6c1f) >> drivers/crypto/inside-secure/safexcel_hash.c:1311:26: sparse: cast truncates >> bits from constant value (1f83d9abfb41bd6b becomes fb41bd6b) >> drivers/crypto/inside-secure/safexcel_hash.c:1313:26: sparse: cast truncates >> bits from constant value (5be0cd19137e2179 becomes 137e2179) vim +1299 drivers/crypto/inside-secure/safexcel_hash.c 1291 1292 static int safexcel_sha512_init(struct ahash_request *areq) 1293 { 1294 struct safexcel_ahash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(areq)); 1295 struct safexcel_ahash_req *req = ahash_request_ctx(areq); 1296 1297 memset(req, 0, sizeof(*req)); 1298 > 1299 req->state[0] = lower_32_bits(SHA512_H0); 1300 req->state[1] = upper_32_bits(SHA512_H0); > 1301 req->state[2] = lower_32_bits(SHA512_H1); 1302 req->state[3] = upper_32_bits(SHA512_H1); > 1303 req->state[4] = lower_32_bits(SHA512_H2); 1304 req->state[5] = upper_32_bits(SHA512_H2); > 1305 req->state[6] = lower_32_bits(SHA512_H3); 1306 req->state[7] = upper_32_bits(SHA512_H3); > 1307 req->state[8] = lower_32_bits(SHA512_H4); 1308 req->state[9] = upper_32_bits(SHA512_H4); > 1309 req->state[10] = lower_32_bits(SHA512_H5); 1310 req->state[11] = upper_32_bits(SHA512_H5); > 1311 req->state[12] = lower_32_bits(SHA512_H6); 1312 req->state[13] = upper_32_bits(SHA512_H6); > 1313 req->state[14] = lower_32_bits(SHA512_H7); 1314 req->state[15] = upper_32_bits(SHA512_H7); 1315 1316 ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA512; 1317 req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; 1318 req->state_sz = SHA512_DIGEST_SIZE; 1319 1320 return 0; 1321 } 1322 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[cryptodev:master 68/69] crypto/morus640_glue.c:147:2: error: too few arguments to function 'kernel_fpu_begin'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 6ecc9d9ff91ff26769e58164b6216c6189cb8302 commit: 56e8e57fc3a707bf4f23f88c4822e6cbc9a950dc [68/69] crypto: morus - Add common SIMD glue code for MORUS config: s390-allmodconfig (attached as .config) compiler: s390x-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 56e8e57fc3a707bf4f23f88c4822e6cbc9a950dc # save the attached .config to linux build tree make.cross ARCH=s390 All errors (new ones prefixed by >>): crypto/morus640_glue.c: In function 'crypto_morus640_glue_crypt': >> crypto/morus640_glue.c:147:2: error: too few arguments to function >> 'kernel_fpu_begin' kernel_fpu_begin(); ^~~~ In file included from crypto/morus640_glue.c:24:0: arch/s390/include/asm/fpu/api.h:94:20: note: declared here static inline void kernel_fpu_begin(struct kernel_fpu *state, u32 flags) ^~~~ >> crypto/morus640_glue.c:154:2: error: too few arguments to function >> 'kernel_fpu_end' kernel_fpu_end(); ^~ In file included from crypto/morus640_glue.c:24:0: arch/s390/include/asm/fpu/api.h:107:20: note: declared here static inline void kernel_fpu_end(struct kernel_fpu *state, u32 flags) ^~ crypto/morus640_glue.c: In function 'cryptd_morus640_glue_encrypt': >> crypto/morus640_glue.c:239:6: error: implicit declaration of function >> 'irq_fpu_usable'; did you mean '__cpu_disable'? >> [-Werror=implicit-function-declaration] if (irq_fpu_usable() && (!in_atomic() || ^~ __cpu_disable cc1: some warnings being treated as errors -- crypto/morus1280_glue.c: In function 'crypto_morus1280_glue_crypt': >> crypto/morus1280_glue.c:151:2: error: too few arguments to function >> 'kernel_fpu_begin' kernel_fpu_begin(); ^~~~ In file included from crypto/morus1280_glue.c:24:0: arch/s390/include/asm/fpu/api.h:94:20: note: declared here static inline void kernel_fpu_begin(struct kernel_fpu *state, u32 flags) ^~~~ >> crypto/morus1280_glue.c:158:2: error: too few arguments to function >> 'kernel_fpu_end' kernel_fpu_end(); ^~ In file included from crypto/morus1280_glue.c:24:0: arch/s390/include/asm/fpu/api.h:107:20: note: declared here static inline void kernel_fpu_end(struct kernel_fpu *state, u32 flags) ^~ crypto/morus1280_glue.c: In function 'cryptd_morus1280_glue_encrypt': >> crypto/morus1280_glue.c:243:6: error: implicit declaration of function >> 'irq_fpu_usable'; did you mean '__cpu_disable'? >> [-Werror=implicit-function-declaration] if (irq_fpu_usable() && (!in_atomic() || ^~ __cpu_disable cc1: some warnings being treated as errors vim +/kernel_fpu_begin +147 crypto/morus640_glue.c 137 138 static void crypto_morus640_glue_crypt(struct aead_request *req, 139 struct morus640_ops ops, 140 unsigned int cryptlen, 141 struct morus640_block *tag_xor) 142 { 143 struct crypto_aead *tfm = crypto_aead_reqtfm(req); 144 struct morus640_ctx *ctx = crypto_aead_ctx(tfm); 145 struct morus640_state state; 146 > 147 kernel_fpu_begin(); 148 149 ctx->ops->init(, >key, req->iv); 150 crypto_morus640_glue_process_ad(, ctx->ops, req->src, req->assoclen); 151 crypto_morus640_glue_process_crypt(, ops, req); 152 ctx->ops->final(, tag_xor, req->assoclen, cryptlen); 153 > 154 kernel_fpu_end(); 155 } 156 157 int crypto_morus640_glue_encrypt(struct aead_request *req) 158 { 159 struct crypto_aead *tfm = crypto_aead_reqtfm(req); 160 struct morus640_ctx *ctx = crypto_aead_ctx(tfm); 161 struct morus640_ops OPS = { 162 .skcipher_walk_init = skcipher_walk_aead_encrypt, 163 .crypt_blocks = ctx->ops->enc, 164 .crypt_tail = ctx->ops->enc_tail, 165 }; 166 167 struct morus640_block tag = {}; 168 unsigned int authsize = crypto_aead_authsize(tfm); 169 unsigned int cryptlen = req->cryptlen; 170 171 crypto_morus640_glue_crypt(req, OPS, cryptlen, ); 172 173 scatterwalk_map_and_copy(tag.bytes, req->dst, 174 req->assoclen + cryptlen, authsize, 1); 175 return 0; 176 } 177 EXPORT_SYMBOL_GPL(crypto_morus640_glue_encrypt); 178 179 int
Re: [PATCH 2/5] crypto: chtls: wait for memory sendmsg, sendpage
Hi Atul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on cryptodev/master] [also build test WARNING on v4.17-rc5 next-20180514] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/build-warnings-cleanup/20180514-213306 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: i386-randconfig-x009-201819 (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): drivers/crypto/chelsio/chtls/chtls_io.c: In function 'csk_wait_memory': >> drivers/crypto/chelsio/chtls/chtls_io.c:946:4: warning: this 'if' clause >> does not guard... [-Wmisleading-indentation] if (noblock) ^~ drivers/crypto/chelsio/chtls/chtls_io.c:948:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' goto do_nonblock; ^~~~ vim +/if +946 drivers/crypto/chelsio/chtls/chtls_io.c 921 922 static int csk_wait_memory(struct chtls_dev *cdev, 923 struct sock *sk, long *timeo_p) 924 { 925 DEFINE_WAIT_FUNC(wait, woken_wake_function); 926 int sndbuf, err = 0; 927 long current_timeo; 928 long vm_wait = 0; 929 bool noblock; 930 931 current_timeo = *timeo_p; 932 noblock = (*timeo_p ? false : true); 933 sndbuf = cdev->max_host_sndbuf; 934 if (sndbuf > sk->sk_wmem_queued) { 935 current_timeo = (prandom_u32() % (HZ / 5)) + 2; 936 vm_wait = (prandom_u32() % (HZ / 5)) + 2; 937 } 938 939 add_wait_queue(sk_sleep(sk), ); 940 while (1) { 941 sk_set_bit(SOCKWQ_ASYNC_NOSPACE, sk); 942 943 if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN)) 944 goto do_error; 945 if (!*timeo_p) { > 946 if (noblock) 947 set_bit(SOCK_NOSPACE, >sk_socket->flags); 948 goto do_nonblock; 949 } 950 if (signal_pending(current)) 951 goto do_interrupted; 952 sk_clear_bit(SOCKWQ_ASYNC_NOSPACE, sk); 953 if (sndbuf > sk->sk_wmem_queued && !vm_wait) 954 break; 955 956 set_bit(SOCK_NOSPACE, >sk_socket->flags); 957 sk->sk_write_pending++; 958 sk_wait_event(sk, _timeo, sk->sk_err || 959(sk->sk_shutdown & SEND_SHUTDOWN) || 960(sndbuf > sk->sk_wmem_queued && !vm_wait), ); 961 sk->sk_write_pending--; 962 963 if (vm_wait) { 964 vm_wait -= current_timeo; 965 current_timeo = *timeo_p; 966 if (current_timeo != MAX_SCHEDULE_TIMEOUT) { 967 current_timeo -= vm_wait; 968 if (current_timeo < 0) 969 current_timeo = 0; 970 } 971 vm_wait = 0; 972 } 973 *timeo_p = current_timeo; 974 } 975 out: 976 remove_wait_queue(sk_sleep(sk), ); 977 return err; 978 do_error: 979 err = -EPIPE; 980 goto out; 981 do_nonblock: 982 err = -EAGAIN; 983 goto out; 984 do_interrupted: 985 err = sock_intr_errno(*timeo_p); 986 goto out; 987 } 988 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH] async_pq: Remove VLA usage
Hi Kyle, Thank you for the patch! Yet something to improve: [auto build test ERROR on cryptodev/master] [also build test ERROR on v4.17-rc3 next-20180504] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Kyle-Spiers/async_pq-Remove-VLA-usage/20180505-012638 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: sparc64-allmodconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sparc64 All error/warnings (new ones prefixed by >>): crypto/async_tx/raid6test.c: In function 'raid6_dual_recov': >> crypto/async_tx/raid6test.c:89:13: error: implicit declaration of function >> 'kmalloc_array'; did you mean 'kvmalloc_array'? >> [-Werror=implicit-function-declaration] blocks = kmalloc_array(disks, sizeof(*blocks), ^ kvmalloc_array >> crypto/async_tx/raid6test.c:89:11: warning: assignment makes pointer from >> integer without a cast [-Wint-conversion] blocks = kmalloc_array(disks, sizeof(*blocks), ^ >> crypto/async_tx/raid6test.c:109:4: error: implicit declaration of function >> 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] kfree(blocks); ^ kvfree cc1: some warnings being treated as errors vim +89 crypto/async_tx/raid6test.c 66 67 /* Recover two failed blocks. */ 68 static void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, struct page **ptrs) 69 { 70 struct async_submit_ctl submit; 71 struct completion cmp; 72 struct dma_async_tx_descriptor *tx = NULL; 73 enum sum_check_flags result = ~0; 74 75 if (faila > failb) 76 swap(faila, failb); 77 78 if (failb == disks-1) { 79 if (faila == disks-2) { 80 /* P+Q failure. Just rebuild the syndrome. */ 81 init_async_submit(, 0, NULL, NULL, NULL, addr_conv); 82 tx = async_gen_syndrome(ptrs, 0, disks, bytes, ); 83 } else { 84 struct page **blocks; 85 struct page *dest; 86 int count = 0; 87 int i; 88 > 89 blocks = kmalloc_array(disks, sizeof(*blocks), 90 GFP_KERNEL); 91 if (!blocks) 92 return; 93 94 /* data+Q failure. Reconstruct data from P, 95 * then rebuild syndrome 96 */ 97 for (i = disks; i-- ; ) { 98 if (i == faila || i == failb) 99 continue; 100 blocks[count++] = ptrs[i]; 101 } 102 dest = ptrs[faila]; 103 init_async_submit(, ASYNC_TX_XOR_ZERO_DST, NULL, 104NULL, NULL, addr_conv); 105 tx = async_xor(dest, blocks, 0, count, bytes, ); 106 107 init_async_submit(, 0, tx, NULL, NULL, addr_conv); 108 tx = async_gen_syndrome(ptrs, 0, disks, bytes, ); > 109 kfree(blocks); 110 } 111 } else { 112 if (failb == disks-2) { 113 /* data+P failure. */ 114 init_async_submit(, 0, NULL, NULL, NULL, addr_conv); 115 tx = async_raid6_datap_recov(disks, bytes, faila, ptrs, ); 116 } else { 117 /* data+data failure. */ 118 init_async_submit(, 0, NULL, NULL, NULL, addr_conv); 119 tx = async_raid6_2data_recov(disks, bytes, faila, failb, ptrs, ); 120 } 121 } 122 init_completion(); 123 init_async_submit(, ASYNC_TX_ACK, tx, callback, , addr_conv); 124 tx = async_syndrome_val(ptrs, 0, disks, bytes, , spare, ); 125 async_tx_issue_pending(tx); 126 127 if (wait_for_completion_timeout(, msecs_to_jiffies(3000)) == 0) 128 pr("%s: timeout! (faila: %d failb: %d disks: %d)\n", 129
Re: [PATCH 2/5 v4] crypto: add zBeWalgo to crypto-api
Hi Benjamin, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc6] [cannot apply to next-20180322] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Benjamin-Warnke/add-compression-algorithm-zBeWalgo/20180323-155925 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> lib/zbewalgo/zbewalgo.c:70:12: sparse: symbol 'zbewalgo_stat_combination' >> was not declared. Should it be static? >> lib/zbewalgo/zbewalgo.c:71:12: sparse: symbol 'zbewalgo_stat_count' was not >> declared. Should it be static? >> lib/zbewalgo/zbewalgo.c:79:9: sparse: symbol 'zbewalgo_combinations' was not >> declared. Should it be static? >> lib/zbewalgo/zbewalgo.c:80:4: sparse: symbol 'zbewalgo_combinations_count' >> was not declared. Should it be static? >> lib/zbewalgo/zbewalgo.c:92:5: sparse: symbol 'zbewalgo_early_abort_size' was >> not declared. Should it be static? >> lib/zbewalgo/zbewalgo.c:97:36: sparse: symbol 'zbewalgo_main_data_ptr' was >> not declared. Should it be static? >> lib/zbewalgo/zbewalgo.c:103:9: sparse: symbol 'zbewalgo_base_algorithms' was >> not declared. Should it be static? >> lib/zbewalgo/zbewalgo.c:104:4: sparse: symbol >> 'zbewalgo_base_algorithms_count' was not declared. Should it be static? -- >> lib/zbewalgo/JBE2.c:46:44: sparse: constant 0xF0F0F0F00F0F0F0F is so big it >> is unsigned long >> lib/zbewalgo/JBE2.c:47:42: sparse: constant 0x0F0F0F0F is so big it >> is long lib/zbewalgo/JBE2.c:127:40: sparse: constant 0xF0F0F0F00F0F0F0F is so big it is unsigned long lib/zbewalgo/JBE2.c:128:40: sparse: constant 0x0F0F0F0F is so big it is long lib/zbewalgo/JBE2.c:184:40: sparse: constant 0xF0F0F0F00F0F0F0F is so big it is unsigned long lib/zbewalgo/JBE2.c:185:40: sparse: constant 0x0F0F0F0F is so big it is long Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[RFC PATCH] crypto: zbewalgo_stat_combination[] can be static
Fixes: 7ba8785b6091 ("crypto: add zBeWalgo to crypto-api") Signed-off-by: Fengguang Wu--- zbewalgo.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/zbewalgo/zbewalgo.c b/lib/zbewalgo/zbewalgo.c index ef922bc2..323dce4 100644 --- a/lib/zbewalgo/zbewalgo.c +++ b/lib/zbewalgo/zbewalgo.c @@ -67,8 +67,8 @@ #include "bitshuffle.h" #include "huffman.h" -atomic64_t zbewalgo_stat_combination[256]; -atomic64_t zbewalgo_stat_count[256]; +static atomic64_t zbewalgo_stat_combination[256]; +static atomic64_t zbewalgo_stat_count[256]; unsigned long zbewalgo_max_output_size; @@ -76,8 +76,8 @@ unsigned long zbewalgo_max_output_size; * all currently available combination sequences of algorithms */ struct zbewalgo_combination - zbewalgo_combinations[ZBEWALGO_COMBINATION_MAX_ACTIVE]; -u8 zbewalgo_combinations_count; +static zbewalgo_combinations[ZBEWALGO_COMBINATION_MAX_ACTIVE]; +static u8 zbewalgo_combinations_count; /* * maximum required wrkmem for compression and decompression for each instance @@ -89,19 +89,19 @@ static u32 zbewalgo_wrkmem_size; * compression can be aborted if the data is smaller than this threshold to * speed up the algorithm. */ -u16 zbewalgo_early_abort_size; +static u16 zbewalgo_early_abort_size; /* * each cpu has its own independent compression history to avoid locks */ -struct zbewalgo_main_data __percpu *zbewalgo_main_data_ptr; +static struct zbewalgo_main_data __percpu *zbewalgo_main_data_ptr; /* * all available algorithms */ struct zbewalgo_alg - zbewalgo_base_algorithms[ZBEWALGO_MAX_BASE_ALGORITHMS]; -u8 zbewalgo_base_algorithms_count; +static zbewalgo_base_algorithms[ZBEWALGO_MAX_BASE_ALGORITHMS]; +static u8 zbewalgo_base_algorithms_count; /* * returns the required size of wrkmem for compression and decompression
Re: [PATCH 1/1] lz4: Implement lz4 with dynamic offset length.
Hi Maninder, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc6] [cannot apply to next-20180322] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Maninder-Singh/cover-letter-lz4-Implement-lz4-with-dynamic-offset-length/20180323-064137 config: i386-randconfig-s1-03221113 (attached as .config) compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): fs/squashfs/lz4_wrapper.c: In function 'lz4_uncompress': >> fs/squashfs/lz4_wrapper.c:110:8: error: too few arguments to function >> 'LZ4_decompress_safe' res = LZ4_decompress_safe(stream->input, stream->output, ^~~ In file included from fs/squashfs/lz4_wrapper.c:13:0: include/linux/lz4.h:301:5: note: declared here int LZ4_decompress_safe(const char *source, char *dest, int compressedSize, ^~~ vim +/LZ4_decompress_safe +110 fs/squashfs/lz4_wrapper.c 9c06a46f Phillip Lougher2014-11-27 91 9c06a46f Phillip Lougher2014-11-27 92 9c06a46f Phillip Lougher2014-11-27 93 static int lz4_uncompress(struct squashfs_sb_info *msblk, void *strm, 9c06a46f Phillip Lougher2014-11-27 94 struct buffer_head **bh, int b, int offset, int length, 9c06a46f Phillip Lougher2014-11-27 95 struct squashfs_page_actor *output) 9c06a46f Phillip Lougher2014-11-27 96 { 9c06a46f Phillip Lougher2014-11-27 97 struct squashfs_lz4 *stream = strm; 9c06a46f Phillip Lougher2014-11-27 98 void *buff = stream->input, *data; 9c06a46f Phillip Lougher2014-11-27 99 int avail, i, bytes = length, res; 9c06a46f Phillip Lougher2014-11-27 100 9c06a46f Phillip Lougher2014-11-27 101 for (i = 0; i < b; i++) { 9c06a46f Phillip Lougher2014-11-27 102 avail = min(bytes, msblk->devblksize - offset); 9c06a46f Phillip Lougher2014-11-27 103 memcpy(buff, bh[i]->b_data + offset, avail); 9c06a46f Phillip Lougher2014-11-27 104 buff += avail; 9c06a46f Phillip Lougher2014-11-27 105 bytes -= avail; 9c06a46f Phillip Lougher2014-11-27 106 offset = 0; 9c06a46f Phillip Lougher2014-11-27 107 put_bh(bh[i]); 9c06a46f Phillip Lougher2014-11-27 108 } 9c06a46f Phillip Lougher2014-11-27 109 d21b5ff1 Sven Schmidt 2017-02-24 @110 res = LZ4_decompress_safe(stream->input, stream->output, d21b5ff1 Sven Schmidt 2017-02-24 111 length, output->length); d21b5ff1 Sven Schmidt 2017-02-24 112 d21b5ff1 Sven Schmidt 2017-02-24 113 if (res < 0) 9c06a46f Phillip Lougher2014-11-27 114 return -EIO; 9c06a46f Phillip Lougher2014-11-27 115 d21b5ff1 Sven Schmidt 2017-02-24 116 bytes = res; 9c06a46f Phillip Lougher2014-11-27 117 data = squashfs_first_page(output); 9c06a46f Phillip Lougher2014-11-27 118 buff = stream->output; 9c06a46f Phillip Lougher2014-11-27 119 while (data) { 09cbfeaf Kirill A. Shutemov 2016-04-01 120 if (bytes <= PAGE_SIZE) { 9c06a46f Phillip Lougher2014-11-27 121 memcpy(data, buff, bytes); 9c06a46f Phillip Lougher2014-11-27 122 break; 9c06a46f Phillip Lougher2014-11-27 123 } 09cbfeaf Kirill A. Shutemov 2016-04-01 124 memcpy(data, buff, PAGE_SIZE); 09cbfeaf Kirill A. Shutemov 2016-04-01 125 buff += PAGE_SIZE; 09cbfeaf Kirill A. Shutemov 2016-04-01 126 bytes -= PAGE_SIZE; 9c06a46f Phillip Lougher2014-11-27 127 data = squashfs_next_page(output); 9c06a46f Phillip Lougher2014-11-27 128 } 9c06a46f Phillip Lougher2014-11-27 129 squashfs_finish_page(output); 9c06a46f Phillip Lougher2014-11-27 130 d21b5ff1 Sven Schmidt 2017-02-24 131 return res; 9c06a46f Phillip Lougher2014-11-27 132 } 9c06a46f Phillip Lougher2014-11-27 133 :: The code at line 110 was first introduced by commit :: d21b5ff12df45a65bb220c7e8103a5f0f5609377 fs/pstore: fs/squashfs: change usage of LZ4 to work with new LZ4 version :: TO: Sven Schmidt <4ssch...@informatik.uni-hamburg.de> :: CC: Linus Torvalds--- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH 1/1] lz4: Implement lz4 with dynamic offset length.
Hi Maninder, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc6] [cannot apply to next-20180322] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Maninder-Singh/cover-letter-lz4-Implement-lz4-with-dynamic-offset-length/20180323-064137 config: i386-randconfig-x073-201811 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): fs/pstore/platform.c: In function 'decompress_lz4': >> fs/pstore/platform.c:357:8: error: too few arguments to function >> 'LZ4_decompress_safe' ret = LZ4_decompress_safe(in, out, inlen, outlen); ^~~ In file included from fs/pstore/platform.c:38:0: include/linux/lz4.h:301:5: note: declared here int LZ4_decompress_safe(const char *source, char *dest, int compressedSize, ^~~ vim +/LZ4_decompress_safe +357 fs/pstore/platform.c 8cfc8ddc Geliang Tang 2016-02-18 352 8cfc8ddc Geliang Tang 2016-02-18 353 static int decompress_lz4(void *in, void *out, size_t inlen, size_t outlen) 8cfc8ddc Geliang Tang 2016-02-18 354 { 8cfc8ddc Geliang Tang 2016-02-18 355 int ret; 8cfc8ddc Geliang Tang 2016-02-18 356 d21b5ff1 Sven Schmidt 2017-02-24 @357 ret = LZ4_decompress_safe(in, out, inlen, outlen); d21b5ff1 Sven Schmidt 2017-02-24 358 if (ret < 0) { d21b5ff1 Sven Schmidt 2017-02-24 359 /* d21b5ff1 Sven Schmidt 2017-02-24 360* LZ4_decompress_safe will return an error code d21b5ff1 Sven Schmidt 2017-02-24 361* (< 0) if decompression failed d21b5ff1 Sven Schmidt 2017-02-24 362*/ d21b5ff1 Sven Schmidt 2017-02-24 363 pr_err("LZ4_decompress_safe error, ret = %d!\n", ret); 8cfc8ddc Geliang Tang 2016-02-18 364 return -EIO; 8cfc8ddc Geliang Tang 2016-02-18 365 } 8cfc8ddc Geliang Tang 2016-02-18 366 d21b5ff1 Sven Schmidt 2017-02-24 367 return ret; 8cfc8ddc Geliang Tang 2016-02-18 368 } 8cfc8ddc Geliang Tang 2016-02-18 369 :: The code at line 357 was first introduced by commit :: d21b5ff12df45a65bb220c7e8103a5f0f5609377 fs/pstore: fs/squashfs: change usage of LZ4 to work with new LZ4 version :: TO: Sven Schmidt <4ssch...@informatik.uni-hamburg.de> :: CC: Linus Torvalds--- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v12 net-next 12/12] crypto: chtls - Makefile Kconfig
Hi Atul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20180309] [also build test WARNING on v4.16-rc6] [cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/Chelsio-Inline-TLS/20180320-101600 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) drivers/crypto/chelsio/chtls/chtls_main.c:319:14: sparse: undefined identifier 'CXGB4_STATE_FATAL_ERROR' >> drivers/crypto/chelsio/chtls/chtls_main.c:319:14: sparse: incompatible types >> for 'case' statement drivers/crypto/chelsio/chtls/chtls_main.c:319:14: sparse: Expected constant expression in case statement drivers/crypto/chelsio/chtls/chtls_main.c: In function 'chtls_uld_state_change': drivers/crypto/chelsio/chtls/chtls_main.c:319:7: error: 'CXGB4_STATE_FATAL_ERROR' undeclared (first use in this function); did you mean 'CXGB4_STATE_DETACH'? case CXGB4_STATE_FATAL_ERROR: ^~~ CXGB4_STATE_DETACH drivers/crypto/chelsio/chtls/chtls_main.c:319:7: note: each undeclared identifier is reported only once for each function it appears in -- >> drivers/crypto/chelsio/chtls/chtls_cm.c:1555:40: sparse: cast to restricted >> __be16 >> drivers/crypto/chelsio/chtls/chtls_cm.c:1555:40: sparse: cast to restricted >> __be16 >> drivers/crypto/chelsio/chtls/chtls_cm.c:1555:40: sparse: cast to restricted >> __be16 >> drivers/crypto/chelsio/chtls/chtls_cm.c:1555:40: sparse: cast to restricted >> __be16 drivers/crypto/chelsio/chtls/chtls_cm.c:1556:31: sparse: cast to restricted __be16 drivers/crypto/chelsio/chtls/chtls_cm.c:1556:31: sparse: cast to restricted __be16 drivers/crypto/chelsio/chtls/chtls_cm.c:1556:31: sparse: cast to restricted __be16 drivers/crypto/chelsio/chtls/chtls_cm.c:1556:31: sparse: cast to restricted __be16 >> drivers/crypto/chelsio/chtls/chtls_cm.c:1980:29: sparse: incorrect type in >> initializer (different base types) @@expected restricted __be32 >> [usertype] credits @@got unsignerestricted __be32 [usertype] credits @@ drivers/crypto/chelsio/chtls/chtls_cm.c:1980:29:expected restricted __be32 [usertype] credits drivers/crypto/chelsio/chtls/chtls_cm.c:1980:29:got unsigned char [unsigned] [usertype] credits >> drivers/crypto/chelsio/chtls/chtls_cm.c:1982:25: sparse: invalid assignment: >> += drivers/crypto/chelsio/chtls/chtls_cm.c:1982:25:left side has type unsigned int drivers/crypto/chelsio/chtls/chtls_cm.c:1982:25:right side has type restricted __be32 drivers/crypto/chelsio/chtls/chtls_cm.c:1992:49: sparse: invalid assignment: -= drivers/crypto/chelsio/chtls/chtls_cm.c:1992:49:left side has type unsigned int drivers/crypto/chelsio/chtls/chtls_cm.c:1992:49:right side has type restricted __be32 >> drivers/crypto/chelsio/chtls/chtls_cm.c:1995:21: sparse: restricted __be32 >> degrades to integer >> drivers/crypto/chelsio/chtls/chtls_cm.c:1995:21: sparse: restricted __wsum >> degrades to integer >> drivers/crypto/chelsio/chtls/chtls_cm.c:1996:36: sparse: bad assignment (-=) >> to restricted __wsum >> drivers/crypto/chelsio/chtls/chtls_cm.c:2000:25: sparse: bad assignment (-=) >> to restricted __be32 >> drivers/crypto/chelsio/chtls/chtls_cm.c:1048:9: sparse: context imbalance in >> 'chtls_recv_sock' - unexpected unlock -- >> drivers/crypto/chelsio/chtls/chtls_io.c:919:16: sparse: incorrect type in >> return expression (different base types) @@expected unsigned short @@ >> got restricted __beunsigned short @@ drivers/crypto/chelsio/chtls/chtls_io.c:919:16:expected unsigned short drivers/crypto/chelsio/chtls/chtls_io.c:919:16:got restricted __be16 [usertype] vim +/case +319 drivers/crypto/chelsio/chtls/chtls_main.c 29f9f684 Atul Gupta 2018-03-19 307 29f9f684 Atul Gupta 2018-03-19 308 static int chtls_uld_state_change(void *handle, enum cxgb4_state new_state) 29f9f684 Atul Gupta 2018-03-19 309 { 29f9f684 Atul Gupta 2018-03-19 310 struct chtls_dev *cdev = handle; 29f9f684 Atul Gupta 2018-03-19 311 29f9f684 Atul Gupta 2018-03-19 312 switch (new_state) { 29f9f684 Atul Gupta 2018-03-19 313 case CXGB4_STATE_UP: 29f9f684 Atul Gupta 2018-03-19 314 chtls_register_dev(cdev); 29f9f684 Atul Gupta 2018-03-19 315 break; 29f9f684 Atul Gupta 2018-03-19 316 case CXGB4_STATE_DOWN: 29f9f684 Atul Gupta 2018-03-19 317 break; 29f9f684 Atul Gupta 2018-03-19 318 case CXGB4_STATE_START_RECOVERY: 29f9f684 Atul Gupta 2018-03-19 @319 case CXGB4_STATE_FATAL_ERROR: 29f9f684 Atul Gupta 2018-03-19 320 break; 29f9f684 Atul Gupta 2018-03-19 321 case CXGB4_STATE_DETACH: 29f9f684 Atul Gupta 2018-03-19 322
[RFC PATCH] tls: create_ctx() can be static
Fixes: cf0c1a4821ae ("tls: support for Inline tls record") Signed-off-by: Fengguang Wu--- tls_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 608e6cd..42439fb 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -456,7 +456,7 @@ static int tls_setsockopt(struct sock *sk, int level, int optname, return do_tls_setsockopt(sk, optname, optval, optlen); } -struct tls_context *create_ctx(struct sock *sk) +static struct tls_context *create_ctx(struct sock *sk) { struct inet_connection_sock *icsk = inet_csk(sk); struct tls_context *ctx;
Re: [PATCH v12 net-next 01/12] tls: support for Inline tls record
Hi Atul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20180309] [also build test WARNING on v4.16-rc6] [cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/Chelsio-Inline-TLS/20180320-101600 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> net/tls/tls_main.c:459:20: sparse: symbol 'create_ctx' was not declared. >> Should it be static? Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH v12 net-next 12/12] crypto: chtls - Makefile Kconfig
Hi Atul, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20180309] [also build test ERROR on v4.16-rc6] [cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/Chelsio-Inline-TLS/20180320-101600 config: mips-allmodconfig (attached as .config) compiler: mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=mips All errors (new ones prefixed by >>): drivers/crypto/chelsio/chtls/chtls_main.c: In function 'chtls_uld_state_change': >> drivers/crypto/chelsio/chtls/chtls_main.c:319:7: error: >> 'CXGB4_STATE_FATAL_ERROR' undeclared (first use in this function); did you >> mean 'CXGB4_STATE_DETACH'? case CXGB4_STATE_FATAL_ERROR: ^~~ CXGB4_STATE_DETACH drivers/crypto/chelsio/chtls/chtls_main.c:319:7: note: each undeclared identifier is reported only once for each function it appears in vim +319 drivers/crypto/chelsio/chtls/chtls_main.c 29f9f684 Atul Gupta 2018-03-19 307 29f9f684 Atul Gupta 2018-03-19 308 static int chtls_uld_state_change(void *handle, enum cxgb4_state new_state) 29f9f684 Atul Gupta 2018-03-19 309 { 29f9f684 Atul Gupta 2018-03-19 310 struct chtls_dev *cdev = handle; 29f9f684 Atul Gupta 2018-03-19 311 29f9f684 Atul Gupta 2018-03-19 312 switch (new_state) { 29f9f684 Atul Gupta 2018-03-19 313 case CXGB4_STATE_UP: 29f9f684 Atul Gupta 2018-03-19 314 chtls_register_dev(cdev); 29f9f684 Atul Gupta 2018-03-19 315 break; 29f9f684 Atul Gupta 2018-03-19 316 case CXGB4_STATE_DOWN: 29f9f684 Atul Gupta 2018-03-19 317 break; 29f9f684 Atul Gupta 2018-03-19 318 case CXGB4_STATE_START_RECOVERY: 29f9f684 Atul Gupta 2018-03-19 @319 case CXGB4_STATE_FATAL_ERROR: 29f9f684 Atul Gupta 2018-03-19 320 break; 29f9f684 Atul Gupta 2018-03-19 321 case CXGB4_STATE_DETACH: 29f9f684 Atul Gupta 2018-03-19 322 mutex_lock(_mutex); 29f9f684 Atul Gupta 2018-03-19 323 list_del(>list); 29f9f684 Atul Gupta 2018-03-19 324 mutex_unlock(_mutex); 29f9f684 Atul Gupta 2018-03-19 325 chtls_free_uld(cdev); 29f9f684 Atul Gupta 2018-03-19 326 break; 29f9f684 Atul Gupta 2018-03-19 327 } 29f9f684 Atul Gupta 2018-03-19 328 return 0; 29f9f684 Atul Gupta 2018-03-19 329 } 29f9f684 Atul Gupta 2018-03-19 330 :: The code at line 319 was first introduced by commit :: 29f9f68416a9775029d6cc8135cf3f01995dd9f4 crypto: chtls - Register chtls with net tls :: TO: Atul Gupta:: CC: 0day robot --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH 11/12] crypto: inside-secure - hmac(sha256) support
Hi Antoine, I love your patch! Yet something to improve: [auto build test ERROR on next-20180309] [cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2 v4.16-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Antoine-Tenart/crypto-inside-secure-hmac-sha256-sha224-support/20180318-012349 config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/crypto/inside-secure/safexcel_hash.c:481:9: sparse: Variable length array is used. drivers/crypto/inside-secure/safexcel_hash.c:979:45: sparse: cast to restricted __le32 drivers/crypto/inside-secure/safexcel_hash.c:980:45: sparse: cast to restricted __le32 drivers/crypto/inside-secure/safexcel_hash.c:1166:12: sparse: no member 'digest' in struct safexcel_ahash_ctx drivers/crypto/inside-secure/safexcel_hash.c:189:12: sparse: context imbalance in 'safexcel_ahash_send_req' - wrong count at exit drivers/crypto/inside-secure/safexcel_hash.c:1166:12: sparse: generating address of non-lvalue (8) drivers/crypto/inside-secure/safexcel_hash.c: In function 'safexcel_hmac_sha256_init': >> drivers/crypto/inside-secure/safexcel_hash.c:1166:5: error: 'struct >> safexcel_ahash_ctx' has no member named 'digest' ctx->digest = CONTEXT_CONTROL_DIGEST_HMAC; ^~ sparse warnings: (new ones prefixed by >>) drivers/crypto/inside-secure/safexcel_hash.c:481:9: sparse: Variable length array is used. drivers/crypto/inside-secure/safexcel_hash.c:979:45: sparse: cast to restricted __le32 drivers/crypto/inside-secure/safexcel_hash.c:980:45: sparse: cast to restricted __le32 drivers/crypto/inside-secure/safexcel_hash.c:1166:12: sparse: no member 'digest' in struct safexcel_ahash_ctx drivers/crypto/inside-secure/safexcel_hash.c:189:12: sparse: context imbalance in 'safexcel_ahash_send_req' - wrong count at exit >> drivers/crypto/inside-secure/safexcel_hash.c:1166:12: sparse: generating >> address of non-lvalue (8) drivers/crypto/inside-secure/safexcel_hash.c: In function 'safexcel_hmac_sha256_init': drivers/crypto/inside-secure/safexcel_hash.c:1166:5: error: 'struct safexcel_ahash_ctx' has no member named 'digest' ctx->digest = CONTEXT_CONTROL_DIGEST_HMAC; ^~ vim +1166 drivers/crypto/inside-secure/safexcel_hash.c 1160 1161 static int safexcel_hmac_sha256_init(struct ahash_request *areq) 1162 { 1163 struct safexcel_ahash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(areq)); 1164 1165 safexcel_sha256_init(areq); > 1166 ctx->digest = CONTEXT_CONTROL_DIGEST_HMAC; 1167 return 0; 1168 } 1169 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH] crypto: ctr: avoid VLA use
Hi Salvatore, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc5 next-20180314] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Salvatore-Mesoraca/crypto-ctr-avoid-VLA-use/20180315-213008 config: x86_64-randconfig-x014-201810 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): crypto/ctr.c: In function 'crypto_ctr_crypt': >> crypto/ctr.c:156:3: warning: 'tmp2' may be used uninitialized in this >> function [-Wmaybe-uninitialized] kfree(tmp2); ^~~ crypto/ctr.c:133:18: note: 'tmp2' was declared here u8 *keystream, *tmp2; ^~~~ vim +/tmp2 +156 crypto/ctr.c 121 122 static int crypto_ctr_crypt_inplace(struct blkcipher_walk *walk, 123 struct crypto_cipher *tfm) 124 { 125 void (*fn)(struct crypto_tfm *, u8 *, const u8 *) = 126 crypto_cipher_alg(tfm)->cia_encrypt; 127 unsigned int bsize = crypto_cipher_blocksize(tfm); 128 unsigned long alignmask = crypto_cipher_alignmask(tfm); 129 unsigned int nbytes = walk->nbytes; 130 u8 *ctrblk = walk->iv; 131 u8 *src = walk->src.virt.addr; 132 DECLARE_CIPHER_BUFFER(tmp); 133 u8 *keystream, *tmp2; 134 135 if (CHECK_CIPHER_BUFFER(tmp, bsize, alignmask)) 136 keystream = tmp; 137 else { 138 tmp2 = kmalloc(bsize + alignmask, GFP_ATOMIC); 139 if (!tmp2) 140 return -ENOMEM; 141 keystream = PTR_ALIGN(tmp2 + 0, alignmask + 1); 142 } 143 144 do { 145 /* create keystream */ 146 fn(crypto_cipher_tfm(tfm), keystream, ctrblk); 147 crypto_xor(src, keystream, bsize); 148 149 /* increment counter in counterblock */ 150 crypto_inc(ctrblk, bsize); 151 152 src += bsize; 153 } while ((nbytes -= bsize) >= bsize); 154 155 if (unlikely(keystream != tmp)) > 156 kfree(tmp2); 157 return nbytes; 158 } 159 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[cryptodev:master 109/128] arch/x86/crypto/des3_ede_glue.c:407:21: sparse: symbol 'des3_ede_skciphers' was not declared. Should it be static?
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 23ea8b63a1e2e15199da4461eb303f642fa04f60 commit: 09c0f03bf8ce9304e0d17131c46690b2c95209f4 [109/128] crypto: x86/des3_ede - convert to skcipher interface reproduce: # apt-get install sparse git checkout 09c0f03bf8ce9304e0d17131c46690b2c95209f4 make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> arch/x86/crypto/des3_ede_glue.c:407:21: sparse: symbol 'des3_ede_skciphers' >> was not declared. Should it be static? Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[RFC PATCH cryptodev] crypto: des3_ede_skciphers[] can be static
Fixes: 09c0f03bf8ce ("crypto: x86/des3_ede - convert to skcipher interface") Signed-off-by: Fengguang Wu--- des3_ede_glue.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/crypto/des3_ede_glue.c b/arch/x86/crypto/des3_ede_glue.c index f9c7bdc..5c610d4e 100644 --- a/arch/x86/crypto/des3_ede_glue.c +++ b/arch/x86/crypto/des3_ede_glue.c @@ -404,7 +404,7 @@ static struct crypto_alg des3_ede_cipher = { } }; -struct skcipher_alg des3_ede_skciphers[] = { +static struct skcipher_alg des3_ede_skciphers[] = { { .base.cra_name = "ecb(des3_ede)", .base.cra_driver_name = "ecb-des3_ede-asm",
[cryptodev:master 22/38] drivers/crypto/virtio/virtio_crypto_algs.c:494:9: error: implicit declaration of function 'crypto_transfer_cipher_request_to_engine'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: a43a34845a156c9e1dae00e33595a508d53e0365 commit: 218d1cc1860c45b77f6814b44f6f0ffb9e40a82f [22/38] crypto: engine - Permit to enqueue all async requests config: x86_64-randconfig-s2-02160419 (attached as .config) compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 reproduce: git checkout 218d1cc1860c45b77f6814b44f6f0ffb9e40a82f # save the attached .config to linux build tree make ARCH=x86_64 Note: the cryptodev/master HEAD a43a34845a156c9e1dae00e33595a508d53e0365 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): drivers/crypto/virtio/virtio_crypto_algs.c: In function 'virtio_crypto_ablkcipher_encrypt': >> drivers/crypto/virtio/virtio_crypto_algs.c:494:9: error: implicit >> declaration of function 'crypto_transfer_cipher_request_to_engine' >> [-Werror=implicit-function-declaration] return crypto_transfer_cipher_request_to_engine(data_vq->engine, req); ^~~~ drivers/crypto/virtio/virtio_crypto_algs.c: In function 'virtio_crypto_ablkcipher_finalize_req': >> drivers/crypto/virtio/virtio_crypto_algs.c:564:2: error: implicit >> declaration of function 'crypto_finalize_cipher_request' >> [-Werror=implicit-function-declaration] crypto_finalize_cipher_request(vc_sym_req->base.dataq->engine, ^~ cc1: some warnings being treated as errors vim +/crypto_transfer_cipher_request_to_engine +494 drivers/crypto/virtio/virtio_crypto_algs.c dbaf0624 Gonglei 2016-12-15 476 dbaf0624 Gonglei 2016-12-15 477 static int virtio_crypto_ablkcipher_encrypt(struct ablkcipher_request *req) dbaf0624 Gonglei 2016-12-15 478 { dbaf0624 Gonglei 2016-12-15 479 struct crypto_ablkcipher *atfm = crypto_ablkcipher_reqtfm(req); dbaf0624 Gonglei 2016-12-15 480 struct virtio_crypto_ablkcipher_ctx *ctx = crypto_ablkcipher_ctx(atfm); d31e7123 Zeng, Xin2017-06-23 481 struct virtio_crypto_sym_request *vc_sym_req = d31e7123 Zeng, Xin2017-06-23 482 ablkcipher_request_ctx(req); d31e7123 Zeng, Xin2017-06-23 483 struct virtio_crypto_request *vc_req = _sym_req->base; dbaf0624 Gonglei 2016-12-15 484 struct virtio_crypto *vcrypto = ctx->vcrypto; dbaf0624 Gonglei 2016-12-15 485 /* Use the first data virtqueue as default */ dbaf0624 Gonglei 2016-12-15 486 struct data_queue *data_vq = >data_vq[0]; dbaf0624 Gonglei 2016-12-15 487 d79b5d0b Gonglei \(Arei\ 2016-12-27 488) vc_req->dataq = data_vq; d31e7123 Zeng, Xin2017-06-23 489 vc_req->alg_cb = virtio_crypto_dataq_sym_callback; d31e7123 Zeng, Xin2017-06-23 490 vc_sym_req->ablkcipher_ctx = ctx; d31e7123 Zeng, Xin2017-06-23 491 vc_sym_req->ablkcipher_req = req; d31e7123 Zeng, Xin2017-06-23 492 vc_sym_req->encrypt = true; dbaf0624 Gonglei 2016-12-15 493 d79b5d0b Gonglei \(Arei\ 2016-12-27 @494) return crypto_transfer_cipher_request_to_engine(data_vq->engine, req); dbaf0624 Gonglei 2016-12-15 495 } dbaf0624 Gonglei 2016-12-15 496 dbaf0624 Gonglei 2016-12-15 497 static int virtio_crypto_ablkcipher_decrypt(struct ablkcipher_request *req) dbaf0624 Gonglei 2016-12-15 498 { dbaf0624 Gonglei 2016-12-15 499 struct crypto_ablkcipher *atfm = crypto_ablkcipher_reqtfm(req); dbaf0624 Gonglei 2016-12-15 500 struct virtio_crypto_ablkcipher_ctx *ctx = crypto_ablkcipher_ctx(atfm); d31e7123 Zeng, Xin2017-06-23 501 struct virtio_crypto_sym_request *vc_sym_req = d31e7123 Zeng, Xin2017-06-23 502 ablkcipher_request_ctx(req); d31e7123 Zeng, Xin2017-06-23 503 struct virtio_crypto_request *vc_req = _sym_req->base; dbaf0624 Gonglei 2016-12-15 504 struct virtio_crypto *vcrypto = ctx->vcrypto; dbaf0624 Gonglei 2016-12-15 505 /* Use the first data virtqueue as default */ dbaf0624 Gonglei 2016-12-15 506 struct data_queue *data_vq = >data_vq[0]; dbaf0624 Gonglei 2016-12-15 507 d79b5d0b Gonglei \(Arei\ 2016-12-27 508) vc_req->dataq = data_vq; d31e7123 Zeng, Xin2017-06-23 509 vc_req->alg_cb = virtio_crypto_dataq_sym_callback; d31e7123 Zeng, Xin2017-06-23 510 vc_sym_req->ablkcipher_ctx = ctx; d31e7123 Zeng, Xin2017-06-23 511 vc_sym_req->ablkcipher_req = req; d31e7123 Zeng, Xin2017-06-23 512 vc_sym_req->encrypt = false; dbaf0624 Gonglei 2016-12-15 513 d79b5d0b Gonglei \(Arei\ 2016-12-27 514) return crypto_transfer_cipher_request_to_engine(data_vq->engine, req); dbaf0624 Gonglei 2016-12-15 515 }
[cryptodev:master 22/38] drivers/crypto/virtio/virtio_crypto_algs.c:494:9: error: implicit declaration of function 'crypto_transfer_cipher_request_to_engine'; did you mean 'crypto_transfer_skcipher_re
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: a43a34845a156c9e1dae00e33595a508d53e0365 commit: 218d1cc1860c45b77f6814b44f6f0ffb9e40a82f [22/38] crypto: engine - Permit to enqueue all async requests config: x86_64-rhel (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout 218d1cc1860c45b77f6814b44f6f0ffb9e40a82f # save the attached .config to linux build tree make ARCH=x86_64 Note: the cryptodev/master HEAD a43a34845a156c9e1dae00e33595a508d53e0365 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): drivers/crypto/virtio/virtio_crypto_algs.c: In function 'virtio_crypto_ablkcipher_encrypt': >> drivers/crypto/virtio/virtio_crypto_algs.c:494:9: error: implicit >> declaration of function 'crypto_transfer_cipher_request_to_engine'; did you >> mean 'crypto_transfer_skcipher_request_to_engine'? >> [-Werror=implicit-function-declaration] return crypto_transfer_cipher_request_to_engine(data_vq->engine, req); ^~~~ crypto_transfer_skcipher_request_to_engine drivers/crypto/virtio/virtio_crypto_algs.c: In function 'virtio_crypto_ablkcipher_finalize_req': >> drivers/crypto/virtio/virtio_crypto_algs.c:564:2: error: implicit >> declaration of function 'crypto_finalize_cipher_request'; did you mean >> 'crypto_finalize_skcipher_request'? [-Werror=implicit-function-declaration] crypto_finalize_cipher_request(vc_sym_req->base.dataq->engine, ^~ crypto_finalize_skcipher_request cc1: some warnings being treated as errors -- drivers/crypto/virtio/virtio_crypto_core.c: In function 'virtcrypto_find_vqs': >> drivers/crypto/virtio/virtio_crypto_core.c:115:24: error: 'struct >> crypto_engine' has no member named 'cipher_one_request' vi->data_vq[i].engine->cipher_one_request = ^~ vim +494 drivers/crypto/virtio/virtio_crypto_algs.c dbaf0624 Gonglei 2016-12-15 476 dbaf0624 Gonglei 2016-12-15 477 static int virtio_crypto_ablkcipher_encrypt(struct ablkcipher_request *req) dbaf0624 Gonglei 2016-12-15 478 { dbaf0624 Gonglei 2016-12-15 479 struct crypto_ablkcipher *atfm = crypto_ablkcipher_reqtfm(req); dbaf0624 Gonglei 2016-12-15 480 struct virtio_crypto_ablkcipher_ctx *ctx = crypto_ablkcipher_ctx(atfm); d31e7123 Zeng, Xin2017-06-23 481 struct virtio_crypto_sym_request *vc_sym_req = d31e7123 Zeng, Xin2017-06-23 482 ablkcipher_request_ctx(req); d31e7123 Zeng, Xin2017-06-23 483 struct virtio_crypto_request *vc_req = _sym_req->base; dbaf0624 Gonglei 2016-12-15 484 struct virtio_crypto *vcrypto = ctx->vcrypto; dbaf0624 Gonglei 2016-12-15 485 /* Use the first data virtqueue as default */ dbaf0624 Gonglei 2016-12-15 486 struct data_queue *data_vq = >data_vq[0]; dbaf0624 Gonglei 2016-12-15 487 d79b5d0b Gonglei \(Arei\ 2016-12-27 488) vc_req->dataq = data_vq; d31e7123 Zeng, Xin2017-06-23 489 vc_req->alg_cb = virtio_crypto_dataq_sym_callback; d31e7123 Zeng, Xin2017-06-23 490 vc_sym_req->ablkcipher_ctx = ctx; d31e7123 Zeng, Xin2017-06-23 491 vc_sym_req->ablkcipher_req = req; d31e7123 Zeng, Xin2017-06-23 492 vc_sym_req->encrypt = true; dbaf0624 Gonglei 2016-12-15 493 d79b5d0b Gonglei \(Arei\ 2016-12-27 @494) return crypto_transfer_cipher_request_to_engine(data_vq->engine, req); dbaf0624 Gonglei 2016-12-15 495 } dbaf0624 Gonglei 2016-12-15 496 dbaf0624 Gonglei 2016-12-15 497 static int virtio_crypto_ablkcipher_decrypt(struct ablkcipher_request *req) dbaf0624 Gonglei 2016-12-15 498 { dbaf0624 Gonglei 2016-12-15 499 struct crypto_ablkcipher *atfm = crypto_ablkcipher_reqtfm(req); dbaf0624 Gonglei 2016-12-15 500 struct virtio_crypto_ablkcipher_ctx *ctx = crypto_ablkcipher_ctx(atfm); d31e7123 Zeng, Xin2017-06-23 501 struct virtio_crypto_sym_request *vc_sym_req = d31e7123 Zeng, Xin2017-06-23 502 ablkcipher_request_ctx(req); d31e7123 Zeng, Xin2017-06-23 503 struct virtio_crypto_request *vc_req = _sym_req->base; dbaf0624 Gonglei 2016-12-15 504 struct virtio_crypto *vcrypto = ctx->vcrypto; dbaf0624 Gonglei 2016-12-15 505 /* Use the first data virtqueue as default */ dbaf0624 Gonglei 2016-12-15 506 struct data_queue *data_vq = >data_vq[0]; dbaf0624 Gonglei 2016-12-15 507 d79b5d0b Gonglei \(Arei\ 2016-12-27 508) vc_req->dataq = data_vq; d31e7123 Zeng, Xin2017-06-23 509 vc_req->alg_cb = virtio_crypto_dataq_sym_callback; d31e7123 Zeng, Xin
[PATCH] crypto: fix memdup.cocci warnings
From: Fengguang Wudrivers/crypto/ccree/cc_cipher.c:629:15-22: WARNING opportunity for kmemdep Use kmemdup rather than duplicating its implementation Generated by: scripts/coccinelle/api/memdup.cocci Fixes: 63ee04c8b491 ("crypto: ccree - add skcipher support") CC: Gilad Ben-Yossef Signed-off-by: Fengguang Wu --- cc_cipher.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/crypto/ccree/cc_cipher.c +++ b/drivers/crypto/ccree/cc_cipher.c @@ -626,12 +626,11 @@ static int cc_cipher_process(struct skci /* The IV we are handed may be allocted from the stack so * we must copy it to a DMAable buffer before use. */ - req_ctx->iv = kmalloc(ivsize, flags); + req_ctx->iv = kmemdup(iv, ivsize, flags); if (!req_ctx->iv) { rc = -ENOMEM; goto exit_process; } - memcpy(req_ctx->iv, iv, ivsize); /*For CTS in case of data size aligned to 16 use CBC mode*/ if (((nbytes % AES_BLOCK_SIZE) == 0) &&
[cryptodev:master 9/38] drivers/crypto/ccree/cc_cipher.c:629:15-22: WARNING opportunity for kmemdep
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: a43a34845a156c9e1dae00e33595a508d53e0365 commit: 63ee04c8b491ee148489347e7da9fbfd982ca2bb [9/38] crypto: ccree - add skcipher support coccinelle warnings: (new ones prefixed by >>) >> drivers/crypto/ccree/cc_cipher.c:629:15-22: WARNING opportunity for kmemdep Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [Crypto v4 12/12] Makefile Kconfig
Hi Atul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on cryptodev/master] [cannot apply to net/master net-next/master v4.16-rc1 next-20180214] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/Chelsio-Inline-TLS/20180215-072600 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/crypto/chelsio/chtls/chtls_main.c:139:19: sparse: symbol >> 'chtls_netdev' was not declared. Should it be >> drivers/crypto/chelsio/chtls/chtls_main.c:152:6: sparse: symbol >> 'chtls_update_prot' was not declared. Should it be >> drivers/crypto/chelsio/chtls/chtls_main.c:157:5: sparse: symbol >> 'chtls_inline_feature' was not declared. Should it be >> drivers/crypto/chelsio/chtls/chtls_main.c:171:5: sparse: symbol >> 'chtls_create_hash' was not declared. Should it be >> drivers/crypto/chelsio/chtls/chtls_main.c:178:6: sparse: symbol >> 'chtls_destroy_hash' was not declared. Should it be -- >> drivers/crypto/chelsio/chtls/chtls_cm.c:373:27: sparse: incorrect type in >> assignment (different address spaces) @@ expected struct socket_wq @@ got @@ drivers/crypto/chelsio/chtls/chtls_cm.c:373:27: expected struct socket_wq drivers/crypto/chelsio/chtls/chtls_cm.c:373:27: got struct socket_wq >> drivers/crypto/chelsio/chtls/chtls_cm.c:395:23: sparse: incompatible types >> in comparison expression (different address spaces) drivers/crypto/chelsio/chtls/chtls_cm.c:714:6: sparse: symbol 'free_atid' was not declared. Should it be >> drivers/crypto/chelsio/chtls/chtls_cm.h:150:35: sparse: incorrect type in >> argument 1 (different address spaces) @@ expected struct socket_wq @@ got >> struct socket_wq struct socket_wq @@ drivers/crypto/chelsio/chtls/chtls_cm.h:150:35: expected struct socket_wq drivers/crypto/chelsio/chtls/chtls_cm.h:150:35: got struct socket_wq >> drivers/crypto/chelsio/chtls/chtls_cm.c:1165:37: sparse: incorrect type in >> argument 2 (different base types) @@ expected unsigned int local_ip @@ got >> ed int local_ip @@ drivers/crypto/chelsio/chtls/chtls_cm.c:1165:37: expected unsigned int local_ip drivers/crypto/chelsio/chtls/chtls_cm.c:1165:37: got restricted __be32 daddr >> drivers/crypto/chelsio/chtls/chtls_cm.c:1165:49: sparse: incorrect type in >> argument 3 (different base types) @@ expected unsigned int peer_ip @@ got ed >> int peer_ip @@ drivers/crypto/chelsio/chtls/chtls_cm.c:1165:49: expected unsigned int peer_ip drivers/crypto/chelsio/chtls/chtls_cm.c:1165:49: got restricted __be32 saddr >> drivers/crypto/chelsio/chtls/chtls_cm.h:173:37: sparse: incorrect type in >> assignment (different base types) @@ expected restricted __be32 >> skc_rcv_saddr @@ got unsignrestricted __be32 skc_rcv_saddr @@ drivers/crypto/chelsio/chtls/chtls_cm.h:173:37: expected restricted __be32 skc_rcv_saddr drivers/crypto/chelsio/chtls/chtls_cm.h:173:37: got unsigned int local_ip >> drivers/crypto/chelsio/chtls/chtls_cm.h:174:37: sparse: incorrect type in >> assignment (different base types) @@ expected restricted __be32 skc_daddr @@ >> got unsignrestricted __be32 skc_daddr @@ drivers/crypto/chelsio/chtls/chtls_cm.h:174:37: expected restricted __be32 skc_daddr drivers/crypto/chelsio/chtls/chtls_cm.h:174:37: got unsigned int peer_ip >> drivers/crypto/chelsio/chtls/chtls_cm.c:1243:23: sparse: incorrect type in >> argument 1 (different address spaces) @@ expected struct dst_entry @@ got >> struct dst_entry struct dst_entry @@ drivers/crypto/chelsio/chtls/chtls_cm.c:1243:23: expected struct dst_entry drivers/crypto/chelsio/chtls/chtls_cm.c:1243:23: got struct dst_entry >> drivers/crypto/chelsio/chtls/chtls_cm.c:1539:24: sparse: cast to restricted >> __be16 >> drivers/crypto/chelsio/chtls/chtls_cm.c:1539:24: sparse: cast to restricted >> __be16 >> drivers/crypto/chelsio/chtls/chtls_cm.c:1539:24: sparse: cast to restricted >> __be16 >> drivers/crypto/chelsio/chtls/chtls_cm.c:1539:24: sparse: cast to restricted >> __be16 drivers/crypto/chelsio/chtls/chtls_cm.c:1540:31: sparse: cast to restricted __be16 drivers/crypto/chelsio/chtls/chtls_cm.c:1540:31: sparse: cast to restricted __be16 drivers/crypto/chelsio/chtls/chtls_cm.c:1540:31: sparse: cast to restricted __be16 drivers/crypto/chelsio/chtls/chtls_cm.c:1540:31: sparse: cast to restricted __be16 drivers/crypto/chelsio/chtls/chtls_cm.c:1664:31: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct dst_entry @@ got struct dst_entry struct dst_entry @@ drivers/crypto/chelsio/chtls/chtls_cm.c:1664:31: expected struct dst_entry drivers/crypto/chelsio/chtls/chtls_cm.c:1664:31: got struct dst_entry >>
[RFC PATCH] chtls_netdev() can be static
Fixes: 5995a3b59239 ("Makefile Kconfig") Signed-off-by: Fengguang Wu--- chtls_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/chelsio/chtls/chtls_main.c b/drivers/crypto/chelsio/chtls/chtls_main.c index 58efb4a..3452f44 100644 --- a/drivers/crypto/chelsio/chtls/chtls_main.c +++ b/drivers/crypto/chelsio/chtls/chtls_main.c @@ -136,8 +136,8 @@ static int chtls_stop_listen(struct sock *sk) return 0; } -struct net_device *chtls_netdev(struct tls_device *dev, - struct net_device *netdev) +static struct net_device *chtls_netdev(struct tls_device *dev, + struct net_device *netdev) { struct chtls_dev *cdev = to_chtls_dev(dev); int i; @@ -149,12 +149,12 @@ struct net_device *chtls_netdev(struct tls_device *dev, return cdev->ports[i]; } -void chtls_update_prot(struct tls_device *dev, struct sock *sk) +static void chtls_update_prot(struct tls_device *dev, struct sock *sk) { sk->sk_prot = _base_prot; } -int chtls_inline_feature(struct tls_device *dev) +static int chtls_inline_feature(struct tls_device *dev) { struct chtls_dev *cdev = to_chtls_dev(dev); struct net_device *netdev; @@ -168,14 +168,14 @@ int chtls_inline_feature(struct tls_device *dev) return 1; } -int chtls_create_hash(struct tls_device *dev, struct sock *sk) +static int chtls_create_hash(struct tls_device *dev, struct sock *sk) { if (sk->sk_state == TCP_LISTEN) return chtls_start_listen(sk); return 0; } -void chtls_destroy_hash(struct tls_device *dev, struct sock *sk) +static void chtls_destroy_hash(struct tls_device *dev, struct sock *sk) { if (sk->sk_state == TCP_LISTEN) chtls_stop_listen(sk);
Re: [Crypto v4 12/12] Makefile Kconfig
Hi Atul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on cryptodev/master] [cannot apply to net/master net-next/master v4.16-rc1 next-20180214] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/Chelsio-Inline-TLS/20180215-072600 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=ia64 All warnings (new ones prefixed by >>): drivers/crypto/chelsio/chtls/chtls_cm.c: In function 'chtls_rx_ack': >> drivers/crypto/chelsio/chtls/chtls_cm.c:1979:4: warning: this 'if' clause >> does not guard... [-Wmisleading-indentation] if (csk->wr_nondata) ^~ drivers/crypto/chelsio/chtls/chtls_cm.c:1981:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' break; ^ vim +/if +1979 drivers/crypto/chelsio/chtls/chtls_cm.c 763a7f5f Atul Gupta 2018-02-12 1961 763a7f5f Atul Gupta 2018-02-12 1962 static void chtls_rx_ack(struct sock *sk, struct sk_buff *skb) 763a7f5f Atul Gupta 2018-02-12 1963 { 763a7f5f Atul Gupta 2018-02-12 1964struct cpl_fw4_ack *hdr = cplhdr(skb) + RSS_HDR; 763a7f5f Atul Gupta 2018-02-12 1965struct chtls_sock *csk = sk->sk_user_data; 763a7f5f Atul Gupta 2018-02-12 1966struct tcp_sock *tp = tcp_sk(sk); 763a7f5f Atul Gupta 2018-02-12 1967u32 snd_una = ntohl(hdr->snd_una); 763a7f5f Atul Gupta 2018-02-12 1968u8 credits = hdr->credits; 763a7f5f Atul Gupta 2018-02-12 1969 763a7f5f Atul Gupta 2018-02-12 1970csk->wr_credits += credits; 763a7f5f Atul Gupta 2018-02-12 1971 763a7f5f Atul Gupta 2018-02-12 1972if (csk->wr_unacked > csk->wr_max_credits - csk->wr_credits) 763a7f5f Atul Gupta 2018-02-12 1973csk->wr_unacked = csk->wr_max_credits - csk->wr_credits; 763a7f5f Atul Gupta 2018-02-12 1974 763a7f5f Atul Gupta 2018-02-12 1975while (credits) { 763a7f5f Atul Gupta 2018-02-12 1976struct sk_buff *pskb = csk->wr_skb_head; 763a7f5f Atul Gupta 2018-02-12 1977 763a7f5f Atul Gupta 2018-02-12 1978if (unlikely(!pskb)) { 763a7f5f Atul Gupta 2018-02-12 @1979if (csk->wr_nondata) 763a7f5f Atul Gupta 2018-02-12 1980csk->wr_nondata -= credits; 763a7f5f Atul Gupta 2018-02-12 1981break; 763a7f5f Atul Gupta 2018-02-12 1982} 763a7f5f Atul Gupta 2018-02-12 1983if (unlikely(credits < pskb->csum)) { 763a7f5f Atul Gupta 2018-02-12 1984pskb->csum -= credits; 763a7f5f Atul Gupta 2018-02-12 1985break; 763a7f5f Atul Gupta 2018-02-12 1986} 763a7f5f Atul Gupta 2018-02-12 1987dequeue_wr(sk); 763a7f5f Atul Gupta 2018-02-12 1988credits -= pskb->csum; 763a7f5f Atul Gupta 2018-02-12 1989kfree_skb(pskb); 763a7f5f Atul Gupta 2018-02-12 1990} 763a7f5f Atul Gupta 2018-02-12 1991if (hdr->seq_vld & CPL_FW4_ACK_FLAGS_SEQVAL) { 763a7f5f Atul Gupta 2018-02-12 1992if (unlikely(before(snd_una, tp->snd_una))) { 763a7f5f Atul Gupta 2018-02-12 1993kfree_skb(skb); 763a7f5f Atul Gupta 2018-02-12 1994return; 763a7f5f Atul Gupta 2018-02-12 1995} 763a7f5f Atul Gupta 2018-02-12 1996 763a7f5f Atul Gupta 2018-02-12 1997if (tp->snd_una != snd_una) { 763a7f5f Atul Gupta 2018-02-12 1998tp->snd_una = snd_una; 763a7f5f Atul Gupta 2018-02-12 1999 dst_confirm(sk->sk_dst_cache); 763a7f5f Atul Gupta 2018-02-12 2000tp->rcv_tstamp = tcp_time_stamp(tp); 763a7f5f Atul Gupta 2018-02-12 2001if (tp->snd_una == tp->snd_nxt && 763a7f5f Atul Gupta 2018-02-12 2002 !csk_flag_nochk(csk, CSK_TX_FAILOVER)) 763a7f5f Atul Gupta 2018-02-12 2003 csk_reset_flag(csk, CSK_TX_WAIT_IDLE); 763a7f5f Atul Gupta 2018-02-12 2004} 763a7f5f Atul Gupta 2018-02-12 2005} 763a7f5f Atul Gupta 2018-02-12 2006 763a7f5f Atul Gupta 2018-02-12 2007if (hdr->seq_vld & CPL_FW4_ACK_FLAGS_CH) { 763a7f5f Atul Gupta 2018-02-12 2008unsigned int fclen16 = roundup(failover_flowc_wr_len, 16); 763a7f5f Atul Gupta 2018-02-12 2009 763a7f5f Atul Gupta 2018-02-12 2010csk->wr_credits -= fclen16; 763a7f5f Atul Gupta 2018-02-12 2011csk_reset_flag(csk, CSK_TX_WAIT_IDLE); 763a7f5f Atul Gupta 2018-02-12 2012csk_reset_flag(csk, CSK_TX_FAILOVER);
Re: [RESEND PATCH 3/6] ARM: dts: imx7s: add CAAM device node
Hi Rui, I love your patch! Yet something to improve: [auto build test ERROR on crypto/master] [also build test ERROR on v4.15-rc9 next-20180126] [cannot apply to cryptodev/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/Enable-CAAM-on-i-MX7s-fix-TrustZone-issues/20180127-185422 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git master config: arm-u8500_defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm Note: the linux-review/Bryan-O-Donoghue/Enable-CAAM-on-i-MX7s-fix-TrustZone-issues/20180127-185422 HEAD f907a172373d2c61dd7bf25a88621abc6e410f15 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): >> Error: arch/arm/boot/dts/imx7s.dtsi:815.21-22 syntax error FATAL ERROR: Unable to parse input tree --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[cryptodev:master 165/172] crypto/sha3_generic.c:147:1: warning: the frame size of 1232 bytes is larger than 1024 bytes
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 2d55807b7f7bf62bb05a8b91247c5eb7cd19ac04 commit: 83dee2ce1ae791c3dc0c9d4d3a8d42cb109613f6 [165/172] crypto: sha3-generic - rewrite KECCAK transform to help the compiler optimize config: mn10300-allyesconfig (attached as .config) compiler: am33_2.0-linux-gcc (GCC) 7.2.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 83dee2ce1ae791c3dc0c9d4d3a8d42cb109613f6 # save the attached .config to linux build tree make.cross ARCH=mn10300 All warnings (new ones prefixed by >>): crypto/sha3_generic.c: In function 'keccakf': >> crypto/sha3_generic.c:147:1: warning: the frame size of 1232 bytes is larger >> than 1024 bytes [-Wframe-larger-than=] } ^ vim +147 crypto/sha3_generic.c 53964b9e Jeff Garzik2016-06-17 38 83dee2ce Ard Biesheuvel 2018-01-19 39 static void __attribute__((__optimize__("O3"))) keccakf(u64 st[25]) 53964b9e Jeff Garzik2016-06-17 40 { 83dee2ce Ard Biesheuvel 2018-01-19 41 u64 t[5], tt, bc[5]; 83dee2ce Ard Biesheuvel 2018-01-19 42 int round; 53964b9e Jeff Garzik2016-06-17 43 53964b9e Jeff Garzik2016-06-17 44 for (round = 0; round < KECCAK_ROUNDS; round++) { 53964b9e Jeff Garzik2016-06-17 45 53964b9e Jeff Garzik2016-06-17 46 /* Theta */ 83dee2ce Ard Biesheuvel 2018-01-19 47 bc[0] = st[0] ^ st[5] ^ st[10] ^ st[15] ^ st[20]; 83dee2ce Ard Biesheuvel 2018-01-19 48 bc[1] = st[1] ^ st[6] ^ st[11] ^ st[16] ^ st[21]; 83dee2ce Ard Biesheuvel 2018-01-19 49 bc[2] = st[2] ^ st[7] ^ st[12] ^ st[17] ^ st[22]; 83dee2ce Ard Biesheuvel 2018-01-19 50 bc[3] = st[3] ^ st[8] ^ st[13] ^ st[18] ^ st[23]; 83dee2ce Ard Biesheuvel 2018-01-19 51 bc[4] = st[4] ^ st[9] ^ st[14] ^ st[19] ^ st[24]; 83dee2ce Ard Biesheuvel 2018-01-19 52 83dee2ce Ard Biesheuvel 2018-01-19 53 t[0] = bc[4] ^ rol64(bc[1], 1); 83dee2ce Ard Biesheuvel 2018-01-19 54 t[1] = bc[0] ^ rol64(bc[2], 1); 83dee2ce Ard Biesheuvel 2018-01-19 55 t[2] = bc[1] ^ rol64(bc[3], 1); 83dee2ce Ard Biesheuvel 2018-01-19 56 t[3] = bc[2] ^ rol64(bc[4], 1); 83dee2ce Ard Biesheuvel 2018-01-19 57 t[4] = bc[3] ^ rol64(bc[0], 1); 83dee2ce Ard Biesheuvel 2018-01-19 58 83dee2ce Ard Biesheuvel 2018-01-19 59 st[0] ^= t[0]; 53964b9e Jeff Garzik2016-06-17 60 53964b9e Jeff Garzik2016-06-17 61 /* Rho Pi */ 83dee2ce Ard Biesheuvel 2018-01-19 62 tt = st[1]; 83dee2ce Ard Biesheuvel 2018-01-19 63 st[ 1] = rol64(st[ 6] ^ t[1], 44); 83dee2ce Ard Biesheuvel 2018-01-19 64 st[ 6] = rol64(st[ 9] ^ t[4], 20); 83dee2ce Ard Biesheuvel 2018-01-19 65 st[ 9] = rol64(st[22] ^ t[2], 61); 83dee2ce Ard Biesheuvel 2018-01-19 66 st[22] = rol64(st[14] ^ t[4], 39); 83dee2ce Ard Biesheuvel 2018-01-19 67 st[14] = rol64(st[20] ^ t[0], 18); 83dee2ce Ard Biesheuvel 2018-01-19 68 st[20] = rol64(st[ 2] ^ t[2], 62); 83dee2ce Ard Biesheuvel 2018-01-19 69 st[ 2] = rol64(st[12] ^ t[2], 43); 83dee2ce Ard Biesheuvel 2018-01-19 70 st[12] = rol64(st[13] ^ t[3], 25); 83dee2ce Ard Biesheuvel 2018-01-19 71 st[13] = rol64(st[19] ^ t[4], 8); 83dee2ce Ard Biesheuvel 2018-01-19 72 st[19] = rol64(st[23] ^ t[3], 56); 83dee2ce Ard Biesheuvel 2018-01-19 73 st[23] = rol64(st[15] ^ t[0], 41); 83dee2ce Ard Biesheuvel 2018-01-19 74 st[15] = rol64(st[ 4] ^ t[4], 27); 83dee2ce Ard Biesheuvel 2018-01-19 75 st[ 4] = rol64(st[24] ^ t[4], 14); 83dee2ce Ard Biesheuvel 2018-01-19 76 st[24] = rol64(st[21] ^ t[1], 2); 83dee2ce Ard Biesheuvel 2018-01-19 77 st[21] = rol64(st[ 8] ^ t[3], 55); 83dee2ce Ard Biesheuvel 2018-01-19 78 st[ 8] = rol64(st[16] ^ t[1], 45); 83dee2ce Ard Biesheuvel 2018-01-19 79 st[16] = rol64(st[ 5] ^ t[0], 36); 83dee2ce Ard Biesheuvel 2018-01-19 80 st[ 5] = rol64(st[ 3] ^ t[3], 28); 83dee2ce Ard Biesheuvel 2018-01-19 81 st[ 3] = rol64(st[18] ^ t[3], 21); 83dee2ce Ard Biesheuvel 2018-01-19 82 st[18] = rol64(st[17] ^ t[2], 15); 83dee2ce Ard Biesheuvel 2018-01-19 83 st[17] = rol64(st[11] ^ t[1], 10); 83dee2ce Ard Biesheuvel 2018-01-19 84 st[11] = rol64(st[ 7] ^ t[2], 6); 83dee2ce Ard Biesheuvel 2018-01-19 85 st[ 7] = rol64(st[10] ^ t[0], 3); 83dee2ce Ard Biesheuvel 2018-01-19 86 st[10]
[cryptodev:master 130/155] aes_generic.c:undefined reference to `_restgpr_31_x'
Hi Arnd, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 5abc8db013174ef6022bf7af81adf210c54e4549 commit: 148b974deea927f5dbb6c468af2707b488bfa2de [130/155] crypto: aes-generic - build with -Os on gcc-7+ config: powerpc-asp8347_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 148b974deea927f5dbb6c468af2707b488bfa2de # save the attached .config to linux build tree make.cross ARCH=powerpc All errors (new ones prefixed by >>): crypto/aes_generic.o: In function `crypto_aes_set_key': >> aes_generic.c:(.text+0x4e0): undefined reference to `_restgpr_31_x' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[cryptodev:master 147/154] drivers/crypto/chelsio/chcr_algo.c:2113:2: note: in expansion of macro 'if'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 20b04c02bcb2d1e6a642bbe9e759157bb198499e commit: e1a018e607a33dc9f987c761daf1792082fb9ca7 [147/154] crypto: chelsio - Remove dst sg size zero check config: x86_64-randconfig-v0-01182123 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: git checkout e1a018e607a33dc9f987c761daf1792082fb9ca7 # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:10:0, from drivers/crypto/chelsio/chcr_algo.c:44: drivers/crypto/chelsio/chcr_algo.c: In function 'create_authenc_wr': include/linux/compiler.h:58:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^~ >> drivers/crypto/chelsio/chcr_algo.c:2113:2: note: in expansion of macro 'if' if (error) ^~ drivers/crypto/chelsio/chcr_algo.c:2115:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0); ^~ In file included from include/linux/kernel.h:10:0, from drivers/crypto/chelsio/chcr_algo.c:44: drivers/crypto/chelsio/chcr_algo.c: At top level: include/linux/compiler.h:64:4: warning: '__f' is static but declared in inline function 'strcpy' which is not static __f = { \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^~ include/linux/string.h:422:2: note: in expansion of macro 'if' if (p_size == (size_t)-1 && q_size == (size_t)-1) ^~ include/linux/compiler.h:64:4: warning: '__f' is static but declared in inline function 'kmemdup' which is not static __f = { \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^~ include/linux/string.h:412:2: note: in expansion of macro 'if' if (p_size < size) ^~ include/linux/compiler.h:64:4: warning: '__f' is static but declared in inline function 'kmemdup' which is not static __f = { \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^~ include/linux/string.h:410:2: note: in expansion of macro 'if' if (__builtin_constant_p(size) && p_size < size) ^~ include/linux/compiler.h:64:4: warning: '__f' is static but declared in inline function 'memchr_inv' which is not static __f = { \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^~ include/linux/string.h:401:2: note: in expansion of macro 'if' if (p_size < size) ^~ include/linux/compiler.h:64:4: warning: '__f' is static but declared in inline function 'memchr_inv' which is not static __f = { \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^~ include/linux/string.h:399:2: note: in expansion of macro 'if' if (__builtin_constant_p(size) && p_size < size) ^~ include/linux/compiler.h:64:4: warning: '__f' is static but declared in inline function 'memchr' which is not static __f = { \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^~ include/linux/string.h:390:2: note: in expansion of macro 'if' if (p_size < size) ^~ include/linux/compiler.h:64:4: warning: '__f' is static but declared in inline function 'memchr' which is not static __f = { \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^~ include/linux/string.h:388:2: note: in expansion of macro 'if' if (__builtin_constant_p(size) && p_size < size) ^~ include/linux/compiler.h:64:4: warning: '__f' is static but declared in inline function 'memcmp' which is not static __f = { \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
[cryptodev:master 147/154] drivers/crypto/chelsio/chcr_algo.c:2113:2: warning: this 'if' clause does not guard...
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 20b04c02bcb2d1e6a642bbe9e759157bb198499e commit: e1a018e607a33dc9f987c761daf1792082fb9ca7 [147/154] crypto: chelsio - Remove dst sg size zero check config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 7.2.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 e1a018e607a33dc9f987c761daf1792082fb9ca7 # save the attached .config to linux build tree make.cross ARCH=ia64 All warnings (new ones prefixed by >>): drivers/crypto/chelsio/chcr_algo.c: In function 'create_authenc_wr': >> drivers/crypto/chelsio/chcr_algo.c:2113:2: warning: this 'if' clause does >> not guard... [-Wmisleading-indentation] if (error) ^~ drivers/crypto/chelsio/chcr_algo.c:2115:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0); ^~ vim +/if +2113 drivers/crypto/chelsio/chcr_algo.c 2debd3325 Harsh Jain2016-11-29 2078 2debd3325 Harsh Jain2016-11-29 2079 static struct sk_buff *create_authenc_wr(struct aead_request *req, 2debd3325 Harsh Jain2016-11-29 2080 unsigned short qid, 2debd3325 Harsh Jain2016-11-29 2081 int size, 2debd3325 Harsh Jain2016-11-29 2082 unsigned short op_type) 324429d74 Hariprasad Shenai 2016-08-17 2083 { 2debd3325 Harsh Jain2016-11-29 2084struct crypto_aead *tfm = crypto_aead_reqtfm(req); 2f47d5804 Harsh Jain2017-10-08 2085struct chcr_aead_ctx *aeadctx = AEAD_CTX(a_ctx(tfm)); 2debd3325 Harsh Jain2016-11-29 2086struct chcr_authenc_ctx *actx = AUTHENC_CTX(aeadctx); 2debd3325 Harsh Jain2016-11-29 2087struct chcr_aead_reqctx *reqctx = aead_request_ctx(req); 2debd3325 Harsh Jain2016-11-29 2088struct sk_buff *skb = NULL; 2debd3325 Harsh Jain2016-11-29 2089struct chcr_wr *chcr_req; 2debd3325 Harsh Jain2016-11-29 2090struct cpl_rx_phys_dsgl *phys_cpl; 2f47d5804 Harsh Jain2017-10-08 2091struct ulptx_sgl *ulptx; 2f47d5804 Harsh Jain2017-10-08 2092unsigned int transhdr_len; 3d64bd670 Harsh Jain2018-01-11 2093unsigned int dst_size = 0, temp, subtype = get_aead_subtype(tfm); 2f47d5804 Harsh Jain2017-10-08 2094unsigned int kctx_len = 0, dnents; 2debd3325 Harsh Jain2016-11-29 2095unsigned int assoclen = req->assoclen; 2debd3325 Harsh Jain2016-11-29 2096unsigned int authsize = crypto_aead_authsize(tfm); 2f47d5804 Harsh Jain2017-10-08 2097int error = -EINVAL; 2debd3325 Harsh Jain2016-11-29 2098int null = 0; 2debd3325 Harsh Jain2016-11-29 2099gfp_t flags = req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : 2debd3325 Harsh Jain2016-11-29 2100GFP_ATOMIC; 2f47d5804 Harsh Jain2017-10-08 2101struct adapter *adap = padap(a_ctx(tfm)->dev); 2debd3325 Harsh Jain2016-11-29 2102 2f47d5804 Harsh Jain2017-10-08 2103if (req->cryptlen == 0) 2f47d5804 Harsh Jain2017-10-08 2104return NULL; 2debd3325 Harsh Jain2016-11-29 2105 2f47d5804 Harsh Jain2017-10-08 2106reqctx->b0_dma = 0; 3d64bd670 Harsh Jain2018-01-11 2107if (subtype == CRYPTO_ALG_SUB_TYPE_CBC_NULL || 3d64bd670 Harsh Jain2018-01-11 2108subtype == CRYPTO_ALG_SUB_TYPE_CTR_NULL) { 2debd3325 Harsh Jain2016-11-29 2109null = 1; 2debd3325 Harsh Jain2016-11-29 2110assoclen = 0; 324429d74 Hariprasad Shenai 2016-08-17 2111} 2f47d5804 Harsh Jain2017-10-08 2112error = chcr_aead_common_init(req, op_type); 2f47d5804 Harsh Jain2017-10-08 @2113if (error) 2f47d5804 Harsh Jain2017-10-08 2114return ERR_PTR(error); 2f47d5804 Harsh Jain2017-10-08 2115dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0); 2f47d5804 Harsh Jain2017-10-08 2116dnents += sg_nents_xlen(req->dst, req->cryptlen + 2f47d5804 Harsh Jain2017-10-08 2117(op_type ? -authsize : authsize), CHCR_DST_SG_SIZE, 2f47d5804 Harsh Jain2017-10-08 2118req->assoclen); 2f47d5804 Harsh Jain2017-10-08 2119dnents += MIN_AUTH_SG; // For IV 2f47d5804 Harsh Jain2017-10-08 2120 2f47d5804 Harsh Jain2017-10-08 2121dst_size = get_space_for_phys_dsgl(dnents); 2debd3325 Harsh Jain2016-11-29 2122kctx_len = (ntohl(KEY_CONTEXT_CTX_LEN_V(aeadctx->key_ctx_hdr)) << 4) 2debd3325 Harsh Jain
[cryptodev:master 130/135] undefined reference to `_restgpr_31_x'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 9555003a3373b0cb7ca753779115f1d6f96fcab1 commit: 148b974deea927f5dbb6c468af2707b488bfa2de [130/135] crypto: aes-generic - build with -Os on gcc-7+ config: powerpc-ppc6xx_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 148b974deea927f5dbb6c468af2707b488bfa2de # save the attached .config to linux build tree make.cross ARCH=powerpc All errors (new ones prefixed by >>): crypto/aes_generic.o: In function `crypto_aes_expand_key': >> (.text+0x194): undefined reference to `_restgpr_31_x' crypto/aes_generic.o: In function `crypto_aes_set_key': (.text+0x4fc): undefined reference to `_restgpr_31_x' crypto/aes_generic.o: In function `aes_encrypt': >> aes_generic.c:(.text+0x1474): undefined reference to `_restgpr_15_x' crypto/aes_generic.o: In function `aes_decrypt': aes_generic.c:(.text+0x23fc): undefined reference to `_restgpr_15_x' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[cryptodev:master 130/134] aes_generic.c:undefined reference to `_restgpr_31_x'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: b40fa82cd6138350f723aa47b37e3e3e80906b40 commit: 148b974deea927f5dbb6c468af2707b488bfa2de [130/134] crypto: aes-generic - build with -Os on gcc-7+ config: powerpc-linkstation_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 148b974deea927f5dbb6c468af2707b488bfa2de # save the attached .config to linux build tree make.cross ARCH=powerpc All errors (new ones prefixed by >>): crypto/aes_generic.o: In function `crypto_aes_set_key': >> aes_generic.c:(.text+0x4e0): undefined reference to `_restgpr_31_x' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v2 2/2] chcr: Add support for Inline IPSec
Hi Atul, Thank you for the patch! Yet something to improve: [auto build test ERROR on cryptodev/master] [also build test ERROR on next-20171115] [cannot apply to v4.14] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/cxgb4-Add-support-for-Inline-IPSec-Tx/20171112-012558 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: x86_64-randconfig-g0-11160917 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/crypto/chelsio/chcr_core.o: In function `chcr_uld_tx_handler': >> drivers/crypto/chelsio/chcr_core.c:195: undefined reference to >> `chcr_ipsec_xmit' drivers/crypto/chelsio/chcr_core.o: In function `chcr_uld_add': >> drivers/crypto/chelsio/chcr_core.c:169: undefined reference to >> `chcr_add_xfrmops' vim +195 drivers/crypto/chelsio/chcr_core.c 152 153 static void *chcr_uld_add(const struct cxgb4_lld_info *lld) 154 { 155 struct uld_ctx *u_ctx; 156 157 /* Create the device and add it in the device list */ 158 if (!(lld->ulp_crypto & ULP_CRYPTO_LOOKASIDE)) 159 return ERR_PTR(-EOPNOTSUPP); 160 161 /* Create the device and add it in the device list */ 162 u_ctx = kzalloc(sizeof(*u_ctx), GFP_KERNEL); 163 if (!u_ctx) { 164 u_ctx = ERR_PTR(-ENOMEM); 165 goto out; 166 } 167 u_ctx->lldi = *lld; 168 if (lld->crypto & ULP_CRYPTO_IPSEC_INLINE) > 169 chcr_add_xfrmops(lld); 170 out: 171 return u_ctx; 172 } 173 174 int chcr_uld_rx_handler(void *handle, const __be64 *rsp, 175 const struct pkt_gl *pgl) 176 { 177 struct uld_ctx *u_ctx = (struct uld_ctx *)handle; 178 struct chcr_dev *dev = u_ctx->dev; 179 const struct cpl_fw6_pld *rpl = (struct cpl_fw6_pld *)rsp; 180 181 if (rpl->opcode != CPL_FW6_PLD) { 182 pr_err("Unsupported opcode\n"); 183 return 0; 184 } 185 186 if (!pgl) 187 work_handlers[rpl->opcode](dev, (unsigned char *)[1]); 188 else 189 work_handlers[rpl->opcode](dev, pgl->va); 190 return 0; 191 } 192 193 int chcr_uld_tx_handler(struct sk_buff *skb, struct net_device *dev) 194 { > 195 return chcr_ipsec_xmit(skb, dev); 196 } 197 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[cryptodev:master 125/166] FATAL: drivers/crypto/marvell/marvell-cesa: struct platform_device_id is not terminated with a NULL entry!
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 7a373fd74a8d1c4882e0236cc38345cec1393505 commit: 7b0c3d693ce65900dd3c79766185f539fa37a29a [125/166] crypto: marvell - Add a platform_device_id table config: arm-multi_v7_defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 7b0c3d693ce65900dd3c79766185f539fa37a29a # save the attached .config to linux build tree make.cross ARCH=arm All errors (new ones prefixed by >>): drivers/crypto/marvell/marvell-cesa: struct platform_device_id is 24 bytes. The last of 1 is: 0x6d 0x76 0x5f 0x63 0x72 0x79 0x70 0x74 0x6f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 >> FATAL: drivers/crypto/marvell/marvell-cesa: struct platform_device_id is not >> terminated with a NULL entry! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH RESEND 4/4] dma: caam: add dma memcpy driver
Hi Radu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on cryptodev/master] [also build test WARNING on v4.14-rc7 next-20171018] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Horia-Geant/add-CAAM-DMA-memcpy-driver/20171102-081734 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm All warnings (new ones prefixed by >>): >> WARNING: drivers/dma/caam_dma.o(.data+0x8): Section mismatch in reference >> from the variable caam_dma_driver to the function .init.text:caam_dma_probe() The variable caam_dma_driver references the function __init caam_dma_probe() If the reference is valid then annotate the variable with or __refdata (see linux/init.h) or name the variable: --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH net-next 2/2] chcr: Add support for Inline IPSec
Hi Atul, Thank you for the patch! Yet we hit a small issue. [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/cxgb4-Add-support-for-Inline-IPSec-Tx/20171029-060344 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) vim +1678 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h f2b7e78db drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Vipul Pandya 2012-12-10 1562 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1563 void t4_wol_magic_enable(struct adapter *adap, unsigned int port, 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1564 const u8 *addr); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1565 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map, 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1566u64 mask0, u64 mask1, unsigned int crc, bool enable); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1567 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1568 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox, 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1569 enum dev_master master, enum dev_state *state); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1570 int t4_fw_bye(struct adapter *adap, unsigned int mbox); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1571 int t4_early_init(struct adapter *adap, unsigned int mbox); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1572 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset); 636f9d371 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Vipul Pandya 2012-09-26 1573 int t4_fixup_host_params(struct adapter *adap, unsigned int page_size, 636f9d371 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Vipul Pandya 2012-09-26 1574unsigned int cache_line_size); 636f9d371 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Vipul Pandya 2012-09-26 1575 int t4_fw_initialize(struct adapter *adap, unsigned int mbox); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1576 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf, 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1577 unsigned int vf, unsigned int nparams, const u32 *params, 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1578 u32 *val); 8f46d4671 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Arjun Vynipadath 2017-06-23 1579 int t4_query_params_ns(struct adapter *adap, unsigned int mbox, unsigned int pf, 8f46d4671 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Arjun Vynipadath 2017-06-23 1580 unsigned int vf, unsigned int nparams, const u32 *params, 8f46d4671 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Arjun Vynipadath 2017-06-23 1581 u32 *val); 01b696141 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Hariprasad Shenai 2015-05-22 1582 int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf, 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1583 unsigned int vf, unsigned int nparams, const u32 *params, 8f46d4671 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Arjun Vynipadath 2017-06-23 1584 u32 *val, int rw, bool sleep_ok); 01b696141 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Hariprasad Shenai 2015-05-22 1585 int t4_set_params_timeout(struct adapter *adap, unsigned int mbox, 688848b14 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Anish Bhatt 2014-06-19 1586unsigned int pf, unsigned int vf, 688848b14 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Anish Bhatt 2014-06-19 1587unsigned int nparams, const u32 *params, 01b696141 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Hariprasad Shenai 2015-05-22 1588const u32 *val, int timeout); 01b696141 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Hariprasad Shenai 2015-05-22 1589 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf, 01b696141 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Hariprasad Shenai 2015-05-22 1590unsigned int vf, unsigned int nparams, const u32 *params, 688848b14 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Anish Bhatt 2014-06-19 1591
Re: [PATCH net-next 2/2] chcr: Add support for Inline IPSec
Hi Atul, Thank you for the patch! Yet we hit a small issue. [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/cxgb4-Add-support-for-Inline-IPSec-Tx/20171029-060344 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=ia64 All errors (new ones prefixed by >>): In file included from drivers/crypto/chelsio/chcr_core.h:41:0, from drivers/crypto/chelsio/chcr_ipsec.c:64: drivers/crypto/chelsio/chcr_ipsec.c: In function 'chcr_ipsec_xmit': >> drivers/net/ethernet/chelsio/cxgb4/cxgb4.h:1678:13: error: inlining failed >> in call to always_inline 'cxgb4_reclaim_completed_tx': function body not >> available inline void cxgb4_reclaim_completed_tx(struct adapter *adap, ^~ drivers/crypto/chelsio/chcr_ipsec.c:597:2: note: called from here cxgb4_reclaim_completed_tx(adap, >q, true); ^ In file included from drivers/crypto/chelsio/chcr_core.h:41:0, from drivers/crypto/chelsio/chcr_ipsec.c:64: >> drivers/net/ethernet/chelsio/cxgb4/cxgb4.h:1678:13: error: inlining failed >> in call to always_inline 'cxgb4_reclaim_completed_tx': function body not >> available inline void cxgb4_reclaim_completed_tx(struct adapter *adap, ^~ drivers/crypto/chelsio/chcr_ipsec.c:597:2: note: called from here cxgb4_reclaim_completed_tx(adap, >q, true); ^ In file included from drivers/crypto/chelsio/chcr_core.h:41:0, from drivers/crypto/chelsio/chcr_ipsec.c:64: >> drivers/net/ethernet/chelsio/cxgb4/cxgb4.h:1687:13: error: inlining failed >> in call to always_inline 'cxgb4_ring_tx_db': function body not available inline void cxgb4_ring_tx_db(struct adapter *adap, struct sge_txq *q, int n); ^~~~ drivers/crypto/chelsio/chcr_ipsec.c:657:2: note: called from here cxgb4_ring_tx_db(adap, >q, ndesc); ^~~~ In file included from drivers/crypto/chelsio/chcr_core.h:41:0, from drivers/crypto/chelsio/chcr_ipsec.c:64: >> drivers/net/ethernet/chelsio/cxgb4/cxgb4.h:1687:13: error: inlining failed >> in call to always_inline 'cxgb4_ring_tx_db': function body not available inline void cxgb4_ring_tx_db(struct adapter *adap, struct sge_txq *q, int n); ^~~~ drivers/crypto/chelsio/chcr_ipsec.c:657:2: note: called from here cxgb4_ring_tx_db(adap, >q, ndesc); ^~~~ vim +/cxgb4_reclaim_completed_tx +1678 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h f2b7e78db drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Vipul Pandya 2012-12-10 1562 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1563 void t4_wol_magic_enable(struct adapter *adap, unsigned int port, 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1564 const u8 *addr); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1565 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map, 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1566u64 mask0, u64 mask1, unsigned int crc, bool enable); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1567 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1568 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox, 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1569 enum dev_master master, enum dev_state *state); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1570 int t4_fw_bye(struct adapter *adap, unsigned int mbox); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1571 int t4_early_init(struct adapter *adap, unsigned int mbox); 625ba2c2e drivers/net/cxgb4/cxgb4.h Dimitris Michailidis 2010-04-01 1572 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset); 636f9d371 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Vipul Pandya 2012-09-26 1573 int t4_fixup_host_params(struct adapter *adap, unsigned int page_size, 636f9d371 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Vipul Pandya 2012-09-26 1574unsigned int cache_line_size); 636f9d371 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h Vipul Pandya
Re: [PATCH net-next 1/2] cxgb4: Add support for Inline IPSec Tx
Hi Atul, Thank you for the patch! Yet we hit a small issue. [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/cxgb4-Add-support-for-Inline-IPSec-Tx/20171029-060344 config: x86_64-kexec (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/net//ethernet/chelsio/cxgb4/sge.c: In function 't4_eth_xmit': >> drivers/net//ethernet/chelsio/cxgb4/sge.c:1198:6: error: implicit >> declaration of function 'xfrm_offload' >> [-Werror=implicit-function-declaration] if (xfrm_offload(skb) && !ssi->gso_size) ^~~~ cc1: some warnings being treated as errors vim +/xfrm_offload +1198 drivers/net//ethernet/chelsio/cxgb4/sge.c 1177 1178 /* 1179 * The chip min packet length is 10 octets but play safe and reject 1180 * anything shorter than an Ethernet header. 1181 */ 1182 if (unlikely(skb->len < ETH_HLEN)) { 1183 out_free: dev_kfree_skb_any(skb); 1184 return NETDEV_TX_OK; 1185 } 1186 1187 /* Discard the packet if the length is greater than mtu */ 1188 max_pkt_len = ETH_HLEN + dev->mtu; 1189 if (skb_vlan_tagged(skb)) 1190 max_pkt_len += VLAN_HLEN; 1191 if (!skb_shinfo(skb)->gso_size && (unlikely(skb->len > max_pkt_len))) 1192 goto out_free; 1193 1194 pi = netdev_priv(dev); 1195 adap = pi->adapter; 1196 ssi = skb_shinfo(skb); 1197 > 1198 if (xfrm_offload(skb) && !ssi->gso_size) 1199 return adap->uld[CXGB4_ULD_CRYPTO].tx_handler(skb, dev); 1200 1201 qidx = skb_get_queue_mapping(skb); 1202 if (ptp_enabled) { 1203 spin_lock(>ptp_lock); 1204 if (!(adap->ptp_tx_skb)) { 1205 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS; 1206 adap->ptp_tx_skb = skb_get(skb); 1207 } else { 1208 spin_unlock(>ptp_lock); 1209 goto out_free; 1210 } 1211 q = >sge.ptptxq; 1212 } else { 1213 q = >sge.ethtxq[qidx + pi->first_qset]; 1214 } 1215 skb_tx_timestamp(skb); 1216 1217 cxgb4_reclaim_completed_tx(adap, >q, true); 1218 cntrl = TXPKT_L4CSUM_DIS_F | TXPKT_IPCSUM_DIS_F; 1219 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[PATCH] crypto: ccp: fix eno.cocci warnings
drivers/crypto/ccp/psp-dev.c:311:5-11: ERROR: allocation function on line 310 returns NULL not ERR_PTR on failure The various basic memory allocation functions don't return ERR_PTR Generated by: scripts/coccinelle/null/eno.cocci Fixes: 7d4ce155f344 ("crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support") CC: Brijesh SinghSigned-off-by: Fengguang Wu --- psp-dev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/crypto/ccp/psp-dev.c +++ b/drivers/crypto/ccp/psp-dev.c @@ -308,7 +308,7 @@ static void *copy_user_blob(u64 __user u return ERR_PTR(-EINVAL); data = kmalloc(len, GFP_KERNEL); - if (IS_ERR(data)) + if (!data) return ERR_PTR(-ENOMEM); if (copy_from_user(data, (void __user *)(uintptr_t)uaddr, len))
Re: [Part2 PATCH v4 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support
Hi Brijesh, [auto build test WARNING on kvm/linux-next] [also build test WARNING on v4.14-rc1 next-20170922] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Brijesh-Singh/x86-Secure-Encrypted-Virtualization-AMD/20170923-033600 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next coccinelle warnings: (new ones prefixed by >>) >> drivers/crypto/ccp/psp-dev.c:311:5-11: ERROR: allocation function on line >> 310 returns NULL not ERR_PTR on failure Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[cryptodev:master 21/61] htmldocs: include/crypto/hash.h:89: warning: duplicate section name 'Note'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: f0e2ce58f853634d7ad1a418a49bd5fbd556227c commit: 560b1a82ee87288c18aca31ee3053272c3737fe5 [21/61] crypto: doc - clarify return values for async hash methods reproduce: make htmldocs All warnings (new ones prefixed by >>): WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick (https://www.imagemagick.org) kernel/trace/blktrace.c:818: warning: No description found for parameter 'cgid' >> include/crypto/hash.h:89: warning: duplicate section name 'Note' include/crypto/hash.h:95: warning: duplicate section name 'Note' include/crypto/hash.h:102: warning: duplicate section name 'Note' >> include/crypto/hash.h:89: warning: duplicate section name 'Note' include/crypto/hash.h:95: warning: duplicate section name 'Note' include/crypto/hash.h:102: warning: duplicate section name 'Note' >> include/crypto/hash.h:89: warning: duplicate section name 'Note' include/crypto/hash.h:95: warning: duplicate section name 'Note' include/crypto/hash.h:102: warning: duplicate section name 'Note' >> include/crypto/hash.h:89: warning: duplicate section name 'Note' include/crypto/hash.h:95: warning: duplicate section name 'Note' include/crypto/hash.h:102: warning: duplicate section name 'Note' >> include/crypto/hash.h:89: warning: duplicate section name 'Note' include/crypto/hash.h:95: warning: duplicate section name 'Note' include/crypto/hash.h:102: warning: duplicate section name 'Note' >> include/crypto/hash.h:89: warning: duplicate section name 'Note' include/crypto/hash.h:95: warning: duplicate section name 'Note' include/crypto/hash.h:102: warning: duplicate section name 'Note' >> include/crypto/hash.h:89: warning: duplicate section name 'Note' include/crypto/hash.h:95: warning: duplicate section name 'Note' include/crypto/hash.h:102: warning: duplicate section name 'Note' >> include/crypto/hash.h:89: warning: duplicate section name 'Note' include/crypto/hash.h:95: warning: duplicate section name 'Note' include/crypto/hash.h:102: warning: duplicate section name 'Note' include/linux/sync_file.h:51: warning: No description found for parameter 'flags' drivers/gpio/gpiolib.c:593: warning: No description found for parameter '16' drivers/gpio/gpiolib.c:593: warning: Excess struct/union/enum/typedef member 'events' description in 'lineevent_state' include/linux/usb/gadget.h:232: warning: No description found for parameter 'claimed' include/linux/usb/gadget.h:232: warning: No description found for parameter 'enabled' include/linux/usb/gadget.h:414: warning: No description found for parameter 'quirk_altset_not_supp' include/linux/usb/gadget.h:414: warning: No description found for parameter 'quirk_stall_not_supp' include/linux/usb/gadget.h:414: warning: No description found for parameter 'quirk_zlp_not_supp' fs/inode.c:1680: warning: No description found for parameter 'rcu' include/linux/jbd2.h:443: warning: No description found for parameter 'i_transaction' include/linux/jbd2.h:443: warning: No description found for parameter 'i_next_transaction' include/linux/jbd2.h:443: warning: No description found for parameter 'i_list' include/linux/jbd2.h:443: warning: No description found for parameter 'i_vfs_inode' include/linux/jbd2.h:443: warning: No description found for parameter 'i_flags' include/linux/jbd2.h:497: warning: No description found for parameter 'h_rsv_handle' include/linux/jbd2.h:497: warning: No description found for parameter 'h_reserved' include/linux/jbd2.h:497: warning: No description found for parameter 'h_type' include/linux/jbd2.h:497: warning: No description found for parameter 'h_line_no' include/linux/jbd2.h:497: warning: No description found for parameter 'h_start_jiffies' include/linux/jbd2.h:497: warning: No description found for parameter 'h_requested_credits' include/linux/jbd2.h:497: warning: No description found for parameter 'saved_alloc_context' include/linux/jbd2.h:1050: warning: No description found for parameter 'j_chkpt_bhs' include/linux/jbd2.h:1050: warning: No description found for parameter 'j_devname' include/linux/jbd2.h:1050: warning: No description found for parameter 'j_average_commit_time' include/linux/jbd2.h:1050: warning: No description found for parameter 'j_min_batch_time' include/linux/jbd2.h:1050: warning: No description found for parameter 'j_max_batch_time' include/linux/jbd2.h:1050: warning: No description found for parameter 'j_commit_callback' include/linux/jbd2.h:1050: warning: No description found for parameter 'j_failed_commit' include/linux/jbd2.h:1050: warning: No description found for parameter 'j_chksum_driver' include/linux/jbd2.h:1050: warning: No description found for parameter 'j_csum_seed' fs/jbd2/transaction.c:511: warning: No description found for parameter 'type'
Re: [PATCH] crypto: s5p-sss: Add HASH support for Exynos
Hi Kamil, [auto build test WARNING on cryptodev/master] [also build test WARNING on v4.13 next-20170915] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Kamil-Konieczny/crypto-s5p-sss-Add-HASH-support-for-Exynos/20170915-161309 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: tile-allmodconfig (attached as .config) compiler: tilegx-linux-gcc (GCC) 4.6.2 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=tile All warnings (new ones prefixed by >>): drivers//crypto/s5p-sss.c: In function 's5p_hash_xmit_dma': >> drivers//crypto/s5p-sss.c:1153:2: warning: format '%d' expects argument of >> type 'int', but argument 5 has type 'size_t' [-Wformat] vim +1153 drivers//crypto/s5p-sss.c 1131 1132 /** 1133 * s5p_hash_xmit_dma - start DMA hash processing 1134 * @dd: secss device 1135 * @length: length for request 1136 * @final: 0=not final 1137 * 1138 * Map ctx->sg into DMA_TO_DEVICE, 1139 * remember sg and cnt in device dd->hash_sg_iter, dd->hash_sg_cnt 1140 * so it can be used in loop inside irq handler. 1141 * Update ctx->digcnt, need this to keep number of processed bytes 1142 * for last final/finup request. 1143 * Set dma address and length, this starts DMA, 1144 * return with -EINPROGRESS. 1145 * HW HASH block will issue signal for irq handler. 1146 */ 1147 static int s5p_hash_xmit_dma(struct s5p_aes_dev *dd, size_t length, 1148int final) 1149 { 1150 struct s5p_hash_reqctx *ctx = ahash_request_ctx(dd->hash_req); 1151 int cnt; 1152 > 1153 dev_dbg(dd->dev, "xmit_dma: digcnt: %lld, length: %d, final: > %d\n", 1154 ctx->digcnt, length, final); 1155 1156 cnt = dma_map_sg(dd->dev, ctx->sg, ctx->sg_len, DMA_TO_DEVICE); 1157 if (!cnt) { 1158 dev_err(dd->dev, "dma_map_sg error\n"); 1159 set_bit(HASH_FLAGS_ERROR, >flags); 1160 return -EINVAL; 1161 } 1162 1163 FLOW_LOG("xmit_dma"); 1164 set_bit(HASH_FLAGS_DMA_ACTIVE, >hash_flags); 1165 1166 dd->hash_sg_iter = ctx->sg; 1167 dd->hash_sg_cnt = cnt; 1168 FLOW_LOG("xmit_dma cnt=%d final=%d len=%d", cnt, final, length); 1169 1170 s5p_hash_write_ctrl(dd, length, final); 1171 1172 /* update digcnt in request */ 1173 ctx->digcnt += length; 1174 ctx->total -= length; 1175 1176 /* catch last interrupt */ 1177 if (final) 1178 set_bit(HASH_FLAGS_FINAL, >hash_flags); 1179 1180 s5p_set_dma_hashdata(dd, dd->hash_sg_iter); /* DMA starts */ 1181 1182 return -EINPROGRESS; 1183 } 1184 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v6 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY
Hi Gilad, [auto build test ERROR on cryptodev/master] [also build test ERROR on v4.13-rc6 next-20170823] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Gilad-Ben-Yossef/crypto-change-transient-busy-return-code-to-EAGAIN/20170824-180606 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm All error/warnings (new ones prefixed by >>): drivers/crypto/marvell/cesa.c: In function 'mv_cesa_queue_req': >> drivers/crypto/marvell/cesa.c:187:3: error: expected ')' before >> 'mv_cesa_tdma_chain' mv_cesa_tdma_chain(engine, creq); ^~ >> drivers/crypto/marvell/cesa.c:196:1: error: expected expression before '}' >> token } ^ >> drivers/crypto/marvell/cesa.c:196:1: warning: control reaches end of >> non-void function [-Wreturn-type] } ^ vim +187 drivers/crypto/marvell/cesa.c f63601fd6 Boris Brezillon 2015-06-18 176 53da740fe Romain Perier2016-06-21 177 int mv_cesa_queue_req(struct crypto_async_request *req, 53da740fe Romain Perier2016-06-21 178struct mv_cesa_req *creq) f63601fd6 Boris Brezillon 2015-06-18 179 { f63601fd6 Boris Brezillon 2015-06-18 180 int ret; bf8f91e71 Romain Perier2016-06-21 181 struct mv_cesa_engine *engine = creq->engine; f63601fd6 Boris Brezillon 2015-06-18 182 bf8f91e71 Romain Perier2016-06-21 183 spin_lock_bh(>lock); bf8f91e71 Romain Perier2016-06-21 184 ret = crypto_enqueue_request(>queue, req); 603e989eb Romain Perier2016-07-22 185 if ((mv_cesa_req_get_type(creq) == CESA_DMA_REQ) && 3a1c7473a Gilad Ben-Yossef 2017-08-21 186 (ret == -EINPROGRESS || ret == -EBUSY) 603e989eb Romain Perier2016-07-22 @187 mv_cesa_tdma_chain(engine, creq); bf8f91e71 Romain Perier2016-06-21 188 spin_unlock_bh(>lock); f63601fd6 Boris Brezillon 2015-06-18 189 f63601fd6 Boris Brezillon 2015-06-18 190 if (ret != -EINPROGRESS) f63601fd6 Boris Brezillon 2015-06-18 191 return ret; f63601fd6 Boris Brezillon 2015-06-18 192 85030c516 Romain Perier2016-06-21 193 mv_cesa_rearm_engine(engine); f63601fd6 Boris Brezillon 2015-06-18 194 f63601fd6 Boris Brezillon 2015-06-18 195 return -EINPROGRESS; f63601fd6 Boris Brezillon 2015-06-18 @196 } f63601fd6 Boris Brezillon 2015-06-18 197 :: The code at line 187 was first introduced by commit :: 603e989ebee21bfa9cddf8390d0515a07324edc8 crypto: marvell - Don't chain at DMA level when backlog is disabled :: TO: Romain Perier:: CC: Herbert Xu --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH V2] staging: ccree: Fix format/argument mismatches
Hi Joe, [auto build test WARNING on staging/staging-testing] [also build test WARNING on next-20170803] [cannot apply to v4.13-rc3] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Joe-Perches/staging-ccree-Fix-format-argument-mismatches/20170731-191055 config: m32r-allmodconfig (attached as .config) compiler: m32r-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=m32r All warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:13:0, from drivers/staging/ccree/ssi_driver.c:17: drivers/staging/ccree/ssi_driver.c: In function 'init_cc_regs': >> drivers/staging/ccree/ssi_driver.c:180:16: warning: format '%X' expects >> argument of type 'unsigned int', but argument 2 has type 'long unsigned int' >> [-Wformat=] SSI_LOG_DEBUG("AXIM_CFG=0x%08X\n", CC_HAL_READ_REGISTER(CC_REG_OFFSET(CRY_KERNEL, AXIM_CFG))); ^ include/linux/printk.h:136:11: note: in definition of macro 'no_printk' printk(fmt, ##__VA_ARGS__); \ ^~~ >> drivers/staging/ccree/ssi_driver.c:180:2: note: in expansion of macro >> 'SSI_LOG_DEBUG' SSI_LOG_DEBUG("AXIM_CFG=0x%08X\n", CC_HAL_READ_REGISTER(CC_REG_OFFSET(CRY_KERNEL, AXIM_CFG))); ^ In file included from drivers/staging/ccree/ssi_driver.c:64:0: drivers/staging/ccree/ssi_driver.c: In function 'init_cc_resources': include/linux/kern_levels.h:4:18: warning: format '%X' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ drivers/staging/ccree/ssi_driver.h:95:9: note: in definition of macro 'SSI_LOG' printk(level "cc715ree::%s: " format, __func__, ##__VA_ARGS__) ^ include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH' #define KERN_INFO KERN_SOH "6" /* informational */ ^~~~ drivers/staging/ccree/ssi_driver.c:319:10: note: in expansion of macro 'KERN_INFO' SSI_LOG(KERN_INFO, "ARM CryptoCell %s Driver: HW version 0x%08X, Driver version %s\n", SSI_DEV_NAME_STR, ^ vim +180 drivers/staging/ccree/ssi_driver.c abefd674 Gilad Ben-Yossef 2017-04-23 @17 #include abefd674 Gilad Ben-Yossef 2017-04-23 18 #include abefd674 Gilad Ben-Yossef 2017-04-23 19 abefd674 Gilad Ben-Yossef 2017-04-23 20 #include abefd674 Gilad Ben-Yossef 2017-04-23 21 #include abefd674 Gilad Ben-Yossef 2017-04-23 22 #include abefd674 Gilad Ben-Yossef 2017-04-23 23 #include fe0a1951 Gilad Ben-Yossef 2017-04-23 24 #include abefd674 Gilad Ben-Yossef 2017-04-23 25 #include abefd674 Gilad Ben-Yossef 2017-04-23 26 #include 302ef8eb Gilad Ben-Yossef 2017-04-23 27 #include abefd674 Gilad Ben-Yossef 2017-04-23 28 abefd674 Gilad Ben-Yossef 2017-04-23 29 #include abefd674 Gilad Ben-Yossef 2017-04-23 30 #include abefd674 Gilad Ben-Yossef 2017-04-23 31 #include abefd674 Gilad Ben-Yossef 2017-04-23 32 #include abefd674 Gilad Ben-Yossef 2017-04-23 33 #include abefd674 Gilad Ben-Yossef 2017-04-23 34 #include abefd674 Gilad Ben-Yossef 2017-04-23 35 #include abefd674 Gilad Ben-Yossef 2017-04-23 36 #include abefd674 Gilad Ben-Yossef 2017-04-23 37 #include abefd674 Gilad Ben-Yossef 2017-04-23 38 #include abefd674 Gilad Ben-Yossef 2017-04-23 39 #include abefd674 Gilad Ben-Yossef 2017-04-23 40 #include abefd674 Gilad Ben-Yossef 2017-04-23 41 #include abefd674 Gilad Ben-Yossef 2017-04-23 42 #include abefd674 Gilad Ben-Yossef 2017-04-23 43 #include abefd674 Gilad Ben-Yossef 2017-04-23 44 #include abefd674 Gilad Ben-Yossef 2017-04-23 45 #include abefd674 Gilad Ben-Yossef 2017-04-23 46 #include abefd674 Gilad Ben-Yossef 2017-04-23 47 #include abefd674 Gilad Ben-Yossef 2017-04-23 48 #include abefd674 Gilad Ben-Yossef 2017-04-23 49 #include abefd674 Gilad Ben-Yossef 2017-04-23 50 #include abefd674 Gilad Ben-Yossef 2017-04-23 51 abefd674 Gilad Ben-Yossef 2017-04-23 52 /* cache.h required for L1_CACHE_ALIGN() and cache_line_size() */ abefd674 Gilad Ben-Yossef 2017-04-23 53 #include abefd674 Gilad Ben-Yossef 2017-04-23 54 #include abefd674 Gilad Ben-Yossef 2017-04-23 55 #include abefd674 Gilad Ben-Yossef 2017-04-23 56 #include abefd674 Gilad Ben-Yossef 2017-04-23 57 #include abefd674 Gilad Ben-Yossef 2017-04-23 58 #include abefd674 Gilad Ben-Yossef 2017-04-23 59 #include 675ef02f Gilad Ben-Yossef 2017-06-25 60 #include d255b343 Gilad Ben-Yossef 2017-06-25 61 #include abefd674 Gilad Ben-Yossef 2017-04-23 62 abefd674 Gilad
Re: [PATCH v2 2/2] crypto/algapi - make crypto_xor() take separate dst and src arguments
Hi Ard, [auto build test ERROR on cryptodev/master] [also build test ERROR on v4.13-rc1 next-20170721] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ard-Biesheuvel/crypto-algapi-use-separate-dst-and-src-operands-for-__crypto_xor/20170719-090848 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: powerpc-allyesconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=powerpc All errors (new ones prefixed by >>): drivers/crypto/vmx/aes_ctr.c: In function 'p8_aes_ctr_final': drivers/crypto/vmx/aes_ctr.c:107:29: warning: passing argument 3 of 'crypto_xor' makes integer from pointer without a cast [-Wint-conversion] crypto_xor(dst, keystream, src, nbytes); ^~~ In file included from include/crypto/scatterwalk.h:19:0, from drivers/crypto/vmx/aes_ctr.c:29: include/crypto/algapi.h:197:20: note: expected 'unsigned int' but argument is of type 'u8 * {aka unsigned char *}' static inline void crypto_xor(u8 *dst, const u8 *src, unsigned int size) ^~ >> drivers/crypto/vmx/aes_ctr.c:107:2: error: too many arguments to function >> 'crypto_xor' crypto_xor(dst, keystream, src, nbytes); ^~ In file included from include/crypto/scatterwalk.h:19:0, from drivers/crypto/vmx/aes_ctr.c:29: include/crypto/algapi.h:197:20: note: declared here static inline void crypto_xor(u8 *dst, const u8 *src, unsigned int size) ^~ vim +/crypto_xor +107 drivers/crypto/vmx/aes_ctr.c 89 90 static void p8_aes_ctr_final(struct p8_aes_ctr_ctx *ctx, 91 struct blkcipher_walk *walk) 92 { 93 u8 *ctrblk = walk->iv; 94 u8 keystream[AES_BLOCK_SIZE]; 95 u8 *src = walk->src.virt.addr; 96 u8 *dst = walk->dst.virt.addr; 97 unsigned int nbytes = walk->nbytes; 98 99 preempt_disable(); 100 pagefault_disable(); 101 enable_kernel_vsx(); 102 aes_p8_encrypt(ctrblk, keystream, >enc_key); 103 disable_kernel_vsx(); 104 pagefault_enable(); 105 preempt_enable(); 106 > 107 crypto_xor(dst, keystream, src, nbytes); 108 crypto_inc(ctrblk, AES_BLOCK_SIZE); 109 } 110 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v2 2/3] crypto: ccp - Introduce the AMD Secure Processor device
Hi Brijesh, [auto build test ERROR on cryptodev/master] [also build test ERROR on next-20170705] [cannot apply to v4.12] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Brijesh-Singh/Introduce-AMD-Secure-Processor-device/20170625-064400 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: x86_64-randconfig-x016-07060921 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> ERROR: "ccp_dev_resume" [drivers/crypto/ccp/ccp.ko] undefined! >> ERROR: "ccp_dev_suspend" [drivers/crypto/ccp/ccp.ko] undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH 3/7] staging: ccree: add support for older HW revisions
Hi Gilad, [auto build test WARNING on staging/staging-testing] [also build test WARNING on next-20170623] [cannot apply to v4.12-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Gilad-Ben-Yossef/staging-ccree-bug-fixes-and-TODO-items-for-4-13/20170623-134445 config: x86_64-randconfig-b0-06241039 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): drivers/staging/ccree/ssi_sram_mgr.c: In function 'ssi_sram_mgr_init': >> drivers/staging/ccree/ssi_sram_mgr.c:76: warning: format '%x' expects type >> 'unsigned int', but argument 3 has type 'dma_addr_t' vim +76 drivers/staging/ccree/ssi_sram_mgr.c 60 /* Allocate "this" context */ 61 drvdata->sram_mgr_handle = kzalloc( 62 sizeof(struct ssi_sram_mgr_ctx), GFP_KERNEL); 63 if (!drvdata->sram_mgr_handle) { 64 SSI_LOG_ERR("Not enough memory to allocate SRAM_MGR ctx (%zu)\n", 65 sizeof(struct ssi_sram_mgr_ctx)); 66 rc = -ENOMEM; 67 goto out; 68 } 69 smgr_ctx = drvdata->sram_mgr_handle; 70 71 if (drvdata->hw_rev < CC_HW_REV_712) { 72 /* Pool starts after ROM bytes */ 73 start = (dma_addr_t)CC_HAL_READ_REGISTER(CC_REG_OFFSET(HOST_RGF, 74 HOST_SEP_SRAM_THRESHOLD)); 75 if ((start & 0x3) != 0) { > 76 SSI_LOG_ERR("Invalid SRAM offset 0x%x\n", start); 77 rc = -ENODEV; 78 goto out; 79 } 80 } 81 82 smgr_ctx->sram_free_offset = start; 83 return 0; 84 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[RFC PATCH linux-next] crypto: cvm_encrypt() can be static
Signed-off-by: Fengguang Wu--- cptvf_algs.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/cavium/cpt/cptvf_algs.c b/drivers/crypto/cavium/cpt/cptvf_algs.c index 443c362..4303674 100644 --- a/drivers/crypto/cavium/cpt/cptvf_algs.c +++ b/drivers/crypto/cavium/cpt/cptvf_algs.c @@ -222,12 +222,12 @@ static inline int cvm_enc_dec(struct ablkcipher_request *req, u32 enc) return -EINPROGRESS; } -int cvm_encrypt(struct ablkcipher_request *req) +static int cvm_encrypt(struct ablkcipher_request *req) { return cvm_enc_dec(req, true); } -int cvm_decrypt(struct ablkcipher_request *req) +static int cvm_decrypt(struct ablkcipher_request *req) { return cvm_enc_dec(req, false); }
[linux-next:master 7715/9581] drivers/crypto/cavium/cpt/cptvf_algs.c:225:5: sparse: symbol 'cvm_encrypt' was not declared. Should it be static?
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: a73468728fd8f34ccbd7c60f0808024ae491f4d6 commit: e2eb769ed0bdc06cb523f475db411ce3a5f1c465 [7715/9581] crypto: cavium - Remove the individual encrypt/decrypt function for each algorithm reproduce: # apt-get install sparse git checkout e2eb769ed0bdc06cb523f475db411ce3a5f1c465 make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) drivers/crypto/cavium/cpt/cptvf_algs.c:135:21: sparse: incorrect type in assignment (different base types) drivers/crypto/cavium/cpt/cptvf_algs.c:135:21:expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/crypto/cavium/cpt/cptvf_algs.c:135:21:got restricted __be64 [usertype] drivers/crypto/cavium/cpt/cptvf_algs.c:137:25: sparse: incorrect type in assignment (different base types) drivers/crypto/cavium/cpt/cptvf_algs.c:137:25:expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/crypto/cavium/cpt/cptvf_algs.c:137:25:got restricted __be64 [usertype] >> drivers/crypto/cavium/cpt/cptvf_algs.c:225:5: sparse: symbol 'cvm_encrypt' >> was not declared. Should it be static? drivers/crypto/cavium/cpt/cptvf_algs.c:135:21: sparse: incorrect type in assignment (different base types) drivers/crypto/cavium/cpt/cptvf_algs.c:135:21:expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/crypto/cavium/cpt/cptvf_algs.c:135:21:got restricted __be64 [usertype] drivers/crypto/cavium/cpt/cptvf_algs.c:137:25: sparse: incorrect type in assignment (different base types) drivers/crypto/cavium/cpt/cptvf_algs.c:137:25:expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/crypto/cavium/cpt/cptvf_algs.c:137:25:got restricted __be64 [usertype] >> drivers/crypto/cavium/cpt/cptvf_algs.c:230:5: sparse: symbol 'cvm_decrypt' >> was not declared. Should it be static? drivers/crypto/cavium/cpt/cptvf_algs.c:235:5: sparse: symbol 'cvm_xts_setkey' was not declared. Should it be static? drivers/crypto/cavium/cpt/cptvf_algs.c:321:5: sparse: symbol 'cvm_enc_dec_init' was not declared. Should it be static? Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH 3/7] staging: ccree: add support for older HW revisions
Hi Gilad, [auto build test WARNING on staging/staging-testing] [also build test WARNING on next-20170622] [cannot apply to v4.12-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Gilad-Ben-Yossef/staging-ccree-bug-fixes-and-TODO-items-for-4-13/20170623-134445 config: sparc64-allmodconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sparc64 All warnings (new ones prefixed by >>): In file included from drivers/staging/ccree/ssi_sram_mgr.c:17:0: drivers/staging/ccree/ssi_sram_mgr.c: In function 'ssi_sram_mgr_init': include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ drivers/staging/ccree/ssi_driver.h:97:9: note: in definition of macro 'SSI_LOG' printk(level "ccree::%s: " format, __func__, ##__VA_ARGS__) ^ include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~ >> drivers/staging/ccree/ssi_driver.h:98:42: note: in expansion of macro >> 'KERN_ERR' #define SSI_LOG_ERR(format, ...) SSI_LOG(KERN_ERR, format, ##__VA_ARGS__) ^~~~ >> drivers/staging/ccree/ssi_sram_mgr.c:76:4: note: in expansion of macro >> 'SSI_LOG_ERR' SSI_LOG_ERR("Invalid SRAM offset 0x%x\n", start); ^~~ vim +/KERN_ERR +98 drivers/staging/ccree/ssi_driver.h abefd674 Gilad Ben-Yossef 2017-04-23 91 /* AXI_ID is not actually the AXI ID of the transaction but the value of AXI_ID 250a00a7 Derek Robson 2017-05-30 92 * field in the HW descriptor. The DMA engine +8 that value. 250a00a7 Derek Robson 2017-05-30 93 */ abefd674 Gilad Ben-Yossef 2017-04-23 94 abefd674 Gilad Ben-Yossef 2017-04-23 95 /* Logging macros */ abefd674 Gilad Ben-Yossef 2017-04-23 96 #define SSI_LOG(level, format, ...) \ 891144d7 Gilad Ben-Yossef 2017-06-22 @97 printk(level "ccree::%s: " format, __func__, ##__VA_ARGS__) abefd674 Gilad Ben-Yossef 2017-04-23 @98 #define SSI_LOG_ERR(format, ...) SSI_LOG(KERN_ERR, format, ##__VA_ARGS__) abefd674 Gilad Ben-Yossef 2017-04-23 99 #define SSI_LOG_WARNING(format, ...) SSI_LOG(KERN_WARNING, format, ##__VA_ARGS__) abefd674 Gilad Ben-Yossef 2017-04-23 100 #define SSI_LOG_NOTICE(format, ...) SSI_LOG(KERN_NOTICE, format, ##__VA_ARGS__) abefd674 Gilad Ben-Yossef 2017-04-23 101 #define SSI_LOG_INFO(format, ...) SSI_LOG(KERN_INFO, format, ##__VA_ARGS__) :: The code at line 98 was first introduced by commit :: abefd6741d540fc624e73a2a3bdef2397bcbd064 staging: ccree: introduce CryptoCell HW driver :: TO: Gilad Ben-Yossef:: CC: Greg Kroah-Hartman --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[cryptodev:master 62/75] crypto/rsa-pkcs1pad.c:680:21: error: assignment from incompatible pointer type
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 48df28b85991ac67a2270f0bb818221527834b78 commit: 561f8e2df990a7a2859a98bd208d0f7dc932c3f7 [62/75] crypto: akcipher - assume key is already set in maxsize config: x86_64-randconfig-x019-201724 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout 561f8e2df990a7a2859a98bd208d0f7dc932c3f7 # save the attached .config to linux build tree make ARCH=x86_64 Note: the cryptodev/master HEAD 48df28b85991ac67a2270f0bb818221527834b78 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): crypto/rsa-pkcs1pad.c: In function 'pkcs1pad_create': >> crypto/rsa-pkcs1pad.c:680:21: error: assignment from incompatible pointer >> type [-Werror=incompatible-pointer-types] inst->alg.max_size = pkcs1pad_get_max_size; ^ cc1: some warnings being treated as errors vim +680 crypto/rsa-pkcs1pad.c a49de377 Tadeusz Struk 2016-03-03 664 CRYPTO_MAX_ALG_NAME) c0d20d22 Herbert Xu 2016-06-29 665 goto out_drop_alg; 3d5b1ecd Andrzej Zaborowski 2015-12-05 666 3d5b1ecd Andrzej Zaborowski 2015-12-05 667 inst->alg.base.cra_flags = rsa_alg->base.cra_flags & CRYPTO_ALG_ASYNC; 3d5b1ecd Andrzej Zaborowski 2015-12-05 668 inst->alg.base.cra_priority = rsa_alg->base.cra_priority; 3d5b1ecd Andrzej Zaborowski 2015-12-05 669 inst->alg.base.cra_ctxsize = sizeof(struct pkcs1pad_ctx); 3d5b1ecd Andrzej Zaborowski 2015-12-05 670 3d5b1ecd Andrzej Zaborowski 2015-12-05 671 inst->alg.init = pkcs1pad_init_tfm; 3d5b1ecd Andrzej Zaborowski 2015-12-05 672 inst->alg.exit = pkcs1pad_exit_tfm; 3d5b1ecd Andrzej Zaborowski 2015-12-05 673 3d5b1ecd Andrzej Zaborowski 2015-12-05 674 inst->alg.encrypt = pkcs1pad_encrypt; 3d5b1ecd Andrzej Zaborowski 2015-12-05 675 inst->alg.decrypt = pkcs1pad_decrypt; 3d5b1ecd Andrzej Zaborowski 2015-12-05 676 inst->alg.sign = pkcs1pad_sign; 3d5b1ecd Andrzej Zaborowski 2015-12-05 677 inst->alg.verify = pkcs1pad_verify; 3d5b1ecd Andrzej Zaborowski 2015-12-05 678 inst->alg.set_pub_key = pkcs1pad_set_pub_key; 3d5b1ecd Andrzej Zaborowski 2015-12-05 679 inst->alg.set_priv_key = pkcs1pad_set_priv_key; 3d5b1ecd Andrzej Zaborowski 2015-12-05 @680 inst->alg.max_size = pkcs1pad_get_max_size; 3d5b1ecd Andrzej Zaborowski 2015-12-05 681 inst->alg.reqsize = sizeof(struct pkcs1pad_request) + rsa_alg->reqsize; 3d5b1ecd Andrzej Zaborowski 2015-12-05 682 3d5b1ecd Andrzej Zaborowski 2015-12-05 683 inst->free = pkcs1pad_free; 3d5b1ecd Andrzej Zaborowski 2015-12-05 684 3d5b1ecd Andrzej Zaborowski 2015-12-05 685 err = akcipher_register_instance(tmpl, inst); 3d5b1ecd Andrzej Zaborowski 2015-12-05 686 if (err) c0d20d22 Herbert Xu 2016-06-29 687 goto out_drop_alg; 3d5b1ecd Andrzej Zaborowski 2015-12-05 688 :: The code at line 680 was first introduced by commit :: 3d5b1ecdea6fb94f8c61554fcb2ba776a2d3d0e6 crypto: rsa - RSA padding algorithm :: TO: Andrzej Zaborowski:: CC: Herbert Xu --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v3 03/13] random: invalidate batched entropy after crng init
Hi Jason, [auto build test WARNING on linus/master] [also build test WARNING on v4.12-rc4] [cannot apply to next-20170607] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jason-A-Donenfeld/Unseeded-In-Kernel-Randomness-Fixes/20170606-171249 config: sh-ul2_defconfig (attached as .config) compiler: sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sh Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): In file included from include/linux/spinlock.h:53:0, from include/linux/rcupdate.h:38, from include/linux/rculist.h:10, from include/linux/pid.h:4, from include/linux/sched.h:13, from include/linux/utsname.h:5, from drivers//char/random.c:238: drivers//char/random.c: In function 'get_random_u64': >> include/linux/irqflags.h:69:3: warning: 'flags' may be used uninitialized in >> this function [-Wmaybe-uninitialized] arch_local_irq_restore(flags); \ ^~ drivers//char/random.c:2063:16: note: 'flags' was declared here unsigned long flags; ^ In file included from include/linux/spinlock.h:53:0, from include/linux/rcupdate.h:38, from include/linux/rculist.h:10, from include/linux/pid.h:4, from include/linux/sched.h:13, from include/linux/utsname.h:5, from drivers//char/random.c:238: drivers//char/random.c: In function 'get_random_u32': >> include/linux/irqflags.h:69:3: warning: 'flags' may be used uninitialized in >> this function [-Wmaybe-uninitialized] arch_local_irq_restore(flags); \ ^~ drivers//char/random.c:2095:16: note: 'flags' was declared here unsigned long flags; ^ -- In file included from include/linux/spinlock.h:53:0, from include/linux/rcupdate.h:38, from include/linux/rculist.h:10, from include/linux/pid.h:4, from include/linux/sched.h:13, from include/linux/utsname.h:5, from drivers/char/random.c:238: drivers/char/random.c: In function 'get_random_u64': >> include/linux/irqflags.h:69:3: warning: 'flags' may be used uninitialized in >> this function [-Wmaybe-uninitialized] arch_local_irq_restore(flags); \ ^~ drivers/char/random.c:2063:16: note: 'flags' was declared here unsigned long flags; ^ In file included from include/linux/spinlock.h:53:0, from include/linux/rcupdate.h:38, from include/linux/rculist.h:10, from include/linux/pid.h:4, from include/linux/sched.h:13, from include/linux/utsname.h:5, from drivers/char/random.c:238: drivers/char/random.c: In function 'get_random_u32': >> include/linux/irqflags.h:69:3: warning: 'flags' may be used uninitialized in >> this function [-Wmaybe-uninitialized] arch_local_irq_restore(flags); \ ^~ drivers/char/random.c:2095:16: note: 'flags' was declared here unsigned long flags; ^ vim +/flags +69 include/linux/irqflags.h 81d68a96a Steven Rostedt 2008-05-12 53 # define start_critical_timings() do { } while (0) 81d68a96a Steven Rostedt 2008-05-12 54 #endif 81d68a96a Steven Rostedt 2008-05-12 55 df9ee2927 David Howells 2010-10-07 56 /* df9ee2927 David Howells 2010-10-07 57 * Wrap the arch provided IRQ routines to provide appropriate checks. df9ee2927 David Howells 2010-10-07 58 */ df9ee2927 David Howells 2010-10-07 59 #define raw_local_irq_disable() arch_local_irq_disable() df9ee2927 David Howells 2010-10-07 60 #define raw_local_irq_enable() arch_local_irq_enable() df9ee2927 David Howells 2010-10-07 61 #define raw_local_irq_save(flags) \ df9ee2927 David Howells 2010-10-07 62 do { \ df9ee2927 David Howells 2010-10-07 63 typecheck(unsigned long, flags);\ df9ee2927 David Howells 2010-10-07 64 flags = arch_local_irq_save(); \ df9ee2927 David Howells 2010-10-07 65 } while (0) df9ee2927 David Howells 2010-10-07 66 #define raw_local_irq_restore(flags) \
Re: [PATCH v1 3/3] crypto: cavium - Register the CNN55XX supported crypto algorithms.
Hi Srikanth, [auto build test WARNING on cryptodev/master] [also build test WARNING on next-20170510] [cannot apply to v4.11] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Srikanth-Jampala/crypto-cavium-Add-support-for-CNN55XX-adapters/20170510-211638 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: i386-defconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): In file included from drivers/crypto/cavium/nitrox/nitrox_algs.c:12:0: drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_read_csr': drivers/crypto/cavium/nitrox/nitrox_dev.h:159:9: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration] return readq(ndev->bar_addr + offset); ^ drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_write_csr': drivers/crypto/cavium/nitrox/nitrox_dev.h:171:2: error: implicit declaration of function 'writeq' [-Werror=implicit-function-declaration] writeq(value, (ndev->bar_addr + offset)); ^~ drivers/crypto/cavium/nitrox/nitrox_algs.c: In function 'nitrox_ablkcipher_exit': >> drivers/crypto/cavium/nitrox/nitrox_algs.c:117:23: warning: cast to pointer >> from integer of different size [-Wint-to-pointer-cast] crypto_free_context((void *)inst->u.ctx_handle); ^ cc1: some warnings being treated as errors vim +117 drivers/crypto/cavium/nitrox/nitrox_algs.c 101 ctx = crypto_alloc_context(inst->ndev); 102 if (!ctx) { 103 nitrox_put_device(inst->ndev); 104 return -ENOMEM; 105 } 106 inst->u.ctx_handle = (uintptr_t)ctx; 107 108 return 0; 109 } 110 111 static void nitrox_ablkcipher_exit(struct crypto_tfm *tfm) 112 { 113 struct nitrox_crypto_instance *inst = crypto_tfm_ctx(tfm); 114 115 /* free the crypto context */ 116 if (inst->u.ctx_handle) > 117 crypto_free_context((void *)inst->u.ctx_handle); 118 119 nitrox_put_device(inst->ndev); 120 121 inst->u.ctx_handle = 0; 122 inst->ndev = NULL; 123 } 124 125 static inline int nitrox_ablkcipher_setkey(struct crypto_ablkcipher *cipher, --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v1 1/3] crypto: cavium - Add support for CNN55XX adapters.
Hi Srikanth, [auto build test ERROR on cryptodev/master] [also build test ERROR on next-20170510] [cannot apply to v4.11] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Srikanth-Jampala/crypto-cavium-Add-support-for-CNN55XX-adapters/20170510-211638 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: i386-defconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): In file included from drivers/crypto/cavium/nitrox/nitrox_main.c:10:0: drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_read_csr': >> drivers/crypto/cavium/nitrox/nitrox_dev.h:156:9: error: implicit declaration >> of function 'readq' [-Werror=implicit-function-declaration] return readq(ndev->bar_addr + offset); ^ drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_write_csr': >> drivers/crypto/cavium/nitrox/nitrox_dev.h:168:2: error: implicit declaration >> of function 'writeq' [-Werror=implicit-function-declaration] writeq(value, (ndev->bar_addr + offset)); ^~ cc1: some warnings being treated as errors -- In file included from drivers/crypto/cavium/nitrox/nitrox_hal.c:3:0: drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_read_csr': >> drivers/crypto/cavium/nitrox/nitrox_dev.h:156:9: error: implicit declaration >> of function 'readq' [-Werror=implicit-function-declaration] return readq(ndev->bar_addr + offset); ^ drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_write_csr': >> drivers/crypto/cavium/nitrox/nitrox_dev.h:168:2: error: implicit declaration >> of function 'writeq' [-Werror=implicit-function-declaration] writeq(value, (ndev->bar_addr + offset)); ^~ drivers/crypto/cavium/nitrox/nitrox_hal.c: In function 'nitrox_config_pkt_input_rings': drivers/crypto/cavium/nitrox/nitrox_hal.c:120:23: warning: unused variable 'cmdq' [-Wunused-variable] struct nitrox_cmdq *cmdq = >pkt_cmdqs[i]; ^~~~ cc1: some warnings being treated as errors vim +/readq +156 drivers/crypto/cavium/nitrox/nitrox_dev.h 150 * @offset: offset of the register to read 151 * 152 * Returns: value read 153 */ 154 static inline u64 nitrox_read_csr(struct nitrox_device *ndev, u64 offset) 155 { > 156 return readq(ndev->bar_addr + offset); 157 } 158 159 /** 160 * nitrox_write_csr - Write to device register 161 * @ndev: NITROX device 162 * @offset: offset of the register to write 163 * @value: value to write 164 */ 165 static inline void nitrox_write_csr(struct nitrox_device *ndev, u64 offset, 166 u64 value) 167 { > 168 writeq(value, (ndev->bar_addr + offset)); 169 } 170 171 static inline int nitrox_in_use(struct nitrox_device *ndev) --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [Patch V5 1/7] crypto: Multi-buffer encryption infrastructure support
Hi Megha, [auto build test ERROR on next-20170420] [also build test ERROR on v4.11-rc7] [cannot apply to crypto/master sparc-next/master v4.9-rc8 v4.9-rc7 v4.9-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Megha-Dey/crypto-AES-CBC-multibuffer-implementation/20170421-064210 config: arm64-defconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm64 All errors (new ones prefixed by >>): crypto/built-in.o: In function `simd_skcipher_exit_mb': >> crypto/simd.c:267: undefined reference to `mcryptd_free_skcipher' crypto/simd.c:267:(.text+0x12624): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `mcryptd_free_skcipher' crypto/built-in.o: In function `simd_skcipher_init_mb': >> crypto/simd.c:282: undefined reference to `mcryptd_alloc_skcipher' crypto/simd.c:282:(.text+0x12650): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `mcryptd_alloc_skcipher' vim +267 crypto/simd.c 261 } 262 263 static void simd_skcipher_exit_mb(struct crypto_skcipher *tfm) 264 { 265 struct simd_skcipher_ctx_mb *ctx = crypto_skcipher_ctx(tfm); 266 > 267 mcryptd_free_skcipher(ctx->mcryptd_tfm); 268 } 269 270 static int simd_skcipher_init_mb(struct crypto_skcipher *tfm) 271 { 272 struct simd_skcipher_ctx_mb *ctx = crypto_skcipher_ctx(tfm); 273 struct mcryptd_skcipher *mcryptd_tfm; 274 struct simd_skcipher_alg *salg; 275 struct skcipher_alg *alg; 276 unsigned reqsize; 277 struct mcryptd_skcipher_ctx *mctx; 278 279 alg = crypto_skcipher_alg(tfm); 280 salg = container_of(alg, struct simd_skcipher_alg, alg); 281 > 282 mcryptd_tfm = mcryptd_alloc_skcipher(salg->ialg_name, 283 CRYPTO_ALG_INTERNAL, 284 CRYPTO_ALG_INTERNAL); 285 if (IS_ERR(mcryptd_tfm)) --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [Patch V5 7/7] crypto: AES CBC multi-buffer tcrypt
Hi Megha, [auto build test WARNING on next-20170420] [also build test WARNING on v4.11-rc7] [cannot apply to crypto/master sparc-next/master v4.9-rc8 v4.9-rc7 v4.9-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Megha-Dey/crypto-AES-CBC-multibuffer-implementation/20170421-064210 config: parisc-c3000_defconfig (attached as .config) compiler: hppa-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=parisc All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:6:0, from include/linux/kernel.h:13, from include/linux/crypto.h:21, from include/crypto/aead.h:16, from crypto/tcrypt.c:27: crypto/tcrypt.c: In function 'test_mb_acipher_cycles': >> include/linux/kern_levels.h:4:18: warning: format '%llu' expects argument of >> type 'long long unsigned int', but argument 2 has type 'long unsigned int' >> [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/kern_levels.h:23:19: note: in expansion of macro 'KERN_SOH' #define KERN_CONT KERN_SOH "c" ^~~~ >> include/linux/printk.h:315:9: note: in expansion of macro 'KERN_CONT' printk(KERN_CONT fmt, ##__VA_ARGS__) ^ >> crypto/tcrypt.c:1082:3: note: in expansion of macro 'pr_cont' pr_cont("1 operation in %llu cycles (%d bytes)\n", ^~~ vim +/KERN_CONT +315 include/linux/printk.h a0cba217 Linus Torvalds 2016-08-09 299 printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) a0cba217 Linus Torvalds 2016-08-09 300 #define pr_err(fmt, ...) \ a0cba217 Linus Torvalds 2016-08-09 301 printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) a0cba217 Linus Torvalds 2016-08-09 302 #define pr_warning(fmt, ...) \ a0cba217 Linus Torvalds 2016-08-09 303 printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) a0cba217 Linus Torvalds 2016-08-09 304 #define pr_warn pr_warning a0cba217 Linus Torvalds 2016-08-09 305 #define pr_notice(fmt, ...) \ a0cba217 Linus Torvalds 2016-08-09 306 printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) a0cba217 Linus Torvalds 2016-08-09 307 #define pr_info(fmt, ...) \ a0cba217 Linus Torvalds 2016-08-09 308 printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) 7b1460ec Steven Rostedt 2015-04-15 309 /* 7b1460ec Steven Rostedt 2015-04-15 310 * Like KERN_CONT, pr_cont() should only be used when continuing 7b1460ec Steven Rostedt 2015-04-15 311 * a line with no newline ('\n') enclosed. Otherwise it defaults 7b1460ec Steven Rostedt 2015-04-15 312 * back to KERN_DEFAULT. 7b1460ec Steven Rostedt 2015-04-15 313 */ 968ab183 Linus Torvalds 2010-11-15 314 #define pr_cont(fmt, ...) \ 968ab183 Linus Torvalds 2010-11-15 @315 printk(KERN_CONT fmt, ##__VA_ARGS__) 968ab183 Linus Torvalds 2010-11-15 316 968ab183 Linus Torvalds 2010-11-15 317 /* pr_devel() should produce zero code unless DEBUG is defined */ 968ab183 Linus Torvalds 2010-11-15 318 #ifdef DEBUG 968ab183 Linus Torvalds 2010-11-15 319 #define pr_devel(fmt, ...) \ 968ab183 Linus Torvalds 2010-11-15 320 printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) 968ab183 Linus Torvalds 2010-11-15 321 #else 968ab183 Linus Torvalds 2010-11-15 322 #define pr_devel(fmt, ...) \ 5264f2f7 Joe Perches2011-01-12 323 no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) :: The code at line 315 was first introduced by commit :: 968ab1838a5d48f02f5b471aa1d0e59e2cc2ccbc include/linux/kernel.h: Move logging bits to include/linux/printk.h :: TO: Linus Torvalds:: CC: Linus Torvalds --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [Patch V5 7/7] crypto: AES CBC multi-buffer tcrypt
Hi Megha, [auto build test WARNING on next-20170420] [also build test WARNING on v4.11-rc7] [cannot apply to crypto/master sparc-next/master v4.9-rc8 v4.9-rc7 v4.9-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Megha-Dey/crypto-AES-CBC-multibuffer-implementation/20170421-064210 config: m68k-sun3_defconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 4.9.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=m68k All warnings (new ones prefixed by >>): crypto/tcrypt.c: In function 'test_mb_acipher_cycles': >> crypto/tcrypt.c:1082:3: warning: format '%llu' expects argument of type >> 'long long unsigned int', but argument 2 has type 'long unsigned int' >> [-Wformat=] pr_cont("1 operation in %llu cycles (%d bytes)\n", ^ vim +1082 crypto/tcrypt.c 1066 * Initiate a maximum of MB_WIDTH operations per loop 1067 * Measure performance over MB_WIDTH iterations 1068 * Let do_multi_acipher_op count the cycles 1069 */ 1070 for (i = 0; i < ITR; i++) { 1071 mb_start = get_cycles(); 1072 ret = do_multi_acipher_op(req, enc); 1073 1074 mb_end = get_cycles(); 1075 cycles += mb_end - mb_start; 1076 if (ret) 1077 goto out; 1078 } 1079 1080 out: 1081 if (ret == 0) > 1082 pr_cont("1 operation in %llu cycles (%d bytes)\n", 1083 (cycles + 4) / (ITR*MB_WIDTH), blen); 1084 1085 return ret; 1086 } 1087 1088 static void test_mb_acipher_speed(const char *algo, int enc, unsigned int secs, 1089 struct cipher_speed_template *template, 1090 unsigned int tcount, u8 *keysize) --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [Patch V5 1/7] crypto: Multi-buffer encryption infrastructure support
Hi Megha, [auto build test ERROR on next-20170420] [also build test ERROR on v4.11-rc7] [cannot apply to crypto/master sparc-next/master v4.9-rc8 v4.9-rc7 v4.9-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Megha-Dey/crypto-AES-CBC-multibuffer-implementation/20170421-064210 config: x86_64-rhel (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> ERROR: "mcryptd_alloc_skcipher" [crypto/crypto_simd.ko] undefined! >> ERROR: "mcryptd_free_skcipher" [crypto/crypto_simd.ko] undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v2 5/9] staging: ccree: add AEAD support
Hi Gilad, [auto build test WARNING on linus/master] [also build test WARNING on v4.11-rc7] [cannot apply to staging/staging-testing next-20170420] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Gilad-Ben-Yossef/staging-ccree-add-Arm-TrustZone-CryptoCell-REE-driver/20170420-222023 coccinelle warnings: (new ones prefixed by >>) >> drivers/staging/ccree/ssi_buffer_mgr.c:758:2-4: ERROR: test of a >> variable/field address vim +758 drivers/staging/ccree/ssi_buffer_mgr.c 742 743 if (areq_ctx->gcm_iv_inc2_dma_addr != 0) { 744 SSI_RESTORE_DMA_ADDR_TO_48BIT(areq_ctx->gcm_iv_inc2_dma_addr); 745 dma_unmap_single(dev, areq_ctx->gcm_iv_inc2_dma_addr, 746 AES_BLOCK_SIZE, DMA_TO_DEVICE); 747 } 748 } 749 #endif 750 751 if (areq_ctx->ccm_hdr_size != ccm_header_size_null) { 752 if (areq_ctx->ccm_iv0_dma_addr != 0) { 753 SSI_RESTORE_DMA_ADDR_TO_48BIT(areq_ctx->ccm_iv0_dma_addr); 754 dma_unmap_single(dev, areq_ctx->ccm_iv0_dma_addr, 755 AES_BLOCK_SIZE, DMA_TO_DEVICE); 756 } 757 > 758 if (_ctx->ccm_adata_sg != NULL) 759 dma_unmap_sg(dev, _ctx->ccm_adata_sg, 760 1, DMA_TO_DEVICE); 761 } 762 if (areq_ctx->gen_ctx.iv_dma_addr != 0) { 763 SSI_RESTORE_DMA_ADDR_TO_48BIT(areq_ctx->gen_ctx.iv_dma_addr); 764 dma_unmap_single(dev, areq_ctx->gen_ctx.iv_dma_addr, 765 hw_iv_size, DMA_BIDIRECTIONAL); 766 } --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[PATCH] staging: ccree: fix ifnullfree.cocci warnings
drivers/staging/ccree/ssi_hash.c:317:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:320:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:323:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:373:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:375:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:377:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:379:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:381:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:383:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Gilad Ben-YossefSigned-off-by: Fengguang Wu --- ssi_hash.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -313,14 +313,11 @@ fail4: state->digest_buff_dma_addr = 0; } fail3: - if (state->opad_digest_buff != NULL) - kfree(state->opad_digest_buff); + kfree(state->opad_digest_buff); fail2: - if (state->digest_bytes_len != NULL) - kfree(state->digest_bytes_len); + kfree(state->digest_bytes_len); fail1: - if (state->digest_buff != NULL) - kfree(state->digest_buff); +kfree(state->digest_buff); fail_digest_result_buff: if (state->digest_result_buff != NULL) { kfree(state->digest_result_buff); @@ -369,18 +366,12 @@ static void ssi_hash_unmap_request(struc state->opad_digest_dma_addr = 0; } - if (state->opad_digest_buff != NULL) - kfree(state->opad_digest_buff); - if (state->digest_bytes_len != NULL) - kfree(state->digest_bytes_len); - if (state->digest_buff != NULL) - kfree(state->digest_buff); - if (state->digest_result_buff != NULL) - kfree(state->digest_result_buff); - if (state->buff1 != NULL) - kfree(state->buff1); - if (state->buff0 != NULL) - kfree(state->buff0); + kfree(state->opad_digest_buff); + kfree(state->digest_bytes_len); + kfree(state->digest_buff); + kfree(state->digest_result_buff); + kfree(state->buff1); + kfree(state->buff0); } static void ssi_hash_unmap_result(struct device *dev,
Re: [PATCH v2 2/9] staging: ccree: add ahash support
Hi Gilad, [auto build test WARNING on linus/master] [also build test WARNING on v4.11-rc7] [cannot apply to staging/staging-testing next-20170420] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Gilad-Ben-Yossef/staging-ccree-add-Arm-TrustZone-CryptoCell-REE-driver/20170420-222023 coccinelle warnings: (new ones prefixed by >>) >> drivers/staging/ccree/ssi_hash.c:317:2-7: WARNING: NULL check before freeing >> functions like kfree, debugfs_remove, debugfs_remove_recursive or >> usb_free_urb is not needed. Maybe consider reorganizing relevant code to >> avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:320:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:323:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:373:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:375:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:377:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:379:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:381:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:383:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[PATCH] staging: ccree: fix ifnullfree.cocci warnings
drivers/staging/ccree/ssi_buffer_mgr.c:530:3-19: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Gilad Ben-YossefSigned-off-by: Fengguang Wu --- ssi_buffer_mgr.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/staging/ccree/ssi_buffer_mgr.c +++ b/drivers/staging/ccree/ssi_buffer_mgr.c @@ -526,8 +526,7 @@ int ssi_buffer_mgr_fini(struct ssi_drvda struct buff_mgr_handle *buff_mgr_handle = drvdata->buff_mgr_handle; if (buff_mgr_handle != NULL) { - if (buff_mgr_handle->mlli_buffs_pool != NULL) - dma_pool_destroy(buff_mgr_handle->mlli_buffs_pool); + dma_pool_destroy(buff_mgr_handle->mlli_buffs_pool); kfree(drvdata->buff_mgr_handle); drvdata->buff_mgr_handle = NULL;
[PATCH] staging: ccree: fix platform_no_drv_owner.cocci warnings
drivers/staging/ccree/ssi_driver.c:484:6-11: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Gilad Ben-YossefSigned-off-by: Fengguang Wu --- ssi_driver.c |1 - 1 file changed, 1 deletion(-) --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -481,7 +481,6 @@ MODULE_DEVICE_TABLE(of, arm_cc7x_dev_of_ static struct platform_driver cc7x_driver = { .driver = { .name = "cc7xree", - .owner = THIS_MODULE, #ifdef CONFIG_OF .of_match_table = arm_cc7x_dev_of_match, #endif
[PATCH] staging: ccree: fix semicolon.cocci warnings
drivers/staging/ccree/ssi_request_mgr.c:623:3-4: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Gilad Ben-YossefSigned-off-by: Fengguang Wu --- ssi_request_mgr.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/ccree/ssi_request_mgr.c +++ b/drivers/staging/ccree/ssi_request_mgr.c @@ -620,7 +620,7 @@ static void comp_handler(unsigned long d /* Avoid race with above clear: Test completion counter once more */ request_mgr_handle->axi_completed += CC_REG_FLD_GET(CRY_KERNEL, AXIM_MON_COMP, VALUE, CC_HAL_READ_REGISTER(AXIM_MON_BASE_OFFSET)); - }; + } } /* after verifing that there is nothing to do, Unmask AXI completion interrupt */
[PATCH] staging: ccree: fix array_size.cocci warnings
drivers/staging/ccree/ssi_sysfs.c:319:34-35: WARNING: Use ARRAY_SIZE drivers/staging/ccree/ssi_sysfs.c:429:34-35: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci CC: Gilad Ben-YossefSigned-off-by: Fengguang Wu --- ssi_sysfs.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/staging/ccree/ssi_sysfs.c +++ b/drivers/staging/ccree/ssi_sysfs.c @@ -316,7 +316,7 @@ static ssize_t ssi_sys_help_show(struct int i=0, offset = 0; offset += scnprintf(buf + offset, PAGE_SIZE - offset, "Usage:\n"); - for ( i = 0; i < (sizeof(help_str)/sizeof(help_str[0])); i+=2) { + for ( i = 0; i < ARRAY_SIZE(help_str); i+=2) { offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s\t\t%s\n", help_str[i], help_str[i+1]); } return offset; @@ -426,8 +426,7 @@ int ssi_sysfs_init(struct kobject *sys_d /* Initialize top directory */ retval = sys_init_dir(_top_dir, drvdata, sys_dev_obj, "cc_info", ssi_sys_top_level_attrs, - sizeof(ssi_sys_top_level_attrs) / - sizeof(struct kobj_attribute)); + ARRAY_SIZE(ssi_sys_top_level_attrs)); return retval; }
Re: [PATCH v2 1/9] staging: ccree: introduce CryptoCell HW driver
Hi Gilad, [auto build test ERROR on linus/master] [also build test ERROR on v4.11-rc7] [cannot apply to staging/staging-testing next-20170420] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Gilad-Ben-Yossef/staging-ccree-add-Arm-TrustZone-CryptoCell-REE-driver/20170420-222023 config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All error/warnings (new ones prefixed by >>): In file included from drivers/staging/ccree/ssi_driver.h:48:0, from drivers/staging/ccree/ssi_driver.c:60: >> drivers/staging/ccree/cc_hal.h:29:2: error: #error Unsupported platform #error Unsupported platform ^ drivers/staging/ccree/ssi_driver.c: In function 'cc_isr': >> drivers/staging/ccree/cc_hal.h:33:38: error: implicit declaration of >> function 'READ_REGISTER' [-Werror=implicit-function-declaration] #define CC_HAL_READ_REGISTER(offset) READ_REGISTER(cc_base + offset) ^ >> drivers/staging/ccree/ssi_driver.c:120:8: note: in expansion of macro >> 'CC_HAL_READ_REGISTER' irr = CC_HAL_READ_REGISTER(CC_REG_OFFSET(HOST_RGF, HOST_IRR)); ^~~~ >> drivers/staging/ccree/cc_hal.h:32:44: error: implicit declaration of >> function 'WRITE_REGISTER' [-Werror=implicit-function-declaration] #define CC_HAL_WRITE_REGISTER(offset, val) WRITE_REGISTER(cc_base + offset, val) ^ >> drivers/staging/ccree/ssi_driver.c:129:2: note: in expansion of macro >> 'CC_HAL_WRITE_REGISTER' CC_HAL_WRITE_REGISTER(CC_REG_OFFSET(HOST_RGF, HOST_ICR), irr); ^ cc1: some warnings being treated as errors -- In file included from drivers/staging/ccree/ssi_driver.h:48:0, from drivers/staging/ccree/ssi_sysfs.c:19: >> drivers/staging/ccree/cc_hal.h:29:2: error: #error Unsupported platform #error Unsupported platform ^ drivers/staging/ccree/ssi_sysfs.c: In function 'ssi_sys_regdump_show': >> drivers/staging/ccree/cc_hal.h:33:38: error: implicit declaration of >> function 'READ_REGISTER' [-Werror=implicit-function-declaration] #define CC_HAL_READ_REGISTER(offset) READ_REGISTER(cc_base + offset) ^ >> drivers/staging/ccree/ssi_sysfs.c:291:19: note: in expansion of macro >> 'CC_HAL_READ_REGISTER' register_value = CC_HAL_READ_REGISTER(CC_REG_OFFSET(HOST_RGF, HOST_SIGNATURE)); ^~~~ cc1: some warnings being treated as errors -- In file included from drivers/staging/ccree/ssi_driver.h:48:0, from drivers/staging/ccree/ssi_buffer_mgr.h:27, from drivers/staging/ccree/ssi_buffer_mgr.c:28: >> drivers/staging/ccree/cc_hal.h:29:2: error: #error Unsupported platform #error Unsupported platform ^ -- In file included from drivers/staging/ccree/ssi_driver.h:48:0, from drivers/staging/ccree/ssi_request_mgr.c:27: >> drivers/staging/ccree/cc_hal.h:29:2: error: #error Unsupported platform #error Unsupported platform ^ drivers/staging/ccree/ssi_request_mgr.c: In function 'request_mgr_init': >> drivers/staging/ccree/ssi_request_mgr.c:198:29: error: implicit declaration >> of function 'READ_REGISTER' [-Werror=implicit-function-declaration] req_mgr_h->hw_queue_size = READ_REGISTER(drvdata->cc_base + ^ In file included from drivers/staging/ccree/ssi_driver.h:48:0, from drivers/staging/ccree/ssi_request_mgr.c:27: drivers/staging/ccree/ssi_request_mgr.c: In function 'comp_handler': >> drivers/staging/ccree/cc_hal.h:32:44: error: implicit declaration of >> function 'WRITE_REGISTER' [-Werror=implicit-function-declaration] #define CC_HAL_WRITE_REGISTER(offset, val) WRITE_REGISTER(cc_base + offset, val) ^ >> drivers/staging/ccree/ssi_request_mgr.c:595:3: note: in expansion of macro >> 'CC_HAL_WRITE_REGISTER' CC_HAL_WRITE_REGISTER(CC_REG_OFFSET(HOST_RGF, HOST_ICR), SSI_COMP_IRQ_MASK); ^ cc1: some warnings being treated as errors -- In file included from drivers/staging/ccree/ssi_driver.h:48:0, from drivers/staging/ccree/ssi_pm.c:24: >> drivers/staging/ccree/cc_hal.h:29:2: error: #error Unsupported platform #error Unsupported platform ^ drivers/staging/ccree/ssi_pm.c: In function 'ssi_power_mgr_runtime_suspend': >> drivers/staging/ccree/ssi_pm.c:46:2: error: implicit declaration of function >> 'WRITE_REGISTER' [-Werror=implicit-function-declaration] WRITE_REGISTER(drvdata->cc_base + CC_REG_OFFSET(HOST_RGF, HOST_POWER_DOWN_EN), POWER_DOWN_ENABLE);
Re: [PATCH 6/6] ima: Support appended signatures for appraisal
Hi Thiago, [auto build test ERROR on security/next] [also build test ERROR on v4.11-rc7 next-20170419] [cannot apply to integrity/next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Thiago-Jung-Bauermann/Appended-signatures-support-for-IMA-appraisal/20170419-053422 base: https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next config: i386-randconfig-h0-04201028 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): In file included from security/integrity/ima/ima_appraise.c:19:0: include/keys/asymmetric-type.h: In function 'asymmetric_key_ids': >> include/keys/asymmetric-type.h:76:12: error: dereferencing pointer to >> incomplete type 'const struct key' return key->payload.data[asym_key_ids]; ^~ vim +76 include/keys/asymmetric-type.h 7901c1a8 David Howells 2014-09-16 70 size_t len_1, 7901c1a8 David Howells 2014-09-16 71 const void *val_2, 7901c1a8 David Howells 2014-09-16 72 size_t len_2); 146aa8b1 David Howells 2015-10-21 73 static inline 146aa8b1 David Howells 2015-10-21 74 const struct asymmetric_key_ids *asymmetric_key_ids(const struct key *key) 146aa8b1 David Howells 2015-10-21 75 { 146aa8b1 David Howells 2015-10-21 @76 return key->payload.data[asym_key_ids]; 146aa8b1 David Howells 2015-10-21 77 } 7901c1a8 David Howells 2014-09-16 78 9eb02989 David Howells 2016-04-06 79 extern struct key *find_asymmetric_key(struct key *keyring, :: The code at line 76 was first introduced by commit :: 146aa8b1453bd8f1ff2304ffb71b4ee0eb9acdcc KEYS: Merge the type-specific data with the payload data :: TO: David Howells:: CC: David Howells --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[cryptodev:master 42/60] drivers/crypto/ccp/ccp-dev-v5.c:436:28: note: in expansion of macro 'cpu_to_le32'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 796b40c6171456274b02447e1dbbea97456403fe commit: 990672d48515ce09c76fcf1ceccee48b0dd1942b [42/60] crypto: ccp - Enable 3DES function on v5 CCPs config: arm64-allmodconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 990672d48515ce09c76fcf1ceccee48b0dd1942b # save the attached .config to linux build tree make.cross ARCH=arm64 All warnings (new ones prefixed by >>): In file included from include/linux/byteorder/big_endian.h:4:0, from arch/arm64/include/uapi/asm/byteorder.h:20, from include/asm-generic/bitops/le.h:5, from arch/arm64/include/asm/bitops.h:50, from include/linux/bitops.h:36, from include/linux/kernel.h:10, from include/linux/list.h:8, from include/linux/module.h:9, from drivers/crypto/ccp/ccp-dev-v5.c:13: drivers/crypto/ccp/ccp-dev-v5.c: In function 'ccp5_perform_des3': include/uapi/linux/byteorder/big_endian.h:32:26: warning: large integer implicitly truncated to unsigned type [-Woverflow] #define __cpu_to_le32(x) ((__force __le32)__swab32((x))) ^ include/linux/byteorder/generic.h:87:21: note: in expansion of macro '__cpu_to_le32' #define cpu_to_le32 __cpu_to_le32 ^ >> drivers/crypto/ccp/ccp-dev-v5.c:436:28: note: in expansion of macro >> 'cpu_to_le32' CCP5_CMD_KEY_MEM() = cpu_to_le32(CCP_MEMTYPE_SB); ^~~ vim +/cpu_to_le32 +436 drivers/crypto/ccp/ccp-dev-v5.c 420 CCP_DES3_MODE() = op->u.des3.mode; 421 CCP_DES3_TYPE() = op->u.des3.type; 422 CCP5_CMD_FUNCTION() = cpu_to_le32(function.raw); 423 424 CCP5_CMD_LEN() = cpu_to_le32(op->src.u.dma.length); 425 426 CCP5_CMD_SRC_LO() = cpu_to_le32(ccp_addr_lo(>src.u.dma)); 427 CCP5_CMD_SRC_HI() = cpu_to_le32(ccp_addr_hi(>src.u.dma)); 428 CCP5_CMD_SRC_MEM() = cpu_to_le32(CCP_MEMTYPE_SYSTEM); 429 430 CCP5_CMD_DST_LO() = cpu_to_le32(ccp_addr_lo(>dst.u.dma)); 431 CCP5_CMD_DST_HI() = cpu_to_le32(ccp_addr_hi(>dst.u.dma)); 432 CCP5_CMD_DST_MEM() = cpu_to_le32(CCP_MEMTYPE_SYSTEM); 433 434 CCP5_CMD_KEY_LO() = cpu_to_le32(lower_32_bits(key_addr)); 435 CCP5_CMD_KEY_HI() = 0; > 436 CCP5_CMD_KEY_MEM() = cpu_to_le32(CCP_MEMTYPE_SB); 437 CCP5_CMD_LSB_ID() = cpu_to_le32(op->sb_ctx); 438 439 return ccp5_do_cmd(, op->cmd_q); 440 } 441 442 static int ccp5_perform_rsa(struct ccp_op *op) 443 { 444 struct ccp5_desc desc; --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: crypto: atmel - Fix authenc compile test warnings
Hi Herbert, [auto build test WARNING on cryptodev/master] [also build test WARNING on v4.10-rc7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Herbert-Xu/crypto-atmel-Fix-authenc-compile-test-warnings/20170206-171201 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: tile-allmodconfig (attached as .config) compiler: tilegx-linux-gcc (GCC) 4.6.2 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=tile All warnings (new ones prefixed by >>): drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_sg_copy': >> drivers/crypto/atmel-tdes.c:157:11: warning: comparison of distinct pointer >> types lacks a cast [enabled by default] drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_pdc_stop': >> drivers/crypto/atmel-tdes.c:339:4: warning: format '%u' expects argument of >> type 'unsigned int', but argument 2 has type 'size_t' [-Wformat] drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_buff_init': >> drivers/crypto/atmel-tdes.c:364:3: warning: format '%d' expects argument of >> type 'int', but argument 3 has type 'size_t' [-Wformat] drivers/crypto/atmel-tdes.c:372:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat] drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_start': drivers/crypto/atmel-tdes.c:528:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] drivers/crypto/atmel-tdes.c:529:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_dma_stop': drivers/crypto/atmel-tdes.c:664:5: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat] vim +157 drivers/crypto/atmel-tdes.c 13802005 Nicolas Royer 2012-07-01 151 void *buf, size_t buflen, size_t total, int out) 13802005 Nicolas Royer 2012-07-01 152 { 13802005 Nicolas Royer 2012-07-01 153 unsigned int count, off = 0; 13802005 Nicolas Royer 2012-07-01 154 13802005 Nicolas Royer 2012-07-01 155 while (buflen && total) { 13802005 Nicolas Royer 2012-07-01 156 count = min((*sg)->length - *offset, total); 13802005 Nicolas Royer 2012-07-01 @157 count = min(count, buflen); 13802005 Nicolas Royer 2012-07-01 158 13802005 Nicolas Royer 2012-07-01 159 if (!count) 13802005 Nicolas Royer 2012-07-01 160 return off; 13802005 Nicolas Royer 2012-07-01 161 13802005 Nicolas Royer 2012-07-01 162 scatterwalk_map_and_copy(buf + off, *sg, *offset, count, out); 13802005 Nicolas Royer 2012-07-01 163 13802005 Nicolas Royer 2012-07-01 164 off += count; 13802005 Nicolas Royer 2012-07-01 165 buflen -= count; 13802005 Nicolas Royer 2012-07-01 166 *offset += count; 13802005 Nicolas Royer 2012-07-01 167 total -= count; 13802005 Nicolas Royer 2012-07-01 168 13802005 Nicolas Royer 2012-07-01 169 if (*offset == (*sg)->length) { 13802005 Nicolas Royer 2012-07-01 170 *sg = sg_next(*sg); 13802005 Nicolas Royer 2012-07-01 171 if (*sg) 13802005 Nicolas Royer 2012-07-01 172 *offset = 0; 13802005 Nicolas Royer 2012-07-01 173 else 13802005 Nicolas Royer 2012-07-01 174 total = 0; 13802005 Nicolas Royer 2012-07-01 175 } 13802005 Nicolas Royer 2012-07-01 176 } 13802005 Nicolas Royer 2012-07-01 177 13802005 Nicolas Royer 2012-07-01 178 return off; 13802005 Nicolas Royer 2012-07-01 179 } 13802005 Nicolas Royer 2012-07-01 180 13802005 Nicolas Royer 2012-07-01 181 static inline u32 atmel_tdes_read(struct atmel_tdes_dev *dd, u32 offset) 13802005 Nicolas Royer 2012-07-01 182 { 13802005 Nicolas Royer 2012-07-01 183 return readl_relaxed(dd->io_base + offset); 13802005 Nicolas Royer 2012-07-01 184 } 13802005 Nicolas Royer 2012-07-01 185 13802005 Nicolas Royer 2012-07-01 186 static inline void atmel_tdes_write(struct atmel_tdes_dev *dd, 13802005 Nicolas Royer 2012-07-01 187 u32 offset, u32 value) 13802005 Nicolas Royer 2012-07-01 188 { 13802005 Nicolas Royer 2012-07-01 189 writel_relaxed(value, dd->io_base + offset); 13802005 Nicolas Royer 2012-07-01 190 } 13802005 Nicolas Royer 2012-07-01 191 13802005 Nicolas Royer 2012-07-01 192 static void atmel_tdes_write_n(struct
Re: crypto: atmel - Fix authenc compile test warnings
Hi Herbert, [auto build test WARNING on cryptodev/master] [also build test WARNING on v4.10-rc7 next-20170206] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Herbert-Xu/crypto-atmel-Fix-authenc-compile-test-warnings/20170206-171201 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) include/linux/compiler.h:253:8: sparse: attribute 'no_sanitize_address': unknown attribute >> drivers/crypto/atmel-tdes.c:157:25: sparse: incompatible types in comparison >> expression (different type sizes) drivers/crypto/atmel-tdes.c:528:25: sparse: incompatible types in comparison expression (different type sizes) drivers/crypto/atmel-tdes.c:529:25: sparse: incompatible types in comparison expression (different type sizes) In file included from drivers/crypto/atmel-tdes.c:17:0: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_sg_copy': include/linux/kernel.h:753:16: warning: comparison of distinct pointer types lacks a cast (void) ( == ); \ ^ include/linux/kernel.h:756:2: note: in expansion of macro '__min' __min(typeof(x), typeof(y), \ ^ drivers/crypto/atmel-tdes.c:157:11: note: in expansion of macro 'min' count = min(count, buflen); ^~~ In file included from include/linux/printk.h:6:0, from include/linux/kernel.h:13, from drivers/crypto/atmel-tdes.c:17: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_pdc_stop': include/linux/kern_levels.h:4:18: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~ include/linux/printk.h:292:9: note: in expansion of macro 'KERN_ERR' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~ drivers/crypto/atmel-tdes.c:339:4: note: in expansion of macro 'pr_err' pr_err("not all data converted: %u\n", count); ^~ drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_buff_init': drivers/crypto/atmel-tdes.c:364:26: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=] dev_err(dd->dev, "dma %d bytes error\n", dd->buflen); ^ drivers/crypto/atmel-tdes.c:372:26: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=] dev_err(dd->dev, "dma %d bytes error\n", dd->buflen); ^ In file included from drivers/crypto/atmel-tdes.c:17:0: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_start': include/linux/kernel.h:753:16: warning: comparison of distinct pointer types lacks a cast (void) ( == ); \ ^ include/linux/kernel.h:756:2: note: in expansion of macro '__min' __min(typeof(x), typeof(y), \ ^ drivers/crypto/atmel-tdes.c:528:11: note: in expansion of macro 'min' count = min(dd->total, sg_dma_len(dd->in_sg)); ^~~ include/linux/kernel.h:753:16: warning: comparison of distinct pointer types lacks a cast (void) ( == ); \ ^ include/linux/kernel.h:756:2: note: in expansion of macro '__min' __min(typeof(x), typeof(y), \ ^ drivers/crypto/atmel-tdes.c:529:11: note: in expansion of macro 'min' count = min(count, sg_dma_len(dd->out_sg)); ^~~ In file included from include/linux/printk.h:6:0, from include/linux/kernel.h:13, from drivers/crypto/atmel-tdes.c:17: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_dma_stop': include/linux/kern_levels.h:4:18: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~ include/linux/printk.h:292:9: note: in expansion of macro 'KERN_ERR' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~ drivers/crypto/atmel-tdes.c:664:5: note: in expansion of macro 'pr_err' pr_err("not all data converted: %u\n", count); ^~ vim +157 drivers/crypto/atmel-tdes.c 13802005 Nicolas Royer 2012-07-01 141
Re: crypto: atmel - Fix authenc compile test warnings
Hi Herbert, [auto build test WARNING on cryptodev/master] [also build test WARNING on v4.10-rc7 next-20170206] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Herbert-Xu/crypto-atmel-Fix-authenc-compile-test-warnings/20170206-171201 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=ia64 All warnings (new ones prefixed by >>): In file included from drivers/crypto/atmel-tdes.c:17:0: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_sg_copy': include/linux/kernel.h:753:16: warning: comparison of distinct pointer types lacks a cast (void) ( == ); \ ^ include/linux/kernel.h:756:2: note: in expansion of macro '__min' __min(typeof(x), typeof(y), \ ^ >> drivers/crypto/atmel-tdes.c:157:11: note: in expansion of macro 'min' count = min(count, buflen); ^~~ In file included from include/linux/printk.h:6:0, from include/linux/kernel.h:13, from drivers/crypto/atmel-tdes.c:17: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_pdc_stop': >> include/linux/kern_levels.h:4:18: warning: format '%u' expects argument of >> type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned >> int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~ include/linux/printk.h:292:9: note: in expansion of macro 'KERN_ERR' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~ >> drivers/crypto/atmel-tdes.c:339:4: note: in expansion of macro 'pr_err' pr_err("not all data converted: %u\n", count); ^~ drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_buff_init': >> drivers/crypto/atmel-tdes.c:364:26: warning: format '%d' expects argument of >> type 'int', but argument 3 has type 'size_t {aka long unsigned int}' >> [-Wformat=] dev_err(dd->dev, "dma %d bytes error\n", dd->buflen); ^ drivers/crypto/atmel-tdes.c:372:26: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=] dev_err(dd->dev, "dma %d bytes error\n", dd->buflen); ^ In file included from drivers/crypto/atmel-tdes.c:17:0: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_start': include/linux/kernel.h:753:16: warning: comparison of distinct pointer types lacks a cast (void) ( == ); \ ^ include/linux/kernel.h:756:2: note: in expansion of macro '__min' __min(typeof(x), typeof(y), \ ^ drivers/crypto/atmel-tdes.c:528:11: note: in expansion of macro 'min' count = min(dd->total, sg_dma_len(dd->in_sg)); ^~~ include/linux/kernel.h:753:16: warning: comparison of distinct pointer types lacks a cast (void) ( == ); \ ^ include/linux/kernel.h:756:2: note: in expansion of macro '__min' __min(typeof(x), typeof(y), \ ^ drivers/crypto/atmel-tdes.c:529:11: note: in expansion of macro 'min' count = min(count, sg_dma_len(dd->out_sg)); ^~~ In file included from include/linux/printk.h:6:0, from include/linux/kernel.h:13, from drivers/crypto/atmel-tdes.c:17: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_dma_stop': >> include/linux/kern_levels.h:4:18: warning: format '%u' expects argument of >> type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned >> int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~ include/linux/printk.h:292:9: note: in expansion of macro 'KERN_ERR' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~ drivers/crypto/atmel-tdes.c:664:5: note: in expansion of macro 'pr_err' pr_err("not all data converted: %u\n", count); ^~ vim +/min +157 drivers/crypto/atmel-tdes.c 13802005 Nicolas Royer 2012-07-01 11 * by the Free Software Foundation. 13802005 Nicolas Royer 2012-07-01 12 * 13802005 Nicolas Royer 2012-07-01 13 * Some ideas are from omap-aes.c drivers. 13802005 Nicolas Royer 2012-07-01 14 */
Re: [PATCH 1/4] lib: Update LZ4 compressor module
Hi Sven, [auto build test WARNING on linus/master] [also build test WARNING on v4.10-rc4 next-20170120] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Sven-Schmidt/Update-LZ4-compressor-module/20170121-231418 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) include/linux/compiler.h:253:8: sparse: attribute 'no_sanitize_address': unknown attribute >> lib/lz4/lz4_decompress.c:521:21: sparse: incompatible types for operation (>) lib/lz4/lz4_decompress.c:521:21:left side has type unsigned long [usertype] *src_len lib/lz4/lz4_decompress.c:521:21:right side has type int vim +521 lib/lz4/lz4_decompress.c 505 return -1; 506 } 507 EXPORT_SYMBOL(lz4_decompress_unknownoutputsize); 508 509 int lz4_decompress(const unsigned char *src, size_t *src_len, 510 unsigned char *dest, size_t actual_dest_len) { 511 *src_len = LZ4_decompress_fast(src, dest, (int)actual_dest_len); 512 513 /* 514 * Prior lz4_decompress will return 515 * 0 for success and a negative result for error 516 * new LZ4_decompress_fast returns 517 * - the length of data read on success 518 * - and also a negative result on error 519 * meaning when result > 0, we just return 0 here 520 */ > 521 if (src_len > 0) 522 return 0; 523 else 524 return -1; 525 } 526 EXPORT_SYMBOL(lz4_decompress); 527 528 MODULE_LICENSE("Dual BSD/GPL"); 529 MODULE_DESCRIPTION("LZ4 decompressor"); --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] lib: Update LZ4 compressor module
Hi Sven, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc4 next-20170120] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Sven-Schmidt/Update-LZ4-compressor-module/20170121-231418 config: x86_64-lkp (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 Note: the linux-review/Sven-Schmidt/Update-LZ4-compressor-module/20170121-231418 HEAD 0472409e2a1c442b51502961aa6d83b866218953 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): In file included from lib/decompress_unlz4.c:19:0: lib/decompress_unlz4.c: In function 'unlz4': >> lib/decompress_unlz4.c:75:22: error: implicit declaration of function >> 'lz4_compressbound' [-Werror=implicit-function-declaration] inp = large_malloc(lz4_compressbound(uncomp_chunksize)); ^ include/linux/decompress/mm.h:83:33: note: in definition of macro 'large_malloc' #define large_malloc(a) vmalloc(a) ^ cc1: some warnings being treated as errors vim +/lz4_compressbound +75 lib/decompress_unlz4.c e76e1fdf Kyungsik Lee 2013-07-08 13 #include "lz4/lz4_decompress.c" e76e1fdf Kyungsik Lee 2013-07-08 14 #else e76e1fdf Kyungsik Lee 2013-07-08 15 #include e76e1fdf Kyungsik Lee 2013-07-08 16 #endif e76e1fdf Kyungsik Lee 2013-07-08 17 #include e76e1fdf Kyungsik Lee 2013-07-08 18 #include e76e1fdf Kyungsik Lee 2013-07-08 @19 #include e76e1fdf Kyungsik Lee 2013-07-08 20 #include e76e1fdf Kyungsik Lee 2013-07-08 21 e76e1fdf Kyungsik Lee 2013-07-08 22 #include e76e1fdf Kyungsik Lee 2013-07-08 23 e76e1fdf Kyungsik Lee 2013-07-08 24 /* e76e1fdf Kyungsik Lee 2013-07-08 25 * Note: Uncompressed chunk size is used in the compressor side e76e1fdf Kyungsik Lee 2013-07-08 26 * (userspace side for compression). e76e1fdf Kyungsik Lee 2013-07-08 27 * It is hardcoded because there is not proper way to extract it e76e1fdf Kyungsik Lee 2013-07-08 28 * from the binary stream which is generated by the preliminary e76e1fdf Kyungsik Lee 2013-07-08 29 * version of LZ4 tool so far. e76e1fdf Kyungsik Lee 2013-07-08 30 */ e76e1fdf Kyungsik Lee 2013-07-08 31 #define LZ4_DEFAULT_UNCOMPRESSED_CHUNK_SIZE (8 << 20) e76e1fdf Kyungsik Lee 2013-07-08 32 #define ARCHIVE_MAGICNUMBER 0x184C2102 e76e1fdf Kyungsik Lee 2013-07-08 33 d97b07c5 Yinghai Lu 2014-08-08 34 STATIC inline int INIT unlz4(u8 *input, long in_len, d97b07c5 Yinghai Lu 2014-08-08 35long (*fill)(void *, unsigned long), d97b07c5 Yinghai Lu 2014-08-08 36long (*flush)(void *, unsigned long), d97b07c5 Yinghai Lu 2014-08-08 37u8 *output, long *posp, e76e1fdf Kyungsik Lee 2013-07-08 38void (*error) (char *x)) e76e1fdf Kyungsik Lee 2013-07-08 39 { e76e1fdf Kyungsik Lee 2013-07-08 40int ret = -1; e76e1fdf Kyungsik Lee 2013-07-08 41size_t chunksize = 0; e76e1fdf Kyungsik Lee 2013-07-08 42size_t uncomp_chunksize = LZ4_DEFAULT_UNCOMPRESSED_CHUNK_SIZE; e76e1fdf Kyungsik Lee 2013-07-08 43u8 *inp; e76e1fdf Kyungsik Lee 2013-07-08 44u8 *inp_start; e76e1fdf Kyungsik Lee 2013-07-08 45u8 *outp; d97b07c5 Yinghai Lu 2014-08-08 46long size = in_len; e76e1fdf Kyungsik Lee 2013-07-08 47 #ifdef PREBOOT e76e1fdf Kyungsik Lee 2013-07-08 48size_t out_len = get_unaligned_le32(input + in_len); e76e1fdf Kyungsik Lee 2013-07-08 49 #endif e76e1fdf Kyungsik Lee 2013-07-08 50size_t dest_len; e76e1fdf Kyungsik Lee 2013-07-08 51 e76e1fdf Kyungsik Lee 2013-07-08 52 e76e1fdf Kyungsik Lee 2013-07-08 53if (output) { e76e1fdf Kyungsik Lee 2013-07-08 54outp = output; e76e1fdf Kyungsik Lee 2013-07-08 55} else if (!flush) { e76e1fdf Kyungsik Lee 2013-07-08 56error("NULL output pointer and no flush function provided"); e76e1fdf Kyungsik Lee 2013-07-08 57goto exit_0; e76e1fdf Kyungsik Lee 2013-07-08 58} else { e76e1fdf Kyungsik Lee 2013-07-08 59outp = large_malloc(uncomp_chunksize); e76e1fdf Kyungsik Lee 2013-07-08 60if (!outp) { e76e1fdf Kyungsik Lee 2013-07-08 61error("Could not allocate output buffer"); e76e1fdf Kyungsik Lee 2013-07-08 62goto exit_0; e76e1fdf Kyungsik Lee 2013-07-08 63} e76e1fdf Kyungsik Lee 2013-07-08 64} e76e1fdf Kyungsik Lee 2013-07-08 65 e76e1fdf Kyungsik Lee 2013-07-08 66if (input && fill) { e76e1fdf Kyungsik Lee 2013-07-08 67error("Both input pointer and fill function provided,"); e76e1fdf Kyungsik Lee 2013-07-08 68goto exit_1; e76e1fdf Kyungsik Lee 2013-07-08 69} else if (input) { e76e1fdf
Re: [PATCH 1/4] lib: Update LZ4 compressor module
Hi Sven, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc4 next-20170120] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Sven-Schmidt/Update-LZ4-compressor-module/20170121-231418 config: i386-randconfig-r0-201703 (attached as .config) compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904 reproduce: # save the attached .config to linux build tree make ARCH=i386 Note: the linux-review/Sven-Schmidt/Update-LZ4-compressor-module/20170121-231418 HEAD 0472409e2a1c442b51502961aa6d83b866218953 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): fs/pstore/platform.c: In function 'allocate_lz4': >> fs/pstore/platform.c:369:20: error: implicit declaration of function >> 'lz4_compressbound' [-Werror=implicit-function-declaration] big_oops_buf_sz = lz4_compressbound(psinfo->bufsize); ^ cc1: some warnings being treated as errors vim +/lz4_compressbound +369 fs/pstore/platform.c 8cfc8ddc Geliang Tang 2016-02-18 363 8cfc8ddc Geliang Tang 2016-02-18 364 return outlen; 8cfc8ddc Geliang Tang 2016-02-18 365 } 8cfc8ddc Geliang Tang 2016-02-18 366 8cfc8ddc Geliang Tang 2016-02-18 367 static void allocate_lz4(void) 8cfc8ddc Geliang Tang 2016-02-18 368 { 8cfc8ddc Geliang Tang 2016-02-18 @369 big_oops_buf_sz = lz4_compressbound(psinfo->bufsize); 8cfc8ddc Geliang Tang 2016-02-18 370 big_oops_buf = kmalloc(big_oops_buf_sz, GFP_KERNEL); 8cfc8ddc Geliang Tang 2016-02-18 371 if (big_oops_buf) { 8cfc8ddc Geliang Tang 2016-02-18 372 workspace = kmalloc(LZ4_MEM_COMPRESS, GFP_KERNEL); :: The code at line 369 was first introduced by commit :: 8cfc8ddc99df9509a46043b14af81f5c6a223eab pstore: add lzo/lz4 compression support :: TO: Geliang Tang:: CC: Kees Cook --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH 2/2] misc: amd-sp: introduce the AMD Secure Processor device
Hi Brijesh, [auto build test ERROR on cryptodev/master] [also build test ERROR on next-20170120] [cannot apply to char-misc/char-misc-testing v4.10-rc4] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Brijesh-Singh/Introduce-AMD-Secure-Processor-device/20170120-185157 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: um-allyesconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=um All error/warnings (new ones prefixed by >>): warning: (AMD_CCP && SND_SOC_SH4_SIU) selects DMADEVICES which has unmet direct dependencies (HAS_DMA) arch/um/drivers/built-in.o: In function `vde_open_real': (.text+0xc9a1): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `vde_open_real': (.text+0xc7ec): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `vde_open_real': (.text+0xcb05): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `pcap_nametoaddr': (.text+0x1d595): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `pcap_nametonetaddr': (.text+0x1d635): warning: Using 'getnetbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `pcap_nametoproto': (.text+0x1d855): warning: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `pcap_nametoport': (.text+0x1d687): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking crypto/built-in.o: In function `async_memcpy': include/linux/dma-mapping.h:257: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:257: undefined reference to `bad_dma_ops' crypto/built-in.o: In function `async_xor': include/linux/dma-mapping.h:257: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:257: undefined reference to `bad_dma_ops' crypto/built-in.o: In function `async_xor_val': include/linux/dma-mapping.h:257: undefined reference to `bad_dma_ops' crypto/built-in.o:include/linux/dma-mapping.h:257: more undefined references to `bad_dma_ops' follow drivers/built-in.o: In function `dwc_desc_get': >> include/linux/dmapool.h:30: undefined reference to `dma_pool_alloc' drivers/built-in.o: In function `dwc_desc_put': >> drivers/dma/dw/core.c:137: undefined reference to `dma_pool_free' drivers/dma/dw/core.c:133: undefined reference to `dma_pool_free' drivers/built-in.o: In function `dw_dma_probe': >> drivers/dma/dw/core.c:1508: undefined reference to `dmam_pool_create' drivers/built-in.o: In function `dw_probe': >> drivers/dma/dw/platform.c:192: undefined reference to `devm_ioremap_resource' drivers/built-in.o: In function `dw_probe': include/linux/dma-mapping.h:555: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:542: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:544: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:542: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:544: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `fsl_edma_free_desc': >> drivers/dma/fsl-edma.c:288: undefined reference to `dma_pool_free' drivers/built-in.o: In function `fsl_edma_alloc_desc': >> drivers/dma/fsl-edma.c:525: undefined reference to `dma_pool_alloc' drivers/dma/fsl-edma.c:525: undefined reference to `dma_pool_free' drivers/built-in.o: In function `fsl_edma_free_chan_resources': >> drivers/dma/fsl-edma.c:808: undefined reference to `dma_pool_destroy' drivers/built-in.o: In function `fsl_edma_alloc_chan_resources': >> drivers/dma/fsl-edma.c:788: undefined reference to `dma_pool_create' drivers/built-in.o: In function `fsl_edma_probe': >> drivers/dma/fsl-edma.c:898: undefined reference to `devm_ioremap_resource' drivers/dma/fsl-edma.c:906: undefined reference to `devm_ioremap_resource' drivers/built-in.o: In function `idma64_desc_free': >> drivers/dma/idma64.c:214: undefined reference to `dma_pool_free' drivers/built-in.o: In function `idma64_free_chan_resources': >>
Re: [PATCH 1/2] crypto: move CCP device driver to misc
Hi Brijesh, [auto build test ERROR on cryptodev/master] [also build test ERROR on next-20170120] [cannot apply to char-misc/char-misc-testing v4.10-rc4] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Brijesh-Singh/Introduce-AMD-Secure-Processor-device/20170120-185157 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: um-allyesconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=um All errors (new ones prefixed by >>): arch/um/drivers/built-in.o: In function `vde_open_real': (.text+0xc9a1): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `vde_open_real': (.text+0xc7ec): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `vde_open_real': (.text+0xcb05): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `pcap_nametoaddr': (.text+0x1d595): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `pcap_nametonetaddr': (.text+0x1d635): warning: Using 'getnetbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `pcap_nametoproto': (.text+0x1d855): warning: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking arch/um/drivers/built-in.o: In function `pcap_nametoport': (.text+0x1d687): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking drivers/built-in.o: In function `ccp_init_dm_workarea': >> drivers/misc/amd-sp/ccp-ops.c:141: undefined reference to `dma_pool_alloc' drivers/built-in.o: In function `ccp_init_dm_workarea': include/linux/dma-mapping.h:190: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `ccp_sg_free': include/linux/dma-mapping.h:242: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `ccp_dm_free': >> drivers/misc/amd-sp/ccp-ops.c:112: undefined reference to `dma_pool_free' drivers/built-in.o: In function `ccp_dm_free': include/linux/dma-mapping.h:207: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `ccp_init_data': include/linux/dma-mapping.h:227: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `ccp_destroy': >> drivers/misc/amd-sp/ccp-dev-v3.c:501: undefined reference to >> `dma_pool_destroy' drivers/built-in.o: In function `ccp_init': >> drivers/misc/amd-sp/ccp-dev-v3.c:337: undefined reference to >> `dma_pool_create' drivers/misc/amd-sp/ccp-dev-v3.c:456: undefined reference to `dma_pool_destroy' drivers/built-in.o: In function `ccp5_destroy': include/linux/dma-mapping.h:484: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:490: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `ccp5_init': >> drivers/misc/amd-sp/ccp-dev-v5.c:676: undefined reference to >> `dma_pool_create' drivers/built-in.o: In function `ccp5_init': include/linux/dma-mapping.h:463: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `ccp5_init': >> drivers/misc/amd-sp/ccp-dev-v5.c:861: undefined reference to >> `dma_pool_destroy' drivers/built-in.o: In function `ccp_platform_probe': drivers/misc/amd-sp/ccp-platform.c:148: undefined reference to `devm_ioremap_resource' drivers/built-in.o: In function `ccp_platform_probe': include/linux/dma-mapping.h:555: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:542: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:544: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:542: undefined reference to `bad_dma_ops' include/linux/dma-mapping.h:544: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `ccp_cmd_callback': drivers/misc/amd-sp/ccp-dmaengine.c:204: undefined reference to `dma_run_dependencies' drivers/built-in.o: In function `ccp_alloc_dma_desc': drivers/misc/amd-sp/ccp-dmaengine.c:306: undefined reference to `dma_async_tx_descriptor_init' drivers/built-in.o: In function `ccp_dmaengine_register': drivers/misc/amd-sp/ccp-dmaengine.c:705: undefined reference to
Re: [PATCH 2/2] misc: amd-sp: introduce the AMD Secure Processor device
Hi Brijesh, [auto build test WARNING on cryptodev/master] [also build test WARNING on next-20170120] [cannot apply to char-misc/char-misc-testing v4.10-rc4] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Brijesh-Singh/Introduce-AMD-Secure-Processor-device/20170120-185157 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=xtensa All warnings (new ones prefixed by >>): warning: (CRYPTO_DEV_CCP_CRYPTO) selects AMD_SP which has unmet direct dependencies ((X86 && PCI || ARM64 && (OF_ADDRESS || ACPI)) && HAS_IOMEM) --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[cryptodev:master 43/44] arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr tt,=crypto_ft_tab'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 1abee99eafab67fb1c98f9ecfc43cd5735384a86 commit: 81edb42629758bacdf813dd5e4542ae26e3ad73a [43/44] crypto: arm/aes - replace scalar AES cipher config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 81edb42629758bacdf813dd5e4542ae26e3ad73a # save the attached .config to linux build tree make.cross ARCH=arm All errors (new ones prefixed by >>): arch/arm/crypto/aes-cipher-core.S: Assembler messages: arch/arm/crypto/aes-cipher-core.S:21: Error: selected processor does not support `tt .req ip' in ARM mode >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> tt,=crypto_ft_tab' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r8,[tt,r8,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t0,[tt,t0,lsr#(8*1)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r9,[tt,r9,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t1,[tt,t1,lsr#(8*1)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t2,[tt,t2,lsr#(8*2)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r10,[tt,r10,lsr#(8*2)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr t0,[tt,t0,lsr#(8*3)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r11,[tt,r11,lsr#(8*3)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r10,[tt,r10,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t0,[tt,t0,lsr#(8*1)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r11,[tt,r11,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t1,[tt,t1,lsr#(8*1)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t2,[tt,t2,lsr#(8*2)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r5,[tt,r5,lsr#(8*2)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr t0,[tt,t0,lsr#(8*3)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r6,[tt,r6,lsr#(8*3)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r4,[tt,r4,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t0,[tt,t0,lsr#(8*1)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r5,[tt,r5,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t1,[tt,t1,lsr#(8*1)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t2,[tt,t2,lsr#(8*2)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r6,[tt,r6,lsr#(8*2)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr t0,[tt,t0,lsr#(8*3)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r7,[tt,r7,lsr#(8*3)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r6,[tt,r6,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t0,[tt,t0,lsr#(8*1)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r7,[tt,r7,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t1,[tt,t1,lsr#(8*1)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t2,[tt,t2,lsr#(8*2)-2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r9,[tt,r9,lsr#(8*2)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr t0,[tt,t0,lsr#(8*3)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r10,[tt,r10,lsr#(8*3)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r8,[tt,r8,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t0,[tt,t0,lsr#(8*1)-2]' arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr r9,[tt,r9,lsl#2]' vim +174 arch/arm/crypto/aes-cipher-core.S 15 .align 5 16 17 rk .reqr0 18 rounds .reqr1 19 in .reqr2 20 out .reqr3 > 21 tt .reqip 22 23 t0 .reqlr 24 t1
[cryptodev:master 43/44] arch/arm/crypto/aes-cipher-core.S:21: Error: selected processor does not support `tt .req ip' in ARM mode
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 1abee99eafab67fb1c98f9ecfc43cd5735384a86 commit: 81edb42629758bacdf813dd5e4542ae26e3ad73a [43/44] crypto: arm/aes - replace scalar AES cipher config: arm-multi_v7_defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 81edb42629758bacdf813dd5e4542ae26e3ad73a # save the attached .config to linux build tree make.cross ARCH=arm All errors (new ones prefixed by >>): arch/arm/crypto/aes-cipher-core.S: Assembler messages: >> arch/arm/crypto/aes-cipher-core.S:21: Error: selected processor does not >> support `tt .req ip' in ARM mode >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `movw >> tt,#:lower16:crypto_ft_tab' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `movt >> tt,#:upper16:crypto_ft_tab' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r8,[tt,r8,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t0,[tt,t0,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r9,[tt,r9,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t1,[tt,t1,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t2,[tt,t2,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r10,[tt,r10,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t0,[tt,t0,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r11,[tt,r11,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r10,[tt,r10,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t0,[tt,t0,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r11,[tt,r11,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t1,[tt,t1,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t2,[tt,t2,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r5,[tt,r5,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> t0,[tt,t0,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r6,[tt,r6,lsl#2]' >> arch/arm/crypto/aes-cipher-core.S:174: Error: ARM register expected -- `ldr >> r4,[tt,r4,lsl#2]' vim +21 arch/arm/crypto/aes-cipher-core.S 15 .align 5 16 17 rk .reqr0 18 rounds .reqr1 19 in .reqr2 20 out .reqr3 > 21 tt .reqip 22 23 t0 .reqlr 24 t1 .reqr2 25 t2 .reqr3 26 27 .macro __select, out, in, idx 28 .if __LINUX_ARM_ARCH__ < 7 29 and \out, \in, #0xff << (8 * \idx) 30 .else 31 ubfx\out, \in, #(8 * \idx), #8 32 .endif 33 .endm 34 35 .macro __load, out, in, idx 36 .if __LINUX_ARM_ARCH__ < 7 && \idx > 0 37 ldr \out, [tt, \in, lsr #(8 * \idx) - 2] 38 .else 39 ldr \out, [tt, \in, lsl #2] 40 .endif 41 .endm 42 43 .macro __hround, out0, out1, in0, in1, in2, in3, t3, t4, enc 44 __select\out0, \in0, 0 45 __selectt0, \in1, 1 46 __load \out0, \out0, 0 47 __load t0, t0, 1 48 49 .if \enc 50 __select\out1, \in1, 0 51 __selectt1, \in2, 1 52 .else 53 __select\out1, \in3, 0 54 __selectt1, \in0, 1 55 .endif 56 __load \out1, \out1, 0 57 __selectt2, \in2, 2 58 __load t1, t1, 1 59 __load t2, t2, 2 60 61 eor \out0, \out0, t0, ror #24 62 63 __selectt0, \in3, 3 64 .if \enc 65 __select\t3, \in3, 2 66 __select\t4, \in0, 3 67 .else 68 __select\t3, \in1, 2 69 __select\t4, \in2, 3 70
Re: [PATCH v4 3/3] drivers: crypto: Enable CPT options crypto for build
Hi George, [auto build test WARNING on v4.9-rc8] [cannot apply to cryptodev/master crypto/master sparc-next/master next-20170111] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/George-Cherian/Add-Support-for-Cavium-Cryptographic-Acceleration-Unit/20170112-192240 config: parisc-allyesconfig (attached as .config) compiler: hppa-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=parisc All warnings (new ones prefixed by >>): drivers/crypto/cavium/cpt/cptvf_reqmanager.c: In function 'process_request': >> drivers/crypto/cavium/cpt/cptvf_reqmanager.c:470:49: warning: format '%lu' >> expects argument of type 'long unsigned int', but argument 3 has type >> 'unsigned int' [-Wformat=] dev_err(>dev, "mapping compptr Failed %lu\n", ^ vim +470 drivers/crypto/cavium/cpt/cptvf_reqmanager.c 8413476d George Cherian 2017-01-11 454 goto request_cleanup; 8413476d George Cherian 2017-01-11 455 } 8413476d George Cherian 2017-01-11 456 8413476d George Cherian 2017-01-11 457 cpt_req->dlen = info->dlen; 8413476d George Cherian 2017-01-11 458 /* 8413476d George Cherian 2017-01-11 459 * Get buffer for union cpt_res_s response 8413476d George Cherian 2017-01-11 460 * structure and its physical address 8413476d George Cherian 2017-01-11 461 */ 8413476d George Cherian 2017-01-11 462 info->completion_addr = kzalloc(sizeof(union cpt_res_s), 8413476d George Cherian 2017-01-11 463 GFP_KERNEL | GFP_ATOMIC); 8413476d George Cherian 2017-01-11 464 *((u8 *)(info->completion_addr)) = COMPLETION_CODE_INIT; 8413476d George Cherian 2017-01-11 465 info->comp_baddr = dma_map_single(>dev, 8413476d George Cherian 2017-01-11 466 (void *)info->completion_addr, 8413476d George Cherian 2017-01-11 467 sizeof(union cpt_res_s), 8413476d George Cherian 2017-01-11 468 DMA_BIDIRECTIONAL); 8413476d George Cherian 2017-01-11 469 if (dma_mapping_error(>dev, info->comp_baddr)) { 8413476d George Cherian 2017-01-11 @470 dev_err(>dev, "mapping compptr Failed %lu\n", 8413476d George Cherian 2017-01-11 471 sizeof(union cpt_res_s)); 8413476d George Cherian 2017-01-11 472 ret = -EFAULT; 8413476d George Cherian 2017-01-11 473 goto request_cleanup; 8413476d George Cherian 2017-01-11 474 } 8413476d George Cherian 2017-01-11 475 8413476d George Cherian 2017-01-11 476 /* Fill the VQ command */ 8413476d George Cherian 2017-01-11 477 vq_cmd.cmd.u64 = 0; 8413476d George Cherian 2017-01-11 478 vq_cmd.cmd.s.opcode = cpu_to_be16(cpt_req->opcode.flags); :: The code at line 470 was first introduced by commit :: 8413476deed83359518ea36cc316f4669a8c521c drivers: crypto: Add the Virtual Function driver for CPT :: TO: George Cherian:: CC: 0day robot --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v4 3/3] drivers: crypto: Enable CPT options crypto for build
Hi George, [auto build test WARNING on v4.9-rc8] [cannot apply to cryptodev/master crypto/master sparc-next/master next-20170111] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/George-Cherian/Add-Support-for-Cavium-Cryptographic-Acceleration-Unit/20170112-192240 coccinelle warnings: (new ones prefixed by >>) >> drivers/crypto/cavium/cpt/cptvf_reqmanager.c:312:2-8: WARNING: NULL check >> before freeing functions like kfree, debugfs_remove, >> debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider >> reorganizing relevant code to avoid passing NULL values. drivers/crypto/cavium/cpt/cptvf_reqmanager.c:315:2-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/crypto/cavium/cpt/cptvf_reqmanager.c:318:2-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/crypto/cavium/cpt/cptvf_reqmanager.c:321:2-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] drivers: crypto: fix ifnullfree.cocci warnings
drivers/crypto/cavium/cpt/cptvf_reqmanager.c:312:2-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/crypto/cavium/cpt/cptvf_reqmanager.c:315:2-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/crypto/cavium/cpt/cptvf_reqmanager.c:318:2-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/crypto/cavium/cpt/cptvf_reqmanager.c:321:2-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: George CherianSigned-off-by: Fengguang Wu --- cptvf_reqmanager.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) --- a/drivers/crypto/cavium/cpt/cptvf_reqmanager.c +++ b/drivers/crypto/cavium/cpt/cptvf_reqmanager.c @@ -308,17 +308,13 @@ void do_request_cleanup(struct cpt_vf *c } } - if (info->scatter_components) - kzfree(info->scatter_components); + kzfree(info->scatter_components); - if (info->gather_components) - kzfree(info->gather_components); + kzfree(info->gather_components); - if (info->out_buffer) - kzfree(info->out_buffer); + kzfree(info->out_buffer); - if (info->in_buffer) - kzfree(info->in_buffer); + kzfree(info->in_buffer); if (info->completion_addr) kzfree((void *)info->completion_addr); -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 3/3] drivers: crypto: Enable CPT options crypto for build
Hi George, [auto build test ERROR on v4.9-rc8] [cannot apply to cryptodev/master crypto/master sparc-next/master next-20170111] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/George-Cherian/Add-Support-for-Cavium-Cryptographic-Acceleration-Unit/20170112-192240 config: blackfin-allmodconfig (attached as .config) compiler: bfin-uclinux-gcc (GCC) 6.2.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=blackfin All error/warnings (new ones prefixed by >>): In file included from drivers/crypto/cavium/cpt/cptvf.h:13:0, from drivers/crypto/cavium/cpt/cptvf_main.c:12: drivers/crypto/cavium/cpt/cpt_common.h: In function 'cpt_write_csr64': >> drivers/crypto/cavium/cpt/cpt_common.h:151:2: error: implicit declaration of >> function 'writeq' [-Werror=implicit-function-declaration] writeq(val, hw_addr + offset); ^~ drivers/crypto/cavium/cpt/cpt_common.h: In function 'cpt_read_csr64': >> drivers/crypto/cavium/cpt/cpt_common.h:156:9: error: implicit declaration of >> function 'readq' [-Werror=implicit-function-declaration] return readq(hw_addr + offset); ^ In file included from drivers/crypto/cavium/cpt/cptvf_main.c:12:0: drivers/crypto/cavium/cpt/cptvf.h: At top level: >> drivers/crypto/cavium/cpt/cptvf.h:111:20: error: array type has incomplete >> element type 'struct msix_entry' struct msix_entry msix_entries[CPT_VF_MSIX_VECTORS]; ^~~~ drivers/crypto/cavium/cpt/cptvf_main.c: In function 'init_worker_threads': >> drivers/crypto/cavium/cpt/cptvf_main.c:52:9: warning: cast from pointer to >> integer of different size [-Wpointer-to-int-cast] (u64)cwqe_info); ^ drivers/crypto/cavium/cpt/cptvf_main.c: In function 'cptvf_disable_msix': >> drivers/crypto/cavium/cpt/cptvf_main.c:375:3: error: implicit declaration of >> function 'pci_disable_msix' [-Werror=implicit-function-declaration] pci_disable_msix(cptvf->pdev); ^~~~ drivers/crypto/cavium/cpt/cptvf_main.c: In function 'cptvf_enable_msix': >> drivers/crypto/cavium/cpt/cptvf_main.c:387:8: error: implicit declaration of >> function 'pci_enable_msix' [-Werror=implicit-function-declaration] ret = pci_enable_msix(cptvf->pdev, cptvf->msix_entries, ^~~ drivers/crypto/cavium/cpt/cptvf_main.c: At top level: >> drivers/crypto/cavium/cpt/cptvf_main.c:942:1: warning: data definition has >> no type or storage class module_pci_driver(cptvf_pci_driver); ^ >> drivers/crypto/cavium/cpt/cptvf_main.c:942:1: error: type defaults to 'int' >> in declaration of 'module_pci_driver' [-Werror=implicit-int] >> drivers/crypto/cavium/cpt/cptvf_main.c:942:1: warning: parameter names >> (without types) in function declaration drivers/crypto/cavium/cpt/cptvf_main.c:934:26: warning: 'cptvf_pci_driver' defined but not used [-Wunused-variable] static struct pci_driver cptvf_pci_driver = { ^~~~ cc1: some warnings being treated as errors -- In file included from drivers/crypto/cavium/cpt/cptvf.h:13:0, from drivers/crypto/cavium/cpt/cptvf_reqmanager.c:9: drivers/crypto/cavium/cpt/cpt_common.h: In function 'cpt_write_csr64': >> drivers/crypto/cavium/cpt/cpt_common.h:151:2: error: implicit declaration of >> function 'writeq' [-Werror=implicit-function-declaration] writeq(val, hw_addr + offset); ^~ drivers/crypto/cavium/cpt/cpt_common.h: In function 'cpt_read_csr64': >> drivers/crypto/cavium/cpt/cpt_common.h:156:9: error: implicit declaration of >> function 'readq' [-Werror=implicit-function-declaration] return readq(hw_addr + offset); ^ In file included from drivers/crypto/cavium/cpt/cptvf_reqmanager.c:9:0: drivers/crypto/cavium/cpt/cptvf.h: At top level: >> drivers/crypto/cavium/cpt/cptvf.h:111:20: error: array type has incomplete >> element type 'struct msix_entry' struct msix_entry msix_entries[CPT_VF_MSIX_VECTORS]; ^~~~ cc1: some warnings being treated as errors -- In file included from drivers/crypto/cavium/cpt/cptpf.h:12:0, from drivers/crypto/cavium/cpt/cptpf_main.c:18: drivers/crypto/cavium/cpt/cpt_common.h: In function 'cpt_write_csr64': >> drivers/crypto/cavium/cpt/cpt_common.h:151:2: error: implicit declaration of >> function 'writeq' [-Werror=implicit-function-declaration] writeq(val, hw_addr + offset); ^~ drivers/crypto/cavium/cpt/cpt_common.h: In function 'cpt_read_csr64': >> drivers/crypto/cavium/cpt/cpt_common.h:156:9: error: implicit declaration of >> function 'readq'
[cryptodev:master 4/17] arch/arm/crypto/chacha20-neon-glue.c:68:32: error: passing argument 1 of 'crypto_chacha20_crypt' from incompatible pointer type
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: fb91a661d99f460f2ea4c7f23ed47f56863ca1d1 commit: 9ae433bc79f97bae221d53bb1a8e21415ea58625 [4/17] crypto: chacha20 - convert generic and x86 versions to skcipher config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 9ae433bc79f97bae221d53bb1a8e21415ea58625 # save the attached .config to linux build tree make.cross ARCH=arm All errors (new ones prefixed by >>): arch/arm/crypto/chacha20-neon-glue.c: In function 'chacha20_simd': >> arch/arm/crypto/chacha20-neon-glue.c:68:32: error: passing argument 1 of >> 'crypto_chacha20_crypt' from incompatible pointer type >> [-Werror=incompatible-pointer-types] return crypto_chacha20_crypt(desc, dst, src, nbytes); ^~~~ In file included from arch/arm/crypto/chacha20-neon-glue.c:22:0: include/crypto/chacha20.h:24:5: note: expected 'struct skcipher_request *' but argument is of type 'struct blkcipher_desc *' int crypto_chacha20_crypt(struct skcipher_request *req); ^ >> arch/arm/crypto/chacha20-neon-glue.c:68:10: error: too many arguments to >> function 'crypto_chacha20_crypt' return crypto_chacha20_crypt(desc, dst, src, nbytes); ^ In file included from arch/arm/crypto/chacha20-neon-glue.c:22:0: include/crypto/chacha20.h:24:5: note: declared here int crypto_chacha20_crypt(struct skcipher_request *req); ^ arch/arm/crypto/chacha20-neon-glue.c: At top level: >> arch/arm/crypto/chacha20-neon-glue.c:111:15: error: initialization from >> incompatible pointer type [-Werror=incompatible-pointer-types] .setkey = crypto_chacha20_setkey, ^~ arch/arm/crypto/chacha20-neon-glue.c:111:15: note: (near initialization for 'alg.cra_u.blkcipher.setkey') cc1: some warnings being treated as errors vim +/crypto_chacha20_crypt +68 arch/arm/crypto/chacha20-neon-glue.c 80966672 Ard Biesheuvel 2016-12-08 62 { 80966672 Ard Biesheuvel 2016-12-08 63 struct blkcipher_walk walk; 80966672 Ard Biesheuvel 2016-12-08 64 u32 state[16]; 80966672 Ard Biesheuvel 2016-12-08 65 int err; 80966672 Ard Biesheuvel 2016-12-08 66 80966672 Ard Biesheuvel 2016-12-08 67 if (nbytes <= CHACHA20_BLOCK_SIZE || !may_use_simd()) 80966672 Ard Biesheuvel 2016-12-08 @68 return crypto_chacha20_crypt(desc, dst, src, nbytes); 80966672 Ard Biesheuvel 2016-12-08 69 80966672 Ard Biesheuvel 2016-12-08 70 blkcipher_walk_init(, dst, src, nbytes); 80966672 Ard Biesheuvel 2016-12-08 71 err = blkcipher_walk_virt_block(desc, , CHACHA20_BLOCK_SIZE); 80966672 Ard Biesheuvel 2016-12-08 72 80966672 Ard Biesheuvel 2016-12-08 73 crypto_chacha20_init(state, crypto_blkcipher_ctx(desc->tfm), walk.iv); 80966672 Ard Biesheuvel 2016-12-08 74 80966672 Ard Biesheuvel 2016-12-08 75 kernel_neon_begin(); 80966672 Ard Biesheuvel 2016-12-08 76 80966672 Ard Biesheuvel 2016-12-08 77 while (walk.nbytes >= CHACHA20_BLOCK_SIZE) { 80966672 Ard Biesheuvel 2016-12-08 78 chacha20_dosimd(state, walk.dst.virt.addr, walk.src.virt.addr, 80966672 Ard Biesheuvel 2016-12-08 79 rounddown(walk.nbytes, CHACHA20_BLOCK_SIZE)); 80966672 Ard Biesheuvel 2016-12-08 80 err = blkcipher_walk_done(desc, , 80966672 Ard Biesheuvel 2016-12-08 81 walk.nbytes % CHACHA20_BLOCK_SIZE); 80966672 Ard Biesheuvel 2016-12-08 82 } 80966672 Ard Biesheuvel 2016-12-08 83 80966672 Ard Biesheuvel 2016-12-08 84 if (walk.nbytes) { 80966672 Ard Biesheuvel 2016-12-08 85 chacha20_dosimd(state, walk.dst.virt.addr, walk.src.virt.addr, 80966672 Ard Biesheuvel 2016-12-08 86 walk.nbytes); 80966672 Ard Biesheuvel 2016-12-08 87 err = blkcipher_walk_done(desc, , 0); 80966672 Ard Biesheuvel 2016-12-08 88 } 80966672 Ard Biesheuvel 2016-12-08 89 80966672 Ard Biesheuvel 2016-12-08 90 kernel_neon_end(); 80966672 Ard Biesheuvel 2016-12-08 91 80966672 Ard Biesheuvel 2016-12-08 92 return err; 80966672 Ard Biesheuvel 2016-12-08 93 } 80966672 Ard Biesheuvel 2016-12-08 94 80966672 Ard Biesheuvel 2016-12-08 95 static struct crypto_alg alg = { 80966672 Ard Biesheuvel 2016-12-08 96 .cra_name = "chacha20", 80966672 Ard Biesheuvel 2016-12-08 97 .cra_driver_name= "chacha20-neon", 80966672 Ard Biesheuvel 2016-12-08 98
[cryptodev:master 4/17] arch/arm64/crypto/chacha20-neon-glue.c:66:32: error: passing argument 1 of 'crypto_chacha20_crypt' from incompatible pointer type
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: fb91a661d99f460f2ea4c7f23ed47f56863ca1d1 commit: 9ae433bc79f97bae221d53bb1a8e21415ea58625 [4/17] crypto: chacha20 - convert generic and x86 versions to skcipher config: arm64-allmodconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 9ae433bc79f97bae221d53bb1a8e21415ea58625 # save the attached .config to linux build tree make.cross ARCH=arm64 All errors (new ones prefixed by >>): arch/arm64/crypto/chacha20-neon-glue.c: In function 'chacha20_simd': >> arch/arm64/crypto/chacha20-neon-glue.c:66:32: error: passing argument 1 of >> 'crypto_chacha20_crypt' from incompatible pointer type >> [-Werror=incompatible-pointer-types] return crypto_chacha20_crypt(desc, dst, src, nbytes); ^~~~ In file included from arch/arm64/crypto/chacha20-neon-glue.c:22:0: include/crypto/chacha20.h:24:5: note: expected 'struct skcipher_request *' but argument is of type 'struct blkcipher_desc *' int crypto_chacha20_crypt(struct skcipher_request *req); ^ >> arch/arm64/crypto/chacha20-neon-glue.c:66:10: error: too many arguments to >> function 'crypto_chacha20_crypt' return crypto_chacha20_crypt(desc, dst, src, nbytes); ^ In file included from arch/arm64/crypto/chacha20-neon-glue.c:22:0: include/crypto/chacha20.h:24:5: note: declared here int crypto_chacha20_crypt(struct skcipher_request *req); ^ arch/arm64/crypto/chacha20-neon-glue.c: At top level: >> arch/arm64/crypto/chacha20-neon-glue.c:109:15: error: initialization from >> incompatible pointer type [-Werror=incompatible-pointer-types] .setkey = crypto_chacha20_setkey, ^~ arch/arm64/crypto/chacha20-neon-glue.c:109:15: note: (near initialization for 'alg.cra_u.blkcipher.setkey') cc1: some warnings being treated as errors vim +/crypto_chacha20_crypt +66 arch/arm64/crypto/chacha20-neon-glue.c 8621caa0 Ard Biesheuvel 2016-12-08 60 { 8621caa0 Ard Biesheuvel 2016-12-08 61 struct blkcipher_walk walk; 8621caa0 Ard Biesheuvel 2016-12-08 62 u32 state[16]; 8621caa0 Ard Biesheuvel 2016-12-08 63 int err; 8621caa0 Ard Biesheuvel 2016-12-08 64 8621caa0 Ard Biesheuvel 2016-12-08 65 if (nbytes <= CHACHA20_BLOCK_SIZE) 8621caa0 Ard Biesheuvel 2016-12-08 @66 return crypto_chacha20_crypt(desc, dst, src, nbytes); 8621caa0 Ard Biesheuvel 2016-12-08 67 8621caa0 Ard Biesheuvel 2016-12-08 68 blkcipher_walk_init(, dst, src, nbytes); 8621caa0 Ard Biesheuvel 2016-12-08 69 err = blkcipher_walk_virt_block(desc, , CHACHA20_BLOCK_SIZE); 8621caa0 Ard Biesheuvel 2016-12-08 70 8621caa0 Ard Biesheuvel 2016-12-08 71 crypto_chacha20_init(state, crypto_blkcipher_ctx(desc->tfm), walk.iv); 8621caa0 Ard Biesheuvel 2016-12-08 72 8621caa0 Ard Biesheuvel 2016-12-08 73 kernel_neon_begin(); 8621caa0 Ard Biesheuvel 2016-12-08 74 8621caa0 Ard Biesheuvel 2016-12-08 75 while (walk.nbytes >= CHACHA20_BLOCK_SIZE) { 8621caa0 Ard Biesheuvel 2016-12-08 76 chacha20_dosimd(state, walk.dst.virt.addr, walk.src.virt.addr, 8621caa0 Ard Biesheuvel 2016-12-08 77 rounddown(walk.nbytes, CHACHA20_BLOCK_SIZE)); 8621caa0 Ard Biesheuvel 2016-12-08 78 err = blkcipher_walk_done(desc, , 8621caa0 Ard Biesheuvel 2016-12-08 79 walk.nbytes % CHACHA20_BLOCK_SIZE); 8621caa0 Ard Biesheuvel 2016-12-08 80 } 8621caa0 Ard Biesheuvel 2016-12-08 81 8621caa0 Ard Biesheuvel 2016-12-08 82 if (walk.nbytes) { 8621caa0 Ard Biesheuvel 2016-12-08 83 chacha20_dosimd(state, walk.dst.virt.addr, walk.src.virt.addr, 8621caa0 Ard Biesheuvel 2016-12-08 84 walk.nbytes); 8621caa0 Ard Biesheuvel 2016-12-08 85 err = blkcipher_walk_done(desc, , 0); 8621caa0 Ard Biesheuvel 2016-12-08 86 } 8621caa0 Ard Biesheuvel 2016-12-08 87 8621caa0 Ard Biesheuvel 2016-12-08 88 kernel_neon_end(); 8621caa0 Ard Biesheuvel 2016-12-08 89 8621caa0 Ard Biesheuvel 2016-12-08 90 return err; 8621caa0 Ard Biesheuvel 2016-12-08 91 } 8621caa0 Ard Biesheuvel 2016-12-08 92 8621caa0 Ard Biesheuvel 2016-12-08 93 static struct crypto_alg alg = { 8621caa0 Ard Biesheuvel 2016-12-08 94 .cra_name = "chacha20", 8621caa0 Ard Biesheuvel 2016-12-08 95 .cra_driver_name= "chacha20-neon", 8621caa0 Ard Biesheuvel 2016-12-08 96
Re: [PATCH v2 11/12] crypto: atmel-authenc: add support to authenc(hmac(shaX),Y(aes)) modes
Hi Cyrille, [auto build test WARNING on cryptodev/master] [also build test WARNING on next-20161222] [cannot apply to v4.9] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Cyrille-Pitchen/crypto-atmel-authenc-add-support-to-authenc-hmac-shaX-Y-aes-modes/20161223-015820 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: alpha-allyesconfig (attached as .config) compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=alpha All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:305:0, from include/linux/kernel.h:13, from drivers/crypto/atmel-sha.c:17: drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_cpu': >> drivers/crypto/atmel-sha.c:465:19: warning: format '%d' expects argument of >> type 'int', but argument 6 has type 'size_t {aka long unsigned int}' >> [-Wformat=] dev_dbg(dd->dev, "xmit_cpu: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n", ^ include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg' __dynamic_dev_dbg(, dev, fmt, \ ^~~ >> drivers/crypto/atmel-sha.c:465:2: note: in expansion of macro 'dev_dbg' dev_dbg(dd->dev, "xmit_cpu: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n", ^~~ drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_pdc': drivers/crypto/atmel-sha.c:494:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=] dev_dbg(dd->dev, "xmit_pdc: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n", ^ include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg' __dynamic_dev_dbg(, dev, fmt, \ ^~~ drivers/crypto/atmel-sha.c:494:2: note: in expansion of macro 'dev_dbg' dev_dbg(dd->dev, "xmit_pdc: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n", ^~~ drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_dma': drivers/crypto/atmel-sha.c:541:19: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=] dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n", ^ include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg' __dynamic_dev_dbg(, dev, fmt, \ ^~~ drivers/crypto/atmel-sha.c:541:2: note: in expansion of macro 'dev_dbg' dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n", ^~~ drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_dma_map': >> drivers/crypto/atmel-sha.c:620:26: warning: format '%u' expects argument of >> type 'unsigned int', but argument 3 has type 'size_t {aka long unsigned >> int}' [-Wformat=] dev_err(dd->dev, "dma %u bytes error\n", ctx->buflen + ^ In file included from include/linux/printk.h:305:0, from include/linux/kernel.h:13, from drivers/crypto/atmel-sha.c:17: drivers/crypto/atmel-sha.c: In function 'atmel_sha_update_dma_slow': drivers/crypto/atmel-sha.c:641:19: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=] dev_dbg(dd->dev, "slow: bufcnt: %u, digcnt: 0x%llx 0x%llx, final: %d\n", ^ include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg' __dynamic_dev_dbg(, dev, fmt, \ ^~~ drivers/crypto/atmel-sha.c:641:2: note: in expansion of macro 'dev_dbg' dev_dbg(dd->dev, "slow: bufcnt: %u, digcnt: 0x%llx 0x%llx, final: %d\n", ^~~ drivers/crypto/atmel-sha.c: In function 'atmel_sha_update_dma_start': drivers/crypto/atmel-sha.c:669:19: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'size_t {aka long unsigned int}' [-Wformat=] dev_dbg(dd->dev, "fast: digcnt: 0x%llx 0x%llx, bufcnt: %u, total: %u\n", ^ include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg' __dynamic_dev_dbg(, dev, fmt, \ ^~~ drivers/crypto/atmel-sha.c:669:2: note: in expansion of macro 'dev_dbg' dev_dbg(dd->dev, "fast: digcnt: 0x%llx 0x%llx, bufcnt: %u, total: %u\n", ^~~ drivers/crypto/atmel-sha.c:711:27: warning: format '%u'
Re: [PATCH 11/12] crypto: atmel-authenc: add support to authenc(hmac(shaX),Y(aes)) modes
Hi Cyrille, [auto build test ERROR on cryptodev/master] [also build test ERROR on next-20161222] [cannot apply to v4.9] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Cyrille-Pitchen/crypto-atmel-authenc-add-support-to-authenc-hmac-shaX-Y-aes-modes/20161223-012130 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All error/warnings (new ones prefixed by >>): warning: (CRYPTO_DEV_ATMEL_AUTHENC) selects CRYPTO_DEV_ATMEL_SHA which has unmet direct dependencies (CRYPTO && CRYPTO_HW && ARCH_AT91) >> drivers/crypto/atmel-aes.c:44:27: fatal error: atmel-authenc.h: No such file >> or directory #include "atmel-authenc.h" ^ compilation terminated. -- >> drivers/crypto/atmel-sha.c:44:27: fatal error: atmel-authenc.h: No such file >> or directory #include "atmel-authenc.h" ^ compilation terminated. vim +44 drivers/crypto/atmel-aes.c 38 #include 39 #include 40 #include 41 #include 42 #include 43 #include "atmel-aes-regs.h" > 44 #include "atmel-authenc.h" 45 46 #define ATMEL_AES_PRIORITY 300 47 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF
Hi Jason, [auto build test ERROR on linus/master] [also build test ERROR on v4.9 next-20161215] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jason-A-Donenfeld/siphash-add-cryptographically-secure-PRF/20161216-092837 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=ia64 All errors (new ones prefixed by >>): lib/siphash.c: In function 'siphash_unaligned': >> lib/siphash.c:123:15: error: 'bytes' undeclared (first use in this function) case 1: b |= bytes[0]; ^ lib/siphash.c:123:15: note: each undeclared identifier is reported only once for each function it appears in vim +/bytes +123 lib/siphash.c 117 case 7: b |= ((u64)end[6]) << 48; 118 case 6: b |= ((u64)end[5]) << 40; 119 case 5: b |= ((u64)end[4]) << 32; 120 case 4: b |= get_unaligned_le32(end); break; 121 case 3: b |= ((u64)end[2]) << 16; 122 case 2: b |= get_unaligned_le16(end); break; > 123 case 1: b |= bytes[0]; 124 } 125 #endif 126 v3 ^= b; --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v4 1/4] siphash: add cryptographically secure hashtable function
Hi Jason, [auto build test ERROR on linus/master] [also build test ERROR on v4.9 next-20161215] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jason-A-Donenfeld/siphash-add-cryptographically-secure-hashtable-function/20161215-095213 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=ia64 Note: the linux-review/Jason-A-Donenfeld/siphash-add-cryptographically-secure-hashtable-function/20161215-095213 HEAD 3e343f4316f94cded0d1384cf35957fd51dbbc28 builds fine. It only hurts bisectibility. All error/warnings (new ones prefixed by >>): In file included from include/linux/linkage.h:6:0, from include/linux/kernel.h:6, from lib/siphash.c:12: >> lib/siphash.c:152:15: error: 'siphash24_unaligned' undeclared here (not in a >> function) EXPORT_SYMBOL(siphash24_unaligned); ^ include/linux/export.h:58:16: note: in definition of macro '___EXPORT_SYMBOL' extern typeof(sym) sym; \ ^~~ >> lib/siphash.c:152:1: note: in expansion of macro 'EXPORT_SYMBOL' EXPORT_SYMBOL(siphash24_unaligned); ^ vim +/siphash24_unaligned +152 lib/siphash.c 6 * https://131002.net/siphash/ 7 * 8 * This implementation is specifically for SipHash2-4. 9 */ 10 11 #include > 12 #include 13 #include 14 15 #if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 16 #include 17 #include 18 #endif 19 20 static inline u16 le16_to_cpuvp(const void *p) 21 { 22 return le16_to_cpup(p); 23 } 24 static inline u32 le32_to_cpuvp(const void *p) 25 { 26 return le32_to_cpup(p); 27 } 28 static inline u64 le64_to_cpuvp(const void *p) 29 { 30 return le64_to_cpup(p); 31 } 32 33 #define SIPROUND \ 34 do { \ 35 v0 += v1; v1 = rol64(v1, 13); v1 ^= v0; v0 = rol64(v0, 32); \ 36 v2 += v3; v3 = rol64(v3, 16); v3 ^= v2; \ 37 v0 += v3; v3 = rol64(v3, 21); v3 ^= v0; \ 38 v2 += v1; v1 = rol64(v1, 17); v1 ^= v2; v2 = rol64(v2, 32); \ 39 } while(0) 40 41 /** 42 * siphash - compute 64-bit siphash PRF value 43 * @data: buffer to hash, must be aligned to SIPHASH_ALIGNMENT 44 * @size: size of @data 45 * @key: key buffer of size SIPHASH_KEY_LEN, must be aligned to SIPHASH_ALIGNMENT 46 */ 47 u64 siphash(const u8 *data, size_t len, const u8 key[SIPHASH_KEY_LEN]) 48 { 49 u64 v0 = 0x736f6d6570736575ULL; 50 u64 v1 = 0x646f72616e646f6dULL; 51 u64 v2 = 0x6c7967656e657261ULL; 52 u64 v3 = 0x7465646279746573ULL; 53 u64 b = ((u64)len) << 56; 54 u64 k0 = le64_to_cpuvp(key); 55 u64 k1 = le64_to_cpuvp(key + sizeof(u64)); 56 u64 m; 57 const u8 *end = data + len - (len % sizeof(u64)); 58 const u8 left = len & (sizeof(u64) - 1); 59 v3 ^= k1; 60 v2 ^= k0; 61 v1 ^= k1; 62 v0 ^= k0; 63 for (; data != end; data += sizeof(u64)) { 64 m = le64_to_cpuvp(data); 65 v3 ^= m; 66 SIPROUND; 67 SIPROUND; 68 v0 ^= m; 69 } 70 #if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 71 if (left) 72 b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & bytemask_from_count(left))); 73 #else 74 switch (left) { 75 case 7: b |= ((u64)data[6]) << 48; 76 case 6: b |= ((u64)data[5]) << 40; 77 case 5: b |= ((u64)data[4]) << 32; 78 case 4: b |= le32_to_cpuvp(data); break; 79 case 3: b |= ((u64)data[2]) << 16; 80 case 2: b |= le16_to_cpuvp(data); break; 81 case 1: b |= data[0]; 82 } 83 #endif 84 v3 ^= b; 85 SIPROUND; 86 SIPROUND; 87 v0 ^= b; 88 v2 ^= 0xff; 89 SIPROUND; 90 SIPROUND; 91 SIPROUND; 92 SIPROUND; 93 return (v0 ^ v1) ^ (v2 ^ v3); 94 } 95 EXPORT_SYMBOL(siphash); 96 97 #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS 98 /** 99 * siphash - compute 64-bit siphash PRF value, without alignment requirements 100 * @data: buffer to hash 101 * @size: size of @data
Re: [PATCH v3 3/3] random: use siphash24 instead of md5 for get_random_int/long
Hi Jason, [auto build test ERROR on linus/master] [also build test ERROR on next-20161214] [cannot apply to v4.9] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jason-A-Donenfeld/siphash-add-cryptographically-secure-hashtable-function/20161215-041458 config: openrisc-or1ksim_defconfig (attached as .config) compiler: or32-linux-gcc (GCC) 4.5.1-or32-1.0rc1 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=openrisc All errors (new ones prefixed by >>): >> drivers/char/random.c:2046:1: error: requested alignment is not a constant drivers/char/random.c: In function 'get_random_int': drivers/char/random.c:2071:2: error: requested alignment is not a constant drivers/char/random.c: In function 'get_random_long': drivers/char/random.c:2100:2: error: requested alignment is not a constant vim +2046 drivers/char/random.c 2040 }, 2041 #endif 2042 { } 2043 }; 2044 #endif /* CONFIG_SYSCTL */ 2045 > 2046 static u8 random_int_secret[SIPHASH24_KEY_LEN] > __aligned(SIPHASH24_ALIGNMENT); 2047 2048 int random_int_secret_init(void) 2049 { --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v3 3/3] random: use siphash24 instead of md5 for get_random_int/long
Hi Jason, [auto build test ERROR on linus/master] [also build test ERROR on next-20161214] [cannot apply to v4.9] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jason-A-Donenfeld/siphash-add-cryptographically-secure-hashtable-function/20161215-041458 config: i386-randconfig-i1-201650 (attached as .config) compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): >> drivers/char/random.c:2046:1: error: requested alignment is not an integer >> constant static u8 random_int_secret[SIPHASH24_KEY_LEN] __aligned(SIPHASH24_ALIGNMENT); ^ drivers/char/random.c: In function 'get_random_int': drivers/char/random.c:2071:2: error: requested alignment is not an integer constant } __aligned(SIPHASH24_ALIGNMENT) combined; ^ drivers/char/random.c: In function 'get_random_long': drivers/char/random.c:2100:2: error: requested alignment is not an integer constant } __aligned(SIPHASH24_ALIGNMENT) combined; ^ vim +2046 drivers/char/random.c 2040 }, 2041 #endif 2042 { } 2043 }; 2044 #endif /* CONFIG_SYSCTL */ 2045 > 2046 static u8 random_int_secret[SIPHASH24_KEY_LEN] > __aligned(SIPHASH24_ALIGNMENT); 2047 2048 int random_int_secret_init(void) 2049 { --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v3 2/3] secure_seq: use siphash24 instead of md5_transform
Hi Jason, [auto build test ERROR on linus/master] [also build test ERROR on next-20161214] [cannot apply to v4.9] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jason-A-Donenfeld/siphash-add-cryptographically-secure-hashtable-function/20161215-041458 config: openrisc-or1ksim_defconfig (attached as .config) compiler: or32-linux-gcc (GCC) 4.5.1-or32-1.0rc1 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=openrisc All errors (new ones prefixed by >>): >> net/core/secure_seq.c:20:1: error: requested alignment is not a constant net/core/secure_seq.c: In function 'secure_tcp_sequence_number': net/core/secure_seq.c:99:2: error: requested alignment is not a constant net/core/secure_seq.c: In function 'secure_ipv4_port_ephemeral': net/core/secure_seq.c:119:2: error: requested alignment is not a constant vim +20 net/core/secure_seq.c 14 #include 15 16 #if IS_ENABLED(CONFIG_IPV6) || IS_ENABLED(CONFIG_INET) 17 #include 18 #include 19 > 20 static u8 net_secret[SIPHASH24_KEY_LEN] __aligned(SIPHASH24_ALIGNMENT); 21 22 static __always_inline void net_secret_init(void) 23 { --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v3 1/3] siphash: add cryptographically secure hashtable function
Hi Jason, [auto build test ERROR on linus/master] [also build test ERROR on v4.9 next-20161214] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jason-A-Donenfeld/siphash-add-cryptographically-secure-hashtable-function/20161215-041458 config: i386-randconfig-i1-201650 (attached as .config) compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): lib/test_siphash.c: In function 'siphash_test_init': >> lib/test_siphash.c:49:2: error: requested alignment is not an integer >> constant u8 in[64] __aligned(SIPHASH24_ALIGNMENT); ^ lib/test_siphash.c:50:2: error: requested alignment is not an integer constant u8 k[16] __aligned(SIPHASH24_ALIGNMENT); ^ vim +49 lib/test_siphash.c 43 0x6ca4ecb15c5f91e1ULL, 0x9f626da15c9625f3ULL, 0xe51b38608ef25f57ULL, 44 0x958a324ceb064572ULL 45 }; 46 47 static int __init siphash_test_init(void) 48 { > 49 u8 in[64] __aligned(SIPHASH24_ALIGNMENT); 50 u8 k[16] __aligned(SIPHASH24_ALIGNMENT); 51 u8 in_unaligned[65]; 52 u8 k_unaligned[65]; --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip