Merge branch 'x86/cleanups' into x86/signal
authorIngo Molnar <mingo@elte.hu>
Sat, 6 Sep 2008 12:53:20 +0000 (14:53 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 6 Sep 2008 12:53:20 +0000 (14:53 +0200)
Conflicts:
arch/x86/kernel/signal_64.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 files changed:
1  2 
arch/x86/boot/compressed/misc.c
arch/x86/ia32/ia32_signal.c
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/process_64.c
arch/x86/kernel/sigframe.h
arch/x86/kernel/signal_64.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/sys_x86_64.c
arch/x86/kernel/traps_64.c
include/asm-x86/apic.h
include/asm-x86/asm.h
include/asm-x86/elf.h
include/asm-x86/resume-trace.h

Simple merge
Simple merge
Simple merge
Simple merge
index 6dd7e2b70a4b8d8e0994760698025e384058c68e,8b4956e800acd4394c06e303989982c85ad04e53..cc673aa55ce4d8fb7eeb82e8cd21a773ca8f6213
@@@ -32,6 -23,10 +32,11 @@@ struct rt_sigframe 
        char __user *pretcode;
        struct ucontext uc;
        struct siginfo info;
 +      /* fp state follows here */
  };
+ 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,
+               sigset_t *set, struct pt_regs *regs);
  #endif
index 2f28252d2d26cfeb847be6c2116340aa5c0f5b51,162da796a323d2140ca2236984cc7b8816f507cf..823a55bf8c3901d4c429073c445bb1ddcc21643d
@@@ -98,9 -154,20 +94,9 @@@ restore_sigcontext(struct pt_regs *regs
        }
  
        {
-               struct _fpstate __user * buf;
+               struct _fpstate __user *buf;
                err |= __get_user(buf, &sc->fpstate);
 -
 -              if (buf) {
 -                      if (!access_ok(VERIFY_READ, buf, sizeof(*buf)))
 -                              goto badframe;
 -                      err |= restore_i387(buf);
 -              } else {
 -                      struct task_struct *me = current;
 -                      if (used_math()) {
 -                              clear_fpu(me);
 -                              clear_used_math();
 -                      }
 -              }
 +              err |= restore_i387_xstate(buf);
        }
  
        err |= __get_user(*pax, &sc->ax);
@@@ -199,10 -270,10 +196,10 @@@ get_stack(struct k_sigaction *ka, struc
  }
  
  static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
-                          sigset_t *set, struct pt_regs * regs)
+                          sigset_t *set, struct pt_regs *regs)
  {
        struct rt_sigframe __user *frame;
 -      struct _fpstate __user *fp = NULL;
 +      void __user *fp = NULL;
        int err = 0;
        struct task_struct *me = current;
  
                frame = (void __user *)round_down(
                        (unsigned long)fp - sizeof(struct rt_sigframe), 16) - 8;
  
 -              if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate)))
 -                      goto give_sigsegv;
 -
 -              if (save_i387(fp) < 0)
 +              if (save_i387_xstate(fp) < 0)
-                       err |= -1; 
+                       err |= -1;
        } else
                frame = get_stack(ka, regs, sizeof(struct rt_sigframe)) - 8;
  
                if (err)
                        goto give_sigsegv;
        }
-               
        /* Create the ucontext.  */
 -      err |= __put_user(0, &frame->uc.uc_flags);
 +      if (cpu_has_xsave)
 +              err |= __put_user(UC_FP_XSTATE, &frame->uc.uc_flags);
 +      else
 +              err |= __put_user(0, &frame->uc.uc_flags);
        err |= __put_user(0, &frame->uc.uc_link);
        err |= __put_user(me->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
        err |= __put_user(sas_ss_flags(regs->sp),
@@@ -280,9 -351,38 +277,9 @@@ give_sigsegv
        return -EFAULT;
  }
  
 -/*
 - * Return -1L or the syscall number that @regs is executing.
 - */
 -static long current_syscall(struct pt_regs *regs)
 -{
 -      /*
 -       * We always sign-extend a -1 value being set here,
 -       * so this is always either -1L or a syscall number.
 -       */
 -      return regs->orig_ax;
 -}
 -
 -/*
 - * Return a value that is -EFOO if the system call in @regs->orig_ax
 - * returned an error.  This only works for @regs from @current.
 - */
 -static long current_syscall_ret(struct pt_regs *regs)
 -{
 -#ifdef CONFIG_IA32_EMULATION
 -      if (test_thread_flag(TIF_IA32))
 -              /*
 -               * Sign-extend the value so (int)-EFOO becomes (long)-EFOO
 -               * and will match correctly in comparisons.
 -               */
 -              return (int) regs->ax;
 -#endif
 -      return regs->ax;
 -}
 -
  /*
   * OK, we're invoking a handler
-  */   
+  */
  
  static int
  handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
                 * handler too.
                 */
                regs->flags &= ~X86_EFLAGS_TF;
 -              if (test_thread_flag(TIF_SINGLESTEP))
 -                      ptrace_notify(SIGTRAP);
  
                spin_lock_irq(&current->sighand->siglock);
-               sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+               sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
                if (!(ka->sa.sa_flags & SA_NODEFER))
-                       sigaddset(&current->blocked,sig);
+                       sigaddset(&current->blocked, sig);
                recalc_sigpending();
                spin_unlock_irq(&current->sighand->siglock);
 +
 +              tracehook_signal_handler(sig, info, ka, regs,
 +                                       test_thread_flag(TIF_SINGLESTEP));
        }
  
        return ret;
Simple merge
index c9288c883e20cf21f0de84a2d61df7e6b69e12fd,56eb8f916e9fdcc1edd1342eb4f540f331c31336..6bc211accf087ed2be1a381395eae95093f4dbf4
  #include <linux/utsname.h>
  #include <linux/personality.h>
  #include <linux/random.h>
+ #include <linux/uaccess.h>
  
- #include <asm/uaccess.h>
  #include <asm/ia32.h>
 +#include <asm/syscalls.h>
  
- asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags,
-       unsigned long fd, unsigned long off)
+ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
+               unsigned long prot, unsigned long flags,
+               unsigned long fd, unsigned long off)
  {
        long error;
-       struct file * file;
+       struct file *file;
  
        error = -EINVAL;
        if (off & ~PAGE_MASK)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge