Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbbGaWIl (ORCPT ); Fri, 31 Jul 2015 18:08:41 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:49801 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751168AbbGaWIj (ORCPT ); Fri, 31 Jul 2015 18:08:39 -0400 Date: Fri, 31 Jul 2015 15:08:28 -0700 From: josh@joshtriplett.org To: Andy Lutomirski Cc: Kees Cook , David Drysdale , Ingo Molnar , Linux API , Michael Kerrisk , Andrew Morton , Arnd Bergmann , Shuah Khan , Jonathan Corbet , Eric B Munson , Randy Dunlap , Andrea Arcangeli , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Oleg Nesterov , Linus Torvalds , Greg Kroah-Hartman , Al Viro , Rusty Russell , Peter Zijlstra , Vivek Goyal , Alexei Starovoitov , David Herrmann , "Theodore Ts'o" , Milosz Tanski , Fam Zheng , Mathieu Desnoyers , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Peter Zijlstra Subject: Re: [PATCHv2 1/1] Documentation: describe how to add a system call Message-ID: <20150731220828.GA30890@cloud> References: <1438242731-27756-2-git-send-email-drysdale@google.com> <20150730083831.GA22182@gmail.com> <20150730190434.GD16452@x> <20150731010234.GA7265@x> <20150731205941.GA30362@cloud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1327 Lines: 25 On Fri, Jul 31, 2015 at 02:19:29PM -0700, Andy Lutomirski wrote: > On Fri, Jul 31, 2015 at 1:59 PM, 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.) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/