From nobody Tue Nov 24 09:44:19 2026
X-Original-To: xen@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYdDz65F2z72tQH
	for <xen@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 09:44:19 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYdDz245zz4nh6
	for <xen@FreeBSD.org>; Tue, 24 Nov 2026 09:44:19 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795513459;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=9HR9X5NPdJhvpwT6WznajFnd/F7bjVNO0QfTTKy4e0c=;
	b=cP8ovwoP2N2ACYhTYfymjUu4N1JkxcIhGT6je8lxmmDV6jIgnby6Z2snnHIURvl16UNJaF
	6UhpYOvYdtez3l7s8hch+mILSXmjqMexsVtUuC+pP6n84z/m+kqxXcGMYd9+crD7/b1nqx
	D1s3ujt1mFq/Gp9HwW5c4oAHwdRN9VlwHCGhMUUXsEhLinJuD+QrRWGgKTlvwKqbGW0GpX
	odGq71JCWjY6oQyO0pMt/MStUmuzh+jyp5/LUYZ+SWTeTfe9+s4svNn1KMRt8bGW0Ele+c
	cdbck1E3oSjZSS8xlBD969kgVkYU2qJ5Tiwx8LshblpH7/3xNB/KkuWq8RQJkg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795513459;
	b=b3ndpRY0x1cjwHqMuETHiZZEWZLTrleyT5SItiJb1x/xjYDyHRIHkby1XPdSqmetCtjZA0
	nUwSsVVKRa4cJREnNvY9dTIrE/n8u+Gw5GDBixBfF6LO6AlaU4OdHs2Ai28xZnpnFg5AuJ
	iqNlZ7u1Hbyvj2yVRz5bsb7ZlWepOYlKU0/WKbK77Mb9Z/bNo7ilpHiUZ1HLwWiFwBgIJT
	btWscm2bWZmZYNYwFoVDGWShnhiWHeF+aHZCpsjp7XPyChB6yUdDZD1U4MSJ5+IO2+fw45
	oA6KH0xZORaLTw38w/PGj4Q22YOxIAfnHzVuJ6KNIe+zneRdHNaxH0QwV+HKHQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795513459;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=9HR9X5NPdJhvpwT6WznajFnd/F7bjVNO0QfTTKy4e0c=;
	b=om6hfaDzrUc88SXhtctGvR2F15noAlh5y+W+zNcf5TomP9pfl00wH8amN0WBH9IMiSZLFL
	O7XSqBxli7Esl1QglEHQuuI6FLi251PbD2kyH6U0QchD4AnlZm12nlCHay4JIXmrc/ZBkd
	19m1wNPzm1683KUIcE7iZQXmzK+ZLlNEH2gPbvXDIRtongi2v7yr7xD3hOwNg641pnz/MR
	lVfk2z2QN+P9DSICe5LpbvkWtytbL6fte0lKryFAiOALFlAexTYntdIsrC0hMrrtqmynbL
	aM4uvygmP3eZVJvkopIU7lcLhGCSelOw3ipSctocA1fMwMptrXML7C0tTV11sw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4jYdDz1TS9zYTw
	for <xen@FreeBSD.org>; Tue, 24 Nov 2026 09:44:19 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
	by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 6AO9iJd8043146
	for <xen@FreeBSD.org>; Tue, 24 Nov 2026 09:44:19 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 6AO9iJu7043145
	for xen@FreeBSD.org; Tue, 24 Nov 2026 09:44:19 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: xen@FreeBSD.org
Subject: [Bug 300888] xen/gntdev: IOCTL_GNTDEV_SET_UNMAP_NOTIFY returns
 EINVAL for the first grant mapping (range check overflows)
Date: Tue, 24 Nov 2026 09:44:19 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: kern
X-Bugzilla-Version: 15.1-RELEASE
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: sablomenkamp@gmail.com
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: xen@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: 
Message-ID: <bug-300888-23905-8oMe39t1ua@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-300888-23905@https.bugs.freebsd.org/bugzilla/>
References: <bug-300888-23905@https.bugs.freebsd.org/bugzilla/>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
List-Archive: https://lists.freebsd.org/archives/freebsd-xen
X-BeenThere: freebsd-xen@freebsd.org
List-Id: Discussion of the freebsd port to xen - implementation and usage <freebsd-xen.FreeBSD.org>
List-Post: <mailto:freebsd-xen@FreeBSD.org>
List-Help: <mailto:freebsd-xen+help@FreeBSD.org>
List-Subscribe: <mailto:freebsd-xen+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:freebsd-xen+unsubscribe@FreeBSD.org>
List-Owner: <mailto:freebsd-xen+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D300888

