]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: xilinx-trng - Remove crypto_rng interface
authorEric Biggers <ebiggers@kernel.org>
Sun, 31 May 2026 19:17:35 +0000 (12:17 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 11 Jun 2026 06:03:13 +0000 (14:03 +0800)
commit32b4d29280ed2a991dc196d5845b892acedc63b8
tree8f6a0714b2f7fe3b1ccd36e77f1aae18fb62c54f
parentc9fedb3b23d4664b824f60085bcdba92e5d9dd48
crypto: xilinx-trng - Remove crypto_rng interface

Implementing the crypto_rng interface has no purpose, as it isn't used
in practice.  It's being removed from other drivers too.  Just remove
it.  This leaves hwrng, which is actually used.

Tagging with 'Cc stable' due to the bugs that this removes:

  - xtrng_trng_generate() sometimes returned success even when it didn't
    fill in all the bytes.

  - It was possible for xtrng_trng_generate() and
    xtrng_hwrng_trng_read() to run concurrently and interfere with each
    other, as the locking code in xtrng_hwrng_trng_read() was broken.

Fixes: 8979744aca80 ("crypto: xilinx - Add TRNG driver for Versal")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/Kconfig
drivers/crypto/xilinx/xilinx-trng.c