linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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; 45+ 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] 45+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2022-12-04 23:48 linux-next: build failure after merge of the crypto tree Stephen Rothwell
@ 2022-12-04 23:52 ` Stephen Rothwell
  2022-12-05  4:31   ` [PATCH] crypto: api - Use linux/cache.h instead of asm/cache.h Herbert Xu
  0 siblings, 1 reply; 45+ 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] 45+ messages in thread

* [PATCH] crypto: api - Use linux/cache.h instead of asm/cache.h
  2022-12-04 23:52 ` Stephen Rothwell
@ 2022-12-05  4:31   ` Herbert Xu
  0 siblings, 0 replies; 45+ messages in thread
From: Herbert Xu @ 2022-12-05  4:31 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Crypto List, Michael Ellerman, PowerPC,
	Linux Kernel Mailing List, Linux Next Mailing List

On Mon, Dec 05, 2022 at 10:52:25AM +1100, Stephen Rothwell wrote:
>
> Or maybe you should have included linux/cache.h instead of asm/cache.h?

You're right Stephen.  Thanks!

---8<---
Directly including asm/cache.h leads to build failures on powerpc
so replace it with linux/cache.h instead.

Fixes: e634ac4a8aaa ("crypto: api - Add crypto_tfm_ctx_dma")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 8722fd67f40a..61b327206b55 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -7,8 +7,8 @@
 #ifndef _CRYPTO_ALGAPI_H
 #define _CRYPTO_ALGAPI_H
 
-#include <asm/cache.h>
 #include <linux/align.h>
+#include <linux/cache.h>
 #include <linux/crypto.h>
 #include <linux/kconfig.h>
 #include <linux/list.h>
-- 
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] 45+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2024-03-13  2:29         ` Eric Biggers
@ 2024-03-13  2:36           ` Herbert Xu
  0 siblings, 0 replies; 45+ messages in thread
From: Herbert Xu @ 2024-03-13  2:36 UTC (permalink / raw)
  To: Eric Biggers
  Cc: Stephen Rothwell, Andrew Morton, Barry Song, Linux Crypto List,
	Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Mar 12, 2024 at 07:29:12PM -0700, Eric Biggers wrote:
> 
> comp_alg_common was part of the implementation of STATS.

I understand that comp_alg_common becomes trivial without stats,
but it is still something that is useful in the API because for
a given acomp tfm, we don't know whether it's an acomp_alg or
scomp_alg.

> I'll do the best I can to interpret your request, but if you could actually
> review my original patch and let me know if there are any other specific changes
> you'd like besides keeping comp_alg_common, that would be helpful as then maybe
> the next version won't get reverted.

I think comp_alg_common is the only part that should be excised.

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] 45+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2024-03-13  2:04       ` Herbert Xu
@ 2024-03-13  2:29         ` Eric Biggers
  2024-03-13  2:36           ` Herbert Xu
  0 siblings, 1 reply; 45+ messages in thread
From: Eric Biggers @ 2024-03-13  2:29 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Stephen Rothwell, Andrew Morton, Barry Song, Linux Crypto List,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Mar 13, 2024 at 10:04:28AM +0800, Herbert Xu wrote:
> On Tue, Mar 12, 2024 at 07:01:12PM -0700, Eric Biggers wrote:
> >
> > The only user of comp_alg_common was the crypto stats, and it was introduced by
> > a refactoring of the crypto stats (commit 0a742389bcc0, "crypto: acomp - Count
> > error stats differently"), so it seems appropriate to remove it for now.
> > 
> > If you could go through my patch and explain what other unused code related to
> > the crypto stats you might consider to be "infrastructure" that should not be
> > removed, that would be helpful.
> 
> The first patch should only remove code directly related to
> STATS.  Any removal of code that is rendered useless should
> be done in one or more subsequent patches.
> 
> Thanks,

comp_alg_common was part of the implementation of STATS.

I'll do the best I can to interpret your request, but if you could actually
review my original patch and let me know if there are any other specific changes
you'd like besides keeping comp_alg_common, that would be helpful as then maybe
the next version won't get reverted.

- Eric

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

* Re: linux-next: build failure after merge of the crypto tree
  2024-03-13  2:12       ` Barry Song
