From: Masami Hiramatsu <mhiramat@redhat.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, tglx@tglx.de, mingo@elte.hu,
hpa@zytor.com, ananth@in.ibm.com
Subject: Re: [patch] prepare kprobes code for x86 unification
Date: Mon, 12 Nov 2007 07:55:16 -0500 [thread overview]
Message-ID: <47384D34.6070000@redhat.com> (raw)
In-Reply-To: <20071024150047.4144fda0@laptopd505.fenrus.org>
Hi Arjan,
Arjan van de Ven wrote:
> From: Arjan van de Ven <arjan@linux.intel.com>
> Subject: prepare kprobes code for x86 unification
>
> This patch is a first step towards unification of the kprobes
> infrastructure between 32 and 64 bit x86; the patch is mostly
> about removing spurious whitespace changes and about adding
> harmless includes and the like to make the 32/64 files more
> identical.
>
> Signed-off-by: Arjan van de Ven
I got a bug in this patch. In kprobes_64.c, Since this added __kprobes
to kretprobe_trampoline_holder(), the arch_init_kprobes() failed to
insert a kprobe into that function, and the initialization was failed.
This means that kprobe_exceptions_notify() was not registered to
die_notifier_chain. So, it caused a kernel crash.
> @@ -385,7 +428,7 @@ no_kprobe:
> * here. When a retprobed function returns, this probe is hit and
> * trampoline_probe_handler() runs, calling the kretprobe's handler.
> */
> - void kretprobe_trampoline_holder(void)
> + void __kprobes kretprobe_trampoline_holder(void)
> {
> asm volatile ( ".global kretprobe_trampoline\n"
> "kretprobe_trampoline: \n"
On i386, I introduced kretprobe-booster, which did not need to insert
a kprobe. Thus, I also added __kprobes to kretprobe_trampoline_holder()
on i386.
I think we can remove __kprobes from kretprobe_trampoline_holder()
in kprobes_32.c if you'd like to make the both same. However, it
is not safe. So we need a comment on top explaining why it does not
have that annotation and users must take care of it.
By the way, I'm porting boosters to x86-64 (and ia64). Since some parts
of that will be covered by this patch, I'd like to know your unification
plan.
Best regards,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com, masami.hiramatsu.pt@hitachi.com
prev parent reply other threads:[~2007-11-12 12:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 22:00 [patch] prepare kprobes code for x86 unification Arjan van de Ven
2007-11-06 6:55 ` Andrew Morton
2007-11-12 12:55 ` Masami Hiramatsu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47384D34.6070000@redhat.com \
--to=mhiramat@redhat.com \
--cc=ananth@in.ibm.com \
--cc=arjan@infradead.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@tglx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox