public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Thorsten Leemhuis <linux@leemhuis.info>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] crypto: powerpc/poly1305 - Add missing poly1305_emit_arch
Date: Thu, 8 May 2025 14:46:06 +0530	[thread overview]
Message-ID: <37cf099e-d5c2-40d8-bc31-77e1f9623b1c@linux.ibm.com> (raw)
In-Reply-To: <aBtF2jVZQwxGiHVk@gondor.apana.org.au>

Hello Herbert,

On 07/05/25 5:06 pm, Herbert Xu wrote:
> On Wed, May 07, 2025 at 01:03:06PM +0200, Thorsten Leemhuis wrote:
>> """
>> ld: warning: discarding dynamic section .glink
>> ld: warning: discarding dynamic section .plt
>> ld: linkage table error against `poly1305_emit_arch'
>> ld: stubs don't match calculated size
>> ld: can not build stubs: bad value
>> ld: lib/crypto/poly1305.o: in function `poly1305_final':
>> /builddir/build/BUILD/kernel-6.15.0-build/kernel-next-20250507/linux-6.15.0-0.0.next.20250507.443.vanilla.fc43.ppc64le/lib/crypto/poly1305.c:65:(.text+0x2dc): undefined reference to `poly1305_emit_arch'
>> ld: /builddir/build/BUILD/kernel-6.15.0-build/kernel-next-20250507/linux-6.15.0-0.0.next.20250507.443.vanilla.fc43.ppc64le/lib/crypto/poly1305.c:65:(.text+0x378): undefined reference to `poly1305_emit_arch'
>> make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1
>> make[1]: *** [/builddir/build/BUILD/kernel-6.15.0-build/kernel-next-20250507/linux-6.15.0-0.0.next.20250507.443.vanilla.fc43.ppc64le/Makefile:1250: vmlinux] Error 2
>> """
> Oops, the powerpc patch was missing the assembly part:
>
> ---8<---
> Rename poly1305_emit_64 to poly1305_emit_arch to conform with
> the expectation of the poly1305 library.
>
> Reported-by: Thorsten Leemhuis <linux@leemhuis.info>
> Fixes: 14d31979145d ("crypto: powerpc/poly1305 - Add block-only interface")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> diff --git a/arch/powerpc/lib/crypto/poly1305-p10-glue.c b/arch/powerpc/lib/crypto/poly1305-p10-glue.c
> index 16c2a8316696..7cea0ebcc6bc 100644
> --- a/arch/powerpc/lib/crypto/poly1305-p10-glue.c
> +++ b/arch/powerpc/lib/crypto/poly1305-p10-glue.c
> @@ -17,6 +17,7 @@ asmlinkage void poly1305_64s(struct poly1305_block_state *state, const u8 *m, u3
>   asmlinkage void poly1305_emit_arch(const struct poly1305_state *state,
>   				   u8 digest[POLY1305_DIGEST_SIZE],
>   				   const u32 nonce[4]);
> +EXPORT_SYMBOL_GPL(poly1305_emit_arch);
>   
>   static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_p10);
>   
> diff --git a/arch/powerpc/lib/crypto/poly1305-p10le_64.S b/arch/powerpc/lib/crypto/poly1305-p10le_64.S
> index a3c1987f1ecd..2ba2911b8038 100644
> --- a/arch/powerpc/lib/crypto/poly1305-p10le_64.S
> +++ b/arch/powerpc/lib/crypto/poly1305-p10le_64.S
> @@ -1030,7 +1030,7 @@ SYM_FUNC_END(poly1305_64s)
>   # Input: r3 = h, r4 = s, r5 = mac
>   # mac = h + s
>   #
> -SYM_FUNC_START(poly1305_emit_64)
> +SYM_FUNC_START(poly1305_emit_arch)
>   	ld	10, 0(3)
>   	ld	11, 8(3)
>   	ld	12, 16(3)
> @@ -1060,7 +1060,7 @@ Skip_h64:
>   	std	10, 0(5)
>   	std	11, 8(5)
>   	blr
> -SYM_FUNC_END(poly1305_emit_64)
> +SYM_FUNC_END(poly1305_emit_arch)
>   
>   SYM_DATA_START_LOCAL(RMASK)
>   .align 5


I tested this patch by applying on next-20250507, though it fixes the 
build issue, it has introduced a boot warning.


Warning:


