The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Peter Oberparleiter <oberpar@linux.ibm.com>
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>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>
Subject: Re: [PATCH v2] gcov: use atomic counter updates to fix concurrent access crashes
Date: Mon, 11 May 2026 11:43:06 +0200	[thread overview]
Message-ID: <b8c07567-78dc-49dc-9e7c-bf0fd07304d2@virtuozzo.com> (raw)
In-Reply-To: <14dc05f0-40fd-413d-8082-8c474e25d238@app.fastmail.com>

On 5/9/26 17:14, Arnd Bergmann wrote:
> On Sat, May 9, 2026, at 13:50, Konstantin Khorenko wrote:
>> On 5/7/26 15:31, Peter Oberparleiter wrote:
>>> On 28.04.2026 22:56, Arnd Bergmann wrote:
>>
>> So this might actually be a GCC-16 regression in codegen rather than
>> an inherent architecture limitation.
> ....
>> could you please share the two .config files that triggered the link
>> failures (the x86_64 one with __atomic_fetch_add_8 and the aarch64 one
>> with __aarch64_ldadd8_relax)?
>> That could make my life a bit easier. :)
> 
> I've attached two configs each now, see what you find.
> 
> I just realized that these tests were still using a prerelease
> compiler, so it's even possible that the gcc-16.1 release is
> clean. I should build the next set of cross-compilers soon,
> and will be able to retest then.

Hi Arnd,

thank you for sending those configs.

All 4 previously failing configs were successfully built with the new patch applied
(on top of 5d6919055dec (tag: v7.1-rc3, origin/master, origin/HEAD) Linux 7.1-rc3):

   * 0x5AB716A4 - arm64, UP (no SMP), GCOV_PROFILE_URING + GCOV_PROFILE_RDS: build OK
     (make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-)
   * 0xD01A6C73 - x86_32 (i386), SMP, GCOV_PROFILE_URING + GCOV_PROFILE_RDS: build OK
     (make ARCH=i386)
   * 0xD21DABF - arm64, UP (no SMP), GCOV_PROFILE_URING: build OK
   * 0xFE5738DD - x86_32 (i386), UP (no SMP), GCOV_PROFILE_URING + GCOV_PROFILE_FTRACE: build OK

Previously these configs failed at link stage with undefined references to __aarch64_ldadd8_relax 
(arm64) and __atomic_fetch_add_8 (x86_32), caused by 64-bit atomic operations inserted by GCOV 
instrumentation. The new patch resolves all of these.

Note: the original failures were reported with gcc-16.0.1.2-nolibc cross toolchain;
my test builds used gcc-12.1.1 (aarch64-linux-gnu) and gcc-11.4.1 (x86),
but i really think this does not matter here:
i've checked in all 4 cases -fprofile-update=prefer-atomic was not used - try-run fence worked fine.

And when i've built the 0xD01A6C73-config switched to x86_64 (# CONFIG_X86_32 is not set, 
CONFIG_X86_64=y and CONFIG_64BIT=y), the build passed and -fprofile-update=prefer-atomic was used.

--
Thank you,
Konstantin


      reply	other threads:[~2026-05-11  9:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260422125112.3583649-1-khorenko@virtuozzo.com>
     [not found] ` <20260422125112.3583649-2-khorenko@virtuozzo.com>
     [not found]   ` <3786062b-ce93-47e0-8eb1-125bac5dbb2a@app.fastmail.com>
2026-05-07 13:31     ` [PATCH v2] gcov: use atomic counter updates to fix concurrent access crashes 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 [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=b8c07567-78dc-49dc-9e7c-bf0fd07304d2@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --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