From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079757; b=xQunAejyaE6/LUDsALdD5ldOiNKx/2bx+ssFqiVsMw5B/0JfkrdVUsI+5W0P3VCwMXve AClKdsY5ZIzN0rFPzmUnhvKoE/6+IVbnhDHH8XNzwz6HtOLX27Owi6s+nqN/rl8XMpS+2 fF8t1Uc6fIzcdq5TjHNtNbvrMOct0MCjR8o2oHUQH2BQK8rjuFbdZcfvauCxfW2g4Au0y JSpGTrdmoZK5WFyQbJIfbzJTd8bAMihHmwloEhs4Ab+Lsa7eBAjdaDJljrBsfuoxl+5VF AHrW+qYeAJgwFUe5cmUd44NjAE5P8mEhnvQl4ef1ECAConswa3hh39O1Pz7kydxE/ZQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079757; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=ZlJ5gDTHwNV763F06DLtQ2/aOTUarJ4scJzKWuTwlx0=; b=lqsab+2EilnYzwMPMpZF1wV2IDCWlq9ofX2y8L+Kr2tS0JtCLZhbhUKYd31DdD6yXG7S RtcNa1IQn1TkBCERbnN76Eghwg7p3ZIt7L+9rSjFCq2780YvqSzKbX8/VnWummiU2Pj4Y qTf1uTzayqVGvQ/Qkzu7zLVEbo+9TG54Mmy/thyx91Dv0+hH/aEs/LYWW1w+G8yu4+2d+ NojWIy4MIS5SgJE4a3pLqNWxn3FgAeFqXkfwnhTEGKQ1QLw5h0pf2ul8dUY4FH0MCeg8O WGTOiThKCHV0yHJlhxYKl3Ukhtuvxd/Bk79eFChu5QhR7EXIk4i3cNwPuhAtPYm2+3g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=EOADe60f; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01DF2606A31A for ; Mon, 30 Nov 2026 23:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=EOADe60f Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FEAE1F0089A; Mon, 30 Nov 2026 23:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796079756; bh=ZlJ5gDTHwNV763F06DLtQ2/aOTUarJ4scJzKWuTwlx0=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=EOADe60fVfOts6ZzxZZ2V1efeo0T6u7nzv4vKgQsJymbdshW4+kPXITvEn/gbYMNg BItWSE/mYtje6cM4/iX8gq49DAb9fIwaJ6CX+139oFuJ+7c2/DceqJ+tuRD/YohUIm XWn3vA+NgJEBGtinrq6IbpT8W/0tiVlNbjPww+a6c46VB5MvtufGVQHRRpJ53mqIyw fVVHfK0EoSbgH3QOMA3jy818r9c+BmtA4z7xRUHBDhLLVvVkhrYldRyHIy3W/AaFSg gQJmsnYiW4p9yCFHsWCJ7q7QHH/z1Av4XtKJ/IB1MHyl9S/E4DbX/9ZhPGI38XfeKl f3jK1z5eXd8TQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] vfio/cdx: Fix missing detach_ioas op Reply-To: sashiko-reviews@lists.linux.dev To: "Ian Rogers" Cc: kvm@vger.kernel.org In-Reply-To: <20261130225358.97751-1-irogers@google.com> References: <20261130225358.97751-1-irogers@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Nov 2026 23:02:35 +0000 X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] vfio/cdx: wrong Fixes tag and inaccurate failure description in commit message -- commit 7a52ebc6a229b6078a67382f6b46211cab2d89fe Author: Ian Rogers > vfio/cdx: Fix missing detach_ioas op > > vfio_cdx_ops sets bind_iommufd, unbind_iommufd, and attach_ioas to the > vfio_iommufd_physical_* helpers, but omits detach_ioas. Both > vfio_df_ioctl_detach_pt() and the error path in > vfio_df_ioctl_attach_pt() invoke device->ops->detach_ioas(device) > unconditionally, causing a NULL pointer dereference if an IOAS is > detached on a VFIO CDX cdev. > > Add the missing vfio_iommufd_physical_detach_ioas callback, found with > Clang's require_explicit_initialization attribute. > > Fixes: 234489ac5613 ("vfio/cdx: add support for CDX bus") > Signed-off-by: Ian Rogers [Severity: Low] Should the Fixes tag reference 9048c7341c4d ("vfio-iommufd: Add detach_ioas support for physical VFIO devices") instead? At 234489ac5613 ("vfio/cdx: add support for CDX bus"), struct vfio_device_ops did not have a detach_ioas callback; 9048c7341c4d ("vfio-iommufd: Add detach_ioas support for physical VFIO devices") added detach_ioas and wired up vfio_iommufd_physical_detach_ioas() across the other physical VFIO drivers while omitting vfio_cdx_ops. Also, is the NULL pointer dereference description in the commit message reachable? When CONFIG_IOMMUFD is enabled, __vfio_register_dev() checks !device->ops->detach_ioas and fails registration with WARN_ON() and -EINVAL during vfio_cdx_probe() -> vfio_register_group_dev(), before a cdev can be exposed or vfio_df_ioctl_attach_pt() and vfio_df_ioctl_detach_pt() can run. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261130225358.9775= 1-1-irogers@google.com?part=3D1