🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3475

Re: [PATCH net-next 1/3] net: selftests: use skb_share_check() in the loopback receive hook

#3475
From: Nicolai Buchwitz
Date: Thu, 15 Oct 2026 08:01
48 lines
7766 bytes
Hi Maxime

On 15.10.2026 09:46, Maxime Chevallier wrote:

> [...]

>>> Could an IPv4 frame that arrives during ethtool -t make the hook read 
>>> up
>>> to about 64 bytes past skb->tail? Examples would be a minimum-size 
>>> TCP
>>> segment or a frame with ihl=15.
>>> 
>>> The over-read seems to stay inside the skb head allocation, because
>>> skb_shared_info follows skb->end. If so, the only effect is a 
>>> possibly
>>> wrong selftest result.
>> 
>> The length check is pre-existing, will address that in a follow-up 
>> patch.
> 
> I'm unsure about this, Can we instead assume that when one is running 
> the
> "ethtool -t" selftests on a machine, they are doing so in some 
> controlled
> conditions ?
> 
> IOW can we take the assumption that we won't get incoming traffic at 
> the same
> time as we run the selftests, and if we do get some and that triggers a 
> wrong
> result, this is expected ? ethtool selftests are very cheap to run, 
> only a
> handful of seconds, and don't require any extra dependency, it doesn't 
> cost
> much to re-run them if something unexpected happens during them.
> 
> ofc. getting a stray frame during the selftests mustn't crash :)
> 
> That's my take on these tests, but feel free to disagree :)

Also fine with me. A stray frame just fails the magic check and gets
dropped anyway, so the test result doesn't even change...

Two patches less to fight with Clashiko over :)

Regards
Nicolai
Technical Details
Message-ID: <d28efab10f43a46d51cdfd978b0a1e90@tipi-net.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346578-linux-kernel-netdev=dewy.ru
References: <20261007-nb-net-selftest-shared-net-v1-1-458369bfa1ba@tipi-net.de> <179149509090.434549.9918598206439291164@kernel.org> <533b88ce917b59f4f59f52145d2f035f@tipi-net.de> <cccfd292-6169-449e-a675-a9bb54ec4191@bootlin.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-346578-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 1/3] net: selftests: use skb_share_check() in the
 loopback receive hook
Date: Thu, 15 Oct 2026 10:01:41 +0200
Organization: Usenet Network
Message-ID: <d28efab10f43a46d51cdfd978b0a1e90@tipi-net.de>
References: <20261007-nb-net-selftest-shared-net-v1-1-458369bfa1ba@tipi-net.de>
 <179149509090.434549.9918598206439291164@kernel.org>
 <533b88ce917b59f4f59f52145d2f035f@tipi-net.de>
 <cccfd292-6169-449e-a675-a9bb54ec4191@bootlin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2479532"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:FQWiuaKMHgu/nxN7zgL8LBz62YI= sha256:lXPAvMRXJZqLQ/lwI4+LfDXBlPy568AdWZSsIWJw1oU=
	sha1:w/1jWhxTxJozQ/vKZXJWaSHAE/E= sha256:j8hU2P8SqRJbz2cT0v0liowlz2tOK0ISJPJSVKusM+Q=
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 591CA11026E; Thu, 15 Oct 2026 11:02:20 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.849
X-Spam-Status: No, score=-0.849 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1,
	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=tipi-net.de
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 MtII2-4syLds;
	Thu, 15 Oct 2026 11:02:17 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-346578-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 6E115110266; Thu, 15 Oct 2026 11:02:09 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sto.lore.kernel.org (Postfix) with ESMTP id 3B098607857; Thu, 15 Oct 2026 08:01:59 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id C758249E5DC;
	Thu, 15 Oct 2026 08:01:58 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b="u2mCl7oy"
X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9557147F79B;
	Thu, 15 Oct 2026 08:01:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.13.80.246
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792051318; cv=none; b=NntjKcONKmzR9Kd8PQMVgOspGJKUPiYGn8hzonc6X4QV1onNGSwOA/AP/SOo7kh1FQogM3jYwH0vWP3SivH0IplvF3vSWeQgBf7MeoqsiVGVk5pxQc09SrDCYz0phpPGsr3fVJ8JC4mdqgtQ9ltbj2/p4NlfMJEbn8BtY+ngJf0=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792051318; c=relaxed/simple;
	bh=wo6NeKZojviEosBcJYtMLCfWwCFzXBGs5gykktT9OoY=;
	h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References:
	 Message-ID:Content-Type; b=TM43TDzU2TioHkXFBWenQXosc9+PWY2kX2vBgrfXM2Vcxl7VeFLcPRM4Ht3YKTH85QVvOs/E89gtHChCTtb1MXGUDDD/9DjaPGy0Zz2FpJb62L266cmp0NyPrGHq7OkcR4LKnkpeFtTTjOmP/EzRJa+Xdlp0ws7+RZ7WJtkHABU=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b=u2mCl7oy; arc=none smtp.client-ip=194.13.80.246
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de
X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 685AFA1544;
	Thu, 15 Oct 2026 10:01:41 +0200 (CEST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1792051306; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=lVUttG8iRwcZ+EEkZGFkY8VCO4ZqOKXFF79fwhVmDpU=;
	b=u2mCl7oyCi8dyZxjmVyFnt8dJgiEPaEMIOtQGIeJPZSatiNCMbd3UKDKNqpes8pwee5u/F
	lbvZUwDtJIoRyCjQ/+cS3jNdZajXUjYoxOvqPHBqSmlR9BUNcynm2DieqAh4giytIEf2hk
	CEwrarokbGLOInTIARveF4YGWoW+66ac4BkojHGFTcV8lCZDnywS+oZHmodumC9PcXZoqa
	IbiLemW1IXQ5T9xu0JwDwPa61Pzc6ENAVMVimKSjQRHtU25i0FoGXF+Fu+X2WaJyFt68gY
	94Gh8P+/sVSBhjl1S9eV8VXeuhpqyGzyrpmP2Wq92Uk3tNqbLdWqCGVxCWhfuA==
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-Cc: netdev-bot+sashiko@kernel.org, davem@davemloft.net, edumazet@kernel.org,
 kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
 o.rempel@pengutronix.de, andrew+netdev@lunn.ch, mcoquelin.stm32@gmail.com,
 alexandre.torgue@foss.st.com, Jose.Abreu@synopsys.com, saeedm@nvidia.com,
 tariqt@nvidia.com, mbloch@nvidia.com, leon@kernel.org, dtatulea@nvidia.com,
 alazar@nvidia.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
 linux-stm32@st-md-mailman.stormreply.com,
 linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org
X-In-Reply-To: <cccfd292-6169-449e-a675-a9bb54ec4191@bootlin.com>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3