aboutsummaryrefslogtreecommitdiffstats
path: root/sys/fuchsia
Commit message (Collapse)AuthorAgeFilesLines
...
* sys/fuchsia: update the thread system calls (#3309)Marina Ciocea2022-08-171-6/+6
| | | Co-authored-by: Marina Ciocea <marinaciocea@google.com>
* Update clock, resource and smc system calls (#3316)Dzmitry2022-08-174-18/+87
| | | | | | | | | | | * 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
* sys/fuchsia: remove nonexistent system calls (#3315)Chris Palmer2022-08-162-5/+0
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: fix msi syscall names (#3314)Chris Palmer2022-08-161-2/+2
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: msi system calls definition (#3298)Ange Albertini2022-08-151-0/+15
| | | | | | | | | * sys/fuchsia: msi system calls definition * sys/fuchsia: msi handle optional in allocation * sys/fuchsia: fixing mistake in previous commit * sys/fuchsia: update msi
* sys/fuchsia: update the vmo system calls (#3311)Marina Ciocea2022-08-152-28/+24
| | | Co-authored-by: Marina Ciocea <marinaciocea@google.com>
* sys/fuchsia: update the guest system calls (#3286)Chris Palmer2022-08-124-18/+16
| | | | | zx_vcpu_* calls will re-appear in a new file, vcpu.txt. Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: add README.md (#3310)Chris Palmer2022-08-121-0/+13
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: update task system calls (#3308)Marina Ciocea2022-08-121-1/+1
| | | Co-authored-by: Marina Ciocea <marinaciocea@google.com>
* sys/fuchsia: update the handle system calls (#3289)Chris Palmer2022-08-123-21/+37
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: update the interrupt system calls (#3290)Chris Palmer2022-08-122-7/+21
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: update the fifo system calls (#3292)Chris Palmer2022-08-122-12/+14
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: update stream definitions (#3293)Chris Palmer2022-08-122-6/+26
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: update the ioport system calls (#3294)Chris Palmer2022-08-121-0/+9
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: add the ktrace system calls (#3295)Chris Palmer2022-08-121-0/+10
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: update misc system calls (#3296)Chris Palmer2022-08-123-7/+16
| | | | | | | * 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>
* sys/fuchsia: update the futex system calls (#3285)Chris Palmer2022-08-122-9/+17
| | | Co-authored-by: Chris Palmer <palmer@google.com>
* sys/fuchsia: add the mtrace system call (#3297)Chris Palmer2022-08-112-0/+20
| | | | | | 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>
* sys/fuchsia: replace outdated fuchsia syscalls in description filesKouame Behouba Manassé2022-06-223-3/+3
|
* sys: commit empty source filesDmitry Vyukov2021-04-211-0/+6
| | | | | | Commit empty files into generated packages, so that the tree is buildable even w/o generated files and Go tools continue to work.
* all: use tool.Failf instead of local functionsDmitry Vyukov2020-12-251-13/+9
|
* sys/targets: add OS/Arch name constsDmitry Vyukov2020-10-261-1/+1
| | | | | | | | | | | | 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.
* pkg/compiler: check for unused resourcesDmitry Vyukov2020-08-045-16/+9
| | | | | | | | | | 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).
* all: fix dup types in func argsDmitry Vyukov2020-07-041-1/+1
|
* sys/fuchsia: regenerate FIDL descriptionsMatthew Dempsky2020-06-0538-785/+225
| | | | | | | This commit is the results of running: rm sys/fuchsia/*.const sys/fuchsia/*.syz.txt TARGETOS=fuchsia make extract
* sys/fuchsia: update "make extract" support codeMatthew Dempsky2020-06-055-57/+33
| | | | | | | 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.
* Makefile: generate descriptions on-the-flyDmitry Vyukov2020-04-303-20147/+0
| | | | | | | | | | | | | | | | | | 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
* pkg/compiler: deduplicate Types in descriptionsDmitry Vyukov2020-04-262-9404/+14362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* prog: add ignore_return and breaks_returns call attribtuesDmitry Vyukov2020-04-194-17/+17
| | | | | We had these hard-coded for fuchsia and linux accordingly. Replace with call attributes.
* pkg/compiler: refactor attribute handlingDmitry Vyukov2020-04-191-1/+1
| | | | | | | | | | | | 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].
* prog: refactor target.MakeMmapDmitry Vyukov2020-04-181-1/+1
| | | | | | | | | | | 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.
* sys/fuchsia: Add cprng and vmo tests.Marco Vanotti2020-03-212-0/+7
| | | | | 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.
* pkg/compiler: check that const values fit into base typeDmitry Vyukov2020-03-173-663/+894
| | | | | const[0x12345678, int8] is always an error, detect these cases. Found some bugs in mptcp, socket proto and fuchsia fidl descriptions.
* pkg/compiler: calculate more precise sizes for argumentsDmitry Vyukov2020-03-172-6/+6
| | | | | | | | | | | | | | | | | | | | 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
* tools: add script that checks copyright headersDmitry Vyukov2020-02-182-0/+6
| | | | Fixes #1604
* prog: remove unused ResourceDesc.TypeDmitry Vyukov2020-01-262-152/+152
|
* pkg/serializer: do not write field names if it won't save spaceDmitry Vyukov2020-01-262-5148/+5148
| | | | | | | 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).
* pkg/compiler: don't mark flags with 0 as bitmaskDmitry Vyukov2020-01-182-30/+30
| | | | | | | 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).
* pkg/compiler: sort flags valuesDmitry Vyukov2020-01-182-40/+40
| | | | | | 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.
* pkg/compiler: generate const[0] for flags w/o valuesDmitry Vyukov2020-01-182-6/+6
| | | | | | | 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).
* sys/fuchsia: remove deprecated exception APIsDavid Pursell2019-11-146-42/+13
| | | | | | 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.
* sys/fuchsia: fix Fuchsia extract/generateDavid Pursell2019-11-1416-1657/+1921
| | | | | Updates some paths and add zx_eventpair type definition to fix `make extract` and `make generate`.
* pkg/compiler: define fileoff templatePaul Chaignon2019-11-012-14/+14
| | | | Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
* sys/fuchsia: update socket syscallsMarco Vanotti2019-08-147-992/+25
|
* sys/fuchsia: update zx_clock_get syscall (#1292)Marco Vanotti2019-07-163-12/+5
| | | | | | | | | | | | * 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
* run make extract and make generate for fuchsiaMarco Vanotti2019-07-169-446/+135
|
* sys/fuchsia: remove RESIZEABLE flags from vmo ops.Marco Vanotti2019-07-161-2/+2
| | | | | | | | 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
* sys/fuchsia: rename vmo_clone to vmo_create_child.Marco Vanotti2019-07-161-2/+2
| | | | | | | 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/
* sys/fuchsia: remove power fidl definitions.Marco Vanotti2019-07-164-82/+0
| | | | | | 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.
* sys/fuchsia: Updating Fuchsia definitionsPascal Perez2019-05-2164-70/+756
| | | | | | Simply make extract TARGETOS=fuchsia SOURCEDIR=<FUCHSIA_DIR>/fuchsia