lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Nov 2016 13:06:35 -0800
From:   Andy Lutomirski <luto@...capital.net>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Oleg Nesterov <oleg@...hat.com>,
        Ingo Molnar <mingo@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Roland McGrath <roland@...k.frob.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [RFC][ATCH 1/3] ptrace: Remove maxargs from task_current_syscall()

On Nov 8, 2016 11:48 AM, "Steven Rostedt" <rostedt@...dmis.org> wrote:
>
> On Tue, 8 Nov 2016 08:20:48 -0800
> Andy Lutomirski <luto@...capital.net> wrote:
>
> > On Tue, Nov 8, 2016 at 8:16 AM, Linus Torvalds
> > <torvalds@...ux-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@...dmis.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