From: Masami Hiramatsu <mhiramat@kernel.org>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc/jprobes: Save and restore the parameter save area
Date: Wed, 17 May 2017 10:12:48 +0900 [thread overview]
Message-ID: <20170517101248.7b3d2a5f38fff1a765df9687@kernel.org> (raw)
In-Reply-To: <0572aa31dd57bef6f158ac97d0b666a0c545356a.1494871248.git.naveen.n.rao@linux.vnet.ibm.com>
On Mon, 15 May 2017 23:35:03 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
> diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h
> index a83821f33ea3..b6960ef213ac 100644
> --- a/arch/powerpc/include/asm/kprobes.h
> +++ b/arch/powerpc/include/asm/kprobes.h
> @@ -61,6 +61,15 @@ extern kprobe_opcode_t optprobe_template_end[];
> #define MAX_OPTINSN_SIZE (optprobe_template_end - optprobe_template_entry)
> #define RELATIVEJUMP_SIZE sizeof(kprobe_opcode_t) /* 4 bytes */
>
> +/* Save upto 16 parameters along with the stack frame header */
> +#define MAX_STACK_SIZE (STACK_FRAME_PARM_SAVE + (16 * sizeof(unsigned long)))
> +#define MIN_STACK_SIZE(ADDR) \
> + (((MAX_STACK_SIZE) < (((unsigned long)current_thread_info()) + \
> + THREAD_SIZE - (unsigned long)(ADDR))) \
> + ? (MAX_STACK_SIZE) \
> + : (((unsigned long)current_thread_info()) + \
> + THREAD_SIZE - (unsigned long)(ADDR)))
Could you add CUR_STACK_SIZE(addr) as x86 does instead of repeating similar code?
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2017-05-17 1:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 18:05 [PATCH 1/2] powerpc/jprobes: Save and restore the parameter save area Naveen N. Rao
2017-05-15 18:05 ` [PATCH 2/2] powerpc/jprobes: Validate break handler invocation as being due to a jprobe_return() Naveen N. Rao
2017-05-17 1:21 ` Masami Hiramatsu
2017-05-30 18:36 ` Naveen N. Rao
2017-05-17 1:12 ` Masami Hiramatsu [this message]
2017-05-30 18:16 ` [PATCH 1/2] powerpc/jprobes: Save and restore the parameter save area Naveen N. Rao
2017-05-18 5:22 ` Michael Ellerman
2017-05-30 18:14 ` Naveen N. Rao
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=20170517101248.7b3d2a5f38fff1a765df9687@kernel.org \
--to=mhiramat@kernel.org \
--cc=ananth@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.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 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).