Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754893AbcKUPtN (ORCPT ); Mon, 21 Nov 2016 10:49:13 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37974 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754238AbcKUPtL (ORCPT ); Mon, 21 Nov 2016 10:49:11 -0500 MIME-Version: 1.0 In-Reply-To: <20161121103752.70ad1418@gandalf.local.home> References: <20161107103819.GA11374@rei.lan> <20161121103752.70ad1418@gandalf.local.home> From: Dmitry Vyukov Date: Mon, 21 Nov 2016 16:48:49 +0100 Message-ID: Subject: Re: Formal description of system call interface To: syzkaller Cc: Cyril Hrubis , Linux API , LKML , Michael Kerrisk-manpages , Thomas Gleixner , Sasha Levin , Mathieu Desnoyers , scientist@fb.com, Arnd Bergmann , "Carlos O'Donell" , Kostya Serebryany , Mike Frysinger , Dave Jones , Tavis Ormandy Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1118 Lines: 25 On Mon, Nov 21, 2016 at 4:37 PM, Steven Rostedt wrote: > On Mon, 7 Nov 2016 11:38:20 +0100 > Cyril Hrubis wrote: > > >> I'm not sure if something like this is really doable or in the scope of >> this project, but it may be worth a try. >> > > Looking ahead into the future, I was also thinking that if this becomes > robust, we could also start an integration specification, that could > describe how different system calls interact with each other. Like > open() to read(), write() and close(). > > But this is just an idea that popped in my head while reading this > thread. We want to start small first, but still could keep this in the > back of our minds for future enhancements. FWIW syzkaller does something along these lines. It has notion of 'resources' and of input/output arguments. Then it can figure out that e.g. open creates fd's, so it should be called before any reads/writes (provided that we want to pass in valid fd's). It does not have notion of "destructors" for resources (e.g. close destroys the passed in resource). But it should be easy to describe.