From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/3] kprobes: arm: enable OPTPROBES for ARM 32
Date: Wed, 3 Sep 2014 11:30:44 +0100 [thread overview]
Message-ID: <20140903103044.GC32378@arm.com> (raw)
In-Reply-To: <5406EADC.8080009@hitachi.com>
On Wed, Sep 03, 2014 at 11:18:04AM +0100, Masami Hiramatsu wrote:
> (2014/09/02 22:49), Jon Medhurst (Tixy) wrote:
> > 1. On SMP systems it's very slow because of kprobe's use of stop_machine
> > for applying and removing probes, this forces the system to idle and
> > wait for the next scheduler tick for each probe change.
>
> Hmm, agreed. It seems that arm32 limitation of self-modifying code on SMP.
> I'm not sure how we can handle it, but I guess;
> - for some processors which have better coherent cache for SMP, we can
> atomically replace the breakpoint code with original code.
Except that it's not an architected breakpoint instruction, as I mentioned
before. It's also not really a property of the cache.
> - Even if we get an "undefined instruction" exception, its handler can
> ask kprobes if the address is under modifying or not. And if it is,
> we can just return from the exception to retry the execution.
It's not as simple as that -- you could potentially see an interleaving of
the two instructions. The architecture is even broader than that:
Concurrent modification and execution of instructions can lead to the
resulting instruction performing any behavior that can be achieved by
executing any sequence of instructions that can be executed from the
same Exception level,
There are additional guarantees for some instructions (like the architected
BKPT instruction).
Will
next prev parent reply other threads:[~2014-09-03 10:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 13:02 [PATCH v5 0/3] kprobes: arm: enable OPTPROBES for ARM 32 Wang Nan
2014-08-27 13:02 ` [PATCH v5 1/3] ARM: probes: check stack operation when decoding Wang Nan
2014-08-28 9:51 ` Masami Hiramatsu
2014-08-28 10:20 ` Russell King - ARM Linux
2014-08-28 10:24 ` Will Deacon
2014-08-29 8:47 ` Jon Medhurst (Tixy)
2014-08-30 1:28 ` Wang Nan
2014-09-01 17:29 ` Jon Medhurst (Tixy)
2014-08-27 13:02 ` [PATCH v5 2/3] kprobes: copy ainsn after alloc aggr kprobe Wang Nan
2014-08-28 9:39 ` Masami Hiramatsu
2014-08-28 11:07 ` Wang Nan
2014-08-27 13:02 ` [PATCH v5 3/3] kprobes: arm: enable OPTPROBES for ARM 32 Wang Nan
2014-08-28 10:20 ` Masami Hiramatsu
2014-09-02 13:49 ` Jon Medhurst (Tixy)
2014-09-03 10:18 ` Masami Hiramatsu
2014-09-03 10:30 ` Will Deacon [this message]
2014-09-04 10:40 ` Jon Medhurst (Tixy)
2014-09-04 10:52 ` Will Deacon
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=20140903103044.GC32378@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).