linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: David Drysdale <drysdale@google.com>
Cc: 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>,
	Cyril Hrubis <chrubis@suse.cz>,
	Josh Triplett <josh@joshtriplett.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>,
	Andy Lutomirski <luto@amacapital.net>,
	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>
Subject: Re: [PATCHv3 1/1] Documentation: describe how to add a system call
Date: Wed, 5 Aug 2015 18:21:31 +0200	[thread overview]
Message-ID: <20150805162131.GB16341@amd> (raw)
In-Reply-To: <1438353346-67177-2-git-send-email-drysdale@google.com>

Hi!

> Add a document describing the process of adding a new system call,
> including the need for a flags argument for future compatibility, and
> covering 32-bit/64-bit concerns (albeit in an x86-centric way).
> 
> Signed-off-by: David Drysdale <drysdale@google.com>
> Reviewed-by: Michael Kerrisk <mtk.manpages@gmail.com>
> Reviewed-by: Eric B Munson <emunson@akamai.com>
> Reviewed-by: Kees Cook <keescook@chromium.org>
> Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>  Documentation/adding-syscalls.txt | 531 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 531 insertions(+)
>  create mode 100644 Documentation/adding-syscalls.txt

We usually align documentation to less than 80 columns, afaict.

> +call.  To make sure that userspace programs can safely use flags between kernel
> +versions, check whether the flags value holds any unknown flags, and reject the
> +sycall (with EINVAL) if it does:

syscall?

> +New system call proposals, like any change to the kernel's API, should always
> +be cc'ed to linux-api@vger.kernel.org

. at and of sentence?

> +System Calls Returning Elsewhere
> +--------------------------------
> +
> +For most system calls, once the system call is complete the user program
> +continues exactly where it left off -- at the next instruction, with the same
> +stack and registers as before the system call, and with the same virtual
> +memory space.

Umm. Normally we place return value in register. And I'm not sure.. do
syscalls preserve registers that are normally caller-clobbered in the ABI?

Thanks,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  parent reply	other threads:[~2015-08-05 16:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 14:35 [PATCHv3 0/1] Document how to add a new syscall David Drysdale
2015-07-31 14:35 ` [PATCHv3 1/1] Documentation: describe how to add a system call David Drysdale
2015-07-31 15:15   ` Josh Triplett
2015-08-05 16:21   ` Pavel Machek [this message]
2015-08-10  7:43     ` 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=20150805162131.GB16341@amd \
    --to=pavel@ucw.cz \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=ast@plumgrid.com \
    --cc=chrubis@suse.cz \
    --cc=corbet@lwn.net \
    --cc=drysdale@google.com \
    --cc=emunson@akamai.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-api@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@redhat.com \
    --cc=mtk.manpages@gmail.com \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=rusty@rustcorp.com.au \
    --cc=shuahkh@osg.samsung.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vgoyal@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).