🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7676

Re: [PATCH net] vmxnet3: stop DMA mapping the adapter structure

#7676
From: Jakub Kicinski
Date: Mon, 26 Oct 2026 23:47
35 lines
9425 bytes
On Thu, 22 Oct 2026 03:42:12 +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.

Sounds fair but this does not seem like a real fix.
If nobody complained about this failure mode for 13 years
chances are we break more than we fix here.

Please repost this for net-next in a couple of weeks without
a Fixes tag.

Also please remove the "never synced" stuff. That's purely
relevant for intentionally hamstrung kernels. This is virt,
there's no DMA to sync other than swiotlb.
-- 
pw-bot: defer
Technical Details
Message-ID: <20261026164706.6847e39a@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-352128-linux-kernel-netdev=dewy.ru
References: <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-352128-linux-kernel-netdev=dewy.ru
From: kuba@kernel.org (Jakub Kicinski)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] vmxnet3: stop DMA mapping the adapter structure
Date: Mon, 26 Oct 2026 16:47:06 -0700
Organization: Usenet Network
Message-ID: <20261026164706.6847e39a@kernel.org>
References: <20261021221221.502428-1-kapoorarnav43@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="1424567"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:k4YaSU33hKylP2e9t8cwyP/FW0k= sha256:RQaDNWwChOyqZXxQBoqYdra55HOst2+11dYf77HUlhM=
	sha1:UxYiBw5L3qfpSyFNpxjwqk5KVKA= sha256:NdtCCfqpw3PpXbzyhOCyCLH8gnXTYZT8a3nPKqAaaT0=
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 D01D2125BD6; Tue, 27 Oct 2026 02:47:31 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.739
X-Spam-Status: No, score=-3.739 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] 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 dQGIc_nqYFpB;
	Tue, 27 Oct 2026 02:47:24 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352128-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id D9EF0125BC4; Tue, 27 Oct 2026 02:47:15 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 60339233CA; Mon, 26 Oct 2026 23:47:09 +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=1793058428;
	b=Gv1DyDdRlBbBrKyGlbGjS19MH4oEa2u0mz/Dx7E+zLKlJvJ60sVBVWLrHQqfrXaw10LR
	 BLOODUxhKffcHCWX3IMLs5QAW92uHAT7yRiL5pcloS4GAV4jEfCyCv6EtEmE3Kw38mP7G
	 Z9nii2UffIr6+rrZGdZtXB/BmZD8zl6eT1L1+LgZTV/K5wc7w4dMrutCxfPSpp+5krunQ
	 UwWYbBLpEjCK7WtQRYeOJkVXHCuCG68EdyMB+hgBaWjRZYigkTuFeAov0K2NxRb3EZjU3
	 7zxLDaDhzu4Pxaij+3t8XMFmNNBuJNGMYQhyJkonKJd380blKH2EymymJzm2VdH/ZRA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793058428;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=HXZKbYcynQLTbFDm3Gu8qk0pYJCsBAblYFk5BGMFFls=;
	b=zkP/1hSH0ASb4tjiUZy9yiW540oJTgqaMJlA0pbRkcahuAT6WxRgNWjIED8N4/4ipaKd
	 I41NlguFG6Jp4x3bcL7on/gfgG5wG/8WtcwoEl4BU/c+l/NnOJObEDd+J3aT1zdxFsji6
	 pnUEpncWNqK3mRWWvW1E0SZMetNE2Yq98I1aQ5hz4nCb3wH+jP+CLAtJgDzgNE0+3W+Pp
	 wyQPeuDTPQ2CGaJ4Bljsv3y0P+pJ8Vp3gp7KDT7vnhVEUO1lj3z7poU735hp0kc07+l9m
	 e5gg22zwbc3Z9GopCD4BOlTJmpYbOMTn8F448ZH/40LEBACI5RP2Ge6e78yLkmWv9yw==
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=cjhWGHV3;
	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 CA0F4606A322;
	Mon, 26 Oct 2026 23:47:08 +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=cjhWGHV3
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=1793058428;
	b=JnEyqJsLm9CRe0SANgKVHbVcpep+f1AqTdbnnaOq8nqxy3BChYP11H0I4WGwdjrG/wXC
	 7Ja7/UKTN/X+n1/xN2B4RNGoOgPGoopT6NY+b8GDPHsy9RC7AbO/6WOAiV3EI6//F9Ye7
	 F6A4rgdmO0X2ksGmoTVP36okIM6rRwhG9cs3xHv2vhc1XCSxYJ7ULHWeE8lw0GKpIpiiO
	 Slcf1s8k2ooZH//TW9Itxx6tetPW0twAwlZhUdGPeay3zaMccg0Yuqw/PV+Ias1qe8nrR
	 ATYgUYqtXdBGXsQg/khTFrIH8Vind9piVY6PhFVHKEZzmRrdygymir1vErrdOC9yOHA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793058428;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 In-Reply-To:References:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=HXZKbYcynQLTbFDm3Gu8qk0pYJCsBAblYFk5BGMFFls=;
	b=lYEQqaPrAtIkpWjrDwEzeDoP29ciYkSkAXmRrZumzIe5I/XV8btPXjPXf7K3CwYmdNIT
	 zqTbWEgv8qc2NPMQFjPqgOlJceuihfLtMCeRh4pGE5KzP/7msmKndcS9+qN6wF/S4CtHb
	 hli0WERGZitLCsKWUue71OyQjk92zFsiqiV43zpInTqp6w0NgD9mTHy2q6eIOocEkXqOw
	 yBn8DwRxb64J1T5KZJZU8TuCfVY+9xYVvuVPRLQ6mOAFKRfkzXEe2zaX7xxtc1zGqeEpK
	 mR4z1KZ/oy9RdFxfh2rPiTfsebgNSerml5UJ2qbbVtPI65nmNtumJALFIMzXFBVpM2w==
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=cjhWGHV3;
	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 A276B606A31A;
	Mon, 26 Oct 2026 23:47:07 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6D561F01825;
	Mon, 26 Oct 2026 23:47:06 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793058427;
	bh=HXZKbYcynQLTbFDm3Gu8qk0pYJCsBAblYFk5BGMFFls=;
	h=Date:From:To:Cc:Subject:In-Reply-To:References;
	b=cjhWGHV3PB635bLfXP/tf12iJDzu34gM3azvhTbLHkmE6G2UeHP3tpU4a+8r7ecLV
	 N7Z4OkZi3680l50Ov4IX46GPWdl1vs7diNbNrbCaL4LFE7r2xnOhAoByPJNg2lcJNZ
	 yMGj/dSyjTleiJPUgOYdiCzTNOc8y302iefOwONGog/GV//ABSkcgeVOWGpSFxoF3C
	 T4eE6uq5lozf2iF0VgAcA2Y7S6Mhx/2S0f62BPoBd8Uez/A6v9DINt2aR2kYc65aA3
	 TBbb1NGJWjiaQmKkW0lJVzu7ER1mgUf3HKdVzcsLCB8NZ5LySOz3D108I5z1jbwTl1
	 8ZYk9OO/4/3Gw==
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>, 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-In-Reply-To: <20261021221221.502428-1-kapoorarnav43@gmail.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