🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #5656

Re: [PATCH net-next net] netdev: Hide the netdev_priv() origin from GCC in netdev_from_priv()

#5656
From: patchwork-bot+netdevbpf
Date: Tue, 20 Oct 2026 19:30
27 lines
9232 bytes
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 15 Oct 2026 10:00:03 -0700 you wrote:
> GCC 15.1 and later can compute an object size of 0 for a pointer that
> container_of() derives from a pointer into a __counted_by flexible array
> member[1]; Clang gets it right. netdev_from_priv() does this with struct
> net_device's "priv" array, so when GCC can see that its argument came
> from netdev_priv(), FORTIFY_SOURCE sees a zero-sized net_device. Since
> commit 9027497a25e3c ("team: use netdev_from_priv()"), adding a port of
> another type to a team device can then fail the memcpy() to
> "dev->broadcast" in team_setup_by_port(), which GCC sees through after
> inlining team_port_add() into team_add_slave():
> 
> [...]

Here is the summary with links:
  - [net-next,net] netdev: Hide the netdev_priv() origin from GCC in netdev_from_priv()
    https://git.kernel.org/netdev/net-next/c/56f8d919739b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Technical Details
Message-ID: <179252460578.172302.12338872662372096525.git-patchwork-notify@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-349498-linux-kernel-netdev=dewy.ru
References: <20261015165959.i.798-kees@kernel.org>

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-349498-linux-kernel-netdev=dewy.ru
From: patchwork-bot+netdevbpf@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next net] netdev: Hide the netdev_priv() origin from
 GCC
 in netdev_from_priv()
