Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Enable sun8icrypto in GENERIC64.
details: https://anonhg.NetBSD.org/src/rev/876a6f8fa937
branches: trunk
changeset: 467081:876a6f8fa937
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Jan 12 21:52:36 2020 +0000
description:
Enable sun8icrypto in GENERIC64.
But set its entropy estimate to zero until we have a better idea of
how it works. Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.
diffstat:
sys/arch/arm/sunxi/sun8i_crypto.c | 10 ++++++++--
sys/arch/evbarm/conf/GENERIC64 | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 97b2634d4c7a -r 876a6f8fa937 sys/arch/arm/sunxi/sun8i_crypto.c
--- a/sys/arch/arm/sunxi/sun8i_crypto.c Sun Jan 12 21:49:39 2020 +0000
+++ b/sys/arch/arm/sunxi/sun8i_crypto.c Sun Jan 12 21:52:36 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun8i_crypto.c,v 1.9 2019/12/18 02:26:48 riastradh Exp $ */
+/* $NetBSD: sun8i_crypto.c,v 1.10 2020/01/12 21:52:36 riastradh Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.9 2019/12/18 02:26:48 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.10 2020/01/12 21:52:36 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -971,6 +971,12 @@
entropybits = 0;
}
+ /*
+ * Actually we don't believe in any of the entropy until this
+ * device has had more scrutiny.
+ */
+ entropybits = 0;
+
/* Success! Enter and erase the data. */
rnd_add_data(&rng->cr_rndsource, buf, SUN8I_CRYPTO_RNGBYTES,
entropybits);
diff -r 97b2634d4c7a -r 876a6f8fa937 sys/arch/evbarm/conf/GENERIC64
--- a/sys/arch/evbarm/conf/GENERIC64 Sun Jan 12 21:49:39 2020 +0000
+++ b/sys/arch/evbarm/conf/GENERIC64 Sun Jan 12 21:52:36 2020 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: GENERIC64,v 1.130 2020/01/04 14:18:28 skrll Exp $
+# $NetBSD: GENERIC64,v 1.131 2020/01/12 21:52:36 riastradh Exp $
#
# GENERIC ARM (aarch64) kernel
#
@@ -393,7 +393,7 @@
amdccp* at acpi?
bcmrng* at fdt? # Broadcom BCM283x RNG
mesonrng* at fdt? # Amlogic Meson RNG
-#sun8icrypto* at fdt? # Allwinner Crypto Engine
+sun8icrypto* at fdt? # Allwinner Crypto Engine
# RTC
plrtc* at fdt? # ARM PrimeCell RTC
Home |
Main Index |
Thread Index |
Old Index