summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@penguin.transmeta.com>2002-10-31 20:56:34 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-10-31 20:56:34 -0800
commit32f06e3759ab748e9752b185a22c8a018e8e107a (patch)
tree31b831355fec12899a10b302d27a8ed5b4cce90b /include/linux
parent63b367a492da0daedfcb0c9065e7a96f8cbda9fc (diff)
parente7034436abd96604b8117aaa471d03bfd2d66c20 (diff)
Merge bk://nevyn.them.org:5000
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ptrace.h19
-rw-r--r--include/linux/sched.h7
2 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index a0378ef64867..c6de3a4ea70a 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -23,6 +23,23 @@
#define PTRACE_SYSCALL 24
+/* 0x4200-0x4300 are reserved for architecture-independent additions. */
+#define PTRACE_SETOPTIONS 0x4200
+#define PTRACE_GETEVENTMSG 0x4201
+
+/* options set using PTRACE_SETOPTIONS */
+#define PTRACE_O_TRACESYSGOOD 0x00000001
+#define PTRACE_O_TRACEFORK 0x00000002
+#define PTRACE_O_TRACEVFORK 0x00000004
+#define PTRACE_O_TRACECLONE 0x00000008
+#define PTRACE_O_TRACEEXEC 0x00000010
+
+/* Wait extended result codes for the above trace options. */
+#define PTRACE_EVENT_FORK 1
+#define PTRACE_EVENT_VFORK 2
+#define PTRACE_EVENT_CLONE 3
+#define PTRACE_EVENT_EXEC 4
+
#include <asm/ptrace.h>
#include <linux/sched.h>
@@ -32,6 +49,8 @@ extern int ptrace_attach(struct task_struct *tsk);
extern int ptrace_detach(struct task_struct *, unsigned int);
extern void ptrace_disable(struct task_struct *);
extern int ptrace_check_attach(struct task_struct *task, int kill);
+extern int ptrace_request(struct task_struct *child, long request, long addr, long data);
+extern void ptrace_notify(int exit_code);
extern void __ptrace_link(struct task_struct *child,
struct task_struct *new_parent);
extern void __ptrace_unlink(struct task_struct *child);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b8a2ce028fad..c233bcc90d7b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -51,6 +51,7 @@ struct exec_domain;
#define CLONE_SETTID 0x00100000 /* write the TID back to userspace */
#define CLONE_CLEARTID 0x00200000 /* clear the userspace TID */
#define CLONE_DETACHED 0x00400000 /* parent wants no child-exit signal */
+#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
/*
* List of flags we want to share for kernel threads,
@@ -389,6 +390,8 @@ struct task_struct {
void *journal_info;
struct dentry *proc_dentry;
struct backing_dev_info *backing_dev_info;
+
+ unsigned long ptrace_message;
};
extern void __put_task_struct(struct task_struct *tsk);
@@ -427,6 +430,10 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PT_DTRACE 0x00000002 /* delayed trace (used on m68k, i386) */
#define PT_TRACESYSGOOD 0x00000004
#define PT_PTRACE_CAP 0x00000008 /* ptracer can follow suid-exec */
+#define PT_TRACE_FORK 0x00000010
+#define PT_TRACE_VFORK 0x00000020
+#define PT_TRACE_CLONE 0x00000040
+#define PT_TRACE_EXEC 0x00000080
/*
* Limit the stack by to some sane default: root can always