Re: [RFC PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

From: Yang Jihong
Date: Sat Feb 03 2024 - 20:16:56 EST


Hello,

On 2024/2/4 6:00, Paul E. McKenney wrote:
On Mon, Jan 29, 2024 at 08:58:10AM +0800, Yang Jihong wrote:
Hello,

On 2024/1/28 3:22, Paul E. McKenney wrote:
On Tue, Jan 09, 2024 at 07:28:29PM +0800, Yang Jihong wrote:
Hello,

PING.

I had a similar problem. Is this solution feasible?

Sadly, no.

It fails on CONFIG_PREEMPT=y kernels because synchronize_rcu_tasks_rude()
will not wait on tasks that have been preempted while executing in
a trampoline.

But could you please try out the patch shown at the end of this email?

Thanks for the patch, yes, I've tested and it solves the problem.

Very good, and thank you for testing it!

May I apply your Tested-by to the commit to record your efforts for
posterity?

Sure absolutely.

Tested-by: Yang Jihong <yangjihong1@xxxxxxxxxx>

Thanks,
Yang