aboutsummaryrefslogtreecommitdiffstats
path: root/sys/netbsd/init.go
Commit message (Collapse)AuthorAgeFilesLines
* executor: surround the data mapping with PROT_NONE pagesDmitry Vyukov2020-04-181-1/+1
| | | | | | | | | | | Surround the main data mapping with PROT_NONE pages to make virtual address layout more consistent across different configurations (static/non-static build) and C repros. One observed case before: executor had a mapping above the data mapping (output region), while C repros did not have that mapping above, as the result in one case VMA had next link, while in the other it didn't and it caused a bug to not reproduce with the C repro. The bug that reproduces only with the mapping above: https://lkml.org/lkml/2020/4/17/819
* 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/linux: use PROT_EXEC for the data section mmapDmitry Vyukov2020-04-181-1/+1
| | | | | | | Turns out the mmap protection get out of sync between executor and C reproducers. C reproducers missed PROT_EXEC. Add PROT_EXEC for linux, freebsd and akaros.
* prog: rename target.SanitizeCall to NeutralizeDmitry Vyukov2020-03-171-3/+3
| | | | | | | | | | | | | We will need a wrapper for target.SanitizeCall that will do more than just calling the target-provided function. To avoid confusion and potential mistakes, give the target function and prog function different names. Prog package will continue to call this "sanitize", which will include target's "neutralize" + more. Also refactor API a bit: we need a helper function that sanitizes the whole program because that's needed most of the time. Fixes #477 Fixes #502
* sys/netbsd: use posix helper instead of copy-pasted codeDmitry Vyukov2018-08-251-19/+3
| | | | | | We now have this common logic in sys/targets, so use it instread of copy-pasted code. I missed this file during the refactoring.
* Makefile: don't compile all targets into target binariesDmitry Vyukov2018-08-021-6/+1
| | | | | | | | | | Currently target binaries contain support for all OS/arch combinations. However, obviously a fuchsia target binary won't test windows. For target binaries we need support only for a single target (with the exception of 386/arm target in amd64/arm64 binaries). So compile in only _the_ target into target binaries. This reduces akaros/amd64 fuzzer binary from 33 to 7 MB and execprog from 28 to 2 MB.
* sys: dedup mmap code across OSesDmitry Vyukov2018-05-061-35/+4
| | | | Update #538
* sys: move generate files to separate packagesDmitry Vyukov2018-05-051-0/+5
| | | | | | | | | Move generated files to gen subdir. This allows to: 1. Rebuild init.go without rebuilding generated code. 2. Excluding generated files from gometalinter checking. This makes faster and consume less memory. Update #538
* all: fix gometalinter warningsDmitry Vyukov2018-03-081-2/+1
| | | | Fix typos, non-canonical code, remove dead code, etc.
* prog: rework address allocationDmitry Vyukov2018-02-191-37/+4
| | | | | | | | | | | | 1. mmap all memory always, without explicit mmap calls in the program. This makes lots of things much easier and removes lots of code. Makes mmap not a special syscall and allows to fuzz without mmap enabled. 2. Change address assignment algorithm. Current algorithm allocates unmapped addresses too frequently and allows collisions between arguments of a single syscall. The new algorithm analyzes actual allocations in the program and places new arguments at unused locations.
* sys/netbsd: fix mmap signatureDmitry Vyukov2017-10-251-0/+1
| | | | mmap syscall has 7 arguments (one unused padding)
* Lots of changes to sys/netbsd (#397)Utkarsh Anand2017-10-251-0/+102
* Lots of changes to sys/netbsd: - Removed a few syscalls that did not have proper constants defined. - Autogenerated *.const files. - Removed a few types like uid and gid, that were not available. - Ran make generate * Few changes for NetBSD support: - Added sys/netbsd/init.go - Added netbsd to sys/sys.go * Fix order in sys/sys.go * Update documentation for NetBSD