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: <38a6ea82.1e091.19a9a2cbe92.Coremail.xujiakai2025@iscas.ac.cn>
Date: Wed, 19 Nov 2025 11:33:34 +0800 (GMT+08:00)
From: "Jiakai Xu" <xujiakai2025@...as.ac.cn>
To: "Nathan Chancellor" <nathan@...nel.org>
Cc: "Paul Walmsley" <pjw@...nel.org>, linux-riscv@...ts.infradead.org, 
	linux-kernel@...r.kernel.org, "Palmer Dabbelt" <palmer@...belt.com>, 
	"Albert Ou" <aou@...s.berkeley.edu>, 
	"Alexandre Ghiti" <alex@...ti.fr>, namcao@...utronix.de
Subject: Re: Re: Re: [PATCH] riscv: fix KUnit test_kprobes crash when
 building with Clang

Hi Nathan,

&gt; I spent some time today trying to minimize a small set of configurations
&gt; that triggers this issue on top of defconfig since that occasionally
&gt; reveals a path to head down for triage and I landed on:
&gt;   ...
Thank you for taking the time to minimize the configuration and
provide the detailed reproduction steps.

&gt; This appears to happen back to LLVM 15 so I am not sure it is a recent
&gt; recent regression on the toolchain side.
&gt; 
&gt; Without CONFIG_RELOCATABLE enabled, the test passes:
&gt; 
&gt;   [    1.049384] KTAP version 1
&gt;   [    1.049656] 1..1
&gt;   [    1.050246]     KTAP version 1
&gt;   [    1.050447]     # Subtest: kprobes_riscv
&gt;   [    1.050760]     # module: kprobes_riscv_kunit
&gt;   [    1.050867]     1..1
&gt;   [    1.061790]     ok 1 test_kprobe_riscv
&gt;   [    1.061929] ok 1 kprobes_riscv
&gt; 
&gt; Interestingly, if I enable CONFIG_RISCV_KPROBES_KUNIT as a module, I get
&gt; a failure when trying to load it in QEMU:
&gt; 
&gt;   ~ # modprobe kprobes_riscv_kunit
&gt;   [   42.214642] kprobes_riscv_kunit: The unexpected relocation type 'R_RISCV_ALIGN' from PC = 00000000abb84ce7
&gt;   [   42.222778] kprobes_riscv_kunit: The unexpected relocation type 'R_RISCV_ALIGN' from PC = 00000000abb84ce7
&gt;   modprobe: can't load module kprobes_riscv_kunit (kernel/arch/riscv/kernel/tests/kprobes/kprobes_riscv_kunit.ko): Invalid argument

This information is very useful for upstream triage and
confirms that the issue is configuration-dependent.

&gt; which is probably unrelated but I figured it was worth mentioning, as it
&gt; does not allow me to see if this has something to do with the flags
&gt; added to LDFLAGS_vmlinux.
&gt; 
&gt; Maybe this is useful for the upstream report and further triage.

I really appreciate your effort in providing this data;
it will definitely help with further analysis and reporting.

thanks,

- Jiakai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