All of lore.kernel.org
 help / color / mirror / Atom feed
* mainline build failure due to 8bdc2a190105 ("crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE")
@ 2022-05-28 10:43 Sudip Mukherjee
  2022-05-28 10:46 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Sudip Mukherjee @ 2022-05-28 10:43 UTC (permalink / raw)
  To: Linus Torvalds, Jason A. Donenfeld; +Cc: linux-kernel

Hi All,

The latest mainline kernel branch fails to build for:

arm: imx_v6_v7_defconfig and multi_v7_defconfig
mips: decstation_64_defconfig, decstation_defconfig, decstation_r4k_defconfig

with errors like:

In file included from crypto/chacha20poly1305.c:13:
./include/crypto/poly1305.h:56:46: error: 'CONFIG_CRYPTO_LIB_POLY1305_RSIZE' undeclared here (not in a function); did you mean 'CONFIG_CRYPTO_POLY1305_MODULE'?
   56 |                 struct poly1305_key opaque_r[CONFIG_CRYPTO_LIB_POLY1305_RSIZE];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


git bisect pointed to 8bdc2a190105 ("crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE")

I have checked .config to confirm that it contains:

CONFIG_CRYPTO_CHACHA20POLY1305=m
# CONFIG_CRYPTO_LIB_POLY1305 is not set

so, CONFIG_CRYPTO_LIB_POLY1305_RSIZE will not be defined as it now
depends on CONFIG_CRYPTO_LIB_POLY1305.


--
Regards
Sudip

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mainline build failure due to 8bdc2a190105 ("crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE")
  2022-05-28 10:43 mainline build failure due to 8bdc2a190105 ("crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE") Sudip Mukherjee
@ 2022-05-28 10:46 ` Jason A. Donenfeld
  2022-05-28 11:01   ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2022-05-28 10:46 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: Linus Torvalds, LKML

Hi Sudip,

On Sat, May 28, 2022 at 12:43 PM Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
>
> Hi All,
>
> The latest mainline kernel branch fails to build for:
>
> arm: imx_v6_v7_defconfig and multi_v7_defconfig
> mips: decstation_64_defconfig, decstation_defconfig, decstation_r4k_defconfig
>
> with errors like:
>
> In file included from crypto/chacha20poly1305.c:13:
> ./include/crypto/poly1305.h:56:46: error: 'CONFIG_CRYPTO_LIB_POLY1305_RSIZE' undeclared here (not in a function); did you mean 'CONFIG_CRYPTO_POLY1305_MODULE'?
>    56 |                 struct poly1305_key opaque_r[CONFIG_CRYPTO_LIB_POLY1305_RSIZE];
>       |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> git bisect pointed to 8bdc2a190105 ("crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE")
>
> I have checked .config to confirm that it contains:
>
> CONFIG_CRYPTO_CHACHA20POLY1305=m
> # CONFIG_CRYPTO_LIB_POLY1305 is not set
>
> so, CONFIG_CRYPTO_LIB_POLY1305_RSIZE will not be defined as it now
> depends on CONFIG_CRYPTO_LIB_POLY1305.

Indeed. There's this v2:
https://lore.kernel.org/all/20220527201931.63955-1-Jason@zx2c4.com/

I'll send a v1/v2 interdiff shortly.

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mainline build failure due to 8bdc2a190105 ("crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE")
  2022-05-28 10:46 ` Jason A. Donenfeld
@ 2022-05-28 11:01   ` Jason A. Donenfeld
  2022-05-28 11:09     ` [PATCH] Revert "crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE" Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2022-05-28 11:01 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: LKML, Sudip Mukherjee

Hi again,

Actually, I think 8bdc2a190105 should just be reverted wholesale.
There are too many headers that depend on it (e.g. caam) even if
there's no .o that winds up using it. I could try to enumerate them
all in kconfig language, but that doesn't seem much cleaner.

[Aside: note that none of this was a problem with my proposed "zinc"
patchset from a few years ago, which cleaned up all this crypto layer
stuff. The frankenstein that landed instead is just a never ending
source of annoying bugs like this one. Until there are larger changes,
I think a lot of the woes of crypto/ are terminally hopeless. :-\]

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Revert "crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE"
  2022-05-28 11:01   ` Jason A. Donenfeld
@ 2022-05-28 11:09     ` Jason A. Donenfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Jason A. Donenfeld @ 2022-05-28 11:09 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-crypto
  Cc: Jason A. Donenfeld, Sudip Mukherjee, kernel test robot

This reverts commit 8bdc2a190105e862dfe7a4033f2fd385b7e58ae8.

It got merged a bit prematurely and shortly after the kernel test
robot and Sudip pointed out build failures.

We could attempt to fix this by listing the dependencies piecemeal, but
it's not as obvious as it looks: drivers like caam use this macro in
headers even if there's no .o compiled in that makes use of it. So
actually fixing this might require a bit more of a comprehensive
approach, rather than whack-a-mole with hunting down which drivers use
which headers which use this macro.

Therefore, this commit just reverts the change, and maybe the problem
can be visited on the next rainy day.

Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 8bdc2a190105 ("crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 lib/crypto/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
index a143ddf9279a..9856e291f414 100644
--- a/lib/crypto/Kconfig
+++ b/lib/crypto/Kconfig
@@ -85,7 +85,6 @@ config CRYPTO_LIB_POLY1305_RSIZE
 	default 11 if X86_64
 	default 9 if ARM || ARM64
 	default 1
-	depends on CRYPTO_LIB_POLY1305
 
 config CRYPTO_ARCH_HAVE_LIB_POLY1305
 	tristate
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-28 11:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-28 10:43 mainline build failure due to 8bdc2a190105 ("crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE") Sudip Mukherjee
2022-05-28 10:46 ` Jason A. Donenfeld
2022-05-28 11:01   ` Jason A. Donenfeld
2022-05-28 11:09     ` [PATCH] Revert "crypto: poly1305 - cleanup stray CRYPTO_LIB_POLY1305_RSIZE" Jason A. Donenfeld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.