From patchwork Thu Nov 30 22:46:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Vander Stoep X-Patchwork-Id: 843459 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sveQ6TIA"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="AKD5IG6t"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ypBVG1yjFz9tB5 for ; Fri, 1 Dec 2017 22:13:58 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ZtZqr1BVgyHvKFGu7oWulDTnm9USmgCRk5cq+5rb8hQ=; b=sve Q6TIARqmZaOQ32zu3jgtALlgBOHmilVqN9nux1p6j2fZO5ESCAxaT2r06Ao5A+yaCL9KPvqzwpAwX ocbDl1bpfkgmt803vyvRUnGK6TasBp1hZzsrFGRWBQOTFrT+UGOvb8RvCJHzYQticPAphPNzfe0yl TzPofOdzyADS4c9BLWpehgSryERIryjgGIYu4kR9KucrFIAUOxlQOhSvSMfptqI+1jsyQQ7pQT1Zr bqbMHxwgruSuyY25Yw/En8JQ+G5NQn0JHqJrhgVdGBYgzWQbPR1r4VdAoAIbn1yexK6i2RTZfn8T1 sT4xc5gakS3tRRd2jv0piFUzlqPN98w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKjGJ-0006xD-PT; Fri, 01 Dec 2017 11:13:43 +0000 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKXbX-0002BL-Pk for hostap@lists.infradead.org; Thu, 30 Nov 2017 22:46:57 +0000 Received: by mail-pl0-x243.google.com with SMTP id x4so5147268plv.10 for ; Thu, 30 Nov 2017 14:46:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Vvpp7fL1RcjUB3AB6GssR9pjkXXvaVUOhh5Hx1RuEH4=; b=AKD5IG6t2K4faq2h0j+8aCGP7406WPtDYhqvsYD4SupnxZH+iI2Ku2GX3/QfUeGBLj ofHNmjrfsRhubC3GIGhfjU1zPeEglraTYKa8IApv2cbgSRsJv36rbxHse7PHDmeerQDo H1/ZxAD1EsOfBWEQhq6/oLMuzcnUVbVXnyKgHDfe/GJlEzF1VU0zBdrb49RMJqjlOOWG jpf8RoKnx8AUBNW0HV8lZqJ3/h3La+LRyJH9q1QSELaxzvz/+cMrlwwMypN1jhGUZRch tekRc/+K5EeL5V5XqFZiAeB0Vh8sSSqrFQxpYye5h5VSYwp5gFx4SdzINEnzLfl++B/v Ll3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Vvpp7fL1RcjUB3AB6GssR9pjkXXvaVUOhh5Hx1RuEH4=; b=iCNqlsPV2hQ3J1rSKuV4Xuy1sbSUIGi89wURpcFnIhDg03J+UHM+ip1+ty6jmwvHaj eg0WEr0RrvmMHOH6PuzCyytPGTsraYjg0RnrZg1DBmfOWS/Rg84FOMbBXyYyuAM6PAvt Lj8bqrNnVeC5b74zdp+yFkdLSfFAru1dDGkZIvrYb9t51aG6l7Jp0IKrjPovZSCtViT1 uDhclyYhgaAugB6zVELN/LOECZ5LAra86+Y9gL6pfc7RcRdCrI5OunhWvgQ8AGAKjSnV ej9MQzsJSl08TKGojYc9ZQ6c2J/dUeWXAaQoANVvwWb2MbWhNYcYHNdYOOG3dFZvQaUY Livg== X-Gm-Message-State: AJaThX6/xFPfnJNpPzhwGHrN4kv3AwQl3n6Gn+2KF3/By6/Qf+iAEUib Ut6x+hv2xrvrTtSaic6aqpvTNbKVTPo= X-Google-Smtp-Source: AGs4zMaveGFPsTSGHN1oK1jDzQ2nu0+gnwx9nN+EiOhgIjSD7kAbb8OI+ro/xUU7+SdflfO1aBD1sA== X-Received: by 10.84.168.35 with SMTP id e32mr4157330plb.294.1512081990300; Thu, 30 Nov 2017 14:46:30 -0800 (PST) Received: from jeffv-z840.mtv.corp.google.com ([172.22.113.21]) by smtp.gmail.com with ESMTPSA id m22sm9182117pfg.120.2017.11.30.14.46.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Nov 2017 14:46:29 -0800 (PST) From: Jeff Vander Stoep To: hostap@lists.infradead.org Subject: [PATCH 2/2] Android: Set CONFIG_NO_RANDOM_POOL=y Date: Thu, 30 Nov 2017 14:46:26 -0800 Message-Id: <20171130224626.155757-1-jeffv@google.com> X-Mailer: git-send-email 2.15.0.531.g2ccb3012c9-goog X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171130_144651_871303_CC9E850F X-CRM114-Status: UNSURE ( 7.85 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Mailman-Approved-At: Fri, 01 Dec 2017 03:13:02 -0800 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rpius@google.com, dimitrysh@google.com, Jeff Vander Stoep MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- hostapd/android.config | 7 +++++++ hostapd/hostapd.android.rc | 1 - wpa_supplicant/android.config | 8 +++++++- 3 files changed, 14 insertions(+), 2 deletions(-) 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