Skip to contentSkip to conversation

x86: signal.c cleanup

PATCH New Jaswinder Singh Rajput 1 participant 1 message Mar 25, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: signal.c cleanup

From: Jaswinder Singh Rajput <[email protected]>
Date: Thu, 26 Mar 2009 00:11:46 +0530
Subject: [PATCH] x86: signal.c cleanup

Impact: cleanup

---
 arch/x86/kernel/signal.c |   46 +++++++++++++++++++---------------------------
 1 files changed, 19 insertions(+), 27 deletions(-)
arch/x86/kernel/signal.c +19 -27
index 62f2164..249b7bc 100644
@@ -7,35 +7,30 @@
  *  2000-2002   x86-64 support by Andi Kleen
  */
 #include <linux/perf_counter.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/smp.h>
+#include <linux/personality.h>
+#include <linux/tracehook.h>
+#include <linux/uaccess.h>
 #include <linux/kernel.h>
+#include <linux/ptrace.h>
 #include <linux/signal.h>
+#include <linux/stddef.h>
+#include <linux/unistd.h>
 #include <linux/errno.h>
+#include <linux/sched.h>
 #include <linux/wait.h>
-#include <linux/ptrace.h>
-#include <linux/tracehook.h>
-#include <linux/unistd.h>
-#include <linux/stddef.h>
-#include <linux/personality.h>
-#include <linux/uaccess.h>
+#include <linux/smp.h>
+#include <linux/mm.h>
 
+#include <asm/ia32_unistd.h>
 #include <asm/processor.h>
+#include <asm/sigframe.h>
+#include <asm/syscalls.h>
 #include <asm/ucontext.h>
+#include <asm/syscall.h>
+#include <asm/proto.h>
 #include <asm/i387.h>
 #include <asm/vdso.h>
-
-#ifdef CONFIG_X86_64
-#include <asm/proto.h>
-#include <asm/ia32_unistd.h>
 #include <asm/mce.h>
-#endif /* CONFIG_X86_64 */
-
-#include <asm/syscall.h>
-#include <asm/syscalls.h>
-
-#include <asm/sigframe.h>
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
@@ -100,17 +95,14 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
 		COPY(r13);
 		COPY(r14);
 		COPY(r15);
-#endif /* CONFIG_X86_64 */
-
-#ifdef CONFIG_X86_32
-		COPY_SEG_CPL3(cs);
-		COPY_SEG_CPL3(ss);
-#else /* !CONFIG_X86_32 */
 		/* Kernel saves and restores only the CS segment register on signals,
 		 * which is the bare minimum needed to allow mixed 32/64-bit code.
 		 * App's signal handler can save/restore other segments if needed. */
 		COPY_SEG_CPL3(cs);
-#endif /* CONFIG_X86_32 */
+#else
+		COPY_SEG_CPL3(cs);
+		COPY_SEG_CPL3(ss);
+#endif
 
 		get_user_ex(tmpflags, &sc->flags);
 		regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
@@ -887,7 +879,7 @@ void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
 	struct task_struct *me = current;
 
 	if (show_unhandled_signals && printk_ratelimit()) {
-		printk("%s"
+		printk(KERN_INFO "%s"
 		       "%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
 		       task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
 		       me->comm, me->pid, where, frame,
Signature · 1 line
1.6.0.6