diff options
author | Daniel Drake <dsd@gentoo.org> | 2005-04-30 16:06:55 +0000 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2005-04-30 16:06:55 +0000 |
commit | 45bbf9e3ce7f0c8816ddf9461a7e747faaa9b048 (patch) | |
tree | e063c58beae0b0f3b14784d086bb0f4ecd343d67 /sys-kernel | |
parent | Remove 2.4.20 and cleanout files/ (diff) | |
download | gentoo-2-45bbf9e3ce7f0c8816ddf9461a7e747faaa9b048.tar.gz gentoo-2-45bbf9e3ce7f0c8816ddf9461a7e747faaa9b048.tar.bz2 gentoo-2-45bbf9e3ce7f0c8816ddf9461a7e747faaa9b048.zip |
Remove ck-sources-2.4
(Portage version: 1.589-cvs)
Diffstat (limited to 'sys-kernel')
16 files changed, 17 insertions, 1572 deletions
diff --git a/sys-kernel/ck-sources/ChangeLog b/sys-kernel/ck-sources/ChangeLog index 571f8726d230..7ba06f4094f1 100644 --- a/sys-kernel/ck-sources/ChangeLog +++ b/sys-kernel/ck-sources/ChangeLog @@ -1,6 +1,22 @@ # ChangeLog for sys-kernel/ck-sources # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ChangeLog,v 1.92 2005/04/09 05:42:15 marineam Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ChangeLog,v 1.93 2005/04/30 16:06:55 dsd Exp $ + + 30 Apr 2005; Daniel Drake <dsd@gentoo.org> + -files/ck-sources-2.4.28.77094.patch, + -files/ck-sources-2.4.28.CAN-2004-1137.patch, + -files/ck-sources-2.4.28.77666.patch, + -files/ck-sources-2.4.28.78362.patch, + -files/ck-sources-2.4.28.78363.patch, + -files/ck-sources-2.4.28.CAN-2004-1016.patch, + -files/ck-sources-2.4.28.81106.patch, + -files/ck-sources-2.4.28.CAN-2004-1056.patch, + -files/ck-sources-2.4.28.binfmt_a.out.patch, + -files/ck-sources-2.4.28.brk-locked.patch, + -files/ck-sources-2.4.28.cmdlineLeak.patch, + -files/ck-sources-2.4.28.compileFix.patch, + -files/ck-sources-2.4.28.vma.patch, -ck-sources-2.4.28-r3.ebuild: + Remove ck-sources-2.4 *ck-sources-2.6.11-r4 (09 Apr 2005) diff --git a/sys-kernel/ck-sources/ck-sources-2.4.28-r3.ebuild b/sys-kernel/ck-sources/ck-sources-2.4.28-r3.ebuild deleted file mode 100644 index 192a925bfbae..000000000000 --- a/sys-kernel/ck-sources/ck-sources-2.4.28-r3.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ck-sources-2.4.28-r3.ebuild,v 1.2 2005/02/18 19:55:15 plasmaroo Exp $ - -ETYPE="sources" - -inherit kernel-2 -detect_version - -# CKV=con kolivas release version -CKV="1" - -KEYWORDS="~x86" -IUSE="" -UNIPATCH_STRICTORDER="Y" -UNIPATCH_LIST="${DISTDIR}/patch-${PV}-lck${CKV}.bz2 - ${FILESDIR}/${P}.cmdlineLeak.patch - ${FILESDIR}/${P}.CAN-2004-1016.patch - ${FILESDIR}/${P}.CAN-2004-1056.patch - ${FILESDIR}/${P}.CAN-2004-1137.patch - ${FILESDIR}/${P}.compileFix.patch - ${FILESDIR}/${P}.binfmt_a.out.patch - ${FILESDIR}/${P}.vma.patch - ${FILESDIR}/${P}.brk-locked.patch - ${DISTDIR}/${P}-CAN-2004-0814.patch - ${FILESDIR}/${P}.77094.patch - ${FILESDIR}/${P}.77666.patch - ${FILESDIR}/${P}.78362.patch - ${FILESDIR}/${P}.78363.patch - ${FILESDIR}/${P}.81106.patch" - -DESCRIPTION="Full sources for the Stock Linux kernel Con Kolivas's high performance patchset" -HOMEPAGE="http://members.optusnet.com.au/ckolivas/kernel/" -SRC_URI="${KERNEL_URI} - http://www.plumlocosoft.com/kernel/patches/2.4/${PV}/${PV}-lck${CKV}/patch-${PV}-lck${CKV}.bz2 - http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/linux-2.4.28-CAN-2004-0814.patch" diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.28.77094.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.77094.patch deleted file mode 100644 index cc3a1552c83d..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.77094.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur linux-2.4.28/drivers/char/random.c linux-2.4.28.plasmaroo/drivers/char/random.c ---- linux-2.4.28/drivers/char/random.c 2004-11-17 11:54:21.000000000 +0000 -+++ linux-2.4.28.plasmaroo/drivers/char/random.c 2005-01-08 02:54:49.198635736 +0000 -@@ -1787,7 +1787,7 @@ - void *oldval, size_t *oldlenp, - void *newval, size_t newlen, void **context) - { -- int len; -+ size_t len; - - sysctl_poolsize = random_state->poolinfo.POOLBYTES; - diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.28.77666.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.77666.patch deleted file mode 100644 index 6b687788f912..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.77666.patch +++ /dev/null @@ -1,44 +0,0 @@ -# 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/ck-sources/files/ck-sources-2.4.28.78362.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.78362.patch deleted file mode 100644 index a55aba8a0938..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.78362.patch +++ /dev/null @@ -1,274 +0,0 @@ -# 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/ck-sources/files/ck-sources-2.4.28.78363.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.78363.patch deleted file mode 100644 index 852807ddc96f..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.78363.patch +++ /dev/null @@ -1,29 +0,0 @@ -# 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/ck-sources/files/ck-sources-2.4.28.81106.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.81106.patch deleted file mode 100644 index 2cc0ab84ebb8..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.81106.patch +++ /dev/null @@ -1,83 +0,0 @@ -# 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. -# -# <plasmaroo>: printk_ratelimit() backported from 2.6. -# -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 -@@ -25,6 +25,48 @@ - #endif - - #include "debug.h" -+#include <linux/sched.h> -+ -+/* minimum time in jiffies between messages */ -+int printk_ratelimit_jiffies = 5*HZ; -+ -+/* number of messages we send before ratelimiting */ -+int printk_ratelimit_burst = 10; -+ -+/* -+ * printk rate limiting, lifted from the networking subsystem. -+ * -+ * This enforces a rate limit: not more than one kernel message -+ * every printk_ratelimit_jiffies to make a denial-of-service -+ * attack impossible. -+ */ -+int printk_ratelimit(void) -+{ -+ static spinlock_t ratelimit_lock = SPIN_LOCK_UNLOCKED; -+ static unsigned long toks = 10*5*HZ; -+ static unsigned long last_msg; -+ static int missed; -+ unsigned long flags; -+ unsigned long now = jiffies; -+ -+ spin_lock_irqsave(&ratelimit_lock, flags); -+ toks += now - last_msg; -+ last_msg = now; -+ if (toks > (printk_ratelimit_burst * printk_ratelimit_jiffies)) -+ toks = printk_ratelimit_burst * printk_ratelimit_jiffies; -+ if (toks >= printk_ratelimit_jiffies) { -+ int lost = missed; -+ missed = 0; -+ toks -= printk_ratelimit_jiffies; -+ spin_unlock_irqrestore(&ratelimit_lock, flags); -+ if (lost) -+ printk(KERN_WARNING "printk: %d messages suppressed.\n", lost); -+ return 1; -+ } -+ missed++; -+ spin_unlock_irqrestore(&ratelimit_lock, flags); -+ return 0; -+} - - /* - * A static buffer to hold the error string being displayed and a spinlock -@@ -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/ck-sources/files/ck-sources-2.4.28.CAN-2004-1016.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.CAN-2004-1016.patch deleted file mode 100644 index aa25ac95ed61..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.CAN-2004-1016.patch +++ /dev/null @@ -1,75 +0,0 @@ -===== include/linux/socket.h 1.12 vs edited ===== ---- 1.12/include/linux/socket.h 2004-09-09 06:40:01 +10:00 -+++ edited/include/linux/socket.h 2004-11-27 11:53:40 +11:00 -@@ -90,6 +90,10 @@ - (struct cmsghdr *)(ctl) : \ - (struct cmsghdr *)NULL) - #define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen) -+#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \ -+ (cmsg)->cmsg_len <= (unsigned long) \ -+ ((mhdr)->msg_controllen - \ -+ ((char *)(cmsg) - (char *)(mhdr)->msg_control))) - - /* - * This mess will go away with glibc -===== net/core/scm.c 1.10 vs edited ===== ---- 1.10/net/core/scm.c 2004-05-31 05:08:14 +10:00 -+++ edited/net/core/scm.c 2004-11-27 11:48:55 +11:00 -@@ -127,9 +127,7 @@ - for too short ancillary data object at all! Oops. - OK, let's add it... - */ -- if (cmsg->cmsg_len < sizeof(struct cmsghdr) || -- (unsigned long)(((char*)cmsg - (char*)msg->msg_control) -- + cmsg->cmsg_len) > msg->msg_controllen) -+ if (!CMSG_OK(msg, cmsg)) - goto error; - - if (cmsg->cmsg_level != SOL_SOCKET) -===== net/ipv4/ip_sockglue.c 1.26 vs edited ===== ---- 1.26/net/ipv4/ip_sockglue.c 2004-07-01 06:10:53 +10:00 -+++ edited/net/ipv4/ip_sockglue.c 2004-11-27 11:49:45 +11:00 -@@ -146,11 +146,8 @@ - struct cmsghdr *cmsg; - - for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { -- if (cmsg->cmsg_len < sizeof(struct cmsghdr) || -- (unsigned long)(((char*)cmsg - (char*)msg->msg_control) -- + cmsg->cmsg_len) > msg->msg_controllen) { -+ if (!CMSG_OK(msg, cmsg)) - return -EINVAL; -- } - if (cmsg->cmsg_level != SOL_IP) - continue; - switch (cmsg->cmsg_type) { -===== net/ipv6/datagram.c 1.20 vs edited ===== ---- 1.20/net/ipv6/datagram.c 2004-11-10 17:57:03 +11:00 -+++ edited/net/ipv6/datagram.c 2004-11-27 11:51:15 +11:00 -@@ -427,9 +427,7 @@ - int addr_type; - struct net_device *dev = NULL; - -- if (cmsg->cmsg_len < sizeof(struct cmsghdr) || -- (unsigned long)(((char*)cmsg - (char*)msg->msg_control) -- + cmsg->cmsg_len) > msg->msg_controllen) { -+ if (!CMSG_OK(msg, cmsg)) { - err = -EINVAL; - goto exit_f; - } -===== net/sctp/socket.c 1.129 vs edited ===== ---- 1.129/net/sctp/socket.c 2004-11-19 08:43:18 +11:00 -+++ edited/net/sctp/socket.c 2004-11-27 11:52:11 +11:00 -@@ -4098,12 +4098,8 @@ - for (cmsg = CMSG_FIRSTHDR(msg); - cmsg != NULL; - cmsg = CMSG_NXTHDR((struct msghdr*)msg, cmsg)) { -- /* Check for minimum length. The SCM code has this check. */ -- if (cmsg->cmsg_len < sizeof(struct cmsghdr) || -- (unsigned long)(((char*)cmsg - (char*)msg->msg_control) -- + cmsg->cmsg_len) > msg->msg_controllen) { -+ if (!CMSG_OK(msg, cmsg)) - return -EINVAL; -- } - - /* Should we parse this header or ignore? */ - if (cmsg->cmsg_level != IPPROTO_SCTP) diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.28.CAN-2004-1056.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.CAN-2004-1056.patch deleted file mode 100644 index 53b777acaac5..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.CAN-2004-1056.patch +++ /dev/null @@ -1,321 +0,0 @@ -diff -ur linux-2.4.28/drivers/char/drm/i810.h linux-2.4.28.plasmaroo/drivers/char/drm/i810.h ---- linux-2.4.28/drivers/char/drm/i810.h 2003-11-28 18:26:20.000000000 +0000 -+++ linux-2.4.28.plasmaroo/drivers/char/drm/i810.h 2004-12-23 16:26:31.000000000 +0000 -@@ -114,4 +114,14 @@ - #define DRIVER_AGP_BUFFERS_MAP( dev ) \ - ((drm_i810_private_t *)((dev)->dev_private))->buffer_map - -+#define LOCK_TEST_WITH_RETURN( dev ) \ -+do { \ -+ if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ -+ dev->lock.pid != current->pid ) { \ -+ DRM_ERROR( "%s called without lock held\n", \ -+ __FUNCTION__ ); \ -+ return -EINVAL; \ -+ } \ -+} while (0) -+ - #endif -diff -ur linux-2.4.28/drivers/char/drm/i810_dma.c linux-2.4.28.plasmaroo/drivers/char/drm/i810_dma.c ---- linux-2.4.28/drivers/char/drm/i810_dma.c 2004-02-18 13:36:31.000000000 +0000 -+++ linux-2.4.28.plasmaroo/drivers/char/drm/i810_dma.c 2004-12-23 16:27:16.000000000 +0000 -@@ -948,10 +948,7 @@ - drm_file_t *priv = filp->private_data; - drm_device_t *dev = priv->dev; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_flush_ioctl called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - i810_flush_queue(dev); - return 0; -@@ -973,10 +970,7 @@ - if (copy_from_user(&vertex, (drm_i810_vertex_t *)arg, sizeof(vertex))) - return -EFAULT; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_dma_vertex called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - if(vertex.idx < 0 || vertex.idx > dma->buf_count) return -EINVAL; - -@@ -1004,10 +998,7 @@ - if (copy_from_user(&clear, (drm_i810_clear_t *)arg, sizeof(clear))) - return -EFAULT; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_clear_bufs called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - /* GH: Someone's doing nasty things... */ - if (!dev->dev_private) { -@@ -1026,10 +1017,7 @@ - drm_file_t *priv = filp->private_data; - drm_device_t *dev = priv->dev; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_swap_buf called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - i810_dma_dispatch_swap( dev ); - return 0; -@@ -1064,10 +1052,7 @@ - if (copy_from_user(&d, (drm_i810_dma_t *)arg, sizeof(d))) - return -EFAULT; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_dma called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - d.granted = 0; - -@@ -1174,11 +1159,7 @@ - if (copy_from_user(&mc, (drm_i810_mc_t *)arg, sizeof(mc))) - return -EFAULT; - -- -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_dma_mc called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - i810_dma_dispatch_mc(dev, dma->buflist[mc.idx], mc.used, - mc.last_render ); -@@ -1223,10 +1204,7 @@ - drm_device_t *dev = priv->dev; - drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_fstatus called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - return I810_READ(0x30008); - } - -@@ -1237,10 +1215,7 @@ - drm_device_t *dev = priv->dev; - drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_ov0_flip called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - //Tell the overlay to update - I810_WRITE(0x30000,dev_priv->overlay_physical | 0x80000000); -diff -ur linux-2.4.28/drivers/char/drm/i830.h linux-2.4.28.plasmaroo/drivers/char/drm/i830.h ---- linux-2.4.28/drivers/char/drm/i830.h 2003-11-28 18:26:20.000000000 +0000 -+++ linux-2.4.28.plasmaroo/drivers/char/drm/i830.h 2004-12-23 16:31:33.000000000 +0000 -@@ -154,4 +154,14 @@ - #define DRIVER_AGP_BUFFERS_MAP( dev ) \ - ((drm_i830_private_t *)((dev)->dev_private))->buffer_map - -+#define LOCK_TEST_WITH_RETURN( dev ) \ -+do { \ -+ if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ -+ dev->lock.pid != current->pid ) { \ -+ DRM_ERROR( "%s called without lock held\n", \ -+ __FUNCTION__ ); \ -+ return -EINVAL; \ -+ } \ -+} while (0) -+ - #endif -diff -ur linux-2.4.28/drivers/char/drm/i830_dma.c linux-2.4.28.plasmaroo/drivers/char/drm/i830_dma.c ---- linux-2.4.28/drivers/char/drm/i830_dma.c 2004-02-18 13:36:31.000000000 +0000 -+++ linux-2.4.28.plasmaroo/drivers/char/drm/i830_dma.c 2004-12-23 16:32:08.000000000 +0000 -@@ -1330,10 +1330,7 @@ - drm_file_t *priv = filp->private_data; - drm_device_t *dev = priv->dev; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i830_flush_ioctl called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - i830_flush_queue(dev); - return 0; -@@ -1354,10 +1351,7 @@ - if (copy_from_user(&vertex, (drm_i830_vertex_t *)arg, sizeof(vertex))) - return -EFAULT; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i830_dma_vertex called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - DRM_DEBUG("i830 dma vertex, idx %d used %d discard %d\n", - vertex.idx, vertex.used, vertex.discard); -@@ -1384,10 +1378,7 @@ - if (copy_from_user(&clear, (drm_i830_clear_t *)arg, sizeof(clear))) - return -EFAULT; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i830_clear_bufs called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - /* GH: Someone's doing nasty things... */ - if (!dev->dev_private) { -@@ -1409,10 +1400,7 @@ - - DRM_DEBUG("i830_swap_bufs\n"); - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i830_swap_buf called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - i830_dma_dispatch_swap( dev ); - return 0; -@@ -1453,10 +1441,7 @@ - - DRM_DEBUG("%s\n", __FUNCTION__); - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i830_flip_buf called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - if (!dev_priv->page_flipping) - i830_do_init_pageflip( dev ); -@@ -1495,10 +1480,7 @@ - if (copy_from_user(&d, (drm_i830_dma_t *)arg, sizeof(d))) - return -EFAULT; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i830_dma called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - d.granted = 0; - -diff -ur linux-2.4.28/drivers/char/drm/i830_irq.c linux-2.4.28.plasmaroo/drivers/char/drm/i830_irq.c ---- linux-2.4.28/drivers/char/drm/i830_irq.c 2003-11-28 18:26:20.000000000 +0000 -+++ linux-2.4.28.plasmaroo/drivers/char/drm/i830_irq.c 2004-12-23 16:39:47.000000000 +0000 -@@ -130,10 +130,7 @@ - drm_i830_irq_emit_t emit; - int result; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i830_irq_emit called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - if ( !dev_priv ) { - DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ ); -diff -ur linux-2.4.28/drivers/char/drm-4.0/drmP.h linux-2.4.28.plasmaroo/drivers/char/drm-4.0/drmP.h ---- linux-2.4.28/drivers/char/drm-4.0/drmP.h 2004-02-18 13:36:31.000000000 +0000 -+++ linux-2.4.28.plasmaroo/drivers/char/drm-4.0/drmP.h 2004-12-23 16:21:30.000000000 +0000 -@@ -294,6 +294,16 @@ - #define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x)) - #define DRM_WAITCOUNT(dev,idx) DRM_BUFCOUNT(&dev->queuelist[idx]->waitlist) - -+#define LOCK_TEST_WITH_RETURN( dev ) \ -+do { \ -+ if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ -+ dev->lock.pid != current->pid ) { \ -+ DRM_ERROR( "%s called without lock held\n", \ -+ __FUNCTION__ ); \ -+ return -EINVAL; \ -+ } \ -+} while (0) -+ - typedef int drm_ioctl_t(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); - -diff -ur linux-2.4.28/drivers/char/drm-4.0/i810_dma.c linux-2.4.28.plasmaroo/drivers/char/drm-4.0/i810_dma.c ---- linux-2.4.28/drivers/char/drm-4.0/i810_dma.c 2004-02-18 13:36:31.000000000 +0000 -+++ linux-2.4.28.plasmaroo/drivers/char/drm-4.0/i810_dma.c 2004-12-23 16:21:30.000000000 +0000 -@@ -1249,10 +1249,7 @@ - drm_device_t *dev = priv->dev; - - DRM_DEBUG("i810_flush_ioctl\n"); -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_flush_ioctl called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - i810_flush_queue(dev); - return 0; -@@ -1274,10 +1271,7 @@ - if (copy_from_user(&vertex, (drm_i810_vertex_t *)arg, sizeof(vertex))) - return -EFAULT; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_dma_vertex called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - DRM_DEBUG("i810 dma vertex, idx %d used %d discard %d\n", - vertex.idx, vertex.used, vertex.discard); -@@ -1308,10 +1302,7 @@ - if (copy_from_user(&clear, (drm_i810_clear_t *)arg, sizeof(clear))) - return -EFAULT; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_clear_bufs called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - i810_dma_dispatch_clear( dev, clear.flags, - clear.clear_color, -@@ -1327,10 +1318,7 @@ - - DRM_DEBUG("i810_swap_bufs\n"); - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_swap_buf called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - i810_dma_dispatch_swap( dev ); - return 0; -@@ -1366,10 +1354,7 @@ - if (copy_from_user(&d, (drm_i810_dma_t *)arg, sizeof(d))) - return -EFAULT; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_dma called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - d.granted = 0; - -@@ -1399,10 +1384,7 @@ - drm_i810_buf_priv_t *buf_priv; - drm_device_dma_t *dma = dev->dma; - -- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { -- DRM_ERROR("i810_dma called without lock held\n"); -- return -EINVAL; -- } -+ LOCK_TEST_WITH_RETURN(dev); - - if (copy_from_user(&d, (drm_i810_copy_t *)arg, sizeof(d))) - return -EFAULT; diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.28.CAN-2004-1137.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.CAN-2004-1137.patch deleted file mode 100644 index 161806ce79d7..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.CAN-2004-1137.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- linux-2.4.28-orig/net/ipv4/igmp.c 2004-08-08 01:26:06.000000000 +0200 -+++ linux-2.4.28/net/ipv4/igmp.c 2004-12-15 22:12:48.000000000 +0100 -@@ -1757,12 +1757,12 @@ - goto done; - rv = !0; - for (i=0; i<psl->sl_count; i++) { -- rv = memcmp(&psl->sl_addr, &mreqs->imr_multiaddr, -+ rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr, - sizeof(__u32)); -- if (rv >= 0) -+ if (rv == 0) - break; - } -- if (!rv) /* source not found */ -+ if (rv) /* source not found */ - goto done; - - /* update the interface filter */ -@@ -1804,9 +1804,9 @@ - } - rv = 1; /* > 0 for insert logic below if sl_count is 0 */ - for (i=0; i<psl->sl_count; i++) { -- rv = memcmp(&psl->sl_addr, &mreqs->imr_multiaddr, -+ rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr, - sizeof(__u32)); -- if (rv >= 0) -+ if (rv == 0) - break; - } - if (rv == 0) /* address already there is an error */ ---- linux-2.4.28-orig/net/ipv6/mcast.c 2004-11-17 12:54:22.000000000 +0100 -+++ linux-2.4.28/net/ipv6/mcast.c 2004-12-15 22:14:07.000000000 +0100 -@@ -386,12 +386,12 @@ - goto done; - rv = !0; - for (i=0; i<psl->sl_count; i++) { -- rv = memcmp(&psl->sl_addr, group, -+ rv = memcmp(&psl->sl_addr[i], source, - sizeof(struct in6_addr)); -- if (rv >= 0) -+ if (rv == 0) - break; - } -- if (!rv) /* source not found */ -+ if (rv) /* source not found */ - goto done; - - /* update the interface filter */ -@@ -432,8 +432,8 @@ - } - rv = 1; /* > 0 for insert logic below if sl_count is 0 */ - for (i=0; i<psl->sl_count; i++) { -- rv = memcmp(&psl->sl_addr, group, sizeof(struct in6_addr)); -- if (rv >= 0) -+ rv = memcmp(&psl->sl_addr[i], source, sizeof(struct in6_addr)); -+ if (rv == 0) - break; - } - if (rv == 0) /* address already there is an error */ diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.28.binfmt_a.out.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.binfmt_a.out.patch deleted file mode 100644 index 4644ae28bce4..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.binfmt_a.out.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -Nru linux-2.4.28/fs/exec.c linux-2.4.28.plasmaroo/fs/exec.c ---- linux-2.4.28/fs/exec.c 2004-04-15 10:44:45 -07:00 -+++ linux-2.4.28.plasmaroo/fs/exec.c 2004-11-12 12:02:40 -08:00 -@@ -342,6 +342,7 @@ int setup_arg_pages(struct linux_binprm - - down_write(¤t->mm->mmap_sem); - { -+ struct vm_area_struct *vma; - mpnt->vm_mm = current->mm; - mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p; - mpnt->vm_end = STACK_TOP; -@@ -351,6 +352,12 @@ int setup_arg_pages(struct linux_binprm - mpnt->vm_pgoff = 0; - mpnt->vm_file = NULL; - mpnt->vm_private_data = (void *) 0; -+ vma = find_vma(current->mm, mpnt->vm_start); -+ if (vma) { -+ up_write(¤t->mm->mmap_sem); -+ kmem_cache_free(vm_area_cachep, mpnt); -+ return -ENOMEM; -+ } - insert_vm_struct(current->mm, mpnt); - current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; - } -diff -Nru linux-2.4.28/fs/exec.c linux-2.4.28.plasmaroo/fs/exec.c ---- linux-2.4.28/fs/binfmt_aout.c 2002-02-04 23:54:04 -08:00 -+++ linux-2.4.28.plasmaroo/fs/binfmt_aout.c 2004-11-12 11:55:14 -08:00 -@@ -39,13 +39,18 @@ static struct linux_binfmt aout_format = - NULL, THIS_MODULE, load_aout_binary, load_aout_library, aout_core_dump, PAGE_SIZE - }; - --static void set_brk(unsigned long start, unsigned long end) -+#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE) -+ -+static int set_brk(unsigned long start, unsigned long end) - { - start = PAGE_ALIGN(start); - end = PAGE_ALIGN(end); -- if (end <= start) -- return; -- do_brk(start, end - start); -+ if (end > start) { -+ unsigned long addr = do_brk(start, end - start); -+ if (BAD_ADDR(addr)) -+ return addr; -+ } -+ return 0; - } - - /* -@@ -405,7 +410,11 @@ static int load_aout_binary(struct linux - beyond_if: - set_binfmt(&aout_format); - -- set_brk(current->mm->start_brk, current->mm->brk); -+ retval = set_brk(current->mm->start_brk, current->mm->brk); -+ if (retval < 0) { -+ send_sig(SIGKILL, current, 0); -+ return retval; -+ } - - retval = setup_arg_pages(bprm); - if (retval < 0) { diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.28.brk-locked.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.brk-locked.patch deleted file mode 100644 index 1e1c198fd69d..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.brk-locked.patch +++ /dev/null @@ -1,247 +0,0 @@ -diff -ur linux-2.4.28-gentoo-r4/arch/mips/kernel/irixelf.c linux-2.4.28-gentoo-r5/arch/mips/kernel/irixelf.c ---- linux-2.4.28-gentoo-r4/arch/mips/kernel/irixelf.c 2005-01-07 20:33:12.000000000 +0000 -+++ linux-2.4.28-gentoo-r5/arch/mips/kernel/irixelf.c 2005-01-07 20:20:32.000000000 +0000 -@@ -130,7 +130,7 @@ - end = PAGE_ALIGN(end); - if (end <= start) - return; -- do_brk(start, end - start); -+ do_brk_locked(start, end - start); - } - - -@@ -379,7 +379,7 @@ - - /* Map the last of the bss segment */ - if (last_bss > len) { -- do_brk(len, (last_bss - len)); -+ do_brk_locked(len, (last_bss - len)); - } - kfree(elf_phdata); - -@@ -567,7 +567,7 @@ - unsigned long v; - struct prda *pp; - -- v = do_brk (PRDA_ADDRESS, PAGE_SIZE); -+ v = do_brk_locked (PRDA_ADDRESS, PAGE_SIZE); - - if (v < 0) - return; -@@ -859,7 +859,7 @@ - len = (elf_phdata->p_filesz + elf_phdata->p_vaddr+ 0xfff) & 0xfffff000; - bss = elf_phdata->p_memsz + elf_phdata->p_vaddr; - if (bss > len) -- do_brk(len, bss-len); -+ do_brk_locked(len, bss-len); - kfree(elf_phdata); - return 0; - } -diff -ur linux-2.4.28-gentoo-r4/arch/sparc64/kernel/binfmt_aout32.c linux-2.4.28-gentoo-r5/arch/sparc64/kernel/binfmt_aout32.c ---- linux-2.4.28-gentoo-r4/arch/sparc64/kernel/binfmt_aout32.c 2005-01-07 20:33:12.000000000 +0000 -+++ linux-2.4.28-gentoo-r5/arch/sparc64/kernel/binfmt_aout32.c 2005-01-07 20:20:32.000000000 +0000 -@@ -49,7 +49,7 @@ - end = PAGE_ALIGN(end); - if (end <= start) - return; -- do_brk(start, end - start); -+ do_brk_locked(start, end - start); - } - - /* -@@ -246,10 +246,10 @@ - if (N_MAGIC(ex) == NMAGIC) { - loff_t pos = fd_offset; - /* Fuck me plenty... */ -- error = do_brk(N_TXTADDR(ex), ex.a_text); -+ error = do_brk_locked(N_TXTADDR(ex), ex.a_text); - bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex), - ex.a_text, &pos); -- error = do_brk(N_DATADDR(ex), ex.a_data); -+ error = do_brk_locked(N_DATADDR(ex), ex.a_data); - bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex), - ex.a_data, &pos); - goto beyond_if; -@@ -257,7 +257,7 @@ - - if (N_MAGIC(ex) == OMAGIC) { - loff_t pos = fd_offset; -- do_brk(N_TXTADDR(ex) & PAGE_MASK, -+ do_brk_locked(N_TXTADDR(ex) & PAGE_MASK, - ex.a_text+ex.a_data + PAGE_SIZE - 1); - bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex), - ex.a_text+ex.a_data, &pos); -@@ -272,7 +272,7 @@ - - if (!bprm->file->f_op->mmap) { - loff_t pos = fd_offset; -- do_brk(0, ex.a_text+ex.a_data); -+ do_brk_locked(0, ex.a_text+ex.a_data); - bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex), - ex.a_text+ex.a_data, &pos); - goto beyond_if; -@@ -388,7 +388,7 @@ - len = PAGE_ALIGN(ex.a_text + ex.a_data); - bss = ex.a_text + ex.a_data + ex.a_bss; - if (bss > len) { -- error = do_brk(start_addr + len, bss - len); -+ error = do_brk_locked(start_addr + len, bss - len); - retval = error; - if (error != start_addr + len) - goto out; -diff -ur linux-2.4.28-gentoo-r4/fs/binfmt_aout.c linux-2.4.28-gentoo-r5/fs/binfmt_aout.c ---- linux-2.4.28-gentoo-r4/fs/binfmt_aout.c 2005-01-07 20:33:12.000000000 +0000 -+++ linux-2.4.28-gentoo-r5/fs/binfmt_aout.c 2005-01-07 20:20:32.000000000 +0000 -@@ -46,7 +46,7 @@ - start = PAGE_ALIGN(start); - end = PAGE_ALIGN(end); - if (end > start) { -- unsigned long addr = do_brk(start, end - start); -+ unsigned long addr = do_brk_locked(start, end - start); - if (BAD_ADDR(addr)) - return addr; - } -@@ -341,10 +341,10 @@ - loff_t pos = fd_offset; - /* Fuck me plenty... */ - /* <AOL></AOL> */ -- error = do_brk(N_TXTADDR(ex), ex.a_text); -+ error = do_brk_locked(N_TXTADDR(ex), ex.a_text); - bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex), - ex.a_text, &pos); -- error = do_brk(N_DATADDR(ex), ex.a_data); -+ error = do_brk_locked(N_DATADDR(ex), ex.a_data); - bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex), - ex.a_data, &pos); - goto beyond_if; -@@ -365,7 +365,7 @@ - map_size = ex.a_text+ex.a_data; - #endif - -- error = do_brk(text_addr & PAGE_MASK, map_size); -+ error = do_brk_locked(text_addr & PAGE_MASK, map_size); - if (error != (text_addr & PAGE_MASK)) { - send_sig(SIGKILL, current, 0); - return error; -@@ -399,7 +399,7 @@ - - if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) { - loff_t pos = fd_offset; -- do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data); -+ do_brk_locked(N_TXTADDR(ex), ex.a_text+ex.a_data); - bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex), - ex.a_text+ex.a_data, &pos); - flush_icache_range((unsigned long) N_TXTADDR(ex), -@@ -500,7 +500,7 @@ - error_time = jiffies; - } - -- do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss); -+ do_brk_locked(start_addr, ex.a_text + ex.a_data + ex.a_bss); - - file->f_op->read(file, (char *)start_addr, - ex.a_text + ex.a_data, &pos); -@@ -524,7 +524,7 @@ - len = PAGE_ALIGN(ex.a_text + ex.a_data); - bss = ex.a_text + ex.a_data + ex.a_bss; - if (bss > len) { -- error = do_brk(start_addr + len, bss - len); -+ error = do_brk_locked(start_addr + len, bss - len); - retval = error; - if (error != start_addr + len) - goto out; -diff -ur linux-2.4.28-gentoo-r4/fs/binfmt_elf.c linux-2.4.28-gentoo-r5/fs/binfmt_elf.c ---- linux-2.4.28-gentoo-r4/fs/binfmt_elf.c 2005-01-07 20:33:12.000000000 +0000 -+++ linux-2.4.28-gentoo-r5/fs/binfmt_elf.c 2005-01-07 20:20:46.000000000 +0000 -@@ -88,7 +88,7 @@ - end = ELF_PAGEALIGN(end); - if (end <= start) - return; -- do_brk(start, end - start); -+ do_brk_locked(start, end - start); - } - - -@@ -370,7 +370,7 @@ - - /* Map the last of the bss segment */ - if (last_bss > elf_bss) -- do_brk(elf_bss, last_bss - elf_bss); -+ do_brk_locked(elf_bss, last_bss - elf_bss); - - *interp_load_addr = load_addr; - error = ((unsigned long) interp_elf_ex->e_entry) + load_addr; -@@ -407,7 +407,7 @@ - goto out; - } - -- do_brk(0, text_data); -+ do_brk_locked(0, text_data); - if (!interpreter->f_op || !interpreter->f_op->read) - goto out; - if (interpreter->f_op->read(interpreter, addr, text_data, &offset) < 0) -@@ -415,7 +415,7 @@ - flush_icache_range((unsigned long)addr, - (unsigned long)addr + text_data); - -- do_brk(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1), -+ do_brk_locked(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1), - interp_ex->a_bss); - elf_entry = interp_ex->a_entry; - -@@ -1271,7 +1271,7 @@ - len = ELF_PAGESTART(elf_phdata->p_filesz + elf_phdata->p_vaddr + ELF_MIN_ALIGN - 1); - bss = elf_phdata->p_memsz + elf_phdata->p_vaddr; - if (bss > len) -- do_brk(len, bss - len); -+ do_brk_locked(len, bss - len); - error = 0; - - out_free_ph: -diff -ur linux-2.4.28-gentoo-r4/include/linux/mm.h linux-2.4.28-gentoo-r5/include/linux/mm.h ---- linux-2.4.28-gentoo-r4/include/linux/mm.h 2005-01-07 20:33:12.000000000 +0000 -+++ linux-2.4.28-gentoo-r5/include/linux/mm.h 2005-01-07 20:20:32.000000000 +0000 -@@ -601,6 +601,7 @@ - extern int do_munmap(struct mm_struct *, unsigned long, size_t); - - extern unsigned long do_brk(unsigned long, unsigned long); -+extern unsigned long do_brk_locked(unsigned long, unsigned long); - - static inline void __vma_unlink(struct mm_struct * mm, struct vm_area_struct * vma, struct vm_area_struct * prev) - { -diff -ur linux-2.4.28-gentoo-r4/kernel/ksyms.c linux-2.4.28-gentoo-r5/kernel/ksyms.c ---- linux-2.4.28-gentoo-r4/kernel/ksyms.c 2005-01-07 20:33:12.000000000 +0000 -+++ linux-2.4.28-gentoo-r5/kernel/ksyms.c 2005-01-07 20:20:32.000000000 +0000 -@@ -90,6 +90,7 @@ - EXPORT_SYMBOL(__do_mmap_pgoff); - EXPORT_SYMBOL(do_munmap); - EXPORT_SYMBOL(do_brk); -+EXPORT_SYMBOL(do_brk_locked); - EXPORT_SYMBOL(exit_mm); - EXPORT_SYMBOL(exit_files); - EXPORT_SYMBOL(exit_fs); -diff -ur linux-2.4.28-gentoo-r4/mm/mmap.c linux-2.4.28-gentoo-r5/mm/mmap.c ---- linux-2.4.28-gentoo-r4/mm/mmap.c 2005-01-07 20:33:12.000000000 +0000 -+++ linux-2.4.28-gentoo-r5/mm/mmap.c 2005-01-07 20:20:32.000000000 +0000 -@@ -1401,6 +1401,21 @@ - return addr; - } - -+/* locking version of do_brk. */ -+unsigned long do_brk_locked(unsigned long addr, unsigned long len) -+{ -+ unsigned long ret; -+ -+ down_write(¤t->mm->mmap_sem); -+ ret = do_brk(addr, len); -+ up_write(¤t->mm->mmap_sem); -+ -+ return ret; -+} -+ -+ -+ -+ - /* Build the RB tree corresponding to the VMA list. */ - void build_mmap_rb(struct mm_struct * mm) - { diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.28.cmdlineLeak.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.cmdlineLeak.patch deleted file mode 100644 index 5f26f7f388f6..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.cmdlineLeak.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- linux-2.4/fs/proc/base.c 2004-04-15 07:09:32.000000000 +0100 -+++ linux-2.4/fs/proc/base.c.plasmaroo 2004-08-09 23:30:43.869195800 +0100 -@@ -187,7 +187,7 @@ static int proc_pid_cmdline(struct task_ - if (mm) - atomic_inc(&mm->mm_users); - task_unlock(task); -- if (mm) { -+ if (mm && mm->arg_end) { - int len = mm->arg_end - mm->arg_start; - if (len > PAGE_SIZE) - len = PAGE_SIZE; diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.28.compileFix.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.compileFix.patch deleted file mode 100644 index 62b6bf7e7a8d..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.compileFix.patch +++ /dev/null @@ -1,68 +0,0 @@ -Fix 2.4.28-lck1 compilation on GCC 3.4 - -- Daniel Drake <dsd@gentoo.org> - ---- linux-dsd/kernel/sched.c.orig 2004-12-25 15:10:27.962556608 +0000 -+++ linux-dsd/kernel/sched.c 2004-12-25 15:12:10.203013696 +0000 -@@ -611,12 +611,12 @@ repeat_lock_task: - return success; - } - --int wake_up_process(task_t * p) -+int fastcall wake_up_process(task_t * p) - { - return try_to_wake_up(p, 0); - } - --void wake_up_forked_process(task_t * p) -+void fastcall wake_up_forked_process(task_t * p) - { - runqueue_t *rq; - preempt_disable(); -@@ -653,7 +653,7 @@ void fastcall wake_up_forked_process(tas - * artificially, because any timeslice recovered here - * was given away by the parent in the first place.) - */ --void sched_exit(task_t * p) -+void fastcall sched_exit(task_t * p) - { - __cli(); - if (p->first_time_slice) { -@@ -1427,7 +1427,7 @@ static inline void __wake_up_common(wait - } - } - --void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr_exclusive) -+void fastcall __wake_up(wait_queue_head_t *q, unsigned int mode, int nr_exclusive) - { - unsigned long flags; - ---- linux-dsd/kernel/timer.c.orig 2004-12-25 14:56:20.000000000 +0000 -+++ linux-dsd/kernel/timer.c 2004-12-25 15:14:47.145154864 +0000 -@@ -110,7 +110,7 @@ static struct list_head * run_timer_list - - #define NOOF_TVECS (sizeof(tvecs) / sizeof(tvecs[0])) - --static inline void init_jiffieswrap_timer(void); -+static void init_jiffieswrap_timer(void); - - void init_timervecs (void) - { -@@ -727,7 +727,7 @@ static void check_jiffieswrap(unsigned l - ^ (jiffies>>(BITS_PER_LONG-1))); - } - --static inline void init_jiffieswrap_timer(void) -+static void init_jiffieswrap_timer(void) - { - init_timer(&jiffieswrap_timer); - jiffieswrap_timer.expires = jiffies + CHECK_JIFFIESWRAP_INTERVAL; -@@ -893,7 +893,7 @@ static void process_timeout(unsigned lon - * - * In all cases the return value is guaranteed to be non-negative. - */ --signed long schedule_timeout(signed long timeout) -+signed long fastcall schedule_timeout(signed long timeout) - { - struct timer_list timer; - unsigned long expire; diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.28.vma.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.28.vma.patch deleted file mode 100644 index 2469dd5ab2c5..000000000000 --- a/sys-kernel/ck-sources/files/ck-sources-2.4.28.vma.patch +++ /dev/null @@ -1,246 +0,0 @@ -# This is a BitKeeper generated diff -Nru style patch. -# -# ChangeSet -# 2004/12/17 21:45:58-02:00 chrisw@osdl.org -# [PATCH] Backport of 2.6 fix to insert_vm_struct to make it return an error rather than BUG(). -# -# Backport of 2.6 fix to insert_vm_struct to make it return an error -# rather than BUG(). This eliminates a user triggerable BUG() when user -# created a large vma that overlapped with arg pages during exec (could be -# triggered with a.out on i386 and x86_64 and elf on ia64). -# -# Signed-off-by: Chris Wright <chrisw@osdl.org> -# -# ===== arch/ia64/ia32/binfmt_elf32.c 1.13 vs edited ===== -# -# arch/ia64/ia32/binfmt_elf32.c -# 2004/12/17 17:22:06-02:00 chrisw@osdl.org +16 -4 -# Backport of 2.6 fix to insert_vm_struct to make it return an error rather than BUG(). -# -# arch/ia64/mm/init.c -# 2004/12/17 15:25:47-02:00 chrisw@osdl.org +14 -2 -# Backport of 2.6 fix to insert_vm_struct to make it return an error rather than BUG(). -# -# arch/s390x/kernel/exec32.c -# 2004/12/17 15:32:42-02:00 chrisw@osdl.org +6 -2 -# Backport of 2.6 fix to insert_vm_struct to make it return an error rather than BUG(). This eliminates a user triggerable BUG() when user -# -# arch/x86_64/ia32/ia32_binfmt.c -# 2004/12/17 15:34:21-02:00 chrisw@osdl.org +6 -2 -# Backport of 2.6 fix to insert_vm_struct to make it return an error rather than BUG(). This eliminates a user triggerable BUG() when user -# -# fs/exec.c -# 2004/12/17 15:54:18-02:00 chrisw@osdl.org +6 -2 -# Backport of 2.6 fix to insert_vm_struct to make it return an error rather than BUG(). -# -# include/linux/mm.h -# 2004/12/16 20:38:37-02:00 chrisw@osdl.org +1 -1 -# Backport of 2.6 fix to insert_vm_struct to make it return an error rather than BUG(). This eliminates a user triggerable BUG() when user -# -# mm/mmap.c -# 2004/12/16 20:43:15-02:00 chrisw@osdl.org +3 -2 -# Backport of 2.6 fix to insert_vm_struct to make it return an error rather than BUG(). -# -diff -Nru a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c ---- a/arch/ia64/ia32/binfmt_elf32.c 2004-12-19 07:39:49 -08:00 -+++ b/arch/ia64/ia32/binfmt_elf32.c 2004-12-19 07:39:49 -08:00 -@@ -95,7 +95,11 @@ - vma->vm_private_data = NULL; - down_write(¤t->mm->mmap_sem); - { -- insert_vm_struct(current->mm, vma); -+ if (insert_vm_struct(current->mm, vma)) { -+ kmem_cache_free(vm_area_cachep, vma); -+ up_write(¤t->mm->mmap_sem); -+ return; -+ } - } - up_write(¤t->mm->mmap_sem); - } -@@ -117,7 +121,11 @@ - vma->vm_private_data = NULL; - down_write(¤t->mm->mmap_sem); - { -- insert_vm_struct(current->mm, vma); -+ if (insert_vm_struct(current->mm, vma)) { -+ kmem_cache_free(vm_area_cachep, vma); -+ up_write(¤t->mm->mmap_sem); -+ return; -+ } - } - up_write(¤t->mm->mmap_sem); - } -@@ -164,7 +172,7 @@ - { - unsigned long stack_base; - struct vm_area_struct *mpnt; -- int i; -+ int i, ret; - - stack_base = IA32_STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE; - -@@ -188,7 +196,11 @@ - mpnt->vm_pgoff = 0; - mpnt->vm_file = NULL; - mpnt->vm_private_data = 0; -- insert_vm_struct(current->mm, mpnt); -+ if ((ret = insert_vm_struct(current->mm, mpnt))) { -+ up_write(¤t->mm->mmap_sem); -+ kmem_cache_free(vm_area_cachep, mpnt); -+ return ret; -+ } - current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; - } - -diff -Nru a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c ---- a/arch/ia64/mm/init.c 2004-12-19 07:39:49 -08:00 -+++ b/arch/ia64/mm/init.c 2004-12-19 07:39:49 -08:00 -@@ -105,7 +105,13 @@ - vma->vm_pgoff = 0; - vma->vm_file = NULL; - vma->vm_private_data = NULL; -- insert_vm_struct(current->mm, vma); -+ down_write(¤t->mm->mmap_sem); -+ if (insert_vm_struct(current->mm, vma)) { -+ up_write(¤t->mm->mmap_sem); -+ kmem_cache_free(vm_area_cachep, vma); -+ return; -+ } -+ up_write(¤t->mm->mmap_sem); - } - - /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ -@@ -117,7 +123,13 @@ - vma->vm_end = PAGE_SIZE; - vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); - vma->vm_flags = VM_READ | VM_MAYREAD | VM_IO | VM_RESERVED; -- insert_vm_struct(current->mm, vma); -+ down_write(¤t->mm->mmap_sem); -+ if (insert_vm_struct(current->mm, vma)) { -+ up_write(¤t->mm->mmap_sem); -+ kmem_cache_free(vm_area_cachep, vma); -+ return; -+ } -+ up_write(¤t->mm->mmap_sem); - } - } - } -diff -Nru a/arch/s390x/kernel/exec32.c b/arch/s390x/kernel/exec32.c ---- a/arch/s390x/kernel/exec32.c 2004-12-19 07:39:49 -08:00 -+++ b/arch/s390x/kernel/exec32.c 2004-12-19 07:39:49 -08:00 -@@ -41,7 +41,7 @@ - { - unsigned long stack_base; - struct vm_area_struct *mpnt; -- int i; -+ int i, ret; - - stack_base = STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE; - -@@ -65,7 +65,11 @@ - mpnt->vm_pgoff = 0; - mpnt->vm_file = NULL; - mpnt->vm_private_data = (void *) 0; -- insert_vm_struct(current->mm, mpnt); -+ if ((ret = insert_vm_struct(current->mm, mpnt))) { -+ up_write(¤t->mm->mmap_sem); -+ kmem_cache_free(vm_area_cachep, mpnt); -+ return ret; -+ } - current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; - } - -diff -Nru a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c ---- a/arch/x86_64/ia32/ia32_binfmt.c 2004-12-19 07:39:49 -08:00 -+++ b/arch/x86_64/ia32/ia32_binfmt.c 2004-12-19 07:39:49 -08:00 -@@ -225,7 +225,7 @@ - { - unsigned long stack_base; - struct vm_area_struct *mpnt; -- int i; -+ int i, ret; - - stack_base = IA32_STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE; - -@@ -250,7 +250,11 @@ - mpnt->vm_pgoff = 0; - mpnt->vm_file = NULL; - mpnt->vm_private_data = (void *) 0; -- insert_vm_struct(current->mm, mpnt); -+ if ((ret = insert_vm_struct(current->mm, mpnt))) { -+ up_write(¤t->mm->mmap_sem); -+ kmem_cache_free(vm_area_cachep, mpnt); -+ return ret; -+ } - current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; - } - -diff -Nru a/fs/exec.c b/fs/exec.c ---- a/fs/exec.c 2004-12-19 07:39:49 -08:00 -+++ b/fs/exec.c 2004-12-19 07:39:49 -08:00 -@@ -327,7 +327,7 @@ - { - unsigned long stack_base; - struct vm_area_struct *mpnt; -- int i; -+ int i, ret; - - stack_base = STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE; - -@@ -387,7 +387,6 @@ - - down_write(¤t->mm->mmap_sem); - { -- struct vm_area_struct *vma; - mpnt->vm_mm = current->mm; - mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p; - mpnt->vm_end = STACK_TOP; -@@ -402,13 +401,11 @@ - mpnt->vm_pgoff = 0; - mpnt->vm_file = NULL; - mpnt->vm_private_data = (void *) 0; -- vma = find_vma(current->mm, mpnt->vm_start); -- if (vma) { -+ if ((ret = insert_vm_struct(current->mm, mpnt))) { - up_write(¤t->mm->mmap_sem); - kmem_cache_free(vm_area_cachep, mpnt); -- return -ENOMEM; -+ return ret; - } -- insert_vm_struct(current->mm, mpnt); - current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; - } - -diff -Nru a/include/linux/mm.h b/include/linux/mm.h ---- a/include/linux/mm.h 2004-12-19 07:39:49 -08:00 -+++ b/include/linux/mm.h 2004-12-19 07:39:49 -08:00 -@@ -548,7 +548,7 @@ - /* mmap.c */ - extern void lock_vma_mappings(struct vm_area_struct *); - extern void unlock_vma_mappings(struct vm_area_struct *); --extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *); -+extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *); - extern void __insert_vm_struct(struct mm_struct *, struct vm_area_struct *); - extern void build_mmap_rb(struct mm_struct *); - extern void exit_mmap(struct mm_struct *); -diff -Nru a/mm/mmap.c b/mm/mmap.c ---- a/mm/mmap.c 2004-12-19 07:39:49 -08:00 -+++ b/mm/mmap.c 2004-12-19 07:39:49 -08:00 -@@ -1193,14 +1193,15 @@ - validate_mm(mm); - } - --void insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) -+int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) - { - struct vm_area_struct * __vma, * prev; - rb_node_t ** rb_link, * rb_parent; - - __vma = find_vma_prepare(mm, vma->vm_start, &prev, &rb_link, &rb_parent); - if (__vma && __vma->vm_start < vma->vm_end) -- BUG(); -+ return -ENOMEM; - vma_link(mm, vma, prev, rb_link, rb_parent); - validate_mm(mm); -+ return 0; - } diff --git a/sys-kernel/ck-sources/files/digest-ck-sources-2.4.28-r3 b/sys-kernel/ck-sources/files/digest-ck-sources-2.4.28-r3 deleted file mode 100644 index eb0a5120a193..000000000000 --- a/sys-kernel/ck-sources/files/digest-ck-sources-2.4.28-r3 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 ac7735000d185bc7778c08288760a8a3 linux-2.4.28.tar.bz2 31064046 -MD5 bd4598c4660ddd3e2b95775d5e3cca8c patch-2.4.28-lck1.bz2 384270 -MD5 50396cf54380f4525f94bca93e4b5b8a linux-2.4.28-CAN-2004-0814.patch 145448 |