Merge branch 'linus' into cpus4096
[linux-2.6-block.git] / arch / x86 / ia32 / ia32_aout.c
index f1a0f83676dc3de1245afcf99f5d596aa4f9dc5d..a0e1dbe67dc145cd437661ea2f472c9865e08578 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/binfmts.h>
 #include <linux/personality.h>
 #include <linux/init.h>
+#include <linux/jiffies.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -171,8 +172,7 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file,
        has_dumped = 1;
        current->flags |= PF_DUMPCORE;
        strncpy(dump.u_comm, current->comm, sizeof(current->comm));
-       dump.u_ar0 = (u32)(((unsigned long)(&dump.regs)) -
-                          ((unsigned long)(&dump)));
+       dump.u_ar0 = offsetof(struct user32, regs);
        dump.signal = signr;
        dump_thread32(regs, &dump);
 
@@ -359,13 +359,14 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
 #ifdef WARN_OLD
                static unsigned long error_time, error_time2;
                if ((ex.a_text & 0xfff || ex.a_data & 0xfff) &&
-                   (N_MAGIC(ex) != NMAGIC) && (jiffies-error_time2) > 5*HZ) {
+                   (N_MAGIC(ex) != NMAGIC) &&
+                               time_after(jiffies, error_time2 + 5*HZ)) {
                        printk(KERN_NOTICE "executable not page aligned\n");
                        error_time2 = jiffies;
                }
 
                if ((fd_offset & ~PAGE_MASK) != 0 &&
-                   (jiffies - error_time) > 5*HZ) {
+                           time_after(jiffies, error_time + 5*HZ)) {
                        printk(KERN_WARNING
                               "fd_offset is not page aligned. Please convert "
                               "program: %s\n",
@@ -440,12 +441,6 @@ beyond_if:
        regs->r8 = regs->r9 = regs->r10 = regs->r11 =
        regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0;
        set_fs(USER_DS);
-       if (unlikely(current->ptrace & PT_PTRACED)) {
-               if (current->ptrace & PT_TRACE_EXEC)
-                       ptrace_notify((PTRACE_EVENT_EXEC << 8) | SIGTRAP);
-               else
-                       send_sig(SIGTRAP, current, 0);
-       }
        return 0;
 }
 
@@ -484,7 +479,7 @@ static int load_aout_library(struct file *file)
 
 #ifdef WARN_OLD
                static unsigned long error_time;
-               if ((jiffies-error_time) > 5*HZ) {
+               if (time_after(jiffies, error_time + 5*HZ)) {
                        printk(KERN_WARNING
                               "N_TXTOFF is not page aligned. Please convert "
                               "library: %s\n",