All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] kprobes: remove redundant address check
Date: Tue, 03 Aug 2010 11:24:34 +0000	[thread overview]
Message-ID: <4C57FC72.30906@hitachi.com> (raw)
In-Reply-To: <1280820323-18929-1-git-send-email-namhyung@gmail.com>

Namhyung Kim wrote:
> remove call to kernel_text_address() in register_jprobes()
> because it is called right after in register_kprobe().

Indeed. Thank you for finding that! :)

> Signed-off-by: Namhyung Kim <namhyung@gmail.com>

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

> 
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index 282035f..8f96701 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -1343,14 +1343,11 @@ int __kprobes register_jprobes(struct jprobe **jps, int num)
>  		jp = jps[i];
>  		addr = arch_deref_entry_point(jp->entry);
>  
> -		if (!kernel_text_address(addr))
> -			ret = -EINVAL;
> -		else {
> -			/* Todo: Verify probepoint is a function entry point */
> -			jp->kp.pre_handler = setjmp_pre_handler;
> -			jp->kp.break_handler = longjmp_break_handler;
> -			ret = register_kprobe(&jp->kp);
> -		}
> +		/* Todo: Verify probepoint is a function entry point */
> +		jp->kp.pre_handler = setjmp_pre_handler;
> +		jp->kp.break_handler = longjmp_break_handler;
> +		ret = register_kprobe(&jp->kp);
> +
>  		if (ret < 0) {
>  			if (i > 0)
>  				unregister_jprobes(jps, i);
-- 
Masami HIRAMATSU
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com

      reply	other threads:[~2010-08-03 11:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03  7:25 [PATCH 1/2] kprobes: remove redundant address check Namhyung Kim
2010-08-03 11:24 ` 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=4C57FC72.30906@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.