From: Alexandre Ghiti <alex@ghiti.fr>
To: Marco Bonelli <marco@mebeim.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "terrelln@fb.com" <terrelln@fb.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"mhiramat@kernel.org" <mhiramat@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"linux-trace-kernel@vger.kernel.org"
<linux-trace-kernel@vger.kernel.org>,
"paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
"palmer@dabbelt.com" <palmer@dabbelt.com>,
"aou@eecs.berkeley.edu" <aou@eecs.berkeley.edu>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>
Subject: Re: Broken 32-bit riscv debug build with ZSTD and FTRACE
Date: Thu, 12 Jun 2025 14:46:39 +0200 [thread overview]
Message-ID: <df439eb4-4dbd-4f0f-bfd2-27c6b1534f39@ghiti.fr> (raw)
In-Reply-To: <191074362.1248877.1749238947947@privateemail.com>
Hi Marco,
On 6/6/25 21:42, Marco Bonelli wrote:
> I was able to also reproduce without ZSTD (i.e. both ZSTD_COMPRESS=n
> and ZSTD_DECOMPRESS=n) like this:
>
> export ARCH=riscv CROSS_COMPILE=riscv32-linux-
> make distclean
> make defconfig
> make 32-bit.config
> ./scripts/config \
> -e FTRACE \
> -e CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \
> -d RD_ZSTD \
> -d SECURITY_APPARMOR_INTROSPECT_POLICY \
> -d BTRFS_FS
> make olddefconfig
> make -j vmlinux
>
> Did another bisect run between v6.14 and v6.15 with the above commands
> in a bash script and got:
>
> 494e7fe591bf834d57c6607cdc26ab8873708aa7 Merge tag 'bpf_res_spin_lock' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
>
> This leaves me more puzzled than before honestly. Not sure whether it is
> a real bug or a problem on my end at this point? The fact that I can repro
> in a Docker makes me think of the former, but the fact that I was able to
> bisect it down to two different commits depending on ZSTD vs no ZSTD is
> weird.
>
> Alex (or anyone else really): are you able to reproduce with my Dockerfile
> or config I provided in my last mail by any chance?
I'm able to reproduce your issue with your Dockerfile and locally too
now using your last instructions, with the rv32 toolchain you provided
and my regular rv64 toolchain (13.1.0).
So, that's weird, let's take the following failure:
ERROR: modpost: vmlinux: local symbol 'riscv_cached_mvendorid' was exported
When attaching with gdb, I get this:
Breakpoint 2, check_export_symbol (sym=0x7fffcfc5aca8,
secname=0x7ffff7b7e3aa ".debug_str", faddr=72, elf=0x7fffffffdec0,
mod=0x55555556b2a0) at ../scripts/mod/modpost.c:1087
1087 error("%s: local symbol '%s' was exported\n", mod->name,
1: mod->name = 0x55555556b334 "vmlinux"
2: label_name = 0x7fffdfcd965f "__export_symbol_riscv_cached_mvendorid"
(gdb) p/x sym->st_info
$1 = 0x0
(gdb) p/x *sym
$2 = {st_name = 0x321ded, st_value = 0x3d9111, st_size = 0x0, st_info =
0x0,
st_other = 0x0, st_shndx = 0xb6}
where st_info == 0 == STB_LOCAL.
On a working rv64 build with the same configs, I get:
Breakpoint 1, check_export_symbol (sym=0x7fffc56d94a8,
secname=0x7ffff7ae9e54 ".text", faddr=120, elf=0x7fffffffded0,
mod=0x55555556b2a0) at ../scripts/mod/modpost.c:1085
1085 if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL &&
(gdb) p/x *sym
$1 = {st_name = 0xe6aa, st_info = 0x12, st_other = 0x0, st_shndx = 0x2,
st_value = 0x11ba, st_size = 0x2c}
The difference is that the symbol is not in the same section.
I'm still looking into it, just wanted to let you know that I can
reproduce and hoping someone who knows could jump in :)
Thanks,
Alex
>
> --
> Marco Bonelli
next prev parent reply other threads:[~2025-06-12 12:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-30 21:40 Marco Bonelli
2025-05-31 11:52 ` Marco Bonelli
2025-06-04 12:44 ` Alexandre Ghiti
2025-06-04 13:52 ` Marco Bonelli
2025-06-06 19:42 ` Marco Bonelli
2025-06-12 12:46 ` Alexandre Ghiti [this message]
2025-06-17 1:48 ` Marco Bonelli
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=df439eb4-4dbd-4f0f-bfd2-27c6b1534f39@ghiti.fr \
--to=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=marco@mebeim.net \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rostedt@goodmis.org \
--cc=terrelln@fb.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
all inboxes | Powered by JetHome®