rpms/kernel/devel linux-2.6-utrace.patch,1.48,1.49

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Jan 2 07:39:26 UTC 2007


Author: roland

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv3483

Modified Files:
	linux-2.6-utrace.patch 
Log Message:
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    |    3 
 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                       |  238 +---
 kernel/fork.c                       |   62 -
 kernel/ptrace.c                     | 1767 ++++++++++++++++++++++++++++------
 kernel/signal.c                     |  211 ----
 kernel/sys.c                        |    2 
 kernel/timer.c                      |    6 
 kernel/tsacct.c                     |    2 
 kernel/utrace.c                     | 1861 ++++++++++++++++++++++++++++++++++++
 security/selinux/hooks.c            |   54 -
 security/selinux/include/objsec.h   |    1 
 97 files changed, 10641 insertions(+), 5050 deletions(-)

Index: linux-2.6-utrace.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-utrace.patch,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- linux-2.6-utrace.patch	2 Jan 2007 04:31:26 -0000	1.48
+++ linux-2.6-utrace.patch	2 Jan 2007 07:39:24 -0000	1.49
@@ -86,7 +86,7 @@
  include/linux/utrace.h              |  504 +++++++++
  init/Kconfig                        |   29 +
  kernel/Makefile                     |    1 
- kernel/exit.c                       |  244 +----
+ kernel/exit.c                       |  238 +---
  kernel/fork.c                       |   62 -
  kernel/ptrace.c                     | 1767 +++++++++++++++++++++++++++------
  kernel/signal.c                     |  211 +---
@@ -96,7 +96,7 @@
  kernel/utrace.c                     | 1861 +++++++++++++++++++++++++++++++++++
  security/selinux/hooks.c            |   54 +
  security/selinux/include/objsec.h   |    1 
- 98 files changed, 10644 insertions(+), 5053 deletions(-)
+ 98 files changed, 10641 insertions(+), 5050 deletions(-)
  create mode 100644 Documentation/utrace.txt
  delete arch/powerpc/kernel/ptrace-common.h
  delete arch/powerpc/kernel/ptrace32.c
@@ -5299,7 +5299,7 @@
  	add_parent(current);
  
  	/* Set the exit signal to SIGCHLD so we signal init on exit */
