[PATCH] riscv: fix KUnit test_kprobes crash when building with Clang

patchwork-bot+linux-riscv at kernel.org patchwork-bot+linux-riscv at kernel.org
Tue Nov 18 13:10:06 PST 2025


Hello:

This patch was applied to riscv/linux.git (fixes)
by Paul Walmsley <pjw at kernel.org>:

On Thu, 13 Nov 2025 18:51:42 +0800 (GMT+08:00) you wrote:
> Clang misaligns the test_kprobes_addresses and test_kprobes_functions
> arrays, or does not export local labels by default. Both can cause
> kmalloc_array() allocation errors and KUnit failures.
> 
> This patch fixes the issue by:
> - Adding .section .rodata to explicitly place arrays in the read-only data segment.
> - Adding .align 3 to align arrays to 8 bytes.
> - Adding .globl to probe labels to ensure symbols are visible.
> 
> [...]

Here is the summary with links:
  - riscv: fix KUnit test_kprobes crash when building with Clang
    https://git.kernel.org/riscv/c/e2285bd4a467

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





More information about the linux-riscv mailing list