Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526800 > unrolled thread

Re: Formal description of system call interface

Started bySteven Rostedt <rostedt@goodmis.org>
First post2016-11-21 16:40 +0100
Last post2016-11-21 18:00 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Formal description of system call interface Steven Rostedt <rostedt@goodmis.org> - 2016-11-21 16:40 +0100
    Re: Formal description of system call interface Dmitry Vyukov <dvyukov@google.com> - 2016-11-21 16:50 +0100
      Re: Formal description of system call interface Cyril Hrubis <chrubis@suse.cz> - 2016-11-21 18:00 +0100

#1526800 — Re: Formal description of system call interface

FromSteven Rostedt <rostedt@goodmis.org>
Date2016-11-21 16:40 +0100
SubjectRe: Formal description of system call interface
Message-ID<sFYRk-2Wx-33@gated-at.bofh.it>
On Mon, 7 Nov 2016 11:38:20 +0100
Cyril Hrubis <chrubis@suse.cz> 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.

-- Steve

[toc] | [next] | [standalone]


#1526811

FromDmitry Vyukov <dvyukov@google.com>
Date2016-11-21 16:50 +0100
Message-ID<sFZ0Z-2ZM-3@gated-at.bofh.it>
In reply to#1526800
On Mon, Nov 21, 2016 at 4:37 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Mon, 7 Nov 2016 11:38:20 +0100
> Cyril Hrubis <chrubis@suse.cz> 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.

[toc] | [prev] | [next] | [standalone]


#1526915

FromCyril Hrubis <chrubis@suse.cz>
Date2016-11-21 18:00 +0100
Message-ID<sG06K-3IM-31@gated-at.bofh.it>
In reply to#1526811
Hi!
> > 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.

Logical extension would be to teach it that creat(), for instance,
returns file descriptor and creates a file as a side effect. That file
then could be used for a stat() or unlink() concurently, etc. But we
should also consider that not all file descriptors or files are equal,
so we may end up with some classes of files and file descriptors
some of them suitable for different subsets of operations.

I think that defining classes of objects and defining how syscalls
transform their state may yield something usable. But that would require
some serious thinking and a few trial and error implementations.

-- 
Cyril Hrubis
chrubis@suse.cz

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web