@ 2024-03-13  2:22         ` Eric Biggers
  0 siblings, 0 replies; 45+ messages in thread
From: Eric Biggers @ 2024-03-13  2:22 UTC (permalink / raw)
  To: Barry Song
  Cc: akpm, herbert, linux-crypto, linux-kernel, linux-next, sfr, v-songbaohua

On Wed, Mar 13, 2024 at 03:12:11PM +1300, Barry Song wrote:
> > The only user of comp_alg_common was the crypto stats, and it was introduced by
> > a refactoring of the crypto stats (commit 0a742389bcc0, "crypto: acomp - Count
> > error stats differently"), so it seems appropriate to remove it for now.
> > 
> > If you could go through my patch and explain what other unused code related to
> > the crypto stats you might consider to be "infrastructure" that should not be
> > removed, that would be helpful.
> 
> Hi Eric,
> that user is mm/zswap [1], apologize it was not in crypto tree. I guess you might
> just need a new version to keep that one :-)
> 
> [1] https://lore.kernel.org/linux-mm/20240222081135.173040-2-21cnbao@gmail.com/ 
> 

That code is just reading the algorithm flags, which exist regardless of whether
struct comp_alg_common does or not.  The exact way to get at those flags just
changes slightly.

- Eric

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

* Re: linux-next: build failure after merge of the crypto tree
  2024-03-13  2:01     ` Eric Biggers
  2024-03-13  2:04       ` Herbert Xu
@ 2024-03-13  2:12       ` Barry Song
  2024-03-13  2:22         ` Eric Biggers
  1 sibling, 1 reply; 45+ messages in thread
From: Barry Song @ 2024-03-13  2:12 UTC (permalink / raw)
  To: ebiggers
  Cc: akpm, herbert, linux-crypto, linux-kernel, linux-next, sfr, v-songbaohua

> The only user of comp_alg_common was the crypto stats, and it was introduced by
> a refactoring of the crypto stats (commit 0a742389bcc0, "crypto: acomp - Count
> error stats differently"), so it seems appropriate to remove it for now.
> 
> If you could go through my patch and explain what other unused code related to
> the crypto stats you might consider to be "infrastructure" that should not be
> removed, that would be helpful.

Hi Eric,
that user is mm/zswap [1], apologize it was not in crypto tree. I guess you might
just need a new version to keep that one :-)

[1] https://lore.kernel.org/linux-mm/20240222081135.173040-2-21cnbao@gmail.com/ 

> - Eric

Thanks
Barry


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

* Re: linux-next: build failure after merge of the crypto tree
  2024-03-13  2:01     ` Eric Biggers
@ 2024-03-13  2:04       ` Herbert Xu
  2024-03-13  2:29         ` Eric Biggers
  2024-03-13  2:12       ` Barry Song
  1 sibling, 1 reply; 45+ messages in thread
From: Herbert Xu @ 2024-03-13  2:04 UTC (permalink / raw)
  To: Eric Biggers
  Cc: Stephen Rothwell, Andrew Morton, Barry Song, Linux Crypto List,
	Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Mar 12, 2024 at 07:01:12PM -0700, Eric Biggers wrote:
>
> The only user of comp_alg_common was the crypto stats, and it was introduced by
> a refactoring of the crypto stats (commit 0a742389bcc0, "crypto: acomp - Count
> error stats differently"), so it seems appropriate to remove it for now.
> 
> If you could go through my patch and explain what other unused code related to
> the crypto stats you might consider to be "infrastructure" that should not be
> removed, that would be helpful.

The first patch should only remove code directly related to
STATS.  Any removal of code that is rendered useless should
be done in one or more subsequent patches.

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] 45+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2024-03-13  1:45   ` Herbert Xu
  2024-03-13  1:58     ` Barry Song
@ 2024-03-13  2:01     ` Eric Biggers
  2024-03-13  2:04       ` Herbert Xu
  2024-03-13  2:12       ` Barry Song
  1 sibling, 2 replies; 45+ messages in thread
From: Eric Biggers @ 2024-03-13  2:01 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Stephen Rothwell, Andrew Morton, Barry Song, Linux Crypto List,
	Linux Kernel Mailing List, Linux Next Mailing List

Hi Herbert,

On Wed, Mar 13, 2024 at 09:45:15AM +0800, Herbert Xu wrote:
> On Wed, Mar 13, 2024 at 09:43:52AM +0800, Herbert Xu wrote:
> >
> > Instead of using the non-existent crypto_comp_alg_common, it
> > should do something like
> > 
> > 		return crypto_acomp_tfm(tfm)->__crt_alg->cra_flags & ...
> 
> Nevermind, the stats revert should not have removed acomp infrastructure
> like this.
> 
> I'll revert it.
> 
> Thanks,

