From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Hyeoncheol Lee <hyc.lee@gmail.com>
Cc: acme@ghostprotocols.net, LKML <linux-kernel@vger.kernel.org>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
"yrl.pp-manager.tt@hitachi.com" <yrl.pp-manager.tt@hitachi.com>
Subject: Re: [PATCH] uprobes tracer: Add stack/memory/retval access support
Date: Tue, 16 Oct 2012 20:55:22 +0900 [thread overview]
Message-ID: <507D4B2A.6080107@hitachi.com> (raw)
In-Reply-To: <1350378135-18919-1-git-send-email-hyc.lee@gmail.com>
(2012/10/16 18:02), Hyeoncheol Lee wrote:
> Event arguments except @SYM are supported. They are @ADDR,
> $stack, $stackN, $retval, and offs(arguments).
>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> Signed-off-by: Hyeoncheol Lee <hyc.lee@gmail.com>
> ---
[...]
> #define DEFINE_FETCH_stack(type) \
> static __kprobes void FETCH_FUNC_NAME(stack, type)(struct pt_regs *regs,\
> - void *offset, void *dest) \
> + void *offset, void *dest, \
> + bool kprobe) \
> { \
> - *(type *)dest = (type)regs_get_kernel_stack_nth(regs, \
> + if (kprobe) \
> + *(type *)dest = (type)regs_get_kernel_stack_nth(regs, \
> (unsigned int)((unsigned long)offset)); \
> + else \
> + *(type *)dest = (type)regs_get_user_stack_nth(regs, \
> + (unsigned int)((unsigned long)offset)); \
> }
Hmm, I don't think this is a good way to do that.
If fetching user space objects is different from the kernel one,
we'd better introduce new fetch handlers for it, instead of checking
a bool flag every time, because it will be done on every events.
Thank you,
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2012-10-16 11:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 9:02 [PATCH] uprobes tracer: Add stack/memory/retval access support Hyeoncheol Lee
2012-10-16 11:55 ` Masami Hiramatsu [this message]
2012-10-17 8:31 ` Hyeoncheol Lee
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=507D4B2A.6080107@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=acme@ghostprotocols.net \
--cc=hyc.lee@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=yrl.pp-manager.tt@hitachi.com \
/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