From: deraadt Date: Thu, 18 Dec 2014 16:31:50 +0000 (+0000) Subject: suspend and resume the RNG (at what looks like the right spots) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3312001928deb5a626d4e7b314f7520908954ecf;p=openbsd suspend and resume the RNG (at what looks like the right spots) ok reyk djm --- diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 7c8b449b187..4f6ce7bc428 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.277 2014/12/09 06:58:29 doug Exp $ */ +/* $OpenBSD: acpi.c,v 1.278 2014/12/18 16:31:50 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -2174,6 +2175,8 @@ acpi_sleep_state(struct acpi_softc *sc, int state) goto fail_suspend; acpi_sleep_clocks(sc, state); + suspend_randomness(); + /* 2nd suspend AML step: _PTS(tostate) */ if (aml_node_setval(sc, sc->sc_pts, state) != 0) goto fail_pts; @@ -2226,6 +2229,7 @@ fail_suspend: acpi_resume_mp(); #endif + resume_randomness(); /* force RNG upper level reseed */ bufq_restart(); fail_quiesce: