Commit Graph

595 Commits

Author SHA1 Message Date
Dmitry Vyukov
4969639c7c executor: fix strict aliasing violations
test_copyin does bad things. Fix that.

executor/test.h: In function ‘int test_copyin()’:
executor/common.h:299:16: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   *(type*)(addr) = (type)(val);                                     \
                ^
2018-07-24 13:29:26 +02:00
Dmitry Vyukov
9fe4bdc5f1 executor: overhaul
Make as much code as possible shared between all OSes.
In particular main is now common across all OSes.
Make more code shared between executor and csource
(in particular, loop function and threaded execution logic).
Also make loop and threaded logic shared across all OSes.
Make more posix/unix code shared across OSes
(e.g. signal handling, pthread creation, etc).
Plus other changes along similar lines.
Also support test OS in executor (based on portable posix)
and add 4 arches that cover all execution modes
(fork server/no fork server, shmem/no shmem).

This change paves way for testing of executor code
and allows to preserve consistency across OSes and executor/csource.
2018-07-24 12:04:27 +02:00
Hangbin Liu
570df9b277 sys/linux/socket_netlink_route: add specific policies for IFLA_LINKINFO
Add interface specified policies for IFLA_LINKINFO. I only added the
interfaces we create in initial setup. Remain other types of interfaces
in the TODO list.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2018-07-17 10:08:31 +02:00
Dmitry Vyukov
1376136672 sys/akaros: add a bunch of global files for akaros 2018-07-16 20:30:09 +02:00
Dmitry Vyukov
40cb0c9aa6 sys/akaros: fix signatures of file syscalls
Most of them differ and accept path length and/or pid.
2018-07-16 17:39:58 +02:00
Dmitry Vyukov
df5ae5f537 sys/akaros: don't call provision(-1)
It causes kernel debug splat,
which has high chances of corrupting kernel crashes.
2018-07-16 17:02:02 +02:00
Dmitry Vyukov
7cfcfa6a73 sys/akaros: disable init_arsc syscall
It unconditionally crashes kernel now.
2018-07-16 16:57:35 +02:00
Dmitry Vyukov
fcdb43e97d sys/linux: regenerate files 2018-07-13 12:44:14 +02:00
Dmitry Vyukov
f642b4185a sys/linux: improve fuse descriptions 2018-07-12 12:36:38 +02:00
Dmitry Vyukov
95e7a88b97 sys/linux: implement fuse as normal syscalls
Remove syz_fuse* and implement them as normal syscalls.
We not have enough expressive power to form mount options.
2018-07-10 16:18:45 +02:00
Dmitry Vyukov
40ed7e838a sys/linux: use fmt in filesystem options
We currently generate poor formatted intergers,
generate proper integers using the new fmt type.
2018-07-09 21:42:43 +02:00
Dmitry Vyukov
59da9e4393 sys/linux: use negative consts where useful 2018-07-09 20:54:47 +02:00
Dmitry Vyukov
f25e577041 sys/linux: refine 9p descriptions
RVERSION needs to use 0xffff tag, otherwise parsing fails.
Use only tags 1 and 2. They are densely allocated,
so most of the time it's 1. And it needs to be correct in
multiple replies for mount to succeed. So limit tag space.
2018-07-08 22:52:24 +02:00
Dmitry Vyukov
4bf3b336eb sys/linux: modernize cgroup descriptions 2018-07-08 22:52:24 +02:00
Dmitry Vyukov
e63a51b4b3 sys/linux: modernize selinux descriptions 2018-07-08 22:52:24 +02:00
Dmitry Vyukov
eb5690a56d sys/linux: extend 9p descriptions
Add actual protocol messages.
2018-07-08 22:52:24 +02:00
Dmitry Vyukov
306ca0571c prog, pkg/compiler: support fmt type
fmt type allows to convert intergers and resources
to string representation.
2018-07-08 22:52:24 +02:00
Dmitry Vyukov
c9a7a4dccd executor: executor fix fuchsia build 2018-07-07 19:08:38 +02:00
Dmitry Vyukov
4b2ad42d41 sys/linux: refine vfat/msdos options 2018-07-07 16:25:40 +02:00
Julia Hansbrough
ab89aea98e sys/fuchsia: Update Fuchsia syscalls.
Updates cover
* zx_vmo_create
* zx_clock_get_monotonic
* hypervisor- and vCPU-related syscalls
* system_get_features
* some DDK syscalls
2018-07-07 13:56:36 +02:00
Dmitry Vyukov
6c0c0099a0 sys/linux: add 9p descriptions
Only mount for now.
2018-07-06 21:31:31 +02:00
Dmitry Vyukov
c8672723c6 sys/linux: update autogenerated files
"sys/linux: add mount$bpf" commit did not include these changes.
2018-07-06 20:19:58 +02:00
Dmitry Vyukov
3439016dc2 sys/akaros: add all syscalls 2018-07-06 20:19:03 +02:00
Dmitry Vyukov
9636bc933e sys/linux: add mount$bpf
Plus some minor assorted fixes.
2018-07-06 15:29:52 +02:00
Dmitry Vyukov
c219f89ca4 sys/targets: fix akaros path handling
make extract needs path to whole kernel, not just toolchains,
so assume that toolchains are in toolchains subdir in kernel.
2018-07-05 13:10:43 +02:00
Dmitry Vyukov
d225783201 sys/targets: fix akaros compiler
Remote install dir from compiler path (install dir was my invention).
Remove additional flags, the compiler now seems to know own sysroot.
2018-07-05 10:44:34 +02:00
Chi Pham
317fc8ea3e sys/linux: add rtc description 2018-07-02 17:55:41 +02:00
Dmitry Vyukov
664ef9a3e1 pkg/compiler: check for unused declarations
Error on unused structs/unions/resources/flags.
Finds tons of bugs.
2018-06-30 19:34:41 +02:00
Dmitry Vyukov
9054fae016 sys/fuchsia: remove ZX_POL_NEW_EVPAIR
It was removed from zircon.
2018-06-30 17:30:05 +02:00
Dmitry Vyukov
5012ddc8eb prog: detect when flags are a bitmask 2018-06-30 13:27:24 +02:00
Dmitry Vyukov
5739f7bef2 sys/fuchsia: add few new syscalls 2018-06-29 20:55:42 +02:00
Dmitry Vyukov
1a3c2436df sys/targets: fix fuchsia/arm64 flags 2018-06-29 10:47:04 +02:00
Dmitry Vyukov
c390949829 sys/targets: fix env expansion for fuchsia 2018-06-29 09:24:07 +02:00
Dmitry Vyukov
e0755ee02f sys/fuchsia: add pipe syscall 2018-06-29 09:23:49 +02:00
Dmitry Vyukov
c3e23de010 sys/targets: actually check -static support 2018-06-28 09:23:26 +02:00
Dmitry Vyukov
eecefab32c Makefile: fix fuchsia build 2018-06-26 18:59:07 +02:00
Dmitry Vyukov
b5f361149e sys/fuchsia: remove zx_job_set_relative_importance
It seems to be removed from zircon.
2018-06-26 18:48:45 +02:00
Dmitry Vyukov
2064fc5c91 sys/linux: add 2 custom uids
Give fuzzer 2 custom uids to mess with.
Ideally these should be proc, we can't do this for resources.
2018-06-23 11:36:55 +02:00
Dmitry Vyukov
f199f3a27d sys/linux: fix /dev/urandom descriptions
Don't use pseudo syscall without a reason.
Remove duplicate syscall.
2018-06-23 11:25:20 +02:00
Dmitry Vyukov
c31f96a8c6 executor: rework fallback coverage
We have fallback coverage implmentation for freebsd.
1. It's broken after some recent changes.
2. We need it for fuchsia, windows, akaros, linux too.
3. It's painful to work with C code.

