signal9:
Verify that masking SIGTRAP in tracee does not stop tracer from
catching PTRACE_LWP_CREATE breakpoint
signal10:
Verify that masking SIGTRAP in tracee does not stop tracer from
catching PTRACE_LWP_EXIT breakpoint
Both tests are broken and linked with PR kern/51918.
Sponsored by <The NetBSD Foundation>
signal8:
Verify that masking SIGTRAP in tracee does not stop tracer from
catching PTRACE_VFORK_DONE breakpoint
This test is marked as broken and linked with PR kern/51918.
Sponsored by <The NetBSD Foundation>
signal6:
Verify that masking SIGTRAP in tracee does not stop tracer from
catching PTRACE_FORK breakpoint
signal7:
Verify that masking SIGTRAP in tracee does not stop tracer from
catching PTRACE_VFORK breakpoint
signal6 fails due to PR kern/51918
signal6 fails due to PR kern/51918 and PR kern/51630
Sponsored by <The NetBSD Foundation>
signal5:
Verify that masking SIGTRAP in tracee does not stop tracer from
catching exec() breakpoint
signal5 is failing and linked with PR kern/51918
Sponsored by <The NetBSD Foundation>
signal4:
Verify that masking SIGTRAP in tracee does not stop tracer from
catching single step trap
signal4 is marked as failing and referenced with PR kern/51918.
Sponsored by <The NetBSD Foundation>
signal2:
Verify that masking SIGTRAP in tracee stops tracer from
catching this raised signal
signal3:
Verify that masking SIGTRAP in tracee does not stop tracer from
catching software breakpoints
signal3 is marked as failing and refrenced with PR kern/51918
Currently signal3 requires code for other architectures than x86_64
Sponsored by <The NetBSD Foundation>
To this end, carpattach needs to be delayed from RUMP_COMPONENT_NET to
RUMP_COMPONENT_NET_IF on rump_server. Otherwise mutex_enter via carpattach
for if_clone_mtx is called before mutex_init for it in ifinit1.
This change makes sure that the fired expected watchpoint with expected
property. It's done with PT_GET_SIGINFO and checking SIGTRAP codes.
Sponsored by <The NetBSD Foundation>
Add new field pw_type in the ptrace_watchpoint structure.
amd64 and i386 offer the current set of watchpoints as
PTRACE_PW_TYPE_DBREGS.
On other archs than x86, there are readily available different types of
hardware assisted watchpoints like for code-only or data-only registers on
ARM. Also in future there is an option to implement MMU-based watchpoints
and future per-port or per-cpu extensions.
Next step is to alter this interface on x86 to generate SIGTRAP with
si_code TRAP_HWWTRAP with additional information on occurred event:
- which watchpoint fired,
- additional watchpoint-type specific information, like on amd64 with
PTRACE_PW_TYPE_DBREGS.:
* only watchpoint fired
* watchpoint fired and single step occurred
Adjust ATF tests for the pw_type change.
Sponsored by <The NetBSD Foundation>
Add interface in ptrace(2) to track thread (LWP) events:
- birth,
- termination.
The purpose of this thread is to keep track of the current thread state in
a tracee and apply e.g. per-thread designed hardware assisted watchpoints.
This interface reuses the EVENT_MASK and PROCESS_STATE interface, and
shares it with PTRACE_FORK, PTRACE_VFORK and PTRACE_VFORK_DONE.
Change the following structure:
typedef struct ptrace_state {
int pe_report_event;
pid_t pe_other_pid;
} ptrace_state_t;
to
typedef struct ptrace_state {
int pe_report_event;
union {
pid_t _pe_other_pid;
lwpid_t _pe_lwp;
} _option;
} ptrace_state_t;
#define pe_other_pid _option._pe_other_pid
#define pe_lwp _option._pe_lwp
This keeps size of ptrace_state_t unchanged as both pid_t and lwpid_t are
defined as int32_t-like integer. This change does not break existing
prebuilt software and has minimal effect on necessity for source-code
changes. In summary, this change should be binary compatible and shouldn't
break build of existing software.
Introduce new siginfo(5) type for LWP events under the SIGTRAP signal:
TRAP_LWP. This change will help debuggers to distinguish exact source of
SIGTRAP.
Add two basic t_ptrace_wait* tests:
lwp_create1:
Verify that 1 LWP creation is intercepted by ptrace(2) with
EVENT_MASK set to PTRACE_LWP_CREATE
lwp_exit1:
Verify that 1 LWP creation is intercepted by ptrace(2) with
EVENT_MASK set to PTRACE_LWP_EXIT
All tests are passing.
Surfing the previous kernel ABI bump to 7.99.59 for PTRACE_VFORK{,_DONE}.
Sponsored by <The NetBSD Foundation>
eventmask3:
Verify that PTRACE_VFORK in EVENT_MASK is preserved
eventmask4:
Verify that PTRACE_VFORK_DONE in EVENT_MASK is preserved
Currently eventmask3 is failing and marked with PR kern/51630
Sponsored by <The NetBSD Foundation>
PTRACE_VFORK and PTRACE_VFORK_DONE are now parts of <sys/ptrace.h>.
PTRACE_VFORK tests are still failing as the support for it is currently
a stub.
Sponsored by <The NetBSD Foundation>