* [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 @ 2026-04-21 11:17 Zw Tang 2026-04-21 14:06 ` David Hildenbrand (Arm) 0 siblings, 1 reply; 5+ messages in thread From: Zw Tang @ 2026-04-21 11:17 UTC (permalink / raw) To: linux-mm, akpm, hannes; +Cc: kvm, linux-kernel, pbonzini, seanjc Hi, I am reporting a WARNING in workingset_activation() triggered by a syzkaller C reproducer on Linux 7.0.0-08391-g1d51b370a0f8. The warning is hit from the KVM page fault path: kvm_set_page_accessed() -> folio_mark_accessed() -> workingset_activation(). At first glance this looks more like an MM/workingset issue than a KVM-specific bug, although KVM/SVM is the trigger path. Reproducer: C reproducer: pastebin.com/raw/zzNSd9HK console output: pastebin.com/raw/TuipfpyA kernel config: pastebin.com/raw/aq1V3cLk Kernel: HEAD commit: 1d51b370a0f8 git tree: torvalds/linux kernel version: 7.0.0-08391-g1d51b370a0f8 #1 PREEMPT(lazy) (QEMU Standard PC, Q35) The warning is: WARNING in workingset_activation Log excerpt: WARNING: include/linux/memcontrol.h:381 at workingset_activation+0x466/0x540, CPU#1: repro/238 Call Trace: folio_mark_accessed+0x1d3/0x650 kvm_set_page_accessed+0x5a/0x70 kvm_release_page_clean+0x26/0x180 direct_page_fault+0x553/0x11a0 kvm_mmu_page_fault+0x35b/0x2020 kvm_handle_page_fault+0x1aa/0x380 svm_invoke_exit_handler+0x7a/0xe0 svm_handle_exit+0x416/0x7f0 vcpu_enter_guest+0x26ad/0x49c0 kvm_arch_vcpu_ioctl_run+0x697/0x25e0 kvm_vcpu_ioctl+0x737/0x1610 __x64_sys_ioctl+0x192/0x220 do_syscall_64+0x117/0xfc0 entry_SYSCALL_64_after_hwframe+0x4b/0x53 The reproducer appears to drive KVM into a guest page fault flow that marks a folio as accessed, and the warning is then emitted inside workingset_activation(). Because the RIP is in workingset_activation() itself, this may indicate a problem in workingset/LRU or memcg/lruvec handling, with KVM only serving as the trigger path. Please let me know if I should also send this to additional KVM x86 maintainers, but mm/workingset.c seems to be the primary fault location. Thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 2026-04-21 11:17 [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 Zw Tang @ 2026-04-21 14:06 ` David Hildenbrand (Arm) [not found] ` <PS1PPF7E1D7501FEA2B54606827E0DE1805AB2D2@PS1PPF7E1D7501F.apcprd02.prod.outlook.com> 0 siblings, 1 reply; 5+ messages in thread From: David Hildenbrand (Arm) @ 2026-04-21 14:06 UTC (permalink / raw) To: Zw Tang, linux-mm, akpm, hannes; +Cc: kvm, linux-kernel, pbonzini, seanjc On 4/21/26 13:17, Zw Tang wrote: > Hi, > > I am reporting a WARNING in workingset_activation() triggered by a > syzkaller C reproducer on Linux 7.0.0-08391-g1d51b370a0f8. g1d51b370a0f8 is not a known git commit id. Do you have an upstream git commit where the line number include/linux/memcontrol.h:381 makes sense? -- Cheers, David ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <PS1PPF7E1D7501FEA2B54606827E0DE1805AB2D2@PS1PPF7E1D7501F.apcprd02.prod.outlook.com>]
* 回复: [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 [not found] ` <PS1PPF7E1D7501FEA2B54606827E0DE1805AB2D2@PS1PPF7E1D7501F.apcprd02.prod.outlook.com> @ 2026-04-22 2:06 ` Zw Tang 2026-04-22 2:06 ` Zw Tang 0 siblings, 1 reply; 5+ messages in thread From: Zw Tang @ 2026-04-22 2:06 UTC (permalink / raw) To: David Hildenbrand (Arm), linux-mm, akpm, hannes Cc: kvm, linux-kernel, pbonzini, seanjc [-- Attachment #1: Type: text/plain, Size: 2160 bytes --] ------------------------------ *发件人:* Tang Zw <shicenci@gmail.com> *发送时间:* 2026年4月22日 10:03 *收件人:* David Hildenbrand (Arm) <david@kernel.org>; linux-mm@kvack.org < linux-mm@kvack.org>; akpm@linux-foundation.org <akpm@linux-foundation.org>; hannes@cmpxchg.org <hannes@cmpxchg.org> *抄送:* kvm@vger.kernel.org <kvm@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; pbonzini@redhat.com <pbonzini@redhat.com>; seanjc@google.com < seanjc@google.com> *主题:* 回复: [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 Hi David, Thanks for pointing this out. You are right. The commit id I sent was incorrect. I mistakenly used the git describe-style suffix g1d51b370a0f8, but the actual git commit is: 1d51b370a0f8f642f4fc84c795fbedac0fcdbbd2 The short commit id is: 1d51b370a0f8 Sorry for the confusion. I am also re-checking whether the kernel image was built from a clean tree and whether there were any local modifications when the crash was reproduced, so that the reported source line numbers match the exact build. Thanks. ------------------------------ *发件人:* David Hildenbrand (Arm) <david@kernel.org> *发送时间:* 2026年4月21日 22:06 *收件人:* Zw Tang <shicenci@gmail.com>; linux-mm@kvack.org <linux-mm@kvack.org>; akpm@linux-foundation.org <akpm@linux-foundation.org>; hannes@cmpxchg.org < hannes@cmpxchg.org> *抄送:* kvm@vger.kernel.org <kvm@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; pbonzini@redhat.com <pbonzini@redhat.com>; seanjc@google.com < seanjc@google.com> *主题:* Re: [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 On 4/21/26 13:17, Zw Tang wrote: > Hi, > > I am reporting a WARNING in workingset_activation() triggered by a > syzkaller C reproducer on Linux 7.0.0-08391-g1d51b370a0f8. g1d51b370a0f8 is not a known git commit id. Do you have an upstream git commit where the line number include/linux/memcontrol.h:381 makes sense? -- Cheers, David [-- Attachment #2: Type: text/html, Size: 6701 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 2026-04-22 2:06 ` 回复: " Zw Tang @ 2026-04-22 2:06 ` Zw Tang 2026-04-22 7:44 ` David Hildenbrand (Arm) 0 siblings, 1 reply; 5+ messages in thread From: Zw Tang @ 2026-04-22 2:06 UTC (permalink / raw) To: David Hildenbrand (Arm), linux-mm, akpm, hannes Cc: kvm, linux-kernel, pbonzini, seanjc Hi David, Thanks for pointing this out. You are right. The commit id I sent was incorrect. I mistakenly used the git describe-style suffix g1d51b370a0f8, but the actual git commit is: 1d51b370a0f8f642f4fc84c795fbedac0fcdbbd2 The short commit id is: 1d51b370a0f8 Sorry for the confusion. I am also re-checking whether the kernel image was built from a clean tree and whether there were any local modifications when the crash was reproduced, so that the reported source line numbers match the exact build. Thanks. Zw Tang <shicenci@gmail.com> 于2026年4月22日周三 10:06写道: > > > ________________________________ > 发件人: Tang Zw <shicenci@gmail.com> > 发送时间: 2026年4月22日 10:03 > 收件人: David Hildenbrand (Arm) <david@kernel.org>; linux-mm@kvack.org <linux-mm@kvack.org>; akpm@linux-foundation.org <akpm@linux-foundation.org>; hannes@cmpxchg.org <hannes@cmpxchg.org> > 抄送: kvm@vger.kernel.org <kvm@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; pbonzini@redhat.com <pbonzini@redhat.com>; seanjc@google.com <seanjc@google.com> > 主题: 回复: [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 > > Hi David, > Thanks for pointing this out. > You are right. The commit id I sent was incorrect. I mistakenly used the > git describe-style suffix g1d51b370a0f8, but the actual git commit is: > 1d51b370a0f8f642f4fc84c795fbedac0fcdbbd2 > The short commit id is: > 1d51b370a0f8 > Sorry for the confusion. > I am also re-checking whether the kernel image was built from a clean tree > and whether there were any local modifications when the crash was reproduced, > so that the reported source line numbers match the exact build. > Thanks. > > ________________________________ > 发件人: David Hildenbrand (Arm) <david@kernel.org> > 发送时间: 2026年4月21日 22:06 > 收件人: Zw Tang <shicenci@gmail.com>; linux-mm@kvack.org <linux-mm@kvack.org>; akpm@linux-foundation.org <akpm@linux-foundation.org>; hannes@cmpxchg.org <hannes@cmpxchg.org> > 抄送: kvm@vger.kernel.org <kvm@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; pbonzini@redhat.com <pbonzini@redhat.com>; seanjc@google.com <seanjc@google.com> > 主题: Re: [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 > > On 4/21/26 13:17, Zw Tang wrote: > > Hi, > > > > I am reporting a WARNING in workingset_activation() triggered by a > > syzkaller C reproducer on Linux 7.0.0-08391-g1d51b370a0f8. > > g1d51b370a0f8 is not a known git commit id. > > Do you have an upstream git commit where the line number > include/linux/memcontrol.h:381 makes sense? > > > -- > Cheers, > > David ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 2026-04-22 2:06 ` Zw Tang @ 2026-04-22 7:44 ` David Hildenbrand (Arm) 0 siblings, 0 replies; 5+ messages in thread From: David Hildenbrand (Arm) @ 2026-04-22 7:44 UTC (permalink / raw) To: Zw Tang, linux-mm, akpm, hannes; +Cc: kvm, linux-kernel, pbonzini, seanjc On 4/22/26 04:06, Zw Tang wrote: > Hi David, > > Thanks for pointing this out. > > You are right. The commit id I sent was incorrect. I mistakenly used the > git describe-style suffix g1d51b370a0f8, but the actual git commit is: > > 1d51b370a0f8f642f4fc84c795fbedac0fcdbbd2 > > The short commit id is: > > 1d51b370a0f8 > > Sorry for the confusion. > > I am also re-checking whether the kernel image was built from a clean tree > and whether there were any local modifications when the crash was reproduced, > so that the reported source line numbers match the exact build. Okay, on that tree include/linux/memcontrol.h:381 points at lockdep_assert_once(rcu_read_lock_held() || lockdep_is_held(&cgroup_mutex)); lockdep_is_held() would not trigger a warning like that IIRC, but lockdep_assert_once() does do { WARN_ON_ONCE(debug_locks && !(cond)); } while (0) So likely we are calling obj_cgroup_memcg() without the RCU read lock held? kvm_release_page_clean()->kvm_set_page_accessed()->mark_page_accessed()->folio_mark_accessed()->workingset_activation() ... grabs the RCU lock, though, before calling rcu_read_lock(); workingset_age_nonresident(folio_lruvec(folio), folio_nr_pages(folio)); rcu_read_unlock(); The folio_memcg_charged() only checks folio->memcg_data. So something does not quite add up here? -- Cheers, David ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-04-22 7:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-21 11:17 [BUG] WARNING in workingset_activation triggered by KVM page fault path on Linux 7.0.0-08391-g1d51b370a0f8 Zw Tang
2026-04-21 14:06 ` David Hildenbrand (Arm)
[not found] ` <PS1PPF7E1D7501FEA2B54606827E0DE1805AB2D2@PS1PPF7E1D7501F.apcprd02.prod.outlook.com>
2026-04-22 2:06 ` 回复: " Zw Tang
2026-04-22 2:06 ` Zw Tang
2026-04-22 7:44 ` David Hildenbrand (Arm)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox