Stop using install -t as it is GNU specific. Replace it with a
portable construct.
Before reading with ptrace(2) from address 0x0, check whether
the VA0 is mappable into the process, as otherwise the ptrace(2)
call will return EINVAL.
Stop intercepting fork(2) events as they are ignored anyway.
Document PTRACE_POSIX_SPAWN events.
Use PT_SET_SIGPASS to disable notifying the parent about
uninteresting signals. The only interesting ones are crash signals,
SIGABRT and SIGSYS. Everything else is directly passed to the
traced process.
Add more mentions of NetBSD in README.md.
Correct dependency file in Makefile linux/unwind.h -> netbsd/unwind.h.
Restore removed include <sys/types.h> in netbsd/arch.c and netbsd/trace.h
and decorate it with clang-format attributes.
Do not support fuzzing forkees and vforkees. Doing so is non-trivial
in the current design of the fuzzer, as there is need to call wait(2)
function dedicated for every forkee and vforkee in a thread. In the
context of fuzzing in multiple instances of multiple processes this
means that there is need a redesign of the threading/process model
and wait(2)ing every tracee with a dedicated thread or iteration step
in a loop (perhaps try kqueue(2)/kevent(2)?).
A wait(2)-like function called for WAIT_ANY caused gathering reports
from other fuzzer-threads and in the result abnormal hangs.
While there, do not discard SIGTRAP that is emitted by user, and pass
this signal to the tracee.
Model this code after existing Linux backend and try to keep differences
to minimum.
Features and design choices, compared to the Linux code:
- capstone dependency as a disassembler
- no bfd support
- -D_KERNTYPES for register_t type
- no clone() support
- no disable ASLR switch (personality)
- no libunwind support, there is no port of HP libunwind version
- no hardware assisted profiling aid support
- traditional PT_ATTACH in place of 'seize' operation
- poll(2) detecting of signals, instead of sigtimedwait(2) which
didn't work for unknown reasons
- no cross-ABI support (i386 on amd64 host)
- currently only amd64 and i386 support
Missing or incomplete features are subject for improvement.
Tested with NetBSD/amd64 8.99.23