[Buildroot] [PATCH 1/1] package/cryptodev-linux: needs CONFIG_CRYPTO_USER_API_AEAD
Arnout Vandecappelle
arnout at mind.be
Mon May 2 20:46:06 UTC 2022
On 27/04/2022 22:15, Fabrice Fontaine wrote:
> Le mar. 26 avr. 2022 à 23:57, Thomas Petazzoni
> <thomas.petazzoni at bootlin.com> a écrit :
>>
>> On Tue, 26 Apr 2022 23:20:26 +0200
>> Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:
>>
>>> CONFIG_CRYPTO_USER_API_AEAD is needed to fix the following build
>>> failure:
>>>
>>> ERROR: modpost: "crypto_alloc_skcipher" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>> ERROR: modpost: "scatterwalk_map_and_copy" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>> ERROR: modpost: "crypto_ahash_final" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>> ERROR: modpost: "crypto_aead_encrypt" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>> ERROR: modpost: "crypto_aead_setkey" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>> ERROR: modpost: "crypto_skcipher_decrypt" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>> ERROR: modpost: "crypto_destroy_tfm" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>> ERROR: modpost: "crypto_skcipher_setkey" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>> ERROR: modpost: "crypto_aead_decrypt" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>> ERROR: modpost: "crypto_aead_setauthsize" [/home/autobuild/autobuild/instance-2/output-1/build/cryptodev-linux-1.12/./cryptodev.ko] undefined!
>>
>> Are you sure of the relationship between these functions and
>> CONFIG_CRYPTO_USER_API_AEAD ?
>>
>> crypto_aead_encrypt() is implemented in crypto/aead.c, which is built
>> when CONFIG_CRYPTO_AEAD2=y.
>>
>> crypto_skcipher_setkey() is implemented in crypto/skcipher.c, which is
>> built when CONFIG_CRYPTO_SKCIPHER2=y.
>>
>> CRYPTO_USER_API_AEAD enables a user-space interface, but here we're
>> talking about a kernel-level interface.
>>
>> Could you clarify?
>
> I'm far from being a kernel or cryptodev-linux expert but here is was
> my reasonning:
> - CONFIG_CRYPTO_AEAD2 and CONFIG_CRYPTO_SKCIPHER2 are hidden options
> that can't be enabled by KCONFIG_ENABLE_OPT.
> - From my understanding cryptodev-linux allows "userspace
> applications to take advantage of hardware accelerators". So, I
> assumed that cryptodev-linux needed some sort of userspace API on the
> kernel. However, I didn't find a lot of information about this subject
> on cryptodev-linux website. It seems that some projects pointed out
> that CRYPTO_USER_API_AEAD should be enabled (e.g.
> https://github.com/scaleway/kernel-tools/issues/148). Indeed,
> CRYPTO_USER_API_AEAD will select CONFIG_CRYPTO_{AEAD,SKCIPHER} (and so
> CONFIG_CRYPTO_{AEAD,SKCIPHER}2).
>
> However, as I said, I could be totally wrong, perhaps selecting
> CRYPTO_USER_API_AEAD is not correct (even if it fixes the build
> failure).
> Hopefully, someone with more knowledge of cryptodev-linux should be
> able to find the correct fix.
I've summarized this in the commit message and applied to master, thanks.
Regards,
Arnout
>
>>
>> Thomas
>> --
>> Thomas Petazzoni, co-owner and CEO, Bootlin
>> Embedded Linux and Kernel engineering and training
>> https://bootlin.com
>
> Best Regards,
>
> Fabrice
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
More information about the buildroot
mailing list