linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Mon, 07 Feb 2005 21:22:00 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/02/07 21:21:54

Modified files:
        arch/mips/kernel: Tag: linux_2_4 scall_o32.S 
        arch/mips/tools: Tag: linux_2_4 offset.c 
        arch/mips64/kernel: Tag: linux_2_4 scall_64.S scall_n32.S 
                            scall_o32.S 

Log message:
        Backport newer fix for ptrace security hole from 2.6.

diff -urN linux/arch/mips/kernel/scall_o32.S linux/arch/mips/kernel/scall_o32.S
--- linux/arch/mips/kernel/Attic/scall_o32.S    2004/11/25 09:43:59     
1.18.2.14
+++ linux/arch/mips/kernel/Attic/scall_o32.S    2005/02/07 21:21:53     
1.18.2.15
@@ -121,15 +121,14 @@
 
 trace_a_syscall:
        SAVE_STATIC
-       sw      t2, PT_SCRATCH0(sp)
+       move    s0, t2
        jal     syscall_trace
-       lw      t2, PT_SCRATCH0(sp)
 
        lw      a0, PT_R4(sp)           # Restore argument registers
        lw      a1, PT_R5(sp)
        lw      a2, PT_R6(sp)
        lw      a3, PT_R7(sp)
-       jalr    t2
+       jalr    s0
 
        li      t0, -EMAXERRNO - 1      # error?
        sltu    t0, t0, v0
diff -urN linux/arch/mips/tools/offset.c linux/arch/mips/tools/offset.c
--- linux/arch/mips/tools/Attic/offset.c        2004/11/25 09:43:59     
1.16.4.12
+++ linux/arch/mips/tools/Attic/offset.c        2005/02/07 21:21:54     
1.16.4.13
@@ -12,7 +12,6 @@
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
-#include <linux/signal.h>
 
 #include <asm/ptrace.h>
 #include <asm/processor.h>
@@ -37,9 +36,6 @@
 void output_ptreg_defines(void)
 {
        text("/* MIPS pt_regs offsets. */");
-       offset("#define PT_SCRATCH0 ", struct pt_regs, pad0[4]);
-       offset("#define PT_SCRATCH1 ", struct pt_regs, pad0[5]);
-
        offset("#define PT_R0     ", struct pt_regs, regs[0]);
        offset("#define PT_R1     ", struct pt_regs, regs[1]);
        offset("#define PT_R2     ", struct pt_regs, regs[2]);
diff -urN linux/arch/mips64/kernel/scall_64.S 
linux/arch/mips64/kernel/scall_64.S
--- linux/arch/mips64/kernel/Attic/scall_64.S   2004/11/25 09:43:59     
1.20.2.20
+++ linux/arch/mips64/kernel/Attic/scall_64.S   2005/02/07 21:21:54     
1.20.2.21
@@ -102,15 +102,14 @@
 
 trace_a_syscall:
        SAVE_STATIC
-       sd      t2, PT_SCRATCH0(sp)
+       move    s0, t2
        jal     syscall_trace
-       ld      t2, PT_SCRATCH0(sp)
 
        ld      a0, PT_R4(sp)           # Restore argument registers
        ld      a1, PT_R5(sp)
        ld      a2, PT_R6(sp)
        ld      a3, PT_R7(sp)
-       jalr    t2
+       jalr    s0
 
        li      t0, -EMAXERRNO - 1      # error?
        sltu    t0, t0, v0
diff -urN linux/arch/mips64/kernel/scall_n32.S 
linux/arch/mips64/kernel/scall_n32.S
--- linux/arch/mips64/kernel/Attic/scall_n32.S  2004/11/25 09:43:59     1.2.2.17
+++ linux/arch/mips64/kernel/Attic/scall_n32.S  2005/02/07 21:21:54     1.2.2.18
@@ -106,15 +106,14 @@
 
 trace_a_syscall:
        SAVE_STATIC
-       sd      t2, PT_SCRATCH0(sp)
+       move    s0, t2
        jal     syscall_trace
-       ld      t2, PT_SCRATCH0(sp)
 
        ld      a0, PT_R4(sp)           # Restore argument registers
        ld      a1, PT_R5(sp)
        ld      a2, PT_R6(sp)
        ld      a3, PT_R7(sp)
-       jalr    t2
+       jalr    s0
 
        li      t0, -EMAXERRNO - 1      # error?
        sltu    t0, t0, v0
diff -urN linux/arch/mips64/kernel/scall_o32.S 
linux/arch/mips64/kernel/scall_o32.S
--- linux/arch/mips64/kernel/Attic/scall_o32.S  2004/11/25 09:43:59     
1.48.2.33
+++ linux/arch/mips64/kernel/Attic/scall_o32.S  2005/02/07 21:21:54     
1.48.2.34
@@ -118,9 +118,8 @@
        sd      a6, PT_R10(sp)
        sd      a7, PT_R11(sp)
 
-       sd      t2, PT_SCRATCH0(sp)
+       move    s0, t2
        jal     syscall_trace
-       ld      t2, PT_SCRATCH0(sp)
 
        ld      a0, PT_R4(sp)           # Restore argument registers
        ld      a1, PT_R5(sp)
@@ -129,7 +128,7 @@
        ld      a4, PT_R8(sp)
        ld      a5, PT_R9(sp)
 
-       jalr    t2
+       jalr    s0
 
        li      t0, -EMAXERRNO - 1      # error?
        sltu    t0, t0, v0

<Prev in Thread] Current Thread [Next in Thread>