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


Groups > linux.kernel > #1526915

Re: Formal description of system call interface

From Cyril Hrubis <chrubis@suse.cz>
Newsgroups linux.kernel
Subject Re: Formal description of system call interface
Date 2016-11-21 18:00 +0100
Message-ID <sG06K-3IM-31@gated-at.bofh.it> (permalink)
References <sAEqd-308-11@gated-at.bofh.it> <sAPvj-1Se-11@gated-at.bofh.it> <sFYRk-2Wx-33@gated-at.bofh.it> <sFZ0Z-2ZM-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

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

csiph-web