rpms/kernel/F-9 linux-2.6-utrace.patch,1.76,1.77
Chuck Ebbert (cebbert)
fedora-extras-commits at redhat.com
Sat May 17 05:38:46 UTC 2008
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11802
Modified Files:
linux-2.6-utrace.patch
Log Message:
revert to utrace.patch 1.75 -- latest does not build
linux-2.6-utrace.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.76 -r 1.77 linux-2.6-utrace.patch
Index: linux-2.6-utrace.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/linux-2.6-utrace.patch,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- linux-2.6-utrace.patch 15 May 2008 16:34:36 -0000 1.76
+++ linux-2.6-utrace.patch 17 May 2008 05:37:56 -0000 1.77
@@ -1,85 +1,64 @@
Documentation/DocBook/Makefile | 2 +-
Documentation/DocBook/utrace.tmpl | 23 +
Documentation/utrace.txt | 579 +++++++++
- arch/alpha/kernel/ptrace.c | 15 +-
- arch/arm/kernel/ptrace.c | 5 +-
- arch/avr32/kernel/ptrace.c | 5 +-
- arch/blackfin/kernel/ptrace.c | 5 +-
- arch/frv/kernel/ptrace.c | 3 +-
- arch/h8300/kernel/ptrace.c | 3 +-
- arch/ia64/kernel/process.c | 2 +-
- arch/ia64/kernel/ptrace.c | 17 +-
- arch/m32r/kernel/ptrace.c | 7 +-
- arch/m68k/kernel/ptrace.c | 5 +-
- arch/m68knommu/kernel/ptrace.c | 3 +-
arch/mips/kernel/irixelf.c | 2 -
- arch/mips/kernel/ptrace.c | 5 +-
- arch/mn10300/kernel/ptrace.c | 3 +-
- arch/parisc/kernel/ptrace.c | 7 +-
- arch/powerpc/kernel/entry_32.S | 4 +-
+ arch/powerpc/kernel/asm-offsets.c | 4 -
arch/powerpc/kernel/process.c | 5 -
- arch/powerpc/kernel/ptrace.c | 38 +-
- arch/powerpc/kernel/ptrace32.c | 8 +-
- arch/powerpc/kernel/signal.c | 20 +-
- arch/powerpc/kernel/signal_32.c | 21 +-
+ arch/powerpc/kernel/ptrace.c | 35 +-
+ arch/powerpc/kernel/ptrace32.c | 2 +-
+ arch/powerpc/kernel/signal.c | 8 +-
+ arch/powerpc/kernel/signal_32.c | 19 +-
arch/powerpc/kernel/sys_ppc32.c | 5 -
- arch/s390/kernel/entry.S | 14 +-
- arch/s390/kernel/entry64.S | 12 +-
- arch/sh/kernel/ptrace_32.c | 5 +-
- arch/sh/kernel/ptrace_64.c | 5 +-
- arch/sparc/kernel/ptrace.c | 5 +-
arch/sparc64/kernel/binfmt_aout32.c | 2 -
- arch/sparc64/kernel/ptrace.c | 35 +-
- arch/um/kernel/ptrace.c | 3 +-
- arch/v850/kernel/ptrace.c | 3 +-
+ arch/sparc64/kernel/process.c | 23 +-
+ arch/sparc64/kernel/ptrace.c | 28 +-
+ arch/sparc64/kernel/sys_sparc32.c | 41 +-
arch/x86/ia32/ia32_aout.c | 6 -
- arch/x86/ia32/ia32_signal.c | 12 +-
+ arch/x86/ia32/ia32_signal.c | 10 -
arch/x86/ia32/ia32entry.S | 14 +-
arch/x86/ia32/sys_ia32.c | 5 -
arch/x86/kernel/entry_64.S | 8 +-
- arch/x86/kernel/ptrace.c | 159 +--
- arch/x86/kernel/signal_32.c | 56 +-
- arch/x86/kernel/signal_64.c | 49 +-
- arch/x86/kernel/step.c | 22 +-
+ arch/x86/kernel/ptrace.c | 157 +--
+ arch/x86/kernel/signal_32.c | 37 +-
+ arch/x86/kernel/signal_64.c | 33 +-
arch/x86/kernel/vm86_32.c | 9 +-
- arch/xtensa/kernel/ptrace.c | 6 +-
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/compat.c | 14 +-
- fs/eventpoll.c | 7 +-
+ fs/compat.c | 6 +-
+ fs/eventpoll.c | 3 +-
fs/exec.c | 12 +-
fs/proc/array.c | 9 +-
fs/proc/base.c | 43 +-
- fs/select.c | 12 +-
- include/asm-ia64/thread_info.h | 5 +-
- include/asm-powerpc/thread_info.h | 17 +-
+ fs/select.c | 4 +-
+ include/asm-alpha/ptrace.h | 1 +
+ include/asm-ia64/ptrace.h | 1 +
+ include/asm-ia64/thread_info.h | 2 +-
+ include/asm-powerpc/ptrace.h | 1 +
include/asm-s390/thread_info.h | 2 +-
+ include/asm-sparc64/ptrace.h | 2 +
include/asm-x86/ptrace.h | 2 +
- include/asm-x86/thread_info_32.h | 13 +-
- include/asm-x86/thread_info_64.h | 13 +-
- include/linux/compat.h | 5 +-
include/linux/init_task.h | 3 -
- include/linux/ptrace.h | 70 +-
- include/linux/sched.h | 38 +-
- include/linux/thread_info.h | 27 +-
- include/linux/tracehook.h | 507 ++++++++
+ include/linux/ptrace.h | 71 +-
+ include/linux/sched.h | 46 +-
+ include/linux/thread_info.h | 10 +-
+ include/linux/tracehook.h | 493 ++++++++
include/linux/utrace.h | 544 ++++++++
init/Kconfig | 29 +
kernel/Makefile | 1 +
kernel/compat.c | 3 +-
- kernel/exit.c | 403 +++----
+ kernel/exit.c | 371 +++---
kernel/fork.c | 72 +-
- kernel/ptrace.c | 2129 +++++++++++++++++++++++++-------
- kernel/signal.c | 285 +----
+ kernel/ptrace.c | 2112 +++++++++++++++++++++++++-------
+ kernel/signal.c | 288 +----
kernel/sys_ni.c | 4 +
kernel/utrace.c | 2377 +++++++++++++++++++++++++++++++++++
mm/nommu.c | 4 +-
security/selinux/hooks.c | 59 +-
security/selinux/include/objsec.h | 1 -
- 81 files changed, 6535 insertions(+), 1421 deletions(-)
+ 58 files changed, 6306 insertions(+), 1287 deletions(-)
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 300e170..7cf3afc 100644
@@ -708,274 +687,6 @@
+sure which event callbacks it will or won't see after utrace_set_flags
+has returned. By checking for errors, it can know whether to clean up
+its data structures immediately or to let its callbacks do the work.
-diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
-index 1e9ad52..7dc30f5 100644
---- a/arch/alpha/kernel/ptrace.c
-+++ b/arch/alpha/kernel/ptrace.c
-@@ -260,11 +260,12 @@ void ptrace_disable(struct task_struct *
- ptrace_cancel_bpt(child);
- }
-
--long arch_ptrace(struct task_struct *child, long request, long addr, long data)
-+int arch_ptrace(struct task_struct *child, long request, long addr, long data,
-+ long *retval)
- {
- unsigned long tmp;
- size_t copied;
-- long ret;
-+ int ret;
-
- switch (request) {
- /* When I and D space are separate, these will need to be fixed. */
-@@ -275,14 +276,14 @@ long arch_ptrace(struct task_struct *chi
- if (copied != sizeof(tmp))
- break;
-
-- force_successful_syscall_return();
-- ret = tmp;
-+ ret = 0;
-+ *retval = tmp;
- break;
-
- /* Read register number ADDR. */
- case PTRACE_PEEKUSR:
-- force_successful_syscall_return();
-- ret = get_reg(child, addr);
-+ ret = 0;
-+ *retval = get_reg(child, addr);
- DBG(DBG_MEM, ("peek $%ld->%#lx\n", addr, ret));
- break;
-
-@@ -343,7 +344,7 @@ long arch_ptrace(struct task_struct *chi
- break;
-
- default:
-- ret = ptrace_request(child, request, addr, data);
-+ ret = 1;
- break;
- }
- return ret;
-diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
-index 4b05dc5..938be29 100644
---- a/arch/arm/kernel/ptrace.c
-+++ b/arch/arm/kernel/ptrace.c
-@@ -655,7 +655,8 @@ static int ptrace_setcrunchregs(struct t
- }
- #endif
-
--long arch_ptrace(struct task_struct *child, long request, long addr, long data)
-+int arch_ptrace(struct task_struct *child, long request, long addr, long data,
-+ long *retval)
- {
- int ret;
-
-@@ -778,7 +779,7 @@ long arch_ptrace(struct task_struct *chi
- #endif
-
- default:
-- ret = ptrace_request(child, request, addr, data);
-+ ret = 1;
- break;
- }
-
-diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c
-index 1fed38f..5ce2ff7 100644
---- a/arch/avr32/kernel/ptrace.c
-+++ b/arch/avr32/kernel/ptrace.c
[...3022 lines suppressed...]
-+ force_successful_syscall_return();
++ engine, state,
++ addr, data);
+ put_task_struct(child);
- }
-
-- ret = ptrace_check_attach(child, request == PTRACE_KILL);
-- if (!ret)
-- ret = compat_arch_ptrace(child, request, addr, data);
++ }
- out_put_task_struct:
- put_task_struct(child);
@@ -7512,7 +6349,7 @@
#endif /* CONFIG_COMPAT */
diff --git a/kernel/signal.c b/kernel/signal.c
-index 6af1210..4ede33b 100644
+index 6af1210..2fdb5fc 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -22,6 +22,7 @@
@@ -7830,7 +6667,7 @@
read_lock(&tasklist_lock);
do_notify_parent_cldstop(current, CLD_STOPPED);
read_unlock(&tasklist_lock);
-@@ -1780,44 +1647,25 @@ relock:
+@@ -1780,44 +1647,24 @@ relock:
do_signal_stop(0))
goto relock;
@@ -7841,19 +6678,7 @@
-
- if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
- ptrace_signal_deliver(regs, cookie);
-+ /*
-+ * Tracing can induce an artifical signal and choose sigaction.
-+ * The return value in @signr determines the default action,
-+ * but @info->si_signo is the signal number we will report.
-+ */
-+ signr = tracehook_get_signal(current, regs, info, return_ka);
-+ if (unlikely(signr < 0))
-+ goto relock;
-+ if (unlikely(signr != 0))
-+ ka = return_ka;
-+ else {
-+ signr = dequeue_signal(current, mask, info);
-
+-
- /* Let the debugger run. */
- ptrace_stop(signr, 0, info);
-
@@ -7875,14 +6700,27 @@
- info->si_pid = task_pid_vnr(current->parent);
- info->si_uid = current->parent->uid;
- }
-+ if (!signr)
-+ break; /* will return 0 */
-
+-
- /* If the (new) signal is now blocked, requeue it. */
- if (sigismember(¤t->blocked, signr)) {
- specific_send_sig_info(signr, info, current);
- continue;
- }
++ /*
++ * Tracing can induce an artifical signal and choose sigaction.
++ * The return value in signr determines the default action,
++ * but info->si_signo is the signal number we will report.
++ */
++ signr = tracehook_get_signal(current, regs, info, return_ka);
++ if (unlikely(signr < 0))
++ goto relock;
++ if (unlikely(signr != 0))
++ ka = return_ka;
++ else {
++ signr = dequeue_signal(current, mask, info);
++
++ if (!signr)
++ break; /* will return 0 */
+ ka = ¤t->sighand->action[signr-1];
}
@@ -7890,7 +6728,7 @@
if (ka->sa.sa_handler == SIG_IGN) /* Do nothing. */
continue;
if (ka->sa.sa_handler != SIG_DFL) {
-@@ -1827,6 +1675,7 @@ relock:
+@@ -1827,6 +1674,7 @@ relock:
if (ka->sa.sa_flags & SA_ONESHOT)
ka->sa.sa_handler = SIG_DFL;
@@ -7898,7 +6736,7 @@
break; /* will return non-zero "signr" value */
}
-@@ -1864,7 +1713,7 @@ relock:
+@@ -1864,7 +1712,7 @@ relock:
spin_lock_irq(¤t->sighand->siglock);
}
@@ -7907,7 +6745,7 @@
/* It released the siglock. */
goto relock;
}
-@@ -1882,9 +1731,10 @@ relock:
+@@ -1882,9 +1730,10 @@ relock:
* Anything else is fatal, maybe with a core dump.
*/
current->flags |= PF_SIGNALED;
@@ -7920,7 +6758,7 @@
/*
* If it was able to dump core, this kills all
* other threads in the group and synchronizes with
-@@ -1893,13 +1743,13 @@ relock:
+@@ -1893,13 +1742,13 @@ relock:
* first and our do_group_exit call below will use
* that value and ignore the one we pass it.
*/
@@ -7936,7 +6774,7 @@
/* NOTREACHED */
}
spin_unlock_irq(¤t->sighand->siglock);
-@@ -1953,7 +1803,6 @@ EXPORT_SYMBOL_GPL(dequeue_signal);
+@@ -1953,7 +1802,6 @@ EXPORT_SYMBOL_GPL(dequeue_signal);
EXPORT_SYMBOL(flush_signals);
EXPORT_SYMBOL(force_sig);
EXPORT_SYMBOL(kill_proc);
@@ -7944,7 +6782,7 @@
EXPORT_SYMBOL(send_sig);
EXPORT_SYMBOL(send_sig_info);
EXPORT_SYMBOL(sigprocmask);
-@@ -2610,7 +2459,7 @@ asmlinkage long sys_rt_sigsuspend(sigset
+@@ -2610,7 +2458,7 @@ asmlinkage long sys_rt_sigsuspend(sigset
current->state = TASK_INTERRUPTIBLE;
schedule();
@@ -10374,7 +9212,7 @@
return vm_flags;
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
-index d39b59c..43cb7c3 100644
+index 41a049f..44b756b 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -24,7 +24,7 @@
@@ -10395,7 +9233,7 @@
task->security = tsec;
return 0;
-@@ -1645,19 +1645,13 @@ static inline u32 file_to_av(struct file
+@@ -1638,19 +1638,13 @@ static inline u32 file_to_av(struct file
static int selinux_ptrace(struct task_struct *parent, struct task_struct *child)
{
@@ -10416,7 +9254,7 @@
}
static int selinux_capget(struct task_struct *target, kernel_cap_t *effective,
-@@ -2126,12 +2120,25 @@ static void selinux_bprm_apply_creds(str
+@@ -2119,12 +2113,25 @@ 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)) {
@@ -10448,7 +9286,7 @@
}
}
tsec->sid = sid;
-@@ -2214,7 +2221,7 @@ static void selinux_bprm_post_apply_cred
+@@ -2207,7 +2214,7 @@ static void selinux_bprm_post_apply_cred
/* Wake up the parent if it is waiting so that it can
recheck wait permission to the new task SID. */
@@ -10457,7 +9295,7 @@
}
/* superblock security operations */
-@@ -3087,11 +3094,6 @@ static int selinux_task_alloc_security(s
+@@ -3080,11 +3087,6 @@ static int selinux_task_alloc_security(s
tsec2->keycreate_sid = tsec1->keycreate_sid;
tsec2->sockcreate_sid = tsec1->sockcreate_sid;
@@ -10469,7 +9307,7 @@
return 0;
}
-@@ -5057,6 +5059,7 @@ static int selinux_setprocattr(struct ta
+@@ -5050,6 +5052,7 @@ static int selinux_setprocattr(struct ta
char *name, void *value, size_t size)
{
struct task_security_struct *tsec;
@@ -10477,7 +9315,7 @@
u32 sid = 0;
int error;
char *str = value;
-@@ -5145,18 +5148,24 @@ static int selinux_setprocattr(struct ta
+@@ -5138,18 +5141,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);
More information about the fedora-extras-commits
mailing list