Files
linux-stable-mirror/include/linux
Tejun Heo 643ad8388e ptrace: introduce ptrace_event_enabled() and simplify ptrace_event() and tracehook_prepare_clone()
This patch implements ptrace_event_enabled() which tests whether a
given PTRACE_EVENT_* is enabled and use it to simplify ptrace_event()
and tracehook_prepare_clone().

PT_EVENT_FLAG() macro is added which calculates PT_TRACE_* flag from
PTRACE_EVENT_*.  This is used to define PT_TRACE_* flags and by
ptrace_event_enabled() to find the matching flag.

This is used to make ptrace_event() and tracehook_prepare_clone()
simpler.

* ptrace_event() callers were responsible for providing mask to test
  whether the event was enabled.  This patch implements
  ptrace_event_enabled() and make ptrace_event() drop @mask and
  determine whether the event is enabled from @event.  Note that
  @event is constant and this conversion doesn't add runtime overhead.

  All conversions except tracehook_report_clone_complete() are
  trivial.  tracehook_report_clone_complete() used to use 0 for @mask
  (always enabled) but now tests whether the specified event is
  enabled.  This doesn't cause any behavior difference as it's
  guaranteed that the event specified by @trace is enabled.

* tracehook_prepare_clone() now only determines which event is
  applicable and use ptrace_event_enabled() for enable test.

This doesn't introduce any behavior change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
2011-06-22 19:26:28 +02:00
..
2011-05-26 19:45:40 +02:00
2011-06-01 11:36:49 +01:00
2011-05-28 17:41:46 +02:00
2011-05-31 13:45:53 +02:00
2011-05-26 17:12:34 -07:00
2011-05-26 17:12:34 -07:00
2011-05-23 10:47:06 -05:00
2011-05-29 13:03:09 +01:00
2011-05-24 10:21:29 +02:00
2011-05-24 10:21:29 +02:00
2011-05-23 13:59:54 +02:00
2011-05-26 12:03:50 -07:00
2011-05-25 20:43:32 +02:00
2011-05-26 17:12:37 -07:00
2011-05-25 08:39:52 -07:00
2011-05-24 22:55:24 +10:00
2011-05-24 14:33:35 +02:00
2011-05-29 11:32:28 -07:00
2011-05-26 17:12:36 -07:00
2011-05-29 20:54:36 +03:00
2011-05-26 17:12:34 -07:00
2011-05-26 17:12:37 -07:00
2011-05-24 12:10:51 +02:00
2011-05-25 08:39:19 -07:00
2011-06-16 21:41:54 +02:00
2011-05-24 15:22:17 +02:00
2011-05-26 13:38:58 +10:00
2011-05-30 11:14:16 +09:30