linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the crypto tree
@ 2020-04-17  3:40 Stephen Rothwell
  2020-04-17  4:00 ` Shukun Tan
  0 siblings, 1 reply; 18+ messages in thread
From: Stephen Rothwell @ 2020-04-17  3:40 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Shukun Tan,
	Zhou Wang, Zaibo Xu, Yang Shen, Hui Tang

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

Hi all,

After merging the crypto tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/crypto/hisilicon/qm.c: In function 'qm_soft_reset':
drivers/crypto/hisilicon/qm.c:2915:7: error: implicit declaration of function 'acpi_evaluate_integer'; did you mean 'acpi_evaluate_object'? [-Werror=implicit-function-declaration]
 2915 |   s = acpi_evaluate_integer(ACPI_HANDLE(&pdev->dev),
      |       ^~~~~~~~~~~~~~~~~~~~~
      |       acpi_evaluate_object

Caused by commit

  6c6dd5802c2d ("crypto: hisilicon/qm - add controller reset interface")

I have reverted the following commits for today

f037fc5f93f4 crypto: hisilicon/qm - stop qp by judging sq and cq tail
141876c252a4 crypto: hisilicon/sec2 - add controller reset support for SEC2
1f5c9f34f0cc crypto: hisilicon/hpre - add controller reset support for HPRE
84c9b7802b02 crypto: hisilicon/zip - add controller reset support for zip
6c6dd5802c2d crypto: hisilicon/qm - add controller reset interface

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2020-04-17  3:40 linux-next: build failure after merge of the crypto tree Stephen Rothwell
@ 2020-04-17  4:00 ` Shukun Tan
  0 siblings, 0 replies; 18+ messages in thread
From: Shukun Tan @ 2020-04-17  4:00 UTC (permalink / raw)
  To: Stephen Rothwell, Herbert Xu, Linux Crypto List
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Zhou Wang,
	Zaibo Xu, Yang Shen, Hui Tang



