All of lore.kernel.org
 help / color / mirror / Atom feed
From: josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org
To: Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>
Cc: Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	David Drysdale <drysdale-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Linux API <linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Michael Kerrisk
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
	Jonathan Corbet <corbet-T1hC0tSOHrs@public.gmane.org>,
	Eric B Munson <emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>,
	Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Andrea Arcangeli
	<aarcange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
	Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
	Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>,
	Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Alexei Starovoitov
	<ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>David
Subject: Re: [PATCHv2 1/1] Documentation: describe how to add a system call
Date: Fri, 31 Jul 2015 15:08:28 -0700	[thread overview]
Message-ID: <20150731220828.GA30890@cloud> (raw)
In-Reply-To: <CALCETrUkMXvFRKdTH7ekY7FyGvbKDDJbf7L0shgs5R-Hep6bVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Fri, Jul 31, 2015 at 02:19:29PM -0700, Andy Lutomirski wrote:
> On Fri, Jul 31, 2015 at 1:59 PM,  <josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org> wrote:
> > Agreed.  I think the proposal above would be a net improvement, but
> > ideally you'd want something that's annotated and generates automatic
> > marshalling code.
> >
> 
> I assume this is idle musing.  If, however, we were to actually do
> this, I'd suggest we seriously consider speaking the Cap'n Proto
> serialization format.  It's quite nice, it encodes and decodes *very*
> quickly and, unlike TLV schemes, you don't have to read it in order,
> making the read-side code less awkward.

That seems like *massive* overkill for a kernel<->userspace syscall
interface.  I was more thinking about having a few standardized marshal
types, and incrementally adding more when more patterns show up.  For a
first pass, just automatically running copy_from_user and
copy_param_struct on appropriate sets of __user parameters identified as
such in a structured text file seems quite sufficient.  (Plus
automatically generating syscalls.h from that.)

WARNING: multiple messages have this Message-ID (diff)
From: josh@joshtriplett.org
To: Andy Lutomirski <luto@amacapital.net>
Cc: Kees Cook <keescook@chromium.org>,
	David Drysdale <drysdale@google.com>,
	Ingo Molnar <mingo@kernel.org>,
	Linux API <linux-api@vger.kernel.org>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Shuah Khan <shuahkh@osg.samsung.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Eric B Munson <emunson@akamai.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Peter Zijlstra <peterz@infradead.org>,
	Vivek Goyal <vgoyal@redhat.com>,
	Alexei Starovoitov <ast@plumgrid.com>,
	David Herrmann <dh.herrmann@gmail.com>,
	"Theodore Ts'o" <tytso@mit.edu>, Milosz Tanski <milosz@adfin.com>,
	Fam Zheng <famz@redhat.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCHv2 1/1] Documentation: describe how to add a system call
Date: Fri, 31 Jul 2015 15:08:28 -0700	[thread overview]
Message-ID: <20150731220828.GA30890@cloud> (raw)
In-Reply-To: <CALCETrUkMXvFRKdTH7ekY7FyGvbKDDJbf7L0shgs5R-Hep6bVA@mail.gmail.com>

On Fri, Jul 31, 2015 at 02:19:29PM -0700, Andy Lutomirski wrote:
> On Fri, Jul 31, 2015 at 1:59 PM,  <josh@joshtriplett.org> wrote:
> > Agreed.  I think the proposal above would be a net improvement, but
> > ideally you'd want something that's annotated and generates automatic
> > marshalling code.
> >
> 
> I assume this is idle musing.  If, however, we were to actually do
> this, I'd suggest we seriously consider speaking the Cap'n Proto
> serialization format.  It's quite nice, it encodes and decodes *very*
> quickly and, unlike TLV schemes, you don't have to read it in order,
> making the read-side code less awkward.

