From: "Arnd Bergmann" <arnd@arndb.de>
To: "Konstantin Khorenko" <khorenko@virtuozzo.com>,
"Peter Oberparleiter" <oberpar@linux.ibm.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nsc@kernel.org>
Cc: "Mikhail Zaslonko" <zaslonko@linux.ibm.com>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Miguel Ojeda" <ojeda@kernel.org>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
"Pavel Tikhomirov" <ptikhomirov@virtuozzo.com>,
"Vasileios Almpanis" <vasileios.almpanis@virtuozzo.com>
Subject: Re: [PATCH v2] gcov: use atomic counter updates to fix concurrent access crashes
Date: Tue, 28 Apr 2026 22:56:38 +0200 [thread overview]
Message-ID: <3786062b-ce93-47e0-8eb1-125bac5dbb2a@app.fastmail.com> (raw)
In-Reply-To: <20260422125112.3583649-2-khorenko@virtuozzo.com>
On Wed, Apr 22, 2026, at 14:51, Konstantin Khorenko wrote:
> @@ -824,7 +824,7 @@ all: vmlinux
>
> CFLAGS_GCOV := -fprofile-arcs -ftest-coverage
> ifdef CONFIG_CC_IS_GCC
> -CFLAGS_GCOV += -fno-tree-loop-im
> +CFLAGS_GCOV += -fno-tree-loop-im -fprofile-update=prefer-atomic
> endif
> export CFLAGS_GCOV
Unfortunately, this causes link failures in a few files that
end up trying to use the libgcc atomic function calls. From
my randconfig builds with gcc-16, I have so far seen:
x86_64-linux-ld: io_uring/io_uring.o: in function `io_uring_fill_params':
io_uring.c:(.text+0x40): undefined reference to `__atomic_fetch_add_8'
aarch64-linux-ld: io_uring/io_uring.o: in function `io_req_sqe_copy':
io_uring.c:(.text+0x2c): undefined reference to `__aarch64_ldadd8_relax'
aarch64-linux-ld: kernel/trace/trace_selftest_dynamic.o: in function `trace_selftest_dynamic_test_func':
trace_selftest_dynamic.c:(.text.trace_selftest_dynamic_test_func+0x24): undefined reference to `__aarch64_ldadd8_relax'
aarch64-linux-ld: trace_clock.c:(.text.trace_clock_global+0x3c): undefined reference to `__aarch64_ldadd8_relax'
ERROR: modpost: "__atomic_fetch_add_8" [kernel/trace/ring_buffer_benchmark.ko] undefined!
ERROR: modpost: "__aarch64_ldadd8_relax" [kernel/trace/preemptirq_delay_test.ko] undefined!
ERROR: modpost: "__aarch64_ldadd8_relax" [kernel/trace/synth_event_gen_test.ko] undefined!
ERROR: modpost: "__aarch64_ldadd8_relax" [kernel/trace/remote_test.ko] undefined!
ERROR: modpost: "__aarch64_ldadd8_relax" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
Since I build only with CONFIG_COMPILE_TEST=y, it looks like these
are the files that explictly enable GCOV, and likely all others
would run into the same issue.
Arnd
next prev parent reply other threads:[~2026-04-28 20:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 12:51 [PATCH v2 0/1] gcov: use -fprofile-update=prefer-atomic to fix concurrent access crashes Konstantin Khorenko
2026-04-22 12:51 ` [PATCH v2] gcov: use atomic counter updates " Konstantin Khorenko
2026-04-22 21:26 ` Konstantin Khorenko
2026-04-28 20:56 ` Arnd Bergmann [this message]
2026-05-07 13:31 ` Peter Oberparleiter
2026-05-07 13:43 ` Arnd Bergmann
2026-05-08 19:48 ` Andrew Morton
2026-05-09 11:50 ` Konstantin Khorenko
2026-05-09 14:36 ` Konstantin Khorenko
2026-05-09 15:14 ` Arnd Bergmann
2026-05-11 9:43 ` 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=3786062b-ce93-47e0-8eb1-125bac5dbb2a@app.fastmail.com \
--to=arnd@arndb.de \
--cc=khorenko@virtuozzo.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=oberpar@linux.ibm.com \
--cc=ojeda@kernel.org \
--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