linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM tracehook support
Date: Tue, 21 Feb 2012 17:24:09 +0000	[thread overview]
Message-ID: <20120221172408.GJ23133@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <4F43CF0C.2020301@mentor.com>

Hi Wade,

Thanks for following this up.

On Tue, Feb 21, 2012 at 05:06:20PM +0000, Wade Farnsworth wrote:
> >
> > I believe the 6 argument constraint is a specific to
> > syscall_get_arguments(). Notice the comment in
> > include/asm-generic/syscall.h:
> >
> > /*
> > [...]
> > *
> > * It's only valid to call this when @task is stopped for tracing on
> > * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
> > * It's invalid to call this with @i + @n > 6; we only support system calls
> > * taking up to 6 arguments.
> > */
> >
> > Additionally, if you'll look at the other architectures' implementations
> > you'll see similar code.

In which case could we #define this somewhere to make it more obvious?

> In a nutshell, the argument is that syscall_get_arguments() doesn't need 
> to know about any of the argument semantics, they just pass all 
> registers that may contain arguments back up the stack.  It's then up to 
> the tracer to interpret the arguments.  The argument is similar for 
> syscall_set_arguments().  Since the same register set is used for both 
> EABI and OABI, there doesn't need to be any specific handling of one 
> versus the other here.

Ok, if the low-level code doesn't need to interpret arguments then that
should be fine. sys_arm_fadvise64_64 would be the tricky case, but the
argument ordering seems to have been chosen explicitly to place the 64-bit
offsets naturally on even registers, fitting it neatly into 6 registers.

Once you've rebased the code, please post a new version so it can be
reviewed again.

Cheers,

Will

  reply	other threads:[~2012-02-21 17:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 15:37 ARM tracehook support Wade Farnsworth
2012-02-20 15:47 ` Will Deacon
2012-02-20 18:08   ` Wade Farnsworth
2012-02-21 17:06     ` Wade Farnsworth
2012-02-21 17:24       ` Will Deacon [this message]
2012-02-21 17:30         ` Russell King - ARM Linux
2012-02-21 17:27     ` Russell King - ARM Linux
2012-02-21 18:08       ` Wade Farnsworth

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=20120221172408.GJ23133@mudshark.cambridge.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).