From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A33112D7DDB for ; Sun, 9 Aug 2026 09:42:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786268578; cv=none; b=sxk6IU1EaEbEDyiQowQUWlt8BlbRMhxsZusDhpUaxXAl4dDmBqFFiFYnLXSqrnmD+iRzNZewSbG+/B6PkdB9YvEiOIhqLhE5PM793dk32GxrYwFjDry3uzCUZ48vZc32fR2rzDyfRQKPzk6+OsofAMCKHdjXnvvTrNInFo5Nqq0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786268578; c=relaxed/simple; bh=Kz2WFQI3cNsl8NmFd8p0Pv75q9u1vlsRXXKFmlARwfM=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=fDWclKa/fWZBU8PWUsg0RqVYbk+yVuqQ43qQFue53sFh+pKG7lT06ePCD67RoFfwnrRIOXl9ZlNsZZGz4NW0ycZrbSeLp76ObRTsIxU3FdwLfd91AlIrS+U08tdM7Ev2j1sIcHz0xsSM8KEKfPZNHzYK2f199qAxP7BlR4n2TZk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.167.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-49f3a97f1caso588088b6e.0 for ; Sun, 09 Aug 2026 02:42:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786268575; x=1786873375; h=content-type:to:from:subject:message-id:in-reply-to:date :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=o6gfS4t8suEb2w9aViizMnLhRmwePYhxKSrIe7GsKDQ=; b=tDjvb2T6DvBeQTDtdo4bNCr59rofUI9JUvogbOCw12l85RXFwuuGIv07v4jXxPVS/1 bMBeam1wRsdC4ulShAMcoR058HQa31rG1ydoxU1U/cNk9Tssvzr8X9hUm442vIBIprTa q7LnbE5yWtuCXk7XRTJgv9HpNQ0YNjr7610df+0TIfHJkPAE5DN74w381f05ZW+RkuKl CmZDpzOTruaBBv0d3qjmjdEXfxdSRHxxZCAH1P0ZxCK9ICofD8TexpDai00UmiXSuiqB Lhj+znC8fUja7kkdeZK/po9eaNcZz5Dk3rhr/h0RnWWB3hVTl2rmIho4AJ7BS44moIo6 HPiA== X-Gm-Message-State: AOJu0Yx3xtU8CYKUB89bkyt/9PV8tHYBxRtakwo85ZcNfMqu5H1UyBWJ cBJN0o/NjZkYFlTGPZ6qBJ+vSm7RlB9slMYkw/WZRJrPyeCJcIpDsAKy7+SlT2k8UgzHAtUcK1s x12Zq3cxLrc6NvTmFk/yjEqW+SS/dlAgKOTrQVrO5KLUG4ZR4lt9S1JR8Bvw= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6808:1394:b0:497:df42:1dff with SMTP id 5614622812f47-4b1ab72b0c1mr8931133b6e.1.1786268575513; Sun, 09 Aug 2026 02:42:55 -0700 (PDT) Date: Sun, 09 Aug 2026 02:42:55 -0700 In-Reply-To: <673f4bbc.050a0220.3c9d61.0174.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6a784b9f.01d0871a.3a0d52.0083.GAE@google.com> Subject: Forwarded: Re: [PATCH] KVM: x86/xen: Use read_trylock() for GPC locks in hardirq paths From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: Re: [PATCH] KVM: x86/xen: Use read_trylock() for GPC locks in hardirq paths Author: dwmw2@infradead.org 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