The only user of comp_alg_common was the crypto stats, and it was introduced by
a refactoring of the crypto stats (commit 0a742389bcc0, "crypto: acomp - Count
error stats differently"), so it seems appropriate to remove it for now.

If you could go through my patch and explain what other unused code related to
the crypto stats you might consider to be "infrastructure" that should not be
removed, that would be helpful.

- Eric

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

* Re: linux-next: build failure after merge of the crypto tree
  2024-03-13  1:45   ` Herbert Xu
@ 2024-03-13  1:58     ` Barry Song
  2024-03-13  2:01     ` Eric Biggers
  1 sibling, 0 replies; 45+ messages in thread
From: Barry Song @ 2024-03-13  1:58 UTC (permalink / raw)
  To: herbert, akpm, sfr
  Cc: ebiggers, linux-crypto, linux-kernel, linux-next, v-songbaohua

> On Wed, Mar 13, 2024 at 09:43:52AM +0800, Herbert Xu wrote:
>>
>> Instead of using the non-existent crypto_comp_alg_common, it
>> should do something like
>> 
>> 		return crypto_acomp_tfm(tfm)->__crt_alg->cra_flags & ...
> 
> Nevermind, the stats revert should not have removed acomp infrastructure
> like this.
>
> I'll revert it.
> 

I assume mm-unstable doesn't need to do anything since Herbert is going
to revert the crypto commit "crypto: remove CONFIG_CRYPTO_STATS" which
accidently removed the API. once that is done, linux-next is going to
be ok.

> 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

Thanks
Barry


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

* Re: linux-next: build failure after merge of the crypto tree
  2024-03-13  1:43 ` Herbert Xu
@ 2024-03-13  1:45   ` Herbert Xu
  2024-03-13  1:58     ` Barry Song
  2024-03-13  2:01     ` Eric Biggers
  0 siblings, 2 replies; 45+ messages in thread
From: Herbert Xu @ 2024-03-13  1:45 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Eric Biggers, Barry Song, Linux Crypto List,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Mar 13, 2024 at 09:43:52AM +0800, Herbert Xu wrote:
>
> Instead of using the non-existent crypto_comp_alg_common, it
> should do something like
> 
> 		return crypto_acomp_tfm(tfm)->__crt_alg->cra_flags & ...

Nevermind, the stats revert should not have removed acomp infrastructure
like this.

I'll revert it.

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] 45+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2024-03-13  0:57 linux-next: build failure after merge of the crypto tree Stephen Rothwell
@ 2024-03-13  1:43 ` Herbert Xu
  2024-03-13  1:45   ` Herbert Xu
  0 siblings, 1 reply; 45+ messages in thread
From: Herbert Xu @ 2024-03-13  1:43 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Eric Biggers, Barry Song, Linux Crypto List,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Mar 13, 2024 at 11:57:51AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the crypto tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> In file included from mm/zswap.c:30:
> include/crypto/acompress.h: In function 'acomp_is_async':
> include/crypto/acompress.h:124:16: error: implicit declaration of function 'crypto_comp_alg_common'; did you mean 'crypto_tfm_alg_name'? [-Werror=implicit-function-declaration]
>   124 |         return crypto_comp_alg_common(tfm)->base.cra_flags &
>       |                ^~~~~~~~~~~~~~~~~~~~~~
>       |                crypto_tfm_alg_name
> include/crypto/acompress.h:124:43: error: invalid type argument of '->' (have 'int')
>   124 |         return crypto_comp_alg_common(tfm)->base.cra_flags &
>       |                                           ^~
> include/crypto/acompress.h:126:1: error: control reaches end of non-void function [-Werror=return-type]
>   126 | }
>       | ^
> cc1: some warnings being treated as errors
> 
> Caused by commit
> 
>   86464db929ca ("crypto: introduce: acomp_is_async to expose if comp drivers might sleep")

Instead of using the non-existent crypto_comp_alg_common, it
should do something like

		return crypto_acomp_tfm(tfm)->__crt_alg->cra_flags & ...

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] 45+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2024-03-13  0:57 Stephen Rothwell
  2024-03-13  1:43 ` Herbert Xu
  0 siblings, 1 reply; 45+ messages in thread
From: Stephen Rothwell @ 2024-03-13  0:57 UTC (permalink / raw)
  To: Herbert Xu, Andrew Morton
  Cc: Eric Biggers, Barry Song, Linux Crypto List,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

In file included from mm/zswap.c:30:
include/crypto/acompress.h: In function 'acomp_is_async':
include/crypto/acompress.h:124:16: error: implicit declaration of function 'crypto_comp_alg_common'; did you mean 'crypto_tfm_alg_name'? [-Werror=implicit-function-declaration]
  124 |         return crypto_comp_alg_common(tfm)->base.cra_flags &
      |                ^~~~~~~~~~~~~~~~~~~~~~
      |                crypto_tfm_alg_name
include/crypto/acompress.h:124:43: error: invalid type argument of '->' (have 'int')
  124 |         return crypto_comp_alg_common(tfm)->base.cra_flags &
      |                                           ^~
include/crypto/acompress.h:126:1: error: control reaches end of non-void function [-Werror=return-type]
  126 | }
      | ^
cc1: some warnings being treated as errors

Caused by commit

  86464db929ca ("crypto: introduce: acomp_is_async to expose if comp drivers might sleep")

from the mm-unstable branch of the mm tree interacting with commit

  2beb81fbf0c0 ("crypto: remove CONFIG_CRYPTO_STATS")

from the crypto tree.

I have reverted these commits from the mm-unstable branch for today:

  86464db929ca ("crypto: introduce: acomp_is_async to expose if comp drivers might sleep")
  791f798331bc ("mm/zswap: remove the memcpy if acomp is not sleepable")

I will stop merging the -unstable parts of the mm tree from tomorrow.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the crypto tree
  2023-10-31  4:51       ` Eric Biggers
@ 2023-10-31 20:14         ` Jakub Kicinski
  0 siblings, 0 replies; 45+ messages in thread
From: Jakub Kicinski @ 2023-10-31 20:14 UTC (permalink / raw)
  To: Eric Biggers
  Cc: Herbert Xu, Stephen Rothwell, David Miller, Paolo Abeni,
	Networking, Linux Crypto List, Dmitry Safonov, Dmitry Safonov,
	Francesco Ruggeri, Salam Noureddine, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, 30 Oct 2023 21:51:57 -0700 Eric Biggers wrote:
