| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
| |
Co-authored-by: Marina Ciocea <marinaciocea@google.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* sys/fuchsia: add clock system calls
Renames time.txt to clock.txt
Updates `zx_clock_read` and adds new ones: `zx_clock_get_details` and
`zx_clock_update`
* sys/fuchsia: add the resource system call
* sys/fuchsia: add the smc system call
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
|
|
|
|
|
|
| |
* sys/fuchsia: msi system calls definition
* sys/fuchsia: msi handle optional in allocation
* sys/fuchsia: fixing mistake in previous commit
* sys/fuchsia: update msi
|
| |
|
| |
Co-authored-by: Marina Ciocea <marinaciocea@google.com>
|
| |
|
|
|
| |
zx_vcpu_* calls will re-appear in a new file, vcpu.txt.
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
| |
Co-authored-by: Marina Ciocea <marinaciocea@google.com>
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
|
|
|
|
| |
* sys/fuchsia: update misc system calls
Adds `ticks_get_via_kernel` and moves some from other files into misc.txt.
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
| |
Co-authored-by: Chris Palmer <palmer@google.com>
|
| |
|
|
|
|
| |
Also add a minimal resource.txt so that `zx_resource` works. The rest of
resource.fidl/.txt will be added in a pending PR.
Co-authored-by: Chris Palmer <palmer@google.com>
|
| | |
|
| |
|
|
|
|
| |
Commit empty files into generated packages,
so that the tree is buildable even w/o generated files
and Go tools continue to work.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We use strings to identify OS/Arch.
These strings are duplicated throughout the code base massively.
golangci-lint points to possiblity of typos and duplication.
We already had to define these names in pkg/csource
and disable checking for prog package. A future change triggers
such warnings in another package.
Add OS/Arch name consts to sys/targets so that they can be used
to refer to OS/Arch. Use the consts everywhere.
|
| |
|
|
|
|
|
|
|
|
| |
If a resource is never used as an input, it is not useful.
It's effectively the same as using an integer.
Detect such cases, they are quite confusing.
Fix all existing errors in descriptions.
This uncovered some interesting bugs as well,
e.g. use of a completely unrelated fd subtype after copy-paste
(while the resource that was supposed to be used there is completely unused).
|
| | |
|
| |
|
|
|
|
|
| |
This commit is the results of running:
rm sys/fuchsia/*.const sys/fuchsia/*.syz.txt
TARGETOS=fuchsia make extract
|
| |
|
|
|
|
|
| |
FIDL fuzzing hasn't been working for a while, and it's further
bit-rotted as upstream FIDL functionality has continued to evolve.
This commit updates enough FIDL functionality to get a minimal FIDL
test case to work again.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checking in the generated descriptions files makes few things simpler,
but causes pain for pull requests: (1) PRs that touch descriptions
_always_ conflict, (2) PRs are large and harder to review,
(3) people sometimes forget to add auto-generated files.
The proposed way does not require us to hardcode lots of dependencies
in the Makefile (which is nice) and seem to work.
Let's see how it works.
The main contributor-visible consequence is that the auto-generated
files do not need to be checked-in now.
Credit for figuring the Makefile magic goes to @melver.
Fixes #1291
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add prog.Ref Type that serves as a proxy for real types
and allows to deduplicate Types in generated descriptions.
The Ref type is effectively an index in an array of types.
Just before serialization pkg/compiler replaces real types
with the Ref types and prepares corresponding array of real types.
When a Target is registered in prog package, we do the opposite
operation and replace Ref's with the corresponding real types.
This brings improvements across the board:
compiler memory consumption is reduced by 15%,
test building time by 25%, descriptions size by 33%.
Before:
$ du -h sys/linux/gen
54M sys/linux/gen
$ time GOMAXPROCS=1 go test -p=1 -c ./prog
real 0m54.200s
real 0m53.883s
$ time GOMAXPROCS=1 go install -p=1 ./tools/syz-execprog
real 0m27.911s
real 0m27.767s
$ TIME="%e %P %M" GOMAXPROCS=1 time go tool compile ./sys/linux/gen
20.59 100% 3200016
20.97 100% 3445976
20.25 100% 3209684
After:
$ du -h sys/linux/gen
36M sys/linux/gen
$ time GOMAXPROCS=1 go test -p=1 -c ./prog
real 0m42.290s
real 0m43.230s
$ time GOMAXPROCS=1 go install -p=1 ./tools/syz-execprog
real 0m24.337s
real 0m24.727s
$ TIME="%e %P %M" GOMAXPROCS=1 time go tool compile ./sys/linux/gen
19.11 100% 2764952
19.66 100% 2787624
19.35 100% 2749376
Update #1580
|
| |
|
|
|
| |
We had these hard-coded for fuchsia and linux accordingly.
Replace with call attributes.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Introduce common infrastructure for describing and parsing attribute
instead of custom per-attribute code scattered across several locations.
Change align attribute syntax from the weird align_N to align[N].
This also allows to use literal constants as N.
Introduce notion of builtin constants.
Currently we have only PTR_SIZE, which is needed to replace
align_ptr with align[PTR_SIZE].
|
| |
|
|
|
|
|
|
|
|
|
| |
Make MakeMmap return more than 1 call.
This is a preparation for future changes.
Also remove addr/size as they are effectively
always the same and can be inferred from the target
(will also conflict with the future changes).
Also rename to MakeDataMmap to better represent
the new purpose: it's just some arbitrary mmap,
but rather mapping of the data segment.
|
| |
|
|
|
| |
This commit adds two new tests for fuchsia. One tests a basic syscall
(zx_cprng_draw), and the other does multiple tests over a vmo.
|
| |
|
|
|
| |
const[0x12345678, int8] is always an error, detect these cases.
Found some bugs in mptcp, socket proto and fuchsia fidl descriptions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we have:
ioctl(fd fd, cmd int32)
ioctl$FOO(fd fd, cmd const[FOO])
Currently we assume that cmd size in ioctl$FOO is sizeof(void*).
However, we know that in ioctl it's specified as int32,
so we can infer that the actual syscall size is 4.
This massively reduces sizes of socket/setsockopt/getsockopt/ioctl
and some other syscalls, which is good because we now use physical
size in mutation/hints and some other places.
This will also enable not morphing ioctl's into other ioctl's.
Update #477
Update #502
|
| |
|
|
| |
Fixes #1604
|
| | |
|
| |
|
|
|
|
|
| |
If we are going to write all values, don't write field names.
This only increases size of generated files.
The change reduces size of generated files by 5.8%
(62870496-59410354=3460142 bytes saved).
|
| |
|
|
|
|
|
| |
They can't be a bitmask. This fixes important cases
of "0, 1" and "0, 1, 2" flags. Fix some descriptions
that added 0 to bitmasks explicitly (we should do it
automatically instead).
|
| |
|
|
|
|
| |
Will simplify runtime analysis of flags.
Also just no reason to make it more deterministic
and avoid unnecessary diffs in future if values are reordered.
|
| |
|
|
|
|
|
| |
Generate const[0] for flags without values and for flags
with a single value which is 0.
This is the intention in all existing cases (e.g. an enum with types
of something, but there is really only 1 type exists).
|
| |
|
|
|
|
| |
The port-based exception APIs have been deprecated on Fuchsia and will
be removed shortly. Delete them from the syscall definitions and
modify the Fuchsia executor to use the new channel-based APIs instead.
|
| |
|
|
|
| |
Updates some paths and add zx_eventpair type definition to fix
`make extract` and `make generate`.
|
| |
|
|
| |
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* sys/fuchsia: update zx_clock_get.
zx_clock_get was deprecated and replaced by zx_clock_get_new. In a
recent CL[0], they replaced the zx_clock_get by zx_clock_get_new and
moved all client. This commit updates syzkaller to use the new function.
[0]: https://fuchsia-review.googlesource.com/c/fuchsia/+/298575
* run make extract && make generate
|
| | |
|
| |
|
|
|
|
|
|
| |
This change removes the ZX_VMO_NON_RESIZABLE flag for vmo create and the
ZX_VMO_CHILD_NON_RESIZEABLE flag from vmo create child.
The flags were removed upstream in cl:
https://fuchsia-review.googlesource.com/c/fuchsia/+/293991
|
| |
|
|
|
|
|
| |
This commit modifies the vmo_clone definition, renaming it to
vmo_create_child. This change happened in fuchsia a few weeks ago[0].
[0]: https://fuchsia-review.googlesource.com/c/fuchsia/+/272268/
|
| |
|
|
|
|
| |
This commit removes the fuchsia-power fidl definitions. The interface
doesn't have a service implementing it in fuchsia, and it is causing
issues in make extract.
|
| |
|
|
|
|
| |
Simply
make extract TARGETOS=fuchsia SOURCEDIR=<FUCHSIA_DIR>/fuchsia
|