All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Roland McGrath <roland@hack.frob.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC][ATCH 1/3] ptrace: Remove maxargs from task_current_syscall()
Date: Tue, 8 Nov 2016 13:06:35 -0800	[thread overview]
Message-ID: <CALCETrXOTUOfq3m1fXVUv1bxmF2YKHrkEX2cuHGCAESb5Fyhpg@mail.gmail.com> (raw)
In-Reply-To: <20161108144851.7a35c37d@gandalf.local.home>

On Nov 8, 2016 11:48 AM, "Steven Rostedt" <rostedt@goodmis.org> wrote:
>
> On Tue, 8 Nov 2016 08:20:48 -0800
> Andy Lutomirski <luto@amacapital.net> wrote:
>
> > On Tue, Nov 8, 2016 at 8:16 AM, Linus Torvalds
> > <torvalds@linux-foundation.org> wrote:
> > > So I definitely approve of the change, but I wonder if we should go
> > > one step further:
> > >
> > > On Mon, Nov 7, 2016 at 1:26 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > >>
> > >>  extern int task_current_syscall(struct task_struct *target, long *callno,
> > >> -                               unsigned long args[6], unsigned int maxargs,
> > >> -                               unsigned long *sp, unsigned long *pc);
> > >> +                               unsigned long args[6], unsigned long *sp,
> > >> +                               unsigned long *pc);
> > >
> > > The thing is, in C, having an array in a function declaration is
> > > pretty much exactly the same as just having a pointer, so from a type
> > > checking standpoint it doesn't really help all that much (but from a
> > > "human documentation" side the "args[6]" is much better than "*args").
> > >
> > > However, what would really help type checking is making it a
> > > structure. And maybe that structure could just contain "callno", "sp"
> > > and "pc" too? That would not only fix the type checking, it would make
> > > the calling convention even cleaner. Just have one single structure
> > > that contains all the relevant data.
> >
> > I would propose calling this 'struct seccomp_data'.
>
> I'm assuming you mean to use the existing seccomp_data? But isn't that
> already defined as a user structure? Thus, we can't add sp and pc to it.

pc is there.  sp isn't, but that could be separate.  Or you could
embed seccomp_data in a bigger structure.

  reply	other threads:[~2016-11-08 21:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 21:26 [RFC][ATCH 0/3] sycalls: Remove args i and n from syscall_get_arguments() Steven Rostedt
2016-11-07 21:26 ` [RFC][ATCH 1/3] ptrace: Remove maxargs from task_current_syscall() Steven Rostedt
2016-11-07 23:51   ` Andy Lutomirski
2016-11-08 16:16   ` Linus Torvalds
2016-11-08 16:20     ` Andy Lutomirski
2016-11-08 19:48       ` Steven Rostedt
2016-11-08 21:06         ` Andy Lutomirski [this message]
2016-11-08 21:13           ` Steven Rostedt
2016-11-07 21:26 ` [RFC][ATCH 2/3] tracing/syscalls: Pass in hardcoded 6 into syscall_get_arguments() Steven Rostedt
2016-11-07 21:26 ` [RFC][ATCH 3/3] syscalls: Remove start and number from syscall_get_arguments() args Steven Rostedt
2016-11-07 23:54   ` Andy Lutomirski
2016-11-08 19:21     ` Steven Rostedt

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=CALCETrXOTUOfq3m1fXVUv1bxmF2YKHrkEX2cuHGCAESb5Fyhpg@mail.gmail.com \
    --to=luto@amacapital.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=roland@hack.frob.com \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.