Move fallback coverage to ipc package,
fix it and provide for all OSes.
2018-06-22 16:40:45 +02:00
Dmitry Vyukov
732e4256fb sys/linux: regenerate consts
@evdenis
2018-06-19 12:41:12 +02:00
Denis Efremov
14e96aad73 sys/linux: additional scsi_ioctls of sg device
Add previously skipped SCSI_IOCTL_* ioctls in
the sg rule.

Signed-off-by: Denis Efremov <efremov@linux.com>
2018-06-19 12:35:31 +02:00
Dmitry Vyukov
dde158e0af sys/linux: refine xdp description
Split sockaddr_xdp for bind.
Bind accepts another sock_xdp in addr.
Without the split getsockaddr "can" create sock_xdp's
because it returns generic sockaddr which contains
all addresses, including sockaddr_xdp, which in turn
contains sock_xdp.
2018-06-18 19:45:49 +02:00
Dmitry Vyukov
920b18be87 sys: mark output resources as opt
Mark output resources as opt in preparation for more
precise constructor calculation.
2018-06-18 19:45:47 +02:00
Dmitry Vyukov
b431b2cc4c sys/linux: add rseq syscall 2018-06-12 18:06:44 +02:00
Ondrej Mosnacek
112eec798f sys/linux: add missing generic crypto algs 2018-06-11 14:22:05 +03:00
Dmitry Vyukov
deb0e69e10 executor: always use errors=continue when mounting ext2/3/4
For ext2/3/4 we have to have errors=continue because the image
can contain errors=panic flag and can legally crash kernel.

Fixes #599
2018-06-11 12:12:01 +03:00
Dmitry Vyukov
866118af36 sys/linux: add udplite sockets 2018-06-08 20:51:57 +02:00
Dmitry Vyukov
721401058c sys/linux: add TCP_ZEROCOPY_RECEIVE and TCP_INQ 2018-06-08 20:40:46 +02:00
Dmitry Vyukov
09ca59bff7 sys/linux: add ip6t_srh1 description 2018-06-08 20:29:37 +02:00