public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: "Simon Horman" <horms@kernel.org>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Peter Oberparleiter" <oberpar@linux.ibm.com>,
	"Mikhail Zaslonko" <zaslonko@linux.ibm.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Konstantin Khorenko" <khorenko@virtuozzo.com>,
	"Pavel Tikhomirov" <ptikhomirov@virtuozzo.com>,
	"Vasileios Almpanis" <vasileios.almpanis@virtuozzo.com>
Subject: [PATCH 0/2] net: fix skb_ext BUILD_BUG_ON failures with GCOV
Date: Thu,  2 Apr 2026 17:05:56 +0300	[thread overview]
Message-ID: <20260402140558.1437002-1-khorenko@virtuozzo.com> (raw)

This mini-series fixes build failures in net/core/skbuff.c when the
kernel is built with CONFIG_GCOV_PROFILE_ALL=y.

This is part of a larger effort to add -fprofile-update=atomic to
global CFLAGS_GCOV (posted earlier as a combined series):
  https://lore.kernel.org/lkml/20260401142020.1434243-1-khorenko@virtuozzo.com/T/#t

That combined series was split per subsystem as requested by Jakub.
The companion patches are:

 - iommu: disable GCOV for iommu_amdv1.o (sent to iommu maintainers)
 - gcov: add -fprofile-update=atomic globally (sent to gcov/kbuild
   maintainers, depends on this series and the iommu patch)

Patch 1/2 fixes a pre-existing build failure with CONFIG_GCOV_PROFILE_ALL:
GCOV counters prevent GCC from constant-folding the skb_ext_total_length()
loop.  This is v3 of a previously posted standalone fix:
  https://lore.kernel.org/lkml/20260331165125.959833-1-khorenko@virtuozzo.com/T/#t

Patch 2/2 is an additional fix needed when -fprofile-update=atomic is
added to CFLAGS_GCOV: __no_profile on the __always_inline function alone
is insufficient because after inlining, the code resides in the caller's
profiled body.  The caller needs __no_profile as well.

Konstantin Khorenko (2):
  net: fix skb_ext_total_length() BUILD_BUG_ON with CONFIG_GCOV_PROFILE_ALL
  net: add __no_profile to skb_extensions_init() for GCOV compatibility

 net/core/skbuff.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
2.43.5

             reply	other threads:[~2026-04-02 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 14:05 Konstantin Khorenko [this message]
2026-04-02 14:05 ` [PATCH 1/2] net: fix skb_ext_total_length() BUILD_BUG_ON with CONFIG_GCOV_PROFILE_ALL Konstantin Khorenko
2026-04-02 14:09   ` Vasileios Almpanis
2026-04-07  7:55   ` Paolo Abeni
2026-04-02 14:05 ` [PATCH 2/2] net: add __no_profile to skb_extensions_init() for GCOV compatibility Konstantin Khorenko

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=20260402140558.1437002-1-khorenko@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=netdev@vger.kernel.org \
    --cc=oberpar@linux.ibm.com \
    --cc=pabeni@redhat.com \
    --cc=ptikhomirov@virtuozzo.com \
    --cc=vasileios.almpanis@virtuozzo.com \
    --cc=zaslonko@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