Re: [PATCH -next V7 0/7] riscv: Optimize function trace

From: patchwork-bot+linux-riscv
Date: Sat Feb 18 2023 - 16:47:06 EST


Hello:

This series was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@xxxxxxxxxxxx>:

On Thu, 12 Jan 2023 04:05:56 -0500 you wrote:
> From: Guo Ren <guoren@xxxxxxxxxxxxxxxxx>
>
> The previous ftrace detour implementation fc76b8b8011 ("riscv: Using
> PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") contain three problems.
>
> - The most horrible bug is preemption panic which found by Andy [1].
> Let's disable preemption for ftrace first, and Andy could continue
> the ftrace preemption work.
> - The "-fpatchable-function-entry= CFLAG" wasted code size
> !RISCV_ISA_C.
> - The ftrace detour implementation wasted code size.
> - When livepatching, the trampoline (ftrace_regs_caller) would not
> return to <func_prolog+12> but would rather jump to the new function.
> So, "REG_L ra, -SZREG(sp)" would not run and the original return
> address would not be restored. The kernel is likely to hang or crash
> as a result. (Found by Evgenii Shatokhin [4])
>
> [...]

Here is the summary with links:
- [-next,V7,1/7] riscv: ftrace: Fixup panic by disabling preemption
https://git.kernel.org/riscv/c/8547649981e6
- [-next,V7,2/7] riscv: ftrace: Remove wasted nops for !RISCV_ISA_C
https://git.kernel.org/riscv/c/409c8fb20c66
- [-next,V7,3/7] riscv: ftrace: Reduce the detour code size to half
https://git.kernel.org/riscv/c/6724a76cff85
- [-next,V7,4/7] riscv: ftrace: Add ftrace_graph_func
(no matching commit)
- [-next,V7,5/7] riscv: ftrace: Add DYNAMIC_FTRACE_WITH_DIRECT_CALLS support
(no matching commit)
- [-next,V7,6/7] samples: ftrace: Add riscv support for SAMPLE_FTRACE_DIRECT[_MULTI]
(no matching commit)
- [-next,V7,7/7] riscv : select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
(no matching commit)

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