Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Generating Syscalls, or Holy Sweet Jesus, We Support All of FreeBSD.


The BSD systems come with a wonderful file called `syscalls.master`, If you
eat it, you gain mastery of the system calls. It looks like this:

	https://svnweb.freebsd.org/base/stable/11/sys/kern/syscalls.master?view=markup

I used it to generate an (almost) complete set of system calls for
FreeBSD, giving it the distinction of being the second platform
with full system call coverage.

	http://git.eigenstate.org/ori/sys2.git/tree/gencalls.awk

This doesn't handle converting the types of the system call arguments.
which is why I only converted FreeBSD. There's only so much pain that
you can wash away at once.

Luckily for my liver, there is a chance that the `pycparser` library that ac
pointed me to may help out with automating the type conversions too.

This should do the job for FreeBSD, OpenBSD, and NetBSD. Linux doesn't
have a syscalls.master, but because of the linuxulator, FreeBSD may have
one that I can steal for at least reasonable coverage.

OSX, as usual, is fucked. It has a syscalls.master, but tons of the useful
type info is stripped out. Half of them are just `user_addr_t`.

-- 
    Ori Bernstein