From: Paul Mackerras <paulus@samba.org>
To: ananth@in.ibm.com
Cc: linuxppc64-dev@ozlabs.org, anton@samba.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Kprobes for ppc64
Date: Sat, 23 Oct 2004 18:19:00 +1000 [thread overview]
Message-ID: <16762.5108.282382.603502@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20041018095229.GA7394@in.ibm.com>
Ananth N Mavinakayanahalli writes:
> Here is kprobes for ppc64. The patch applies on 2.6.9-rc4/2.6.9-final
> and provides the kprobes + jprobes functionality.
> 1. The current implementation uses xmon's emulate_step() and hence
> requires xmon to be compiled in.
We can move emulate_step out to arch/ppc64/lib/step.c (and take out
the printfs).
> 2. arch_prepare_kprobe() now returns an int. I have made the necessary
> changes to i386 and sparc64 kprobes files, but is untested.
Are you going to send this upstream?
> + * Interrupts are disabled on entry as trap3 is an interrupt gate and they
> + * remain disabled thorough out this function.
> + */
> +static inline int kprobe_handler(struct pt_regs *regs)
Comments about "trap3" and "interrupt gate" don't help me understand
this function on ppc64. :) At present interrupts are enabled in a
program check exception handler but disabled in a single-step handler.
When does this function get called?
> @@ -96,6 +97,9 @@ int do_page_fault(struct pt_regs *regs,
> BUG_ON((trap == 0x380) || (trap == 0x480));
>
> if (trap == 0x300) {
> + if (notify_die(DIE_PAGE_FAULT, "page_fault", regs, error_code,
> + 11, SIGSEGV) == NOTIFY_STOP)
> + return 0;
Hmmm, this seems a bit heavyweight for adding to the page fault path.
Have you done any benchmarks with vs. without kprobes?
On the whole the patch looks OK. I haven't checked the kprobe_handler
code to see if I think it's all SMP- and preempt-safe, but I assume
you have done it similarly on x86 and checked it there.
Paul.
prev parent reply other threads:[~2004-10-23 8:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-18 9:52 Ananth N Mavinakayanahalli
2004-10-23 8:19 ` Paul Mackerras [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=16762.5108.282382.603502@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=ananth@in.ibm.com \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
/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
all inboxes | Powered by JetHome®