Setting tag linux-2.6-22-50
[linux-2.6.git] / linux-2.6-590-chopstix-intern.patch
index daf166a..d9a0c9a 100644 (file)
@@ -64,6 +64,42 @@ diff -Nurb --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags
        OFFSET(TI_exec_domain, thread_info, exec_domain);
        OFFSET(TI_flags, thread_info, flags);
        OFFSET(TI_status, thread_info, status);
+--- linux-2.6.22-590/arch/i386/kernel/entry.S  2009-03-16 20:49:07.000000000 -0400
++++ linux-2.6.22-591/arch/i386/kernel/entry.S  2009-03-16 20:58:59.000000000 -0400
+@@ -374,6 +374,33 @@
+       cmpl $(nr_syscalls), %eax
+       jae syscall_badsys
+ syscall_call:
++    /* Move Chopstix syscall probe here */
++    /* Save and clobber: eax, ecx, ebp  */
++    pushl   %eax
++    pushl   %ecx
++    pushl   %ebp
++    movl    %esp, %ebp
++    subl    $SPEC_EVENT_SIZE, %esp 
++    movl    rec_event, %ecx
++    testl   %ecx, %ecx
++    jz  carry_on
++    # struct event is first, just below %ebp
++    movl    %eax, (SPEC_number-EVENT_SIZE)(%ebp)
++    leal    -SPEC_EVENT_SIZE(%ebp), %eax
++    movl    %eax, EVENT_event_data(%ebp)
++    movl    $6, EVENT_event_type(%ebp)
++    movl    rec_event, %edx
++    movl    $1, 4(%esp)
++    leal    -EVENT_SIZE(%ebp), %eax
++    movl    %eax, (%esp)
++    call    rec_event_asm 
++carry_on: 
++    addl $SPEC_EVENT_SIZE, %esp
++    popl %ebp
++    popl %ecx
++    popl %eax
++     /* End chopstix */
++
+       call *sys_call_table(,%eax,4)
+       movl %eax,PT_EAX(%esp)          # store the return value
+ syscall_exit:
 --- linux-2.6.22-590/arch/i386/mm/fault.c      2009-03-16 20:49:42.000000000 -0400
 +++ linux-2.6.22-591/arch/i386/mm/fault.c      2009-03-16 20:58:59.000000000 -0400
 @@ -60,6 +60,15 @@
@@ -263,8 +299,8 @@ diff -Nurb --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags
        if (bio->bi_end_io)
                bio->bi_end_io(bio, bytes_done, error);
  }
---- linux-2.6.22-590/fs/exec.c 2009-03-16 20:49:42.000000000 -0400
-+++ linux-2.6.22-591/fs/exec.c 2009-03-16 20:58:59.000000000 -0400
+--- linux-2.6.22-580/fs/exec.c 2009-04-08 16:36:16.000000000 -0400
++++ linux-2.6.22-590/fs/exec.c 2009-04-08 16:40:34.000000000 -0400
 @@ -27,6 +27,7 @@
  #include <linux/mman.h>
  #include <linux/a.out.h>
@@ -282,20 +318,21 @@ diff -Nurb --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags
  #include <linux/module.h>
  #include <linux/namei.h>
  #include <linux/proc_fs.h>
-@@ -488,6 +489,12 @@
+@@ -488,6 +489,13 @@
  
        if (!err) {
                struct inode *inode = nd.dentry->d_inode;
 +#ifdef CONFIG_CHOPSTIX
 +              unsigned long cookie;
-+              if (!nd.dentry->d_cookie)
++        extern void (*rec_event)(void *, unsigned int);
++              if (rec_event && !nd.dentry->d_cookie)
 +                      get_dcookie(nd.dentry, nd.mnt, &cookie);
 +#endif
 +
                file = ERR_PTR(-EACCES);
                if (!(nd.mnt->mnt_flags & MNT_NOEXEC) &&
                    S_ISREG(inode->i_mode)) {
-@@ -627,8 +634,10 @@
+@@ -627,8 +635,10 @@
         * Reparenting needs write_lock on tasklist_lock,
         * so it is safe to do it under read_lock.
         */
@@ -898,3 +935,4 @@ diff -Nurb --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags
        local_irq_restore(flags);
  }
  EXPORT_SYMBOL(kfree);
+