Re: [PATCH v3] Make PTRACE_SEIZE set ptrace options specified in'data'

From: Oleg Nesterov
Date: Fri Sep 09 2011 - 13:22:08 EST


On 09/09, Pedro Alves wrote:
>
> WTH? I'm talking about _not forcing the tracee to stop_.

The patch is trivial.

And personally I agree, this looks like a cleanup to me.

Oleg.

--- x/include/linux/ptrace.h
+++ x/include/linux/ptrace.h
@@ -199,7 +199,8 @@ static inline void ptrace_event(int even
ptrace_notify((event << 8) | SIGTRAP);
} else if (event == PTRACE_EVENT_EXEC && unlikely(current->ptrace)) {
/* legacy EXEC report via SIGTRAP */
- send_sig(SIGTRAP, current, 0);
+ if (!(current->ptrace & PT_SEIZED))
+ send_sig(SIGTRAP, current, 0);
}
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/