rpms/kernel/devel linux-2.6-x86_64-tif-restore-sigmask.patch, 1.4, 1.5

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Sun Jul 2 22:41:01 UTC 2006


Author: dwmw2

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

Modified Files:
	linux-2.6-x86_64-tif-restore-sigmask.patch 
Log Message:
Use generic sys_rt_sigsuspend

linux-2.6-x86_64-tif-restore-sigmask.patch:
 arch/x86_64/ia32/ia32_signal.c   |   28 +++++--------
 arch/x86_64/kernel/signal.c      |   82 ++++++++++++++++-----------------------
 include/asm-x86_64/signal.h      |    4 -
 include/asm-x86_64/thread_info.h |    2 
 include/asm-x86_64/unistd.h      |    1 
 5 files changed, 49 insertions(+), 68 deletions(-)

Index: linux-2.6-x86_64-tif-restore-sigmask.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-x86_64-tif-restore-sigmask.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-x86_64-tif-restore-sigmask.patch	2 Jul 2006 22:30:32 -0000	1.4
+++ linux-2.6-x86_64-tif-restore-sigmask.patch	2 Jul 2006 22:40:59 -0000	1.5
@@ -70,19 +70,48 @@
 +	return -EFAULT;
  }
 diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c
-index 2816117..8b80ba2 100644
+index 2816117..7f58bc9 100644
 --- a/arch/x86_64/kernel/signal.c
 +++ b/arch/x86_64/kernel/signal.c
-@@ -32,6 +32,8 @@ #include <asm/ia32_unistd.h>
+@@ -38,37 +38,6 @@ int ia32_setup_frame(int sig, struct k_s
+             sigset_t *set, struct pt_regs * regs); 
  
- #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
- 
-+static void do_signal(struct pt_regs *regs);
-+
- int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
-                sigset_t *set, struct pt_regs * regs); 
- int ia32_setup_frame(int sig, struct k_sigaction *ka,
-@@ -341,11 +343,11 @@ #ifdef DEBUG_SIG
+ asmlinkage long
+-sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, struct pt_regs *regs)
+-{
+-	sigset_t saveset, newset;
+-
+-	/* XXX: Don't preclude handling different sized sigset_t's.  */
+-	if (sigsetsize != sizeof(sigset_t))
+-		return -EINVAL;
+-
+-	if (copy_from_user(&newset, unewset, sizeof(newset)))
+-		return -EFAULT;
+-	sigdelsetmask(&newset, ~_BLOCKABLE);
+-
+-	spin_lock_irq(&current->sighand->siglock);
+-	saveset = current->blocked;
+-	current->blocked = newset;
+-	recalc_sigpending();
+-	spin_unlock_irq(&current->sighand->siglock);
+-#ifdef DEBUG_SIG
+-	printk("rt_sigsuspend savset(%lx) newset(%lx) regs(%p) rip(%lx)\n",
+-		saveset, newset, regs, regs->rip);
+-#endif 
+-	regs->rax = -EINTR;
+-	while (1) {
+-		current->state = TASK_INTERRUPTIBLE;
+-		schedule();
+-		if (do_signal(regs, &saveset))
+-			return -EINTR;
+-	}
+-}
+-
+-asmlinkage long
+ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
+ 		struct pt_regs *regs)
+ {
+@@ -341,11 +310,11 @@ #ifdef DEBUG_SIG
  		current->comm, current->pid, frame, regs->rip, frame->pretcode);
  #endif
  
@@ -96,7 +125,7 @@
  }
  
  /*
-@@ -408,7 +410,7 @@ #ifdef CONFIG_IA32_EMULATION
+@@ -408,7 +377,7 @@ #ifdef CONFIG_IA32_EMULATION
  #endif
  	ret = setup_rt_frame(sig, ka, info, oldset, regs);
  
@@ -105,7 +134,7 @@
  		spin_lock_irq(&current->sighand->siglock);
  		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
  		if (!(ka->sa.sa_flags & SA_NODEFER))
-@@ -425,11 +427,12 @@ #endif
+@@ -425,11 +394,12 @@ #endif
   * want to handle. Thus you cannot kill init even with a SIGKILL even by
   * mistake.
   */
@@ -119,7 +148,7 @@
  
  	/*
  	 * We want the common case to go fast, which
-@@ -438,9 +441,11 @@ int do_signal(struct pt_regs *regs, sigs
+@@ -438,9 +408,11 @@ int do_signal(struct pt_regs *regs, sigs
  	 * if so.
  	 */
  	if (!user_mode(regs))
@@ -133,7 +162,7 @@
  		oldset = &current->blocked;
  
  	signr = get_signal_to_deliver(&info, &ka, regs, NULL);
-@@ -454,30 +459,46 @@ int do_signal(struct pt_regs *regs, sigs
+@@ -454,30 +426,46 @@ int do_signal(struct pt_regs *regs, sigs
  			set_debugreg(current->thread.debugreg7, 7);
  
  		/* Whee!  Actually deliver the signal.  */
@@ -188,7 +217,7 @@
  {
  #ifdef DEBUG_SIG
  	printk("do_notify_resume flags:%x rip:%lx rsp:%lx caller:%lx pending:%lx\n",
-@@ -491,8 +512,8 @@ #endif
+@@ -491,8 +479,8 @@ #endif
  	}
  
  	/* deal with pending signal delivery */
@@ -234,3 +263,15 @@
  #define _TIF_IA32		(1<<TIF_IA32)
  #define _TIF_FORK		(1<<TIF_FORK)
  #define _TIF_ABI_PENDING	(1<<TIF_ABI_PENDING)
+diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
+index 94387c9..c9db37d 100644
+--- a/include/asm-x86_64/unistd.h
++++ b/include/asm-x86_64/unistd.h
+@@ -658,6 +658,7 @@ #define __ARCH_WANT_SYS_OLDUMOUNT
+ #define __ARCH_WANT_SYS_SIGPENDING
+ #define __ARCH_WANT_SYS_SIGPROCMASK
+ #define __ARCH_WANT_SYS_RT_SIGACTION
++#define __ARCH_WANT_SYS_RT_SIGSUSPEND
+ #define __ARCH_WANT_SYS_TIME
+ #define __ARCH_WANT_COMPAT_SYS_TIME
+ 




More information about the fedora-cvs-commits mailing list