PTRACE_EVENT_VFORK_DONE should not be reported if the tracer cleared
PTRACE_O_TRACEVFORKDONE after the tracee stopped in PTRACE_EVENT_VFORK
report. Now that we have ptrace_event->ev_options this is trivial.
ptrace_report_clone() still needs more changes. I think it is simple to
fix it now, but ca
Another test-case:
#define WEVENT(s) ((s & 0xFF) >> 16)
int main(void)
{
int pid, stat;
pid = fork();
if (!pid) {
assert(0 == ptrace(PTRACE_TRACEME, 0,0,0));
kill(getpid(),
I am a bit surprised there is nothing in ptrace-tests to check
CONT/SYSCALL behaviour. I had to write this one:
#define WEVENT(s) ((s & 0xFF) >> 16)
int main(void)
{
int pid, stat;
pid = fork();
if (!pid) {
When the tracee resumes from TASK_TRACED, context->options can be changed.
Introduce ptrace_event->ev_options. If a callback sets ->ev_options != 0,
do_ptrace_resume() checks that context->options matches or discards the
event.
This will be used to validate PTRACE_EVENT_VFORK_DONE and SYSCALL_EXI
Change ptrace_report_exec() to use ptrace_event.
Now we should fix EXEC/SYSCALL_EXIT interaction wrt PTRACE_CONT/SYSCALL.
---
kernel/ptrace.c | 44 +---
1 file changed, 25 insertions(+), 19 deletions(-)
--- PU/kernel/ptrace.c~36_REPORT_EXEC 2009-09-1
Change ptrace_report_syscall_entry() to use ptrace_event.
I am worried about PTRACE_SYSEMU, I continue to ignore this magic
which I don't understand yet... Hopefully I will be able to add the
necessary changes later.
---
kernel/ptrace.c | 57 ++-
The code still needs comments. I'll try to explain how the code should
work at least here.
struct ptrace_event {
int ev_code;
unsigned long ev_message;
resume_func_t ev_resume;
};
This represents the state of the trac
I didn't have time to finish ptrace_report_clone(), but I think
this will be simple now...
Oleg.