Date: Tue, 20 Oct 2026 19:30:05 +0000
Organization: Usenet Network
Message-ID: <179252460578.172302.12338872662372096525.git-patchwork-notify@kernel.org>
References: <20261015165959.i.798-kees@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3936351"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:q4xl3CV1Wwcc4oUQVdo4t7LwrNM= sha256:XfvBwyiQvlEge+cUMXSQvZF2IvP24X5G6Gzi9HwKSJM=
	sha1:gQJQoBlOOcpQhGJBjfhn11HlI3c= sha256:3LH4mXDhOc1V2mlhbPosCAStvKQF4a8/OzS66iOeMQo=
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 50568110DFC; Tue, 20 Oct 2026 22:32:03 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.629
X-Spam-Status: No, score=-2.629 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.329,
	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 ygCo5rNW1Exi;
	Tue, 20 Oct 2026 22:32:00 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-349498-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 DEF80110DFD; Tue, 20 Oct 2026 22:31:51 +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 21BC031F8A; Tue, 20 Oct 2026 19:30:14 +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=1792524613;
	b=hOnoJ5WFc/ESevLiKhOWg+ShE/wQDLKThnikAITsrHfbQu/VT2FexluYRVIwXhNuD3pP
	 S7vqQmtTwVwV3X2Y33IEoETKNV8lf3o0BDis216K/K9YKlowjF0nwLWwQybTpOWaz73vD
	 I3tf/WVxkcltMzleakIZ1tdamMuEvK5lox7rNgHv99k7TyjmfO58gdVVf5XbCvo4lxB7l
	 WkzYTyMBB901K4h6wA83mJaJ8GMpa9AYsOb5C5RhbaZflYYeqbAm1PZxZ5usZNPx7/v8U
	 AUgWBDKLZvmccWMu1GKOWcjsM9W1j7FB/5Ha4Tt5qGev2f5wuy7mlfMmTbO9LgPa88A==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792524613;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:Content-Type:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding:Subject:From:Message-Id:Date:References:
	 In-Reply-To:To:Cc;
	bh=wYg9cotcoU0u6A8/hr+EYwsFGArgBF9NN7BKO2SM0po=;
	b=DOliXzjXA2fJ8IyDbp7dBZaM6g31+CwySYV4yfrBWhKi3xENylhQbvS26O9LdsV1vQbl
	 e0SusoFFjNOVsDbInDV1VBek/u3QOlsAZolwYJRnE6Vi4doLcoam8PBjSop3DwfhzuPGD
	 dpoP1IrYTL1n4cu9gKcrBUe8//5ns+aHb12Yxq8TYA+N8KNxle9cHjdbm2raS0PgkB4Zr
	 TZx2GqE+AcIur/WlxrYtzDoCZBXhmUjZDSU9DjLYtStJIANdqO4UPwgotzZqzQGxA1kX9
	 jACcjjuY9TkWu/2q0di7AkVZhmde4KHjup97mDNklLJubBTdjM9gqheO18e755tKLkg==
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=nlVIDa9w;
	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 A1F65606A323;
	Tue, 20 Oct 2026 19:30:13 +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=nlVIDa9w
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=1792524607;
	b=zpJG7Kj9Us6aR83KPPnJvgCacgabjsrqwp4Dzrq05X+EnKCmDPbAJbOUZO8pGA3H6hIf
	 XmG4v5h1tuVIqA34/Z4IdI1/NvogSNpY1wCGBX4Psr4vap7NFyrU4A2/QNy1jbNPGKV3W
	 kS82AqZ9/O0do2cs0rESRgPirDHRPNnFemhDzI31UMIBeSwhGyjmk1huEC5G5FZOIIoag
	 uUMwUtOEJV6Sy/XU8ix9x1pMlxPUdbNty9IKWPShR6Ld2gqShkImdiHa8klxgFd9HLVQP
	 gWTo6FRX7/perli3ijD6ue2pgfZMldyrsOSh+tUJE2bor0JP+FDK3Pr3bfvDLWrWyvA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792524607;
	h=Received:DKIM-Signature:Received:Content-Type:MIME-Version:
	 Content-Transfer-Encoding:Subject:From:Message-Id:Date:References:
	 In-Reply-To:To:Cc;
	bh=wYg9cotcoU0u6A8/hr+EYwsFGArgBF9NN7BKO2SM0po=;
	b=5DZF6IBY9Lo8kI12OhMz7N5saJ57n8HByXIe3n23iw6bWUJj0e/jCAxuuONbqV6LJJm/
	 SseytcKHBcdn6phvL9LcYPvm+gSoQqC/CFaONb+aSeQMbSD1Q/x2yQBYvW/qlCWaH/bzR
	 Wtdlz4HrUky/vX9sUehV7hxWaw+YCuzihjC0omb3Tdsx0AUKHU05N1n6WMWB+xFmdEFU5
	 OdDLFMT0sXAc5XEBG4cMgo5XeKKBIZ/aKfRVUr4G8bIeh5CU5jEcI62pvocmr9NwCZL0E
	 89iplQDGt7YmZH2AXxCNkbppT/AFzRPIV3Z+nmer2u08YU0ipLx/+OSjwgOLF79pf+w==
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=nlVIDa9w;
	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 7EE8E606A322;
	Tue, 20 Oct 2026 19:30:07 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 073011F000C9;
	Tue, 20 Oct 2026 19:30:07 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792524607;
	bh=wYg9cotcoU0u6A8/hr+EYwsFGArgBF9NN7BKO2SM0po=;
	h=Subject:From:Date:References:In-Reply-To:To:Cc;
	b=nlVIDa9wW+uOYT5mUetEGavF0EsvitauQHKUabhlYAb6qwusxhS8KE5M1t5uxENXZ
	 6CtgWcWfha3GUBpEsM5MODslh+VxjuuYO5OwwhBnAz8xsZndVB4qnjD+onfF9t4m/k
	 Yuimsl9hw0WqOKBJsS2ie90qujWCs01rLX5yzk9Lj6F16URCtkbxbYxjToW1UtGT3P
	 3O53QD56IORCzQ+sP9lkzV5PPJWDjXUdi5Y1BlGr9HRHywvbWiF02M2IfiSvK0TfwQ
	 At1B9Y0mL6BT5IHaQ1URvaCwEScR6NmgErOmNrQAYG+3KJVCB/SImnL75QnRAqOIA1
	 c0JlfOitYGesg==
X-Received: from [10.30.226.235] (localhost [IPv6:::1])
	by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id F15B33808209;
	Tue, 20 Oct 2026 19:30:06 +0000 (UTC)
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: <20261015165959.i.798-kees@kernel.org>
X-Cc: kuba@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
 edumazet@google.com, pabeni@redhat.com, horms@kernel.org,
 gustavoars@kernel.org, qingfang.deng@linux.dev, jiri@resnulli.us,
 spender@grsecurity.net, pageexec@gmail.com, morbo@google.com,
 justinstitt@google.com, netdev@vger.kernel.org,
 linuxppc-dev@lists.ozlabs.org, linux-hardening@vger.kernel.org,
 yeswanth@linux.ibm.com, stable@vger.kernel.org, linux-kernel@vger.kernel.org