Article View: linux.kernel.netdev
Article #7578Re: [PATCH net] vmxnet3: stop DMA mapping the adapter structure
From: Simon Horman
Date: Mon, 26 Oct 2026 17:02
Date: Mon, 26 Oct 2026 17:02
49 lines
10288 bytes
10288 bytes
On Thu, Oct 22, 2026 at 03:42:12AM +0530, Arnav Kapoor wrote:
> vmxnet3_probe_device() maps the whole struct vmxnet3_adapter with
> dma_map_single() and passes its address to the device as the "driver
> data" (misc.ddPA/ddLen) in the shared area.
>
> The adapter is the netdev private area, and alloc_netdev_mqs() allocates
> it with kvzalloc(). struct vmxnet3_adapter embeds 32 tx and 32 rx queues
> and is well above PAGE_SIZE, so when a high-order allocation fails the
> adapter ends up in vmalloc memory. dma_map_single() then warns
> ("rejecting DMA map of vmalloc memory") and returns DMA_MAPPING_ERROR,
> and probe fails with -EFAULT. syzbot hit this with page allocation
> fault injection.
>
> The driver data is only informational: the mapping is DMA_TO_DEVICE,
> done once at probe and never synced, so the device could only ever see
> a stale copy. The per-queue descriptors in this driver already report
> no driver data with ddPA = ~0ULL and ddLen = 0, and other vmxnet3
> drivers, such as the one in DPDK, never set misc.ddPA at all.
>
> Drop the mapping and report no driver data in the shared area as well.
> This also removes a probe failure path and the adapter_pa field.
>
> Fixes: b0eb57cb97e7 ("VMXNET3: Add support for virtual IOMMU")
> Reported-by: syzbot+8eed6f83440ecdaf4be6@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=8eed6f83440ecdaf4be6
> Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
> ---
> Tested in QEMU (q35, KVM) on net/main (abeacca61eea), with KASAN,
> CONFIG_DMA_API_DEBUG and fail_page_alloc (min-order=4, as in the syzbot
> reproducer):
>
> - syzbot C reproducer: before, "rejecting DMA map of vmalloc memory"
> WARNING and probe fails with -EFAULT; after, no warning (probe then
> fails at BAR mapping, as the reproducer binds vmxnet3 to a non-vmxnet3
> device).
> - QEMU's emulated vmxnet3 (-device vmxnet3): probes, link up, ping
> works, before and after.
> - Same NIC unbound and rebound with order>=4 page allocations failing:
> before, the WARNING and probe fails, so the NIC is gone; after, it
> binds and ping works.
>
> No new W=1 warnings in drivers/net/vmxnet3/. Not tested on ESXi.
>
> drivers/net/vmxnet3/vmxnet3_drv.c | 19 +++----------------
> drivers/net/vmxnet3/vmxnet3_int.h | 1 -
> 2 files changed, 3 insertions(+), 17 deletions(-)
Reviewed-by: Simon Horman <horms@kernel.org>
Technical Details
Message-ID:
<20261026170200.GF257209@horms.kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352011-linux-kernel-netdev=dewy.ruReferences:
<20261021221221.502428-1-kapoorarnav43@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352011-linux-kernel-netdev=dewy.ru From: horms@kernel.org (Simon Horman) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] vmxnet3: stop DMA mapping the adapter structure Date: Mon, 26 Oct 2026 17:02:00 +0000 Organization: Usenet Network Message-ID: <20261026170200.GF257209@horms.kernel.org> References: <20261021221221.502428-1-kapoorarnav43@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1354635"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:8L0/c6NpzjPaP3gB7V2VPDa3Dz4= sha256:AhBqLr3cW400r2WGiYEg/i+sQVusdHnq15o0RSfsw0Y= sha1:DRX9gRegwLrGsMokCcUMz1DWaAY= sha256:fU7XcTv+/Ur9vD2zQr/o5hFR64MYEj0psSWkaM9GwDs= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 7BD3F125BB0; Mon, 26 Oct 2026 20:02:22 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.738 X-Spam-Status: No, score=-3.738 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z9Wt5hz6YLAE; Mon, 26 Oct 2026 20:02:18 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-352011-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 080DD125BAE; Mon, 26 Oct 2026 20:02:07 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 6395F27F25; Mon, 26 Oct 2026 17:02:06 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793034126; b=1QzBjnO9wls21BizF6f8uGQdh8HM/t0MuvWfPEWiElYsqVKO5Qzuo5A8njsKURZ48g12 uzmEE3mYOBFeeecamfTJfnegvU9hr6BOGrH3i2cLxVKs9mEpVxyqzfS9L57fLG6R0+GZ1 FJL/n9u+Vm7mcWmLd8zp0TnK4Wlj+nG/Rbkb/xhd2s0TO1gk+ZQQUMohfbtoqjh5P/XCr TJnf7A5OrHNqWFLmj0JLxQRPXpXLvcbkOo72B2xrpBckuX6OD+A9TX+rBDwHu43c8VR+5 RQ6AqpT3nqfEB1aEZ7Of3+cZskDhU9VY0UsMDwdioh5F/VG78cqygE87bDPz8R9s+TQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793034126; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=qkqhPHOCo4fTWwPKT7Kxijt1nrEHB3Og6VjW7E1Dyb0=; b=WNfcaS6KEX7EFwkjSEmDeDpl+AztmfxZJ3DNBPzjCvMm0aH7AI3S95VChjpB1fuRGaiH RIGGpDG9mK7CNexzatUFvh2DF/ELB324FQdUvhxhTyD9iucwJncK/VNFDkv0btp1hY8h3 Y9ieskGR/yWeMADlAZ7QdMGAXhvp+kf/ueLeZBAhu+g+5pH5oJCuwTYfEfv2pKzvv5WOC zCwC0kbT8M71bHJEw29nkTJuB+G7z8rT3xGTzAwFGyOayXQptg6242+jKmTTcsjRBFpO7 XW0a6+auAvNL78HJUmewzMqQ2eGz0OXx3Gw0/WBI0pT/g6pybUGDV61hEV8J6Kz0YBw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=awEcjpuD; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 127C6606A325; Mon, 26 Oct 2026 17:02:06 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=awEcjpuD X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793034125; b=QD/JfQvW9LkSe/G1bhs4lrDYErFxTsGt57xdr8AGL/zR7CN+Flz1RQelO4HlJK45k6Ff VxWOoDFG7JZtQWCUOF4EI4hJpisbigUudxiDsPbANpdATNPDv2nj54Jthl/lvuLhWAwTJ FPl8nr52tWHeWDbhrbys7lDYW1EFlU1UC1LTXGQfm7zAnmhCAQWFhCsRDmfFo+vDtRFoQ HDWvBFHublCY9akf2XUceswlGMzu6kkrSoQ/sCq/ZdSkuUs0V19Y598+bBoPcyJUn9nrV eF0kZqr8PWgGTvyCHOjRNjM+hugatrJcnKq+PJ3XsScKqsR9eZPqiJAhlLXbzt+0TjA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793034125; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=qkqhPHOCo4fTWwPKT7Kxijt1nrEHB3Og6VjW7E1Dyb0=; b=CmmoFA+IBfwgIpC//0gtvCgDs+Kn80dG4FyKncYyDWGNmmPBQdT03wjib2UlIN82sus5 aaS/v1t69xy5bnUkKBiCSBS4tw+edkre2QACbtogtQQ+dvECzGglGaabksHeI9jHsWLyZ swqLx+Peic18CMfKKrAB3ehpvznYhTvy0B2zi9kgaGUs8iw2WtZxGRODcfqFsSFKiImUD JsUJi4pgPEIY57nzKiJpDuX+lhlyJybkywH/BlSggdhdNVVbb8quItBLSsAp2d9+8OS5t ESZbWUKJTwHyVOMom7xsxmmj2rFn1e7jss3HijkQWorIdx7nMZAh/FmQxXf+CcYNqwg== X-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=awEcjpuD; arc=none smtp.remote-ip=100.103.45.18 X-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 E37EA606A31A; Mon, 26 Oct 2026 17:02:04 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 797861F01825; Mon, 26 Oct 2026 17:02:02 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793034124; bh=qkqhPHOCo4fTWwPKT7Kxijt1nrEHB3Og6VjW7E1Dyb0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=awEcjpuD1v4ke9BAf8ab8An27hYYxZqCuvHfrQXBrDxsbhGC8Q0pnoyO/s7yM3Hbh dxAzdCDsJDokzQs3Hqcq4dAFDYXCch3aRJO1/38iG0D34aKc1sbOj5P9MOLlc2Ix9E QivOq0RPc4hjrcLC2tksBDa0O9Ivy8CMEUPtziBOOmZoaeT+0HKUV3CzD2IILMhm6i /Z+oeMh9XxubnHZl55OXoblC8+CC6lCN8NMHj3//5iDQvLjh6v0OUqa6Y03SU6xUbG jUidKixUOV5C9bucVx+27g63uiiNa88zCRgqV9dmWtoBLQdPUg6FaOGyAkJalb/1eZ LOVf4Ead/0R7Q== X-Cc: Ronak Doshi <ronak.doshi@broadcom.com>, Andrew Lunn <andrew+netdev@lunn.ch>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+8eed6f83440ecdaf4be6@syzkaller.appspotmail.com X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261021221221.502428-1-kapoorarnav43@gmail.com>