From 8a7985c4e651976d373c786f5db973da96827705 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 18 Dec 2014 17:00:19 +0000 Subject: [PATCH] suspend & resume RNG subsystem --- sys/arch/i386/i386/apm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c index fe915c35379..f16fd6bcf3b 100644 --- a/sys/arch/i386/i386/apm.c +++ b/sys/arch/i386/i386/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.110 2014/10/17 15:35:31 deraadt Exp $ */ +/* $OpenBSD: apm.c,v 1.111 2014/12/18 17:00:19 deraadt Exp $ */ /*- * Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved. @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -253,6 +254,7 @@ apm_suspend(int state) s = splhigh(); disable_intr(); config_suspend_all(DVACT_SUSPEND); + suspend_randomness(); /* XXX * Flag to disk drivers that they should "power down" the disk @@ -276,6 +278,7 @@ apm_suspend(int state) enable_intr(); splx(s); + resume_randomness(); /* force RNG upper level reseed */ /* restore hw.setperf */ if (cpu_setperf != NULL) cpu_setperf(perflevel); -- 2.20.1