summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Yamin <plasmaroo@gentoo.org>2005-04-14 22:43:31 +0000
committerTim Yamin <plasmaroo@gentoo.org>2005-04-14 22:43:31 +0000
commit8e54a08c7b1a2826048a648b77be02dc194844e5 (patch)
treedb88628a1e521559232805118c572dd001ad44dd /sys-kernel
parentRemove alpha-sources. (diff)
downloadgentoo-2-8e54a08c7b1a2826048a648b77be02dc194844e5.tar.gz
gentoo-2-8e54a08c7b1a2826048a648b77be02dc194844e5.tar.bz2
gentoo-2-8e54a08c7b1a2826048a648b77be02dc194844e5.zip
Remove alpha-sources. This has been unmaintained for a long time; as well as superceded by gentoo/vanilla sources as all the needed changes are in gentoo-sources or upstream now. Both agriffis and kloeri have acked this can go.
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/alpha-sources/ChangeLog196
-rw-r--r--sys-kernel/alpha-sources/Manifest29
-rw-r--r--sys-kernel/alpha-sources/alpha-sources-2.4.21-r17.ebuild103
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.AF_UNIX.patch24
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2003-0985.patch13
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0010.patch200
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0075.patch25
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0109.patch87
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0133.patch11
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0177.patch10
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0178.patch11
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0181.patch38
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0394.patch11
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0427.patch14
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0495.patch655
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0497.patch23
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0535.patch12
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0685.patch83
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-1016.patch58
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-1056.patch319
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.XDRWrapFix.patch48
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.binfmt_a.out.patch63
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.binfmt_elf.patch96
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.cmdlineLeak.patch11
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.munmap.patch27
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.rtc_fix.patch156
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.smbfs.patch80
-rw-r--r--sys-kernel/alpha-sources/files/alpha-sources.vma.patch352
-rw-r--r--sys-kernel/alpha-sources/files/digest-alpha-sources-2.4.21-r174
-rw-r--r--sys-kernel/alpha-sources/files/do_brk_fix.patch12
30 files changed, 0 insertions, 2771 deletions
diff --git a/sys-kernel/alpha-sources/ChangeLog b/sys-kernel/alpha-sources/ChangeLog
deleted file mode 100644
index 1b985e106f58..000000000000
--- a/sys-kernel/alpha-sources/ChangeLog
+++ /dev/null
@@ -1,196 +0,0 @@
-# ChangeLog for sys-kernel/alpha-sources
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/alpha-sources/ChangeLog,v 1.40 2005/01/03 00:14:09 ciaranm Exp $
-
- 03 Jan 2005; Ciaran McCreesh <ciaranm@gentoo.org> :
- Change encoding to UTF-8 for GLEP 31 compliance
-
-*alpha-sources-2.4.21-r17 (24 Dec 2004)
-
- 24 Dec 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r16.ebuild,
- +alpha-sources-2.4.21-r17.ebuild, +files/alpha-sources.CAN-2004-1016.patch,
- +files/alpha-sources.CAN-2004-1056.patch, +files/alpha-sources.vma.patch:
- Security bump; bugs #72452, #74392, #74464.
-
-*alpha-sources-2.4.21-r16 (27 Nov 2004)
-
- 27 Nov 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r15.ebuild,
- +alpha-sources-2.4.21-r16.ebuild, +files/alpha-sources.AF_UNIX.patch,
- +files/alpha-sources.binfmt_a.out.patch:
- Version bump for the AF_UNIX and a.out security vulnerabilities; bugs #72452
- and #72317.
-
-*alpha-sources-2.4.21-r15 (19 Nov 2004)
-
- 19 Nov 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r14.ebuild,
- +alpha-sources-2.4.21-r15.ebuild, files/alpha-sources.binfmt_elf.patch,
- +files/alpha-sources.smbfs.patch:
- Version bump; updates binfmt_elf patch (bug #70681) and adds the smbfs
- security patch (bug #65877).
-
-*alpha-sources-2.4.21-r14 (12 Nov 2004)
-
- 12 Nov 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r13.ebuild,
- +alpha-sources-2.4.21-r14.ebuild, +files/alpha-sources.binfmt_elf.patch:
- Version bump for the binfmt_elf security vulnerability, bug #70681.
-
-*alpha-sources-2.4.21-r13 (06 Nov 2004)
-
- 06 Nov 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r12.ebuild,
- +alpha-sources-2.4.21-r13.ebuild, +files/alpha-sources.XDRWrapFix.patch:
- Fix for the kNFSd security vulnerability, bug #62524 and the CAN-2004-0814
- vulnerability, bug #68421.
-
-*alpha-sources-2.4.21-r12 (09 Aug 2004)
-
- 09 Aug 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r11.ebuild,
- +alpha-sources-2.4.21-r12.ebuild, +files/alpha-sources.cmdlineLeak.patch:
- Version bump for the /proc/cmdline leak vulnerability; bug #59905.
-
-*alpha-sources-2.4.21-r11 (08 Aug 2004)
-
- 08 Aug 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r10.ebuild,
- +alpha-sources-2.4.21-r11.ebuild, +files/alpha-sources.CAN-2004-0685.patch:
- Version bump for CAN-2004-0685, bug #59769.
-
-*alpha-sources-2.4.21-r10 (04 Aug 2004)
-
- 04 Aug 2004; <plasmaroo@gentoo.org> +alpha-sources-2.4.21-r10.ebuild,
- -alpha-sources-2.4.21-r9.ebuild:
- Added a patch for the CAN-2004-0415 vulnerability, bug #59378.
-
-*alpha-sources-2.4.21-r9 (09 Jul 2004)
-
- 09 Jul 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r7.ebuild,
- -alpha-sources-2.4.21-r8.ebuild, +alpha-sources-2.4.21-r9.ebuild,
- +files/alpha-sources.CAN-2004-0497.patch:
- Patched for attribute vulnerabilities, bug #56479.
-
-*alpha-sources-2.4.21-r8 (24 Jun 2004)
-
- 24 Jun 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.21-r6.ebuild,
- +alpha-sources-2.4.21-r8.ebuild, +files/alpha-sources.CAN-2004-0495.patch,
- +files/alpha-sources.CAN-2004-0535.patch:
- Security bumps for the CAN-2004-0495 and CAN-2004-0535 vulnerabilities.
-
- 23 Jun 2004; Aron Griffis <agriffis@gentoo.org>
- alpha-sources-2.4.21-r6.ebuild, alpha-sources-2.4.21-r7.ebuild:
- QA - fix use invocation
-
- 05 Jun 2004; Bryan Østergaard <kloeri@gentoo.org> :
- Security bump, see bug 47881.
-
-*alpha-sources-2.4.21-r7 (28 May 2004)
-
- 28 May 2004; <plasmaroo@gentoo.org> -alpha-sources-2.4.19-r2.ebuild,
- -alpha-sources-2.4.20-r2.ebuild, -alpha-sources-2.4.21-r2.ebuild,
- -alpha-sources-2.4.21-r3.ebuild, -alpha-sources-2.4.21-r4.ebuild,
- -alpha-sources-2.4.21-r5.ebuild, +alpha-sources-2.4.21-r7.ebuild,
- +files/alpha-sources...patch:
- Added patches for the CAN-2004-0075, CAN-2004-0133, CAN-2004-0181,
- CAN-2004-0394, and CAN-2004-0427 vulnerabilities. Bug #47881. Old
- versions of sources removed.
-
- 27 Apr 2004; Aron Griffis <agriffis@gentoo.org>
- alpha-sources-2.4.19-r2.ebuild, alpha-sources-2.4.20-r2.ebuild,
- alpha-sources-2.4.21-r2.ebuild, alpha-sources-2.4.21-r3.ebuild:
- Add inherit eutils.
-
-*alpha-sources-2.4.21-r6 (17 Apr 2004)
-
- 17 Apr 2004; <plasmaroo@gentoo.org>
- +files/alpha-sources.CAN-2004-0010.patch,
- +files/alpha-sources.CAN-2004-0177.patch,
- +files/alpha-sources.CAN-2004-0178.patch, +alpha-sources-2.4.21-r6.ebuild:
- Added patches for the CAN-2004-0010, CAN-2004-0177 and CAN-2004-0178
- vulnerabilities.
-
-*alpha-sources-2.4.21-r5 (15 Apr 2004)
-
- 15 Apr 2004; <plasmaroo@gentoo.org> alpha-sources-2.4.21-r5.ebuild,
- files/alpha-sources.CAN-2004-0109.patch:
- Version bump for the CAN-2004-0109 issue; bug #47881.
-
- 12 Apr 2004; Daniel Ahlberg <aliz@gentoo.org>
- alpha-sources-2.4.21-r4.ebuild:
- Add eutils to inherit.
-
-*alpha-sources-2.4.21-r4 (18 Feb 2004)
-
- 18 Feb 2004; <plasmaroo@gentoo.org> alpha-sources-2.4.21-r4.ebuild,
- files/alpha-sources.munmap.patch:
- Added the patch for the mremap/munmap vulnerability. Bug #42024.
-
-*alpha-sources-2.4.21-r3 (06 Feb 2004)
-
- 06 Feb 2004; Aron Griffis <agriffis@gentoo.org>
- alpha-sources-2.4.21-r3.ebuild:
- Fix bug 38354 with an awk script in the ebuild. Thanks to Rick Altherr
- (kc8apf) for catching this
-
- 06 Jan 2004; <plasmaroo@gentoo.org> alpha-sources-2.4.19-r1.ebuild,
- alpha-sources-2.4.19-r2.ebuild, alpha-sources-2.4.20-r1.ebuild,
- alpha-sources-2.4.20-r2.ebuild, alpha-sources-2.4.21-r1.ebuild,
- alpha-sources-2.4.21-r2.ebuild, files/alpha-sources.CAN-2003-0985.patch,
- files/alpha-sources.rtc_fix.patch:
- Added patches to address the security vulnerabilities in bugs #37292 and
- #37317. Unpatched revisions were removed.
-
- 09 Dec 2003; <spider@gentoo.org> alpha-sources-2.4.19-r1.ebuild,
- alpha-sources-2.4.19-r2.ebuild, alpha-sources-2.4.20-r1.ebuild,
- alpha-sources-2.4.20-r2.ebuild: Changing "chown" to work with new
- POSIX standard.
-
-*alpha-sources-2.4.21-r2 (04 Dec 2003)
-
- 04 Dec 2003; Aron Griffis <agriffis@gentoo.org>
- alpha-sources-2.4.21-r2.ebuild:
- Bumped the revision to push out the 'do_brk' fix.
-
- 04 Dec 2003; Brian Jackson <iggy@gentoo.org> alpha-sources-2.4.21-r1.ebuild:
- Patching needs to be moved forward to kernel_..._unpack...
-
-*alpha-sources-2.4.20-r2 (01 Dec 2003)
-
- 01 Dec 2003; Brian Jackson <iggy@gentoo.org> alpha-sources-2.4.19-r1.ebuild,
- alpha-sources-2.4.19-r2.ebuild, alpha-sources-2.4.20-r1.ebuild,
- alpha-sources-2.4.20-r2.ebuild, alpha-sources-2.4.21-r1.ebuild,
- files/do_brk_fix.patch:
- Fix the 'do_brk' vulnerability.
-
- 19 Nov 2003; Brandon Low <lostlogic@gentoo.org>
- alpha-sources-2.4.21-r1.ebuild:
- Move version handling logic to after inherit kernel, or insert it where
- necessary.
-
- 21 Jul 2003; Will Woods <wwoods@gentoo.org> alpha-sources-2.4.21-r1.ebuild:
- Marked stable.
-
- 14 Jul 2003; Will Woods <wwoods@gentoo.org> alpha-sources-2.4.21-r1.ebuild:
- Marked ~alpha for user testing.
-
-*alpha-sources-2.4.21-r1 (10 Jul 2003)
- 10 Jul 2003; Will Woods <wwoods@gentoo.org> :
- All-new ebuild for kernel 2.4.21. Patches included:
- grsec, xfs, usagi, patch-int, loop-jari, super-freeswan,
- and taviso's uac_sysctl patch. Marked -alpha for testing.
-
- 12 Jun 2003; <msterret@gentoo.org> alpha-sources-2.4.19-r1.ebuild,
- alpha-sources-2.4.19-r2.ebuild:
- add Header
-
- 17 Dec 2002; Brandon Low <lostlogic@gentoo.org>:
- Make all kernel-sources SLOT="${KV}"
-
-*alpha-sources-2.4.20-r1 (01 Dec 2002)
- 01 Dec 2002; Bjoern Brauel <bjb@gentoo.org>
- kernel 2.4.20 + xfs + alpha related fixes
-
-*alpha-sources-2.4.19-r2 (19 Oct 2002)
- 19 Oct 2002; Bjoern Brauel <bjb@gentoo.org>
- new version adds support for xfs
-
-*alpha-sources-2.4.19-r1 (21 Sep 2002)
- 21 Sep 2002; Bjoern Brauel <bjb@gentoo.org>
- Added initial ebuild
-
diff --git a/sys-kernel/alpha-sources/Manifest b/sys-kernel/alpha-sources/Manifest
deleted file mode 100644
index b58c6bf20229..000000000000
--- a/sys-kernel/alpha-sources/Manifest
+++ /dev/null
@@ -1,29 +0,0 @@
-MD5 82b05f14f966c4e873872756f6ff09da ChangeLog 7681
-MD5 960377e2d4e6ebed212d931c01116c37 alpha-sources-2.4.21-r17.ebuild 5045
-MD5 147fec50180ad91b6260fc7201dcb90f files/alpha-sources.CAN-2004-0010.patch 6050
-MD5 5bf9836a632a861728d33f9736bb7431 files/alpha-sources.CAN-2004-0133.patch 427
-MD5 dc18e982f8149588a291956481885a8c files/alpha-sources.CAN-2004-0495.patch 17549
-MD5 eaeda68a619caaddd5b8fdc5e7c39932 files/alpha-sources.CAN-2004-0177.patch 384
-MD5 76cc0c8530da5b9d8f6db7182df4d591 files/digest-alpha-sources-2.4.21-r17 304
-MD5 e47f4118ace22fbcd917d36fdc648c3c files/alpha-sources.CAN-2004-1056.patch 11020
-MD5 60d25ff310fc6abfdce39ec9e47345af files/alpha-sources.CAN-2004-0685.patch 2809
-MD5 9c816c892d6e3d3f0b7b77d3d503ab10 files/alpha-sources.CAN-2004-0075.patch 634
-MD5 2b3ddb8b8b15f8da35ade38544b57857 files/alpha-sources.XDRWrapFix.patch 1499
-MD5 3bdf00d5f80fe9dfbfe8220e076cd04c files/alpha-sources.CAN-2004-0497.patch 707
-MD5 e637c6fa41097ea2c4693d0766f2e1c5 files/do_brk_fix.patch 242
-MD5 6ed89b8ac0b47a4c25d3a616ef9245cc files/alpha-sources.vma.patch 11369
-MD5 174438d215b70cad5ffb00ca8123c062 files/alpha-sources.munmap.patch 837
-MD5 b9a94233e1457787352e5f85e3e3582d files/alpha-sources.binfmt_a.out.patch 2009
-MD5 d1ccc2047be533c992f67270a150a210 files/alpha-sources.cmdlineLeak.patch 388
-MD5 fce867333f0c9d905d426396371bc9b4 files/alpha-sources.binfmt_elf.patch 2511
-MD5 de75cfa969ed092578d9ddda6c5be334 files/alpha-sources.CAN-2004-0181.patch 1233
-MD5 082e410301c2522521b0d3843db19c9e files/alpha-sources.CAN-2004-0535.patch 502
-MD5 b0a1f80aff51d6601e8924329023b241 files/alpha-sources.AF_UNIX.patch 515
-MD5 d4a740ae56c2049247083af387a22a85 files/alpha-sources.CAN-2004-0394.patch 350
-MD5 ac42024b6e6ee1e2165914db4b22a61c files/alpha-sources.CAN-2004-0178.patch 424
-MD5 a61e57d5483a06f20da339d91f98fbb8 files/alpha-sources.rtc_fix.patch 6769
-MD5 21f3a4f186017d925067335e24db36a1 files/alpha-sources.CAN-2004-0109.patch 1877
-MD5 370cc17582bbb17605090009d24eba51 files/alpha-sources.CAN-2004-1016.patch 2168
-MD5 9971231cef0a944990e47a3c1e4b717c files/alpha-sources.smbfs.patch 2790
-MD5 c460ea130cb4ae84a5063ba044e3ce72 files/alpha-sources.CAN-2004-0427.patch 460
-MD5 e77a93fdf26f06cf3ea5080b27211725 files/alpha-sources.CAN-2003-0985.patch 414
diff --git a/sys-kernel/alpha-sources/alpha-sources-2.4.21-r17.ebuild b/sys-kernel/alpha-sources/alpha-sources-2.4.21-r17.ebuild
deleted file mode 100644
index fe527cfe5c30..000000000000
--- a/sys-kernel/alpha-sources/alpha-sources-2.4.21-r17.ebuild
+++ /dev/null
@@ -1,103 +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/alpha-sources/alpha-sources-2.4.21-r17.ebuild,v 1.2 2005/01/03 00:14:09 ciaranm Exp $
-
-# OKV=original kernel version, KV=patched kernel version. They can be the same.
-
-IUSE="crypt usagi"
-ETYPE="sources"
-inherit kernel eutils
-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}
-
-DESCRIPTION="Full sources for the Gentoo Linux Alpha kernel"
-SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2
- mirror://gentoo/patches-${KV/17/3}.tar.bz2
- http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/linux-${OKV}-CAN-2004-0415.patch
- http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/${P}-CAN-2004-0814.patch"
-SLOT="${KV}"
-KEYWORDS="alpha -sparc -x86 -ppc -hppa -mips"
-
-src_unpack() {
- unpack ${A}
- mv linux-${OKV} linux-${KV} || die
- cd ${WORKDIR}/${KV/17/1}
-
- # 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
- 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_src_unpack
-
- cd ${S}
- epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to patch the do_brk() vulnerability!"
- epatch ${FILESDIR}/${PN}.CAN-2003-0985.patch || die "Failed to patch mremap() vulnerability!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0010.patch || die "Failed to add the CAN-2004-0010 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0075.patch || die "Failed to add the CAN-2004-0075 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0109.patch || die "Failed to patch CAN-2004-0109 vulnerability!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0133.patch || die "Failed to add the CAN-2004-0133 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0177.patch || die "Failed to add the CAN-2004-0177 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0178.patch || die "Failed to add the CAN-2004-0178 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0181.patch || die "Failed to add the CAN-2004-0181 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0394.patch || die "Failed to add the CAN-2004-0394 patch!"
- epatch ${DISTDIR}/linux-${OKV}-CAN-2004-0415.patch || die "Failed to add the CAN-2004-0415 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0427.patch || die "Failed to add the CAN-2004-0427 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0495.patch || die "Failed to add the CAN-2004-0495 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0497.patch || die "Failed to add the CAN-2004-0497 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0535.patch || die "Failed to add the CAN-2004-0535 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-0685.patch || die "Failed to add the CAN-2004-0685 patch!"
- epatch ${DISTDIR}/${P}-CAN-2004-0814.patch || die "Failed to add the CAN-2004-0814 patch!"
- epatch ${FILESDIR}/${PN}.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!"
- epatch ${FILESDIR}/${PN}.munmap.patch || die "Failed to apply munmap patch!"
- epatch ${FILESDIR}/${PN}.cmdlineLeak.patch || die "Failed to apply the /proc/cmdline patch!"
- epatch ${FILESDIR}/${PN}.XDRWrapFix.patch || die "Failed to apply the kNFSd XDR fix!"
- epatch ${FILESDIR}/${PN}.binfmt_elf.patch || die "Failed to apply the binfmt_elf fix!"
- epatch ${FILESDIR}/${PN}.smbfs.patch || die "Failed to apply the SMBFS fix!"
- epatch ${FILESDIR}/${PN}.AF_UNIX.patch || die "Failed to apply the AF_UNIX patch!"
- epatch ${FILESDIR}/${PN}.binfmt_a.out.patch || die "Failed to apply the a.out patch!"
- epatch ${FILESDIR}/${PN}.vma.patch || die "Failed to apply the VMA patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-1016.patch || die "Failed to apply the CAN-2004-1016 patch!"
- epatch ${FILESDIR}/${PN}.CAN-2004-1056.patch || die "Failed to apply the CAN-2004-1056 patch!"
-
- # Fix multi-line literal in include/asm-alpha/xor.h -- see bug 38354
- # If this script "dies" then that means it's no longer applicable.
- mv include/asm-alpha/xor.h{,.multiline}
- awk 'BEGIN { addnl=0; exitstatus=1 }
- /^asm\("/ { addnl=1 }
- /^"\)/ { addnl=0 }
- addnl && !/\\n\\$/ { sub("$", " \\n\\", $0); exitstatus=0 }
- { print }
- END { exit exitstatus }' \
- <include/asm-alpha/xor.h.multiline >include/asm-alpha/xor.h
- assert "awk script failed, probably doesn't apply to ${KV}"
- rm -f include/asm-alpha/xor.h.multiline
-}
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.AF_UNIX.patch b/sys-kernel/alpha-sources/files/alpha-sources.AF_UNIX.patch
deleted file mode 100644
index 6ced78404a2d..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.AF_UNIX.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- linux-2.4.27/net/unix/af_unix.c 2004-11-24 08:23:21 -08:00
-+++ linux-2.4.28/net/unix/af_unix.c 2004-11-24 08:23:21 -08:00
-@@ -1403,9 +1403,11 @@
-
- msg->msg_namelen = 0;
-
-+ down(&sk->protinfo.af_unix.readsem);
-+
- skb = skb_recv_datagram(sk, flags, noblock, &err);
- if (!skb)
-- goto out;
-+ goto out_unlock;
-
- wake_up_interruptible(&sk->protinfo.af_unix.peer_wait);
-
-@@ -1449,6 +1451,8 @@
-
- out_free:
- skb_free_datagram(sk,skb);
-+out_unlock:
-+ up(&sk->protinfo.af_unix.readsem);
- out:
- return err;
- }
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2003-0985.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2003-0985.patch
deleted file mode 100644
index dacf6ed810f9..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.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/alpha-sources/files/alpha-sources.CAN-2004-0010.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0010.patch
deleted file mode 100644
index 6b4b1cefa49e..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.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/alpha-sources/files/alpha-sources.CAN-2004-0075.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0075.patch
deleted file mode 100644
index 5c397deb9c46..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.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/alpha-sources/files/alpha-sources.CAN-2004-0109.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0109.patch
deleted file mode 100644
index d02b51c57fc6..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0109.patch
+++ /dev/null
@@ -1,87 +0,0 @@
---- linux/fs/isofs/rock.c.orig
-+++ linux/fs/isofs/rock.c
-@@ -14,6 +14,7 @@
- #include <linux/slab.h>
- #include <linux/pagemap.h>
- #include <linux/smp_lock.h>
-+#include <asm/page.h>
-
- #include "rock.h"
-
-@@ -419,7 +420,7 @@
- return 0;
- }
-
--static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr)
-+static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr, char *plimit)
- {
- int slen;
- int rootflag;
-@@ -431,16 +432,25 @@
- rootflag = 0;
- switch (slp->flags & ~1) {
- case 0:
-+ if (slp->len > plimit - rpnt)
-+ return NULL;
- memcpy(rpnt, slp->text, slp->len);
- rpnt+=slp->len;
- break;
-+ case 2:
-+ if (rpnt >= plimit)
-+ return NULL;
-+ *rpnt++='.';
-+ break;
- case 4:
-+ if (2 > plimit - rpnt)
-+ return NULL;
- *rpnt++='.';
-- /* fallthru */
-- case 2:
- *rpnt++='.';
- break;
- case 8:
-+ if (rpnt >= plimit)
-+ return NULL;
- rootflag = 1;
- *rpnt++='/';
- break;
-@@ -457,17 +467,23 @@
- * If there is another SL record, and this component
- * record isn't continued, then add a slash.
- */
-- if ((!rootflag) && (rr->u.SL.flags & 1) && !(oldslp->flags & 1))
-+ if ((!rootflag) && (rr->u.SL.flags & 1) &&
-+ !(oldslp->flags & 1)) {
-+ if (rpnt >= plimit)
-+ return NULL;
- *rpnt++='/';
-+ }
- break;
- }
-
- /*
- * If this component record isn't continued, then append a '/'.
- */
-- if (!rootflag && !(oldslp->flags & 1))
-+ if (!rootflag && !(oldslp->flags & 1)) {
-+ if (rpnt >= plimit)
-+ return NULL;
- *rpnt++='/';
--
-+ }
- }
- return rpnt;
- }
-@@ -548,7 +564,10 @@
- CHECK_SP(goto out);
- break;
- case SIG('S', 'L'):
-- rpnt = get_symlink_chunk(rpnt, rr);
-+ rpnt = get_symlink_chunk(rpnt, rr,
-+ link + (PAGE_SIZE - 1));
-+ if (rpnt == NULL)
-+ goto out;
- break;
- case SIG('C', 'E'):
- /* This tells is if there is a continuation record */
-
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0133.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0133.patch
deleted file mode 100644
index c756bc328bf2..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0133.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- linux-2.4.22/fs/xfs/xfs_log.c.can-2004-0133 2004-03-23 12:28:11.000000000 -0700
-+++ linux-2.4.22/fs/xfs/xfs_log.c 2004-03-23 12:58:59.000000000 -0700
-@@ -1251,7 +1251,7 @@
- kmem_zalloc(sizeof(xlog_in_core_t), KM_SLEEP);
- iclog = *iclogp;
- iclog->hic_data = (xlog_in_core_2_t *)
-- kmem_alloc(iclogsize, KM_SLEEP);
-+ kmem_zalloc(iclogsize, KM_SLEEP);
-
- iclog->ic_prev = prev_iclog;
- prev_iclog = iclog;
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0177.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0177.patch
deleted file mode 100644
index da6b7e190685..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0177.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- linux-2.4.26-pre3/fs/jbd/journal.c 2004-02-18 05:36:31.000000000 -0800
-+++ linux-2.4.26-pre4/fs/jbd/journal.c 2004-03-16 09:59:36.000000000 -0800
-@@ -671,6 +671,7 @@
-
- bh = getblk(journal->j_dev, blocknr, journal->j_blocksize);
- lock_buffer(bh);
-+ memset(bh->b_data, 0, journal->j_blocksize);
- BUFFER_TRACE(bh, "return this buffer");
- return journal_add_journal_head(bh);
- }
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0178.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0178.patch
deleted file mode 100644
index 19e57268c2fa..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0178.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- linux-2.4.26-pre2/drivers/sound/sb_audio.c 2002-02-25 11:38:06.000000000 -0800
-+++ linux-2.4.26-pre3/drivers/sound/sb_audio.c 2004-03-13 07:43:23.000000000 -0800
-@@ -879,7 +879,7 @@
- c -= locallen; p += locallen;
- }
- /* used = ( samples * 16 bits size ) */
-- *used = len << 1;
-+ *used = max_in > ( max_out << 1) ? (max_out << 1) : max_in;
- /* returned = ( samples * 8 bits size ) */
- *returned = len;
- }
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0181.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0181.patch
deleted file mode 100644
index 5f7f1441b268..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0181.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- linux-2.4.22/fs/jfs/jfs_logmgr.c.jfs-sec 2004-03-23 12:30:35.000000000 -0700
-+++ linux-2.4.22/fs/jfs/jfs_logmgr.c 2004-03-23 13:01:51.000000000 -0700
-@@ -1693,7 +1693,7 @@
- if (lbuf == 0)
- goto error;
- lbuf->l_bh.b_data = lbuf->l_ldata =
-- (char *) __get_free_page(GFP_KERNEL);
-+ (char *) get_zeroed_page(GFP_KERNEL);
- if (lbuf->l_ldata == 0) {
- kfree(lbuf);
- goto error;
---- linux-2.4.22/fs/jfs/jfs_metapage.c.jfs-sec 2004-03-23 12:30:48.000000000 -0700
-+++ linux-2.4.22/fs/jfs/jfs_metapage.c 2004-03-23 13:01:51.000000000 -0700
-@@ -375,6 +375,10 @@
- }
- mp->data = kmap(mp->page) + page_offset;
- }
-+
-+ if (new)
-+ memset(mp->data, 0, PSIZE);
-+
- jfs_info("__get_metapage: returning = 0x%p", mp);
- return mp;
-
---- linux-2.4.22/fs/jfs/super.c.jfs-sec 2004-03-23 12:31:10.000000000 -0700
-+++ linux-2.4.22/fs/jfs/super.c 2004-03-23 13:01:51.000000000 -0700
-@@ -423,10 +423,10 @@
-
- if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
- SLAB_CTOR_CONSTRUCTOR) {
-+ memset(jfs_ip, 0, sizeof(struct jfs_inode_info));
- INIT_LIST_HEAD(&jfs_ip->anon_inode_list);
- init_rwsem(&jfs_ip->rdwrlock);
- init_MUTEX(&jfs_ip->commit_sem);
-- jfs_ip->atlhead = 0;
- jfs_ip->active_ag = -1;
- }
- }
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0394.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0394.patch
deleted file mode 100644
index 273f1a52046f..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0394.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- linux-2.4.22-oM3-orig/kernel/panic.c Tue Mar 30 15:37:18 2004
-+++ linux-2.4.22-oM3-mod/kernel/panic.c Mon May 17 18:44:01 2004
-@@ -51,7 +51,7 @@
-
- bust_spinlocks(1);
- va_start(args, fmt);
-- vsprintf(buf, fmt, args);
-+ vsnprintf(buf, sizeof(buf), fmt, args);
- va_end(args);
- printk(KERN_EMERG "Kernel panic: %s\n",buf);
- if (in_interrupt())
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0427.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0427.patch
deleted file mode 100644
index ddc9610f67f8..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0427.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nar -U 4 linux-2.4.25/kernel/fork.c linux-2.4.25-new/kernel/fork.c
---- linux-2.4.25/kernel/fork.c 2004-02-18 05:36:32.000000000 -0800
-+++ linux-2.4.25-new/kernel/fork.c 2004-04-07 17:43:29.000000000 -0700
-@@ -825,8 +825,10 @@
- bad_fork_cleanup_namespace:
- exit_namespace(p);
- bad_fork_cleanup_mm:
- exit_mm(p);
-+ if (p->active_mm)
-+ mmdrop(p->active_mm);
- bad_fork_cleanup_sighand:
- exit_sighand(p);
- bad_fork_cleanup_fs:
- exit_fs(p); /* blocking */
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0495.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0495.patch
deleted file mode 100644
index bea80eac69a9..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0495.patch
+++ /dev/null
@@ -1,655 +0,0 @@
---- linux/net/decnet/dn_dev.c.bak Wed Jun 16 14:42:24 2004
-+++ linux/net/decnet/dn_dev.c Wed Jun 16 14:42:34 2004
-@@ -1070,31 +1070,39 @@ int dnet_gifconf(struct net_device *dev,
- {
- struct dn_dev *dn_db = (struct dn_dev *)dev->dn_ptr;
- struct dn_ifaddr *ifa;
-- struct ifreq *ifr = (struct ifreq *)buf;
-+ char buffer[DN_IFREQ_SIZE];
-+ struct ifreq *ifr = (struct ifreq *)buffer;
-+ struct sockaddr_dn *addr = (struct sockaddr_dn *)&ifr->ifr_addr;
- int done = 0;
-
- if ((dn_db == NULL) || ((ifa = dn_db->ifa_list) == NULL))
- return 0;
-
- for(; ifa; ifa = ifa->ifa_next) {
-- if (!ifr) {
-+ if (!buf) {
- done += sizeof(DN_IFREQ_SIZE);
- continue;
- }
- if (len < DN_IFREQ_SIZE)
- return done;
-- memset(ifr, 0, DN_IFREQ_SIZE);
-+ memset(buffer, 0, DN_IFREQ_SIZE);
-
- if (ifa->ifa_label)
- strcpy(ifr->ifr_name, ifa->ifa_label);
- else
- strcpy(ifr->ifr_name, dev->name);
-
-- (*(struct sockaddr_dn *) &ifr->ifr_addr).sdn_family = AF_DECnet;
-- (*(struct sockaddr_dn *) &ifr->ifr_addr).sdn_add.a_len = 2;
-- (*(dn_address *)(*(struct sockaddr_dn *) &ifr->ifr_addr).sdn_add.a_addr) = ifa->ifa_local;
-+ addr->sdn_family = AF_DECnet;
-+ addr->sdn_add.a_len = 2;
-+ memcpy(addr->sdn_add.a_addr, &ifa->ifa_local,
-+ sizeof(dn_address));
-
-- ifr = (struct ifreq *)((char *)ifr + DN_IFREQ_SIZE);
-+ if (copy_to_user(buf, buffer, DN_IFREQ_SIZE)) {
-+ done = -EFAULT;
-+ break;
-+ }
-+
-+ buf += DN_IFREQ_SIZE;
- len -= DN_IFREQ_SIZE;
- done += DN_IFREQ_SIZE;
- }
---- linux-2.4.21/drivers/net/wireless/airo.c 2003-06-13 15:51:35.000000000 +0100
-+++ linux-2.4.21/drivers/net/wireless/airo.c.plasmaroo 2004-06-24 11:09:08.260352168 +0100
-@@ -3012,19 +3012,22 @@
- size_t len,
- loff_t *offset )
- {
-- int i;
-- int pos;
-+ loff_t pos = *offset;
- struct proc_data *priv = (struct proc_data*)file->private_data;
-
-- if( !priv->rbuffer ) return -EINVAL;
-+ if (!priv->rbuffer)
-+ return -EINVAL;
-
-- pos = *offset;
-- for( i = 0; i+pos < priv->readlen && i < len; i++ ) {
-- if (put_user( priv->rbuffer[i+pos], buffer+i ))
-- return -EFAULT;
-- }
-- *offset += i;
-- return i;
-+ if (pos < 0)
-+ return -EINVAL;
-+ if (pos >= priv->readlen)
-+ return 0;
-+ if (len > priv->readlen - pos)
-+ len = priv->readlen - pos;
-+ if (copy_to_user(buffer, priv->rbuffer + pos, len))
-+ return -EFAULT;
-+ *offset = pos + len;
-+ return len;
- }
-
- /*
-@@ -3036,24 +3039,24 @@
- size_t len,
- loff_t *offset )
- {
-- int i;
-- int pos;
-+ loff_t pos = *offset;
- struct proc_data *priv = (struct proc_data*)file->private_data;
-
-- if ( !priv->wbuffer ) {
-+ if (!priv->wbuffer)
- return -EINVAL;
-- }
--
-- pos = *offset;
-
-- for( i = 0; i + pos < priv->maxwritelen &&
-- i < len; i++ ) {
-- if (get_user( priv->wbuffer[i+pos], buffer + i ))
-- return -EFAULT;
-- }
-- if ( i+pos > priv->writelen ) priv->writelen = i+file->f_pos;
-- *offset += i;
-- return i;
-+ if (pos < 0)
-+ return -EINVAL;
-+ if (pos >= priv->maxwritelen)
-+ return 0;
-+ if (len > priv->maxwritelen - pos)
-+ len = priv->maxwritelen - pos;
-+ if (copy_from_user(priv->wbuffer + pos, buffer, len))
-+ return -EFAULT;
-+ if (pos + len > priv->writelen)
-+ priv->writelen = pos + len;
-+ *offset = pos + len;
-+ return len;
- }
-
- static int proc_status_open( struct inode *inode, struct file *file ) {
---- linux/drivers/sound/mpu401.c.bak Wed Jun 16 14:42:24 2004
-+++ linux/drivers/sound/mpu401.c Wed Jun 16 14:42:34 2004
-@@ -1493,14 +1493,16 @@ static unsigned long mpu_timer_get_time(
- static int mpu_timer_ioctl(int dev, unsigned int command, caddr_t arg)
- {
- int midi_dev = sound_timer_devs[dev]->devlink;
-+ int *p = (int *)arg;
-
- switch (command)
- {
- case SNDCTL_TMR_SOURCE:
- {
- int parm;
--
-- parm = *(int *) arg;
-+
-+ if (get_user(parm, p))
-+ return -EFAULT;
- parm &= timer_caps;
-
- if (parm != 0)
-@@ -1512,7 +1514,9 @@ static int mpu_timer_ioctl(int dev, unsi
- else if (timer_mode & TMR_MODE_SMPTE)
- mpu_cmd(midi_dev, 0x3d, 0); /* Use SMPTE sync */
- }
-- return (*(int *) arg = timer_mode);
-+ if (put_user(timer_mode, p))
-+ return -EFAULT;
-+ return timer_mode;
- }
- break;
-
-@@ -1537,10 +1541,13 @@ static int mpu_timer_ioctl(int dev, unsi
- {
- int val;
-
-- val = *(int *) arg;
-+ if (get_user(val, p))
-+ return -EFAULT;
- if (val)
- set_timebase(midi_dev, val);
-- return (*(int *) arg = curr_timebase);
-+ if (put_user(curr_timebase, p))
-+ return -EFAULT;
-+ return curr_timebase;
- }
- break;
-
-@@ -1549,7 +1556,8 @@ static int mpu_timer_ioctl(int dev, unsi
- int val;
- int ret;
-
-- val = *(int *) arg;
-+ if (get_user(val, p))
-+ return -EFAULT;
-
- if (val)
- {
-@@ -1564,7 +1572,9 @@ static int mpu_timer_ioctl(int dev, unsi
- }
- curr_tempo = val;
- }
-- return (*(int *) arg = curr_tempo);
-+ if (put_user(curr_tempo, p))
-+ return -EFAULT;
-+ return curr_tempo;
- }
- break;
-
-@@ -1572,18 +1582,25 @@ static int mpu_timer_ioctl(int dev, unsi
- {
- int val;
-
-- val = *(int *) arg;
-+ if (get_user(val, p))
-+ return -EFAULT;
- if (val != 0) /* Can't change */
- return -EINVAL;
-- return (*(int *) arg = ((curr_tempo * curr_timebase) + 30) / 60);
-+ val = (curr_tempo * curr_timebase + 30) / 60;
-+ if (put_user(val, p))
-+ return -EFAULT;
-+ return val;
- }
- break;
-
- case SNDCTL_SEQ_GETTIME:
-- return (*(int *) arg = curr_ticks);
-+ if (put_user(curr_ticks, p))
-+ return -EFAULT;
-+ return curr_ticks;
-
- case SNDCTL_TMR_METRONOME:
-- metronome_mode = *(int *) arg;
-+ if (get_user(metronome_mode, p))
-+ return -EFAULT;
- setup_metronome(midi_dev);
- return 0;
-
---- linux/drivers/sound/msnd.c.bak Wed Jun 16 14:42:24 2004
-+++ linux/drivers/sound/msnd.c Wed Jun 16 14:42:34 2004
-@@ -155,13 +155,10 @@ void msnd_fifo_make_empty(msnd_fifo *f)
- f->len = f->tail = f->head = 0;
- }
-
--int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len, int user)
-+int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len)
- {
- int count = 0;
-
-- if (f->len == f->n)
-- return 0;
--
- while ((count < len) && (f->len != f->n)) {
-
- int nwritten;
-@@ -177,11 +174,7 @@ int msnd_fifo_write(msnd_fifo *f, const
- nwritten = len - count;
- }
-
-- if (user) {
-- if (copy_from_user(f->data + f->tail, buf, nwritten))
-- return -EFAULT;
-- } else
-- isa_memcpy_fromio(f->data + f->tail, (unsigned long) buf, nwritten);
-+ isa_memcpy_fromio(f->data + f->tail, (unsigned long) buf, nwritten);
-
- count += nwritten;
- buf += nwritten;
-@@ -193,13 +186,10 @@ int msnd_fifo_write(msnd_fifo *f, const
- return count;
- }
-
--int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len, int user)
-+int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len)
- {
- int count = 0;
-
-- if (f->len == 0)
-- return f->len;
--
- while ((count < len) && (f->len > 0)) {
-
- int nread;
-@@ -215,11 +205,7 @@ int msnd_fifo_read(msnd_fifo *f, char *b
- nread = len - count;
- }
-
-- if (user) {
-- if (copy_to_user(buf, f->data + f->head, nread))
-- return -EFAULT;
-- } else
-- isa_memcpy_toio((unsigned long) buf, f->data + f->head, nread);
-+ isa_memcpy_toio((unsigned long) buf, f->data + f->head, nread);
-
- count += nread;
- buf += nread;
---- linux/drivers/sound/msnd.h.bak Wed Jun 16 14:42:24 2004
-+++ linux/drivers/sound/msnd.h Wed Jun 16 14:42:34 2004
-@@ -266,8 +266,8 @@ void msnd_fifo_init(msnd_fifo *f);
- void msnd_fifo_free(msnd_fifo *f);
- int msnd_fifo_alloc(msnd_fifo *f, size_t n);
- void msnd_fifo_make_empty(msnd_fifo *f);
--int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len, int user);
--int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len, int user);
-+int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len);
-+int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len);
-
- int msnd_wait_TXDE(multisound_dev_t *dev);
- int msnd_wait_HC0(multisound_dev_t *dev);
---- linux/drivers/sound/msnd_pinnacle.c.bak Wed Jun 16 14:42:24 2004
-+++ linux/drivers/sound/msnd_pinnacle.c Wed Jun 16 14:42:34 2004
-@@ -804,7 +804,7 @@ static int dev_release(struct inode *ino
-
- static __inline__ int pack_DARQ_to_DARF(register int bank)
- {
-- register int size, n, timeout = 3;
-+ register int size, timeout = 3;
- register WORD wTmp;
- LPDAQD DAQD;
-
-@@ -825,13 +825,10 @@ static __inline__ int pack_DARQ_to_DARF(
- /* Read data from the head (unprotected bank 1 access okay
- since this is only called inside an interrupt) */
- outb(HPBLKSEL_1, dev.io + HP_BLKS);
-- if ((n = msnd_fifo_write(
-+ msnd_fifo_write(
- &dev.DARF,
- (char *)(dev.base + bank * DAR_BUFF_SIZE),
-- size, 0)) <= 0) {
-- outb(HPBLKSEL_0, dev.io + HP_BLKS);
-- return n;
-- }
-+ size);
- outb(HPBLKSEL_0, dev.io + HP_BLKS);
-
- return 1;
-@@ -853,21 +850,16 @@ static __inline__ int pack_DAPF_to_DAPQ(
- if (protect) {
- /* Critical section: protect fifo in non-interrupt */
- spin_lock_irqsave(&dev.lock, flags);
-- if ((n = msnd_fifo_read(
-+ n = msnd_fifo_read(
- &dev.DAPF,
- (char *)(dev.base + bank_num * DAP_BUFF_SIZE),
-- DAP_BUFF_SIZE, 0)) < 0) {
-- spin_unlock_irqrestore(&dev.lock, flags);
-- return n;
-- }
-+ DAP_BUFF_SIZE);
- spin_unlock_irqrestore(&dev.lock, flags);
- } else {
-- if ((n = msnd_fifo_read(
-+ n = msnd_fifo_read(
- &dev.DAPF,
- (char *)(dev.base + bank_num * DAP_BUFF_SIZE),
-- DAP_BUFF_SIZE, 0)) < 0) {
-- return n;
-- }
-+ DAP_BUFF_SIZE);
- }
- if (!n)
- break;
-@@ -894,30 +886,43 @@ static __inline__ int pack_DAPF_to_DAPQ(
- static int dsp_read(char *buf, size_t len)
- {
- int count = len;
-+ char *page = (char *)__get_free_page(PAGE_SIZE);
-+
-+ if (!page)
-+ return -ENOMEM;
-
- while (count > 0) {
-- int n;
-+ int n, k;
- unsigned long flags;
-
-+ k = PAGE_SIZE;
-+ if (k > count)
-+ k = count;
-+
- /* Critical section: protect fifo in non-interrupt */
- spin_lock_irqsave(&dev.lock, flags);
-- if ((n = msnd_fifo_read(&dev.DARF, buf, count, 1)) < 0) {
-- printk(KERN_WARNING LOGNAME ": FIFO read error\n");
-- spin_unlock_irqrestore(&dev.lock, flags);
-- return n;
-- }
-+ n = msnd_fifo_read(&dev.DARF, page, k);
- spin_unlock_irqrestore(&dev.lock, flags);
-+ if (copy_to_user(buf, page, n)) {
-+ free_page((unsigned long)page);
-+ return -EFAULT;
-+ }
- buf += n;
- count -= n;
-
-+ if (n == k && count)
-+ continue;
-+
- if (!test_bit(F_READING, &dev.flags) && dev.mode & FMODE_READ) {
- dev.last_recbank = -1;
- if (chk_send_dsp_cmd(&dev, HDEX_RECORD_START) == 0)
- set_bit(F_READING, &dev.flags);
- }
-
-- if (dev.rec_ndelay)
-+ if (dev.rec_ndelay) {
-+ free_page((unsigned long)page);
- return count == len ? -EAGAIN : len - count;
-+ }
-
- if (count > 0) {
- set_bit(F_READBLOCK, &dev.flags);
-@@ -926,41 +931,57 @@ static int dsp_read(char *buf, size_t le
- get_rec_delay_jiffies(DAR_BUFF_SIZE)))
- clear_bit(F_READING, &dev.flags);
- clear_bit(F_READBLOCK, &dev.flags);
-- if (signal_pending(current))
-+ if (signal_pending(current)) {
-+ free_page((unsigned long)page);
- return -EINTR;
-+ }
- }
- }
--
-+ free_page((unsigned long)page);
- return len - count;
- }
-
- static int dsp_write(const char *buf, size_t len)
- {
- int count = len;
-+ char *page = (char *)__get_free_page(GFP_KERNEL);
-+
-+ if (!page)
-+ return -ENOMEM;
-
- while (count > 0) {
-- int n;
-+ int n, k;
- unsigned long flags;
-
-+ k = PAGE_SIZE;
-+ if (k > count)
-+ k = count;
-+
-+ if (copy_from_user(page, buf, k)) {
-+ free_page((unsigned long)page);
-+ return -EFAULT;
-+ }
-+
- /* Critical section: protect fifo in non-interrupt */
- spin_lock_irqsave(&dev.lock, flags);
-- if ((n = msnd_fifo_write(&dev.DAPF, buf, count, 1)) < 0) {
-- printk(KERN_WARNING LOGNAME ": FIFO write error\n");
-- spin_unlock_irqrestore(&dev.lock, flags);
-- return n;
-- }
-+ n = msnd_fifo_write(&dev.DAPF, page, k);
- spin_unlock_irqrestore(&dev.lock, flags);
- buf += n;
- count -= n;
-
-+ if (count && n == k)
-+ continue;
-+
- if (!test_bit(F_WRITING, &dev.flags) && (dev.mode & FMODE_WRITE)) {
- dev.last_playbank = -1;
- if (pack_DAPF_to_DAPQ(1) > 0)
- set_bit(F_WRITING, &dev.flags);
- }
-
-- if (dev.play_ndelay)
-+ if (dev.play_ndelay) {
-+ free_page((unsigned long)page);
- return count == len ? -EAGAIN : len - count;
-+ }
-
- if (count > 0) {
- set_bit(F_WRITEBLOCK, &dev.flags);
-@@ -968,11 +989,14 @@ static int dsp_write(const char *buf, si
- &dev.writeblock,
- get_play_delay_jiffies(DAP_BUFF_SIZE));
- clear_bit(F_WRITEBLOCK, &dev.flags);
-- if (signal_pending(current))
-+ if (signal_pending(current)) {
-+ free_page((unsigned long)page);
- return -EINTR;
-+ }
- }
- }
-
-+ free_page((unsigned long)page);
- return len - count;
- }
-
---- linux/drivers/sound/pss.c.bak Wed Jun 16 14:42:24 2004
-+++ linux/drivers/sound/pss.c Wed Jun 16 14:42:34 2004
-@@ -450,20 +450,36 @@ static void pss_mixer_reset(pss_confdata
- }
- }
-
--static void arg_to_volume_mono(unsigned int volume, int *aleft)
-+static int set_volume_mono(caddr_t p, int *aleft)
- {
- int left;
-+ unsigned volume;
-+ if (get_user(volume, (unsigned *)p))
-+ return -EFAULT;
-
-- left = volume & 0x00ff;
-+ left = volume & 0xff;
- if (left > 100)
- left = 100;
- *aleft = left;
-+ return 0;
- }
-
--static void arg_to_volume_stereo(unsigned int volume, int *aleft, int *aright)
-+static int set_volume_stereo(caddr_t p, int *aleft, int *aright)
- {
-- arg_to_volume_mono(volume, aleft);
-- arg_to_volume_mono(volume >> 8, aright);
-+ int left, right;
-+ unsigned volume;
-+ if (get_user(volume, (unsigned *)p))
-+ return -EFAULT;
-+
-+ left = volume & 0xff;
-+ if (left > 100)
-+ left = 100;
-+ right = (volume >> 8) & 0xff;
-+ if (right > 100)
-+ right = 100;
-+ *aleft = left;
-+ *aright = right;
-+ return 0;
- }
-
- static int ret_vol_mono(int left)
-@@ -510,33 +526,38 @@ static int pss_mixer_ioctl (int dev, uns
- return call_ad_mixer(devc, cmd, arg);
- else
- {
-- if (*(int *)arg != 0)
-+ int v;
-+ if (get_user(v, (int *)arg))
-+ return -EFAULT;
-+ if (v != 0)
- return -EINVAL;
- return 0;
- }
- case SOUND_MIXER_VOLUME:
-- arg_to_volume_stereo(*(unsigned int *)arg, &devc->mixer.volume_l,
-- &devc->mixer.volume_r);
-+ if (set_volume_stereo(arg,
-+ &devc->mixer.volume_l,
-+ &devc->mixer.volume_r))
-+ return -EFAULT;
- set_master_volume(devc, devc->mixer.volume_l,
- devc->mixer.volume_r);
- return ret_vol_stereo(devc->mixer.volume_l,
- devc->mixer.volume_r);
-
- case SOUND_MIXER_BASS:
-- arg_to_volume_mono(*(unsigned int *)arg,
-- &devc->mixer.bass);
-+ if (set_volume_mono(arg, &devc->mixer.bass))
-+ return -EFAULT;
- set_bass(devc, devc->mixer.bass);
- return ret_vol_mono(devc->mixer.bass);
-
- case SOUND_MIXER_TREBLE:
-- arg_to_volume_mono(*(unsigned int *)arg,
-- &devc->mixer.treble);
-+ if (set_volume_mono(arg, &devc->mixer.treble))
-+ return -EFAULT;
- set_treble(devc, devc->mixer.treble);
- return ret_vol_mono(devc->mixer.treble);
-
- case SOUND_MIXER_SYNTH:
-- arg_to_volume_mono(*(unsigned int *)arg,
-- &devc->mixer.synth);
-+ if (set_volume_mono(arg, &devc->mixer.synth))
-+ return -EFAULT;
- set_synth_volume(devc, devc->mixer.synth);
- return ret_vol_mono(devc->mixer.synth);
-
-@@ -546,54 +567,67 @@ static int pss_mixer_ioctl (int dev, uns
- }
- else
- {
-+ int val, and_mask = 0, or_mask = 0;
- /*
- * Return parameters
- */
- switch (cmdf)
- {
--
- case SOUND_MIXER_DEVMASK:
- if (call_ad_mixer(devc, cmd, arg) == -EINVAL)
-- *(int *)arg = 0; /* no mixer devices */
-- return (*(int *)arg |= SOUND_MASK_VOLUME | SOUND_MASK_BASS | SOUND_MASK_TREBLE | SOUND_MASK_SYNTH);
-+ break;
-+ and_mask = ~0;
-+ or_mask = SOUND_MASK_VOLUME | SOUND_MASK_BASS | SOUND_MASK_TREBLE | SOUND_MASK_SYNTH;
-+ break;
-
- case SOUND_MIXER_STEREODEVS:
- if (call_ad_mixer(devc, cmd, arg) == -EINVAL)
-- *(int *)arg = 0; /* no stereo devices */
-- return (*(int *)arg |= SOUND_MASK_VOLUME);
-+ break;
-+ and_mask = ~0;
-+ or_mask = SOUND_MASK_VOLUME;
-+ break;
-
- case SOUND_MIXER_RECMASK:
- if (devc->ad_mixer_dev != NO_WSS_MIXER)
- return call_ad_mixer(devc, cmd, arg);
-- else
-- return (*(int *)arg = 0); /* no record devices */
-+ break;
-
- case SOUND_MIXER_CAPS:
- if (devc->ad_mixer_dev != NO_WSS_MIXER)
- return call_ad_mixer(devc, cmd, arg);
-- else
-- return (*(int *)arg = SOUND_CAP_EXCL_INPUT);
-+ or_mask = SOUND_CAP_EXCL_INPUT;
-+ break;
-
- case SOUND_MIXER_RECSRC:
- if (devc->ad_mixer_dev != NO_WSS_MIXER)
- return call_ad_mixer(devc, cmd, arg);
-- else
-- return (*(int *)arg = 0); /* no record source */
-+ break;
-
- case SOUND_MIXER_VOLUME:
-- return (*(int *)arg = ret_vol_stereo(devc->mixer.volume_l, devc->mixer.volume_r));
-+ or_mask = ret_vol_stereo(devc->mixer.volume_l, devc->mixer.volume_r);
-+ break;
-
- case SOUND_MIXER_BASS:
-- return (*(int *)arg = ret_vol_mono(devc->mixer.bass));
-+ or_mask = ret_vol_mono(devc->mixer.bass);
-+ break;
-
- case SOUND_MIXER_TREBLE:
-- return (*(int *)arg = ret_vol_mono(devc->mixer.treble));
-+ or_mask = ret_vol_mono(devc->mixer.treble);
-+ break;
-
- case SOUND_MIXER_SYNTH:
-- return (*(int *)arg = ret_vol_mono(devc->mixer.synth));
-+ or_mask = ret_vol_mono(devc->mixer.synth);
-+ break;
- default:
- return -EINVAL;
- }
-+ if (get_user(val, (int *)arg))
-+ return -EFAULT;
-+ val &= and_mask;
-+ val |= or_mask;
-+ if (put_user(val, (int *)arg))
-+ return -EFAULT;
-+ return val;
- }
- }
-
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0497.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0497.patch
deleted file mode 100644
index 9503e9efe57b..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0497.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-# ChangeSet
-#
-# fs/attr.c
-# 2004/07/03 18:28:30-03:00 marcelo@logos.cnet +1 -0
-# Thomas Biege: Fix missing DAC check on sys_chown
-#
-# fs/attr.c
-# 2004/07/03 19:28:29-03:00 marcelo@logos.cnet +1 -1
-# Add missing bracket to inode_change_ok() fix
-#
-diff -Nru a/fs/attr.c b.plasmaroo/fs/attr.c
---- a/fs/attr.c 2004-07-08 17:05:20 -07:00
-+++ b.plasmaroo/fs/attr.c 2004-07-08 17:05:20 -07:00
-@@ -35,7 +35,8 @@
-
- /* Make sure caller can chgrp. */
- if ((ia_valid & ATTR_GID) &&
-- (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid) &&
-+ (current->fsuid != inode->i_uid ||
-+ (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) &&
- !capable(CAP_CHOWN))
- goto error;
-
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0535.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0535.patch
deleted file mode 100644
index 8d264416ff72..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0535.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- linux-2.4.21/drivers/net/e1000/e1000_ethtool.c 2003-06-13 15:51:34.000000000 +0100
-+++ linux-2.4.21/drivers/net/e1000/e1000_ethtool.c.plasmaroo 2004-06-24 11:23:32.524963976 +0100
-@@ -468,6 +468,9 @@
-
- if(copy_from_user(&regs, addr, sizeof(regs)))
- return -EFAULT;
-+ memset(regs_buff, 0, sizeof(regs_buff));
-+ if (regs.len > E1000_REGS_LEN)
-+ regs.len = E1000_REGS_LEN;
- e1000_ethtool_gregs(adapter, &regs, regs_buff);
- if(copy_to_user(addr, &regs, sizeof(regs)))
- return -EFAULT;
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0685.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-0685.patch
deleted file mode 100644
index d1be834cc8a5..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.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-08 07:41:30 -07:00
-+++ b/drivers/usb/vicam.c 2004-08-08 07:41:30 -07:00
-@@ -481,6 +481,7 @@
- struct video_capability b;
-
- DBG("VIDIOCGCAP\n");
-+ memset(&b, 0, sizeof(b));
- strcpy(b.name, "ViCam-based Camera");
- b.type = VID_TYPE_CAPTURE;
- b.channels = 1;
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-1016.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-1016.patch
deleted file mode 100644
index ad0b0dde0d47..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.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/alpha-sources/files/alpha-sources.CAN-2004-1056.patch b/sys-kernel/alpha-sources/files/alpha-sources.CAN-2004-1056.patch
deleted file mode 100644
index b0b2a6d65598..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.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/alpha-sources/files/alpha-sources.XDRWrapFix.patch b/sys-kernel/alpha-sources/files/alpha-sources.XDRWrapFix.patch
deleted file mode 100644
index 9a336ab7876a..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.XDRWrapFix.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2004/08/16 14:50:04-03:00 neilb@cse.unsw.edu.au
-# [PATCH] Fixed possibly xdr parsing error if write size exceed 2^31
-#
-# xdr_argsize_check needs to cope with the possibility that the
-# pointer has wrapped and could be below buf->base.
-#
-# Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
-#
-# ### Diffstat output
-# ./fs/nfsd/nfs3xdr.c | 2 +-
-# ./include/linux/nfsd/xdr3.h | 2 +-
-# 2 files changed, 2 insertions(+), 2 deletions(-)
-#
-# fs/nfsd/nfs3xdr.c
-# 2004/08/14 00:23:06-03:00 neilb@cse.unsw.edu.au +1 -1
-# Fixed possibly xdr parsing error if write size exceed 2^31
-#
-# include/linux/nfsd/xdr3.h
-# 2004/08/15 20:48:43-03:00 neilb@cse.unsw.edu.au +1 -1
-# Fixed possibly xdr parsing error if write size exceed 2^31
-#
-diff -Nru a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
---- a/fs/nfsd/nfs3xdr.c 2004-09-06 11:20:28 -07:00
-+++ b/fs/nfsd/nfs3xdr.c 2004-09-06 11:20:28 -07:00
-@@ -273,7 +273,7 @@
- {
- struct svc_buf *buf = &rqstp->rq_argbuf;
-
-- return p - buf->base <= buf->buflen;
-+ return p >= buf->base && p <= buf->base + buf->buflen ;
- }
-
- static inline int
-diff -Nru a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h
---- a/include/linux/nfsd/xdr3.h 2004-09-06 11:20:28 -07:00
-+++ b/include/linux/nfsd/xdr3.h 2004-09-06 11:20:28 -07:00
-@@ -41,7 +41,7 @@
- __u32 count;
- int stable;
- __u8 * data;
-- int len;
-+ __u32 len;
- };
-
- struct nfsd3_createargs {
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.binfmt_a.out.patch b/sys-kernel/alpha-sources/files/alpha-sources.binfmt_a.out.patch
deleted file mode 100644
index 4644ae28bce4..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.binfmt_a.out.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff -Nru linux-2.4.28/fs/exec.c linux-2.4.28.plasmaroo/fs/exec.c
---- linux-2.4.28/fs/exec.c 2004-04-15 10:44:45 -07:00
-+++ linux-2.4.28.plasmaroo/fs/exec.c 2004-11-12 12:02:40 -08:00
-@@ -342,6 +342,7 @@ int setup_arg_pages(struct linux_binprm
-
- down_write(&current->mm->mmap_sem);
- {
-+ struct vm_area_struct *vma;
- mpnt->vm_mm = current->mm;
- mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
- mpnt->vm_end = STACK_TOP;
-@@ -351,6 +352,12 @@ int setup_arg_pages(struct linux_binprm
- mpnt->vm_pgoff = 0;
- mpnt->vm_file = NULL;
- mpnt->vm_private_data = (void *) 0;
-+ vma = find_vma(current->mm, mpnt->vm_start);
-+ if (vma) {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, mpnt);
-+ return -ENOMEM;
-+ }
- insert_vm_struct(current->mm, mpnt);
- current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
- }
-diff -Nru linux-2.4.28/fs/exec.c linux-2.4.28.plasmaroo/fs/exec.c
---- linux-2.4.28/fs/binfmt_aout.c 2002-02-04 23:54:04 -08:00
-+++ linux-2.4.28.plasmaroo/fs/binfmt_aout.c 2004-11-12 11:55:14 -08:00
-@@ -39,13 +39,18 @@ static struct linux_binfmt aout_format =
- NULL, THIS_MODULE, load_aout_binary, load_aout_library, aout_core_dump, PAGE_SIZE
- };
-
--static void set_brk(unsigned long start, unsigned long end)
-+#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
-+
-+static int set_brk(unsigned long start, unsigned long end)
- {
- start = PAGE_ALIGN(start);
- end = PAGE_ALIGN(end);
-- if (end <= start)
-- return;
-- do_brk(start, end - start);
-+ if (end > start) {
-+ unsigned long addr = do_brk(start, end - start);
-+ if (BAD_ADDR(addr))
-+ return addr;
-+ }
-+ return 0;
- }
-
- /*
-@@ -405,7 +410,11 @@ static int load_aout_binary(struct linux
- beyond_if:
- set_binfmt(&aout_format);
-
-- set_brk(current->mm->start_brk, current->mm->brk);
-+ retval = set_brk(current->mm->start_brk, current->mm->brk);
-+ if (retval < 0) {
-+ send_sig(SIGKILL, current, 0);
-+ return retval;
-+ }
-
- retval = setup_arg_pages(bprm);
- if (retval < 0) {
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.binfmt_elf.patch b/sys-kernel/alpha-sources/files/alpha-sources.binfmt_elf.patch
deleted file mode 100644
index f0b319bca0fb..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.binfmt_elf.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff -ur linux-2.4.21/fs/binfmt_elf.c linux-2.4.21.plasmaroo/fs/binfmt_elf.c
---- linux-2.4.21/fs/binfmt_elf.c 2004-08-14 18:15:42.000000000 +0100
-+++ linux-2.4.21.plasmaroo/fs/binfmt_elf.c 2004-11-19 20:48:27.314422552 +0000
-@@ -299,9 +299,12 @@
- goto out;
-
- retval = kernel_read(interpreter,interp_elf_ex->e_phoff,(char *)elf_phdata,size);
-- error = retval;
-- if (retval < 0)
-+ error = -EIO;
-+ if (retval != size) {
-+ if (retval < 0)
-+ error = retval;
- goto out_close;
-+ }
-
- eppnt = elf_phdata;
- for (i=0; i<interp_elf_ex->e_phnum; i++, eppnt++) {
-@@ -473,8 +476,11 @@
- goto out;
-
- retval = kernel_read(bprm->file, elf_ex.e_phoff, (char *) elf_phdata, size);
-- if (retval < 0)
-+ if (retval != size) {
-+ if (retval >= 0)
-+ retval = -EIO;
- goto out_free_ph;
-+ }
-
- retval = get_unused_fd();
- if (retval < 0)
-@@ -499,7 +505,8 @@
- */
-
- retval = -ENOMEM;
-- if (elf_ppnt->p_filesz > PATH_MAX)
-+ if (elf_ppnt->p_filesz > PATH_MAX ||
-+ elf_ppnt->p_filesz == 0)
- goto out_free_file;
- elf_interpreter = (char *) kmalloc(elf_ppnt->p_filesz,
- GFP_KERNEL);
-@@ -509,8 +516,16 @@
- retval = kernel_read(bprm->file, elf_ppnt->p_offset,
- elf_interpreter,
- elf_ppnt->p_filesz);
-- if (retval < 0)
-+ if (retval != elf_ppnt->p_filesz) {
-+ if (retval >= 0)
-+ retval = -EIO;
-+ goto out_free_interp;
-+ }
-+ /* make sure path is NULL terminated */
-+ retval = -EINVAL;
-+ if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0')
- goto out_free_interp;
-+
- /* If the program interpreter is one of these two,
- * then assume an iBCS2 image. Otherwise assume
- * a native linux image.
-@@ -529,8 +544,11 @@
- if (IS_ERR(interpreter))
- goto out_free_interp;
- retval = kernel_read(interpreter, 0, bprm->buf, BINPRM_BUF_SIZE);
-- if (retval < 0)
-+ if (retval != BINPRM_BUF_SIZE) {
-+ if (retval >= 0)
-+ retval = -EIO;
- goto out_free_dentry;
-+ }
-
- /* Get the exec headers */
- interp_ex = *((struct exec *) bprm->buf);
-@@ -967,7 +982,10 @@
- #endif
-
- if (BAD_ADDR(error))
-- continue;
-+ {
-+ send_sig(SIGKILL, current, 0);
-+ goto out_free_dentry;
-+ }
-
- /* PaX: mirror at a randomized base */
- down_write(&current->mm->mmap_sem);
-@@ -1008,7 +1026,10 @@
- {
- error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags);
- if (BAD_ADDR(error))
-- continue;
-+ {
-+ send_sig(SIGKILL, current, 0);
-+ goto out_free_dentry;
-+ }
- }
-
- if (!load_addr_set) {
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.cmdlineLeak.patch b/sys-kernel/alpha-sources/files/alpha-sources.cmdlineLeak.patch
deleted file mode 100644
index 5f26f7f388f6..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.cmdlineLeak.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- linux-2.4/fs/proc/base.c 2004-04-15 07:09:32.000000000 +0100
-+++ linux-2.4/fs/proc/base.c.plasmaroo 2004-08-09 23:30:43.869195800 +0100
-@@ -187,7 +187,7 @@ static int proc_pid_cmdline(struct task_
- if (mm)
- atomic_inc(&mm->mm_users);
- task_unlock(task);
-- if (mm) {
-+ if (mm && mm->arg_end) {
- int len = mm->arg_end - mm->arg_start;
- if (len > PAGE_SIZE)
- len = PAGE_SIZE;
diff --git a/sys-kernel/alpha-sources/files/alpha-sources.munmap.patch b/sys-kernel/alpha-sources/files/alpha-sources.munmap.patch
deleted file mode 100644
index e120b35b7adb..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.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/alpha-sources/files/alpha-sources.rtc_fix.patch b/sys-kernel/alpha-sources/files/alpha-sources.rtc_fix.patch
deleted file mode 100644
index 10e9c228d6d2..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.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/alpha-sources/files/alpha-sources.smbfs.patch b/sys-kernel/alpha-sources/files/alpha-sources.smbfs.patch
deleted file mode 100644
index 1d93802f03be..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.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/alpha-sources/files/alpha-sources.vma.patch b/sys-kernel/alpha-sources/files/alpha-sources.vma.patch
deleted file mode 100644
index 188da50f6655..000000000000
--- a/sys-kernel/alpha-sources/files/alpha-sources.vma.patch
+++ /dev/null
@@ -1,352 +0,0 @@
-diff -ur linux-2.4.28-gentoo-r2/arch/ia64/ia32/binfmt_elf32.c linux-2.4.28-gentoo-r3/arch/ia64/ia32/binfmt_elf32.c
---- linux-2.4.28-gentoo-r2/arch/ia64/ia32/binfmt_elf32.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/arch/ia64/ia32/binfmt_elf32.c 2004-12-24 14:34:29.531899728 +0000
-@@ -95,7 +95,11 @@
- vma->vm_private_data = NULL;
- down_write(&current->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(&current->mm->mmap_sem);
-+ return;
-+ }
- }
- up_write(&current->mm->mmap_sem);
- }
-@@ -117,7 +121,11 @@
- vma->vm_private_data = NULL;
- down_write(&current->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(&current->mm->mmap_sem);
-+ return;
-+ }
- }
- up_write(&current->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(&current->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 -ur linux-2.4.28-gentoo-r2/arch/ia64/kernel/perfmon.c linux-2.4.28-gentoo-r3/arch/ia64/kernel/perfmon.c
---- linux-2.4.28-gentoo-r2/arch/ia64/kernel/perfmon.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/arch/ia64/kernel/perfmon.c 2004-12-24 14:34:29.534899272 +0000
-@@ -967,7 +967,8 @@
- * now insert the vma in the vm list for the process, must be
- * done with mmap lock held
- */
-- insert_vm_struct(mm, vma);
-+ if(insert_vm_struct(mm, vma)) /* Handle -ENOMEM et al. */
-+ goto error;
-
- mm->total_vm += size >> PAGE_SHIFT;
-
-diff -ur linux-2.4.28-gentoo-r2/arch/ia64/mm/init.c linux-2.4.28-gentoo-r3/arch/ia64/mm/init.c
---- linux-2.4.28-gentoo-r2/arch/ia64/mm/init.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/arch/ia64/mm/init.c 2004-12-24 14:34:29.535899120 +0000
-@@ -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(&current->mm->mmap_sem);
-+ if (insert_vm_struct(current->mm, vma)) {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, vma);
-+ return;
-+ }
-+ up_write(&current->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(&current->mm->mmap_sem);
-+ if (insert_vm_struct(current->mm, vma)) {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, vma);
-+ return;
-+ }
-+ up_write(&current->mm->mmap_sem);
- }
- }
- }
-diff -ur linux-2.4.28-gentoo-r2/arch/ppc/mm/fault.c linux-2.4.28-gentoo-r3/arch/ppc/mm/fault.c
---- linux-2.4.28-gentoo-r2/arch/ppc/mm/fault.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/arch/ppc/mm/fault.c 2004-12-24 14:34:29.543897904 +0000
-@@ -83,8 +83,10 @@
- nopage: pax_syscall_nopage,
- };
-
--static void pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
-+static int pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
- {
-+ int ret;
-+
- vma->vm_mm = current->mm;
- vma->vm_start = addr;
- vma->vm_end = addr + PAGE_SIZE;
-@@ -94,8 +96,15 @@
- vma->vm_pgoff = 0UL;
- vma->vm_file = NULL;
- vma->vm_private_data = NULL;
-- insert_vm_struct(current->mm, vma);
-+ ret = insert_vm_struct(current->mm, vma);
-+ if(ret != 0)
-+ {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, vma);
-+ return ret;
-+ }
- ++current->mm->total_vm;
-+ return 0;
- }
- #endif
-
-@@ -333,7 +342,8 @@
- return 1;
- }
-
-- pax_insert_vma(vma, call_syscall);
-+ if(pax_insert_vma(vma, call_syscall))
-+ return 1; /* VMA overlapping attempt; bye bye! */
- current->mm->call_syscall = call_syscall;
- up_write(&current->mm->mmap_sem);
-
-@@ -377,7 +387,8 @@
- return 1;
- }
-
-- pax_insert_vma(vma, call_syscall);
-+ if(pax_insert_vma(vma, call_syscall))
-+ return 1; /* VMA overlapping attempt; bye bye! */
- current->mm->call_syscall = call_syscall;
- up_write(&current->mm->mmap_sem);
-
-diff -ur linux-2.4.28-gentoo-r2/arch/s390x/kernel/exec32.c linux-2.4.28-gentoo-r3/arch/s390x/kernel/exec32.c
---- linux-2.4.28-gentoo-r2/arch/s390x/kernel/exec32.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/arch/s390x/kernel/exec32.c 2004-12-24 14:34:29.543897904 +0000
-@@ -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(&current->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 -ur linux-2.4.28-gentoo-r2/arch/sparc/mm/fault.c linux-2.4.28-gentoo-r3/arch/sparc/mm/fault.c
---- linux-2.4.28-gentoo-r2/arch/sparc/mm/fault.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/arch/sparc/mm/fault.c 2004-12-24 14:34:29.544897752 +0000
-@@ -250,8 +250,10 @@
- nopage: pax_emuplt_nopage,
- };
-
--static void pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
-+static int pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
- {
-+ int ret;
-+
- vma->vm_mm = current->mm;
- vma->vm_start = addr;
- vma->vm_end = addr + PAGE_SIZE;
-@@ -261,8 +263,15 @@
- vma->vm_pgoff = 0UL;
- vma->vm_file = NULL;
- vma->vm_private_data = NULL;
-- insert_vm_struct(current->mm, vma);
-+ ret = insert_vm_struct(current->mm, vma);
-+ if(ret != 0)
-+ {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, vma);
-+ return ret;
-+ }
- ++current->mm->total_vm;
-+ return 0;
- }
-
- /*
-@@ -423,7 +432,8 @@
- return 1;
- }
-
-- pax_insert_vma(vma, call_dl_resolve);
-+ if(pax_insert_vma(vma, call_dl_resolve))
-+ return 1; /* VMA overlapping attempt; bye bye! */
- current->mm->call_dl_resolve = call_dl_resolve;
- up_write(&current->mm->mmap_sem);
-
-diff -ur linux-2.4.28-gentoo-r2/arch/sparc64/mm/fault.c linux-2.4.28-gentoo-r3/arch/sparc64/mm/fault.c
---- linux-2.4.28-gentoo-r2/arch/sparc64/mm/fault.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/arch/sparc64/mm/fault.c 2004-12-24 14:34:29.559895472 +0000
-@@ -338,8 +338,10 @@
- nopage: pax_emuplt_nopage,
- };
-
--static void pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
-+static int pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
- {
-+ int ret;
-+
- vma->vm_mm = current->mm;
- vma->vm_start = addr;
- vma->vm_end = addr + PAGE_SIZE;
-@@ -349,8 +351,15 @@
- vma->vm_pgoff = 0UL;
- vma->vm_file = NULL;
- vma->vm_private_data = NULL;
-- insert_vm_struct(current->mm, vma);
-+ ret = insert_vm_struct(current->mm, vma);
-+ if(ret != 0)
-+ {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, vma);
-+ return ret;
-+ }
- ++current->mm->total_vm;
-+ return 0;
- }
- #endif
-
-@@ -609,7 +618,8 @@
- return 1;
- }
-
-- pax_insert_vma(vma, call_dl_resolve);
-+ if(pax_insert_vma(vma, call_dl_resolve))
-+ return 1; /* VMA overlapping attempt; bye bye! */
- current->mm->call_dl_resolve = call_dl_resolve;
- up_write(&current->mm->mmap_sem);
-
-diff -ur linux-2.4.28-gentoo-r2/arch/x86_64/ia32/ia32_binfmt.c linux-2.4.28-gentoo-r3/arch/x86_64/ia32/ia32_binfmt.c
---- linux-2.4.28-gentoo-r2/arch/x86_64/ia32/ia32_binfmt.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/arch/x86_64/ia32/ia32_binfmt.c 2004-12-24 14:34:29.559895472 +0000
-@@ -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(&current->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 -ur linux-2.4.28-gentoo-r2/fs/exec.c linux-2.4.28-gentoo-r3/fs/exec.c
---- linux-2.4.28-gentoo-r2/fs/exec.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/fs/exec.c 2004-12-24 14:35:52.000000000 +0000
-@@ -358,7 +358,7 @@
- {
- unsigned long stack_base;
- struct vm_area_struct *mpnt;
-- int i;
-+ int i, ret;
-
- #ifdef CONFIG_GRKERNSEC_PAX_SEGMEXEC
- struct vm_area_struct *mpnt_m = NULL;
-@@ -387,7 +387,6 @@
-
- down_write(&current->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(&current->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;
-
- #ifdef CONFIG_GRKERNSEC_PAX_SEGMEXEC
-diff -ur linux-2.4.28-gentoo-r2/include/linux/mm.h linux-2.4.28-gentoo-r3/include/linux/mm.h
---- linux-2.4.28-gentoo-r2/include/linux/mm.h 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/include/linux/mm.h 2004-12-24 14:34:29.000000000 +0000
-@@ -577,7 +577,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 -ur linux-2.4.28-gentoo-r2/mm/mmap.c linux-2.4.28-gentoo-r3/mm/mmap.c
---- linux-2.4.28-gentoo-r2/mm/mmap.c 2004-11-27 20:50:07.000000000 +0000
-+++ linux-2.4.28-gentoo-r3/mm/mmap.c 2004-12-24 14:34:29.000000000 +0000
-@@ -1480,14 +1480,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/alpha-sources/files/digest-alpha-sources-2.4.21-r17 b/sys-kernel/alpha-sources/files/digest-alpha-sources-2.4.21-r17
deleted file mode 100644
index d1abbfcbcf8a..000000000000
--- a/sys-kernel/alpha-sources/files/digest-alpha-sources-2.4.21-r17
+++ /dev/null
@@ -1,4 +0,0 @@
-MD5 f51e12efa18bb828cf57d9d4a81b2fb1 linux-2.4.21.tar.bz2 28533733
-MD5 28094d6a3d68f228bda98af459ad1310 patches-2.4.21-alpha-r3.tar.bz2 1696825
-MD5 b48375b2731b9a99bb3697e90f170ff2 linux-2.4.21-CAN-2004-0415.patch 84284
-MD5 40a2fe3285f641f0aa9398bd338032ca alpha-sources-2.4.21-CAN-2004-0814.patch 82046
diff --git a/sys-kernel/alpha-sources/files/do_brk_fix.patch b/sys-kernel/alpha-sources/files/do_brk_fix.patch
deleted file mode 100644
index fef1f1e981e2..000000000000
--- a/sys-kernel/alpha-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
-@@ -1041,6 +1041,9 @@
- if (!len)
- return addr;
-
-+ if ((addr + len) > TASK_SIZE || (addr + len) < addr)
-+ return -EINVAL;
-+
- /*
- * mlock MCL_FUTURE?
- */