* 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; 6+ messages in thread
From: Stephen Rothwell @ 2022-12-04 23:48 UTC (permalink / raw)
To: Herbert Xu
Cc: Linux Next Mailing List, PowerPC, Linux Crypto List,
Linux Kernel 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] 6+ 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; 6+ messages in thread
From: Stephen Rothwell @ 2022-12-04 23:52 UTC (permalink / raw)
To: Herbert Xu
Cc: Linux Next Mailing List, PowerPC, Linux Crypto List,
Linux Kernel 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] 6+ 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; 6+ messages in thread
From: Herbert Xu @ 2022-12-05 4:31 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Linux Next Mailing List, PowerPC, Linux Crypto List,
Linux Kernel 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] 6+ messages in thread
* linux-next: build failure after merge of the crypto tree
@ 2023-01-17 3:47 Stephen Rothwell
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2023-01-17 3:47 UTC (permalink / raw)
To: Herbert Xu, Linux Crypto List
Cc: Linux Next Mailing List, PowerPC, Linux Kernel Mailing List,
Danny Tsen
[-- 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] 6+ 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; 6+ messages in thread
From: Stephen Rothwell @ 2023-06-26 2:39 UTC (permalink / raw)
To: Herbert Xu, Linux Crypto List
Cc: Linux Next Mailing List, PowerPC, Linux Kernel 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] 6+ 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; 6+ messages in thread
From: Herbert Xu @ 2023-06-26 10:20 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Linux Next Mailing List, PowerPC, Linux Crypto List,
Linux Kernel 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] 6+ messages in thread
end of thread, other threads:[~2023-06-26 10:58 UTC | newest]
Thread overview: 6+ 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 --
2023-01-17 3:47 linux-next: build failure after merge of the crypto tree Stephen Rothwell
2023-06-26 2:39 Stephen Rothwell
2023-06-26 10:20 ` 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).