aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2012-03-23 18:02:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:58:41 -0400
commit5cdf389aee90109e2e3d88085dea4dd5508a3be7 (patch)
treeab59bc0fef6800ea6bbe20a1828bd396094bfbf8
parentaa9147c98f27550bd39416eca5a5844e54bced26 (diff)
ptrace: renumber PTRACE_EVENT_STOP so that future new options and events can match
PTRACE_EVENT_foo and PTRACE_O_TRACEfoo used to match. New PTRACE_EVENT_STOP is the first event which has no corresponding PTRACE_O_TRACE option. If we will ever want to add another such option, its PTRACE_EVENT's value will collide with PTRACE_EVENT_STOP's value. This patch changes PTRACE_EVENT_STOP value to prevent this. While at it, added a comment - the one atop PTRACE_EVENT block, saying "Wait extended result codes for the above trace options", is not true for PTRACE_EVENT_STOP. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Cc: Tejun Heo <tj@kernel.org> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Cc: Pedro Alves <palves@redhat.com> Cc: Jan Kratochvil <jan.kratochvil@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/ptrace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 6f1260ee5be5..30be18064dfd 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -61,7 +61,8 @@
61#define PTRACE_EVENT_EXEC 4 61#define PTRACE_EVENT_EXEC 4
62#define PTRACE_EVENT_VFORK_DONE 5 62#define PTRACE_EVENT_VFORK_DONE 5
63#define PTRACE_EVENT_EXIT 6 63#define PTRACE_EVENT_EXIT 6
64#define PTRACE_EVENT_STOP 7 64/* Extended result codes which enabled by means other than options. */
65#define PTRACE_EVENT_STOP 128
65 66
66/* options set using PTRACE_SETOPTIONS */ 67/* options set using PTRACE_SETOPTIONS */
67#define PTRACE_O_TRACESYSGOOD 1 68#define PTRACE_O_TRACESYSGOOD 1