On 2020/4/17 11:40, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the crypto tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/crypto/hisilicon/qm.c: In function 'qm_soft_reset':
> drivers/crypto/hisilicon/qm.c:2915:7: error: implicit declaration of function 'acpi_evaluate_integer'; did you mean 'acpi_evaluate_object'? [-Werror=implicit-function-declaration]
>  2915 |   s = acpi_evaluate_integer(ACPI_HANDLE(&pdev->dev),
>       |       ^~~~~~~~~~~~~~~~~~~~~
>       |       acpi_evaluate_object
> 
> Caused by commit
> 
>   6c6dd5802c2d ("crypto: hisilicon/qm - add controller reset interface")
> 
> I have reverted the following commits for today
> 
> f037fc5f93f4 crypto: hisilicon/qm - stop qp by judging sq and cq tail
> 141876c252a4 crypto: hisilicon/sec2 - add controller reset support for SEC2
> 1f5c9f34f0cc crypto: hisilicon/hpre - add controller reset support for HPRE
> 84c9b7802b02 crypto: hisilicon/zip - add controller reset support for zip
> 6c6dd5802c2d crypto: hisilicon/qm - add controller reset interface
> 

Hi Stephen,

The 'kbuild test robot' has reported this, I will fix it as soon as possible.

Best,
Shukun

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2022-12-04 23:48 Stephen Rothwell
@ 2022-12-04 23:52 ` Stephen Rothwell
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Rothwell @ 2022-12-04 23:52 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Linux Crypto List, Michael Ellerman, PowerPC,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

On Mon, 5 Dec 2022 10:48:57 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> It could be (easily) argued that arch/powerpc/include/asm/cache.h should
> include linus/types.h, but it is also unusual to include an asm/... file
> before all the linux/... files.

Or maybe you should have included linux/cache.h instead of asm/cache.h?

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2022-12-04 23:48 Stephen Rothwell
  2022-12-04 23:52 ` Stephen Rothwell
  0 siblings, 1 reply; 18+ messages in thread
From: Stephen Rothwell @ 2022-12-04 23:48 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Linux Crypto List, Michael Ellerman, PowerPC,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the crypto tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from include/crypto/algapi.h:10,
                 from include/crypto/internal/hash.h:11,
                 from arch/powerpc/crypto/sha1.c:15:
arch/powerpc/include/asm/cache.h:40:9: error: unknown type name 'u32'
   40 |         u32 size;
      |         ^~~
arch/powerpc/include/asm/cache.h:41:9: error: unknown type name 'u32'
   41 |         u32 line_size;
      |         ^~~

(and so on ... lots of errors)

Caused by commit

  e634ac4a8aaa ("crypto: api - Add crypto_tfm_ctx_dma")

It could be (easily) argued that arch/powerpc/include/asm/cache.h should
include linus/types.h, but it is also unusual to include an asm/... file
before all the linux/... files.

Anyway, I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 5 Dec 2022 10:42:57 +1100
Subject: [PATCH] fix up for "crypto: api - Add crypto_tfm_ctx_dma"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/crypto/algapi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 8722fd67f40a..fced47dbd306 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -7,13 +7,13 @@
 #ifndef _CRYPTO_ALGAPI_H
 #define _CRYPTO_ALGAPI_H
 
-#include <asm/cache.h>
 #include <linux/align.h>
 #include <linux/crypto.h>
 #include <linux/kconfig.h>
 #include <linux/list.h>
 #include <linux/types.h>
 
+#include <asm/cache.h>
 #include <asm/unaligned.h>
 
 /*
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2022-09-07  1:53 Stephen Rothwell
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Rothwell @ 2022-09-07  1:53 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Johnny Huang, Neal Liu, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/device.h:15,
                 from include/linux/dma-mapping.h:7,
                 from drivers/crypto/aspeed/aspeed-hace.h:9,
                 from drivers/crypto/aspeed/aspeed-hace-hash.c:6:
drivers/crypto/aspeed/aspeed-hace-hash.c: In function 'aspeed_ahash_dma_prepare_sg':
drivers/crypto/aspeed/aspeed-hace-hash.c:10:28: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
   10 |         dev_info((h)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
      |                            ^~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
  150 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                          ^~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:10:9: note: in expansion of macro 'dev_info'
   10 |         dev_info((h)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
      |         ^~~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:188:9: note: in expansion of macro 'AHASH_DBG'
  188 |         AHASH_DBG(hace_dev, "%s:0x%x, %s:0x%x, %s:0x%x, %s:0x%x\n",
      |         ^~~~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c: In function 'aspeed_hace_ahash_trigger':
drivers/crypto/aspeed/aspeed-hace-hash.c:10:28: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'dma_addr_t' {aka 'long long unsigned int'} [-Werror=format=]
   10 |         dev_info((h)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
      |                            ^~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
  150 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                          ^~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:10:9: note: in expansion of macro 'dev_info'
   10 |         dev_info((h)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
      |         ^~~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:327:9: note: in expansion of macro 'AHASH_DBG'
  327 |         AHASH_DBG(hace_dev, "src_dma:0x%x, digest_dma:0x%x, length:0x%x\n",
      |         ^~~~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:10:28: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' {aka 'long long unsigned int'} [-Werror=format=]
   10 |         dev_info((h)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
      |                            ^~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
  150 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                          ^~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:10:9: note: in expansion of macro 'dev_info'
   10 |         dev_info((h)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
      |         ^~~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:327:9: note: in expansion of macro 'AHASH_DBG'
  327 |         AHASH_DBG(hace_dev, "src_dma:0x%x, digest_dma:0x%x, length:0x%x\n",
      |         ^~~~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:10:28: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
   10 |         dev_info((h)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
      |                            ^~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
  150 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                          ^~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:10:9: note: in expansion of macro 'dev_info'
   10 |         dev_info((h)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
      |         ^~~~~~~~
drivers/crypto/aspeed/aspeed-hace-hash.c:327:9: note: in expansion of macro 'AHASH_DBG'
  327 |         AHASH_DBG(hace_dev, "src_dma:0x%x, digest_dma:0x%x, length:0x%x\n",
      |         ^~~~~~~~~

Caused by commit

  108713a713c7 ("crypto: aspeed - Add HACE hash driver")

Exposed by commits

  2be570849efc ("crypto: aspeed - fix build module error")
  31b39755e325 ("crypto: aspeed - Enable compile testing")

I have used the crypto tree from next-20220901 again today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2022-09-06  1:30 Stephen Rothwell
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Rothwell @ 2022-09-06  1:30 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) failed like this:

ERROR: modpost: "aspeed_register_hace_hash_algs" [drivers/crypto/aspeed/aspeed_crypto.ko] undefined!
ERROR: modpost: "aspeed_unregister_hace_crypto_algs" [drivers/crypto/aspeed/aspeed_crypto.ko] undefined!
ERROR: modpost: "aspeed_register_hace_crypto_algs" [drivers/crypto/aspeed/aspeed_crypto.ko] undefined!
ERROR: modpost: "aspeed_unregister_hace_hash_algs" [drivers/crypto/aspeed/aspeed_crypto.ko] undefined!

Exposed by commit

  31b39755e325 ("crypto: aspeed - Enable compile testing")

I have used the crypto tree from next-20220901 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2022-05-09 11:10 Stephen Rothwell
@ 2022-05-09 12:26 ` Masahiro Yamada
  0 siblings, 0 replies; 18+ messages in thread
From: Masahiro Yamada @ 2022-05-09 12:26 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Herbert Xu, Linux Crypto List, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, May 9, 2022 at 8:10 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the crypto tree, today's linux-next build (powerpc
> pseries_le_defconfig) failed like this:
>
> ccnI8W1t.s: Assembler messages:
> ccnI8W1t.s: Error: .size expression for aes_p8_set_encrypt_key does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for .aes_p8_set_encrypt_key does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for aes_p8_set_decrypt_key does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for .aes_p8_set_decrypt_key does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for aes_p8_encrypt does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for .aes_p8_encrypt does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for aes_p8_decrypt does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for .aes_p8_decrypt does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for aes_p8_cbc_encrypt does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for .aes_p8_cbc_encrypt does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for aes_p8_ctr32_encrypt_blocks does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for .aes_p8_ctr32_encrypt_blocks does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for aes_p8_xts_encrypt does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for .aes_p8_xts_encrypt does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for aes_p8_xts_decrypt does not evaluate to a constant
> ccnI8W1t.s: Error: .size expression for .aes_p8_xts_decrypt does not evaluate to a constant
>
> Caused by commit
>
>   b52455a73db9 ("crypto: vmx - Align the short log with Makefile cleanups")
>
> I have reverted that commit for today.


The fixup exists.

https://lore.kernel.org/lkml/20220507052244.1426765-1-masahiroy@kernel.org/


> --
> Cheers,
> Stephen Rothwell



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 18+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2022-05-09 11:10 Stephen Rothwell
  2022-05-09 12:26 ` Masahiro Yamada
  0 siblings, 1 reply; 18+ messages in thread
From: Stephen Rothwell @ 2022-05-09 11:10 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Masahiro Yamada, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the crypto tree, today's linux-next build (powerpc
pseries_le_defconfig) failed like this:

ccnI8W1t.s: Assembler messages:
ccnI8W1t.s: Error: .size expression for aes_p8_set_encrypt_key does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for .aes_p8_set_encrypt_key does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for aes_p8_set_decrypt_key does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for .aes_p8_set_decrypt_key does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for aes_p8_encrypt does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for .aes_p8_encrypt does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for aes_p8_decrypt does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for .aes_p8_decrypt does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for aes_p8_cbc_encrypt does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for .aes_p8_cbc_encrypt does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for aes_p8_ctr32_encrypt_blocks does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for .aes_p8_ctr32_encrypt_blocks does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for aes_p8_xts_encrypt does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for .aes_p8_xts_encrypt does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for aes_p8_xts_decrypt does not evaluate to a constant
ccnI8W1t.s: Error: .size expression for .aes_p8_xts_decrypt does not evaluate to a constant

Caused by commit

  b52455a73db9 ("crypto: vmx - Align the short log with Makefile cleanups")

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2021-09-27  4:32 Stephen Rothwell
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Rothwell @ 2021-09-27  4:32 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the crypto tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

ERROR: modpost: "crypto_boot_test_finished" [crypto/crypto_algapi.ko] undefined!

Caused by commit

  adad556efcdd ("crypto: api - Fix built-in testing dependency failures")

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2020-04-21  5:12 Stephen Rothwell
@ 2020-04-22 13:33 ` Herbert Xu
  0 siblings, 0 replies; 18+ messages in thread
From: Herbert Xu @ 2020-04-22 13:33 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Crypto List, Linux Next Mailing List,
	Linux Kernel Mailing List, Shukun Tan, Zhou Wang, Zaibo Xu

On Tue, Apr 21, 2020 at 03:12:40PM +1000, Stephen Rothwell wrote:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 21 Apr 2020 14:56:49 +1000
> Subject: [PATCH] crypto: hisilicon/qm add more ACPI dependencies
> 
> due to the selects of CRYPTO_DEV_HISI_QM which now depends on ACPI
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/crypto/hisilicon/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 18+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2020-04-21  5:12 Stephen Rothwell
  2020-04-22 13:33 ` Herbert Xu
  0 siblings, 1 reply; 18+ messages in thread
From: Stephen Rothwell @ 2020-04-21  5:12 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Shukun Tan,
	Zhou Wang, Zaibo Xu

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

Hi all,

After merging the crypto tree, today's linux-next build (powerpc
allyesconfig) failed like this:

WARNING: unmet direct dependencies detected for CRYPTO_DEV_HISI_QM
  Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && (ARM64 || COMPILE_TEST [=y]) && PCI [=y] && PCI_MSI [=y] && (UACCE [=y] || UACCE [=y]=n) && ACPI
  Selected by [y]:
  - CRYPTO_DEV_HISI_SEC2 [=y] && CRYPTO [=y] && CRYPTO_HW [=y] && PCI [=y] && PCI_MSI [=y] && (UACCE [=y] || UACCE [=y]=n) && (ARM64 || COMPILE_TEST [=y] && 64BIT [=y])
  - CRYPTO_DEV_HISI_ZIP [=y] && CRYPTO [=y] && CRYPTO_HW [=y] && PCI [=y] && PCI_MSI [=y] && (ARM64 || COMPILE_TEST [=y] && 64BIT [=y]) && (!CPU_BIG_ENDIAN [=y] || COMPILE_TEST [=y]) && (UACCE [=y] || UACCE [=y]=n)
  - CRYPTO_DEV_HISI_HPRE [=y] && CRYPTO [=y] && CRYPTO_HW [=y] && PCI [=y] && PCI_MSI [=y] && (UACCE [=y] || UACCE [=y]=n) && (ARM64 || COMPILE_TEST [=y] && 64BIT [=y])

drivers/crypto/hisilicon/qm.c: In function 'qm_soft_reset':
drivers/crypto/hisilicon/qm.c:2915:7: error: implicit declaration of function 'acpi_evaluate_integer'; did you mean 'acpi_evaluate_object'? [-Werror=implicit-function-declaration]
 2915 |   s = acpi_evaluate_integer(ACPI_HANDLE(&pdev->dev),
      |       ^~~~~~~~~~~~~~~~~~~~~
      |       acpi_evaluate_object

Caused by commit

  6c6dd5802c2d ("crypto: hisilicon/qm - add controller reset interface")

Unfortunately not fixed by commit

  f88480e300ac ("crypto: hisilicon/qm - fix build failure with ACPI off")

[the moral is "don't select symbols that have dependencies" :-( ]

I have added the following patch for today

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 21 Apr 2020 14:56:49 +1000
Subject: [PATCH] crypto: hisilicon/qm add more ACPI dependencies

due to the selects of CRYPTO_DEV_HISI_QM which now depends on ACPI

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/crypto/hisilicon/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
index 99e962e39f36..9c3b3ca815e6 100644
--- a/drivers/crypto/hisilicon/Kconfig
+++ b/drivers/crypto/hisilicon/Kconfig
@@ -29,6 +29,7 @@ config CRYPTO_DEV_HISI_SEC2
 	depends on PCI && PCI_MSI
 	depends on UACCE || UACCE=n
 	depends on ARM64 || (COMPILE_TEST && 64BIT)
+	depends on ACPI
 	help
 	  Support for HiSilicon SEC Engine of version 2 in crypto subsystem.
 	  It provides AES, SM4, and 3DES algorithms with ECB
@@ -53,6 +54,7 @@ config CRYPTO_DEV_HISI_ZIP
 	depends on ARM64 || (COMPILE_TEST && 64BIT)
 	depends on !CPU_BIG_ENDIAN || COMPILE_TEST
 	depends on UACCE || UACCE=n
+	depends on ACPI
 	select CRYPTO_DEV_HISI_QM
 	help
 	  Support for HiSilicon ZIP Driver
@@ -62,6 +64,7 @@ config CRYPTO_DEV_HISI_HPRE
 	depends on PCI && PCI_MSI
 	depends on UACCE || UACCE=n
 	depends on ARM64 || (COMPILE_TEST && 64BIT)
+	depends on ACPI
 	select CRYPTO_DEV_HISI_QM
 	select CRYPTO_DH
 	select CRYPTO_RSA
-- 
2.25.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2019-08-12  3:21 Stephen Rothwell
@ 2019-08-12  6:53 ` Zhou Wang
  0 siblings, 0 replies; 18+ messages in thread
From: Zhou Wang @ 2019-08-12  6:53 UTC (permalink / raw)
  To: Stephen Rothwell, Herbert Xu, Linux Crypto List
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Shiju Jose,
	Kenneth Lee, Hao Fang, Jonathan Cameron, John Garry

On 2019/8/12 11:21, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/crypto/hisilicon/qm.c: Assembler messages:
> drivers/crypto/hisilicon/qm.c:334: Error: no such instruction: `ldp %rdx,%rcx,%bl'
> drivers/crypto/hisilicon/qm.c:335: Error: no such instruction: `stp %rdx,%rcx,%al'
> drivers/crypto/hisilicon/qm.c:336: Error: number of operands mismatch for `ds'
> 
> Caused by commit
> 
>   62c455ca853e ("crypto: hisilicon - add HiSilicon ZIP accelerator support")
> 
> I also got the following warnings:

Sorry for this. Will add dependency on ARM64 for CRYPTO_DEV_HISI_ZIP

> 
> WARNING: unmet direct dependencies detected for CRYPTO_DEV_HISI_QM
>   Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 && PCI [=y] && PCI_MSI [=y]
>   Selected by [m]:
>   - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]
> 
> WARNING: unmet direct dependencies detected for CRYPTO_HISI_SGL
>   Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64
>   Selected by [m]:
>   - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]
> 
> WARNING: unmet direct dependencies detected for CRYPTO_DEV_HISI_QM
>   Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 && PCI [=y] && PCI_MSI [=y]
>   Selected by [m]:
>   - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]
> 
> WARNING: unmet direct dependencies detected for CRYPTO_HISI_SGL
>   Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64
>   Selected by [m]:
>   - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]
> 
> WARNING: unmet direct dependencies detected for CRYPTO_DEV_HISI_QM
>   Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 && PCI [=y] && PCI_MSI [=y]
>   Selected by [m]:
>   - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]
> 
> WARNING: unmet direct dependencies detected for CRYPTO_HISI_SGL
>   Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64
>   Selected by [m]:
>   - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]
> drivers/crypto/hisilicon/sgl.c: In function 'hisi_acc_sg_buf_map_to_hw_sgl':
> drivers/crypto/hisilicon/sgl.c:181:14: warning: 'curr_sgl_dma' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   *hw_sgl_dma = curr_sgl_dma;
>   ~~~~~~~~~~~~^~~~~~~~~~~~~~

I will fix this.

> 
> This latter from commit
> 
>   dfed0098ab91 ("crypto: hisilicon - add hardware SGL support")
> 
> I have disabled CRYPTO_DEV_HISI_ZIP for now.  You should not select
> CONFIG options that have dependencies (without also depending on the
> same things and being very careful).
> 


^ permalink raw reply	[flat|nested] 18+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2019-08-12  3:21 Stephen Rothwell
  2019-08-12  6:53 ` Zhou Wang
  0 siblings, 1 reply; 18+ messages in thread
From: Stephen Rothwell @ 2019-08-12  3:21 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Zhou Wang,
	Shiju Jose, Kenneth Lee, Hao Fang, Jonathan Cameron, John Garry

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

Hi all,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/crypto/hisilicon/qm.c: Assembler messages:
drivers/crypto/hisilicon/qm.c:334: Error: no such instruction: `ldp %rdx,%rcx,%bl'
drivers/crypto/hisilicon/qm.c:335: Error: no such instruction: `stp %rdx,%rcx,%al'
drivers/crypto/hisilicon/qm.c:336: Error: number of operands mismatch for `ds'

Caused by commit

  62c455ca853e ("crypto: hisilicon - add HiSilicon ZIP accelerator support")

I also got the following warnings:

WARNING: unmet direct dependencies detected for CRYPTO_DEV_HISI_QM
  Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 && PCI [=y] && PCI_MSI [=y]
  Selected by [m]:
  - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]

WARNING: unmet direct dependencies detected for CRYPTO_HISI_SGL
  Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64
  Selected by [m]:
  - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]

WARNING: unmet direct dependencies detected for CRYPTO_DEV_HISI_QM
  Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 && PCI [=y] && PCI_MSI [=y]
  Selected by [m]:
  - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]

WARNING: unmet direct dependencies detected for CRYPTO_HISI_SGL
  Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64
  Selected by [m]:
  - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]

WARNING: unmet direct dependencies detected for CRYPTO_DEV_HISI_QM
  Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 && PCI [=y] && PCI_MSI [=y]
  Selected by [m]:
  - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]

WARNING: unmet direct dependencies detected for CRYPTO_HISI_SGL
  Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=y] && ARM64
  Selected by [m]:
  - CRYPTO_DEV_HISI_ZIP [=m] && CRYPTO [=y] && CRYPTO_HW [=y]
drivers/crypto/hisilicon/sgl.c: In function 'hisi_acc_sg_buf_map_to_hw_sgl':
drivers/crypto/hisilicon/sgl.c:181:14: warning: 'curr_sgl_dma' may be used uninitialized in this function [-Wmaybe-uninitialized]
  *hw_sgl_dma = curr_sgl_dma;
  ~~~~~~~~~~~~^~~~~~~~~~~~~~

This latter from commit

  dfed0098ab91 ("crypto: hisilicon - add hardware SGL support")

I have disabled CRYPTO_DEV_HISI_ZIP for now.  You should not select
CONFIG options that have dependencies (without also depending on the
same things and being very careful).

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
       [not found]   ` <DB4PR04MB084718B8EB90B061EA144C02988D0@DB4PR04MB0847.eurprd04.prod.outlook.com>
@ 2016-11-29  8:43     ` Herbert Xu
  0 siblings, 0 replies; 18+ messages in thread
From: Herbert Xu @ 2016-11-29  8:43 UTC (permalink / raw)
  To: Horia Geantă
  Cc: Stephen Rothwell, linux-next, linux-kernel, Linux Crypto Mailing List

On Tue, Nov 29, 2016 at 08:34:08AM +0000, Horia Geantă wrote:
>
> > Fixes: da40e7a4ba4d ("crypto: aes-ce - Convert to skcipher")
> > Fixes: 211f41af534a ("crypto: aesbs - Convert to skcipher")
> The fix for this commit is missing.
> CRYPTO_AES_ARM_BS also needs to select CRYPTO_SIMD.

Thanks.  I'll add this patch on top:

---8<---
Subject: crypto: arm/aes - Add missing SIMD select for aesbs

This patch adds one more missing SIMD select for AES_ARM_BS.  It
also changes selects on ALGAPI to BLKCIPHER.

Fixes: 211f41af534a ("crypto: aesbs - Convert to skcipher")
Reported-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig
index 8134888..dd90e38 100644
--- a/arch/arm/crypto/Kconfig
+++ b/arch/arm/crypto/Kconfig
@@ -88,9 +88,9 @@ config CRYPTO_AES_ARM
 config CRYPTO_AES_ARM_BS
 	tristate "Bit sliced AES using NEON instructions"
 	depends on KERNEL_MODE_NEON
-	select CRYPTO_ALGAPI
 	select CRYPTO_AES_ARM
-	select CRYPTO_ABLK_HELPER
+	select CRYPTO_BLKCIPHER
+	select CRYPTO_SIMD
 	help
 	  Use a faster and more secure NEON based implementation of AES in CBC,
 	  CTR and XTS modes
@@ -104,7 +104,7 @@ config CRYPTO_AES_ARM_BS
 config CRYPTO_AES_ARM_CE
 	tristate "Accelerated AES using ARMv8 Crypto Extensions"
 	depends on KERNEL_MODE_NEON
-	select CRYPTO_ALGAPI
+	select CRYPTO_BLKCIPHER
 	select CRYPTO_SIMD
 	help
 	  Use an implementation of AES in CBC, CTR and XTS modes that uses
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
       [not found] <20161129115529.41f9f0b5@canb.auug.org.au>
@ 2016-11-29  7:08 ` Herbert Xu
       [not found] ` <20161129070840.GA5113@gondor.apana.org.au>
  1 sibling, 0 replies; 18+ messages in thread
From: Herbert Xu @ 2016-11-29  7:08 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel

On Tue, Nov 29, 2016 at 11:55:29AM +1100, Stephen Rothwell wrote:
> Hi Herbert,
> 
> After merging the crypto tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> ERROR: "simd_skcipher_free" [arch/arm/crypto/aes-arm-ce.ko] undefined!
> ERROR: "simd_skcipher_create_compat" [arch/arm/crypto/aes-arm-ce.ko] undefined!
> ERROR: "simd_skcipher_free" [arch/arm/crypto/aes-arm-bs.ko] undefined!
> ERROR: "simd_skcipher_create_compat" [arch/arm/crypto/aes-arm-bs.ko] undefined!
> 
> Caused by commits
> 
>   da40e7a4ba4d ("crypto: aes-ce - Convert to skcipher")
>   211f41af534a ("crypto: aesbs - Convert to skcipher")
> 
> Missing dependencies?
> 
> I have used the crypto tree from next-20161128 for today.

Indeed.  This patch should fix the problem.

---8<---
Subject: crypto: arm/aes - Select SIMD in Kconfig

The skcipher conversion for ARM missed the select on CRYPTO_SIMD,
causing build failures if SIMD was not otherwise enabled.

Fixes: da40e7a4ba4d ("crypto: aes-ce - Convert to skcipher")
Fixes: 211f41af534a ("crypto: aesbs - Convert to skcipher")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig
index 27ed1b1..8134888 100644
--- a/arch/arm/crypto/Kconfig
+++ b/arch/arm/crypto/Kconfig
@@ -105,7 +105,7 @@ config CRYPTO_AES_ARM_CE
 	tristate "Accelerated AES using ARMv8 Crypto Extensions"
 	depends on KERNEL_MODE_NEON
 	select CRYPTO_ALGAPI
-	select CRYPTO_ABLK_HELPER
+	select CRYPTO_SIMD
 	help
 	  Use an implementation of AES in CBC, CTR and XTS modes that uses
 	  ARMv8 Crypto Extensions
diff --git a/arch/arm64/crypto/Kconfig b/arch/arm64/crypto/Kconfig
index 5f4a617..c5ce39c 100644
--- a/arch/arm64/crypto/Kconfig
+++ b/arch/arm64/crypto/Kconfig
@@ -48,14 +48,14 @@ config CRYPTO_AES_ARM64_CE_BLK
 	depends on ARM64 && KERNEL_MODE_NEON
 	select CRYPTO_BLKCIPHER
 	select CRYPTO_AES_ARM64_CE
-	select CRYPTO_ABLK_HELPER
+	select CRYPTO_SIMD
 
 config CRYPTO_AES_ARM64_NEON_BLK
 	tristate "AES in ECB/CBC/CTR/XTS modes using NEON instructions"
 	depends on ARM64 && KERNEL_MODE_NEON
 	select CRYPTO_BLKCIPHER
 	select CRYPTO_AES
-	select CRYPTO_ABLK_HELPER
+	select CRYPTO_SIMD
 
 config CRYPTO_CRC32_ARM64
 	tristate "CRC32 and CRC32C using optional ARMv8 instructions"
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
       [not found] <20160720174634.53bad636@canb.auug.org.au>
@ 2016-07-20 14:32 ` Herbert Xu
  0 siblings, 0 replies; 18+ messages in thread
From: Herbert Xu @ 2016-07-20 14:32 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Paulo Flabiano Smorigo,
	Leonidas S. Barbosa, Linux Crypto Mailing List

On Wed, Jul 20, 2016 at 05:46:34PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the dax-misc tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/crypto/vmx/aesp8-ppc.S: Assembler messages:
> drivers/crypto/vmx/aesp8-ppc.S:2036: Error: symbol `.aes_p8_xts_decrypt' is already defined
> 
> Caused by commit
> 
>   11c6e16ee13a ("crypto: vmx - Adding asm subroutines for XTS")
> 
> I have reverted that commit (and commit c07f5d3da643 ("crypto: vmx -
> Adding support for XTS")) for today.

Thanks Stephen.  I think this patch should fix it.

---8<---
Subject: crypto: vmx - Fix aes_p8_xts_decrypt build failure

We use _GLOBAL so there is no need to do the manual alignment,
in fact it causes a build failure.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/drivers/crypto/vmx/aesp8-ppc.pl b/drivers/crypto/vmx/aesp8-ppc.pl
index 813ffcc..0b4a293 100644
--- a/drivers/crypto/vmx/aesp8-ppc.pl
+++ b/drivers/crypto/vmx/aesp8-ppc.pl
@@ -2125,8 +2125,6 @@ Lxts_enc_ret:
 .size	.${prefix}_xts_encrypt,.-.${prefix}_xts_encrypt
 
 .globl	.${prefix}_xts_decrypt
-.align	5
-.${prefix}_xts_decrypt:
 	mr		$inp,r3				# reassign
 	li		r3,-1
 	${UCMP}i	$len,16
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2016-06-24  6:20 Stephen Rothwell
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Rothwell @ 2016-06-24  6:20 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-next, linux-kernel, Salvatore Benedetto

Hi Herbert,

After merging the crypto tree, today's linux-next build (powerpc
allyesconfig) failed like this:

net/built-in.o: In function `.ecdh_shared_secret':
(.text+0x4ad8d0): multiple definition of `.ecdh_shared_secret'
crypto/built-in.o:(.text+0x113f0): first defined here
net/built-in.o:(.opd+0x430e0): multiple definition of `ecdh_shared_secret'
crypto/built-in.o:(.opd+0x1d40): first defined here

Caused by commit

  3c4b23901a0c ("crypto: ecdh - Add ECDH software support")

The other definition is in net/bluetooth/ecc.c

I added the following patch for today (probably a better name could
be chosen):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 24 Jun 2016 16:13:37 +1000
Subject: [PATCH] crypto: make ecdh_shared_secret unique

There is another ecdh_shared_secret in net/bluetooth/ecc.c

Fixes: 3c4b23901a0c ("crypto: ecdh - Add ECDH software support")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 crypto/ecc.c  | 2 +-
 crypto/ecc.h  | 6 +++---
 crypto/ecdh.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/crypto/ecc.c b/crypto/ecc.c
index 9aedec6bbe72..414c78a9c214 100644
--- a/crypto/ecc.c
+++ b/crypto/ecc.c
@@ -966,7 +966,7 @@ out:
 	return ret;
 }
 
-int ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
+int crypto_ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
 		       const u8 *private_key, unsigned int private_key_len,
 		       const u8 *public_key, unsigned int public_key_len,
 		       u8 *secret, unsigned int secret_len)
diff --git a/crypto/ecc.h b/crypto/ecc.h
index b5db4b989f3c..663d598c7406 100644
--- a/crypto/ecc.h
+++ b/crypto/ecc.h
@@ -60,7 +60,7 @@ int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
 		      u8 *public_key, unsigned int public_key_len);
 
 /**
- * ecdh_shared_secret() - Compute a shared secret
+ * crypto_ecdh_shared_secret() - Compute a shared secret
  *
  * @curve_id:		id representing the curve to use
  * @private_key:	private key of part A
@@ -70,13 +70,13 @@ int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
  * @secret:		buffer for storing the calculated shared secret
  * @secret_len:		length of the secret buffer
  *
- * Note: It is recommended that you hash the result of ecdh_shared_secret
+ * Note: It is recommended that you hash the result of crypto_ecdh_shared_secret
  * before using it for symmetric encryption or HMAC.
  *
  * Returns 0 if the shared secret was generated successfully, a negative value
  * if an error occurred.
  */
-int ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
+int crypto_ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
 		       const u8 *private_key, unsigned int private_key_len,
 		       const u8 *public_key, unsigned int public_key_len,
 		       u8 *secret, unsigned int secret_len);
