[kernel] r13407 - in dists/etch-security/linux-2.6/debian/patches: bugfix/all/CVE-2009-0029 series

Dann Frazier dannf at alioth.debian.org
Mon Apr 13 00:16:14 UTC 2009


Author: dannf
Date: Mon Apr 13 00:16:12 2009
New Revision: 13407

Log:
arch-specific fixes for CVE-2009-0029

Added:
   dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/alpha-use-syscall-wrappers.patch
      - copied, changed from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/alpha-use-syscall-wrappers.patch
   dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/compat-zero-upper-32bits-of-offset_high-and-offset_low.patch
      - copied, changed from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/compat-zero-upper-32bits-of-offset_high-and-offset_low.patch
   dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/fix-uml-compile.patch
      - copied unchanged from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/fix-uml-compile.patch
   dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers-no-abi-change.patch
      - copied, changed from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers-no-abi-change.patch
   dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers.patch
      - copied, changed from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers.patch
   dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/sparc64-use-syscall-wrappers.patch
      - copied unchanged from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/sparc64-use-syscall-wrappers.patch
   dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/sparc64-wrap-arch-specific-syscalls.patch
      - copied, changed from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/sparc64-wrap-arch-specific-syscalls.patch
Deleted:
   dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/mips-finish-fixing-CVE-2009-0029.patch
   dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/mips-wire-up-o32-syscall-to-the-right-function.patch
Modified:
   dists/etch-security/linux-2.6/debian/patches/series/24etch1

Copied and modified: dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/alpha-use-syscall-wrappers.patch (from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/alpha-use-syscall-wrappers.patch)
==============================================================================
--- dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/alpha-use-syscall-wrappers.patch	Sun Apr 12 22:42:16 2009	(r13406, copy source)
+++ dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/alpha-use-syscall-wrappers.patch	Mon Apr 13 00:16:12 2009	(r13407)
@@ -12,11 +12,11 @@
     Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
     Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
 
-Backported to Debian's 2.6.24 by dann frazier <dannf at debian.org>
+Backported to Debian's 2.6.18 by dann frazier <dannf at debian.org>
 
 diff -urpN a/arch/alpha/Kconfig b/arch/alpha/Kconfig
---- a/arch/alpha/Kconfig	2008-01-24 15:58:37.000000000 -0700
-+++ b/arch/alpha/Kconfig	2009-04-05 19:40:50.000000000 -0600
+--- a/arch/alpha/Kconfig	2009-04-12 17:33:00.000000000 -0600
++++ b/arch/alpha/Kconfig	2009-04-12 17:49:06.000000000 -0600
 @@ -5,6 +5,7 @@
  config ALPHA
  	bool
@@ -26,9 +26,9 @@
  	  The Alpha is a 64-bit general-purpose processor designed and
  	  marketed by the Digital Equipment Corporation of blessed memory,
 diff -urpN a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
---- a/arch/alpha/kernel/entry.S	2009-04-05 19:32:23.000000000 -0600
-+++ b/arch/alpha/kernel/entry.S	2009-04-05 19:40:15.000000000 -0600
-@@ -931,7 +931,7 @@ sys_execve:
+--- a/arch/alpha/kernel/entry.S	2009-04-12 17:33:08.000000000 -0600
++++ b/arch/alpha/kernel/entry.S	2009-04-12 17:49:06.000000000 -0600
+@@ -941,7 +941,7 @@ sys_execve:
  osf_sigprocmask:
  	.prologue 0
  	mov	$sp, $18
@@ -38,8 +38,8 @@
  
  	.align	4
 diff -urpN a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
---- a/arch/alpha/kernel/osf_sys.c	2008-01-24 15:58:37.000000000 -0700
-+++ b/arch/alpha/kernel/osf_sys.c	2009-04-05 19:40:15.000000000 -0600
+--- a/arch/alpha/kernel/osf_sys.c	2006-09-19 21:42:06.000000000 -0600
++++ b/arch/alpha/kernel/osf_sys.c	2009-04-12 17:49:06.000000000 -0600
 @@ -55,8 +55,7 @@ extern int do_pipe(int *);
   * identical to OSF as we don't return 0 on success, but doing otherwise
   * would require changes to libc.  Hopefully this is good enough.
