linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Marc Koderer <marc@koderer.com>
Cc: linux-doc@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Peter Zijlstra <peterz@infradead.org>,
	Alexandre Chartre <alexandre.chartre@oracle.com>,
	Christian Brauner <christian.brauner@ubuntu.com>,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH] samples/kprobes: Add ARM support
Date: Wed, 13 Jan 2021 01:27:16 +0900	[thread overview]
Message-ID: <20210113012716.045ca4c2d73e42236ecb554c@kernel.org> (raw)
In-Reply-To: <20210112154054.17138-1-marc@koderer.com>

On Tue, 12 Jan 2021 16:40:54 +0100
Marc Koderer <marc@koderer.com> wrote:

> Plenty of architectures are already supported and this adds ARM
> support.
> 
> Signed-off-by: Marc Koderer <marc@koderer.com>

This looks good to me.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Thank you,

> ---
>  samples/kprobes/kprobe_example.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c
> index 365905cb24b1..65a1188a8b3b 100644
> --- a/samples/kprobes/kprobe_example.c
> +++ b/samples/kprobes/kprobe_example.c
> @@ -44,6 +44,10 @@ static int __kprobes handler_pre(struct kprobe *p, struct pt_regs *regs)
>  			" pstate = 0x%lx\n",
>  		p->symbol_name, p->addr, (long)regs->pc, (long)regs->pstate);
>  #endif
> +#ifdef CONFIG_ARM
> +	pr_info("<%s> pre_handler: p->addr = 0x%p, pc = 0x%lx, cpsr = 0x%lx\n",
> +		p->symbol_name, p->addr, (long)regs->ARM_pc, (long)regs->ARM_cpsr);
> +#endif
>  #ifdef CONFIG_S390
>  	pr_info("<%s> pre_handler: p->addr, 0x%p, ip = 0x%lx, flags = 0x%lx\n",
>  		p->symbol_name, p->addr, regs->psw.addr, regs->flags);
> @@ -73,6 +77,10 @@ static void __kprobes handler_post(struct kprobe *p, struct pt_regs *regs,
>  	pr_info("<%s> post_handler: p->addr = 0x%p, pstate = 0x%lx\n",
>  		p->symbol_name, p->addr, (long)regs->pstate);
>  #endif
> +#ifdef CONFIG_ARM
> +	pr_info("<%s> post_handler: p->addr = 0x%p, cpsr = 0x%lx\n",
> +		p->symbol_name, p->addr, (long)regs->ARM_cpsr);
> +#endif
>  #ifdef CONFIG_S390
>  	pr_info("<%s> pre_handler: p->addr, 0x%p, flags = 0x%lx\n",
>  		p->symbol_name, p->addr, regs->flags);
> -- 
> 2.20.1
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2021-01-12 16:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 15:40 [PATCH] samples/kprobes: Add ARM support Marc Koderer
2021-01-12 16:27 ` Masami Hiramatsu [this message]
2021-01-18 20:24 ` Jonathan Corbet

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=20210113012716.045ca4c2d73e42236ecb554c@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=alexandre.chartre@oracle.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=marc@koderer.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=peterz@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).