From c9b97c0b4de7b63334042960a07eb91decbcb7e6 Mon Sep 17 00:00:00 2001 From: Andrea Pesaresi Date: Wed, 15 Jan 2025 01:15:20 +0100 Subject: [PATCH 01/14] ethtool: update to 6.11 Version 6.11 - October 8, 2024 * Feature: cmis: print active and inactive firmware versions * Feature: flash transceiver module firmware (--flash-module-firmware) * Feature: add T1BRR 10Mb/s mode to link mode tables * Feature: support for disabling netlink from command line * Fix: fix lanes parameter format specifier * Fix: add missing clause 33 PSE manual description * Fix: qsf: Better handling of Page A2h netlink read failure * Fix: rss: retrieve ring count using ETHTOOL_GRXRINGS ioctl (-x) * Misc: man page formatting fix * changelog here: https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/NEWS?id=c0ea4b70c71334ef038f7a3416b228a50dada406 Tested on gl.inet MT6000, retrieve ring count is now working Signed-off-by: Andrea Pesaresi Link: https://github.com/openwrt/openwrt/pull/17607 Signed-off-by: Robert Marko (cherry picked from commit 9454331b7fc896704a2c60b28767c282eb9ca0bd) --- package/network/utils/ethtool/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index cfb4cfaeb9..893fcc1eda 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool -PKG_VERSION:=6.10 +PKG_VERSION:=6.11 PKG_RELEASE:=1 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/ethtool -PKG_HASH:=cc613fe8a2bcddee17a1e6e0d763c0f3ea33c7e930658d2d7f601aa65e426a1f +PKG_HASH:=8d91f5c72ae3f25b7e88d4781279dcb320f71e30058914370b1c574c96b31202 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING From e664fe6a21a7670382bebab0c93dced8e81fb8ed Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 12 Feb 2025 04:21:22 +0000 Subject: [PATCH 02/14] ethtool: work-around ETHTOOL_GRSSH/ETHTOOL_SRSSH ABI breakage ethtool since version 6.9 introduced support for getting/setting RSS input transformation supported in Linux since version 6.8. The now changed kernel ioctl ABI, however, cannot be detected from userland, and ethtool since version 6.9 simply assumes that a previously reserved field is now used to set the input transformation. Unfortunately the default value RXH_XFRM_NO_CHANGE (0xff) used by ethtool userland creates an incompatibility with older kernels which cannot be resolved easily without introducing even more ABI breakage. Work-around the issue and fix support for --set-rxfh and --set-rxfh-indir ethtool userland tool commands by making the support for input_xfrm conditional on compile time, and keep it disabled for Linux 6.6. Fixes: 8c2dcd1518 ("ethtool: update to 6.10") Signed-off-by: Daniel Golle Tested-by: Stijn Segers (cherry picked from commit 3a7467ffde413677de5465dde78a62dfa8d6774f) --- package/network/utils/ethtool/Makefile | 5 ++ ...building-for-RSS-input-xfrm-optional.patch | 67 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 package/network/utils/ethtool/patches/0001-ethtool-make-building-for-RSS-input-xfrm-optional.patch diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index 893fcc1eda..5da65273ca 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -57,6 +57,11 @@ else CONFIGURE_ARGS += --disable-netlink --disable-pretty-dump endif +# enable support for input_xfrm with kernels newer than 6.6 +ifeq ($(CONFIG_LINUX_6_6),) +CONFIGURE_ARGS += --enable-rss-input-xfrm +endif + define Package/ethtool/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/ethtool $(1)/usr/sbin diff --git a/package/network/utils/ethtool/patches/0001-ethtool-make-building-for-RSS-input-xfrm-optional.patch b/package/network/utils/ethtool/patches/0001-ethtool-make-building-for-RSS-input-xfrm-optional.patch new file mode 100644 index 0000000000..4c8403dcbc --- /dev/null +++ b/package/network/utils/ethtool/patches/0001-ethtool-make-building-for-RSS-input-xfrm-optional.patch @@ -0,0 +1,67 @@ +From c88eb6f4e9b2d8f71f3391db2bf0ec82ecccae81 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Wed, 12 Feb 2025 04:12:42 +0000 +Subject: [PATCH] ethtool: make building for RSS input xfrm optional + +Unfortunately there is no way to detect at runtime if the kernel the +support for RSS input transformation, and the default value +RXH_XFRM_NO_CHANGE (0xff) used by newer ethtool results in breakage +with older kernels. +As a stop-gap solution simply don't compile with support for input +xfrm by default. + +Signed-off-by: Daniel Golle +--- + configure.ac | 10 ++++++++++ + ethtool.c | 10 ++++++++++ + 2 files changed, 20 insertions(+) + +--- a/configure.ac ++++ b/configure.ac +@@ -45,6 +45,16 @@ if test x$enable_pretty_dump = xyes; the + fi + AM_CONDITIONAL([ETHTOOL_ENABLE_PRETTY_DUMP], [test x$enable_pretty_dump = xyes]) + ++AC_ARG_ENABLE(rss-input-xfrm, ++ [ --enable-rss-input-xfrm build with support for RSS input transformation (disabled by default)], ++ , ++ enable_rss_input_xfrm=no) ++if test x$enable_rss_input_xfrm = xyes; then ++ AC_DEFINE(ETHTOOL_ENABLE_RSS_INPUT_XFRM, 1, ++ [Define this to enable building with support for RSS input transformation.]) ++fi ++AM_CONDITIONAL([ETHTOOL_ENABLE_RSS_INPUT_XFRM], [test x$enable_rss_input_xfrm = xyes]) ++ + AC_ARG_WITH([bash-completion-dir], + AS_HELP_STRING([--with-bash-completion-dir[=PATH]], + [Install the bash-completion script in this directory. @<:@default=yes@:>@]), +--- a/ethtool.c ++++ b/ethtool.c +@@ -4109,9 +4109,11 @@ static int do_grxfh(struct cmd_context * + (const char *)hfuncs->data + i * ETH_GSTRING_LEN, + (rss->hfunc & (1 << i)) ? "on" : "off"); + ++#ifdef ETHTOOL_ENABLE_RSS_INPUT_XFRM + printf("RSS input transformation:\n"); + printf(" symmetric-xor: %s\n", + (rss->input_xfrm & RXH_XFRM_SYM_XOR) ? "on" : "off"); ++#endif + + out: + free(hfuncs); +@@ -4431,7 +4433,15 @@ static int do_srxfh(struct cmd_context * + rss->cmd = ETHTOOL_SRSSH; + rss->rss_context = rss_context; + rss->hfunc = req_hfunc; ++#ifdef ETHTOOL_ENABLE_RSS_INPUT_XFRM + rss->input_xfrm = req_input_xfrm; ++#else ++ if (req_input_xfrm != 0xff) { ++ perror("Compiled for kernel without support for input transformation"); ++ err = 1; ++ goto free; ++ } ++#endif + if (delete) { + rss->indir_size = rss->key_size = 0; + } else { From f3a210b7425497155b22e197a4bcdaa034f142fa Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 28 Feb 2025 16:27:36 +0100 Subject: [PATCH 03/14] unetd: update to Git HEAD (2025-02-28) 75a236be122a service: add missing null pointer check f5341f327539 ubus: add api for generating and validating security tokens 3fab99eab4d5 add udebug support 28d86bd30e97 pex: only respond to update requests when we have network data 8e6f37cc361e pex-msg: ignore no-data responses if version is zero 12e6cf7f63e1 pex: create pex host from update responses edc8fdae463a ubus: show the local addresses in network status Signed-off-by: Felix Fietkau (cherry picked from commit ce68f61cb67a4701a108f838f510e72ca63ed78e) --- package/network/services/unetd/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/services/unetd/Makefile b/package/network/services/unetd/Makefile index 6923c68873..29b192e4f1 100644 --- a/package/network/services/unetd/Makefile +++ b/package/network/services/unetd/Makefile @@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=unetd PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/unetd.git -PKG_SOURCE_DATE:=2025-01-29 -PKG_SOURCE_VERSION:=082b5482b97f20dc4745bc3d645e33b584cc28e4 -PKG_MIRROR_HASH:=090e7dab3b9a3358706dcee4f1889b7a1f0bdf535f2d6a0580f4160e23ccf9cb +PKG_SOURCE_DATE:=2025-02-28 +PKG_SOURCE_VERSION:=edc8fdae463ad7ce9bfb876af0c653ab1da197df +PKG_MIRROR_HASH:=2f0ce439b9e4815b3f20b9aaf4378e3aac114f429bb8bfd06739df118b3da9c8 PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Felix Fietkau @@ -32,7 +32,7 @@ define Package/unetd SECTION:=net CATEGORY:=Network TITLE:=WireGuard based VPN connection manager for OpenWrt - DEPENDS:=+libubox +libubus +libblobmsg-json +libnl-tiny +kmod-wireguard +UNETD_VXLAN_SUPPORT:libbpf + DEPENDS:=+libubox +libubus +libudebug +libblobmsg-json +libnl-tiny +kmod-wireguard +UNETD_VXLAN_SUPPORT:libbpf endef define Package/unetd/config From efffa8a6084ea534751fe28c90a83a0b486f7176 Mon Sep 17 00:00:00 2001 From: Cedric CHEDALEUX Date: Mon, 17 Feb 2025 10:41:32 +0100 Subject: [PATCH 04/14] scripts/feeds: shallow clone for specific commit update When a feed is referenced with a specific commit (i.e. ^), a full clone was performed and a branch was created from the sha1 and named with the sha1. Other git clones operations are shallowed. As Git does not support clone at a specific commit, let's first perform a shallow clone to latest commit, then fetch the relevant commit and finally checkout it (no more 'pseudo' branch). It saves bandwith and significantly speeds up the feed update process. Signed-off-by: Cedric CHEDALEUX Link: https://github.com/openwrt/openwrt/pull/18003 Signed-off-by: Robert Marko (cherry picked from commit 32d0a57dc10811a24816e51f10e55963f40fe462) --- scripts/feeds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/feeds b/scripts/feeds index d07c28bc50..0ff6765814 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -157,7 +157,7 @@ my %update_method = ( 'src-git' => { 'init' => "git clone --depth 1 '%s' '%s'", 'init_branch' => "git clone --depth 1 --branch '%s' '%s' '%s'", - 'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -", + 'init_commit' => "git clone --depth 1 '%s' '%s' && cd '%s' && git fetch --depth=1 origin '%s' && git -c advice.detachedHead=false checkout '%s' && cd -", 'update' => "git pull --ff-only", 'update_rebase' => "git pull --rebase=merges", 'update_stash' => "git pull --rebase=merges --autostash", From 9836836302afa6a7687e6b19c7780be8d16e8911 Mon Sep 17 00:00:00 2001 From: Cedric CHEDALEUX Date: Mon, 17 Feb 2025 10:44:36 +0100 Subject: [PATCH 05/14] scripts/feeds: shallow clone submodules When a feed has submodules, all its submodules are fully cloned whereas the feed itself is shallowed. Let's be consistent and perform shallow clones as well for the submodules. Signed-off-by: Cedric CHEDALEUX Link: https://github.com/openwrt/openwrt/pull/18003 Signed-off-by: Robert Marko (cherry picked from commit 9ec32cfb2733856a2ab4caee07d9b3297568381d) --- scripts/feeds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/feeds b/scripts/feeds index 0ff6765814..959995c7af 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -162,7 +162,7 @@ my %update_method = ( 'update_rebase' => "git pull --rebase=merges", 'update_stash' => "git pull --rebase=merges --autostash", 'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)", - 'post_update' => "git submodule update --init --recursive", + 'post_update' => "git submodule update --init --recursive --depth 1", 'controldir' => ".git", 'revision' => "git rev-parse HEAD | tr -d '\n'"}, 'src-git-full' => { From b7ab34d46ca354ed002c192c84aef5fa8fb53ed7 Mon Sep 17 00:00:00 2001 From: Matthew Cather Date: Mon, 3 Mar 2025 13:22:11 -0600 Subject: [PATCH 06/14] hostapd: fix ucode memory leak with strings This fixes a common reference counting bug typically along the lines of: ``` uc_value_push(ucv_get(ucv_string_new(...))); ``` This would leave our new string with a reference count of 2, one from the construction of the string, the other from `ucv_get`. This would prevent the strings from being correctly cleaned up when it goes out of scope. Signed-off-by: Matthew Cather (cherry picked from commit f79968ee0f76c41414fb0c08980b9c2a259964d3) --- .../services/hostapd/src/src/ap/ucode.c | 22 +++++++++---------- .../services/hostapd/src/src/utils/ucode.c | 2 +- .../hostapd/src/wpa_supplicant/ucode.c | 17 +++++++------- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index 2da2b4dc93..a7cbea0518 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -56,7 +56,7 @@ hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, u struct hostapd_data *hapd = iface->bss[i]; uc_value_t *val = hostapd_ucode_bss_get_uval(hapd); - ucv_array_set(list, i, ucv_get(ucv_string_new(hapd->conf->iface))); + ucv_array_set(list, i, ucv_string_new(hapd->conf->iface)); ucv_object_add(bss, hapd->conf->iface, ucv_get(val)); } ucv_object_add(if_bss, iface->phy, ucv_get(list)); @@ -721,11 +721,10 @@ int hostapd_ucode_sta_auth(struct hostapd_data *hapd, struct sta_info *sta) if (wpa_ucode_call_prepare("sta_auth")) return 0; - uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface))); + uc_value_push(ucv_string_new(hapd->conf->iface)); snprintf(addr, sizeof(addr), MACSTR, MAC2STR(sta->addr)); - val = ucv_string_new(addr); - uc_value_push(ucv_get(val)); + uc_value_push(ucv_string_new(addr)); val = wpa_ucode_call(2); @@ -787,16 +786,15 @@ void hostapd_ucode_sta_connected(struct hostapd_data *hapd, struct sta_info *sta if (wpa_ucode_call_prepare("sta_connected")) return; - uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface))); + uc_value_push(ucv_string_new(hapd->conf->iface)); snprintf(addr, sizeof(addr), MACSTR, MAC2STR(sta->addr)); - val = ucv_string_new(addr); - uc_value_push(ucv_get(val)); + uc_value_push(ucv_string_new(addr)); val = ucv_object_new(vm); if (sta->psk_idx) ucv_object_add(val, "psk_idx", ucv_int64_new(sta->psk_idx - 1)); - uc_value_push(ucv_get(val)); + uc_value_push(val); val = wpa_ucode_call(3); if (ucv_type(val) != UC_OBJECT) @@ -889,8 +887,8 @@ void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type) return; val = hostapd_ucode_bss_get_uval(hapd); - uc_value_push(ucv_get(ucv_string_new(hapd->iface->phy))); - uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface))); + uc_value_push(ucv_string_new(hapd->iface->phy)); + uc_value_push(ucv_string_new(hapd->conf->iface)); uc_value_push(ucv_get(val)); ucv_put(wpa_ucode_call(3)); ucv_gc(vm); @@ -923,9 +921,9 @@ void hostapd_ucode_apup_newpeer(struct hostapd_data *hapd, const char *ifname) return; val = hostapd_ucode_bss_get_uval(hapd); - uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface))); // BSS ifname + uc_value_push(ucv_string_new(hapd->conf->iface)); // BSS ifname uc_value_push(ucv_get(val)); - uc_value_push(ucv_get(ucv_string_new(ifname))); // APuP peer ifname + uc_value_push(ucv_string_new(ifname)); // APuP peer ifname ucv_put(wpa_ucode_call(2)); ucv_gc(vm); } diff --git a/package/network/services/hostapd/src/src/utils/ucode.c b/package/network/services/hostapd/src/src/utils/ucode.c index 29c753c326..af8614b8cb 100644 --- a/package/network/services/hostapd/src/src/utils/ucode.c +++ b/package/network/services/hostapd/src/src/utils/ucode.c @@ -171,7 +171,7 @@ uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs) ucv_object_add(ret, "op_class", ucv_int64_new(op_class)); ucv_object_add(ret, "channel", ucv_int64_new(channel)); ucv_object_add(ret, "hw_mode", ucv_int64_new(hw_mode)); - ucv_object_add(ret, "hw_mode_str", ucv_get(ucv_string_new(modestr))); + ucv_object_add(ret, "hw_mode_str", ucv_string_new(modestr)); ucv_object_add(ret, "sec_channel", ucv_int64_new(sec_channel)); ucv_object_add(ret, "frequency", ucv_int64_new(freq_val)); diff --git a/package/network/services/hostapd/src/wpa_supplicant/ucode.c b/package/network/services/hostapd/src/wpa_supplicant/ucode.c index 9380b301c3..31427c39a1 100644 --- a/package/network/services/hostapd/src/wpa_supplicant/ucode.c +++ b/package/network/services/hostapd/src/wpa_supplicant/ucode.c @@ -49,7 +49,7 @@ void wpas_ucode_add_bss(struct wpa_supplicant *wpa_s) if (wpa_ucode_call_prepare("iface_add")) return; - uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname))); + uc_value_push(ucv_string_new(wpa_s->ifname)); uc_value_push(ucv_get(wpas_ucode_iface_get_uval(wpa_s))); ucv_put(wpa_ucode_call(2)); ucv_gc(vm); @@ -67,7 +67,7 @@ void wpas_ucode_free_bss(struct wpa_supplicant *wpa_s) if (wpa_ucode_call_prepare("iface_remove")) return; - uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname))); + uc_value_push(ucv_string_new(wpa_s->ifname)); uc_value_push(ucv_get(val)); ucv_put(wpa_ucode_call(2)); ucv_gc(vm); @@ -86,9 +86,9 @@ void wpas_ucode_update_state(struct wpa_supplicant *wpa_s) return; state = wpa_supplicant_state_txt(wpa_s->wpa_state); - uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname))); + uc_value_push(ucv_string_new(wpa_s->ifname)); uc_value_push(ucv_get(val)); - uc_value_push(ucv_get(ucv_string_new(state))); + uc_value_push(ucv_string_new(state)); ucv_put(wpa_ucode_call(3)); ucv_gc(vm); } @@ -108,9 +108,9 @@ void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_d if (wpa_ucode_call_prepare("event")) return; - uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname))); + uc_value_push(ucv_string_new(wpa_s->ifname)); uc_value_push(ucv_get(val)); - uc_value_push(ucv_get(ucv_string_new(event_to_string(event)))); + uc_value_push(ucv_string_new(event_to_string(event))); val = ucv_object_new(vm); uc_value_push(ucv_get(val)); @@ -212,15 +212,14 @@ uc_wpas_iface_status(uc_vm_t *vm, size_t nargs) { struct wpa_supplicant *wpa_s = uc_fn_thisval("wpas.iface"); struct wpa_bss *bss; - uc_value_t *ret, *val; + uc_value_t *ret; if (!wpa_s) return NULL; ret = ucv_object_new(vm); - val = ucv_string_new(wpa_supplicant_state_txt(wpa_s->wpa_state)); - ucv_object_add(ret, "state", ucv_get(val)); + ucv_object_add(ret, "state", ucv_string_new(wpa_supplicant_state_txt(wpa_s->wpa_state))); bss = wpa_s->current_bss; if (bss) { From af658023191d6fad252e1a08c9b8b1a23761d7a4 Mon Sep 17 00:00:00 2001 From: Matthew Cather Date: Mon, 3 Mar 2025 13:40:39 -0600 Subject: [PATCH 07/14] hostapd: clean-up references to local variables Remove extra ucv_get calls when passing a referenced value to an object without using it further. Signed-off-by: Matthew Cather Signed-off-by: Felix Fietkau (cherry picked from commit 22eaf1864731dd29918357b26565dbd9420fd314) --- package/network/services/hostapd/src/src/ap/ucode.c | 9 +++++---- package/network/services/hostapd/src/src/utils/ucode.c | 2 +- .../network/services/hostapd/src/wpa_supplicant/ucode.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index a7cbea0518..e1c8289c51 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -59,7 +59,7 @@ hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, u ucv_array_set(list, i, ucv_string_new(hapd->conf->iface)); ucv_object_add(bss, hapd->conf->iface, ucv_get(val)); } - ucv_object_add(if_bss, iface->phy, ucv_get(list)); + ucv_object_add(if_bss, iface->phy, list); } static void @@ -77,9 +77,10 @@ hostapd_ucode_update_interfaces(void) hostapd_ucode_update_bss_list(iface, if_bss, bss); } - ucv_object_add(ucv_prototype_get(global), "interfaces", ucv_get(ifs)); - ucv_object_add(ucv_prototype_get(global), "interface_bss", ucv_get(if_bss)); - ucv_object_add(ucv_prototype_get(global), "bss", ucv_get(bss)); + ucv_object_add(ucv_prototype_get(global), "interfaces", ifs); + ucv_object_add(ucv_prototype_get(global), "interface_bss", if_bss); + ucv_object_add(ucv_prototype_get(global), "bss", bss); + ucv_gc(vm); } diff --git a/package/network/services/hostapd/src/src/utils/ucode.c b/package/network/services/hostapd/src/src/utils/ucode.c index af8614b8cb..e61cb18db0 100644 --- a/package/network/services/hostapd/src/src/utils/ucode.c +++ b/package/network/services/hostapd/src/src/utils/ucode.c @@ -425,7 +425,7 @@ uc_value_t *wpa_ucode_global_init(const char *name, uc_resource_type_t *global_t uc_vm_registry_set(&vm, "hostap.global", global); proto = ucv_prototype_get(global); - ucv_object_add(proto, "data", ucv_get(ucv_object_new(&vm))); + ucv_object_add(proto, "data", ucv_object_new(&vm)); #define ADD_CONST(x) ucv_object_add(proto, #x, ucv_int64_new(x)) ADD_CONST(MSG_EXCESSIVE); diff --git a/package/network/services/hostapd/src/wpa_supplicant/ucode.c b/package/network/services/hostapd/src/wpa_supplicant/ucode.c index 31427c39a1..bef7552873 100644 --- a/package/network/services/hostapd/src/wpa_supplicant/ucode.c +++ b/package/network/services/hostapd/src/wpa_supplicant/ucode.c @@ -38,7 +38,7 @@ wpas_ucode_update_interfaces(void) for (wpa_s = wpa_global->ifaces; wpa_s; wpa_s = wpa_s->next) ucv_object_add(ifs, wpa_s->ifname, ucv_get(wpas_ucode_iface_get_uval(wpa_s))); - ucv_object_add(ucv_prototype_get(global), "interfaces", ucv_get(ifs)); + ucv_object_add(ucv_prototype_get(global), "interfaces", ifs); ucv_gc(vm); } From 1af7bf38f7e78becefc0b5af503bde735c58f767 Mon Sep 17 00:00:00 2001 From: Matthew Cather Date: Mon, 3 Mar 2025 14:00:35 -0600 Subject: [PATCH 08/14] hostapd: consistent reference counting for registry Since `wpa_ucode_registry_add` collects its own reference to the values added, the two functions `hostapd_ucode_bss_get_uval` and `hostapd_ucode_iface_get_uval` would sometimes return a referenced object (from `uc_resource_new`) and sometimes return an unreferenced object (from `wpa_ucode_registry_get`). Now, both functions always return a referenced object. This change also indirectly fixes `hostapd_ucode_bss_get_uval`, ensuring it now always returns a referenced object. Signed-off-by: Matthew Cather Signed-off-by: Felix Fietkau (cherry picked from commit 7729f960933a03c9eebd2b65a695ea57718ccb77) --- package/network/services/hostapd/src/src/ap/ucode.c | 11 ++++++----- .../services/hostapd/src/wpa_supplicant/ucode.c | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index e1c8289c51..0e9a4fef11 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -23,7 +23,7 @@ hostapd_ucode_bss_get_uval(struct hostapd_data *hapd) uc_value_t *val; if (hapd->ucode.idx) - return wpa_ucode_registry_get(bss_registry, hapd->ucode.idx); + return ucv_get(wpa_ucode_registry_get(bss_registry, hapd->ucode.idx)); val = uc_resource_new(bss_type, hapd); hapd->ucode.idx = wpa_ucode_registry_add(bss_registry, val); @@ -37,7 +37,7 @@ hostapd_ucode_iface_get_uval(struct hostapd_iface *hapd) uc_value_t *val; if (hapd->ucode.idx) - return wpa_ucode_registry_get(iface_registry, hapd->ucode.idx); + return ucv_get(wpa_ucode_registry_get(iface_registry, hapd->ucode.idx)); val = uc_resource_new(iface_type, hapd); hapd->ucode.idx = wpa_ucode_registry_add(iface_registry, val); @@ -54,10 +54,9 @@ hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, u list = ucv_array_new(vm); for (i = 0; iface->bss && i < iface->num_bss; i++) { struct hostapd_data *hapd = iface->bss[i]; - uc_value_t *val = hostapd_ucode_bss_get_uval(hapd); ucv_array_set(list, i, ucv_string_new(hapd->conf->iface)); - ucv_object_add(bss, hapd->conf->iface, ucv_get(val)); + ucv_object_add(bss, hapd->conf->iface, hostapd_ucode_bss_get_uval(hapd)); } ucv_object_add(if_bss, iface->phy, list); } @@ -73,7 +72,7 @@ hostapd_ucode_update_interfaces(void) for (i = 0; i < interfaces->count; i++) { struct hostapd_iface *iface = interfaces->iface[i]; - ucv_object_add(ifs, iface->phy, ucv_get(hostapd_ucode_iface_get_uval(iface))); + ucv_object_add(ifs, iface->phy, hostapd_ucode_iface_get_uval(iface)); hostapd_ucode_update_bss_list(iface, if_bss, bss); } @@ -892,6 +891,7 @@ void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type) uc_value_push(ucv_string_new(hapd->conf->iface)); uc_value_push(ucv_get(val)); ucv_put(wpa_ucode_call(3)); + ucv_put(val); ucv_gc(vm); } @@ -926,6 +926,7 @@ void hostapd_ucode_apup_newpeer(struct hostapd_data *hapd, const char *ifname) uc_value_push(ucv_get(val)); uc_value_push(ucv_string_new(ifname)); // APuP peer ifname ucv_put(wpa_ucode_call(2)); + ucv_put(val); ucv_gc(vm); } #endif // def CONFIG_APUP diff --git a/package/network/services/hostapd/src/wpa_supplicant/ucode.c b/package/network/services/hostapd/src/wpa_supplicant/ucode.c index bef7552873..506bde45c9 100644 --- a/package/network/services/hostapd/src/wpa_supplicant/ucode.c +++ b/package/network/services/hostapd/src/wpa_supplicant/ucode.c @@ -20,7 +20,7 @@ wpas_ucode_iface_get_uval(struct wpa_supplicant *wpa_s) uc_value_t *val; if (wpa_s->ucode.idx) - return wpa_ucode_registry_get(iface_registry, wpa_s->ucode.idx); + return ucv_get(wpa_ucode_registry_get(iface_registry, wpa_s->ucode.idx)); val = uc_resource_new(iface_type, wpa_s); wpa_s->ucode.idx = wpa_ucode_registry_add(iface_registry, val); @@ -36,7 +36,7 @@ wpas_ucode_update_interfaces(void) int i; for (wpa_s = wpa_global->ifaces; wpa_s; wpa_s = wpa_s->next) - ucv_object_add(ifs, wpa_s->ifname, ucv_get(wpas_ucode_iface_get_uval(wpa_s))); + ucv_object_add(ifs, wpa_s->ifname, wpas_ucode_iface_get_uval(wpa_s)); ucv_object_add(ucv_prototype_get(global), "interfaces", ifs); ucv_gc(vm); @@ -50,7 +50,7 @@ void wpas_ucode_add_bss(struct wpa_supplicant *wpa_s) return; uc_value_push(ucv_string_new(wpa_s->ifname)); - uc_value_push(ucv_get(wpas_ucode_iface_get_uval(wpa_s))); + uc_value_push(wpas_ucode_iface_get_uval(wpa_s)); ucv_put(wpa_ucode_call(2)); ucv_gc(vm); } From 634ac2bab7c4bd70f8497b4847d30f12b520ec3f Mon Sep 17 00:00:00 2001 From: Matthew Cather Date: Mon, 3 Mar 2025 15:46:03 -0600 Subject: [PATCH 09/14] hostapd: get reference to object before removal `ucv_array_set` releases the array's reference to the object being cleared. If this is the last reference to the object, it will be freed, making our pointer `val` invalid. To avoid this, we need to obtain our own reference to the object so we can safely return `val`. Signed-off-by: Matthew Cather (cherry picked from commit 6a10da2934441a59283394a84917edf4983e3043) --- package/network/services/hostapd/src/src/ap/ucode.c | 4 +++- package/network/services/hostapd/src/src/utils/ucode.c | 1 + package/network/services/hostapd/src/wpa_supplicant/ucode.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index 0e9a4fef11..26ecc6ad30 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -876,7 +876,7 @@ void hostapd_ucode_free(void) void hostapd_ucode_free_iface(struct hostapd_iface *iface) { - wpa_ucode_registry_remove(iface_registry, iface->ucode.idx); + ucv_put(wpa_ucode_registry_remove(iface_registry, iface->ucode.idx)); } void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type) @@ -910,6 +910,8 @@ void hostapd_ucode_free_bss(struct hostapd_data *hapd) uc_value_push(ucv_string_new(hapd->conf->iface)); uc_value_push(ucv_get(val)); ucv_put(wpa_ucode_call(2)); + + ucv_put(val); ucv_gc(vm); } diff --git a/package/network/services/hostapd/src/src/utils/ucode.c b/package/network/services/hostapd/src/src/utils/ucode.c index e61cb18db0..7636e46aaf 100644 --- a/package/network/services/hostapd/src/src/utils/ucode.c +++ b/package/network/services/hostapd/src/src/utils/ucode.c @@ -470,6 +470,7 @@ uc_value_t *wpa_ucode_registry_remove(uc_value_t *reg, int idx) if (!val) return NULL; + ucv_get(val); ucv_array_set(reg, idx - 1, NULL); dataptr = ucv_resource_dataptr(val, NULL); if (dataptr) diff --git a/package/network/services/hostapd/src/wpa_supplicant/ucode.c b/package/network/services/hostapd/src/wpa_supplicant/ucode.c index 506bde45c9..8335a27e89 100644 --- a/package/network/services/hostapd/src/wpa_supplicant/ucode.c +++ b/package/network/services/hostapd/src/wpa_supplicant/ucode.c @@ -70,6 +70,7 @@ void wpas_ucode_free_bss(struct wpa_supplicant *wpa_s) uc_value_push(ucv_string_new(wpa_s->ifname)); uc_value_push(ucv_get(val)); ucv_put(wpa_ucode_call(2)); + ucv_put(val); ucv_gc(vm); } From f0dbdf6b7fdf2c3ced067b62e678dccdb32cbab7 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 5 Mar 2025 08:00:43 +0100 Subject: [PATCH 10/14] hostapd: add missing ctrl socket initialization on bss add Fixes adding/removing individual bss interfaces Signed-off-by: Felix Fietkau (cherry picked from commit d65d546bce36ec71e3cda4e631f24cc711f7bcb2) --- package/network/services/hostapd/src/src/ap/ucode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index 26ecc6ad30..aa273c12cf 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -362,6 +362,8 @@ uc_hostapd_iface_add_bss(uc_vm_t *vm, size_t nargs) hapd->driver = iface->bss[0]->driver; hapd->drv_priv = iface->bss[0]->drv_priv; + os_strlcpy(hapd->ctrl_sock_iface, hapd->conf->iface, + sizeof(hapd->ctrl_sock_iface)); if (interfaces->ctrl_iface_init && interfaces->ctrl_iface_init(hapd) < 0) goto free_hapd; From 56559278b78900f6cae5fda6b8d1bb9cda41e8bf Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 5 Mar 2025 09:19:12 +0100 Subject: [PATCH 11/14] hostapd: add missing #ifdef to fix compile error when 802.11be support is disabled Fixes: d65d546bce36 ("hostapd: add missing ctrl socket initialization on bss add") Signed-off-by: Felix Fietkau (cherry picked from commit 46c17c22cd9cdccbdb0f1eeddb3f087ff8d9486f) --- package/network/services/hostapd/src/src/ap/ucode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index aa273c12cf..b13c0ff77c 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -362,8 +362,10 @@ uc_hostapd_iface_add_bss(uc_vm_t *vm, size_t nargs) hapd->driver = iface->bss[0]->driver; hapd->drv_priv = iface->bss[0]->drv_priv; +#ifdef CONFIG_IEEE80211BE os_strlcpy(hapd->ctrl_sock_iface, hapd->conf->iface, sizeof(hapd->ctrl_sock_iface)); +#endif if (interfaces->ctrl_iface_init && interfaces->ctrl_iface_init(hapd) < 0) goto free_hapd; From 315943c61649d0fdf76c1ca7410281fccf66f45b Mon Sep 17 00:00:00 2001 From: Ahmed Naseef Date: Tue, 28 Jan 2025 11:28:31 +0400 Subject: [PATCH 12/14] kernel: usbnet: Restore usb%d naming for cdc-ethernet devices with local MAC Prior to commit https://github.com/torvalds/linux/commit/8a7d12d674ac6f2147c18f36d1e15f1a48060edf, cdc-ethernet USB LTE modems (e.g. Quectel EC200A) were consistently named usb0. After 8a7d12d67, devices began renaming to eth1 due to an assumption that local MAC addresses originate exclusively from the kernel. Some devices provide driver-assigned local MACs, causing point-to-point interfaces with driver-set MACs to adopt eth%d names instead of usb%d. Restore the naming exception for point-to-point devices: interfaces without driver MACs or with driver-provided local MACs will retain the usb%d convention. This addresses issues reported in [1] and fixed in [2]. [1] https://lore.kernel.org/all/Z00udyMgW6XnAw6h@atmark-techno.com/ [2] https://lore.kernel.org/all/20241203130457.904325-1-asmadeus@codewreck.org/ Tested-by: Ahmed Naseef Signed-off-by: Ahmed Naseef Link: https://github.com/openwrt/openwrt/pull/17757 Signed-off-by: Robert Marko (cherry picked from commit ecd609f509f29ed1f75db5c7a623f359c64efb72) --- ...me-exception-for-local-mac-addresses.patch | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 target/linux/generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch diff --git a/target/linux/generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch b/target/linux/generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch new file mode 100644 index 0000000000..0d32800cbc --- /dev/null +++ b/target/linux/generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch @@ -0,0 +1,63 @@ +From linux-netdev Tue Dec 03 13:04:55 2024 +From: Dominique Martinet +Date: Tue, 03 Dec 2024 13:04:55 +0000 +To: linux-netdev +Subject: [PATCH] net: usb: usbnet: restore usb%d name exception for local mac addresses +Message-Id: <20241203130457.904325-1-asmadeus () codewreck ! org> +X-MARC-Message: https://marc.info/?l=linux-netdev&m=173323431631309 + +From: Dominique Martinet + +The previous commit assumed that local addresses always came from the +kernel, but some devices hand out local mac addresses so we ended up +with point-to-point devices with a mac set by the driver, renaming to +eth%d when they used to be named usb%d. + +Userspace should not rely on device name, but for the sake of stability +restore the local mac address check portion of the naming exception: +point to point devices which either have no mac set by the driver or +have a local mac handed out by the driver will keep the usb%d name. + +Fixes: 8a7d12d674ac ("net: usb: usbnet: fix name regression") +Signed-off-by: Dominique Martinet +--- + drivers/net/usb/usbnet.c | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +--- a/drivers/net/usb/usbnet.c ++++ b/drivers/net/usb/usbnet.c +@@ -178,6 +178,17 @@ int usbnet_get_ethernet_addr(struct usbn + } + EXPORT_SYMBOL_GPL(usbnet_get_ethernet_addr); + ++static bool usbnet_needs_usb_name_format(struct usbnet *dev, struct net_device *net) ++{ ++ /* Point to point devices which don't have a real MAC address ++ * (or report a fake local one) have historically used the usb%d ++ * naming. Preserve this.. ++ */ ++ return (dev->driver_info->flags & FLAG_POINTTOPOINT) != 0 && ++ (is_zero_ether_addr(net->dev_addr) || ++ is_local_ether_addr(net->dev_addr)); ++} ++ + static void intr_complete (struct urb *urb) + { + struct usbnet *dev = urb->context; +@@ -1766,13 +1777,10 @@ usbnet_probe (struct usb_interface *udev + if (status < 0) + goto out1; + +- // heuristic: "usb%d" for links we know are two-host, +- // else "eth%d" when there's reasonable doubt. userspace +- // can rename the link if it knows better. ++ /* heuristic: rename to "eth%d" if we are not sure this link ++ * is two-host (these links keep "usb%d") */ + if ((dev->driver_info->flags & FLAG_ETHER) != 0 && +- ((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 || +- /* somebody touched it*/ +- !is_zero_ether_addr(net->dev_addr))) ++ !usbnet_needs_usb_name_format(dev, net)) + strscpy(net->name, "eth%d", sizeof(net->name)); + /* WLAN devices should always be named "wlan%d" */ + if ((dev->driver_info->flags & FLAG_WLAN) != 0) From c70d0a630404b4d243f21a4dfe17c039dd667a0b Mon Sep 17 00:00:00 2001 From: Martin Schiller Date: Thu, 6 Mar 2025 09:38:12 +0100 Subject: [PATCH 13/14] mediatek: Refresh kernel configuration I selected one subtarget after the other and refreshed their configuration using this command: make kernel_oldconfig CONFIG_TARGET=subtarget For MT7629 I had to re-add CONFIG_LEDS_SMARTRG_LED manually. Otherwise, building MT7629 with ALL_KMODS we get prompted for LEDS_SMARTRG_LED and this will break CI and in future buildbot compilation. See commit 6bdea8c7bd85 ("mediatek: mt7629: 6.6: disable LEDS_SMARTRG_LED by default") for more details. Signed-off-by: Martin Schiller Link: https://github.com/openwrt/openwrt/pull/18182 Signed-off-by: Hauke Mehrtens (cherry picked from commit 5013efc4f907550fadbf15e2fb1bdb2ead3325db) --- target/linux/mediatek/filogic/config-6.6 | 14 +++++++------- target/linux/mediatek/mt7622/config-6.6 | 16 +++++++--------- target/linux/mediatek/mt7623/config-6.6 | 23 ++++------------------- target/linux/mediatek/mt7629/config-6.6 | 11 ++++------- 4 files changed, 22 insertions(+), 42 deletions(-) diff --git a/target/linux/mediatek/filogic/config-6.6 b/target/linux/mediatek/filogic/config-6.6 index a450de2e79..915c506669 100644 --- a/target/linux/mediatek/filogic/config-6.6 +++ b/target/linux/mediatek/filogic/config-6.6 @@ -1,7 +1,7 @@ CONFIG_64BIT=y # CONFIG_AHCI_MTK is not set -CONFIG_AIR_AN8855_PHY=y CONFIG_AIROHA_EN8801SC_PHY=y +CONFIG_AIR_AN8855_PHY=y CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y @@ -33,7 +33,6 @@ CONFIG_ARM64_VA_BITS_39=y CONFIG_ARM_AMBA=y CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -# CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set CONFIG_ARM_GIC=y CONFIG_ARM_GIC_V2M=y CONFIG_ARM_GIC_V3=y @@ -43,7 +42,6 @@ CONFIG_ARM_MEDIATEK_CPUFREQ=y CONFIG_ARM_PMU=y CONFIG_ARM_PMUV3=y CONFIG_ARM_PSCI_FW=y -# CONFIG_ARM_SMMU_V3_PMU is not set CONFIG_ATA=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y CONFIG_BLK_DEV_LOOP=y @@ -97,6 +95,7 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_RMAP=y CONFIG_CPU_THERMAL=y CONFIG_CRC16=y @@ -167,7 +166,6 @@ CONFIG_FUNCTION_ALIGNMENT_4B=y CONFIG_FWNODE_MDIO=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y -CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y @@ -234,17 +232,18 @@ CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y CONFIG_MAGIC_SYSRQ=y CONFIG_MAXLINEAR_GPHY=y +CONFIG_MDIO_AN8855=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVRES=y -CONFIG_MDIO_AN8855=y CONFIG_MEDIATEK_2P5GE_PHY=y CONFIG_MEDIATEK_GE_PHY=y CONFIG_MEDIATEK_GE_SOC_PHY=y CONFIG_MEDIATEK_WATCHDOG=y CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 -CONFIG_MFD_SYSCON=y CONFIG_MFD_AIROHA_AN8855=y +CONFIG_MFD_CORE=y +CONFIG_MFD_SYSCON=y CONFIG_MIGRATION=y # CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set CONFIG_MMC=y @@ -280,6 +279,7 @@ CONFIG_MTK_HSDMA=y CONFIG_MTK_INFRACFG=y CONFIG_MTK_LVTS_THERMAL=y CONFIG_MTK_LVTS_THERMAL_DEBUGFS=y +CONFIG_MTK_NET_PHYLIB=y CONFIG_MTK_PMIC_WRAP=y CONFIG_MTK_REGULATOR_COUPLER=y CONFIG_MTK_SCPSYS=y @@ -335,7 +335,6 @@ CONFIG_PAGE_POOL=y CONFIG_PAGE_POOL_STATS=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_PAGE_SIZE_LESS_THAN_64KB=y -CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y CONFIG_PARTITION_PERCPU=y CONFIG_PCI=y CONFIG_PCIEAER=y @@ -413,6 +412,7 @@ CONFIG_RAS=y CONFIG_RATIONAL=y # CONFIG_RAVE_SP_CORE is not set CONFIG_REALTEK_PHY=y +CONFIG_REALTEK_PHY_HWMON=y CONFIG_REED_SOLOMON=y CONFIG_REED_SOLOMON_DEC8=y CONFIG_REED_SOLOMON_ENC8=y diff --git a/target/linux/mediatek/mt7622/config-6.6 b/target/linux/mediatek/mt7622/config-6.6 index c3c8b60684..bdfb06af76 100644 --- a/target/linux/mediatek/mt7622/config-6.6 +++ b/target/linux/mediatek/mt7622/config-6.6 @@ -1,7 +1,7 @@ CONFIG_64BIT=y # CONFIG_AHCI_MTK is not set -# CONFIG_AIR_AN8855_PHY is not set # CONFIG_AIROHA_EN8801SC_PHY is not set +# CONFIG_AIR_AN8855_PHY is not set CONFIG_AQUANTIA_PHY=y CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y @@ -34,7 +34,6 @@ CONFIG_ARM64_VA_BITS_39=y CONFIG_ARM_AMBA=y CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -# CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set CONFIG_ARM_GIC=y CONFIG_ARM_GIC_V2M=y CONFIG_ARM_GIC_V3=y @@ -44,13 +43,13 @@ CONFIG_ARM_MEDIATEK_CPUFREQ=y CONFIG_ARM_PMU=y CONFIG_ARM_PMUV3=y CONFIG_ARM_PSCI_FW=y -# CONFIG_ARM_SMMU_V3_PMU is not set CONFIG_ATA=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_MQ_PCI=y CONFIG_BLK_PM=y +CONFIG_BLOCK_NOTIFIERS=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_BUFFER_HEAD=y @@ -105,6 +104,7 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_RMAP=y CONFIG_CPU_THERMAL=y CONFIG_CRC16=y @@ -173,7 +173,6 @@ CONFIG_FUNCTION_ALIGNMENT_4B=y CONFIG_FWNODE_MDIO=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y -CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y @@ -241,14 +240,13 @@ CONFIG_MAXLINEAR_GPHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVRES=y -# CONFIG_MDIO_AN8855 is not set # CONFIG_MEDIATEK_2P5GE_PHY is not set CONFIG_MEDIATEK_GE_PHY=y # CONFIG_MEDIATEK_GE_SOC_PHY is not set CONFIG_MEDIATEK_WATCHDOG=y CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 -CONFIG_MFD_SYSCON=y # CONFIG_MFD_AIROHA_AN8855 is not set +CONFIG_MFD_SYSCON=y CONFIG_MIGRATION=y # CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set CONFIG_MMC=y @@ -283,6 +281,7 @@ CONFIG_MTK_CPUX_TIMER=y CONFIG_MTK_HSDMA=y CONFIG_MTK_INFRACFG=y # CONFIG_MTK_LVTS_THERMAL is not set +CONFIG_MTK_NET_PHYLIB=y CONFIG_MTK_PMIC_WRAP=y CONFIG_MTK_REGULATOR_COUPLER=y CONFIG_MTK_SCPSYS=y @@ -297,7 +296,6 @@ CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y -# CONFIG_NET_DSA_AN8855 is not set CONFIG_NET_DSA_MT7530=y CONFIG_NET_DSA_MT7530_MDIO=y # CONFIG_NET_DSA_MT7530_MMIO is not set @@ -316,7 +314,6 @@ CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=2 CONFIG_NVMEM=y -# CONFIG_NVMEM_AN8855_EFUSE is not set CONFIG_NVMEM_BLOCK=y CONFIG_NVMEM_LAYOUTS=y CONFIG_NVMEM_LAYOUT_ADTRAN=y @@ -338,7 +335,6 @@ CONFIG_PAGE_POOL=y CONFIG_PAGE_POOL_STATS=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_PAGE_SIZE_LESS_THAN_64KB=y -CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y CONFIG_PARTITION_PERCPU=y CONFIG_PCI=y CONFIG_PCIEAER=y @@ -388,6 +384,7 @@ CONFIG_PM_CLK=y CONFIG_PM_GENERIC_DOMAINS=y CONFIG_PM_GENERIC_DOMAINS_OF=y CONFIG_PM_OPP=y +CONFIG_POLYNOMIAL=y CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_SYSCON=y @@ -411,6 +408,7 @@ CONFIG_RAS=y CONFIG_RATIONAL=y # CONFIG_RAVE_SP_CORE is not set CONFIG_REALTEK_PHY=y +CONFIG_REALTEK_PHY_HWMON=y CONFIG_REED_SOLOMON=y CONFIG_REED_SOLOMON_DEC8=y CONFIG_REED_SOLOMON_ENC8=y diff --git a/target/linux/mediatek/mt7623/config-6.6 b/target/linux/mediatek/mt7623/config-6.6 index 9d12c48eee..8fd0f3a599 100644 --- a/target/linux/mediatek/mt7623/config-6.6 +++ b/target/linux/mediatek/mt7623/config-6.6 @@ -1,6 +1,6 @@ # CONFIG_AIO is not set -# CONFIG_AIR_AN8855_PHY is not set # CONFIG_AIROHA_EN8801SC_PHY is not set +# CONFIG_AIR_AN8855_PHY is not set CONFIG_ALIGNMENT_TRAP=y CONFIG_ARCH_32BIT_OFF_T=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y @@ -106,6 +106,7 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_HAS_ASID=y CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_PABRT_V7=y CONFIG_CPU_PM=y CONFIG_CPU_RMAP=y @@ -114,8 +115,6 @@ CONFIG_CPU_THUMB_CAPABLE=y CONFIG_CPU_TLB_V7=y CONFIG_CPU_V7=y CONFIG_CRC16=y -# CONFIG_CRC32_SARWATE is not set -CONFIG_CRC32_SLICEBY8=y CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y @@ -188,17 +187,8 @@ CONFIG_DRM_MEDIATEK_HDMI=y CONFIG_DRM_MIPI_DSI=y CONFIG_DRM_PANEL=y CONFIG_DRM_PANEL_BRIDGE=y -# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set -# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set -# CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966 is not set -# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set -# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=y -# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set -# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set -# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set -# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set CONFIG_DRM_SCHED=y CONFIG_DRM_SIMPLE_BRIDGE=y CONFIG_DTC=y @@ -239,7 +229,6 @@ CONFIG_FWNODE_MDIO=y CONFIG_FW_CACHE=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y -CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_CLOCKEVENTS=y @@ -353,17 +342,16 @@ CONFIG_MDIO_BITBANG=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVRES=y -# CONFIG_MDIO_AN8855 is not set CONFIG_MDIO_GPIO=y CONFIG_MEDIATEK_GE_PHY=y CONFIG_MEDIATEK_MT6577_AUXADC=y CONFIG_MEDIATEK_WATCHDOG=y CONFIG_MEMORY=y +# CONFIG_MFD_AIROHA_AN8855 is not set CONFIG_MFD_CORE=y # CONFIG_MFD_HI6421_SPMI is not set CONFIG_MFD_MT6397=y CONFIG_MFD_SYSCON=y -# CONFIG_MFD_AIROHA_AN8855 is not set CONFIG_MIGHT_HAVE_CACHE_L2X0=y CONFIG_MIGRATION=y CONFIG_MMC=y @@ -395,6 +383,7 @@ CONFIG_MTK_IOMMU=y CONFIG_MTK_IOMMU_V1=y # CONFIG_MTK_LVTS_THERMAL is not set CONFIG_MTK_MMSYS=y +CONFIG_MTK_NET_PHYLIB=y CONFIG_MTK_PMIC_WRAP=y CONFIG_MTK_REGULATOR_COUPLER=y CONFIG_MTK_SCPSYS=y @@ -413,7 +402,6 @@ CONFIG_NEED_SRCU_NMI_SAFE=y CONFIG_NEON=y CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y -# CONFIG_NET_DSA_AN8855 is not set CONFIG_NET_DSA_MT7530=y CONFIG_NET_DSA_MT7530_MDIO=y # CONFIG_NET_DSA_MT7530_MMIO is not set @@ -435,7 +423,6 @@ CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=4 CONFIG_NVMEM=y -# CONFIG_NVMEM_AN8855_EFUSE is not set CONFIG_NVMEM_LAYOUTS=y # CONFIG_NVMEM_LAYOUT_ADTRAN is not set CONFIG_NVMEM_MTK_EFUSE=y @@ -461,7 +448,6 @@ CONFIG_PAGE_POOL=y CONFIG_PAGE_POOL_STATS=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_PAGE_SIZE_LESS_THAN_64KB=y -CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y CONFIG_PCI=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y @@ -588,7 +574,6 @@ CONFIG_TIMER_PROBE=y CONFIG_TOUCHSCREEN_EDT_FT5X06=y CONFIG_TREE_RCU=y CONFIG_TREE_SRCU=y -# CONFIG_UACCE is not set CONFIG_UBIFS_FS=y CONFIG_UEVENT_HELPER_PATH="" CONFIG_UIMAGE_FIT_BLK=y diff --git a/target/linux/mediatek/mt7629/config-6.6 b/target/linux/mediatek/mt7629/config-6.6 index d66a514f63..661f31ced6 100644 --- a/target/linux/mediatek/mt7629/config-6.6 +++ b/target/linux/mediatek/mt7629/config-6.6 @@ -1,5 +1,5 @@ -# CONFIG_AIR_AN8855_PHY is not set # CONFIG_AIROHA_EN8801SC_PHY is not set +# CONFIG_AIR_AN8855_PHY is not set CONFIG_ALIGNMENT_TRAP=y CONFIG_ARCH_32BIT_OFF_T=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y @@ -76,6 +76,7 @@ CONFIG_CPU_HAS_ASID=y CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_PABRT_V7=y CONFIG_CPU_PM=y CONFIG_CPU_RMAP=y @@ -112,7 +113,6 @@ CONFIG_FUNCTION_ALIGNMENT=0 CONFIG_FWNODE_MDIO=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y -CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y CONFIG_GENERIC_BUG=y @@ -182,11 +182,10 @@ CONFIG_MACH_MT7629=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVRES=y -# CONFIG_MDIO_AN8855 is not set CONFIG_MEDIATEK_GE_PHY=y CONFIG_MEDIATEK_WATCHDOG=y -CONFIG_MFD_SYSCON=y # CONFIG_MFD_AIROHA_AN8855 is not set +CONFIG_MFD_SYSCON=y CONFIG_MIGHT_HAVE_CACHE_L2X0=y CONFIG_MIGRATION=y CONFIG_MMU_LAZY_TLB_REFCOUNT=y @@ -208,6 +207,7 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096 # CONFIG_MTK_CMDQ is not set CONFIG_MTK_CPUX_TIMER=y CONFIG_MTK_INFRACFG=y +CONFIG_MTK_NET_PHYLIB=y # CONFIG_MTK_PMIC_WRAP is not set CONFIG_MTK_SCPSYS=y CONFIG_MTK_SCPSYS_PM_DOMAINS=y @@ -219,7 +219,6 @@ CONFIG_NETFILTER=y CONFIG_NETFILTER_BPF_LINK=y CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y -# CONFIG_NET_DSA_AN8855 is not set CONFIG_NET_DSA_MT7530=y CONFIG_NET_DSA_MT7530_MDIO=y # CONFIG_NET_DSA_MT7530_MMIO is not set @@ -238,7 +237,6 @@ CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=2 CONFIG_NVMEM=y -# CONFIG_NVMEM_AN8855_EFUSE is not set CONFIG_NVMEM_LAYOUTS=y # CONFIG_NVMEM_LAYOUT_ADTRAN is not set # CONFIG_NVMEM_MTK_EFUSE is not set @@ -261,7 +259,6 @@ CONFIG_PAGE_POOL=y CONFIG_PAGE_POOL_STATS=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_PAGE_SIZE_LESS_THAN_64KB=y -CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y CONFIG_PCI=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y From d00ed19ed4cbeb446741ef977b63d7c96a045323 Mon Sep 17 00:00:00 2001 From: Martin Schiller Date: Thu, 6 Mar 2025 09:52:27 +0100 Subject: [PATCH 14/14] mediatek: filogic: enable CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY The Cortex-A73 in MediaTek Filogic 880 (MT7988A) is vulnerable to multiple Spectre variants including Spectre-BHB. Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability Signed-off-by: Martin Schiller Link: https://github.com/openwrt/openwrt/pull/18182 Signed-off-by: Hauke Mehrtens (cherry picked from commit 6af46a69846e4e92fa8dcf6c3dccbaf87d513064) --- target/linux/mediatek/filogic/config-6.6 | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/mediatek/filogic/config-6.6 b/target/linux/mediatek/filogic/config-6.6 index 915c506669..607d1b3c6f 100644 --- a/target/linux/mediatek/filogic/config-6.6 +++ b/target/linux/mediatek/filogic/config-6.6 @@ -245,7 +245,6 @@ CONFIG_MFD_AIROHA_AN8855=y CONFIG_MFD_CORE=y CONFIG_MFD_SYSCON=y CONFIG_MIGRATION=y -# CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set CONFIG_MMC=y CONFIG_MMC_BLOCK=y CONFIG_MMC_CQHCI=y