From: Masami Hiramatsu <mhiramat@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: ananth@in.ibm.com, jkenisto@us.ibm.com, davem@davemloft.net,
linux-kernel@vger.kernel.org, systemtap@sources.redhat.com,
rusty@rustcorp.com.au
Subject: Re: [PATCH 2/7] kprobes: Add kprobe_insn_mutex and cleanup arch_remove_kprobe()
Date: Thu, 13 Nov 2008 23:04:54 -0500 [thread overview]
Message-ID: <491CF8E6.6030608@redhat.com> (raw)
In-Reply-To: <20081113162128.28e508ca.akpm@linux-foundation.org>
Hi Andrew,
Andrew Morton wrote:
> On Tue, 11 Nov 2008 15:56:21 -0500
> Masami Hiramatsu <mhiramat@redhat.com> wrote:
>
>> Add kprobe_insn_mutex for protecting kprobe_insn_pages hlist, and remove
>> kprobe_mutex from architecture dependent code.
>>
>> This allows us to call arch_remove_kprobe() (and free_insn_slot) while holding
>> kprobe_mutex.
>>
>> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
>> ---
>> arch/arm/kernel/kprobes.c | 2 --
>> arch/ia64/kernel/kprobes.c | 8 +++++---
>> arch/powerpc/kernel/kprobes.c | 7 ++++---
>> arch/s390/kernel/kprobes.c | 7 ++++---
>> arch/x86/kernel/kprobes.c | 7 ++++---
>> include/linux/kprobes.h | 1 -
>> kernel/kprobes.c | 25 +++++++++++++++++++++----
>
> For some reasons sparc64 never had this mutex. You've checked that
> sparc64 will be OK after this change?
I think it's OK for those archs.
Actually, this mutex is protecting insn_slot which stores copied
instructions into executable memory. Some architectures which
doesn't need that special memory have its own buffer in the
arch_specific_insn and they don't use insn_slot. On those arch,
kprobe_insn_mutex is not used (not defined).
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com
prev parent reply other threads:[~2008-11-14 4:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 20:56 [PATCH 2/7] kprobes: Add kprobe_insn_mutex and cleanup arch_remove_kprobe() Masami Hiramatsu
2008-11-12 15:55 ` Ananth N Mavinakayanahalli
2008-11-14 0:21 ` Andrew Morton
2008-11-14 4:04 ` 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=491CF8E6.6030608@redhat.com \
--to=mhiramat@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=ananth@in.ibm.com \
--cc=davem@davemloft.net \
--cc=jkenisto@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=systemtap@sources.redhat.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 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.