> On Mon, Oct 30, 2023 at 03:02:43PM -0700, Jakub Kicinski wrote:
> > On Mon, 30 Oct 2023 13:23:53 +0800 Herbert Xu wrote:  
> > > If we simply apply this patch to the netdev tree then everything
> > > should work at the next merge window.  But perhaps you could change
> > > the patch description to say something like remove the obsolete
> > > crypto_hash_alignmask.  It's not important though.  
> > 
> > I'm happy to massage the commit message and apply the fix to net.
> > But is it actually 100% correct to do that? IOW is calling
> > crypto_ahash_alignmask() already not necessary in net-next or does
> > it only become unnecessary after some prep work in crypto-next?
> > 
> > We can tell Linus to squash this fix into the merge of either
> > crypto-next or net-next, I'm pretty sure he'd be okay with that..  
> 
> It's safe to fold the patch into net-next.  It actually looks like a bug to be
> using the alignmask in the way that net/ipv4/tcp_ao.c is using it.  You don't
> want to be erroring out just because the algorithm declared an alignmask.

Thanks Eric! Applied as commit f2fbb9081123 ("net: tcp: remove call to
obsolete crypto_ahash_alignmask()") to net-next. I'll respin our PR
after some sanity checking.

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

* Re: linux-next: build failure after merge of the crypto tree
  2023-10-30 22:02     ` Jakub Kicinski
@ 2023-10-31  4:51       ` Eric Biggers
  2023-10-31 20:14         ` Jakub Kicinski
  0 siblings, 1 reply; 45+ messages in thread
From: Eric Biggers @ 2023-10-31  4:51 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Herbert Xu, Stephen Rothwell, David Miller, Paolo Abeni,
	Networking, Linux Crypto List, Dmitry Safonov, Dmitry Safonov,
	Francesco Ruggeri, Salam Noureddine, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Oct 30, 2023 at 03:02:43PM -0700, Jakub Kicinski wrote:
> On Mon, 30 Oct 2023 13:23:53 +0800 Herbert Xu wrote:
> > If we simply apply this patch to the netdev tree then everything
> > should work at the next merge window.  But perhaps you could change
> > the patch description to say something like remove the obsolete
> > crypto_hash_alignmask.  It's not important though.
> 
> I'm happy to massage the commit message and apply the fix to net.
> But is it actually 100% correct to do that? IOW is calling
> crypto_ahash_alignmask() already not necessary in net-next or does
> it only become unnecessary after some prep work in crypto-next?
> 
> We can tell Linus to squash this fix into the merge of either
> crypto-next or net-next, I'm pretty sure he'd be okay with that..

It's safe to fold the patch into net-next.  It actually looks like a bug to be
using the alignmask in the way that net/ipv4/tcp_ao.c is using it.  You don't
want to be erroring out just because the algorithm declared an alignmask.

- Eric

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

* Re: linux-next: build failure after merge of the crypto tree
  2023-10-30  5:23   ` Herbert Xu
  2023-10-30 17:44     ` Dmitry Safonov
@ 2023-10-30 22:02     ` Jakub Kicinski
  2023-10-31  4:51       ` Eric Biggers
  1 sibling, 1 reply; 45+ messages in thread
From: Jakub Kicinski @ 2023-10-30 22:02 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Stephen Rothwell, David Miller, Paolo Abeni, Networking,
	Linux Crypto List, Dmitry Safonov, Dmitry Safonov,
	Francesco Ruggeri, Salam Noureddine, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, 30 Oct 2023 13:23:53 +0800 Herbert Xu wrote:
> If we simply apply this patch to the netdev tree then everything
> should work at the next merge window.  But perhaps you could change
> the patch description to say something like remove the obsolete
> crypto_hash_alignmask.  It's not important though.

I'm happy to massage the commit message and apply the fix to net.
But is it actually 100% correct to do that? IOW is calling
crypto_ahash_alignmask() already not necessary in net-next or does
it only become unnecessary after some prep work in crypto-next?

We can tell Linus to squash this fix into the merge of either
crypto-next or net-next, I'm pretty sure he'd be okay with that..

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

* Re: linux-next: build failure after merge of the crypto tree
  2023-10-30  5:23   ` Herbert Xu
@ 2023-10-30 17:44     ` Dmitry Safonov
  2023-10-30 22:02     ` Jakub Kicinski
  1 sibling, 0 replies; 45+ messages in thread
From: Dmitry Safonov @ 2023-10-30 17:44 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, Jakub Kicinski, Paolo Abeni, Networking,
	Linux Crypto List, Dmitry Safonov, Francesco Ruggeri,
	Salam Noureddine, Linux Kernel Mailing List,
	Linux Next Mailing List, Herbert Xu

On 10/30/23 05:23, Herbert Xu wrote:
> On Mon, Oct 30, 2023 at 04:09:53PM +1100, Stephen Rothwell wrote:
>>
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Mon, 30 Oct 2023 15:54:37 +1100
>> Subject: [PATCH] fix up for "crypto: ahash - remove crypto_ahash_alignmask"
>>
>> interacting with "net/tcp: Introduce TCP_AO setsockopt()s"
>>
>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> ---
>>  net/ipv4/tcp_ao.c | 6 ------
>>  1 file changed, 6 deletions(-)
> 
> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>

Reviewed-by: Dmitry Safonov <dima@arista.com>

> If we simply apply this patch to the netdev tree then everything
> should work at the next merge window.  But perhaps you could change
> the patch description to say something like remove the obsolete
> crypto_hash_alignmask.  It's not important though.

Thank you,
           Dmitry


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

* Re: linux-next: build failure after merge of the crypto tree
  2023-10-30  5:09 ` Stephen Rothwell
@ 2023-10-30  5:23   ` Herbert Xu
  2023-10-30 17:44     ` Dmitry Safonov
  2023-10-30 22:02     ` Jakub Kicinski
  0 siblings, 2 replies; 45+ messages in thread
From: Herbert Xu @ 2023-10-30  5:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, Jakub Kicinski, Paolo Abeni, Networking,
	Linux Crypto List, Dmitry Safonov, Dmitry Safonov,
	Francesco Ruggeri, Salam Noureddine, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Oct 30, 2023 at 04:09:53PM +1100, Stephen Rothwell wrote:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 30 Oct 2023 15:54:37 +1100
> Subject: [PATCH] fix up for "crypto: ahash - remove crypto_ahash_alignmask"
> 
> interacting with "net/tcp: Introduce TCP_AO setsockopt()s"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  net/ipv4/tcp_ao.c | 6 ------
>  1 file changed, 6 deletions(-)

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

If we simply apply this patch to the netdev tree then everything
should work at the next merge window.  But perhaps you could change
the patch description to say something like remove the obsolete
crypto_hash_alignmask.  It's not important though.

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] 45+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2023-10-30  4:58 Stephen Rothwell
@ 2023-10-30  5:09 ` Stephen Rothwell
  2023-10-30  5:23   ` Herbert Xu
  0 siblings, 1 reply; 45+ messages in thread
