From: Greg Kroah-Hartman Date: Tue, 17 Jun 2025 11:36:58 +0000 (+0200) Subject: 6.15-stable patches X-Git-Tag: v6.6.94~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e8489252bf418e0d330da63a2296461b42be314e;p=thirdparty%2Fkernel%2Fstable-queue.git 6.15-stable patches added patches: alsa-usb-audio-add-implicit-feedback-quirk-for-rode-ai-1.patch alsa-usb-audio-kill-timer-properly-at-removal.patch objtool-rust-relax-slice-condition-to-cover-more-noreturn-rust-functions.patch pidfs-never-refuse-ppid-0-in-pidfd_get_info.patch revert-mm-execmem-unify-early-execmem_cache-behaviour.patch revert-wifi-mwifiex-fix-ht40-bandwidth-issue.patch rust-compile-libcore-with-edition-2024-for-1.87.patch rust-list-fix-path-of-assert_pinned.patch tools-resolve_btfids-fix-build-when-cross-compiling-kernel-with-clang.patch uapi-bitops-use-uapi-safe-variant-of-bits_per_long-again.patch --- diff --git a/queue-6.15/alsa-usb-audio-add-implicit-feedback-quirk-for-rode-ai-1.patch b/queue-6.15/alsa-usb-audio-add-implicit-feedback-quirk-for-rode-ai-1.patch new file mode 100644 index 0000000000..614c1c9fca --- /dev/null +++ b/queue-6.15/alsa-usb-audio-add-implicit-feedback-quirk-for-rode-ai-1.patch @@ -0,0 +1,34 @@ +From 6a3439a417b910e662c666993798e0691bc81147 Mon Sep 17 00:00:00 2001 +From: David Heimann +Date: Sun, 1 Jun 2025 12:41:16 -0400 +Subject: ALSA: usb-audio: Add implicit feedback quirk for RODE AI-1 + +From: David Heimann + +commit 6a3439a417b910e662c666993798e0691bc81147 upstream. + +The RODE AI-1 audio interface requires implicit feedback sync between +playback endpoint 0x03 and feedback endpoint 0x84 on interface 3, but +doesn't advertise this in its USB descriptors. + +Without this quirk, the device receives audio data but produces no output. + +Signed-off-by: David Heimann +Cc: +Link: https://patch.msgid.link/084dc88c-1193-4a94-a002-5599adff936c@app.fastmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/implicit.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/usb/implicit.c ++++ b/sound/usb/implicit.c +@@ -57,6 +57,7 @@ static const struct snd_usb_implicit_fb_ + IMPLICIT_FB_FIXED_DEV(0x31e9, 0x0002, 0x81, 2), /* Solid State Logic SSL2+ */ + IMPLICIT_FB_FIXED_DEV(0x0499, 0x172f, 0x81, 2), /* Steinberg UR22C */ + IMPLICIT_FB_FIXED_DEV(0x0d9a, 0x00df, 0x81, 2), /* RTX6001 */ ++ IMPLICIT_FB_FIXED_DEV(0x19f7, 0x000a, 0x84, 3), /* RODE AI-1 */ + IMPLICIT_FB_FIXED_DEV(0x22f0, 0x0006, 0x81, 3), /* Allen&Heath Qu-16 */ + IMPLICIT_FB_FIXED_DEV(0x1686, 0xf029, 0x82, 2), /* Zoom UAC-2 */ + IMPLICIT_FB_FIXED_DEV(0x2466, 0x8003, 0x86, 2), /* Fractal Audio Axe-Fx II */ diff --git a/queue-6.15/alsa-usb-audio-kill-timer-properly-at-removal.patch b/queue-6.15/alsa-usb-audio-kill-timer-properly-at-removal.patch new file mode 100644 index 0000000000..b7288e925e --- /dev/null +++ b/queue-6.15/alsa-usb-audio-kill-timer-properly-at-removal.patch @@ -0,0 +1,49 @@ +From 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 19 May 2025 23:20:30 +0200 +Subject: ALSA: usb-audio: Kill timer properly at removal + +From: Takashi Iwai + +commit 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 upstream. + +The USB-audio MIDI code initializes the timer, but in a rare case, the +driver might be freed without the disconnect call. This leaves the +timer in an active state while the assigned object is released via +snd_usbmidi_free(), which ends up with a kernel warning when the debug +configuration is enabled, as spotted by fuzzer. + +For avoiding the problem, put timer_shutdown_sync() at +snd_usbmidi_free(), so that the timer can be killed properly. +While we're at it, replace the existing timer_delete_sync() at the +disconnect callback with timer_shutdown_sync(), too. + +Reported-by: syzbot+d8f72178ab6783a7daea@syzkaller.appspotmail.com +Closes: https://lore.kernel.org/681c70d7.050a0220.a19a9.00c6.GAE@google.com +Cc: +Link: https://patch.msgid.link/20250519212031.14436-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/midi.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/sound/usb/midi.c ++++ b/sound/usb/midi.c +@@ -1530,6 +1530,7 @@ static void snd_usbmidi_free(struct snd_ + snd_usbmidi_in_endpoint_delete(ep->in); + } + mutex_destroy(&umidi->mutex); ++ timer_shutdown_sync(&umidi->error_timer); + kfree(umidi); + } + +@@ -1553,7 +1554,7 @@ void snd_usbmidi_disconnect(struct list_ + spin_unlock_irq(&umidi->disc_lock); + up_write(&umidi->disc_rwsem); + +- timer_delete_sync(&umidi->error_timer); ++ timer_shutdown_sync(&umidi->error_timer); + + for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) { + struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i]; diff --git a/queue-6.15/objtool-rust-relax-slice-condition-to-cover-more-noreturn-rust-functions.patch b/queue-6.15/objtool-rust-relax-slice-condition-to-cover-more-noreturn-rust-functions.patch new file mode 100644 index 0000000000..d0ce7eb3ea --- /dev/null +++ b/queue-6.15/objtool-rust-relax-slice-condition-to-cover-more-noreturn-rust-functions.patch @@ -0,0 +1,53 @@ +From cbeaa41dfe26b72639141e87183cb23e00d4b0dd Mon Sep 17 00:00:00 2001 +From: Miguel Ojeda +Date: Tue, 20 May 2025 20:55:55 +0200 +Subject: objtool/rust: relax slice condition to cover more `noreturn` Rust functions + +From: Miguel Ojeda + +commit cbeaa41dfe26b72639141e87183cb23e00d4b0dd upstream. + +Developers are indeed hitting other of the `noreturn` slice symbols in +Nova [1], thus relax the last check in the list so that we catch all of +them, i.e. + + *_4core5slice5index22slice_index_order_fail + *_4core5slice5index24slice_end_index_len_fail + *_4core5slice5index26slice_start_index_len_fail + *_4core5slice5index29slice_end_index_overflow_fail + *_4core5slice5index31slice_start_index_overflow_fail + +These all exist since at least Rust 1.78.0, thus backport it too. + +See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") +for more details. + +Cc: stable@vger.kernel.org # Needed in 6.12.y and later. +Cc: John Hubbard +Cc: Timur Tabi +Cc: Kane York +Cc: Josh Poimboeuf +Cc: Peter Zijlstra +Reported-by: Joel Fernandes +Fixes: 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") +Closes: https://lore.kernel.org/rust-for-linux/20250513180757.GA1295002@joelnvbox/ [1] +Tested-by: Joel Fernandes +Link: https://lore.kernel.org/r/20250520185555.825242-1-ojeda@kernel.org +Signed-off-by: Miguel Ojeda +Signed-off-by: Greg Kroah-Hartman +--- + tools/objtool/check.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/tools/objtool/check.c ++++ b/tools/objtool/check.c +@@ -230,7 +230,8 @@ static bool is_rust_noreturn(const struc + str_ends_with(func->name, "_7___rustc17rust_begin_unwind") || + strstr(func->name, "_4core9panicking13assert_failed") || + strstr(func->name, "_4core9panicking11panic_const24panic_const_") || +- (strstr(func->name, "_4core5slice5index24slice_") && ++ (strstr(func->name, "_4core5slice5index") && ++ strstr(func->name, "slice_") && + str_ends_with(func->name, "_fail")); + } + diff --git a/queue-6.15/pidfs-never-refuse-ppid-0-in-pidfd_get_info.patch b/queue-6.15/pidfs-never-refuse-ppid-0-in-pidfd_get_info.patch new file mode 100644 index 0000000000..1aa83f947c --- /dev/null +++ b/queue-6.15/pidfs-never-refuse-ppid-0-in-pidfd_get_info.patch @@ -0,0 +1,42 @@ +From b55eb6eb2a7427428c59b293a0900131fc849595 Mon Sep 17 00:00:00 2001 +From: Mike Yuan +Date: Wed, 4 Jun 2025 15:03:42 +0000 +Subject: pidfs: never refuse ppid == 0 in PIDFD_GET_INFO + +From: Mike Yuan + +commit b55eb6eb2a7427428c59b293a0900131fc849595 upstream. + +In systemd we spotted an issue after switching to ioctl(PIDFD_GET_INFO) +for obtaining pid number the pidfd refers to, that for processes +with a parent from outer pidns PIDFD_GET_INFO unexpectedly yields +-ESRCH [1]. It turned out that there's an arbitrary check blocking +this, which is not really sensible given getppid() happily returns +0 for such processes. Just drop the spurious check and userspace +ought to handle ppid == 0 properly everywhere. + +[1] https://github.com/systemd/systemd/issues/37715 + +Fixes: cdda1f26e74b ("pidfd: add ioctl to retrieve pid info") +Signed-off-by: Mike Yuan +Link: https://lore.kernel.org/20250604150238.42664-1-me@yhndnzj.com +Cc: Christian Brauner +Cc: Luca Boccassi +Cc: stable@vger.kernel.org +Signed-off-by: Christian Brauner +Signed-off-by: Greg Kroah-Hartman +--- + fs/pidfs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/pidfs.c ++++ b/fs/pidfs.c +@@ -336,7 +336,7 @@ static long pidfd_info(struct file *file + kinfo.pid = task_pid_vnr(task); + kinfo.mask |= PIDFD_INFO_PID; + +- if (kinfo.pid == 0 || kinfo.tgid == 0 || (kinfo.ppid == 0 && kinfo.pid != 1)) ++ if (kinfo.pid == 0 || kinfo.tgid == 0) + return -ESRCH; + + copy_out: diff --git a/queue-6.15/revert-mm-execmem-unify-early-execmem_cache-behaviour.patch b/queue-6.15/revert-mm-execmem-unify-early-execmem_cache-behaviour.patch new file mode 100644 index 0000000000..f74c1bfcb6 --- /dev/null +++ b/queue-6.15/revert-mm-execmem-unify-early-execmem_cache-behaviour.patch @@ -0,0 +1,154 @@ +From 7cd9a11dd0c3d1dd225795ed1b5b53132888e7b5 Mon Sep 17 00:00:00 2001 +From: "Mike Rapoport (Microsoft)" +Date: Tue, 3 Jun 2025 14:14:45 +0300 +Subject: Revert "mm/execmem: Unify early execmem_cache behaviour" + +From: Mike Rapoport (Microsoft) + +commit 7cd9a11dd0c3d1dd225795ed1b5b53132888e7b5 upstream. + +The commit d6d1e3e6580c ("mm/execmem: Unify early execmem_cache +behaviour") changed early behaviour of execemem ROX cache to allow its +usage in early x86 code that allocates text pages when +CONFIG_MITGATION_ITS is enabled. + +The permission management of the pages allocated from execmem for ITS +mitigation is now completely contained in arch/x86/kernel/alternatives.c +and therefore there is no need to special case early allocations in +execmem. + +This reverts commit d6d1e3e6580ca35071ad474381f053cbf1fb6414. + +Signed-off-by: Mike Rapoport (Microsoft) +Signed-off-by: Peter Zijlstra (Intel) +Cc: stable@vger.kernel.org +Link: https://lkml.kernel.org/r/20250603111446.2609381-6-rppt@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/mm/init_32.c | 3 --- + arch/x86/mm/init_64.c | 3 --- + include/linux/execmem.h | 8 +------- + mm/execmem.c | 40 +++------------------------------------- + 4 files changed, 4 insertions(+), 50 deletions(-) + +--- a/arch/x86/mm/init_32.c ++++ b/arch/x86/mm/init_32.c +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + + #include + #include +@@ -756,8 +755,6 @@ void mark_rodata_ro(void) + pr_info("Write protecting kernel text and read-only data: %luk\n", + size >> 10); + +- execmem_cache_make_ro(); +- + kernel_set_to_readonly = 1; + + #ifdef CONFIG_CPA_DEBUG +--- a/arch/x86/mm/init_64.c ++++ b/arch/x86/mm/init_64.c +@@ -34,7 +34,6 @@ + #include + #include + #include +-#include + + #include + #include +@@ -1392,8 +1391,6 @@ void mark_rodata_ro(void) + (end - start) >> 10); + set_memory_ro(start, (end - start) >> PAGE_SHIFT); + +- execmem_cache_make_ro(); +- + kernel_set_to_readonly = 1; + + /* +--- a/include/linux/execmem.h ++++ b/include/linux/execmem.h +@@ -54,7 +54,7 @@ enum execmem_range_flags { + EXECMEM_ROX_CACHE = (1 << 1), + }; + +-#if defined(CONFIG_ARCH_HAS_EXECMEM_ROX) && defined(CONFIG_EXECMEM) ++#ifdef CONFIG_ARCH_HAS_EXECMEM_ROX + /** + * execmem_fill_trapping_insns - set memory to contain instructions that + * will trap +@@ -94,15 +94,9 @@ int execmem_make_temp_rw(void *ptr, size + * Return: 0 on success or negative error code on failure. + */ + int execmem_restore_rox(void *ptr, size_t size); +- +-/* +- * Called from mark_readonly(), where the system transitions to ROX. +- */ +-void execmem_cache_make_ro(void); + #else + static inline int execmem_make_temp_rw(void *ptr, size_t size) { return 0; } + static inline int execmem_restore_rox(void *ptr, size_t size) { return 0; } +-static inline void execmem_cache_make_ro(void) { } + #endif + + /** +--- a/mm/execmem.c ++++ b/mm/execmem.c +@@ -254,34 +254,6 @@ out_unlock: + return ptr; + } + +-static bool execmem_cache_rox = false; +- +-void execmem_cache_make_ro(void) +-{ +- struct maple_tree *free_areas = &execmem_cache.free_areas; +- struct maple_tree *busy_areas = &execmem_cache.busy_areas; +- MA_STATE(mas_free, free_areas, 0, ULONG_MAX); +- MA_STATE(mas_busy, busy_areas, 0, ULONG_MAX); +- struct mutex *mutex = &execmem_cache.mutex; +- void *area; +- +- execmem_cache_rox = true; +- +- mutex_lock(mutex); +- +- mas_for_each(&mas_free, area, ULONG_MAX) { +- unsigned long pages = mas_range_len(&mas_free) >> PAGE_SHIFT; +- set_memory_ro(mas_free.index, pages); +- } +- +- mas_for_each(&mas_busy, area, ULONG_MAX) { +- unsigned long pages = mas_range_len(&mas_busy) >> PAGE_SHIFT; +- set_memory_ro(mas_busy.index, pages); +- } +- +- mutex_unlock(mutex); +-} +- + static int execmem_cache_populate(struct execmem_range *range, size_t size) + { + unsigned long vm_flags = VM_ALLOW_HUGE_VMAP; +@@ -302,15 +274,9 @@ static int execmem_cache_populate(struct + /* fill memory with instructions that will trap */ + execmem_fill_trapping_insns(p, alloc_size, /* writable = */ true); + +- if (execmem_cache_rox) { +- err = set_memory_rox((unsigned long)p, vm->nr_pages); +- if (err) +- goto err_free_mem; +- } else { +- err = set_memory_x((unsigned long)p, vm->nr_pages); +- if (err) +- goto err_free_mem; +- } ++ err = set_memory_rox((unsigned long)p, vm->nr_pages); ++ if (err) ++ goto err_free_mem; + + err = execmem_cache_add(p, alloc_size); + if (err) diff --git a/queue-6.15/revert-wifi-mwifiex-fix-ht40-bandwidth-issue.patch b/queue-6.15/revert-wifi-mwifiex-fix-ht40-bandwidth-issue.patch new file mode 100644 index 0000000000..963a086366 --- /dev/null +++ b/queue-6.15/revert-wifi-mwifiex-fix-ht40-bandwidth-issue.patch @@ -0,0 +1,52 @@ +From 570896604f47d44d4ff6882d2a588428d2a6ef17 Mon Sep 17 00:00:00 2001 +From: Francesco Dolcini +Date: Thu, 5 Jun 2025 15:03:02 +0200 +Subject: Revert "wifi: mwifiex: Fix HT40 bandwidth issue." + +From: Francesco Dolcini + +commit 570896604f47d44d4ff6882d2a588428d2a6ef17 upstream. + +This reverts commit 4fcfcbe45734 ("wifi: mwifiex: Fix HT40 bandwidth +issue.") + +That commit introduces a regression, when HT40 mode is enabled, +received packets are lost, this was experience with W8997 with both +SDIO-UART and SDIO-SDIO variants. From an initial investigation the +issue solves on its own after some time, but it's not clear what is +the reason. Given that this was just a performance optimization, let's +revert it till we have a better understanding of the issue and a proper +fix. + +Cc: Jeff Chen +Cc: stable@vger.kernel.org +Fixes: 4fcfcbe45734 ("wifi: mwifiex: Fix HT40 bandwidth issue.") +Closes: https://lore.kernel.org/all/20250603203337.GA109929@francesco-nb/ +Signed-off-by: Francesco Dolcini +Link: https://patch.msgid.link/20250605130302.55555-1-francesco@dolcini.it +[fix commit reference format] +Signed-off-by: Johannes Berg +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/marvell/mwifiex/11n.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/marvell/mwifiex/11n.c ++++ b/drivers/net/wireless/marvell/mwifiex/11n.c +@@ -403,14 +403,12 @@ mwifiex_cmd_append_11n_tlv(struct mwifie + + if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 && + bss_desc->bcn_ht_oper->ht_param & +- IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) { +- chan_list->chan_scan_param[0].radio_type |= +- CHAN_BW_40MHZ << 2; ++ IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) + SET_SECONDARYCHAN(chan_list->chan_scan_param[0]. + radio_type, + (bss_desc->bcn_ht_oper->ht_param & + IEEE80211_HT_PARAM_CHA_SEC_OFFSET)); +- } ++ + *buffer += struct_size(chan_list, chan_scan_param, 1); + ret_len += struct_size(chan_list, chan_scan_param, 1); + } diff --git a/queue-6.15/rust-compile-libcore-with-edition-2024-for-1.87.patch b/queue-6.15/rust-compile-libcore-with-edition-2024-for-1.87.patch new file mode 100644 index 0000000000..b3754c297d --- /dev/null +++ b/queue-6.15/rust-compile-libcore-with-edition-2024-for-1.87.patch @@ -0,0 +1,167 @@ +From f4daa80d6be7d3c55ca72a8e560afc4e21f886aa Mon Sep 17 00:00:00 2001 +From: Gary Guo +Date: Sat, 17 May 2025 09:55:59 +0100 +Subject: rust: compile libcore with edition 2024 for 1.87+ + +From: Gary Guo + +commit f4daa80d6be7d3c55ca72a8e560afc4e21f886aa upstream. + +Rust 1.87 (released on 2025-05-15) compiles core library with edition +2024 instead of 2021 [1]. Ensure that the edition matches libcore's +expectation to avoid potential breakage. + +[ J3m3 reported in Zulip [2] that the `rust-analyzer` target was + broken after this patch -- indeed, we need to avoid `core-cfgs` + since those are passed to the `rust-analyzer` target. + + So, instead, I tweaked the patch to create a new `core-edition` + variable and explicitly mention the `--edition` flag instead of + reusing `core-cfg`s. + + In addition, pass a new argument using this new variable to + `generate_rust_analyzer.py` so that we set the right edition there. + + By the way, for future reference: the `filter-out` change is needed + for Rust < 1.87, since otherwise we would skip the `--edition=2021` + we just added, ending up with no edition flag, and thus the compiler + would default to the 2015 one. + + [2] https://rust-for-linux.zulipchat.com/#narrow/channel/291565/topic/x/near/520206547 + + - Miguel ] + +Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs). +Link: https://github.com/rust-lang/rust/pull/138162 [1] +Reported-by: est31 +Closes: https://github.com/Rust-for-Linux/linux/issues/1163 +Signed-off-by: Gary Guo +Link: https://lore.kernel.org/r/20250517085600.2857460-1-gary@garyguo.net +Signed-off-by: Miguel Ojeda +Signed-off-by: Greg Kroah-Hartman +--- + rust/Makefile | 14 ++++++++------ + scripts/generate_rust_analyzer.py | 13 ++++++++----- + 2 files changed, 16 insertions(+), 11 deletions(-) + +--- a/rust/Makefile ++++ b/rust/Makefile +@@ -60,6 +60,8 @@ endif + core-cfgs = \ + --cfg no_fp_fmt_parse + ++core-edition := $(if $(call rustc-min-version,108700),2024,2021) ++ + # `rustc` recognizes `--remap-path-prefix` since 1.26.0, but `rustdoc` only + # since Rust 1.81.0. Moreover, `rustdoc` ICEs on out-of-tree builds since Rust + # 1.82.0 (https://github.com/rust-lang/rust/issues/138520). Thus workaround both +@@ -106,8 +108,8 @@ rustdoc-macros: $(src)/macros/lib.rs FOR + + # Starting with Rust 1.82.0, skipping `-Wrustdoc::unescaped_backticks` should + # not be needed -- see https://github.com/rust-lang/rust/pull/128307. +-rustdoc-core: private skip_flags = -Wrustdoc::unescaped_backticks +-rustdoc-core: private rustc_target_flags = $(core-cfgs) ++rustdoc-core: private skip_flags = --edition=2021 -Wrustdoc::unescaped_backticks ++rustdoc-core: private rustc_target_flags = --edition=$(core-edition) $(core-cfgs) + rustdoc-core: $(RUST_LIB_SRC)/core/src/lib.rs FORCE + +$(call if_changed,rustdoc) + +@@ -416,7 +418,7 @@ quiet_cmd_rustc_library = $(if $(skip_cl + cmd_rustc_library = \ + OBJTREE=$(abspath $(objtree)) \ + $(if $(skip_clippy),$(RUSTC),$(RUSTC_OR_CLIPPY)) \ +- $(filter-out $(skip_flags),$(rust_flags) $(rustc_target_flags)) \ ++ $(filter-out $(skip_flags),$(rust_flags)) $(rustc_target_flags) \ + --emit=dep-info=$(depfile) --emit=obj=$@ \ + --emit=metadata=$(dir $@)$(patsubst %.o,lib%.rmeta,$(notdir $@)) \ + --crate-type rlib -L$(objtree)/$(obj) \ +@@ -427,7 +429,7 @@ quiet_cmd_rustc_library = $(if $(skip_cl + + rust-analyzer: + $(Q)MAKEFLAGS= $(srctree)/scripts/generate_rust_analyzer.py \ +- --cfgs='core=$(core-cfgs)' \ ++ --cfgs='core=$(core-cfgs)' $(core-edition) \ + $(realpath $(srctree)) $(realpath $(objtree)) \ + $(rustc_sysroot) $(RUST_LIB_SRC) $(if $(KBUILD_EXTMOD),$(srcroot)) \ + > rust-project.json +@@ -483,9 +485,9 @@ $(obj)/helpers/helpers.o: $(src)/helpers + $(obj)/exports.o: private skip_gendwarfksyms = 1 + + $(obj)/core.o: private skip_clippy = 1 +-$(obj)/core.o: private skip_flags = -Wunreachable_pub ++$(obj)/core.o: private skip_flags = --edition=2021 -Wunreachable_pub + $(obj)/core.o: private rustc_objcopy = $(foreach sym,$(redirect-intrinsics),--redefine-sym $(sym)=__rust$(sym)) +-$(obj)/core.o: private rustc_target_flags = $(core-cfgs) ++$(obj)/core.o: private rustc_target_flags = --edition=$(core-edition) $(core-cfgs) + $(obj)/core.o: $(RUST_LIB_SRC)/core/src/lib.rs \ + $(wildcard $(objtree)/include/config/RUSTC_VERSION_TEXT) FORCE + +$(call if_changed_rule,rustc_library) +--- a/scripts/generate_rust_analyzer.py ++++ b/scripts/generate_rust_analyzer.py +@@ -19,7 +19,7 @@ def args_crates_cfgs(cfgs): + + return crates_cfgs + +-def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs): ++def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edition): + # Generate the configuration list. + cfg = [] + with open(objtree / "include" / "generated" / "rustc_cfg") as fd: +@@ -35,7 +35,7 @@ def generate_crates(srctree, objtree, sy + crates_indexes = {} + crates_cfgs = args_crates_cfgs(cfgs) + +- def append_crate(display_name, root_module, deps, cfg=[], is_workspace_member=True, is_proc_macro=False): ++ def append_crate(display_name, root_module, deps, cfg=[], is_workspace_member=True, is_proc_macro=False, edition="2021"): + crate = { + "display_name": display_name, + "root_module": str(root_module), +@@ -43,7 +43,7 @@ def generate_crates(srctree, objtree, sy + "is_proc_macro": is_proc_macro, + "deps": [{"crate": crates_indexes[dep], "name": dep} for dep in deps], + "cfg": cfg, +- "edition": "2021", ++ "edition": edition, + "env": { + "RUST_MODFILE": "This is only for rust-analyzer" + } +@@ -61,6 +61,7 @@ def generate_crates(srctree, objtree, sy + display_name, + deps, + cfg=[], ++ edition="2021", + ): + append_crate( + display_name, +@@ -68,12 +69,13 @@ def generate_crates(srctree, objtree, sy + deps, + cfg, + is_workspace_member=False, ++ edition=edition, + ) + + # NB: sysroot crates reexport items from one another so setting up our transitive dependencies + # here is important for ensuring that rust-analyzer can resolve symbols. The sources of truth + # for this dependency graph are `(sysroot_src / crate / "Cargo.toml" for crate in crates)`. +- append_sysroot_crate("core", [], cfg=crates_cfgs.get("core", [])) ++ append_sysroot_crate("core", [], cfg=crates_cfgs.get("core", []), edition=core_edition) + append_sysroot_crate("alloc", ["core"]) + append_sysroot_crate("std", ["alloc", "core"]) + append_sysroot_crate("proc_macro", ["core", "std"]) +@@ -177,6 +179,7 @@ def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--verbose', '-v', action='store_true') + parser.add_argument('--cfgs', action='append', default=[]) ++ parser.add_argument("core_edition") + parser.add_argument("srctree", type=pathlib.Path) + parser.add_argument("objtree", type=pathlib.Path) + parser.add_argument("sysroot", type=pathlib.Path) +@@ -193,7 +196,7 @@ def main(): + assert args.sysroot in args.sysroot_src.parents + + rust_project = { +- "crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs), ++ "crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs, args.core_edition), + "sysroot": str(args.sysroot), + } + diff --git a/queue-6.15/rust-list-fix-path-of-assert_pinned.patch b/queue-6.15/rust-list-fix-path-of-assert_pinned.patch new file mode 100644 index 0000000000..f4cd019199 --- /dev/null +++ b/queue-6.15/rust-list-fix-path-of-assert_pinned.patch @@ -0,0 +1,45 @@ +From eb71feaacaaca227ae8f91c8578cf831553c5ab5 Mon Sep 17 00:00:00 2001 +From: Benno Lossin +Date: Sun, 25 May 2025 19:34:45 +0200 +Subject: rust: list: fix path of `assert_pinned!` + +From: Benno Lossin + +commit eb71feaacaaca227ae8f91c8578cf831553c5ab5 upstream. + +Commit dbd5058ba60c ("rust: make pin-init its own crate") moved all +items from pin-init into the pin-init crate, including the +`assert_pinned!` macro. + +Thus fix the path of the sole user of the `assert_pinned!` macro. + +This occurrence was missed in the commit above, since it is in a macro +rule that has no current users (although binder is a future user). + +Cc: stable@kernel.org +Fixes: dbd5058ba60c ("rust: make pin-init its own crate") +Signed-off-by: Benno Lossin +Link: https://lore.kernel.org/r/20250525173450.853413-1-lossin@kernel.org +[ Reworded slightly as discussed in the list. - Miguel ] +Signed-off-by: Miguel Ojeda +Signed-off-by: Greg Kroah-Hartman +--- + rust/kernel/list/arc.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rust/kernel/list/arc.rs b/rust/kernel/list/arc.rs +index 13c50df37b89..a88a2dc65aa7 100644 +--- a/rust/kernel/list/arc.rs ++++ b/rust/kernel/list/arc.rs +@@ -96,7 +96,7 @@ unsafe fn on_drop_list_arc(&self) {} + } $($rest:tt)*) => { + impl$(<$($generics)*>)? $crate::list::ListArcSafe<$num> for $t { + unsafe fn on_create_list_arc_from_unique(self: ::core::pin::Pin<&mut Self>) { +- $crate::assert_pinned!($t, $field, $fty, inline); ++ ::pin_init::assert_pinned!($t, $field, $fty, inline); + + // SAFETY: This field is structurally pinned as per the above assertion. + let field = unsafe { +-- +2.49.0 + diff --git a/queue-6.15/series b/queue-6.15/series index d39ec19267..be245c11de 100644 --- a/queue-6.15/series +++ b/queue-6.15/series @@ -737,3 +737,13 @@ io_uring-consistently-use-rcu-semantics-with-sqpoll-.patch smb-client-fix-perf-regression-with-deferred-closes.patch bio-fix-bio_first_folio-for-sparsemem-without-vmemma.patch block-fix-bvec_set_folio-for-very-large-folios.patch +uapi-bitops-use-uapi-safe-variant-of-bits_per_long-again.patch +objtool-rust-relax-slice-condition-to-cover-more-noreturn-rust-functions.patch +rust-compile-libcore-with-edition-2024-for-1.87.patch +rust-list-fix-path-of-assert_pinned.patch +pidfs-never-refuse-ppid-0-in-pidfd_get_info.patch +tools-resolve_btfids-fix-build-when-cross-compiling-kernel-with-clang.patch +revert-wifi-mwifiex-fix-ht40-bandwidth-issue.patch +revert-mm-execmem-unify-early-execmem_cache-behaviour.patch +alsa-usb-audio-kill-timer-properly-at-removal.patch +alsa-usb-audio-add-implicit-feedback-quirk-for-rode-ai-1.patch diff --git a/queue-6.15/tools-resolve_btfids-fix-build-when-cross-compiling-kernel-with-clang.patch b/queue-6.15/tools-resolve_btfids-fix-build-when-cross-compiling-kernel-with-clang.patch new file mode 100644 index 0000000000..bcf30d6101 --- /dev/null +++ b/queue-6.15/tools-resolve_btfids-fix-build-when-cross-compiling-kernel-with-clang.patch @@ -0,0 +1,39 @@ +From a298bbab903e3fb4cbe16d36d6195e68fad1b776 Mon Sep 17 00:00:00 2001 +From: Suleiman Souhlal +Date: Fri, 6 Jun 2025 16:45:38 +0900 +Subject: tools/resolve_btfids: Fix build when cross compiling kernel with clang. + +From: Suleiman Souhlal + +commit a298bbab903e3fb4cbe16d36d6195e68fad1b776 upstream. + +When cross compiling the kernel with clang, we need to override +CLANG_CROSS_FLAGS when preparing the step libraries. + +Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs +when building tools in parallel"), MAKEFLAGS would have been set to a +value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the +fact that we weren't properly overriding it. + +Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program") +Signed-off-by: Suleiman Souhlal +Signed-off-by: Andrii Nakryiko +Acked-by: Jiri Olsa +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/bpf/20250606074538.1608546-1-suleiman@google.com +Signed-off-by: Greg Kroah-Hartman +--- + tools/bpf/resolve_btfids/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/bpf/resolve_btfids/Makefile ++++ b/tools/bpf/resolve_btfids/Makefile +@@ -17,7 +17,7 @@ endif + + # Overrides for the prepare step libraries. + HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(HOSTCC)" LD="$(HOSTLD)" ARCH="$(HOSTARCH)" \ +- CROSS_COMPILE="" EXTRA_CFLAGS="$(HOSTCFLAGS)" ++ CROSS_COMPILE="" CLANG_CROSS_FLAGS="" EXTRA_CFLAGS="$(HOSTCFLAGS)" + + RM ?= rm + HOSTCC ?= gcc diff --git a/queue-6.15/uapi-bitops-use-uapi-safe-variant-of-bits_per_long-again.patch b/queue-6.15/uapi-bitops-use-uapi-safe-variant-of-bits_per_long-again.patch new file mode 100644 index 0000000000..6d9e5514d5 --- /dev/null +++ b/queue-6.15/uapi-bitops-use-uapi-safe-variant-of-bits_per_long-again.patch @@ -0,0 +1,51 @@ +From 11fcf368506d347088e613edf6cd2604d70c454f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Fri, 6 Jun 2025 10:23:57 +0200 +Subject: uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Thomas Weißschuh + +commit 11fcf368506d347088e613edf6cd2604d70c454f upstream. + +Commit 1e7933a575ed ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"") +did not take in account that the usage of BITS_PER_LONG in __GENMASK() was +changed to __BITS_PER_LONG for UAPI-safety in +commit 3c7a8e190bc5 ("uapi: introduce uapi-friendly macros for GENMASK"). +BITS_PER_LONG can not be used in UAPI headers as it derives from the kernel +configuration and not from the current compiler invocation. +When building compat userspace code or a compat vDSO its value will be +incorrect. + +Switch back to __BITS_PER_LONG. + +Fixes: 1e7933a575ed ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"") +Cc: stable@vger.kernel.org +Signed-off-by: Thomas Weißschuh +Signed-off-by: Yury Norov [NVIDIA] +Signed-off-by: Greg Kroah-Hartman +--- + include/uapi/linux/bits.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/uapi/linux/bits.h b/include/uapi/linux/bits.h +index 682b406e1067..a04afef9efca 100644 +--- a/include/uapi/linux/bits.h ++++ b/include/uapi/linux/bits.h +@@ -4,9 +4,9 @@ + #ifndef _UAPI_LINUX_BITS_H + #define _UAPI_LINUX_BITS_H + +-#define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h)))) ++#define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (__BITS_PER_LONG - 1 - (h)))) + +-#define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (BITS_PER_LONG_LONG - 1 - (h)))) ++#define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h)))) + + #define __GENMASK_U128(h, l) \ + ((_BIT128((h)) << 1) - (_BIT128(l))) +-- +2.49.0 +