* Re: [syzbot] [kvm-x86?] [kvm?] WARNING: locking bug in kvm_xen_set_evtchn_fast
@ 2026-08-10 11:28 David Woodhouse
2026-08-10 14:00 ` syzbot
0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2026-08-10 11:28 UTC (permalink / raw)
To: syzbot+919877893c9d28162dc2; +Cc: kvm, seanjc, pbonzini, suryasaimadhu369
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
On Sun, 2026-08-09 at 04:34 +0000, syzbot wrote:
> syzbot has tested the proposed patch and the reproducer did not trigger any issue
I found some though. Reworked:
#syz test: git://git.infradead.org/users/dwmw2/linux.git xen-srcu-fixed
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6179 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: x86/xen: Use read_trylock() for GPC locks in hardirq paths
@ 2026-08-09 9:42 David Woodhouse
2026-08-09 11:34 ` [syzbot] [kvm-x86?] [kvm?] WARNING: locking bug in kvm_xen_set_evtchn_fast syzbot
0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2026-08-09 9:42 UTC (permalink / raw)
To: sai madhu, kvm, Paul E. McKenney
Cc: seanjc, pbonzini, syzbot+919877893c9d28162dc2
[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]
On Fri, 2026-08-07 at 17:49 +0530, sai madhu wrote:
> kvm_xen_set_evtchn_fast() is called from hardirq context (xen timer
> callback, kvm_arch_set_irq_inatomic()). On PREEMPT_RT (and under
> lockdep), read_lock_irqsave(&gpc->lock) is invalid there because
> rwlock_t may sleep.
>
> Switch to read_trylock() and return -EWOULDBLOCK when the lock is
> contended or the cache is invalid. xen_timer_callback() already
> defers to the slow path (timer_pending + KVM_REQ_UNBLOCK +
> kvm_xen_inject_timer_irqs()).
>
> Also fix __kvm_xen_has_interrupt() the same way for atomic callers.
>
> Based on David Woodhouse's upstream series (May 2026, patch 3/7).
> Fixes syzbot: https://syzkaller.appspot.com/bug?extid=919877893c9d28162dc2
Thanks... but why? We're literally iterating on this right now.
I'm fairly convinced I want to ditch rwlocks completely and move to RCU:
https://lore.kernel.org/all/20260805195528.3853473-1-dwmw@amazon.co.uk/
Testing found some issues in my conversion which I've since fixed, and
the conversion to SRCU at Sean's request is currently an *incremental*
patch, which I'll eventually squash back into the first.
I'm in the middle of running a weekend-long soak test on this tree:
https://git.infradead.org/?p=users/dwmw2/linux.git;a=shortlog;h=refs/heads/xen-rcu-fixed
Let's see what syzbot thinks of it...
#syz test: git://git.infradead.org/users/dwmw2/linux.git xen-rcu-fixed
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6179 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [kvm-x86?] [kvm?] WARNING: locking bug in kvm_xen_set_evtchn_fast
2026-08-09 9:42 [PATCH] KVM: x86/xen: Use read_trylock() for GPC locks in hardirq paths David Woodhouse
@ 2026-08-09 11:34 ` syzbot
0 siblings, 0 replies; 3+ messages in thread
From: syzbot @ 2026-08-09 11:34 UTC (permalink / raw)
To: dwmw2, kvm, linux-kernel, paulmck, pbonzini, seanjc,
suryasaimadhu369, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+919877893c9d28162dc2@syzkaller.appspotmail.com
Tested-by: syzbot+919877893c9d28162dc2@syzkaller.appspotmail.com
Tested on:
commit: 230abd62 KVM: pfncache: Use a dedicated SRCU domain in..
git tree: git://git.infradead.org/users/dwmw2/linux.git xen-rcu-fixed
console output: https://syzkaller.appspot.com/x/log.txt?x=110522c6580000
kernel config: https://syzkaller.appspot.com/x/.config?x=9cef045500682f6b
dashboard link: https://syzkaller.appspot.com/bug?extid=919877893c9d28162dc2
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-10 14:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10 11:28 [syzbot] [kvm-x86?] [kvm?] WARNING: locking bug in kvm_xen_set_evtchn_fast David Woodhouse
2026-08-10 14:00 ` syzbot
-- strict thread matches above, loose matches on Subject: below --
2026-08-09 9:42 [PATCH] KVM: x86/xen: Use read_trylock() for GPC locks in hardirq paths David Woodhouse
2026-08-09 11:34 ` [syzbot] [kvm-x86?] [kvm?] WARNING: locking bug in kvm_xen_set_evtchn_fast syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).