r1978 - in trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27: . debian debian/patches

Thiemo Seufer ths-guest@haydn.debian.org
Mon, 06 Dec 2004 04:27:33 -0700


Author: ths-guest
Date: 2004-12-06 04:27:04 -0700 (Mon, 06 Dec 2004)
New Revision: 1978

Added:
   trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/06_ptrace-fix.dpatch
   trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/07_mips32-tlb.dpatch
   trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/11_cobalt-tulip.dpatch
Modified:
   trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/
   trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/
   trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/changelog
Log:
Acutally add 06_ptrace-fix.dpatch, 07_mips32-tlb.dpatch, 11_cobalt-tulip.dpatch



Property changes on: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27
___________________________________________________________________
Name: svn:ignore
   + source-patch-stamp
source-unpack-stamp
build-tmp



Property changes on: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian
___________________________________________________________________
Name: svn:ignore
   + mips-tools.substvars
files
mips-tools


Modified: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/changelog
===================================================================
--- trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/changelog	2004-12-06 03:26:30 UTC (rev 1977)
+++ trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/changelog	2004-12-06 11:27:04 UTC (rev 1978)
@@ -1,4 +1,4 @@
-kernel-patch-2.4.27-mips (2.4.27-6.040815-1) UNRELEASED; urgency=low
+kernel-patch-2.4.27-mips (2.4.27-6.040815-1) unstable; urgency=low
 
   * Update to debian kernel source 2.4.27-6, mainly for security fixes.
     See kernel source changelog for details.

