From: Vishal Chourasia <isomorphik.ibm@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/crypto: Fix aes-gcm-p10 link errors
Date: Tue, 30 May 2023 10:37:36 +0530 [thread overview]
Message-ID: <1307cbae-27ca-888a-968a-c53e4b89870d@gmail.com> (raw)
In-Reply-To: <20230525150501.37081-1-mpe@ellerman.id.au>
On 5/25/23 20:35, Michael Ellerman wrote:
> The recently added P10 AES/GCM code added some files containing
> CRYPTOGAMS perl-asm code which are near duplicates of the p8 files
> found in drivers/crypto/vmx.
>
> In particular the newly added files produce functions with identical
> names to the existing code.
>
> When the kernel is built with CONFIG_CRYPTO_AES_GCM_P10=y and
> CONFIG_CRYPTO_DEV_VMX_ENCRYPT=y that leads to link errors, eg:
>
> ld: drivers/crypto/vmx/aesp8-ppc.o: in function `aes_p8_set_encrypt_key':
> (.text+0xa0): multiple definition of `aes_p8_set_encrypt_key'; arch/powerpc/crypto/aesp8-ppc.o:(.text+0xa0): first defined here
> ...
> ld: drivers/crypto/vmx/ghashp8-ppc.o: in function `gcm_ghash_p8':
> (.text+0x140): multiple definition of `gcm_ghash_p8'; arch/powerpc/crypto/ghashp8-ppc.o:(.text+0x2e4): first defined here
>
> Fix it for now by renaming the newly added files and functions to use
> "p10" instead of "p8" in the names.
>
> Fixes: 45a4672b9a6e ("crypto: p10-aes-gcm - Update Kconfig and Makefile")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
> arch/powerpc/crypto/Makefile | 10 +++++-----
> arch/powerpc/crypto/aes-gcm-p10-glue.c | 18 +++++++++---------
> .../crypto/{aesp8-ppc.pl => aesp10-ppc.pl} | 2 +-
> .../crypto/{ghashp8-ppc.pl => ghashp10-ppc.pl} | 12 ++++++------
> 4 files changed, 21 insertions(+), 21 deletions(-)
> rename arch/powerpc/crypto/{aesp8-ppc.pl => aesp10-ppc.pl} (99%)
> rename arch/powerpc/crypto/{ghashp8-ppc.pl => ghashp10-ppc.pl} (97%)
I missed adding tested-by in previous reply.
After applying the patch, I was able to successfully build the Linux
kernel v6.4-rc4.
I encountered no errors during the build process. The issue pertaining
to multiple
definitions of certain functions appears to be resolved.
λ grep -i CRYPTO_AES_GCM_P10 .config
CONFIG_CRYPTO_AES_GCM_P10=y
λ grep -i CRYPTO_DEV_VMX_ENCRYPT .config
CONFIG_CRYPTO_DEV_VMX_ENCRYPT=y
+ make O=${BUILD_DIR} CC=clang ARCH=powerpc
CROSS_COMPILE=powerpc64le-linux-gnu- -j16 -s vmlinux modules
Thank you for the well-detailed fix.
Tested-by: Vishal Chourasia <vishalc@linux.ibm.com>
prev parent reply other threads:[~2023-05-30 5:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 15:05 [PATCH] powerpc/crypto: Fix aes-gcm-p10 link errors Michael Ellerman
2023-05-30 4:06 ` Vishal Chourasia
2023-05-30 5:07 ` Vishal Chourasia [this message]
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=1307cbae-27ca-888a-968a-c53e4b89870d@gmail.com \
--to=isomorphik.ibm@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).