diff options
37 files changed, 35 insertions, 3889 deletions
diff --git a/sys-kernel/gentoo-sources/ChangeLog b/sys-kernel/gentoo-sources/ChangeLog index a7d858c3f490..62a168d1c56d 100644 --- a/sys-kernel/gentoo-sources/ChangeLog +++ b/sys-kernel/gentoo-sources/ChangeLog @@ -1,6 +1,40 @@ # ChangeLog for sys-kernel/gentoo-sources # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/ChangeLog,v 1.134 2005/04/30 15:41:32 dsd Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/ChangeLog,v 1.135 2005/04/30 16:04:42 dsd Exp $ + + 30 Apr 2005; Daniel Drake <dsd@gentoo.org> + -files/gentoo-sources-2.4.20.78362.patch, + -files/gentoo-sources-2.4.20-CAN-2004-0685.patch, + -files/gentoo-sources-2.4.CAN-2004-0001.patch, + -files/gentoo-sources-2.4.20-CAN-2004-1056.patch, + -files/gentoo-sources-2.4.20-PaX-84167.patch, + -files/gentoo-sources-2.4.20-cs46xx-gcc33.patch, + -files/gentoo-sources-2.4.20-devfs-snd-fix.patch, + -files/gentoo-sources-2.4.20-fix-proc-mm.patch, + -files/gentoo-sources-2.4.20-gcc33.patch, + -files/gentoo-sources-2.4.20-grsec-datasize_fix.patch, + -files/gentoo-sources-2.4.20-grsec-disabled.patch, + -files/gentoo-sources-2.4.20-ipt-realm.patch, + -files/gentoo-sources-2.4.20-ipt-route.patch, + -files/gentoo-sources-2.4.20-mdcount.patch, + -files/gentoo-sources-2.4.20-munmap.patch, + -files/gentoo-sources-2.4.20-rtc_fix.patch, + -files/gentoo-sources-2.4.20-sched-interrupt.patch, + -files/gentoo-sources-2.4.20-smbfs.patch, + -files/gentoo-sources-2.4.CAN-2004-0010.patch, + -files/gentoo-sources-2.4.22-CAN-2004-0075.patch, + -files/gentoo-sources-2.4.I2C_Limits.patch, + -files/gentoo-sources-2.4.22-CAN-2004-1016.patch, + -files/gentoo-sources-2.4.22-kmsgdump.patch, + -files/gentoo-sources-2.4.22-rtc_fix.patch, + -files/gentoo-sources-2.4.22-vma.patch, + -files/gentoo-sources-2.4.CAN-2003-0643.patch, + -files/gentoo-sources-2.4.26-OpenSWAN-CompileFix.patch, + -files/gentoo-sources-2.4.CAN-2003-0985.patch, + -files/gentoo-sources-2.4.munmap.patch, -files/do_brk_fix.patch, + -files/security.patch1, -files/security.patch2, -files/security.patch3, + -files/security.patch4, -gentoo-sources-2.4.20-r33.ebuild: + Remove 2.4.20 and cleanout files/ *gentoo-sources-2.6.11-r7 (30 Apr 2005) diff --git a/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r33 b/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r33 deleted file mode 100644 index 56ce621133b7..000000000000 --- a/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r33 +++ /dev/null @@ -1,4 +0,0 @@ -MD5 c439d5c93d7fc9a1480a90842465bb97 linux-2.4.20.tar.bz2 27421046 -MD5 50863b3ed5ebab8214e5355b084bab07 patches-2.4.20-gentoo-r28.tar.bz2 4327906 -MD5 cfc6815222d154bcf3aa9144903a2bba gentoo-sources-2.4.20-CAN-2004-0415.patch 82999 -MD5 e4f9f3aa8826d76be49f28175f4ea037 gentoo-sources-2.4.20-CAN-2004-0814.2.patch 146462 diff --git a/sys-kernel/gentoo-sources/files/do_brk_fix.patch b/sys-kernel/gentoo-sources/files/do_brk_fix.patch deleted file mode 100644 index 0f8438861e0d..000000000000 --- a/sys-kernel/gentoo-sources/files/do_brk_fix.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/mm/mmap.c Fri Sep 12 06:44:06 2003 -+++ b/mm/mmap.c Thu Oct 2 01:18:19 2003 -@@ -1248,6 +1248,9 @@ - if (!len) - return addr; - -+ if ((addr + len) > TASK_SIZE || (addr + len) < addr) -+ return -EINVAL; -+ - /* - * mlock MCL_FUTURE? - */ diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-CAN-2004-0685.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-CAN-2004-0685.patch deleted file mode 100644 index 77808162b2fb..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-CAN-2004-0685.patch +++ /dev/null @@ -1,83 +0,0 @@ -# This is a BitKeeper generated diff -Nru style patch. -# -# ChangeSet -# 2004/07/26 19:14:16-03:00 mjc@redhat.com -# [PATCH] USB: more sparse fixes -# -# Back in October 2003 Arnaldo commited some fixes prior to 2.6 for some leaking info to userspace in the -# usb drivers: -# http://linux.bkbits.net:8080/linux-2.6/cset@3f986b35LyBKc-OxB8G6k22oOjgYTQ -# -# The corresponding changes have not been commited to 2.4, or included in -# the previous sparse fixes. -# -# drivers/usb/audio.c -# 2004/07/15 08:46:52-03:00 mjc@redhat.com +4 -0 -# USB: more sparse fixes -# -# drivers/usb/brlvger.c -# 2004/07/15 08:47:27-03:00 mjc@redhat.com +1 -0 -# USB: more sparse fixes -# -# drivers/usb/serial/io_edgeport.c -# 2004/07/15 08:48:06-03:00 mjc@redhat.com +1 -0 -# USB: more sparse fixes -# -# drivers/usb/vicam.c -# 2004/07/15 08:47:13-03:00 mjc@redhat.com +1 -0 -# USB: more sparse fixes -# -diff -Nru a/drivers/usb/audio.c b/drivers/usb/audio.c ---- a/drivers/usb/audio.c 2004-08-08 07:41:30 -07:00 -+++ b/drivers/usb/audio.c 2004-08-08 07:41:30 -07:00 -@@ -2141,6 +2141,8 @@ - - if (cmd == SOUND_MIXER_INFO) { - mixer_info info; -+ -+ memset(&info, 0, sizeof(info)); - strncpy(info.id, "USB_AUDIO", sizeof(info.id)); - strncpy(info.name, "USB Audio Class Driver", sizeof(info.name)); - info.modify_counter = ms->modcnt; -@@ -2150,6 +2152,8 @@ - } - if (cmd == SOUND_OLD_MIXER_INFO) { - _old_mixer_info info; -+ -+ memset(&info, 0, sizeof(info)); - strncpy(info.id, "USB_AUDIO", sizeof(info.id)); - strncpy(info.name, "USB Audio Class Driver", sizeof(info.name)); - if (copy_to_user((void *)arg, &info, sizeof(info))) -diff -Nru a/drivers/usb/brlvger.c b/drivers/usb/brlvger.c ---- a/drivers/usb/brlvger.c 2004-08-08 07:41:30 -07:00 -+++ b/drivers/usb/brlvger.c 2004-08-08 07:41:30 -07:00 -@@ -743,6 +743,7 @@ - case BRLVGER_GET_INFO: { - struct brlvger_info vi; - -+ memset(&vi, 0, sizeof(vi)); - strncpy(vi.driver_version, DRIVER_VERSION, - sizeof(vi.driver_version)); - vi.driver_version[sizeof(vi.driver_version)-1] = 0; -diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c ---- a/drivers/usb/serial/io_edgeport.c 2004-08-08 07:41:30 -07:00 -+++ b/drivers/usb/serial/io_edgeport.c 2004-08-08 07:41:30 -07:00 -@@ -1913,6 +1913,7 @@ - - case TIOCGICOUNT: - cnow = edge_port->icount; -+ memset(&icount, 0, sizeof(icount)); - icount.cts = cnow.cts; - icount.dsr = cnow.dsr; - icount.rng = cnow.rng; -diff -Nru a/drivers/usb/vicam.c b/drivers/usb/vicam.c ---- a/drivers/usb/vicam.c 2004-08-04 22:41:03.000000000 +0100 -+++ a/drivers/usb/vicam.c.new 2004-08-08 15:56:04.026739936 +0100 -@@ -504,6 +504,7 @@ static int vicam_v4l_ioctl(struct video_ - { - struct video_capability b; - ret = vicam_get_capability(vicam,&b); -+ memset(&b, 0, sizeof(b)); - dbg("name %s",b.name); - if (copy_to_user(arg, &b, sizeof(b))) - ret = -EFAULT; diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-CAN-2004-1056.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-CAN-2004-1056.patch deleted file mode 100644 index b0b2a6d65598..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-CAN-2004-1056.patch +++ /dev/null @@ -1,319 +0,0 @@ -diff -ur linux-2.4.22/drivers/char/drm/i810.h linux-2.4.22.plasmaroo/drivers/char/drm/i810.h ---- linux-2.4.22/drivers/char/drm/i810.h 2001-08-08 17:42:14.000000000 +0100 -+++ linux-2.4.22.plasmaroo/drivers/char/drm/i810.h 2004-12-24 14:56:13.644644456 +0000 -@@ -113,4 +113,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.22/drivers/char/drm/i810_dma.c linux-2.4.22.plasmaroo/drivers/char/drm/i810_dma.c ---- linux-2.4.22/drivers/char/drm/i810_dma.c 2002-11-28 23:53:12.000000000 +0000 -+++ linux-2.4.22.plasmaroo/drivers/char/drm/i810_dma.c 2004-12-24 14:57:28.626245520 +0000 -@@ -1071,10 +1071,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; -@@ -1096,10 +1093,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); -@@ -1130,10 +1124,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) { -@@ -1154,10 +1145,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; -@@ -1193,10 +1181,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; - -@@ -1226,10 +1211,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; -@@ -1334,11 +1316,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 ); -@@ -1382,10 +1360,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); - } - -@@ -1396,10 +1371,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.22/drivers/char/drm/i830.h linux-2.4.22.plasmaroo/drivers/char/drm/i830.h ---- linux-2.4.22/drivers/char/drm/i830.h 2002-11-28 23:53:12.000000000 +0000 -+++ linux-2.4.22.plasmaroo/drivers/char/drm/i830.h 2004-12-24 14:56:13.658642328 +0000 -@@ -113,4 +113,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.22/drivers/char/drm/i830_dma.c linux-2.4.22.plasmaroo/drivers/char/drm/i830_dma.c ---- linux-2.4.22/drivers/char/drm/i830_dma.c 2002-11-28 23:53:12.000000000 +0000 -+++ linux-2.4.22.plasmaroo/drivers/char/drm/i830_dma.c 2004-12-24 14:57:55.225201864 +0000 -@@ -1187,10 +1187,8 @@ - drm_device_t *dev = priv->dev; - - DRM_DEBUG("i830_flush_ioctl\n"); -- 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; -@@ -1211,10 +1209,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); -@@ -1241,10 +1236,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) { -@@ -1266,10 +1258,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; -@@ -1305,10 +1294,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; - -@@ -1338,10 +1324,7 @@ - drm_i830_buf_priv_t *buf_priv; - drm_device_dma_t *dma = dev->dma; - -- 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); - - if (copy_from_user(&d, (drm_i830_copy_t *)arg, sizeof(d))) - return -EFAULT; -diff -ur linux-2.4.22/drivers/char/drm-4.0/drmP.h linux-2.4.22.plasmaroo/drivers/char/drm-4.0/drmP.h ---- linux-2.4.22/drivers/char/drm-4.0/drmP.h 2002-02-25 19:37:57.000000000 +0000 -+++ linux-2.4.22.plasmaroo/drivers/char/drm-4.0/drmP.h 2004-12-24 14:56:16.389227216 +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.22/drivers/char/drm-4.0/i810_dma.c linux-2.4.22.plasmaroo/drivers/char/drm-4.0/i810_dma.c ---- linux-2.4.22/drivers/char/drm-4.0/i810_dma.c 2003-06-13 15:51:32.000000000 +0100 -+++ linux-2.4.22.plasmaroo/drivers/char/drm-4.0/i810_dma.c 2004-12-24 14:56:16.401225392 +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/gentoo-sources/files/gentoo-sources-2.4.20-PaX-84167.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-PaX-84167.patch deleted file mode 100644 index d150d9a6bc32..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-PaX-84167.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- linux-2.4.20-gentoo-r32/mm/mmap.c 2005-03-06 19:33:42.000000000 +0000 -+++ linux-2.4.20-gentoo-r33/mm/mmap.c 2005-03-06 19:53:59.501141080 +0000 -@@ -982,7 +982,7 @@ - * we just free'd - but there's no telling how much before. - */ - static void free_pgtables(struct mm_struct * mm, struct vm_area_struct *prev, -- unsigned long start, unsigned long end) -+ struct vm_area_struct *mpnt, unsigned long start, unsigned long end) - { - unsigned long first = start & PGDIR_MASK; - unsigned long last = end + PGDIR_SIZE - 1; -@@ -1014,6 +1014,14 @@ - break; - } - no_mmaps: -+ while (mpnt && first < last) { -+ if ((mpnt->vm_end > first) &&(last > mpnt->vm_start)) { -+ first = mpnt->vm_end + PGDIR_SIZE - 1; -+ last = mpnt->vm_start; -+ } -+ mpnt = mpnt->vm_next; -+ } -+ - /* - * If the PGD bits are not consecutive in the virtual address, the - * old method of shifting the VA >> by PGDIR_SHIFT doesn't work. -@@ -1072,7 +1080,7 @@ - extra = unmap_vma(mm, addr, len, mpnt, extra); - } - -- free_pgtables(mm, prev, addr, addr+len); -+ free_pgtables(mm, prev, NULL, addr, addr+len); - - return extra; - } -@@ -1096,7 +1104,7 @@ - find_vma_prev(mm, mpnt->vm_start, &prev); - extra_m = unmap_vma(mm, addr_m, len, mpnt, extra_m); - -- free_pgtables(mm, prev, start, end); -+ free_pgtables(mm, prev, free_m, start, end); - } - - return extra_m; diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-cs46xx-gcc33.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-cs46xx-gcc33.patch deleted file mode 100644 index 58b2e9e117bd..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-cs46xx-gcc33.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- linux-2.4.20-gentoo-r6/drivers/sound/cs46xx.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/drivers/sound/cs46xx.c 2003-10-11 21:25:37.000000000 +0100 -@@ -947,8 +947,8 @@ - - struct InitStruct - { -- u32 long off; -- u32 long val; -+ u32 off; -+ u32 val; - } InitArray[] = { {0x00000040, 0x3fc0000f}, - {0x0000004c, 0x04800000}, - diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-devfs-snd-fix.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-devfs-snd-fix.patch deleted file mode 100644 index 3a0b26fc39e0..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-devfs-snd-fix.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- linux-2.4.20-gentoo-r7/drivers/sound/sound_core.c.orig 2003-10-10 17:30:07.000000000 +0000 -+++ linux-2.4.20-gentoo-r7/drivers/sound/sound_core.c 2003-10-10 17:33:23.000000000 +0000 -@@ -17,8 +17,9 @@ - * plug into this. The fact they dont all go via OSS doesn't mean - * they don't have to implement the OSS API. There is a lot of logic - * to keeping much of the OSS weight out of the code in a compatibility -- * module, but its up to the driver to rember to load it... -+ * module, but it's up to the driver to remember to load it... - * -+ - * The code provides a set of functions for registration of devices - * by type. This is done rather than providing a single call so that - * we can hide any future changes in the internals (eg when we go to -@@ -174,10 +174,10 @@ - return r; - } - -- if (r == low) -+ if (r < SOUND_STEP) - sprintf (name_buf, "%s", name); - else -- sprintf (name_buf, "%s%d", name, (r - low) / SOUND_STEP); -+ sprintf (name_buf, "%s%d", name, (r / SOUND_STEP)); - s->de = devfs_register (devfs_handle, name_buf, - DEVFS_FL_NONE, SOUND_MAJOR, s->unit_minor, - S_IFCHR | mode, fops, NULL); -@@ -232,17 +233,20 @@ - - int register_sound_special(struct file_operations *fops, int unit) - { -- char *name; -+ const int chain = (unit & 0x0F); -+ int max_unit = chain + 128; -+ const char *name; - -- switch (unit) { -+ switch (chain) { - case 0: - name = "mixer"; - break; - case 1: - name = "sequencer"; -+ max_unit = unit + 1; - break; - case 2: -- name = "midi00"; -+ name = "midi"; - break; - case 3: - name = "dsp"; -@@ -261,6 +265,7 @@ - break; - case 8: - name = "sequencer2"; -+ max_unit = unit + 1; - break; - case 9: - name = "dmmidi"; -@@ -281,10 +286,10 @@ - name = "admmidi"; - break; - default: -- name = "unknown"; -+ name = "unknownX"; - break; - } -- return sound_insert_unit(&chains[unit&15], fops, -1, unit, unit+1, -+ return sound_insert_unit(&chains[chain], fops, -1, unit, max_unit, - name, S_IRUSR | S_IWUSR); - } diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-fix-proc-mm.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-fix-proc-mm.patch deleted file mode 100644 index 99fca5432eff..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-fix-proc-mm.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- linux-2.4.20-gentoo-r13/arch/i386/kernel/ptrace.c 2004-02-19 16:50:23.000000000 +0000 -+++ linux-2.4.20-gentoo-r11/arch/i386/kernel/ptrace.c 2004-02-19 17:21:31.000000000 +0000 -@@ -151,7 +151,9 @@ - extern int modify_ldt(struct task_struct *task, int func, void *ptr, - unsigned long bytecount); - --extern struct mm_struct *proc_mm_get_mm(int fd); -+#ifdef CONFIG_PROC_MM -+ extern struct mm_struct *proc_mm_get_mm(int fd); -+#endif - - asmlinkage int sys_ptrace(long request, long pid, long addr, long data) - { -@@ -469,6 +471,7 @@ - break; - } - -+#ifdef CONFIG_PROC_MM - case PTRACE_SWITCH_MM: { - struct mm_struct *old = child->mm; - struct mm_struct *new = proc_mm_get_mm(data); -@@ -485,6 +488,7 @@ - ret = 0; - break; - } -+#endif - - default: - ret = -EIO; ---- linux-2.4.20-gentoo-r11/include/linux/mm.h 2004-02-19 17:05:39.000000000 +0000 -+++ linux-2.4.20-gentoo-r13/include/linux/mm.h 2004-02-19 18:54:14.000000000 +0000 -@@ -708,8 +708,7 @@ - ) - { - unsigned long ret_m; -- ret_m = do_mmap_pgoff(NULL, ret + SEGMEXEC_TASK_SIZE, --0UL, prot, flag | MAP_MIRROR | MAP_FIXED, ret); -+ ret_m = do_mmap_pgoff(current->mm, NULL, ret + SEGMEXEC_TASK_SIZE, 0UL, prot, flag | MAP_MIRROR | MAP_FIXED, ret); - if (BAD_ADDR(ret_m)) { - do_munmap(current->mm, ret, len); - ret = ret_m; diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-gcc33.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-gcc33.patch deleted file mode 100644 index 826e9aa5716e..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-gcc33.patch +++ /dev/null @@ -1,275 +0,0 @@ -diff -u -r linux-2.4.20-gentoo-r6/arch/arm/mach-integrator/pci_v3.c linux-2.4.20-gentoo-r7/arch/arm/mach-integrator/pci_v3.c ---- linux-2.4.20-gentoo-r6/arch/arm/mach-integrator/pci_v3.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/arch/arm/mach-integrator/pci_v3.c 2003-09-11 17:32:50.000000000 +0100 -@@ -629,7 +629,6 @@ - #if 0 - ret = request_irq(IRQ_LBUSTIMEOUT, lb_timeout, 0, "bus timeout", NULL); - if (ret) -- printk(KERN_ERR "PCI: unable to grab local bus timeout ". -- "interrupt: %d\n", ret); -+ printk(KERN_ERR "PCI: unable to grab local bus timeout interrupt: %d\n", ret); - #endif - } -diff -u -r linux-2.4.20-gentoo-r6/arch/mips64/mm/r4xx0.c linux-2.4.20-gentoo-r7/arch/mips64/mm/r4xx0.c ---- linux-2.4.20-gentoo-r6/arch/mips64/mm/r4xx0.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/arch/mips64/mm/r4xx0.c 2003-09-11 17:32:50.000000000 +0100 -@@ -1941,9 +1941,8 @@ - #ifdef DEBUG_TLB - if((pid != (CPU_CONTEXT(smp_processor_id(), vma->vm_mm) & 0xff)) || - (CPU_CONTEXT(smp_processor_id(), vma->vm_mm) == 0)) { -- printk("update_mmu_cache: Wheee, bogus tlbpid mmpid=%d -- tlbpid=%d\n", (int) (CPU_CONTEXT(smp_processor_id(), -- vma->vm_mm) & 0xff), pid); -+ printk("update_mmu_cache: Wheee, bogus tlbpid mmpid=%d tlbpid=%d\n", -+ (int) (CPU_CONTEXT(smp_processor_id(), vma->vm_mm) & 0xff), pid); - } - #endif - -diff -u -r linux-2.4.20-gentoo-r6/arch/mips64/mm/tlb-r4k.c linux-2.4.20-gentoo-r7/arch/mips64/mm/tlb-r4k.c ---- linux-2.4.20-gentoo-r6/arch/mips64/mm/tlb-r4k.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/arch/mips64/mm/tlb-r4k.c 2003-09-11 17:32:50.000000000 +0100 -@@ -200,9 +200,8 @@ - #ifdef DEBUG_TLB - if((pid != (CPU_CONTEXT(smp_processor_id(), vma->vm_mm) & 0xff)) || - (CPU_CONTEXT(smp_processor_id(), vma->vm_mm) == 0)) { -- printk("update_mmu_cache: Wheee, bogus tlbpid mmpid=%d -- tlbpid=%d\n", (int) (CPU_CONTEXT(smp_processor_id(), -- vma->vm_mm) & 0xff), pid); -+ printk("update_mmu_cache: Wheee, bogus tlbpid mmpid=%d tlbpid=%d\n", -+ (int) (CPU_CONTEXT(smp_processor_id(), vma->vm_mm) & 0xff), pid); - } - #endif - -diff -u -r linux-2.4.20-gentoo-r6/drivers/atm/zatm.c linux-2.4.20-gentoo-r7/drivers/atm/zatm.c ---- linux-2.4.20-gentoo-r6/drivers/atm/zatm.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/drivers/atm/zatm.c 2003-09-11 17:32:50.000000000 +0100 -@@ -1430,8 +1430,7 @@ - zout(uPD98401_GMR_ONE | uPD98401_BURST8 | uPD98401_BURST4 | - uPD98401_BURST2 | uPD98401_GMR_PM | uPD98401_GMR_DR,GMR); - /* TODO: should shrink allocation now */ -- printk("mem=%dkB,%s (",zatm_dev->mem >> 10,zatm_dev->copper ? "UTP" : -- "MMF"); -+ printk("mem=%dkB,%s (",zatm_dev->mem >> 10,zatm_dev->copper ? "UTP" : "MMF"); - for (i = 0; i < ESI_LEN; i++) - printk("%02X%s",dev->esi[i],i == ESI_LEN-1 ? ")\n" : "-"); - do { -diff -u -r linux-2.4.20-gentoo-r6/drivers/char/h8.c linux-2.4.20-gentoo-r7/drivers/char/h8.c ---- linux-2.4.20-gentoo-r6/drivers/char/h8.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/drivers/char/h8.c 2003-09-11 17:32:50.000000000 +0100 -@@ -574,8 +574,7 @@ - } - - if (intrbuf.word & H8_POWER_BUTTON) { -- printk(KERN_CRIT "Power switch pressed - please wait - preparing to power --off\n"); -+ printk(KERN_CRIT "Power switch pressed - please wait - preparing to power off\n"); - h8_set_event_mask(H8_POWER_BUTTON); - wake_up(&h8_monitor_wait); - } -diff -u -r linux-2.4.20-gentoo-r6/drivers/ide/ide-cd.h linux-2.4.20-gentoo-r7/drivers/ide/ide-cd.h ---- linux-2.4.20-gentoo-r6/drivers/ide/ide-cd.h 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/drivers/ide/ide-cd.h 2003-09-11 17:32:50.000000000 +0100 -@@ -437,7 +437,7 @@ - - byte curlba[3]; - byte nslots; -- __u8 short slot_tablelen; -+ __u16 slot_tablelen; - }; - - -diff -u -r linux-2.4.20-gentoo-r6/drivers/net/bcm4400/b44.h linux-2.4.20-gentoo-r7/drivers/net/bcm4400/b44.h ---- linux-2.4.20-gentoo-r6/drivers/net/bcm4400/b44.h 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/drivers/net/bcm4400/b44.h 2003-09-11 21:37:04.000000000 +0100 -@@ -1079,10 +1079,10 @@ - /******************************************************************************/ - - #define REG_RD(pDevice, OffsetName) \ -- __raw_readl(&((pDevice)->pMemView->##OffsetName)) -+ __raw_readl(&((pDevice)->pMemView->OffsetName)) - - #define REG_WR(pDevice, OffsetName, Value32) \ -- (void) __raw_writel(Value32, &((pDevice)->pMemView->##OffsetName)) -+ (void) __raw_writel(Value32, &((pDevice)->pMemView->OffsetName)) - - #define REG_RD_OFFSET(pDevice, Offset) \ - __raw_readl(((LM_UINT8 *) (pDevice)->pMemView + Offset)) -diff -u -r linux-2.4.20-gentoo-r6/drivers/net/tokenring/olympic.c linux-2.4.20-gentoo-r7/drivers/net/tokenring/olympic.c ---- linux-2.4.20-gentoo-r6/drivers/net/tokenring/olympic.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/drivers/net/tokenring/olympic.c 2003-09-11 17:32:50.000000000 +0100 -@@ -655,8 +655,8 @@ - printk(" stat_ring[7]: %p\n", &(olympic_priv->olympic_rx_status_ring[7]) ); - - printk("RXCDA: %x, rx_ring[0]: %p\n",readl(olympic_mmio+RXCDA),&olympic_priv->olympic_rx_ring[0]); -- printk("Rx_ring_dma_addr = %08x, rx_status_dma_addr = --%08x\n",olympic_priv->rx_ring_dma_addr,olympic_priv->rx_status_ring_dma_addr) ; -+ printk("Rx_ring_dma_addr = %08x, rx_status_dma_addr = %08x\n", -+ olympic_priv->rx_ring_dma_addr, olympic_priv->rx_status_ring_dma_addr) ; - #endif - - writew((((readw(olympic_mmio+RXENQ)) & 0x8000) ^ 0x8000) | i,olympic_mmio+RXENQ); -diff -u -r linux-2.4.20-gentoo-r6/drivers/scsi/sun3_NCR5380.c linux-2.4.20-gentoo-r7/drivers/scsi/sun3_NCR5380.c ---- linux-2.4.20-gentoo-r6/drivers/scsi/sun3_NCR5380.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/drivers/scsi/sun3_NCR5380.c 2003-09-11 17:32:50.000000000 +0100 -@@ -1226,8 +1226,7 @@ - BASR_ACK)) == - (BASR_PHASE_MATCH | BASR_ACK)) { - printk("scsi%d: BASR %02x\n", HOSTNO, NCR5380_read(BUS_AND_STATUS_REG)); -- printk("scsi%d: bus stuck in data phase -- probably a -- single byte overrun!\n", HOSTNO); -+ printk("scsi%d: bus stuck in data phase -- probably a single byte overrun!\n", HOSTNO); - printk("not prepared for this error!\n"); - printk("please e-mail sammy@sammy.net with a description of how this\n"); - printk("error was produced.\n"); -diff -u -r linux-2.4.20-gentoo-r6/fs/imon/imon.c linux-2.4.20-gentoo-r7/fs/imon/imon.c ---- linux-2.4.20-gentoo-r6/fs/imon/imon.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/fs/imon/imon.c 2003-09-11 17:32:50.000000000 +0100 -@@ -1310,8 +1310,7 @@ - wr += sprintf(bf + wr, "\tdprobes:\t%lu\n", m.im_dprobes); - wr += sprintf(bf + wr, "\tdmoves:\t\t%lu\n", m.im_dmoves); - #else -- wr += sprintf(bf + wr, "no metering data; rebuild imon.o with METER_ON s --et.\n"); -+ wr += sprintf(bf + wr, "no metering data; rebuild imon.o with METER_ON set.\n"); - #endif /* METER_ON */ - - return wr; -diff -u -r linux-2.4.20-gentoo-r6/fs/reiserfs/super.c linux-2.4.20-gentoo-r7/fs/reiserfs/super.c ---- linux-2.4.20-gentoo-r6/fs/reiserfs/super.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/fs/reiserfs/super.c 2003-09-11 17:32:50.000000000 +0100 -@@ -941,8 +941,7 @@ - ll_rw_block(READ, 1, &(SB_AP_BITMAP(s)[i].bh)) ; - wait_on_buffer(SB_AP_BITMAP(s)[i].bh) ; - if (!buffer_uptodate(SB_AP_BITMAP(s)[i].bh)) { -- printk("reread_meta_blocks, error reading bitmap block number %d at -- %ld\n", i, SB_AP_BITMAP(s)[i].bh->b_blocknr) ; -+ printk("reread_meta_blocks, error reading bitmap block number %d at %ld\n", i, SB_AP_BITMAP(s)[i].bh->b_blocknr) ; - return 1 ; - } - } -diff -u -r linux-2.4.20-gentoo-r6/net/core/rtnetlink.c linux-2.4.20-gentoo-r7/net/core/rtnetlink.c ---- linux-2.4.20-gentoo-r6/net/core/rtnetlink.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/net/core/rtnetlink.c 2003-09-11 17:32:50.000000000 +0100 -@@ -394,7 +394,7 @@ - * Malformed skbs with wrong lengths of messages are discarded silently. - */ - --extern __inline__ int rtnetlink_rcv_skb(struct sk_buff *skb) -+__inline__ int rtnetlink_rcv_skb(struct sk_buff *skb) - { - int err; - struct nlmsghdr * nlh; -diff -u -r linux-2.4.20-gentoo-r6/net/decnet/dn_table.c linux-2.4.20-gentoo-r7/net/decnet/dn_table.c ---- linux-2.4.20-gentoo-r6/net/decnet/dn_table.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/net/decnet/dn_table.c 2003-09-11 17:32:50.000000000 +0100 -@@ -836,8 +836,7 @@ - return NULL; - - if (in_interrupt() && net_ratelimit()) { -- printk(KERN_DEBUG "DECnet: BUG! Attempt to create routing table --from interrupt\n"); -+ printk(KERN_DEBUG "DECnet: BUG! Attempt to create routing table from interrupt\n"); - return NULL; - } - if ((t = kmalloc(sizeof(struct dn_fib_table), GFP_KERNEL)) == NULL) - -diff -u -r linux-2.4.20-gentoo-r6/drivers/net/fealnx.c linux-2.4.20-gentoo-r7/drivers/net/fealnx.c ---- linux-2.4.20-gentoo-r6/drivers/net/fealnx.c 2003-09-08 19:50:27.000000000 -0700 -+++ linux-2.4.20-gentoo-r7/drivers/net/fealnx.c 2003-06-13 07:51:34.000000000 -0700 -@@ -937,7 +937,7 @@ - // 89/9/1 modify, - // np->bcrvalue=0x38; - np->bcrvalue = 0x10; -- np->cralue = 0xe00; /* rx 128 burst length */ -+ np->crvalue = 0xe00; /* rx 128 burst length */ - #warning Processor architecture undefined! - #endif - // 89/12/29 add, -@@ -1198,7 +1198,6 @@ - printk("\n"); - } - -- + dev->if_port = np->default_port; - /* Reinit. Gross */ - - /* Reset the chip's Tx and Rx processes. */ -diff -u -r linux-2.4.20-gentoo-r6/drivers/net/irda/ma600.c linux-2.4.20-gentoo-r7/drivers/net/irda/ma600.c ---- linux-2.4.20-gentoo-r6/drivers/net/irda/ma600.c 2003-09-08 19:50:27.000000000 -0700 -+++ linux-2.4.20-gentoo-r7/drivers/net/irda/ma600.c 2003-08-25 04:44:42.000000000 -0700 -@@ -51,9 +51,9 @@ - #undef ASSERT(expr, func) - #define ASSERT(expr, func) \ - if(!(expr)) { \ -- printk( "Assertion failed! %s,%s,%s,line=%d\n",\ -- #expr,__FILE__,__FUNCTION__,__LINE__); \ -- ##func} -+ printk( "Assertion failed! %s,%s,%s,line=%d\n",\ -+ #expr,__FILE__,__FUNCTION__,__LINE__); \ -+ func} - #endif - - /* convert hex value to ascii hex */ -diff -u -r linux-2.4.20-gentoo-r6/arch/i386/math-emu/poly.h linux-2.4.20-gentoo-r7/arch/i386/math-emu/poly.h ---- linux-2.4.20-gentoo-r6/arch/i386/math-emu/poly.h 2003-09-08 19:52:14.000000000 -0700 -+++ linux-2.4.20-gentoo-r7/arch/i386/math-emu/poly.h 2003-09-08 19:45:38.000000000 -0700 -@@ -75,11 +75,11 @@ - /* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */ - static inline void add_Xsig_Xsig(Xsig *dest, const Xsig *x2) - { -- asm volatile ("movl %1,%%edi; movl %2,%%esi; -- movl (%%esi),%%eax; addl %%eax,(%%edi); -- movl 4(%%esi),%%eax; adcl %%eax,4(%%edi); -- movl 8(%%esi),%%eax; adcl %%eax,8(%%edi);" -- :"=g" (*dest):"g" (dest), "g" (x2) -+ asm volatile ("movl %1,%%edi; movl %2,%%esi; " \ -+ "movl (%%esi),%%eax; addl %%eax,(%%edi); " \ -+ "movl 4(%%esi),%%eax; adcl %%eax,4(%%edi); " \ -+ "movl 8(%%esi),%%eax; adcl %%eax,8(%%edi); " \ -+ :"=g" (*dest):"g" (dest), "g" (x2) \ - :"ax","si","di"); - } - -@@ -90,18 +90,18 @@ - problem, but keep fingers crossed! */ - static inline void add_two_Xsig(Xsig *dest, const Xsig *x2, long int *exp) - { -- asm volatile ("movl %2,%%ecx; movl %3,%%esi; -- movl (%%esi),%%eax; addl %%eax,(%%ecx); -- movl 4(%%esi),%%eax; adcl %%eax,4(%%ecx); -- movl 8(%%esi),%%eax; adcl %%eax,8(%%ecx); -- jnc 0f; -- rcrl 8(%%ecx); rcrl 4(%%ecx); rcrl (%%ecx) -- movl %4,%%ecx; incl (%%ecx) -- movl $1,%%eax; jmp 1f; -- 0: xorl %%eax,%%eax; -- 1:" -- :"=g" (*exp), "=g" (*dest) -- :"g" (dest), "g" (x2), "g" (exp) -+ asm volatile ("movl %2,%%ecx; movl %3,%%esi; " \ -+ "movl (%%esi),%%eax; addl %%eax,(%%ecx); " \ -+ "movl 4(%%esi),%%eax; adcl %%eax,4(%%ecx); " \ -+ "movl 8(%%esi),%%eax; adcl %%eax,8(%%ecx); " \ -+ "jnc 0f; " \ -+ "rcrl 8(%%ecx); rcrl 4(%%ecx); rcrl (%%ecx); " \ -+ "movl %4,%%ecx; incl (%%ecx); " \ -+ "movl $1,%%eax; jmp 1f; " \ -+ "0: xorl %%eax,%%eax; " \ -+ "1: " \ -+ :"=g" (*exp), "=g" (*dest) \ -+ :"g" (dest), "g" (x2), "g" (exp) \ - :"cx","si","ax"); - } - -diff -u -r linux-2.4.20-gentoo-r6/net/ipv4/netfilter/ip_nat_core.c linux-2.4.20-gentoo-r7/net/ipv4/netfilter/ip_nat_core.c ---- linux-2.4.20-gentoo-r6/net/ipv4/netfilter/ip_nat_core.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/net/ipv4/netfilter/ip_nat_core.c 2003-09-21 12:36:47.000000000 +0100 -@@ -851,8 +851,7 @@ - if (exp_for_packet(exp, pskb)) { - /* FIXME: May be true multiple times in the - * case of UDP!! */ -- DEBUGP("calling nat helper (exp=%p) for -- packet\n", exp); -+ DEBUGP("calling nat helper (exp=%p) for packet\n", exp); - ret = helper->help(ct, exp, info, ctinfo, - hooknum, pskb); - if (ret != NF_ACCEPT) { diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-grsec-datasize_fix.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-grsec-datasize_fix.patch deleted file mode 100644 index e8c952abef51..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-grsec-datasize_fix.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -u linux-2.4.20-gentoo-r7/arch/i386/vmlinux.lds.S.orig linux-2.4.20-gentoo-r7/arch/i386/vmlinux.lds.S ---- linux-2.4.20-gentoo-r7/arch/i386/vmlinux.lds.S.orig 2003-10-19 18:02:59.000000000 +0200 -+++ linux-2.4.20-gentoo-r7/arch/i386/vmlinux.lds.S 2003-10-19 20:31:27.000000000 +0200 -@@ -27,6 +27,7 @@ - __ksymtab : { *(__ksymtab) } - __stop___ksymtab = .; - -+ _data = .; - .data : { /* Data */ - *(.data) - CONSTRUCTORS -diff -u linux-2.4.20-gentoo-r7/arch/i386/mm/init.c.orig linux-2.4.20-gentoo-r7/arch/i386/mm/init.c ---- linux-2.4.20-gentoo-r7/arch/i386/mm/init.c.orig 2003-10-19 18:02:59.000000000 +0200 -+++ linux-2.4.20-gentoo-r7/arch/i386/mm/init.c 2003-10-19 20:25:35.000000000 +0200 -@@ -97,7 +97,7 @@ - - /* References to section boundaries */ - --extern char _text, _etext, _edata, __bss_start, _end; -+extern char _text, _etext, _data, _edata, __bss_start, _end; - extern char __init_begin, __init_end; - - static inline void set_pte_phys (unsigned long vaddr, -@@ -485,7 +485,7 @@ - reservedpages = free_pages_init(); - - codesize = (unsigned long) &_etext - (unsigned long) &_text; -- datasize = (unsigned long) &_edata - (unsigned long) &_etext; -+ datasize = (unsigned long) &_edata - (unsigned long) &_data; - initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; - - printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n", diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-grsec-disabled.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-grsec-disabled.patch deleted file mode 100644 index ff3fc952222a..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-grsec-disabled.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- grsecurity/grsec_disabled.c~ 2003-09-14 12:50:59.000000000 +0100 -+++ grsecurity/grsec_disabled.c 2003-09-14 12:53:11.000000000 +0100 -@@ -13,11 +13,18 @@ - #include <linux/skbuff.h> - #include <linux/ip.h> - #include <linux/sysctl.h> -+#include <linux/grdefs.h> - - #ifdef CONFIG_SYSCTL - __u32 --gr_handle_sysctl(const struct ctl_table * table, __u32 mode) -+gr_handle_sysctl(const struct ctl_table * table, const void *oldval, const void *newval) - { -+ __u32 mode = 0; -+ if (oldval) -+ mode |= GR_READ; -+ if (newval) -+ mode |= GR_WRITE; -+ - return mode; - } - #endif diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-ipt-realm.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-ipt-realm.patch deleted file mode 100644 index 08cd56909e7c..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-ipt-realm.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- linux-2.4.20-gentoo-r7/net/ipv4/netfilter/ipt_realm.c.old 2003-10-19 12:55:59.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/net/ipv4/netfilter/ipt_realm.c 2003-10-19 13:08:20.000000000 +0100 -@@ -26,6 +26,18 @@ - - if((dst = skb->dst) == NULL) - return 0; -+ -+ #ifndef _NET_DST_H_have_tclassid -+ #warning Could not find _NET_DST_H_have_tclassid... -+ #warning -+ #warning Make sure you have enabled the following -+ #warning in your configuration:- -+ #warning -+ #warning Network Options >> QoS and/or fair queuing -+ #warning >> Packet Classifier API -+ #warning >> Routing table based classifier -+ #endif -+ - id = dst->tclassid; - - return (info->id == (id & info->mask)) ^ info->invert; ---- linux-2.4.20-gentoo-r7/include/net/dst.h.old 2003-10-19 12:54:13.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/include/net/dst.h 2003-10-19 13:04:01.000000000 +0100 -@@ -58,6 +58,7 @@ - int (*output)(struct sk_buff*); - - #ifdef CONFIG_NET_CLS_ROUTE -+ #define _NET_DST_H_have_tclassid - __u32 tclassid; - #endif - diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-ipt-route.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-ipt-route.patch deleted file mode 100644 index 2258b5890663..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-ipt-route.patch +++ /dev/null @@ -1,449 +0,0 @@ -diff -Nru linux-2.4.20/Documentation/Configure.help linux-2.4.20-pom2patch/Documentation/Configure.help ---- linux-2.4.20/Documentation/Configure.help 2003-05-02 12:56:58.000000000 -0500 -+++ linux-2.4.20-pom2patch/Documentation/Configure.help 2003-05-02 12:57:00.000000000 -0500 -@@ -3118,6 +3118,24 @@ - If you want to compile it as a module, say M here and read - Documentation/modules.txt. If unsure, say `N'. - -+ROUTE target support -+CONFIG_IP_NF_TARGET_ROUTE -+ This option adds a `ROUTE' target, which enables you to setup unusual -+ routes not supported by the standard kernel routing table. -+ For example, the ROUTE lets you directly route a received packet through -+ an interface or towards a host, even if the regular destination of the -+ packet is the router itself. The ROUTE target is also able to change the -+ incoming interface of a packet. -+ -+ This target does never modify the packet and is a final target. -+ It has to be used inside the mangle table. -+ -+ -+ If you want to compile it as a module, say M here and read -+ Documentation/modules.txt. The module will be called ipt_ROUTE.o. -+ If unsure, say `N'. -+ -+ - LOG target support - CONFIG_IP_NF_TARGET_LOG - This option adds a `LOG' target, which allows you to create rules in -diff -Nru linux.orig/include/linux/netfilter_ipv4/ipt_ROUTE.h linux/include/linux/netfilter_ipv4/ipt_ROUTE.h ---- linux.orig/include/linux/netfilter_ipv4/ipt_ROUTE.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/include/linux/netfilter_ipv4/ipt_ROUTE.h 2003-07-25 11:05:27.000000000 +0200 -@@ -0,0 +1,22 @@ -+/* Header file for iptables ipt_ROUTE target -+ * -+ * (C) 2002 by Cédric de Launois <delaunois@info.ucl.ac.be> -+ * -+ * This software is distributed under GNU GPL v2, 1991 -+ */ -+#ifndef _IPT_ROUTE_H_target -+#define _IPT_ROUTE_H_target -+ -+#define IPT_ROUTE_IFNAMSIZ 16 -+ -+struct ipt_route_target_info { -+ char oif[IPT_ROUTE_IFNAMSIZ]; /* Output Interface Name */ -+ char iif[IPT_ROUTE_IFNAMSIZ]; /* Input Interface Name */ -+ u_int32_t gw; /* IP address of gateway */ -+ u_int8_t flags; -+}; -+ -+/* Values for "flags" field */ -+#define IPT_ROUTE_CONTINUE 0x01 -+ -+#endif /*_IPT_ROUTE_H_target*/ -diff -Nru linux-2.4.20/net/ipv4/netfilter/Config.in linux-2.4.20-pom2patch/net/ipv4/netfilter/Config.in ---- linux-2.4.20/net/ipv4/netfilter/Config.in 2003-05-02 12:56:58.000000000 -0500 -+++ linux-2.4.20-pom2patch/net/ipv4/netfilter/Config.in 2003-05-02 12:57:00.000000000 -0500 -@@ -116,6 +116,7 @@ - dep_tristate ' CLASSIFY target support (EXPERIMENTAL)' CONFIG_IP_NF_TARGET_CLASSIFY $CONFIG_IP_NF_FILTER - fi - dep_tristate ' LOG target support' CONFIG_IP_NF_TARGET_LOG $CONFIG_IP_NF_IPTABLES -+ dep_tristate ' ROUTE target support' CONFIG_IP_NF_TARGET_ROUTE $CONFIG_IP_NF_IPTABLES - if [ "$CONFIG_IP_NF_CONNTRACK_MARK" != "n" ]; then - dep_tristate ' CONNMARK target support' CONFIG_IP_NF_TARGET_CONNMARK $CONFIG_IP_NF_IPTABLES - fi -diff -Nru linux-2.4.20/net/ipv4/netfilter/Makefile linux-2.4.20-pom2patch/net/ipv4/netfilter/Makefile ---- linux-2.4.20/net/ipv4/netfilter/Makefile 2003-05-02 12:56:58.000000000 -0500 -+++ linux-2.4.20-pom2patch/net/ipv4/netfilter/Makefile 2003-05-02 12:57:01.000000000 -0500 -@@ -110,6 +110,7 @@ - obj-$(CONFIG_IP_NF_TARGET_MARK) += ipt_MARK.o - obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o - obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o -+obj-$(CONFIG_IP_NF_TARGET_ROUTE) += ipt_ROUTE.o - obj-$(CONFIG_IP_NF_TARGET_SAME) += ipt_SAME.o - obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o - obj-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += ip_nat_snmp_basic.o -diff -Nru linux.orig/net/ipv4/netfilter/ipt_ROUTE.c linux/net/ipv4/netfilter/ipt_ROUTE.c ---- linux.orig/net/ipv4/netfilter/ipt_ROUTE.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/net/ipv4/netfilter/ipt_ROUTE.c 2003-07-25 11:07:47.000000000 +0200 -@@ -0,0 +1,369 @@ -+/* -+ * This implements the ROUTE target, which enables you to setup unusual -+ * routes not supported by the standard kernel routing table. -+ * -+ * Copyright (C) 2002 Cedric de Launois <delaunois@info.ucl.ac.be> -+ * -+ * v 1.8 2003/07/25 -+ * -+ * This software is distributed under GNU GPL v2, 1991 -+ */ -+ -+#include <linux/module.h> -+#include <linux/skbuff.h> -+#include <linux/ip.h> -+#include <linux/netfilter_ipv4/ip_tables.h> -+#include <linux/netfilter_ipv4/ipt_ROUTE.h> -+#include <linux/netdevice.h> -+#include <linux/route.h> -+#include <net/ip.h> -+#include <net/route.h> -+#include <net/icmp.h> -+ -+#if 0 -+#define DEBUGP printk -+#else -+#define DEBUGP(format, args...) -+#endif -+ -+ -+/* Try to route the packet according to the routing keys specified in -+ * route_info. Keys are : -+ * - ifindex : -+ * 0 if no oif preferred, -+ * otherwise set to the index of the desired oif -+ * - route_info->gw : -+ * 0 if no gateway specified, -+ * otherwise set to the next host to which the pkt must be routed -+ * If success, skb->dev is the output device to which the packet must -+ * be sent and skb->dst is not NULL -+ * -+ * RETURN: -1 if an error occured -+ * 1 if the packet was succesfully routed to the -+ * destination desired -+ * 0 if the kernel routing table could not route the packet -+ * according to the keys specified -+ */ -+static int route(struct sk_buff *skb, -+ unsigned int ifindex, -+ const struct ipt_route_target_info *route_info) -+{ -+ int err; -+ struct rtable *rt; -+ struct iphdr *iph = skb->nh.iph; -+ struct rt_key key = { -+ dst:iph->daddr, -+ src:0, -+ oif:ifindex, -+ tos:RT_TOS(iph->tos) -+ }; -+ -+ /* The destination address may be overloaded by the target */ -+ if (route_info->gw) -+ key.dst = route_info->gw; -+ -+ /* Trying to route the packet using the standard routing table. */ -+ if ((err = ip_route_output_key(&rt, &key))) { -+ if (net_ratelimit()) -+ DEBUGP("ipt_ROUTE: couldn't route pkt (err: %i)",err); -+ return -1; -+ } -+ -+ /* Drop old route. */ -+ dst_release(skb->dst); -+ skb->dst = NULL; -+ -+ /* Success if no oif specified or if the oif correspond to the -+ * one desired */ -+ if (!ifindex || rt->u.dst.dev->ifindex == ifindex) { -+ skb->dst = &rt->u.dst; -+ skb->dev = skb->dst->dev; -+ return 1; -+ } -+ -+ /* The interface selected by the routing table is not the one -+ * specified by the user. This may happen because the dst address -+ * is one of our own addresses. -+ */ -+ if (net_ratelimit()) -+ DEBUGP("ipt_ROUTE: failed to route as desired gw=%u.%u.%u.%u oif=%i (got oif=%i)\n", -+ NIPQUAD(route_info->gw), ifindex, rt->u.dst.dev->ifindex); -+ -+ return 0; -+} -+ -+ -+/* Stolen from ip_finish_output2 -+ * PRE : skb->dev is set to the device we are leaving by -+ * skb->dst is not NULL -+ * POST: the packet is sent with the link layer header pushed -+ * the packet is destroyed -+ */ -+static void ip_direct_send(struct sk_buff *skb) -+{ -+ struct dst_entry *dst = skb->dst; -+ struct hh_cache *hh = dst->hh; -+ -+ if (hh) { -+ read_lock_bh(&hh->hh_lock); -+ memcpy(skb->data - 16, hh->hh_data, 16); -+ read_unlock_bh(&hh->hh_lock); -+ skb_push(skb, hh->hh_len); -+ hh->hh_output(skb); -+ } else if (dst->neighbour) -+ dst->neighbour->output(skb); -+ else { -+ if (net_ratelimit()) -+ DEBUGP(KERN_DEBUG "ipt_ROUTE: no hdr & no neighbour cache!\n"); -+ kfree_skb(skb); -+ } -+} -+ -+ -+/* PRE : skb->dev is set to the device we are leaving by -+ * POST: - the packet is directly sent to the skb->dev device, without -+ * pushing the link layer header. -+ * - the packet is destroyed -+ */ -+static inline int dev_direct_send(struct sk_buff *skb) -+{ -+ return dev_queue_xmit(skb); -+} -+ -+ -+static unsigned int route_oif(const struct ipt_route_target_info *route_info, -+ struct sk_buff *skb) -+{ -+ unsigned int ifindex = 0; -+ struct net_device *dev_out = NULL; -+ -+ /* The user set the interface name to use. -+ * Getting the current interface index. -+ */ -+ if ((dev_out = dev_get_by_name(route_info->oif))) { -+ ifindex = dev_out->ifindex; -+ } else { -+ /* Unknown interface name : packet dropped */ -+ if (net_ratelimit()) -+ DEBUGP("ipt_ROUTE: oif interface %s not found\n", route_info->oif); -+ return NF_DROP; -+ } -+ -+ /* Trying the standard way of routing packets */ -+ switch (route(skb, ifindex, route_info)) { -+ case 1: -+ dev_put(dev_out); -+ if (route_info->flags & IPT_ROUTE_CONTINUE) -+ return IPT_CONTINUE; -+ -+ ip_direct_send(skb); -+ return NF_STOLEN; -+ -+ case 0: -+ /* Failed to send to oif. Trying the hard way */ -+ if (route_info->flags & IPT_ROUTE_CONTINUE) -+ return NF_DROP; -+ -+ if (net_ratelimit()) -+ DEBUGP("ipt_ROUTE: forcing the use of %i\n", -+ ifindex); -+ -+ /* We have to force the use of an interface. -+ * This interface must be a tunnel interface since -+ * otherwise we can't guess the hw address for -+ * the packet. For a tunnel interface, no hw address -+ * is needed. -+ */ -+ if ((dev_out->type != ARPHRD_TUNNEL) -+ && (dev_out->type != ARPHRD_IPGRE)) { -+ if (net_ratelimit()) -+ DEBUGP("ipt_ROUTE: can't guess the hw addr !\n"); -+ dev_put(dev_out); -+ return NF_DROP; -+ } -+ -+ /* Send the packet. This will also free skb -+ * Do not go through the POST_ROUTING hook because -+ * skb->dst is not set and because it will probably -+ * get confused by the destination IP address. -+ */ -+ skb->dev = dev_out; -+ dev_direct_send(skb); -+ dev_put(dev_out); -+ return NF_STOLEN; -+ -+ default: -+ /* Unexpected error */ -+ dev_put(dev_out); -+ return NF_DROP; -+ } -+} -+ -+ -+static unsigned int route_iif(const struct ipt_route_target_info *route_info, -+ struct sk_buff *skb) -+{ -+ struct net_device *dev_out = NULL; -+ unsigned int ifindex = 0; -+ -+ /* Getting the current interface index. */ -+ if ((dev_out = dev_get_by_name(route_info->iif))) -+ ifindex = dev_out->ifindex; -+ else { -+ /* Unknown interface name : packet dropped */ -+ if (net_ratelimit()) -+ DEBUGP("ipt_ROUTE: iif interface %s not found\n", route_info->oif); -+ return NF_DROP; -+ } -+ -+ skb->dev = dev_out; -+ dst_release(skb->dst); -+ skb->dst = NULL; -+ -+ netif_rx(skb); -+ -+ return NF_STOLEN; -+} -+ -+ -+static unsigned int route_gw(const struct ipt_route_target_info *route_info, -+ struct sk_buff *skb) -+{ -+ if (route(skb, 0, route_info)!=1) -+ return NF_DROP; -+ -+ if (route_info->flags & IPT_ROUTE_CONTINUE) -+ return IPT_CONTINUE; -+ -+ ip_direct_send(skb); -+ return NF_STOLEN; -+} -+ -+ -+static unsigned int ipt_route_target(struct sk_buff **pskb, -+ unsigned int hooknum, -+ const struct net_device *in, -+ const struct net_device *out, -+ const void *targinfo, -+ void *userinfo) -+{ -+ const struct ipt_route_target_info *route_info = targinfo; -+ struct sk_buff *skb = *pskb; -+ -+ /* If we are at PREROUTING or INPUT hook -+ * the TTL isn't decreased by the IP stack -+ */ -+ if (hooknum == NF_IP_PRE_ROUTING || -+ hooknum == NF_IP_LOCAL_IN) { -+ -+ struct iphdr *iph = skb->nh.iph; -+ -+ if (iph->ttl <= 1) { -+ struct rtable *rt; -+ -+ if (ip_route_output(&rt, iph->saddr, iph->daddr, -+ RT_TOS(iph->tos) | RTO_CONN, -+ 0)) { -+ return NF_DROP; -+ } -+ -+ if (skb->dev == rt->u.dst.dev) { -+ /* Drop old route. */ -+ dst_release(skb->dst); -+ skb->dst = &rt->u.dst; -+ -+ /* this will traverse normal stack, and -+ * thus call conntrack on the icmp packet */ -+ icmp_send(skb, ICMP_TIME_EXCEEDED, -+ ICMP_EXC_TTL, 0); -+ } -+ -+ return NF_DROP; -+ } -+ -+ ip_decrease_ttl(iph); -+ } -+ -+ /* Tell conntrack to forget this packet since it may get confused -+ * when a packet is leaving with dst address == our address. -+ * Good idea ? Dunno. Need advice. -+ */ -+ if (!(route_info->flags & IPT_ROUTE_CONTINUE)) { -+ nf_conntrack_put(skb->nfct); -+ skb->nfct = NULL; -+ skb->nfcache = 0; -+#ifdef CONFIG_NETFILTER_DEBUG -+ skb->nf_debug = 0; -+#endif -+ } -+ -+ if (route_info->oif[0]) -+ return route_oif(route_info, *pskb); -+ -+ if (route_info->iif[0]) -+ return route_iif(route_info, *pskb); -+ -+ if (route_info->gw) -+ return route_gw(route_info, *pskb); -+ -+ if (net_ratelimit()) -+ DEBUGP(KERN_DEBUG "ipt_ROUTE: no parameter !\n"); -+ -+ return IPT_CONTINUE; -+} -+ -+ -+static int ipt_route_checkentry(const char *tablename, -+ const struct ipt_entry *e, -+ void *targinfo, -+ unsigned int targinfosize, -+ unsigned int hook_mask) -+{ -+ if (strcmp(tablename, "mangle") != 0) { -+ printk("ipt_ROUTE: bad table `%s', use the `mangle' table.\n", -+ tablename); -+ return 0; -+ } -+ -+ if (hook_mask & ~( (1 << NF_IP_PRE_ROUTING) -+ | (1 << NF_IP_LOCAL_IN) -+ | (1 << NF_IP_FORWARD) -+ | (1 << NF_IP_LOCAL_OUT) -+ | (1 << NF_IP_POST_ROUTING))) { -+ printk("ipt_ROUTE: bad hook\n"); -+ return 0; -+ } -+ -+ if (targinfosize != IPT_ALIGN(sizeof(struct ipt_route_target_info))) { -+ printk(KERN_WARNING "ipt_ROUTE: targinfosize %u != %Zu\n", -+ targinfosize, -+ IPT_ALIGN(sizeof(struct ipt_route_target_info))); -+ return 0; -+ } -+ -+ return 1; -+} -+ -+ -+static struct ipt_target ipt_route_reg -+= { { NULL, NULL }, "ROUTE", ipt_route_target, ipt_route_checkentry, NULL, -+ THIS_MODULE }; -+ -+ -+static int __init init(void) -+{ -+ if (ipt_register_target(&ipt_route_reg)) -+ return -EINVAL; -+ -+ return 0; -+} -+ -+ -+static void __exit fini(void) -+{ -+ ipt_unregister_target(&ipt_route_reg); -+} -+ -+module_init(init); -+module_exit(fini); -+MODULE_LICENSE("GPL"); diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-mdcount.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-mdcount.patch deleted file mode 100644 index abfd1f66f8f3..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-mdcount.patch +++ /dev/null @@ -1,43 +0,0 @@ -[plasmaroo@gentoo.org]: Patch backported from 2.4.22-pre9... - -Because an md array may not exist yet when the device it opened, the ->active -count, which is incremented on opening if the array exists, is not 100% reliable. -This patch changes md to test inode->i_bdev->bd_openers rather than mddev->active -to test if an array is still in used before stopping it. - -diff ./drivers/md/md.c~current~ ./drivers/md/md.c ---- ./drivers/md/md.c~current~ 2003-09-04 11:32:15.000000000 +1000 -+++ ./drivers/md/md.c 2003-09-04 11:32:14.000000000 +1000 -@@ -1805,10 +1805,12 @@ static int do_md_stop(mddev_t * mddev, i - int err = 0, resync_interrupted = 0; - kdev_t dev = mddev_to_kdev(mddev); - -+#if 0 /* ->active is not currently reliable */ - if (atomic_read(&mddev->active)>1) { - printk(STILL_IN_USE, mdidx(mddev)); - OUT(-EBUSY); - } -+#endif - - if (mddev->pers) { - /* -@@ -2742,12 +2744,17 @@ static int md_ioctl(struct inode *inode, - goto done_unlock; - - case STOP_ARRAY: -- if (!(err = do_md_stop (mddev, 0))) -+ if (inode->i_bdev->bd_openers > 1) -+ err = -EBUSY; -+ else if (!(err = do_md_stop (mddev, 0))) - mddev = NULL; - goto done_unlock; - - case STOP_ARRAY_RO: -- err = do_md_stop (mddev, 1); -+ if (inode->i_bdev->bd_openers > 1) -+ err = -EBUSY; -+ else -+ err = do_md_stop (mddev, 1); - goto done_unlock; - - /* diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-munmap.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-munmap.patch deleted file mode 100644 index e5fb62eb95e1..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-munmap.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- linux-2.4.20-wolk4.9s/mm/mremap.c 2004-02-18 15:46:31.000000000 +0000 -+++ linux-2.4.20-wolk4.9s/mm/mremap.c.plasmaroo 2004-02-18 15:51:29.000000000 +0000 -@@ -316,7 +316,9 @@ - if ((addr <= new_addr) && (addr+old_len) > new_addr) - goto out; - -- do_munmap(current->mm, new_addr, new_len); -+ ret = do_munmap(current->mm, new_addr, new_len); -+ if (ret && new_len) -+ goto out; - } - - /* -@@ -324,9 +326,11 @@ - * the unnecessary pages.. - * do_munmap does all the needed commit accounting - */ -- ret = addr; - if (old_len >= new_len) { -- do_munmap(current->mm, addr+new_len, old_len - new_len); -+ ret = do_munmap(current->mm, addr+new_len, old_len - new_len); -+ if (ret && old_len != new_len) -+ goto out; -+ ret = addr; - if (!(flags & MREMAP_FIXED) || (new_addr == addr)) - goto out; - old_len = new_len; diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-rtc_fix.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-rtc_fix.patch deleted file mode 100644 index 10e9c228d6d2..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-rtc_fix.patch +++ /dev/null @@ -1,156 +0,0 @@ -diff -ur linux-2.4.20-wolk4.9s/arch/cris/drivers/ds1302.c linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/ds1302.c ---- linux-2.4.20-wolk4.9s/arch/cris/drivers/ds1302.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/ds1302.c 2004-01-05 23:41:44.000000000 +0000 -@@ -315,6 +315,7 @@ - { - struct rtc_time rtc_tm; - -+ memset(&rtc_tm, 0, sizeof (struct rtc_time)); - get_rtc_time(&rtc_tm); - if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) - return -EFAULT; -diff -ur linux-2.4.20-wolk4.9s/arch/cris/drivers/pcf8563.c linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/pcf8563.c ---- linux-2.4.20-wolk4.9s/arch/cris/drivers/pcf8563.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/pcf8563.c 2004-01-05 23:42:22.000000000 +0000 -@@ -174,6 +174,7 @@ - { - struct rtc_time tm; - -+ memset(&tm, 0, sizeof (struct rtc_time)); - get_rtc_time(&tm); - - if (copy_to_user((struct rtc_time *) arg, &tm, sizeof(struct rtc_time))) { -diff -ur linux-2.4.20-wolk4.9s/arch/m68k/bvme6000/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/bvme6000/rtc.c ---- linux-2.4.20-wolk4.9s/arch/m68k/bvme6000/rtc.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/bvme6000/rtc.c 2004-01-05 23:43:15.000000000 +0000 -@@ -54,6 +54,7 @@ - /* Ensure clock and real-time-mode-register are accessible */ - msr = rtc->msr & 0xc0; - rtc->msr = 0x40; -+ memset(&wtime, 0, sizeof (struct rtc_time)); - do { - wtime.tm_sec = BCD2BIN(rtc->bcd_sec); - wtime.tm_min = BCD2BIN(rtc->bcd_min); -diff -ur linux-2.4.20-wolk4.9s/arch/m68k/mvme16x/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/mvme16x/rtc.c ---- linux-2.4.20-wolk4.9s/arch/m68k/mvme16x/rtc.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/mvme16x/rtc.c 2004-01-05 23:44:02.000000000 +0000 -@@ -52,6 +52,7 @@ - cli(); - /* Ensure clock and real-time-mode-register are accessible */ - rtc->ctrl = RTC_READ; -+ memset(&wtime, 0, sizeof (struct rtc_time)); - wtime.tm_sec = BCD2BIN(rtc->bcd_sec); - wtime.tm_min = BCD2BIN(rtc->bcd_min); - wtime.tm_hour = BCD2BIN(rtc->bcd_hr); -diff -ur linux-2.4.20-wolk4.9s/arch/mips/sgi-ip27/ip27-rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/mips/sgi-ip27/ip27-rtc.c ---- linux-2.4.20-wolk4.9s/arch/mips/sgi-ip27/ip27-rtc.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/arch/mips/sgi-ip27/ip27-rtc.c 2004-01-05 23:48:34.000000000 +0000 -@@ -84,6 +84,7 @@ - switch (cmd) { - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - get_rtc_time(&wtime); - break; - } -diff -ur linux-2.4.20-wolk4.9s/arch/ppc64/kernel/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/ppc64/kernel/rtc.c ---- linux-2.4.20-wolk4.9s/arch/ppc64/kernel/rtc.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/arch/ppc64/kernel/rtc.c 2004-01-05 23:44:34.000000000 +0000 -@@ -96,6 +96,7 @@ - switch (cmd) { - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - ppc_md.get_rtc_time(&wtime); - break; - } -diff -ur linux-2.4.20-wolk4.9s/drivers/char/efirtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/efirtc.c ---- linux-2.4.20-wolk4.9s/drivers/char/efirtc.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/efirtc.c 2004-01-05 23:47:53.000000000 +0000 -@@ -118,6 +118,7 @@ - static void - convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime) - { -+ memset(wtime, 0, sizeof(struct rtc_time)); - wtime->tm_sec = eft->second; - wtime->tm_min = eft->minute; - wtime->tm_hour = eft->hour; -diff -ur linux-2.4.20-wolk4.9s/drivers/char/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/rtc.c ---- linux-2.4.20-wolk4.9s/drivers/char/rtc.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/rtc.c 2004-01-05 23:52:43.000000000 +0000 -@@ -370,6 +370,7 @@ - * tm_min, and tm_sec values are filled in. - */ - -+ memset(&wtime, 0, sizeof(struct rtc_time)); - get_rtc_alm_time(&wtime); - break; - } -@@ -417,6 +418,7 @@ - } - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - get_rtc_time(&wtime); - break; - } -diff -ur linux-2.4.20-wolk4.9s/drivers/hil/hp_sdc_rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/hil/hp_sdc_rtc.c ---- linux-2.4.20-wolk4.9s/drivers/hil/hp_sdc_rtc.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/hil/hp_sdc_rtc.c 2004-01-05 23:53:36.000000000 +0000 -@@ -561,6 +561,7 @@ - } - case RTC_ALM_READ: /* Read the present alarm time */ - { -+ memset(&ttime, 0, sizeof(struct timeval)); - if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT; - break; - } -@@ -609,6 +610,7 @@ - } - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT; - break; - } -diff -ur linux-2.4.20-wolk4.9s/drivers/macintosh/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/macintosh/rtc.c ---- linux-2.4.20-wolk4.9s/drivers/macintosh/rtc.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/macintosh/rtc.c 2004-01-05 23:54:15.000000000 +0000 -@@ -64,6 +64,7 @@ - case RTC_RD_TIME: - if (ppc_md.get_rtc_time) - { -+ memset(&rtc_tm, 0, sizeof(struct rtc_time)); - get_rtc_time(&rtc_tm); - - if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) -diff -ur linux-2.4.20-wolk4.9s/drivers/sbus/char/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/sbus/char/rtc.c ---- linux-2.4.20-wolk4.9s/drivers/sbus/char/rtc.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/sbus/char/rtc.c 2004-01-05 23:54:43.000000000 +0000 -@@ -89,6 +89,7 @@ - switch (cmd) - { - case RTCGET: -+ memset(&rtc_tm, 0, sizeof(struct rtc_time)); - get_rtc_time(&rtc_tm); - - if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) -diff -ur linux-2.4.20-wolk4.9s/drivers/sgi/char/ds1286.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/sgi/char/ds1286.c ---- linux-2.4.20-wolk4.9s/drivers/sgi/char/ds1286.c 2004-01-05 23:33:45.000000000 +0000 -+++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/sgi/char/ds1286.c 2004-01-05 23:47:25.000000000 +0000 -@@ -174,6 +174,7 @@ - * tm_min, and tm_sec values are filled in. - */ - -+ memset(&wtime, 0, sizeof(struct rtc_time)); - ds1286_get_alm_time(&wtime); - break; - } -@@ -216,6 +217,7 @@ - } - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - ds1286_get_time(&wtime); - break; - } diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-sched-interrupt.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-sched-interrupt.patch deleted file mode 100644 index 30a45e1840d2..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-sched-interrupt.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- linux-2.4.20-gentoo-r6/kernel/sched.c 2003-09-10 23:36:03.000000000 +0100 -+++ linux-2.4.20-gentoo-r7/kernel/sched.c 2003-09-24 20:00:09.000000000 +0100 -@@ -1138,8 +1138,11 @@ - list_t *queue; - int idx; - if (unlikely(in_interrupt())) -- BUG(); -- -+ { -+ printk(KERN_ERR "Scheduling in an interrupt: killing scheduler\n"); -+ dump_stack(); -+ return; -+ } - - need_resched: - preempt_disable(); diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-smbfs.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-smbfs.patch deleted file mode 100644 index 1d93802f03be..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-smbfs.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -ur linux-2.4.20/fs/smbfs/proc.c linux-2.4.20.plasmaroo/fs/smbfs/proc.c ---- linux-2.4.20/fs/smbfs/proc.c 2004-08-14 18:15:42.000000000 +0100 -+++ linux-2.4.20.plasmaroo/fs/smbfs/proc.c 2004-11-19 20:48:37.429884768 +0000 -@@ -1197,10 +1197,12 @@ - data_len = WVAL(buf, 1); - - /* we can NOT simply trust the data_len given by the server ... */ -- if (data_len > server->packet_size - (buf+3 - server->packet)) { -- printk(KERN_ERR "smb_proc_read: invalid data length!! " -- "%d > %d - (%p - %p)\n", -- data_len, server->packet_size, buf+3, server->packet); -+ if (data_len > count || -+ (buf+3 - server->packet) + data_len > server->packet_size) { -+ printk(KERN_ERR "smb_proc_read: invalid data length/offset!! " -+ "%d > %d || (%p - %p) + %d > %d\n", -+ data_len, count, -+ buf+3, server->packet, data_len, server->packet_size); - result = -EIO; - goto out; - } -diff -ur linux-2.4.20/fs/smbfs/sock.c linux-2.4.20.plasmaroo/fs/smbfs/sock.c ---- linux-2.4.20/fs/smbfs/sock.c 2004-08-14 18:15:42.000000000 +0100 -+++ linux-2.4.20.plasmaroo/fs/smbfs/sock.c 2004-11-19 20:48:37.431884464 +0000 -@@ -571,7 +571,11 @@ - parm_disp, parm_offset, parm_count, - data_disp, data_offset, data_count); - *parm = base + parm_offset; -+ if (*parm - inbuf + parm_tot > server->packet_size) -+ goto out_bad_parm; - *data = base + data_offset; -+ if (*data - inbuf + data_tot > server->packet_size) -+ goto out_bad_data; - goto success; - } - -@@ -591,6 +595,8 @@ - rcv_buf = smb_vmalloc(buf_len); - if (!rcv_buf) - goto out_no_mem; -+ memset(rcv_buf, 0, buf_len); -+ - *parm = rcv_buf; - *data = rcv_buf + total_p; - } else if (data_tot > total_d || parm_tot > total_p) -@@ -598,8 +604,12 @@ - - if (parm_disp + parm_count > total_p) - goto out_bad_parm; -+ if (parm_offset + parm_count > server->packet_size) -+ goto out_bad_parm; - if (data_disp + data_count > total_d) - goto out_bad_data; -+ if (data_offset + data_count > server->packet_size) -+ goto out_bad_data; - memcpy(*parm + parm_disp, base + parm_offset, parm_count); - memcpy(*data + data_disp, base + data_offset, data_count); - -@@ -610,8 +620,11 @@ - * Check whether we've received all of the data. Note that - * we use the packet totals -- total lengths might shrink! - */ -- if (data_len >= data_tot && parm_len >= parm_tot) -+ if (data_len >= data_tot && parm_len >= parm_tot) { -+ data_len = data_tot; -+ parm_len = parm_tot; - break; -+ } - } - - /* -@@ -625,6 +638,9 @@ - server->packet = rcv_buf; - rcv_buf = inbuf; - } else { -+ if (parm_len + data_len > buf_len) -+ goto out_data_grew; -+ - PARANOIA("copying data, old size=%d, new size=%u\n", - server->packet_size, buf_len); - memcpy(inbuf, rcv_buf, parm_len + data_len); diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20.78362.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20.78362.patch deleted file mode 100644 index 3925a0b31ba0..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20.78362.patch +++ /dev/null @@ -1,241 +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/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/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 -@@ -134,11 +134,10 @@ - return -EFAULT; - - /* Catch bogons. */ -+ if (!CMSG32_OK(ucmlen, ucmsg, kmsg)) -- if(CMSG32_ALIGN(ucmlen) < -- CMSG32_ALIGN(sizeof(struct cmsghdr32))) - return -EINVAL; -+ -+ if (kmsg->msg_controllen > 65536) -- if((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control) -- + ucmlen) > kmsg->msg_controllen) - return -EINVAL; - - tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) + -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/gentoo-sources/files/gentoo-sources-2.4.22-CAN-2004-0075.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-CAN-2004-0075.patch deleted file mode 100644 index 5c397deb9c46..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-CAN-2004-0075.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- linux-2.4.23/drivers/usb/vicam.c 2004-01-26 16:56:32.000000000 +0000 -+++ linux-2.4.25/drivers/usb/vicam.c 2004-04-20 18:15:53.000000000 +0100 -@@ -601,12 +601,19 @@ - case VIDIOCSWIN: - { - -- struct video_window *vw = (struct video_window *) arg; -- DBG("VIDIOCSWIN %d x %d\n", vw->width, vw->height); -+ struct video_window vw; - -- if ( vw->width != 320 || vw->height != 240 ) -+ if (copy_from_user(&vw, arg, sizeof(vw))) -+ { - retval = -EFAULT; -+ break; -+ } -+ -+ DBG("VIDIOCSWIN %d x %d\n", vw->width, vw->height); - -+ if ( vw.width != 320 || vw.height != 240 ) -+ retval = -EFAULT; -+ - break; - } - diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-CAN-2004-1016.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-CAN-2004-1016.patch deleted file mode 100644 index ad0b0dde0d47..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-CAN-2004-1016.patch +++ /dev/null @@ -1,58 +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; - } diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-kmsgdump.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-kmsgdump.patch deleted file mode 100644 index 095f93e9f0bb..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-kmsgdump.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- linux-2.4.22-gentoo-r1/include/asm-i386/kmsgdump.h.orig 2003-12-05 14:47:30.000000000 -0800 -+++ linux-2.4.22-gentoo-r1.plasmaroo/include/asm-i386/kmsgdump.h 2003-12-05 14:49:44.000000000 -0800 -@@ -8,8 +8,23 @@ - */ - - /* LOG_BUF_LEN : should match </usr/src/linux/kernel/printk.c>'s */ -+#include <linux/config.h> - #ifndef LOG_BUF_LEN --#define LOG_BUF_LEN (16384) -+ -+#if !defined(CONFIG_LOG_BUF_SHIFT) || (CONFIG_LOG_BUF_SHIFT - 0 == 0) -+#if defined(CONFIG_MULTIQUAD) || defined(CONFIG_IA64) -+#define LOG_BUF_LEN (65536) -+#elif defined(CONFIG_ARCH_S390) -+#define LOG_BUF_LEN (131072) -+#elif defined(CONFIG_SMP) -+#define LOG_BUF_LEN (32768) -+#else -+#define LOG_BUF_LEN (16384) /* This must be a power of two */ -+#endif -+#else /* CONFIG_LOG_BUF_SHIFT */ -+#define LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT) -+#endif -+ - #endif - - #define CODEORIGIN 0x0700 diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-rtc_fix.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-rtc_fix.patch deleted file mode 100644 index 76a663c6e89d..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-rtc_fix.patch +++ /dev/null @@ -1,180 +0,0 @@ -diff -urN linux-2.4.23/arch/cris/drivers/ds1302.c linux-2.4.24/arch/cris/drivers/ds1302.c ---- linux-2.4.23/arch/cris/drivers/ds1302.c 2003-08-25 04:44:39.000000000 -0700 -+++ linux-2.4.24/arch/cris/drivers/ds1302.c 2004-01-05 05:53:56.000000000 -0800 -@@ -346,6 +346,7 @@ - { - struct rtc_time rtc_tm; - -+ memset(&rtc_tm, 0, sizeof (struct rtc_time)); - get_rtc_time(&rtc_tm); - if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) - return -EFAULT; -diff -urN linux-2.4.23/arch/cris/drivers/pcf8563.c linux-2.4.24/arch/cris/drivers/pcf8563.c ---- linux-2.4.23/arch/cris/drivers/pcf8563.c 2003-08-25 04:44:39.000000000 -0700 -+++ linux-2.4.24/arch/cris/drivers/pcf8563.c 2004-01-05 05:53:56.000000000 -0800 -@@ -220,6 +220,7 @@ - { - struct rtc_time tm; - -+ memset(&tm, 0, sizeof (struct rtc_time)); - get_rtc_time(&tm); - - if (copy_to_user((struct rtc_time *) arg, &tm, sizeof tm)) { -diff -urN linux-2.4.23/arch/m68k/bvme6000/rtc.c linux-2.4.24/arch/m68k/bvme6000/rtc.c ---- linux-2.4.23/arch/m68k/bvme6000/rtc.c 2003-06-13 07:51:31.000000000 -0700 -+++ linux-2.4.24/arch/m68k/bvme6000/rtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -54,6 +54,7 @@ - /* Ensure clock and real-time-mode-register are accessible */ - msr = rtc->msr & 0xc0; - rtc->msr = 0x40; -+ memset(&wtime, 0, sizeof(struct rtc_time)); - do { - wtime.tm_sec = BCD2BIN(rtc->bcd_sec); - wtime.tm_min = BCD2BIN(rtc->bcd_min); -diff -urN linux-2.4.23/arch/m68k/mvme16x/rtc.c linux-2.4.24/arch/m68k/mvme16x/rtc.c ---- linux-2.4.23/arch/m68k/mvme16x/rtc.c 2003-06-13 07:51:31.000000000 -0700 -+++ linux-2.4.24/arch/m68k/mvme16x/rtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -52,6 +52,7 @@ - cli(); - /* Ensure clock and real-time-mode-register are accessible */ - rtc->ctrl = RTC_READ; -+ memset(&wtime, 0, sizeof(struct rtc_time)); - wtime.tm_sec = BCD2BIN(rtc->bcd_sec); - wtime.tm_min = BCD2BIN(rtc->bcd_min); - wtime.tm_hour = BCD2BIN(rtc->bcd_hr); -diff -urN linux-2.4.23/arch/ppc64/kernel/rtc.c linux-2.4.24/arch/ppc64/kernel/rtc.c ---- linux-2.4.23/arch/ppc64/kernel/rtc.c 2003-06-13 07:51:32.000000000 -0700 -+++ linux-2.4.24/arch/ppc64/kernel/rtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -96,6 +96,7 @@ - switch (cmd) { - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - ppc_md.get_rtc_time(&wtime); - break; - } -diff -urN linux-2.4.23/drivers/acorn/char/i2c.c linux-2.4.24/drivers/acorn/char/i2c.c ---- linux-2.4.23/drivers/acorn/char/i2c.c 2003-08-25 04:44:40.000000000 -0700 -+++ linux-2.4.24/drivers/acorn/char/i2c.c 2004-01-05 05:53:56.000000000 -0800 -@@ -166,6 +166,7 @@ - break; - - case RTC_RD_TIME: -+ memset(&rtctm, 0, sizeof(struct rtc_time)); - get_rtc_time(&rtc_raw, &year); - rtctm.tm_sec = rtc_raw.secs; - rtctm.tm_min = rtc_raw.mins; -diff -urN linux-2.4.23/drivers/char/ds1286.c linux-2.4.24/drivers/char/ds1286.c ---- linux-2.4.23/drivers/char/ds1286.c 2003-08-25 04:44:41.000000000 -0700 -+++ linux-2.4.24/drivers/char/ds1286.c 2004-01-05 05:53:56.000000000 -0800 -@@ -173,7 +173,7 @@ - * means "don't care" or "match all". Only the tm_hour, - * tm_min, and tm_sec values are filled in. - */ -- -+ memset(&wtime, 0, sizeof(struct rtc_time)); - ds1286_get_alm_time(&wtime); - break; - } -@@ -216,6 +216,7 @@ - } - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - ds1286_get_time(&wtime); - break; - } -diff -urN linux-2.4.23/drivers/char/efirtc.c linux-2.4.24/drivers/char/efirtc.c ---- linux-2.4.23/drivers/char/efirtc.c 2003-06-13 07:51:32.000000000 -0700 -+++ linux-2.4.24/drivers/char/efirtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -118,6 +118,7 @@ - static void - convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime) - { -+ memset(wtime, 0, sizeof(struct rtc_time)); - wtime->tm_sec = eft->second; - wtime->tm_min = eft->minute; - wtime->tm_hour = eft->hour; -diff -urN linux-2.4.23/drivers/char/ip27-rtc.c linux-2.4.24/drivers/char/ip27-rtc.c ---- linux-2.4.23/drivers/char/ip27-rtc.c 2003-08-25 04:44:41.000000000 -0700 -+++ linux-2.4.24/drivers/char/ip27-rtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -83,6 +83,7 @@ - switch (cmd) { - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - get_rtc_time(&wtime); - break; - } -diff -urN linux-2.4.23/drivers/char/mips_rtc.c linux-2.4.24/drivers/char/mips_rtc.c ---- linux-2.4.23/drivers/char/mips_rtc.c 2003-08-25 04:44:41.000000000 -0700 -+++ linux-2.4.24/drivers/char/mips_rtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -82,6 +82,7 @@ - - switch (cmd) { - case RTC_RD_TIME: /* Read the time/date from RTC */ -+ memset(&rtc_tm, 0, sizeof(struct rtc_time)); - curr_time = rtc_get_time(); - to_tm(curr_time, &rtc_tm); - rtc_tm.tm_year -= 1900; -diff -urN linux-2.4.23/drivers/char/rtc.c linux-2.4.24/drivers/char/rtc.c ---- linux-2.4.23/drivers/char/rtc.c 2003-11-28 10:26:20.000000000 -0800 -+++ linux-2.4.24/drivers/char/rtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -362,7 +362,7 @@ - * means "don't care" or "match all". Only the tm_hour, - * tm_min, and tm_sec values are filled in. - */ -- -+ memset(&wtime, 0, sizeof(struct rtc_time)); - get_rtc_alm_time(&wtime); - break; - } -@@ -406,6 +406,7 @@ - } - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - get_rtc_time(&wtime); - break; - } -diff -urN linux-2.4.23/drivers/hil/hp_sdc_rtc.c linux-2.4.24/drivers/hil/hp_sdc_rtc.c ---- linux-2.4.23/drivers/hil/hp_sdc_rtc.c 2003-06-13 07:51:33.000000000 -0700 -+++ linux-2.4.24/drivers/hil/hp_sdc_rtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -561,6 +561,7 @@ - } - case RTC_ALM_READ: /* Read the present alarm time */ - { -+ memset(&ttime, 0, sizeof(struct timeval)); - if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT; - break; - } -@@ -609,6 +610,7 @@ - } - case RTC_RD_TIME: /* Read the time/date from RTC */ - { -+ memset(&wtime, 0, sizeof(struct rtc_time)); - if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT; - break; - } -diff -urN linux-2.4.23/drivers/macintosh/rtc.c linux-2.4.24/drivers/macintosh/rtc.c ---- linux-2.4.23/drivers/macintosh/rtc.c 2002-02-25 11:37:58.000000000 -0800 -+++ linux-2.4.24/drivers/macintosh/rtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -64,6 +64,7 @@ - case RTC_RD_TIME: - if (ppc_md.get_rtc_time) - { -+ memset(&rtc_tm, 0, sizeof(struct rtc_time)); - get_rtc_time(&rtc_tm); - - if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) -diff -urN linux-2.4.23/drivers/sbus/char/rtc.c linux-2.4.24/drivers/sbus/char/rtc.c ---- linux-2.4.23/drivers/sbus/char/rtc.c 2001-10-10 23:42:47.000000000 -0700 -+++ linux-2.4.24/drivers/sbus/char/rtc.c 2004-01-05 05:53:56.000000000 -0800 -@@ -89,6 +89,7 @@ - switch (cmd) - { - case RTCGET: -+ memset(&rtc_tm, 0, sizeof(struct rtc_time)); - get_rtc_time(&rtc_tm); - - if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-vma.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-vma.patch deleted file mode 100644 index 2469dd5ab2c5..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-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/gentoo-sources/files/gentoo-sources-2.4.26-OpenSWAN-CompileFix.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.26-OpenSWAN-CompileFix.patch deleted file mode 100644 index 065a1a378f92..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.26-OpenSWAN-CompileFix.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -ur linux-2.4.26-gentoo-r5/include/freeswan/ipsec_rcv.h linux-2.4.26-gentoo-r6/include/freeswan/ipsec_rcv.h ---- linux-2.4.26-gentoo-r5/include/freeswan/ipsec_rcv.h 2004-07-13 17:41:55.589176744 +0100 -+++ linux-2.4.26-gentoo-r6/include/freeswan/ipsec_rcv.h 2004-07-13 17:40:32.749770248 +0100 -@@ -134,8 +134,10 @@ - - #ifdef CONFIG_IPSEC_DEBUG - extern int debug_rcv; -+#define ipsec_rcv_dmp(_x,_y, _z) if (debug_rcv && sysctl_ipsec_debug_verbose) ipsec_dmp(_x,_y,_z) -+#else -+#define ipsec_rcv_dmp(_x,_y, _z) {} - #endif /* CONFIG_IPSEC_DEBUG */ --#define ipsec_rcv_dmp(_x,_y, _z) if (debug_rcv && sysctl_ipsec_debug_verbose) ipsec_dmp(_x,_y,_z) - - extern int sysctl_ipsec_inbound_policy_check; - #endif /* __KERNEL__ */ -diff -ur linux-2.4.26-gentoo-r5/include/freeswan/ipsec_xmit.h linux-2.4.26-gentoo-r6/include/freeswan/ipsec_xmit.h ---- linux-2.4.26-gentoo-r5/include/freeswan/ipsec_xmit.h 2004-07-09 15:56:33.000000000 +0100 -+++ linux-2.4.26-gentoo-r6/include/freeswan/ipsec_xmit.h 2004-07-13 17:16:15.614288512 +0100 -@@ -127,11 +127,11 @@ - #ifdef CONFIG_IPSEC_DEBUG - extern int debug_tunnel; - extern int sysctl_ipsec_debug_verbose; --#endif /* CONFIG_IPSEC_DEBUG */ -- - #define debug_xmit debug_tunnel -- - #define ipsec_xmit_dmp(_x,_y, _z) if (debug_xmit && sysctl_ipsec_debug_verbose) ipsec_dmp(_x,_y,_z) -+#else -+#define ipsec_xmit_dmp(_x,_y, _z) {} -+#endif /* CONFIG_IPSEC_DEBUG */ - - extern int sysctl_ipsec_icmp; - extern int sysctl_ipsec_tos; diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2003-0643.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2003-0643.patch deleted file mode 100644 index 346641ee93be..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2003-0643.patch +++ /dev/null @@ -1,26 +0,0 @@ -# This is a BitKeeper generated diff -Nru style patch. -# -# ChangeSet -# 2003/07/25 09:53:06-07:00 kaber@trash.net -# [NET]: Fix signnedness test in socket filter code. -# -# net/core/filter.c -# 2003/07/25 09:52:50-07:00 kaber@trash.net +2 -3 -# [NET]: Fix signnedness test in socket filter code. -# -diff -Nru a/net/core/filter.c b/net/core/filter.c ---- a/net/core/filter.c 2004-06-27 19:54:06 -07:00 -+++ b/net/core/filter.c 2004-06-27 19:54:06 -07:00 -@@ -294,10 +294,9 @@ - goto load_b; - - case BPF_LDX|BPF_B|BPF_MSH: -- k = fentry->k; -- if(k >= 0 && (unsigned int)k >= len) -+ if(fentry->k >= len) - return (0); -- X = (data[k] & 0xf) << 2; -+ X = (data[fentry->k] & 0xf) << 2; - continue; - - case BPF_LD|BPF_IMM: diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2003-0985.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2003-0985.patch deleted file mode 100644 index dacf6ed810f9..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2003-0985.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- linux/mm/mremap.c.orig 2004-01-05 17:01:21.382104120 +0000 -+++ linux/mm/mremap.c 2004-01-05 17:15:25.689749848 +0000 -@@ -315,6 +315,10 @@ - old_len = PAGE_ALIGN(old_len); - new_len = PAGE_ALIGN(new_len); - -+ /* Don't allow the degenerate cases */ -+ if (!old_len || !new_len) -+ goto out; -+ - /* new_addr is only valid if MREMAP_FIXED is specified */ - if (flags & MREMAP_FIXED) { - if (new_addr & ~PAGE_MASK) diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2004-0001.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2004-0001.patch deleted file mode 100644 index bb51f9aa9a62..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2004-0001.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -u linux/arch/x86_64/ia32/ptrace32.c-PTRACE linux/arch/x86_64/ia32/ptrace32.c ---- linux/arch/x86_64/ia32/ptrace32.c-PTRACE 2003-06-16 13:03:58.000000000 +0200 -+++ linux/arch/x86_64/ia32/ptrace32.c 2004-01-07 18:04:43.000000000 +0100 -@@ -25,6 +25,10 @@ - #include <asm/fpu32.h> - #include <linux/mm.h> - -+/* determines which flags the user has access to. */ -+/* 1 = access 0 = no access */ -+#define FLAG_MASK 0x44dd5UL -+ - #define R32(l,q) \ - case offsetof(struct user32, regs.l): stack[offsetof(struct pt_regs, q)/8] = val; break - -@@ -69,9 +73,12 @@ - R32(eip, rip); - R32(esp, rsp); - -- case offsetof(struct user32, regs.eflags): -- stack[offsetof(struct pt_regs, eflags)/8] = val & 0x44dd5; -+ case offsetof(struct user32, regs.eflags): { -+ __u64 *flags = &stack[offsetof(struct pt_regs, eflags)/8]; -+ val &= FLAG_MASK; -+ *flags = val | (*flags & ~FLAG_MASK); - break; -+ } - - case offsetof(struct user32, u_debugreg[4]): - case offsetof(struct user32, u_debugreg[5]): diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2004-0010.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2004-0010.patch deleted file mode 100644 index 6b4b1cefa49e..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2004-0010.patch +++ /dev/null @@ -1,200 +0,0 @@ -diff -urN linux-2.4.25-pre6/fs/ncpfs/dir.c linux-2.4.25-pre7/fs/ncpfs/dir.c ---- linux-2.4.25-pre6/fs/ncpfs/dir.c 2002-11-28 15:53:15.000000000 -0800 -+++ linux-2.4.25-pre7/fs/ncpfs/dir.c 2004-01-23 10:53:26.000000000 -0800 -@@ -266,8 +266,8 @@ - struct ncp_server *server; - struct inode *dir = dentry->d_parent->d_inode; - struct ncp_entry_info finfo; -- int res, val = 0, len = dentry->d_name.len + 1; -- __u8 __name[len]; -+ int res, val = 0, len; -+ __u8 __name[NCP_MAXPATHLEN + 1]; - - if (!dentry->d_inode || !dir) - goto finished; -@@ -291,14 +291,15 @@ - dentry->d_parent->d_name.name, dentry->d_name.name, - NCP_GET_AGE(dentry)); - -+ len = sizeof(__name); - if (ncp_is_server_root(dir)) { - res = ncp_io2vol(server, __name, &len, dentry->d_name.name, -- len-1, 1); -+ dentry->d_name.len, 1); - if (!res) - res = ncp_lookup_volume(server, __name, &(finfo.i)); - } else { - res = ncp_io2vol(server, __name, &len, dentry->d_name.name, -- len-1, !ncp_preserve_case(dir)); -+ dentry->d_name.len, !ncp_preserve_case(dir)); - if (!res) - res = ncp_obtain_info(server, dir, __name, &(finfo.i)); - } -@@ -548,9 +549,9 @@ - int valid = 0; - int hashed = 0; - ino_t ino = 0; -- __u8 __name[256]; -+ __u8 __name[NCP_MAXPATHLEN + 1]; - -- qname.len = 256; -+ qname.len = sizeof(__name); - if (ncp_vol2io(NCP_SERVER(inode), __name, &qname.len, - entry->i.entryName, entry->i.nameLen, - !ncp_preserve_entry_case(inode, entry->i.NSCreator))) -@@ -705,16 +706,19 @@ - { - struct ncp_server* server = NCP_SBP(sb); - struct nw_info_struct i; -- int result, len = strlen(server->m.mounted_vol) + 1; -- __u8 __name[len]; -+ int result; - - if (ncp_single_volume(server)) { -+ int len; - struct dentry* dent; -+ __u8 __name[NCP_MAXPATHLEN + 1]; - -- result = -ENOENT; -- if (ncp_io2vol(server, __name, &len, server->m.mounted_vol, -- len-1, 1)) -+ len = sizeof(__name); -+ result = ncp_io2vol(server, __name, &len, server->m.mounted_vol, -+ strlen(server->m.mounted_vol), 1); -+ if (result) - goto out; -+ result = -ENOENT; - if (ncp_lookup_volume(server, __name, &i)) { - PPRINTK("ncp_conn_logged_in: %s not found\n", - server->m.mounted_vol); -@@ -745,8 +749,8 @@ - struct ncp_server *server = NCP_SERVER(dir); - struct inode *inode = NULL; - struct ncp_entry_info finfo; -- int error, res, len = dentry->d_name.len + 1; -- __u8 __name[len]; -+ int error, res, len; -+ __u8 __name[NCP_MAXPATHLEN + 1]; - - error = -EIO; - if (!ncp_conn_valid(server)) -@@ -755,14 +759,15 @@ - PPRINTK("ncp_lookup: server lookup for %s/%s\n", - dentry->d_parent->d_name.name, dentry->d_name.name); - -+ len = sizeof(__name); - if (ncp_is_server_root(dir)) { - res = ncp_io2vol(server, __name, &len, dentry->d_name.name, -- len-1, 1); -+ dentry->d_name.len, 1); - if (!res) - res = ncp_lookup_volume(server, __name, &(finfo.i)); - } else { - res = ncp_io2vol(server, __name, &len, dentry->d_name.name, -- len-1, !ncp_preserve_case(dir)); -+ dentry->d_name.len, !ncp_preserve_case(dir)); - if (!res) - res = ncp_obtain_info(server, dir, __name, &(finfo.i)); - } -@@ -825,9 +830,9 @@ - { - struct ncp_server *server = NCP_SERVER(dir); - struct ncp_entry_info finfo; -- int error, result, len = dentry->d_name.len + 1; -+ int error, result, len; - int opmode; -- __u8 __name[len]; -+ __u8 __name[NCP_MAXPATHLEN + 1]; - - PPRINTK("ncp_create_new: creating %s/%s, mode=%x\n", - dentry->d_parent->d_name.name, dentry->d_name.name, mode); -@@ -836,8 +841,9 @@ - goto out; - - ncp_age_dentry(server, dentry); -+ len = sizeof(__name); - error = ncp_io2vol(server, __name, &len, dentry->d_name.name, -- len-1, !ncp_preserve_case(dir)); -+ dentry->d_name.len, !ncp_preserve_case(dir)); - if (error) - goto out; - -@@ -880,8 +886,8 @@ - { - struct ncp_entry_info finfo; - struct ncp_server *server = NCP_SERVER(dir); -- int error, len = dentry->d_name.len + 1; -- __u8 __name[len]; -+ int error, len; -+ __u8 __name[NCP_MAXPATHLEN + 1]; - - DPRINTK("ncp_mkdir: making %s/%s\n", - dentry->d_parent->d_name.name, dentry->d_name.name); -@@ -890,8 +896,9 @@ - goto out; - - ncp_age_dentry(server, dentry); -+ len = sizeof(__name); - error = ncp_io2vol(server, __name, &len, dentry->d_name.name, -- len-1, !ncp_preserve_case(dir)); -+ dentry->d_name.len, !ncp_preserve_case(dir)); - if (error) - goto out; - -@@ -909,8 +916,8 @@ - static int ncp_rmdir(struct inode *dir, struct dentry *dentry) - { - struct ncp_server *server = NCP_SERVER(dir); -- int error, result, len = dentry->d_name.len + 1; -- __u8 __name[len]; -+ int error, result, len; -+ __u8 __name[NCP_MAXPATHLEN + 1]; - - DPRINTK("ncp_rmdir: removing %s/%s\n", - dentry->d_parent->d_name.name, dentry->d_name.name); -@@ -923,8 +930,9 @@ - if (!d_unhashed(dentry)) - goto out; - -+ len = sizeof(__name); - error = ncp_io2vol(server, __name, &len, dentry->d_name.name, -- len-1, !ncp_preserve_case(dir)); -+ dentry->d_name.len, !ncp_preserve_case(dir)); - if (error) - goto out; - -@@ -1022,9 +1030,8 @@ - { - struct ncp_server *server = NCP_SERVER(old_dir); - int error; -- int old_len = old_dentry->d_name.len + 1; -- int new_len = new_dentry->d_name.len + 1; -- __u8 __old_name[old_len], __new_name[new_len]; -+ int old_len, new_len; -+ __u8 __old_name[NCP_MAXPATHLEN + 1], __new_name[NCP_MAXPATHLEN + 1]; - - DPRINTK("ncp_rename: %s/%s to %s/%s\n", - old_dentry->d_parent->d_name.name, old_dentry->d_name.name, -@@ -1037,15 +1044,17 @@ - ncp_age_dentry(server, old_dentry); - ncp_age_dentry(server, new_dentry); - -+ old_len = sizeof(__old_name); - error = ncp_io2vol(server, __old_name, &old_len, -- old_dentry->d_name.name, old_len-1, -- !ncp_preserve_case(old_dir)); -+ old_dentry->d_name.name, old_dentry->d_name.len, -+ !ncp_preserve_case(old_dir)); - if (error) - goto out; - -+ new_len = sizeof(__new_name); - error = ncp_io2vol(server, __new_name, &new_len, -- new_dentry->d_name.name, new_len-1, -- !ncp_preserve_case(new_dir)); -+ new_dentry->d_name.name, new_dentry->d_name.len, -+ !ncp_preserve_case(new_dir)); - if (error) - goto out; - - diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.I2C_Limits.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.I2C_Limits.patch deleted file mode 100644 index af20a6fc0c2c..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.I2C_Limits.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- linux-2.4.20/drivers/i2c/i2c-dev.c 2004-06-19 03:27:30 -07:00 -+++ linux-2.4.21/drivers/i2c/i2c-dev.c 2004-06-19 03:27:30 -07:00 -@@ -254,6 +254,11 @@ - sizeof(rdwr_arg))) - return -EFAULT; - -+ /* Put an arbritrary limit on the number of messages that can -+ * be sent at once */ -+ if (rdwr_arg.nmsgs > 42) -+ return -EINVAL; -+ - rdwr_pa = (struct i2c_msg *) - kmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg), - GFP_KERNEL); -@@ -270,6 +275,11 @@ - res = -EFAULT; - break; - } -+ /* Limit the size of the message to a sane amount */ -+ if (rdwr_pa[i].len > 8192) { -+ res = -EINVAL; -+ break; -+ } - rdwr_pa[i].buf = kmalloc(rdwr_pa[i].len, GFP_KERNEL); - if(rdwr_pa[i].buf == NULL) - { -@@ -280,10 +290,16 @@ - rdwr_arg.msgs[i].buf, - rdwr_pa[i].len)) - { -- kfree(rdwr_pa[i].buf); - res = -EFAULT; - break; - } -+ } -+ if (res < 0) { -+ int j; -+ for (j = 0; j < i; ++j) -+ kfree(rdwr_pa[j].buf); -+ kfree(rdwr_pa); -+ return res; - } - if (!res) - { diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.munmap.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.munmap.patch deleted file mode 100644 index e120b35b7adb..000000000000 --- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.munmap.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -ur linux-2.4.25-rc3/mm/mremap.c linux-2.4.25-rc4/mm/mremap.c ---- linux-2.4.25-rc3/mm/mremap.c 2004-02-18 13:56:01.000000000 +0000 -+++ linux-2.4.25-rc4/mm/mremap.c 2004-02-18 13:49:08.000000000 +0000 -@@ -258,16 +258,20 @@ - if ((addr <= new_addr) && (addr+old_len) > new_addr) - goto out; - -- do_munmap(current->mm, new_addr, new_len); -+ ret = do_munmap(current->mm, new_addr, new_len); -+ if (ret && new_len) -+ goto out; - } - - /* - * Always allow a shrinking remap: that just unmaps - * the unnecessary pages.. - */ -- ret = addr; - if (old_len >= new_len) { -- do_munmap(current->mm, addr+new_len, old_len - new_len); -+ ret = do_munmap(current->mm, addr+new_len, old_len - new_len); -+ if (ret && old_len != new_len) -+ goto out; -+ ret = addr; - if (!(flags & MREMAP_FIXED) || (new_addr == addr)) - goto out; - } diff --git a/sys-kernel/gentoo-sources/files/security.patch1 b/sys-kernel/gentoo-sources/files/security.patch1 deleted file mode 100644 index b5271dca2079..000000000000 --- a/sys-kernel/gentoo-sources/files/security.patch1 +++ /dev/null @@ -1,526 +0,0 @@ -diff -Nru a/include/linux/jhash.h b/include/linux/jhash.h ---- /dev/null Wed Dec 31 16:00:00 1969 -+++ b/include/linux/jhash.h Mon May 5 16:06:49 2003 -@@ -0,0 +1,161 @@ -+#ifndef _LINUX_JHASH_H -+#define _LINUX_JHASH_H -+ -+/* jhash.h: Jenkins hash support. -+ * -+ * Copyright (C) 1996 Bob Jenkins (bob_jenkins@burtleburtle.net) -+ * -+ * http://burtleburtle.net/bob/hash/ -+ * -+ * These are the credits from Bob's sources: -+ * -+ * lookup2.c, by Bob Jenkins, December 1996, Public Domain. -+ * hash(), hash2(), hash3, and mix() are externally useful functions. -+ * Routines to test the hash are included if SELF_TEST is defined. -+ * You can use this free for any purpose. It has no warranty. -+ * -+ * Copyright (C) 2003 David S. Miller (davem@redhat.com) -+ * -+ * I've modified Bob's hash to be useful in the Linux kernel, and -+ * any bugs present are surely my fault. -DaveM -+ */ -+ -+/* NOTE: Arguments are modified. */ -+#define __jhash_mix(a, b, c) \ -+{ \ -+ a -= b; a -= c; a ^= (c>>13); \ -+ b -= c; b -= a; b ^= (a<<8); \ -+ c -= a; c -= b; c ^= (b>>13); \ -+ a -= b; a -= c; a ^= (c>>12); \ -+ b -= c; b -= a; b ^= (a<<16); \ -+ c -= a; c -= b; c ^= (b>>5); \ -+ a -= b; a -= c; a ^= (c>>3); \ -+ b -= c; b -= a; b ^= (a<<10); \ -+ c -= a; c -= b; c ^= (b>>15); \ -+} -+ -+/* The golden ration: an arbitrary value */ -+#define JHASH_GOLDEN_RATIO 0x9e3779b9 -+ -+/* The most generic version, hashes an arbitrary sequence -+ * of bytes. No alignment or length assumptions are made about -+ * the input key. -+ */ -+static __inline__ u32 jenkins_hash(void *key, u32 length, u32 initval) -+{ -+ u32 a, b, c, len; -+ u8 *k = key; -+ -+ len = length; -+ a = b = JHASH_GOLDEN_RATIO; -+ c = initval; -+ -+ while (len >= 12) { -+ a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24)); -+ b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24)); -+ c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24)); -+ -+ __jhash_mix(a,b,c); -+ -+ k += 12; -+ len -= 12; -+ } -+ -+ c += length; -+ switch (len) { -+ case 11: c += ((u32)k[10]<<24); -+ case 10: c += ((u32)k[9]<<16); -+ case 9 : c += ((u32)k[8]<<8); -+ case 8 : b += ((u32)k[7]<<24); -+ case 7 : b += ((u32)k[6]<<16); -+ case 6 : b += ((u32)k[5]<<8); -+ case 5 : b += k[4]; -+ case 4 : a += ((u32)k[3]<<24); -+ case 3 : a += ((u32)k[2]<<16); -+ case 2 : a += ((u32)k[1]<<8); -+ case 1 : a += k[0]; -+ }; -+ -+ __jhash_mix(a,b,c); -+ -+ return c; -+} -+ -+/* A special optimized version that handles 1 or more of u32s. -+ * The length parameter here is the number of u32s in the key. -+ */ -+static __inline__ u32 hash2(u32 *k, u32 length, u32 initval) -+{ -+ u32 a, b, c, len; -+ -+ a = b = JHASH_GOLDEN_RATIO; -+ c = initval; -+ len = length; -+ -+ while (len >= 3) { -+ a += k[0]; -+ b += k[1]; -+ c += k[2]; -+ __jhash_mix(a, b, c); -+ k += 3; len -= 3; -+ } -+ -+ c += length * 4; -+ -+ switch (len) { -+ case 2 : b += k[1]; -+ case 1 : a += k[0]; -+ }; -+ -+ __jhash_mix(a,b,c); -+ -+ return c; -+} -+ -+ -+/* A special ultra-optimized versions that knows they are hashing exactly -+ * 3, 2 or 1 word(s). -+ * -+ * NOTE: In partilar the "c += length; __jhash_mix(a,b,c);" normally -+ * done at the end is not done here. -+ */ -+static __inline__ u32 jenkins_hash_3words(u32 a, u32 b, u32 c, -+ u32 initval) -+{ -+ a += JHASH_GOLDEN_RATIO; -+ b += JHASH_GOLDEN_RATIO; -+ c += initval; -+ -+ __jhash_mix(a, b, c); -+ -+ return c; -+} -+ -+static __inline__ u32 jenkins_hash_2words(u32 a, u32 b, u32 initval) -+{ -+ u32 c = 0; -+ -+ a += JHASH_GOLDEN_RATIO; -+ b += JHASH_GOLDEN_RATIO; -+ c += initval; -+ -+ __jhash_mix(a, b, c); -+ -+ return c; -+} -+ -+static __inline__ u32 jenkins_hash_1word(u32 a, u32 initval) -+{ -+ u32 b = 0; -+ u32 c = 0; -+ -+ a += JHASH_GOLDEN_RATIO; -+ b += JHASH_GOLDEN_RATIO; -+ c += initval; -+ -+ __jhash_mix(a, b, c); -+ -+ return c; -+} -+ -+#endif /* _LINUX_JHASH_H */ -diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h ---- a/include/linux/sysctl.h Mon May 5 16:06:49 2003 -+++ b/include/linux/sysctl.h Mon May 5 16:06:49 2003 -@@ -315,7 +315,8 @@ - NET_IPV4_ROUTE_GC_ELASTICITY=14, - NET_IPV4_ROUTE_MTU_EXPIRES=15, - NET_IPV4_ROUTE_MIN_PMTU=16, -- NET_IPV4_ROUTE_MIN_ADVMSS=17 -+ NET_IPV4_ROUTE_MIN_ADVMSS=17, -+ NET_IPV4_ROUTE_SECRET_INTERVAL=18, - }; - - enum -diff -Nru a/include/net/tcp.h b/include/net/tcp.h ---- a/include/net/tcp.h Mon May 5 16:06:49 2003 -+++ b/include/net/tcp.h Mon May 5 16:06:49 2003 -@@ -1604,6 +1604,7 @@ - int qlen; - int qlen_young; - int clock_hand; -+ u32 hash_rnd; - struct open_request *syn_table[TCP_SYNQ_HSIZE]; - }; - -diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c ---- a/net/ipv4/netfilter/ip_conntrack_core.c Mon May 5 16:06:49 2003 -+++ b/net/ipv4/netfilter/ip_conntrack_core.c Mon May 5 16:06:49 2003 -@@ -28,6 +28,8 @@ - #include <linux/stddef.h> - #include <linux/sysctl.h> - #include <linux/slab.h> -+#include <linux/random.h> -+#include <linux/jhash.h> - /* For ERR_PTR(). Yeah, I know... --RR */ - #include <linux/fs.h> - -@@ -104,20 +106,21 @@ - nf_conntrack_put(&ct->infos[0]); - } - --static inline u_int32_t -+static int ip_conntrack_hash_rnd_initted; -+static unsigned int ip_conntrack_hash_rnd; -+ -+static u_int32_t - hash_conntrack(const struct ip_conntrack_tuple *tuple) - { - #if 0 - dump_tuple(tuple); - #endif -- /* ntohl because more differences in low bits. */ -- /* To ensure that halves of the same connection don't hash -- clash, we add the source per-proto again. */ -- return (ntohl(tuple->src.ip + tuple->dst.ip -- + tuple->src.u.all + tuple->dst.u.all -- + tuple->dst.protonum) -- + ntohs(tuple->src.u.all)) -- % ip_conntrack_htable_size; -+ return (jenkins_hash_3words(tuple->src.ip, -+ (tuple->dst.ip ^ tuple->dst.protonum), -+ (tuple->src.u.all | -+ (tuple->dst.u.all << 16)), -+ ip_conntrack_hash_rnd) -+ % ip_conntrack_htable_size); - } - - inline int -@@ -633,11 +636,16 @@ - { - struct ip_conntrack *conntrack; - struct ip_conntrack_tuple repl_tuple; -- size_t hash, repl_hash; -+ size_t hash; - struct ip_conntrack_expect *expected; - int i; - static unsigned int drop_next = 0; - -+ if (!ip_conntrack_hash_rnd_initted) { -+ get_random_bytes(&ip_conntrack_hash_rnd, 4); -+ ip_conntrack_hash_rnd_initted = 1; -+ } -+ - hash = hash_conntrack(tuple); - - if (ip_conntrack_max && -@@ -661,7 +669,6 @@ - DEBUGP("Can't invert tuple.\n"); - return NULL; - } -- repl_hash = hash_conntrack(&repl_tuple); - - conntrack = kmem_cache_alloc(ip_conntrack_cachep, GFP_ATOMIC); - if (!conntrack) { -@@ -1428,7 +1435,7 @@ - ip_conntrack_max = 8 * ip_conntrack_htable_size; - - printk("ip_conntrack version %s (%u buckets, %d max)" -- " - %d bytes per conntrack\n", IP_CONNTRACK_VERSION, -+ " - %Zd bytes per conntrack\n", IP_CONNTRACK_VERSION, - ip_conntrack_htable_size, ip_conntrack_max, - sizeof(struct ip_conntrack)); - -diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c ---- a/net/ipv4/route.c Mon May 5 16:06:49 2003 -+++ b/net/ipv4/route.c Mon May 5 16:06:49 2003 -@@ -85,6 +85,7 @@ - #include <linux/mroute.h> - #include <linux/netfilter_ipv4.h> - #include <linux/random.h> -+#include <linux/jhash.h> - #include <net/protocol.h> - #include <net/ip.h> - #include <net/route.h> -@@ -117,13 +118,14 @@ - int ip_rt_mtu_expires = 10 * 60 * HZ; - int ip_rt_min_pmtu = 512 + 20 + 20; - int ip_rt_min_advmss = 256; -- -+int ip_rt_secret_interval = 10 * 60 * HZ; - static unsigned long rt_deadline; - - #define RTprint(a...) printk(KERN_DEBUG a) - - static struct timer_list rt_flush_timer; - static struct timer_list rt_periodic_timer; -+static struct timer_list rt_secret_timer; - - /* - * Interface to generic destination cache. -@@ -194,19 +196,17 @@ - static struct rt_hash_bucket *rt_hash_table; - static unsigned rt_hash_mask; - static int rt_hash_log; -+static unsigned int rt_hash_rnd; - - struct rt_cache_stat rt_cache_stat[NR_CPUS]; - - static int rt_intern_hash(unsigned hash, struct rtable *rth, - struct rtable **res); - --static __inline__ unsigned rt_hash_code(u32 daddr, u32 saddr, u8 tos) -+static unsigned int rt_hash_code(u32 daddr, u32 saddr, u8 tos) - { -- unsigned hash = ((daddr & 0xF0F0F0F0) >> 4) | -- ((daddr & 0x0F0F0F0F) << 4); -- hash ^= saddr ^ tos; -- hash ^= (hash >> 16); -- return (hash ^ (hash >> 8)) & rt_hash_mask; -+ return (jenkins_hash_3words(daddr, saddr, (u32) tos, rt_hash_rnd) -+ & rt_hash_mask); - } - - static int rt_cache_get_info(char *buffer, char **start, off_t offset, -@@ -479,6 +479,15 @@ - spin_unlock_bh(&rt_flush_lock); - } - -+static void rt_secret_rebuild(unsigned long dummy) -+{ -+ unsigned long now = jiffies; -+ -+ get_random_bytes(&rt_hash_rnd, 4); -+ rt_cache_flush(0); -+ mod_timer(&rt_secret_timer, now + ip_rt_secret_interval); -+} -+ - /* - Short description of GC goals. - -@@ -2414,6 +2423,15 @@ - mode: 0644, - proc_handler: &proc_dointvec, - }, -+ { -+ ctl_name: NET_IPV4_ROUTE_SECRET_INTERVAL, -+ procname: "secret_interval", -+ data: &ip_rt_secret_interval, -+ maxlen: sizeof(int), -+ mode: 0644, -+ proc_handler: &proc_dointvec_jiffies, -+ strategy: &sysctl_jiffies, -+ }, - { 0 } - }; - #endif -@@ -2444,15 +2462,25 @@ - *eof = 1; - } - -- /* Copy first cpu. */ -- *start = buffer; -- memcpy(buffer, IP_RT_ACCT_CPU(0), length); -- -- /* Add the other cpus in, one int at a time */ -- for (i = 1; i < smp_num_cpus; i++) { -- unsigned int j; -- for (j = 0; j < length/4; j++) -- ((u32*)buffer)[j] += ((u32*)IP_RT_ACCT_CPU(i))[j]; -+ offset /= sizeof(u32); -+ -+ if (length > 0) { -+ u32 *src = ((u32 *) IP_RT_ACCT_CPU(0)) + offset; -+ u32 *dst = (u32 *) buffer; -+ -+ /* Copy first cpu. */ -+ *start = buffer; -+ memcpy(dst, src, length); -+ -+ /* Add the other cpus in, one int at a time */ -+ for (i = 1; i < smp_num_cpus; i++) { -+ unsigned int j; -+ -+ src = ((u32 *) IP_RT_ACCT_CPU(i)) + offset; -+ -+ for (j = 0; j < length/4; j++) -+ dst[j] += src[j]; -+ } - } - return length; - } -@@ -2462,6 +2490,9 @@ - { - int i, order, goal; - -+ rt_hash_rnd = (int) ((num_physpages ^ (num_physpages>>8)) ^ -+ (jiffies ^ (jiffies >> 7))); -+ - #ifdef CONFIG_NET_CLS_ROUTE - for (order = 0; - (PAGE_SIZE << order) < 256 * sizeof(struct ip_rt_acct) * NR_CPUS; order++) -@@ -2518,6 +2549,7 @@ - - rt_flush_timer.function = rt_run_flush; - rt_periodic_timer.function = rt_check_expire; -+ rt_secret_timer.function = rt_secret_rebuild; - - /* All the timers, started at system startup tend - to synchronize. Perturb it a bit. -@@ -2525,6 +2557,10 @@ - rt_periodic_timer.expires = jiffies + net_random() % ip_rt_gc_interval + - ip_rt_gc_interval; - add_timer(&rt_periodic_timer); -+ -+ rt_secret_timer.expires = jiffies + net_random() % ip_rt_secret_interval + -+ ip_rt_secret_interval; -+ add_timer(&rt_secret_timer); - - proc_net_create ("rt_cache", 0, rt_cache_get_info); - proc_net_create ("rt_cache_stat", 0, rt_cache_stat_get_info); -diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c ---- a/net/ipv4/tcp.c Mon May 5 16:06:49 2003 -+++ b/net/ipv4/tcp.c Mon May 5 16:06:49 2003 -@@ -252,6 +252,7 @@ - #include <linux/init.h> - #include <linux/smp_lock.h> - #include <linux/fs.h> -+#include <linux/random.h> - - #include <net/icmp.h> - #include <net/tcp.h> -@@ -542,6 +543,7 @@ - for (lopt->max_qlen_log = 6; ; lopt->max_qlen_log++) - if ((1<<lopt->max_qlen_log) >= sysctl_max_syn_backlog) - break; -+ get_random_bytes(&lopt->hash_rnd, 4); - - write_lock_bh(&tp->syn_wait_lock); - tp->listen_opt = lopt; -diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c ---- a/net/ipv4/tcp_ipv4.c Mon May 5 16:06:49 2003 -+++ b/net/ipv4/tcp_ipv4.c Mon May 5 16:06:49 2003 -@@ -56,6 +56,7 @@ - #include <linux/fcntl.h> - #include <linux/random.h> - #include <linux/cache.h> -+#include <linux/jhash.h> - #include <linux/init.h> - - #include <net/icmp.h> -@@ -868,12 +869,10 @@ - return ((struct rtable*)skb->dst)->rt_iif; - } - --static __inline__ unsigned tcp_v4_synq_hash(u32 raddr, u16 rport) -+static __inline__ u32 tcp_v4_synq_hash(u32 raddr, u16 rport, u32 rnd) - { -- unsigned h = raddr ^ rport; -- h ^= h>>16; -- h ^= h>>8; -- return h&(TCP_SYNQ_HSIZE-1); -+ return (jenkins_hash_2words(raddr, (u32) rport, rnd) -+ & (TCP_SYNQ_HSIZE - 1)); - } - - static struct open_request *tcp_v4_search_req(struct tcp_opt *tp, -@@ -884,7 +883,7 @@ - struct tcp_listen_opt *lopt = tp->listen_opt; - struct open_request *req, **prev; - -- for (prev = &lopt->syn_table[tcp_v4_synq_hash(raddr, rport)]; -+ for (prev = &lopt->syn_table[tcp_v4_synq_hash(raddr, rport, lopt->hash_rnd)]; - (req = *prev) != NULL; - prev = &req->dl_next) { - if (req->rmt_port == rport && -@@ -904,7 +903,7 @@ - { - struct tcp_opt *tp = &sk->tp_pinfo.af_tcp; - struct tcp_listen_opt *lopt = tp->listen_opt; -- unsigned h = tcp_v4_synq_hash(req->af.v4_req.rmt_addr, req->rmt_port); -+ u32 h = tcp_v4_synq_hash(req->af.v4_req.rmt_addr, req->rmt_port, lopt->hash_rnd); - - req->expires = jiffies + TCP_TIMEOUT_INIT; - req->retrans = 0; -diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c ---- a/net/ipv6/tcp_ipv6.c Mon May 5 16:06:49 2003 -+++ b/net/ipv6/tcp_ipv6.c Mon May 5 16:06:49 2003 -@@ -36,6 +36,7 @@ - #include <linux/in6.h> - #include <linux/netdevice.h> - #include <linux/init.h> -+#include <linux/jhash.h> - #include <linux/ipsec.h> - - #include <linux/ipv6.h> -@@ -368,12 +369,12 @@ - * Open request hash tables. - */ - --static __inline__ unsigned tcp_v6_synq_hash(struct in6_addr *raddr, u16 rport) -+static u32 tcp_v6_synq_hash(struct in6_addr *raddr, u16 rport, u32 rnd) - { -- unsigned h = raddr->s6_addr32[3] ^ rport; -- h ^= h>>16; -- h ^= h>>8; -- return h&(TCP_SYNQ_HSIZE-1); -+ return (jenkins_hash_3words(raddr->s6_addr32[0] ^ raddr->s6_addr32[1], -+ raddr->s6_addr32[2] ^ raddr->s6_addr32[3], -+ (u32) rport, rnd) -+ & (TCP_SYNQ_HSIZE - 1)); - } - - static struct open_request *tcp_v6_search_req(struct tcp_opt *tp, -@@ -386,7 +387,7 @@ - struct tcp_listen_opt *lopt = tp->listen_opt; - struct open_request *req, **prev; - -- for (prev = &lopt->syn_table[tcp_v6_synq_hash(raddr, rport)]; -+ for (prev = &lopt->syn_table[tcp_v6_synq_hash(raddr, rport, lopt->hash_rnd)]; - (req = *prev) != NULL; - prev = &req->dl_next) { - if (req->rmt_port == rport && -@@ -1135,7 +1136,7 @@ - { - struct tcp_opt *tp = &sk->tp_pinfo.af_tcp; - struct tcp_listen_opt *lopt = tp->listen_opt; -- unsigned h = tcp_v6_synq_hash(&req->af.v6_req.rmt_addr, req->rmt_port); -+ u32 h = tcp_v6_synq_hash(&req->af.v6_req.rmt_addr, req->rmt_port, lopt->hash_rnd); - - req->sk = NULL; - req->expires = jiffies + TCP_TIMEOUT_INIT; -- diff --git a/sys-kernel/gentoo-sources/files/security.patch2 b/sys-kernel/gentoo-sources/files/security.patch2 deleted file mode 100644 index e75cc78468c0..000000000000 --- a/sys-kernel/gentoo-sources/files/security.patch2 +++ /dev/null @@ -1,146 +0,0 @@ -diff -uNp u2/fs/binfmt_elf.c.cd10.orig u2/fs/binfmt_elf.c ---- u2/fs/binfmt_elf.c.cd10.orig 2002-08-03 02:39:45.000000000 +0200 -+++ u2/fs/binfmt_elf.c 2003-07-09 23:44:30.000000000 +0200 -@@ -456,2 +456,3 @@ - char passed_fileno[6]; -+ struct files_struct *files, *ftmp; - -@@ -475,10 +476,17 @@ static int load_elf_binary(struct linux_ - retval = kernel_read(bprm->file, elf_ex.e_phoff, (char *) elf_phdata, size); - if (retval < 0) - goto out_free_ph; -+ -+ files = current->files; /* Refcounted so ok */ -+ if(unshare_files() < 0) -+ goto out_free_ph; - -+ /* exec will make our files private anyway, but for the a.out -+ loader stuff we need to do it earlier */ -+ - retval = get_unused_fd(); - if (retval < 0) -- goto out_free_ph; -+ goto out_free_fh; - get_file(bprm->file); - fd_install(elf_exec_fileno = retval, bprm->file); - -@@ -593,6 +601,9 @@ static int load_elf_binary(struct linux_ - if (retval) - goto out_free_dentry; - -+ /* Discard our unneeded old files struct */ -+ put_files_struct(files); -+ - /* OK, This is the point of no return */ - current->mm->start_data = 0; - current->mm->end_data = 0; -@@ -797,6 +808,10 @@ out_free_interp: - kfree(elf_interpreter); - out_free_file: - sys_close(elf_exec_fileno); -+out_free_fh: -+ ftmp = current->files; -+ current->files = files; -+ put_files_struct(ftmp); - out_free_ph: - kfree(elf_phdata); - goto out; ---- linux-2.4.21/fs/exec.c.orig Thu Jun 19 14:28:39 2003 -+++ linux-2.4.21/fs/exec.c Wed Jul 2 01:21:32 2003 -@@ -561,6 +561,7 @@ - char * name; - int i, ch, retval; - struct signal_struct * oldsig; -+ struct files_struct * files; - - /* - * Make sure we have a private signal table -@@ -569,6 +570,18 @@ - retval = make_private_signals(); - if (retval) goto flush_failed; - -+ /* -+ * Make sure we have private file handles. Ask the -+ * fork helper to do the work for us and the exit -+ * helper to do the cleanup of the old one. -+ */ -+ -+ files = current->files; /* refcounted so safe to hold */ -+ retval = unshare_files(); -+ if(retval) -+ goto flush_failed; -+ put_files_struct(files); -+ - /* - * Release all of the old mmap stuff - */ ---- linux-2.4.21/kernel/fork.c.orig Wed Jul 2 01:21:15 2003 -+++ linux-2.4.21/kernel/fork.c Wed Jul 2 01:21:32 2003 -@@ -448,6 +448,11 @@ - goto out; - } - -+ /* -+ * Note: we may be using current for both targets (See exec.c) -+ * This works because we cache current->files (old) as oldf. Don't -+ * break this. -+ */ - tsk->files = NULL; - error = -ENOMEM; - newf = kmem_cache_alloc(files_cachep, SLAB_KERNEL); -@@ -536,6 +541,33 @@ - kmem_cache_free(files_cachep, newf); - goto out; - } -+ -+/* -+ * Helper to unshare the files of the current task. -+ * We don't want to expose copy_files internals to -+ * the exec layer of the kernel. -+ */ -+ -+int unshare_files(void) -+{ -+ struct files_struct *files = current->files; -+ int rc; -+ -+ if(!files) -+ BUG(); -+ -+ /* This can race but the race causes us to copy when we don't -+ need to and drop the copy */ -+ if(atomic_read(&files->count) == 1) -+ { -+ atomic_inc(&files->count); -+ return 0; -+ } -+ rc = copy_files(0, current); -+ if(rc) -+ current->files = files; -+ return rc; -+} - - static inline int copy_sighand(unsigned long clone_flags, struct task_struct * tsk) - { ---- linux-2.4.21/kernel/ksyms.c.orig Fri Jun 13 18:51:39 2003 -+++ linux-2.4.21/kernel/ksyms.c Wed Jul 2 01:21:32 2003 -@@ -84,6 +84,7 @@ - EXPORT_SYMBOL(try_inc_mod_count); - - /* process memory management */ -+EXPORT_SYMBOL(unshare_files); - EXPORT_SYMBOL(do_mmap_pgoff); - EXPORT_SYMBOL(do_munmap); - EXPORT_SYMBOL(do_brk); ---- linux-2.4.21/include/linux/sched.h.orig Thu Jun 19 14:31:01 2003 -+++ linux-2.4.21/include/linux/sched.h Wed Jul 2 01:24:32 2003 -@@ -864,6 +864,8 @@ - extern int expand_fdset(struct files_struct *, int nr); - extern void free_fdset(fd_set *, int); - -+extern int unshare_files(void); -+ - extern int copy_thread(int, unsigned long, unsigned long, unsigned long, task_t *, struct pt_regs *); - extern void flush_thread(void); - extern void exit_thread(void); - diff --git a/sys-kernel/gentoo-sources/files/security.patch3 b/sys-kernel/gentoo-sources/files/security.patch3 deleted file mode 100644 index 18d1b1b709fe..000000000000 --- a/sys-kernel/gentoo-sources/files/security.patch3 +++ /dev/null @@ -1,134 +0,0 @@ -diff -Nru a/fs/proc/base.c b/fs/proc/base.c ---- a/fs/proc/base.c Tue Apr 22 10:21:00 2003 -+++ b/fs/proc/base.c Mon Jul 14 13:10:30 2003 -@@ -124,20 +124,56 @@ - return result; - } - -+#define MAY_PTRACE(task) \ -+ (task == current || \ -+ (task->p_pptr == current && \ -+ (task->ptrace & PT_PTRACED) && task->state == TASK_STOPPED)) -+ -+static int may_ptrace_attach(struct task_struct *task) -+{ -+ int retval = 0; -+ -+ task_lock(task); -+ -+ if (((current->uid != task->euid) || -+ (current->uid != task->suid) || -+ (current->uid != task->uid) || -+ (current->gid != task->egid) || -+ (current->gid != task->sgid) || -+ (!cap_issubset(task->cap_permitted, current->cap_permitted)) || -+ (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE)) -+ goto out; -+ rmb(); -+ if (!is_dumpable(task) && !capable(CAP_SYS_PTRACE)) -+ goto out; -+ -+ retval = 1; -+ -+out: -+ task_unlock(task); -+ return retval; -+} -+ - static int proc_pid_environ(struct task_struct *task, char * buffer) - { - struct mm_struct *mm; - int res = 0; -+ -+ if (!may_ptrace_attach(task)) -+ return -ESRCH; -+ - task_lock(task); - mm = task->mm; - if (mm) - atomic_inc(&mm->mm_users); - task_unlock(task); - if (mm) { -- int len = mm->env_end - mm->env_start; -+ unsigned int len = mm->env_end - mm->env_start; - if (len > PAGE_SIZE) - len = PAGE_SIZE; - res = access_process_vm(task, mm->env_start, buffer, len, 0); -+ if (!may_ptrace_attach(task)) -+ res = -ESRCH; - mmput(mm); - } - return res; -@@ -328,10 +364,6 @@ - read: proc_info_read, - }; - --#define MAY_PTRACE(p) \ --(p==current||(p->p_pptr==current&&(p->ptrace & PT_PTRACED)&&p->state==TASK_STOPPED)) -- -- - static int mem_open(struct inode* inode, struct file* file) - { - file->private_data = (void*)((long)current->self_exec_id); -@@ -347,8 +379,7 @@ - int copied = 0; - struct mm_struct *mm; - -- -- if (!MAY_PTRACE(task)) -+ if (!MAY_PTRACE(task) || !may_ptrace_attach(task)) - return -ESRCH; - - page = (char *)__get_free_page(GFP_USER); -@@ -370,14 +401,13 @@ - copied = -EIO; - goto out_free; - } -- - - while (count > 0) { - int this_len, retval; - - this_len = (count > PAGE_SIZE) ? PAGE_SIZE : count; - retval = access_process_vm(task, src, page, this_len, 0); -- if (!retval) { -+ if (!retval || !MAY_PTRACE(task) || !may_ptrace_attach(task)) { - if (!copied) - copied = -EIO; - break; -@@ -411,7 +441,7 @@ - struct task_struct *task = file->f_dentry->d_inode->u.proc_i.task; - unsigned long dst = *ppos; - -- if (!MAY_PTRACE(task)) -+ if (!MAY_PTRACE(task) || !may_ptrace_attach(task)) - return -ESRCH; - - page = (char *)__get_free_page(GFP_USER); -diff -Nru a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c ---- a/fs/proc/proc_misc.c Fri Mar 28 18:11:31 2003 -+++ b/fs/proc/proc_misc.c Mon Jul 14 13:10:30 2003 -@@ -423,9 +423,9 @@ - int count, int *eof, void *data) - { - extern char saved_command_line[]; -- int len; -+ int len = 0; - -- len = snprintf(page, count, "%s\n", saved_command_line); -+ proc_sprintf(page, &off, &len, "%s\n", saved_command_line); - return proc_calc_metrics(page, start, off, count, eof, len); - } - -@@ -495,7 +495,8 @@ - buf++; p++; count--; read++; - } - pnt = (char *)prof_buffer + p - sizeof(unsigned int); -- copy_to_user(buf,(void *)pnt,count); -+ if (copy_to_user(buf,(void *)pnt,count)) -+ return -EFAULT; - read += count; - *ppos += read; - return read; - - diff --git a/sys-kernel/gentoo-sources/files/security.patch4 b/sys-kernel/gentoo-sources/files/security.patch4 deleted file mode 100644 index b58a2b9c0b3d..000000000000 --- a/sys-kernel/gentoo-sources/files/security.patch4 +++ /dev/null @@ -1,26 +0,0 @@ ---- linux-2.4.20-gw3/arch/i386/kernel/ioport.c 2003-05-16 23:42:47.000000000 +0100 -+++ linux-2.4.20-gw4/arch/i386/kernel/ioport.c 2003-05-16 23:42:49.000000000 +0100 -@@ -72,17 +72,18 @@ - */ - memset(t->io_bitmap,0xff,(IO_BITMAP_SIZE+1)*4); - t->ioperm = 1; -- /* -- * this activates it in the TSS -- */ -- tss->bitmap = IO_BITMAP_OFFSET; - } - - /* - * do it in the per-thread copy and in the TSS ... - */ - set_bitmap(t->io_bitmap, from, num, !turn_on); -- set_bitmap(tss->io_bitmap, from, num, !turn_on); -+ if (tss->bitmap == IO_BITMAP_OFFSET) { /* already active? */ -+ set_bitmap(tss->io_bitmap, from, num, !turn_on); -+ } else { -+ memcpy(tss->io_bitmap, t->io_bitmap, IO_BITMAP_SIZE); -+ tss->bitmap = IO_BITMAP_OFFSET; /* Activate it in the TSS */ -+ } - - return 0; - } diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r33.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r33.ebuild deleted file mode 100644 index b6597e758a9a..000000000000 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r33.ebuild +++ /dev/null @@ -1,190 +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/gentoo-sources/gentoo-sources-2.4.20-r33.ebuild,v 1.1 2005/03/07 00:28:55 plasmaroo Exp $ - -IUSE="aavm crypt evms2 usagi" - -# OKV=original kernel version, KV=patched kernel version. They can be the same. - -# Kernel ebuilds using the kernel.eclass can remove any patch that you -# do not want to apply by simply setting the KERNEL_EXCLUDE shell -# variable to the string you want to exclude (for instance -# KERNEL_EXCLUDE="evms" would not patch any patches whose names match -# *evms*). Kernels are only tested in the default configuration, but -# this may be useful if you know that a particular patch is causing a -# conflict with a patch you personally want to apply, or some other -# similar situation. - -ETYPE="sources" - -inherit kernel eutils gcc -OKV="`echo ${PV}|sed -e 's:^\([0-9]\+\.[0-9]\+\.[0-9]\+\).*:\1:'`" -EXTRAVERSION="-${PN/-*/}" -[ ! "${PR}" == "r0" ] && EXTRAVERSION="${EXTRAVERSION}-${PR}" -KV="${OKV}${EXTRAVERSION}" - -S=${WORKDIR}/linux-${KV} - -# Documentation on the patches contained in this kernel will be installed -# to /usr/share/doc/gentoo-sources-${PV}/patches.txt.gz - -DESCRIPTION="Full sources for the Gentoo Kernel." -SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2 - http://dev.gentoo.org/~plasmaroo/patches/kernel/gentoo-sources/patches-${KV/33/28}.tar.bz2 - http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/${P}-CAN-2004-0415.patch - http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/${P}-CAN-2004-0814.2.patch" -HOMEPAGE="http://www.gentoo.org/ http://www.kernel.org/" -LICENSE="GPL-2" -KEYWORDS="x86 -ppc -sparc -alpha -hppa -mips" -SLOT="${KV}" - -src_unpack() { - unpack ${A} - mv linux-${OKV} linux-${KV} || die "Error moving kernel source tree to linux-${KV}" - - cd ${WORKDIR}/${KV/r33/r28} - - # This is the *ratified* aavm USE flag, enables aavm support in this kernel - if ! use aavm; then - einfo "Setting up kernel for rmap support(default)." - for file in *.aavm ;do - einfo "Dropping ${file}..." - rm -f ${file} - done - else - einfo "Setting up kernel for aavm support." - for file in *.rmap ;do - einfo "Dropping ${file}..." - rm -f ${file} - done - fi - - # If the compiler isn't gcc>3.1 drop the gcc>=3.1 patches - if [[ "`gcc-major-version`" == "3" ]]; then - einfo "Enabling gcc > 3.1 processor optimizations..." - einfo "To use them, choose the processor families labelled with (gcc>31)" - einfo "in \"Processor type and features -> Processor Family\"" - else - einfo "Your compiler is not gcc3, dropping patches..." - for file in *gcc3*;do - einfo "Dropping ${file}..." - rm -f ${file} - done - fi - - # This is the *ratified* evms2 USE flag, enables evms2 support - if ! use evms2; then - einfo "Setting up kernel for EVMS 1.2.1 support (default)..." - for file in 2* ;do - einfo "Dropping ${file}..." - rm -f ${file} - done - else - einfo "Setting up kernel for EVMS 2.0.1 support..." - ewarn "This is very beta. Please read the 'evms2' doc provided with this kernel." - ewarn "It is the install doc from the evms 2.0.1 tarball." - for file in 1* ;do - einfo "Dropping ${file}..." - rm -f ${file} - done - fi - - # This is the crypt USE flag, keeps {USAGI/superfreeswan/patch-int/loop-jari} - if ! use crypt; then - einfo "No Cryptographic support, dropping patches..." - for file in 6* 8* ;do - einfo "Dropping ${file}..." - rm -f ${file} - done - rm 991_fix_cryptoOrder - else - einfo "Cryptographic patches will be applied." - fi - - # This is the usagi USE flag, keeps USAGI, drops {superfreeswan/patch-int/loop-jari} - # Using USAGI will also cause you to drop all iptables ipv6 patches - if ! use usagi; then - einfo "Keeping {superfreeswan/patch-int/loop-jari} patches, dropping USAGI" - for file in 6* ;do - einfo "Dropping ${file}..." - rm -f ${file} - done - else - einfo "Keeping USAGI patch, dropping {superfreeswan/patch-int/loop-jari}" - for file in *.ipv6 8* ;do - einfo "Dropping ${file}..." - rm -f ${file} - done - fi - - kernel_exclude - ./addpatches . ${WORKDIR}/linux-${KV} || die "Could not add patches!" - kernel_universal_unpack || die "Could not unpack!" - - epatch ${FILESDIR}/security.patch1 - epatch ${FILESDIR}/security.patch2 - epatch ${FILESDIR}/security.patch3 - epatch ${FILESDIR}/security.patch4 - - epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to apply do_brk() fix!" - epatch ${FILESDIR}/${P}-munmap.patch || die "Failed to apply munmap patch!" - epatch ${FILESDIR}/${P}-rtc_fix.patch || die "Failed to apply RTC fix!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2003-0643.patch || die "Failed to add the CAN-2003-0643 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2003-0985.patch || die "Failed to apply mremap() fix!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0001.patch || die "Failed to apply AMD64 ptrace patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0010.patch || die "Failed to add the CAN-2004-0010 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0109.patch || die "Failed to add the CAN-2004-0109 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0177.patch || die "Failed to add the CAN-2004-0177 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0178.patch || die "Failed to add the CAN-2004-0178 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0181.patch || die "Failed to add the CAN-2004-0181 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0394.patch || die "Failed to add the CAN-2004-0394 patch!" - epatch ${DISTDIR}/${P}-CAN-2004-0415.patch || die "Failed to add the CAN-2004-0415 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0427.patch || die "Failed to add the CAN-2004-0427 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0495.patch || die "Failed to add the CAN-2004-0495 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0497.patch || die "Failed to add the CAN-2004-0497 patch!" - epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0535.patch || die "Failed to add the CAN-2004-0535 patch!" - epatch ${FILESDIR}/${P}-CAN-2004-0685.patch || die "Failed to add the CAN-2004-0685 patch!" - epatch ${DISTDIR}/${P}-CAN-2004-0814.2.patch || die "Failed to add the CAN-2004-0814 patch!" - epatch ${FILESDIR}/${PN}-2.4.I2C_Limits.patch || die "Failed to patch the I2C i2cdev_ioctl() kmalloc() bug!" - epatch ${FILESDIR}/${PN}-2.4.FPULockup-53804.patch || die "Failed to apply FPU-lockup patch!" - epatch ${FILESDIR}/${PN}-2.4.cmdlineLeak.patch || die "Failed to apply the /proc/cmdline patch!" - epatch ${FILESDIR}/${PN}-2.4.XDRWrapFix.patch || die "Failed to apply the kNFSd XDR patch!" - epatch ${FILESDIR}/${PN}-2.4.binfmt_elf.patch || die "Failed to apply the binfmt_elf patch!" - epatch ${FILESDIR}/${P}-smbfs.patch || die "Failed to apply the SMBFS patch!" - epatch ${FILESDIR}/${PN}-2.4.AF_UNIX.patch || die "Failed to apply the AF_UNIX patch!" - epatch ${FILESDIR}/${PN}-2.4.binfmt_a.out.patch || die "Failed to apply the binfmt_a.out patch!" - epatch ${FILESDIR}/${PN}-2.4.vma.patch || die "Failed to apply the VMA patch!" - epatch ${FILESDIR}/${PN}-2.4.22-CAN-2004-1016.patch || die "Failed to apply the CAN-2004-1016 patch!" - epatch ${FILESDIR}/${P}-CAN-2004-1056.patch || die "Failed to apply the CAN-2004-1056 patch!" - epatch ${FILESDIR}/${PN}-2.4.77094.patch || die "Failed to apply bug #77094 patch!" - epatch ${FILESDIR}/${PN}-2.4.brk-locked.patch || die "Failed to apply do_brk_locked() patch!" - epatch ${FILESDIR}/${PN}-2.4.77666.patch || die "Failed to apply #77666 patch!" - epatch ${FILESDIR}/${P}.78362.patch || die "Failed to apply #78362 patch!" - epatch ${FILESDIR}/${PN}-2.4.78363.patch || die "Failed to apply #78363 patch!" - epatch ${FILESDIR}/${PN}-2.4.81106.patch || die "Failed to apply #81106 patch!" - epatch ${FILESDIR}/${P}-PaX-84167.patch || die "Failed to apply #84167 patch!" -} - -pkg_postinst() { - kernel_pkg_postinst - - ewarn "There is no xfs support in this kernel." - ewarn "If you need xfs support, emerge xfs-sources." - echo - ewarn "If iptables/netfilter behaves abnormally, such as 'Invalid Argument'," - ewarn "you will need to re-emerge iptables to restore proper functionality." - echo - einfo "This set contains the ptrace patch as part of grsecurity." - echo - einfo "If there are issues with it, read the docs and associated help provided." - einfo "Next you should check http://forums.gentoo.org/ for assistance." - echo - einfo "Otherwise check http://bugs.gentoo.org/ for an existing bug." - einfo "Only create a new bug if you have not found one that matches your issue." - einfo "It is best to do an advanced search to increase search yield." - echo - einfo "Please assign bugs to x86-kernel@gentoo.org" - echo - einfo "Please read the ChangeLog and associated docs for more information." - echo -} |