--- Comment #1 from Scott Blomenkamp <sablomenkamp@gmail.com> ---
Tested Roger's fix for this, D61755 (Diff 1, posted Nov 19), as part of his
series D61755, D61756, D61757, D61758 and D61760, applied in that order to =
main
97fd69b0b884.

Setup: ThinkPad T480, Qubes OS 4.3.2 (Xen 4.19.6). FreeBSD guest, HVM with a
stub domain, 2 vCPUs. Kernel GENERIC (INVARIANTS, WITNESS) plus DEBUG_MEMGU=
ARD
with vm.memguard.desc=3Dgntdev. None of my own gntdev or xen_intr patches.

Result: with none of my workarounds, qrexec works. Calls into the guest: 20=
/20
as a normal user, 20/20 as root, and 1,800/1,800 calls 8 at a time. Thanks.

Testing was done with an AI assistant (Claude); the runs and results are fr=
om
my own machines.

--=20
You are receiving this mail because:
You are the assignee for the bug.=

From nobody Tue Nov 24 09:45:40 2026
X-Original-To: xen@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYdGX0dBHz72tVr
	for <xen@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 09:45:40 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYdGW6l84z4nyV
	for <xen@FreeBSD.org>; Tue, 24 Nov 2026 09:45:39 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795513539;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=fZh/+9H17tyY9h3VuhBihIVgBaJ+JEBqF+u1zFXfjcQ=;
	b=nIOpZOslhfGkNEcPLt7nUcxB4a6VXmokBoFbmZ0Kavokwi9XAlSn2DnT0FIdK/b4nSDLZc
	bbQKyrR0Nosg+oZU323+fKvAdCQJrOj2PaAT7ACEsaDABA+JXHRicSFNpUmYFAZAlSFTIQ
	P1/2AozznzK1S9AXaoe0HvZE4NQdJulbswFBUta6fbU0VSIm2FQAsBQraZ2cv4pbOI48bO
	yFot/0nmnVmJXENTrYcwn/X2v3BrCOXB4NA0EuRctASEnkrN2TQb6AdxjcmIpnI4AatjzV
	uyQ+FZIo8MtGgg6HAyPLd1aXig22Ngg7RVY/bQRy4C+oYPDzd94BoPA8kpPJeg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795513539;
	b=s0NcsnkUk5OxF87WQXTnos4zhQerVmQccTczGlkrhke7eoh1Kd965TRjwzDOz5tgg+FxSu
	7cm88nmNQ2/ZXZ7rxlFm3Rykzz47prJx5oyuyt7XKcOb4mPS8UQovs2XcfD67zWkkLObCz
	yu4DiDRtzsDjSr4ozOVGqpnfBFwHCK1F/KT3tQVqqTJLexgihA0IRxUy9JLv48JXLbmXNS
	s3s/ZujHWCeub3bfAgPr4/cVpvAqRENdmzHdoLIE2n2sJ6TOLi4qiWtwyJxXMAr1zlSKyG
	abmjo52+2MCE34hx4sWWY6gQ17McEu0Zr7Fgzt6Mbb/RQ7Qq4nUzBMz6rBTOSA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795513539;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=fZh/+9H17tyY9h3VuhBihIVgBaJ+JEBqF+u1zFXfjcQ=;
	b=ioe65Am/tDaM+ZOk+t7mL9stbS1qepxw5vTBrsB2q06SlLB5ss7vlMi3A5dG5nc15/pw1L
	OM7xdJb3y7WkRRWVdTHDeYmeSWGix/oDUchg1o9mEUnRZCme2PRbQK90UcXkVapnS6zl3X
	Lecfz3EB5OfwE6Y4Li4yBb1cpUCeozrcM8aq43PEM8bpb57koDfoV+S4doSxvr87ZJwC/k
	RAcpRW0TN9g3WpcBc7+qZ5UHIZrAW9uM6OlzmIGW0C85RlRI0Oq/DrX5A/fwiuA0N78oQl
	hzMocoUlXNINoMuiZiPX6KlKZLrTadUnYrX0/uOG4MH91vekicfxC0VuAidxPQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4jYdGW6PNhzYXw
	for <xen@FreeBSD.org>; Tue, 24 Nov 2026 09:45:39 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
	by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 6AO9jdOi043797
	for <xen@FreeBSD.org>; Tue, 24 Nov 2026 09:45:39 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 6AO9jdD4043796
	for xen@FreeBSD.org; Tue, 24 Nov 2026 09:45:39 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: xen@FreeBSD.org