That seems like *massive* overkill for a kernel<->userspace syscall
interface.  I was more thinking about having a few standardized marshal
types, and incrementally adding more when more patterns show up.  For a
first pass, just automatically running copy_from_user and
copy_param_struct on appropriate sets of __user parameters identified as
such in a structured text file seems quite sufficient.  (Plus
automatically generating syscalls.h from that.)

  parent reply	other threads:[~2015-07-31 22:08 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  7:52 [PATCHv2 0/1] Document how to add a new syscall David Drysdale
2015-07-30  7:52 ` David Drysdale
2015-07-30  7:52 ` [PATCHv2 1/1] Documentation: describe how to add a system call David Drysdale
2015-07-30  7:52   ` David Drysdale
2015-07-30  8:38   ` Ingo Molnar
2015-07-30  8:38     ` Ingo Molnar
     [not found]     ` <20150730083831.GA22182-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-30 11:10       ` David Drysdale
2015-07-30 11:10         ` David Drysdale
2015-07-30 18:21         ` Kees Cook
2015-07-30 18:21           ` Kees Cook
     [not found]           ` <CAGXu5j+5KHy68ELU6PmNWaj7mQBXTbRQGXqJFwsXHt9n0LPw8Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-30 19:04             ` Josh Triplett
2015-07-30 19:04               ` Josh Triplett
2015-07-30 20:03               ` Kees Cook
2015-07-30 20:03                 ` Kees Cook
2015-07-31  1:02                 ` Josh Triplett
2015-07-31  1:02                   ` Josh Triplett
2015-07-31  1:03                   ` Josh Triplett
2015-07-31  1:03                     ` Josh Triplett
2015-07-31 18:56                   ` Kees Cook
2015-07-31 18:56                     ` Kees Cook
2015-07-31 20:59                     ` josh
2015-07-31 20:59                       ` josh
2015-07-31 21:19                       ` Andy Lutomirski
2015-07-31 21:19                         ` Andy Lutomirski
     [not found]                         ` <CALCETrUkMXvFRKdTH7ekY7FyGvbKDDJbf7L0shgs5R-Hep6bVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-31 22:08                           ` josh-iaAMLnmF4UmaiuxdJuQwMA [this message]
2015-07-31 22:08                             ` josh
2015-07-31 22:54                             ` Andy Lutomirski
2015-07-31 22:54                               ` Andy Lutomirski
2015-08-01  4:32                               ` Josh Triplett
2015-08-01  4:32                                 ` Josh Triplett
2015-08-01  4:56                                 ` H. Peter Anvin
2015-08-01  4:56                                   ` H. Peter Anvin
     [not found]                                   ` <55BC518E.4010102-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2015-08-01  6:18                                     ` Josh Triplett
2015-08-01  6:18                                       ` Josh Triplett
2015-08-01  6:28                                       ` H. Peter Anvin
2015-08-01  6:28                                         ` H. Peter Anvin
2015-07-30 18:22     ` Josh Triplett
2015-07-30 18:22       ` Josh Triplett
2015-07-30 16:30   ` Cyril Hrubis
2015-07-30 16:30     ` Cyril Hrubis
2015-07-30 16:45     ` Greg Kroah-Hartman
2015-07-30 16:45       ` Greg Kroah-Hartman
2015-07-30 18:50   ` Josh Triplett
2015-07-30 18:50     ` Josh Triplett
2015-07-31  9:48     ` David Drysdale
2015-07-31  9:48       ` David Drysdale
2015-07-31 13:06       ` Josh Triplett
2015-07-31 13:06         ` Josh Triplett
2015-07-31 14:42         ` David Drysdale
2015-07-31 14:42           ` David Drysdale

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=20150731220828.GA30890@cloud \
    --to=josh-iaamlnmf4umaiuxdjuqwma@public.gmane.org \
    --cc=aarcange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org \
    --cc=corbet-T1hC0tSOHrs@public.gmane.org \
    --cc=drysdale-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
    --cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org \
    --cc=shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.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.