From patchwork Thu Nov 30 22:45:51 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: 843458 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="cQXB35eW"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="npgoU+La"; 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 3ypBTz2cLFz9tB5 for ; Fri, 1 Dec 2017 22:13:43 +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=P5Ja/X0tuhZhAp5dfFqaR7T+q5pnNlpYtZ5+Un+VCVs=; b=cQX B35eW0FXLf96aNToAaFgbv0NIQ+G38NEY+1dXhUnxh0i3muPXYg2SEYuwqgrrl9vkYue828Z21LFK yCPTPHV/Zgy4hy28zbQTRynaJPh1nYf0xA4aCrlmEjEOnhV7QRg72g/ghksWt8JmXJwQRDV7hJ76Z 63jDQHyxuwOgykef0F3TskCR6vYRlJXzi/Q/dKb8xFy2JFXnsXpgfzJ/tbG3CliS0iCSwkvfGFYmy BoD5L+6kq69MT7xzQYE+1Da8flzyPdjkhuklBtvZDsOhTew9Bbm1+HOT6jjwvY7YaBc9ei7N/EP9M T4+gljj+aoVBE2rZOUDwEgGNMJUeKTA==; 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 1eKjFw-0006s7-Kw; Fri, 01 Dec 2017 11:13:20 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKXbA-000258-Js for hostap@lists.infradead.org; Thu, 30 Nov 2017 22:46:30 +0000 Received: by mail-pf0-x242.google.com with SMTP id m26so3748606pfj.11 for ; Thu, 30 Nov 2017 14:46:07 -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=eHG3G1otcwVn+C/FttUFLsjKKcchOFuYxavTy81KZVU=; b=npgoU+LafZnGHXJNcQimXjig8lgbNjcZq94A0SGMlrFl972CZeZnya7MGc029/8GIh J+oRvLCNHK3aevNwgdYSs+vp8rCLjA2A63DpcmCdEZCIy3Cgfk5WOW6T6o6xkAoxn3SY 6UgG90NCl+zMQvlTZGrBP0j1M3nxDNg5Mc68fQpZqnUYmd7luzhAnxHcM6KWkexcJrZg gzplvxwARq9D7wgOYWeHVeNw9FxEHjH9fc/ZWdhEhRlyPi8wV9A88tvnXo1F/j8y6lOw kJvN7pKAgfB5XsFofNQgEYf6a1AkCjQ5KBAbALLukp3DrjlIYccl3RoySMcgYgM9cb3C e2Mg== 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=eHG3G1otcwVn+C/FttUFLsjKKcchOFuYxavTy81KZVU=; b=dcMIRRHqiiU5JJKuMA+fr/f/iiSrriW0jLLYCa5YIbQk3k5EYb2hbS71SGGlBfgTaY 2K/SJQZ9yRNzKo4SjBncmKNbDqCu7WuW6FO+4AQajTEgTNHnFGmL534B9IXc+/iw8vON 061KELztfv7tgZ30cZ/uUJLHYveQksISWkA9uu9ZEHF7qHXiGWfOOE0fnoy9meDuftDC SMDbTXq7Y7ntqqCztQpWiNEYBhfSWJMjCOb+mVXjgdypXQqpzF/4rFJd6sE8wFjdSeU6 +I45epLJKq5DvS3FKd/WwVP4lDLleD9V7QHdY8GJtXLU/LXvG5QWa0+3ivrb8CmWTrfk SAXA== X-Gm-Message-State: AJaThX4WFnCB+STTad5cRsJclZkj/b51XvmckPFkm8HiqmKSmT5fUdSC mGpez3WqtY09k+7Wu9SXCGdwqa3/4nQ= X-Google-Smtp-Source: AGs4zMalIJx6e198dMjbU40j6S6sNYe61WFy1Wmy7N6TLYOk9hyz6d06jLdXGeXC963TC8HvIGS71A== X-Received: by 10.101.78.203 with SMTP id w11mr3700981pgq.439.1512081966762; Thu, 30 Nov 2017 14:46:06 -0800 (PST) Received: from jeffv-z840.mtv.corp.google.com ([172.22.113.21]) by smtp.gmail.com with ESMTPSA id h69sm9288460pfe.107.2017.11.30.14.46.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Nov 2017 14:46:05 -0800 (PST) From: Jeff Vander Stoep To: hostap@lists.infradead.org Subject: [PATCH 1/2] Android: Move hostapd to vendor partition Date: Thu, 30 Nov 2017 14:45:51 -0800 Message-Id: <20171130224551.155510-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_144628_742666_5E7610AE X-CRM114-Status: UNSURE ( 7.07 ) 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 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c00:0:0:0:242 listed in] [list.dnswl.org] -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:12:57 -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, Po-Chien Hsueh , dimitrysh@google.com, Jeff Vander Stoep MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Po-Chien Hsueh Move hostapd to /vendor/bin/ because it's only used by WIFI HAL. Signed-off-by: Jeff Vander Stoep --- hostapd/Android.mk | 2 ++ hostapd/hostapd.android.rc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hostapd/Android.mk b/hostapd/Android.mk index 73f96ed5e..8fd6fa09f 100644 --- a/hostapd/Android.mk +++ b/hostapd/Android.mk @@ -1066,6 +1066,7 @@ endif include $(CLEAR_VARS) LOCAL_MODULE := hostapd_cli LOCAL_MODULE_TAGS := debug +LOCAL_PROPRIETARY_MODULE := true LOCAL_SHARED_LIBRARIES := libc libcutils liblog LOCAL_CFLAGS := $(L_CFLAGS) LOCAL_SRC_FILES := $(OBJS_c) @@ -1076,6 +1077,7 @@ include $(BUILD_EXECUTABLE) include $(CLEAR_VARS) LOCAL_MODULE := hostapd LOCAL_MODULE_TAGS := optional +LOCAL_PROPRIETARY_MODULE := true ifdef CONFIG_DRIVER_CUSTOM LOCAL_STATIC_LIBRARIES := libCustomWifi endif diff --git a/hostapd/hostapd.android.rc b/hostapd/hostapd.android.rc index 83e8d8791..d8e6a0698 100644 --- a/hostapd/hostapd.android.rc +++ b/hostapd/hostapd.android.rc @@ -9,7 +9,7 @@ on post-fs-data mkdir /data/misc/wifi/hostapd 0770 wifi wifi -service hostapd /system/bin/hostapd \ +service hostapd /vendor/bin/hostapd \ -e /data/misc/wifi/entropy.bin \ /data/misc/wifi/hostapd.conf class main 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