[<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,
> I spent some time today trying to minimize a small set of configurations
> that triggers this issue on top of defconfig since that occasionally
> reveals a path to head down for triage and I landed on:
> ...
Thank you for taking the time to minimize the configuration and
provide the detailed reproduction steps.
> This appears to happen back to LLVM 15 so I am not sure it is a recent
> recent regression on the toolchain side.
>
> Without CONFIG_RELOCATABLE enabled, the test passes:
>
> [ 1.049384] KTAP version 1
> [ 1.049656] 1..1
> [ 1.050246] KTAP version 1
> [ 1.050447] # Subtest: kprobes_riscv
> [ 1.050760] # module: kprobes_riscv_kunit
> [ 1.050867] 1..1
> [ 1.061790] ok 1 test_kprobe_riscv
> [ 1.061929] ok 1 kprobes_riscv
>
> Interestingly, if I enable CONFIG_RISCV_KPROBES_KUNIT as a module, I get
> a failure when trying to load it in QEMU:
>
> ~ # modprobe kprobes_riscv_kunit
> [ 42.214642] kprobes_riscv_kunit: The unexpected relocation type 'R_RISCV_ALIGN' from PC = 00000000abb84ce7
> [ 42.222778] kprobes_riscv_kunit: The unexpected relocation type 'R_RISCV_ALIGN' from PC = 00000000abb84ce7
> 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.
> which is probably unrelated but I figured it was worth mentioning, as it
> does not allow me to see if this has something to do with the flags
> added to LDFLAGS_vmlinux.
>
> 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