Thread (23 messages) 23 messages, 7 authors, 2022-10-09

Re: [PATCH v3 4/5] treewide: use get_random_bytes when possible

From: Christophe Leroy <hidden>
Date: 2022-10-06 17:22:51
Also in: dri-devel, kernel-janitors, linux-block, linux-crypto, linux-doc, linux-fsdevel, linux-media, linux-mips, linux-mm, linux-mmc, linux-nvme, linux-patches, linux-rdma, linux-s390, linux-um, linux-usb, linux-wireless, lkml, loongarch, netdev, sparclinux


Le 06/10/2022 à 18:53, Jason A. Donenfeld a écrit :
The prandom_bytes() function has been a deprecated inline wrapper around
get_random_bytes() for several releases now, and compiles down to the
exact same code. Replace the deprecated wrapper with a direct call to
the real function.

Reviewed-by: Kees Cook <redacted>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Christophe Leroy <redacted> (Powerpc part)
quoted hunk ↗ jump to hunk
---
  arch/powerpc/crypto/crc-vpmsum_test.c       |  2 +-
diff --git a/arch/powerpc/crypto/crc-vpmsum_test.c b/arch/powerpc/crypto/crc-vpmsum_test.c
index c1c1ef9457fb..273c527868db 100644
--- a/arch/powerpc/crypto/crc-vpmsum_test.c
+++ b/arch/powerpc/crypto/crc-vpmsum_test.c
@@ -82,7 +82,7 @@ static int __init crc_test_init(void)
  
  			if (len <= offset)
  				continue;
-			prandom_bytes(data, len);
+			get_random_bytes(data, len);
  			len -= offset;
  
  			crypto_shash_update(crct10dif_shash, data+offset, len);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help