From: Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] save parameter registers and restore them for jprobe handling
Date: Thu, 01 Dec 2005 20:06:36 +0000 [thread overview]
Message-ID: <20051201120636.A7726@unix-os.sc.intel.com> (raw)
In-Reply-To: <8126E4F969BA254AB43EA03C59F44E84040B3BF4@pdsmsx404>
On Wed, Nov 30, 2005 at 09:19:02PM -0800, Zhang, Yanmin wrote:
> How about the new patch? I add a new function in arch/ia64/kernel/entry.S.
>
I agree with Ken, move the assembly function to arch/ia64/kernel/jprobe.S file.
Also, please see my comments.
> int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
> {
[...]
> /* save architectural state */
Wrong comment above, we are not saving architectural state.
I guess the comment should be
"Callee owns the argument space and could overwrite it, eg
tail call optimization. So to be absolutely safe
we save the argument space before transfering the control
to instrumented jprobe function which runs in
the process context"
> @@ -785,8 +821,19 @@ int __kprobes setjmp_pre_handler(struct
> int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
> {
[....]
> + unw_init_running(ia64_get_bsp_cfm, &pa);
Just an optimization, avoid calling unw_init_running()
and just save bsp and cfm in the previous call and
reuse it. I think you can save in the kcb
structure.
> + bytes = (char *)ia64_rse_skip_regs(pa.bsp, pa.cfm & 0x3f)
> + - (char *)pa.bsp;
Again Comment please.. like
/* restoring the original argument space */
> + memcpy( pa.bsp,
> + kcb->jprobes_saved_stacked_regs,
> + bytes );
-Anil Keshavamurthy
next prev parent reply other threads:[~2005-12-01 20:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-01 2:28 [PATCH] save parameter registers and restore them for jprobe handling Zhang, Yanmin
2005-12-01 2:37 ` Keith Owens
2005-12-01 5:19 ` Zhang, Yanmin
2005-12-01 19:25 ` Chen, Kenneth W
2005-12-01 20:06 ` Keshavamurthy Anil S [this message]
2005-12-02 2:29 ` Zhang, Yanmin
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=20051201120636.A7726@unix-os.sc.intel.com \
--to=anil.s.keshavamurthy@intel.com \
--cc=linux-ia64@vger.kernel.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