Added: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/06_ptrace-fix.dpatch
===================================================================
--- trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/06_ptrace-fix.dpatch	2004-12-06 03:26:30 UTC (rev 1977)
+++ trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/06_ptrace-fix.dpatch	2004-12-06 11:27:04 UTC (rev 1978)
@@ -0,0 +1,130 @@
+#! /bin/sh -e
+## 06_ptrace-fix.dpatch by Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix exploitable ptrace syscall handling, backport from 2.4.28.
+
+if [ $# -lt 1 ]; then
+    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+    -patch) patch -p0 ${patch_opts} < $0;;
+    -unpatch) patch -R -p0 ${patch_opts} < $0;;
+    *)
+        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+        exit 1;;
+esac
+
+exit 0
+
+Index: arch/mips/kernel/scall_o32.S
+===================================================================
+RCS file: /home/cvs/linux/arch/mips/kernel/Attic/scall_o32.S,v
+retrieving revision 1.18.2.13
+retrieving revision 1.18.2.14
+diff -u -p -r1.18.2.13 -r1.18.2.14
+--- arch/mips/kernel/scall_o32.S	26 Apr 2004 15:06:02 -0000	1.18.2.13
++++ arch/mips/kernel/scall_o32.S	25 Nov 2004 09:43:59 -0000	1.18.2.14
+@@ -121,9 +121,9 @@ reschedule:
+ 
+ trace_a_syscall:
+ 	SAVE_STATIC
+-	sw	t2, PT_R1(sp)
++	sw	t2, PT_SCRATCH0(sp)
+ 	jal	syscall_trace
+-	lw	t2, PT_R1(sp)
++	lw	t2, PT_SCRATCH0(sp)
+ 
+ 	lw	a0, PT_R4(sp)		# Restore argument registers
+ 	lw	a1, PT_R5(sp)
+Index: arch/mips/tools/offset.c
+===================================================================
+RCS file: /home/cvs/linux/arch/mips/tools/Attic/offset.c,v
+retrieving revision 1.16.4.11
+retrieving revision 1.16.4.12
+diff -u -p -r1.16.4.11 -r1.16.4.12
+--- arch/mips/tools/offset.c	17 Oct 2003 10:41:11 -0000	1.16.4.11
++++ arch/mips/tools/offset.c	25 Nov 2004 09:43:59 -0000	1.16.4.12
+@@ -12,6 +12,7 @@
+ #include <linux/types.h>
+ #include <linux/sched.h>
+ #include <linux/mm.h>
++#include <linux/signal.h>
+ 
+ #include <asm/ptrace.h>
+ #include <asm/processor.h>
+@@ -36,6 +37,9 @@ linefeed;
+ 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]);
+Index: arch/mips64/kernel/scall_64.S
+===================================================================
+RCS file: /home/cvs/linux/arch/mips64/kernel/Attic/scall_64.S,v
+retrieving revision 1.20.2.19
+retrieving revision 1.20.2.20
+diff -u -p -r1.20.2.19 -r1.20.2.20
+--- arch/mips64/kernel/scall_64.S	26 Apr 2004 15:06:02 -0000	1.20.2.19
++++ arch/mips64/kernel/scall_64.S	25 Nov 2004 09:43:59 -0000	1.20.2.20
+@@ -102,9 +102,9 @@ _64_reschedule:
+ 
+ trace_a_syscall:
+ 	SAVE_STATIC
+-	sd	t2,PT_R1(sp)
++	sd	t2, PT_SCRATCH0(sp)
+ 	jal	syscall_trace
+-	ld	t2,PT_R1(sp)
++	ld	t2, PT_SCRATCH0(sp)
+ 
+ 	ld	a0, PT_R4(sp)		# Restore argument registers
+ 	ld	a1, PT_R5(sp)
+Index: arch/mips64/kernel/scall_n32.S
+===================================================================
+RCS file: /home/cvs/linux/arch/mips64/kernel/Attic/scall_n32.S,v
+retrieving revision 1.2.2.16
+retrieving revision 1.2.2.17
+diff -u -p -r1.2.2.16 -r1.2.2.17
+--- arch/mips64/kernel/scall_n32.S	26 Apr 2004 15:06:02 -0000	1.2.2.16
++++ arch/mips64/kernel/scall_n32.S	25 Nov 2004 09:43:59 -0000	1.2.2.17
+@@ -106,9 +106,9 @@ n32_reschedule:
+ 
+ trace_a_syscall:
+ 	SAVE_STATIC
+-	sd	t2,PT_R1(sp)
++	sd	t2, PT_SCRATCH0(sp)
+ 	jal	syscall_trace
+-	ld	t2,PT_R1(sp)
++	ld	t2, PT_SCRATCH0(sp)
+ 
+ 	ld	a0, PT_R4(sp)		# Restore argument registers
+ 	ld	a1, PT_R5(sp)
+Index: arch/mips64/kernel/scall_o32.S
+===================================================================
+RCS file: /home/cvs/linux/arch/mips64/kernel/Attic/scall_o32.S,v
+retrieving revision 1.48.2.32
+retrieving revision 1.48.2.33
+diff -u -p -r1.48.2.32 -r1.48.2.33
+--- arch/mips64/kernel/scall_o32.S	26 Apr 2004 15:06:02 -0000	1.48.2.32
++++ arch/mips64/kernel/scall_o32.S	25 Nov 2004 09:43:59 -0000	1.48.2.33
+@@ -118,9 +118,9 @@ trace_a_syscall:
+ 	sd	a6, PT_R10(sp)
+ 	sd	a7, PT_R11(sp)
+ 
+-	sd	t2,PT_R1(sp)
++	sd	t2, PT_SCRATCH0(sp)
+ 	jal	syscall_trace
+-	ld	t2,PT_R1(sp)
++	ld	t2, PT_SCRATCH0(sp)
+ 
+ 	ld	a0, PT_R4(sp)		# Restore argument registers
+ 	ld	a1, PT_R5(sp)


