Module Name:    src
Committed By:   riastradh
Date:           Mon Jan 11 02:18:40 UTC 2021

Modified Files:
        src/sys/kern: kern_entropy.c

Log Message:
entropy: Downgrade consolidation warning from printf to LOG_DEBUG.

Candidate fix for PR kern/55458.  This message is rather technical,
and so is unlikely to be acted on by anyone not debugging the kernel
anyway.  Most likely, on any system where it is a real problem, there
will be another (less technical) entropy warning anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/kern_entropy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_entropy.c
diff -u src/sys/kern/kern_entropy.c:1.25 src/sys/kern/kern_entropy.c:1.26
--- src/sys/kern/kern_entropy.c:1.25	Fri Dec 11 03:00:09 2020
+++ src/sys/kern/kern_entropy.c	Mon Jan 11 02:18:40 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_entropy.c,v 1.25 2020/12/11 03:00:09 thorpej Exp $	*/
+/*	$NetBSD: kern_entropy.c,v 1.26 2021/01/11 02:18:40 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.25 2020/12/11 03:00:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.26 2021/01/11 02:18:40 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -106,6 +106,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_entropy
 #include <sys/sha1.h>		/* for boot seed checksum */
 #include <sys/stdint.h>
 #include <sys/sysctl.h>
+#include <sys/syslog.h>
 #include <sys/systm.h>
 #include <sys/time.h>
 #include <sys/xcall.h>
@@ -1026,7 +1027,7 @@ entropy_do_consolidate(void)
 	E->pending -= diff;
 	if (__predict_false(E->needed > 0)) {
 		if (ratecheck(&lasttime, &interval))
-			printf("entropy: WARNING:"
+			log(LOG_DEBUG, "entropy: WARNING:"
 			    " consolidating less than full entropy\n");
 	}
 

Reply via email to