lkml.org 
[lkml]   [2022]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH -next] crypto: curve25519 - Fix build error when CRYPTO_MANAGER_DISABLE_TESTS!=y && CRYPTO=m
On 5/28/22, Zheng Bin <zhengbin13@huawei.com> wrote:
> If CRYPTO_MANAGER_DISABLE_TESTS!=y, CRYPTO=m, bulding fails:
>
> lib/crypto/curve25519-selftest.o: In function `curve25519_selftest':
> curve25519-selftest.c:(.init.text+0x60): undefined reference to
> `__crypto_memneq'
> curve25519-selftest.c:(.init.text+0xec): undefined reference to
> `__crypto_memneq'
> curve25519-selftest.c:(.init.text+0x114): undefined reference to
> `__crypto_memneq'
> curve25519-selftest.c:(.init.text+0x154): undefined reference to
> `__crypto_memneq'
>
> Add depends for CRYPTO_LIB_CURVE25519 to fix this.

In this case, the bug isn't caused by the tests exactly but by the
curve25519.h inline usage here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/crypto/curve25519.h#n43

Probably the solution for this one is to move crypto_memneq into lib/crypto.

Jason

\
 
 \ /
  Last update: 2022-05-28 08:19    [W:1.418 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site