Subject: [Bug 300889] xen/gntdev: SET_UNMAP_NOTIFY allocates sizeof(*arg) (16
 bytes) for a struct notify_data (24 bytes), heap overflow
Date: Tue, 24 Nov 2026 09:45:40 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: kern
X-Bugzilla-Version: 15.1-RELEASE
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: sablomenkamp@gmail.com
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: xen@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: 
Message-ID: <bug-300889-23905-w5sINduBdp@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-300889-23905@https.bugs.freebsd.org/bugzilla/>
References: <bug-300889-23905@https.bugs.freebsd.org/bugzilla/>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
List-Archive: https://lists.freebsd.org/archives/freebsd-xen
X-BeenThere: freebsd-xen@freebsd.org
List-Id: Discussion of the freebsd port to xen - implementation and usage <freebsd-xen.FreeBSD.org>
List-Post: <mailto:freebsd-xen@FreeBSD.org>
List-Help: <mailto:freebsd-xen+help@FreeBSD.org>
List-Subscribe: <mailto:freebsd-xen+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:freebsd-xen+unsubscribe@FreeBSD.org>
List-Owner: <mailto:freebsd-xen+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D300889

--- Comment #1 from Scott Blomenkamp <sablomenkamp@gmail.com> ---
Tested Roger's fix for this, D61757 (Diff 1, posted Nov 19), as part of his
series D61755, D61756, D61757, D61758 and D61760, applied in that order to =
main
97fd69b0b884.

Setup: ThinkPad T480, Qubes OS 4.3.2 (Xen 4.19.6). FreeBSD guest, HVM with a
stub domain, 2 vCPUs. Kernel GENERIC (INVARIANTS, WITNESS) plus DEBUG_MEMGU=
ARD
with vm.memguard.desc=3Dgntdev, so every gntdev allocation sits against a g=
uard
page. None of my own gntdev or xen_intr patches.

Result: 1,800 qrexec calls 8 at a time, about 28,800 guarded gntdev
allocations, no memguard fault. As a control I built stock main 97fd69b0 the
same way without the series: the guest panicked about 25 seconds after boot=
 in
both boots ("vm_fault_lookup: fault on nofault entry" in gntdev_ioctl, while
the Qubes agents start). So memguard catches the undersized allocation at o=
nce,
and D61757 fixes it.

D61756 (comparison functions, no PR of its own) was part of the same series=
 and
run; nothing showed up there.

Testing was done with an AI assistant (Claude); the runs and results are fr=
om
my own machines.

--=20
You are receiving this mail because:
You are the assignee for the bug.=

