From: deraadt Date: Thu, 18 Dec 2014 17:00:19 +0000 (+0000) Subject: suspend & resume RNG subsystem X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8a7985c4e651976d373c786f5db973da96827705;p=openbsd suspend & resume RNG subsystem --- 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);