lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <df439eb4-4dbd-4f0f-bfd2-27c6b1534f39@ghiti.fr>
Date: Thu, 12 Jun 2025 14:46:39 +0200
From: Alexandre Ghiti <alex@...ti.fr>
To: Marco Bonelli <marco@...eim.net>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: "terrelln@...com" <terrelln@...com>,
 "rostedt@...dmis.org" <rostedt@...dmis.org>,
 "mhiramat@...nel.org" <mhiramat@...nel.org>,
 "mark.rutland@....com" <mark.rutland@....com>,
 "linux-trace-kernel@...r.kernel.org" <linux-trace-kernel@...r.kernel.org>,
 "paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
 "palmer@...belt.com" <palmer@...belt.com>,
 "aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
 "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>
Subject: Re: Broken 32-bit riscv debug build with ZSTD and FTRACE

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