From: Stephen Rothwell @ 2023-10-30  5:09 UTC (permalink / raw)
  To: Herbert Xu, David Miller, Jakub Kicinski, Paolo Abeni
  Cc: Networking, Linux Crypto List, Dmitry Safonov, Dmitry Safonov,
	Francesco Ruggeri, Salam Noureddine, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

On Mon, 30 Oct 2023 15:58:09 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the crypto tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> net/ipv4/tcp_ao.c: In function 'tcp_ao_key_alloc':
> net/ipv4/tcp_ao.c:1536:13: error: implicit declaration of function 'crypto_ahash_alignmask'; did you mean 'crypto_ahash_alg_name'? [-Werror=implicit-function-declaration]
>  1536 |         if (crypto_ahash_alignmask(tfm) > TCP_AO_KEY_ALIGN) {
>       |             ^~~~~~~~~~~~~~~~~~~~~~
>       |             crypto_ahash_alg_name
> 
> Caused by commit
> 
>   0f8660c82b79 ("crypto: ahash - remove crypto_ahash_alignmask")
> 
> interacting with commit
> 
>   4954f17ddefc ("net/tcp: Introduce TCP_AO setsockopt()s")
> 
> from the net-next tree.
> 
> I have applied the following merge resolution patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 30 Oct 2023 15:54:37 +1100
Subject: [PATCH] fix up for "crypto: ahash - remove crypto_ahash_alignmask"

interacting with "net/tcp: Introduce TCP_AO setsockopt()s"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/ipv4/tcp_ao.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/net/ipv4/tcp_ao.c b/net/ipv4/tcp_ao.c
index 6a845e906a1d..ef5472ed6158 100644
--- a/net/ipv4/tcp_ao.c
+++ b/net/ipv4/tcp_ao.c
@@ -1533,10 +1533,6 @@ static struct tcp_ao_key *tcp_ao_key_alloc(struct sock *sk,
 		goto err_free_pool;
 
 	tfm = crypto_ahash_reqtfm(hp.req);
-	if (crypto_ahash_alignmask(tfm) > TCP_AO_KEY_ALIGN) {
-		err = -EOPNOTSUPP;
-		goto err_pool_end;
-	}
 	digest_size = crypto_ahash_digestsize(tfm);
 	tcp_sigpool_end(&hp);
 
@@ -1551,8 +1547,6 @@ static struct tcp_ao_key *tcp_ao_key_alloc(struct sock *sk,
 	key->digest_size = digest_size;
 	return key;
 
-err_pool_end:
-	tcp_sigpool_end(&hp);
 err_free_pool:
 	tcp_sigpool_release(pool_id);
 	return ERR_PTR(err);
-- 
2.40.1

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the crypto tree
@ 2023-10-30  4:58 Stephen Rothwell
  2023-10-30  5:09 ` Stephen Rothwell
  0 siblings, 1 reply; 45+ messages in thread
From: Stephen Rothwell @ 2023-10-30  4:58 UTC (permalink / raw)
  To: Herbert Xu, David Miller, Jakub Kicinski, Paolo Abeni
  Cc: Networking, Linux Crypto List, Dmitry Safonov, Dmitry Safonov,
	Francesco Ruggeri, Salam Noureddine, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

net/ipv4/tcp_ao.c: In function 'tcp_ao_key_alloc':
net/ipv4/tcp_ao.c:1536:13: error: implicit declaration of function 'crypto_ahash_alignmask'; did you mean 'crypto_ahash_alg_name'? [-Werror=implicit-function-declaration]
 1536 |         if (crypto_ahash_alignmask(tfm) > TCP_AO_KEY_ALIGN) {
      |             ^~~~~~~~~~~~~~~~~~~~~~
      |             crypto_ahash_alg_name

Caused by commit

  0f8660c82b79 ("crypto: ahash - remove crypto_ahash_alignmask")

interacting with commit

  4954f17ddefc ("net/tcp: Introduce TCP_AO setsockopt()s")

from the net-next tree.

I have applied the following merge resolution patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 30 Oct 2023 15:54:37 +1100
Subject: [PATCH] fix up for "crypto: ahash - remove crypto_ahash_alignmask"

interacting with "net/tcp: Introduce TCP_AO setsockopt()s"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/ipv4/tcp_ao.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/net/ipv4/tcp_ao.c b/net/ipv4/tcp_ao.c
index 6a845e906a1d..d18562bb3184 100644
--- a/net/ipv4/tcp_ao.c
+++ b/net/ipv4/tcp_ao.c
@@ -1533,10 +1533,6 @@ static struct tcp_ao_key *tcp_ao_key_alloc(struct sock *sk,
 		goto err_free_pool;
 
 	tfm = crypto_ahash_reqtfm(hp.req);
-	if (crypto_ahash_alignmask(tfm) > TCP_AO_KEY_ALIGN) {
-		err = -EOPNOTSUPP;
-		goto err_pool_end;
-	}
 	digest_size = crypto_ahash_digestsize(tfm);
 	tcp_sigpool_end(&hp);
 
-- 
2.40.1

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the crypto tree
  2023-06-26  2:39 Stephen Rothwell
@ 2023-06-26 10:20 ` Herbert Xu
  0 siblings, 0 replies; 45+ messages in thread
From: Herbert Xu @ 2023-06-26 10:20 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Crypto List, Michael Ellerman, PowerPC,
	Linux Kernel Mailing List, Linux Next Mailing List

On Mon, Jun 26, 2023 at 12:39:46PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the crypto tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> ld: warning: discarding dynamic section .glink
> ld: warning: discarding dynamic section .plt
> ld: linkage table error against `sm2_compute_z_digest'
> ld: stubs don't match calculated size
> ld: can not build stubs: bad value
> ld: crypto/asymmetric_keys/x509_public_key.o: in function `x509_get_sig_params':
> x509_public_key.c:(.text+0x474): undefined reference to `sm2_compute_z_digest'
> 
> Possibly caused by commit
> 
>   e5221fa6a355 ("KEYS: asymmetric: Move sm2 code into x509_public_key")
> 
> This looks like it may be a compiler bug?  Maybe the deep ternary
> expressions may be contributing to that? (cc'ing the ppc guys in case
> they have any ideas.)
> 
> I have reverted that commit (and the following one) for today.

Thanks Stephen.  I've just pushed out a fix for this.
-- 
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] 45+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2023-06-26  2:39 Stephen Rothwell
  2023-06-26 10:20 ` Herbert Xu
  0 siblings, 1 reply; 45+ messages in thread
From: Stephen Rothwell @ 2023-06-26  2:39 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Michael Ellerman, PowerPC, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

ld: warning: discarding dynamic section .glink
ld: warning: discarding dynamic section .plt
ld: linkage table error against `sm2_compute_z_digest'
ld: stubs don't match calculated size
ld: can not build stubs: bad value
ld: crypto/asymmetric_keys/x509_public_key.o: in function `x509_get_sig_params':
x509_public_key.c:(.text+0x474): undefined reference to `sm2_compute_z_digest'

Possibly caused by commit

  e5221fa6a355 ("KEYS: asymmetric: Move sm2 code into x509_public_key")

This looks like it may be a compiler bug?  Maybe the deep ternary
expressions may be contributing to that? (cc'ing the ppc guys in case
they have any ideas.)

I have reverted that commit (and the following one) for today.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the crypto tree
  2023-05-22  5:15 ` Herbert Xu
@ 2023-05-23  0:36   ` Stephen Rothwell
  0 siblings, 0 replies; 45+ messages in thread
From: Stephen Rothwell @ 2023-05-23  0:36 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Linux Crypto List, Huan Feng, Jia Jie Ho,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi Herbert,

On Mon, 22 May 2023 13:15:20 +0800 Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Mon, May 22, 2023 at 10:52:57AM +1000, Stephen Rothwell wrote:
> > 
> > After merging the crypto tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:  
> 
> Sorry, a fix is pending and will be pushed out soon.

That did not fix it :-(

My fix up patch is now:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 23 May 2023 10:31:28 +1000
Subject: [PATCH] fixup for "crypto: starfive - Add crypto engine support"

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

diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig
index 908c162ba79a..2a15d51534b9 100644
--- a/drivers/crypto/starfive/Kconfig
+++ b/drivers/crypto/starfive/Kconfig
@@ -4,7 +4,7 @@
 
 config CRYPTO_DEV_JH7110
 	tristate "StarFive JH7110 cryptographic engine driver"
-	depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES
+	depends on SOC_STARFIVE && DMADEVICES
 	select CRYPTO_ENGINE
 	select CRYPTO_HMAC
 	select CRYPTO_SHA256
-- 
2.39.2

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the crypto tree
  2023-05-22  0:52 Stephen Rothwell
@ 2023-05-22  5:15 ` Herbert Xu
  2023-05-23  0:36   ` Stephen Rothwell
  0 siblings, 1 reply; 45+ messages in thread
From: Herbert Xu @ 2023-05-22  5:15 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Crypto List, Huan Feng, Jia Jie Ho,
	Linux Kernel Mailing List, Linux Next Mailing List

On Mon, May 22, 2023 at 10:52:57AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) failed like this:

Sorry, a fix is pending and will be pushed out soon.

Cheers,
-- 
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] 45+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2023-05-22  0:52 Stephen Rothwell
  2023-05-22  5:15 ` Herbert Xu
  0 siblings, 1 reply; 45+ messages in thread
From: Stephen Rothwell @ 2023-05-22  0:52 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Huan Feng, Jia Jie Ho, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

drivers/tty/serial/amba-pl011.c: In function 'pl011_sgbuf_init':
drivers/tty/serial/amba-pl011.c:379:30: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration]
  379 |         sg_set_page(&sg->sg, phys_to_page(dma_addr),
      |                              ^~~~~~~~~~~~
      |                              pfn_to_page
drivers/tty/serial/amba-pl011.c:379:30: error: passing argument 2 of 'sg_set_page' makes pointer from integer without a cast [-Werror=int-conversion]
  379 |         sg_set_page(&sg->sg, phys_to_page(dma_addr),
      |                              ^~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              int
In file included from include/linux/kfifo.h:42,
                 from include/linux/tty_port.h:5,
                 from include/linux/tty.h:12,
                 from drivers/tty/serial/amba-pl011.c:25:
include/linux/scatterlist.h:136:69: note: expected 'struct page *' but argument is of type 'int'
  136 | static inline void sg_set_page(struct scatterlist *sg, struct page *page,
      |                                                        ~~~~~~~~~~~~~^~~~

Caused by commit

  42ef0e944b01 ("crypto: starfive - Add crypto engine support")

I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 22 May 2023 10:47:38 +1000
Subject: [PATCH] fixup for "crypto: starfive - Add crypto engine support"

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

diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig
index be58d1473523..8795b2fddb4e 100644
--- a/drivers/crypto/starfive/Kconfig
+++ b/drivers/crypto/starfive/Kconfig
@@ -4,7 +4,7 @@
 
 config CRYPTO_DEV_JH7110
 	tristate "StarFive JH7110 cryptographic engine driver"
-	depends on SOC_STARFIVE || COMPILE_TEST
+	depends on SOC_STARFIVE
 	select CRYPTO_ENGINE
 	select CRYPTO_HMAC
 	select CRYPTO_SHA256
-- 
2.39.2

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the crypto tree
  2023-04-11  0:48 Stephen Rothwell
@ 2023-04-11  2:22 ` Herbert Xu
  0 siblings, 0 replies; 45+ messages in thread
From: Herbert Xu @ 2023-04-11  2:22 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Crypto List, Tom Zanussi, Linux Kernel Mailing List,
	Linux Next Mailing List

On Tue, Apr 11, 2023 at 10:48:21AM +1000, Stephen Rothwell wrote:
>
> Presumably the addition of COMPILE_TEST was a bit optimistic. :-(
> 
> I have used the crypto tree from next-20230406 for today.

I just pushed out a fix for it.  Thanks Stephen!
-- 
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] 45+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2023-04-11  0:48 Stephen Rothwell
  2023-04-11  2:22 ` Herbert Xu
  0 siblings, 1 reply; 45+ messages in thread
From: Stephen Rothwell @ 2023-04-11  0:48 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Linux Crypto List, Tom Zanussi, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

In file included from <command-line>:
In function 'setup_crypt_desc',
    inlined from 'get_crypt_desc' at drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c:285:3:
include/linux/compiler_types.h:397:45: error: call to '__compiletime_assert_1010' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct crypt_ctl) != 64
  397 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      |                                             ^
include/linux/compiler_types.h:378:25: note: in definition of macro '__compiletime_assert'
  378 |                         prefix ## suffix();                             \
      |                         ^~~~~~
include/linux/compiler_types.h:397:9: note: in expansion of macro '_compiletime_assert'
  397 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      |         ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
   39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
      |                                     ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
   50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
      |         ^~~~~~~~~~~~~~~~
drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c:266:9: note: in expansion of macro 'BUILD_BUG_ON'
  266 |         BUILD_BUG_ON(sizeof(struct crypt_ctl) != 64);
      |         ^~~~~~~~~~~~

Caused by commit

  1bc7fdbf2677 ("crypto: ixp4xx - Move driver to drivers/crypto/intel/ixp4xx")

Presumably the addition of COMPILE_TEST was a bit optimistic. :-(

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

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the crypto tree
@ 2023-01-17  3:47 Stephen Rothwell
  0 siblings, 0 replies; 45+ messages in thread
From: Stephen Rothwell @ 2023-01-17  3:47 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Danny Tsen, Michael Ellerman, PowerPC, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

arch/powerpc/crypto/p10_aes_gcm.o: warning: objtool: .text+0x884: unannotated intra-function call
arch/powerpc/crypto/aesp8-ppc.o: warning: objtool: aes_p8_set_encrypt_key+0x44: unannotated intra-function call
ld: arch/powerpc/crypto/p10_aes_gcm.o: ABI version 1 is not compatible with ABI version 2 output
ld: failed to merge target specific data of file arch/powerpc/crypto/p10_aes_gcm.o

Caused by commit

  ca68a96c37eb ("crypto: p10-aes-gcm - An accelerated AES/GCM stitched implementation")

I have applied the following hack for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 17 Jan 2023 14:41:10 +1100
Subject: [PATCH] crypto: p10-aes-gcm - only ABIv1 code has been implemented

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/crypto/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig
index db7d99383993..36928ad14a6b 100644
--- a/arch/powerpc/crypto/Kconfig
+++ b/arch/powerpc/crypto/Kconfig
@@ -97,6 +97,7 @@ config CRYPTO_AES_PPC_SPE
 config CRYPTO_P10_AES_GCM
 	tristate "Stitched AES/GCM acceleration support on P10+ CPU (PPC)"
 	depends on PPC64
+	depends on PPC64_ELF_ABI_V1
 	select CRYPTO_LIB_AES
 	select CRYPTO_ALGAPI
 	select CRYPTO_AEAD
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the crypto tree
@ 2023-01-16  0:29 Stephen Rothwell
  0 siblings, 0 replies; 45+ messages in thread
From: Stephen Rothwell @ 2023-01-16  0:29 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Danny Tsen, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

ERROR: modpost: ".aes_p10_gcm_decrypt" [arch/powerpc/crypto/p10-aes-gcm-crypto.ko] undefined!
ERROR: modpost: ".aes_p10_gcm_encrypt" [arch/powerpc/crypto/p10-aes-gcm-crypto.ko] undefined!

Caused by commits

  cc40379b6e19 ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation")
  ca68a96c37eb ("crypto: p10-aes-gcm - An accelerated AES/GCM stitched implementation")

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

BTW, that series seems to have been committed in the wrong order -
there are refrerences to files/functions before they are created.

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the crypto tree
@ 2022-09-07  1:53 Stephen Rothwell
  0 siblings, 0 replies; 45+ 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] 45+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2022-09-06  1:30 Stephen Rothwell
  0 siblings, 0 replies; 45+ 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] 45+ 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; 45+ 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] 45+ 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; 45+ 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] 45+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2021-09-27  4:32 Stephen Rothwell
  0 siblings, 0 replies; 45+ 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] 45+ 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; 45+ 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] 45+ 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; 45+ 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] 45+ messages in thread