[    1.644487] ------------[ cut here ]------------
[    1.644490] WARNING: CPU: 3 PID: 1 at 
lib/crypto/chacha20poly1305.c:359 chacha20poly1305_init+0x28/0x50
[    1.644501] Modules linked in:
[    1.644507] CPU: 3 UID: 0 PID: 1 Comm: swapper/0 Not tainted 
6.15.0-rc5-next-20250507-00002-g8be5012869c6-dirty #1 VOLUNTARY
[    1.644515] Hardware name: IBM,8375-42A POWER9 (architected) 0x4e0202 
0xf000005 of:IBM,FW950.80 (VL950_131) hv:phyp pSeries
[    1.644520] NIP:  c0000000020646c0 LR: c0000000020646b4 CTR: 
00000000007088ec
[    1.644525] REGS: c000000a03757960 TRAP: 0700   Not tainted 
(6.15.0-rc5-next-20250507-00002-g8be5012869c6-dirty)
[    1.644530] MSR:  8000000002029033 <SF,VEC,EE,ME,IR,DR,RI,LE>  CR: 
28000282  XER: 0000000f
[    1.644544] CFAR: c000000002064ec8 IRQMASK: 0
[    1.644544] GPR00: c0000000020646b4 c000000a03757c00 c000000001dc8100 
0000000000000001
[    1.644544] GPR04: 0000000000000961 c0000009e94dd5c0 c000000a0d348000 
0000000000000960
[    1.644544] GPR08: 00000009e7270000 0000000000000000 0000000000000000 
c0000013fb400000
[    1.644544] GPR12: c0000013fc9fffa8 c000000017ffcb00 c0000000000113d8 
0000000000000000
[    1.644544] GPR16: 0000000000000000 0000000000000000 0000000000000000 
0000000000000000
[    1.644544] GPR20: 0000000000000000 0000000000000000 0000000000000000 
0000000000000000
[    1.644544] GPR24: 0000000000000000 0000000000000000 c0000000020b19a8 
0000000000000006
[    1.644544] GPR28: 0000000000000000 c0000000020b1960 c000000a05490a00 
c000000002064698
[    1.644600] NIP [c0000000020646c0] chacha20poly1305_init+0x28/0x50
[    1.644607] LR [c0000000020646b4] chacha20poly1305_init+0x1c/0x50
[    1.644612] Call Trace:
[    1.644615] [c000000a03757c00] [c0000000020646b4] 
chacha20poly1305_init+0x1c/0x50 (unreliable)
[    1.644624] [c000000a03757c20] [c000000000010d1c] 
do_one_initcall+0x5c/0x37c
[    1.644631] [c000000a03757d00] [c000000002005394] 
do_initcalls+0x144/0x18c
[    1.644638] [c000000a03757d90] [c000000002005688] 
kernel_init_freeable+0x214/0x288
[    1.644645] [c000000a03757df0] [c0000000000113fc] kernel_init+0x2c/0x1b0
[    1.644651] [c000000a03757e50] [c00000000000df5c] 
ret_from_kernel_user_thread+0x14/0x1c
[    1.644657] ---- interrupt: 0 at 0x0
[    1.644661] Code: 7c0803a6 4e800020 3c4cffd6 38423a68 60000000 
7c0802a6 f8010010 f821ffe1 4800028d 60000000 68630001 5463063e 
<0b030000> 2c030000 4082000c 38600000
[    1.644681] ---[ end trace 0000000000000000 ]---


If you are planning to fix this in seperate patch, please add below tag.


Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>


Regards,

Venkat.


  parent reply	other threads:[~2025-05-08  9:16 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1745815528.git.herbert@gondor.apana.org.au>
     [not found] ` <915c874caf5451d560bf26ff59f58177aa8b7c17.1745815528.git.herbert@gondor.apana.org.au>
2025-05-07 11:03   ` [v4 PATCH 11/11] crypto: lib/poly1305 - Use block-only interface Thorsten Leemhuis
2025-05-07 11:36     ` [PATCH] crypto: powerpc/poly1305 - Add missing poly1305_emit_arch Herbert Xu
2025-05-07 12:25       ` Thorsten Leemhuis
2025-05-08  9:16       ` Venkat Rao Bagalkote [this message]
2025-05-08  9:31         ` Herbert Xu
2025-05-08 10:01           ` Venkat Rao Bagalkote
2025-05-08 11:10             ` Herbert Xu
2025-05-08  9:45         ` Herbert Xu
2025-05-08 16:29           ` Eric Biggers
2025-05-09  0:53             ` Herbert Xu
2025-05-08  9:49         ` Herbert Xu
2025-05-08 11:39         ` Herbert Xu
2025-05-08 11:57           ` Venkat Rao Bagalkote
2025-05-08 11:59             ` Herbert Xu
2025-05-08 12:23             ` [PATCH] crypto: powerpc/poly1305 - Restore crypto_simd_usable test Herbert Xu
2025-05-08 15:05               ` Venkat Rao Bagalkote
2025-05-09 12:29                 ` [PATCH] crypto: powerpc/poly1305 - Fix input mixup in poly1305_emit_arch Herbert Xu
2025-05-10  4:44                   ` Eric Biggers
2025-05-10  5:10                     ` [v2 PATCH] crypto: powerpc/poly1305 - Add poly1305_emit_arch wrapper Herbert Xu
2025-05-10  5:33                       ` Eric Biggers
2025-05-10  5:49                         ` Herbert Xu
2025-05-10  5:50                           ` Herbert Xu
2025-05-10  6:02                             ` Eric Biggers
2025-05-10  9:13                         ` [PATCH] crypto: powerpc/poly1305 - Add SIMD fallback Herbert Xu
2025-05-10 22:34                         ` [v2 PATCH] crypto: powerpc/poly1305 - Add poly1305_emit_arch wrapper Segher Boessenkool
2025-05-10 23:19                           ` Eric Biggers
2025-05-11  2:10                           ` Herbert Xu
2025-05-12  5:13                       ` Venkat Rao Bagalkote
2025-05-09 14:16               ` [PATCH] crypto: powerpc/poly1305 - Restore crypto_simd_usable test Herbert Xu

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=37cf099e-d5c2-40d8-bc31-77e1f9623b1c@linux.ibm.com \
    --to=venkat88@linux.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=maddy@linux.ibm.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

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

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