* [Buildroot] [PATCH 0/2] hostapd/wpa_s: fixes after version update @ 2022-02-13 15:52 Sergey Matyukevich 2022-02-13 15:52 ` [Buildroot] [PATCH 1/2] package/hostapd: update DPP option handling Sergey Matyukevich 2022-02-13 15:52 ` [Buildroot] [PATCH 2/2] package/wpa_supplicant: fix mesh configuration build Sergey Matyukevich 0 siblings, 2 replies; 7+ messages in thread From: Sergey Matyukevich @ 2022-02-13 15:52 UTC (permalink / raw) To: buildroot; +Cc: Matt Weber, Sergey Matyukevich Hi all, This patch series provides two fixes for hostapd/wpa_s build issues. The first patch fixes hostapd build regression caused by its version update. New hostapd version requires updated handling of CONFIG_DPP option. I guess I failed to catch this problem because all my random hostapd test configs enabled openssl. So I overlooked basic minimal configuration that did not require openssl. The second patch fixes specific configuration of wpa_supplicant reported by Yegor Yefremov. For now a patch is added. Yegor already posted patch to hostapd mailing list. So some time in the future this problem will be fixed upstream. Regards, Sergey Sergey Matyukevich (2): package/hostapd: update DPP option handling package/wpa_supplicant: fix build for mesh configuration package/hostapd/hostapd.mk | 3 +- .../0001-mesh-enable-HMAC_SHA384_KDF.patch | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch -- 2.35.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] package/hostapd: update DPP option handling 2022-02-13 15:52 [Buildroot] [PATCH 0/2] hostapd/wpa_s: fixes after version update Sergey Matyukevich @ 2022-02-13 15:52 ` Sergey Matyukevich 2022-02-13 20:38 ` Thomas Petazzoni via buildroot 2022-02-13 15:52 ` [Buildroot] [PATCH 2/2] package/wpa_supplicant: fix mesh configuration build Sergey Matyukevich 1 sibling, 1 reply; 7+ messages in thread From: Sergey Matyukevich @ 2022-02-13 15:52 UTC (permalink / raw) To: buildroot; +Cc: Matt Weber, Sergey Matyukevich Makefile hostapd.mk defines different macros for different defconfig options. Options that are not listed in defconfig, can be set using HOSTAPD_CONFIG_SET. Options that are listed in defconfig, can be enabled/disabled using HOSTAPD_CONFIG_ENABLE/HOSTAPD_CONFIG_DISABLE. Starting from hostapd v2.10, option CONFIG_DPP is explicitly listed in defconfig. So it is time to switch to enable/disable macros for this option. Fixes: - http://autobuild.buildroot.net/results/3f8058ee6f3913fda795578f206db895731ba1e6/ Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> --- package/hostapd/hostapd.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/hostapd/hostapd.mk b/package/hostapd/hostapd.mk index 075cb2a8d0..2ea6e0312f 100644 --- a/package/hostapd/hostapd.mk +++ b/package/hostapd/hostapd.mk @@ -84,12 +84,13 @@ endif ifeq ($(BR2_PACKAGE_HOSTAPD_WPA3),y) HOSTAPD_CONFIG_SET += \ - CONFIG_DPP \ CONFIG_SAE HOSTAPD_CONFIG_ENABLE += \ + CONFIG_DPP \ CONFIG_OWE else HOSTAPD_CONFIG_DISABLE += \ + CONFIG_DPP \ CONFIG_OWE endif -- 2.35.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/hostapd: update DPP option handling 2022-02-13 15:52 ` [Buildroot] [PATCH 1/2] package/hostapd: update DPP option handling Sergey Matyukevich @ 2022-02-13 20:38 ` Thomas Petazzoni via buildroot 2022-02-14 9:39 ` Sergey Matyukevich 0 siblings, 1 reply; 7+ messages in thread From: Thomas Petazzoni via buildroot @ 2022-02-13 20:38 UTC (permalink / raw) To: Sergey Matyukevich; +Cc: Matt Weber, buildroot On Sun, 13 Feb 2022 18:52:07 +0300 Sergey Matyukevich <geomatsi@gmail.com> wrote: > Makefile hostapd.mk defines different macros for different defconfig > options. Options that are not listed in defconfig, can be set using > HOSTAPD_CONFIG_SET. Options that are listed in defconfig, can be > enabled/disabled using HOSTAPD_CONFIG_ENABLE/HOSTAPD_CONFIG_DISABLE. > > Starting from hostapd v2.10, option CONFIG_DPP is explicitly listed > in defconfig. So it is time to switch to enable/disable macros for > this option. This seems fragile. Why don't we have a single way of enabling an option, which doesn't depend on whether the option is listed in the hostapd defconfig or not? Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/hostapd: update DPP option handling 2022-02-13 20:38 ` Thomas Petazzoni via buildroot @ 2022-02-14 9:39 ` Sergey Matyukevich 0 siblings, 0 replies; 7+ messages in thread From: Sergey Matyukevich @ 2022-02-14 9:39 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: Matt Weber, buildroot Hello Thomas, > > Makefile hostapd.mk defines different macros for different defconfig > > options. Options that are not listed in defconfig, can be set using > > HOSTAPD_CONFIG_SET. Options that are listed in defconfig, can be > > enabled/disabled using HOSTAPD_CONFIG_ENABLE/HOSTAPD_CONFIG_DISABLE. > > > > Starting from hostapd v2.10, option CONFIG_DPP is explicitly listed > > in defconfig. So it is time to switch to enable/disable macros for > > this option. > > This seems fragile. Why don't we have a single way of enabling an > option, which doesn't depend on whether the option is listed in the > hostapd defconfig or not? What do you think about removal of HOSTAPD_CONFIG_SET and having something along the following lines for configuration step: @@ -124,9 +124,11 @@ define HOSTAPD_CONFIGURE_CMDS cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG) sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(HOSTAPD_CONFIG_ENABLE)) \ $(patsubst %,-e 's/^\(%\)/#\1/',$(HOSTAPD_CONFIG_DISABLE)) \ - $(patsubst %,-e '1i%=y',$(HOSTAPD_CONFIG_SET)) \ $(patsubst %,-e %,$(HOSTAPD_CONFIG_EDITS)) \ $(HOSTAPD_CONFIG) + for opt in $(HOSTAPD_CONFIG_ENABLE) ; do \ + sed -i -ze "/$${opt}=y/!s/$$/$${opt}=y\n/" $(HOSTAPD_CONFIG) ; \ + done endef This way only HOSTAPD_CONFIG_ENABLED/HOSTAPD_CONFIG_DISABLED macros will remain. Options that are required, but not listed in defconfig, still will be appended. There is a chance that next hostapd releases will introduce some new options for existing functionality, that will require attention. But there will be no need for shuffling existing options between CONFIG_SET and CONFIG_ENABLED. Regards, Sergey _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] package/wpa_supplicant: fix mesh configuration build 2022-02-13 15:52 [Buildroot] [PATCH 0/2] hostapd/wpa_s: fixes after version update Sergey Matyukevich 2022-02-13 15:52 ` [Buildroot] [PATCH 1/2] package/hostapd: update DPP option handling Sergey Matyukevich @ 2022-02-13 15:52 ` Sergey Matyukevich 2022-02-13 16:42 ` Arnout Vandecappelle 1 sibling, 1 reply; 7+ messages in thread From: Sergey Matyukevich @ 2022-02-13 15:52 UTC (permalink / raw) To: buildroot; +Cc: Matt Weber, Sergey Matyukevich Consider the following wpa_supplicant configuration: BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y BR2_PACKAGE_WPA_SUPPLICANT_MESH_NETWORKING=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y This configuration fails to build with the following error: /path/to/output/build/wpa_supplicant-2.10/build/wpa_supplicant/src/common/sae.o: in function `hkdf_expand': sae.c:(.text+0x3c8): undefined reference to `hmac_sha384_kdf' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:1894: wpa_supplicant] Error 1 Looking into wpa_supplicant Makefile: - CONFIG_MESH for some reason needs SAE, so it enables CONFIG_SAE - CONFIG_SAE enables only HMAC_SHA256_KDF This is apparently not enough. At least HMAC_SHA384_KDF is required for successful build. This commit adds a minimal patch for wpa_supplicant that fixes specified build configuration. Reported-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> --- .../0001-mesh-enable-HMAC_SHA384_KDF.patch | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch diff --git a/package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch b/package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch new file mode 100644 index 0000000000..d765c1dbbc --- /dev/null +++ b/package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch @@ -0,0 +1,30 @@ +From 08986b7da7e580f5deb570aaa654df38fb23397a Mon Sep 17 00:00:00 2001 +From: Sergey Matyukevich <geomatsi@gmail.com> +Date: Sun, 13 Feb 2022 18:26:23 +0300 +Subject: [PATCH] mesh: enable HMAC_SHA384_KDF + +Mesh support CONFIG_MESH needs SAE, so it enables CONFIG_SAE. +In its turn, CONFIG_SAE enables only HMAC_SHA256_KDF option. +This is apparently not enough for successful build. At least +HMAC_SHA384_KDF is required for successful build. + +Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> +--- + wpa_supplicant/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile +index cb66defac..c8e53a3c9 100644 +--- a/wpa_supplicant/Makefile ++++ b/wpa_supplicant/Makefile +@@ -246,6 +246,7 @@ endif + ifdef CONFIG_MESH + NEED_80211_COMMON=y + NEED_AES_SIV=y ++NEED_HMAC_SHA384_KDF=y + CONFIG_SAE=y + CONFIG_AP=y + CFLAGS += -DCONFIG_MESH +-- +2.35.0 + -- 2.35.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/wpa_supplicant: fix mesh configuration build 2022-02-13 15:52 ` [Buildroot] [PATCH 2/2] package/wpa_supplicant: fix mesh configuration build Sergey Matyukevich @ 2022-02-13 16:42 ` Arnout Vandecappelle 2022-02-13 16:56 ` Sergey Matyukevich 0 siblings, 1 reply; 7+ messages in thread From: Arnout Vandecappelle @ 2022-02-13 16:42 UTC (permalink / raw) To: Sergey Matyukevich, buildroot; +Cc: Matt Weber On 13/02/2022 16:52, Sergey Matyukevich wrote: > Consider the following wpa_supplicant configuration: > > BR2_PACKAGE_WPA_SUPPLICANT=y > BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y > BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y > BR2_PACKAGE_WPA_SUPPLICANT_MESH_NETWORKING=y > BR2_PACKAGE_WPA_SUPPLICANT_EAP=y > > This configuration fails to build with the following error: > > /path/to/output/build/wpa_supplicant-2.10/build/wpa_supplicant/src/common/sae.o: in function `hkdf_expand': > sae.c:(.text+0x3c8): undefined reference to `hmac_sha384_kdf' > collect2: error: ld returned 1 exit status > make[1]: *** [Makefile:1894: wpa_supplicant] Error 1 > > Looking into wpa_supplicant Makefile: > - CONFIG_MESH for some reason needs SAE, so it enables CONFIG_SAE > - CONFIG_SAE enables only HMAC_SHA256_KDF > > This is apparently not enough. At least HMAC_SHA384_KDF is required > for successful build. This commit adds a minimal patch for > wpa_supplicant that fixes specified build configuration. > > Reported-by: Yegor Yefremov <yegorslists@googlemail.com> > Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> > --- > .../0001-mesh-enable-HMAC_SHA384_KDF.patch | 30 +++++++++++++++++++ > 1 file changed, 30 insertions(+) > create mode 100644 package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch > > diff --git a/package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch b/package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch > new file mode 100644 > index 0000000000..d765c1dbbc > --- /dev/null > +++ b/package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch > @@ -0,0 +1,30 @@ > +From 08986b7da7e580f5deb570aaa654df38fb23397a Mon Sep 17 00:00:00 2001 > +From: Sergey Matyukevich <geomatsi@gmail.com> > +Date: Sun, 13 Feb 2022 18:26:23 +0300 > +Subject: [PATCH] mesh: enable HMAC_SHA384_KDF > + > +Mesh support CONFIG_MESH needs SAE, so it enables CONFIG_SAE. > +In its turn, CONFIG_SAE enables only HMAC_SHA256_KDF option. > +This is apparently not enough for successful build. At least > +HMAC_SHA384_KDF is required for successful build. > + You said that this patch was sent to hostapd. If that is true, please add a patchwork link for it, like: Upstream: https://patchwork.ozlabs.org/project/hostap/patch/20220130074139.2972-1-yegorslists@googlemail.com/ However, that patch looks a bit different, so you'll need to explain why. Also, you dropped Yegor as an author, that's not very nice... Regards, Arnout > +Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> > +--- > + wpa_supplicant/Makefile | 1 + > + 1 file changed, 1 insertion(+) > + > +diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile > +index cb66defac..c8e53a3c9 100644 > +--- a/wpa_supplicant/Makefile > ++++ b/wpa_supplicant/Makefile > +@@ -246,6 +246,7 @@ endif > + ifdef CONFIG_MESH > + NEED_80211_COMMON=y > + NEED_AES_SIV=y > ++NEED_HMAC_SHA384_KDF=y > + CONFIG_SAE=y > + CONFIG_AP=y > + CFLAGS += -DCONFIG_MESH > +-- > +2.35.0 > + _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/wpa_supplicant: fix mesh configuration build 2022-02-13 16:42 ` Arnout Vandecappelle @ 2022-02-13 16:56 ` Sergey Matyukevich 0 siblings, 0 replies; 7+ messages in thread From: Sergey Matyukevich @ 2022-02-13 16:56 UTC (permalink / raw) To: Arnout Vandecappelle; +Cc: Matt Weber, buildroot Hi Arnout, > > Consider the following wpa_supplicant configuration: > > > > BR2_PACKAGE_WPA_SUPPLICANT=y > > BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y > > BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y > > BR2_PACKAGE_WPA_SUPPLICANT_MESH_NETWORKING=y > > BR2_PACKAGE_WPA_SUPPLICANT_EAP=y > > > > This configuration fails to build with the following error: > > > > /path/to/output/build/wpa_supplicant-2.10/build/wpa_supplicant/src/common/sae.o: in function `hkdf_expand': > > sae.c:(.text+0x3c8): undefined reference to `hmac_sha384_kdf' > > collect2: error: ld returned 1 exit status > > make[1]: *** [Makefile:1894: wpa_supplicant] Error 1 > > > > Looking into wpa_supplicant Makefile: > > - CONFIG_MESH for some reason needs SAE, so it enables CONFIG_SAE > > - CONFIG_SAE enables only HMAC_SHA256_KDF > > > > This is apparently not enough. At least HMAC_SHA384_KDF is required > > for successful build. This commit adds a minimal patch for > > wpa_supplicant that fixes specified build configuration. > > > > Reported-by: Yegor Yefremov <yegorslists@googlemail.com> > > Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> > > --- > > .../0001-mesh-enable-HMAC_SHA384_KDF.patch | 30 +++++++++++++++++++ > > 1 file changed, 30 insertions(+) > > create mode 100644 package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch > > > > diff --git a/package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch b/package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch > > new file mode 100644 > > index 0000000000..d765c1dbbc > > --- /dev/null > > +++ b/package/wpa_supplicant/0001-mesh-enable-HMAC_SHA384_KDF.patch > > @@ -0,0 +1,30 @@ > > +From 08986b7da7e580f5deb570aaa654df38fb23397a Mon Sep 17 00:00:00 2001 > > +From: Sergey Matyukevich <geomatsi@gmail.com> > > +Date: Sun, 13 Feb 2022 18:26:23 +0300 > > +Subject: [PATCH] mesh: enable HMAC_SHA384_KDF > > + > > +Mesh support CONFIG_MESH needs SAE, so it enables CONFIG_SAE. > > +In its turn, CONFIG_SAE enables only HMAC_SHA256_KDF option. > > +This is apparently not enough for successful build. At least > > +HMAC_SHA384_KDF is required for successful build. > > + > > You said that this patch was sent to hostapd. If that is true, please add a > patchwork link for it, like: > > Upstream: https://patchwork.ozlabs.org/project/hostap/patch/20220130074139.2972-1-yegorslists@googlemail.com/ > > > However, that patch looks a bit different, so you'll need to explain why. Suggested solution seems the be slightly simpler. > Also, you dropped Yegor as an author, that's not very nice... I didn't. I sent my version of the fix. Communication on hostapd mailing list usually takes a while. As soon as upstream patch is accepted, we will replace this one with the upstream one keeping appropriate authorship. If you still have some concerns, feel free to drop my second patch. We will ask Yegor to send his version. Original discussion: https://patchwork.ozlabs.org/project/buildroot/patch/20220131194818.2084092-1-geomatsi@gmail.com/ Regards, Sergey _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-02-14 9:39 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-02-13 15:52 [Buildroot] [PATCH 0/2] hostapd/wpa_s: fixes after version update Sergey Matyukevich 2022-02-13 15:52 ` [Buildroot] [PATCH 1/2] package/hostapd: update DPP option handling Sergey Matyukevich 2022-02-13 20:38 ` Thomas Petazzoni via buildroot 2022-02-14 9:39 ` Sergey Matyukevich 2022-02-13 15:52 ` [Buildroot] [PATCH 2/2] package/wpa_supplicant: fix mesh configuration build Sergey Matyukevich 2022-02-13 16:42 ` Arnout Vandecappelle 2022-02-13 16:56 ` Sergey Matyukevich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox