🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #27003

Re: [PATCH net] ice: Fix page fault on XDP_PASS skb allocation failure

#27003
From: Jesper Dangaard Brouer
Date: Fri, 04 Dec 2026 15:37
32 lines
9486 bytes

On 12/4/26 16:22, Maciej Fijalkowski wrote:
> On Wed, Dec 02, 2026 at 05:01:46PM -0600, Frederick Lawler wrote:
>> In the XDP_PASS receive path, xdp_build_skb_from_buff() can return
>> NULL when it cannot allocate an skb head. ICE currently clears
>> xdp->data before checking for that failure, then passes the buffer to
>> libeth_xdp_return_buff_slow(). The return helper needs xdp->data to
>> find and recycle the page-pool buffer, so the NULL pointer can cause
>> a page fault instead.
>>
>> Leave xdp->data intact on the failure path so the helper can recycle
>> the buffer; it clears the pointer afterward. On success, clear the
>> pointer only after the skb has taken ownership of the buffer.
>>
>> Observed on a real machine. Patch not yet tested on a real machine.
> 
> Hi Frederick,
> what stopped you from testing?
> 

This have been backported to CF kernels and is currently rolling to 
production.  I guess at the time of writing this was true.


> Besides, nice finding!
> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>

--Jesper
Technical Details
Message-ID: <0decb7ce-f359-4d77-9baa-0d9c8f5f6154@kernel.org>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377448-linux-kernel-netdev=dewy.ru
References: <20261202-ice-xdp-fix-upstream-v1-1-31a1d5d26e87@cloudflare.com> <axLapClCVubkBxg4@boxer>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377448-linux-kernel-netdev=dewy.ru
From: hawk@kernel.org (Jesper Dangaard Brouer)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] ice: Fix page fault on XDP_PASS skb allocation
 failure
Date: Fri, 4 Dec 2026 16:37:44 +0100
Organization: Usenet Network
Message-ID: <0decb7ce-f359-4d77-9baa-0d9c8f5f6154@kernel.org>
References: <20261202-ice-xdp-fix-upstream-v1-1-31a1d5d26e87@cloudflare.com>
 <axLapClCVubkBxg4@boxer>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2795792"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:kUFewuNe9TK1ZPG96lp5nponL/I= sha256:ApTxrP1n2UPkqfwndv0i/fhF4IeFAhaAYVb1Dvr20Ww=
	sha1:JfQt8HKHed4B2QMZGh6tRn4W7T8= sha256:jWv2OZro1uWHa7xZXaE/2PJB3+QviTmarWg44RLfui0=
Content-Language: en-US
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 81C48117C4F; Fri,  4 Dec 2026 18:38:12 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.542
X-Spam-Status: No, score=-3.542 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.142, 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 9OFJLR250bGo;
	Fri,  4 Dec 2026 18:38:09 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-377448-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 40501117C17; Fri,  4 Dec 2026 18:37:59 +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 CE4C0634BD; Fri,  4 Dec 2026 15:37:57 +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=1796398677;
	b=CKrLKKL3ALpB1+CK4JYFI4+9HqxcgO2IojJ5e7DtW4zH+++1t9xiqTLPlHhXQTLbXReV
	 /NydGH4WlO9i8KeLookpK7sSRVRAlxXCIPL7XfFD5ZZukIun/GTs/yGTm0gEj3Uh0+/e3
	 gIlKOo9nFUbX5SLzuWpVOZcGIrckzx38+bhw7hr/8970yoy4whhocRQL6iSCihTwCniLR
	 xFjND+cpLeMXuNXxqd2C8wLBCKcG6YPzTrZh+Kro86+DcEfqXmoANfrA3t530llfZL1Nq
	 kVLG6VokKvIw0Z8ooCz0PGt5bhkNQPpzLEHD3/cw/zxaN54wS8T/Ljopk+F5DGmkToA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796398677;
	h=X-Original-To:Received:Received:DKIM-Signature:Message-ID:Date:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
	 Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=fil8s+9NUvq2gzr73ConQZ18hWseLTSFJOgR4KGbBLQ=;
	b=ldyTNqPp3w7/stOgtIqMCCt0weC/aoV+a9YdRtsLLLeCRiJdkR5PGpHIp/9hjcIKeIoS
	 rRzXqFroVDAsH8UC4RH/1XJru4b5Vz17nlxGwI/dFR9S+uCPwYWCu0bmakObiy30f3P7l
	 vrXyhi9Oe47CvaejR50iY44l4Vv2bSrka2tv5NXy94FDP2VVAgVb78hpV86MUH6Iv8MdF
	 z7hJCHsoqcJnqozGBPzqZTcxaODUaRgCMwznsTDzaiRWeL4Zp8fF7BfBGpe3TTrpVv3S4
	 Fb07fiGONijzyp4HfMWIK6PJncNPRMDp+f+VT1Ne5eZEd6Bhe0G6DReRdPMkxlO9KWA==
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=azGg9eFV;
	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 A74B9606A336;
	Fri,  4 Dec 2026 15:37:57 +0000 (UTC)
