diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2004-06-19 11:11:38 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2004-06-19 11:11:38 +0000 |
commit | 05956eb31a27c0409d5bd35041bdc1b566f64403 (patch) | |
tree | 2e1fa246fe159cf81bdc2b58018c4ab11d047411 /sys-kernel | |
parent | ChangeLog fix; "sanity checks" >> "I2C sanity checks". (Manifest recommit) (diff) | |
download | gentoo-2-05956eb31a27c0409d5bd35041bdc1b566f64403.tar.gz gentoo-2-05956eb31a27c0409d5bd35041bdc1b566f64403.tar.bz2 gentoo-2-05956eb31a27c0409d5bd35041bdc1b566f64403.zip |
Added a patch to add in missing I2C sanity checks that were added upstream in 2.4.21.
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/gaming-sources/ChangeLog | 10 | ||||
-rw-r--r-- | sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r13 (renamed from sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r12) | 0 | ||||
-rw-r--r-- | sys-kernel/gaming-sources/files/gaming-sources-2.4.20.I2C_Limits.patch | 44 | ||||
-rw-r--r-- | sys-kernel/gaming-sources/gaming-sources-2.4.20-r13.ebuild (renamed from sys-kernel/gaming-sources/gaming-sources-2.4.20-r12.ebuild) | 9 |
4 files changed, 58 insertions, 5 deletions
diff --git a/sys-kernel/gaming-sources/ChangeLog b/sys-kernel/gaming-sources/ChangeLog index 772630028137..370e0df97235 100644 --- a/sys-kernel/gaming-sources/ChangeLog +++ b/sys-kernel/gaming-sources/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-kernel/gaming-sources # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gaming-sources/ChangeLog,v 1.25 2004/06/14 18:53:22 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gaming-sources/ChangeLog,v 1.26 2004/06/19 11:11:37 plasmaroo Exp $ + +*gaming-sources-2.4.20-r13 (19 Jun 2004) + + 19 Jun 2004; <plasmaroo@gentoo.org> -gaming-sources-2.4.20-r12.ebuild, + +gaming-sources-2.4.20-r13.ebuild, + +files/gaming-sources-2.4.20.I2C_Limits.patch: + Added a patch to add in missing I2C sanity checks that were added upstream in + 2.4.21. *gaming-sources-2.4.20-r12 (14 Jun 2004) diff --git a/sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r12 b/sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r13 index bb133846e255..bb133846e255 100644 --- a/sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r12 +++ b/sys-kernel/gaming-sources/files/digest-gaming-sources-2.4.20-r13 diff --git a/sys-kernel/gaming-sources/files/gaming-sources-2.4.20.I2C_Limits.patch b/sys-kernel/gaming-sources/files/gaming-sources-2.4.20.I2C_Limits.patch new file mode 100644 index 000000000000..af20a6fc0c2c --- /dev/null +++ b/sys-kernel/gaming-sources/files/gaming-sources-2.4.20.I2C_Limits.patch @@ -0,0 +1,44 @@ +--- 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/gaming-sources/gaming-sources-2.4.20-r12.ebuild b/sys-kernel/gaming-sources/gaming-sources-2.4.20-r13.ebuild index d31c7d92b171..f41493148ec7 100644 --- a/sys-kernel/gaming-sources/gaming-sources-2.4.20-r12.ebuild +++ b/sys-kernel/gaming-sources/gaming-sources-2.4.20-r13.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gaming-sources/gaming-sources-2.4.20-r12.ebuild,v 1.1 2004/06/14 18:11:07 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gaming-sources/gaming-sources-2.4.20-r13.ebuild,v 1.1 2004/06/19 11:11:37 plasmaroo Exp $ IUSE="build" @@ -17,18 +17,18 @@ CKV="2.4.20-ck7" DESCRIPTION="Full sources for the Gentoo gaming-optimized kernel" HOMEPAGE="http://members.optusnet.com.au/ckolivas/kernel/" -SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2 mirror://gentoo/patches-${KV/12/5}.tar.bz2 http://www.plumlocosoft.com/kernel/patches/2.4/${OKV}/linux-${CKV}.patch.bz2" +SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2 mirror://gentoo/patches-${KV/13/5}.tar.bz2 http://www.plumlocosoft.com/kernel/patches/2.4/${OKV}/linux-${CKV}.patch.bz2" KEYWORDS="x86 -ppc" SLOT="${KV}" src_unpack() { - unpack linux-${OKV}.tar.bz2 patches-${KV/12/5}.tar.bz2 + unpack linux-${OKV}.tar.bz2 patches-${KV/13/5}.tar.bz2 bzcat ${DISTDIR}/linux-${CKV}.patch.bz2 | patch -p0 || die "-ck patch failed" mv linux-${OKV} linux-${KV} || die - cd ${KV/12/5} || die + cd ${KV/13/5} || die rm 98_nforce2_agp.patch # In -ck7 kernel_src_unpack @@ -43,6 +43,7 @@ src_unpack() { epatch ${FILESDIR}/${P}.CAN-2004-0394.patch || die "Failed to add the CAN-2004-0075 patch!" epatch ${FILESDIR}/${P}.CAN-2004-0427.patch || die "Failed to add the CAN-2004-0075 patch!" epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to patch do_brk() vulnerability!" + epatch ${FILESDIR}/${P}.I2C_Limits.patch || die "Failed to patch the I2C i2cdev_ioctl() kmalloc() bug!" epatch ${FILESDIR}/${P}.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!" epatch ${FILESDIR}/${P}.munmap.patch || die "Failed to apply munmap patch!" epatch ${FILESDIR}/${P}.FPULockup-53804.patch || die "Failed to apply FPU-lockup patch!" |