Article View: linux.kernel.netdev
Article #12409[PATCH net 0/2] virtio_net: AF_XDP zero-copy fixes for arm64 and suspend
From: Haishuang Yan
Date: Sat, 07 Nov 2026 12:57
Date: Sat, 07 Nov 2026 12:57
36 lines
10352 bytes
10352 bytes
Two AF_XDP zero-copy fixes for virtio_net.
Patch 1: on arm64, binding a zero-copy socket fails with -ENOMEM and a
"rejecting DMA map of vmalloc memory" warning whenever the device uses
the DMA API (e.g. VIRTIO_F_ACCESS_PLATFORM), because the static TX
header lives in the kernel image, which arm64 maps in the vmalloc area.
Patch 2: freeze frees the rx/tx queues while the sockets stay bound in
the xsk core. The driver state of the pools is leaked, and closing the
socket after resume hits a "Missing register" warning and a NULL
pointer dereference in xp_dma_unmap().
Testing used KASAN kernels with a small /init that binds an
XDP_ZEROCOPY socket to eth0 queue 0, runs one suspend cycle with
pm_test=devices and closes the socket, on virtio-net-pci with
iommu_platform=on,disable-legacy=on:
- x86_64, QEMU/KVM on bare metal and nested inside a KVM guest:
- without the series: WARNING + KASAN null-ptr-deref + oops on close
(patch 1 does not apply to x86, binding works there)
- with both patches: no warnings
- A full x86_64 guest kernel with the series passed virtio-net ping,
a 100MB HTTP download with checksum check and suspend cycles.
Haishuang Yan (2):
virtio_net: Don't DMA map the kernel image for the AF_XDP TX header
virtio_net: Keep AF_XDP zero-copy pools bound across suspend
drivers/net/virtio_net.c | 70 +++++++++++++++++++++++++++++++++++++---
1 file changed, 66 insertions(+), 4 deletions(-)
base-commit: 37dfd0efbfffc20a57e41c2eb349ac49b1ca1ff8
--
2.43.0
Technical Details
Message-ID:
<20261107125723.33547-1-yanhaishuang@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358301-linux-kernel-netdev=dewy.ruShow 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-358301-linux-kernel-netdev=dewy.ru From: yanhaishuang@cmss.chinamobile.com (Haishuang Yan) Newsgroups: linux.kernel.netdev Subject: [PATCH net 0/2] virtio_net: AF_XDP zero-copy fixes for arm64 and suspend Date: Sat, 7 Nov 2026 21:57:01 +0900 Organization: Usenet Network Message-ID: <20261107125723.33547-1-yanhaishuang@cmss.chinamobile.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="4043274"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:HrDMW2anRnx+BPkRQc4l4kp2qak= sha256:vCdXxy5dC2B0I2nu93oYs+XrglGRdfJbknDHrMntWBk= sha1:qgCajJELWTJFS8x8PNYbW2P+qlk= sha256:24asItLSvsYtIkIRs7iWArUE17R9mZFu/BwIQNfOuWQ= 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 106871133BD; Sat, 7 Nov 2026 08:03:00 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.749 X-Spam-Status: No, score=-2.749 tagged_above=-9999 required=6.31 tests=[DATE_IN_FUTURE_06_12=0.001, DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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=fail (1024-bit key) reason="fail (body has been altered)" header.d=cmss.chinamobile.com 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 PMlg5sKVvjZg; Sat, 7 Nov 2026 08:02:57 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358301-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id E84B91133B6; Sat, 7 Nov 2026 08:02:47 +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 9D5CD27FB5; Sat, 7 Nov 2026 04:58:31 +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=1794027510; b=DNdGydpcXGBQNPV71zM+KdrSVY5kDUV77qx7b4OLGJQ7hYWID4EG1nU6YJnaUeb3kmBD BH+n9lT75+DCuQ++eCPD3CKAi+mFzA0O+t9ODkgimAKOY9PND7e4EEhsmqfL2DmN0KIoT KYLQJ1gaVFvwea+e8BJxJcBEnhLzy1D/LqWsjxEinxc996fvKe1Lk877pXEpbYFrTOwf6 BVtviyhJH9iCE02eXNpfjiox16QPx0sFoFEgUuAePhPrtgCI+8mot7+rh8pLfd/i9Nstk xe8X5m5R4qfYjDHXuKYrsElLvFZxzh2cUoQlN5j4cuA9nJuFBp8iEvDHw51lPa3vUow== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794027510; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo: X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG: Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=TjJfxDxxVg+dnFXyzUyU8v0lNKHjR9TDaES/0qqPSJY=; b=ONCx+iT1WVtNT2UQ3fUHY8T6r2fKxam2xu+tjydFvFk2/k1kVQ9NR88Hbkq7EWEt/GpO QmU7kNb8pDeDqy1Go+XfXjwkWmixHkLafbKHSUdBnuO7HG4SW8yZrH1V53pjL/XNEUWWZ +uUsBIZz/Vn6d55N2RFDMhy2e4qXKkh7gcl/C3O929keEVGTF/i3aUDbfHSKw/gIFILgg gKUPMXZyPP3uMMlYDBRvh5tyaUuJit6ES71LuWjFNyI07UXgzG/V8nozjEneMd5iZj5hU 0OMt7cN1rIMc5ua9KeCa3kCKvJkPOWUr8uyxQpaXuu4+WnacNrwW3V8kVBbUl2AiAZg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=XOSJ4bbN; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; 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 90F8B606A336; Sat, 7 Nov 2026 04:58:30 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=XOSJ4bbN X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.137 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794027494; b=m/ZB55983oFFsnodQ9cYYIAZc5FPE+kkbzYj8piftKyB5DuzTXtcyTt7BrqHhq034Nuc fl6NF7c7szjuUTnLJwvTeRv1gK2ga7KwVX9olyIe1supcCfKcG/Ehifw3Vkb3cni+dEdD I39mrSGcxlb8PhHJ6PU/VCUEXBqkR+RIRkHgQvZR7fA/LCFCKn2fmEz84kVbGYDG9LrWX YjB3hlNEZ7nO+RuTxS57/o7yDm2AEn5suBhy3hBxEzC4CG3d/tfWgpBZt8nB3xndSD9Dw 4oGl6HxFzI+/FAy10+UwTGl0/0yyZ8aQD5RlGL2G2JC+nD8jw+DRsU+XK57I1E2/4fg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794027494; h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received: X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From: To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=TjJfxDxxVg+dnFXyzUyU8v0lNKHjR9TDaES/0qqPSJY=; b=GyLzzm2UpFPKlBEkl8D6oFwi8I+bZJDarE7Tp2W4WdmvWyA+k32ylY3eDbPc4z+kwQUA 1XVnjPeDJd2p8jn9fVi8EMQPLj2kciMCTnJD/rfA7TFtIIy73Sc9RVFU0LTGG3GiSxHNw zh6KVkDO421/pAYkeGRl8kvUnr2lK7em5THhqjO7wMWnNVjf2PVnAQ1AhUDSqPJlV85pz 852uXxIshBitkbBXxQYFANaCz73qJXAtwz/VH77ZZqKQrYQbio0rIVby9ubLrWuT+UmQz dfx0VCNHL2z+fUT6CghSVUNwchkY/4cQbLJbtbuj4KkH7Ur0rrtG2Zr1z8KMa7Ibyhw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=XOSJ4bbN; arc=none smtp.remote-ip=111.22.67.137 X-Received: from cmccmta4.chinamobile.com (cmccmta4.chinamobile.com [111.22.67.137]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD051606A326; Sat, 7 Nov 2026 04:58:11 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BD051606A326 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmss.chinamobile.com; s=default; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=XOSJ4bbNdngtvTUhpWu01KWnZ6inyNGFFKwblXcHP5uxiL9R5zVCtUZGGUHNrloB0SCwJH/21baZr fsQg1SDcFnOFRKR/nhY5jiedtcQRMQ61+2LTOZlrhMm1nHSsbDNkBCvdpj9VRnNV0CKVm/VQ6CO6Ql eOXuuH8BhoDqwNMA= X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app08-12008 (RichMail) with SMTP id 2ee86aeeafd25ca-5553b; Sat, 07 Nov 2026 12:58:00 +0800 (CST) X-RM-TRANSID: 2ee86aeeafd25ca-5553b X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from openEuler-24.03.03 (unknown[74.82.203.40]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee36aeeafb3fe6-3a4a9; Sat, 07 Nov 2026 12:58:00 +0800 (CST) X-RM-TRANSID: 2ee36aeeafb3fe6-3a4a9 X-Cc: Eugenio PΓ©rez <eperezma@redhat.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>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Jesper Dangaard Brouer <hawk@kernel.org>, John Fastabend <john.fastabend@gmail.com>, Stanislav Fomichev <sdf@fomichev.me>, netdev@vger.kernel.org, virtualization@lists.linux.dev, bpf@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: git-send-email 2.43.0 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