[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMj1kXEjihuC1Wa8fWUqsvsJM6YJZ0wmuhkqicNAfQiHvnWkYw@mail.gmail.com>
Date: Wed, 22 Oct 2025 12:14:11 +0200
From: Ard Biesheuvel <ardb@...nel.org>
To: Eric Biggers <ebiggers@...nel.org>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
"Jason A . Donenfeld" <Jason@...c4.com>, Herbert Xu <herbert@...dor.apana.org.au>,
Pei Xiao <xiaopei01@...inos.cn>, Alexander Potapenko <glider@...gle.com>, kasan-dev@...glegroups.com,
syzbot+01fcd39a0d90cdb0e3df@...kaller.appspotmail.com
Subject: Re: [PATCH] lib/crypto: poly1305: Restore dependency of arch code on !KMSAN
On Wed, 22 Oct 2025 at 05:37, Eric Biggers <ebiggers@...nel.org> wrote:
>
> Restore the dependency of the architecture-optimized Poly1305 code on
> !KMSAN. It was dropped by commit b646b782e522 ("lib/crypto: poly1305:
> Consolidate into single module").
>
> Unlike the other hash algorithms in lib/crypto/ (e.g., SHA-512), the way
> the architecture-optimized Poly1305 code is integrated results in
> assembly code initializing memory, for several different architectures.
> Thus, it generates false positive KMSAN warnings. These could be
> suppressed with kmsan_unpoison_memory(), but it would be needed in quite
> a few places. For now let's just restore the dependency on !KMSAN.
>
> Note: this should have been caught by running poly1305_kunit with
> CONFIG_KMSAN=y, which I did. However, due to an unrelated KMSAN bug
> (https://lore.kernel.org/r/20251022030213.GA35717@sol/), KMSAN currently
> isn't working reliably. Thus, the warning wasn't noticed until later.
>
> Fixes: b646b782e522 ("lib/crypto: poly1305: Consolidate into single module")
> Reported-by: syzbot+01fcd39a0d90cdb0e3df@...kaller.appspotmail.com
> Closes: https://lore.kernel.org/r/68f6a48f.050a0220.91a22.0452.GAE@google.com/
> Reported-by: Pei Xiao <xiaopei01@...inos.cn>
> Closes: https://lore.kernel.org/r/751b3d80293a6f599bb07770afcef24f623c7da0.1761026343.git.xiaopei01@kylinos.cn/
> Signed-off-by: Eric Biggers <ebiggers@...nel.org>
> ---
> lib/crypto/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Ard Biesheuvel <ardb@...nel.org>
Powered by blists - more mailing lists