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

2024-02-03 Thread Yang Jihong
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? Sa

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

2024-02-03 Thread Paul E. McKenney
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.

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

2024-01-28 Thread Yang Jihong
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 h

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

2024-01-27 Thread Paul E. McKenney
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 tramp

Re: [PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

2024-01-18 Thread Paul E. McKenney
On Wed, Jan 17, 2024 at 12:31:33PM -0800, Andrew Morton wrote: > On Wed, 17 Jan 2024 06:16:36 + Chen Zhongjin > wrote: > > > There is a deadlock scenario in kprobe_optimizer(): > > > > pid A pid B pid C > > kprobe_optimizer() do_exit(

Re: [PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

2024-01-17 Thread Andrew Morton
On Wed, 17 Jan 2024 06:16:36 + Chen Zhongjin wrote: > There is a deadlock scenario in kprobe_optimizer(): > > pid A pid B pid C > kprobe_optimizer()do_exit() perf_kprobe_init() > mutex_lock(&kprobe_mutex) exit_tasks_rcu

[PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

2024-01-16 Thread Chen Zhongjin
There is a deadlock scenario in kprobe_optimizer(): pid A pid B pid C kprobe_optimizer() do_exit() perf_kprobe_init() mutex_lock(&kprobe_mutex) exit_tasks_rcu_start() mutex_lock(&kprobe_mutex) synchronize_rcu_tasks()

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

2024-01-09 Thread Yang Jihong
Hello, PING. I had a similar problem. Is this solution feasible? Thanks, Yang On 2024/1/2 11:40, Chen Zhongjin wrote: There is a deadlock scenario in kprobe_optimizer(): pid A pid B pid C kprobe_optimizer() do_exit() perf

[RFC PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

2024-01-01 Thread Chen Zhongjin
There is a deadlock scenario in kprobe_optimizer(): pid A pid B pid C kprobe_optimizer() do_exit() perf_kprobe_init() mutex_lock(&kprobe_mutex) exit_tasks_rcu_start() mutex_lock(&kprobe_mutex) synchronize_rcu_tasks()