-@@ -591,11 +590,11 @@ choose_new_parent(struct task_struct *p,
+@@ -591,45 +590,23 @@ choose_new_parent(struct task_struct *p,
  	 * the parent is not a zombie.
  	 */
  	BUG_ON(p == reaper || reaper->exit_state);
@@ -5311,9 +5311,8 @@
 -reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
 +reparent_thread(struct task_struct *p, struct task_struct *father)
  {
- 	/* We don't want people slaying init.  */
- 	if (p->exit_signal != -1)
-@@ -601,35 +601,7 @@ reparent_thread(struct task_struct *p, s
+ 	if (p->pdeath_signal)
+ 		/* We already hold the tasklist_lock here.  */
  		group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p);
  
  	/* Move the child from its dying parent to the new one.  */
@@ -5340,26 +5339,27 @@
 -			ptrace_untrace(p);
 -		}
 -	}
--
--	/* If this is a threaded reparent there is no need to
--	 * notify anyone anything has happened.
--	 */
--	if (p->real_parent->group_leader == father->group_leader)
--		return;
 +	list_move_tail(&p->sibling, &p->parent->children);
  
+ 	/* If this is a threaded reparent there is no need to
+ 	 * notify anyone anything has happened.
+ 	 */
+-	if (p->real_parent->group_leader == father->group_leader)
++	if (p->parent->group_leader == father->group_leader)
+ 		return;
+ 
  	/* We don't want people slaying init.  */
- 	if (p->exit_signal != -1)
-@@ -638,7 +610,7 @@ reparent_thread(struct task_struct *p, s
+@@ -639,7 +616,8 @@ reparent_thread(struct task_struct *p, s
  	/* If we'd notified the old parent about this child's death,
  	 * also notify the new parent.
  	 */
 -	if (!traced && p->exit_state == EXIT_ZOMBIE &&
-+	if (p->exit_state == EXIT_ZOMBIE &&
++	if (!tracehook_inhibit_wait_zombie(p) &&
++	    p->exit_state == EXIT_ZOMBIE &&
  	    p->exit_signal != -1 && thread_group_empty(p))
  		do_notify_parent(p, p->exit_signal);
  
-@@ -662,7 +640,7 @@ reparent_thread(struct task_struct *p, s
+@@ -669,7 +647,7 @@ reparent_thread(struct task_struct *p, s
   * space.
   */
  static void
@@ -5368,7 +5368,7 @@
  {
  	struct task_struct *p, *reaper = father;
  	struct list_head *_p, *_n;
-@@ -675,48 +653,10 @@ forget_original_parent(struct task_struc
+@@ -682,48 +660,10 @@ forget_original_parent(struct task_struc
  		}
  	} while (reaper->exit_state);
  
@@ -5418,7 +5418,7 @@
  	}
  }
  
-@@ -728,7 +668,8 @@ static void exit_notify(struct task_stru
+@@ -735,7 +675,8 @@ static void exit_notify(struct task_stru
  {
  	int state;
  	struct task_struct *t;
@@ -5428,7 +5428,7 @@
  
  	if (signal_pending(tsk) && !(tsk->signal->flags & SIGNAL_GROUP_EXIT)
  	    && !thread_group_empty(tsk)) {
-@@ -764,10 +705,8 @@ static void exit_notify(struct task_stru
+@@ -771,10 +712,8 @@ static void exit_notify(struct task_stru
  	 *	jobs, send them a SIGHUP and then a SIGCONT.  (POSIX 3.2.2.2)
  	 */
  
@@ -5440,7 +5440,7 @@
  
  	/*
  	 * Check to see if any process groups have become orphaned
-@@ -779,7 +718,7 @@ static void exit_notify(struct task_stru
+@@ -786,7 +725,7 @@ static void exit_notify(struct task_stru
  	 * is about to become orphaned.
  	 */
  	 
@@ -5449,7 +5449,7 @@
  	
  	if ((process_group(t) != process_group(tsk)) &&
  	    (process_session(t) == process_session(tsk)) &&
-@@ -811,32 +750,18 @@ static void exit_notify(struct task_stru
+@@ -818,32 +757,18 @@ static void exit_notify(struct task_stru
  	    && !capable(CAP_KILL))
  		tsk->exit_signal = SIGCHLD;
  
@@ -5487,7 +5487,7 @@
  
  	/* If the process is dead, release it - nobody will wait for it */
  	if (state == EXIT_DEAD)
-@@ -864,10 +789,7 @@ fastcall NORET_TYPE void do_exit(long co
+@@ -871,10 +796,7 @@ fastcall NORET_TYPE void do_exit(long co
  	}
  
  
@@ -5499,7 +5499,7 @@
  
  	/*
  	 * We're taking recursive faults here in do_exit. Safest is to just
-@@ -884,6 +806,8 @@ fastcall NORET_TYPE void do_exit(long co
+@@ -891,6 +813,8 @@ fastcall NORET_TYPE void do_exit(long co
  
  	tsk->flags |= PF_EXITING;
  
@@ -5508,7 +5508,7 @@
  	if (unlikely(in_atomic()))
  		printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
  				current->comm, current->pid,
-@@ -1037,10 +961,9 @@ static int eligible_child(pid_t pid, int
+@@ -1044,10 +968,9 @@ static int eligible_child(pid_t pid, int
  	}
  
  	/*
@@ -5521,7 +5521,7 @@
  		return 0;
  
  	/* Wait for all children (clone and not) if __WALL is set;
-@@ -1111,7 +1034,7 @@ static int wait_task_zombie(struct task_
+@@ -1118,7 +1041,7 @@ static int wait_task_zombie(struct task_
  
  		if (unlikely(p->exit_state != EXIT_ZOMBIE))
  			return 0;
@@ -5530,7 +5530,7 @@
  			return 0;
  		get_task_struct(p);
  		read_unlock(&tasklist_lock);
-@@ -1135,15 +1058,9 @@ static int wait_task_zombie(struct task_
+@@ -1142,15 +1065,9 @@ static int wait_task_zombie(struct task_
  		BUG_ON(state != EXIT_DEAD);
  		return 0;
  	}
@@ -5548,7 +5548,7 @@
  		struct signal_struct *psig;
  		struct signal_struct *sig;
  
-@@ -1225,28 +1142,8 @@ static int wait_task_zombie(struct task_
+@@ -1232,28 +1149,8 @@ static int wait_task_zombie(struct task_
  		return retval;
  	}
  	retval = p->pid;
@@ -5579,7 +5579,7 @@
  	BUG_ON(!retval);
  	return retval;
  }
-@@ -1265,7 +1162,7 @@ static int wait_task_stopped(struct task
+@@ -1272,7 +1169,7 @@ static int wait_task_stopped(struct task
  
  	if (!p->exit_code)
  		return 0;
@@ -5588,7 +5588,7 @@
  	    p->signal && p->signal->group_stop_count > 0)
  		/*
  		 * A group stop is in progress and this is the group leader.
-@@ -1286,14 +1183,13 @@ static int wait_task_stopped(struct task
+@@ -1293,14 +1190,13 @@ static int wait_task_stopped(struct task
  	if (unlikely(noreap)) {
  		pid_t pid = p->pid;
  		uid_t uid = p->uid;
@@ -5605,7 +5605,7 @@
  					   infop, ru);
  	}
  
-@@ -1349,9 +1245,7 @@ bail_ref:
+@@ -1356,9 +1252,7 @@ bail_ref:
  	if (!retval && infop)
  		retval = put_user(0, &infop->si_errno);
  	if (!retval && infop)
@@ -5616,7 +5616,7 @@
  	if (!retval && infop)
  		retval = put_user(exit_code, &infop->si_status);
  	if (!retval && infop)
-@@ -1419,22 +1313,6 @@ static int wait_task_continued(struct ta
+@@ -1426,22 +1320,6 @@ static int wait_task_continued(struct ta
  }
  
  
@@ -5639,7 +5639,7 @@
  static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
  		    int __user *stat_addr, struct rusage __user *ru)
  {
-@@ -1466,26 +1344,17 @@ repeat:
+@@ -1473,26 +1351,17 @@ repeat:
  
  			switch (p->state) {
  			case TASK_TRACED:
@@ -5670,7 +5670,7 @@
  					continue;
  				retval = wait_task_stopped(p, ret == 2,
  							   (options & WNOWAIT),
-@@ -1510,6 +1379,10 @@ repeat:
+@@ -1517,6 +1386,10 @@ repeat:
  						goto check_continued;
  					if (!likely(options & WEXITED))
  						continue;
@@ -5681,7 +5681,7 @@
  					retval = wait_task_zombie(
  						p, (options & WNOWAIT),
  						infop, stat_addr, ru);
-@@ -1526,6 +1399,8 @@ check_continued:
+@@ -1533,6 +1406,8 @@ check_continued:
  				flag = 1;
  				if (!unlikely(options & WCONTINUED))
  					continue;
@@ -5690,7 +5690,7 @@
  				retval = wait_task_continued(
  					p, (options & WNOWAIT),
  					infop, stat_addr, ru);
-@@ -1534,16 +1409,15 @@ check_continued:
+@@ -1541,16 +1416,15 @@ check_continued:
  				break;
  			}
  		}
@@ -5715,7 +5715,7 @@
  		if (options & __WNOTHREAD)
  			break;
  		tsk = next_thread(tsk);
-@@ -1567,7 +1441,7 @@ end:
+@@ -1574,7 +1448,7 @@ end:
  	remove_wait_queue(&current->signal->wait_chldexit,&wait);
  	if (infop) {
  		if (retval > 0)
@@ -8256,7 +8256,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
-@@ -745,9 +745,6 @@ asmlinkage int sys_execve(struct pt_regs
+@@ -750,9 +750,6 @@ asmlinkage int sys_execve(struct pt_regs
  			(char __user * __user *) regs.edx,
  			&regs);
  	if (error == 0) {
@@ -8324,7 +8324,7 @@
  		case DS:
  		case ES:
  		case GS:
-@@ -136,9 +136,11 @@ static unsigned long getreg(struct task_
+@@ -135,9 +136,11 @@ static unsigned long getreg(struct task_
  			retval = 0xffff;
  			/* fall through */
  		default:
@@ -8336,7 +8336,7 @@
  	}
  	return retval;
  }
-@@ -216,7 +219,7 @@ static inline int is_setting_trap_flag(s
+@@ -215,7 +218,7 @@ static inline int is_setting_trap_flag(s
  	return 0;
  }
  
@@ -8345,7 +8345,7 @@
  {
  	struct pt_regs *regs = get_child_regs(child);
  
-@@ -230,11 +233,11 @@ static void set_singlestep(struct task_s
+@@ -229,11 +232,11 @@ static void set_singlestep(struct task_s
  	/*
  	 * If TF was already set, don't do anything else
  	 */
@@ -8359,7 +8359,7 @@
  
  	/*
  	 * ..but if TF is changed by the instruction we will trace,
-@@ -244,43 +247,323 @@ static void set_singlestep(struct task_s
+@@ -243,43 +246,323 @@ static void set_singlestep(struct task_s
  	if (is_setting_trap_flag(child, regs))
  		return;
  	
@@ -8701,7 +8701,7 @@
  
  /*
   * Get the current Thread-Local Storage area:
-@@ -302,23 +585,29 @@ ptrace_get_thread_area(struct task_struc
+@@ -301,23 +584,29 @@ ptrace_get_thread_area(struct task_struc
  #define GET_PRESENT(desc)	(((desc)->b >> 15) & 1)
  #define GET_USEABLE(desc)	(((desc)->b >> 20) & 1)
  
@@ -8748,7 +8748,7 @@
  
  	return 0;
  }
-@@ -327,308 +616,154 @@ ptrace_get_thread_area(struct task_struc
+@@ -326,308 +615,154 @@ ptrace_get_thread_area(struct task_struc
   * Perform set_thread_area on behalf of the traced child.
   */
  static int
@@ -9186,7 +9186,7 @@
  
  void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code)
  {
-@@ -652,78 +787,24 @@ void send_sigtrap(struct task_struct *ts
+@@ -651,78 +786,24 @@ void send_sigtrap(struct task_struct *ts
   * - triggered by current->work.syscall_trace
   */
  __attribute__((regparm(3)))
@@ -16630,7 +16630,7 @@
  	return ret;
 --- linux-2.6/arch/x86_64/kernel/process.c.utrace-ptrace-compat
 +++ linux-2.6/arch/x86_64/kernel/process.c
-@@ -679,11 +679,6 @@ long sys_execve(char __user *name, char 
+@@ -683,11 +683,6 @@ long sys_execve(char __user *name, char 
  	if (IS_ERR(filename)) 
  		return error;
  	error = do_execve(filename, argv, envp, &regs); 




More information about the fedora-cvs-commits mailing list