X-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=azGg9eFV
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=1796398671;
	b=UgEUwtFB9D1QyVaHopdbxjMLjleVDB/Xh9l4f07JDOAinoNQyLanVR/qP/5MuEBL1GA6
	 dV+VN9zwrqbCU0ZGdb5oLjuh0pwpWBvaDdPuSKc2zk4SvzdJ2NehwYxRDJFMzVKO/bLaO
	 R5SuMa+ygnxHT4z+mj5Z53H2XkSiaEzSHfmggcUmqHOpRcS1qqV4VIsdKTskC5zGyqxrU
	 n9nq1UFD5HBvBrTLDPIHr8KVVWwTmbCak+HghDeJySae2am4ee+5GNbXXQwN8lh5MIlEP
	 An2ng7F31OUyIohmUzziQ8OtvbMMq5r3NDzwo52pce65dtvg2i5wQEMYFx1t4zBpKjA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796398671;
	h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent:
	 Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=fil8s+9NUvq2gzr73ConQZ18hWseLTSFJOgR4KGbBLQ=;
	b=Z6BCulbPxDtFSGQc4PCv94EIRADr4UTCHbdbWT9ryC2siVrPXyGIVL5eRLKPRBGqbeFk
	 1Z+ps6s3ecfhGlywJKHazn/dv5dK/GEjhpjWx6mt912uQ7+nkff71mc1u1KKN/sQZ7MFE
	 KuYVzl3kphYttpdHJCeIp9bWZwiCxqr4tsIz7hyKjRWcU7/mOeYBGQYMEp2BTjEaxn6vU
	 Hb946kH3h3CBCFaFB6wBGF0hB9AS7KpmbAYToILn8E9teO77/pE45VoPxNZyYHqHvhUTF
	 vgzwZaA6EoLXVOt8SLhP9FpKfcSQvBHh0ji338yWhg9TxOMPv9Osr5KkcbaLUOb7siA==
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=azGg9eFV;
	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 C4FF5606A322;
	Fri,  4 Dec 2026 15:37:51 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 967AE1F000CE;
	Fri,  4 Dec 2026 15:37:46 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796398671;
	bh=fil8s+9NUvq2gzr73ConQZ18hWseLTSFJOgR4KGbBLQ=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To;
	b=azGg9eFV9xax5oubUfiD4wMqMtS8IvluwSmrFI8Xutv8pydLPmVuwEzl+Yt0IqShq
	 AR+vQdVYFzOnUr2dEwcPVMaCdaqoALsL6w8pEtbO/RwC/p+YDI3be+/vNoETZrr96Q
	 +UgexpZdiAY/IOyiiAtFdcYCNZP08mi2F/q0afoEHvemBiOXJMXX9mApT4I18qPaI1
	 9yDHXlTt0y6Ky2Fvozv3E7kj0Azx/JzD0n3QSXV9g+WY+gAFLi5+X4gO0ZqpKBsXQb
	 o55thEAfjDg4Yj/TaYPFrhhYiiWERnI0s+cMBV80liCLKEdmyLAVhfF/7KGrKKiNrw
	 z7m9SPNCGXQnQ==
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-User-Agent: Mozilla Thunderbird
X-Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
 Przemek Kitszel <przemyslaw.kitszel@intel.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>,
 Alexander Lobakin <aleksander.lobakin@intel.com>,
 Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>,
 John Fastabend <john.fastabend@gmail.com>,
 Stanislav Fomichev <sdf@fomichev.me>, Michal Kubiak
 <michal.kubiak@intel.com>, Jacob Keller <jacob.e.keller@intel.com>,
 intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
 bpf@vger.kernel.org, kernel-team@cloudflare.com, stable@vger.kernel.org
X-In-Reply-To: <axLapClCVubkBxg4@boxer>