* Re: 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, 0 replies; 45+ 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] 45+ messages in thread

* 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; 45+ 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] 45+ 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; 45+ 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] 45+ 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; 45+ 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] 45+ 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; 45+ 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] 45+ 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; 45+ 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] 45+ 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; 45+ 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] 45+ messages in thread

* linux-next: build failure after merge of the crypto tree
@ 2016-06-24  6:20 Stephen Rothwell
  0 siblings, 0 replies; 45+ 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] 45+ 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; 45+ 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] 45+ messages in thread

end of thread, other threads:[~2024-03-13  2:36 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-04 23:48 linux-next: build failure after merge of the crypto tree Stephen Rothwell
2022-12-04 23:52 ` Stephen Rothwell
2022-12-05  4:31   ` [PATCH] crypto: api - Use linux/cache.h instead of asm/cache.h Herbert Xu
  -- strict thread matches above, loose matches on Subject: below --
2024-03-13  0:57 linux-next: build failure after merge of the crypto tree Stephen Rothwell
2024-03-13  1:43 ` Herbert Xu
2024-03-13  1:45   ` Herbert Xu
2024-03-13  1:58     ` Barry Song
2024-03-13  2:01     ` Eric Biggers
2024-03-13  2:04       ` Herbert Xu
2024-03-13  2:29         ` Eric Biggers
2024-03-13  2:36           ` Herbert Xu
2024-03-13  2:12       ` Barry Song
2024-03-13  2:22         ` Eric Biggers
2023-10-30  4:58 Stephen Rothwell
2023-10-30  5:09 ` Stephen Rothwell
2023-10-30  5:23   ` Herbert Xu
2023-10-30 17:44     ` Dmitry Safonov
2023-10-30 22:02     ` Jakub Kicinski
2023-10-31  4:51       ` Eric Biggers
2023-10-31 20:14         ` Jakub Kicinski
2023-06-26  2:39 Stephen Rothwell
2023-06-26 10:20 ` Herbert Xu
2023-05-22  0:52 Stephen Rothwell
2023-05-22  5:15 ` Herbert Xu
2023-05-23  0:36   ` Stephen Rothwell
2023-04-11  0:48 Stephen Rothwell
2023-04-11  2:22 ` Herbert Xu
2023-01-17  3:47 Stephen Rothwell
2023-01-16  0:29 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
2020-04-17  3:40 Stephen Rothwell
2020-04-17  4:00 ` Shukun Tan
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).