[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKXe6SJQ6VtjkrernnyuUwT-UoA7+FFKhYA5AQdem-4CUDQVzA@mail.gmail.com>
Date: Tue, 27 Sep 2022 10:07:02 +0800
From: Li Qiang <liq3ea@...il.com>
To: Li Qiang <liq3ea@....com>
Cc: naveen.n.rao@...ux.ibm.com, anil.s.keshavamurthy@...el.com,
davem@...emloft.net, Masami Hiramatsu <mhiramat@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kprobe: reverse kp->flags when arm_kprobe failed
Hello all,
What's the status of this patch?
Li Qiang <liq3ea@....com> 于2022年9月3日周六 00:00写道:
>
> In aggregate kprobe case, when arm_kprobe failed,
> we need set the kp->flags with KPROBE_FLAG_DISABLED again.
> If not, the 'kp' kprobe will been considered as enabled
> but it actually not enabled.
>
> Signed-off-by: Li Qiang <liq3ea@....com>
> ---
> kernel/kprobes.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index 08350e35a..333454df5 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -2424,8 +2424,11 @@ int enable_kprobe(struct kprobe *kp)
> if (!kprobes_all_disarmed && kprobe_disabled(p)) {
> p->flags &= ~KPROBE_FLAG_DISABLED;
> ret = arm_kprobe(p);
> - if (ret)
> + if (ret) {
> p->flags |= KPROBE_FLAG_DISABLED;
> + if (p != kp)
> + kp->flags |= KPROBE_FLAG_DISABLED;
> + }
> }
> out:
> mutex_unlock(&kprobe_mutex);
> --
> 2.25.1
>
Powered by blists - more mailing lists