[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180518223803.b120da47fd2908fe4c9785ad@kernel.org>
Date: Fri, 18 May 2018 22:38:03 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Laura Abbott <labbott@...hat.com>, Josef Bacik <jbacik@...com>,
Alexei Starovoitov <ast@...nel.org>,
Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Subject: Re: [PATCH -tip v3 4/7] kprobes: Ignore break_handler
On Fri, 18 May 2018 08:16:36 +0200
Ingo Molnar <mingo@...nel.org> wrote:
>
> * Masami Hiramatsu <mhiramat@...nel.org> wrote:
>
> > Ignore break_handler related code because it was only
> > used by jprobe and jprobe is removed.
> >
> > Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> > ---
> > Documentation/kprobes.txt | 2 +-
> > kernel/kprobes.c | 39 +++++----------------------------------
> > 2 files changed, 6 insertions(+), 35 deletions(-)
>
> Even after all these changes there's quite a bit of ->break_handler() use:
>
> triton:~/tip> git grep -w break_handler
> arch/arc/kernel/kprobes.c: if (p->break_handler && p->break_handler(p, regs)) {
> arch/arm/probes/kprobes/core.c: * for calling the break_handler below on re-entry,
> arch/arm/probes/kprobes/core.c: if (cur->break_handler && cur->break_handler(cur, regs)) {
> arch/arm64/kernel/probes/kprobes.c: * for calling the break_handler below on re-entry,
> arch/arm64/kernel/probes/kprobes.c: if (cur_kprobe->break_handler &&
> arch/arm64/kernel/probes/kprobes.c: cur_kprobe->break_handler(cur_kprobe, regs)) {
> arch/ia64/kernel/kprobes.c: if (p->break_handler && p->break_handler(p, regs)) {
> arch/mips/kernel/kprobes.c: if (p->break_handler && p->break_handler(p, regs))
> arch/powerpc/kernel/kprobes.c: if (p->break_handler && p->break_handler(p, regs)) {
> arch/s390/kernel/kprobes.c: * for calling the break_handler below on re-entry
> arch/s390/kernel/kprobes.c: if (p->break_handler && p->break_handler(p, regs)) {
> arch/s390/kernel/kprobes.c: * break_handler "returns" to the original
> arch/sh/kernel/kprobes.c: if (p->break_handler && p->break_handler(p, regs)) {
> arch/sh/kernel/kprobes.c: if (p->break_handler &&
> arch/sh/kernel/kprobes.c: p->break_handler(p, args->regs))
> arch/sparc/kernel/kprobes.c: if (p->break_handler && p->break_handler(p, regs))
> arch/x86/include/asm/kprobes.h: * a post_handler or break_handler).
> include/linux/kprobes.h: kprobe_break_handler_t break_handler;
>
> Nothing appears to be actually _setting_ the break_handler, so all of this is
> stale code as well which should be removed?
Yes, break_handler() is only for jprobe, not for user-defined handler.
I already have a series of those patches, but I think I need to send it
to each arch maintainer.
Thank you,
>
> Thanks,
>
> Ingo
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists