linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc/jprobes: Save and restore the parameter save area
Date: Tue, 30 May 2017 23:46:16 +0530	[thread overview]
Message-ID: <20170530181616.GS19390@naverao1-tp.localdomain> (raw)
In-Reply-To: <20170517101248.7b3d2a5f38fff1a765df9687@kernel.org>

On 2017/05/17 10:12AM, Masami Hiramatsu wrote:
> 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?

Sure, thanks for calling me out on this ;D

- Naveen

  reply	other threads:[~2017-05-30 18:17 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 ` [PATCH 1/2] powerpc/jprobes: Save and restore the parameter save area Masami Hiramatsu
2017-05-30 18:16   ` Naveen N. Rao [this message]
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=20170530181616.GS19390@naverao1-tp.localdomain \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhiramat@kernel.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).