Property changes on: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/06_ptrace-fix.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/07_mips32-tlb.dpatch
===================================================================
--- trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/07_mips32-tlb.dpatch	2004-12-06 03:26:30 UTC (rev 1977)
+++ trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/07_mips32-tlb.dpatch	2004-12-06 11:27:04 UTC (rev 1978)
@@ -0,0 +1,41 @@
+#! /bin/sh -e
+## 07_mips32-tlb.dpatch by Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix TLB handling error for MIPS32 CPUs.
+
+if [ $# -lt 1 ]; then
+    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+    -patch) patch -p0 ${patch_opts} < $0;;
+    -unpatch) patch -R -p0 ${patch_opts} < $0;;
+    *)
+        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+        exit 1;;
+esac
+
+exit 0
+
+Index: arch/mips/mm/tlbex-mips32.S
+===================================================================
+RCS file: /home/cvs/linux/arch/mips/mm/Attic/tlbex-mips32.S,v
+retrieving revision 1.1.2.2
+retrieving revision 1.1.2.3
+diff -u -p -r1.1.2.2 -r1.1.2.3
+--- arch/mips/mm/tlbex-mips32.S	31 Oct 2003 00:51:34 -0000	1.1.2.2
++++ arch/mips/mm/tlbex-mips32.S	28 Nov 2004 23:33:15 -0000	1.1.2.3
+@@ -196,7 +196,7 @@
+ 	.set	noat; \
+ 	SAVE_ALL; \
+ 	mfc0	a2, CP0_BADVADDR; \
+-	STI; \
++	KMODE; \
+ 	.set	at; \
+ 	move	a0, sp; \
+ 	jal	do_page_fault; \


Property changes on: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/07_mips32-tlb.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/11_cobalt-tulip.dpatch
===================================================================
--- trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/11_cobalt-tulip.dpatch	2004-12-06 03:26:30 UTC (rev 1977)
+++ trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/11_cobalt-tulip.dpatch	2004-12-06 11:27:04 UTC (rev 1978)
@@ -0,0 +1,44 @@
+#! /bin/sh -e
+## 11_cobalt-tulip.dpatch by Peter Horton <pdh@colonel-panic.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Cobalt tulip ethernet for 2.4.
+
+if [ $# -lt 1 ]; then
+    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+    -patch) patch -p1 ${patch_opts} < $0;;
+    -unpatch) patch -R -p1 ${patch_opts} < $0;;
+    *)
+        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+        exit 1;;
+esac
+
+exit 0
+
+diff -urpN linux-2.4.27-r5k-cobalt/arch/mips/cobalt/pci.c linux-2.4.27-r5k-cobalt-2700/arch/mips/cobalt/pci.c
+--- linux-2.4.27-r5k-cobalt/arch/mips/cobalt/pci.c	2004-11-07 10:53:19.000000000 +0000
++++ linux-2.4.27-r5k-cobalt-2700/arch/mips/cobalt/pci.c	2004-11-28 10:14:46.000000000 +0000
+@@ -132,6 +132,8 @@ static void qube_raq_tulip_fixup(struct 
+ 		pci_write_config_byte(dev, PCI_INTERRUPT_LINE,
+ 				      COBALT_ETH0_IRQ);
+ 		dev->irq = COBALT_ETH0_IRQ;
++		if(dev->device == PCI_DEVICE_ID_DEC_TULIP_PLUS)
++			dev->irq = COBALT_ETH1_IRQ;
+ 
+ 		dev->resource[0].start = 0x100000;
+ 		dev->resource[0].end = 0x10007f;
+@@ -263,6 +265,7 @@ qube_pcibios_fixup(struct pci_dev *dev)
+ struct pci_fixup pcibios_fixups[] = {
+ 	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, qube_raq_via_bmIDE_fixup },
+ 	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, qube_raq_tulip_fixup },
++	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, qube_raq_tulip_fixup },
+ 	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_GALILEO, PCI_ANY_ID, qube_raq_galileo_fixup },
+ 	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C860, qube_raq_scsi_fixup },
+ 	{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, qube_pcibios_fixup }


Property changes on: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/11_cobalt-tulip.dpatch
___________________________________________________________________
Name: svn:executable
   + *