@@ -63,7 +63,7 @@
  {
  	struct mm_struct *mm;
  
-@@ -141,9 +140,9 @@ osf_filldir(void *__buf, const char *nam
+@@ -138,9 +137,9 @@ osf_filldir(void *__buf, const char *nam
  	return 0;
  }
  
@@ -76,8 +76,8 @@
  {
  	int error;
  	struct file *file;
-@@ -175,9 +174,9 @@ osf_getdirentries(unsigned int fd, struc
- 
+@@ -173,9 +172,9 @@ osf_getdirentries(unsigned int fd, struc
+ #undef ROUND_UP
  #undef NAME_OFFSET
  
 -asmlinkage unsigned long
@@ -89,7 +89,7 @@
  {
  	struct file *file = NULL;
  	unsigned long ret = -EBADF;
-@@ -252,8 +251,8 @@ do_osf_statfs(struct dentry * dentry, st
+@@ -250,8 +249,8 @@ do_osf_statfs(struct dentry * dentry, st
  	return error;	
  }
  
@@ -100,7 +100,7 @@
  {
  	struct nameidata nd;
  	int retval;
-@@ -266,8 +265,8 @@ osf_statfs(char __user *path, struct osf
+@@ -264,8 +263,8 @@ osf_statfs(char __user *path, struct osf
  	return retval;
  }
  
@@ -111,7 +111,7 @@
  {
  	struct file *file;
  	int retval;
-@@ -366,8 +365,8 @@ osf_procfs_mount(char *dirname, struct p
+@@ -364,8 +363,8 @@ osf_procfs_mount(char *dirname, struct p
  	return do_mount("", dirname, "proc", flags, NULL);
  }
  
@@ -122,7 +122,7 @@
  {
  	int retval = -EINVAL;
  	char *name;
-@@ -397,8 +396,7 @@ osf_mount(unsigned long typenr, char __u
+@@ -395,8 +394,7 @@ osf_mount(unsigned long typenr, char __u
  	return retval;
  }
  
@@ -132,7 +132,7 @@
  {
  	int error;
  
-@@ -421,14 +419,12 @@ osf_utsname(char __user *name)
+@@ -419,14 +417,12 @@ osf_utsname(char __user *name)
  	return error;
  }
  
@@ -149,7 +149,7 @@
  {
  	return NR_OPEN;
  }
-@@ -436,8 +432,7 @@ sys_getdtablesize(void)
+@@ -434,8 +430,7 @@ sys_getdtablesize(void)
  /*
   * For compatibility with OSF/1 only.  Use utsname(2) instead.
   */
@@ -159,7 +159,7 @@
  {
  	unsigned len;
  	int i;
-@@ -525,8 +520,8 @@ enum pl_code {
+@@ -523,8 +518,8 @@ enum pl_code {
  	PL_DEL = 5, PL_FDEL = 6
  };
  
@@ -170,7 +170,7 @@
  {
  	long error;
  	int __user *min_buf_size_ptr;
-@@ -565,8 +560,8 @@ osf_proplist_syscall(enum pl_code code, 
+@@ -563,8 +558,8 @@ osf_proplist_syscall(enum pl_code code, 
  	return error;
  }
  
@@ -181,7 +181,7 @@
  {
  	unsigned long usp = rdusp();
  	unsigned long oss_sp = current->sas_ss_sp + current->sas_ss_size;
-@@ -606,8 +601,7 @@ osf_sigstack(struct sigstack __user *uss
+@@ -604,8 +599,7 @@ osf_sigstack(struct sigstack __user *uss
  	return error;
  }
  
@@ -189,9 +189,9 @@
 -osf_sysinfo(int command, char __user *buf, long count)
 +SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
  {
- 	char *sysinfo_table[] = {
- 		utsname()->sysname,
-@@ -645,9 +639,8 @@ osf_sysinfo(int command, char __user *bu
+ 	static char * sysinfo_table[] = {
+ 		system_utsname.sysname,
+@@ -643,9 +637,8 @@ osf_sysinfo(int command, char __user *bu
  	return err;
  }
  
@@ -203,7 +203,7 @@
  {
  	unsigned long w;
  	struct percpu_struct *cpu;
-@@ -703,9 +696,8 @@ osf_getsysinfo(unsigned long op, void __
+@@ -701,9 +694,8 @@ osf_getsysinfo(unsigned long op, void __
  	return -EOPNOTSUPP;
  }
  
@@ -215,7 +215,7 @@
  {
  	switch (op) {
  	case SSI_IEEE_FP_CONTROL: {
-@@ -878,8 +870,8 @@ jiffies_to_timeval32(unsigned long jiffi
+@@ -876,8 +868,8 @@ jiffies_to_timeval32(unsigned long jiffi
  	value->tv_sec = jiffies / HZ;
  }
  
@@ -226,7 +226,7 @@
  {
  	if (tv) {
  		struct timeval ktv;
-@@ -894,8 +886,8 @@ osf_gettimeofday(struct timeval32 __user
+@@ -892,8 +884,8 @@ osf_gettimeofday(struct timeval32 __user
  	return 0;
  }
  
@@ -237,7 +237,7 @@
  {
  	struct timespec kts;
  	struct timezone ktz;
-@@ -914,8 +906,7 @@ osf_settimeofday(struct timeval32 __user
+@@ -912,8 +904,7 @@ osf_settimeofday(struct timeval32 __user
  	return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
  }
  
@@ -247,7 +247,7 @@
  {
  	struct itimerval kit;
  	int error;
-@@ -927,8 +918,8 @@ osf_getitimer(int which, struct itimerva
+@@ -925,8 +916,8 @@ osf_getitimer(int which, struct itimerva
  	return error;
  }
  
@@ -258,7 +258,7 @@
  {
  	struct itimerval kin, kout;
  	int error;
-@@ -950,8 +941,8 @@ osf_setitimer(int which, struct itimerva
+@@ -948,8 +939,8 @@ osf_setitimer(int which, struct itimerva
  
  }
  
@@ -267,9 +267,9 @@
 +SYSCALL_DEFINE2(osf_utimes, char __user *, filename,
 +		struct timeval32 __user *, tvs)
  {
- 	struct timespec tv[2];
+ 	struct timeval ktvs[2];
  
-@@ -977,9 +968,8 @@ osf_utimes(char __user *filename, struct
+@@ -965,9 +956,8 @@ osf_utimes(char __user *filename, struct
  #define MAX_SELECT_SECONDS \
  	((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
  
@@ -281,7 +281,7 @@
  {
  	fd_set_bits fds;
  	char *bits;
-@@ -1084,8 +1074,7 @@ struct rusage32 {
+@@ -1072,8 +1062,7 @@ struct rusage32 {
  	long	ru_nivcsw;		/* involuntary " */
  };
  
@@ -291,7 +291,7 @@
  {
  	struct rusage32 r;
  
-@@ -1111,9 +1100,8 @@ osf_getrusage(int who, struct rusage32 _
+@@ -1099,9 +1088,8 @@ osf_getrusage(int who, struct rusage32 _
  	return copy_to_user(ru, &r, sizeof(r)) ? -EFAULT : 0;
  }
  
@@ -303,7 +303,7 @@
  {
  	struct rusage r;
  	long ret, err;
-@@ -1159,8 +1147,8 @@ osf_wait4(pid_t pid, int __user *ustatus
+@@ -1147,8 +1135,8 @@ osf_wait4(pid_t pid, int __user *ustatus
   * seems to be a timeval pointer, and I suspect the second
   * one is the time remaining.. Ho humm.. No documentation.
   */
@@ -314,7 +314,7 @@
  {
  	struct timeval tmp;
  	unsigned long ticks;
-@@ -1213,8 +1201,7 @@ struct timex32 {
+@@ -1201,8 +1189,7 @@ struct timex32 {
  	int  :32; int  :32; int  :32; int  :32;
  };
  
@@ -324,7 +324,7 @@
  {
          struct timex txc;
  	int ret;
-@@ -1325,8 +1312,8 @@ osf_fix_iov_len(const struct iovec __use
+@@ -1310,8 +1297,8 @@ osf_fix_iov_len(const struct iovec __use
  	return 0;
  }
  
@@ -335,7 +335,7 @@
  {
  	if (unlikely(personality(current->personality) == PER_OSF4))
  		if (osf_fix_iov_len(vector, count))
-@@ -1334,8 +1321,8 @@ osf_readv(unsigned long fd, const struct
+@@ -1319,8 +1306,8 @@ osf_readv(unsigned long fd, const struct
  	return sys_readv(fd, vector, count);
  }
  
@@ -347,9 +347,9 @@
  	if (unlikely(personality(current->personality) == PER_OSF4))
  		if (osf_fix_iov_len(vector, count))
 diff -urpN a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c
---- a/arch/alpha/kernel/signal.c	2008-01-24 15:58:37.000000000 -0700
-+++ b/arch/alpha/kernel/signal.c	2009-04-05 19:40:15.000000000 -0600
-@@ -19,6 +19,7 @@
+--- a/arch/alpha/kernel/signal.c	2006-09-19 21:42:06.000000000 -0600
++++ b/arch/alpha/kernel/signal.c	2009-04-12 17:49:06.000000000 -0600
+@@ -20,6 +20,7 @@
  #include <linux/tty.h>
  #include <linux/binfmts.h>
  #include <linux/bitops.h>
@@ -357,7 +357,7 @@
  
  #include <asm/uaccess.h>
  #include <asm/sigcontext.h>
-@@ -51,8 +52,8 @@ static void do_signal(struct pt_regs *, 
+@@ -52,8 +53,8 @@ static int do_signal(sigset_t *, struct 
   * Note that we don't need to acquire the kernel lock for SMP
   * operation, as all of this is local to this thread.
   */
@@ -368,7 +368,7 @@
  {
  	unsigned long oldmask = -EINVAL;
  
-@@ -81,9 +82,9 @@ do_osf_sigprocmask(int how, unsigned lon
+@@ -82,9 +83,9 @@ do_osf_sigprocmask(int how, unsigned lon
  	return oldmask;
  }
  
@@ -381,7 +381,7 @@
  {
  	struct k_sigaction new_ka, old_ka;
  	int ret;
-@@ -112,10 +113,9 @@ osf_sigaction(int sig, const struct osf_
+@@ -113,10 +114,9 @@ osf_sigaction(int sig, const struct osf_
  	return ret;
  }
  
@@ -396,9 +396,9 @@
  	struct k_sigaction new_ka, old_ka;
  	int ret;
 diff -urpN a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
---- a/arch/alpha/kernel/systbls.S	2009-04-05 19:32:23.000000000 -0600
-+++ b/arch/alpha/kernel/systbls.S	2009-04-05 19:40:15.000000000 -0600
-@@ -17,7 +17,7 @@ sys_call_table:
+--- a/arch/alpha/kernel/systbls.S	2009-04-12 17:33:08.000000000 -0600
++++ b/arch/alpha/kernel/systbls.S	2009-04-12 17:49:06.000000000 -0600
+@@ -18,7 +18,7 @@ sys_call_table:
  	.quad sys_write
  	.quad alpha_ni_syscall			/* 5 */
  	.quad sys_close
@@ -407,7 +407,7 @@
  	.quad alpha_ni_syscall
  	.quad sys_link
  	.quad sys_unlink			/* 10 */
-@@ -27,11 +27,11 @@ sys_call_table:
+@@ -28,11 +28,11 @@ sys_call_table:
  	.quad sys_mknod
  	.quad sys_chmod				/* 15 */
  	.quad sys_chown
@@ -421,7 +421,7 @@
  	.quad sys_umount
  	.quad sys_setuid
  	.quad sys_getxuid
-@@ -53,7 +53,7 @@ sys_call_table:
+@@ -54,7 +54,7 @@ sys_call_table:
  	.quad alpha_ni_syscall			/* 40 */
  	.quad sys_dup
  	.quad sys_alpha_pipe
@@ -430,7 +430,7 @@
  	.quad alpha_ni_syscall
  	.quad sys_open				/* 45 */
  	.quad alpha_ni_syscall
-@@ -81,7 +81,7 @@ sys_call_table:
+@@ -82,7 +82,7 @@ sys_call_table:
  	.quad sys_newlstat
  	.quad alpha_ni_syscall
  	.quad alpha_ni_syscall			/* 70 */
@@ -439,7 +439,7 @@
  	.quad alpha_ni_syscall
  	.quad sys_munmap
  	.quad sys_mprotect
-@@ -94,17 +94,17 @@ sys_call_table:
+@@ -95,17 +95,17 @@ sys_call_table:
  	.quad sys_setgroups			/* 80 */
  	.quad alpha_ni_syscall
  	.quad sys_setpgid
@@ -460,7 +460,7 @@
  	.quad sys_poll
  	.quad sys_fsync				/* 95 */
  	.quad sys_setpriority
-@@ -123,22 +123,22 @@ sys_call_table:
+@@ -124,22 +124,22 @@ sys_call_table:
  	.quad alpha_ni_syscall
  	.quad alpha_ni_syscall			/* 110 */
  	.quad sys_sigsuspend
@@ -489,7 +489,7 @@
  	.quad sys_fchown
  	.quad sys_fchmod
  	.quad sys_recvfrom			/* 125 */
-@@ -154,7 +154,7 @@ sys_call_table:
+@@ -155,7 +155,7 @@ sys_call_table:
  	.quad sys_socketpair			/* 135 */
  	.quad sys_mkdir
  	.quad sys_rmdir
@@ -498,7 +498,7 @@
  	.quad alpha_ni_syscall
  	.quad alpha_ni_syscall			/* 140 */
  	.quad sys_getpeername
-@@ -172,16 +172,16 @@ sys_call_table:
+@@ -173,16 +173,16 @@ sys_call_table:
  	.quad alpha_ni_syscall
  	.quad alpha_ni_syscall
  	.quad alpha_ni_syscall			/* 155 */
@@ -520,7 +520,7 @@
  	.quad sys_setdomainname
  	.quad alpha_ni_syscall
  	.quad alpha_ni_syscall
-@@ -224,7 +224,7 @@ sys_call_table:
+@@ -225,7 +225,7 @@ sys_call_table:
  	.quad sys_semctl
  	.quad sys_semget			/* 205 */
  	.quad sys_semop
@@ -529,7 +529,7 @@
  	.quad sys_lchown
  	.quad sys_shmat
  	.quad sys_shmctl			/* 210 */
-@@ -258,23 +258,23 @@ sys_call_table:
+@@ -259,23 +259,23 @@ sys_call_table:
  	.quad alpha_ni_syscall
  	.quad alpha_ni_syscall
  	.quad alpha_ni_syscall			/* 240 */
@@ -559,9 +559,9 @@
  	.quad alpha_ni_syscall
  	.quad alpha_ni_syscall			/* 260 */
 diff -urpN a/include/linux/syscalls.h b/include/linux/syscalls.h
---- a/include/linux/syscalls.h	2009-04-05 19:32:23.000000000 -0600
-+++ b/include/linux/syscalls.h	2009-04-05 19:40:15.000000000 -0600
-@@ -109,9 +109,14 @@ struct old_linux_dirent;
+--- a/include/linux/syscalls.h	2009-04-12 17:33:10.000000000 -0600
++++ b/include/linux/syscalls.h	2009-04-12 17:49:06.000000000 -0600
+@@ -108,9 +108,14 @@ struct old_linux_dirent;
  	asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n"	\
  	     "\t.globl ." #alias "\n\t.set ." #alias ", ." #name)
  #else

Copied and modified: dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/compat-zero-upper-32bits-of-offset_high-and-offset_low.patch (from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/compat-zero-upper-32bits-of-offset_high-and-offset_low.patch)
==============================================================================
--- dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/compat-zero-upper-32bits-of-offset_high-and-offset_low.patch	Sun Apr 12 22:42:16 2009	(r13406, copy source)
+++ dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/compat-zero-upper-32bits-of-offset_high-and-offset_low.patch	Mon Apr 13 00:16:12 2009	(r13407)
@@ -11,12 +11,12 @@
     
     Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
 
-Adjusted to apply to Debian's 2.6.24 by dann frazier <dannf at debian.org>
+Adjusted to apply to Debian's 2.6.18 by dann frazier <dannf at debian.org>
 
 diff -urpN a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
---- a/arch/mips/kernel/linux32.c	2009-04-05 20:01:58.000000000 -0600
-+++ b/arch/mips/kernel/linux32.c	2009-04-05 20:46:41.000000000 -0600
-@@ -273,9 +273,9 @@ sys32_settimeofday(struct compat_timeval
+--- a/arch/mips/kernel/linux32.c	2009-04-12 17:39:36.000000000 -0600
++++ b/arch/mips/kernel/linux32.c	2009-04-12 17:53:26.000000000 -0600
+@@ -342,9 +342,9 @@ sys32_settimeofday(struct compat_timeval
  	return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
  }
  

Copied: dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/fix-uml-compile.patch (from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/fix-uml-compile.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/fix-uml-compile.patch	Mon Apr 13 00:16:12 2009	(r13407, copy of r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/fix-uml-compile.patch)
@@ -0,0 +1,83 @@
+commit 6c5979631b4b03c9288776562c18036765e398c1
+Author: Heiko Carstens <heiko.carstens at de.ibm.com>
+Date:   Wed Feb 11 13:04:38 2009 -0800
+
+    syscall define: fix uml compile bug
+    
+    With the new system call defines we get this on uml:
+    
+    arch/um/sys-i386/built-in.o: In function `sys_call_table':
+    (.rodata+0x308): undefined reference to `sys_sigprocmask'
+    
+    Reason for this is that uml passes the preprocessor option
+    -Dsigprocmask=kernel_sigprocmask to gcc when compiling the kernel.
+    This causes SYSCALL_DEFINE3(sigprocmask, ...) to be expanded to
+    SYSCALL_DEFINEx(3, kernel_sigprocmask, ...) and finally to a system
+    call named sys_kernel_sigprocmask.  However sys_sigprocmask is missing
+    because of this.
+    
+    To avoid macro expansion for the system call name just concatenate the
+    name at first define instead of carrying it through severel levels.
+    This was pointed out by Al Viro.
+    
+    Signed-off-by: Heiko Carstens <heiko.carstens at de.ibm.com>
+    Cc: Geert Uytterhoeven <geert at linux-m68k.org>
+    Cc: Al Viro <viro at zeniv.linux.org.uk>
+    Reviewed-by: WANG Cong <wangcong at zeuux.org>
+    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+
+diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
+index 0eda02f..f9f900c 100644
+--- a/include/linux/syscalls.h
++++ b/include/linux/syscalls.h
+@@ -95,13 +95,13 @@ struct old_linux_dirent;
+ #define __SC_TEST5(t5, a5, ...)	__SC_TEST(t5); __SC_TEST4(__VA_ARGS__)
+ #define __SC_TEST6(t6, a6, ...)	__SC_TEST(t6); __SC_TEST5(__VA_ARGS__)
+ 
+-#define SYSCALL_DEFINE0(name)   asmlinkage long sys_##name(void)
+-#define SYSCALL_DEFINE1(...)    SYSCALL_DEFINEx(1, __VA_ARGS__)
+-#define SYSCALL_DEFINE2(...)    SYSCALL_DEFINEx(2, __VA_ARGS__)
+-#define SYSCALL_DEFINE3(...)    SYSCALL_DEFINEx(3, __VA_ARGS__)
+-#define SYSCALL_DEFINE4(...)    SYSCALL_DEFINEx(4, __VA_ARGS__)
+-#define SYSCALL_DEFINE5(...)    SYSCALL_DEFINEx(5, __VA_ARGS__)
+-#define SYSCALL_DEFINE6(...)    SYSCALL_DEFINEx(6, __VA_ARGS__)
++#define SYSCALL_DEFINE0(name)	   asmlinkage long sys_##name(void)
++#define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
++#define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
++#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
++#define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
++#define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
++#define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
+ 
+ #ifdef CONFIG_PPC64
+ #define SYSCALL_ALIAS(alias, name)					\
+@@ -121,21 +121,21 @@ struct old_linux_dirent;
+ 
+ #define SYSCALL_DEFINE(name) static inline long SYSC_##name
+ #define SYSCALL_DEFINEx(x, name, ...)					\
+-	asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__));		\
+-	static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__));	\
+-	asmlinkage long SyS_##name(__SC_LONG##x(__VA_ARGS__))		\
++	asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__));		\
++	static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__));	\
++	asmlinkage long SyS##name(__SC_LONG##x(__VA_ARGS__))		\
+ 	{								\
+ 		__SC_TEST##x(__VA_ARGS__);				\
+-		return (long) SYSC_##name(__SC_CAST##x(__VA_ARGS__));	\
++		return (long) SYSC##name(__SC_CAST##x(__VA_ARGS__));	\
+ 	}								\
+-	SYSCALL_ALIAS(sys_##name, SyS_##name);				\
+-	static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__))
++	SYSCALL_ALIAS(sys##name, SyS##name);				\
++	static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__))
+ 
+ #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */
+ 
+ #define SYSCALL_DEFINE(name) asmlinkage long sys_##name
+ #define SYSCALL_DEFINEx(x, name, ...)					\
+-	asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__))
++	asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__))
+ 
+ #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */
+ 

Copied and modified: dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers-no-abi-change.patch (from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers-no-abi-change.patch)
==============================================================================
--- dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers-no-abi-change.patch	Sun Apr 12 22:42:16 2009	(r13406, copy source)
+++ dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers-no-abi-change.patch	Mon Apr 13 00:16:12 2009	(r13407)
@@ -11,3 +11,16 @@
  #include <linux/mm.h>
  
  #include <asm/cacheflush.h>
+diff -urpN a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
+--- a/arch/mips/mm/cache.c	2009-04-12 17:34:47.000000000 -0600
++++ b/arch/mips/mm/cache.c	2009-04-12 17:46:48.000000000 -0600
+@@ -10,7 +10,9 @@
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/sched.h>
++#ifndef __GENKSYMS__
+ #include <linux/syscalls.h>
++#endif
+ #include <linux/mm.h>
+ 
+ #include <asm/cacheflush.h>

Copied and modified: dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers.patch (from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers.patch)
==============================================================================
--- dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers.patch	Sun Apr 12 22:42:16 2009	(r13406, copy source)
+++ dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers.patch	Mon Apr 13 00:16:12 2009	(r13407)
@@ -9,12 +9,12 @@
     Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
     Signed-off-by: David Daney <ddaney at caviumnetworks.com>
 
-Backported to Debian's 2.6.24 by dann frazier <dannf at debian.org>
+Backported to Debian's 2.6.18 by dann frazier <dannf at debian.org>
 
 diff -urpN a/arch/mips/Kconfig b/arch/mips/Kconfig
---- a/arch/mips/Kconfig	2008-01-24 15:58:37.000000000 -0700
-+++ b/arch/mips/Kconfig	2009-04-05 19:55:04.000000000 -0600
-@@ -1344,6 +1344,7 @@ config 32BIT
+--- a/arch/mips/Kconfig	2009-04-12 17:32:59.000000000 -0600
++++ b/arch/mips/Kconfig	2009-04-12 17:34:47.000000000 -0600
+@@ -1429,6 +1429,7 @@ config 32BIT
  config 64BIT
  	bool "64-bit kernel"
  	depends on CPU_SUPPORTS_64BIT_KERNEL && SYS_SUPPORTS_64BIT_KERNEL
@@ -23,8 +23,8 @@
  	  Select this option if you want to build a 64-bit kernel.
  
 diff -urpN a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
---- a/arch/mips/kernel/linux32.c	2008-01-24 15:58:37.000000000 -0700
-+++ b/arch/mips/kernel/linux32.c	2009-04-05 20:01:58.000000000 -0600
+--- a/arch/mips/kernel/linux32.c	2009-04-12 17:32:58.000000000 -0600
++++ b/arch/mips/kernel/linux32.c	2009-04-12 17:39:36.000000000 -0600
 @@ -33,6 +33,7 @@
  #include <linux/module.h>
  #include <linux/binfmts.h>
@@ -32,9 +32,9 @@
 +#include <linux/syscalls.h>
  #include <linux/compat.h>
  #include <linux/vfs.h>
- #include <linux/ipc.h>
-@@ -99,9 +100,9 @@ int cp_compat_stat(struct kstat *stat, s
- 	return copy_to_user(statbuf, &tmp, sizeof(tmp)) ? -EFAULT : 0;
+ 
+@@ -96,9 +97,9 @@ int cp_compat_stat(struct kstat *stat, s
+ 	return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
  }
  
 -asmlinkage unsigned long
@@ -46,7 +46,7 @@
  {
  	struct file * file = NULL;
  	unsigned long error;
-@@ -175,12 +176,12 @@ struct rlimit32 {
+@@ -244,12 +245,12 @@ struct rlimit32 {
  };
  
  #ifdef __MIPSEB__
@@ -63,7 +63,7 @@
  #endif
  {
  	loff_t length;
-@@ -191,12 +192,12 @@ asmlinkage long sys32_truncate64(const c
+@@ -260,12 +261,12 @@ asmlinkage long sys32_truncate64(const c
  }
  
  #ifdef __MIPSEB__
@@ -80,7 +80,7 @@
  #endif
  {
  	loff_t length;
-@@ -272,9 +273,9 @@ sys32_settimeofday(struct compat_timeval
+@@ -341,9 +342,9 @@ sys32_settimeofday(struct compat_timeval
  	return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
  }
  
@@ -93,7 +93,7 @@
  {
  	return sys_llseek(fd, offset_high, offset_low, result, origin);
  }
-@@ -283,20 +284,20 @@ asmlinkage int sys32_llseek(unsigned int
+@@ -352,20 +353,20 @@ asmlinkage int sys32_llseek(unsigned int
     lseek back to original location.  They fail just like lseek does on
     non-seekable files.  */
  
@@ -120,83 +120,36 @@
  {
  	struct timespec t;
  	int ret;
-@@ -313,8 +314,8 @@ asmlinkage int sys32_sched_rr_get_interv
- 
- #ifdef CONFIG_SYSVIPC
+@@ -905,8 +906,8 @@ static int sys32_semtimedop(int semid, s
+ 	return sys_semtimedop(semid, tsems, nsems, t64);
+ }
  
 -asmlinkage long
--sys32_ipc(u32 call, int first, int second, int third, u32 ptr, u32 fifth)
+-sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth)
 +SYSCALL_DEFINE6(32_ipc, u32, call, long, first, long, second, long, third,
 +	unsigned long, ptr, unsigned long, fifth)
  {
  	int version, err;
  
-@@ -372,8 +373,8 @@ sys32_ipc(u32 call, int first, int secon
- 
- #else
- 
--asmlinkage long
--sys32_ipc(u32 call, int first, int second, int third, u32 ptr, u32 fifth)
-+SYSCALL_DEFINE6(32_ipc, u32, call, int, first, int, second, int, third,
-+	u32, ptr, u32 fifth)
- {
- 	return -ENOSYS;
- }
-@@ -381,7 +382,7 @@ sys32_ipc(u32 call, int first, int secon
- #endif /* CONFIG_SYSVIPC */
- 
- #ifdef CONFIG_MIPS32_N32
--asmlinkage long sysn32_semctl(int semid, int semnum, int cmd, u32 arg)
-+SYSCALL_DEFINE4(n32_semctl, int, semid, int, semnum, int, cmd, u32, arg)
- {
- 	/* compat_sys_semctl expects a pointer to union semun */
- 	u32 __user *uptr = compat_alloc_user_space(sizeof(u32));
-@@ -390,13 +391,14 @@ asmlinkage long sysn32_semctl(int semid,
- 	return compat_sys_semctl(semid, semnum, cmd, uptr);
- }
- 
--asmlinkage long sysn32_msgsnd(int msqid, u32 msgp, unsigned msgsz, int msgflg)
-+SYSCALL_DEFINE4(n32_msgsnd, int, msqid, u32, msgp, unsigned int, msgsz,
-+	int, msgflg)
- {
- 	return compat_sys_msgsnd(msqid, msgsz, msgflg, compat_ptr(msgp));
- }
- 
--asmlinkage long sysn32_msgrcv(int msqid, u32 msgp, size_t msgsz, int msgtyp,
--			      int msgflg)
-+SYSCALL_DEFINE5(n32_msgrcv, int, msqid, u32, msgp, size_t, msgsz,
-+	int, msgtyp, int, msgflg)
- {
- 	return compat_sys_msgrcv(msqid, msgsz, msgtyp, msgflg, IPC_64,
- 				 compat_ptr(msgp));
-@@ -416,7 +418,7 @@ struct sysctl_args32
+@@ -993,7 +994,7 @@ struct sysctl_args32
  
- #ifdef CONFIG_SYSCTL_SYSCALL
+ #ifdef CONFIG_SYSCTL
  
 -asmlinkage long sys32_sysctl(struct sysctl_args32 __user *args)
 +SYSCALL_DEFINE1(32_sysctl, struct sysctl_args32 __user *, args)
  {
  	struct sysctl_args32 tmp;
  	int error;
-@@ -455,9 +457,16 @@ asmlinkage long sys32_sysctl(struct sysc
- 	return error;
- }
+@@ -1034,7 +1035,7 @@ asmlinkage long sys32_sysctl(struct sysc
  
-+#else
-+
-+SYSCALL_DEFINE1(32_sysctl, struct sysctl_args32 __user *, args)
-+{
-+	return -ENOSYS;
-+}
-+
- #endif /* CONFIG_SYSCTL_SYSCALL */
+ #endif /* CONFIG_SYSCTL */
  
 -asmlinkage long sys32_newuname(struct new_utsname __user * name)
 +SYSCALL_DEFINE1(32_newuname, struct new_utsname __user *, name)
  {
  	int ret = 0;
  
-@@ -473,7 +482,7 @@ asmlinkage long sys32_newuname(struct ne
+@@ -1050,7 +1051,7 @@ asmlinkage long sys32_newuname(struct ne
  	return ret;
  }
  
@@ -205,7 +158,7 @@
  {
  	int ret;
  	personality &= 0xffffffff;
-@@ -496,7 +505,7 @@ struct ustat32 {
+@@ -1073,7 +1074,7 @@ struct ustat32 {
  
  extern asmlinkage long sys_ustat(dev_t dev, struct ustat __user * ubuf);
  
@@ -213,8 +166,8 @@
 +SYSCALL_DEFINE2(32_ustat, dev_t, dev, struct ustat32 __user *, ubuf32)
  {
  	int err;
- 	struct ustat tmp;
-@@ -520,8 +529,8 @@ out:
+         struct ustat tmp;
+@@ -1097,8 +1098,8 @@ out:
  	return err;
  }
  
@@ -226,9 +179,9 @@
  	mm_segment_t old_fs = get_fs();
  	int ret;
 diff -urpN a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
---- a/arch/mips/kernel/scall32-o32.S	2009-04-05 19:32:24.000000000 -0600
-+++ b/arch/mips/kernel/scall32-o32.S	2009-04-05 19:55:04.000000000 -0600
-@@ -414,7 +414,7 @@ einval:	li	v0, -EINVAL
+--- a/arch/mips/kernel/scall32-o32.S	2009-04-12 17:33:10.000000000 -0600
++++ b/arch/mips/kernel/scall32-o32.S	2009-04-12 17:34:47.000000000 -0600
+@@ -425,7 +425,7 @@ einval:	li	v0, -EINVAL
  	sys	sys_swapon		2
  	sys	sys_reboot		3
  	sys	sys_old_readdir		3
@@ -237,7 +190,7 @@
  	sys	sys_munmap		2
  	sys	sys_truncate		2
  	sys	sys_ftruncate		2
-@@ -534,7 +534,7 @@ einval:	li	v0, -EINVAL
+@@ -545,7 +545,7 @@ einval:	li	v0, -EINVAL
  	sys	sys_sendfile		4
  	sys	sys_ni_syscall		0
  	sys	sys_ni_syscall		0
@@ -247,8 +200,8 @@
  	sys	sys_ftruncate64		4
  	sys	sys_stat64		2
 diff -urpN a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
---- a/arch/mips/kernel/scall64-64.S	2009-04-05 19:32:24.000000000 -0600
-+++ b/arch/mips/kernel/scall64-64.S	2009-04-05 19:55:04.000000000 -0600
+--- a/arch/mips/kernel/scall64-64.S	2009-04-12 17:33:10.000000000 -0600
++++ b/arch/mips/kernel/scall64-64.S	2009-04-12 17:34:47.000000000 -0600
 @@ -207,7 +207,7 @@ sys_call_table:
  	PTR	sys_newlstat
  	PTR	sys_poll
@@ -259,8 +212,8 @@
  	PTR	sys_munmap
  	PTR	sys_brk
 diff -urpN a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
---- a/arch/mips/kernel/scall64-n32.S	2009-04-05 19:52:55.000000000 -0600
-+++ b/arch/mips/kernel/scall64-n32.S	2009-04-05 19:55:04.000000000 -0600
+--- a/arch/mips/kernel/scall64-n32.S	2009-04-12 17:33:10.000000000 -0600
++++ b/arch/mips/kernel/scall64-n32.S	2009-04-12 17:42:21.000000000 -0600
 @@ -129,12 +129,12 @@ EXPORT(sysn32_call_table)
  	PTR	sys_newlstat
  	PTR	sys_poll
@@ -286,7 +239,7 @@
  	PTR	sys_socket			/* 6040 */
  	PTR	sys_connect
  	PTR	sys_accept
-@@ -181,14 +181,14 @@ EXPORT(sysn32_call_table)
+@@ -181,7 +181,7 @@ EXPORT(sysn32_call_table)
  	PTR	sys_exit
  	PTR	compat_sys_wait4
  	PTR	sys_kill			/* 6060 */
@@ -294,17 +247,7 @@
 +	PTR	sys_32_newuname
  	PTR	sys_semget
  	PTR	sys_semop
--	PTR	sysn32_semctl
-+	PTR	sys_n32_semctl
- 	PTR	sys_shmdt			/* 6065 */
- 	PTR	sys_msgget
--	PTR	sysn32_msgsnd
--	PTR	sysn32_msgrcv
-+	PTR	sys_n32_msgsnd
-+	PTR	sys_n32_msgrcv
- 	PTR	compat_sys_msgctl
- 	PTR	compat_sys_fcntl		/* 6070 */
- 	PTR	sys_flock
+ 	PTR	sys_semctl
 @@ -245,15 +245,15 @@ EXPORT(sysn32_call_table)
  	PTR	sys_getsid
  	PTR	sys_capget
@@ -343,8 +286,8 @@
  	PTR	compat_sys_adjtimex
  	PTR	compat_sys_setrlimit		/* 6155 */
 diff -urpN a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
---- a/arch/mips/kernel/scall64-o32.S	2009-04-05 19:52:55.000000000 -0600
-+++ b/arch/mips/kernel/scall64-o32.S	2009-04-05 19:55:04.000000000 -0600
+--- a/arch/mips/kernel/scall64-o32.S	2009-04-12 17:33:10.000000000 -0600
++++ b/arch/mips/kernel/scall64-o32.S	2009-04-12 17:44:34.000000000 -0600
 @@ -265,12 +265,12 @@ sys_call_table:
  	PTR	sys_olduname
  	PTR	sys_umask			/* 4060 */
@@ -372,7 +315,7 @@
 @@ -320,12 +320,12 @@ sys_call_table:
  	PTR	compat_sys_wait4
  	PTR	sys_swapoff			/* 4115 */
- 	PTR	compat_sys_sysinfo
+ 	PTR	sys32_sysinfo
 -	PTR	sys32_ipc
 +	PTR	sys_32_ipc
  	PTR	sys_fsync
@@ -462,9 +405,9 @@
  	PTR	sys_add_key			/* 4280 */
  	PTR	sys_request_key
 diff -urpN a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
---- a/arch/mips/kernel/signal32.c	2008-01-24 15:58:37.000000000 -0700
-+++ b/arch/mips/kernel/signal32.c	2009-04-05 19:55:04.000000000 -0600
-@@ -349,8 +349,8 @@ asmlinkage int sys32_rt_sigsuspend(nabi_
+--- a/arch/mips/kernel/signal32.c	2009-04-12 17:32:58.000000000 -0600
++++ b/arch/mips/kernel/signal32.c	2009-04-12 17:34:47.000000000 -0600
+@@ -245,8 +245,8 @@ _sys32_rt_sigsuspend(nabi_no_regargs str
  	return -ERESTARTNOHAND;
  }
  
@@ -475,9 +418,9 @@
  {
  	struct k_sigaction new_ka, old_ka;
  	int ret;
-@@ -692,9 +692,9 @@ struct mips_abi mips_abi_32 = {
- 	.restart	= __NR_O32_restart_syscall
- };
+@@ -867,9 +867,9 @@ void do_signal32(struct pt_regs *regs)
+ 	}
+ }
  
 -asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 __user *act,
 -				  struct sigaction32 __user *oact,
@@ -488,7 +431,7 @@
  {
  	struct k_sigaction new_sa, old_sa;
  	int ret = -EINVAL;
-@@ -736,8 +736,8 @@ out:
+@@ -911,8 +911,8 @@ out:
  	return ret;
  }
  
@@ -499,7 +442,7 @@
  {
  	sigset_t old_set, new_set;
  	int ret;
-@@ -758,8 +758,8 @@ asmlinkage int sys32_rt_sigprocmask(int 
+@@ -933,8 +933,8 @@ asmlinkage int sys32_rt_sigprocmask(int 
  	return ret;
  }
  
@@ -510,7 +453,7 @@
  {
  	int ret;
  	sigset_t set;
-@@ -775,7 +775,8 @@ asmlinkage int sys32_rt_sigpending(compa
+@@ -950,7 +950,8 @@ asmlinkage int sys32_rt_sigpending(compa
  	return ret;
  }
  
@@ -520,7 +463,7 @@
  {
  	siginfo_t info;
  	int ret;
-@@ -790,10 +791,9 @@ asmlinkage int sys32_rt_sigqueueinfo(int
+@@ -965,10 +966,9 @@ asmlinkage int sys32_rt_sigqueueinfo(int
  	return ret;
  }
  
@@ -535,17 +478,17 @@
  	siginfo_t info;
  	struct rusage ru;
 diff -urpN a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
---- a/arch/mips/kernel/signal.c	2008-01-24 15:58:37.000000000 -0700
-+++ b/arch/mips/kernel/signal.c	2009-04-05 19:55:04.000000000 -0600
-@@ -19,6 +19,7 @@
+--- a/arch/mips/kernel/signal.c	2009-04-12 17:32:58.000000000 -0600
++++ b/arch/mips/kernel/signal.c	2009-04-12 17:35:07.000000000 -0600
+@@ -20,6 +20,7 @@
  #include <linux/ptrace.h>
  #include <linux/unistd.h>
  #include <linux/compiler.h>
 +#include <linux/syscalls.h>
- #include <linux/uaccess.h>
  
  #include <asm/abi.h>
-@@ -338,8 +339,8 @@ asmlinkage int sys_rt_sigsuspend(nabi_no
+ #include <asm/asm.h>
+@@ -99,8 +100,8 @@ _sys_rt_sigsuspend(nabi_no_regargs struc
  }
  
  #ifdef CONFIG_TRAD_SIGNALS
@@ -557,9 +500,9 @@
  	struct k_sigaction new_ka, old_ka;
  	int ret;
 diff -urpN a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
---- a/arch/mips/kernel/syscall.c	2009-04-05 19:32:24.000000000 -0600
-+++ b/arch/mips/kernel/syscall.c	2009-04-05 19:55:04.000000000 -0600
-@@ -153,9 +153,9 @@ out:
+--- a/arch/mips/kernel/syscall.c	2009-04-12 17:33:10.000000000 -0600
++++ b/arch/mips/kernel/syscall.c	2009-04-12 17:35:53.000000000 -0600
+@@ -148,9 +148,9 @@ out:
  	return error;
  }
  
@@ -572,7 +515,7 @@
  {
  	unsigned long result;
  
-@@ -169,9 +169,9 @@ out:
+@@ -164,9 +164,9 @@ out:
  	return result;
  }
  
@@ -585,16 +528,16 @@
  {
  	if (pgoff & (~PAGE_MASK >> 12))
  		return -EINVAL;
-@@ -241,7 +241,7 @@ out:
+@@ -236,7 +236,7 @@ out:
  /*
   * Compacrapability ...
   */
 -asmlinkage int sys_uname(struct old_utsname __user * name)
 +SYSCALL_DEFINE1(uname, struct old_utsname __user *, name)
  {
- 	if (name && !copy_to_user(name, utsname(), sizeof (*name)))
+ 	if (name && !copy_to_user(name, &system_utsname, sizeof (*name)))
  		return 0;
-@@ -251,7 +251,7 @@ asmlinkage int sys_uname(struct old_utsn
+@@ -246,7 +246,7 @@ asmlinkage int sys_uname(struct old_utsn
  /*
   * Compacrapability ...
   */
@@ -603,7 +546,7 @@
  {
  	int error;
  
-@@ -280,7 +280,7 @@ asmlinkage int sys_olduname(struct oldol
+@@ -270,7 +270,7 @@ asmlinkage int sys_olduname(struct oldol
  	return error;
  }
  
@@ -612,27 +555,27 @@
  {
  	struct thread_info *ti = task_thread_info(current);
  
-@@ -291,7 +291,7 @@ asmlinkage int sys_set_thread_area(unsig
+@@ -282,7 +282,7 @@ asmlinkage int sys_set_thread_area(unsig
  	return 0;
  }
  
 -asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)
 +asmlinkage int _sys_sysmips(long cmd, long arg1, long arg2, long arg3)
  {
- 	switch (cmd) {
- 	case MIPS_ATOMIC_SET:
-@@ -326,8 +326,8 @@ asmlinkage int _sys_sysmips(int cmd, lon
+ 	int	tmp;
+ 
+@@ -309,8 +309,8 @@ asmlinkage int _sys_sysmips(int cmd, lon
   *
   * This is really horribly ugly.
   */
--asmlinkage int sys_ipc(unsigned int call, int first, int second,
--		       unsigned long third, void __user *ptr, long fifth)
+-asmlinkage int sys_ipc (unsigned int call, int first, int second,
+-			unsigned long third, void __user *ptr, long fifth)
 +SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, int, second,
 +	unsigned long, third, void __user *, ptr, long, fifth)
  {
  	int version, ret;
  
-@@ -412,7 +412,7 @@ asmlinkage int sys_ipc(unsigned int call
+@@ -395,7 +395,7 @@ asmlinkage int sys_ipc (unsigned int cal
  /*
   * No implemented yet ...
   */
@@ -642,17 +585,17 @@
  	return -ENOSYS;
  }
 diff -urpN a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
---- a/arch/mips/mm/cache.c	2008-01-24 15:58:37.000000000 -0700
-+++ b/arch/mips/mm/cache.c	2009-04-05 19:55:04.000000000 -0600
-@@ -13,6 +13,7 @@
- #include <linux/linkage.h>
+--- a/arch/mips/mm/cache.c	2009-04-12 17:33:03.000000000 -0600
++++ b/arch/mips/mm/cache.c	2009-04-12 17:34:47.000000000 -0600
+@@ -10,6 +10,7 @@
+ #include <linux/kernel.h>
  #include <linux/module.h>
  #include <linux/sched.h>
 +#include <linux/syscalls.h>
  #include <linux/mm.h>
  
  #include <asm/cacheflush.h>
-@@ -54,8 +55,8 @@ EXPORT_SYMBOL(_dma_cache_wback_inv);
+@@ -53,8 +54,8 @@ EXPORT_SYMBOL(_dma_cache_inv);
   * We could optimize the case where the cache argument is not BCACHE but
   * that seems very atypical use ...
   */

Copied: dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/sparc64-use-syscall-wrappers.patch (from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/sparc64-use-syscall-wrappers.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/sparc64-use-syscall-wrappers.patch	Mon Apr 13 00:16:12 2009	(r13407, copy of r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/sparc64-use-syscall-wrappers.patch)
@@ -0,0 +1,25 @@
+commit 67605d6812691bbd2158d2f60259e0407611bc1b
+Author: Christian Borntraeger <borntraeger at de.ibm.com>
+Date:   Mon Jan 19 20:21:49 2009 -0800
+
+    [CVE-2009-0029] sparc: Enable syscall wrappers for 64-bit
+    
+    sparc64 needs sign-extended function parameters. We have to enable
+    the system call wrappers.
+    
+    Signed-off-by: Christian Borntraeger <borntraeger at de.ibm.com>
+    Signed-off-by: David S. Miller <davem at davemloft.net>
+
+Backported to Debian's 2.6.24 by dann frazier <dannf at debian.org>
+
+diff -urpN a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
+--- a/arch/sparc64/Kconfig	2008-01-24 15:58:37.000000000 -0700
++++ b/arch/sparc64/Kconfig	2009-04-05 19:46:04.000000000 -0600
+@@ -12,6 +12,7 @@ config SPARC
+ config SPARC64
+ 	bool
+ 	default y
++	select HAVE_SYSCALL_WRAPPERS
+ 	help
+ 	  SPARC is a family of RISC microprocessors designed and marketed by
+ 	  Sun Microsystems, incorporated.  This port covers the newer 64-bit

Copied and modified: dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/sparc64-wrap-arch-specific-syscalls.patch (from r13406, dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/sparc64-wrap-arch-specific-syscalls.patch)
==============================================================================
--- dists/etch-security/linux-2.6.24/debian/patches/bugfix/all/CVE-2009-0029/sparc64-wrap-arch-specific-syscalls.patch	Sun Apr 12 22:42:16 2009	(r13406, copy source)
+++ dists/etch-security/linux-2.6/debian/patches/bugfix/all/CVE-2009-0029/sparc64-wrap-arch-specific-syscalls.patch	Mon Apr 13 00:16:12 2009	(r13407)
@@ -6,30 +6,12 @@
     
     Signed-off-by: David S. Miller <davem at davemloft.net>
 
-Backported to Debian's 2.6.24 by dann frazier <dannf at debian.org>
+Backported to Debian's 2.6.18 by dann frazier <dannf at debian.org>
 
-diff -urpN a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
---- a/arch/sparc64/kernel/entry.S	2008-01-24 15:58:37.000000000 -0700
-+++ b/arch/sparc64/kernel/entry.S	2009-04-05 20:38:10.000000000 -0600
-@@ -1432,12 +1432,12 @@ execve_merge:
- 	jmpl		%g1, %g0
- 	 add		%sp, PTREGS_OFF, %o0
- 
--	.globl	sys_pipe, sys_sigpause, sys_nis_syscall
-+	.globl	sys_sparc_pipe, sys_sigpause, sys_nis_syscall
- 	.globl	sys_rt_sigreturn
- 	.globl	sys_ptrace
- 	.globl	sys_sigaltstack
- 	.align	32
--sys_pipe:	ba,pt		%xcc, sparc_pipe
-+sys_sparc_pipe:	ba,pt		%xcc, sys_sparc_pipe_real
- 		 add		%sp, PTREGS_OFF, %o0
- sys_nis_syscall:ba,pt		%xcc, c_sys_nis_syscall
- 		 add		%sp, PTREGS_OFF, %o0
 diff -urpN a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
---- a/arch/sparc64/kernel/sys_sparc.c	2009-04-05 19:32:22.000000000 -0600
-+++ b/arch/sparc64/kernel/sys_sparc.c	2009-04-05 20:13:32.000000000 -0600
-@@ -396,7 +396,7 @@ void arch_pick_mmap_layout(struct mm_str
+--- a/arch/sparc64/kernel/sys_sparc.c	2009-04-12 17:33:06.000000000 -0600
++++ b/arch/sparc64/kernel/sys_sparc.c	2009-04-12 17:57:29.000000000 -0600
+@@ -397,7 +397,7 @@ void arch_pick_mmap_layout(struct mm_str
  	}
  }
  
@@ -38,7 +20,7 @@
  {
  	/* People could try to be nasty and use ta 0x6d in 32bit programs */
  	if (test_thread_flag(TIF_32BIT) && brk >= STACK_TOP32)
-@@ -412,7 +412,7 @@ asmlinkage unsigned long sparc_brk(unsig
+@@ -413,7 +413,7 @@ asmlinkage unsigned long sparc_brk(unsig
   * sys_pipe() is the normal C calling standard for creating
   * a pipe. It's not the way unix traditionally does this, though.
   */
@@ -47,7 +29,7 @@
  {
  	int fd[2];
  	int error;
-@@ -432,8 +432,8 @@ out:
+@@ -433,8 +433,8 @@ out:
   * This is really horribly ugly.
   */
  
@@ -56,9 +38,9 @@
 +SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second,
 +		unsigned long, third, void __user *, ptr, long, fifth)
  {
- 	long err;
+ 	int err;
  
-@@ -515,7 +515,7 @@ out:
+@@ -523,7 +523,7 @@ out:
  	return err;
  }
  
@@ -67,7 +49,7 @@
  {
  	int ret = sys_newuname(name);
  	
-@@ -526,7 +526,7 @@ asmlinkage long sparc64_newuname(struct 
+@@ -534,7 +534,7 @@ asmlinkage long sparc64_newuname(struct 
  	return ret;
  }
  
@@ -76,7 +58,7 @@
  {
  	int ret;
  
-@@ -560,9 +560,9 @@ int sparc64_mmap_check(unsigned long add
+@@ -568,9 +568,9 @@ int sparc64_mmap_check(unsigned long add
  }
  
  /* Linux version of mmap */
@@ -89,7 +71,7 @@
  {
  	struct file * file = NULL;
  	unsigned long retval = -EBADF;
-@@ -585,7 +585,7 @@ out:
+@@ -593,7 +593,7 @@ out:
  	return retval;
  }
  
@@ -98,7 +80,7 @@
  {
  	long ret;
  
-@@ -602,9 +602,9 @@ extern unsigned long do_mremap(unsigned 
+@@ -610,9 +610,9 @@ extern unsigned long do_mremap(unsigned 
  	unsigned long old_len, unsigned long new_len,
  	unsigned long flags, unsigned long new_addr);
                  
@@ -111,7 +93,7 @@
  {
  	unsigned long ret = -EINVAL;
  
-@@ -667,7 +667,7 @@ asmlinkage void sparc_breakpoint(struct 
+@@ -675,7 +675,7 @@ asmlinkage void sparc_breakpoint(struct 
  
  extern void check_pending(int signum);
  
@@ -120,7 +102,7 @@
  {
          int nlen, err;
  
-@@ -728,11 +728,10 @@ asmlinkage long sunos_syscall(struct pt_
+@@ -736,11 +736,10 @@ asmlinkage long sunos_syscall(struct pt_
  }
  #endif
  
@@ -136,7 +118,7 @@
  {
  	if (type < UT_INSTRUCTION_EXCEPTION || type > UT_TRAP_INSTRUCTION_31)
  		return -EINVAL;
-@@ -797,11 +796,9 @@ long sparc_memory_ordering(unsigned long
+@@ -805,11 +804,9 @@ long sparc_memory_ordering(unsigned long
  	return 0;
  }
  
@@ -151,7 +133,7 @@
  {
  	struct k_sigaction new_ka, old_ka;
  	int ret;
-@@ -841,7 +838,8 @@ asmlinkage void update_perfctrs(void)
+@@ -849,7 +846,8 @@ asmlinkage void update_perfctrs(void)
  	reset_pic();
  }
  
@@ -162,9 +144,9 @@
  	int err = 0;
  
 diff -urpN a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
---- a/arch/sparc64/kernel/systbls.S	2009-04-05 19:32:23.000000000 -0600
-+++ b/arch/sparc64/kernel/systbls.S	2009-04-05 20:14:09.000000000 -0600
-@@ -21,7 +21,7 @@ sys_call_table32:
+--- a/arch/sparc64/kernel/systbls.S	2009-04-12 17:33:08.000000000 -0600
++++ b/arch/sparc64/kernel/systbls.S	2009-04-12 17:57:29.000000000 -0600
+@@ -22,7 +22,7 @@ sys_call_table32:
  /*0*/	.word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write
  /*5*/	.word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link
  /*10*/  .word sys_unlink, sunos_execv, sys_chdir, sys32_chown16, sys32_mknod
@@ -173,7 +155,7 @@
  /*20*/	.word sys_getpid, sys_capget, sys_capset, sys32_setuid16, sys32_getuid16
  /*25*/	.word sys32_vmsplice, sys_ptrace, sys_alarm, sys32_sigaltstack, sys32_pause
  /*30*/	.word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice
-@@ -55,8 +55,8 @@ sys_call_table32:
+@@ -56,8 +56,8 @@ sys_call_table32:
  /*170*/	.word sys32_lsetxattr, sys32_fsetxattr, sys_getxattr, sys_lgetxattr, compat_sys_getdents
  	.word sys_setsid, sys_fchdir, sys32_fgetxattr, sys_listxattr, sys_llistxattr
  /*180*/	.word sys32_flistxattr, sys_removexattr, sys_lremovexattr, compat_sys_sigpending, sys_ni_syscall
@@ -184,7 +166,7 @@
  	.word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask
  /*200*/	.word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir
  	.word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64
-@@ -93,7 +93,7 @@ sys_call_table:
+@@ -92,7 +92,7 @@ sys_call_table:
  /*0*/	.word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write
  /*5*/	.word sys_open, sys_close, sys_wait4, sys_creat, sys_link
  /*10*/  .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod
@@ -193,7 +175,7 @@
  /*20*/	.word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid
  /*25*/	.word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall
  /*30*/	.word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice
-@@ -104,7 +104,7 @@ sys_call_table:
+@@ -103,7 +103,7 @@ sys_call_table:
  	.word sys_reboot, sys_nis_syscall, sys_symlink, sys_readlink, sys_execve
  /*60*/	.word sys_umask, sys_chroot, sys_newfstat, sys_fstat64, sys_getpagesize
  	.word sys_msync, sys_vfork, sys_pread64, sys_pwrite64, sys_nis_syscall
@@ -202,7 +184,7 @@
  	.word sys_madvise, sys_vhangup, sys_nis_syscall, sys_mincore, sys_getgroups
  /*80*/	.word sys_setgroups, sys_getpgrp, sys_nis_syscall, sys_setitimer, sys_nis_syscall
  	.word sys_swapon, sys_getitimer, sys_nis_syscall, sys_sethostname, sys_nis_syscall
-@@ -127,8 +127,8 @@ sys_call_table:
+@@ -126,8 +126,8 @@ sys_call_table:
  /*170*/	.word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys_getdents
  	.word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr
  /*180*/	.word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall
@@ -213,7 +195,7 @@
  	.word sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_nis_syscall, sys_sgetmask
  /*200*/	.word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall
  	.word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64
-@@ -140,7 +140,7 @@ sys_call_table:
+@@ -139,7 +139,7 @@ sys_call_table:
  	.word sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
  /*240*/	.word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
  	.word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep

Modified: dists/etch-security/linux-2.6/debian/patches/series/24etch1
==============================================================================
--- dists/etch-security/linux-2.6/debian/patches/series/24etch1	Sun Apr 12 22:42:16 2009	(r13406)
+++ dists/etch-security/linux-2.6/debian/patches/series/24etch1	Mon Apr 13 00:16:12 2009	(r13407)
@@ -62,6 +62,11 @@
 + bugfix/mips/fix-potential-dos.patch
 + bugfix/all/net-SO_BSDCOMPAT-leak.patch
 + bugfix/all/net-SO_BSDCOMPAT-leak-2.patch
-+ bugfix/all/CVE-2009-0029/mips-wire-up-o32-syscall-to-the-right-function.patch
-+ bugfix/all/CVE-2009-0029/mips-finish-fixing-CVE-2009-0029.patch
 + bugfix/all/CVE-2009-0029/mips-rename-sys_pipe.patch
++ bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers.patch
++ bugfix/all/CVE-2009-0029/mips-enable-syscall-wrappers-no-abi-change.patch
++ bugfix/all/CVE-2009-0029/alpha-use-syscall-wrappers.patch
++ bugfix/all/CVE-2009-0029/compat-zero-upper-32bits-of-offset_high-and-offset_low.patch
++ bugfix/all/CVE-2009-0029/fix-uml-compile.patch
++ bugfix/all/CVE-2009-0029/sparc64-use-syscall-wrappers.patch
++ bugfix/all/CVE-2009-0029/sparc64-wrap-arch-specific-syscalls.patch



More information about the Kernel-svn-changes mailing list