Netdev List
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Kees Cook <kees@kernel.org>
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
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	[thread overview]
Message-ID: <179252460578.172302.12338872662372096525.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20261015165959.i.798-kees@kernel.org>

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



      parent reply	other threads:[~2026-10-20 19:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 17:00 [PATCH net-next net] netdev: Hide the netdev_priv() origin from GCC in netdev_from_priv() Kees Cook
2026-10-15 17:07 ` Kees Cook
2026-10-15 17:34   ` Jakub Kicinski
2026-10-15 17:58     ` Kees Cook
2026-10-16 15:19 ` Qingfang Deng
2026-10-20 19:30 ` patchwork-bot+netdevbpf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179252460578.172302.12338872662372096525.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gustavoars@kernel.org \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=justinstitt@google.com \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=morbo@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pageexec@gmail.com \
    --cc=qingfang.deng@linux.dev \
    --cc=spender@grsecurity.net \
    --cc=stable@vger.kernel.org \
    --cc=yeswanth@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox