summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Yamin <plasmaroo@gentoo.org>2005-03-26 20:28:36 +0000
committerTim Yamin <plasmaroo@gentoo.org>2005-03-26 20:28:36 +0000
commit0cd1b6fc92a51ac96d7eb46c97d82f0a7c6484be (patch)
tree62a15195dfe3020b82801c2a153960d2c0bda9d1 /sys-kernel
parentRemove x11-wm/ion3-svn (ion3 now uses darcs). (diff)
downloadhistorical-0cd1b6fc92a51ac96d7eb46c97d82f0a7c6484be.tar.gz
historical-0cd1b6fc92a51ac96d7eb46c97d82f0a7c6484be.tar.bz2
historical-0cd1b6fc92a51ac96d7eb46c97d82f0a7c6484be.zip
Security bump - fix #74070, #77666, #77923, #78362, #78363, #81106, #82141.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/xbox-sources/ChangeLog16
-rw-r--r--sys-kernel/xbox-sources/Manifest34
-rw-r--r--sys-kernel/xbox-sources/files/digest-xbox-sources-2.4.28-r4 (renamed from sys-kernel/xbox-sources/files/digest-xbox-sources-2.4.28-r3)0
-rw-r--r--sys-kernel/xbox-sources/files/digest-xbox-sources-2.6.10-r2 (renamed from sys-kernel/xbox-sources/files/digest-xbox-sources-2.6.10-r1)0
-rw-r--r--sys-kernel/xbox-sources/files/xbox-sources-2.4.28.77666.patch44
-rw-r--r--sys-kernel/xbox-sources/files/xbox-sources-2.4.28.78362.patch274
-rw-r--r--sys-kernel/xbox-sources/files/xbox-sources-2.4.28.78363.patch29
-rw-r--r--sys-kernel/xbox-sources/files/xbox-sources-2.6.10.74070.patch11
-rw-r--r--sys-kernel/xbox-sources/files/xbox-sources-2.6.10.77666.patch170
-rw-r--r--sys-kernel/xbox-sources/files/xbox-sources-2.6.10.77923.patch31
-rw-r--r--sys-kernel/xbox-sources/files/xbox-sources-2.6.10.81106.patch32
-rw-r--r--sys-kernel/xbox-sources/files/xbox-sources-2.6.10.82141.patch191
-rw-r--r--sys-kernel/xbox-sources/xbox-sources-2.4.28-r4.ebuild (renamed from sys-kernel/xbox-sources/xbox-sources-2.4.28-r3.ebuild)7
-rw-r--r--sys-kernel/xbox-sources/xbox-sources-2.6.10-r2.ebuild (renamed from sys-kernel/xbox-sources/xbox-sources-2.6.10-r1.ebuild)9
14 files changed, 830 insertions, 18 deletions
diff --git a/sys-kernel/xbox-sources/ChangeLog b/sys-kernel/xbox-sources/ChangeLog
index 227a3a63878e..ad799d197a2e 100644
--- a/sys-kernel/xbox-sources/ChangeLog
+++ b/sys-kernel/xbox-sources/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for sys-kernel/xbox-sources
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/ChangeLog,v 1.28 2005/02/06 12:19:16 chrb Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/ChangeLog,v 1.29 2005/03/26 20:28:36 plasmaroo Exp $
+
+*xbox-sources-2.6.10-r2 (26 Mar 2005)
+
+ 26 Mar 2005; <plasmaroo@gentoo.org> -xbox-sources-2.4.28-r3.ebuild,
+ +xbox-sources-2.4.28-r4.ebuild, -xbox-sources-2.6.10-r1.ebuild,
+ +xbox-sources-2.6.10-r2.ebuild, +files/xbox-sources-2.4.28.77666.patch,
+ +files/xbox-sources-2.4.28.78362.patch,
+ +files/xbox-sources-2.4.28.78363.patch,
+ +files/xbox-sources-2.6.10.74070.patch,
+ +files/xbox-sources-2.6.10.77666.patch,
+ +files/xbox-sources-2.6.10.77923.patch,
+ +files/xbox-sources-2.6.10.81106.patch,
+ +files/xbox-sources-2.6.10.82141.patch:
+ Security bump - fix #74070, #77666, #77923, #78362, #78363, #81106, #82141.
*xbox-sources-2.4.29 (06 Feb 2005)
diff --git a/sys-kernel/xbox-sources/Manifest b/sys-kernel/xbox-sources/Manifest
index 2cb9984a919b..ca87b338e83b 100644
--- a/sys-kernel/xbox-sources/Manifest
+++ b/sys-kernel/xbox-sources/Manifest
@@ -1,21 +1,29 @@
-MD5 0767d7d1b3ae4c84001b18a9d30b51a1 ChangeLog 8913
+MD5 369c4152c4ed809501e6bf2197911f58 ChangeLog 9540
+MD5 91fa67b5d40ec71b9100ca14a9966402 xbox-sources-2.4.28-r4.ebuild 1017
MD5 c2a56d354398d9255422286f7af425ee metadata.xml 351
-MD5 1cfd8cd3fa209dda8f880bb1a4ecea73 xbox-sources-2.4.28-r3.ebuild 927
MD5 5c0ac5c83aae891582a0fcd38980040f xbox-sources-2.4.29.ebuild 760
-MD5 5cea7e25c98a9e449507b067d7369560 xbox-sources-2.6.10-r1.ebuild 914
-MD5 e0d5b095eef177dd9cb377c1ba881066 files/digest-xbox-sources-2.4.28-r3 226
-MD5 8220c1bd949620000d8cb140587af9a2 files/digest-xbox-sources-2.6.10-r1 146
-MD5 b9a94233e1457787352e5f85e3e3582d files/xbox-sources-2.4.28.binfmt_a.out.patch 2009
-MD5 703b136a244ccde7a8f419b7753cd55e files/digest-xbox-sources-2.4.29 226
+MD5 35854696d3907eb17de77b5a28b829ce xbox-sources-2.6.10-r2.ebuild 1064
+MD5 36bc9f74facafeb958d1dcd0224f44ab files/xbox-sources-2.6.10.77666.patch 4831
+MD5 8c35751caf824a9dacb02e80d6189b2e files/xbox-sources-2.4.28.CAN-2004-1137.patch 1764
MD5 b0a1f80aff51d6601e8924329023b241 files/xbox-sources.AF_UNIX.patch 515
-MD5 1d78b90e495e432432e095ee47bbc2fc files/xbox-sources-2.4.28.77094.patch 452
-MD5 6aa8f7a7c2d55734389b53d3bcf78570 files/xbox-sources-2.4.28.CAN-2004-1016.patch 2835
+MD5 792fa9165e5ae65d46ee206c7f7a4fc9 files/xbox-sources-2.4.28.78363.patch 788
MD5 757ee1239c3f14645ccea3640d551e11 files/xbox-sources-2.4.28.CAN-2004-1056.patch 11249
-MD5 8c35751caf824a9dacb02e80d6189b2e files/xbox-sources-2.4.28.CAN-2004-1137.patch 1764
-MD5 6cf860a301930c8cac126ab0c4d859d4 files/xbox-sources-2.4.28.brk-locked.patch 8202
+MD5 7695b79187fcc27339ab62af1112ec11 files/xbox-sources-2.6.10.74070.patch 525
+MD5 e0d5b095eef177dd9cb377c1ba881066 files/digest-xbox-sources-2.4.28-r4 226
+MD5 703b136a244ccde7a8f419b7753cd55e files/digest-xbox-sources-2.4.29 226
+MD5 1d78b90e495e432432e095ee47bbc2fc files/xbox-sources-2.4.28.77094.patch 452
+MD5 8220c1bd949620000d8cb140587af9a2 files/digest-xbox-sources-2.6.10-r2 146
+MD5 b9a94233e1457787352e5f85e3e3582d files/xbox-sources-2.4.28.binfmt_a.out.patch 2009
+MD5 77a23c26c0468c64ee5bc13c9999d79b files/xbox-sources-2.6.10.82141.patch 7684
+MD5 8812f60b8d02b0b3b4c46a3311ddd851 files/xbox-sources-2.6.10.smbfs.patch 2662
+MD5 1efe4024e443e60db5fd9b21b22fabd2 files/xbox-sources-2.4.28.77666.patch 1724
MD5 c27699e9d62f7d46213bd51f87636163 files/xbox-sources-2.4.28.vma.patch 8143
-MD5 655251f31f0bdc85bdd0cd0280af22b7 files/xbox-sources-2.6.10.75963.patch 979
+MD5 6cf860a301930c8cac126ab0c4d859d4 files/xbox-sources-2.4.28.brk-locked.patch 8202
MD5 b4f71191d0b9bc4439cdb8645ff474a7 files/xbox-sources-2.6.10.77094.patch 6122
+MD5 b6cd2468a246169a6e2f969c44e3f341 files/xbox-sources-2.4.28.78362.patch 10372
+MD5 6aa8f7a7c2d55734389b53d3bcf78570 files/xbox-sources-2.4.28.CAN-2004-1016.patch 2835
+MD5 a3f4cfc55b03f9a6104da43da9c38928 files/xbox-sources-2.6.10.77923.patch 1094
+MD5 655251f31f0bdc85bdd0cd0280af22b7 files/xbox-sources-2.6.10.75963.patch 979
MD5 cd0a7533c43364e377348613c6d76bb7 files/xbox-sources-2.6.10.brk-locked.patch 9736
-MD5 8812f60b8d02b0b3b4c46a3311ddd851 files/xbox-sources-2.6.10.smbfs.patch 2662
+MD5 eb75782ba6714f1c78b956e1497816f3 files/xbox-sources-2.6.10.81106.patch 826
MD5 c942eca63f26d0e933a366491340e95b files/xbox-sources-2.6.8.1.CAN-2004-1056.patch 6187
diff --git a/sys-kernel/xbox-sources/files/digest-xbox-sources-2.4.28-r3 b/sys-kernel/xbox-sources/files/digest-xbox-sources-2.4.28-r4
index 44a45c606aa5..44a45c606aa5 100644
--- a/sys-kernel/xbox-sources/files/digest-xbox-sources-2.4.28-r3
+++ b/sys-kernel/xbox-sources/files/digest-xbox-sources-2.4.28-r4
diff --git a/sys-kernel/xbox-sources/files/digest-xbox-sources-2.6.10-r1 b/sys-kernel/xbox-sources/files/digest-xbox-sources-2.6.10-r2
index c6801f17ace1..c6801f17ace1 100644
--- a/sys-kernel/xbox-sources/files/digest-xbox-sources-2.6.10-r1
+++ b/sys-kernel/xbox-sources/files/digest-xbox-sources-2.6.10-r2
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.4.28.77666.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.4.28.77666.patch
new file mode 100644
index 000000000000..6b687788f912
--- /dev/null
+++ b/sys-kernel/xbox-sources/files/xbox-sources-2.4.28.77666.patch
@@ -0,0 +1,44 @@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+# 2005/01/12 09:14:50-02:00 marcelo.tosatti@cyclades.com
+# [PATCH] Fix expand_stack() SMP race
+#
+# Description: Fix expand_stack() SMP race
+#
+# Two threads sharing the same VMA can race in expand_stack, resulting in incorrect VMA
+# size accounting and possibly a "uncovered-by-VMA" pte leak.
+#
+# Fix is to check if the stack has already been expanded after acquiring a lock which
+# guarantees exclusivity (page_table_lock in v2.4 and vma_anon lock in v2.6).
+#
+# include/linux/mm.h
+# 2005/01/07 14:51:21-02:00 marcelo.tosatti@cyclades.com +10 -3
+# Fix expand_stack() SMP race
+#
+diff -Nru a/include/linux/mm.h b/include/linux/mm.h
+--- a/include/linux/mm.h 2005-01-13 04:59:30 -08:00
++++ b/include/linux/mm.h 2005-01-13 04:59:30 -08:00
+@@ -648,12 +648,19 @@
+ unsigned long grow;
+
+ /*
+- * vma->vm_start/vm_end cannot change under us because the caller is required
+- * to hold the mmap_sem in write mode. We need to get the spinlock only
+- * before relocating the vma range ourself.
++ * vma->vm_start/vm_end cannot change under us because the caller
++ * is required to hold the mmap_sem in read mode. We need the
++ * page_table_lock lock to serialize against concurrent expand_stacks.
+ */
+ address &= PAGE_MASK;
+ spin_lock(&vma->vm_mm->page_table_lock);
++
++ /* already expanded while we were spinning? */
++ if (vma->vm_start <= address) {
++ spin_unlock(&vma->vm_mm->page_table_lock);
++ return 0;
++ }
++
+ grow = (vma->vm_start - address) >> PAGE_SHIFT;
+ if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur ||
+ ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_AS].rlim_cur) {
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.4.28.78362.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.4.28.78362.patch
new file mode 100644
index 000000000000..a55aba8a0938
--- /dev/null
+++ b/sys-kernel/xbox-sources/files/xbox-sources-2.4.28.78362.patch
@@ -0,0 +1,274 @@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+# 2004/12/08 13:33:08-08:00 davem@nuts.davemloft.net
+# [NET]: CMSG compat code needs signedness fixes too.
+#
+# Signed-off-by: David S. Miller <davem@davemloft.net>
+#
+# arch/ia64/ia32/sys_ia32.c
+# 2004/12/08 13:32:46-08:00 davem@nuts.davemloft.net +6 -4
+# [NET]: CMSG compat code needs signedness fixes too.
+#
+# arch/mips64/kernel/linux32.c
+# 2004/12/08 13:32:46-08:00 davem@nuts.davemloft.net +7 -5
+# [NET]: CMSG compat code needs signedness fixes too.
+#
+# arch/parisc/kernel/sys_parisc32.c
+# 2004/12/08 13:32:46-08:00 davem@nuts.davemloft.net +6 -5
+# [NET]: CMSG compat code needs signedness fixes too.
+#
+# arch/ppc64/kernel/sys_ppc32.c
+# 2004/12/08 13:32:46-08:00 davem@nuts.davemloft.net +6 -5
+# [NET]: CMSG compat code needs signedness fixes too.
+#
+# arch/s390x/kernel/linux32.c
+# 2004/12/08 13:32:46-08:00 davem@nuts.davemloft.net +6 -5
+# [NET]: CMSG compat code needs signedness fixes too.
+#
+# arch/sparc64/kernel/sys_sparc32.c
+# 2004/12/08 13:32:46-08:00 davem@nuts.davemloft.net +6 -5
+# [NET]: CMSG compat code needs signedness fixes too.
+#
+# arch/x86_64/ia32/socket32.c
+# 2004/12/08 13:32:46-08:00 davem@nuts.davemloft.net +2 -5
+# [NET]: CMSG compat code needs signedness fixes too.
+#
+# include/asm-x86_64/socket32.h
+# 2004/12/08 13:32:46-08:00 davem@nuts.davemloft.net +5 -0
+# [NET]: CMSG compat code needs signedness fixes too.
+#
+# ChangeSet
+# 2004/12/15 09:25:31-02:00 marcelo@logos.cnet
+# [PATCH] Make sure VC resizing fits in s16
+#
+# Noted by George Guninski
+#
+# drivers/char/console.c
+# 2004/12/15 10:58:17-02:00 marcelo@logos.cnet +6 -0
+# Import patch vc-patch
+#
+diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
+--- a/arch/ia64/ia32/sys_ia32.c 2005-02-15 11:50:28 -08:00
++++ b/arch/ia64/ia32/sys_ia32.c 2005-02-15 11:50:28 -08:00
+@@ -1369,6 +1369,11 @@
+ #define __CMSG32_FIRSTHDR(ctl,len) \
+ ((len) >= sizeof(struct cmsghdr32) ? (struct cmsghdr32 *)(ctl) : (struct cmsghdr32 *)NULL)
+ #define CMSG32_FIRSTHDR(msg) __CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
++#define CMSG32_OK(ucmlen, ucmsg, mhdr) \
++ ((ucmlen) >= sizeof(struct cmsghdr) && \
++ (ucmlen) <= (unsigned long) \
++ ((mhdr)->msg_controllen - \
++ ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
+
+ static inline struct cmsghdr32 *
+ __cmsg32_nxthdr (void *ctl, __kernel_size_t size, struct cmsghdr32 *cmsg, int cmsg_len)
+@@ -1429,10 +1434,7 @@
+ return -EFAULT;
+
+ /* Catch bogons. */
+- if (CMSG32_ALIGN(ucmlen) < CMSG32_ALIGN(sizeof(struct cmsghdr32)))
+- return -EINVAL;
+- if ((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control) + ucmlen)
+- > kmsg->msg_controllen)
++ if (!CMSG32_OK(ucmlen, ucmsg, kmsg))
+ return -EINVAL;
+
+ tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) +
+diff -Nru a/arch/mips64/kernel/linux32.c b/arch/mips64/kernel/linux32.c
+--- a/arch/mips64/kernel/linux32.c 2005-02-15 11:50:28 -08:00
++++ b/arch/mips64/kernel/linux32.c 2005-02-15 11:50:28 -08:00
+@@ -2483,6 +2483,12 @@
+ (struct cmsghdr32 *)(ctl) : \
+ (struct cmsghdr32 *)NULL)
+ #define CMSG32_FIRSTHDR(msg) __CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
++#define CMSG32_OK(ucmlen, ucmsg, mhdr) \
++ ((ucmlen) >= sizeof(struct cmsghdr) && \
++ (ucmlen) <= (unsigned long) \
++ ((mhdr)->msg_controllen - \
++ ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
++
+
+ __inline__ struct cmsghdr32 *__cmsg32_nxthdr(void *__ctl, __kernel_size_t __size,
+ struct cmsghdr32 *__cmsg, int __cmsg_len)
+@@ -2623,11 +2629,7 @@
+ return -EFAULT;
+
+ /* Catch bogons. */
+- if(CMSG32_ALIGN(ucmlen) <
+- CMSG32_ALIGN(sizeof(struct cmsghdr32)))
+- return -ENOBUFS;
+- if((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control)
+- + ucmlen) > kmsg->msg_controllen)
++ if (!CMSG32_OK(ucmlen, ucmsg, kmsg))
+ return -EINVAL;
+
+ tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) +
+diff -Nru a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
+--- a/arch/parisc/kernel/sys_parisc32.c 2005-02-15 11:50:28 -08:00
++++ b/arch/parisc/kernel/sys_parisc32.c 2005-02-15 11:50:28 -08:00
+@@ -1814,6 +1814,11 @@
+ (struct cmsghdr32 *)(ctl) : \
+ (struct cmsghdr32 *)NULL)
+ #define CMSG32_FIRSTHDR(msg) __CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
++#define CMSG32_OK(ucmlen, ucmsg, mhdr) \
++ ((ucmlen) >= sizeof(struct cmsghdr) && \
++ (ucmlen) <= (unsigned long) \
++ ((mhdr)->msg_controllen - \
++ ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
+
+ __inline__ struct cmsghdr32 *__cmsg32_nxthdr(void *__ctl, __kernel_size_t __size,
+ struct cmsghdr32 *__cmsg, int __cmsg_len)
+@@ -1940,11 +1945,7 @@
+ return -EFAULT;
+
+ /* Catch bogons. */
+- if(CMSG32_ALIGN(ucmlen) <
+- CMSG32_ALIGN(sizeof(struct cmsghdr32)))
+- return -EINVAL;
+- if((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control)
+- + ucmlen) > kmsg->msg_controllen)
++ if (!CMSG32_OK(ucmlen, ucmsg, kmsg))
+ return -EINVAL;
+
+ tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) +
+diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c
+--- a/arch/ppc64/kernel/sys_ppc32.c 2005-02-15 11:50:28 -08:00
++++ b/arch/ppc64/kernel/sys_ppc32.c 2005-02-15 11:50:28 -08:00
+@@ -3273,6 +3273,11 @@
+ (struct cmsghdr32 *)(ctl) : \
+ (struct cmsghdr32 *)NULL)
+ #define CMSG32_FIRSTHDR(msg) __CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
++#define CMSG32_OK(ucmlen, ucmsg, mhdr) \
++ ((ucmlen) >= sizeof(struct cmsghdr) && \
++ (ucmlen) <= (unsigned long) \
++ ((mhdr)->msg_controllen - \
++ ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
+
+ struct msghdr32
+ {
+@@ -3448,11 +3453,7 @@
+ return -EFAULT;
+
+ /* Catch bogons. */
+- if(CMSG32_ALIGN(ucmlen) <
+- CMSG32_ALIGN(sizeof(struct cmsghdr32)))
+- return -EINVAL;
+- if((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control)
+- + ucmlen) > kmsg->msg_controllen)
++ if (!CMSG32_OK(ucmlen, ucmsg, kmsg))
+ return -EINVAL;
+
+ tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) +
+diff -Nru a/arch/s390x/kernel/linux32.c b/arch/s390x/kernel/linux32.c
+--- a/arch/s390x/kernel/linux32.c 2005-02-15 11:50:28 -08:00
++++ b/arch/s390x/kernel/linux32.c 2005-02-15 11:50:28 -08:00
+@@ -2306,6 +2306,11 @@
+ (struct cmsghdr32 *)(ctl) : \
+ (struct cmsghdr32 *)NULL)
+ #define CMSG32_FIRSTHDR(msg) __CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
++#define CMSG32_OK(ucmlen, ucmsg, mhdr) \
++ ((ucmlen) >= sizeof(struct cmsghdr) && \
++ (ucmlen) <= (unsigned long) \
++ ((mhdr)->msg_controllen - \
++ ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
+
+ __inline__ struct cmsghdr32 *__cmsg32_nxthdr(void *__ctl, __kernel_size_t __size,
+ struct cmsghdr32 *__cmsg, int __cmsg_len)
+@@ -2432,11 +2437,7 @@
+ return -EFAULT;
+
+ /* Catch bogons. */
+- if(CMSG32_ALIGN(ucmlen) <
+- CMSG32_ALIGN(sizeof(struct cmsghdr32)))
+- return -EINVAL;
+- if((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control)
+- + ucmlen) > kmsg->msg_controllen)
++ if (!CMSG32_OK(ucmlen, ucmsg, kmsg))
+ return -EINVAL;
+
+ tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) +
+diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
+--- a/arch/sparc64/kernel/sys_sparc32.c 2005-02-15 11:50:28 -08:00
++++ b/arch/sparc64/kernel/sys_sparc32.c 2005-02-15 11:50:28 -08:00
+@@ -2354,6 +2354,11 @@
+ (struct cmsghdr32 *)(ctl) : \
+ (struct cmsghdr32 *)NULL)
+ #define CMSG32_FIRSTHDR(msg) __CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
++#define CMSG32_OK(ucmlen, ucmsg, mhdr) \
++ ((ucmlen) >= sizeof(struct cmsghdr) && \
++ (ucmlen) <= (unsigned long) \
++ ((mhdr)->msg_controllen - \
++ ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
+
+ __inline__ struct cmsghdr32 *__cmsg32_nxthdr(void *__ctl, __kernel_size_t __size,
+ struct cmsghdr32 *__cmsg, int __cmsg_len)
+@@ -2480,11 +2485,7 @@
+ return -EFAULT;
+
+ /* Catch bogons. */
+- if(CMSG32_ALIGN(ucmlen) <
+- CMSG32_ALIGN(sizeof(struct cmsghdr32)))
+- return -EINVAL;
+- if((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control)
+- + ucmlen) > kmsg->msg_controllen)
++ if (!CMSG32_OK(ucmlen, ucmsg, kmsg))
+ return -EINVAL;
+
+ tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) +
+diff -Nru a/arch/x86_64/ia32/socket32.c b/arch/x86_64/ia32/socket32.c
+--- a/arch/x86_64/ia32/socket32.c 2005-02-15 11:50:28 -08:00
++++ b/arch/x86_64/ia32/socket32.c 2005-02-15 11:50:28 -08:00
+@@ -136,12 +136,9 @@
+ return -EFAULT;
+
+ /* Catch bogons. */
+- if(CMSG32_ALIGN(ucmlen) <
+- CMSG32_ALIGN(sizeof(struct cmsghdr32)))
+- return -EINVAL;
+- if((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control)
+- + ucmlen) > kmsg->msg_controllen)
++ if (!CMSG32_OK(ucmlen, ucmsg, kmsg))
+ return -EINVAL;
++
+ if (kmsg->msg_controllen > 65536)
+ return -EINVAL;
+
+diff -Nru a/include/asm-x86_64/socket32.h b/include/asm-x86_64/socket32.h
+--- a/include/asm-x86_64/socket32.h 2005-02-15 11:50:28 -08:00
++++ b/include/asm-x86_64/socket32.h 2005-02-15 11:50:28 -08:00
+@@ -45,6 +45,11 @@
+ (struct cmsghdr32 *)(ctl) : \
+ (struct cmsghdr32 *)NULL)
+ #define CMSG32_FIRSTHDR(msg) __CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
++#define CMSG32_OK(ucmlen, ucmsg, mhdr) \
++ ((ucmlen) >= sizeof(struct cmsghdr) && \
++ (ucmlen) <= (unsigned long) \
++ ((mhdr)->msg_controllen - \
++ ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
+
+ __inline__ struct cmsghdr32 *__cmsg32_nxthdr(void *__ctl, __kernel_size_t __size,
+ struct cmsghdr32 *__cmsg, int __cmsg_len)
+diff -Nru a/drivers/char/console.c b/drivers/char/console.c
+--- a/drivers/char/console.c 2005-02-15 11:52:04 -08:00
++++ b/drivers/char/console.c 2005-02-15 11:52:04 -08:00
+@@ -705,6 +705,9 @@
+ return 0;
+ }
+
++#define VC_RESIZE_MAXCOL (32767)
++#define VC_RESIZE_MAXROW (32767)
++
+ /*
+ * Change # of rows and columns (0 means unchanged/the size of fg_console)
+ * [this is to be used together with some user program
+@@ -716,6 +719,9 @@
+ unsigned int cc, ll, ss, sr, todo = 0;
+ unsigned int currcons = fg_console, i;
+ unsigned short *newscreens[MAX_NR_CONSOLES];
++
++ if (cols > VC_RESIZE_MAXCOL || lines > VC_RESIZE_MAXROW)
++ return -EINVAL;
+
+ cc = (cols ? cols : video_num_columns);
+ ll = (lines ? lines : video_num_lines);
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.4.28.78363.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.4.28.78363.patch
new file mode 100644
index 000000000000..852807ddc96f
--- /dev/null
+++ b/sys-kernel/xbox-sources/files/xbox-sources-2.4.28.78363.patch
@@ -0,0 +1,29 @@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+# 2004/12/08 12:39:15-08:00 davem@nuts.davemloft.net
+# [IPV4]: Do not leak IP options.
+#
+# If the user makes ip_cmsg_send call ip_options_get
+# multiple times, we leak kmalloced IP options data.
+#
+# Noticed by Georgi Guninski.
+#
+# Signed-off-by: David S. Miller <davem@davemloft.net>
+#
+# net/ipv4/ip_options.c
+# 2004/12/08 12:38:09-08:00 davem@nuts.davemloft.net +2 -0
+# [IPV4]: Do not leak IP options.
+#
+diff -Nru a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
+--- a/net/ipv4/ip_options.c 2005-02-15 11:47:16 -08:00
++++ b/net/ipv4/ip_options.c 2005-02-15 11:47:16 -08:00
+@@ -515,6 +515,8 @@
+ kfree(opt);
+ return -EINVAL;
+ }
++ if (*optp)
++ kfree(*optp);
+ *optp = opt;
+ return 0;
+ }
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.74070.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.74070.patch
new file mode 100644
index 000000000000..3b4ee332f9e9
--- /dev/null
+++ b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.74070.patch
@@ -0,0 +1,11 @@
+--- linux-2.6.10/net/sunrpc/svc.c.orig 2005-01-18 03:18:08.235362992 +0000
++++ linux-2.6.10/net/sunrpc/svc.c 2005-01-18 03:18:28.532277392 +0000
+@@ -446,7 +446,7 @@ err_bad_auth:
+ err_bad_prog:
+ #ifdef RPC_PARANOIA
+ if (prog != 100227 || progp->pg_prog != 100003)
+- printk("svc: unknown program %d (me %d)\n", prog, progp->pg_prog);
++ printk("svc: unknown program %d (me %d)\n", prog, serv->sv_program->pg_prog);
+ /* else it is just a Solaris client seeing if ACLs are supported */
+ #endif
+ serv->sv_stats->rpcbadfmt++;
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.77666.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.77666.patch
new file mode 100644
index 000000000000..2fc42f237429
--- /dev/null
+++ b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.77666.patch
@@ -0,0 +1,170 @@
+--- linux-2.6.9/mm/mmap.c 2005-03-16 21:06:42.000000000 +0000
++++ linux-2.6.9-plasmaroo/mm/mmap.c 2005-03-16 21:09:26.000000000 +0000
+@@ -1316,13 +1316,57 @@ out:
+ return prev ? prev->vm_next : vma;
+ }
+
++/*
++ * Verify that the stack growth is acceptable and
++ * update accounting. This is shared with both the
++ * grow-up and grow-down cases.
++ */
++static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, unsigned long grow)
++{
++ struct mm_struct *mm = vma->vm_mm;
++ struct rlimit *rlim = current->rlim;
++
++ /* address space limit tests */
++ rlim = current->rlim;
++ if (mm->total_vm + grow > rlim[RLIMIT_AS].rlim_cur >> PAGE_SHIFT)
++ return -ENOMEM;
++
++ /* Stack limit test */
++ if (size > rlim[RLIMIT_STACK].rlim_cur)
++ return -ENOMEM;
++
++ /* mlock limit tests */
++ if (vma->vm_flags & VM_LOCKED) {
++ unsigned long locked;
++ unsigned long limit;
++ locked = mm->locked_vm + grow;
++ limit = rlim[RLIMIT_MEMLOCK].rlim_cur >> PAGE_SHIFT;
++ if (locked > limit && !capable(CAP_IPC_LOCK))
++ return -ENOMEM;
++ }
++
++ /*
++ * Overcommit.. This must be the final test, as it will
++ * update security statistics.
++ */
++ if (security_vm_enough_memory(grow))
++ return -ENOMEM;
++
++ /* Ok, everything looks good - let it rip */
++ mm->total_vm += grow;
++ if (vma->vm_flags & VM_LOCKED)
++ mm->locked_vm += grow;
++ __vm_stat_account(mm, vma->vm_flags, vma->vm_file, grow);
++ return 0;
++}
++
+ #ifdef CONFIG_STACK_GROWSUP
+ /*
+ * vma is the first one with address > vma->vm_end. Have to extend vma.
+ */
+ int expand_stack(struct vm_area_struct * vma, unsigned long address)
+ {
+- unsigned long grow;
++ int error;
+
+ if (!(vma->vm_flags & VM_GROWSUP))
+ return -EFAULT;
+@@ -1342,20 +1386,18 @@ int expand_stack(struct vm_area_struct *
+ */
+ address += 4 + PAGE_SIZE - 1;
+ address &= PAGE_MASK;
+- grow = (address - vma->vm_end) >> PAGE_SHIFT;
++ error = 0;
+
+- /* Overcommit.. */
+- if (security_vm_enough_memory(grow)) {
+- anon_vma_unlock(vma);
+- return -ENOMEM;
+- }
+-
+- if (address - vma->vm_start > current->signal->rlim[RLIMIT_STACK].rlim_cur ||
+- ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
+- current->signal->rlim[RLIMIT_AS].rlim_cur) {
+- anon_vma_unlock(vma);
+- vm_unacct_memory(grow);
+- return -ENOMEM;
++ /* Somebody else might have raced and expanded it already */
++ if (address > vma->vm_end) {
++ unsigned long size, grow;
++
++ size = address - vma->vm_start;
++ grow = (address - vma->vm_end) >> PAGE_SHIFT;
++
++ error = acct_stack_growth(vma, size, grow);
++ if (!error)
++ vma->vm_end = address;
+ }
+ if ((vma->vm_flags & VM_LOCKED) && !capable(CAP_IPC_LOCK) &&
+ ((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
+@@ -1364,13 +1406,12 @@ int expand_stack(struct vm_area_struct *
+ vm_unacct_memory(grow);
+ return -ENOMEM;
+ }
+- vma->vm_end = address;
+- vma->vm_mm->total_vm += grow;
+- if (vma->vm_flags & VM_LOCKED)
+- vma->vm_mm->locked_vm += grow;
++ error = acct_stack_growth(vma, size, grow);
++ if (!error)
++ vma->vm_end = address;
+ __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, grow);
+ anon_vma_unlock(vma);
+- return 0;
++ return error;
+ }
+
+ struct vm_area_struct *
+@@ -1395,7 +1436,7 @@ find_extend_vma(struct mm_struct *mm, un
+ */
+ int expand_stack(struct vm_area_struct *vma, unsigned long address)
+ {
+- unsigned long grow;
++ int error;
+
+ /*
+ * We must make sure the anon_vma is allocated
+@@ -1411,20 +1452,20 @@ int expand_stack(struct vm_area_struct *
+ * anon_vma lock to serialize against concurrent expand_stacks.
+ */
+ address &= PAGE_MASK;
+- grow = (vma->vm_start - address) >> PAGE_SHIFT;
++ error = 0;
+
+- /* Overcommit.. */
+- if (security_vm_enough_memory(grow)) {
+- anon_vma_unlock(vma);
+- return -ENOMEM;
+- }
+-
+- if (vma->vm_end - address > current->signal->rlim[RLIMIT_STACK].rlim_cur ||
+- ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
+- current->signal->rlim[RLIMIT_AS].rlim_cur) {
+- anon_vma_unlock(vma);
+- vm_unacct_memory(grow);
+- return -ENOMEM;
++ /* Somebody else might have raced and expanded it already */
++ if (address < vma->vm_start) {
++ unsigned long size, grow;
++
++ size = vma->vm_end - address;
++ grow = (vma->vm_start - address) >> PAGE_SHIFT;
++
++ error = acct_stack_growth(vma, size, grow);
++ if (!error) {
++ vma->vm_start = address;
++ vma->vm_pgoff -= grow;
++ }
+ }
+ if ((vma->vm_flags & VM_LOCKED) && !capable(CAP_IPC_LOCK) &&
+ ((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
+@@ -1433,14 +1474,9 @@ int expand_stack(struct vm_area_struct *
+ vm_unacct_memory(grow);
+ return -ENOMEM;
+ }
+- vma->vm_start = address;
+- vma->vm_pgoff -= grow;
+- vma->vm_mm->total_vm += grow;
+- if (vma->vm_flags & VM_LOCKED)
+- vma->vm_mm->locked_vm += grow;
+ __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, grow);
+ anon_vma_unlock(vma);
+- return 0;
++ return error;
+ }
+
+ struct vm_area_struct *
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.77923.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.77923.patch
new file mode 100644
index 000000000000..30bed5b3fb0e
--- /dev/null
+++ b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.77923.patch
@@ -0,0 +1,31 @@
+# ChangeSet
+# 2005/01/04 15:57:25-08:00 brugolsky@telemetry-investments.com.
+# [PATCH] NFS client O_DIRECT error case fix
+#
+# The NFS direct-io error return path for request sizes greater than
+# MAX_DIRECTIO_SIZE fails to initialize the returned page struct array
+# pointer to NULL.
+#
+# Discovered using AKPM's ext3-tools: odwrite -ko 0 16385 foo
+#
+# Signed-off-by: Bill Rugolsky <brugolsky@telemetry-investments.com>
+# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+#
+# fs/nfs/direct.c
+# 2005/01/04 13:55:37-08:00 brugolsky@telemetry-investments.com +3 -1
+# NFS client O_DIRECT error case fix
+#
+diff -Nru linux-2.6.10/fs/nfs/direct.c linux-2.6.10.plasmaroo/fs/nfs/direct.c
+--- linux-2.6.10/fs/nfs/direct.c 2005-01-11 21:28:34 +01:00
++++ linux-2.6.10.plasmaroo/fs/nfs/direct.c 2005-01-11 21:28:34 +01:00
+@@ -73,7 +73,10 @@
+
+ /* set an arbitrary limit to prevent arithmetic overflow */
+ if (size > MAX_DIRECTIO_SIZE)
++ {
++ *pages = NULL;
+ return -EFBIG;
++ }
+
+ page_count = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT;
+ page_count -= user_addr >> PAGE_SHIFT;
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.81106.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.81106.patch
new file mode 100644
index 000000000000..44abcbca1ac0
--- /dev/null
+++ b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.81106.patch
@@ -0,0 +1,32 @@
+# ChangeSet
+# 2005/01/25 10:10:51+00:00 aia21@cantab.net
+# NTFS: Add printk rate limiting for ntfs_warning() and ntfs_error() when
+# compiled without debug. This avoids a possible denial of service
+# attack. Thanks to Carl-Daniel Hailfinger from SuSE for pointing this
+# out.
+#
+diff -Nru a/fs/ntfs/debug.c b/fs/ntfs/debug.c
+--- a/fs/ntfs/debug.c 2005-02-15 12:38:26 -08:00
++++ b/fs/ntfs/debug.c 2005-02-15 12:38:26 -08:00
+@@ -53,6 +53,10 @@
+ va_list args;
+ int flen = 0;
+
++#ifndef DEBUG
++ if (!printk_ratelimit())
++ return;
++#endif
+ if (function)
+ flen = strlen(function);
+ spin_lock(&err_buf_lock);
+@@ -93,6 +97,10 @@
+ va_list args;
+ int flen = 0;
+
++#ifndef DEBUG
++ if (!printk_ratelimit())
++ return;
++#endif
+ if (function)
+ flen = strlen(function);
+ spin_lock(&err_buf_lock);
diff --git a/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.82141.patch b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.82141.patch
new file mode 100644
index 000000000000..b4a02f7871fb
--- /dev/null
+++ b/sys-kernel/xbox-sources/files/xbox-sources-2.6.10.82141.patch
@@ -0,0 +1,191 @@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+# 2005/02/02 17:41:06-08:00 guninski@guninski.com
+# [PATCH] Fix sign checks in copy_from_read_buf()
+#
+# Fix signedness and remove the now unnecessary cast.
+#
+# Acked-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
+# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+#
+# drivers/char/n_tty.c
+# 2005/01/30 07:56:05-08:00 guninski@guninski.com +2 -2
+# Fix sign checks in copy_from_read_buf()
+#
+# ChangeSet
+# 2005/02/02 17:42:38-08:00 guninski@guninski.com
+# [PATCH] Fix signed compare in fs/proc/generic.c::proc_file_read()
+#
+# Acked-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
+# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+#
+# fs/proc/generic.c
+# 2005/01/30 07:58:00-08:00 guninski@guninski.com +1 -1
+# Fix signed compare in fs/proc/generic.c::proc_file_read()
+#
+# ChangeSet
+# 2005/02/02 17:45:11-08:00 guninski@guninski.com
+# [PATCH] reiserfs: use proper 64-bit clean types
+#
+# reiserfs_file_write() casts its (size_t) count parameter to int, which can become
+# a problem on 64-bit architectures
+#
+# This attempts to fix this by changing the variables dealing with count
+# and offset and the "min_t" comparisons to use "size_t" through-out.
+#
+# Acked-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
+# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+#
+# fs/reiserfs/file.c
+# 2005/01/26 07:28:12-08:00 guninski@guninski.com +11 -12
+# reiserfs: use proper 64-bit clean types
+#
+# ChangeSet
+# 2005/02/08 07:59:56-08:00 torvalds@ppc970.osdl.org
+# Fix ATM copy-to-user usage.
+#
+# More of the Guninski "copy_to_user() takes a size_t" series.
+#
+# net/atm/addr.c
+# 2005/02/08 07:59:48-08:00 torvalds@ppc970.osdl.org +1 -1
+# Fix ATM copy-to-user usage.
+#
+# More of the Guninski "copy_to_user() takes a size_t" series.
+#
+# net/atm/addr.h
+# 2005/02/08 07:59:48-08:00 torvalds@ppc970.osdl.org +1 -1
+# Fix ATM copy-to-user usage.
+#
+# More of the Guninski "copy_to_user() takes a size_t" series.
+#
+diff -Nru a/drivers/char/n_tty.c b/drivers/char/n_tty.c
+--- a/drivers/char/n_tty.c 2005-02-15 11:56:06 -08:00
++++ b/drivers/char/n_tty.c 2005-02-15 11:56:06 -08:00
+@@ -1143,13 +1143,13 @@
+
+ {
+ int retval;
+- ssize_t n;
++ size_t n;
+ unsigned long flags;
+
+ retval = 0;
+ spin_lock_irqsave(&tty->read_lock, flags);
+ n = min(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail);
+- n = min((ssize_t)*nr, n);
++ n = min(*nr, n);
+ spin_unlock_irqrestore(&tty->read_lock, flags);
+ if (n) {
+ mb();
+diff -Nru a/fs/proc/generic.c b/fs/proc/generic.c
+--- a/fs/proc/generic.c 2005-02-15 11:55:35 -08:00
++++ b/fs/proc/generic.c 2005-02-15 11:55:35 -08:00
+@@ -60,7 +60,7 @@
+ return -ENOMEM;
+
+ while ((nbytes > 0) && !eof) {
+- count = min_t(ssize_t, PROC_BLOCK_SIZE, nbytes);
++ count = min_t(size_t, PROC_BLOCK_SIZE, nbytes);
+
+ start = NULL;
+ if (dp->get_info) {
+diff -Nru a/fs/reiserfs/file.c b/fs/reiserfs/file.c
+--- a/fs/reiserfs/file.c 2005-02-15 11:56:07 -08:00
++++ b/fs/reiserfs/file.c 2005-02-15 11:56:07 -08:00
+@@ -588,7 +588,7 @@
+
+ /* Unlock pages prepared by reiserfs_prepare_file_region_for_write */
+ void reiserfs_unprepare_pages(struct page **prepared_pages, /* list of locked pages */
+- int num_pages /* amount of pages */) {
++ size_t num_pages /* amount of pages */) {
+ int i; // loop counter
+
+ for (i=0; i < num_pages ; i++) {
+@@ -619,7 +619,7 @@
+ int offset; // offset in page
+
+ for ( i = 0, offset = (pos & (PAGE_CACHE_SIZE-1)); i < num_pages ; i++,offset=0) {
+- int count = min_t(int,PAGE_CACHE_SIZE-offset,write_bytes); // How much of bytes to write to this page
++ size_t count = min_t(size_t,PAGE_CACHE_SIZE-offset,write_bytes); // How much of bytes to write to this page
+ struct page *page=prepared_pages[i]; // Current page we process.
+
+ fault_in_pages_readable( buf, count);
+@@ -718,8 +718,8 @@
+ struct reiserfs_transaction_handle *th,
+ struct inode *inode,
+ loff_t pos, /* Writing position offset */
+- int num_pages, /* Number of pages to write */
+- int write_bytes, /* number of bytes to write */
++ size_t num_pages, /* Number of pages to write */
++ size_t write_bytes, /* number of bytes to write */
+ struct page **prepared_pages /* list of pages */
+ )
+ {
+@@ -854,9 +854,9 @@
+ static int reiserfs_prepare_file_region_for_write(
+ struct inode *inode /* Inode of the file */,
+ loff_t pos, /* position in the file */
+- int num_pages, /* number of pages to
++ size_t num_pages, /* number of pages to
+ prepare */
+- int write_bytes, /* Amount of bytes to be
++ size_t write_bytes, /* Amount of bytes to be
+ overwritten from
+ @pos */
+ struct page **prepared_pages /* pointer to array
+@@ -1252,10 +1252,9 @@
+ while ( count > 0) {
+ /* This is the main loop in which we running until some error occures
+ or until we write all of the data. */
+- int num_pages;/* amount of pages we are going to write this iteration */
+- int write_bytes; /* amount of bytes to write during this iteration */
+- int blocks_to_allocate; /* how much blocks we need to allocate for
+- this iteration */
++ size_t num_pages;/* amount of pages we are going to write this iteration */
++ size_t write_bytes; /* amount of bytes to write during this iteration */
++ size_t blocks_to_allocate; /* how much blocks we need to allocate for this iteration */
+
+ /* (pos & (PAGE_CACHE_SIZE-1)) is an idiom for offset into a page of pos*/
+ num_pages = !!((pos+count) & (PAGE_CACHE_SIZE - 1)) + /* round up partial
+@@ -1269,7 +1268,7 @@
+ /* If we were asked to write more data than we want to or if there
+ is not that much space, then we shorten amount of data to write
+ for this iteration. */
+- num_pages = min_t(int, REISERFS_WRITE_PAGES_AT_A_TIME, reiserfs_can_fit_pages(inode->i_sb));
++ num_pages = min_t(size_t, REISERFS_WRITE_PAGES_AT_A_TIME, reiserfs_can_fit_pages(inode->i_sb));
+ /* Also we should not forget to set size in bytes accordingly */
+ write_bytes = (num_pages << PAGE_CACHE_SHIFT) -
+ (pos & (PAGE_CACHE_SIZE-1));
+@@ -1295,7 +1294,7 @@
+ // But overwriting files on absolutelly full volumes would not
+ // be very efficient. Well, people are not supposed to fill
+ // 100% of disk space anyway.
+- write_bytes = min_t(int, count, inode->i_sb->s_blocksize - (pos & (inode->i_sb->s_blocksize - 1)));
++ write_bytes = min_t(size_t, count, inode->i_sb->s_blocksize - (pos & (inode->i_sb->s_blocksize - 1)));
+ num_pages = 1;
+ // No blocks were claimed before, so do it now.
+ reiserfs_claim_blocks_to_be_allocated(inode->i_sb, 1 << (PAGE_CACHE_SHIFT - inode->i_blkbits));
+diff -Nru a/net/atm/addr.c b/net/atm/addr.c
+--- a/net/atm/addr.c 2005-02-15 11:56:16 -08:00
++++ b/net/atm/addr.c 2005-02-15 11:56:16 -08:00
+@@ -114,7 +114,7 @@
+ }
+
+
+-int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc __user *buf,int size)
++int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc __user *buf,size_t size)
+ {
+ unsigned long flags;
+ struct atm_dev_addr *walk;
+diff -Nru a/net/atm/addr.h b/net/atm/addr.h
+--- a/net/atm/addr.h 2005-02-15 11:56:16 -08:00
++++ b/net/atm/addr.h 2005-02-15 11:56:16 -08:00
+@@ -13,6 +13,6 @@
+ void atm_reset_addr(struct atm_dev *dev);
+ int atm_add_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
+ int atm_del_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
+-int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc __user *buf,int size);
++int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc __user *buf,size_t size);
+
+ #endif
diff --git a/sys-kernel/xbox-sources/xbox-sources-2.4.28-r3.ebuild b/sys-kernel/xbox-sources/xbox-sources-2.4.28-r4.ebuild
index e08236209412..ce5bfdf692f4 100644
--- a/sys-kernel/xbox-sources/xbox-sources-2.4.28-r3.ebuild
+++ b/sys-kernel/xbox-sources/xbox-sources-2.4.28-r4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/xbox-sources-2.4.28-r3.ebuild,v 1.1 2005/01/09 17:03:25 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/xbox-sources-2.4.28-r4.ebuild,v 1.1 2005/03/26 20:28:36 plasmaroo Exp $
ETYPE="sources"
inherit kernel-2
@@ -25,4 +25,7 @@ UNIPATCH_LIST="
${FILESDIR}/${P}.CAN-2004-1056.patch
${FILESDIR}/${P}.CAN-2004-1137.patch
${FILESDIR}/${P}.brk-locked.patch
- ${FILESDIR}/${P}.77094.patch"
+ ${FILESDIR}/${P}.77094.patch
+ ${FILESDIR}/${P}.77666.patch
+ ${FILESDIR}/${P}.78362.patch
+ ${FILESDIR}/${P}.78363.patch"
diff --git a/sys-kernel/xbox-sources/xbox-sources-2.6.10-r1.ebuild b/sys-kernel/xbox-sources/xbox-sources-2.6.10-r2.ebuild
index 545cf43abd7b..1ccbb01ce351 100644
--- a/sys-kernel/xbox-sources/xbox-sources-2.6.10-r1.ebuild
+++ b/sys-kernel/xbox-sources/xbox-sources-2.6.10-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/xbox-sources-2.6.10-r1.ebuild,v 1.1 2005/01/09 17:03:25 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xbox-sources/xbox-sources-2.6.10-r2.ebuild,v 1.1 2005/03/26 20:28:36 plasmaroo Exp $
ETYPE='sources'
inherit kernel-2
@@ -17,7 +17,12 @@ UNIPATCH_LIST="
${FILESDIR}/${P}.smbfs.patch
${FILESDIR}/${P}.75963.patch
${FILESDIR}/${P}.brk-locked.patch
- ${FILESDIR}/${P}.77094.patch"
+ ${FILESDIR}/${P}.77094.patch
+ ${FILESDIR}/${P}.74070.patch
+ ${FILESDIR}/${P}.77666.patch
+ ${FILESDIR}/${P}.77923.patch
+ ${FILESDIR}/${P}.81106.patch
+ ${FILESDIR}/${P}.82141.patch"
DESCRIPTION='Full sources for the Xbox Linux kernel'
SRC_URI="${KERNEL_URI}
mirror://gentoo/${XBOX_PATCHES}"