linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Drysdale <drysdale@google.com>
To: 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>,
	Pavel Machek <pavel@ucw.cz>
Cc: 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>,
	David Herrmann <dh.herrmann@gmail.com>,
	Theodore Ts'o <tytso@mit.edu>, Kees Cook <keescook@chromium.org>,
	Milosz Tanski <milosz@adfin.com>, Fam Zheng <famz@redhat.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Drysdale <drysdale@google.com>
Subject: [PATCHv4 0/1] Document how to add a new syscall
Date: Mon, 10 Aug 2015 09:00:43 +0100	[thread overview]
Message-ID: <1439193644-4773-1-git-send-email-drysdale@google.com> (raw)

Given that I've gotten some of the details wrong in the past (and I've
seen others do likewise), I thought it might be helpful to collate the
best practices for adding a new system call to the kernel.

Apologies for the wide circulation -- I've tried to include folk who've
recently added or proposed a system call, as they're most likely to
have opinions on:
 - whether this a useful addition to Documentation/
 - whether the details of the advice are correct and complete.

Thanks,
David

(With thanks to Andrew Morton for looking over an initial draft, and to
Michael Kerrisk for suggesting several clarifications and additions.)


Changes since v3:
 - remove suggestion of adding new capability bit [Josh Triplett]
 - clarifications & typos [Pavel Machek]

Changes since v2:
 - add struct-with-size as option for extensibility [Ingo Molnar]
 - mention LTP and xfstests [Cyril Hrubis]
 - always use file descriptors as handles for kernel objects [Josh Triplett]
 - consider poll(2) semantics for new file descriptors [Josh Triplett]
 - use a CONFIG option to control new functionality [Josh Triplett]
 - check ptrace_may_access() for process manipulation [Josh Triplett]
 - various minor markups [Josh Triplett]

Changes since v1:
 - added paragraph on build requirements to Testing section [Shuah Khan,
   Peter Zijlstra]
 - various text clarifications [Kees Cook]
 - added Reviewed-by markers


David Drysdale (1):
  Documentation: describe how to add a system call

 Documentation/adding-syscalls.txt | 527 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 527 insertions(+)
 create mode 100644 Documentation/adding-syscalls.txt

--
2.2.0.rc0.207.ga3a616c

             reply	other threads:[~2015-08-10  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10  8:00 David Drysdale [this message]
2015-08-10  8:00 ` [PATCHv4 1/1] Documentation: describe how to add a system call David Drysdale
     [not found]   ` <1439193644-4773-2-git-send-email-drysdale-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2015-08-13 23:53     ` Jonathan Corbet

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=1439193644-4773-1-git-send-email-drysdale@google.com \
    --to=drysdale@google.com \
    --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=dh.herrmann@gmail.com \
    --cc=emunson@akamai.com \
    --cc=famz@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=josh@joshtriplett.org \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=milosz@adfin.com \
    --cc=mingo@redhat.com \
    --cc=mtk.manpages@gmail.com \
    --cc=oleg@redhat.com \
    --cc=pavel@ucw.cz \
    --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=tytso@mit.edu \
    --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).