6.15.3-rc1 review
Subsystems (10)
Greg Kroah-Hartman
maintainerPATCH 737/780 bio: Fix bio_first_folio() for SPARSEMEM without VMEMMAP
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Wilcox (Oracle) <[email protected]>
[ Upstream commit f826ec7966a63d48e16e0868af4e038bf9a1a3ae ]
It is possible for physically contiguous folios to have discontiguous struct pages if SPARSEMEM is enabled and SPARSEMEM_VMEMMAP is not. This is correctly handled by folio_page_idx(), so remove this open-coded implementation.
--- include/linux/bio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/bio.h +1 -1
@@ -291,7 +291,7 @@ static inline void bio_first_folio(struct folio_iter *fi, struct bio *bio, fi->folio =page_folio (bvec->bv_page); fi->offset = bvec->bv_offset + -PAGE_SIZE * (bvec->bv_page - &fi->folio->page); +PAGE_SIZE *folio_page_idx (fi->folio, bvec->bv_page); fi->_seg_count = bvec->bv_len; fi->length =min (folio_size (fi->folio) - fi->offset, fi->_seg_count); fi->_next =folio_next (fi->folio);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 738/780 block: Fix bvec_set_folio() for very large folios
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Wilcox (Oracle) <[email protected]>
[ Upstream commit 5e223e06ee7c6d8f630041a0645ac90e39a42cc6 ]
Similarly to 26064d3e2b4d ("block: fix adding folio to bio"), if we attempt to add a folio that is larger than 4GB, we'll silently truncate the offset and len. Widen the parameters to size_t, assert that the length is less than 4GB and set the first page that contains the interesting data rather than the first page of the folio.
--- include/linux/bvec.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
include/linux/bvec.h +5 -2
@@ -57,9 +57,12 @@ static inline void bvec_set_page(struct bio_vec *bv, struct page *page,* @offset: offset into the folio */ static inline void bvec_set_folio (struct bio_vec *bv,struct folio *folio, -unsigned int len,unsigned int offset) +size_t len,size_t offset) { -bvec_set_page (bv, &folio->page, len, offset); +unsigned long nr = offset /PAGE_SIZE ; + +WARN_ON_ONCE (len >UINT_MAX ); +bvec_set_page (bv,folio_page (folio, nr), len, offset %PAGE_SIZE ); }/**
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 739/780 uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
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.
--- include/uapi/linux/bits.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/bits.h +2 -2
@@ -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)))
Signature · 1 line
2.49.0
Greg Kroah-Hartman
maintainerPATCH 740/780 objtool/rust: relax slice condition to cover more `noreturn` Rust functions
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miguel Ojeda <[email protected]>
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.
--- tools/objtool/check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/objtool/check.c +2 -1
@@ -230,7 +230,8 @@ static bool is_rust_noreturn(const strucstr_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" )); }
Greg Kroah-Hartman
maintainerPATCH 741/780 rust: compile libcore with edition 2024 for 1.87+
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gary Guo <[email protected]>
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-cfgs.
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 ]
--- rust/Makefile | 14 ++++++++------ scripts/generate_rust_analyzer.py | 13 ++++++++----- 2 files changed, 16 insertions(+), 11 deletions(-)
rust/Makefile +8 -6
@@ -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)
scripts/generate_rust_analyzer.py +8 -5
@@ -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), }
Greg Kroah-Hartman
maintainerPATCH 742/780 rust: list: fix path of `assert_pinned!`
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benno Lossin <[email protected]>
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).
--- rust/kernel/list/arc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/list/arc.rs +1 -1
@@ -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 {
Signature · 1 line
2.49.0
Greg Kroah-Hartman
maintainerPATCH 743/780 pidfs: never refuse ppid == 0 in PIDFD_GET_INFO
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Yuan <[email protected]>
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
--- fs/pidfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/pidfs.c +1 -1
@@ -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:
Greg Kroah-Hartman
maintainerPATCH 744/780 tools/resolve_btfids: Fix build when cross compiling kernel with clang.
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Suleiman Souhlal <[email protected]>
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.
--- tools/bpf/resolve_btfids/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/bpf/resolve_btfids/Makefile +1 -1
@@ -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
Greg Kroah-Hartman
maintainerPATCH 745/780 Revert "wifi: mwifiex: Fix HT40 bandwidth issue."
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francesco Dolcini <[email protected]>
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.
--- drivers/net/wireless/marvell/mwifiex/11n.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/wireless/marvell/mwifiex/11n.c +2 -4
@@ -403,14 +403,12 @@ mwifiex_cmd_append_11n_tlv(struct mwifieif (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 ); }
Greg Kroah-Hartman
maintainerPATCH 746/780 Revert "mm/execmem: Unify early execmem_cache behaviour"
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Rapoport (Microsoft) <[email protected]>
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.
--- 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(-)
arch/x86/mm/init_32.c +0 -3
@@ -30,7 +30,6 @@#include <linux/initrd.h> #include <linux/cpumask.h> #include <linux/gfp.h> -#include <linux/execmem.h> #include <asm/asm.h> #include <asm/bios_ebda.h>
@@ -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
arch/x86/mm/init_64.c +0 -3
@@ -34,7 +34,6 @@#include <linux/gfp.h> #include <linux/kcore.h> #include <linux/bootmem_info.h> -#include <linux/execmem.h> #include <asm/processor.h> #include <asm/bios_ebda.h>
@@ -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 ;/*
include/linux/execmem.h +1 -7
@@ -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 /**
mm/execmem.c +3 -37
@@ -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)
Hello again,
I've bisected this and found that the issue is caused by commit f46262bbc05af38565c560fd960b86a0e195fd4b:
'Revert "mm/execmem: Unify early execmem_cache behaviour"'
https://lore.kernel.org/stable/[email protected]/
Regards
Pascal
Hello again,
I've sent this email a few minutes ago but mixed up one of the In-Reply-To message IDs, so I'm resending it now with (hopefully) the correct In-Reply-To message IDs.
I've bisected this and found that the issue is caused by commit f46262bbc05af38565c560fd960b86a0e195fd4b:
'Revert "mm/execmem: Unify early execmem_cache behaviour"'
https://lore.kernel.org/stable/[email protected]/
Regards
Pascal
Greg Kroah-Hartman
maintainerQuoted 11 lines · Pascal Ernster
Hello again,
I've sent this email a few minutes ago but mixed up one of the In-Reply-To message IDs, so I'm resending it now with (hopefully) the correct In-Reply-To message IDs.
I've bisected this and found that the issue is caused by commit
f46262bbc05af38565c560fd960b86a0e195fd4b:
Quoted 7 lines
'Revert "mm/execmem: Unify early
execmem_cachebehaviour"'
Thank you for digging into this. Looks like I took the last patch in a patch series and not the previous ones, which caused this problem. I've dropped this one now and will add it back next week after I also add all the other ones in the series.
thanks,
greg k-h
[2025-06-19 06:17] Greg Kroah-Hartman:
Quoted 16 lines · Pascal Ernster
Quoted 15 lines
Hello again,
I've sent this email a few minutes ago but mixed up one of the In-Reply-To message IDs, so I'm resending it now with (hopefully) the correct In-Reply-To message IDs.
I've bisected this and found that the issue is caused by commit
f46262bbc05af38565c560fd960b86a0e195fd4b:'Revert "mm/execmem: Unify early
execmem_cachebehaviour"'
Quoted 8 lines
Quoted 3 lines
Thank you for digging into this. Looks like I took the last patch in a patch series and not the previous ones, which caused this problem. I've dropped this one now and will add it back next week after I also add all the other ones in the series.
You're welcome! :)
Btw, the same patch has turned up again in the stable queue für 6.15.4:
Is this intentional or a mistake?
Regards
Pascal
Greg Kroah-Hartman
maintainerQuoted 27 lines · Pascal Ernster
[2025-06-19 06:17] Greg Kroah-Hartman:
Quoted 16 lines · Pascal Ernster
Quoted 15 lines
Hello again,
I've sent this email a few minutes ago but mixed up one of the In-Reply-To message IDs, so I'm resending it now with (hopefully) the correct In-Reply-To message IDs.
I've bisected this and found that the issue is caused by commit
f46262bbc05af38565c560fd960b86a0e195fd4b:'Revert "mm/execmem: Unify early
execmem_cachebehaviour"'Quoted 8 lines
Quoted 3 lines
Thank you for digging into this. Looks like I took the last patch in a patch series and not the previous ones, which caused this problem. I've dropped this one now and will add it back next week after I also add all the other ones in the series.
Quoted 7 lines
You're welcome! :)
Btw, the same patch has turned up again in the stable queue für 6.15.4:
Is this intentional or a mistake?
Intentional, I took the whole series this time, right?
thanks,
greg k-h
Greg Kroah-Hartman
maintainerPATCH 747/780 ALSA: usb-audio: Kill timer properly at removal
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
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.
--- sound/usb/midi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/usb/midi.c +2 -1
@@ -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];
Greg Kroah-Hartman
maintainerPATCH 748/780 ALSA: usb-audio: Add implicit feedback quirk for RODE AI-1
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Heimann <[email protected]>
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.
--- sound/usb/implicit.c | 1 + 1 file changed, 1 insertion(+)
sound/usb/implicit.c +1 -0
@@ -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 */
Greg Kroah-Hartman
maintainerPATCH 749/780 HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Terry Junge <[email protected]>
commit fe7f7ac8e0c708446ff017453add769ffc15deed upstream.
Update struct hid_descriptor to better reflect the mandatory and optional parts of the HID Descriptor as per USB HID 1.11 specification.
Note: the kernel currently does not parse any optional HID class descriptors, only the mandatory report descriptor.
Update all references to member element desc[0] to rpt_desc.
Add test to verify bLength and bNumDescriptors values are valid.
Replace the for loop with direct access to the mandatory HID class descriptor member for the report descriptor. This eliminates the possibility of getting an out-of-bounds fault.
Add a warning message if the HID descriptor contains any unsupported optional HID class descriptors.
--- drivers/hid/hid-hyperv.c | 4 ++-- drivers/hid/usbhid/hid-core.c | 25 ++++++++++++++----------- drivers/usb/gadget/function/f_hid.c | 12 ++++++------ include/linux/hid.h | 3 ++- 4 files changed, 24 insertions(+), 20 deletions(-)
drivers/hid/hid-hyperv.c +2 -2
@@ -192,7 +192,7 @@ static void mousevsc_on_receive_device_i goto cleanup; input_device->report_desc_size =le16_to_cpu ( - desc->desc[0 ].wDescriptorLength); + desc->rpt_desc.wDescriptorLength);if (input_device->report_desc_size ==0 ) { input_device->dev_info_status = -EINVAL ; goto cleanup;
@@ -210,7 +210,7 @@ static void mousevsc_on_receive_device_imemcpy (input_device->report_desc, ((unsigned char *)desc) + desc->bLength, -le16_to_cpu (desc->desc[0 ].wDescriptorLength)); +le16_to_cpu (desc->rpt_desc.wDescriptorLength));/* Send the ack */ memset (&ack,0 ,sizeof (struct mousevsc_prt_msg ));
drivers/hid/usbhid/hid-core.c +14 -11
@@ -984,12 +984,11 @@ static int usbhid_parse(struct hid_devicstruct usb_host_interface *interface = intf->cur_altsetting;struct usb_device *dev =interface_to_usbdev (intf);struct hid_descriptor *hdesc; +struct hid_class_descriptor *hcdesc;u32 quirks =0 ;unsigned int rsize =0 ;char *rdesc; -int ret, n; -int num_descriptors; -size_t offset = offsetof(struct hid_descriptor , desc); +int ret; quirks =hid_lookup_quirk (hid);
@@ -1011,20 +1010,19 @@ static int usbhid_parse(struct hid_devicreturn -ENODEV ; } -if (hdesc->bLength <sizeof (struct hid_descriptor )) { -dbg_hid ("hid descriptor is too short\n" ); +if (!hdesc->bNumDescriptors || + hdesc->bLength !=sizeof (*hdesc) + + (hdesc->bNumDescriptors -1 ) *sizeof (*hcdesc)) { +dbg_hid ("hid descriptor invalid, bLen=%hhu bNum=%hhu\n" , + hdesc->bLength, hdesc->bNumDescriptors);return -EINVAL ; } hid->version =le16_to_cpu (hdesc->bcdHID); hid->country = hdesc->bCountryCode; - num_descriptors =min_t (int, hdesc->bNumDescriptors, - (hdesc->bLength - offset) /sizeof (struct hid_class_descriptor )); - -for (n =0 ; n < num_descriptors; n++) -if (hdesc->desc[n].bDescriptorType ==HID_DT_REPORT ) - rsize =le16_to_cpu (hdesc->desc[n].wDescriptorLength); +if (hdesc->rpt_desc.bDescriptorType ==HID_DT_REPORT ) + rsize =le16_to_cpu (hdesc->rpt_desc.wDescriptorLength);if (!rsize || rsize >HID_MAX_DESCRIPTOR_SIZE ) {dbg_hid ("weird size of report descriptor (%u)\n" , rsize);
@@ -1052,6 +1050,11 @@ static int usbhid_parse(struct hid_devic goto err; } +if (hdesc->bNumDescriptors >1 ) +hid_warn (intf, +"%u unsupported optional hid class descriptors\n" , + (int )(hdesc->bNumDescriptors -1 )); + hid->quirks |= quirks;return 0 ;
drivers/usb/gadget/function/f_hid.c +6 -6
@@ -144,8 +144,8 @@ static struct hid_descriptor hidg_desc = .bcdHID = cpu_to_le16(0x0101), .bCountryCode = 0x00, .bNumDescriptors = 0x1, -/*.desc[0].bDescriptorType = DYNAMIC */ -/*.desc[0].wDescriptorLenght = DYNAMIC */ +/*.rpt_desc.bDescriptorType = DYNAMIC */ +/*.rpt_desc.wDescriptorLength = DYNAMIC */ };/* Super-Speed Support */
@@ -939,8 +939,8 @@ static int hidg_setup(struct usb_functiostruct hid_descriptor hidg_desc_copy = hidg_desc;VDBG (cdev,"USB_REQ_GET_DESCRIPTOR: HID\n" ); - hidg_desc_copy.desc[0 ].bDescriptorType =HID_DT_REPORT ; - hidg_desc_copy.desc[0 ].wDescriptorLength = + hidg_desc_copy.rpt_desc.bDescriptorType =HID_DT_REPORT ; + hidg_desc_copy.rpt_desc.wDescriptorLength =cpu_to_le16 (hidg->report_desc_length); length = min_t(unsigned short, length,
@@ -1210,8 +1210,8 @@ static int hidg_bind(struct usb_configur* We can use hidg_desc struct here but we should not relay * that its content won't change after returning from this function. */ - hidg_desc.desc[0 ].bDescriptorType =HID_DT_REPORT ; - hidg_desc.desc[0 ].wDescriptorLength = + hidg_desc.rpt_desc.bDescriptorType =HID_DT_REPORT ; + hidg_desc.rpt_desc.wDescriptorLength =cpu_to_le16 (hidg->report_desc_length); hidg_hs_in_ep_desc.bEndpointAddress =
include/linux/hid.h +2 -1
@@ -740,8 +740,9 @@ struct hid_descriptor {__le16 bcdHID;__u8 bCountryCode;__u8 bNumDescriptors; +struct hid_class_descriptor rpt_desc; -struct hid_class_descriptor desc[1 ]; +struct hid_class_descriptor opt_descs[]; } __attribute__ ((packed));#define HID_DEVICE (b, g, ven, prod) \
Greg Kroah-Hartman
maintainerPATCH 750/780 powerpc/kernel: Fix ppc_save_regs inclusion in build
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Madhavan Srinivasan <[email protected]>
commit 93bd4a80efeb521314485a06d8c21157240497bb upstream.
Recent patch fixed an old commit
'fc2a5a6161a2 ("powerpc/64s: ppc_save_regs is now needed for all 64s builds")' which is to include building of ppc_save_reg.c only when XMON
and KEXEC_CORE and PPC_BOOK3S are enabled. This was valid, since ppc_save_regs was called only in replay_system_reset() of old irq.c which was under BOOK3S.
But there has been multiple refactoring of irq.c and have added call to ppc_save_regs() from __replay_soft_interrupts -> replay_soft_interrupts which is part of irq_64.c included under CONFIG_PPC64. And since ppc_save_regs is called in CRASH_DUMP path as part of crash_setup_regs in kexec.h, CONFIG_PPC32 also needs it.
So with this recent patch which enabled the building of ppc_save_regs.c caused a build break when none of these (XMON, KEXEC_CORE, BOOK3S) where enabled as part of config. Patch to enable building of ppc_save_regs.c by defaults.
--- arch/powerpc/kernel/Makefile | 2 -- 1 file changed, 2 deletions(-)
arch/powerpc/kernel/Makefile +0 -2
@@ -160,9 +160,7 @@ endif obj64-$(CONFIG_PPC_TRANSACTIONAL_MEM) += tm.o -ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC_CORE)$(CONFIG_PPC_BOOK3S),) obj-y += ppc_save_regs.o -endif obj-$(CONFIG_EPAPR_PARAVIRT) += epapr_paravirt.o epapr_hcalls.o obj-$(CONFIG_KVM_GUEST) += kvm.o kvm_emul.o
Greg Kroah-Hartman
maintainerPATCH 751/780 posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleg Nesterov <[email protected]>
commit f90fff1e152dedf52b932240ebbd670d83330eca upstream.
If an exiting non-autoreaping task has already passed exit_notify() and calls handle_posix_cpu_timers() from IRQ, it can be reaped by its parent or debugger right after unlock_task_sighand().
If a concurrent posix_cpu_timer_del() runs at that moment, it won't be able to detect timer->it.cpu.firing != 0: cpu_timer_task_rcu() and/or lock_task_sighand() will fail.
Add the tsk->exit_state check into run_posix_cpu_timers() to fix this.
This fix is not needed if CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y, because exit_task_work() is called before exit_notify(). But the check still makes sense, task_work_add(&tsk->posix_cputimers_work.work) will fail anyway in this case.
--- kernel/time/posix-cpu-timers.c | 9 +++++++++ 1 file changed, 9 insertions(+)
kernel/time/posix-cpu-timers.c +9 -0
@@ -1406,6 +1406,15 @@ void run_posix_cpu_timers(void)lockdep_assert_irqs_disabled ();/* +* Ensure that release_task(tsk) can't happen while +* handle_posix_cpu_timers() is running. Otherwise, a concurrent +* posix_cpu_timer_del() may fail to lock_task_sighand(tsk) and +* miss timer->it.cpu.firing != 0. +*/ +if (tsk->exit_state) +return ; + +/* * If the actual expiry is deferred to task work context and the * work is already scheduled there is no point to do anything here. */
Greg Kroah-Hartman
maintainerPATCH 752/780 nvmem: zynqmp_nvmem: unbreak driver after cleanup
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Korsgaard <[email protected]>
commit fe8abdd175d7b547ae1a612757e7902bcd62e9cf upstream.
Commit 29be47fcd6a0 ("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup") changed the driver to expect the device pointer to be passed as the "context", but in nvmem the context parameter comes from nvmem_config.priv which is never set - Leading to null pointer exceptions when the device is accessed.
--- drivers/nvmem/zynqmp_nvmem.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvmem/zynqmp_nvmem.c +1 -0
@@ -213,6 +213,7 @@ static int zynqmp_nvmem_probe(struct pla econfig.word_size =1 ; econfig.size =ZYNQMP_NVMEM_SIZE ; econfig.dev = dev; + econfig.priv = dev; econfig.add_legacy_fixed_of_cells = true; econfig.reg_read = zynqmp_nvmem_read; econfig.reg_write = zynqmp_nvmem_write;
Greg Kroah-Hartman
maintainerPATCH 753/780 usb: usbtmc: Fix read_stb function and get_stb ioctl
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Penkler <[email protected]>
commit acb3dac2805d3342ded7dbbd164add32bbfdf21c upstream.
The usbtmc488_ioctl_read_stb function relied on a positive return from usbtmc_get_stb to reset the srq condition in the driver. The USBTMC_IOCTL_GET_STB case tested for a positive return to return the stb to the user.
Commit: <cac01bd178d6> ("usb: usbtmc: Fix erroneous get_stb ioctl error returns") changed the return value of usbtmc_get_stb to 0 on success instead of returning the value of usb_control_msg which is positive in the normal case. This change caused the function usbtmc488_ioctl_read_stb and the USBTMC_IOCTL_GET_STB ioctl to no longer function correctly.
Change the test in usbtmc488_ioctl_read_stb to test for failure first and return the failure code immediately.
Change the test for the USBTMC_IOCTL_GET_STB ioctl to test for 0 instead of a positive value.
--- drivers/usb/class/usbtmc.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/usb/class/usbtmc.c +9 -8
@@ -565,14 +565,15 @@ static int usbtmc488_ioctl_read_stb(stru rv =usbtmc_get_stb (file_data, &stb); -if (rv >0 ) { - srq_asserted =atomic_xchg (&file_data->srq_asserted, - srq_asserted); -if (srq_asserted) - stb |=0x40 ;/* Set RQS bit */ +if (rv <0 ) +return rv; + + srq_asserted =atomic_xchg (&file_data->srq_asserted, srq_asserted); +if (srq_asserted) + stb |=0x40 ;/* Set RQS bit */ + + rv =put_user (stb, (__u8 __user *)arg); - rv =put_user (stb, (__u8 __user *)arg); - }return rv; }
@@ -2201,7 +2202,7 @@ static long usbtmc_ioctl(struct file *ficase USBTMC_IOCTL_GET_STB : retval =usbtmc_get_stb (file_data, &tmp_byte); -if (retval >0 ) +if (!retval) retval =put_user (tmp_byte, (__u8 __user *)arg);break ;
Greg Kroah-Hartman
maintainerPATCH 754/780 VMCI: fix race between vmci_host_setup_notify and vmci_ctx_unset_notify
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wupeng Ma <[email protected]>
commit 1bd6406fb5f36c2bb1e96e27d4c3e9f4d09edde4 upstream.
During our test, it is found that a warning can be trigger in try_grab_folio as follow:
------------[ cut here ]------------ WARNING: CPU: 0 PID: 1678 at mm/gup.c:147 try_grab_folio+0x106/0x130 Modules linked in: CPU: 0 UID: 0 PID: 1678 Comm: syz.3.31 Not tainted 6.15.0-rc5 #163 PREEMPT(undef) RIP: 0010:try_grab_folio+0x106/0x130 Call Trace: <TASK> follow_huge_pmd+0x240/0x8e0 follow_pmd_mask.constprop.0.isra.0+0x40b/0x5c0 follow_pud_mask.constprop.0.isra.0+0x14a/0x170 follow_page_mask+0x1c2/0x1f0 __get_user_pages+0x176/0x950 __gup_longterm_locked+0x15b/0x1060 ? gup_fast+0x120/0x1f0 gup_fast_fallback+0x17e/0x230 get_user_pages_fast+0x5f/0x80 vmci_host_unlocked_ioctl+0x21c/0xf80 RIP: 0033:0x54d2cd ---[ end trace 0000000000000000 ]---
Digging into the source, context->notify_page may init by get_user_pages_fast and can be seen in vmci_ctx_unset_notify which will try to put_page. However get_user_pages_fast is not finished here and lead to following try_grab_folio warning. The race condition is shown as follow:
cpu0 cpu1vmci_host_do_set_notifyvmci_host_setup_notifyget_user_pages_fast(uva, 1, FOLL_WRITE, &context->notify_page); lockless_pages_from_mmgup_pgd_rangegup_huge_pmd // update &context->notify_page
vmci_host_do_set_notify vmci_ctx_unset_notify notify_page = context->notify_page; if (notify_page) put_page(notify_page); // page is freed
__gup_longterm_locked__get_user_pagesfollow_trans_huge_pmdtry_grab_folio // warn here
To slove this, use local variable page to make notify_page can be seen after finish get_user_pages_fast.
--- drivers/misc/vmw_vmci/vmci_host.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/misc/vmw_vmci/vmci_host.c +5 -6
@@ -227,6 +227,7 @@ static int drv_cp_harray_to_user(void __static int vmci_host_setup_notify (struct vmci_ctx *context,unsigned long uva) { +struct page *page;int retval;if (context->notify_page) {
@@ -243,13 +244,11 @@ static int vmci_host_setup_notify(struct/* * Lock physical page backing a given user VA. */ - retval =get_user_pages_fast (uva,1 ,FOLL_WRITE , &context->notify_page); -if (retval !=1 ) { - context->notify_page =NULL ; + retval =get_user_pages_fast (uva,1 ,FOLL_WRITE , &page); +if (retval !=1 )return VMCI_ERROR_GENERIC ; - } -if (context->notify_page ==NULL ) -return VMCI_ERROR_UNAVAILABLE ; + + context->notify_page = page;/* * Map the locked page and set up notify pointer.
Greg Kroah-Hartman
maintainerPATCH 755/780 tty: serial: 8250_omap: fix TX with DMA for am33xx
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Slaby (SUSE) <[email protected]>
commit b495021a973e2468497689bd3e29b736747b896f upstream.
Commit 1788cf6a91d9 ("tty: serial: switch from circ_buf to kfifo") introduced an error in the TX DMA handling for 8250_omap.
When the OMAP_DMA_TX_KICK flag is set, the "skip_byte" is pulled from the kfifo and emitted directly in order to start the DMA. While the kfifo is updated, dma->tx_size is not decreased. This leads to uart_xmit_advance() called in omap_8250_dma_tx_complete() advancing the kfifo by one too much.
In practice, transmitting N bytes has been seen to result in the last N-1 bytes being sent repeatedly.
This change fixes the problem by moving all of the dma setup after the OMAP_DMA_TX_KICK handling and using kfifo_len() instead of the DMA size for the 4-byte cutoff check. This slightly changes the behaviour at buffer wraparound, but it still transmits the correct bytes somehow.
Now, the "skip_byte" would no longer be accounted to the stats. As previously, dma->tx_size included also this skip byte, up->icount.tx was updated by aforementioned uart_xmit_advance() in omap_8250_dma_tx_complete(). Fix this by using the uart_fifo_out() helper instead of bare kfifo_get().
Based on patch by Mans Rullgard <[email protected]>
--- drivers/tty/serial/8250/8250_omap.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-)
drivers/tty/serial/8250/8250_omap.c +10 -15
@@ -1173,16 +1173,6 @@ static int omap_8250_tx_dma(struct uart_return 0 ; } -sg_init_table (&sg,1 ); - ret =kfifo_dma_out_prepare_mapped (&tport->xmit_fifo, &sg,1 , -UART_XMIT_SIZE , dma->tx_addr); -if (ret !=1 ) { -serial8250_clear_THRI (p); -return 0 ; - } - - dma->tx_size =sg_dma_len (&sg); -if (priv->habit &OMAP_DMA_TX_KICK ) {unsigned char c;u8 tx_lvl;
@@ -1207,18 +1197,22 @@ static int omap_8250_tx_dma(struct uart_ ret = -EBUSY ; goto err; } -if (dma->tx_size <4 ) { +if (kfifo_len (&tport->xmit_fifo) <4 ) { ret = -EINVAL ; goto err; } -if (!kfifo_get (&tport->xmit_fifo, &c)) { +if (!uart_fifo_out (&p->port, &c,1 )) { ret = -EINVAL ; goto err; } skip_byte = c; -/* now we need to recompute due to kfifo_get */ -kfifo_dma_out_prepare_mapped (&tport->xmit_fifo, &sg,1 , -UART_XMIT_SIZE , dma->tx_addr); + } + +sg_init_table (&sg,1 ); + ret =kfifo_dma_out_prepare_mapped (&tport->xmit_fifo, &sg,1 ,UART_XMIT_SIZE , dma->tx_addr); +if (ret !=1 ) { + ret = -EINVAL ; + goto err; } desc = dmaengine_prep_slave_sg(dma->txchan, &sg, 1, DMA_MEM_TO_DEV,
@@ -1228,6 +1222,7 @@ static int omap_8250_tx_dma(struct uart_ goto err; } + dma->tx_size =sg_dma_len (&sg); dma->tx_running =1 ; desc->callback = omap_8250_dma_tx_complete;
Greg Kroah-Hartman
maintainerPATCH 756/780 usb: misc: onboard_usb_dev: Fix usb5744 initialization sequence
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonathan Stroud <[email protected]>
commit 1143d41922c0f87504f095417ba1870167970143 upstream.
Introduce i2c APIs to read/write for proper configuration register programming. It ensures that read-modify-write sequence is performed and reserved bit in Runtime Flags 2 register are not touched.
Also legacy smbus block write inserted an extra count value into the i2c data stream which breaks the register write on the usb5744.
Switching to new read/write i2c APIs fixes both issues.
--- drivers/usb/misc/onboard_usb_dev.c | 100 ++++++++++++++++++++++++++++++++----- 1 file changed, 87 insertions(+), 13 deletions(-)
drivers/usb/misc/onboard_usb_dev.c +87 -13
@@ -36,9 +36,10 @@#define USB5744_CMD_CREG_ACCESS 0x99#define USB5744_CMD_CREG_ACCESS_LSB 0x37#define USB5744_CREG_MEM_ADDR 0x00 +#define USB5744_CREG_MEM_RD_ADDR 0x04#define USB5744_CREG_WRITE 0x00 -#define USB5744_CREG_RUNTIMEFLAGS2 0x41 -#define USB5744_CREG_RUNTIMEFLAGS2_LSB 0x1D +#define USB5744_CREG_READ 0x01 +#define USB5744_CREG_RUNTIMEFLAGS2 0x411D#define USB5744_CREG_BYPASS_UDC_SUSPEND BIT(3)static void onboard_dev_attach_usb_driver (struct work_struct *work);
@@ -309,11 +310,88 @@ static void onboard_dev_attach_usb_drivepr_err ("Failed to attach USB driver: %pe\n" ,ERR_PTR (err)); } +static int onboard_dev_5744_i2c_read_byte (struct i2c_client *client,u16 addr,u8 *data) +{ +struct i2c_msg msg[2 ]; +u8 rd_buf[3 ]; +int ret; + +u8 wr_buf[7 ] = {0 ,USB5744_CREG_MEM_ADDR ,4 , +USB5744_CREG_READ ,1 , + addr >>8 &0xff , + addr &0xff }; + msg[0 ].addr = client->addr; + msg[0 ].flags =0 ; + msg[0 ].len =sizeof (wr_buf); + msg[0 ].buf = wr_buf; + + ret =i2c_transfer (client->adapter, msg,1 ); +if (ret <0 ) +return ret; + + wr_buf[0 ] =USB5744_CMD_CREG_ACCESS ; + wr_buf[1 ] =USB5744_CMD_CREG_ACCESS_LSB ; + wr_buf[2 ] =0 ; + msg[0 ].len =3 ; + + ret =i2c_transfer (client->adapter, msg,1 ); +if (ret <0 ) +return ret; + + wr_buf[0 ] =0 ; + wr_buf[1 ] =USB5744_CREG_MEM_RD_ADDR ; + msg[0 ].len =2 ; + + msg[1 ].addr = client->addr; + msg[1 ].flags =I2C_M_RD ; + msg[1 ].len =2 ; + msg[1 ].buf = rd_buf; + + ret =i2c_transfer (client->adapter, msg,2 ); +if (ret <0 ) +return ret; + *data = rd_buf[1 ]; + +return 0 ; +} + +static int onboard_dev_5744_i2c_write_byte (struct i2c_client *client,u16 addr,u8 data) +{ +struct i2c_msg msg[2 ]; +int ret; + +u8 wr_buf[8 ] = {0 ,USB5744_CREG_MEM_ADDR ,5 , +USB5744_CREG_WRITE ,1 , + addr >>8 &0xff , + addr &0xff , + data}; + msg[0 ].addr = client->addr; + msg[0 ].flags =0 ; + msg[0 ].len =sizeof (wr_buf); + msg[0 ].buf = wr_buf; + + ret =i2c_transfer (client->adapter, msg,1 ); +if (ret <0 ) +return ret; + + msg[0 ].len =3 ; + wr_buf[0 ] =USB5744_CMD_CREG_ACCESS ; + wr_buf[1 ] =USB5744_CMD_CREG_ACCESS_LSB ; + wr_buf[2 ] =0 ; + + ret =i2c_transfer (client->adapter, msg,1 ); +if (ret <0 ) +return ret; + +return 0 ; +} +static int onboard_dev_5744_i2c_init (struct i2c_client *client) {#if IS_ENABLED (CONFIG_USB_ONBOARD_DEV_USB5744 )struct device *dev = &client->dev;int ret; +u8 reg;/* * Set BYPASS_UDC_SUSPEND bit to ensure MCU is always enabled
@@ -321,20 +399,16 @@ static int onboard_dev_5744_i2c_init(str* The command writes 5 bytes to memory and single data byte in * configuration register. */ -char wr_buf[7 ] = {USB5744_CREG_MEM_ADDR ,5 , -USB5744_CREG_WRITE ,1 , -USB5744_CREG_RUNTIMEFLAGS2 , -USB5744_CREG_RUNTIMEFLAGS2_LSB , -USB5744_CREG_BYPASS_UDC_SUSPEND }; - - ret =i2c_smbus_write_block_data (client,0 ,sizeof (wr_buf), wr_buf); + ret =onboard_dev_5744_i2c_read_byte (client, +USB5744_CREG_RUNTIMEFLAGS2 , ®);if (ret) -return dev_err_probe (dev, ret,"BYPASS_UDC_SUSPEND bit configuration failed\n" ); +return dev_err_probe (dev, ret,"CREG_RUNTIMEFLAGS2 read failed\n" ); - ret =i2c_smbus_write_word_data (client,USB5744_CMD_CREG_ACCESS , -USB5744_CMD_CREG_ACCESS_LSB ); + reg |=USB5744_CREG_BYPASS_UDC_SUSPEND ; + ret =onboard_dev_5744_i2c_write_byte (client, +USB5744_CREG_RUNTIMEFLAGS2 , reg);if (ret) -return dev_err_probe (dev, ret,"Configuration Register Access Command failed\n" ); +return dev_err_probe (dev, ret,"BYPASS_UDC_SUSPEND bit configuration failed\n" );/* Send SMBus command to boot hub. */ ret = i2c_smbus_write_word_data(client, USB5744_CMD_ATTACH,
Greg Kroah-Hartman
maintainerPATCH 757/780 usb: cdnsp: Fix issue with detecting command completion event
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pawel Laszczak <[email protected]>
commit f4ecdc352646f7d23f348e5c544dbe3212c94fc8 upstream.
In some cases, there is a small-time gap in which CMD_RING_BUSY can be cleared by controller but adding command completion event to event ring will be delayed. As the result driver will return error code.
This behavior has been detected on usbtest driver (test 9) with configuration including ep1in/ep1out bulk and ep2in/ep2out isoc endpoint.
Probably this gap occurred because controller was busy with adding some other events to event ring.
The CMD_RING_BUSY is cleared to '0' when the Command Descriptor has been executed and not when command completion event has been added to event ring.
To fix this issue for this test the small delay is sufficient less than 10us) but to make sure the problem doesn't happen again in the future the patch introduces 10 retries to check with delay about 20us before returning error code.
--- drivers/usb/cdns3/cdnsp-gadget.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/usb/cdns3/cdnsp-gadget.c +17 -1
@@ -547,6 +547,7 @@ int cdnsp_wait_for_cmd_compl(struct cdnsdma_addr_t cmd_deq_dma;union cdnsp_trb *event;u32 cycle_state; +u32 retry =10 ;int ret, val;u64 cmd_dma;u32 flags;
@@ -578,8 +579,23 @@ int cdnsp_wait_for_cmd_compl(struct cdns flags =le32_to_cpu (event->event_cmd.flags);/* Check the owner of the TRB. */ -if ((flags &TRB_CYCLE ) != cycle_state) +if ((flags &TRB_CYCLE ) != cycle_state) { +/* +* Give some extra time to get chance controller +* to finish command before returning error code. +* Checking CMD_RING_BUSY is not sufficient because +* this bit is cleared to '0' when the Command +* Descriptor has been executed by controller +* and not when command completion event has +* be added to event ring. +*/ +if (retry--) { +udelay (20 ); +continue ; + } +return -EINVAL ; + } cmd_dma =le64_to_cpu (event->event_cmd.cmd_trb);
Greg Kroah-Hartman
maintainerPATCH 758/780 usb: cdnsp: Fix issue with detecting USB 3.2 speed
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pawel Laszczak <[email protected]>
commit 2852788cfbe9ca1ab68509d65804413871f741f9 upstream.
Patch adds support for detecting SuperSpeedPlus Gen1 x2 and SuperSpeedPlus Gen2 x2 speed.
--- drivers/usb/cdns3/cdnsp-gadget.c | 3 ++- drivers/usb/cdns3/cdnsp-gadget.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/usb/cdns3/cdnsp-gadget.c +2 -1
@@ -29,7 +29,8 @@unsigned int cdnsp_port_speed (unsigned int port_status) {/*Detect gadget speed based on PORTSC register*/ -if (DEV_SUPERSPEEDPLUS (port_status)) +if (DEV_SUPERSPEEDPLUS (port_status) || +DEV_SSP_GEN1x2 (port_status) ||DEV_SSP_GEN2x2 (port_status))return USB_SPEED_SUPER_PLUS ;else if (DEV_SUPERSPEED (port_status))return USB_SPEED_SUPER ;
drivers/usb/cdns3/cdnsp-gadget.h +4 -0
@@ -285,11 +285,15 @@ struct cdnsp_port_regs {#define XDEV_HS (0x3 << 10)#define XDEV_SS (0x4 << 10)#define XDEV_SSP (0x5 << 10) +#define XDEV_SSP1x2 (0x6 << 10) +#define XDEV_SSP2x2 (0x7 << 10)#define DEV_UNDEFSPEED (p) (((p) & DEV_SPEED_MASK) == (0x0 << 10))#define DEV_FULLSPEED (p) (((p) & DEV_SPEED_MASK) == XDEV_FS)#define DEV_HIGHSPEED (p) (((p) & DEV_SPEED_MASK) == XDEV_HS)#define DEV_SUPERSPEED (p) (((p) & DEV_SPEED_MASK) == XDEV_SS)#define DEV_SUPERSPEEDPLUS (p) (((p) & DEV_SPEED_MASK) == XDEV_SSP) +#define DEV_SSP_GEN1x2 (p) (((p) & DEV_SPEED_MASK) == XDEV_SSP1x2) +#define DEV_SSP_GEN2x2 (p) (((p) & DEV_SPEED_MASK) == XDEV_SSP2x2)#define DEV_SUPERSPEED_ANY (p) (((p) & DEV_SPEED_MASK) >= XDEV_SS)#define DEV_PORT_SPEED (p) (((p) >> 10) & 0x0f)/* Port Link State Write Strobe - set this when changing link state */
Greg Kroah-Hartman
maintainerPATCH 759/780 usb: Flush altsetting 0 endpoints before reinitializating them after reset.
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Nyman <[email protected]>
commit 89bb3dc13ac29a563f4e4c555e422882f64742bd upstream.
usb core avoids sending a Set-Interface altsetting 0 request after device reset, and instead relies on calling usb_disable_interface() and usb_enable_interface() to flush and reset host-side of those endpoints.
xHCI hosts allocate and set up endpoint ring buffers and host_ep->hcpriv during usb_hcd_alloc_bandwidth() callback, which in this case is called before flushing the endpoint in usb_disable_interface().
Call usb_disable_interface() before usb_hcd_alloc_bandwidth() to ensure URBs are flushed before new ring buffers for the endpoints are allocated.
Otherwise host driver will attempt to find and remove old stale URBs from a freshly allocated new ringbuffer.
--- drivers/usb/core/hub.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
drivers/usb/core/hub.c +14 -2
@@ -6133,6 +6133,7 @@ static int usb_reset_and_verify_device(sstruct usb_hub *parent_hub;struct usb_hcd *hcd =bus_to_hcd (udev->bus);struct usb_device_descriptor descriptor; +struct usb_interface *intf;struct usb_host_bos *bos;int i, j, ret =0 ;int port1 = udev->portnum;
@@ -6190,6 +6191,18 @@ static int usb_reset_and_verify_device(sif (!udev->actconfig) goto done; +/* +* Some devices can't handle setting default altsetting 0 with a +* Set-Interface request. Disable host-side endpoints of those +* interfaces here. Enable and reset them back after host has set +* its internal endpoint structures during usb_hcd_alloc_bandwith() +*/ +for (i =0 ; i < udev->actconfig->desc.bNumInterfaces; i++) { + intf = udev->actconfig->interface[i]; +if (intf->cur_altsetting->desc.bAlternateSetting ==0 ) +usb_disable_interface (udev, intf, true); + } +mutex_lock (hcd->bandwidth_mutex); ret =usb_hcd_alloc_bandwidth (udev, udev->actconfig,NULL ,NULL );if (ret <0 ) {
@@ -6221,12 +6234,11 @@ static int usb_reset_and_verify_device(s*/ for (i =0 ; i < udev->actconfig->desc.bNumInterfaces; i++) {struct usb_host_config *config = udev->actconfig; -struct usb_interface *intf = config->interface[i];struct usb_interface_descriptor *desc; + intf = config->interface[i]; desc = &intf->cur_altsetting->desc;if (desc->bAlternateSetting ==0 ) { -usb_disable_interface (udev, intf, true);usb_enable_interface (udev, intf, true); ret =0 ; }else {
Greg Kroah-Hartman
maintainerPATCH 760/780 usb: typec: tcpm/tcpci_maxim: Fix bounds check in process_rx()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amit Sunil Dhamne <[email protected]>
commit 0736299d090f5c6a1032678705c4bc0a9511a3db upstream.
Register read of TCPC_RX_BYTE_CNT returns the total size consisting of:
PD message (pending read) size + 1 Byte for Frame Type (SOP*)
This is validated against the max PD message (struct pd_message) size without accounting for the extra byte for the frame type. Note that the struct pd_message does not contain a field for the frame_type. This results in false negatives when the "PD message (pending read)" is equal to the max PD message size.
--- drivers/usb/typec/tcpm/tcpci_maxim_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/typec/tcpm/tcpci_maxim_core.c +2 -1
@@ -166,7 +166,8 @@ static void process_rx(struct max_tcpci_return ; } -if (count >sizeof (struct pd_message ) || count +1 >TCPC_RECEIVE_BUFFER_LEN ) { +if (count >sizeof (struct pd_message ) +1 || + count +1 >TCPC_RECEIVE_BUFFER_LEN ) {dev_err (chip->dev,"Invalid TCPC_RX_BYTE_CNT %d\n" , count);return ; }
Greg Kroah-Hartman
maintainerPATCH 761/780 usb: typec: tcpm: move tcpm_queue_vdm_unlocked to asynchronous work
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: RD Babiera <[email protected]>
commit 324d45e53f1a36c88bc649dc39e0c8300a41be0a upstream.
A state check was previously added to tcpm_queue_vdm_unlocked to prevent a deadlock where the DisplayPort Alt Mode driver would be executing work and attempting to grab the tcpm_lock while the TCPM was holding the lock and attempting to unregister the altmode, blocking on the altmode driver's cancel_work_sync call.
Because the state check isn't protected, there is a small window where the Alt Mode driver could determine that the TCPM is in a ready state and attempt to grab the lock while the TCPM grabs the lock and changes the TCPM state to one that causes the deadlock. The callstack is provided below:
[110121.667392][ C7] Call trace: [110121.667396][ C7] __switch_to+0x174/0x338 [110121.667406][ C7] __schedule+0x608/0x9f0 [110121.667414][ C7] schedule+0x7c/0xe8 [110121.667423][ C7] kernfs_drain+0xb0/0x114 [110121.667431][ C7] __kernfs_remove+0x16c/0x20c [110121.667436][ C7] kernfs_remove_by_name_ns+0x74/0xe8 [110121.667442][ C7] sysfs_remove_group+0x84/0xe8 [110121.667450][ C7] sysfs_remove_groups+0x34/0x58 [110121.667458][ C7] device_remove_groups+0x10/0x20 [110121.667464][ C7] device_release_driver_internal+0x164/0x2e4 [110121.667475][ C7] device_release_driver+0x18/0x28 [110121.667484][ C7] bus_remove_device+0xec/0x118 [110121.667491][ C7] device_del+0x1e8/0x4ac [110121.667498][ C7] device_unregister+0x18/0x38 [110121.667504][ C7] typec_unregister_altmode+0x30/0x44 [110121.667515][ C7] tcpm_reset_port+0xac/0x370 [110121.667523][ C7] tcpm_snk_detach+0x84/0xb8 [110121.667529][ C7] run_state_machine+0x4c0/0x1b68 [110121.667536][ C7] tcpm_state_machine_work+0x94/0xe4 [110121.667544][ C7] kthread_worker_fn+0x10c/0x244 [110121.667552][ C7] kthread+0x104/0x1d4 [110121.667557][ C7] ret_from_fork+0x10/0x20
[110121.667689][ C7] Workqueue: events dp_altmode_work [110121.667697][ C7] Call trace: [110121.667701][ C7] __switch_to+0x174/0x338 [110121.667710][ C7] __schedule+0x608/0x9f0 [110121.667717][ C7] schedule+0x7c/0xe8 [110121.667725][ C7] schedule_preempt_disabled+0x24/0x40 [110121.667733][ C7] __mutex_lock+0x408/0xdac [110121.667741][ C7] __mutex_lock_slowpath+0x14/0x24 [110121.667748][ C7] mutex_lock+0x40/0xec [110121.667757][ C7] tcpm_altmode_enter+0x78/0xb4 [110121.667764][ C7] typec_altmode_enter+0xdc/0x10c [110121.667769][ C7] dp_altmode_work+0x68/0x164 [110121.667775][ C7] process_one_work+0x1e4/0x43c [110121.667783][ C7] worker_thread+0x25c/0x430 [110121.667789][ C7] kthread+0x104/0x1d4 [110121.667794][ C7] ret_from_fork+0x10/0x20
Change tcpm_queue_vdm_unlocked to queue for tcpm_queue_vdm_work, which can perform the state check while holding the TCPM lock while the Alt Mode lock is no longer held. This requires a new struct to hold the vdm data, altmode_vdm_event.
--- drivers/usb/typec/tcpm/tcpm.c | 91 ++++++++++++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 20 deletions(-)
drivers/usb/typec/tcpm/tcpm.c +71 -20
@@ -596,6 +596,15 @@ struct pd_rx_event {enum tcpm_transmit_type rx_sop_type; }; +struct altmode_vdm_event { +struct kthread_work work; +struct tcpm_port *port; +u32 header; +u32 *data; +int cnt; +enum tcpm_transmit_type tx_sop_type; +}; +static const char *const pd_rev[] = { [PD_REV10 ] ="rev1" , [PD_REV20 ] ="rev2" ,
@@ -1608,18 +1617,68 @@ static void tcpm_queue_vdm(struct tcpm_pmod_vdm_delayed_work (port,0 ); } -static void tcpm_queue_vdm_unlocked (struct tcpm_port *port,const u32 header, -const u32 *data,int cnt,enum tcpm_transmit_type tx_sop_type) +static void tcpm_queue_vdm_work (struct kthread_work *work) { -if (port->state !=SRC_READY && port->state !=SNK_READY && - port->state !=SRC_VDM_IDENTITY_REQUEST ) -return ; +struct altmode_vdm_event *event =container_of (work, + struct altmode_vdm_event, + work); +struct tcpm_port *port = event->port;mutex_lock (&port->lock); -tcpm_queue_vdm (port, header, data, cnt, tx_sop_type); +if (port->state !=SRC_READY && port->state !=SNK_READY && + port->state !=SRC_VDM_IDENTITY_REQUEST ) { +tcpm_log_force (port,"dropping altmode_vdm_event" ); + goto port_unlock; + } + +tcpm_queue_vdm (port, event->header, event->data, event->cnt, event->tx_sop_type); + +port_unlock: +kfree (event->data); +kfree (event);mutex_unlock (&port->lock); } +static int tcpm_queue_vdm_unlocked (struct tcpm_port *port,const u32 header, +const u32 *data,int cnt,enum tcpm_transmit_type tx_sop_type) +{ +struct altmode_vdm_event *event; +u32 *data_cpy; +int ret = -ENOMEM ; + + event =kzalloc (sizeof (*event),GFP_KERNEL ); +if (!event) + goto err_event; + + data_cpy =kcalloc (cnt,sizeof (u32),GFP_KERNEL ); +if (!data_cpy) + goto err_data; + +kthread_init_work (&event->work, tcpm_queue_vdm_work); + event->port = port; + event->header = header; +memcpy (data_cpy, data,sizeof (u32) * cnt); + event->data = data_cpy; + event->cnt = cnt; + event->tx_sop_type = tx_sop_type; + + ret =kthread_queue_work (port->wq, &event->work); +if (!ret) { + ret = -EBUSY ; + goto err_queue; + } + +return 0 ; + +err_queue: +kfree (data_cpy); +err_data: +kfree (event); +err_event: +tcpm_log_force (port,"failed to queue altmode vdm, err:%d" , ret); +return ret; +} +static void svdm_consume_identity (struct tcpm_port *port,const u32 *p,int cnt) {u32 vdo = p[VDO_INDEX_IDH ];
@@ -2830,8 +2889,7 @@ static int tcpm_altmode_enter(struct typ header =VDO (altmode->svid, vdo ?2 :1 , svdm_version,CMD_ENTER_MODE ); header |=VDO_OPOS (altmode->mode); -tcpm_queue_vdm_unlocked (port, header, vdo, vdo ?1 :0 ,TCPC_TX_SOP ); -return 0 ; +return tcpm_queue_vdm_unlocked (port, header, vdo, vdo ?1 :0 ,TCPC_TX_SOP ); }static int tcpm_altmode_exit (struct typec_altmode *altmode)
@@ -2847,8 +2905,7 @@ static int tcpm_altmode_exit(struct type header =VDO (altmode->svid,1 , svdm_version,CMD_EXIT_MODE ); header |=VDO_OPOS (altmode->mode); -tcpm_queue_vdm_unlocked (port, header,NULL ,0 ,TCPC_TX_SOP ); -return 0 ; +return tcpm_queue_vdm_unlocked (port, header,NULL ,0 ,TCPC_TX_SOP ); } static int tcpm_altmode_vdm(struct typec_altmode *altmode,
@@ -2856,9 +2913,7 @@ static int tcpm_altmode_vdm(struct typec {struct tcpm_port *port =typec_altmode_get_drvdata (altmode); -tcpm_queue_vdm_unlocked (port, header, data, count -1 ,TCPC_TX_SOP ); - -return 0 ; +return tcpm_queue_vdm_unlocked (port, header, data, count -1 ,TCPC_TX_SOP ); }static const struct typec_altmode_ops tcpm_altmode_ops = {
@@ -2882,8 +2937,7 @@ static int tcpm_cable_altmode_enter(stru header =VDO (altmode->svid, vdo ?2 :1 , svdm_version,CMD_ENTER_MODE ); header |=VDO_OPOS (altmode->mode); -tcpm_queue_vdm_unlocked (port, header, vdo, vdo ?1 :0 ,TCPC_TX_SOP_PRIME ); -return 0 ; +return tcpm_queue_vdm_unlocked (port, header, vdo, vdo ?1 :0 ,TCPC_TX_SOP_PRIME ); }static int tcpm_cable_altmode_exit (struct typec_altmode *altmode,enum typec_plug_index sop)
@@ -2899,8 +2953,7 @@ static int tcpm_cable_altmode_exit(struc header =VDO (altmode->svid,1 , svdm_version,CMD_EXIT_MODE ); header |=VDO_OPOS (altmode->mode); -tcpm_queue_vdm_unlocked (port, header,NULL ,0 ,TCPC_TX_SOP_PRIME ); -return 0 ; +return tcpm_queue_vdm_unlocked (port, header,NULL ,0 ,TCPC_TX_SOP_PRIME ); } static int tcpm_cable_altmode_vdm(struct typec_altmode *altmode, enum typec_plug_index sop,
@@ -2908,9 +2961,7 @@ static int tcpm_cable_altmode_vdm(struct {struct tcpm_port *port =typec_altmode_get_drvdata (altmode); -tcpm_queue_vdm_unlocked (port, header, data, count -1 ,TCPC_TX_SOP_PRIME ); - -return 0 ; +return tcpm_queue_vdm_unlocked (port, header, data, count -1 ,TCPC_TX_SOP_PRIME ); }static const struct typec_cable_ops tcpm_cable_ops = {
Greg Kroah-Hartman
maintainerPATCH 762/780 9p: Add a migrate_folio method
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Wilcox (Oracle) <[email protected]>
commit 03ddd7725ed1b39cf9251e1a420559f25dac49b3 upstream.
The migration code used to be able to migrate dirty 9p folios by writing them back using writepage. When the writepage method was removed, we neglected to add a migrate_folio method, which means that dirty 9p folios have been unmovable ever since. This reduced our success at defragmenting memory on machines which use 9p heavily.
--- fs/9p/vfs_addr.c | 1 + 1 file changed, 1 insertion(+)
fs/9p/vfs_addr.c +1 -0
@@ -165,4 +165,5 @@ const struct address_space_operations v9 .invalidate_folio = netfs_invalidate_folio, .direct_IO = noop_direct_IO, .writepages = netfs_writepages, + .migrate_folio = filemap_migrate_folio, };
Greg Kroah-Hartman
maintainerPATCH 763/780 Dont propagate mounts into detached trees
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <[email protected]>
commit 3b5260d12b1fe76b566fe182de8abc586b827ed0 upstream.
All versions up to 6.14 did not propagate mount events into detached tree. Shortly after 6.14 a merge of vfs-6.15-rc1.mount.namespace (130e696aa68b) has changed that.
Unfortunately, that has caused userland regressions (reported in
https://lore.kernel.org/all/CAOYeF9WQhFDe+BGW=Dp5fK8oRy5AgZ6zokVyTj1Wp4EUiYgt4w@mail.gmail.com/)
Straight revert wouldn't be an option - in particular, the variant in 6.14 had a bug that got fixed in d1ddc6f1d9f0 ("fix IS_MNT_PROPAGATING uses") and we don't want to bring the bug back.
This is a modification of manual revert posted by Christian, with changes needed to avoid reintroducing the breakage in scenario described in d1ddc6f1d9f0.
--- fs/mount.h | 5 ----- fs/namespace.c | 15 ++------------- fs/pnode.c | 4 ++-- 3 files changed, 4 insertions(+), 20 deletions(-)
fs/mount.h +0 -5
@@ -7,10 +7,6 @@extern struct list_head notify_list; -typedef __u32 __bitwise mntns_flags_t ; - -#define MNTNS_PROPAGATING ((__force mntns_flags_t)(1 << 0)) -struct mnt_namespace {struct ns_common ns;struct mount * root;
@@ -37,7 +33,6 @@ struct mnt_namespace {struct rb_node mnt_ns_tree_node;/* node in the mnt_ns_tree */ struct list_head mnt_ns_list;/* entry in the sequential list of mounts namespace */ refcount_t passive;/* number references not pinning @mounts */ -mntns_flags_t mntns_flags; } __randomize_layout;struct mnt_pcp {
fs/namespace.c +2 -13
@@ -3673,7 +3673,7 @@ static int do_move_mount(struct path *olif (!(attached ?check_mnt (old) :is_anon_ns (ns))) goto out; -if (is_anon_ns (ns)) { +if (is_anon_ns (ns) && ns == p->mnt_ns) {/* * Ending up with two files referring to the root of the * same anonymous mount namespace would cause an error
@@ -3681,16 +3681,7 @@ static int do_move_mount(struct path *ol* twice into the mount tree which would be rejected * later. But be explicit about it right here. */ -if ((is_anon_ns (p->mnt_ns) && ns == p->mnt_ns)) - goto out; - -/* -* If this is an anonymous mount tree ensure that mount -* propagation can detect mounts that were just -* propagated to the target mount tree so we don't -* propagate onto them. -*/ - ns->mntns_flags |=MNTNS_PROPAGATING ; + goto out; }else if (is_anon_ns (p->mnt_ns)) {/* * Don't allow moving an attached mount tree to an
@@ -3747,8 +3738,6 @@ static int do_move_mount(struct path *olif (attached)put_mountpoint (old_mp); out: -if (is_anon_ns (ns)) - ns->mntns_flags &= ~MNTNS_PROPAGATING ;unlock_mount (mp);if (!err) {if (attached) {
fs/pnode.c +2 -2
@@ -231,8 +231,8 @@ static int propagate_one(struct mount *m/* skip if mountpoint isn't visible in m */ if (!is_subdir (dest_mp->m_dentry, m->mnt.mnt_root))return 0 ; -/* skip if m is in the anon_ns we are emptying */ -if (m->mnt_ns->mntns_flags &MNTNS_PROPAGATING ) +/* skip if m is in the anon_ns */ +if (is_anon_ns (m->mnt_ns))return 0 ;if (peers (m, last_dest)) {
Greg Kroah-Hartman
maintainerPATCH 764/780 mm/filemap: gate dropbehind invalidate on folio !dirty && !writeback
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jens Axboe <[email protected]>
commit 095f627add86a6ddda2c2cfd563b0ee05d0172b2 upstream.
It's possible for the folio to either get marked for writeback or redirtied. Add a helper, filemap_end_dropbehind(), which guards the folio_unmap_invalidate() call behind check for the folio being both non-dirty and not under writeback AFTER the folio lock has been acquired. Use this helper folio_end_dropbehind_write().
--- mm/filemap.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
mm/filemap.c +11 -2
@@ -1589,6 +1589,16 @@ int folio_wait_private_2_killable(struct }EXPORT_SYMBOL (folio_wait_private_2_killable); +static void filemap_end_dropbehind (struct folio *folio) +{ +struct address_space *mapping = folio->mapping; + +VM_BUG_ON_FOLIO (!folio_test_locked (folio), folio); + +if (mapping && !folio_test_writeback (folio) && !folio_test_dirty (folio)) +folio_unmap_invalidate (mapping, folio,0 ); +} +/* * If folio was marked as dropbehind, then pages should be dropped when writeback * completes. Do that now. If we fail, it's likely because of a big folio -
@@ -1604,8 +1614,7 @@ static void folio_end_dropbehind_write(s* invalidation in that case. */ if (in_task () &&folio_trylock (folio)) { -if (folio->mapping) -folio_unmap_invalidate (folio->mapping, folio,0 ); +filemap_end_dropbehind (folio);folio_unlock (folio); } }
Greg Kroah-Hartman
maintainerPATCH 765/780 mm/filemap: use filemap_end_dropbehind() for read invalidation
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jens Axboe <[email protected]>
commit 25b065a744ff0c1099bb357be1c40030b5a14c07 upstream.
Use the filemap_end_dropbehind() helper rather than calling folio_unmap_invalidate() directly, as we need to check if the folio has been redirtied or marked for writeback once the folio lock has been re-acquired.
--- mm/filemap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
mm/filemap.c +3 -4
@@ -2644,8 +2644,7 @@ static inline bool pos_same_folio(loff_treturn (pos1 >> shift == pos2 >> shift); } -static void filemap_end_dropbehind_read (struct address_space *mapping, -struct folio *folio) +static void filemap_end_dropbehind_read (struct folio *folio) {if (!folio_test_dropbehind (folio))return ;
@@ -2653,7 +2652,7 @@ static void filemap_end_dropbehind_read(return ;if (folio_trylock (folio)) {if (folio_test_clear_dropbehind (folio)) -folio_unmap_invalidate (mapping, folio,0 ); +filemap_end_dropbehind (folio);folio_unlock (folio); } }
@@ -2774,7 +2773,7 @@ put_folios:for (i =0 ; i <folio_batch_count (&fbatch); i++) {struct folio *folio = fbatch.folios[i]; -filemap_end_dropbehind_read (mapping, folio); +filemap_end_dropbehind_read (folio);folio_put (folio); }folio_batch_init (&fbatch);
Greg Kroah-Hartman
maintainerPATCH 766/780 ring-buffer: Do not trigger WARN_ON() due to a commit_overrun
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt <[email protected]>
commit 4fc78a7c9ca994e1da5d3940704d4e8f0ea8c5e4 upstream.
When reading a memory mapped buffer the reader page is just swapped out with the last page written in the write buffer. If the reader page is the same as the commit buffer (the buffer that is currently being written to) it was assumed that it should never have missed events. If it does, it triggers a WARN_ON_ONCE().
But there just happens to be one scenario where this can legitimately happen. That is on a commit_overrun. A commit overrun is when an interrupt preempts an event being written to the buffer and then the interrupt adds so many new events that it fills and wraps the buffer back to the commit. Any new events would then be dropped and be reported as "missed_events".
In this case, the next page to read is the commit buffer and after the swap of the reader page, the reader page will be the commit buffer, but this time there will be missed events and this triggers the following warning:
------------[ cut here ]------------ WARNING: CPU: 2 PID: 1127 at kernel/trace/ring_buffer.c:7357 ring_buffer_map_get_reader+0x49a/0x780 Modules linked in: kvm_intel kvm irqbypass CPU: 2 UID: 0 PID: 1127 Comm: trace-cmd Not tainted 6.15.0-rc7-test-00004-g478bc2824b45-dirty #564 PREEMPT Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:ring_buffer_map_get_reader+0x49a/0x780 Code: 00 00 00 48 89 fe 48 c1 ee 03 80 3c 2e 00 0f 85 ec 01 00 00 4d 3b a6 a8 00 00 00 0f 85 8a fd ff ff 48 85 c0 0f 84 55 fe ff ff <0f> 0b e9 4e fe ff ff be 08 00 00 00 4c 89 54 24 58 48 89 54 24 50 RSP: 0018:ffff888121787dc0 EFLAGS: 00010002 RAX: 00000000000006a2 RBX: ffff888100062800 RCX: ffffffff8190cb49 RDX: ffff888126934c00 RSI: 1ffff11020200a15 RDI: ffff8881010050a8 RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffed1024d26982 R10: ffff888126934c17 R11: ffff8881010050a8 R12: ffff888126934c00 R13: ffff8881010050b8 R14: ffff888101005000 R15: ffff888126930008 FS: 00007f95c8cd7540(0000) GS:ffff8882b576e000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f95c8de4dc0 CR3: 0000000128452002 CR4: 0000000000172ef0 Call Trace: <TASK> ? __pfx_ring_buffer_map_get_reader+0x10/0x10 tracing_buffers_ioctl+0x283/0x370 __x64_sys_ioctl+0x134/0x190 do_syscall_64+0x79/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f95c8de48db Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00 RSP: 002b:00007ffe037ba110 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffe037bb2b0 RCX: 00007f95c8de48db RDX: 0000000000000000 RSI: 0000000000005220 RDI: 0000000000000006 RBP: 00007ffe037ba180 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe037bb6f8 R14: 00007f95c9065000 R15: 00005575c7492c90 </TASK> irq event stamp: 5080 hardirqs last enabled at (5079): [<ffffffff83e0adb0>] _raw_spin_unlock_irqrestore+0x50/0x70 hardirqs last disabled at (5080): [<ffffffff83e0aa83>] _raw_spin_lock_irqsave+0x63/0x70 softirqs last enabled at (4182): [<ffffffff81516122>] handle_softirqs+0x552/0x710 softirqs last disabled at (4159): [<ffffffff815163f7>] __irq_exit_rcu+0x107/0x210 ---[ end trace 0000000000000000 ]---
The above was triggered by running on a kernel with both lockdep and KASAN as well as kmemleak enabled and executing the following command:
# perf record -o perf-test.dat -a -- trace-cmd record --nosplice -e all -p function hackbench 50
With perf interjecting a lot of interrupts and trace-cmd enabling all events as well as function tracing, with lockdep, KASAN and kmemleak enabled, it could cause an interrupt preempting an event being written to add enough events to wrap the buffer. trace-cmd was modified to have --nosplice use mmap instead of reading the buffer.
The way to differentiate this case from the normal case of there only being one page written to where the swap of the reader page received that one page (which is the commit page), check if the tail page is on the reader page. The difference between the commit page and the tail page is that the tail page is where new writes go to, and the commit page holds the first write that hasn't been committed yet. In the case of an interrupt preempting the write of an event and filling the buffer, it would move the tail page but not the commit page.
Have the warning only trigger if the tail page is also on the reader page, and also print out the number of events dropped by a commit overrun as that can not yet be safely added to the page so that the reader can see there were events dropped.
--- kernel/trace/ring_buffer.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-)
kernel/trace/ring_buffer.c +18 -8
@@ -7284,8 +7284,8 @@ consume:/* Check if any events were dropped */ missed_events = cpu_buffer->lost_events; -if (cpu_buffer->reader_page != cpu_buffer->commit_page) { -if (missed_events) { +if (missed_events) { +if (cpu_buffer->reader_page != cpu_buffer->commit_page) {struct buffer_data_page *bpage = reader->page;unsigned int commit;/*
@@ -7306,13 +7306,23 @@ consume:local_add (RB_MISSED_STORED , &bpage->commit); }local_add (RB_MISSED_EVENTS , &bpage->commit); + }else if (!WARN_ONCE (cpu_buffer->reader_page == cpu_buffer->tail_page, +"Reader on commit with %ld missed events" , + missed_events)) { +/* +* There shouldn't be any missed events if the tail_page +* is on the reader page. But if the tail page is not on the +* reader page and the commit_page is, that would mean that +* there's a commit_overrun (an interrupt preempted an +* addition of an event and then filled the buffer +* with new events). In this case it's not an +* error, but it should still be reported. +* +* TODO: Add missed events to the page for user space to know. +*/ +pr_info ("Ring buffer [%d] commit overrun lost %ld events at timestamp:%lld\n" , + cpu, missed_events, cpu_buffer->reader_page->page->time_stamp); } - }else { -/* -* There really shouldn't be any missed events if the commit -* is on the reader page. -*/ -WARN_ON_ONCE (missed_events); } cpu_buffer->lost_events =0 ;
Greg Kroah-Hartman
maintainerPATCH 767/780 ring-buffer: Fix buffer locking in ring_buffer_subbuf_order_set()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Antipov <[email protected]>
commit 40ee2afafc1d9fe3aa44a6fbe440d78a5c96a72e upstream.
Enlarge the critical section in ring_buffer_subbuf_order_set() to ensure that error handling takes place with per-buffer mutex held, thus preventing list corruption and other concurrency-related issues.
--- kernel/trace/ring_buffer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/trace/ring_buffer.c +1 -3
@@ -6764,7 +6764,7 @@ int ring_buffer_subbuf_order_set(struct old_size = buffer->subbuf_size;/* prevent another thread from changing buffer sizes */ -mutex_lock (&buffer->mutex); +guard (mutex)(&buffer->mutex);atomic_inc (&buffer->record_disabled);/* Make sure all commits have finished */
@@ -6869,7 +6869,6 @@ int ring_buffer_subbuf_order_set(struct }atomic_dec (&buffer->record_disabled); -mutex_unlock (&buffer->mutex);return 0 ;
@@ -6878,7 +6877,6 @@ error: buffer->subbuf_size = old_size;atomic_dec (&buffer->record_disabled); -mutex_unlock (&buffer->mutex);for_each_buffer_cpu (buffer, cpu) { cpu_buffer = buffer->buffers[cpu];
Greg Kroah-Hartman
maintainerPATCH 768/780 ring-buffer: Move cpus_read_lock() outside of buffer->mutex
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt <[email protected]>
commit c98cc9797b7009308fff73d41bc1d08642dab77a upstream.
Running a modified trace-cmd record --nosplice where it does a mmap of the ring buffer when '--nosplice' is set, caused the following lockdep splat:
======================================================
WARNING: possible circular locking dependency detected 6.15.0-rc7-test-00002-gfb7d03d8a82f #551 Not tainted
------------------------------------------------------
trace-cmd/1113 is trying to acquire lock:
ffff888100062888 (&buffer->mutex){+.+.}-{4:4}, at: ring_buffer_map+0x11c/0xe70
but task is already holding lock:
ffff888100a5f9f8 (&cpu_buffer->mapping_lock){+.+.}-{4:4}, at: ring_buffer_map+0xcf/0xe70
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #5 (&cpu_buffer->mapping_lock){+.+.}-{4:4}:
__mutex_lock+0x192/0x18c0
ring_buffer_map+0xcf/0xe70
tracing_buffers_mmap+0x1c4/0x3b0
__mmap_region+0xd8d/0x1f70
do_mmap+0x9d7/0x1010
vm_mmap_pgoff+0x20b/0x390
ksys_mmap_pgoff+0x2e9/0x440
do_syscall_64+0x79/0x1c0
entry_SYSCALL_64_after_hwframe+0x76/0x7e-> #4 (&mm->mmap_lock){++++}-{4:4}:
__might_fault+0xa5/0x110
_copy_to_user+0x22/0x80
_perf_ioctl+0x61b/0x1b70
perf_ioctl+0x62/0x90
__x64_sys_ioctl+0x134/0x190
do_syscall_64+0x79/0x1c0
entry_SYSCALL_64_after_hwframe+0x76/0x7e-> #3 (&cpuctx_mutex){+.+.}-{4:4}:
__mutex_lock+0x192/0x18c0
perf_event_init_cpu+0x325/0x7c0
perf_event_init+0x52a/0x5b0
start_kernel+0x263/0x3e0
x86_64_start_reservations+0x24/0x30
x86_64_start_kernel+0x95/0xa0
common_startup_64+0x13e/0x141-> #2 (pmus_lock){+.+.}-{4:4}:
__mutex_lock+0x192/0x18c0
perf_event_init_cpu+0xb7/0x7c0
cpuhp_invoke_callback+0x2c0/0x1030
__cpuhp_invoke_callback_range+0xbf/0x1f0
_cpu_up+0x2e7/0x690
cpu_up+0x117/0x170
cpuhp_bringup_mask+0xd5/0x120
bringup_nonboot_cpus+0x13d/0x170
smp_init+0x2b/0xf0
kernel_init_freeable+0x441/0x6d0
kernel_init+0x1e/0x160
ret_from_fork+0x34/0x70
ret_from_fork_asm+0x1a/0x30-> #1 (cpu_hotplug_lock){++++}-{0:0}:
cpus_read_lock+0x2a/0xd0
ring_buffer_resize+0x610/0x14e0
__tracing_resize_ring_buffer.part.0+0x42/0x120
tracing_set_tracer+0x7bd/0xa80
tracing_set_trace_write+0x132/0x1e0
vfs_write+0x21c/0xe80
ksys_write+0xf9/0x1c0
do_syscall_64+0x79/0x1c0
entry_SYSCALL_64_after_hwframe+0x76/0x7e-> #0 (&buffer->mutex){+.+.}-{4:4}:
__lock_acquire+0x1405/0x2210
lock_acquire+0x174/0x310
__mutex_lock+0x192/0x18c0
ring_buffer_map+0x11c/0xe70
tracing_buffers_mmap+0x1c4/0x3b0
__mmap_region+0xd8d/0x1f70
do_mmap+0x9d7/0x1010
vm_mmap_pgoff+0x20b/0x390
ksys_mmap_pgoff+0x2e9/0x440
do_syscall_64+0x79/0x1c0
entry_SYSCALL_64_after_hwframe+0x76/0x7eother info that might help us debug this:
Chain exists of: &buffer->mutex --> &mm->mmap_lock --> &cpu_buffer->mapping_lock Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&cpu_buffer->mapping_lock);
lock(&mm->mmap_lock);
lock(&cpu_buffer->mapping_lock); lock(&buffer->mutex);
*** DEADLOCK ***
2 locks held by trace-cmd/1113:
#0: ffff888106b847e0 (&mm->mmap_lock){++++}-{4:4}, at: vm_mmap_pgoff+0x192/0x390 #1: ffff888100a5f9f8 (&cpu_buffer->mapping_lock){+.+.}-{4:4}, at: ring_buffer_map+0xcf/0xe70
stack backtrace: CPU: 5 UID: 0 PID: 1113 Comm: trace-cmd Not tainted 6.15.0-rc7-test-00002-gfb7d03d8a82f #551 PREEMPT Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x6e/0xa0 print_circular_bug.cold+0x178/0x1be check_noncircular+0x146/0x160 __lock_acquire+0x1405/0x2210 lock_acquire+0x174/0x310 ? ring_buffer_map+0x11c/0xe70 ? ring_buffer_map+0x11c/0xe70 ? __mutex_lock+0x169/0x18c0 __mutex_lock+0x192/0x18c0 ? ring_buffer_map+0x11c/0xe70 ? ring_buffer_map+0x11c/0xe70 ? function_trace_call+0x296/0x370 ? __pfx___mutex_lock+0x10/0x10 ? __pfx_function_trace_call+0x10/0x10 ? __pfx___mutex_lock+0x10/0x10 ? _raw_spin_unlock+0x2d/0x50 ? ring_buffer_map+0x11c/0xe70 ? ring_buffer_map+0x11c/0xe70 ? __mutex_lock+0x5/0x18c0 ring_buffer_map+0x11c/0xe70 ? do_raw_spin_lock+0x12d/0x270 ? find_held_lock+0x2b/0x80 ? _raw_spin_unlock+0x2d/0x50 ? rcu_is_watching+0x15/0xb0 ? _raw_spin_unlock+0x2d/0x50 ? trace_preempt_on+0xd0/0x110 tracing_buffers_mmap+0x1c4/0x3b0 __mmap_region+0xd8d/0x1f70 ? ring_buffer_lock_reserve+0x99/0xff0 ? __pfx___mmap_region+0x10/0x10 ? ring_buffer_lock_reserve+0x99/0xff0 ? __pfx_ring_buffer_lock_reserve+0x10/0x10 ? __pfx_ring_buffer_lock_reserve+0x10/0x10 ? bpf_lsm_mmap_addr+0x4/0x10 ? security_mmap_addr+0x46/0xd0 ? lock_is_held_type+0xd9/0x130 do_mmap+0x9d7/0x1010 ? 0xffffffffc0370095 ? __pfx_do_mmap+0x10/0x10 vm_mmap_pgoff+0x20b/0x390 ? __pfx_vm_mmap_pgoff+0x10/0x10 ? 0xffffffffc0370095 ksys_mmap_pgoff+0x2e9/0x440 do_syscall_64+0x79/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fb0963a7de2 Code: 00 00 00 0f 1f 44 00 00 41 f7 c1 ff 0f 00 00 75 27 55 89 cd 53 48 89 fb 48 85 ff 74 3b 41 89 ea 48 89 df b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 76 5b 5d c3 0f 1f 00 48 8b 05 e1 9f 0d 00 64 RSP: 002b:00007ffdcc8fb878 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb0963a7de2 RDX: 0000000000000001 RSI: 0000000000001000 RDI: 0000000000000000 RBP: 0000000000000001 R08: 0000000000000006 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdcc8fbe68 R14: 00007fb096628000 R15: 00005633e01a5c90 </TASK>
The issue is that cpus_read_lock() is taken within buffer->mutex. The memory mapped pages are taken with the mmap_lock held. The buffer->mutex is taken within the cpu_buffer->mapping_lock. There's quite a chain with all these locks, where the deadlock can be fixed by moving the cpus_read_lock() outside the taking of the buffer->mutex.
--- kernel/trace/ring_buffer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
kernel/trace/ring_buffer.c +6 -5
@@ -2849,6 +2849,12 @@ int ring_buffer_resize(struct trace_buffif (nr_pages <2 ) nr_pages =2 ; +/* +* Keep CPUs from coming online while resizing to synchronize +* with new per CPU buffers being created. +*/ +guard (cpus_read_lock)(); +/* prevent another thread from changing buffer sizes */ mutex_lock (&buffer->mutex);atomic_inc (&buffer->resizing);
@@ -2893,7 +2899,6 @@ int ring_buffer_resize(struct trace_buffcond_resched (); } -cpus_read_lock ();/* * Fire off all the required work handlers * We can't schedule on offline CPUs, but it's not necessary
@@ -2933,7 +2938,6 @@ int ring_buffer_resize(struct trace_buff cpu_buffer->nr_pages_to_update =0 ; } -cpus_read_unlock (); }else { cpu_buffer = buffer->buffers[cpu_id];
@@ -2961,8 +2965,6 @@ int ring_buffer_resize(struct trace_buff goto out_err; } -cpus_read_lock (); -/* Can't run something on an offline CPU. */ if (!cpu_online (cpu_id))rb_update_pages (cpu_buffer);
@@ -2981,7 +2983,6 @@ int ring_buffer_resize(struct trace_buff } cpu_buffer->nr_pages_to_update =0 ; -cpus_read_unlock (); } out:
Greg Kroah-Hartman
maintainerPATCH 769/780 xfs: dont assume perags are initialised when trimming AGs
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Chinner <[email protected]>
commit 23be716b1c4f3f3a6c00ee38d51a57ef7db9ef7d upstream.
When running fstrim immediately after mounting a V4 filesystem, the fstrim fails to trim all the free space in the filesystem. It only trims the first extent in the by-size free space tree in each AG and then returns. If a second fstrim is then run, it runs correctly and the entire free space in the filesystem is iterated and discarded correctly.
The problem lies in the setup of the trim cursor - it assumes that pag->pagf_longest is valid without either reading the AGF first or checking if xfs_perag_initialised_agf(pag) is true or not.
As a result, when a filesystem is mounted without reading the AGF (e.g. a clean mount on a v4 filesystem) and the first operation is a fstrim call, pag->pagf_longest is zero and so the free extent search starts at the wrong end of the by-size btree and exits after discarding the first record in the tree.
Fix this by deferring the initialisation of tcur->count to after we have locked the AGF and guaranteed that the perag is properly initialised. We trigger this on tcur->count == 0 after locking the AGF, as this will only occur on the first call to xfs_trim_gather_extents() for each AG. If we need to iterate, tcur->count will be set to the length of the record we need to restart at, so we can use this to ensure we only sample a valid pag->pagf_longest value for the iteration.
--- fs/xfs/xfs_discard.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
fs/xfs/xfs_discard.c +16 -1
@@ -167,6 +167,14 @@ xfs_discard_extents(return error; } +/* +* Care must be taken setting up the trim cursor as the perags may not have been +* initialised when the cursor is initialised. e.g. a clean mount which hasn't +* read in AGFs and the first operation run on the mounted fs is a trim. This +* can result in perag fields that aren't initialised until +* xfs_trim_gather_extents() calls xfs_alloc_read_agf() to lock down the AG for +* the free space search. +*/ struct xfs_trim_cur {xfs_agblock_t start;xfs_extlen_t count;
@@ -204,6 +212,14 @@ xfs_trim_gather_extents(if (error) goto out_trans_cancel; +/* +* First time through tcur->count will not have been initialised as +* pag->pagf_longest is not guaranteed to be valid before we read +* the AGF buffer above. +*/ +if (!tcur->count) + tcur->count = pag->pagf_longest; +if (tcur->by_bno) {/* sub-AG discard request always starts at tcur->start */ cur =xfs_bnobt_init_cursor (mp, tp, agbp, pag);
@@ -350,7 +366,6 @@ xfs_trim_perag_extents( {struct xfs_trim_cur tcur = { .start = start, - .count = pag->pagf_longest, .end = end, .minlen = minlen, };
Greg Kroah-Hartman
maintainerPATCH 770/780 xen/arm: call uaccess_ttbr0_enable for dm_op hypercall
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Stabellini <[email protected]>
commit 7f9bbc1140ff8796230bc2634055763e271fd692 upstream.
dm_op hypercalls might come from userspace and pass memory addresses as parameters. The memory addresses typically correspond to buffers allocated in userspace to hold extra hypercall parameters.
On ARM, when CONFIG_ARM64_SW_TTBR0_PAN is enabled, they might not be accessible by Xen, as a result ioreq hypercalls might fail. See the existing comment in arch/arm64/xen/hypercall.S regarding privcmd_call for reference.
For privcmd_call, Linux calls uaccess_ttbr0_enable before issuing the hypercall thanks to commit 9cf09d68b89a. We need to do the same for dm_op. This resolves the problem.
Message-ID: <alpine.DEB.2.22.394.2505121446370.8380@ubuntu-linux-20-04-desktop>
--- arch/arm64/xen/hypercall.S | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
arch/arm64/xen/hypercall.S +20 -1
@@ -83,7 +83,26 @@ HYPERCALL3(vcpu_op); HYPERCALL1(platform_op_raw); HYPERCALL2(multicall); HYPERCALL2(vm_assist); -HYPERCALL3(dm_op); + +SYM_FUNC_START(HYPERVISOR_dm_op) + mov x16, #__HYPERVISOR_dm_op; \ + /* + * dm_op hypercalls are issued by the userspace. The kernel needs to + * enable access to TTBR0_EL1 as the hypervisor would issue stage 1 + * translations to user memory via AT instructions. Since AT + * instructions are not affected by the PAN bit (ARMv8.1), we only + * need the explicit uaccess_enable/disable if the TTBR0 PAN emulation + * is enabled (it implies that hardware UAO and PAN disabled). + */ + uaccess_ttbr0_enable x6, x7, x8 + hvc XEN_IMM + + /* + * Disable userspace access from kernel once the hyp call completed. + */ + uaccess_ttbr0_disable x6, x7 + ret +SYM_FUNC_END(HYPERVISOR_dm_op); SYM_FUNC_START(privcmd_call) mov x16, x0
Greg Kroah-Hartman
maintainerPATCH 771/780 x86/iopl: Cure TIF_IO_BITMAP inconsistencies
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Gleixner <[email protected]>
commit 8b68e978718f14fdcb080c2a7791c52a0d09bc6d upstream.
io_bitmap_exit() is invoked from exit_thread() when a task exists or when a fork fails. In the latter case the exit_thread() cleans up resources which were allocated during fork().
io_bitmap_exit() invokes task_update_io_bitmap(), which in turn ends up in tss_update_io_bitmap(). tss_update_io_bitmap() operates on the current task. If current has TIF_IO_BITMAP set, but no bitmap installed, tss_update_io_bitmap() crashes with a NULL pointer dereference.
There are two issues, which lead to that problem:
1) io_bitmap_exit() should not invoke task_update_io_bitmap() when the task, which is cleaned up, is not the current task. That's a clear indicator for a cleanup after a failed fork().
2) A task should not have TIF_IO_BITMAP set and neither a bitmap installed nor IOPL emulation level 3 activated.
This happens when a kernel thread is created in the context of a user space thread, which has TIF_IO_BITMAP set as the thread flags are copied and the IO bitmap pointer is cleared.
Other than in the failed fork() case this has no impact because kernel threads including IO workers never return to user space and therefore never invoke tss_update_io_bitmap().
Cure this by adding the missing cleanups and checks:
1) Prevent io_bitmap_exit() to invoke task_update_io_bitmap() if the to be cleaned up task is not the current task.
2) Clear TIF_IO_BITMAP in copy_thread() unconditionally. For user space forks it is set later, when the IO bitmap is inherited in io_bitmap_share().
For paranoia sake, add a warning into tss_update_io_bitmap() to catch the case, when that code is invoked with inconsistent state.
--- arch/x86/kernel/ioport.c | 13 +++++++++---- arch/x86/kernel/process.c | 6 ++++++ 2 files changed, 15 insertions(+), 4 deletions(-)
arch/x86/kernel/ioport.c +9 -4
@@ -33,8 +33,9 @@ void io_bitmap_share(struct task_structset_tsk_thread_flag (tsk,TIF_IO_BITMAP ); } -static void task_update_io_bitmap (struct task_struct *tsk) +static void task_update_io_bitmap (void ) { +struct task_struct *tsk = current;struct thread_struct *t = &tsk->thread;if (t->iopl_emul ==3 || t->io_bitmap) {
@@ -54,7 +55,12 @@ void io_bitmap_exit(struct task_struct *struct io_bitmap *iobm = tsk->thread.io_bitmap; tsk->thread.io_bitmap =NULL ; -task_update_io_bitmap (tsk); +/* +* Don't touch the TSS when invoked on a failed fork(). TSS +* reflects the state of @current and not the state of @tsk. +*/ +if (tsk == current) +task_update_io_bitmap ();if (iobm &&refcount_dec_and_test (&iobm->refcnt))kfree (iobm); }
@@ -192,8 +198,7 @@ SYSCALL_DEFINE1(iopl, unsigned int, leve } t->iopl_emul = level; -task_update_io_bitmap (current); - +task_update_io_bitmap ();return 0 ; }
arch/x86/kernel/process.c +6 -0
@@ -181,6 +181,7 @@ int copy_thread(struct task_struct *p, c frame->ret_addr = (unsigned long ) ret_from_fork_asm; p->thread.sp = (unsigned long ) fork_frame; p->thread.io_bitmap =NULL ; +clear_tsk_thread_flag (p,TIF_IO_BITMAP ); p->thread.iopl_warn =0 ;memset (p->thread.ptrace_bps,0 ,sizeof (p->thread.ptrace_bps));
@@ -469,6 +470,11 @@ void native_tss_update_io_bitmap(void) }else {struct io_bitmap *iobm = t->io_bitmap; +if (WARN_ON_ONCE (!iobm)) { +clear_thread_flag (TIF_IO_BITMAP ); +native_tss_invalidate_io_bitmap (); + } +/* * Only copy bitmap data when the sequence number differs. The * update time is accounted to the incoming task.
Greg Kroah-Hartman
maintainerPATCH 772/780 x86/hyperv: Fix APIC ID and VP index confusion in hv_snp_boot_ap()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roman Kisel <[email protected]>
commit 86c48271e0d60c82665e9fd61277002391efcef7 upstream.
To start an application processor in SNP-isolated guest, a hypercall is used that takes a virtual processor index. The hv_snp_boot_ap() function uses that START_VP hypercall but passes as VP index to it what it receives as a wakeup_secondary_cpu_64 callback: the APIC ID.
As those two aren't generally interchangeable, that may lead to hung APs if the VP index and the APIC ID don't match up.
Update the parameter names to avoid confusion as to what the parameter is. Use the APIC ID to the VP index conversion to provide the correct input to the hypercall.
Message-ID: <[email protected]>
--- arch/x86/hyperv/hv_init.c | 33 ++++++++++++++++++++++++++++++ arch/x86/hyperv/hv_vtl.c | 44 +++++----------------------------------- arch/x86/hyperv/ivm.c | 22 ++++++++++++++++++-- arch/x86/include/asm/mshyperv.h | 6 +++-- include/hyperv/hvgdk_mini.h | 2 - 5 files changed, 64 insertions(+), 43 deletions(-)
arch/x86/hyperv/hv_init.c +33 -0
@@ -706,3 +706,36 @@ bool hv_is_hyperv_initialized(void)return hypercall_msr.enable; }EXPORT_SYMBOL_GPL (hv_is_hyperv_initialized); + +int hv_apicid_to_vp_index (u32 apic_id) +{ +u64 control; +u64 status; +unsigned long irq_flags; +struct hv_get_vp_from_apic_id_in *input; +u32 *output, ret; + +local_irq_save (irq_flags); + + input = *this_cpu_ptr (hyperv_pcpu_input_arg); +memset (input,0 ,sizeof (*input)); + input->partition_id =HV_PARTITION_ID_SELF ; + input->apic_ids[0 ] = apic_id; + + output = *this_cpu_ptr (hyperv_pcpu_output_arg); + + control =HV_HYPERCALL_REP_COMP_1 |HVCALL_GET_VP_INDEX_FROM_APIC_ID ; + status =hv_do_hypercall (control, input, output); + ret = output[0 ]; + +local_irq_restore (irq_flags); + +if (!hv_result_success (status)) { +pr_err ("failed to get vp index from apic id %d, status %#llx\n" , + apic_id, status); +return -EINVAL ; + } + +return ret; +} +EXPORT_SYMBOL_GPL (hv_apicid_to_vp_index);
arch/x86/hyperv/hv_vtl.c +6 -38
65 lines not on this page · raw message
arch/x86/hyperv/ivm.c +20 -2
@@ -9,6 +9,7 @@#include <linux/bitfield.h> #include <linux/types.h> #include <linux/slab.h> +#include <linux/cpu.h> #include <asm/svm.h> #include <asm/sev.h> #include <asm/io.h>
@@ -288,7 +289,7 @@ static void snp_cleanup_vmsa(struct sev_free_page ((unsigned long )vmsa); } -int hv_snp_boot_ap (u32 cpu,unsigned long start_ip) +int hv_snp_boot_ap (u32 apic_id,unsigned long start_ip) {struct sev_es_save_area *vmsa = (struct sev_es_save_area *)__get_free_page (GFP_KERNEL | __GFP_ZERO);
@@ -297,10 +298,27 @@ int hv_snp_boot_ap(u32 cpu, unsigned lonu64 ret, retry =5 ;struct hv_enable_vp_vtl *start_vp_input;unsigned long flags; +int cpu, vp_index;if (!vmsa)return -ENOMEM ; +/* Find the Hyper-V VP index which might be not the same as APIC ID */ + vp_index =hv_apicid_to_vp_index (apic_id); +if (vp_index <0 || vp_index > ms_hyperv.max_vp_index) +return -EINVAL ; + +/* +* Find the Linux CPU number for addressing the per-CPU data, and it +* might not be the same as APIC ID. +*/ +for_each_present_cpu (cpu) { +if (arch_match_cpu_phys_id (cpu, apic_id)) +break ; + } +if (cpu >= nr_cpu_ids) +return -EINVAL ; +native_store_gdt (&gdtr); vmsa->gdtr.base = gdtr.address;
@@ -348,7 +366,7 @@ int hv_snp_boot_ap(u32 cpu, unsigned lon start_vp_input = (struct hv_enable_vp_vtl *)ap_start_input_arg;memset (start_vp_input,0 ,sizeof (*start_vp_input)); start_vp_input->partition_id =-1 ; - start_vp_input->vp_index = cpu; + start_vp_input->vp_index = vp_index; start_vp_input->target_vtl.target_vtl = ms_hyperv.vtl; *(u64 *)&start_vp_input->vp_context =__pa (vmsa) |1 ;
arch/x86/include/asm/mshyperv.h +4 -2
@@ -268,11 +268,11 @@ int hv_unmap_ioapic_interrupt(int ioapic#ifdef CONFIG_AMD_MEM_ENCRYPT bool hv_ghcb_negotiate_protocol (void );void __noreturn hv_ghcb_terminate (unsigned int set,unsigned int reason); -int hv_snp_boot_ap (u32 cpu,unsigned long start_ip); +int hv_snp_boot_ap (u32 apic_id,unsigned long start_ip);#else static inline bool hv_ghcb_negotiate_protocol (void ) {return false; }static inline void hv_ghcb_terminate (unsigned int set,unsigned int reason) {} -static inline int hv_snp_boot_ap (u32 cpu,unsigned long start_ip) {return 0 ; } +static inline int hv_snp_boot_ap (u32 apic_id,unsigned long start_ip) {return 0 ; }#endif #if defined(CONFIG_AMD_MEM_ENCRYPT ) || defined(CONFIG_INTEL_TDX_GUEST )
@@ -306,6 +306,7 @@ static __always_inline u64 hv_raw_get_ms {return __rdmsr (reg); } +int hv_apicid_to_vp_index (u32 apic_id);#else /* CONFIG_HYPERV */ static inline void hyperv_init (void ) {}
@@ -327,6 +328,7 @@ static inline void hv_set_msr(unsigned istatic inline u64 hv_get_msr (unsigned int reg) {return 0 ; }static inline void hv_set_non_nested_msr (unsigned int reg,u64 value) { }static inline u64 hv_get_non_nested_msr (unsigned int reg) {return 0 ; } +static inline int hv_apicid_to_vp_index (u32 apic_id) {return -EINVAL ; }#endif /* CONFIG_HYPERV */
include/hyperv/hvgdk_mini.h +1 -1
@@ -475,7 +475,7 @@ union hv_vp_assist_msr_contents { /* HV#define HVCALL_CREATE_PORT 0x0095#define HVCALL_CONNECT_PORT 0x0096#define HVCALL_START_VP 0x0099 -#define HVCALL_GET_VP_ID_FROM_APIC_ID 0x009a +#define HVCALL_GET_VP_INDEX_FROM_APIC_ID 0x009a#define HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_SPACE 0x00af#define HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_LIST 0x00b0#define HVCALL_SIGNAL_EVENT_DIRECT 0x00c0
Greg Kroah-Hartman
maintainerPATCH 773/780 x86/fred/signal: Prevent immediate repeat of single step trap on return from SIGTRAP handler
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xin Li (Intel) <[email protected]>
commit e34dbbc85d64af59176fe59fad7b4122f4330fe2 upstream.
Clear the software event flag in the augmented SS to prevent immediate repeat of single step trap on return from SIGTRAP handler if the trap flag (TF) is set without an external debugger attached.
Following is a typical single-stepping flow for a user process:
1) The user process is prepared for single-stepping by setting RFLAGS.TF = 1.
2) When any instruction in user space completes, a #DB is triggered.
3) The kernel handles the #DB and returns to user space, invoking the SIGTRAP handler with RFLAGS.TF = 0.
4) After the SIGTRAP handler finishes, the user process performs a sigreturn syscall, restoring the original state, including RFLAGS.TF = 1.
5) Goto step 2.
According to the FRED specification:
A) Bit 17 in the augmented SS is designated as the software event flag, which is set to 1 for FRED event delivery of SYSCALL, SYSENTER, or INT n.
B) If bit 17 of the augmented SS is 1 and ERETU would result in RFLAGS.TF = 1, a single-step trap will be pending upon completion of ERETU.
In step 4) above, the software event flag is set upon the sigreturn syscall, and its corresponding ERETU would restore RFLAGS.TF = 1. This combination causes a pending single-step trap upon completion of ERETU. Therefore, another #DB is triggered before any user space instruction is executed, which leads to an infinite loop in which the SIGTRAP handler keeps being invoked on the same user space IP.
--- arch/x86/include/asm/sighandling.h | 22 ++++++++++++++++++++++ arch/x86/kernel/signal_32.c | 4 ++++ arch/x86/kernel/signal_64.c | 4 ++++ 3 files changed, 30 insertions(+)
arch/x86/include/asm/sighandling.h +22 -0
@@ -24,4 +24,26 @@ int ia32_setup_rt_frame(struct ksignal *int x64_setup_rt_frame (struct ksignal *ksig,struct pt_regs *regs);int x32_setup_rt_frame (struct ksignal *ksig,struct pt_regs *regs); +/* +* To prevent immediate repeat of single step trap on return from SIGTRAP +* handler if the trap flag (TF) is set without an external debugger attached, +* clear the software event flag in the augmented SS, ensuring no single-step +* trap is pending upon ERETU completion. +* +* Note, this function should be called in sigreturn() before the original +* state is restored to make sure the TF is read from the entry frame. +*/ +static __always_inline void prevent_single_step_upon_eretu(struct pt_regs *regs) +{ +/* +* If the trap flag (TF) is set, i.e., the sigreturn() SYSCALL instruction +* is being single-stepped, do not clear the software event flag in the +* augmented SS, thus a debugger won't skip over the following instruction. +*/ +#ifdef CONFIG_X86_FRED +if (!(regs->flags &X86_EFLAGS_TF )) + regs->fred_ss.swevent =0 ; +#endif +} +#endif /* _ASM_X86_SIGHANDLING_H */
arch/x86/kernel/signal_32.c +4 -0
@@ -152,6 +152,8 @@ SYSCALL32_DEFINE0(sigreturn)struct sigframe_ia32 __user *frame = (struct sigframe_ia32 __user *)(regs->sp-8 );sigset_t set; +prevent_single_step_upon_eretu (regs); +if (!access_ok (frame,sizeof (*frame))) goto badframe; if (__get_user(set.sig[0], &frame->sc.oldmask)
@@ -175,6 +177,8 @@ SYSCALL32_DEFINE0(rt_sigreturn)struct rt_sigframe_ia32 __user *frame;sigset_t set; +prevent_single_step_upon_eretu (regs); + frame = (struct rt_sigframe_ia32 __user *)(regs->sp -4 );if (!access_ok (frame,sizeof (*frame)))
arch/x86/kernel/signal_64.c +4 -0
@@ -250,6 +250,8 @@ SYSCALL_DEFINE0(rt_sigreturn)sigset_t set;unsigned long uc_flags; +prevent_single_step_upon_eretu (regs); + frame = (struct rt_sigframe __user *)(regs->sp -sizeof (long ));if (!access_ok (frame,sizeof (*frame))) goto badframe;
@@ -366,6 +368,8 @@ COMPAT_SYSCALL_DEFINE0(x32_rt_sigreturn)sigset_t set;unsigned long uc_flags; +prevent_single_step_upon_eretu (regs); + frame = (struct rt_sigframe_x32 __user *)(regs->sp -8 );if (!access_ok (frame,sizeof (*frame)))
Greg Kroah-Hartman
maintainerPATCH 774/780 calipso: unlock rcu before returning -EAFNOSUPPORT
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
commit 3cae906e1a6184cdc9e4d260e4dbdf9a118d94ad upstream.
syzbot reported that a recent patch forgot to unlock rcu in the error path.
Adopt the convention that netlbl_conn_setattr() is already using.
--- net/netlabel/netlabel_kapi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/netlabel/netlabel_kapi.c +4 -2
@@ -1165,8 +1165,10 @@ int netlbl_conn_setattr(struct sock *sk,break ;#if IS_ENABLED (CONFIG_IPV6 )case AF_INET6 : -if (sk->sk_family !=AF_INET6 ) -return -EAFNOSUPPORT ; +if (sk->sk_family !=AF_INET6 ) { + ret_val = -EAFNOSUPPORT ; + goto conn_setattr_return; + } addr6 = (struct sockaddr_in6 *)addr; entry = netlbl_domhsh_getentry_af6(secattr->domain,
Greg Kroah-Hartman
maintainerPATCH 775/780 do_move_mount(): split the checks in subtree-of-our-ns and entire-anon cases
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <[email protected]>
commit 290da20e333955637f00647d9fff7c6e3c0b61e0 upstream.
... and fix the breakage in anon-to-anon case. There are two cases acceptable for do_move_mount() and mixing checks for those is making things hard to follow.
One case is move of a subtree in caller's namespace.
* source and destination must be in caller's namespace
* source must be detachable from parent
Another is moving the entire anon namespace elsewhere
* source must be the root of anon namespace
* target must either in caller's namespace or in a suitable anon namespace (see may_use_mount() for details).
* target must not be in the same namespace as source.
It's really easier to follow if tests are *not* mixed together...
--- fs/namespace.c | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-)
fs/namespace.c +25 -21
@@ -3662,37 +3662,41 @@ static int do_move_mount(struct path *ol ns = old->mnt_ns; err = -EINVAL ; -if (!may_use_mount (p)) - goto out; -/* The thing moved must be mounted... */ if (!is_mounted (&old->mnt)) goto out; -/* ... and either ours or the root of anon namespace */ -if (!(attached ?check_mnt (old) :is_anon_ns (ns))) - goto out; - -if (is_anon_ns (ns) && ns == p->mnt_ns) { +if (check_mnt (old)) { +/* if the source is in our namespace... */ +/* ... it should be detachable from parent */ +if (!mnt_has_parent (old) ||IS_MNT_LOCKED (old)) + goto out; +/* ... and the target should be in our namespace */ +if (!check_mnt (p)) + goto out; + }else {/* -* Ending up with two files referring to the root of the -* same anonymous mount namespace would cause an error -* as this would mean trying to move the same mount -* twice into the mount tree which would be rejected -* later. But be explicit about it right here. +* otherwise the source must be the root of some anon namespace. +* AV: check for mount being root of an anon namespace is worth +* an inlined predicate... */ - goto out; - }else if (is_anon_ns (p->mnt_ns)) { +if (!is_anon_ns (ns) ||mnt_has_parent (old)) + goto out;/* -* Don't allow moving an attached mount tree to an -* anonymous mount tree. +* Bail out early if the target is within the same namespace - +* subsequent checks would've rejected that, but they lose +* some corner cases if we check it early. */ - goto out; +if (ns == p->mnt_ns) + goto out; +/* +* Target should be either in our namespace or in an acceptable +* anon namespace, sensu check_anonymous_mnt(). +*/ +if (!may_use_mount (p)) + goto out; } -if (old->mnt.mnt_flags &MNT_LOCKED ) - goto out; -if (!path_mounted (old_path)) goto out;
Greg Kroah-Hartman
maintainerPATCH 776/780 regulator: dt-bindings: mt6357: Drop fixed compatible requirement
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nícolas F. R. A. Prado <[email protected]>
commit 9cfdd7752ba5f8cc9b8191e8c9aeeec246241fa4 upstream.
Some of the regulators on the MT6357 PMIC currently reference the fixed-regulator dt-binding, which enforces the presence of a regulator-fixed compatible. However since all regulators on the MT6357 PMIC are handled by a single mt6357-regulator driver, probed through MFD, the compatibles don't serve any purpose. In fact they cause failures in the DT kselftest since they aren't probed by the fixed regulator driver as would be expected. Furthermore this is the only dt-binding in this family like this: mt6359-regulator and mt6358-regulator don't require those compatibles.
Commit d77e89b7b03f ("arm64: dts: mediatek: mt6357: Drop regulator-fixed compatibles") removed the compatibles from Devicetree, but missed updating the binding, which still requires them, introducing dt-binding errors. Remove the compatible requirement by referencing the plain regulator dt-binding instead to fix the dt-binding errors.
--- Documentation/devicetree/bindings/regulator/mediatek,mt6357-regulator.yaml | 12 ---------- 1 file changed, 1 insertion(+), 11 deletions(-)
Documentation/devicetree/bindings/regulator/mediatek,mt6357-regulator.yaml +1 -11
@@ -33,7 +33,7 @@ patternProperties: "^ldo-v(camio18|aud28|aux18|io18|io28|rf12|rf18|cn18|cn28|fe28)$": type: object - $ref: fixed-regulator.yaml# + $ref: regulator.yaml# unevaluatedProperties: false description: Properties for single fixed LDO regulator.
@@ -112,7 +112,6 @@ examples: regulator-enable-ramp-delay = <220>; }; mt6357_vfe28_reg: ldo-vfe28 { - compatible = "regulator-fixed"; regulator-name = "vfe28"; regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
@@ -125,14 +124,12 @@ examples: regulator-enable-ramp-delay = <110>; }; mt6357_vrf18_reg: ldo-vrf18 { - compatible = "regulator-fixed"; regulator-name = "vrf18"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-enable-ramp-delay = <110>; }; mt6357_vrf12_reg: ldo-vrf12 { - compatible = "regulator-fixed"; regulator-name = "vrf12"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>;
@@ -157,14 +154,12 @@ examples: regulator-enable-ramp-delay = <264>; }; mt6357_vcn28_reg: ldo-vcn28 { - compatible = "regulator-fixed"; regulator-name = "vcn28"; regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; regulator-enable-ramp-delay = <264>; }; mt6357_vcn18_reg: ldo-vcn18 { - compatible = "regulator-fixed"; regulator-name = "vcn18"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@@ -183,7 +178,6 @@ examples: regulator-enable-ramp-delay = <264>; }; mt6357_vcamio_reg: ldo-vcamio18 { - compatible = "regulator-fixed"; regulator-name = "vcamio"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@@ -212,28 +206,24 @@ examples: regulator-always-on; }; mt6357_vaux18_reg: ldo-vaux18 { - compatible = "regulator-fixed"; regulator-name = "vaux18"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-enable-ramp-delay = <264>; }; mt6357_vaud28_reg: ldo-vaud28 { - compatible = "regulator-fixed"; regulator-name = "vaud28"; regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; regulator-enable-ramp-delay = <264>; }; mt6357_vio28_reg: ldo-vio28 { - compatible = "regulator-fixed"; regulator-name = "vio28"; regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; regulator-enable-ramp-delay = <264>; }; mt6357_vio18_reg: ldo-vio18 { - compatible = "regulator-fixed"; regulator-name = "vio18"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
Greg Kroah-Hartman
maintainerPATCH 777/780 usb: misc: onboard_usb_dev: fix build warning for CONFIG_USB_ONBOARD_DEV_USB5744=n
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
commit 662a9ece32add94469138ae66999ee16cb37a531 upstream.
When the USB5744 option is disabled, the onboard_usb driver warns about unused functions:
drivers/usb/misc/onboard_usb_dev.c:358:12: error: 'onboard_dev_5744_i2c_write_byte' defined but not used [-Werror=unused-function]
358 | static int onboard_dev_5744_i2c_write_byte(struct i2c_client *client, u16 addr, u8 data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/misc/onboard_usb_dev.c:313:12: error: 'onboard_dev_5744_i2c_read_byte' defined but not used [-Werror=unused-function]
313 | static int onboard_dev_5744_i2c_read_byte(struct i2c_client *client, u16 addr, u8 *data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Extend the #ifdef block a little further to cover all of these functions. Ideally we'd use use if(IS_ENABLED()) instead, but that doesn't currently work because the i2c_transfer() and i2c_smbus_write_word_data() function declarations are hidden when CONFIG_I2C is disabled.
--- drivers/usb/misc/onboard_usb_dev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/usb/misc/onboard_usb_dev.c +5 -2
@@ -310,6 +310,7 @@ static void onboard_dev_attach_usb_drivepr_err ("Failed to attach USB driver: %pe\n" ,ERR_PTR (err)); } +#if IS_ENABLED (CONFIG_USB_ONBOARD_DEV_USB5744 )static int onboard_dev_5744_i2c_read_byte (struct i2c_client *client,u16 addr,u8 *data) {struct i2c_msg msg[2 ];
@@ -388,7 +389,6 @@ static int onboard_dev_5744_i2c_write_bystatic int onboard_dev_5744_i2c_init (struct i2c_client *client) { -#if IS_ENABLED (CONFIG_USB_ONBOARD_DEV_USB5744 )struct device *dev = &client->dev;int ret;u8 reg;
@@ -417,10 +417,13 @@ static int onboard_dev_5744_i2c_init(strreturn dev_err_probe (dev, ret,"USB Attach with SMBus command failed\n" ); return ret; +}#else +static int onboard_dev_5744_i2c_init (struct i2c_client *client) +{return -ENODEV ; -#endif } +#endif static int onboard_dev_probe (struct platform_device *pdev) {
Greg Kroah-Hartman
maintainerPATCH 778/780 net: usb: aqc111: debug info before sanitation
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit d3faab9b5a6a0477d69c38bd11c43aa5e936f929 upstream.
If we sanitize error returns, the debug statements need to come before that so that we don't lose information.
--- drivers/net/usb/aqc111.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/usb/aqc111.c +4 -4
@@ -31,11 +31,11 @@ static int aqc111_read_cmd_nopm(struct u USB_RECIP_DEVICE, value, index, data, size);if (unlikely (ret < size)) { - ret = ret <0 ? ret : -ENODATA ; -netdev_warn (dev->net,"Failed to read(0x%x) reg index 0x%04x: %d\n" , cmd, index, ret); + + ret = ret <0 ? ret : -ENODATA ; }return ret;
@@ -50,11 +50,11 @@ static int aqc111_read_cmd(struct usbnet USB_RECIP_DEVICE, value, index, data, size);if (unlikely (ret < size)) { - ret = ret <0 ? ret : -ENODATA ; -netdev_warn (dev->net,"Failed to read(0x%x) reg index 0x%04x: %d\n" , cmd, index, ret); + + ret = ret <0 ? ret : -ENODATA ; }return ret;
Greg Kroah-Hartman
maintainerPATCH 779/780 overflow: Introduce __DEFINE_FLEX for having no initializer
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
commit 5c78e793f78732b60276401f75cc1a101f9ad121 upstream.
While not yet in the tree, there is a proposed patch[1] that was depending on the prior behavior of _DEFINE_FLEX, which did not have an explicit initializer. Provide this via __DEFINE_FLEX now, which can also have attributes applied (e.g. __uninitialized).
Examples of the resulting initializer behaviors can be seen here:
https://godbolt.org/z/P7Go8Tr33
--- include/linux/overflow.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-)
include/linux/overflow.h +19 -6
@@ -389,25 +389,38 @@ static inline size_t __must_check size_sstruct_size ((type *)NULL , member, count)/** -* _DEFINE_FLEX() - helper macro for DEFINE_FLEX() family. -* Enables caller macro to pass (different) initializer. +* __DEFINE_FLEX() - helper macro for DEFINE_FLEX() family. +* Enables caller macro to pass arbitrary trailing expressions * * @type: structure type name, including "struct" keyword. * @name: Name for a variable to define. * @member: Name of the array member. * @count: Number of elements in the array; must be compile-time const. -* @initializer: Initializer expression (e.g., pass `= { }` at minimum). +* @trailer: Trailing expressions for attributes and/or initializers. */ -#define _DEFINE_FLEX(type, name, member, count, initializer...) \ +#define __DEFINE_FLEX(type, name, member, count, trailer...) \ _Static_assert(__builtin_constant_p(count), \ "onstack flex array members require compile-time const count"); \ union { \ u8 bytes[struct_size_t(type, member, count)]; \ type obj; \ - } name##_u = { .obj initializer }; \ + } name##_u trailer; \ type *name = (type *)&name##_u/** +* _DEFINE_FLEX() - helper macro for DEFINE_FLEX() family. +* Enables caller macro to pass (different) initializer. +* +* @type: structure type name, including "struct" keyword. +* @name: Name for a variable to define. +* @member: Name of the array member. +* @count: Number of elements in the array; must be compile-time const. +* @initializer: Initializer expression (e.g., pass `= { }` at minimum). +*/ +#define _DEFINE_FLEX(type, name, member, count, initializer...) \ + __DEFINE_FLEX(type, name, member, count, = { .obj initializer }) + +/** * DEFINE_RAW_FLEX() - Define an on-stack instance of structure with a trailing * flexible array member, when it does not have a __counted_by annotation. *
@@ -421,7 +434,7 @@ static inline size_t __must_check size_s* Use __struct_size(@name) to get compile-time size of it afterwards. */ #define DEFINE_RAW_FLEX (type, name, member, count) \ - _DEFINE_FLEX(type, name, member, count, = {}) + __DEFINE_FLEX(type, name, member, count, = { })/** * DEFINE_FLEX() - Define an on-stack instance of structure with a trailing
Greg Kroah-Hartman
maintainerPATCH 780/780 gfs2: Dont clear sb->s_fs_info in gfs2_sys_fs_add
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Price <[email protected]>
commit 9126d2754c5e5d1818765811a10af0a14cf1fa0a upstream.
When gfs2_sys_fs_add() fails, it sets sb->s_fs_info to NULL on its error path (see commit 0d515210b696 ("GFS2: Add kobject release method")). The intention seems to be to prevent dereferencing sb->s_fs_info once the object pointed to has been deallocated, but that would be better achieved by setting the pointer to NULL in free_sbd().
As a consequence, when the call to gfs2_sys_fs_add() fails in gfs2_fill_super(), sdp = GFS2_SB(inode) will evaluate to NULL in iput() -> gfs2_drop_inode(), and accessing sdp->sd_flags will be a NULL pointer dereference.
Fix that by only setting sb->s_fs_info to NULL when actually freeing the object pointed to in free_sbd().
--- fs/gfs2/ops_fstype.c | 4 +++- fs/gfs2/sys.c | 1 - 2 files changed, 3 insertions(+), 2 deletions(-)
fs/gfs2/ops_fstype.c +3 -1
@@ -64,8 +64,11 @@ static void gfs2_tune_init(struct gfs2_tvoid free_sbd (struct gfs2_sbd *sdp) { +struct super_block *sb = sdp->sd_vfs; +if (sdp->sd_lkstats)free_percpu (sdp->sd_lkstats); + sb->s_fs_info =NULL ;kfree (sdp); }
@@ -1316,7 +1319,6 @@ fail_iput:iput (sdp->sd_inode); fail_free:free_sbd (sdp); - sb->s_fs_info =NULL ;return error; }
fs/gfs2/sys.c +0 -1
@@ -764,7 +764,6 @@ fail_reg:fs_err (sdp,"error %d adding sysfs files\n" , error);kobject_put (&sdp->sd_kobj);wait_for_completion (&sdp->sd_kobj_unregister); - sb->s_fs_info =NULL ;return error; }
Hi Greg
Kernel panic here on x86_64 (RKL, Intel 11th Gen. CPU)
all others kernels were okay. nothing was changed in my compile config.
===
what I fetched via serial console:
[ 0.000000] Linux version 6.15.3-rc1_MY ([email protected]) (gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2), GNU ld version 2.44-3.fc42) #1 SMP PREEMPT_DYNAMIC Tue Jun 17 20:15:03 CEST 2025 [ 0.000000] Command line: BOOT_IMAGE=(hd1,gpt1)/vmlinuz-6.15.3-rc1_MY root=UUID=704d7d4e-6ca3-4647-b027-44dc162e2b3c ro rootflags=subvol=ROOT console=tty0 console=tty1 console=ttyS0,115200 systemd.log_level=debug no_console_suspend [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dfff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009e000-0x000000000009efff] reserved [ 0.000000] BIOS-e820: [mem 0x000000000009f000-0x000000000009ffff] usable [ 0.000000] BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000007b883fff] usable [ 0.000000] BIOS-e820: [mem 0x000000007b884000-0x000000007b884fff] reserved [ 0.000000] BIOS-e820: [mem 0x000000007b885000-0x000000008bceefff] usable [ 0.000000] BIOS-e820: [mem 0x000000008bcef000-0x000000008e1eefff] reserved [ 0.000000] BIOS-e820: [mem 0x000000008e1ef000-0x000000008e46efff] ACPI data [ 0.000000] BIOS-e820: [mem 0x000000008e46f000-0x000000008e5fefff] ACPI NVS [ 0.000000] BIOS-e820: [mem 0x000000008e5ff000-0x000000008fefefff] reserved [ 0.000000] BIOS-e820: [mem 0x000000008feff000-0x000000008fefffff] usable [ 0.000000] BIOS-e820: [mem 0x000000008ff00000-0x0000000095ffffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000096600000-0x00000000967fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000097000000-0x00000000a07fffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fe000000-0x00000000fe010fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed20000-0x00000000fed7ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000045f7fffff] usable [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] APIC: Static calls initialized [ 0.000000] efi: EFI v2.7 by American Megatrends [ 0.000000] efi: ACPI=0x8e46e000 ACPI 2.0=0x8e46e014 TPMFinalLog=0x8e56c000 SMBIOS=0x8fc61000 SMBIOS 3.0=0x8fc60000 MEMATTR=0x89784018 ESRT=0x897a3f98 MOKvar=0x8fca3000 RNG=0x8e3ffc18 TPMEventLog=0x8e3e9018 [ 0.000000] random: crng init done [ 0.000000] efi: Remove mem75: MMIO range=[0xe0000000-0xefffffff] (256MB) from e820 map [ 0.000000] efi: Not removing mem76: MMIO range=[0xfe000000-0xfe010fff] (68KB) from e820 map [ 0.000000] efi: Not removing mem77: MMIO range=[0xfec00000-0xfec00fff] (4KB) from e820 map [ 0.000000] efi: Not removing mem78: MMIO range=[0xfed00000-0xfed00fff] (4KB) from e820 map [ 0.000000] efi: Not removing mem80: MMIO range=[0xfee00000-0xfee00fff] (4KB) from e820 map [ 0.000000] efi: Remove mem81: MMIO range=[0xff000000-0xffffffff] (16MB) from e820 map [ 0.000000] SMBIOS 3.3.0 present. [ 0.000000] DMI: ASUS System Product Name/ROG STRIX B560-G GAMING WIFI, BIOS 2302 11/13/2024 [ 0.000000] DMI: Memory slots populated: 2/4 [ 0.000000] tsc: Detected 2600.000 MHz processor [ 0.000000] tsc: Detected 2592.000 MHz TSC [ 0.000646] last_pfn = 0x45f800 max_arch_pfn = 0x400000000 [ 0.000648] MTRR map: 5 entries (3 fixed + 2 variable; max 23), built from 10 variable MTRRs [ 0.000649] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT [ 0.000914] last_pfn = 0x8ff00 max_arch_pfn = 0x400000000 [ 0.007714] esrt: Reserving ESRT space from 0x00000000897a3f98 to 0x00000000897a3fd0. [ 0.007732] Using GB pages for direct mapping [ 0.007980] Secure boot disabled [ 0.007980] RAMDISK: [mem 0x7527e000-0x7b883fff] [ 0.007983] ACPI: Early table checksum verification disabled [ 0.007985] ACPI: RSDP 0x000000008E46E014 000024 (v02 ALASKA) [ 0.007987] ACPI: XSDT 0x000000008E46D728 0000DC (v01 ALASKA A M I 01072009 AMI 01000013) [ 0.007991] ACPI: FACP 0x000000008E46B000 000114 (v06 ALASKA A M I 01072009 AMI 01000013) [ 0.007994] ACPI: DSDT 0x000000008E414000 0567A3 (v02 ALASKA A M I 01072009 INTL 20180209) [ 0.007996] ACPI: FACS 0x000000008E5FE000 000040 [ 0.007997] ACPI: MCFG 0x000000008E46C000 00003C (v01 ALASKA A M I 01072009 MSFT 00000097) [ 0.007999] ACPI: FIDT 0x000000008E413000 00009C (v01 ALASKA A M I 01072009 AMI 00010013) [ 0.008001] ACPI: SSDT 0x000000008E40F000 0025EB (v02 CpuRef CpuSsdt 00003000 INTL 20180209) [ 0.008002] ACPI: SSDT 0x000000008E40A000 004476 (v02 SaSsdt SaSsdt 00003000 INTL 20180209) [ 0.008004] ACPI: SSDT 0x000000008E406000 0032CD (v02 INTEL IgfxSsdt 00003000 INTL 20180209) [ 0.008006] ACPI: HPET 0x000000008E405000 000038 (v01 ALASKA A M I 01072009 AMI 01000013) [ 0.008007] ACPI: APIC 0x000000008E404000 000164 (v04 ALASKA A M I 01072009 AMI 01000013) [ 0.008009] ACPI: SSDT 0x000000008E403000 000E66 (v02 ALASKA Ther_Rvp 00001000 INTL 20180209) [ 0.008011] ACPI: SSDT 0x000000008E401000 0017E5 (v02 INTEL xh_rksu4 00000000 INTL 20180209) [ 0.008012] ACPI: NHLT 0x000000008E400000 00002D (v00 ALASKA A M I 01072009 AMI 01000013) [ 0.008014] ACPI: LPIT 0x000000008E3FE000 0000CC (v01 ALASKA A M I 01072009 AMI 01000013) [ 0.008016] ACPI: SSDT 0x000000008E3FC000 000DC6 (v02 ALASKA TbtTypeC 00000000 INTL 20180209) [ 0.008017] ACPI: SSDT 0x000000008E3F9000 002720 (v02 ALASKA PtidDevc 00001000 INTL 20180209) [ 0.008019] ACPI: DBGP 0x000000008E3F8000 000034 (v01 ALASKA A M I 01072009 AMI 01000013) [ 0.008021] ACPI: DBG2 0x000000008E3F7000 000054 (v00 ALASKA A M I 01072009 AMI 01000013) [ 0.008022] ACPI: SSDT 0x000000008E3F6000 0006E3 (v02 ALASKA UsbCTabl 00001000 INTL 20180209) [ 0.008024] ACPI: DMAR 0x000000008E3F5000 000088 (v02 INTEL EDK2 00000002 01000013) [ 0.008026] ACPI: SSDT 0x000000008E3F4000 000144 (v02 Intel ADebTabl 00001000 INTL 20180209) [ 0.008027] ACPI: TPM2 0x000000008E3F3000 00004C (v04 ALASKA A M I 00000001 AMI 00000000) [ 0.008029] ACPI: PTDT 0x000000008E3F2000 000CF0 (v00 ALASKA A M I 00000005 MSFT 0100000D) [ 0.008031] ACPI: WSMT 0x000000008E3FD000 000028 (v01 ALASKA A M I 01072009 AMI 00010013) [ 0.008033] ACPI: FPDT 0x000000008E3F1000 000044 (v01 ALASKA RKL 01072009 AMI 01000013) [ 0.008034] ACPI: Reserving FACP table memory at [mem 0x8e46b000-0x8e46b113] [ 0.008035] ACPI: Reserving DSDT table memory at [mem 0x8e414000-0x8e46a7a2] [ 0.008035] ACPI: Reserving FACS table memory at [mem 0x8e5fe000-0x8e5fe03f] [ 0.008036] ACPI: Reserving MCFG table memory at [mem 0x8e46c000-0x8e46c03b] [ 0.008036] ACPI: Reserving FIDT table memory at [mem 0x8e413000-0x8e41309b] [ 0.008037] ACPI: Reserving SSDT table memory at [mem 0x8e40f000-0x8e4115ea] [ 0.008037] ACPI: Reserving SSDT table memory at [mem 0x8e40a000-0x8e40e475] [ 0.008037] ACPI: Reserving SSDT table memory at [mem 0x8e406000-0x8e4092cc] [ 0.008038] ACPI: Reserving HPET table memory at [mem 0x8e405000-0x8e405037] [ 0.008038] ACPI: Reserving APIC table memory at [mem 0x8e404000-0x8e404163] [ 0.008039] ACPI: Reserving SSDT table memory at [mem 0x8e403000-0x8e403e65] [ 0.008039] ACPI: Reserving SSDT table memory at [mem 0x8e401000-0x8e4027e4] [ 0.008039] ACPI: Reserving NHLT table memory at [mem 0x8e400000-0x8e40002c] [ 0.008040] ACPI: Reserving LPIT table memory at [mem 0x8e3fe000-0x8e3fe0cb] [ 0.008040] ACPI: Reserving SSDT table memory at [mem 0x8e3fc000-0x8e3fcdc5] [ 0.008041] ACPI: Reserving SSDT table memory at [mem 0x8e3f9000-0x8e3fb71f] [ 0.008041] ACPI: Reserving DBGP table memory at [mem 0x8e3f8000-0x8e3f8033] [ 0.008042] ACPI: Reserving DBG2 table memory at [mem 0x8e3f7000-0x8e3f7053] [ 0.008042] ACPI: Reserving SSDT table memory at [mem 0x8e3f6000-0x8e3f66e2] [ 0.008042] ACPI: Reserving DMAR table memory at [mem 0x8e3f5000-0x8e3f5087] [ 0.008043] ACPI: Reserving SSDT table memory at [mem 0x8e3f4000-0x8e3f4143] [ 0.008043] ACPI: Reserving TPM2 table memory at [mem 0x8e3f3000-0x8e3f304b] [ 0.008044] ACPI: Reserving PTDT table memory at [mem 0x8e3f2000-0x8e3f2cef] [ 0.008044] ACPI: Reserving WSMT table memory at [mem 0x8e3fd000-0x8e3fd027] [ 0.008044] ACPI: Reserving FPDT table memory at [mem 0x8e3f1000-0x8e3f1043] [ 0.008104] No NUMA configuration found [ 0.008105] Faking a node at [mem 0x0000000000000000-0x000000045f7fffff] [ 0.008110] NODE_DATA(0) allocated [mem 0x45f7dda00-0x45f7fffff] [ 0.008228] Zone ranges: [ 0.008228] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.008229] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] [ 0.008230] Normal [mem 0x0000000100000000-0x000000045f7fffff] [ 0.008231] Movable zone start for each node [ 0.008232] Early memory node ranges [ 0.008232] node 0: [mem 0x0000000000001000-0x000000000009dfff] [ 0.008233] node 0: [mem 0x000000000009f000-0x000000000009ffff] [ 0.008233] node 0: [mem 0x0000000000100000-0x000000007b883fff] [ 0.008234] node 0: [mem 0x000000007b885000-0x000000008bceefff] [ 0.008234] node 0: [mem 0x000000008feff000-0x000000008fefffff] [ 0.008235] node 0: [mem 0x0000000100000000-0x000000045f7fffff] [ 0.008236] Initmem setup node 0 [mem 0x0000000000001000-0x000000045f7fffff] [ 0.008239] On node 0, zone DMA: 1 pages in unavailable ranges [ 0.008240] On node 0, zone DMA: 1 pages in unavailable ranges [ 0.008258] On node 0, zone DMA: 96 pages in unavailable ranges [ 0.010977] On node 0, zone DMA32: 1 pages in unavailable ranges [ 0.011105] On node 0, zone DMA32: 16912 pages in unavailable ranges [ 0.028151] On node 0, zone Normal: 256 pages in unavailable ranges [ 0.028167] On node 0, zone Normal: 2048 pages in unavailable ranges [ 0.028210] Reserving Intel graphics memory at [mem 0x98800000-0xa07fffff] [ 0.029634] ACPI: PM-Timer IO Port: 0x1808 [ 0.029641] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) [ 0.029642] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1]) [ 0.029642] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1]) [ 0.029642] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1]) [ 0.029643] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1]) [ 0.029643] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1]) [ 0.029643] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1]) [ 0.029644] ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1]) [ 0.029644] ACPI: LAPIC_NMI (acpi_id[0x09] high edge lint[0x1]) [ 0.029644] ACPI: LAPIC_NMI (acpi_id[0x0a] high edge lint[0x1]) [ 0.029645] ACPI: LAPIC_NMI (acpi_id[0x0b] high edge lint[0x1]) [ 0.029645] ACPI: LAPIC_NMI (acpi_id[0x0c] high edge lint[0x1]) [ 0.029645] ACPI: LAPIC_NMI (acpi_id[0x0d] high edge lint[0x1]) [ 0.029646] ACPI: LAPIC_NMI (acpi_id[0x0e] high edge lint[0x1]) [ 0.029646] ACPI: LAPIC_NMI (acpi_id[0x0f] high edge lint[0x1]) [ 0.029646] ACPI: LAPIC_NMI (acpi_id[0x10] high edge lint[0x1]) [ 0.029647] ACPI: LAPIC_NMI (acpi_id[0x11] high edge lint[0x1]) [ 0.029647] ACPI: LAPIC_NMI (acpi_id[0x12] high edge lint[0x1]) [ 0.029648] ACPI: LAPIC_NMI (acpi_id[0x13] high edge lint[0x1]) [ 0.029648] ACPI: LAPIC_NMI (acpi_id[0x14] high edge lint[0x1]) [ 0.029687] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-119 [ 0.029689] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.029690] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) [ 0.029693] ACPI: Using ACPI (MADT) for SMP configuration information [ 0.029694] ACPI: HPET id: 0x8086a201 base: 0xfed00000 [ 0.029696] TSC deadline timer available [ 0.029698] CPU topo: Max. logical packages: 1 [ 0.029699] CPU topo: Max. logical dies: 1 [ 0.029699] CPU topo: Max. dies per package: 1 [ 0.029702] CPU topo: Max. threads per core: 2 [ 0.029702] CPU topo: Num. cores per package: 6 [ 0.029702] CPU topo: Num. threads per package: 12 [ 0.029703] CPU topo: Allowing 12 present CPUs plus 0 hotplug CPUs [ 0.029714] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff] [ 0.029715] PM: hibernation: Registered nosave memory: [mem 0x0009e000-0x0009efff] [ 0.029716] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000fffff] [ 0.029717] PM: hibernation: Registered nosave memory: [mem 0x7b884000-0x7b884fff] [ 0.029718] PM: hibernation: Registered nosave memory: [mem 0x897a3000-0x897a3fff] [ 0.029719] PM: hibernation: Registered nosave memory: [mem 0x8bcef000-0x8fefefff] [ 0.029719] PM: hibernation: Registered nosave memory: [mem 0x8ff00000-0xffffffff] [ 0.029720] [mem 0xa0800000-0xfdffffff] available for PCI devices [ 0.029722] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns [ 0.035451] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:12 nr_cpu_ids:12 nr_node_ids:1 [ 0.035967] percpu: Embedded 77 pages/cpu s190040 r8192 d117160 u524288 [ 0.035988] Kernel command line: BOOT_IMAGE=(hd1,gpt1)/vmlinuz-6.15.3-rc1_MY root=UUID=704d7d4e-6ca3-4647-b027-44dc162e2b3c ro rootflags=subvol=ROOT console=tty0 console=tty1 console=ttyS0,115200 systemd.log_level=debug no_console_suspend [ 0.036058] Unknown kernel command line parameters "BOOT_IMAGE=(hd1,gpt1)/vmlinuz-6.15.3-rc1_MY", will be passed to user space. [ 0.036065] printk: log buffer data + meta data: 262144 + 917504 = 1179648 bytes [ 0.037215] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes, linear) [ 0.037824] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear) [ 0.037940] software IO TLB: area num 16. [ 0.047363] Fallback order for Node 0: 0 [ 0.047367] Built 1 zonelists, mobility grouping on. Total pages: 4109453 [ 0.047368] Policy zone: Normal [ 0.047551] mem auto-init: stack:all(zero), heap alloc:on, heap free:off [ 0.070269] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=12, Nodes=1 [ 0.078350] ftrace: allocating 66606 entries in 262 pages [ 0.078351] ftrace: allocated 262 pages with 3 groups [ 0.079225] Dynamic Preempt: voluntary [ 0.079277] rcu: Preemptible hierarchical RCU implementation. [ 0.079277] rcu: RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=12. [ 0.079278] Trampoline variant of Tasks RCU enabled. [ 0.079279] Rude variant of Tasks RCU enabled. [ 0.079279] Tracing variant of Tasks RCU enabled. [ 0.079280] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies. [ 0.079280] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=12 [ 0.079287] RCU Tasks: Setting shift to 4 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=12. [ 0.079289] RCU Tasks Rude: Setting shift to 4 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=12. [ 0.079290] RCU Tasks Trace: Setting shift to 4 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=12. [ 0.084250] NR_IRQS: 524544, nr_irqs: 2152, preallocated irqs: 16 [ 0.084656] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.084882] kfence: initialized - using 2097152 bytes for 255 objects at 0x(____ptrval____)-0x(____ptrval____) [ 0.084916] Console: colour dummy device 80x25 [ 0.084918] printk: legacy console [tty0] enabled [ 0.085142] printk: legacy console [ttyS0] enabled [ 1.476406] ACPI: Core revision 20240827 [ 1.480716] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635855245 ns [ 1.489887] APIC: Switch to symmetric I/O mode setup [ 1.494904] DMAR: Host address width 39 [ 1.498861] DMAR: DRHD base: 0x000000fed90000 flags: 0x0 [ 1.504226] DMAR: dmar0: reg_base_addr fed90000 ver 4:0 cap 1c0000c40660462 ecap 29a00f0505e [ 1.512732] DMAR: DRHD base: 0x000000fed91000 flags: 0x1 [ 1.518126] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da [ 1.526070] DMAR: RMRR base: 0x00000098000000 end: 0x000000a07fffff [ 1.532408] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1 [ 1.538807] DMAR-IR: HPET id 0 under DRHD base 0xfed91000 [ 1.544270] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping. [ 1.554650] DMAR-IR: Enabled IRQ remapping in x2apic mode [ 1.560057] x2apic enabled [ 1.562921] APIC: Switched APIC routing to: cluster x2apic [ 1.572998] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 [ 1.583837] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x255cb6cc5db, max_idle_ns: 440795203504 ns [ 1.594365] Calibrating delay loop (skipped), value calculated using timer frequency.. 5184.00 BogoMIPS (lpj=2592000) [ 1.595388] CPU0: Thermal monitoring enabled (TM1) [ 1.596366] x86/cpu: User Mode Instruction Prevention (UMIP) activated [ 1.597424] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0 [ 1.598365] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0 [ 1.599366] process: using mwait in idle threads [ 1.600366] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization [ 1.601366] Spectre V2 : Spectre BHI mitigation: SW BHB clearing on syscall and VM exit [ 1.602365] Spectre V2 : Mitigation: Enhanced / Automatic IBRS [ 1.603365] Spectre V2 : Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT [ 1.604365] RETBleed: Mitigation: Enhanced IBRS [ 1.605365] Spectre V2 : mitigation: Enabling conditional Indirect Branch Prediction Barrier [ 1.606366] Speculative Store Bypass: Mitigation: Speculative Store Bypass disabled via prctl [ 1.607369] MMIO Stale Data: Mitigation: Clear CPU buffers [ 1.608366] GDS: Mitigation: Microcode [ 1.609365] ITS: Mitigation: Aligned branch/return thunks [ 1.610369] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' [ 1.611365] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' [ 1.612365] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers' [ 1.613365] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers' [ 1.614365] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR' [ 1.615365] x86/fpu: Supporting XSAVE feature 0x020: 'AVX-512 opmask' [ 1.617364] x86/fpu: Supporting XSAVE feature 0x040: 'AVX-512 Hi256' [ 1.618365] x86/fpu: Supporting XSAVE feature 0x080: 'AVX-512 ZMM_Hi256' [ 1.619365] x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys User registers' [ 1.620365] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 [ 1.621365] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64 [ 1.622365] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64 [ 1.623365] x86/fpu: xstate_offset[5]: 960, xstate_sizes[5]: 64 [ 1.624365] x86/fpu: xstate_offset[6]: 1024, xstate_sizes[6]: 512 [ 1.625365] x86/fpu: xstate_offset[7]: 1536, xstate_sizes[7]: 1024 [ 1.626365] x86/fpu: xstate_offset[9]: 2560, xstate_sizes[9]: 8 [ 1.627365] x86/fpu: Enabled xstate features 0x2ff, context size is 2568 bytes, using 'compacted' format. [ 1.628643] BUG: unable to handle page fault for address: ffffffffc0400000 [ 1.629364] #PF: supervisor write access in kernel mode [ 1.629364] #PF: error_code(0x0003) - permissions violation [ 1.629364] PGD 453e29067 P4D 453e29067 PUD 453e2b067 PMD 100e001a1 [ 1.629364] Oops: Oops: 0003 [#1] SMP NOPTI [ 1.629364] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.15.3-rc1_MY #1 PREEMPT(voluntary) [ 1.629364] Hardware name: ASUS System Product Name/ROG STRIX B560-G GAMING WIFI, BIOS 2302 11/13/2024 [ 1.629364] RIP: 0010:apply_retpolines+0x220/0x500 [ 1.629364] Code: 00 4c 89 04 c2 e8 d0 92 4b 00 4c 8b 04 24 49 8d 78 08 4c 89 c1 48 b8 cc cc cc cc cc cc cc cc 4c 89 05 9c 81 c3 03 48 83 e7 f8 <49> 89 00 48 29 f9 49 89 80 f8 0f 00 00 81 c1 00 10 00 00 c1 e9 03 [ 1.629364] RSP: 0000:ffffffffb9e03e00 EFLAGS: 00010282 [ 1.629364] RAX: cccccccccccccccc RBX: ffffffffbad11c58 RCX: ffffffffc0400000 [ 1.629364] RDX: 0000000000000000 RSI: ffffffffba045f70 RDI: ffffffffc0400008 [ 1.629364] RBP: ffffffffb731189d R08: ffffffffc0400000 R09: ffff9ac9c0308b08 [ 1.629364] R10: ffff9ac9c0308b88 R11: ffff9ac9c0308b08 R12: ffff9acd1f7cdfc0 [ 1.629364] R13: ffffffffbad1e2e0 R14: 0000000000000000 R15: 0000000000000000 [ 1.629364] FS: 0000000000000000(0000) GS:ffff9acd640d6000(0000) knlGS:0000000000000000 [ 1.629364] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1.629364] CR2: ffffffffc0400000 CR3: 0000000453e26001 CR4: 0000000000770ef0 [ 1.629364] PKRU: 55555554 [ 1.629364] Call Trace: [ 1.629364] <TASK> [ 1.629364] ? events_sysfs_show+0x5d/0x80 [ 1.629364] ? events_sysfs_show+0x6c/0x80 [ 1.629364] ? events_sysfs_show+0x62/0x80 [ 1.629364] alternative_instructions+0x34/0x130 [ 1.629364] arch_cpu_finalize_init+0x108/0x150 [ 1.629364] start_kernel+0x927/0x9c0 [ 1.629364] x86_64_start_reservations+0x24/0x30 [ 1.629364] x86_64_start_kernel+0xe3/0xf0 [ 1.629364] common_startup_64+0x13e/0x148 [ 1.629364] </TASK> [ 1.629364] Modules linked in: [ 1.629364] CR2: ffffffffc0400000 [ 1.629364] ---[ end trace 0000000000000000 ]--- [ 1.629364] RIP: 0010:apply_retpolines+0x220/0x500 [ 1.629364] Code: 00 4c 89 04 c2 e8 d0 92 4b 00 4c 8b 04 24 49 8d 78 08 4c 89 c1 48 b8 cc cc cc cc cc cc cc cc 4c 89 05 9c 81 c3 03 48 83 e7 f8 <49> 89 00 48 29 f9 49 89 80 f8 0f 00 00 81 c1 00 10 00 00 c1 e9 03 [ 1.629364] RSP: 0000:ffffffffb9e03e00 EFLAGS: 00010282 [ 1.629364] RAX: cccccccccccccccc RBX: ffffffffbad11c58 RCX: ffffffffc0400000 [ 1.629364] RDX: 0000000000000000 RSI: ffffffffba045f70 RDI: ffffffffc0400008 [ 1.629364] RBP: ffffffffb731189d R08: ffffffffc0400000 R09: ffff9ac9c0308b08 [ 1.629364] R10: ffff9ac9c0308b88 R11: ffff9ac9c0308b08 R12: ffff9acd1f7cdfc0 [ 1.629364] R13: ffffffffbad1e2e0 R14: 0000000000000000 R15: 0000000000000000 [ 1.629364] FS: 0000000000000000(0000) GS:ffff9acd640d6000(0000) knlGS:0000000000000000 [ 1.629364] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1.629364] CR2: ffffffffc0400000 CR3: 0000000453e26001 CR4: 0000000000770ef0 [ 1.629364] PKRU: 55555554 [ 1.629364] Kernel panic - not syncing: Attempted to kill the idle task! [ 1.629364] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
Luna Jernberg
Tested-byAMD Ryzen 5 5600 6-Core Processor:
https://www.inet.se/produkt/5304697/amd-ryzen-5-5600-3-5-ghz-35mb on a
https://www.gigabyte.com/Motherboard/B550-AORUS-ELITE-V2-rev-12
https://www.inet.se/produkt/1903406/gigabyte-b550-aorus-elite-v2
motherboard :)
running Arch Linux with the testing repos enabled:
https://archlinux.org/ https://archboot.com/
https://wiki.archlinux.org/title/Arch_Testing_Team
Den tis 17 juni 2025 kl 20:44 skrev Ronald Warsow <[email protected]>:
Quoted 467 lines
Hi Greg
Kernel panic here on x86_64 (RKL, Intel 11th Gen. CPU)all others kernels were okay. nothing was changed in my compile config.
Tested-by Ronald Warsow <[email protected]>===
what I fetched via serial console:
[ 0.000000] Linux version 6.15.3-rc1_MY ([email protected]) (gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2), GNU ld version 2.44-3.fc42) #1 SMP PREEMPT_DYNAMIC Tue Jun 17 20:15:03 CEST 2025 [ 0.000000] Command line: BOOT_IMAGE=(hd1,gpt1)/vmlinuz-6.15.3-rc1_MY root=UUID=704d7d4e-6ca3-4647-b027-44dc162e2b3c ro rootflags=subvol=ROOT console=tty0 console=tty1 console=ttyS0,115200 systemd.log_level=debug no_console_suspend [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dfff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009e000-0x000000000009efff] reserved [ 0.000000] BIOS-e820: [mem 0x000000000009f000-0x000000000009ffff] usable [ 0.000000] BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000007b883fff] usable [ 0.000000] BIOS-e820: [mem 0x000000007b884000-0x000000007b884fff] reserved [ 0.000000] BIOS-e820: [mem 0x000000007b885000-0x000000008bceefff] usable [ 0.000000] BIOS-e820: [mem 0x000000008bcef000-0x000000008e1eefff] reserved [ 0.000000] BIOS-e820: [mem 0x000000008e1ef000-0x000000008e46efff] ACPI data [ 0.000000] BIOS-e820: [mem 0x000000008e46f000-0x000000008e5fefff] ACPI NVS [ 0.000000] BIOS-e820: [mem 0x000000008e5ff000-0x000000008fefefff] reserved [ 0.000000] BIOS-e820: [mem 0x000000008feff000-0x000000008fefffff] usable [ 0.000000] BIOS-e820: [mem 0x000000008ff00000-0x0000000095ffffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000096600000-0x00000000967fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000097000000-0x00000000a07fffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fe000000-0x00000000fe010fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed20000-0x00000000fed7ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000045f7fffff] usable [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] APIC: Static calls initialized [ 0.000000] efi: EFI v2.7 by American Megatrends [ 0.000000] efi: ACPI=0x8e46e000 ACPI 2.0=0x8e46e014 TPMFinalLog=0x8e56c000 SMBIOS=0x8fc61000 SMBIOS 3.0=0x8fc60000 MEMATTR=0x89784018 ESRT=0x897a3f98 MOKvar=0x8fca3000 RNG=0x8e3ffc18 TPMEventLog=0x8e3e9018 [ 0.000000] random: crng init done [ 0.000000] efi: Remove mem75: MMIO range=[0xe0000000-0xefffffff] (256MB) from e820 map [ 0.000000] efi: Not removing mem76: MMIO range=[0xfe000000-0xfe010fff] (68KB) from e820 map [ 0.000000] efi: Not removing mem77: MMIO range=[0xfec00000-0xfec00fff] (4KB) from e820 map [ 0.000000] efi: Not removing mem78: MMIO range=[0xfed00000-0xfed00fff] (4KB) from e820 map [ 0.000000] efi: Not removing mem80: MMIO range=[0xfee00000-0xfee00fff] (4KB) from e820 map [ 0.000000] efi: Remove mem81: MMIO range=[0xff000000-0xffffffff] (16MB) from e820 map [ 0.000000] SMBIOS 3.3.0 present. [ 0.000000] DMI: ASUS System Product Name/ROG STRIX B560-G GAMING WIFI, BIOS 2302 11/13/2024 [ 0.000000] DMI: Memory slots populated: 2/4 [ 0.000000] tsc: Detected 2600.000 MHz processor [ 0.000000] tsc: Detected 2592.000 MHz TSC [ 0.000646] last_pfn = 0x45f800 max_arch_pfn = 0x400000000 [ 0.000648] MTRR map: 5 entries (3 fixed + 2 variable; max 23), built from 10 variable MTRRs [ 0.000649] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT [ 0.000914] last_pfn = 0x8ff00 max_arch_pfn = 0x400000000 [ 0.007714] esrt: Reserving ESRT space from 0x00000000897a3f98 to 0x00000000897a3fd0. [ 0.007732] Using GB pages for direct mapping [ 0.007980] Secure boot disabled [ 0.007980] RAMDISK: [mem 0x7527e000-0x7b883fff] [ 0.007983] ACPI: Early table checksum verification disabled [ 0.007985] ACPI: RSDP 0x000000008E46E014 000024 (v02 ALASKA) [ 0.007987] ACPI: XSDT 0x000000008E46D728 0000DC (v01 ALASKA A M I 01072009 AMI 01000013) [ 0.007991] ACPI: FACP 0x000000008E46B000 000114 (v06 ALASKA A M I 01072009 AMI 01000013) [ 0.007994] ACPI: DSDT 0x000000008E414000 0567A3 (v02 ALASKA A M I 01072009 INTL 20180209) [ 0.007996] ACPI: FACS 0x000000008E5FE000 000040 [ 0.007997] ACPI: MCFG 0x000000008E46C000 00003C (v01 ALASKA A M I 01072009 MSFT 00000097) [ 0.007999] ACPI: FIDT 0x000000008E413000 00009C (v01 ALASKA A M I 01072009 AMI 00010013) [ 0.008001] ACPI: SSDT 0x000000008E40F000 0025EB (v02 CpuRef CpuSsdt 00003000 INTL 20180209) [ 0.008002] ACPI: SSDT 0x000000008E40A000 004476 (v02 SaSsdt SaSsdt 00003000 INTL 20180209) [ 0.008004] ACPI: SSDT 0x000000008E406000 0032CD (v02 INTEL IgfxSsdt 00003000 INTL 20180209) [ 0.008006] ACPI: HPET 0x000000008E405000 000038 (v01 ALASKA A M I 01072009 AMI 01000013) [ 0.008007] ACPI: APIC 0x000000008E404000 000164 (v04 ALASKA A M I 01072009 AMI 01000013) [ 0.008009] ACPI: SSDT 0x000000008E403000 000E66 (v02 ALASKA Ther_Rvp 00001000 INTL 20180209) [ 0.008011] ACPI: SSDT 0x000000008E401000 0017E5 (v02 INTEL xh_rksu4 00000000 INTL 20180209) [ 0.008012] ACPI: NHLT 0x000000008E400000 00002D (v00 ALASKA A M I 01072009 AMI 01000013) [ 0.008014] ACPI: LPIT 0x000000008E3FE000 0000CC (v01 ALASKA A M I 01072009 AMI 01000013) [ 0.008016] ACPI: SSDT 0x000000008E3FC000 000DC6 (v02 ALASKA TbtTypeC 00000000 INTL 20180209) [ 0.008017] ACPI: SSDT 0x000000008E3F9000 002720 (v02 ALASKA PtidDevc 00001000 INTL 20180209) [ 0.008019] ACPI: DBGP 0x000000008E3F8000 000034 (v01 ALASKA A M I 01072009 AMI 01000013) [ 0.008021] ACPI: DBG2 0x000000008E3F7000 000054 (v00 ALASKA A M I 01072009 AMI 01000013) [ 0.008022] ACPI: SSDT 0x000000008E3F6000 0006E3 (v02 ALASKA UsbCTabl 00001000 INTL 20180209) [ 0.008024] ACPI: DMAR 0x000000008E3F5000 000088 (v02 INTEL EDK2 00000002 01000013) [ 0.008026] ACPI: SSDT 0x000000008E3F4000 000144 (v02 Intel ADebTabl 00001000 INTL 20180209) [ 0.008027] ACPI: TPM2 0x000000008E3F3000 00004C (v04 ALASKA A M I 00000001 AMI 00000000) [ 0.008029] ACPI: PTDT 0x000000008E3F2000 000CF0 (v00 ALASKA A M I 00000005 MSFT 0100000D) [ 0.008031] ACPI: WSMT 0x000000008E3FD000 000028 (v01 ALASKA A M I 01072009 AMI 00010013) [ 0.008033] ACPI: FPDT 0x000000008E3F1000 000044 (v01 ALASKA RKL 01072009 AMI 01000013) [ 0.008034] ACPI: Reserving FACP table memory at [mem 0x8e46b000-0x8e46b113] [ 0.008035] ACPI: Reserving DSDT table memory at [mem 0x8e414000-0x8e46a7a2] [ 0.008035] ACPI: Reserving FACS table memory at [mem 0x8e5fe000-0x8e5fe03f] [ 0.008036] ACPI: Reserving MCFG table memory at [mem 0x8e46c000-0x8e46c03b] [ 0.008036] ACPI: Reserving FIDT table memory at [mem 0x8e413000-0x8e41309b] [ 0.008037] ACPI: Reserving SSDT table memory at [mem 0x8e40f000-0x8e4115ea] [ 0.008037] ACPI: Reserving SSDT table memory at [mem 0x8e40a000-0x8e40e475] [ 0.008037] ACPI: Reserving SSDT table memory at [mem 0x8e406000-0x8e4092cc] [ 0.008038] ACPI: Reserving HPET table memory at [mem 0x8e405000-0x8e405037] [ 0.008038] ACPI: Reserving APIC table memory at [mem 0x8e404000-0x8e404163] [ 0.008039] ACPI: Reserving SSDT table memory at [mem 0x8e403000-0x8e403e65] [ 0.008039] ACPI: Reserving SSDT table memory at [mem 0x8e401000-0x8e4027e4] [ 0.008039] ACPI: Reserving NHLT table memory at [mem 0x8e400000-0x8e40002c] [ 0.008040] ACPI: Reserving LPIT table memory at [mem 0x8e3fe000-0x8e3fe0cb] [ 0.008040] ACPI: Reserving SSDT table memory at [mem 0x8e3fc000-0x8e3fcdc5] [ 0.008041] ACPI: Reserving SSDT table memory at [mem 0x8e3f9000-0x8e3fb71f] [ 0.008041] ACPI: Reserving DBGP table memory at [mem 0x8e3f8000-0x8e3f8033] [ 0.008042] ACPI: Reserving DBG2 table memory at [mem 0x8e3f7000-0x8e3f7053] [ 0.008042] ACPI: Reserving SSDT table memory at [mem 0x8e3f6000-0x8e3f66e2] [ 0.008042] ACPI: Reserving DMAR table memory at [mem 0x8e3f5000-0x8e3f5087] [ 0.008043] ACPI: Reserving SSDT table memory at [mem 0x8e3f4000-0x8e3f4143] [ 0.008043] ACPI: Reserving TPM2 table memory at [mem 0x8e3f3000-0x8e3f304b] [ 0.008044] ACPI: Reserving PTDT table memory at [mem 0x8e3f2000-0x8e3f2cef] [ 0.008044] ACPI: Reserving WSMT table memory at [mem 0x8e3fd000-0x8e3fd027] [ 0.008044] ACPI: Reserving FPDT table memory at [mem 0x8e3f1000-0x8e3f1043] [ 0.008104] No NUMA configuration found [ 0.008105] Faking a node at [mem 0x0000000000000000-0x000000045f7fffff] [ 0.008110] NODE_DATA(0) allocated [mem 0x45f7dda00-0x45f7fffff] [ 0.008228] Zone ranges: [ 0.008228] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.008229] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] [ 0.008230] Normal [mem 0x0000000100000000-0x000000045f7fffff] [ 0.008231] Movable zone start for each node [ 0.008232] Early memory node ranges [ 0.008232] node 0: [mem 0x0000000000001000-0x000000000009dfff] [ 0.008233] node 0: [mem 0x000000000009f000-0x000000000009ffff] [ 0.008233] node 0: [mem 0x0000000000100000-0x000000007b883fff] [ 0.008234] node 0: [mem 0x000000007b885000-0x000000008bceefff] [ 0.008234] node 0: [mem 0x000000008feff000-0x000000008fefffff] [ 0.008235] node 0: [mem 0x0000000100000000-0x000000045f7fffff] [ 0.008236] Initmem setup node 0 [mem 0x0000000000001000-0x000000045f7fffff] [ 0.008239] On node 0, zone DMA: 1 pages in unavailable ranges [ 0.008240] On node 0, zone DMA: 1 pages in unavailable ranges [ 0.008258] On node 0, zone DMA: 96 pages in unavailable ranges [ 0.010977] On node 0, zone DMA32: 1 pages in unavailable ranges [ 0.011105] On node 0, zone DMA32: 16912 pages in unavailable ranges [ 0.028151] On node 0, zone Normal: 256 pages in unavailable ranges [ 0.028167] On node 0, zone Normal: 2048 pages in unavailable ranges [ 0.028210] Reserving Intel graphics memory at [mem 0x98800000-0xa07fffff] [ 0.029634] ACPI: PM-Timer IO Port: 0x1808 [ 0.029641] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) [ 0.029642] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1]) [ 0.029642] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1]) [ 0.029642] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1]) [ 0.029643] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1]) [ 0.029643] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1]) [ 0.029643] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1]) [ 0.029644] ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1]) [ 0.029644] ACPI: LAPIC_NMI (acpi_id[0x09] high edge lint[0x1]) [ 0.029644] ACPI: LAPIC_NMI (acpi_id[0x0a] high edge lint[0x1]) [ 0.029645] ACPI: LAPIC_NMI (acpi_id[0x0b] high edge lint[0x1]) [ 0.029645] ACPI: LAPIC_NMI (acpi_id[0x0c] high edge lint[0x1]) [ 0.029645] ACPI: LAPIC_NMI (acpi_id[0x0d] high edge lint[0x1]) [ 0.029646] ACPI: LAPIC_NMI (acpi_id[0x0e] high edge lint[0x1]) [ 0.029646] ACPI: LAPIC_NMI (acpi_id[0x0f] high edge lint[0x1]) [ 0.029646] ACPI: LAPIC_NMI (acpi_id[0x10] high edge lint[0x1]) [ 0.029647] ACPI: LAPIC_NMI (acpi_id[0x11] high edge lint[0x1]) [ 0.029647] ACPI: LAPIC_NMI (acpi_id[0x12] high edge lint[0x1]) [ 0.029648] ACPI: LAPIC_NMI (acpi_id[0x13] high edge lint[0x1]) [ 0.029648] ACPI: LAPIC_NMI (acpi_id[0x14] high edge lint[0x1]) [ 0.029687] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-119 [ 0.029689] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.029690] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) [ 0.029693] ACPI: Using ACPI (MADT) for SMP configuration information [ 0.029694] ACPI: HPET id: 0x8086a201 base: 0xfed00000 [ 0.029696] TSC deadline timer available [ 0.029698] CPU topo: Max. logical packages: 1 [ 0.029699] CPU topo: Max. logical dies: 1 [ 0.029699] CPU topo: Max. dies per package: 1 [ 0.029702] CPU topo: Max. threads per core: 2 [ 0.029702] CPU topo: Num. cores per package: 6 [ 0.029702] CPU topo: Num. threads per package: 12 [ 0.029703] CPU topo: Allowing 12 present CPUs plus 0 hotplug CPUs [ 0.029714] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff] [ 0.029715] PM: hibernation: Registered nosave memory: [mem 0x0009e000-0x0009efff] [ 0.029716] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000fffff] [ 0.029717] PM: hibernation: Registered nosave memory: [mem 0x7b884000-0x7b884fff] [ 0.029718] PM: hibernation: Registered nosave memory: [mem 0x897a3000-0x897a3fff] [ 0.029719] PM: hibernation: Registered nosave memory: [mem 0x8bcef000-0x8fefefff] [ 0.029719] PM: hibernation: Registered nosave memory: [mem 0x8ff00000-0xffffffff] [ 0.029720] [mem 0xa0800000-0xfdffffff] available for PCI devices [ 0.029722] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns [ 0.035451] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:12 nr_cpu_ids:12 nr_node_ids:1 [ 0.035967] percpu: Embedded 77 pages/cpu s190040 r8192 d117160 u524288 [ 0.035988] Kernel command line:BOOT_IMAGE=(hd1,gpt1)/vmlinuz-6.15.3-rc1_MY root=UUID=704d7d4e-6ca3-4647-b027-44dc162e2b3c ro rootflags=subvol=ROOT console=tty0 console=tty1 console=ttyS0,115200 systemd.log_level=debug
no_console_suspend[ 0.036058] Unknown kernel command line parameters "BOOT_IMAGE=(hd1,gpt1)/vmlinuz-6.15.3-rc1_MY", will be passed to user space. [ 0.036065] printk: log buffer data + meta data: 262144 + 917504 = 1179648 bytes [ 0.037215] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes, linear) [ 0.037824] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear) [ 0.037940] software IO TLB: area num 16. [ 0.047363] Fallback order for Node 0: 0 [ 0.047367] Built 1 zonelists, mobility grouping on. Total pages: 4109453 [ 0.047368] Policy zone: Normal [ 0.047551] mem auto-init: stack:all(zero), heap alloc:on, heap free:off [ 0.070269] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=12, Nodes=1 [ 0.078350] ftrace: allocating 66606 entries in 262 pages [ 0.078351] ftrace: allocated 262 pages with 3 groups [ 0.079225] Dynamic Preempt: voluntary [ 0.079277] rcu: Preemptible hierarchical RCU implementation. [ 0.079277] rcu: RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=12. [ 0.079278] Trampoline variant of Tasks RCU enabled. [ 0.079279] Rude variant of Tasks RCU enabled. [ 0.079279] Tracing variant of Tasks RCU enabled. [ 0.079280] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies. [ 0.079280] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=12 [ 0.079287] RCU Tasks: Setting shift to 4 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=12. [ 0.079289] RCU Tasks Rude: Setting shift to 4 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=12. [ 0.079290] RCU Tasks Trace: Setting shift to 4 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=12. [ 0.084250] NR_IRQS: 524544, nr_irqs: 2152, preallocated irqs: 16 [ 0.084656] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.084882] kfence: initialized - using 2097152 bytes for 255 objects at 0x(____ptrval____)-0x(____ptrval____) [ 0.084916] Console: colour dummy device 80x25 [ 0.084918] printk: legacy console [tty0] enabled [ 0.085142] printk: legacy console [ttyS0] enabled [ 1.476406] ACPI: Core revision 20240827 [ 1.480716] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635855245 ns [ 1.489887] APIC: Switch to symmetric I/O mode setup [ 1.494904] DMAR: Host address width 39 [ 1.498861] DMAR: DRHD base: 0x000000fed90000 flags: 0x0 [ 1.504226] DMAR: dmar0: reg_base_addr fed90000 ver 4:0 cap 1c0000c40660462 ecap 29a00f0505e [ 1.512732] DMAR: DRHD base: 0x000000fed91000 flags: 0x1 [ 1.518126] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da [ 1.526070] DMAR: RMRR base: 0x00000098000000 end: 0x000000a07fffff [ 1.532408] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1 [ 1.538807] DMAR-IR: HPET id 0 under DRHD base 0xfed91000 [ 1.544270] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping. [ 1.554650] DMAR-IR: Enabled IRQ remapping in x2apic mode [ 1.560057] x2apic enabled [ 1.562921] APIC: Switched APIC routing to: cluster x2apic [ 1.572998] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 [ 1.583837] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x255cb6cc5db, max_idle_ns: 440795203504 ns [ 1.594365] Calibrating delay loop (skipped), value calculated using timer frequency.. 5184.00 BogoMIPS (lpj=2592000) [ 1.595388] CPU0: Thermal monitoring enabled (TM1) [ 1.596366] x86/cpu: User Mode Instruction Prevention (UMIP) activated [ 1.597424] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0 [ 1.598365] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0 [ 1.599366] process: using mwait in idle threads [ 1.600366] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization [ 1.601366] Spectre V2 : Spectre BHI mitigation: SW BHB clearing on syscall and VM exit [ 1.602365] Spectre V2 : Mitigation: Enhanced / Automatic IBRS [ 1.603365] Spectre V2 : Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT [ 1.604365] RETBleed: Mitigation: Enhanced IBRS [ 1.605365] Spectre V2 : mitigation: Enabling conditional Indirect Branch Prediction Barrier [ 1.606366] Speculative Store Bypass: Mitigation: Speculative Store Bypass disabled via prctl [ 1.607369] MMIO Stale Data: Mitigation: Clear CPU buffers [ 1.608366] GDS: Mitigation: Microcode [ 1.609365] ITS: Mitigation: Aligned branch/return thunks [ 1.610369] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' [ 1.611365] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' [ 1.612365] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers' [ 1.613365] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers' [ 1.614365] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR' [ 1.615365] x86/fpu: Supporting XSAVE feature 0x020: 'AVX-512 opmask' [ 1.617364] x86/fpu: Supporting XSAVE feature 0x040: 'AVX-512 Hi256' [ 1.618365] x86/fpu: Supporting XSAVE feature 0x080: 'AVX-512 ZMM_Hi256' [ 1.619365] x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys User registers' [ 1.620365] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 [ 1.621365] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64 [ 1.622365] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64 [ 1.623365] x86/fpu: xstate_offset[5]: 960, xstate_sizes[5]: 64 [ 1.624365] x86/fpu: xstate_offset[6]: 1024, xstate_sizes[6]: 512 [ 1.625365] x86/fpu: xstate_offset[7]: 1536, xstate_sizes[7]: 1024 [ 1.626365] x86/fpu: xstate_offset[9]: 2560, xstate_sizes[9]: 8 [ 1.627365] x86/fpu: Enabled xstate features 0x2ff, context size is 2568 bytes, using 'compacted' format. [ 1.628643] BUG: unable to handle page fault for address: ffffffffc0400000 [ 1.629364] #PF: supervisor write access in kernel mode [ 1.629364] #PF: error_code(0x0003) - permissions violation [ 1.629364] PGD 453e29067 P4D 453e29067 PUD 453e2b067 PMD 100e001a1 [ 1.629364] Oops: Oops: 0003 [#1] SMP NOPTI [ 1.629364] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.15.3-rc1_MY #1 PREEMPT(voluntary) [ 1.629364] Hardware name: ASUS System Product Name/ROG STRIX B560-G GAMING WIFI, BIOS 2302 11/13/2024 [ 1.629364] RIP: 0010:apply_retpolines+0x220/0x500 [ 1.629364] Code: 00 4c 89 04 c2 e8 d0 92 4b 00 4c 8b 04 24 49 8d 78 08 4c 89 c1 48 b8 cc cc cc cc cc cc cc cc 4c 89 05 9c 81 c3 03 48 83 e7 f8 <49> 89 00 48 29 f9 49 89 80 f8 0f 00 00 81 c1 00 10 00 00 c1 e9 03 [ 1.629364] RSP: 0000:ffffffffb9e03e00 EFLAGS: 00010282 [ 1.629364] RAX: cccccccccccccccc RBX: ffffffffbad11c58 RCX: ffffffffc0400000 [ 1.629364] RDX: 0000000000000000 RSI: ffffffffba045f70 RDI: ffffffffc0400008 [ 1.629364] RBP: ffffffffb731189d R08: ffffffffc0400000 R09: ffff9ac9c0308b08 [ 1.629364] R10: ffff9ac9c0308b88 R11: ffff9ac9c0308b08 R12: ffff9acd1f7cdfc0 [ 1.629364] R13: ffffffffbad1e2e0 R14: 0000000000000000 R15: 0000000000000000 [ 1.629364] FS: 0000000000000000(0000) GS:ffff9acd640d6000(0000) knlGS:0000000000000000 [ 1.629364] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1.629364] CR2: ffffffffc0400000 CR3: 0000000453e26001 CR4: 0000000000770ef0 [ 1.629364] PKRU: 55555554 [ 1.629364] Call Trace: [ 1.629364] <TASK> [ 1.629364] ? events_sysfs_show+0x5d/0x80 [ 1.629364] ? events_sysfs_show+0x6c/0x80 [ 1.629364] ? events_sysfs_show+0x62/0x80 [ 1.629364] alternative_instructions+0x34/0x130 [ 1.629364] arch_cpu_finalize_init+0x108/0x150 [ 1.629364] start_kernel+0x927/0x9c0 [ 1.629364] x86_64_start_reservations+0x24/0x30 [ 1.629364] x86_64_start_kernel+0xe3/0xf0 [ 1.629364] common_startup_64+0x13e/0x148 [ 1.629364] </TASK> [ 1.629364] Modules linked in: [ 1.629364] CR2: ffffffffc0400000 [ 1.629364] ---[ end trace 0000000000000000 ]--- [ 1.629364] RIP: 0010:apply_retpolines+0x220/0x500 [ 1.629364] Code: 00 4c 89 04 c2 e8 d0 92 4b 00 4c 8b 04 24 49 8d 78 08 4c 89 c1 48 b8 cc cc cc cc cc cc cc cc 4c 89 05 9c 81 c3 03 48 83 e7 f8 <49> 89 00 48 29 f9 49 89 80 f8 0f 00 00 81 c1 00 10 00 00 c1 e9 03 [ 1.629364] RSP: 0000:ffffffffb9e03e00 EFLAGS: 00010282 [ 1.629364] RAX: cccccccccccccccc RBX: ffffffffbad11c58 RCX: ffffffffc0400000 [ 1.629364] RDX: 0000000000000000 RSI: ffffffffba045f70 RDI: ffffffffc0400008 [ 1.629364] RBP: ffffffffb731189d R08: ffffffffc0400000 R09: ffff9ac9c0308b08 [ 1.629364] R10: ffff9ac9c0308b88 R11: ffff9ac9c0308b08 R12: ffff9acd1f7cdfc0 [ 1.629364] R13: ffffffffbad1e2e0 R14: 0000000000000000 R15: 0000000000000000 [ 1.629364] FS: 0000000000000000(0000) GS:ffff9acd640d6000(0000) knlGS:0000000000000000 [ 1.629364] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1.629364] CR2: ffffffffc0400000 CR3: 0000000453e26001 CR4: 0000000000770ef0 [ 1.629364] PKRU: 55555554 [ 1.629364] Kernel panic - not syncing: Attempted to kill the idle task! [ 1.629364] ---[ end Kernel panic - not syncing: Attempted to killthe idle task! ]---
Greg Kroah-Hartman
maintainerQuoted 7 lines · Ronald Warsow
Hi Greg
Kernel panic here on x86_64 (RKL, Intel 11th Gen. CPU)all others kernels were okay. nothing was changed in my compile config.
Tested-by Ronald Warsow <[email protected]>
Any chance you can use 'git bisect' to find the offending commit?
thanks,
greg k-h
[2025-06-18 07:42] Greg Kroah-Hartman:
Quoted 7 lines · Ronald Warsow
Quoted 6 lines
Hi Greg
Kernel panic here on x86_64 (RKL, Intel 11th Gen. CPU)all others kernels were okay. nothing was changed in my compile config.
Quoted 7 lines
Quoted 1 line
Tested-by Ronald Warsow <[email protected]>Any chance you can use 'git bisect' to find the offending commit?
thanks,
greg k-h
Hi, I've just come across the exact same bug on my x86_64 machines, but unfortunately I won't have the time to start bisecting this before tonight or tomorrow morning.
In any case, the culprit must be one of these patches:
I had built a 6.15.2 kernel with the patch queue from tree id f724d2960e671efa0e5bcb51327690f791923e4b a few days ago and that kernel works flawlessly.
Today, I built a kernel with the patch queue from tree id 9cc80b684b4f77d6c54fc0f1d34ecfe559838702 and that kernel crashes when trying to boot on x86_64 with the same error messages that Ronald reported yesterday.
Regards
Pascal
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
Tested with Alpine Linux' configs. Thanks!
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.15:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
120 tests: 120 pass, 0 failLinux version: 6.15.3-rc1-gd878a60be557
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Jon
Hi Greg
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.thanks,
greg k-h
6.15.3-rc1 tested.
Build successfully completed.
Boot successfully completed.
No dmesg regressions.
Video output normal.
Sound output normal.
Lenovo ThinkPad X1 Carbon Gen10(Intel i7-1260P(x86_64) arch linux)
[ 0.000000] Linux version 6.15.3-rc1rv-gd878a60be557
(takeshi@ThinkPadX1Gen10J0764) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Wed Jun 18 16:32:09 JST 2025
Thanks
Am 17.06.2025 um 17:15 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.
Beste Grüße,
Peter Schneider
Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge, enjoy the air and behold the view. Climb it so you can see the world, not so the world can see you. -- David McCullough Jr. OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244 Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc https://keys.mailvelope.com/pks/lookup?op=get&[email protected] https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 6.15.3-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: d878a60be557cef27d9897a1c5269b76e3269603
* git describe: v6.15.1-816-gd878a60be557
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.15.y/build/v6.15.1-816-gd878a60be557
## Test Regressions (compared to v6.15.1-35-g04e133874a24)
## Metric Regressions (compared to v6.15.1-35-g04e133874a24)
## Test Fixes (compared to v6.15.1-35-g04e133874a24)
## Metric Fixes (compared to v6.15.1-35-g04e133874a24)
## Test result summary
total: 256017, pass: 234795, fail: 6773, skip: 14449, xfail: 0
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 139 total, 136 passed, 3 failed
* arm64: 57 total, 54 passed, 0 failed, 3 skipped
* i386: 18 total, 18 passed, 0 failed
* mips: 34 total, 27 passed, 7 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 40 total, 39 passed, 1 failed
* riscv: 25 total, 25 passed, 0 failed
* s390: 22 total, 22 passed, 0 failed
* sh: 5 total, 5 passed, 0 failed
* sparc: 4 total, 3 passed, 1 failed
* x86_64: 49 total, 47 passed, 0 failed, 2 skipped
## Test suites summary
* boot
* commands
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-kvm
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mm
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-rust
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-x86
* kunit
* kvm-unit-tests
* lava
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-build-clang
* log-parser-build-gcc
* log-parser-test
* ltp-capability
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* modules
* perf
* rcutorture
* rt-tests-cyclicdeadline
* rt-tests-pi-stress
* rt-tests-pmqtest
* rt-tests-rt-migrate-test
* rt-tests-signaltest
--
Linaro LKFT
https://lkft.linaro.org
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
This breaks the build of the arm64 selftests due to a change in nolibc, it appears that "tools/nolibc: properly align dirent buffer" is missing some dependency:
aarch64-linux-gnu-gcc -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \ -include ../../../../include/nolibc/nolibc.h -I../..\ -static -ffreestanding -Wall za-fork.c /build/stage/build-work/kselftest/arm64/fp/za-fork-asm.o -o /build/stage/build-work/kselftest/arm64/fp/za-fork
In file included from ./../../../../include/nolibc/nolibc.h:107,
from <command-line>:./../../../../include/nolibc/dirent.h: In function ‘readdir_r’:./../../../../include/nolibc/dirent.h:62:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__nolibc_aligned_as’
62 | char buf[sizeof(struct linux_dirent64) + NAME_MAX + 1] __nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~~~~~~~~~~~~~~./../../../../include/nolibc/dirent.h:62:64: error: implicit declaration of function ‘__nolibc_aligned_as’ [-Wimplicit-function-declaration] ./../../../../include/nolibc/dirent.h:62:84: error: expected expression before ‘struct’
62 | char buf[sizeof(struct linux_dirent64) + NAME_MAX + 1] __nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~./../../../../include/nolibc/dirent.h:63:47: error: ‘buf’ undeclared (first use in this function)
63 | struct linux_dirent64 *ldir = (void *)buf;
| ^~~./../../../../include/nolibc/dirent.h:63:47: note: each undeclared identifier is reported only once for each function it appears in
Greg Kroah-Hartman
maintainerQuoted 13 lines · Mark Brown
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
This breaks the build of the arm64 selftests due to a change in nolibc, it appears that "
tools/nolibc: properly align dirent buffer" is missing some dependency:aarch64-linux-gnu-gcc -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \ -include ../../../../include/nolibc/nolibc.h -I../..\ -static -ffreestanding -Wall za-fork.c /build/stage/build-work/kselftest/arm64/fp/za-fork-asm.o -o /build/stage/build-work/kselftest/arm64/fp/za-fork
Quoted 14 lines
In file included from
./../../../../include/nolibc/nolibc.h:107,
from <command-line>:./../../../../include/nolibc/dirent.h: In function ‘readdir_r’:./../../../../include/nolibc/dirent.h:62:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__nolibc_aligned_as’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~~~~~~~~~~~~~~./../../../../include/nolibc/dirent.h:62:64: error: implicit declaration of function ‘__nolibc_aligned_as’ [-Wimplicit-function-declaration]./../../../../include/nolibc/dirent.h:62:84: error: expected expression before ‘struct’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~./../../../../include/nolibc/dirent.h:63:47: error: ‘buf’ undeclared (first use in this function)
63 | structlinux_dirent64*ldir = (void *)buf;
| ^~~./../../../../include/nolibc/dirent.h:63:47: note: each undeclared identifier is reported only once for each function it appears in
Thanks for the report, I'll go drop all nolibc patches from the queues for now.
greg k-h
Quoted 29 lines · Greg Kroah-Hartman
Quoted 13 lines · Mark Brown
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
This breaks the build of the arm64 selftests due to a change in nolibc, it appears that "
tools/nolibc: properly align dirent buffer" is missing some dependency:aarch64-linux-gnu-gcc -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \ -include ../../../../include/nolibc/nolibc.h -I../..\ -static -ffreestanding -Wall za-fork.c /build/stage/build-work/kselftest/arm64/fp/za-fork-asm.o -o /build/stage/build-work/kselftest/arm64/fp/za-forkQuoted 14 lines
In file included from
./../../../../include/nolibc/nolibc.h:107,
from <command-line>:./../../../../include/nolibc/dirent.h: In function ‘readdir_r’:./../../../../include/nolibc/dirent.h:62:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__nolibc_aligned_as’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~~~~~~~~~~~~~~./../../../../include/nolibc/dirent.h:62:64: error: implicit declaration of function ‘__nolibc_aligned_as’ [-Wimplicit-function-declaration]./../../../../include/nolibc/dirent.h:62:84: error: expected expression before ‘struct’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~./../../../../include/nolibc/dirent.h:63:47: error: ‘buf’ undeclared (first use in this function)
63 | structlinux_dirent64*ldir = (void *)buf;
| ^~~./../../../../include/nolibc/dirent.h:63:47: note: each undeclared identifier is reported only once for each function it appears in
Quoted 2 lines
Thanks for the report, I'll go drop all nolibc patches from the queues for now.
Thanks.
Shouldn't the bots apply prerequisite patches from the series automatically? This patch comes from [0] and the prerequisite is in there.
Also all nolibc patches which should go to stable are tagged as such. Can you configure the bots not to pick up any nolibc patches automatically?
[0] https://lore.kernel.org/lkml/[email protected]/
Thomas
Greg Kroah-Hartman
maintainerQuoted 30 lines · Thomas Weißschuh
Quoted 29 lines · Greg Kroah-Hartman
Quoted 27 lines · Mark Brown
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
This breaks the build of the arm64 selftests due to a change in nolibc, it appears that "
tools/nolibc: properly align dirent buffer" is missing some dependency:aarch64-linux-gnu-gcc -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \ -include ../../../../include/nolibc/nolibc.h -I../..\ -static -ffreestanding -Wall za-fork.c /build/stage/build-work/kselftest/arm64/fp/za-fork-asm.o -o /build/stage/build-work/kselftest/arm64/fp/za-forkIn file included from
./../../../../include/nolibc/nolibc.h:107,
from <command-line>:./../../../../include/nolibc/dirent.h: In function ‘readdir_r’:./../../../../include/nolibc/dirent.h:62:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__nolibc_aligned_as’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~~~~~~~~~~~~~~./../../../../include/nolibc/dirent.h:62:64: error: implicit declaration of function ‘__nolibc_aligned_as’ [-Wimplicit-function-declaration]./../../../../include/nolibc/dirent.h:62:84: error: expected expression before ‘struct’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~./../../../../include/nolibc/dirent.h:63:47: error: ‘buf’ undeclared (first use in this function)
63 | structlinux_dirent64*ldir = (void *)buf;
| ^~~./../../../../include/nolibc/dirent.h:63:47: note: each undeclared identifier is reported only once for each function it appears in
Quoted 6 lines
Quoted 2 lines
Thanks for the report, I'll go drop all nolibc patches from the queues for now.
Thanks.
Shouldn't the bots apply prerequisite patches from the series automatically?
Hopefully yes, obviously it doesn't always work :)
Quoted 4 lines
This patch comes from [0] and the prerequisite is in there.
Also all nolibc patches which should go to stable are tagged as such. Can you configure the bots not to pick up any nolibc patches automatically?
Yes we can! I will add the needed regex to the file:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/ignore_list
should it be:
tools/include/nolibc/* tools/testing/selftests/nolibc/*
?
thanks,
greg k-h
Quoted 31 lines · Greg Kroah-Hartman
Quoted 30 lines · Thomas Weißschuh
Quoted 29 lines · Greg Kroah-Hartman
Quoted 27 lines · Mark Brown
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
This breaks the build of the arm64 selftests due to a change in nolibc, it appears that "
tools/nolibc: properly align dirent buffer" is missing some dependency:aarch64-linux-gnu-gcc -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \ -include ../../../../include/nolibc/nolibc.h -I../..\ -static -ffreestanding -Wall za-fork.c /build/stage/build-work/kselftest/arm64/fp/za-fork-asm.o -o /build/stage/build-work/kselftest/arm64/fp/za-forkIn file included from
./../../../../include/nolibc/nolibc.h:107,
from <command-line>:./../../../../include/nolibc/dirent.h: In function ‘readdir_r’:./../../../../include/nolibc/dirent.h:62:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__nolibc_aligned_as’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~~~~~~~~~~~~~~./../../../../include/nolibc/dirent.h:62:64: error: implicit declaration of function ‘__nolibc_aligned_as’ [-Wimplicit-function-declaration]./../../../../include/nolibc/dirent.h:62:84: error: expected expression before ‘struct’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~./../../../../include/nolibc/dirent.h:63:47: error: ‘buf’ undeclared (first use in this function)
63 | structlinux_dirent64*ldir = (void *)buf;
| ^~~./../../../../include/nolibc/dirent.h:63:47: note: each undeclared identifier is reported only once for each function it appears in
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Thanks for the report, I'll go drop all nolibc patches from the queues for now.
Thanks.
Shouldn't the bots apply prerequisite patches from the series automatically?
Hopefully yes, obviously it doesn't always work :)
Is there something we can do to help the tools?
Quoted 11 lines
Quoted 4 lines
This patch comes from [0] and the prerequisite is in there.
Also all nolibc patches which should go to stable are tagged as such. Can you configure the bots not to pick up any nolibc patches automatically?
Yes we can! I will add the needed regex to the file:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/ignore_list
should it be:
tools/include/nolibc/*tools/testing/selftests/nolibc/*
?
Looks good, thanks.
Thomas
Greg Kroah-Hartman
maintainerQuoted 35 lines · Thomas Weißschuh
Quoted 34 lines · Greg Kroah-Hartman
Quoted 33 lines · Thomas Weißschuh
Quoted 31 lines · Greg Kroah-Hartman
Quoted 13 lines · Mark Brown
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
This breaks the build of the arm64 selftests due to a change in nolibc, it appears that "
tools/nolibc: properly align dirent buffer" is missing some dependency:aarch64-linux-gnu-gcc -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \ -include ../../../../include/nolibc/nolibc.h -I../..\ -static -ffreestanding -Wall za-fork.c /build/stage/build-work/kselftest/arm64/fp/za-fork-asm.o -o /build/stage/build-work/kselftest/arm64/fp/za-forkQuoted 14 lines
In file included from
./../../../../include/nolibc/nolibc.h:107,
from <command-line>:./../../../../include/nolibc/dirent.h: In function ‘readdir_r’:./../../../../include/nolibc/dirent.h:62:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__nolibc_aligned_as’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~~~~~~~~~~~~~~./../../../../include/nolibc/dirent.h:62:64: error: implicit declaration of function ‘__nolibc_aligned_as’ [-Wimplicit-function-declaration]./../../../../include/nolibc/dirent.h:62:84: error: expected expression before ‘struct’
62 | char buf[sizeof(structlinux_dirent64) +NAME_MAX+ 1]__nolibc_aligned_as(struct linux_dirent64);
| ^~~~~~./../../../../include/nolibc/dirent.h:63:47: error: ‘buf’ undeclared (first use in this function)
63 | structlinux_dirent64*ldir = (void *)buf;
| ^~~./../../../../include/nolibc/dirent.h:63:47: note: each undeclared identifier is reported only once for each function it appears inThanks for the report, I'll go drop all nolibc patches from the queues for now.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Thanks.
Shouldn't the bots apply prerequisite patches from the series automatically?
Hopefully yes, obviously it doesn't always work :)
Is there something we can do to help the tools?
That's up to Sasha, he has the tools that do this.
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
This patch comes from [0] and the prerequisite is in there.
Also all nolibc patches which should go to stable are tagged as such. Can you configure the bots not to pick up any nolibc patches automatically?
Quoted 8 lines
Quoted 6 lines
Yes we can! I will add the needed regex to the file:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/ignore_list
should it be:
tools/include/nolibc/*tools/testing/selftests/nolibc/*
?Looks good, thanks.
Great, I'll go make that change now.
thanks,
greg k-h
Quoted 8 lines · On Tue, 17 Jun 2025 17:15:08 +0200 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
For arm64, with Clang 18, I found the same issue as for 6.12.y:
https://lore.kernel.org/stable/[email protected]/
Otherwise, boot-tested under QEMU for Rust x86_64 and riscv64; built-tested for loongarch64.
Thanks!
Cheers,
Miguel
The kernel, bpf tool, and perf tool builds fine for v6.15.3-rc1 on x86 and arm64 Azure VM.
Kernel binary size for x86 build:
text data bss dec hex filename 31998596 14275846 6250496 52524938 321778a vmlinux
Kernel binary size for arm64 build:
text data bss dec hex filename 37335273 15435305 1038736 53809314 33510a2 vmlinux
Thanks,
Hardik
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.thanks,
greg k-h
After dropping revert-mm-execmem-unify-early-execmem_cache-behaviour.patch:
Tested rc1 against the Fedora build system (aarch64, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.
Greg Kroah-Hartman
maintainerQuoted 15 lines · Justin Forbes
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 3 lines
thanks,
greg k-h
After dropping revert-mm-execmem-unify-early-execmem_cache-behaviour.patch:
So does that mean that Linus's tree is also broken as it has this change in it?
thanks,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 18 lines · Greg Kroah-Hartman
Quoted 17 lines · Justin Forbes
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.thanks,
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
greg k-h
After dropping revert-mm-execmem-unify-early-execmem_cache-behaviour.patch:
So does that mean that Linus's tree is also broken as it has this change in it?
Ah, I see what I did, I took only the revert, but not the patches pervious to this change. Ugh, my fault, I'll drop this now and add it back after the next -rc release is out, thanks.
greg k-h
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.thanks,
greg k-h
Regressions on s390 allmodconfig builds with gcc-13 and clang-20 failed on the Linux stable-rc 6.15.4-rc1.
Regressions found on s390
* s390, build
- clang-20-allmodconfig
- gcc-13-allmodconfig
Regression Analysis:
- New regression? Yes
- Reproducibility? Yes
Build regression: stable-rc 6.15.4-rc1 s390 allmodconfig sdhci-esdhc-imx.c 'sdhc_esdhc_tuning_restore' defined but not used
## Build errorsdrivers/mmc/host/sdhci-esdhc-imx.c:1608:13: error:
'sdhc_esdhc_tuning_restore' defined but not used [-Werror=unused-function]
1608 | static void sdhc_esdhc_tuning_restore(struct sdhci_host *host)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mmc/host/sdhci-esdhc-imx.c:1586:13: error:
'sdhc_esdhc_tuning_save' defined but not used [-Werror=unused-function]
1586 | static void sdhc_esdhc_tuning_save(struct sdhci_host *host)
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
## Source
* Kernel version: 6.15.4-rc1
* Git tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* Git sha: de19bfa00d6f93fdcd38a5c088466e093af981f2
* Git describe: v6.15.3-593-gde19bfa00d6f
* Project details:
https://regressions.linaro.org/lkft/linux-stable-rc-linux-6.15.y/v6.15.3-593-gde19bfa00d6f/
* Architectures: s390
* Toolchains: gcc-13, clang-20
* Kconfigs: allmodconfig
## Build s390
* Build log: https://qa-reports.linaro.org/api/testruns/28840725/log_file/
* Build details:
https://regressions.linaro.org/lkft/linux-stable-rc-linux-6.15.y/v6.15.3-593-gde19bfa00d6f/build/gcc-13-allmodconfig/
* Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2yuYQdocMC494e6F9GTIAK16EAg/
* Kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2yuYQdocMC494e6F9GTIAK16EAg/config
## Steps to reproduce
- tuxmake --runtime podman --target-arch s390 --toolchain gcc-13
--kconfig allmodconfig
--
Linaro LKFT
https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 43 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.15.3 release. There are 780 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 19 Jun 2025 15:22:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.15.3-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.15.y
and the diffstat can be found below.thanks,
greg k-h
Regressions on s390 allmodconfig builds with gcc-13 and clang-20 failed on the Linux stable-rc 6.15.4-rc1.
Regressions found on s390
* s390, build
- clang-20-allmodconfig
- gcc-13-allmodconfigRegression Analysis:
- New regression? Yes
- Reproducibility? YesBuild regression: stable-rc 6.15.4-rc1 s390 allmodconfig
sdhci-esdhc-imx.c'sdhc_esdhc_tuning_restore' defined but not used## Build errors
drivers/mmc/host/sdhci-esdhc-imx.c:1608:13: error:
'sdhc_esdhc_tuning_restore' defined but not used [-Werror=unused-function]
1608 | static voidsdhc_esdhc_tuning_restore(struct sdhci_host *host)
Quoted 7 lines
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mmc/host/sdhci-esdhc-imx.c:1586:13: error:
'sdhc_esdhc_tuning_save' defined but not used [-Werror=unused-function]
1586 | static voidsdhc_esdhc_tuning_save(struct sdhci_host *host)| ^~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Looks like this needs 5846efac138a ("mmc: sdhci-esdhc-imx: fix defined but not used warnings"), but that's not quite right either as it fixes a different change here, and only applying it still will result in a build error. I'll just drop the offending commit here entirely and wait for a working set of patches to be submitted if the authors want them.
Same for the other branches where this showed up, thanks for the report.
thanks,
greg k-h