[PATCH 0/4] Make fpobe + rethook immune to recursion

Ze Gao zegao2021 at gmail.com
Mon May 15 19:15:10 PDT 2023


Hi Conor,
Sorry for making such mistakes,  it's my git--send-email sending
script that does not work well.
I'll send v2 and double-check the cc-list ASAP.

Regards,
Ze

On Tue, May 16, 2023 at 1:44 AM Conor Dooley <conor at kernel.org> wrote:
>
> On Mon, May 15, 2023 at 11:13:09AM +0800, Ze Gao wrote:
> > Current fprobe and rethook has some pitfalls and may introduce kernel stack recusion, especially in
> > massive tracing scenario.
> >
> > For example, if (DEBUG_PREEMPT | TRACE_PREEMPT_TOGGLE) , preempt_count_{add, sub} can be traced via
> > ftrace, if we happens to use fprobe + rethook based on ftrace to hook on those functions,
> > recursion is introduced in functions like rethook_trampoline_handler and leads to kernel crash
> > because of stack overflow.
>
> This patch series is a bit confusing. The RISC-V list got 2 cover letters
> and 2 patch 4s, but not any of the rest of the series. Please at least
> send the whole series to the list so our patchwork automation can be run
> against it. And mark it as v2 while you are at it.
>
> Thanks,
> Conor.



More information about the linux-riscv mailing list