From: masami.hiramatsu.pt@hitachi.com (Masami Hiramatsu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] ARM: kprobes: introduces checker
Date: Thu, 20 Nov 2014 21:14:56 +0900 [thread overview]
Message-ID: <546DDB40.6040604@hitachi.com> (raw)
In-Reply-To: <1416291582-74982-2-git-send-email-wangnan0@huawei.com>
(2014/11/18 15:19), Wang Nan wrote:
> diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
> index 6d64420..f114a3f 100644
> --- a/arch/arm/kernel/kprobes.c
> +++ b/arch/arm/kernel/kprobes.c
> @@ -61,6 +61,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
> kprobe_decode_insn_t *decode_insn;
> const union decode_action *actions;
> int is;
> + const struct decode_checker **checkers;
>
> if (in_exception_text(addr))
> return -EINVAL;
> @@ -74,9 +75,11 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
> insn = __opcode_thumb32_compose(insn, inst2);
> decode_insn = thumb32_probes_decode_insn;
> actions = kprobes_t32_actions;
> + checkers = kprobes_t32_checkers;
> } else {
> decode_insn = thumb16_probes_decode_insn;
> actions = kprobes_t16_actions;
> + checkers = kprobes_t16_checkers;
> }
> #else /* !CONFIG_THUMB2_KERNEL */
> thumb = false;
> @@ -85,12 +88,13 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
> insn = __mem_to_opcode_arm(*p->addr);
> decode_insn = arm_probes_decode_insn;
> actions = kprobes_arm_actions;
> + checkers = kprobes_arm_checkers;
> #endif
>
> p->opcode = insn;
> p->ainsn.insn = tmp_insn;
>
> - switch ((*decode_insn)(insn, &p->ainsn, true, actions)) {
> + switch ((*decode_insn)(insn, &p->ainsn, true, actions, NULL)) {
BTW, even if checkers always empty at this point, we should pass the checkers to this function.
Thank you,
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt at hitachi.com
next prev parent reply other threads:[~2014-11-20 12:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 6:19 [PATCH v2 0/3] ARM: kprobes: introduces instruction checker Wang Nan
2014-11-18 6:19 ` [PATCH v2 1/3] ARM: kprobes: introduces checker Wang Nan
2014-11-20 11:11 ` Jon Medhurst (Tixy)
2014-11-20 11:57 ` Masami Hiramatsu
2014-11-20 12:14 ` Masami Hiramatsu [this message]
2014-11-18 6:19 ` [PATCH v2 2/3] ARM: kprobes: collects stack consumption for store instructions Wang Nan
2014-11-20 15:22 ` Jon Medhurst (Tixy)
2014-11-18 6:19 ` [PATCH v2 3/3] ARM: kprobes: disallow probing stack consuming instructions Wang Nan
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=546DDB40.6040604@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.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).