rpms/kernel/devel linux-2.6-utrace.patch,1.43,1.44
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Dec 13 02:20:21 UTC 2006
Author: roland
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv29401
Modified Files:
linux-2.6-utrace.patch
Log Message:
Proper utrace rebase.
linux-2.6-utrace.patch:
Documentation/utrace.txt | 579 +++++++++++
arch/alpha/kernel/asm-offsets.c | 2
arch/alpha/kernel/entry.S | 4
arch/arm/kernel/ptrace.c | 36
arch/arm26/kernel/ptrace.c | 32
arch/frv/kernel/ptrace.c | 15
arch/i386/kernel/entry.S | 7
arch/i386/kernel/i387.c | 143 +-
arch/i386/kernel/process.c | 3
arch/i386/kernel/ptrace.c | 863 +++++++++-------
arch/i386/kernel/signal.c | 37
arch/i386/kernel/vm86.c | 7
arch/ia64/ia32/ia32_entry.S | 2
arch/ia64/ia32/sys_ia32.c | 537 ++++++++++
arch/ia64/kernel/asm-offsets.c | 2
arch/ia64/kernel/fsys.S | 16
arch/ia64/kernel/mca.c | 2
arch/ia64/kernel/ptrace.c | 1680 ++++++++++++++++----------------
arch/ia64/kernel/signal.c | 4
arch/mips/kernel/ptrace.c | 21
arch/mips/kernel/sysirix.c | 2
arch/powerpc/kernel/Makefile | 4
arch/powerpc/kernel/asm-offsets.c | 2
arch/powerpc/kernel/process.c | 5
arch/powerpc/kernel/ptrace-common.h | 161 ---
arch/powerpc/kernel/ptrace.c | 959 +++++++++++-------
arch/powerpc/kernel/ptrace32.c | 436 --------
arch/powerpc/kernel/signal_32.c | 55 +
arch/powerpc/kernel/signal_64.c | 3
arch/powerpc/kernel/sys_ppc32.c | 5
arch/powerpc/lib/sstep.c | 3
arch/ppc/kernel/asm-offsets.c | 2
arch/s390/kernel/Makefile | 2
arch/s390/kernel/compat_linux.c | 3
arch/s390/kernel/compat_signal.c | 5
arch/s390/kernel/process.c | 3
arch/s390/kernel/ptrace.c | 1073 +++++++++-----------
arch/s390/kernel/signal.c | 3
arch/s390/kernel/traps.c | 6
arch/sparc64/kernel/Makefile | 2
arch/sparc64/kernel/binfmt_aout32.c | 2
arch/sparc64/kernel/entry.S | 6
arch/sparc64/kernel/process.c | 3
arch/sparc64/kernel/ptrace.c | 1224 ++++++++++++-----------
arch/sparc64/kernel/signal.c | 2
arch/sparc64/kernel/signal32.c | 2
arch/sparc64/kernel/sys_sparc32.c | 3
arch/sparc64/kernel/systbls.S | 4
arch/x86_64/ia32/fpu32.c | 92 +
arch/x86_64/ia32/ia32_aout.c | 6
arch/x86_64/ia32/ia32_signal.c | 7
arch/x86_64/ia32/ia32entry.S | 2
arch/x86_64/ia32/ptrace32.c | 723 +++++++++----
arch/x86_64/ia32/sys_ia32.c | 5
arch/x86_64/kernel/process.c | 5
arch/x86_64/kernel/ptrace.c | 657 +++++++-----
arch/x86_64/kernel/signal.c | 28
arch/x86_64/kernel/traps.c | 8
arch/x86_64/mm/fault.c | 4
drivers/connector/cn_proc.c | 4
fs/binfmt_aout.c | 6
fs/binfmt_elf.c | 6
fs/binfmt_elf_fdpic.c | 7
fs/binfmt_flat.c | 3
fs/binfmt_som.c | 2
fs/exec.c | 11
fs/proc/array.c | 12
fs/proc/base.c | 17
include/asm-i386/i387.h | 13
include/asm-i386/signal.h | 4
include/asm-i386/thread_info.h | 7
include/asm-i386/tracehook.h | 49
include/asm-ia64/elf.h | 24
include/asm-ia64/tracehook.h | 83 +
include/asm-powerpc/tracehook.h | 80 +
include/asm-s390/tracehook.h | 53 +
include/asm-sparc64/tracehook.h | 44
include/asm-x86_64/fpu32.h | 3
include/asm-x86_64/thread_info.h | 2
include/asm-x86_64/tracehook.h | 54 +
include/linux/init_task.h | 3
include/linux/ptrace.h | 224 +++-
include/linux/sched.h | 25
include/linux/tracehook.h | 707 +++++++++++++
include/linux/utrace.h | 504 +++++++++
init/Kconfig | 29
kernel/Makefile | 1
kernel/exit.c | 244 +---
kernel/fork.c | 62 -
kernel/ptrace.c | 1633 +++++++++++++++++++++++++------
kernel/signal.c | 211 ----
kernel/sys.c | 2
kernel/timer.c | 6
kernel/tsacct.c | 2
kernel/utrace.c | 1860 ++++++++++++++++++++++++++++++++++++
security/selinux/hooks.c | 54 -
security/selinux/include/objsec.h | 1
97 files changed, 10509 insertions(+), 5052 deletions(-)
Index: linux-2.6-utrace.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-utrace.patch,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- linux-2.6-utrace.patch 12 Dec 2006 15:03:47 -0000 1.43
+++ linux-2.6-utrace.patch 13 Dec 2006 02:20:19 -0000 1.44
@@ -42,14 +42,14 @@
arch/sparc64/kernel/binfmt_aout32.c | 2
arch/sparc64/kernel/entry.S | 6
arch/sparc64/kernel/process.c | 3
- arch/sparc64/kernel/ptrace.c | 1221 +++++++++++++----------
+ arch/sparc64/kernel/ptrace.c | 1224 +++++++++++++----------
arch/sparc64/kernel/signal.c | 2
arch/sparc64/kernel/signal32.c | 2
arch/sparc64/kernel/sys_sparc32.c | 3
arch/sparc64/kernel/systbls.S | 4
arch/x86_64/ia32/fpu32.c | 92 +-
arch/x86_64/ia32/ia32_aout.c | 6
- arch/x86_64/ia32/ia32_signal.c | 8
+ arch/x86_64/ia32/ia32_signal.c | 7
arch/x86_64/ia32/ia32entry.S | 2
arch/x86_64/ia32/ptrace32.c | 723 +++++++++-----
arch/x86_64/ia32/sys_ia32.c | 5
@@ -96,7 +96,7 @@
kernel/utrace.c | 1860 +++++++++++++++++++++++++++++++++++
security/selinux/hooks.c | 54 +
security/selinux/include/objsec.h | 1
- 98 files changed, 10509 insertions(+), 5050 deletions(-)
+ 98 files changed, 10509 insertions(+), 5052 deletions(-)
create mode 100644 Documentation/utrace.txt
delete arch/powerpc/kernel/ptrace-common.h
delete arch/powerpc/kernel/ptrace32.c
@@ -314,7 +314,7 @@
+#endif /* asm/tracehook.h */
--- linux-2.6/include/asm-i386/i387.h.utrace-ptrace-compat
+++ linux-2.6/include/asm-i386/i387.h
-@@ -126,17 +126,12 @@ extern int save_i387( struct _fpstate __
+@@ -129,17 +129,12 @@ extern int save_i387( struct _fpstate __
extern int restore_i387( struct _fpstate __user *buf );
/*
@@ -352,7 +352,7 @@
#endif /* __KERNEL__ */
--- linux-2.6/include/asm-i386/thread_info.h.utrace-ptrace-compat
+++ linux-2.6/include/asm-i386/thread_info.h
-@@ -135,13 +135,13 @@ static inline struct thread_info *curren
+@@ -127,13 +127,13 @@ static inline struct thread_info *curren
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */
#define TIF_IRET 5 /* return with iret */
@@ -367,7 +367,7 @@
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
-@@ -149,17 +149,16 @@ static inline struct thread_info *curren
+@@ -141,17 +141,16 @@ static inline struct thread_info *curren
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
#define _TIF_IRET (1<<TIF_IRET)
@@ -629,7 +629,7 @@
+#endif
--- linux-2.6/include/linux/sched.h.utrace-ptrace-compat
+++ linux-2.6/include/linux/sched.h
-@@ -779,7 +779,6 @@ struct task_struct {
+@@ -803,7 +803,6 @@ struct task_struct {
struct thread_info *thread_info;
atomic_t usage;
unsigned long flags; /* per process flags, defined below */
@@ -637,7 +637,7 @@
int lock_depth; /* BKL lock depth */
-@@ -811,12 +810,6 @@ struct task_struct {
+@@ -835,12 +834,6 @@ struct task_struct {
#endif
struct list_head tasks;
@@ -650,7 +650,7 @@
struct mm_struct *mm, *active_mm;
-@@ -836,15 +829,13 @@ struct task_struct {
+@@ -860,15 +853,13 @@ struct task_struct {
unsigned long stack_canary;
#endif
/*
@@ -668,7 +668,7 @@
*/
struct list_head children; /* list of my children */
struct list_head sibling; /* linkage in my parent's children list */
-@@ -927,6 +918,11 @@ struct task_struct {
+@@ -951,6 +942,11 @@ struct task_struct {
struct audit_context *audit_context;
seccomp_t seccomp;
@@ -680,7 +680,7 @@
/* Thread group tracking */
u32 parent_exec_id;
u32 self_exec_id;
-@@ -980,8 +976,6 @@ struct task_struct {
+@@ -1004,8 +1000,6 @@ struct task_struct {
struct io_context *io_context;
@@ -689,7 +689,7 @@
/*
* current io wait handle: wait queue entry to use for io waits
* If this thread is processing aio, this points at the waitqueue
-@@ -1016,6 +1010,10 @@ struct task_struct {
+@@ -1041,6 +1035,10 @@ struct task_struct {
atomic_t fs_excl; /* holding fs exclusive resources */
struct rcu_head rcu;
@@ -700,9 +700,9 @@
/*
* cache last used pipe for splice
*/
-@@ -1290,6 +1288,7 @@ extern int __kill_pg_info(int sig, struc
+@@ -1331,6 +1329,7 @@ extern int kill_pid(struct pid *pid, int
+ extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
extern int kill_pg_info(int, struct siginfo *, pid_t);
- extern int kill_proc_info(int, struct siginfo *, pid_t);
extern void do_notify_parent(struct task_struct *, int);
+extern void do_notify_parent_cldstop(struct task_struct *, int);
extern void force_sig(int, struct task_struct *);
@@ -1457,7 +1457,7 @@
#ifndef force_successful_syscall_return
--- linux-2.6/include/linux/init_task.h.utrace-ptrace-compat
+++ linux-2.6/include/linux/init_task.h
-@@ -109,9 +109,6 @@ extern struct group_info init_groups;
+@@ -111,9 +111,6 @@ extern struct group_info init_groups;
.ioprio = 0, \
.time_slice = HZ, \
.tasks = LIST_HEAD_INIT(tsk.tasks), \
@@ -2810,7 +2810,7 @@
}
static int selinux_capget(struct task_struct *target, kernel_cap_t *effective,
-@@ -1806,12 +1800,24 @@ static void selinux_bprm_apply_creds(str
+@@ -1809,12 +1803,24 @@ static void selinux_bprm_apply_creds(str
/* Check for ptracing, and update the task SID if ok.
Otherwise, leave SID unchanged and kill. */
if (unsafe & (LSM_UNSAFE_PTRACE | LSM_UNSAFE_PTRACE_CAP)) {
@@ -2841,7 +2841,7 @@
}
}
tsec->sid = sid;
-@@ -2705,11 +2711,6 @@ static int selinux_task_alloc_security(s
+@@ -2708,11 +2714,6 @@ static int selinux_task_alloc_security(s
tsec2->keycreate_sid = tsec1->keycreate_sid;
tsec2->sockcreate_sid = tsec1->sockcreate_sid;
@@ -2853,7 +2853,7 @@
return 0;
}
-@@ -4461,6 +4462,7 @@ static int selinux_setprocattr(struct ta
+@@ -4464,6 +4465,7 @@ static int selinux_setprocattr(struct ta
char *name, void *value, size_t size)
{
struct task_security_struct *tsec;
@@ -2861,7 +2861,7 @@
u32 sid = 0;
int error;
char *str = value;
-@@ -4549,18 +4551,24 @@ static int selinux_setprocattr(struct ta
+@@ -4552,18 +4554,24 @@ static int selinux_setprocattr(struct ta
/* Check for ptracing, and update the task SID if ok.
Otherwise, leave SID unchanged and fail. */
task_lock(p);
@@ -2891,16 +2891,16 @@
}
--- linux-2.6/kernel/fork.c.utrace-ptrace-compat
+++ linux-2.6/kernel/fork.c
-@@ -37,7 +37,7 @@
- #include <linux/jiffies.h>
+@@ -38,7 +38,7 @@
#include <linux/futex.h>
+ #include <linux/task_io_accounting_ops.h>
#include <linux/rcupdate.h>
-#include <linux/ptrace.h>
+#include <linux/tracehook.h>
#include <linux/mount.h>
#include <linux/audit.h>
#include <linux/profile.h>
-@@ -916,8 +916,7 @@ static inline void copy_flags(unsigned l
+@@ -919,8 +919,7 @@ static inline void copy_flags(unsigned l
new_flags &= ~(PF_SUPERPRIV | PF_NOFREEZE);
new_flags |= PF_FORKNOEXEC;
@@ -2910,7 +2910,7 @@
p->flags = new_flags;
}
-@@ -1028,6 +1027,9 @@ static struct task_struct *copy_process(
+@@ -1031,6 +1030,9 @@ static struct task_struct *copy_process(
INIT_LIST_HEAD(&p->sibling);
p->vfork_done = NULL;
spin_lock_init(&p->alloc_lock);
@@ -2920,7 +2920,7 @@
clear_tsk_thread_flag(p, TIF_SIGPENDING);
init_sigpending(&p->pending);
-@@ -1164,8 +1166,6 @@ static struct task_struct *copy_process(
+@@ -1168,8 +1170,6 @@ static struct task_struct *copy_process(
*/
p->group_leader = p;
INIT_LIST_HEAD(&p->thread_group);
@@ -2929,7 +2929,7 @@
/* Perform scheduler related setup. Assign this task to a CPU. */
sched_fork(p, clone_flags);
-@@ -1192,10 +1192,9 @@ static struct task_struct *copy_process(
+@@ -1196,10 +1196,9 @@ static struct task_struct *copy_process(
/* CLONE_PARENT re-uses the old parent */
if (clone_flags & (CLONE_PARENT|CLONE_THREAD))
@@ -2942,7 +2942,7 @@
spin_lock(¤t->sighand->siglock);
-@@ -1237,8 +1236,7 @@ static struct task_struct *copy_process(
+@@ -1241,8 +1240,7 @@ static struct task_struct *copy_process(
if (likely(p->pid)) {
add_parent(p);
@@ -2952,7 +2952,7 @@
if (thread_group_leader(p)) {
p->signal->tty = current->signal->tty;
-@@ -1321,22 +1319,6 @@ struct task_struct * __devinit fork_idle
+@@ -1325,22 +1323,6 @@ struct task_struct * __devinit fork_idle
return task;
}
@@ -2975,7 +2975,7 @@
/*
* Ok, this is the main fork-routine.
*
-@@ -1351,18 +1333,12 @@ long do_fork(unsigned long clone_flags,
+@@ -1355,18 +1337,12 @@ long do_fork(unsigned long clone_flags,
int __user *child_tidptr)
{
struct task_struct *p;
@@ -2994,7 +2994,7 @@
p = copy_process(clone_flags, stack_start, regs, stack_size, parent_tidptr, child_tidptr, nr);
/*
-@@ -1377,30 +1353,26 @@ long do_fork(unsigned long clone_flags,
+@@ -1381,30 +1357,26 @@ long do_fork(unsigned long clone_flags,
init_completion(&vfork);
}
@@ -3044,8 +3044,8 @@
+#include <linux/tracehook.h>
#include <linux/signal.h>
#include <linux/capability.h>
- #include <asm/param.h>
-@@ -160,12 +160,6 @@ static int sig_ignored(struct task_struc
+ #include <linux/freezer.h>
+@@ -164,12 +164,6 @@ static int sig_ignored(struct task_struc
void __user * handler;
/*
@@ -3058,7 +3058,7 @@
* Blocked signals are never ignored, since the
* signal handler may change by the time it is
* unblocked.
-@@ -175,8 +169,12 @@ static int sig_ignored(struct task_struc
+@@ -179,8 +173,12 @@ static int sig_ignored(struct task_struc
/* Is it explicitly or implicitly ignored? */
handler = t->sighand->action[sig-1].sa.sa_handler;
@@ -3073,7 +3073,7 @@
}
/*
-@@ -216,7 +214,8 @@ fastcall void recalc_sigpending_tsk(stru
+@@ -220,7 +218,8 @@ fastcall void recalc_sigpending_tsk(stru
if (t->signal->group_stop_count > 0 ||
(freezing(t)) ||
PENDING(&t->pending, &t->blocked) ||
@@ -3083,7 +3083,7 @@
set_tsk_thread_flag(t, TIF_SIGPENDING);
else
clear_tsk_thread_flag(t, TIF_SIGPENDING);
-@@ -594,8 +593,6 @@ static int check_kill_permission(int sig
+@@ -598,8 +597,6 @@ static int check_kill_permission(int sig
return error;
}
@@ -3092,7 +3092,7 @@
/*
* Handle magic process-wide effects of stop/continue signals.
-@@ -901,7 +898,7 @@ __group_complete_signal(int sig, struct
+@@ -905,7 +902,7 @@ __group_complete_signal(int sig, struct
*/
if (sig_fatal(p, sig) && !(p->signal->flags & SIGNAL_GROUP_EXIT) &&
!sigismember(&t->real_blocked, sig) &&
@@ -3101,7 +3101,7 @@
/*
* This signal will be fatal to the whole group.
*/
-@@ -1480,8 +1477,7 @@ void do_notify_parent(struct task_struct
+@@ -1483,8 +1480,7 @@ void do_notify_parent(struct task_struct
/* do_notify_parent_cldstop should have been called instead. */
BUG_ON(tsk->state & (TASK_STOPPED|TASK_TRACED));
@@ -3111,7 +3111,7 @@
info.si_signo = sig;
info.si_errno = 0;
-@@ -1506,7 +1502,7 @@ void do_notify_parent(struct task_struct
+@@ -1509,7 +1505,7 @@ void do_notify_parent(struct task_struct
psig = tsk->parent->sighand;
spin_lock_irqsave(&psig->siglock, flags);
@@ -3120,7 +3120,7 @@
(psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN ||
(psig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT))) {
/*
-@@ -1534,20 +1530,13 @@ void do_notify_parent(struct task_struct
+@@ -1537,20 +1533,13 @@ void do_notify_parent(struct task_struct
spin_unlock_irqrestore(&psig->siglock, flags);
}
@@ -3142,7 +3142,7 @@
info.si_signo = SIGCHLD;
info.si_errno = 0;
info.si_pid = tsk->pid;
-@@ -1572,6 +1561,15 @@ static void do_notify_parent_cldstop(str
+@@ -1575,6 +1564,15 @@ static void do_notify_parent_cldstop(str
BUG();
}
@@ -3158,7 +3158,7 @@
sighand = parent->sighand;
spin_lock_irqsave(&sighand->siglock, flags);
if (sighand->action[SIGCHLD-1].sa.sa_handler != SIG_IGN &&
-@@ -1584,110 +1582,6 @@ static void do_notify_parent_cldstop(str
+@@ -1587,110 +1585,6 @@ static void do_notify_parent_cldstop(str
spin_unlock_irqrestore(&sighand->siglock, flags);
}
@@ -3269,7 +3269,7 @@
static void
finish_stop(int stop_count)
{
-@@ -1696,7 +1590,7 @@ finish_stop(int stop_count)
+@@ -1699,7 +1593,7 @@ finish_stop(int stop_count)
* a group stop in progress and we are the last to stop,
* report to the parent. When ptraced, every thread reports itself.
*/
@@ -3278,7 +3278,7 @@
read_lock(&tasklist_lock);
do_notify_parent_cldstop(current, CLD_STOPPED);
read_unlock(&tasklist_lock);
-@@ -1821,44 +1715,24 @@ relock:
+@@ -1824,44 +1718,24 @@ relock:
handle_group_stop())
goto relock;
@@ -3339,7 +3339,7 @@
if (ka->sa.sa_handler == SIG_IGN) /* Do nothing. */
continue;
if (ka->sa.sa_handler != SIG_DFL) {
-@@ -1903,7 +1777,7 @@ relock:
+@@ -1910,7 +1784,7 @@ relock:
spin_lock_irq(¤t->sighand->siglock);
}
@@ -3348,7 +3348,7 @@
/* It released the siglock. */
goto relock;
}
-@@ -1930,13 +1804,13 @@ relock:
+@@ -1937,13 +1811,13 @@ relock:
* first and our do_group_exit call below will use
* that value and ignore the one we pass it.
*/
@@ -3364,7 +3364,7 @@
/* NOTREACHED */
}
spin_unlock_irq(¤t->sighand->siglock);
-@@ -1949,7 +1823,6 @@ EXPORT_SYMBOL(flush_signals);
+@@ -1956,7 +1830,6 @@ EXPORT_SYMBOL(flush_signals);
EXPORT_SYMBOL(force_sig);
EXPORT_SYMBOL(kill_pg);
EXPORT_SYMBOL(kill_proc);
@@ -3396,8 +3396,8 @@
+#include <asm/tracehook.h>
+
+
-+static kmem_cache_t *utrace_cachep;
-+static kmem_cache_t *utrace_engine_cachep;
++static struct kmem_cache *utrace_cachep;
++static struct kmem_cache *utrace_engine_cachep;
+
+static int __init
+utrace_init(void)
@@ -5269,7 +5269,7 @@
__exit_signal(p);
/*
-@@ -221,10 +221,10 @@ static int will_become_orphaned_pgrp(int
+@@ -220,10 +221,10 @@ static int will_become_orphaned_pgrp(int
do_each_task_pid(pgrp, PIDTYPE_PGID, p) {
if (p == ignored_task
|| p->exit_state
@@ -5283,7 +5283,7 @@
ret = 0;
break;
}
-@@ -274,11 +274,9 @@ static void reparent_to_init(void)
+@@ -273,11 +274,9 @@ static void reparent_to_init(void)
{
write_lock_irq(&tasklist_lock);
@@ -5295,7 +5295,7 @@
add_parent(current);
/* Set the exit signal to SIGCHLD so we signal init on exit */
-@@ -597,11 +596,11 @@ choose_new_parent(struct task_struct *p,
+@@ -591,11 +590,11 @@ choose_new_parent(struct task_struct *p,
* the parent is not a zombie.
*/
BUG_ON(p == reaper || reaper->exit_state);
@@ -5309,7 +5309,7 @@
{
/* We don't want people slaying init. */
if (p->exit_signal != -1)
-@@ -612,35 +611,14 @@ reparent_thread(struct task_struct *p, s
+@@ -606,35 +605,14 @@ reparent_thread(struct task_struct *p, s
group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p);
/* Move the child from its dying parent to the new one. */
@@ -5352,8 +5352,8 @@
/*
* process group orphan check
-@@ -666,7 +644,7 @@ reparent_thread(struct task_struct *p, s
- * the global child reaper process (ie "init")
+@@ -662,7 +640,7 @@ reparent_thread(struct task_struct *p, s
+ * space.
*/
static void
-forget_original_parent(struct task_struct *father, struct list_head *to_release)
@@ -5361,7 +5361,7 @@
{
struct task_struct *p, *reaper = father;
struct list_head *_p, *_n;
-@@ -679,48 +657,10 @@ forget_original_parent(struct task_struc
+@@ -675,48 +653,10 @@ forget_original_parent(struct task_struc
}
} while (reaper->exit_state);
@@ -5411,7 +5411,7 @@
}
}
-@@ -732,7 +672,8 @@ static void exit_notify(struct task_stru
+@@ -728,7 +668,8 @@ static void exit_notify(struct task_stru
{
int state;
struct task_struct *t;
@@ -5421,7 +5421,7 @@
if (signal_pending(tsk) && !(tsk->signal->flags & SIGNAL_GROUP_EXIT)
&& !thread_group_empty(tsk)) {
-@@ -768,10 +709,8 @@ static void exit_notify(struct task_stru
+@@ -764,10 +705,8 @@ static void exit_notify(struct task_stru
* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
@@ -5433,7 +5433,7 @@
/*
* Check to see if any process groups have become orphaned
-@@ -783,7 +722,7 @@ static void exit_notify(struct task_stru
+@@ -779,7 +718,7 @@ static void exit_notify(struct task_stru
* is about to become orphaned.
*/
@@ -5441,8 +5441,8 @@
+ t = tsk->parent;
if ((process_group(t) != process_group(tsk)) &&
- (t->signal->session == tsk->signal->session) &&
-@@ -815,32 +754,18 @@ static void exit_notify(struct task_stru
+ (process_session(t) == process_session(tsk)) &&
+@@ -811,32 +750,18 @@ static void exit_notify(struct task_stru
&& !capable(CAP_KILL))
tsk->exit_signal = SIGCHLD;
@@ -5480,9 +5480,9 @@
/* If the process is dead, release it - nobody will wait for it */
if (state == EXIT_DEAD)
-@@ -865,10 +790,7 @@ fastcall NORET_TYPE void do_exit(long co
- if (unlikely(tsk == child_reaper))
- panic("Attempted to kill init!");
+@@ -864,10 +789,7 @@ fastcall NORET_TYPE void do_exit(long co
+ }
+
- if (unlikely(current->ptrace & PT_TRACE_EXIT)) {
- current->ptrace_message = code;
@@ -5492,7 +5492,7 @@
/*
* We're taking recursive faults here in do_exit. Safest is to just
-@@ -885,6 +807,8 @@ fastcall NORET_TYPE void do_exit(long co
+@@ -884,6 +806,8 @@ fastcall NORET_TYPE void do_exit(long co
tsk->flags |= PF_EXITING;
@@ -5501,7 +5501,7 @@
if (unlikely(in_atomic()))
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
current->comm, current->pid,
-@@ -1040,10 +964,9 @@ static int eligible_child(pid_t pid, int
+@@ -1037,10 +961,9 @@ static int eligible_child(pid_t pid, int
}
/*
@@ -5514,7 +5514,7 @@
return 0;
/* Wait for all children (clone and not) if __WALL is set;
-@@ -1114,7 +1037,7 @@ static int wait_task_zombie(struct task_
+@@ -1111,7 +1034,7 @@ static int wait_task_zombie(struct task_
if (unlikely(p->exit_state != EXIT_ZOMBIE))
return 0;
@@ -5523,7 +5523,7 @@
return 0;
get_task_struct(p);
read_unlock(&tasklist_lock);
-@@ -1138,15 +1061,9 @@ static int wait_task_zombie(struct task_
+@@ -1135,15 +1058,9 @@ static int wait_task_zombie(struct task_
BUG_ON(state != EXIT_DEAD);
return 0;
}
@@ -5541,7 +5541,7 @@
struct signal_struct *psig;
struct signal_struct *sig;
-@@ -1228,28 +1145,8 @@ static int wait_task_zombie(struct task_
+@@ -1225,28 +1142,8 @@ static int wait_task_zombie(struct task_
return retval;
}
retval = p->pid;
@@ -5572,7 +5572,7 @@
BUG_ON(!retval);
return retval;
}
-@@ -1268,7 +1165,7 @@ static int wait_task_stopped(struct task
+@@ -1265,7 +1162,7 @@ static int wait_task_stopped(struct task
if (!p->exit_code)
return 0;
@@ -5581,7 +5581,7 @@
p->signal && p->signal->group_stop_count > 0)
/*
* A group stop is in progress and this is the group leader.
-@@ -1289,14 +1186,13 @@ static int wait_task_stopped(struct task
+@@ -1286,14 +1183,13 @@ static int wait_task_stopped(struct task
if (unlikely(noreap)) {
pid_t pid = p->pid;
uid_t uid = p->uid;
@@ -5598,7 +5598,7 @@
infop, ru);
}
-@@ -1352,9 +1248,7 @@ bail_ref:
+@@ -1349,9 +1245,7 @@ bail_ref:
if (!retval && infop)
retval = put_user(0, &infop->si_errno);
if (!retval && infop)
@@ -5609,7 +5609,7 @@
if (!retval && infop)
retval = put_user(exit_code, &infop->si_status);
if (!retval && infop)
-@@ -1422,22 +1316,6 @@ static int wait_task_continued(struct ta
+@@ -1419,22 +1313,6 @@ static int wait_task_continued(struct ta
}
@@ -5632,7 +5632,7 @@
static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
int __user *stat_addr, struct rusage __user *ru)
{
-@@ -1469,26 +1347,17 @@ repeat:
+@@ -1466,26 +1344,17 @@ repeat:
switch (p->state) {
case TASK_TRACED:
@@ -5663,7 +5663,7 @@
continue;
retval = wait_task_stopped(p, ret == 2,
(options & WNOWAIT),
-@@ -1513,6 +1382,10 @@ repeat:
+@@ -1510,6 +1379,10 @@ repeat:
goto check_continued;
if (!likely(options & WEXITED))
continue;
@@ -5674,7 +5674,7 @@
retval = wait_task_zombie(
p, (options & WNOWAIT),
infop, stat_addr, ru);
-@@ -1529,6 +1402,8 @@ check_continued:
+@@ -1526,6 +1399,8 @@ check_continued:
flag = 1;
if (!unlikely(options & WCONTINUED))
continue;
@@ -5683,7 +5683,7 @@
retval = wait_task_continued(
p, (options & WNOWAIT),
infop, stat_addr, ru);
-@@ -1537,16 +1412,15 @@ check_continued:
+@@ -1534,16 +1409,15 @@ check_continued:
break;
}
}
@@ -5708,7 +5708,7 @@
if (options & __WNOTHREAD)
break;
tsk = next_thread(tsk);
-@@ -1570,7 +1444,7 @@ end:
+@@ -1567,7 +1441,7 @@ end:
remove_wait_queue(¤t->signal->wait_chldexit,&wait);
if (infop) {
if (retval > 0)
@@ -5726,11 +5726,11 @@
- if (p->real_parent == group_leader) {
+ if (p->parent == group_leader) {
err = -EPERM;
- if (p->signal->session != group_leader->signal->session)
+ if (process_session(p) != process_session(group_leader))
goto out;
--- linux-2.6/kernel/timer.c.utrace-ptrace-compat
+++ linux-2.6/kernel/timer.c
-@@ -1104,9 +1104,9 @@ asmlinkage long sys_getpid(void)
+@@ -1242,9 +1242,9 @@ asmlinkage long sys_getpid(void)
}
/*
@@ -5742,7 +5742,7 @@
* release_task()->call_rcu(delayed_put_task_struct).
*/
asmlinkage long sys_getppid(void)
-@@ -1114,7 +1114,7 @@ asmlinkage long sys_getppid(void)
+@@ -1252,7 +1252,7 @@ asmlinkage long sys_getppid(void)
int pid;
rcu_read_lock();
@@ -7525,7 +7525,7 @@
# According to Alan Modra <alan at linuxcare.com.au>, the -fno-omit-frame-pointer is
--- linux-2.6/fs/binfmt_elf_fdpic.c.utrace-ptrace-compat
+++ linux-2.6/fs/binfmt_elf_fdpic.c
-@@ -421,13 +421,6 @@ static int load_elf_fdpic_binary(struct
+@@ -418,13 +418,6 @@ static int load_elf_fdpic_binary(struct
entryaddr = interp_params.entry_addr ?: exec_params.entry_addr;
start_thread(regs, entryaddr, current->mm->start_stack);
@@ -7642,9 +7642,9 @@
p->uid, p->euid, p->suid, p->fsuid,
p->gid, p->egid, p->sgid, p->fsgid);
-@@ -390,7 +396,7 @@ static int do_task_stat(struct task_stru
+@@ -383,7 +389,7 @@ static int do_task_stat(struct task_stru
- sid = sig->session;
+ sid = signal_session(sig);
pgid = process_group(task);
- ppid = rcu_dereference(task->real_parent)->tgid;
+ ppid = rcu_dereference(task->parent)->tgid;
@@ -7680,7 +7680,7 @@
--- linux-2.6/fs/binfmt_elf.c.utrace-ptrace-compat
+++ linux-2.6/fs/binfmt_elf.c
-@@ -1015,12 +1015,6 @@ static int load_elf_binary(struct linux_
+@@ -1019,12 +1019,6 @@ static int load_elf_binary(struct linux_
#endif
start_thread(regs, elf_entry, bprm->p);
@@ -7695,7 +7695,7 @@
kfree(loc);
--- linux-2.6/fs/exec.c.utrace-ptrace-compat
+++ linux-2.6/fs/exec.c
-@@ -41,7 +41,7 @@
+@@ -42,7 +42,7 @@
#include <linux/module.h>
#include <linux/namei.h>
#include <linux/proc_fs.h>
@@ -7704,7 +7704,7 @@
#include <linux/mount.h>
#include <linux/security.h>
#include <linux/syscalls.h>
-@@ -954,13 +954,7 @@ EXPORT_SYMBOL(prepare_binprm);
+@@ -955,13 +955,7 @@ EXPORT_SYMBOL(prepare_binprm);
static int unsafe_exec(struct task_struct *p)
{
@@ -7719,7 +7719,7 @@
if (atomic_read(&p->fs->count) > 1 ||
atomic_read(&p->files->count) > 1 ||
atomic_read(&p->sighand->count) > 1)
-@@ -1085,6 +1079,7 @@ int search_binary_handler(struct linux_b
+@@ -1086,6 +1080,7 @@ int search_binary_handler(struct linux_b
bprm->file = NULL;
current->did_exec = 1;
proc_exec_connector(current);
@@ -7742,7 +7742,7 @@
--- linux-2.6/init/Kconfig.utrace-ptrace-compat
+++ linux-2.6/init/Kconfig
-@@ -560,6 +560,35 @@ config STOP_MACHINE
+@@ -569,6 +569,35 @@ config STOP_MACHINE
Need stop_machine() primitive.
endmenu
@@ -8030,7 +8030,7 @@
#include <linux/elf.h>
#include <asm/processor.h>
#include <asm/ucontext.h>
-@@ -385,16 +385,6 @@ static int setup_frame(int sig, struct k
+@@ -383,16 +383,6 @@ static int setup_frame(int sig, struct k
regs->xss = __USER_DS;
regs->xcs = __USER_CS;
@@ -8047,7 +8047,7 @@
#if DEBUG_SIG
printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
current->comm, current->pid, frame, regs->eip, frame->pretcode);
-@@ -479,16 +469,6 @@ static int setup_rt_frame(int sig, struc
+@@ -477,16 +467,6 @@ static int setup_rt_frame(int sig, struc
regs->xss = __USER_DS;
regs->xcs = __USER_CS;
@@ -8064,7 +8064,7 @@
#if DEBUG_SIG
printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
current->comm, current->pid, frame, regs->eip, frame->pretcode);
-@@ -533,14 +513,12 @@ handle_signal(unsigned long sig, siginfo
+@@ -531,14 +511,12 @@ handle_signal(unsigned long sig, siginfo
}
/*
@@ -8081,7 +8081,7 @@
/* Set up the stack frame */
if (ka->sa.sa_flags & SA_SIGINFO)
-@@ -555,6 +533,15 @@ handle_signal(unsigned long sig, siginfo
+@@ -553,6 +531,15 @@ handle_signal(unsigned long sig, siginfo
sigaddset(¤t->blocked,sig);
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
@@ -8099,7 +8099,7 @@
return ret;
--- linux-2.6/arch/i386/kernel/vm86.c.utrace-ptrace-compat
+++ linux-2.6/arch/i386/kernel/vm86.c
-@@ -529,13 +529,6 @@ int handle_vm86_trap(struct kernel_vm86_
+@@ -556,13 +556,6 @@ int handle_vm86_trap(struct kernel_vm86_
}
if (trapno !=1)
return 1; /* we let this handle by the calling routine */
@@ -8115,7 +8115,7 @@
current->thread.error_code = error_code;
--- linux-2.6/arch/i386/kernel/process.c.utrace-ptrace-compat
+++ linux-2.6/arch/i386/kernel/process.c
-@@ -752,9 +752,6 @@ asmlinkage int sys_execve(struct pt_regs
+@@ -745,9 +745,6 @@ asmlinkage int sys_execve(struct pt_regs
(char __user * __user *) regs.edx,
®s);
if (error == 0) {
@@ -8164,17 +8164,17 @@
/*
* Offset of eflags on child stack..
*/
-@@ -114,6 +110,7 @@ static int putreg(struct task_struct *ch
+@@ -110,6 +106,7 @@ static int putreg(struct task_struct *ch
case EFL:
value &= FLAG_MASK;
value |= get_stack_long(child, EFL_OFFSET) & ~FLAG_MASK;
+ clear_tsk_thread_flag(child, TIF_FORCED_TF);
break;
}
- if (regno > GS*4)
-@@ -134,6 +131,10 @@ static unsigned long getreg(struct task_
- case GS:
- retval = child->thread.gs;
+ if (regno > ES*4)
+@@ -127,6 +124,10 @@ static unsigned long getreg(struct task_
+ case FS:
+ retval = child->thread.fs;
break;
+ case EFL:
+ if (test_tsk_thread_flag(child, TIF_FORCED_TF))
@@ -8182,8 +8182,8 @@
+ goto fetch;
case DS:
case ES:
- case SS:
-@@ -136,10 +136,12 @@ static unsigned long getreg(struct task_
+ case GS:
+@@ -135,10 +136,12 @@ static unsigned long getreg(struct task_
retval = 0xffff;
/* fall through */
default:
@@ -8196,7 +8196,7 @@
}
return retval;
}
-@@ -222,7 +225,7 @@ static inline int is_setting_trap_flag(s
+@@ -216,7 +219,7 @@ static inline int is_setting_trap_flag(s
return 0;
}
@@ -8205,7 +8205,7 @@
{
struct pt_regs *regs = get_child_regs(child);
-@@ -236,11 +239,11 @@ static void set_singlestep(struct task_s
+@@ -230,11 +233,11 @@ static void set_singlestep(struct task_s
/*
* If TF was already set, don't do anything else
*/
@@ -8219,7 +8219,7 @@
/*
* ..but if TF is changed by the instruction we will trace,
-@@ -250,43 +253,323 @@ static void set_singlestep(struct task_s
+@@ -244,43 +247,323 @@ static void set_singlestep(struct task_s
if (is_setting_trap_flag(child, regs))
return;
@@ -8561,7 +8561,7 @@
/*
* Get the current Thread-Local Storage area:
-@@ -308,23 +591,29 @@ ptrace_get_thread_area(struct task_struc
+@@ -302,23 +585,29 @@ ptrace_get_thread_area(struct task_struc
#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
@@ -8608,7 +8608,7 @@
return 0;
}
-@@ -333,308 +622,154 @@ ptrace_get_thread_area(struct task_struc
+@@ -327,308 +616,154 @@ ptrace_get_thread_area(struct task_struc
* Perform set_thread_area on behalf of the traced child.
*/
static int
@@ -9046,7 +9046,7 @@
void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code)
{
-@@ -658,78 +793,24 @@ void send_sigtrap(struct task_struct *ts
+@@ -652,78 +787,24 @@ void send_sigtrap(struct task_struct *ts
* - triggered by current->work.syscall_trace
*/
__attribute__((regparm(3)))
@@ -9136,7 +9136,7 @@
}
--- linux-2.6/arch/i386/kernel/entry.S.utrace-ptrace-compat
+++ linux-2.6/arch/i386/kernel/entry.S
-@@ -326,7 +326,7 @@ sysenter_past_esp:
+@@ -329,7 +329,7 @@ sysenter_past_esp:
GET_THREAD_INFO(%ebp)
/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
@@ -9145,7 +9145,7 @@
jnz syscall_trace_entry
cmpl $(nr_syscalls), %eax
jae syscall_badsys
-@@ -359,7 +359,7 @@ ENTRY(system_call)
+@@ -369,7 +369,7 @@ ENTRY(system_call)
no_singlestep:
# system call tracing in operation / emulation
/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
@@ -11879,27 +11879,12 @@
/* To get the necessary page struct, access_process_vm() first calls
* get_user_pages(). This has done a flush_dcache_page() on the
* accessed page. Then our caller (copy_{to,from}_user_page()) did
-@@ -661,487 +661,122 @@ void flush_ptrace_access(struct vm_area_
+@@ -167,487 +661,124 @@ void flush_ptrace_access(struct vm_area_
}
}
-asmlinkage void do_ptrace(struct pt_regs *regs)
-+#ifdef CONFIG_PTRACE
-+static const struct ptrace_layout_segment sparc64_getregs_layout[] = {
-+ { 0, offsetof(struct pt_regs, u_regs[15]), 0, sizeof(long) },
-+ { offsetof(struct pt_regs, u_regs[15]),
-+ offsetof(struct pt_regs, tstate),
-+ -1, 0 },
-+ { offsetof(struct pt_regs, tstate), offsetof(struct pt_regs, y),
-+ 0, 32 * sizeof(long) },
-+ {0, 0, -1, 0}
-+};
-+
-+int arch_ptrace(long *request, struct task_struct *child,
-+ struct utrace_attached_engine *engine,
-+ unsigned long addr, unsigned long data,
-+ long *retval)
- {
+-{
- int request = regs->u_regs[UREG_I0];
- pid_t pid = regs->u_regs[UREG_I1];
- unsigned long addr = regs->u_regs[UREG_I2];
@@ -12259,7 +12244,17 @@
- pt_succ_return(regs, 0);
- goto out_tsk;
- }
--
++#ifdef CONFIG_PTRACE
++static const struct ptrace_layout_segment sparc64_getregs_layout[] = {
++ { 0, offsetof(struct pt_regs, u_regs[15]), 0, sizeof(long) },
++ { offsetof(struct pt_regs, u_regs[15]),
++ offsetof(struct pt_regs, tstate),
++ -1, 0 },
++ { offsetof(struct pt_regs, tstate), offsetof(struct pt_regs, y),
++ 0, 32 * sizeof(long) },
++ {0, 0, -1, 0}
++};
+
- case PTRACE_READTEXT:
- case PTRACE_READDATA: {
- int res = ptrace_readdata(child, addr,
@@ -12273,7 +12268,28 @@
- pt_error_return(regs, -res);
- goto out_tsk;
- }
--
++int arch_ptrace(long *request, struct task_struct *child,
++ struct utrace_attached_engine *engine,
++ unsigned long addr, unsigned long data,
++ long *retval)
++{
++ void __user *uaddr = (void __user *) addr;
++ struct pt_regs *uregs = uaddr;
++ int err = -ENOSYS;
++
++ switch (*request) {
++ case PTRACE_GETREGS64:
++ err = ptrace_layout_access(child, engine,
++ &utrace_sparc64_native_view,
++ sparc64_getregs_layout,
++ 0, offsetof(struct pt_regs, y),
++ uaddr, NULL, 0);
++ if (!err &&
++ (put_user(task_pt_regs(child)->y, &uregs->y) ||
++ put_user(task_pt_regs(child)->fprs, &uregs->fprs)))
++ err = -EFAULT;
++ break;
+
- case PTRACE_WRITETEXT:
- case PTRACE_WRITEDATA: {
- int res = ptrace_writedata(child, (char __user *) addr2,
@@ -12289,58 +12305,57 @@
- }
- case PTRACE_SYSCALL: /* continue and stop at (return from) syscall */
- addr = 1;
-+ void __user *uaddr = (void __user *) addr;
-+ struct pt_regs *uregs = uaddr;
-+ int err = -ENOSYS;
-+
-+ switch (*request) {
-+ case PTRACE_GETREGS64:
+-
+- case PTRACE_CONT: { /* restart after signal. */
+- if (!valid_signal(data)) {
+- pt_error_return(regs, EIO);
+- goto out_tsk;
+- }
++ case PTRACE_SETREGS64:
+ err = ptrace_layout_access(child, engine,
+ &utrace_sparc64_native_view,
+ sparc64_getregs_layout,
+ 0, offsetof(struct pt_regs, y),
-+ uaddr, NULL, 0);
++ uaddr, NULL, 1);
+ if (!err &&
-+ (put_user(task_pt_regs(child)->y, &uregs->y) ||
-+ put_user(task_pt_regs(child)->fprs, &uregs->fprs)))
++ (get_user(task_pt_regs(child)->y, &uregs->y) ||
++ get_user(task_pt_regs(child)->fprs, &uregs->fprs)))
+ err = -EFAULT;
+ break;
-- case PTRACE_CONT: { /* restart after signal. */
-- if (!valid_signal(data)) {
-- pt_error_return(regs, EIO);
-- goto out_tsk;
-- }
--
- if (request == PTRACE_SYSCALL) {
- set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
- } else {
- clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
- }
--
++ case PTRACE_GETFPREGS64:
++ case PTRACE_SETFPREGS64:
++ err = ptrace_regset_access(child, engine,
++ utrace_native_view(current),
++ 2, 0, 34 * sizeof(long), uaddr,
++ (*request == PTRACE_SETFPREGS64));
++ break;
+
- child->exit_code = data;
-#ifdef DEBUG_PTRACE
- printk("CONT: %s [%d]: set exit_code = %x %lx %lx\n", child->comm,
- child->pid, child->exit_code,
- task_pt_regs(child)->tpc,
- task_pt_regs(child)->tnpc);
--
++ case PTRACE_SUNDETACH:
++ *request = PTRACE_DETACH;
++ break;
+
-#endif
- wake_up_process(child);
- pt_succ_return(regs, 0);
- goto out_tsk;
- }
-+ case PTRACE_SETREGS64:
-+ err = ptrace_layout_access(child, engine,
-+ &utrace_sparc64_native_view,
-+ sparc64_getregs_layout,
-+ 0, offsetof(struct pt_regs, y),
-+ uaddr, NULL, 1);
-+ if (!err &&
-+ (get_user(task_pt_regs(child)->y, &uregs->y) ||
-+ get_user(task_pt_regs(child)->fprs, &uregs->fprs)))
-+ err = -EFAULT;
++ default:
+ break;
++ };
++ return err;
++}
-/*
- * make the child exit. Best I can do is send it a sigkill.
@@ -12357,33 +12372,6 @@
- pt_succ_return(regs, 0);
- goto out_tsk;
- }
-+ case PTRACE_GETFPREGS64:
-+ case PTRACE_SETFPREGS64:
-+ err = ptrace_regset_access(child, engine,
-+ utrace_native_view(current),
-+ 2, 0, 34 * sizeof(long), uaddr,
-+ (*request == PTRACE_SETFPREGS64));
-+ break;
-
-- case PTRACE_SUNDETACH: { /* detach a process that was attached. */
-- int error = ptrace_detach(child, data);
-- if (error) {
-- pt_error_return(regs, EIO);
-- goto out_tsk;
-- }
-- pt_succ_return(regs, 0);
-- goto out_tsk;
-- }
-+ case PTRACE_SUNDETACH:
-+ *request = PTRACE_DETACH;
-+ break;
-+ default:
-+ break;
-+ };
-+ return err;
-+}
-
-- /* PTRACE_DUMPCORE unsupported... */
+#ifdef CONFIG_COMPAT
+static const struct ptrace_layout_segment sparc32_getregs_layout[] = {
+ { 0, offsetof(struct pt_regs32, u_regs[0]),
@@ -12395,7 +12383,16 @@
+ -1, 0 },
+ {0, 0, -1, 0}
+};
-+
+
+- case PTRACE_SUNDETACH: { /* detach a process that was attached. */
+- int error = ptrace_detach(child, data);
+- if (error) {
+- pt_error_return(regs, EIO);
+- goto out_tsk;
+- }
+- pt_succ_return(regs, 0);
+- goto out_tsk;
+- }
+int arch_compat_ptrace(compat_long_t *request, struct task_struct *child,
+ struct utrace_attached_engine *engine,
+ compat_ulong_t addr, compat_ulong_t data,
@@ -12404,8 +12401,7 @@
+ void __user *uaddr = (void __user *) (unsigned long) addr;
+ int err = -ENOSYS;
-- case PTRACE_GETEVENTMSG: {
-- int err;
+- /* PTRACE_DUMPCORE unsupported... */
+ switch (*request) {
+ case PTRACE_GETREGS:
+ case PTRACE_SETREGS:
@@ -12418,6 +12414,14 @@
+ PTRACE_SETREGS));
+ break;
+- case PTRACE_GETEVENTMSG: {
+- int err;
++ case PTRACE_GETFPREGS:
++ case PTRACE_SETFPREGS:
++ err = ptrace_whole_regset(child, engine, addr, 1,
++ (*request == PTRACE_SETFPREGS));
++ break;
+
- if (test_thread_flag(TIF_32BIT))
- err = put_user(child->ptrace_message,
- (unsigned int __user *) data);
@@ -12428,10 +12432,8 @@
- pt_error_return(regs, -err);
- else
- pt_succ_return(regs, 0);
-+ case PTRACE_GETFPREGS:
-+ case PTRACE_SETFPREGS:
-+ err = ptrace_whole_regset(child, engine, addr, 1,
-+ (*request == PTRACE_SETFPREGS));
++ case PTRACE_SUNDETACH:
++ *request = PTRACE_DETACH;
break;
- }
@@ -12449,9 +12451,6 @@
- put_task_struct(child);
-out:
- unlock_kernel();
-+ case PTRACE_SUNDETACH:
-+ *request = PTRACE_DETACH;
-+ break;
+ default:
+ break;
+ };
@@ -12469,7 +12468,7 @@
if (unlikely(current->audit_context) && syscall_exit_p) {
unsigned long tstate = regs->tstate;
-@@ -656,26 +790,9 @@ asmlinkage void syscall_trace(struct pt_
+@@ -659,26 +790,9 @@ asmlinkage void syscall_trace(struct pt_
audit_syscall_exit(result, regs->u_regs[UREG_I0]);
}
@@ -12511,7 +12510,7 @@
obj-y := process.o setup.o cpu.o idprom.o \
--- linux-2.6/arch/sparc64/kernel/entry.S.utrace-ptrace-compat
+++ linux-2.6/arch/sparc64/kernel/entry.S
-@@ -1409,7 +1409,6 @@ execve_merge:
+@@ -1434,7 +1434,6 @@ execve_merge:
.globl sys_pipe, sys_sigpause, sys_nis_syscall
.globl sys_rt_sigreturn
@@ -12519,7 +12518,7 @@
.globl sys_sigaltstack
.align 32
sys_pipe: ba,pt %xcc, sparc_pipe
-@@ -1452,11 +1451,6 @@ sys32_rt_sigreturn:
+@@ -1477,11 +1476,6 @@ sys32_rt_sigreturn:
add %o7, 1f-.-4, %o7
nop
#endif
@@ -12591,7 +12590,7 @@
}
--- linux-2.6/arch/ia64/kernel/mca.c.utrace-ptrace-compat
+++ linux-2.6/arch/ia64/kernel/mca.c
-@@ -1693,7 +1693,7 @@ format_mca_init_stack(void *mca_data, un
+@@ -1698,7 +1698,7 @@ format_mca_init_stack(void *mca_data, un
p->state = TASK_UNINTERRUPTIBLE;
cpu_set(cpu, p->cpus_allowed);
INIT_LIST_HEAD(&p->tasks);
@@ -16491,7 +16490,7 @@
return ret;
--- linux-2.6/arch/x86_64/kernel/process.c.utrace-ptrace-compat
+++ linux-2.6/arch/x86_64/kernel/process.c
-@@ -676,11 +676,6 @@ long sys_execve(char __user *name, char
+@@ -679,11 +679,6 @@ long sys_execve(char __user *name, char
if (IS_ERR(filename))
return error;
error = do_execve(filename, argv, envp, ®s);
@@ -16505,7 +16504,7 @@
}
--- linux-2.6/arch/x86_64/kernel/traps.c.utrace-ptrace-compat
+++ linux-2.6/arch/x86_64/kernel/traps.c
-@@ -935,14 +935,6 @@ asmlinkage void __kprobes do_debug(struc
+@@ -930,14 +930,6 @@ asmlinkage void __kprobes do_debug(struc
*/
if (!user_mode(regs))
goto clear_TF_reenable;
@@ -18162,11 +18161,9 @@
#if DEBUG_SIG
printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
-@@ -589,11 +585,7 @@ int ia32_setup_rt_frame(int sig, struct
-
- regs->cs = __USER32_CS;
+@@ -596,9 +592,6 @@ int ia32_setup_rt_frame(int sig, struct
regs->ss = __USER32_DS;
--
+
set_fs(USER_DS);
- regs->eflags &= ~TF_MASK;
- if (test_thread_flag(TIF_SINGLESTEP))
More information about the fedora-cvs-commits
mailing list