[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e5ce1ce-e30a-46c5-80fb-eb52e59e4dc2@yadro.com>
Date: Tue, 3 Dec 2024 17:44:25 +0300
From: Evgenii Shatokhin <e.shatokhin@...ro.com>
To: Björn Töpel <bjorn@...nel.org>
CC: Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
Nick Desaulniers <ndesaulniers@...gle.com>, Nathan Chancellor
<nathan@...nel.org>, Albert Ou <aou@...s.berkeley.edu>, Palmer Dabbelt
<palmer@...belt.com>, Paul Walmsley <paul.walmsley@...ive.com>, Mark Rutland
<mark.rutland@....com>, Masami Hiramatsu <mhiramat@...nel.org>, Steven
Rostedt <rostedt@...dmis.org>, Andy Chiu <andybnac@...il.com>,
<linux-kernel@...r.kernel.org>, <linux-trace-kernel@...r.kernel.org>,
<linux-riscv@...ts.infradead.org>, <llvm@...ts.linux.dev>,
<bjorn@...osinc.com>, <puranjay12@...il.com>, <alexghiti@...osinc.com>,
<yongxuan.wang@...ive.com>, <greentime.hu@...ive.com>, <nick.hu@...ive.com>,
<nylon.chen@...ive.com>, <tommy.wu@...ive.com>, <eric.lin@...ive.com>,
<viccent.chen@...ive.com>, <zong.li@...ive.com>, <samuel.holland@...ive.com>
Subject: Re: Re: [PATCH v3 1/7] riscv: ftrace: support fastcc in Clang for
WITH_ARGS
Hi,
On 03.12.2024 15:05, Björn Töpel wrote:
>
> Andy Chiu <andybnac@...il.com> writes:
>
>> From: Andy Chiu <andy.chiu@...ive.com>
>>
>> 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 <e.shatokhin@...ro.com>
>> Closes: https://lore.kernel.org/linux-riscv/7e7c7914-445d-426d-89a0-59a9199c45b1@yadro.com/
>> Acked-by: Nathan Chancellor <nathan@...nel.org>
>> Signed-off-by: Andy Chiu <andy.chiu@...ive.com>
>
> 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 <bjorn@...osinc.com>
>
Regards,
Evgenii
Powered by blists - more mailing lists