From nobody Tue Nov 24 10:14:41 2026
X-Original-To: xen@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYdw14Q5Vz6w2FR
	for <xen@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:14:41 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYdw13lmwz4tR6
	for <xen@FreeBSD.org>; Tue, 24 Nov 2026 10:14:41 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795515281;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=GCyrvJahY4U4pz7yboPXQLkztLnGNlb8+6G74pNS59M=;
	b=Z/O0YZ9+6UicRg+iNwhpO6v2/zL0F7alnW/+tWkvBwdrHicTVRkkCD49gSvsph6lTZ5Db1
	gvg7obFvZErgVJ6/MGxe1SGSDngS1EGq4tpxv86iajp7lk1VRdcIs8jfkPhnbrWDX2EVjC
	J2FtFjvWjsO1bU777mNmrJIsQf3fk3K9eya2mHVRWgNn/wHATOyjL+01A1IkxGeX//EHCJ
	GaR+fu+DjG5ZLI3qpdk+EYS3P7ZX6lQkAbu3IssdMpCda8qtaaOc8cbzz/TSIGWNJkazWo
	wLIgrD64i7nCRJPj4u9y8E/DldGzC7dpuNzXXRoYvxNNppLaCuwxMfeWqx2m7w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795515281;
	b=iOSMODN+hcUxYG+u1F0lzRx8g+thGUEXybv3tYLH3KVedelgL7Js+ULWTMFsp5WhVHM8iJ
	q6ldInrVtTxdMcbTdw1gx6ZChonRcvgHBS51UsLYnHnHYLpFb77CS5jAHllQ14z2FxsOPY
	G8hZiVKqSVLglR843JHmL4321e3EyCkNwCGuNX8v6OvIYoVrDUtB7E7L0TjGfnm8NifkzW
	hN0e9gnjlYn2LM6vFIbNJftiXmXa8ORIBFJvZW//lNWn0avtMRdu0uEX++hk9N++KbHDPq
	ZYppMM9tRssHLSr980bNyJQ3qa2oOYykwAG8kRq6B4QDIa5Gtj1SMDXMcPnpXA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795515281;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=GCyrvJahY4U4pz7yboPXQLkztLnGNlb8+6G74pNS59M=;
	b=qXRtlC9ui6NqJFyMZPEFrlYAhL37uByrjYAKXK9lGxYKrg82MUFeeN1qKCFIZaAZTnvK2k
	Ja7zXg5dd8Z/PH8vyT+TWS3uIFX0y67cgluFBJqnuzABo9274+5bTGC1/tjuE5Ue9IHrvv
	OrZ0aRe3CmmS8equPx9bau6YVY802kjmY9twEBmvi7k3INlqTc5Wa/9t/f3aAsgM3hnamu
	nsAGeMK0Tcgq5KhD7KqkUEPMMuW04OPk7rHNYprVhm/YoplEYBj5tB700aXpEgBbZQu0vh
	m8vK3wGu73Ujlox6Jt8eAhtHtNFVRTFDpxfi3EprdAv2csoPe1RjmQzYhj8sRw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4jYdw13QKDzZTk
	for <xen@FreeBSD.org>; Tue, 24 Nov 2026 10:14:41 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
	by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 6AOAEfek096785
	for <xen@FreeBSD.org>; Tue, 24 Nov 2026 10:14:41 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 6AOAEfJU096784
	for xen@FreeBSD.org; Tue, 24 Nov 2026 10:14:41 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: xen@FreeBSD.org
Subject: [Bug 300891] xen/xen_intr: xen_intr_get_evtchn_from_port() takes a
 reference on an interrupt source whose refcount is already 0
Date: Tue, 24 Nov 2026 10:14:41 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: kern
X-Bugzilla-Version: 15.1-RELEASE
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: sablomenkamp@gmail.com
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: xen@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: 
Message-ID: <bug-300891-23905-nCYthkyvip@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-300891-23905@https.bugs.freebsd.org/bugzilla/>
References: <bug-300891-23905@https.bugs.freebsd.org/bugzilla/>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
List-Archive: https://lists.freebsd.org/archives/freebsd-xen
X-BeenThere: freebsd-xen@freebsd.org
List-Id: Discussion of the freebsd port to xen - implementation and usage <freebsd-xen.FreeBSD.org>
List-Post: <mailto:freebsd-xen@FreeBSD.org>
List-Help: <mailto:freebsd-xen+help@FreeBSD.org>
List-Subscribe: <mailto:freebsd-xen+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:freebsd-xen+unsubscribe@FreeBSD.org>
List-Owner: <mailto:freebsd-xen+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D300891

--- Comment #1 from Scott Blomenkamp <sablomenkamp@gmail.com> ---
Tested Roger's fix for this, D61760 (Diff 1, posted Nov 19), as part of his
series D61755, D61756, D61757, D61758 and D61760, applied in that order to =
main
97fd69b0b884.

Setup: ThinkPad T480, Qubes OS 4.3.2 (Xen 4.19.6). FreeBSD guest, HVM with a
stub domain, 2 vCPUs. Kernel GENERIC (INVARIANTS, WITNESS) plus DEBUG_MEMGU=
ARD
with vm.memguard.desc=3Dgntdev. None of my own gntdev or xen_intr patches.

Result: 1,800 qrexec calls into the guest, 8 at a time, so event channel bi=
nds
and unbinds race: no panic, no WITNESS or INVARIANTS report, and the guest's
event channels (xl debug-keys e) were 28 before and 28 after, so nothing
leaked.

Testing was done with an AI assistant (Claude); the runs and results are fr=
om
my own machines.

--=20
You are receiving this mail because:
You are the assignee for the bug.=

