diff mbox series

[2/2] Android: Set CONFIG_NO_RANDOM_POOL=y

Message ID 20171130224626.155757-1-jeffv@google.com
State Accepted
Headers show
Series [1/2] Android: Move hostapd to vendor partition | expand

Commit Message

Jeff Vander Stoep Nov. 30, 2017, 10:46 p.m. UTC
Wpa_supplicant's random pool is not necessary on Android. Randomness
is already provided by the entropymixer service which ensures
sufficient entropy is maintained across reboots. Commit b410eb1913
'Initialize /dev/urandom earlier in boot' seeds /dev/urandom with
that entropy before either wpa_supplicant or hostapd are run.

Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
---
 hostapd/android.config        | 7 +++++++
 hostapd/hostapd.android.rc    | 1 -
 wpa_supplicant/android.config | 8 +++++++-
 3 files changed, 14 insertions(+), 2 deletions(-)

Comments

Jouni Malinen Dec. 9, 2017, 5:28 p.m. UTC | #1
On Thu, Nov 30, 2017 at 02:46:26PM -0800, Jeff Vander Stoep wrote:
> Wpa_supplicant's random pool is not necessary on Android. Randomness
> is already provided by the entropymixer service which ensures
> sufficient entropy is maintained across reboots. Commit b410eb1913
> 'Initialize /dev/urandom earlier in boot' seeds /dev/urandom with
> that entropy before either wpa_supplicant or hostapd are run.

Thanks, applied.
diff mbox series

Patch

diff --git a/hostapd/android.config b/hostapd/android.config
index b29382892..08d21f044 100644
--- a/hostapd/android.config
+++ b/hostapd/android.config
@@ -203,3 +203,10 @@  CONFIG_WPA_CLI_EDIT=y
 # Opportunistic Wireless Encryption (OWE)
 # Experimental implementation of draft-harkins-owe-07.txt
 #CONFIG_OWE=y
+
+# Wpa_supplicant's random pool is not necessary on Android. Randomness is
+# already provided by the entropymixer service which ensures sufficient
+# entropy is maintained across reboots. Commit b410eb1913 'Initialize
+# /dev/urandom earlier in boot' seeds /dev/urandom with that entropy before
+# either wpa_supplicant or hostapd are run.
+CONFIG_NO_RANDOM_POOL=y
diff --git a/hostapd/hostapd.android.rc b/hostapd/hostapd.android.rc
index d8e6a0698..26a87b808 100644
--- a/hostapd/hostapd.android.rc
+++ b/hostapd/hostapd.android.rc
@@ -10,7 +10,6 @@  on post-fs-data
     mkdir /data/misc/wifi/hostapd 0770 wifi wifi
 
 service hostapd /vendor/bin/hostapd \
-        -e /data/misc/wifi/entropy.bin \
         /data/misc/wifi/hostapd.conf
     class main
     user wifi
diff --git a/wpa_supplicant/android.config b/wpa_supplicant/android.config
index a4b17b055..7dfaa0f14 100644
--- a/wpa_supplicant/android.config
+++ b/wpa_supplicant/android.config
@@ -442,7 +442,13 @@  CONFIG_ANDROID_LOG=y
 # disabled. This will save some in binary size and CPU use. However, this
 # should only be considered for builds that are known to be used on devices
 # that meet the requirements described above.
-#CONFIG_NO_RANDOM_POOL=y
+
+# Wpa_supplicant's random pool is not necessary on Android. Randomness is
+# already provided by the entropymixer service which ensures sufficient
+# entropy is maintained across reboots. Commit b410eb1913 'Initialize
+# /dev/urandom earlier in boot' seeds /dev/urandom with that entropy before
+# either wpa_supplicant or hostapd are run.
+CONFIG_NO_RANDOM_POOL=y
 
 # IEEE 802.11n (High Throughput) support (mainly for AP mode)
 CONFIG_IEEE80211N=y