Hi,
On 03.12.2024 15:05, Björn Töpel wrote:
Andy Chiu <[email protected]> writes:
From: Andy Chiu <[email protected]>
Some caller-saved registers which are not defined as function arguments
in the ABI can still be passed as arguments when the kernel is compiled
with Clang. As a result, we must save and restore those registers to
prevent ftrace from clobbering them.
- [1]: https://reviews.llvm.org/D68559
Reported-by: Evgenii Shatokhin <[email protected]>
Closes:
https://lore.kernel.org/linux-riscv/[email protected]/
Acked-by: Nathan Chancellor <[email protected]>
Signed-off-by: Andy Chiu <[email protected]>
Fixes tag?
As far as I understand it, Ftrace for RISC-V has had this problem since
support for FTRACE_WITH_REGS was added. FTRACE_WITH_ARGS inherited it.
So, it should probably be as follows:
Fixes: aea4c671fb98 ("riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support")
It is more of a workaround rather than a fix though, because it is still
undecided where the problem is, in the kernel or in LLVM/clang. That
discussion went nowhere, unfortunately, so it is better to use a
workaround and move on, IMO.
Reviewed-by: Björn Töpel <[email protected]>
Regards,
Evgenii