diff options
author | Kyle McMartin <kyle@redhat.com> | 2011-01-22 13:43:13 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@redhat.com> | 2011-01-22 13:43:13 -0500 |
commit | 71f70cd13e31389b0e4c7dceedc3c624571690c3 (patch) | |
tree | 441f83e1fa0e2499c66df2c970906d413e8de5be /linux-2.6-utrace.patch | |
parent | b8f320f96d0de1aab0c6a39cb43bad99243a8bb8 (diff) | |
download | kernel-71f70cd13e31389b0e4c7dceedc3c624571690c3.tar.gz kernel-71f70cd13e31389b0e4c7dceedc3c624571690c3.tar.xz kernel-71f70cd13e31389b0e4c7dceedc3c624571690c3.zip |
utrace update
Conflicts:
kernel.spec
Diffstat (limited to 'linux-2.6-utrace.patch')
-rw-r--r-- | linux-2.6-utrace.patch | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/linux-2.6-utrace.patch b/linux-2.6-utrace.patch index c50b83ea8..366b8a176 100644 --- a/linux-2.6-utrace.patch +++ b/linux-2.6-utrace.patch @@ -35,11 +35,11 @@ Signed-off-by: Roland McGrath <roland@redhat.com> kernel/Makefile | 1 + kernel/fork.c | 3 + kernel/ptrace.c | 14 + - kernel/utrace.c | 2434 +++++++++++++++++++++++++++++++++++++ - 11 files changed, 3837 insertions(+), 2 deletions(-) + kernel/utrace.c | 2440 +++++++++++++++++++++++++++++++++++++ + 11 files changed, 3843 insertions(+), 2 deletions(-) diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile -index 34929f2..884c36b 100644 +index 8b6e00a..2740633 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml mcabook.xml de @@ -668,10 +668,10 @@ index fff6572..a67bd83 100644 if (p->files) fdt = files_fdtable(p->files); diff --git a/include/linux/sched.h b/include/linux/sched.h -index 5e7cc95..66a1ec8 100644 +index 09f26df..e6fa5e9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1339,6 +1339,11 @@ struct task_struct { +@@ -1357,6 +1357,11 @@ struct task_struct { #endif seccomp_t seccomp; @@ -684,7 +684,7 @@ index 5e7cc95..66a1ec8 100644 u32 parent_exec_id; u32 self_exec_id; diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h -index c78b2f4..71fa250 100644 +index 98917e9..afba8f8 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h @@ -49,6 +49,7 @@ @@ -1620,10 +1620,10 @@ index ...f251efe 100644 + +#endif /* linux/utrace.h */ diff --git a/init/Kconfig b/init/Kconfig -index 2de5b1c..a283086 100644 +index c972899..17483b7 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -332,6 +332,15 @@ config AUDIT_TREE +@@ -339,6 +339,15 @@ config AUDIT_TREE depends on AUDITSYSCALL select FSNOTIFY @@ -1640,7 +1640,7 @@ index 2de5b1c..a283086 100644 menu "RCU Subsystem" diff --git a/kernel/Makefile b/kernel/Makefile -index 0b72d1a..6004913 100644 +index 0b5ff08..1172528 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -70,6 +70,7 @@ obj-$(CONFIG_IKCONFIG) += configs.o @@ -1652,10 +1652,10 @@ index 0b72d1a..6004913 100644 obj-$(CONFIG_AUDITSYSCALL) += auditsc.o obj-$(CONFIG_AUDIT_WATCH) += audit_watch.o diff --git a/kernel/fork.c b/kernel/fork.c -index 98b4508..3ceff6f 100644 +index 5447dc7..10a39fe 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -161,6 +161,7 @@ void free_task(struct task_struct *tsk) +@@ -162,6 +162,7 @@ void free_task(struct task_struct *tsk) free_thread_info(tsk->stack); rt_mutex_debug_task_free(tsk); ftrace_graph_exit_task(tsk); @@ -1663,7 +1663,7 @@ index 98b4508..3ceff6f 100644 free_task_struct(tsk); } EXPORT_SYMBOL(free_task); -@@ -1008,6 +1009,8 @@ static struct task_struct *copy_process( +@@ -1018,6 +1019,8 @@ static struct task_struct *copy_process( if (!p) goto fork_out; @@ -1673,7 +1673,7 @@ index 98b4508..3ceff6f 100644 rt_mutex_init_task(p); diff --git a/kernel/ptrace.c b/kernel/ptrace.c -index 8049cb5..23bde94 100644 +index 84d9f8f..e275608 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -15,6 +15,7 @@ @@ -1720,10 +1720,10 @@ index 8049cb5..23bde94 100644 if (!current->ptrace) { diff --git a/kernel/utrace.c b/kernel/utrace.c new file mode 100644 -index ...43f38b7 100644 +index ...26d6faf 100644 --- /dev/null +++ b/kernel/utrace.c -@@ -0,0 +1,2434 @@ +@@ -0,0 +1,2440 @@ +/* + * utrace infrastructure interface for debugging user processes + * @@ -2440,8 +2440,15 @@ index ...43f38b7 100644 + /* + * If no more engines want it stopped, wake it up. + */ -+ if (task_is_traced(task) && !(flags & ENGINE_STOP)) ++ if (task_is_traced(task) && !(flags & ENGINE_STOP)) { ++ /* ++ * It just resumes, so make sure single-step ++ * is not left set. ++ */ ++ if (utrace->resume == UTRACE_RESUME) ++ user_disable_single_step(task); + utrace_wakeup(task, utrace); ++ } + + /* + * In theory spin_lock() doesn't imply rcu_read_lock(). @@ -2865,14 +2872,7 @@ index ...43f38b7 100644 + break; + + case UTRACE_RESUME: -+ /* -+ * This and all other cases imply resuming if stopped. -+ * There might not be another report before it just -+ * resumes, so make sure single-step is not left set. -+ */ + clear_engine_wants_stop(engine); -+ if (likely(reset)) -+ user_disable_single_step(target); + break; + + case UTRACE_BLOCKSTEP: @@ -3238,6 +3238,12 @@ index ...43f38b7 100644 + engine, event))) + return NULL; + ++ if (!event) { ++ /* We only got here to report QUIESCE */ ++ report->spurious = false; ++ return NULL; ++ } ++ + /* + * finish_callback() reset utrace->reporting after the + * quiesce callback. Now we set it again (as above) @@ -3253,7 +3259,7 @@ index ...43f38b7 100644 + if (want & ENGINE_STOP) + report->action = UTRACE_STOP; + -+ if (want & (event ?: UTRACE_EVENT(QUIESCE))) { ++ if (want & event) { + report->spurious = false; + return ops; + } |