diff --git a/crypto/ecdh.c b/crypto/ecdh.c
index d3a9eeca4b32..3de289806d67 100644
--- a/crypto/ecdh.c
+++ b/crypto/ecdh.c
@@ -79,7 +79,7 @@ static int ecdh_compute_value(struct kpp_request *req)
 		if (copied != 2 * nbytes)
 			return -EINVAL;
 
-		ret = ecdh_shared_secret(ctx->curve_id, ctx->ndigits,
+		ret = crypto_ecdh_shared_secret(ctx->curve_id, ctx->ndigits,
 					 (const u8 *)ctx->private_key, nbytes,
 					 (const u8 *)ctx->public_key, 2 * nbytes,
 					 (u8 *)ctx->shared_secret, nbytes);
-- 
2.8.1

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
       [not found] <20150317130104.548124c2@canb.auug.org.au>
@ 2015-03-17 11:11 ` Herbert Xu
  0 siblings, 0 replies; 18+ messages in thread
From: Herbert Xu @ 2015-03-17 11:11 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, James Hartley, Andrew Bresticker,
	Linux Crypto Mailing List

On Tue, Mar 17, 2015 at 01:01:04PM +1100, Stephen Rothwell wrote:
> 
> After merging the crypto tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> drivers/crypto/img-hash.c: At top level:
> drivers/crypto/img-hash.c:878:1: error: expected ',' or ';' before 'static'
>  static int img_hash_probe(struct platform_device *pdev)
>  ^
> 
> Caused by commit d358f1abbf71 ("crypto: img-hash - Add Imagination
> Technologies hw hash accelerator").

Thanks for the report Stephen, I'll merge this patch to fix it.

---8<---
imghash: Add missing semicolon to fix build error
    
There is a missing semicolon after MODULE_DEVICE_TABLE.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c
index 0274172..fec61fc 100644
--- a/drivers/crypto/img-hash.c
+++ b/drivers/crypto/img-hash.c
@@ -873,7 +873,7 @@ static const struct of_device_id img_hash_match[] = {
 	{ .compatible = "img,hash-accelerator" },
 	{}
 };
-MODULE_DEVICE_TABLE(of, img_hash_match)
+MODULE_DEVICE_TABLE(of, img_hash_match);
 
 static int img_hash_probe(struct platform_device *pdev)
 {

-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-12-04 23:52 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17  3:40 linux-next: build failure after merge of the crypto tree Stephen Rothwell
2020-04-17  4:00 ` Shukun Tan
  -- strict thread matches above, loose matches on Subject: below --
2022-12-04 23:48 Stephen Rothwell
2022-12-04 23:52 ` Stephen Rothwell
2022-09-07  1:53 Stephen Rothwell
2022-09-06  1:30 Stephen Rothwell
2022-05-09 11:10 Stephen Rothwell
2022-05-09 12:26 ` Masahiro Yamada
2021-09-27  4:32 Stephen Rothwell
2020-04-21  5:12 Stephen Rothwell
2020-04-22 13:33 ` Herbert Xu
2019-08-12  3:21 Stephen Rothwell
2019-08-12  6:53 ` Zhou Wang
     [not found] <20161129115529.41f9f0b5@canb.auug.org.au>
2016-11-29  7:08 ` Herbert Xu
     [not found] ` <20161129070840.GA5113@gondor.apana.org.au>
     [not found]   ` <DB4PR04MB084718B8EB90B061EA144C02988D0@DB4PR04MB0847.eurprd04.prod.outlook.com>
2016-11-29  8:43     ` Herbert Xu
     [not found] <20160720174634.53bad636@canb.auug.org.au>
2016-07-20 14:32 ` Herbert Xu
2016-06-24  6:20 Stephen Rothwell
     [not found] <20150317130104.548124c2@canb.auug.org.au>
2015-03-17 11:11 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).