]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- now on HEAD
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 14 Sep 2004 18:39:27 +0000 (18:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    2.6.0-ksyms-add.patch -> 1.2
    2.6.1-all-in-1.patch -> 1.2
    2.6.4-psion-5mx.patch -> 1.2
    2.6.4-rc1-01-esfq-imq.patch -> 1.2
    2.6.4-rc1-02-imq-nat-support.patch -> 1.2
    2.6.4-wrr.patch -> 1.3
    2.6.6-ipt_account.patch -> 1.2
    2.6.6-serial-fifo-lkml.patch -> 1.2
    2.6.6-xfs-qsort-lkml.patch -> 1.2
    2.6.7-kill-warnings.patch -> 1.2
    2.6.7-pom-ng-20040629.patch -> 1.2
    2.6.7-ppc-asm-defs.patch -> 1.2
    2.6.7-ppc-ipr-div.patch -> 1.2
    2.6.8-cpu_feature.patch -> 1.2
    2.6.8-ipt_layer7.patch -> 1.2
    2.6.8-lirc-0.7.0-pre7.patch -> 1.2
    2.6.x-TGA-fbdev-lkml.patch -> 1.2
    exec-shield-make-peace-with-grsecurity.patch -> 1.2
    fbsplash-0.9-r7-2.6.9-rc1.patch -> 1.2
    i2o-build_105-fixes.patch -> 1.2
    kernel-MAX_INIT_ARGS.patch -> 1.2
    kernel-alpha-smp.config -> 1.74
    kernel-alpha.config -> 1.74
    kernel-autoconf.h -> 1.3
    kernel-fbcon-margins.patch -> 1.2
    kernel-grsec+pax.config -> 1.2
    kernel-grsec-2.0.1.patch -> 1.2
    kernel-grsec.config -> 1.29
    kernel-hotfixes.patch -> 1.2
    kernel-i386-smp.config -> 1.60
    kernel-i386.config -> 1.83
    kernel-ia64-smp.config -> 1.2
    kernel-netfilter.config -> 1.39
    kernel-ppc-smp.config -> 1.80
    kernel-ppc.config -> 1.78
    kernel-sparc-smp.config -> 1.51
    kernel-sparc.config -> 1.49
    kernel-sparc64-smp.config -> 1.72
    kernel-sparc64.config -> 1.73
    kernel-x86_64-smp.config -> 1.2
    kernel-x86_64.config -> 1.2
    kernel.FAQ-pl -> 1.2
    linux-2.6-ppc-ksyms.patch -> 1.5
    linux-alpha-isa.patch -> 1.2
    linux-fbcon-margins.patch -> 1.2
    linux-kbuild-extmod.patch -> 1.2
    pramfs-2.6.4.patch -> 1.2
    squashfs2.0-patch -> 1.2

48 files changed:
2.6.0-ksyms-add.patch
2.6.1-all-in-1.patch
2.6.4-psion-5mx.patch
2.6.4-rc1-01-esfq-imq.patch [new file with mode: 0644]
2.6.4-rc1-02-imq-nat-support.patch [new file with mode: 0644]
2.6.4-wrr.patch
2.6.6-ipt_account.patch [new file with mode: 0644]
2.6.6-serial-fifo-lkml.patch
2.6.6-xfs-qsort-lkml.patch
2.6.7-kill-warnings.patch [new file with mode: 0644]
2.6.7-pom-ng-20040629.patch
2.6.7-ppc-asm-defs.patch [new file with mode: 0644]
2.6.7-ppc-ipr-div.patch [new file with mode: 0644]
2.6.8-cpu_feature.patch [new file with mode: 0644]
2.6.8-ipt_layer7.patch [new file with mode: 0644]
2.6.8-lirc-0.7.0-pre7.patch [new file with mode: 0644]
2.6.x-TGA-fbdev-lkml.patch
exec-shield-make-peace-with-grsecurity.patch
fbsplash-0.9-r7-2.6.9-rc1.patch [new file with mode: 0644]
i2o-build_105-fixes.patch [new file with mode: 0644]
kernel-MAX_INIT_ARGS.patch
kernel-alpha-smp.config [new file with mode: 0644]
kernel-alpha.config [new file with mode: 0644]
kernel-autoconf.h [new file with mode: 0644]
kernel-fbcon-margins.patch [new file with mode: 0644]
kernel-grsec+pax.config [new file with mode: 0644]
kernel-grsec-2.0.1.patch [new file with mode: 0644]
kernel-grsec.config [new file with mode: 0644]
kernel-hotfixes.patch [new file with mode: 0644]
kernel-i386-smp.config
kernel-i386.config
kernel-ia64-smp.config
kernel-netfilter.config
kernel-ppc-smp.config [new file with mode: 0644]
kernel-ppc.config [new file with mode: 0644]
kernel-sparc-smp.config [new file with mode: 0644]
kernel-sparc.config [new file with mode: 0644]
kernel-sparc64-smp.config [new file with mode: 0644]
kernel-sparc64.config [new file with mode: 0644]
kernel-x86_64-smp.config [new file with mode: 0644]
kernel-x86_64.config [new file with mode: 0644]
kernel.FAQ-pl [new file with mode: 0644]
linux-2.6-ppc-ksyms.patch
linux-alpha-isa.patch [new file with mode: 0644]
linux-fbcon-margins.patch [new file with mode: 0644]
linux-kbuild-extmod.patch [new file with mode: 0644]
pramfs-2.6.4.patch
squashfs2.0-patch [new file with mode: 0644]

index 7be65af5cf1b2f3f0983cf590d333b2dadfaf231..1bb27f7efec5f32db4b6c498092cbf8d82539286 100644 (file)
@@ -11,7 +11,7 @@
  obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
 --- linux-2.6.0-test7.org/kernel/ksyms.c       1970-01-01 01:00:00.000000000 +0100
 +++ linux-2.6.0-test7/kernel/ksyms.c   2003-10-17 14:51:04.000000000 +0200
-@@ -0,0 +1,60 @@
+@@ -0,0 +1,64 @@
 +#include <linux/config.h>
 +#include <linux/slab.h>
 +#include <linux/module.h>
@@ -72,3 +72,7 @@
 +#endif
 +
 +EXPORT_SYMBOL(percpu_counter_mod);
++
++// for jffs
++EXPORT_SYMBOL(set_special_pids);
++
index ebe98c1acad6333626c14013a28bf3c76e9a036e..35f0ab9ccdc8521768a26f5d976e83b0cf5aced9 100644 (file)
@@ -34,52 +34,6 @@ diff -Naur --exclude '*.orig' --exclude '*.rej' linux-2.6.1-gentoo/drivers/char/
  obj-$(CONFIG_DS1620) += ds1620.o
  obj-$(CONFIG_HW_RANDOM) += hw_random.o
  obj-$(CONFIG_QIC02_TAPE) += tpqic02.o
-diff -Naur --exclude '*.orig' --exclude '*.rej' linux-2.6.1-gentoo/drivers/char/drm/radeon_cp.c linux-2.6.1-gentoo-test/drivers/char/drm/radeon_cp.c
---- linux-2.6.1-gentoo/drivers/char/drm/radeon_cp.c    2004-01-09 23:40:12.000000000 +0000
-+++ linux-2.6.1-gentoo-test/drivers/char/drm/radeon_cp.c       2004-01-09 23:33:45.000000000 +0000
-@@ -855,7 +855,8 @@
-       /* Initialize the memory controller */
-       RADEON_WRITE( RADEON_MC_FB_LOCATION,
--                    (dev_priv->gart_vm_start - 1) & 0xffff0000 );
-+                    ((dev_priv->gart_vm_start - 1) & 0xffff0000 ) |
-+                    (dev_priv->fb_base >> 16));
- #if __REALLY_HAVE_AGP
-       if ( !dev_priv->is_pci ) {
-@@ -1071,13 +1072,6 @@
-       dev_priv->depth_offset  = init->depth_offset;
-       dev_priv->depth_pitch   = init->depth_pitch;
--      dev_priv->front_pitch_offset = (((dev_priv->front_pitch/64) << 22) |
--                                      (dev_priv->front_offset >> 10));
--      dev_priv->back_pitch_offset = (((dev_priv->back_pitch/64) << 22) |
--                                     (dev_priv->back_offset >> 10));
--      dev_priv->depth_pitch_offset = (((dev_priv->depth_pitch/64) << 22) |
--                                      (dev_priv->depth_offset >> 10));
--
-       /* Hardware state for depth clears.  Remove this if/when we no
-        * longer clear the depth buffer with a 3D rectangle.  Hard-code
-        * all values to prevent unwanted 3D state from slipping through
-@@ -1204,9 +1198,17 @@
-                          dev_priv->buffers->handle );
-       }
-+      dev_priv->fb_base = (RADEON_READ( RADEON_MC_FB_LOCATION ) & 0xffff) << 16;
-+        dev_priv->front_pitch_offset = (((dev_priv->front_pitch/64) << 22) |
-+                                       ((dev_priv->front_offset+dev_priv->fb_base) >> 10));
-+        dev_priv->back_pitch_offset = (((dev_priv->back_pitch/64) << 22) |
-+                                      ((dev_priv->back_offset+dev_priv->fb_base) >> 10));
-+        dev_priv->depth_pitch_offset = (((dev_priv->depth_pitch/64) << 22) |
-+                                       ((dev_priv->depth_offset+dev_priv->fb_base) >> 10));
-       dev_priv->gart_size = init->gart_size;
--      dev_priv->gart_vm_start = RADEON_READ( RADEON_CONFIG_APER_SIZE );
-+      dev_priv->gart_vm_start = RADEON_READ( RADEON_CONFIG_APER_SIZE ) + dev_priv->fb_base;
-+
- #if __REALLY_HAVE_AGP
-       if ( !dev_priv->is_pci )
-               dev_priv->gart_buffers_offset = (dev_priv->buffers->offset
 diff -Naur --exclude '*.orig' --exclude '*.rej' linux-2.6.1-gentoo/drivers/char/drm/radeon_drv.h linux-2.6.1-gentoo-test/drivers/char/drm/radeon_drv.h
 --- linux-2.6.1-gentoo/drivers/char/drm/radeon_drv.h   2004-01-09 23:40:12.000000000 +0000
 +++ linux-2.6.1-gentoo-test/drivers/char/drm/radeon_drv.h      2004-01-09 22:32:40.000000000 +0000
index 7039e4feb792b1d994d663e4bc55f9fdf6454c60..ffaea67f122e4d8bba92778e97e9f9e450499b20 100644 (file)
@@ -29,23 +29,23 @@ diff -Nur linux-2.6.4-rc2.org/arch/arm/Kconfig linux-2.6.4-rc2/arch/arm/Kconfig
  # Select various configuration options depending on the machine type
  config DISCONTIGMEM
        bool
--      depends on ARCH_EDB7211 || ARCH_SA1100
-+      depends on ARCH_EDB7211 || ARCH_PSIONW || ARCH_SA1100
+-      depends on ARCH_EDB7211 || ARCH_SA1100 || (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
++      depends on ARCH_EDB7211 || ARCH_PSIONW || ARCH_SA1100 || (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
        default y
        help
          Say Y to upport efficient handling of discontiguous physical memory,
-diff -Nur linux-2.6.4-rc2.org/arch/arm/Makefile linux-2.6.4-rc2/arch/arm/Makefile
---- linux-2.6.4-rc2.org/arch/arm/Makefile      2004-03-09 13:22:59.000000000 +0000
-+++ linux-2.6.4-rc2/arch/arm/Makefile  2004-03-09 13:25:56.000000000 +0000
-@@ -99,6 +99,8 @@
-  machine-$(CONFIG_ARCH_ANAKIN)           := anakin
-  machine-$(CONFIG_ARCH_IOP3XX)           := iop3xx
-  machine-$(CONFIG_ARCH_ADIFCC)           := adifcc
-+textaddr-$(CONFIG_ARCH_PSIONW)     := 0xc0048000
-+ machine-$(CONFIG_ARCH_PSIONW)     := psionw
+diff -Nur linux-2.6.8.1.org/arch/arm/Makefile linux-2.6.8.1/arch/arm/Makefile
+--- linux-2.6.8.1.org/arch/arm/Makefile        2004-08-23 12:19:49.543457568 +0200
++++ linux-2.6.8.1/arch/arm/Makefile    2004-08-23 12:24:49.168907576 +0200
+@@ -94,6 +94,8 @@
+  machine-$(CONFIG_ARCH_S3C2410)          := s3c2410
+  machine-$(CONFIG_ARCH_LH7A40X)          := lh7a40x
+  machine-$(CONFIG_ARCH_VERSATILE_PB) := versatile
++textaddr-$(CONFIG_ARCH_PSIONW)           := 0xc0048000
++ machine-$(CONFIG_ARCH_PSIONW)           := psionw
+  machine-$(CONFIG_ARCH_IMX)      := imx
  
- MACHINE  := $(machine-y)
- TEXTADDR := $(textaddr-y)
+ ifeq ($(CONFIG_ARCH_EBSA110),y)
 diff -Nur linux-2.6.4-rc2.org/arch/arm/configs/psionw_defconfig linux-2.6.4-rc2/arch/arm/configs/psionw_defconfig
 --- linux-2.6.4-rc2.org/arch/arm/configs/psionw_defconfig      1970-01-01 00:00:00.000000000 +0000
 +++ linux-2.6.4-rc2/arch/arm/configs/psionw_defconfig  2004-03-09 13:25:56.000000000 +0000
@@ -557,9 +557,9 @@ diff -Nur linux-2.6.4-rc2.org/arch/arm/kernel/debug.S linux-2.6.4-rc2/arch/arm/k
 +1002:
 +                .endm
 +      
- #elif defined(CONFIG_ARCH_ANAKIN)
+ #elif defined(CONFIG_ARCH_CAMELOT)
  
//#//include <asm/arch/serial_reg.h>
#include <asm/arch/excalibur.h>
 diff -Nur linux-2.6.4-rc2.org/arch/arm/kernel/entry-armv.S linux-2.6.4-rc2/arch/arm/kernel/entry-armv.S
 --- linux-2.6.4-rc2.org/arch/arm/kernel/entry-armv.S   2004-03-04 06:16:41.000000000 +0000
 +++ linux-2.6.4-rc2/arch/arm/kernel/entry-armv.S       2004-03-09 13:25:56.000000000 +0000
@@ -1663,9 +1663,9 @@ diff -Nur linux-2.6.4-rc2.org/drivers/serial/Kconfig linux-2.6.4-rc2/drivers/ser
 +        your boot loader (lilo or loadlin) about how to pass options to the
 +        kernel at boot time.)
 +
- config SERIAL_INTEGRATOR
-       bool
-       depends on SERIAL_AMBA && ARCH_INTEGRATOR
+ config SERIAL_CLPS711X
+       tristate "CLPS771X serial port supprot:
+       depends on ARM && ARCH_CLPS711X
 diff -Nur linux-2.6.4-rc2.org/drivers/serial/Makefile linux-2.6.4-rc2/drivers/serial/Makefile
 --- linux-2.6.4-rc2.org/drivers/serial/Makefile        2004-03-04 06:16:46.000000000 +0000
 +++ linux-2.6.4-rc2/drivers/serial/Makefile    2004-03-09 13:29:22.000000000 +0000
diff --git a/2.6.4-rc1-01-esfq-imq.patch b/2.6.4-rc1-01-esfq-imq.patch
new file mode 100644 (file)
index 0000000..6f95670
--- /dev/null
@@ -0,0 +1,1258 @@
+diff -uNr linux-2.6.4-rc1/drivers/net.orig/imq.c linux-2.6.4-rc1/drivers/net/imq.c
+--- linux-2.6.4-rc1/drivers/net.orig/imq.c     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.4-rc1/drivers/net/imq.c  2004-03-03 03:43:30.262457760 +0100
+@@ -0,0 +1,321 @@
++/*
++ *             Pseudo-driver for the intermediate queue device.
++ *
++ *             This program is free software; you can redistribute it and/or
++ *             modify it under the terms of the GNU General Public License
++ *             as published by the Free Software Foundation; either version
++ *             2 of the License, or (at your option) any later version.
++ *
++ * Authors:    Patrick McHardy, <kaber@trash.net>
++ *
++ *           The first version was written by Martin Devera, <devik@cdi.cz>
++ *
++ * Credits:    Jan Rafaj <imq2t@cedric.vabo.cz>
++ *              - Update patch to 2.4.21
++ *             Sebastian Strollo <sstrollo@nortelnetworks.com>
++ *              - Fix "Dead-loop on netdevice imq"-issue
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/config.h>
++#include <linux/skbuff.h>
++#include <linux/netdevice.h>
++#include <linux/rtnetlink.h>
++#include <linux/if_arp.h>
++#include <linux/netfilter.h>
++#include <linux/netfilter_ipv4.h>
++#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
++#include <linux/netfilter_ipv6.h>
++#endif
++#include <linux/imq.h>
++#include <net/pkt_sched.h>
++
++static nf_hookfn imq_nf_hook;
++
++static struct nf_hook_ops imq_ingress_ipv4 = {
++      .hook           = imq_nf_hook,
++      .owner          = THIS_MODULE,
++      .pf             = PF_INET,
++      .hooknum        = NF_IP_PRE_ROUTING,
++      .priority       = NF_IP_PRI_MANGLE + 1
++};
++
++static struct nf_hook_ops imq_egress_ipv4 = {
++      .hook           = imq_nf_hook,
++      .owner          = THIS_MODULE,
++      .pf             = PF_INET,
++      .hooknum        = NF_IP_POST_ROUTING,
++      .priority       = NF_IP_PRI_LAST
++};
++
++#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
++static struct nf_hook_ops imq_ingress_ipv6 = {
++      .hook           = imq_nf_hook,
++      .owner          = THIS_MODULE,
++      .pf             = PF_INET6,
++      .hooknum        = NF_IP6_PRE_ROUTING,
++      .priority       = NF_IP6_PRI_MANGLE + 1
++};
++
++static struct nf_hook_ops imq_egress_ipv6 = {
++      .hook           = imq_nf_hook,
++      .owner          = THIS_MODULE,
++      .pf             = PF_INET6,
++      .hooknum        = NF_IP6_POST_ROUTING,
++      .priority       = NF_IP6_PRI_LAST
++};
++#endif
++
++static unsigned int numdevs = 2;
++
++MODULE_PARM(numdevs, "i");
++MODULE_PARM_DESC(numdevs, "number of imq devices");
++
++static struct net_device *imq_devs;
++
++
++static struct net_device_stats *imq_get_stats(struct net_device *dev)
++{
++      return (struct net_device_stats *)dev->priv;
++}
++
++/* called for packets kfree'd in qdiscs at places other than enqueue */
++static void imq_skb_destructor(struct sk_buff *skb)
++{
++      struct nf_info *info = skb->nf_info;
++
++      if (info) {
++              if (info->indev)
++                      dev_put(info->indev);
++              if (info->outdev)
++                      dev_put(info->outdev);
++              kfree(info);
++      }
++}
++
++static int imq_dev_xmit(struct sk_buff *skb, struct net_device *dev)
++{
++      struct net_device_stats *stats = (struct net_device_stats*) dev->priv;
++      
++      stats->tx_bytes += skb->len;
++      stats->tx_packets++;
++
++      skb->imq_flags = 0;
++      skb->destructor = NULL;
++      
++      dev->trans_start = jiffies;
++      nf_reinject(skb, skb->nf_info, NF_ACCEPT);
++      return 0;
++}
++
++static int imq_nf_queue(struct sk_buff *skb, struct nf_info *info,
++                      void *data)
++{
++      struct net_device *dev;
++      struct net_device_stats *stats;
++      struct sk_buff *skb2 = NULL;
++      struct Qdisc *q;
++      unsigned int index = skb->imq_flags&IMQ_F_IFMASK;
++      int ret = -1;
++
++      if (index > numdevs) 
++              return -1;
++      
++      dev = imq_devs + index;
++      if (!(dev->flags & IFF_UP)) {
++              skb->imq_flags = 0;
++              nf_reinject(skb, info, NF_ACCEPT);
++              return 0;
++      }
++      dev->last_rx = jiffies;
++
++      if (skb->destructor) {
++              skb2 = skb;
++              skb = skb_clone(skb, GFP_ATOMIC);
++              if (!skb)
++                      return -1;
++      }
++      skb->nf_info = info;
++
++      stats = (struct net_device_stats *)dev->priv;
++      stats->rx_bytes+= skb->len;
++      stats->rx_packets++;
++      
++      spin_lock_bh(&dev->queue_lock);
++      q = dev->qdisc;
++      if (q->enqueue) {
++              q->enqueue(skb_get(skb), q);
++              if (skb_shared(skb)) {
++                      skb->destructor = imq_skb_destructor;
++                      kfree_skb(skb);
++                      ret = 0;
++              }
++      }
++      if (spin_is_locked(&dev->xmit_lock))
++              netif_schedule(dev);
++      else
++              while (!netif_queue_stopped(dev) && (qdisc_restart(dev) < 0));
++      spin_unlock_bh(&dev->queue_lock);
++
++      if (skb2)
++              kfree_skb(ret ? skb : skb2);
++
++      return ret;
++}
++
++static unsigned int imq_nf_hook(unsigned int hook, struct sk_buff **pskb,
++                 const struct net_device *indev,
++                 const struct net_device *outdev,
++                 int (*okfn)(struct sk_buff *))
++{
++      if ((*pskb)->imq_flags & IMQ_F_ENQUEUE)
++              return NF_QUEUE;
++
++      return NF_ACCEPT;
++}
++
++
++static int __init imq_init_hooks(void)
++{
++      int err;
++
++      if ((err = nf_register_queue_handler(PF_INET, imq_nf_queue, NULL)))
++              goto err1;
++      if ((err = nf_register_hook(&imq_ingress_ipv4)))
++              goto err2;
++      if ((err = nf_register_hook(&imq_egress_ipv4)))
++              goto err3;
++#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
++      if ((err = nf_register_queue_handler(PF_INET6, imq_nf_queue, NULL)))
++              goto err4;
++      if ((err = nf_register_hook(&imq_ingress_ipv6)))
++              goto err5;
++      if ((err = nf_register_hook(&imq_egress_ipv6)))
++              goto err6;
++#endif
++      
++      return 0;
++      
++#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
++err6:
++      nf_unregister_hook(&imq_ingress_ipv6);
++err5:
++      nf_unregister_queue_handler(PF_INET6);
++err4:
++      nf_unregister_hook(&imq_egress_ipv4);
++#endif
++err3:
++      nf_unregister_hook(&imq_ingress_ipv4);
++err2:
++      nf_unregister_queue_handler(PF_INET);
++err1:
++      return err;
++}
++
++static void __exit imq_unhook(void)
++{
++      nf_unregister_hook(&imq_ingress_ipv4);
++      nf_unregister_hook(&imq_egress_ipv4);
++      nf_unregister_queue_handler(PF_INET);
++#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
++      nf_unregister_hook(&imq_ingress_ipv6);
++      nf_unregister_hook(&imq_egress_ipv6);
++      nf_unregister_queue_handler(PF_INET6);
++#endif
++}
++
++static int __init imq_dev_init(struct net_device *dev)
++{
++      dev->hard_start_xmit    = imq_dev_xmit;
++      dev->type               = ARPHRD_VOID;
++      dev->mtu                = 1500;
++      dev->tx_queue_len       = 30;
++      dev->flags              = IFF_NOARP;
++      dev->priv = kmalloc(sizeof(struct net_device_stats), GFP_KERNEL);
++      if (dev->priv == NULL)
++              return -ENOMEM;
++      memset(dev->priv, 0, sizeof(struct net_device_stats));
++      dev->get_stats          = imq_get_stats;
++
++      return 0;
++}
++
++static void imq_dev_uninit(struct net_device *dev)
++{
++      kfree(dev->priv);
++}
++
++static int __init imq_init_devs(void)
++{
++      struct net_device *dev;
++      int i;
++
++      if (!numdevs || numdevs > IMQ_MAX_DEVS) {
++              printk(KERN_ERR "numdevs has to be betweed 1 and %u\n",
++                     IMQ_MAX_DEVS);
++              return -EINVAL;
++      }
++
++      imq_devs = kmalloc(sizeof(struct net_device) * numdevs, GFP_KERNEL);
++      if (!imq_devs)
++              return -ENOMEM;
++      memset(imq_devs, 0, sizeof(struct net_device) * numdevs);
++
++      /* we start counting at zero */
++      numdevs--;
++
++      for (i = 0, dev = imq_devs; i <= numdevs; i++, dev++) {
++              SET_MODULE_OWNER(dev);
++              strcpy(dev->name, "imq%d");
++              dev->init   = imq_dev_init;
++              dev->uninit = imq_dev_uninit;
++
++              if (register_netdev(dev) < 0)
++                      goto err_register;
++      }
++      return 0;
++
++err_register:
++      for (; i; i--)
++              unregister_netdev(--dev);
++      kfree(imq_devs);
++      return -EIO;
++}
++
++static void imq_cleanup_devs(void)
++{
++      int i;
++      struct net_device *dev = imq_devs;
++      
++      for (i = 0; i <= numdevs; i++)
++              unregister_netdev(dev++);
++
++      kfree(imq_devs);
++}
++
++static int __init imq_init_module(void)
++{
++      int err;
++
++      if ((err = imq_init_devs()))
++              return err;
++      if ((err = imq_init_hooks())) {
++              imq_cleanup_devs();
++              return err;
++      }
++
++      printk(KERN_INFO "imq driver loaded.\n");
++
++      return 0;
++}
++
++static void __exit imq_cleanup_module(void)
++{
++      imq_unhook();
++      imq_cleanup_devs();
++}
++
++module_init(imq_init_module);
++module_exit(imq_cleanup_module);
++MODULE_LICENSE("GPL");
+diff -uNr linux-2.6.4-rc1/drivers/net.orig/Kconfig linux-2.6.4-rc1/drivers/net/Kconfig
+--- linux-2.6.4-rc1/drivers/net.orig/Kconfig   2004-03-03 03:30:33.000000000 +0100
++++ linux-2.6.4-rc1/drivers/net/Kconfig        2004-03-03 03:43:30.237461560 +0100
+@@ -85,6 +85,20 @@
+         To compile this driver as a module, choose M here: the module
+         will be called eql.  If unsure, say N.
++config IMQ
++      tristate "IMQ (intermediate queueing device) support"
++      depends on NETDEVICES && NETFILTER
++      ---help---
++        The imq device(s) is used as placeholder for QoS queueing disciplines.
++        Every packet entering/leaving the ip stack can be directed through
++        the imq device where it's enqueued/dequeued to the attached qdisc.
++        This allows you to treat network devices as classes and distribute
++        bandwidth among them. Iptables is used to specify through which imq
++        device, if any, packets travel.
++        
++        To compile this driver as a module, choose M here: the module
++        will be called imq.  If unsure, say N.
++
+ config TUN
+       tristate "Universal TUN/TAP device driver support"
+       depends on NETDEVICES
+diff -uNr linux-2.6.4-rc1/drivers/net.orig/Makefile linux-2.6.4-rc1/drivers/net/Makefile
+--- linux-2.6.4-rc1/drivers/net.orig/Makefile  2004-03-03 03:30:33.000000000 +0100
++++ linux-2.6.4-rc1/drivers/net/Makefile       2004-03-03 03:43:30.240461104 +0100
+@@ -112,6 +112,7 @@
+ endif
+ obj-$(CONFIG_DUMMY) += dummy.o
++obj-$(CONFIG_IMQ) += imq.o
+ obj-$(CONFIG_DE600) += de600.o
+ obj-$(CONFIG_DE620) += de620.o
+ obj-$(CONFIG_LANCE) += lance.o
+diff -uNr linux-2.6.4-rc1/include.orig/linux/imq.h linux-2.6.4-rc1/include/linux/imq.h
+--- linux-2.6.4-rc1/include.orig/linux/imq.h   1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.4-rc1/include/linux/imq.h        2004-03-03 03:43:30.264457456 +0100
+@@ -0,0 +1,9 @@
++#ifndef _IMQ_H
++#define _IMQ_H
++
++#define IMQ_MAX_DEVS  16
++
++#define IMQ_F_IFMASK  0x7f
++#define IMQ_F_ENQUEUE 0x80
++
++#endif /* _IMQ_H */
+diff -uNr linux-2.6.4-rc1/include.orig/linux/netfilter_ipv4/ipt_IMQ.h linux-2.6.4-rc1/include/linux/netfilter_ipv4/ipt_IMQ.h
+--- linux-2.6.4-rc1/include.orig/linux/netfilter_ipv4/ipt_IMQ.h        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.4-rc1/include/linux/netfilter_ipv4/ipt_IMQ.h     2004-03-03 03:43:30.265457304 +0100
+@@ -0,0 +1,8 @@
++#ifndef _IPT_IMQ_H
++#define _IPT_IMQ_H
++
++struct ipt_imq_info {
++      unsigned int todev;     /* target imq device */
++};
++
++#endif /* _IPT_IMQ_H */
+diff -uNr linux-2.6.4-rc1/include.orig/linux/pkt_sched.h linux-2.6.4-rc1/include/linux/pkt_sched.h
+--- linux-2.6.4-rc1/include.orig/linux/pkt_sched.h     2004-02-27 23:21:25.000000000 +0100
++++ linux-2.6.4-rc1/include/linux/pkt_sched.h  2004-03-03 03:43:30.297452440 +0100
+@@ -157,6 +157,13 @@
+ /* SFQ section */
++enum
++{
++      TCA_SFQ_HASH_CLASSIC,
++      TCA_SFQ_HASH_DST,
++      TCA_SFQ_HASH_SRC,
++};
++
+ struct tc_sfq_qopt
+ {
+       unsigned        quantum;        /* Bytes per round allocated to flow */
+@@ -164,6 +171,7 @@
+       __u32           limit;          /* Maximal packets in queue */
+       unsigned        divisor;        /* Hash divisor  */
+       unsigned        flows;          /* Maximal number of flows  */
++      unsigned        hash_kind;      /* Hash function to use for flow identification */
+ };
+ /*
+@@ -173,6 +181,8 @@
+  *
+  *    The only reason for this is efficiency, it is possible
+  *    to change these parameters in compile time.
++ *    
++ *    If you need to play with this values use esfq.
+  */
+ /* RED section */
+diff -uNr linux-2.6.4-rc1/include.orig/linux/skbuff.h linux-2.6.4-rc1/include/linux/skbuff.h
+--- linux-2.6.4-rc1/include.orig/linux/skbuff.h        2004-02-27 23:21:03.000000000 +0100
++++ linux-2.6.4-rc1/include/linux/skbuff.h     2004-03-03 03:43:30.309450616 +0100
+@@ -112,6 +112,9 @@
+ #endif
+ #endif
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++struct nf_info;
++#endif
+ struct sk_buff_head {
+       /* These two members must be first. */
+@@ -237,6 +240,7 @@
+                               mac_len,
+                               csum;
+       unsigned char           local_df,
++                              imq_flags,
+                               cloned,
+                               pkt_type,
+                               ip_summed;
+@@ -264,6 +268,9 @@
+ #ifdef CONFIG_NET_SCHED
+        __u32                  tc_index;               /* traffic control index */
+ #endif
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++      struct nf_info          *nf_info;
++#endif
+       /* These elements must be at the end, see alloc_skb() for details.  */
+       unsigned int            truesize;
+diff -uNr linux-2.6.4-rc1/net.orig/core/skbuff.c linux-2.6.4-rc1/net/core/skbuff.c
+--- linux-2.6.4-rc1/net.orig/core/skbuff.c     2004-02-27 23:21:25.000000000 +0100
++++ linux-2.6.4-rc1/net/core/skbuff.c  2004-03-03 03:43:30.316449552 +0100
+@@ -152,6 +152,13 @@
+       skb_shinfo(skb)->tso_size = 0;
+       skb_shinfo(skb)->tso_segs = 0;
+       skb_shinfo(skb)->frag_list = NULL;
++
++/* probably doomed to failure */
++#if defined(CONFIG_IMQ) || defined (CONFIG_IMQ_MODULE)
++      skb->imq_flags = 0;
++      skb->nf_info = NULL;
++#endif
++                
+ out:
+       return skb;
+ nodata:
+@@ -313,6 +320,10 @@
+ #ifdef CONFIG_NET_SCHED
+       C(tc_index);
+ #endif
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++      C(imq_flags);
++      C(nf_info);
++#endif
+       C(truesize);
+       atomic_set(&n->users, 1);
+       C(head);
+@@ -368,6 +379,10 @@
+ #ifdef CONFIG_NET_SCHED
+       new->tc_index   = old->tc_index;
+ #endif
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++      new->imq_flags=old->imq_flags;
++      new->nf_info=old->nf_info;
++#endif
+       atomic_set(&new->users, 1);
+ }
+diff -uNr linux-2.6.4-rc1/net.orig/ipv4/netfilter/ipt_IMQ.c linux-2.6.4-rc1/net/ipv4/netfilter/ipt_IMQ.c
+--- linux-2.6.4-rc1/net.orig/ipv4/netfilter/ipt_IMQ.c  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.4-rc1/net/ipv4/netfilter/ipt_IMQ.c       2004-03-03 03:43:30.322448640 +0100
+@@ -0,0 +1,76 @@
++/* This target marks packets to be enqueued to an imq device */
++#include <linux/module.h>
++#include <linux/skbuff.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ipt_IMQ.h>
++#include <linux/imq.h>
++
++static unsigned int imq_target(struct sk_buff **pskb,
++                             const struct net_device *in,
++                             const struct net_device *out,
++                             unsigned int hooknum,
++                             const void *targinfo,
++                             void *userinfo)
++{
++      struct ipt_imq_info *mr = (struct ipt_imq_info*)targinfo;
++
++      (*pskb)->imq_flags = mr->todev | IMQ_F_ENQUEUE;
++      (*pskb)->nfcache |= NFC_ALTERED;
++
++      return IPT_CONTINUE;
++}
++
++static int imq_checkentry(const char *tablename,
++                        const struct ipt_entry *e,
++                        void *targinfo,
++                        unsigned int targinfosize,
++                        unsigned int hook_mask)
++{
++      struct ipt_imq_info *mr;
++
++      if (targinfosize != IPT_ALIGN(sizeof(struct ipt_imq_info))) {
++              printk(KERN_WARNING "IMQ: invalid targinfosize\n");
++              return 0;
++      }
++      mr = (struct ipt_imq_info*)targinfo;
++
++      if (strcmp(tablename, "mangle") != 0) {
++              printk(KERN_WARNING
++                     "IMQ: IMQ can only be called from \"mangle\" table, not \"%s\"\n",
++                     tablename);
++              return 0;
++      }
++      
++      if (mr->todev > IMQ_MAX_DEVS) {
++              printk(KERN_WARNING
++                     "IMQ: invalid device specified, highest is %u\n",
++                     IMQ_MAX_DEVS);
++              return 0;
++      }
++      
++      return 1;
++}
++
++static struct ipt_target ipt_imq_reg = {
++      .name           = "IMQ",
++      .target         = imq_target,
++      .checkentry     = imq_checkentry,
++      .me             = THIS_MODULE
++};
++
++static int __init init(void)
++{
++      if (ipt_register_target(&ipt_imq_reg))
++              return -EINVAL;
++
++      return 0;
++}
++
++static void __exit fini(void)
++{
++      ipt_unregister_target(&ipt_imq_reg);
++}
++
++module_init(init);
++module_exit(fini);
++MODULE_LICENSE("GPL");
+diff -uNr linux-2.6.4-rc1/net.orig/ipv4/netfilter/Kconfig linux-2.6.4-rc1/net/ipv4/netfilter/Kconfig
+--- linux-2.6.4-rc1/net.orig/ipv4/netfilter/Kconfig    2004-03-03 03:30:33.000000000 +0100
++++ linux-2.6.4-rc1/net/ipv4/netfilter/Kconfig 2004-03-03 03:43:30.318449248 +0100
+@@ -501,6 +501,15 @@
+         To compile it as a module, choose M here.  If unsure, say N.
++config IP_NF_TARGET_IMQ
++      tristate "IMQ target support"
++      depends on IP_NF_IPTABLES
++      ---help---
++        This option adds a `IMQ' target which is used to specify if and
++        to which imq device packets should get enqueued/dequeued.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
+ config IP_NF_TARGET_TCPMSS
+       tristate "TCPMSS target support"
+       depends on IP_NF_IPTABLES
+diff -uNr linux-2.6.4-rc1/net.orig/ipv4/netfilter/Makefile linux-2.6.4-rc1/net/ipv4/netfilter/Makefile
+--- linux-2.6.4-rc1/net.orig/ipv4/netfilter/Makefile   2004-03-03 03:30:33.000000000 +0100
++++ linux-2.6.4-rc1/net/ipv4/netfilter/Makefile        2004-03-03 03:43:30.321448792 +0100
+@@ -88,6 +88,7 @@
+ obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
+ obj-$(CONFIG_IP_NF_TARGET_DSCP) += ipt_DSCP.o
+ obj-$(CONFIG_IP_NF_TARGET_MARK) += ipt_MARK.o
++obj-$(CONFIG_IP_NF_TARGET_IMQ) += ipt_IMQ.o
+ obj-$(CONFIG_IP_NF_TARGET_IPMARK) += ipt_IPMARK.o
+ obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
+ obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
+diff -uNr linux-2.6.4-rc1/net.orig/sched/Kconfig linux-2.6.4-rc1/net/sched/Kconfig
+--- linux-2.6.4-rc1/net.orig/sched/Kconfig     2004-02-27 23:21:28.000000000 +0100
++++ linux-2.6.4-rc1/net/sched/Kconfig  2004-03-03 03:43:30.326448032 +0100
+@@ -114,6 +114,24 @@
+         To compile this code as a module, choose M here: the
+         module will be called sch_sfq.
++config NET_SCH_ESFQ
++      tristate "ESFQ queue"
++      depends on NET_SCHED
++      ---help---
++        Say Y here if you want to use the Enhanced Stochastic Fairness
++        Queueing (ESFQ) packet scheduling algorithm for some of your network
++        devices or as a leaf discipline for the CBQ scheduling algorithm (see
++        the top of <file:net/sched/sch_esfq.c> for details and references
++        about the SFQ algorithm).
++        
++        This is an enchanced SFQ version which allows you to control the
++        hardcoded values in the SFQ scheduler: queue depth, hash table size,
++        queues limit. Also adds control to the hash function used to identify
++        packet flows. Hash by src or dst ip and original sfq hash.
++        
++        To compile this code as a module, choose M here: the
++        module will be called sch_esfq.
++
+ config NET_SCH_TEQL
+       tristate "TEQL queue"
+       depends on NET_SCHED
+diff -uNr linux-2.6.4-rc1/net.orig/sched/Makefile linux-2.6.4-rc1/net/sched/Makefile
+--- linux-2.6.4-rc1/net.orig/sched/Makefile    2004-02-27 23:21:02.000000000 +0100
++++ linux-2.6.4-rc1/net/sched/Makefile 2004-03-03 03:44:30.385317696 +0100
+@@ -18,6 +18,7 @@
+ obj-$(CONFIG_NET_SCH_INGRESS) += sch_ingress.o 
+ obj-$(CONFIG_NET_SCH_DSMARK)  += sch_dsmark.o
+ obj-$(CONFIG_NET_SCH_SFQ)     += sch_sfq.o
++obj-$(CONFIG_NET_SCH_ESFQ)    += sch_esfq.o
+ obj-$(CONFIG_NET_SCH_TBF)     += sch_tbf.o
+ obj-$(CONFIG_NET_SCH_TEQL)    += sch_teql.o
+ obj-$(CONFIG_NET_SCH_PRIO)    += sch_prio.o
+diff -uNr linux-2.6.4-rc1/net.orig/sched/sch_esfq.c linux-2.6.4-rc1/net/sched/sch_esfq.c
+--- linux-2.6.4-rc1/net.orig/sched/sch_esfq.c  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.4-rc1/net/sched/sch_esfq.c       2004-03-03 03:43:30.332447120 +0100
+@@ -0,0 +1,586 @@
++/*
++ * net/sched/sch_esfq.c       Extended Stochastic Fairness Queueing discipline.
++ *
++ *            This program is free software; you can redistribute it and/or
++ *            modify it under the terms of the GNU General Public License
++ *            as published by the Free Software Foundation; either version
++ *            2 of the License, or (at your option) any later version.
++ *
++ * Authors:   Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
++ *
++ * Changes:   Alexander Atanasov, <alex@ssi.bg>
++ *            Added dynamic depth,limit,divisor,hash_kind options.
++ *            Added dst and src hashes.
++ */
++
++#include <linux/config.h>
++#include <linux/module.h>
++#include <asm/uaccess.h>
++#include <asm/system.h>
++#include <asm/bitops.h>
++#include <linux/types.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/string.h>
++#include <linux/mm.h>
++#include <linux/socket.h>
++#include <linux/sockios.h>
++#include <linux/in.h>
++#include <linux/errno.h>
++#include <linux/interrupt.h>
++#include <linux/if_ether.h>
++#include <linux/inet.h>
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/notifier.h>
++#include <linux/init.h>
++#include <net/ip.h>
++#include <linux/ipv6.h>
++#include <net/route.h>
++#include <linux/skbuff.h>
++#include <net/sock.h>
++#include <net/pkt_sched.h>
++
++
++/*    Stochastic Fairness Queuing algorithm.
++      For more comments look at sch_sfq.c.
++      The difference is that you can change limit, depth,
++      hash table size and choose 3 hash types.
++      
++      classic:        same as in sch_sfq.c
++      dst:            destination IP address
++      src:            source IP address
++      
++      TODO: 
++              make sfq_change work.
++*/
++
++
++/* This type should contain at least SFQ_DEPTH*2 values */
++typedef unsigned int esfq_index;
++
++struct esfq_head
++{
++      esfq_index      next;
++      esfq_index      prev;
++};
++
++struct esfq_sched_data
++{
++/* Parameters */
++      int             perturb_period;
++      unsigned        quantum;        /* Allotment per round: MUST BE >= MTU */
++      int             limit;
++      unsigned        depth;
++      unsigned        hash_divisor;
++      unsigned        hash_kind;
++/* Variables */
++      struct timer_list perturb_timer;
++      int             perturbation;
++      esfq_index      tail;           /* Index of current slot in round */
++      esfq_index      max_depth;      /* Maximal depth */
++
++      esfq_index      *ht;                    /* Hash table */
++      esfq_index      *next;                  /* Active slots link */
++      short           *allot;                 /* Current allotment per slot */
++      unsigned short  *hash;                  /* Hash value indexed by slots */
++      struct sk_buff_head     *qs;            /* Slot queue */
++      struct esfq_head        *dep;           /* Linked list of slots, indexed by depth */
++};
++
++static __inline__ unsigned esfq_hash_u32(struct esfq_sched_data *q,u32 h)
++{
++      int pert = q->perturbation;
++
++      if (pert)
++              h = (h<<pert) ^ (h>>(0x1F - pert));
++
++      h = ntohl(h) * 2654435761UL;
++      return h & (q->hash_divisor-1);
++}
++
++static __inline__ unsigned esfq_fold_hash_classic(struct esfq_sched_data *q, u32 h, u32 h1)
++{
++      int pert = q->perturbation;
++
++      /* Have we any rotation primitives? If not, WHY? */
++      h ^= (h1<<pert) ^ (h1>>(0x1F - pert));
++      h ^= h>>10;
++      return h & (q->hash_divisor-1);
++}
++
++#ifndef IPPROTO_ESP
++#define IPPROTO_ESP 50
++#endif
++
++static unsigned esfq_hash(struct esfq_sched_data *q, struct sk_buff *skb)
++{
++      u32 h, h2;
++      u32 hs;
++
++      switch (skb->protocol) {
++      case __constant_htons(ETH_P_IP):
++      {
++              struct iphdr *iph = skb->nh.iph;
++              h = iph->daddr;
++              hs = iph->saddr;
++              h2 = hs^iph->protocol;
++              if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
++                  (iph->protocol == IPPROTO_TCP ||
++                   iph->protocol == IPPROTO_UDP ||
++                   iph->protocol == IPPROTO_ESP))
++                      h2 ^= *(((u32*)iph) + iph->ihl);
++              break;
++      }
++      case __constant_htons(ETH_P_IPV6):
++      {
++              struct ipv6hdr *iph = skb->nh.ipv6h;
++              h = iph->daddr.s6_addr32[3];
++              hs = iph->saddr.s6_addr32[3];
++              h2 = hs^iph->nexthdr;
++              if (iph->nexthdr == IPPROTO_TCP ||
++                  iph->nexthdr == IPPROTO_UDP ||
++                  iph->nexthdr == IPPROTO_ESP)
++                      h2 ^= *(u32*)&iph[1];
++              break;
++      }
++      default:
++              h = (u32)(unsigned long)skb->dst;
++              hs = (u32)(unsigned long)skb->sk;
++              h2 = hs^skb->protocol;
++      }
++      switch(q->hash_kind)
++      {
++      case TCA_SFQ_HASH_CLASSIC:
++              return esfq_fold_hash_classic(q, h, h2);
++      case TCA_SFQ_HASH_DST:
++              return esfq_hash_u32(q,h);
++      case TCA_SFQ_HASH_SRC:
++              return esfq_hash_u32(q,hs);
++      default:
++              if (net_ratelimit())
++                      printk(KERN_DEBUG "esfq unknown hash method, fallback to classic\n");
++      }
++      return esfq_fold_hash_classic(q, h, h2);
++}
++
++extern __inline__ void esfq_link(struct esfq_sched_data *q, esfq_index x)
++{
++      esfq_index p, n;
++      int d = q->qs[x].qlen + q->depth;
++
++      p = d;
++      n = q->dep[d].next;
++      q->dep[x].next = n;
++      q->dep[x].prev = p;
++      q->dep[p].next = q->dep[n].prev = x;
++}
++
++extern __inline__ void esfq_dec(struct esfq_sched_data *q, esfq_index x)
++{
++      esfq_index p, n;
++
++      n = q->dep[x].next;
++      p = q->dep[x].prev;
++      q->dep[p].next = n;
++      q->dep[n].prev = p;
++
++      if (n == p && q->max_depth == q->qs[x].qlen + 1)
++              q->max_depth--;
++
++      esfq_link(q, x);
++}
++
++extern __inline__ void esfq_inc(struct esfq_sched_data *q, esfq_index x)
++{
++      esfq_index p, n;
++      int d;
++
++      n = q->dep[x].next;
++      p = q->dep[x].prev;
++      q->dep[p].next = n;
++      q->dep[n].prev = p;
++      d = q->qs[x].qlen;
++      if (q->max_depth < d)
++              q->max_depth = d;
++
++      esfq_link(q, x);
++}
++
++static unsigned int esfq_drop(struct Qdisc *sch)
++{
++      struct esfq_sched_data *q = qdisc_priv(sch);
++      esfq_index d = q->max_depth;
++      struct sk_buff *skb;
++
++      /* Queue is full! Find the longest slot and
++         drop a packet from it */
++
++      if (d > 1) {
++              esfq_index x = q->dep[d+q->depth].next;
++              skb = q->qs[x].prev;
++              __skb_unlink(skb, &q->qs[x]);
++              kfree_skb(skb);
++              esfq_dec(q, x);
++              sch->q.qlen--;
++              sch->stats.drops++;
++              return 1;
++      }
++
++      if (d == 1) {
++              /* It is difficult to believe, but ALL THE SLOTS HAVE LENGTH 1. */
++              d = q->next[q->tail];
++              q->next[q->tail] = q->next[d];
++              q->allot[q->next[d]] += q->quantum;
++              skb = q->qs[d].prev;
++              __skb_unlink(skb, &q->qs[d]);
++              kfree_skb(skb);
++              esfq_dec(q, d);
++              sch->q.qlen--;
++              q->ht[q->hash[d]] = q->depth;
++              sch->stats.drops++;
++              return 1;
++      }
++
++      return 0;
++}
++
++static int
++esfq_enqueue(struct sk_buff *skb, struct Qdisc* sch)
++{
++      struct esfq_sched_data *q = qdisc_priv(sch);
++      unsigned hash = esfq_hash(q, skb);
++      unsigned depth = q->depth;
++      esfq_index x;
++
++      x = q->ht[hash];
++      if (x == depth) {
++              q->ht[hash] = x = q->dep[depth].next;
++              q->hash[x] = hash;
++      }
++      __skb_queue_tail(&q->qs[x], skb);
++      esfq_inc(q, x);
++      if (q->qs[x].qlen == 1) {               /* The flow is new */
++              if (q->tail == depth) { /* It is the first flow */
++                      q->tail = x;
++                      q->next[x] = x;
++                      q->allot[x] = q->quantum;
++              } else {
++                      q->next[x] = q->next[q->tail];
++                      q->next[q->tail] = x;
++                      q->tail = x;
++              }
++      }
++      if (++sch->q.qlen < q->limit-1) {
++              sch->stats.bytes += skb->len;
++              sch->stats.packets++;
++              return 0;
++      }
++
++      esfq_drop(sch);
++      return NET_XMIT_CN;
++}
++
++static int
++esfq_requeue(struct sk_buff *skb, struct Qdisc* sch)
++{
++      struct esfq_sched_data *q = qdisc_priv(sch);
++      unsigned hash = esfq_hash(q, skb);
++      unsigned depth = q->depth;
++      esfq_index x;
++
++      x = q->ht[hash];
++      if (x == depth) {
++              q->ht[hash] = x = q->dep[depth].next;
++              q->hash[x] = hash;
++      }
++      __skb_queue_head(&q->qs[x], skb);
++      esfq_inc(q, x);
++      if (q->qs[x].qlen == 1) {               /* The flow is new */
++              if (q->tail == depth) { /* It is the first flow */
++                      q->tail = x;
++                      q->next[x] = x;
++                      q->allot[x] = q->quantum;
++              } else {
++                      q->next[x] = q->next[q->tail];
++                      q->next[q->tail] = x;
++                      q->tail = x;
++              }
++      }
++      if (++sch->q.qlen < q->limit - 1)
++              return 0;
++
++      sch->stats.drops++;
++      esfq_drop(sch);
++      return NET_XMIT_CN;
++}
++
++
++
++
++static struct sk_buff *
++esfq_dequeue(struct Qdisc* sch)
++{
++      struct esfq_sched_data *q = qdisc_priv(sch);
++      struct sk_buff *skb;
++      unsigned depth = q->depth;
++      esfq_index a, old_a;
++
++      /* No active slots */
++      if (q->tail == depth)
++              return NULL;
++      
++      a = old_a = q->next[q->tail];
++      
++      /* Grab packet */
++      skb = __skb_dequeue(&q->qs[a]);
++      esfq_dec(q, a);
++      sch->q.qlen--;
++      
++      /* Is the slot empty? */
++      if (q->qs[a].qlen == 0) {
++              a = q->next[a];
++              if (a == old_a) {
++                      q->tail = depth;
++                      return skb;
++              }
++              q->next[q->tail] = a;
++              q->allot[a] += q->quantum;
++      } else if ((q->allot[a] -= skb->len) <= 0) {
++              q->tail = a;
++              a = q->next[a];
++              q->allot[a] += q->quantum;
++      }
++      
++      return skb;
++}
++
++static void
++esfq_reset(struct Qdisc* sch)
++{
++      struct sk_buff *skb;
++
++      while ((skb = esfq_dequeue(sch)) != NULL)
++              kfree_skb(skb);
++}
++
++static void esfq_perturbation(unsigned long arg)
++{
++      struct Qdisc *sch = (struct Qdisc*)arg;
++      struct esfq_sched_data *q = qdisc_priv(sch);
++
++      q->perturbation = net_random()&0x1F;
++      q->perturb_timer.expires = jiffies + q->perturb_period;
++
++      if (q->perturb_period) {
++              q->perturb_timer.expires = jiffies + q->perturb_period;
++              add_timer(&q->perturb_timer);
++      }
++}
++
++static int esfq_change(struct Qdisc *sch, struct rtattr *opt)
++{
++      struct esfq_sched_data *q = qdisc_priv(sch);
++      struct tc_sfq_qopt *ctl = RTA_DATA(opt);
++      int old_perturb = q->perturb_period;
++      
++      if (opt->rta_len < RTA_LENGTH(sizeof(*ctl)))
++              return -EINVAL;
++      
++      sch_tree_lock(sch);
++      q->quantum = ctl->quantum ? : psched_mtu(sch->dev);
++      q->perturb_period = ctl->perturb_period*HZ;
++//    q->hash_divisor = ctl->divisor;
++//    q->tail = q->limit = q->depth = ctl->flows;
++      
++      if (ctl->limit)
++              q->limit = min_t(u32, ctl->limit, q->depth);
++      
++      if (ctl->hash_kind) {
++              q->hash_kind = ctl->hash_kind;
++              if (q->hash_kind !=  TCA_SFQ_HASH_CLASSIC)
++                      q->perturb_period = 0;
++      }
++      
++      // is sch_tree_lock enough to do this ?
++      while (sch->q.qlen >= q->limit-1)
++              esfq_drop(sch);
++      
++      if (old_perturb)
++              del_timer(&q->perturb_timer);
++      if (q->perturb_period) {
++              q->perturb_timer.expires = jiffies + q->perturb_period;
++              add_timer(&q->perturb_timer);
++      } else {
++              q->perturbation = 0;
++      }
++      sch_tree_unlock(sch);
++      return 0;
++}
++
++static int esfq_init(struct Qdisc *sch, struct rtattr *opt)
++{
++      struct esfq_sched_data *q = qdisc_priv(sch);
++      struct tc_sfq_qopt *ctl;
++      esfq_index p = ~0UL/2;
++      int i;
++      
++      if (opt && opt->rta_len < RTA_LENGTH(sizeof(*ctl)))
++              return -EINVAL;
++
++      q->perturb_timer.data = (unsigned long)sch;
++      q->perturb_timer.function = esfq_perturbation;
++      init_timer(&q->perturb_timer);
++      q->perturbation = 0;
++      q->hash_kind = TCA_SFQ_HASH_CLASSIC;
++      q->max_depth = 0;
++      if (opt == NULL) {
++              q->quantum = psched_mtu(sch->dev);
++              q->perturb_period = 0;
++              q->hash_divisor = 1024;
++              q->tail = q->limit = q->depth = 128;
++              
++      } else {
++              ctl = RTA_DATA(opt);
++              q->quantum = ctl->quantum ? : psched_mtu(sch->dev);
++              q->perturb_period = ctl->perturb_period*HZ;
++              q->hash_divisor = ctl->divisor ? : 1024;
++              q->tail = q->limit = q->depth = ctl->flows ? : 128;
++              
++              if ( q->depth > p - 1 )
++                      return -EINVAL;
++              
++              if (ctl->limit)
++                      q->limit = min_t(u32, ctl->limit, q->depth);
++              
++              if (ctl->hash_kind) {
++                      q->hash_kind = ctl->hash_kind;
++              }
++              
++              if (q->perturb_period) {
++                      q->perturb_timer.expires = jiffies + q->perturb_period;
++                      add_timer(&q->perturb_timer);
++              }
++      }
++      
++      q->ht = kmalloc(q->hash_divisor*sizeof(esfq_index), GFP_KERNEL);
++      if (!q->ht)
++              goto err_case;
++              
++      q->dep = kmalloc((1+q->depth*2)*sizeof(struct esfq_head), GFP_KERNEL);
++      if (!q->dep)
++              goto err_case;
++      q->next = kmalloc(q->depth*sizeof(esfq_index), GFP_KERNEL);
++      if (!q->next)
++              goto err_case;
++      
++      q->allot = kmalloc(q->depth*sizeof(short), GFP_KERNEL);
++      if (!q->allot)
++              goto err_case;
++      q->hash = kmalloc(q->depth*sizeof(unsigned short), GFP_KERNEL);
++      if (!q->hash)
++              goto err_case;
++      q->qs = kmalloc(q->depth*sizeof(struct sk_buff_head), GFP_KERNEL);
++      if (!q->qs)
++              goto err_case;
++      
++      for (i=0; i< q->hash_divisor; i++)
++              q->ht[i] = q->depth;
++      for (i=0; i<q->depth; i++) {
++              skb_queue_head_init(&q->qs[i]);
++              q->dep[i+q->depth].next = i+q->depth;
++              q->dep[i+q->depth].prev = i+q->depth;
++      }
++      
++      for (i=0; i<q->depth; i++)
++              esfq_link(q, i);
++      return 0;
++err_case:
++      if (q->ht)
++              kfree(q->ht);
++      if (q->dep)
++              kfree(q->dep);
++      if (q->next)
++              kfree(q->next);
++      if (q->allot)
++              kfree(q->allot);
++      if (q->hash)
++              kfree(q->hash);
++      if (q->qs)
++              kfree(q->qs);
++      return -ENOBUFS;
++}
++
++static void esfq_destroy(struct Qdisc *sch)
++{
++      struct esfq_sched_data *q = qdisc_priv(sch);
++      del_timer(&q->perturb_timer);
++      if(q->ht)
++              kfree(q->ht);
++      if(q->dep)
++              kfree(q->dep);
++      if(q->next)
++              kfree(q->next);
++      if(q->allot)
++              kfree(q->allot);
++      if(q->hash)
++              kfree(q->hash);
++      if(q->qs)
++              kfree(q->qs);
++}
++
++static int esfq_dump(struct Qdisc *sch, struct sk_buff *skb)
++{
++      struct esfq_sched_data *q = qdisc_priv(sch);
++      unsigned char    *b = skb->tail;
++      struct tc_sfq_qopt opt;
++
++      opt.quantum = q->quantum;
++      opt.perturb_period = q->perturb_period/HZ;
++
++      opt.limit = q->limit;
++      opt.divisor = q->hash_divisor;
++      opt.flows = q->depth;
++      opt.hash_kind = q->hash_kind;
++
++      RTA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
++
++      return skb->len;
++
++rtattr_failure:
++      skb_trim(skb, b - skb->data);
++      return -1;
++}
++
++struct Qdisc_ops esfq_qdisc_ops =
++{
++      NULL,
++      NULL,
++      "esfq",
++      sizeof(struct esfq_sched_data),
++
++      esfq_enqueue,
++      esfq_dequeue,
++      esfq_requeue,
++      esfq_drop,
++
++      esfq_init,
++      esfq_reset,
++      esfq_destroy,
++      NULL, /* esfq_change - needs more work */
++
++      esfq_dump,
++};
++
++#ifdef MODULE
++int init_module(void)
++{
++      return register_qdisc(&esfq_qdisc_ops);
++}
++
++void cleanup_module(void) 
++{
++      unregister_qdisc(&esfq_qdisc_ops);
++}
++#endif
++MODULE_LICENSE("GPL");
+diff -uNr linux-2.6.4-rc1/net.orig/sched/sch_generic.c linux-2.6.4-rc1/net/sched/sch_generic.c
+--- linux-2.6.4-rc1/net.orig/sched/sch_generic.c       2004-02-27 23:20:56.000000000 +0100
++++ linux-2.6.4-rc1/net/sched/sch_generic.c    2004-03-03 03:43:30.336446512 +0100
+@@ -30,6 +30,9 @@
+ #include <linux/skbuff.h>
+ #include <linux/rtnetlink.h>
+ #include <linux/init.h>
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++#include <linux/imq.h>
++#endif
+ #include <linux/rcupdate.h>
+ #include <linux/list.h>
+ #include <net/sock.h>
+@@ -135,11 +138,14 @@
+                       spin_unlock(&dev->queue_lock);
+                       if (!netif_queue_stopped(dev)) {
+-                              int ret;
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++                              if (netdev_nit && !(skb->imq_flags & IMQ_F_ENQUEUE))
++#else
+                               if (netdev_nit)
++#endif
+                                       dev_queue_xmit_nit(skb, dev);
+-                              ret = dev->hard_start_xmit(skb, dev);
++                              int ret = dev->hard_start_xmit(skb, dev);
+                               if (ret == NETDEV_TX_OK) { 
+                                       if (!nolock) {
+                                               dev->xmit_lock_owner = -1;
diff --git a/2.6.4-rc1-02-imq-nat-support.patch b/2.6.4-rc1-02-imq-nat-support.patch
new file mode 100644 (file)
index 0000000..589df32
--- /dev/null
@@ -0,0 +1,20 @@
+--- linux-2.6.4-rc1/drivers/net/imq.c.orig     2004-03-03 03:43:30.000000000 +0100
++++ linux-2.6.4-rc1/drivers/net/imq.c  2004-03-03 03:54:28.463396008 +0100
+@@ -38,7 +38,7 @@
+       .owner          = THIS_MODULE,
+       .pf             = PF_INET,
+       .hooknum        = NF_IP_PRE_ROUTING,
+-      .priority       = NF_IP_PRI_MANGLE + 1
++      .priority       = NF_IP_PRI_NAT_DST + 1
+ };
+ static struct nf_hook_ops imq_egress_ipv4 = {
+@@ -55,7 +55,7 @@
+       .owner          = THIS_MODULE,
+       .pf             = PF_INET6,
+       .hooknum        = NF_IP6_PRE_ROUTING,
+-      .priority       = NF_IP6_PRI_MANGLE + 1
++      .priority       = NF_IP6_PRI_NAT_DST + 1
+ };
+ static struct nf_hook_ops imq_egress_ipv6 = {
index 7c562766bf63fe9dac8d114411e50c0408f5077b..bc371ae01ca360791b34b1528055b9ad8723871c 100644 (file)
 +  long changes[0];  
 +};
 +
- /* Delay section */
- struct tc_dly_qopt
+ /* Network emulator */
+ struct tc_netem_qopt
  {
 diff -uNr linux-2.6.4/net/sched.orig/Kconfig linux-2.6.4/net/sched/Kconfig
 --- linux-2.6.4/net/sched.orig/Kconfig 2004-04-02 23:46:35.000000000 +0200
@@ -141,9 +141,9 @@ diff -uNr linux-2.6.4/net/sched.orig/Makefile linux-2.6.4/net/sched/Makefile
  obj-$(CONFIG_NET_SCH_CBQ)     += sch_cbq.o
  obj-$(CONFIG_NET_SCH_HTB)     += sch_htb.o
 +obj-$(CONFIG_NET_SCH_WRR)     += sch_wrr.o
- obj-$(CONFIG_NET_SCH_CSZ)     += sch_csz.o
  obj-$(CONFIG_NET_SCH_HPFQ)    += sch_hpfq.o
  obj-$(CONFIG_NET_SCH_HFSC)    += sch_hfsc.o
+ obj-$(CONFIG_NET_SCH_RED)     += sch_red.o
 diff -uNr linux-2.6.4/net/sched.orig/proxydict.c linux-2.6.4/net/sched/proxydict.c
 --- linux-2.6.4/net/sched.orig/proxydict.c     1970-01-01 01:00:00.000000000 +0100
 +++ linux-2.6.4/net/sched/proxydict.c  2004-04-03 00:02:21.565671072 +0200
@@ -168,7 +168,7 @@ diff -uNr linux-2.6.4/net/sched.orig/proxydict.c linux-2.6.4/net/sched/proxydict
 +// Size of hash table given maximal number of connections:
 +#define hash_size_max_con(max_con) (2*(max_con))
 +
-+// The memory area we maintain:
++// The __proxydict_memory area we maintain:
 +typedef struct {
 +  int hash_size;
 +  int max_con;
@@ -188,20 +188,20 @@ diff -uNr linux-2.6.4/net/sched.orig/proxydict.c linux-2.6.4/net/sched/proxydict
 +  //
 +  //   The entries in next not allocated is also in linked list where 
 +  //   the first free index is free_first.
-+} memory;  
++} __proxydict_memory;  
 +
-+#define Memory(m)     ((memory*)m)
-+#define Hash_table(m) ((int*)(((char*)m)+sizeof(memory)))
-+#define Next(m)       ((int*)(((char*)m)+sizeof(memory)+     \
-+                       sizeof(int)*((memory*)m)->hash_size))
++#define Memory(m)     ((__proxydict_memory*)m)
++#define Hash_table(m) ((int*)(((char*)m)+sizeof(__proxydict_memory)))
++#define Next(m)       ((int*)(((char*)m)+sizeof(__proxydict_memory)+     \
++                       sizeof(int)*((__proxydict_memory*)m)->hash_size))
 +#define Info(m)       ((ProxyRemapBlock*)(((char*)m)+                          \
-+                                           sizeof(memory)+                     \
-+                                           sizeof(int)*((memory*)m)->hash_size+\
-+                                         sizeof(int)*((memory*)m)->max_con   \
++                                           sizeof(__proxydict_memory)+                     \
++                                           sizeof(int)*((__proxydict_memory*)m)->hash_size+\
++                                         sizeof(int)*((__proxydict_memory*)m)->max_con   \
 +                                        ))
 +
 +int proxyGetMemSize(int max_con) {
-+  return sizeof(memory)+
++  return sizeof(__proxydict_memory)+
 +         sizeof(int)*hash_size_max_con(max_con)+
 +       sizeof(int)*max_con+
 +       sizeof(ProxyRemapBlock)*max_con;
@@ -209,7 +209,7 @@ diff -uNr linux-2.6.4/net/sched.orig/proxydict.c linux-2.6.4/net/sched/proxydict
 +
 +void proxyInitMem(void* data, int max_con) {
 +  // Init m:
-+  memory* m=Memory(data);
++  __proxydict_memory* m=Memory(data);
 +  m->max_con=max_con;
 +  m->cur_con=0;
 +  m->hash_size=hash_size_max_con(max_con);
@@ -238,7 +238,7 @@ diff -uNr linux-2.6.4/net/sched.orig/proxydict.c linux-2.6.4/net/sched/proxydict
 +}
 +
 +ProxyRemapBlock* proxyLookup(void* data, unsigned ipaddr, unsigned short port, char proto) {    
-+  memory* m=Memory(data);
++  __proxydict_memory* m=Memory(data);
 +  int* hash_table=Hash_table(m);
 +  int* next=Next(m);
 +  ProxyRemapBlock* info=Info(m);
@@ -254,7 +254,7 @@ diff -uNr linux-2.6.4/net/sched.orig/proxydict.c linux-2.6.4/net/sched/proxydict
 +}    
 +
 +int proxyConsumeBlock(void* data, ProxyRemapBlock* blk) {
-+  memory* m=Memory(data);
++  __proxydict_memory* m=Memory(data);
 +  int* hash_table=Hash_table(m);
 +  int* next=Next(m);
 +  ProxyRemapBlock* info=Info(m);
@@ -377,7 +377,7 @@ diff -uNr linux-2.6.4/net/sched.orig/proxyremap.h linux-2.6.4/net/sched/proxyrem
 diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 --- linux-2.6.4/net/sched.orig/sch_wrr.c       1970-01-01 01:00:00.000000000 +0100
 +++ linux-2.6.4/net/sched/sch_wrr.c    2004-04-03 00:02:21.574669704 +0200
-@@ -0,0 +1,1364 @@
+@@ -0,0 +1,1360 @@
 +/*-----------------------------------------------------------------------------
 +Weighted Round Robin scheduler.
 +  
@@ -1109,7 +1109,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static void wrr_destroy(struct Qdisc *sch)
 +{
-+  struct wrr_sched_data *q=(struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  int i;
 +  
 +  // Destroy our filter:
@@ -1123,13 +1123,11 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +  my_free(q->bands);
 +  my_free(q->poll);  
 +  if(q->proxydict) my_free(q->proxydict);
-+  
-+  MOD_DEC_USE_COUNT;
 +}
 +
 +static int wrr_init(struct Qdisc *sch, struct rtattr *opt)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  int i,maciniterr;
 +  char crterr;
 +  struct tc_wrr_qdisc_crt *qopt;
@@ -1222,8 +1220,6 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +    if(crterr) q->bands[i].que = &noop_qdisc;
 +  }
 +      
-+  MOD_INC_USE_COUNT;
-+  
 +  if(crterr) {
 +    // Destroy again:
 +    wrr_destroy(sch);
@@ -1235,7 +1231,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static void wrr_reset(struct Qdisc* sch)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  int i;
 +  
 +  // Reset own values:
@@ -1264,7 +1260,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static int wrr_enqueue(struct sk_buff *skb, struct Qdisc* sch)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  int retvalue=ENQUEUE_FAIL;
 +  
 +  // The packet is in skb.
@@ -1310,7 +1306,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static struct sk_buff *wrr_dequeue(struct Qdisc* sch)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  struct sk_buff* skb;
 +  int band;
 +  u64 weight,priosum;
@@ -1369,7 +1365,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static int wrr_requeue(struct sk_buff *skb, struct Qdisc* sch)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  struct Qdisc* qdisc;
 +  int ret;
 +  
@@ -1406,7 +1402,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static unsigned wrr_drop(struct Qdisc* sch)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +
 +  // Ugly... Drop button up in heap:
 +  int i;
@@ -1425,7 +1421,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static int wrr_dump(struct Qdisc *sch, struct sk_buff *skb)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  unsigned char       *b = skb->tail;
 +  struct tc_wrr_qdisc_stats opt;
 +
@@ -1458,7 +1454,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static int wrr_tune_std(struct Qdisc *sch, struct rtattr *opt) 
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  struct tc_wrr_qdisc_modf_std *qopt = RTA_DATA(opt);
 +  
 +  if(opt->rta_len < RTA_LENGTH(sizeof(*qopt))) return -EINVAL;  
@@ -1485,7 +1481,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static int wrr_tune_proxy(struct Qdisc *sch, struct rtattr *opt) 
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  struct tc_wrr_qdisc_modf_proxy *qopt = RTA_DATA(opt);
 +  int i;
 +
@@ -1530,7 +1526,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +static int wrr_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
 +                   struct Qdisc **old)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  if(arg>q->bandc || arg==0)  return -EINVAL;
 +  arg--;
 +  
@@ -1553,7 +1549,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +// Returns the qdisc for a class:
 +static struct Qdisc * wrr_leaf(struct Qdisc *sch, unsigned long arg)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  if(arg>q->bandc || arg==0)  return NULL;
 +  arg--;
 +  return q->bands[arg].que;
@@ -1561,7 +1557,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static unsigned long wrr_get(struct Qdisc *sch, u32 classid)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  unsigned long band = TC_H_MIN(classid);
 +  if(band>q->bandc || band==0) return 0;
 +  return band;
@@ -1574,7 +1570,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static int wrr_delete(struct Qdisc *sch, unsigned long cl)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  if(cl==0 || cl>q->bandc) return -ENOENT;
 +  cl--;
 +  return 0;
@@ -1583,7 +1579,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +static int wrr_dump_class(struct Qdisc *sch, unsigned long cl, 
 +                          struct sk_buff *skb, struct tcmsg *tcm)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  unsigned char *b = skb->tail;
 +  struct tc_wrr_class_stats opt;
 +
@@ -1629,7 +1625,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +                      struct rtattr **tca, unsigned long *arg)
 +{
 +  unsigned long cl = *arg;
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  struct rtattr *opt = tca[TCA_OPTIONS-1];
 +  struct tc_wrr_class_modf *copt = RTA_DATA(opt);
 +  
@@ -1650,7 +1646,7 @@ diff -uNr linux-2.6.4/net/sched.orig/sch_wrr.c linux-2.6.4/net/sched/sch_wrr.c
 +
 +static void wrr_walk(struct Qdisc *sch, struct qdisc_walker *arg)
 +{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
++  struct wrr_sched_data *q = qdisc_priv(sch);
 +  int prio;
 +
 +  if (arg->stop) return;
diff --git a/2.6.6-ipt_account.patch b/2.6.6-ipt_account.patch
new file mode 100644 (file)
index 0000000..2d8c750
--- /dev/null
@@ -0,0 +1,678 @@
+diff -uNr linux-2.6.6/include.orig/linux/netfilter_ipv4/ipt_account.h linux-2.6.6/include/linux/netfilter_ipv4/ipt_account.h
+--- linux-2.6.6/include.orig/linux/netfilter_ipv4/ipt_account.h        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.6/include/linux/netfilter_ipv4/ipt_account.h     2004-05-22 15:29:38.813343664 +0200
+@@ -0,0 +1,21 @@
++/* 
++ * accounting match (ipt_account.c)
++ * (C) 2003,2004 by Piotr Gasid³o (quaker@barbara.eu.org)
++ *
++ * Version: 0.1.5
++ *
++ * This software is distributed under the terms of GNU GPL
++ */
++
++#ifndef _IPT_ACCOUNT_H_
++#define _IPT_ACCOUNT_H_
++
++#define IPT_ACCOUNT_NAME_LEN 64
++
++struct t_ipt_account_info {
++      char name[IPT_ACCOUNT_NAME_LEN];
++      u_int32_t network;
++      u_int32_t netmask;
++};
++
++#endif
+diff -uNr linux-2.6.6/net/ipv4/netfilter.orig/ipt_account.c linux-2.6.6/net/ipv4/netfilter/ipt_account.c
+--- linux-2.6.6/net/ipv4/netfilter.orig/ipt_account.c  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.6/net/ipv4/netfilter/ipt_account.c       2004-05-22 15:29:38.819342752 +0200
+@@ -0,0 +1,617 @@
++/* 
++ * accounting match (ipt_account.c)
++ * (C) 2003,2004 by Piotr Gasid³o (quaker@barbara.eu.org)
++ *
++ * Version: 0.1.5
++ *
++ * This software is distributed under the terms of GNU GPL
++ */
++
++#include <linux/module.h>
++#include <linux/skbuff.h>
++#include <linux/proc_fs.h>
++#include <linux/spinlock.h>
++#include <linux/vmalloc.h>
++#include <linux/interrupt.h>
++
++#include <asm/uaccess.h>
++
++#include <linux/ip.h>
++#include <linux/tcp.h>
++#include <linux/udp.h>
++
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ipt_account.h>
++
++static char version[] =
++KERN_INFO "ipt_account 0.1.5 : Piotr Gasid³o <quaker@barbara.eu.org>, http://www.barbara.eu.org/~quaker/ipt_account/\n";
++
++/* default rights for files created in /proc/net/ipt_account/ */
++static int ip_list_perms = 0644;
++
++/* 
++ * safe netmask, if you want account traffic for networks 
++ * bigger that /17 you must specify ip_list_max_hosts parameter 
++ * during load 
++ */
++static int ip_list_max_mask = 17;
++static int ip_list_max_hosts_count;
++static int debug = 0;
++
++/* module information */
++MODULE_AUTHOR("Piotr Gasid³o <quaker@barbara.eu.org>");
++MODULE_DESCRIPTION("Traffic accounting modules");
++MODULE_LICENSE("GPL");
++MODULE_PARM(ip_list_perms,"i");
++MODULE_PARM_DESC(ip_list_perms,"permissions on /proc/net/ipt_account/* files");
++MODULE_PARM(ip_list_max_mask, "i");
++MODULE_PARM_DESC(ip_list_max_mask, "maximum *save* size of one list (netmask)");
++#ifdef DEBUG
++MODULE_PARM(debug,"i");
++MODULE_PARM_DESC(debug,"debugging level, defaults to 0");
++#endif
++
++/* structure with statistics counters */
++struct t_ipt_account_stat {
++      u_int64_t b_all, b_tcp, b_udp, b_icmp, b_other;         /* byte counters for all/tcp/udp/icmp/other traffic  */
++      u_int64_t p_all, p_tcp, p_udp, p_icmp, p_other;         /* packet counters for all/tcp/udp/icmp/other traffic */
++};
++ 
++/* structure holding to/from statistics for single ip */
++struct t_ipt_account_ip_list {
++      struct t_ipt_account_stat src;
++      struct t_ipt_account_stat dest;
++};
++
++/* structure describing single table */
++struct t_ipt_account_table {
++      char name[IPT_ACCOUNT_NAME_LEN];        /* table name ( = filename in /proc/net/ipt_account/) */
++      struct t_ipt_account_ip_list *ip_list;  /* table with statistics for each ip in network/netmask */
++      struct t_ipt_account_table *next;
++      u_int32_t network;                      /* network/netmask covered by table*/
++      u_int32_t netmask;                                      
++      int use_count;                          /* rules counter - counting number of rules using this table */
++      spinlock_t ip_list_lock;
++      struct proc_dir_entry *status_proc_64, *status_proc_32;
++};
++
++/* we must use spinlocks to avoid parallel modifications of table list */
++static spinlock_t ipt_account_tables_lock = SPIN_LOCK_UNLOCKED;
++
++static struct proc_dir_entry *proc_net_ipt_account = NULL;
++
++/* root pointer holding list of the tables */
++static struct t_ipt_account_table *ipt_account_tables = NULL;
++
++static int ip_list_read_proc_64(char *buffer, char **start, off_t offset,
++              int length, int *eof, void *data) {
++      
++      int len = 0, last_len = 0;
++      off_t pos = 0, begin = 0;
++
++      u_int32_t address, index;       
++
++      struct t_ipt_account_table *table = (struct t_ipt_account_table*)data;
++
++      spin_lock(&table->ip_list_lock);
++      for (address = table->network; (u_int32_t)(address & table->netmask) == (u_int32_t)(table->network); address++) {
++              last_len = len;         
++              index = address - table->network;
++                      len += sprintf(buffer + len,
++                              "ip = %u.%u.%u.%u bytes_src = %llu %llu %llu %llu %llu packets_src = %llu %llu %llu %llu %llu bytes_dest = %llu %llu %llu %llu %llu packets_dest = %llu %llu %llu %llu %llu\n",
++                              HIPQUAD(address),
++                              table->ip_list[index].src.b_all,
++                              table->ip_list[index].src.b_tcp,
++                              table->ip_list[index].src.b_udp,
++                              table->ip_list[index].src.b_icmp,
++                              table->ip_list[index].src.b_other,
++                              
++                              table->ip_list[index].src.p_all,
++                              table->ip_list[index].src.p_tcp,
++                              table->ip_list[index].src.p_udp,
++                              table->ip_list[index].src.p_icmp,
++                              table->ip_list[index].src.p_other,
++                              
++                              table->ip_list[index].dest.b_all,
++                              table->ip_list[index].dest.b_tcp,
++                              table->ip_list[index].dest.b_udp,
++                              table->ip_list[index].dest.b_icmp,
++                              table->ip_list[index].dest.b_other,                             
++                              
++                              table->ip_list[index].dest.p_all,
++                              table->ip_list[index].dest.p_tcp,
++                              table->ip_list[index].dest.p_udp,
++                              table->ip_list[index].dest.p_icmp,
++                              table->ip_list[index].dest.p_other
++                              );
++              pos = begin + len;
++              if (pos < offset) {
++                      len = 0;
++                      begin = pos;
++              }
++              if (pos > offset + length) {
++                      len = last_len;
++                      break;
++              }
++      }
++      spin_unlock(&table->ip_list_lock);
++      *start = buffer + (offset - begin);
++      len -= (offset - begin);
++      if (len > length)
++              len = length;
++      return len;
++}
++
++static int ip_list_read_proc_32(char *buffer, char **start, off_t offset,
++              int length, int *eof, void *data) {
++      
++      int len = 0, last_len = 0;
++      off_t pos = 0, begin = 0;
++
++      u_int32_t address, index;
++
++      struct t_ipt_account_table *table = (struct t_ipt_account_table*)data;
++      
++      spin_lock(&table->ip_list_lock);
++      for (address = table->network; (u_int32_t)(address & table->netmask) == (u_int32_t)(table->network); address++) {
++              last_len = len; 
++              index = address - table->network;
++              len += sprintf(buffer + len,
++                              "ip = %u.%u.%u.%u bytes_src = %u %u %u %u %u packets_src = %u %u %u %u %u bytes_dest = %u %u %u %u %u packets_dest = %u %u %u %u %u\n",
++                              HIPQUAD(address),
++                              (u_int32_t)table->ip_list[index].src.b_all,
++                              (u_int32_t)table->ip_list[index].src.b_tcp,
++                              (u_int32_t)table->ip_list[index].src.b_udp,
++                              (u_int32_t)table->ip_list[index].src.b_icmp,
++                              (u_int32_t)table->ip_list[index].src.b_other,
++                              
++                              (u_int32_t)table->ip_list[index].src.p_all,
++                              (u_int32_t)table->ip_list[index].src.p_tcp,
++                              (u_int32_t)table->ip_list[index].src.p_udp,
++                              (u_int32_t)table->ip_list[index].src.p_icmp,
++                              (u_int32_t)table->ip_list[index].src.p_other,
++                              
++                              (u_int32_t)table->ip_list[index].dest.b_all,
++                              (u_int32_t)table->ip_list[index].dest.b_tcp,
++                              (u_int32_t)table->ip_list[index].dest.b_udp,
++                              (u_int32_t)table->ip_list[index].dest.b_icmp,
++                              (u_int32_t)table->ip_list[index].dest.b_other,
++                              
++                              (u_int32_t)table->ip_list[index].dest.p_all,
++                              (u_int32_t)table->ip_list[index].dest.p_tcp,
++                              (u_int32_t)table->ip_list[index].dest.p_udp,
++                              (u_int32_t)table->ip_list[index].dest.p_icmp,
++                              (u_int32_t)table->ip_list[index].dest.p_other
++              
++                      );
++              pos = begin + len;
++              if (pos < offset) {
++                      len = 0;
++                      begin = pos;
++              }
++              if (pos > offset + length) {
++                      len = last_len;
++                      break;
++              }               
++      }
++      spin_unlock(&table->ip_list_lock);                              
++      *start = buffer + (offset - begin);
++      len -= (offset - begin);
++      if (len > length)
++              len = length;
++      return len;
++}
++
++static int ip_list_write_proc(struct file *file, const char *buffer, 
++              unsigned long length, void *data) {
++
++      int len = (length > 1024) ? length : 1024;
++      struct t_ipt_account_table *table = (struct t_ipt_account_table*)data;
++      char kernel_buffer[1024];
++      u_int32_t hosts_count = INADDR_BROADCAST - table->netmask + 1;
++      
++      copy_from_user(kernel_buffer, buffer, len);
++      kernel_buffer[len - 1] = 0;
++      
++      /* echo "reset" > /proc/net/ipt_recent/table clears the table */
++      if (!strncmp(kernel_buffer, "reset", len)) {
++              spin_lock(&table->ip_list_lock);
++              memset(table->ip_list, 0, sizeof(struct t_ipt_account_ip_list) * hosts_count);
++              spin_unlock(&table->ip_list_lock);
++      }
++      
++      return len;
++}
++
++/* do raw accounting */
++static void do_account(struct t_ipt_account_stat *stat, u_int8_t proto, u_int16_t pktlen) {
++      
++      /* update packet & bytes counters in *stat structure */
++      stat->b_all += pktlen;
++      stat->p_all++;
++      
++      switch (proto) {
++              case IPPROTO_TCP:
++                      stat->b_tcp += pktlen;
++                      stat->p_tcp++;
++                      break;
++              case IPPROTO_UDP:
++                      stat->b_udp += pktlen;
++                      stat->p_udp++;
++                      break;
++              case IPPROTO_ICMP:
++                      stat->b_icmp += pktlen;
++                      stat->p_icmp++;
++                      break;
++              default:
++                      stat->b_other += pktlen;
++                      stat->p_other++;
++      }
++}
++
++static int match(const struct sk_buff *skb,
++        const struct net_device *in,
++        const struct net_device *out,
++        const void *matchinfo,
++        int offset,
++        const void *hdr,
++        u_int16_t datalen,
++        int *hotdrop)
++{
++      
++      const struct t_ipt_account_info *info = (struct t_ipt_account_info*)matchinfo;
++      struct t_ipt_account_table *table;
++      int ret;
++
++      u_int32_t address;
++      u_int16_t pktlen;
++      u_int8_t proto;
++      
++      if (debug) {
++              printk(KERN_INFO "ipt_account: match() entering.\n");
++              printk(KERN_INFO "ipt_account: match() match name = %s.\n", info->name);
++      }
++      
++      spin_lock(&ipt_account_tables_lock);
++      /* find the right table */
++      table = ipt_account_tables;
++      while (table && strncmp(table->name, info->name, IPT_ACCOUNT_NAME_LEN) && (table = table->next));
++      spin_unlock(&ipt_account_tables_lock);
++
++      if (table == NULL) {
++              /* ups, no table with that name */
++              if (debug)
++                      printk(KERN_INFO "ipt_account: match() table %s not found. Leaving.\n", info->name);
++              return 0;
++      }
++
++      if (debug)
++              printk(KERN_INFO "ipt_account: match() table found %s\n", table->name);
++
++      /* default: no match */
++      ret = 0;
++
++      /* get packet protocol/length */
++      pktlen = skb->len;
++      proto = skb->nh.iph->protocol;
++
++      if (debug)
++              printk(KERN_INFO "ipt_account: match() got packet src = %u.%u.%u.%u, dst = %u.%u.%u.%u, proto = %u.\n",
++                               NIPQUAD(skb->nh.iph->saddr),
++                               NIPQUAD(skb->nh.iph->daddr),
++                               proto
++                               );
++
++      /* check whether traffic from source ip address ... */
++      address = ntohl(skb->nh.iph->saddr);
++      
++      /* ... is being accounted by this table */      
++      if (address && ((u_int32_t)(address & table->netmask) == (u_int32_t)table->network)) {          
++              if (debug)
++                      printk(KERN_INFO "ipt_account: match() accounting packet src = %u.%u.%u.%u, proto = %u.\n",
++                                       HIPQUAD(address),
++                                       proto
++                                       );
++              /* yes, account this packet */
++              spin_lock(&table->ip_list_lock);
++              /* update counters this host */
++              do_account(&table->ip_list[(u_int32_t)(address - table->network)].src, proto, pktlen);
++              /* update counters for all hosts in this table (network address) */
++              if (table->netmask != INADDR_BROADCAST)
++                      do_account(&table->ip_list[0].src, proto, pktlen);
++              spin_unlock(&table->ip_list_lock);
++              /* yes, it's a match */
++              ret = 1;
++      }
++
++      /* do the same thing with destination ip address */
++      address = ntohl(skb->nh.iph->daddr);
++    if (address && ((u_int32_t)(address & table->netmask) == (u_int32_t)table->network)) {
++              if (debug)
++                      printk(KERN_INFO "ipt_account: match() accounting packet dst = %u.%u.%u.%u, proto = %u.\n",
++                                      HIPQUAD(address),
++                                      proto
++                                      );
++              spin_lock(&table->ip_list_lock);
++              do_account(&table->ip_list[(u_int32_t)(address - table->network)].dest, proto, pktlen);
++              if (table->netmask != INADDR_BROADCAST)
++                      do_account(&table->ip_list[0].dest, proto, pktlen);
++              spin_unlock(&table->ip_list_lock);
++              ret = 1;
++      
++      }
++
++      if (debug)
++              printk(KERN_INFO "ipt_account: match() leaving.\n");    
++      
++      return ret;
++      
++}
++
++static int checkentry(const char *tablename,
++             const struct ipt_ip *ip,
++             void *matchinfo,
++             unsigned int matchinfosize,
++             unsigned int hook_mask)
++{
++      const struct t_ipt_account_info *info = matchinfo;
++      struct t_ipt_account_table *table;
++
++      char proc_entry_name[IPT_ACCOUNT_NAME_LEN + 3];
++
++      u_int32_t hosts_count;
++
++      if (debug)
++              printk(KERN_INFO "ipt_account: checkentry() entering.\n");
++
++      if (matchinfosize != IPT_ALIGN(sizeof(struct t_ipt_account_info)))
++              return 0;
++      
++      if (!info->name || !info->name[0])
++              return 0;
++
++      /* find whether table with this name already exists */
++      spin_lock(&ipt_account_tables_lock);
++      table = ipt_account_tables;
++      while (table && strncmp(info->name, table->name, IPT_ACCOUNT_NAME_LEN) && (table = table->next));
++      
++      if (table) {
++              /* yes, table exists */
++              if (info->network != table->network || info->netmask != table->netmask) {
++                      /* 
++                       * tried to do accounting in existing table, but network/netmask in iptable rule
++                       * doesn't match network/netmask in table structure - deny adding the rule 
++                       */
++                      printk(KERN_ERR "ipt_account: checkentry() table %s found. But table netmask/network %u.%u.%u.%u/%u.%u.%u.%u differs from rule netmask/network %u.%u.%u.%u/%u.%u.%u.%u. Leaving without creating entry.\n", 
++                                      table->name,
++                                      HIPQUAD(table->network),
++                                      HIPQUAD(table->netmask),
++                                      HIPQUAD(info->network),
++                                      HIPQUAD(info->netmask)
++                                      );
++                      spin_unlock(&ipt_account_tables_lock);
++                      return 0;
++              }                       
++              if (debug)
++                      printk(KERN_INFO "ipt_account: checkentry() table %s found. Incrementing use count (use_count = %i). Leaving.\n", table->name, table->use_count);
++              /* increase table use count */          
++              table->use_count++;
++              spin_unlock(&ipt_account_tables_lock);
++              /* everything went okey */
++              return 1;
++      };
++      
++      if (debug)
++              printk(KERN_INFO "ipt_account: checkentry() table %s not found. Creating.\n", info->name);
++      
++      /* table doesn't exist - create one */
++      table = vmalloc(sizeof(struct t_ipt_account_table));
++      if (table == NULL) {
++          if (debug)
++                  printk(KERN_INFO "ipt_account: checkentry() unable to allocate memory (t_account_table) for table %s. Leaving.\n", info->name);
++          spin_unlock(&ipt_account_tables_lock);
++          return -ENOMEM;
++      }
++      
++      /* set table parameters */
++      strncpy(table->name, info->name, IPT_ACCOUNT_NAME_LEN);
++      table->use_count = 1;   
++      table->network = info->network;
++      table->netmask = info->netmask;
++      table->ip_list_lock = SPIN_LOCK_UNLOCKED;
++      
++      hosts_count = INADDR_BROADCAST - table->netmask + 1;
++      
++      if (debug)
++              printk(KERN_INFO "ipt_account: checkentry() allocating memory for %u hosts (%u netmask).\n", hosts_count, info->netmask);
++
++      /* check whether table is not too big */
++      if (hosts_count > ip_list_max_hosts_count) {
++              printk(KERN_ERR "ipt_account: checkentry() unable allocate memory for %u hosts (%u netmask). Increase value of ip_list_max_mask parameter.\n", hosts_count, info->netmask);
++              vfree(table);
++              spin_unlock(&ipt_account_tables_lock);
++              return -ENOMEM;
++      }
++
++      table->ip_list = vmalloc(sizeof(struct t_ipt_account_ip_list) * hosts_count);
++      if (table->ip_list == NULL) {
++          if (debug)
++                  printk(KERN_INFO "ipt_account: checkentry() unable to allocate memory (t_account_ip_list) for table %s. Leaving.\n", table->name);
++          vfree(table);
++          spin_unlock(&ipt_account_tables_lock);
++          return -ENOMEM;
++      }
++
++      memset(table->ip_list, 0, sizeof(struct t_ipt_account_ip_list) * hosts_count);
++
++      /* 
++       * create entries in /proc/net/ipt_account: one with full 64-bit counters and
++       * second with 32-bit ones. The second can be used in programs supporting only 32-bit numbers
++       * (mrtg, rrdtool).
++       */
++      
++      strncpy(proc_entry_name, table->name, IPT_ACCOUNT_NAME_LEN);
++      strncat(proc_entry_name, "_64", 4);
++      
++      table->status_proc_64 = create_proc_entry(proc_entry_name, ip_list_perms, proc_net_ipt_account);
++      if (table->status_proc_64 == NULL) {        
++          if (debug)
++                  printk(KERN_INFO "ipt_account: checkentry() unable to allocate memory (status_proc_64) for table %s. Leaving.\n", table->name);
++          vfree(table->ip_list);
++          vfree(table);
++          spin_unlock(&ipt_account_tables_lock);
++          return -ENOMEM;
++      }
++
++      table->status_proc_64->owner = THIS_MODULE;
++      table->status_proc_64->read_proc = ip_list_read_proc_64;
++      table->status_proc_64->write_proc = ip_list_write_proc;
++      table->status_proc_64->data = table;    
++
++      strncpy(proc_entry_name, table->name, IPT_ACCOUNT_NAME_LEN);
++      strncat(proc_entry_name, "_32", 4);
++      
++      table->status_proc_32 = create_proc_entry(proc_entry_name, ip_list_perms, proc_net_ipt_account);
++      if (table->status_proc_32 == NULL) {        
++          if (debug)
++                  printk(KERN_INFO "ipt_account: checkentry() unable to allocate memory (status_proc_32) for table %s. Leaving.\n", table->name);
++          vfree(table->ip_list);
++          vfree(table);
++          spin_unlock(&ipt_account_tables_lock);
++          return -ENOMEM;
++      }
++
++      table->status_proc_32->owner = THIS_MODULE;
++      table->status_proc_32->read_proc = ip_list_read_proc_32;
++      table->status_proc_32->write_proc = ip_list_write_proc;
++      table->status_proc_32->data = table;
++      
++      /* finaly, insert table into list */
++      table->next = ipt_account_tables;
++      ipt_account_tables = table;
++
++      if (debug)
++              printk(KERN_INFO "ipt_account: checkentry() successfully created table %s (use_count = %i).\n", table->name, table->use_count);
++
++      spin_unlock(&ipt_account_tables_lock);
++      
++      if (debug)
++              printk(KERN_INFO "ipt_account: checkentry() leaving.\n");
++      return 1;
++}
++
++static void destroy(void *matchinfo, 
++           unsigned int matchinfosize)
++{
++      const struct t_ipt_account_info *info = matchinfo;
++      struct t_ipt_account_table *table, *last_table;
++      char proc_entry_name[IPT_ACCOUNT_NAME_LEN + 3];
++      
++      if (debug)
++              printk(KERN_INFO "ipt_account: destroy() entered.\n");
++      
++      if (matchinfosize != IPT_ALIGN(sizeof(struct t_ipt_account_info)))
++              return;
++
++      spin_lock(&ipt_account_tables_lock);
++      table = ipt_account_tables;
++
++      if (table == NULL) {
++              /* list is empty, sometheing is realy wrong! */
++              if (debug)
++                      printk(KERN_INFO "ipt_account: destroy() unable to found any tables (asked for %s). Leaving.\n", info->name);
++              spin_unlock(&ipt_account_tables_lock);
++              return;
++      }
++      
++      /* find table combined with this rule - this code is taken for ipt_recent ;) */
++      last_table = NULL;
++      while (strncmp(table->name, info->name, IPT_ACCOUNT_NAME_LEN) && (last_table = table) && (table = table->next));
++
++      if (table == NULL) {
++              printk(KERN_ERR "ipt_account: destroy() unable to found table %s. Leaving.\n", info->name);
++              spin_unlock(&ipt_account_tables_lock);
++              return;
++      }
++
++      /* decrease table use counter */
++      table->use_count--;
++      if (table->use_count != 0) {
++              /* table is used by other rule, can't remove it */
++              if (debug)
++                      printk(KERN_INFO "ipt_account: destroy() table %s is still used (use_count = %i). Leaving.\n", table->name, table->use_count);
++              spin_unlock(&ipt_account_tables_lock);
++              return;
++      }
++
++      /* table is not used by any other tule - remove it */
++      if (debug)
++              printk(KERN_INFO "ipt_account: destroy() removing table %s (use_count = %i).\n", table->name, table->use_count);
++      
++      if (last_table)
++              last_table->next = table->next;
++      else
++              ipt_account_tables = table->next;
++      
++      spin_lock(&table->ip_list_lock);
++      spin_unlock(&table->ip_list_lock);
++      
++      /* remove procfs entries */
++      strncpy(proc_entry_name, table->name, IPT_ACCOUNT_NAME_LEN);
++      strncat(proc_entry_name, "_64", 4);
++      remove_proc_entry(proc_entry_name, proc_net_ipt_account);
++      strncpy(proc_entry_name, table->name, IPT_ACCOUNT_NAME_LEN);
++      strncat(proc_entry_name, "_32", 4);
++      remove_proc_entry(proc_entry_name, proc_net_ipt_account);
++      vfree(table->ip_list);
++      vfree(table);
++
++      spin_unlock(&ipt_account_tables_lock);
++      
++      if (debug)
++              printk(KERN_INFO "account: destroy() leaving.\n");
++
++      return;
++}
++
++static struct ipt_match account_match = {
++      { NULL, NULL },
++      "account",
++      &match,
++      &checkentry,
++      &destroy,
++      THIS_MODULE
++};
++
++static int __init init(void) 
++{
++      printk(version);        
++      if (debug)
++              printk(KERN_INFO "account: __init(): ip_list_perms = %i, ip_list_max_mask = %i\n", ip_list_perms, ip_list_max_mask);                            
++      /* check params */
++      if (ip_list_max_mask > 32 || ip_list_max_mask < 0) {
++              printk(KERN_ERR "account: Wrong netmask given by ip_list_max_mask parameter (%u). Valid is 32 to 0.\n", ip_list_max_mask);
++              return 0;
++      }
++
++      ip_list_max_hosts_count = (1 << (32 - ip_list_max_mask)) + 1;
++      
++      /* create /proc/net/ipt_account directory */
++      proc_net_ipt_account = proc_mkdir("ipt_account", proc_net);
++      if (!proc_net_ipt_account)
++              return -ENOMEM;
++
++      return ipt_register_match(&account_match);
++}
++
++/* procedura usuwaj±ca modu³ */
++static void __exit fini(void) 
++{
++      ipt_unregister_match(&account_match);
++      /* remove /proc/net/ipt_account/ directory */
++      remove_proc_entry("ipt_account", proc_net);
++}
++
++module_init(init);
++module_exit(fini);
++
+diff -uNr linux-2.6.6/net/ipv4/netfilter.orig/Kconfig linux-2.6.6/net/ipv4/netfilter/Kconfig
+--- linux-2.6.6/net/ipv4/netfilter.orig/Kconfig        2004-05-22 15:21:26.033257624 +0200
++++ linux-2.6.6/net/ipv4/netfilter/Kconfig     2004-05-22 15:29:38.823342144 +0200
+@@ -168,6 +168,17 @@
+         To compile it as a module, choose M here.  If unsure, say N.
++config IP_NF_MATCH_ACCOUNT
++      tristate "account match support"
++      depends on IP_NF_IPTABLES
++      help
++        This match is used for accounting traffic.
++
++        Short options are available by using 'iptables -m account -h'
++        Official Website: <http://www.barbara.eu.org/~quaker/ipt_account/>
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
+ config IP_NF_MATCH_ECN
+       tristate "ECN match support"
+       depends on IP_NF_IPTABLES
+diff -uNr linux-2.6.6/net/ipv4/netfilter.orig/Makefile linux-2.6.6/net/ipv4/netfilter/Makefile
+--- linux-2.6.6/net/ipv4/netfilter.orig/Makefile       2004-05-22 15:21:26.034257472 +0200
++++ linux-2.6.6/net/ipv4/netfilter/Makefile    2004-05-22 15:30:30.150539224 +0200
+@@ -118,6 +118,7 @@
+ obj-$(CONFIG_IP_NF_MATCH_FUZZY) += ipt_fuzzy.o
+ obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o
++obj-$(CONFIG_IP_NF_MATCH_ACCOUNT) += ipt_account.o
+ obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
+ obj-$(CONFIG_IP_NF_MATCH_DSCP) += ipt_dscp.o
index 211bf1e8c72b3e13dcdac80fc08d856eaf1228ad..f333129718821f204af20e162492ba2f3af650bf 100644 (file)
@@ -1,26 +1,12 @@
- When using register_serial the xmit_fifo_size parameter is accepted by the
- 8250 driver, and copied to the uart_port fifosize parameter, however
- autoconfigure then comes along and overrides this from the
- dfl_xmit_fifo_size,
- this patch checks if fifosize is 0 and if it is updates from the default,
- otherwise it accepts the value,
- ignore the 2.6.4 in the patch, it is against 2.6.6.
- Dave.
---- linux26/drivers/serial/8250.c      2004-05-11 10:42:56.000000000 +1000
-+++ linux-2.6.4/drivers/serial/8250.c  2004-05-11 14:02:45.000000000 +1000
-@@ -697,7 +697,8 @@
+--- linux-2.6.9-rc2/drivers/serial/8250.c.orig 2004-09-13 07:31:29.000000000 +0200
++++ linux-2.6.9-rc2/drivers/serial/8250.c      2004-09-14 10:14:11.653931304 +0200
+@@ -733,7 +733,8 @@
  #endif
        serial_outp(up, UART_LCR, save_lcr);
  
--      up->port.fifosize = uart_config[up->port.type].dfl_xmit_fifo_size;
-+      if (up->port.fifosize==0)
-+              up->port.fifosize = uart_config[up->port.type].dfl_xmit_fifo_size;
+-      up->port.fifosize = uart_config[up->port.type].fifo_size;
++      if (up->port.fifosize == 0)
++              up->port.fifosize = uart_config[up->port.type].fifo_size;
        up->capabilities = uart_config[up->port.type].flags;
+       up->tx_loadsz = uart_config[up->port.type].tx_loadsz;
  
-       if (up->port.type == PORT_UNKNOWN)
-
index 8bbc8bea130f14e9c51117df320aefbfe45b5f77..97aad795786d72026400b646890532eb04cefc1c 100644 (file)
@@ -26,9 +26,9 @@ diff -Nru a/fs/Kconfig b/fs/Kconfig
        help
          XFS is a high performance journaling filesystem which originated
          on the SGI IRIX platform.  It is completely multi-threaded, can
-diff -Nru a/fs/xfs/linux/xfs_linux.h b/fs/xfs/linux/xfs_linux.h
---- a/fs/xfs/linux/xfs_linux.h Sun May  9 20:27:31 2004
-+++ b/fs/xfs/linux/xfs_linux.h Sun May  9 20:27:31 2004
+diff -Nru a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
+--- a/fs/xfs/linux-2.6/xfs_linux.h     Sun May  9 20:27:31 2004
++++ b/fs/xfs/linux-2.6/xfs_linux.h     Sun May  9 20:27:31 2004
 @@ -64,7 +64,6 @@
  #include <sema.h>
  #include <time.h>
diff --git a/2.6.7-kill-warnings.patch b/2.6.7-kill-warnings.patch
new file mode 100644 (file)
index 0000000..416a75c
--- /dev/null
@@ -0,0 +1,11 @@
+--- linux-2.6.9-rc1/kernel/signal.c.orig       2004-09-05 14:20:27.830673104 +0200
++++ linux-2.6.9-rc1/kernel/signal.c    2004-09-05 14:22:32.804674168 +0200
+@@ -1109,7 +1109,7 @@
+ int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp)
+ {
+-      struct task_struct *p;
++      struct task_struct *p = NULL;
+       int retval, success;
+       if (pgrp <= 0)
index 1bef60669fedca9551c36cbc1e08c914e7c452f8..749c588d1cea62e157d3f5db35935316f63ba955 100644 (file)
@@ -1,20 +1,6 @@
-diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.7/include/linux/netfilter_ipv4/ip_conntrack.h
---- linux-2.6.7.org/include/linux/netfilter_ipv4/ip_conntrack.h        2004-06-29 12:24:13.240828712 +0200
-+++ linux-2.6.7/include/linux/netfilter_ipv4/ip_conntrack.h    2004-06-29 12:35:41.913134608 +0200
-@@ -51,10 +51,12 @@
- #include <linux/netfilter_ipv4/ip_conntrack_tcp.h>
- #include <linux/netfilter_ipv4/ip_conntrack_icmp.h>
-+#include <linux/netfilter_ipv4/ip_conntrack_sctp.h>
- /* per conntrack: protocol private data */
- union ip_conntrack_proto {
-       /* insert conntrack proto private data here */
-+      struct ip_ct_sctp sctp;
-       struct ip_ct_tcp tcp;
-       struct ip_ct_icmp icmp;
- };
-@@ -207,6 +209,10 @@
+--- linux-2.6.9-rc1/include/linux/netfilter_ipv4/ip_conntrack.h.orig   2004-08-29 16:44:31.000000000 +0200
++++ linux-2.6.9-rc1/include/linux/netfilter_ipv4/ip_conntrack.h        2004-08-29 19:58:04.869439888 +0200
+@@ -220,6 +220,10 @@
        } nat;
  #endif /* CONFIG_IP_NF_NAT_NEEDED */
  
@@ -25,58 +11,6 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv4/ip_con
  };
  
  /* get master conntrack via master expectation */
-diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv4/ip_conntrack_sctp.h linux-2.6.7/include/linux/netfilter_ipv4/ip_conntrack_sctp.h
---- linux-2.6.7.org/include/linux/netfilter_ipv4/ip_conntrack_sctp.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.7/include/linux/netfilter_ipv4/ip_conntrack_sctp.h       2004-06-29 12:35:41.896137192 +0200
-@@ -0,0 +1,25 @@
-+#ifndef _IP_CONNTRACK_SCTP_H
-+#define _IP_CONNTRACK_SCTP_H
-+/* SCTP tracking. */
-+
-+enum sctp_conntrack {
-+      SCTP_CONNTRACK_NONE,
-+      SCTP_CONNTRACK_CLOSED,
-+      SCTP_CONNTRACK_COOKIE_WAIT,
-+      SCTP_CONNTRACK_COOKIE_ECHOED,
-+      SCTP_CONNTRACK_ESTABLISHED,
-+      SCTP_CONNTRACK_SHUTDOWN_SENT,
-+      SCTP_CONNTRACK_SHUTDOWN_RECD,
-+      SCTP_CONNTRACK_SHUTDOWN_ACK_SENT,
-+      SCTP_CONNTRACK_MAX
-+};
-+
-+struct ip_ct_sctp
-+{
-+      enum sctp_conntrack state;
-+
-+      u_int32_t vtag[IP_CT_DIR_MAX];
-+      u_int32_t ttag[IP_CT_DIR_MAX];
-+};
-+
-+#endif /* _IP_CONNTRACK_SCTP_H */
-diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv4/ip_conntrack_tuple.h linux-2.6.7/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
---- linux-2.6.7.org/include/linux/netfilter_ipv4/ip_conntrack_tuple.h  2004-06-16 07:19:43.000000000 +0200
-+++ linux-2.6.7/include/linux/netfilter_ipv4/ip_conntrack_tuple.h      2004-06-29 12:35:41.952128680 +0200
-@@ -25,6 +25,9 @@
-       struct {
-               u_int16_t id;
-       } icmp;
-+      struct {
-+              u_int16_t port;
-+      } sctp;
- };
- /* The manipulable part of the tuple. */
-@@ -55,6 +58,9 @@
-                       struct {
-                               u_int8_t type, code;
-                       } icmp;
-+                      struct {
-+                              u_int16_t port;
-+                      } sctp;
-               } u;
-               /* The protocol. */
 diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv4/ip_queue.h linux-2.6.7/include/linux/netfilter_ipv4/ip_queue.h
 --- linux-2.6.7.org/include/linux/netfilter_ipv4/ip_queue.h    2004-06-16 07:20:03.000000000 +0200
 +++ linux-2.6.7/include/linux/netfilter_ipv4/ip_queue.h        2004-06-29 12:35:08.141268712 +0200
@@ -517,117 +451,6 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv4/ipt_qu
 +};
 +
 +#endif /*_IPT_QUOTA_H*/
-diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv4/ipt_sctp.h linux-2.6.7/include/linux/netfilter_ipv4/ipt_sctp.h
---- linux-2.6.7.org/include/linux/netfilter_ipv4/ipt_sctp.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.7/include/linux/netfilter_ipv4/ipt_sctp.h        2004-06-29 12:32:35.029545232 +0200
-@@ -0,0 +1,107 @@
-+#ifndef _IPT_SCTP_H_
-+#define _IPT_SCTP_H_
-+
-+#define IPT_SCTP_SRC_PORTS            0x01
-+#define IPT_SCTP_DEST_PORTS           0x02
-+#define IPT_SCTP_CHUNK_TYPES          0x04
-+
-+#define IPT_SCTP_VALID_FLAGS          0x07
-+
-+#define ELEMCOUNT(x) (sizeof(x)/sizeof(x[0]))
-+
-+
-+struct ipt_sctp_flag_info {
-+      u_int8_t chunktype;
-+      u_int8_t flag;
-+      u_int8_t flag_mask;
-+};
-+
-+#define IPT_NUM_SCTP_FLAGS    4
-+
-+struct ipt_sctp_info {
-+      u_int16_t dpts[2];  /* Min, Max */
-+      u_int16_t spts[2];  /* Min, Max */
-+
-+      u_int32_t chunkmap[256 / sizeof (u_int32_t)];  /* Bit mask of chunks to be matched according to RFC 2960 */
-+
-+#define SCTP_CHUNK_MATCH_ANY   0x01  /* Match if any of the chunk types are present */
-+#define SCTP_CHUNK_MATCH_ALL   0x02  /* Match if all of the chunk types are present */
-+#define SCTP_CHUNK_MATCH_ONLY  0x04  /* Match if these are the only chunk types present */
-+
-+      u_int32_t chunk_match_type;
-+      struct ipt_sctp_flag_info flag_info[IPT_NUM_SCTP_FLAGS];
-+      int flag_count;
-+
-+      u_int32_t flags;
-+      u_int32_t invflags;
-+};
-+
-+#define bytes(type) (sizeof(type) * 8)
-+
-+#define SCTP_CHUNKMAP_SET(chunkmap, type)             \
-+      do {                                            \
-+              chunkmap[type / bytes(u_int32_t)] |=    \
-+                      1 << (type % bytes(u_int32_t)); \
-+      } while (0)
-+
-+#define SCTP_CHUNKMAP_CLEAR(chunkmap, type)                   \
-+      do {                                                    \
-+              chunkmap[type / bytes(u_int32_t)] &=            \
-+                      ~(1 << (type % bytes(u_int32_t)));      \
-+      } while (0)
-+
-+#define SCTP_CHUNKMAP_IS_SET(chunkmap, type)                  \
-+({                                                            \
-+      (chunkmap[type / bytes (u_int32_t)] &                   \
-+              (1 << (type % bytes (u_int32_t)))) ? 1: 0;      \
-+})
-+
-+#define SCTP_CHUNKMAP_RESET(chunkmap)                                 \
-+      do {                                                    \
-+              int i;                                          \
-+              for (i = 0; i < ELEMCOUNT(chunkmap); i++)       \
-+                      chunkmap[i] = 0;                        \
-+      } while (0)
-+
-+#define SCTP_CHUNKMAP_SET_ALL(chunkmap)                       \
-+      do {                                                    \
-+              int i;                                          \
-+              for (i = 0; i < ELEMCOUNT(chunkmap); i++)       \
-+                      chunkmap[i] = ~0;                       \
-+      } while (0)
-+
-+#define SCTP_CHUNKMAP_COPY(destmap, srcmap)                   \
-+      do {                                                    \
-+              int i;                                          \
-+              for (i = 0; i < ELEMCOUNT(chunkmap); i++)       \
-+                      destmap[i] = srcmap[i];                 \
-+      } while (0)
-+
-+#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap)              \
-+({                                                    \
-+      int i;                                          \
-+      int flag = 1;                                   \
-+      for (i = 0; i < ELEMCOUNT(chunkmap); i++) {     \
-+              if (chunkmap[i]) {                      \
-+                      flag = 0;                       \
-+                      break;                          \
-+              }                                       \
-+      }                                               \
-+        flag;                                         \
-+})
-+
-+#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap)            \
-+({                                                    \
-+      int i;                                          \
-+      int flag = 1;                                   \
-+      for (i = 0; i < ELEMCOUNT(chunkmap); i++) {     \
-+              if (chunkmap[i] != ~0) {                \
-+                      flag = 0;                       \
-+                              break;                  \
-+              }                                       \
-+      }                                               \
-+        flag;                                         \
-+})
-+
-+#endif /* _IPT_SCTP_H_ */
-+
 diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv4/ipt_string.h linux-2.6.7/include/linux/netfilter_ipv4/ipt_string.h
 --- linux-2.6.7.org/include/linux/netfilter_ipv4/ipt_string.h  1970-01-01 01:00:00.000000000 +0100
 +++ linux-2.6.7/include/linux/netfilter_ipv4/ipt_string.h      2004-06-29 12:36:14.589167096 +0200
@@ -698,33 +521,6 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv6/ip6t_H
 +
 +
 +#endif
-diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv6/ip6t_REJECT.h linux-2.6.7/include/linux/netfilter_ipv6/ip6t_REJECT.h
---- linux-2.6.7.org/include/linux/netfilter_ipv6/ip6t_REJECT.h 2004-06-16 07:18:38.000000000 +0200
-+++ linux-2.6.7/include/linux/netfilter_ipv6/ip6t_REJECT.h     2004-06-29 12:32:02.745453160 +0200
-@@ -2,15 +2,17 @@
- #define _IP6T_REJECT_H
- enum ip6t_reject_with {
--      IP6T_ICMP_NET_UNREACHABLE,
--      IP6T_ICMP_HOST_UNREACHABLE,
--      IP6T_ICMP_PROT_UNREACHABLE,
--      IP6T_ICMP_PORT_UNREACHABLE,
--      IP6T_ICMP_ECHOREPLY
-+      IP6T_ICMP6_NO_ROUTE,
-+      IP6T_ICMP6_ADM_PROHIBITED,
-+      IP6T_ICMP6_NOT_NEIGHBOUR,
-+      IP6T_ICMP6_ADDR_UNREACH,
-+      IP6T_ICMP6_PORT_UNREACH,
-+      IP6T_ICMP6_ECHOREPLY,
-+      IP6T_TCP_RESET
- };
- struct ip6t_reject_info {
-       enum ip6t_reject_with with;      /* reject type */
- };
--#endif /*_IPT_REJECT_H*/
-+#endif /*_IP6T_REJECT_H*/
 diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv6/ip6t_ROUTE.h linux-2.6.7/include/linux/netfilter_ipv6/ip6t_ROUTE.h
 --- linux-2.6.7.org/include/linux/netfilter_ipv6/ip6t_ROUTE.h  1970-01-01 01:00:00.000000000 +0100
 +++ linux-2.6.7/include/linux/netfilter_ipv6/ip6t_ROUTE.h      2004-06-29 12:34:33.509533536 +0200
@@ -876,11 +672,11 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/netfilter_ipv6/ip6t_p
 diff -Nur --exclude '*.orig' linux-2.6.7.org/include/linux/sysctl.h linux-2.6.7/include/linux/sysctl.h
 --- linux-2.6.7.org/include/linux/sysctl.h     2004-06-29 12:24:13.353811536 +0200
 +++ linux-2.6.7/include/linux/sysctl.h 2004-06-29 12:32:11.293153712 +0200
-@@ -410,6 +410,7 @@
-       NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12,
-       NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13,
-       NET_IPV4_NF_CONNTRACK_BUCKETS=14,
-+      NET_IPV4_NF_CONNTRACK_COUNT=15,
+@@ -424,6 +424,7 @@
+       NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
+       NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
+       NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
++      NET_IPV4_NF_CONNTRACK_COUNT=27,
  };
   
  /* /proc/sys/net/ipv6 */
@@ -1172,21 +968,10 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/Kconfig linux-2.
 diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/Makefile linux-2.6.7/net/ipv4/netfilter/Makefile
 --- linux-2.6.7.org/net/ipv4/netfilter/Makefile        2004-06-29 12:24:13.000000000 +0200
 +++ linux-2.6.7/net/ipv4/netfilter/Makefile    2004-06-29 12:36:14.615163144 +0200
-@@ -19,6 +19,9 @@
- # connection tracking
- obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o
-+# SCTP protocol connection tracking
-+obj-$(CONFIG_IP_NF_CT_PROTO_SCTP) += ip_conntrack_proto_sctp.o
-+
- # connection tracking helpers
- obj-$(CONFIG_IP_NF_AMANDA) += ip_conntrack_amanda.o
- obj-$(CONFIG_IP_NF_TFTP) += ip_conntrack_tftp.o
-@@ -43,15 +46,33 @@
- # matches
+@@ -47,14 +47,22 @@
  obj-$(CONFIG_IP_NF_MATCH_HELPER) += ipt_helper.o
  obj-$(CONFIG_IP_NF_MATCH_LIMIT) += ipt_limit.o
-+obj-$(CONFIG_IP_NF_MATCH_SCTP) += ipt_sctp.o
+ obj-$(CONFIG_IP_NF_MATCH_SCTP) += ipt_sctp.o
 +obj-$(CONFIG_IP_NF_MATCH_QUOTA) += ipt_quota.o
 +obj-$(CONFIG_IP_NF_MATCH_DSTLIMIT) += ipt_dstlimit.o
  obj-$(CONFIG_IP_NF_MATCH_MARK) += ipt_mark.o
@@ -1195,28 +980,18 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/Makefile linux-2
  
  obj-$(CONFIG_IP_NF_MATCH_PKTTYPE) += ipt_pkttype.o
  obj-$(CONFIG_IP_NF_MATCH_MULTIPORT) += ipt_multiport.o
-+
 +obj-$(CONFIG_IP_NF_MATCH_MPORT) += ipt_mport.o
-+
  obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o
  obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o
 +obj-$(CONFIG_IP_NF_MATCH_TIME) += ipt_time.o
-+
-+
 +obj-$(CONFIG_IP_NF_MATCH_PSD) += ipt_psd.o
-+
 +obj-$(CONFIG_IP_NF_MATCH_NTH) += ipt_nth.o
-+
 +obj-$(CONFIG_IP_NF_MATCH_IPV4OPTIONS) += ipt_ipv4options.o
-+
-+
 +obj-$(CONFIG_IP_NF_MATCH_FUZZY) += ipt_fuzzy.o
-+
  obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o
  
- obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
-@@ -60,28 +81,40 @@
+@@ -64,28 +72,40 @@
  
  obj-$(CONFIG_IP_NF_MATCH_LENGTH) += ipt_length.o
  
@@ -1260,36 +1035,6 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/Makefile linux-2
 diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.7/net/ipv4/netfilter/ip_conntrack_core.c
 --- linux-2.6.7.org/net/ipv4/netfilter/ip_conntrack_core.c     2004-06-29 12:24:13.000000000 +0200
 +++ linux-2.6.7/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-29 12:34:21.572348264 +0200
-@@ -65,9 +65,10 @@
- static LIST_HEAD(helpers);
- unsigned int ip_conntrack_htable_size = 0;
- int ip_conntrack_max;
--static atomic_t ip_conntrack_count = ATOMIC_INIT(0);
-+atomic_t ip_conntrack_count = ATOMIC_INIT(0);
- struct list_head *ip_conntrack_hash;
- static kmem_cache_t *ip_conntrack_cachep;
-+static kmem_cache_t *ip_conntrack_expect_cachep;
- struct ip_conntrack ip_conntrack_untracked;
- extern struct ip_conntrack_protocol ip_conntrack_generic_protocol;
-@@ -177,7 +178,7 @@
-       IP_NF_ASSERT(atomic_read(&exp->use) == 0);
-       IP_NF_ASSERT(!timer_pending(&exp->timeout));
--      kfree(exp);
-+      kmem_cache_free(ip_conntrack_expect_cachep, exp);
- }
- inline void ip_conntrack_expect_put(struct ip_conntrack_expect *exp)
-@@ -336,7 +337,7 @@
-                       list_del(&ct->master->expected_list);
-                       master = ct->master->expectant;
-               }
--              kfree(ct->master);
-+              kmem_cache_free(ip_conntrack_expect_cachep, ct->master);
-       }
-       WRITE_UNLOCK(&ip_conntrack_lock);
 @@ -718,6 +719,9 @@
                __set_bit(IPS_EXPECTED_BIT, &conntrack->status);
                conntrack->master = expected;
@@ -1300,642 +1045,27 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ip_conntrack_cor
                LIST_DELETE(&ip_conntrack_expect_list, expected);
                expected->expectant->expecting--;
                nf_conntrack_get(&master_ct(conntrack)->infos[0]);
-@@ -923,9 +927,8 @@
- ip_conntrack_expect_alloc(void)
- {
-       struct ip_conntrack_expect *new;
--      
--      new = (struct ip_conntrack_expect *)
--              kmalloc(sizeof(struct ip_conntrack_expect), GFP_ATOMIC);
-+
-+      new = kmem_cache_alloc(ip_conntrack_expect_cachep, GFP_ATOMIC);
-       if (!new) {
-               DEBUGP("expect_related: OOM allocating expect\n");
-               return NULL;
-@@ -933,6 +936,7 @@
-       /* tuple_cmp compares whole union, we have to initialized cleanly */
-       memset(new, 0, sizeof(struct ip_conntrack_expect));
-+      atomic_set(&new->use, 1);
-       return new;
- }
-@@ -944,7 +948,6 @@
-       DEBUGP("new expectation %p of conntrack %p\n", new, related_to);
-       new->expectant = related_to;
-       new->sibling = NULL;
--      atomic_set(&new->use, 1);
-       /* add to expected list for this connection */
-       list_add_tail(&new->expected_list, &related_to->sibling_list);
-@@ -997,7 +1000,8 @@
-               }
-               WRITE_UNLOCK(&ip_conntrack_lock);
--              kfree(expect);
-+              /* This expectation is not inserted so no need to lock */
-+              kmem_cache_free(ip_conntrack_expect_cachep, expect);
-               return -EEXIST;
-       } else if (related_to->helper->max_expected && 
-@@ -1015,7 +1019,7 @@
-                                      related_to->helper->name,
-                                      NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip),
-                                      NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip));
--                      kfree(expect);
-+                      kmem_cache_free(ip_conntrack_expect_cachep, expect);
-                       return -EPERM;
-               }
-               DEBUGP("ip_conntrack: max number of expected "
-@@ -1049,7 +1053,7 @@
-               WRITE_UNLOCK(&ip_conntrack_lock);
-               DEBUGP("expect_related: busy!\n");
--              kfree(expect);
-+              kmem_cache_free(ip_conntrack_expect_cachep, expect);
-               return -EBUSY;
-       }
-@@ -1368,6 +1372,7 @@
-       }
-       kmem_cache_destroy(ip_conntrack_cachep);
-+      kmem_cache_destroy(ip_conntrack_expect_cachep);
-       vfree(ip_conntrack_hash);
-       nf_unregister_sockopt(&so_getorigdst);
- }
-@@ -1420,6 +1425,15 @@
-               printk(KERN_ERR "Unable to create ip_conntrack slab cache\n");
-               goto err_free_hash;
-       }
-+
-+      ip_conntrack_expect_cachep = kmem_cache_create("ip_conntrack_expect",
-+                                      sizeof(struct ip_conntrack_expect),
-+                                      0, SLAB_HWCACHE_ALIGN, NULL, NULL);
-+      if (!ip_conntrack_expect_cachep) {
-+              printk(KERN_ERR "Unable to create ip_expect slab cache\n");
-+              goto err_free_conntrack_slab;
-+      }
-+
-       /* Don't NEED lock here, but good form anyway. */
-       WRITE_LOCK(&ip_conntrack_lock);
-       /* Sew in builtin protocols. */
-@@ -1447,6 +1461,8 @@
-       return ret;
-+err_free_conntrack_slab:
-+      kmem_cache_destroy(ip_conntrack_cachep);
- err_free_hash:
-       vfree(ip_conntrack_hash);
- err_unreg_sockopt:
-diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ip_conntrack_proto_sctp.c linux-2.6.7/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
---- linux-2.6.7.org/net/ipv4/netfilter/ip_conntrack_proto_sctp.c       1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.7/net/ipv4/netfilter/ip_conntrack_proto_sctp.c   2004-06-29 12:35:41.898136888 +0200
-@@ -0,0 +1,529 @@
-+/*
-+ * Connection tracking protocol helper module for SCTP.
-+ * 
-+ * SCTP is defined in RFC 2960. References to various sections in this code 
-+ * are to this RFC.
-+ * 
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/sched.h>
-+#include <linux/timer.h>
-+#include <linux/netfilter.h>
-+#include <linux/module.h>
-+#include <linux/in.h>
-+#include <linux/ip.h>
-+#include <linux/sctp.h>
-+#include <linux/string.h>
-+
-+#include <linux/netfilter_ipv4/ip_conntrack.h>
-+#include <linux/netfilter_ipv4/ip_conntrack_protocol.h>
-+#include <linux/netfilter_ipv4/lockhelp.h>
-+
-+#if 0
-+#define DEBUGP(format, ...) printk(format, ## __VA_ARGS__)
-+#else
-+#define DEBUGP(format, args...)
-+#endif
-+
-+/* Protects conntrack->proto.sctp */
-+static DECLARE_RWLOCK(sctp_lock);
-+
-+/* FIXME: Examine ipfilter's timeouts and conntrack transitions more
-+   closely.  They're more complex. --RR 
-+
-+   And so for me for SCTP :D -Kiran */
-+
-+static const char *sctp_conntrack_names[] = {
-+      "NONE",
-+      "CLOSED",
-+      "COOKIE_WAIT",
-+      "COOKIE_ECHOED",
-+      "ESTABLISHED",
-+      "SHUTDOWN_SENT",
-+      "SHUTDOWN_RECD",
-+      "SHUTDOWN_ACK_SENT",
-+};
-+
-+#define SECS  * HZ
-+#define MINS  * 60 SECS
-+#define HOURS * 60 MINS
-+#define DAYS  * 24 HOURS
-+
-+unsigned long ip_ct_sctp_timeout_closed            =  10 SECS;
-+unsigned long ip_ct_sctp_timeout_cookie_wait       =   3 SECS;
-+unsigned long ip_ct_sctp_timeout_cookie_echoed     =   3 SECS;
-+unsigned long ip_ct_sctp_timeout_established       =   5 DAYS;
-+unsigned long ip_ct_sctp_timeout_shutdown_sent     = 300 SECS / 1000;
-+unsigned long ip_ct_sctp_timeout_shutdown_recd     = 300 SECS / 1000;
-+unsigned long ip_ct_sctp_timeout_shutdown_ack_sent =   3 SECS;
-+
-+static unsigned long * sctp_timeouts[]
-+= { 0,                                     /* SCTP_CONNTRACK_NONE  */
-+    &ip_ct_sctp_timeout_closed,                  /* SCTP_CONNTRACK_CLOSED */
-+    &ip_ct_sctp_timeout_cookie_wait,       /* SCTP_CONNTRACK_COOKIE_WAIT */
-+    &ip_ct_sctp_timeout_cookie_echoed,     /* SCTP_CONNTRACK_COOKIE_ECHOED */
-+    &ip_ct_sctp_timeout_established,       /* SCTP_CONNTRACK_ESTABLISHED */
-+    &ip_ct_sctp_timeout_shutdown_sent,     /* SCTP_CONNTRACK_SHUTDOWN_SENT */
-+    &ip_ct_sctp_timeout_shutdown_recd,     /* SCTP_CONNTRACK_SHUTDOWN_RECD */
-+    &ip_ct_sctp_timeout_shutdown_ack_sent  /* SCTP_CONNTRACK_SHUTDOWN_ACK_SENT */
-+ };
-+
-+#define sNO SCTP_CONNTRACK_NONE
-+#define       sCL SCTP_CONNTRACK_CLOSED
-+#define       sCW SCTP_CONNTRACK_COOKIE_WAIT
-+#define       sCE SCTP_CONNTRACK_COOKIE_ECHOED
-+#define       sES SCTP_CONNTRACK_ESTABLISHED
-+#define       sSS SCTP_CONNTRACK_SHUTDOWN_SENT
-+#define       sSR SCTP_CONNTRACK_SHUTDOWN_RECD
-+#define       sSA SCTP_CONNTRACK_SHUTDOWN_ACK_SENT
-+#define       sIV SCTP_CONNTRACK_MAX
-+
-+/* 
-+      These are the descriptions of the states:
-+
-+NOTE: These state names are tantalizingly similar to the states of an 
-+SCTP endpoint. But the interpretation of the states is a little different,
-+considering that these are the states of the connection and not of an end 
-+point. Please note the subtleties. -Kiran
-+
-+NONE              - Nothing so far.
-+COOKIE WAIT       - We have seen an INIT chunk in the original direction, or also 
-+                    an INIT_ACK chunk in the reply direction.
-+COOKIE ECHOED     - We have seen a COOKIE_ECHO chunk in the original direction.
-+ESTABLISHED       - We have seen a COOKIE_ACK in the reply direction.
-+SHUTDOWN_SENT     - We have seen a SHUTDOWN chunk in the original direction.
-+SHUTDOWN_RECD     - We have seen a SHUTDOWN chunk in the reply directoin.
-+SHUTDOWN_ACK_SENT - We have seen a SHUTDOWN_ACK chunk in the direction opposite
-+                    to that of the SHUTDOWN chunk.
-+CLOSED            - We have seen a SHUTDOWN_COMPLETE chunk in the direction of 
-+                    the SHUTDOWN chunk. Connection is closed.
-+*/
-+
-+/* TODO
-+ - I have assumed that the first INIT is in the original direction. 
-+ This messes things when an INIT comes in the reply direction in CLOSED
-+ state.
-+ - Check the error type in the reply dir before transitioning from 
-+cookie echoed to closed.
-+ - Sec 5.2.4 of RFC 2960
-+ - Multi Homing support.
-+*/
-+
-+/* SCTP conntrack state transitions */
-+static enum sctp_conntrack sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = {
-+      {
-+/*    ORIGINAL        */
-+/*                  sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */
-+/* init         */ {sCW, sCW, sCW, sCE, sES, sSS, sSR, sSA},
-+/* init_ack     */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},
-+/* abort        */ {sCL, sCL, sCL, sCL, sCL, sCL, sCL, sCL},
-+/* shutdown     */ {sCL, sCL, sCW, sCE, sSS, sSS, sSR, sSA},
-+/* shutdown_ack */ {sSA, sCL, sCW, sCE, sES, sSA, sSA, sSA},
-+/* error        */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant have Stale cookie*/
-+/* cookie_echo  */ {sCL, sCL, sCE, sCE, sES, sSS, sSR, sSA},/* 5.2.4 - Big TODO */
-+/* cookie_ack   */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant come in orig dir */
-+/* shutdown_comp*/ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sCL}
-+      },
-+      {
-+/*    REPLY   */
-+/*                  sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */
-+/* init         */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* INIT in sCL Big TODO */
-+/* init_ack     */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA},
-+/* abort        */ {sIV, sCL, sCL, sCL, sCL, sCL, sCL, sCL},
-+/* shutdown     */ {sIV, sCL, sCW, sCE, sSR, sSS, sSR, sSA},
-+/* shutdown_ack */ {sIV, sCL, sCW, sCE, sES, sSA, sSA, sSA},
-+/* error        */ {sIV, sCL, sCW, sCL, sES, sSS, sSR, sSA},
-+/* cookie_echo  */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant come in reply dir */
-+/* cookie_ack   */ {sIV, sCL, sCW, sES, sES, sSS, sSR, sSA},
-+/* shutdown_comp*/ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sCL}
-+      }
-+};
-+
-+static int sctp_pkt_to_tuple(const struct sk_buff *skb,
-+                           unsigned int dataoff,
-+                           struct ip_conntrack_tuple *tuple)
-+{
-+      sctp_sctphdr_t hdr;
-+
-+      DEBUGP(__FUNCTION__);
-+      DEBUGP("\n");
-+
-+      /* Actually only need first 8 bytes. */
-+      if (skb_copy_bits(skb, dataoff, &hdr, 8) != 0)
-+              return 0;
-+
-+      tuple->src.u.sctp.port = hdr.source;
-+      tuple->dst.u.sctp.port = hdr.dest;
-+
-+      return 1;
-+}
-+
-+static int sctp_invert_tuple(struct ip_conntrack_tuple *tuple,
-+                           const struct ip_conntrack_tuple *orig)
-+{
-+      DEBUGP(__FUNCTION__);
-+      DEBUGP("\n");
-+
-+      tuple->src.u.sctp.port = orig->dst.u.sctp.port;
-+      tuple->dst.u.sctp.port = orig->src.u.sctp.port;
-+      return 1;
-+}
-+
-+/* Print out the per-protocol part of the tuple. */
-+static unsigned int sctp_print_tuple(char *buffer,
-+                                   const struct ip_conntrack_tuple *tuple)
-+{
-+      DEBUGP(__FUNCTION__);
-+      DEBUGP("\n");
-+
-+      return sprintf(buffer, "sport=%hu dport=%hu ",
-+                     ntohs(tuple->src.u.sctp.port),
-+                     ntohs(tuple->dst.u.sctp.port));
-+}
-+
-+/* Print out the private part of the conntrack. */
-+static unsigned int sctp_print_conntrack(char *buffer,
-+                                       const struct ip_conntrack *conntrack)
-+{
-+      enum sctp_conntrack state;
-+
-+      DEBUGP(__FUNCTION__);
-+      DEBUGP("\n");
-+
-+      READ_LOCK(&sctp_lock);
-+      state = conntrack->proto.sctp.state;
-+      READ_UNLOCK(&sctp_lock);
-+
-+      return sprintf(buffer, "%s ", sctp_conntrack_names[state]);
-+}
-+
-+#define for_each_sctp_chunk(skb, sch, offset, count)  \
-+for (offset = skb->nh.iph->ihl * 4 + sizeof (sctp_sctphdr_t), count = 0;      \
-+      offset < skb->len && !skb_copy_bits(skb, offset, &sch, sizeof(sch));    \
-+      offset += (htons(sch.length) + 3) & ~3, count++)
-+
-+/* Some validity checks to make sure the chunks are fine */
-+static int do_basic_checks(struct ip_conntrack *conntrack,
-+                         const struct sk_buff *skb,
-+                         char *map)
-+{
-+      u_int32_t offset, count;
-+      sctp_chunkhdr_t sch;
-+      int flag;
-+
-+      DEBUGP(__FUNCTION__);
-+      DEBUGP("\n");
-+
-+      flag = 0;
-+
-+      for_each_sctp_chunk (skb, sch, offset, count) {
-+              DEBUGP("Chunk Num: %d  Type: %d\n", count, sch.type);
-+
-+              if (sch.type == SCTP_CID_INIT 
-+                      || sch.type == SCTP_CID_INIT_ACK
-+                      || sch.type == SCTP_CID_SHUTDOWN_COMPLETE) {
-+                      flag = 1;
-+              }
-+
-+              /* Cookie Ack/Echo chunks not the first OR 
-+                 Init / Init Ack / Shutdown compl chunks not the only chunks */
-+              if ((sch.type == SCTP_CID_COOKIE_ACK 
-+                      || sch.type == SCTP_CID_COOKIE_ECHO
-+                      || flag)
-+                   && count !=0 ) {
-+                      DEBUGP("Basic checks failed\n");
-+                      return 1;
-+              }
-+
-+              if (map) {
-+                      set_bit (sch.type, (void *)map);
-+              }
-+      }
-+
-+      DEBUGP("Basic checks passed\n");
-+      return 0;
-+}
-+
-+static int new_state(enum ip_conntrack_dir dir,
-+                   enum sctp_conntrack cur_state,
-+                   int chunk_type)
-+{
-+      int i;
-+
-+      DEBUGP(__FUNCTION__);
-+      DEBUGP("\n");
-+
-+      DEBUGP("Chunk type: %d\n", chunk_type);
-+
-+      switch (chunk_type) {
-+              case SCTP_CID_INIT: 
-+                      DEBUGP("SCTP_CID_INIT\n");
-+                      i = 0; break;
-+              case SCTP_CID_INIT_ACK: 
-+                      DEBUGP("SCTP_CID_INIT_ACK\n");
-+                      i = 1; break;
-+              case SCTP_CID_ABORT: 
-+                      DEBUGP("SCTP_CID_ABORT\n");
-+                      i = 2; break;
-+              case SCTP_CID_SHUTDOWN: 
-+                      DEBUGP("SCTP_CID_SHUTDOWN\n");
-+                      i = 3; break;
-+              case SCTP_CID_SHUTDOWN_ACK: 
-+                      DEBUGP("SCTP_CID_SHUTDOWN_ACK\n");
-+                      i = 4; break;
-+              case SCTP_CID_ERROR: 
-+                      DEBUGP("SCTP_CID_ERROR\n");
-+                      i = 5; break;
-+              case SCTP_CID_COOKIE_ECHO: 
-+                      DEBUGP("SCTP_CID_COOKIE_ECHO\n");
-+                      i = 6; break;
-+              case SCTP_CID_COOKIE_ACK: 
-+                      DEBUGP("SCTP_CID_COOKIE_ACK\n");
-+                      i = 7; break;
-+              case SCTP_CID_SHUTDOWN_COMPLETE: 
-+                      DEBUGP("SCTP_CID_SHUTDOWN_COMPLETE\n");
-+                      i = 8; break;
-+              default:
-+                      /* Other chunks like DATA, SACK, HEARTBEAT and
-+                      its ACK do not cause a change in state */
-+                      DEBUGP("Unknown chunk type, Will stay in %s\n", 
-+                                              sctp_conntrack_names[cur_state]);
-+                      return cur_state;
-+      }
-+
-+      DEBUGP("dir: %d   cur_state: %s  chunk_type: %d  new_state: %s\n", 
-+                      dir, sctp_conntrack_names[cur_state], chunk_type,
-+                      sctp_conntrack_names[sctp_conntracks[dir][i][cur_state]]);
-+
-+      return sctp_conntracks[dir][i][cur_state];
-+}
-+
-+/* Returns verdict for packet, or -1 for invalid. */
-+static int sctp_packet(struct ip_conntrack *conntrack,
-+                     const struct sk_buff *skb,
-+                     enum ip_conntrack_info ctinfo)
-+{
-+      enum sctp_conntrack newconntrack, oldsctpstate;
-+      sctp_sctphdr_t sctph;
-+      sctp_chunkhdr_t sch;
-+      u_int32_t offset, count;
-+      char map[256 / sizeof (char)] = {0};
-+
-+      DEBUGP(__FUNCTION__);
-+      DEBUGP("\n");
-+
-+      if (skb_copy_bits(skb, skb->nh.iph->ihl * 4, &sctph, sizeof(sctph)) != 0)
-+              return -1;
-+
-+      if (do_basic_checks(conntrack, skb, map) != 0)
-+              return -1;
-+
-+      /* Check the verification tag (Sec 8.5) */
-+      if (!test_bit(SCTP_CID_INIT, (void *)map)
-+              && !test_bit(SCTP_CID_SHUTDOWN_COMPLETE, (void *)map)
-+              && !test_bit(SCTP_CID_COOKIE_ECHO, (void *)map)
-+              && !test_bit(SCTP_CID_ABORT, (void *)map)
-+              && !test_bit(SCTP_CID_SHUTDOWN_ACK, (void *)map)
-+              && (sctph.vtag != conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])) {
-+              DEBUGP("Verification tag check failed\n");
-+              return -1;
-+      }
-+
-+      oldsctpstate = newconntrack = SCTP_CONNTRACK_MAX;
-+      for_each_sctp_chunk (skb, sch, offset, count) {
-+              WRITE_LOCK(&sctp_lock);
-+
-+              /* Special cases of Verification tag check (Sec 8.5.1) */
-+              if (sch.type == SCTP_CID_INIT) {
-+                      /* Sec 8.5.1 (A) */
-+                      if (sctph.vtag != 0) {
-+                              WRITE_UNLOCK(&sctp_lock);
-+                              return -1;
-+                      }
-+              } else if (sch.type == SCTP_CID_ABORT) {
-+                      /* Sec 8.5.1 (B) */
-+                      if (!(sctph.vtag == conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])
-+                              && !(sctph.vtag == conntrack->proto.sctp.vtag
-+                                                      [1 - CTINFO2DIR(ctinfo)])) {
-+                              WRITE_UNLOCK(&sctp_lock);
-+                              return -1;
-+                      }
-+              } else if (sch.type == SCTP_CID_SHUTDOWN_COMPLETE) {
-+                      /* Sec 8.5.1 (C) */
-+                      if (!(sctph.vtag == conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])
-+                              && !(sctph.vtag == conntrack->proto.sctp.vtag
-+                                                      [1 - CTINFO2DIR(ctinfo)] 
-+                                      && (sch.flags & 1))) {
-+                              WRITE_UNLOCK(&sctp_lock);
-+                              return -1;
-+                      }
-+              } else if (sch.type == SCTP_CID_COOKIE_ECHO) {
-+                      /* Sec 8.5.1 (D) */
-+                      if (!(sctph.vtag == conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])) {
-+                              WRITE_UNLOCK(&sctp_lock);
-+                              return -1;
-+                      }
-+              }
-+
-+              oldsctpstate = conntrack->proto.sctp.state;
-+              newconntrack = new_state(CTINFO2DIR(ctinfo), oldsctpstate, sch.type);
-+
-+              /* Invalid */
-+              if (newconntrack == SCTP_CONNTRACK_MAX) {
-+                      DEBUGP("ip_conntrack_sctp: Invalid dir=%i ctype=%u conntrack=%u\n",
-+                             CTINFO2DIR(ctinfo), sch.type, oldsctpstate);
-+                      WRITE_UNLOCK(&sctp_lock);
-+                      return -1;
-+              }
-+
-+              /* If it is an INIT or an INIT ACK note down the vtag */
-+              if (sch.type == SCTP_CID_INIT 
-+                      || sch.type == SCTP_CID_INIT_ACK) {
-+                      sctp_inithdr_t inithdr;
-+
-+                      if (skb_copy_bits(skb, offset + sizeof (sctp_chunkhdr_t),
-+                              &inithdr, sizeof(inithdr)) != 0) {
-+                                      WRITE_UNLOCK(&sctp_lock);
-+                                      return -1;
-+                      }
-+                      DEBUGP("Setting vtag %x for dir %d\n", 
-+                                      inithdr.init_tag, CTINFO2DIR(ctinfo));
-+                      conntrack->proto.sctp.vtag[IP_CT_DIR_ORIGINAL] = inithdr.init_tag;
-+              }
-+
-+              conntrack->proto.sctp.state = newconntrack;
-+              WRITE_UNLOCK(&sctp_lock);
-+      }
-+
-+      ip_ct_refresh(conntrack, *sctp_timeouts[newconntrack]);
-+
-+      if (oldsctpstate == SCTP_CONNTRACK_COOKIE_ECHOED
-+              && CTINFO2DIR(ctinfo) == IP_CT_DIR_REPLY
-+              && newconntrack == SCTP_CONNTRACK_ESTABLISHED) {
-+              DEBUGP("Setting assured bit\n");
-+              set_bit(IPS_ASSURED_BIT, &conntrack->status);
-+      }
-+
-+      return NF_ACCEPT;
-+}
-+
-+/* Called when a new connection for this protocol found. */
-+static int sctp_new(struct ip_conntrack *conntrack, 
-+                  const struct sk_buff *skb)
-+{
-+      enum sctp_conntrack newconntrack;
-+      sctp_sctphdr_t sctph;
-+      sctp_chunkhdr_t sch;
-+      u_int32_t offset, count;
-+      char map[256 / sizeof (char)] = {0};
-+
-+      DEBUGP(__FUNCTION__);
-+      DEBUGP("\n");
-+
-+      if (skb_copy_bits(skb, skb->nh.iph->ihl * 4, &sctph, sizeof(sctph)) != 0)
-+              return -1;
-+
-+      if (do_basic_checks(conntrack, skb, map) != 0)
-+              return -1;
-+
-+      /* If an OOTB packet has any of these chunks discard (Sec 8.4) */
-+      if ((test_bit (SCTP_CID_ABORT, (void *)map))
-+              || (test_bit (SCTP_CID_SHUTDOWN_COMPLETE, (void *)map))
-+              || (test_bit (SCTP_CID_COOKIE_ACK, (void *)map))) {
-+              return -1;
-+      }
-+
-+      newconntrack = SCTP_CONNTRACK_MAX;
-+      for_each_sctp_chunk (skb, sch, offset, count) {
-+              /* Don't need lock here: this conntrack not in circulation yet */
-+              newconntrack = new_state (IP_CT_DIR_ORIGINAL, 
-+                                              SCTP_CONNTRACK_NONE, sch.type);
-+
-+              /* Invalid: delete conntrack */
-+              if (newconntrack == SCTP_CONNTRACK_MAX) {
-+                      DEBUGP("ip_conntrack_sctp: invalid new deleting.\n");
-+                      return 0;
-+              }
-+
-+              /* Copy the vtag into the state info */
-+              if (sch.type == SCTP_CID_INIT) {
-+                      if (sctph.vtag == 0) {
-+                              sctp_inithdr_t inithdr;
-+
-+                              if (skb_copy_bits(skb, offset + sizeof (sctp_chunkhdr_t), 
-+                                      &inithdr, sizeof(inithdr)) != 0) {
-+                                              return -1;
-+                              }
-+
-+                              DEBUGP("Setting vtag %x for new conn\n", 
-+                                      inithdr.init_tag);
-+
-+                              conntrack->proto.sctp.vtag[IP_CT_DIR_REPLY] = 
-+                                                              inithdr.init_tag;
-+                      } else {
-+                              /* Sec 8.5.1 (A) */
-+                              return -1;
-+                      }
-+              }
-+              /* If it is a shutdown ack OOTB packet, we expect a return
-+                 shutdown complete, otherwise an ABORT Sec 8.4 (5) and (8) */
-+              else {
-+                      DEBUGP("Setting vtag %x for new conn OOTB\n", 
-+                              sctph.vtag);
-+                      conntrack->proto.sctp.vtag[IP_CT_DIR_REPLY] = sctph.vtag;
-+              }
-+
-+              conntrack->proto.sctp.state = newconntrack;
-+      }
-+
-+      return 1;
-+}
-+
-+static int sctp_exp_matches_pkt(struct ip_conntrack_expect *exp,
-+                              const struct sk_buff *skb)
-+{
-+      /* To be implemented */
-+      return 0;
-+}
-+
-+struct ip_conntrack_protocol ip_conntrack_protocol_sctp = { 
-+      .list            = { NULL, NULL }, 
-+      .proto           = IPPROTO_SCTP, 
-+      .name            = "sctp",
-+      .pkt_to_tuple    = sctp_pkt_to_tuple, 
-+      .invert_tuple    = sctp_invert_tuple, 
-+      .print_tuple     = sctp_print_tuple, 
-+      .print_conntrack = sctp_print_conntrack,
-+      .packet          = sctp_packet, 
-+      .new             = sctp_new, 
-+      .destroy         = NULL, 
-+      .exp_matches_pkt = sctp_exp_matches_pkt, 
-+      .me              = THIS_MODULE 
-+};
-+
-+int __init init(void)
-+{
-+      int ret;
-+
-+      ret = ip_conntrack_protocol_register(&ip_conntrack_protocol_sctp);
-+      DEBUGP("SCTP conntrack module loading %s\n", 
-+                                      ret ? "failed": "succeeded");
-+      return ret;
-+}
-+
-+void __exit fini(void)
-+{
-+      ip_conntrack_protocol_unregister(&ip_conntrack_protocol_sctp);
-+      DEBUGP("SCTP conntrack module unloaded\n");
-+}
-+
-+module_init(init);
-+module_exit(fini);
-+
-+MODULE_LICENSE("GPL");
-+MODULE_AUTHOR("Kiran Kumar Immidi");
-+MODULE_DESCRIPTION("Netfilter connection tracking protocol helper for SCTP");
 diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.7/net/ipv4/netfilter/ip_conntrack_standalone.c
 --- linux-2.6.7.org/net/ipv4/netfilter/ip_conntrack_standalone.c       2004-06-29 12:24:13.000000000 +0200
 +++ linux-2.6.7/net/ipv4/netfilter/ip_conntrack_standalone.c   2004-06-29 12:34:21.566349176 +0200
-@@ -111,6 +111,9 @@
-               len += sprintf(buffer + len, "[ASSURED] ");
-       len += sprintf(buffer + len, "use=%u ",
-                      atomic_read(&conntrack->ct_general.use));
-+#if defined(CONFIG_IP_NF_CONNTRACK_MARK)
-+      len += sprintf(buffer + len, "mark=%ld ", conntrack->mark);
+@@ -169,7 +169,15 @@
+               if (seq_printf(s, "[ASSURED] "))
+                       return 1;
+-      if (seq_printf(s, "use=%u\n", atomic_read(&conntrack->ct_general.use)))
++      if (seq_printf(s, "use=%u ", atomic_read(&conntrack->ct_general.use)))
++              return 1;
++
++#ifdef CONFIG_IP_NF_CONNTRACK_MARK
++      if (seq_printf(s, "mark=%ld ", conntrack->mark))
++              return 1;
 +#endif
-       len += sprintf(buffer + len, "\n");
++
++      if (seq_printf(s, "\n"))
+               return 1;
  
-       return len;
-@@ -312,6 +315,7 @@
+       return 0;
+@@ -494,6 +502,7 @@
  
  /* From ip_conntrack_core.c */
  extern int ip_conntrack_max;
@@ -1943,7 +1073,7 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ip_conntrack_sta
  extern unsigned int ip_conntrack_htable_size;
  
  /* From ip_conntrack_proto_tcp.c */
-@@ -346,6 +350,14 @@
+@@ -537,6 +546,14 @@
                .proc_handler   = &proc_dointvec,
        },
        {
@@ -2294,7 +1424,7 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ipt_IPV4OPTSSTRI
 +
 +#include <linux/module.h>
 +#include <linux/skbuff.h>
-+#include <linux/ip.h>
++#include <net/ip.h>
 +#include <net/checksum.h>
 +
 +#include <linux/netfilter_ipv4/ip_tables.h>
@@ -5797,209 +4927,6 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ipt_quota.c linu
 +module_init(init);
 +module_exit(fini);
 +
-diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ipt_sctp.c linux-2.6.7/net/ipv4/netfilter/ipt_sctp.c
---- linux-2.6.7.org/net/ipv4/netfilter/ipt_sctp.c      1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.7/net/ipv4/netfilter/ipt_sctp.c  2004-06-29 12:32:35.031544928 +0200
-@@ -0,0 +1,199 @@
-+#include <linux/module.h>
-+#include <linux/skbuff.h>
-+#include <net/ip.h>
-+#include <linux/sctp.h>
-+
-+#include <linux/netfilter_ipv4/ip_tables.h>
-+#include <linux/netfilter_ipv4/ipt_sctp.h>
-+
-+#if 0
-+#define duprintf(format, args...) printk(format , ## args)
-+#else
-+#define duprintf(format, args...)
-+#endif
-+
-+#define SCCHECK(cond, option, flag, invflag) (!((flag) & (option)) \
-+                                            || (!!((invflag) & (option)) ^ (cond)))
-+
-+static int
-+match_flags(const struct ipt_sctp_flag_info *flag_info,
-+          const int flag_count,
-+          u_int8_t chunktype,
-+          u_int8_t chunkflags)
-+{
-+      int i;
-+
-+      for (i = 0; i < flag_count; i++) {
-+              if (flag_info[i].chunktype == chunktype) {
-+                      return (chunkflags & flag_info[i].flag_mask) == flag_info[i].flag;
-+              }
-+      }
-+
-+      return 1;
-+}
-+
-+static int
-+match_packet(const struct sk_buff *skb,
-+           const u_int32_t *chunkmap,
-+           int chunk_match_type,
-+           const struct ipt_sctp_flag_info *flag_info,
-+           const int flag_count,
-+           int *hotdrop)
-+{
-+      int offset;
-+      u_int32_t chunkmapcopy[256 / sizeof (u_int32_t)];
-+      sctp_chunkhdr_t sch;
-+
-+      int i = 0;
-+
-+      if (chunk_match_type == SCTP_CHUNK_MATCH_ALL) {
-+              SCTP_CHUNKMAP_COPY(chunkmapcopy, chunkmap);
-+      }
-+
-+      offset = skb->nh.iph->ihl * 4 + sizeof (sctp_sctphdr_t);
-+      do {
-+              if (skb_copy_bits(skb, offset, &sch, sizeof(sch)) < 0) {
-+                      duprintf("Dropping invalid SCTP packet.\n");
-+                      *hotdrop = 1;
-+                      return 0;
-+              }
-+
-+              duprintf("Chunk num: %d\toffset: %d\ttype: %d\tlength: %d\tflags: %x\n", 
-+                              ++i, offset, sch.type, htons(sch.length), sch.flags);
-+
-+              offset += (htons(sch.length) + 3) & ~3;
-+
-+              duprintf("skb->len: %d\toffset: %d\n", skb->len, offset);
-+
-+              if (SCTP_CHUNKMAP_IS_SET(chunkmap, sch.type)) {
-+                      switch (chunk_match_type) {
-+                      case SCTP_CHUNK_MATCH_ANY:
-+                              if (match_flags(flag_info, flag_count, 
-+                                      sch.type, sch.flags)) {
-+                                      return 1;
-+                              }
-+                              break;
-+
-+                      case SCTP_CHUNK_MATCH_ALL:
-+                              if (match_flags(flag_info, flag_count, 
-+                                      sch.type, sch.flags)) {
-+                                      SCTP_CHUNKMAP_CLEAR(chunkmapcopy, sch.type);
-+                              }
-+                              break;
-+
-+                      case SCTP_CHUNK_MATCH_ONLY:
-+                              if (!match_flags(flag_info, flag_count, 
-+                                      sch.type, sch.flags)) {
-+                                      return 0;
-+                              }
-+                              break;
-+                      }
-+              } else {
-+                      switch (chunk_match_type) {
-+                      case SCTP_CHUNK_MATCH_ONLY:
-+                              return 0;
-+                      }
-+              }
-+      } while (offset < skb->len);
-+
-+      switch (chunk_match_type) {
-+      case SCTP_CHUNK_MATCH_ALL:
-+              return SCTP_CHUNKMAP_IS_CLEAR(chunkmap);
-+      case SCTP_CHUNK_MATCH_ANY:
-+              return 0;
-+      case SCTP_CHUNK_MATCH_ONLY:
-+              return 1;
-+      }
-+
-+      /* This will never be reached, but required to stop compiler whine */
-+      return 0;
-+}
-+
-+static int
-+match(const struct sk_buff *skb,
-+      const struct net_device *in,
-+      const struct net_device *out,
-+      const void *matchinfo,
-+      int offset,
-+      int *hotdrop)
-+{
-+      const struct ipt_sctp_info *info;
-+      sctp_sctphdr_t sh;
-+
-+      info = (const struct ipt_sctp_info *)matchinfo;
-+
-+      if (offset) {
-+              duprintf("Dropping non-first fragment.. FIXME\n");
-+              return 0;
-+      }
-+      
-+      if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &sh, sizeof(sh)) < 0) {
-+              duprintf("Dropping evil TCP offset=0 tinygram.\n");
-+              *hotdrop = 1;
-+              return 0;
-+              }
-+      duprintf("spt: %d\tdpt: %d\n", ntohs(sh.source), ntohs(sh.dest));
-+
-+      return  SCCHECK(((ntohs(sh.source) >= info->spts[0]) 
-+                      && (ntohs(sh.source) <= info->spts[1])), 
-+                      IPT_SCTP_SRC_PORTS, info->flags, info->invflags)
-+              && SCCHECK(((ntohs(sh.dest) >= info->dpts[0]) 
-+                      && (ntohs(sh.dest) <= info->dpts[1])), 
-+                      IPT_SCTP_DEST_PORTS, info->flags, info->invflags)
-+              && SCCHECK(match_packet(skb, info->chunkmap, info->chunk_match_type,
-+                                      info->flag_info, info->flag_count, 
-+                                      hotdrop),
-+                         IPT_SCTP_CHUNK_TYPES, info->flags, info->invflags);
-+}
-+
-+static int
-+checkentry(const char *tablename,
-+         const struct ipt_ip *ip,
-+         void *matchinfo,
-+         unsigned int matchsize,
-+         unsigned int hook_mask)
-+{
-+      const struct ipt_sctp_info *info;
-+
-+      info = (const struct ipt_sctp_info *)matchinfo;
-+
-+      return ip->proto == IPPROTO_SCTP
-+              && !(ip->invflags & IPT_INV_PROTO)
-+              && matchsize == IPT_ALIGN(sizeof(struct ipt_sctp_info))
-+              && !(info->flags & ~IPT_SCTP_VALID_FLAGS)
-+              && !(info->invflags & ~IPT_SCTP_VALID_FLAGS)
-+              && !(info->invflags & ~info->flags)
-+              && ((!(info->flags & IPT_SCTP_CHUNK_TYPES)) || 
-+                      (info->chunk_match_type &
-+                              (SCTP_CHUNK_MATCH_ALL 
-+                              | SCTP_CHUNK_MATCH_ANY
-+                              | SCTP_CHUNK_MATCH_ONLY)));
-+}
-+
-+static struct ipt_match sctp_match = 
-+{ 
-+      .list = { NULL, NULL},
-+      .name = "sctp",
-+      .match = &match,
-+      .checkentry = &checkentry,
-+      .destroy = NULL,
-+      .me = THIS_MODULE
-+};
-+
-+static int __init init(void)
-+{
-+      return ipt_register_match(&sctp_match);
-+}
-+
-+static void __exit fini(void)
-+{
-+      ipt_unregister_match(&sctp_match);
-+}
-+
-+module_init(init);
-+module_exit(fini);
-+
-+MODULE_LICENSE("GPL");
-+MODULE_AUTHOR("Kiran Kumar Immidi");
-+MODULE_DESCRIPTION("Match for SCTP protocol packets");
-+
 diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ipt_string.c linux-2.6.7/net/ipv4/netfilter/ipt_string.c
 --- linux-2.6.7.org/net/ipv4/netfilter/ipt_string.c    1970-01-01 01:00:00.000000000 +0100
 +++ linux-2.6.7/net/ipv4/netfilter/ipt_string.c        2004-06-29 12:36:14.591166792 +0200
@@ -6387,7 +5314,7 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv4/netfilter/ipt_unclean.c li
 +/* Kernel module to match suspect packets. */
 +#include <linux/module.h>
 +#include <linux/skbuff.h>
-+#include <linux/ip.h>
++#include <net/ip.h>
 +#include <linux/udp.h>
 +#include <linux/tcp.h>
 +#include <linux/icmp.h>
@@ -7235,6 +6162,28 @@ diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv6/netfilter/ip6t_HL.c linux-
 +
 +module_init(init);
 +module_exit(fini);
+diff -uNr linux-2.6.9-rc1.orig/include/linux/netfilter_ipv6/ip6t_REJECT.h linux-2.6.9-rc1/include/linux/netfilter_ipv6/ip6t_REJECT.h
+--- linux-2.6.9-rc1.orig/include/linux/netfilter_ipv6/ip6t_REJECT.h    1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.9-rc1/include/linux/netfilter_ipv6/ip6t_REJECT.h 2004-08-29 11:44:11.277430632 +0200
+@@ -0,0 +1,18 @@
++#ifndef _IP6T_REJECT_H
++#define _IP6T_REJECT_H
++
++enum ip6t_reject_with {
++      IP6T_ICMP6_NO_ROUTE,
++      IP6T_ICMP6_ADM_PROHIBITED,
++      IP6T_ICMP6_NOT_NEIGHBOUR,
++      IP6T_ICMP6_ADDR_UNREACH,
++      IP6T_ICMP6_PORT_UNREACH,
++      IP6T_ICMP6_ECHOREPLY,
++      IP6T_TCP_RESET
++};
++
++struct ip6t_reject_info {
++      enum ip6t_reject_with with;      /* reject type */
++};
++
++#endif /*_IP6T_REJECT_H*/
 diff -Nur --exclude '*.orig' linux-2.6.7.org/net/ipv6/netfilter/ip6t_REJECT.c linux-2.6.7/net/ipv6/netfilter/ip6t_REJECT.c
 --- linux-2.6.7.org/net/ipv6/netfilter/ip6t_REJECT.c   1970-01-01 01:00:00.000000000 +0100
 +++ linux-2.6.7/net/ipv6/netfilter/ip6t_REJECT.c       2004-06-29 12:32:02.720456960 +0200
diff --git a/2.6.7-ppc-asm-defs.patch b/2.6.7-ppc-asm-defs.patch
new file mode 100644 (file)
index 0000000..7b9cd26
--- /dev/null
@@ -0,0 +1,11 @@
+--- linux-2.6.7/arch/ppc/Makefile.orig 2004-07-06 22:03:51.000000000 +0200
++++ linux-2.6.7/arch/ppc/Makefile      2004-07-07 09:18:14.405325304 +0200
+@@ -22,7 +22,7 @@
+ LDFLAGS_vmlinux       := -Ttext $(KERNELLOAD) -Bstatic
+ CPPFLAGS      += -Iarch/$(ARCH)
+-AFLAGS                += -Iarch/$(ARCH)
++AFLAGS                += -Iarch/$(ARCH) -Wa,-many
+ CFLAGS                += -Iarch/$(ARCH) -msoft-float -pipe \
+               -ffixed-r2 -Wno-uninitialized -mmultiple
+ CPP           = $(CC) -E $(CFLAGS)
diff --git a/2.6.7-ppc-ipr-div.patch b/2.6.7-ppc-ipr-div.patch
new file mode 100644 (file)
index 0000000..6935e5f
--- /dev/null
@@ -0,0 +1,12 @@
+--- linux-2.6.7/drivers/scsi/ipr.c.orig        2004-07-06 22:03:17.000000000 +0200
++++ linux-2.6.7/drivers/scsi/ipr.c     2004-07-06 23:33:37.539819400 +0200
+@@ -2785,7 +2785,8 @@
+                        struct block_device *block_device,
+                        sector_t capacity, int *parm)
+ {
+-      int heads, sectors, cylinders;
++      int heads, sectors;
++      sector_t cylinders;
+       heads = 128;
+       sectors = 32;
diff --git a/2.6.8-cpu_feature.patch b/2.6.8-cpu_feature.patch
new file mode 100644 (file)
index 0000000..be9182c
--- /dev/null
@@ -0,0 +1,87 @@
+--- linux-2.6.8-rc4/arch/i386/kernel/cpu/proc.c.orig   2004-08-10 04:23:46.000000000 +0200
++++ linux-2.6.8-rc4/arch/i386/kernel/cpu/proc.c        2004-08-13 16:48:53.971370504 +0200
+@@ -44,8 +44,8 @@
+               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+               /* Intel-defined (#2) */
+-              "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2",
+-              "est", NULL, "cid", NULL, NULL, NULL, NULL, NULL,
++              "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "est",
++              "tm2", NULL, "cid", NULL, NULL, NULL, "xtpr", NULL,
+               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+--- linux-2.6.8-rc4/arch/x86_64/kernel/setup.c.orig    2004-08-10 04:22:11.000000000 +0200
++++ linux-2.6.8-rc4/arch/x86_64/kernel/setup.c 2004-08-13 16:59:14.729001000 +0200
+@@ -1042,8 +1042,8 @@
+               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+               /* Intel-defined (#2) */
+-              "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2",
+-              "est", NULL, "cid", NULL, NULL, "cmpxchg16b", NULL, NULL,
++              "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "est",
++              "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL,
+               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+       };
+--- linux-2.6.8-rc4/include/asm-i386/cpufeature.h.orig 2004-08-10 04:23:22.000000000 +0200
++++ linux-2.6.8-rc4/include/asm-i386/cpufeature.h      2004-08-13 16:49:19.439498760 +0200
+@@ -71,9 +71,13 @@
+ #define X86_FEATURE_P4                (3*32+ 7) /* P4 */
+ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
+-#define X86_FEATURE_EST               (4*32+ 7) /* Enhanced SpeedStep */
++#define X86_FEATURE_XMM3      (4*32+ 0) /* Streaming SIMD Extensions-3 */
+ #define X86_FEATURE_MWAIT     (4*32+ 3) /* Monitor/Mwait support */
+-
++#define X86_FEATURE_DSCPL     (4*32+ 4) /* CPL Qualified Debug Store */
++#define X86_FEATURE_EST               (4*32+ 7) /* Enhanced SpeedStep */
++#define X86_FEATURE_TM2               (4*32+ 8) /* Thermal Monitor 2 */
++#define X86_FEATURE_CID               (4*32+10) /* Context ID */
++#define X86_FEATURE_XTPR      (4*32+14) /* Send Task Priority Messages */
+ /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
+ #define X86_FEATURE_XSTORE    (5*32+ 2) /* on-CPU RNG present (xstore insn) */
+@@ -93,13 +97,14 @@
+ #define cpu_has_tsc           boot_cpu_has(X86_FEATURE_TSC)
+ #define cpu_has_pae           boot_cpu_has(X86_FEATURE_PAE)
+ #define cpu_has_pge           boot_cpu_has(X86_FEATURE_PGE)
+-#define cpu_has_sse2          boot_cpu_has(X86_FEATURE_XMM2)
+ #define cpu_has_apic          boot_cpu_has(X86_FEATURE_APIC)
+ #define cpu_has_sep           boot_cpu_has(X86_FEATURE_SEP)
+ #define cpu_has_mtrr          boot_cpu_has(X86_FEATURE_MTRR)
+ #define cpu_has_mmx           boot_cpu_has(X86_FEATURE_MMX)
+ #define cpu_has_fxsr          boot_cpu_has(X86_FEATURE_FXSR)
+ #define cpu_has_xmm           boot_cpu_has(X86_FEATURE_XMM)
++#define cpu_has_xmm2          boot_cpu_has(X86_FEATURE_XMM2)
++#define cpu_has_xmm3          boot_cpu_has(X86_FEATURE_XMM3)
+ #define cpu_has_ht            boot_cpu_has(X86_FEATURE_HT)
+ #define cpu_has_mp            boot_cpu_has(X86_FEATURE_MP)
+ #define cpu_has_nx            boot_cpu_has(X86_FEATURE_NX)
+--- linux-2.6.8-rc4/include/asm-x86_64/cpufeature.h.orig       2004-08-10 04:23:13.000000000 +0200
++++ linux-2.6.8-rc4/include/asm-x86_64/cpufeature.h    2004-08-13 16:53:48.776553304 +0200
+@@ -63,8 +63,14 @@
+ #define X86_FEATURE_K8_C      (3*32+ 4) /* C stepping K8 */
+ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
+-#define X86_FEATURE_EST               (4*32+ 7) /* Enhanced SpeedStep */
++#define X86_FEATURE_XMM3      (4*32+ 0) /* Streaming SIMD Extensions-3 */
+ #define X86_FEATURE_MWAIT     (4*32+ 3) /* Monitor/Mwait support */
++#define X86_FEATURE_DSCPL     (4*32+ 4) /* CPL Qualified Debug Store */
++#define X86_FEATURE_EST               (4*32+ 7) /* Enhanced SpeedStep */
++#define X86_FEATURE_TM2               (4*32+ 8) /* Thermal Monitor 2 */
++#define X86_FEATURE_CID               (4*32+10) /* Context ID */
++#define X86_FEATURE_CX16      (4*32+13) /* CMPXCHG16B */
++#define X86_FEATURE_XTPR      (4*32+14) /* Send Task Priority Messages */
+ #define cpu_has(c, bit)                test_bit(bit, (c)->x86_capability)
+ #define boot_cpu_has(bit)      test_bit(bit, boot_cpu_data.x86_capability)
+@@ -81,6 +87,8 @@
+ #define cpu_has_mmx            1
+ #define cpu_has_fxsr           1
+ #define cpu_has_xmm            1
++#define cpu_has_xmm2           1
++#define cpu_has_xmm3           boot_cpu_has(X86_FEATURE_XMM3)
+ #define cpu_has_ht             boot_cpu_has(X86_FEATURE_HT)
+ #define cpu_has_mp             1 /* XXX */
+ #define cpu_has_k6_mtrr        0
diff --git a/2.6.8-ipt_layer7.patch b/2.6.8-ipt_layer7.patch
new file mode 100644 (file)
index 0000000..91a81e9
--- /dev/null
@@ -0,0 +1,2026 @@
+diff -uNr linux-2.6.7.orig/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.7/include/linux/netfilter_ipv4/ip_conntrack.h
+--- linux-2.6.7.orig/include/linux/netfilter_ipv4/ip_conntrack.h       2004-07-14 09:43:26.000000000 +0200
++++ linux-2.6.7/include/linux/netfilter_ipv4/ip_conntrack.h    2004-07-14 09:48:56.039943024 +0200
+@@ -213,6 +213,17 @@
+       unsigned long mark;
+ #endif
++#if defined(CONFIG_IP_NF_MATCH_LAYER7) || defined(CONFIG_IP_NF_MATCH_LAYER7_MODULE)
++      struct {
++              unsigned int numpackets; /* surely this is kept track of somewhere else, right? I can't find it... */
++              char * app_proto; /* "http", "ftp", etc.  NULL if unclassifed */
++              
++              /* the application layer data so far.  NULL if ->numpackets > numpackets */
++              char * app_data; 
++
++              unsigned int app_data_len;
++      } layer7;
++#endif
+ };
+ /* get master conntrack via master expectation */
+diff -uNr linux-2.6.7.orig/include/linux/netfilter_ipv4/ipt_layer7.h linux-2.6.7/include/linux/netfilter_ipv4/ipt_layer7.h
+--- linux-2.6.7.orig/include/linux/netfilter_ipv4/ipt_layer7.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7/include/linux/netfilter_ipv4/ipt_layer7.h      2004-07-14 09:48:56.041942720 +0200
+@@ -0,0 +1,26 @@
++/* 
++  By Matthew Strait <quadong@users.sf.net>, Dec 2003.
++  http://l7-filter.sf.net
++
++  This program is free software; you can redistribute it and/or
++  modify it under the terms of the GNU General Public License
++  as published by the Free Software Foundation; either version
++  2 of the License, or (at your option) any later version.
++  http://www.gnu.org/licenses/gpl.txt
++*/
++
++#ifndef _IPT_LAYER7_H
++#define _IPT_LAYER7_H
++
++#define MAX_PATTERN_LEN 8192
++#define MAX_PROTOCOL_LEN 256
++
++typedef char *(*proc_ipt_search) (char *, char, char *);
++
++struct ipt_layer7_info {
++    char protocol[MAX_PROTOCOL_LEN];
++    char invert:1;
++    char pattern[MAX_PATTERN_LEN];
++};
++
++#endif /* _IPT_LAYER7_H */
+diff -uNr linux-2.6.7.orig/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.7/net/ipv4/netfilter/ip_conntrack_core.c
+--- linux-2.6.7.orig/net/ipv4/netfilter/ip_conntrack_core.c    2004-07-14 09:43:27.000000000 +0200
++++ linux-2.6.7/net/ipv4/netfilter/ip_conntrack_core.c 2004-07-14 09:48:56.054940744 +0200
+@@ -339,6 +339,15 @@
+               }
+               kmem_cache_free(ip_conntrack_expect_cachep, ct->master);
+       }
++
++      #if defined(CONFIG_IP_NF_MATCH_LAYER7) || defined(CONFIG_IP_NF_MATCH_LAYER7_MODULE)
++      /* This ought to get free'd somewhere.  How about here? */
++      if(ct->layer7.app_proto) /* this is sufficient, right? */
++              kfree(ct->layer7.app_proto);
++      if(ct->layer7.app_data)
++              kfree(ct->layer7.app_data);
++      #endif
++      
+       WRITE_UNLOCK(&ip_conntrack_lock);
+       if (master)
+diff -uNr linux-2.6.7.orig/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.7/net/ipv4/netfilter/ip_conntrack_standalone.c
+--- linux-2.6.7.orig/net/ipv4/netfilter/ip_conntrack_standalone.c      2004-07-14 09:43:27.000000000 +0200
++++ linux-2.6.7/net/ipv4/netfilter/ip_conntrack_standalone.c   2004-07-14 09:49:35.000000000 +0200
+@@ -177,6 +177,12 @@
+               return 1;
+ #endif
++#if defined(CONFIG_IP_NF_MATCH_LAYER7) || defined(CONFIG_IP_NF_MATCH_LAYER7_MODULE)
++      if (conntrack->layer7.app_proto)
++              if (seq_printf(s, "l7proto=%s ", conntrack->layer7.app_proto))
++                      return 1;
++#endif
++
+       if (seq_printf(s, "\n"))
+               return 1;
+diff -uNr linux-2.6.7.orig/net/ipv4/netfilter/ipt_layer7.c linux-2.6.7/net/ipv4/netfilter/ipt_layer7.c
+--- linux-2.6.7.orig/net/ipv4/netfilter/ipt_layer7.c   1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7/net/ipv4/netfilter/ipt_layer7.c        2004-07-14 09:48:56.060939832 +0200
+@@ -0,0 +1,540 @@
++/* 
++  Kernel module to match application layer (OSI layer 7) 
++  data in connections.
++  
++  http://l7-filter.sf.net
++
++  By Matthew Strait and Ethan Sommer, 2003.
++
++  This program is free software; you can redistribute it and/or
++  modify it under the terms of the GNU General Public License
++  as published by the Free Software Foundation; either version
++  2 of the License, or (at your option) any later version.
++  http://www.gnu.org/licenses/gpl.txt
++
++  Based on ipt_string.c (C) 2000 Emmanuel Roger <winfield@freegates.be>
++  and cls_layer7.c (C) 2003 Matthew Strait, Ethan Sommer, Justin Levandoski
++*/
++
++#include <linux/module.h>
++#include <linux/skbuff.h>
++#include <linux/netfilter_ipv4/ip_conntrack.h>
++#include <linux/proc_fs.h>
++#include <linux/ctype.h>
++#include <net/ip.h>
++#include <net/tcp.h>
++
++#include "regexp/regexp.c"
++
++#include <linux/netfilter_ipv4/ipt_layer7.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++
++MODULE_AUTHOR("Matthew Strait <quadong@users.sf.net>, Ethan Sommer <sommere@users.sf.net>");
++MODULE_LICENSE("GPL");
++MODULE_DESCRIPTION("iptables application layer match module");
++
++#if defined(CONFIG_IP_NF_MATCH_LAYER7_DEBUG)
++  #define DPRINTK(format,args...) printk(format,##args)
++#else
++  #define DPRINTK(format,args...)
++#endif
++
++/* Number of packets whose data we look at.
++This can be modified through /proc/net/layer7_numpackets */
++static int num_packets = 8;
++
++static struct pattern_cache {
++  char * regex_string;
++  regexp * pattern;
++  struct pattern_cache * next;
++} * first_pattern_cache = NULL;
++
++/* I'm new to locking.  Here are my assumptions:
++
++- No one is going to write to /proc/net/layer7_numpackets over and over
++  within a short period of time, and if they did, nothing awful would happen.
++
++- This code will never be processing the same packet twice at the same time,
++  because iptables rules need to be traversed in order.
++
++- It doesn't matter if two packets from different connections are in here at 
++  the same time, because they don't share any data.
++
++- It _does_ matter if two packets from the same connection are here at the same
++  time.  In this case, the things we have to protect are the conntracks and
++  the list of compiled patterns.
++*/
++DECLARE_RWLOCK(ct_lock);
++DECLARE_LOCK(list_lock);
++
++/* Use instead of regcomp.  As we expect to be seeing the same regexps over and
++over again, it make sense to cache the results. */
++static regexp * compile_and_cache(char * regex_string, char * protocol) 
++{
++        struct pattern_cache * node               = first_pattern_cache;
++        struct pattern_cache * last_pattern_cache = first_pattern_cache;
++      struct pattern_cache * tmp;
++        unsigned int len;
++
++        while (node != NULL) {
++                if (!strcmp(node->regex_string, regex_string)) 
++                        return node->pattern;
++
++                last_pattern_cache = node;/* points at the last non-NULL node */
++                node = node->next;
++        }
++
++        /* If we reach the end of the list, then we have not yet cached
++           the pattern for this regex. Let's do that now. 
++         Be paranoid about running out of memory to avoid list corruption. */
++        tmp = kmalloc(sizeof(struct pattern_cache), GFP_ATOMIC);
++
++      if(!tmp) {
++              printk(KERN_ERR "layer7: out of memory in compile_and_cache, bailing.\n");
++              return NULL;
++      }
++
++        tmp->regex_string  = kmalloc(strlen(regex_string) + 1, GFP_ATOMIC);
++        tmp->pattern       = kmalloc(sizeof(struct regexp),    GFP_ATOMIC);
++
++      if(!tmp->regex_string || !tmp->pattern) {
++              printk(KERN_ERR "layer7: out of memory in compile_and_cache, bailing.\n");
++              kfree(tmp->regex_string);
++              kfree(tmp->pattern);
++              kfree(tmp);
++              return NULL;
++      }
++
++        tmp->next = NULL;
++      /* Ok.  The new node is all ready now. */
++      node = tmp;
++
++        if(first_pattern_cache == NULL) /* list is empty */
++                first_pattern_cache = node; /* make node the beginning */
++        else
++                last_pattern_cache->next = node; /* attach node to the end */
++
++        /* copy the string and compile the regex */
++        len = strlen(regex_string);
++      node->pattern = regcomp(regex_string, &len);
++        if ( !node->pattern ) {
++                printk(KERN_ERR "layer7: Error compiling regexp \"%s\" (%s)\n", 
++                      regex_string, protocol);
++                /* pattern is now cached as NULL, so we won't try again. */
++        }
++
++        strcpy(node->regex_string, regex_string);
++        return node->pattern;
++}
++
++#if CONFIG_IP_NF_MATCH_LAYER7_DEBUG
++/* Converts an unfriendly string into a friendly one by 
++replacing unprintables with periods and all whitespace with " ". */
++static char * friendly_print(unsigned char * s)
++{
++      char * f = kmalloc(strlen(s) + 1, GFP_ATOMIC);
++      int i;
++
++      if(!f) {
++               printk(KERN_ERR "layer7: out of memory in friendly_print, bailing.\n");
++               return NULL;
++        }
++
++      for(i = 0; i < strlen(s); i++){
++              if(isprint(s[i]) && s[i] < 128) f[i] = s[i];
++              else if(isspace(s[i]))          f[i] = ' ';
++              else                            f[i] = '.';
++      }
++      f[i] = '\0';
++      return f;
++}
++
++static char dec2hex(int i)
++{
++      switch (i) {
++              case 0 ... 9:
++                      return (char)(i + '0');
++                      break;
++              case 10 ... 15:
++                      return (char)(i - 10 + 'a');
++                      break;
++              default:
++                      printk("Problem in dec2hex\n");
++                      return '\0';
++      }
++}
++
++static char * hex_print(unsigned char * s)
++{
++      char * g = kmalloc(strlen(s)*3 + 1, GFP_ATOMIC);
++      int i;
++
++      if(!g) {
++               printk(KERN_ERR "layer7: out of memory in hex_print, bailing.\n");
++               return NULL;
++        }
++
++      for(i = 0; i < strlen(s); i++) {
++              g[i*3    ] = dec2hex(s[i]/16);
++              g[i*3 + 1] = dec2hex(s[i]%16);
++              g[i*3 + 2] = ' ';
++      }
++      g[i*3] = '\0';
++
++      return g;
++}
++#endif // DEBUG
++
++
++/* The following functions are here in case we get ported into an environment
++(ebtables?) where skb->nh.iph->protocol isn't set. They assume that skb->data
++points at the beginning of the IP datagram, which is true for iptables (but in
++QoS it points to the beginning of the Ethernet frame). */
++#if 0
++#define IP_PROTO_OFFSET 9
++static int is_tcp_over_ipv4 (const struct sk_buff *skb){return(skb->data[IP_PROTO_OFFSET]==IPPROTO_TCP );}
++static int is_udp_over_ipv4 (const struct sk_buff *skb){return(skb->data[IP_PROTO_OFFSET]==IPPROTO_UDP );}
++static int is_icmp_over_ipv4(const struct sk_buff *skb){return(skb->data[IP_PROTO_OFFSET]==IPPROTO_ICMP);}
++#endif
++
++static int can_handle(const struct sk_buff *skb)
++{
++      if(!skb->nh.iph) /* not IP */
++              return 0;
++      if(skb->nh.iph->protocol != IPPROTO_TCP &&
++         skb->nh.iph->protocol != IPPROTO_UDP &&
++         skb->nh.iph->protocol != IPPROTO_ICMP)
++              return 0;
++      return 1;
++}
++
++/* Returns offset the into the skb->data that the application data starts */
++static int app_data_offset(const struct sk_buff *skb)
++{
++      /* In case we are ported somewhere (ebtables?) where skb->nh.iph 
++      isn't set, this can be gotten from 4*(skb->data[0] & 0x0f) as well. */
++        int ip_hl = 4*skb->nh.iph->ihl;
++
++        if( skb->nh.iph->protocol == IPPROTO_TCP ) {
++                /* 12 == offset into TCP header for the header length field. 
++              Can't get this with skb->h.th->doff because the tcphdr 
++              struct doesn't get set when routing (this is confirmed to be 
++              true in Netfilter as well as QoS.) */
++                int tcp_hl = 4*(skb->data[ip_hl + 12] >> 4);
++
++                return ip_hl + tcp_hl;
++        } else if( skb->nh.iph->protocol == IPPROTO_UDP  ) {
++                return ip_hl + 8; /* UDP header is always 8 bytes */
++        } else if( skb->nh.iph->protocol == IPPROTO_ICMP ) {
++                return ip_hl + 8; /* ICMP header is 8 bytes */
++        } else {
++                printk(KERN_ERR "layer7: tried to handle unknown protocol!\n");
++                return ip_hl + 8; /* something reasonable */
++        }
++}
++
++/* handles whether there's a match when we aren't appending data anymore */
++static int match_no_append(struct ip_conntrack * conntrack, 
++                      struct ip_conntrack * master_conntrack,
++                      struct ipt_layer7_info * info)
++{
++      /* If we're in here, we don't care about the app data anymore */
++      WRITE_LOCK(&ct_lock);
++      if(master_conntrack->layer7.app_data != NULL) {
++
++                      #ifdef CONFIG_IP_NF_MATCH_LAYER7_DEBUG
++                      if(!master_conntrack->layer7.app_proto) {
++                              char * f = friendly_print(master_conntrack->layer7.app_data);
++                      char * g = hex_print(master_conntrack->layer7.app_data);
++                              DPRINTK("\nGave up on the %d length stream: \n%s\n",
++                             master_conntrack->layer7.app_data_len, f);
++                      DPRINTK("\nIn hex: %s\n", g);
++                              kfree(f);
++                      kfree(g);
++                      }
++                      #endif
++
++              kfree(master_conntrack->layer7.app_data);
++              master_conntrack->layer7.app_data = NULL; /* don't free again */
++      }
++      WRITE_UNLOCK(&ct_lock);
++
++      /* Is top-level master (possibly self) classified? */
++      if(master_conntrack->layer7.app_proto) { 
++              if(!strcmp(master_conntrack->layer7.app_proto, info->protocol))
++              {
++                      /* set own .protocol (for /proc/net/ip_conntrack) */
++                      WRITE_LOCK(&ct_lock);
++                      if(!conntrack->layer7.app_proto) {
++                              conntrack->layer7.app_proto = kmalloc(strlen(info->protocol), GFP_ATOMIC);
++                                if(!conntrack->layer7.app_proto){
++                                       printk(KERN_ERR "layer7: out of memory in match_no_append, bailing.\n");
++                                       WRITE_UNLOCK(&ct_lock);
++                                       return 1;
++                                }
++
++                              strcpy(conntrack->layer7.app_proto, info->protocol);
++                      }
++                      WRITE_UNLOCK(&ct_lock);
++      
++                      return 1;
++              } else return 0;
++      } else return 0; /* no clasification */
++}
++
++/* add the new app data to the conntrack.  Return number of bytes added. */
++static int add_data(struct ip_conntrack * master_conntrack, 
++                      char * app_data, int appdatalen)
++{
++      int length = 0, i;
++      int oldlength = master_conntrack->layer7.app_data_len;
++
++        /* Strip nulls. Make everything lower case (our regex lib doesn't
++        do case insensitivity).  Add it to the end of the current data. */
++      for(i = 0; i < CONFIG_IP_NF_MATCH_LAYER7_MAXDATALEN-oldlength-1 && 
++                 i < appdatalen; i++) {
++              if(app_data[i] != '\0') {
++                      master_conntrack->layer7.app_data[length+oldlength] = 
++                              /* the kernel version of tolower mungs 'upper ascii' */
++                              isascii(app_data[i])? tolower(app_data[i]) : app_data[i];
++                      length++;
++              }
++      }
++
++      master_conntrack->layer7.app_data[length+oldlength] = '\0';
++      master_conntrack->layer7.app_data_len = length + oldlength;
++
++      return length;
++}
++
++/* Returns true on match and false otherwise.  */
++static int match(/* const */struct sk_buff *skb, const struct net_device *in,
++                 const struct net_device *out, const void *matchinfo,
++                 int offset,                   int *hotdrop)
++{
++      struct ipt_layer7_info * info = (struct ipt_layer7_info *)matchinfo;
++        enum ip_conntrack_info master_ctinfo, ctinfo;
++        struct ip_conntrack *master_conntrack, *conntrack;
++      unsigned char * app_data;  
++      unsigned int pattern_result, appdatalen;
++      regexp * comppattern;
++
++      if(!can_handle(skb)){
++              DPRINTK("layer7: This is some protocol I can't handle\n");
++              return info->invert;
++      }
++
++      LOCK_BH(&list_lock);
++      comppattern = compile_and_cache(info->pattern, info->protocol);
++      UNLOCK_BH(&list_lock);
++      /* the return value gets checked later, when we're ready to use it */
++
++      app_data = skb->data + app_data_offset(skb);
++      appdatalen = skb->tail - app_data;
++
++      /* Treat the parent and all its children together as one connection, 
++      except for the purpose of setting conntrack->layer7.pattern in the 
++      actual connection. This makes /proc/net/ip_conntrack somewhat more 
++      satisfying. */
++        if(!(conntrack        = ip_conntrack_get((struct sk_buff *)skb, &ctinfo)) ||
++           !(master_conntrack = ip_conntrack_get((struct sk_buff *)skb, &master_ctinfo))) {
++                DPRINTK("layer7: packet is not from a known connection, giving up.\n");
++              return info->invert;
++        }
++      
++        /* Try to get a master conntrack (and its master etc) for FTP, etc. */
++        while (master_ct(master_conntrack) != NULL)
++                master_conntrack = master_ct(master_conntrack);
++
++      /* skb->cb[0] == seen. Avoid doing things twice if there are two layer7 
++      rules. I'm not sure that using cb for this purpose is correct, although 
++      it says "put your private variables there" and this seems to qualify.  
++      But it doesn't look like it's being used for anything else in the 
++      sk_buffs that make it here. I'm open to suggestions for how to be able 
++      to write to cb without making the compiler angry.  That I can't figure 
++      this out is an argument against this being correct. */
++      if(!skb->cb[0]){
++              WRITE_LOCK(&ct_lock);
++              master_conntrack->layer7.numpackets++;/*starts at 0 via memset*/
++              WRITE_UNLOCK(&ct_lock);
++      }
++
++      /* On the first packet of a connection, allocate space for app data */
++      WRITE_LOCK(&ct_lock);
++      if(master_conntrack->layer7.numpackets == 1 && !skb->cb[0]) {
++              master_conntrack->layer7.app_data = kmalloc(CONFIG_IP_NF_MATCH_LAYER7_MAXDATALEN, GFP_ATOMIC);
++                if(!master_conntrack->layer7.app_data){                                                         
++                        printk(KERN_ERR "layer7: out of memory in match, bailing.\n");
++                        WRITE_UNLOCK(&ct_lock);
++                        return info->invert;
++                }
++
++              master_conntrack->layer7.app_data[0] = '\0';
++      }
++      WRITE_UNLOCK(&ct_lock);
++
++      /* if we've classified it or seen too many packets */
++      if(master_conntrack->layer7.numpackets > num_packets || 
++         master_conntrack->layer7.app_proto) {
++      
++              pattern_result = match_no_append(conntrack, master_conntrack, info);
++      
++              /* mark the packet seen (probably irrelevant, but consistant) */
++              skb->cb[0] = 1;
++
++              return (pattern_result ^ info->invert);
++      }
++      
++      /* Can end up here, but unallocated, if numpackets is increased during 
++      the beginning of a connection */
++      if(master_conntrack->layer7.app_data == NULL)
++              return (info->invert); /* unmatched */
++
++      if(!skb->cb[0]) {
++              int newbytes;
++              WRITE_LOCK(&ct_lock);
++              newbytes = add_data(master_conntrack, app_data, appdatalen);
++              WRITE_UNLOCK(&ct_lock);
++
++              if(newbytes == 0) { /* didn't add any data */
++                      skb->cb[0] = 1;
++                      /* Didn't match before, not going to match now */
++                      return info->invert;
++              }
++      }
++
++      /* If the regexp failed to compile, don't bother running it */
++      if(comppattern && regexec(comppattern, master_conntrack->layer7.app_data)) {
++              DPRINTK("layer7: regexec positive: %s!\n", info->protocol);
++              pattern_result = 1;
++      } else pattern_result = 0;
++
++      if(pattern_result) {
++              WRITE_LOCK(&ct_lock);
++              conntrack->layer7.app_proto = kmalloc(strlen(info->protocol), GFP_ATOMIC);
++                if(!conntrack->layer7.app_proto){
++                        printk(KERN_ERR "layer7: out of memory in match, bailing.\n");
++                        WRITE_UNLOCK(&ct_lock);
++                        return (pattern_result ^ info->invert);
++                        }
++ 
++              strcpy(conntrack->layer7.app_proto, info->protocol);
++              WRITE_UNLOCK(&ct_lock);
++      }
++
++      /* mark the packet seen */
++      skb->cb[0] = 1;
++
++      return (pattern_result ^ info->invert);
++}
++
++static int checkentry(const char *tablename, const struct ipt_ip *ip,
++           void *matchinfo, unsigned int matchsize, unsigned int hook_mask)
++{
++       if (matchsize != IPT_ALIGN(sizeof(struct ipt_layer7_info))) 
++               return 0;
++       return 1;
++}
++
++static struct ipt_match layer7_match = { 
++      .name = "layer7", 
++      .match = &match, 
++      .checkentry = &checkentry, 
++      .me = THIS_MODULE 
++};
++
++/* taken from drivers/video/modedb.c */
++static int my_atoi(const char *s)
++{
++    int val = 0;
++
++    for (;; s++) {
++        switch (*s) {
++            case '0'...'9':
++                val = 10*val+(*s-'0');
++                break;
++            default:
++                return val;
++        }
++    }
++}
++
++/* write out num_packets to userland. */
++static int layer7_read_proc(char* page, char ** start, off_t off, int count, 
++                     int* eof, void * data) 
++{
++        if(num_packets > 99)
++                printk(KERN_ERR "layer7: NOT REACHED. num_packets too big\n");
++        
++        page[0] = num_packets/10 + '0';
++        page[1] = num_packets%10 + '0';
++        page[2] = '\n';
++        page[3] = '\0';
++                
++        *eof=1;
++
++        return 3;
++}
++
++/* Read in num_packets from userland */
++static int layer7_write_proc(struct file* file, const char* buffer, 
++                      unsigned long count, void *data) 
++{
++        char * foo = kmalloc(count, GFP_ATOMIC);
++
++        if(!foo){
++                printk(KERN_ERR "layer7: out of memory, bailing.  num_packets unchanged.\n");
++                return count;
++        }
++
++        /* copy in the data from userland */
++        copy_from_user(foo, buffer, count);
++
++        num_packets = my_atoi(foo);
++      kfree (foo);
++
++        /* This has an arbitrary limit to make the math easier. I'm lazy. 
++      But anyway, 99 is a LOT! If you want more, you're doing it wrong! */
++        if(num_packets > 99) {
++                printk(KERN_WARNING "layer7: num_packets can't be > 99.\n");
++                num_packets = 99;
++        } else if(num_packets < 1) {
++                printk(KERN_WARNING "layer7: num_packets can't be < 1.\n");
++                num_packets = 1;
++        }
++      
++        return count;
++}
++
++/* register the proc file */
++static void layer7_init_proc(void)
++{
++        struct proc_dir_entry* entry;
++
++        /* create the file */
++        entry = create_proc_entry("layer7_numpackets", 0644, proc_net);
++
++        /* set the callback functions */
++      entry->read_proc = layer7_read_proc;
++      entry->write_proc = layer7_write_proc;
++}
++
++static void layer7_cleanup_proc(void)
++{
++        remove_proc_entry("layer7_numpackets", proc_net);
++}
++
++static int __init init(void)
++{
++        layer7_init_proc();
++      return ipt_register_match(&layer7_match);
++}
++
++static void __exit fini(void)
++{
++      layer7_cleanup_proc();
++      ipt_unregister_match(&layer7_match);
++}
++
++module_init(init);
++module_exit(fini);
+diff -uNr linux-2.6.7.orig/net/ipv4/netfilter/Kconfig linux-2.6.7/net/ipv4/netfilter/Kconfig
+--- linux-2.6.7.orig/net/ipv4/netfilter/Kconfig        2004-07-14 09:43:30.000000000 +0200
++++ linux-2.6.7/net/ipv4/netfilter/Kconfig     2004-07-14 09:48:56.042942568 +0200
+@@ -6,7 +6,7 @@
+       depends on INET && NETFILTER
+ config IP_NF_CONNTRACK
+-      tristate "Connection tracking (required for masq/NAT)"
++      tristate "Connection tracking (required for masq/NAT + layer7)"
+       ---help---
+         Connection tracking keeps a record of what packets have passed
+         through your machine, in order to figure out how they are related
+@@ -115,6 +115,33 @@
+         To compile it as a module, choose M here.  If unsure, say N.
++config IP_NF_MATCH_LAYER7
++      tristate "Layer 7 match support (EXPERIMENTAL)"
++      depends on IP_NF_IPTABLES && IP_NF_CONNTRACK && EXPERIMENTAL
++      help
++        Say Y if you want to be able to classify connections (and their 
++          packets) based on regular expression matching of their application 
++        layer data.   This is one way to classify applications such as 
++        peer-to-peer filesharing systems that do not always use the same 
++        port.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_MATCH_LAYER7_DEBUG
++      bool "Layer 7 debugging output"
++      depends on IP_NF_MATCH_LAYER7
++      help
++        Say Y to get lots of debugging output.
++
++config IP_NF_MATCH_LAYER7_MAXDATALEN
++        int "Buffer size for application layer data" if IP_NF_MATCH_LAYER7
++        range 256 65536 
++        default 2048
++      help
++        Size of the buffer that the application layer data is stored in.
++        Unless you know what you're doing, leave it at the default of 2kB.
++
++
+ config IP_NF_MATCH_PKTTYPE
+       tristate "Packet type match support"
+       depends on IP_NF_IPTABLES
+diff -uNr linux-2.6.7.orig/net/ipv4/netfilter/Makefile linux-2.6.7/net/ipv4/netfilter/Makefile
+--- linux-2.6.7.orig/net/ipv4/netfilter/Makefile       2004-07-14 09:43:30.000000000 +0200
++++ linux-2.6.7/net/ipv4/netfilter/Makefile    2004-07-14 09:48:56.050941352 +0200
+@@ -97,6 +97,8 @@
+ obj-$(CONFIG_IP_NF_MATCH_PHYSDEV) += ipt_physdev.o
+ obj-$(CONFIG_IP_NF_MATCH_POLICY) += ipt_policy.o
++obj-$(CONFIG_IP_NF_MATCH_LAYER7) += ipt_layer7.o
++
+ # targets
+ obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
+ obj-$(CONFIG_IP_NF_TARGET_TARPIT) += ipt_TARPIT.o
+diff -uNr linux-2.6.7.orig/net/ipv4/netfilter/regexp/regexp.c linux-2.6.7/net/ipv4/netfilter/regexp/regexp.c
+--- linux-2.6.7.orig/net/ipv4/netfilter/regexp/regexp.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7/net/ipv4/netfilter/regexp/regexp.c     2004-07-14 09:48:56.065939072 +0200
+@@ -0,0 +1,1195 @@
++/*
++ * regcomp and regexec -- regsub and regerror are elsewhere
++ * @(#)regexp.c       1.3 of 18 April 87
++ *
++ *    Copyright (c) 1986 by University of Toronto.
++ *    Written by Henry Spencer.  Not derived from licensed software.
++ *
++ *    Permission is granted to anyone to use this software for any
++ *    purpose on any computer system, and to redistribute it freely,
++ *    subject to the following restrictions:
++ *
++ *    1. The author is not responsible for the consequences of use of
++ *            this software, no matter how awful, even if they arise
++ *            from defects in it.
++ *
++ *    2. The origin of this software must not be misrepresented, either
++ *            by explicit claim or by omission.
++ *
++ *    3. Altered versions must be plainly marked as such, and must not
++ *            be misrepresented as being the original software.
++ *
++ * Beware that some of this code is subtly aware of the way operator
++ * precedence is structured in regular expressions.  Serious changes in
++ * regular-expression syntax might require a total rethink.
++ *
++ * This code was modified by Ethan Sommer to work within the kernel
++ * (it now uses kmalloc etc..)
++ * 
++ * Modified slightly by Matthew Strait to use more modern C.
++ */
++
++#include "regexp.h"
++#include "regmagic.h"
++
++/* added by ethan and matt.  Lets it work in both kernel and user space.
++(So iptables can use it, for instance.)  Yea, it goes both ways... */
++#if __KERNEL__
++  #define malloc(foo) kmalloc(foo,GFP_ATOMIC)
++#else
++  #define printk(format,args...) printf(format,##args)
++#endif
++
++void regerror(char * s)
++{
++        printk("<3>Regexp: %s\n", s);
++        /* NOTREACHED */
++}
++
++/*
++ * The "internal use only" fields in regexp.h are present to pass info from
++ * compile to execute that permits the execute phase to run lots faster on
++ * simple cases.  They are:
++ *
++ * regstart   char that must begin a match; '\0' if none obvious
++ * reganch    is the match anchored (at beginning-of-line only)?
++ * regmust    string (pointer into program) that match must include, or NULL
++ * regmlen    length of regmust string
++ *
++ * Regstart and reganch permit very fast decisions on suitable starting points
++ * for a match, cutting down the work a lot.  Regmust permits fast rejection
++ * of lines that cannot possibly match.  The regmust tests are costly enough
++ * that regcomp() supplies a regmust only if the r.e. contains something
++ * potentially expensive (at present, the only such thing detected is * or +
++ * at the start of the r.e., which can involve a lot of backup).  Regmlen is
++ * supplied because the test in regexec() needs it and regcomp() is computing
++ * it anyway.
++ */
++
++/*
++ * Structure for regexp "program".  This is essentially a linear encoding
++ * of a nondeterministic finite-state machine (aka syntax charts or
++ * "railroad normal form" in parsing technology).  Each node is an opcode
++ * plus a "next" pointer, possibly plus an operand.  "Next" pointers of
++ * all nodes except BRANCH implement concatenation; a "next" pointer with
++ * a BRANCH on both ends of it is connecting two alternatives.  (Here we
++ * have one of the subtle syntax dependencies:  an individual BRANCH (as
++ * opposed to a collection of them) is never concatenated with anything
++ * because of operator precedence.)  The operand of some types of node is
++ * a literal string; for others, it is a node leading into a sub-FSM.  In
++ * particular, the operand of a BRANCH node is the first node of the branch.
++ * (NB this is *not* a tree structure:  the tail of the branch connects
++ * to the thing following the set of BRANCHes.)  The opcodes are:
++ */
++
++/* definition number  opnd?   meaning */
++#define       END     0       /* no   End of program. */
++#define       BOL     1       /* no   Match "" at beginning of line. */
++#define       EOL     2       /* no   Match "" at end of line. */
++#define       ANY     3       /* no   Match any one character. */
++#define       ANYOF   4       /* str  Match any character in this string. */
++#define       ANYBUT  5       /* str  Match any character not in this string. */
++#define       BRANCH  6       /* node Match this alternative, or the next... */
++#define       BACK    7       /* no   Match "", "next" ptr points backward. */
++#define       EXACTLY 8       /* str  Match this string. */
++#define       NOTHING 9       /* no   Match empty string. */
++#define       STAR    10      /* node Match this (simple) thing 0 or more times. */
++#define       PLUS    11      /* node Match this (simple) thing 1 or more times. */
++#define       OPEN    20      /* no   Mark this point in input as start of #n. */
++                      /*      OPEN+1 is number 1, etc. */
++#define       CLOSE   30      /* no   Analogous to OPEN. */
++
++/*
++ * Opcode notes:
++ *
++ * BRANCH     The set of branches constituting a single choice are hooked
++ *            together with their "next" pointers, since precedence prevents
++ *            anything being concatenated to any individual branch.  The
++ *            "next" pointer of the last BRANCH in a choice points to the
++ *            thing following the whole choice.  This is also where the
++ *            final "next" pointer of each individual branch points; each
++ *            branch starts with the operand node of a BRANCH node.
++ *
++ * BACK               Normal "next" pointers all implicitly point forward; BACK
++ *            exists to make loop structures possible.
++ *
++ * STAR,PLUS  '?', and complex '*' and '+', are implemented as circular
++ *            BRANCH structures using BACK.  Simple cases (one character
++ *            per match) are implemented with STAR and PLUS for speed
++ *            and to minimize recursive plunges.
++ *
++ * OPEN,CLOSE ...are numbered at compile time.
++ */
++
++/*
++ * A node is one char of opcode followed by two chars of "next" pointer.
++ * "Next" pointers are stored as two 8-bit pieces, high order first.  The
++ * value is a positive offset from the opcode of the node containing it.
++ * An operand, if any, simply follows the node.  (Note that much of the
++ * code generation knows about this implicit relationship.)
++ *
++ * Using two bytes for the "next" pointer is vast overkill for most things,
++ * but allows patterns to get big without disasters.
++ */
++#define       OP(p)   (*(p))
++#define       NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377))
++#define       OPERAND(p)      ((p) + 3)
++
++/*
++ * See regmagic.h for one further detail of program structure.
++ */
++
++
++/*
++ * Utility definitions.
++ */
++#ifndef CHARBITS
++#define       UCHARAT(p)      ((int)*(unsigned char *)(p))
++#else
++#define       UCHARAT(p)      ((int)*(p)&CHARBITS)
++#endif
++
++#define       FAIL(m) { regerror(m); return(NULL); }
++#define       ISMULT(c)       ((c) == '*' || (c) == '+' || (c) == '?')
++#define       META    "^$.[()|?+*\\"
++
++/*
++ * Flags to be passed up and down.
++ */
++#define       HASWIDTH        01      /* Known never to match null string. */
++#define       SIMPLE          02      /* Simple enough to be STAR/PLUS operand. */
++#define       SPSTART         04      /* Starts with * or +. */
++#define       WORST           0       /* Worst case. */
++
++/*
++ * Global work variables for regcomp().
++ */
++static char *regparse;                /* Input-scan pointer. */
++static int regnpar;           /* () count. */
++static char regdummy;
++static char *regcode;         /* Code-emit pointer; &regdummy = don't. */
++static long regsize;          /* Code size. */
++
++/*
++ * Forward declarations for regcomp()'s friends.
++ */
++#ifndef STATIC
++#define       STATIC  static
++#endif
++STATIC char *reg(int paren,int *flagp);
++STATIC char *regbranch(int *flagp);
++STATIC char *regpiece(int *flagp);
++STATIC char *regatom(int *flagp);
++STATIC char *regnode(char op);
++STATIC char *regnext(char *p);
++STATIC void regc(char b);
++STATIC void reginsert(char op, char *opnd);
++STATIC void regtail(char *p, char *val);
++STATIC void regoptail(char *p, char *val);
++
++
++__kernel_size_t my_strcspn(const char *s1,const char *s2)
++{
++        char *scan1;
++        char *scan2;
++        int count;
++
++        count = 0;
++        for (scan1 = (char *)s1; *scan1 != '\0'; scan1++) {
++                for (scan2 = (char *)s2; *scan2 != '\0';)       /* ++ moved down. */
++                        if (*scan1 == *scan2++)
++                                return(count);
++                count++;
++        }
++        return(count);
++}
++
++/*
++ - regcomp - compile a regular expression into internal code
++ *
++ * We can't allocate space until we know how big the compiled form will be,
++ * but we can't compile it (and thus know how big it is) until we've got a
++ * place to put the code.  So we cheat:  we compile it twice, once with code
++ * generation turned off and size counting turned on, and once "for real".
++ * This also means that we don't allocate space until we are sure that the
++ * thing really will compile successfully, and we never have to move the
++ * code and thus invalidate pointers into it.  (Note that it has to be in
++ * one piece because free() must be able to free it all.)
++ *
++ * Beware that the optimization-preparation code in here knows about some
++ * of the structure of the compiled regexp.
++ */
++regexp *
++regcomp(char *exp,int *patternsize)
++{
++      register regexp *r;
++      register char *scan;
++      register char *longest;
++      register int len;
++      int flags;
++      /* commented out by ethan
++         extern char *malloc();
++      */
++
++      if (exp == NULL)
++              FAIL("NULL argument");
++
++      /* First pass: determine size, legality. */
++      regparse = exp;
++      regnpar = 1;
++      regsize = 0L;
++      regcode = &regdummy;
++      regc(MAGIC);
++      if (reg(0, &flags) == NULL)
++              return(NULL);
++
++      /* Small enough for pointer-storage convention? */
++      if (regsize >= 32767L)          /* Probably could be 65535L. */
++              FAIL("regexp too big");
++
++      /* Allocate space. */
++      *patternsize=sizeof(regexp) + (unsigned)regsize;
++      r = (regexp *)malloc(sizeof(regexp) + (unsigned)regsize);
++      if (r == NULL)
++              FAIL("out of space");
++
++      /* Second pass: emit code. */
++      regparse = exp;
++      regnpar = 1;
++      regcode = r->program;
++      regc(MAGIC);
++      if (reg(0, &flags) == NULL)
++              return(NULL);
++
++      /* Dig out information for optimizations. */
++      r->regstart = '\0';     /* Worst-case defaults. */
++      r->reganch = 0;
++      r->regmust = NULL;
++      r->regmlen = 0;
++      scan = r->program+1;                    /* First BRANCH. */
++      if (OP(regnext(scan)) == END) {         /* Only one top-level choice. */
++              scan = OPERAND(scan);
++
++              /* Starting-point info. */
++              if (OP(scan) == EXACTLY)
++                      r->regstart = *OPERAND(scan);
++              else if (OP(scan) == BOL)
++                      r->reganch++;
++
++              /*
++               * If there's something expensive in the r.e., find the
++               * longest literal string that must appear and make it the
++               * regmust.  Resolve ties in favor of later strings, since
++               * the regstart check works with the beginning of the r.e.
++               * and avoiding duplication strengthens checking.  Not a
++               * strong reason, but sufficient in the absence of others.
++               */
++              if (flags&SPSTART) {
++                      longest = NULL;
++                      len = 0;
++                      for (; scan != NULL; scan = regnext(scan))
++                              if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
++                                      longest = OPERAND(scan);
++                                      len = strlen(OPERAND(scan));
++                              }
++                      r->regmust = longest;
++                      r->regmlen = len;
++              }
++      }
++
++      return(r);
++}
++
++/*
++ - reg - regular expression, i.e. main body or parenthesized thing
++ *
++ * Caller must absorb opening parenthesis.
++ *
++ * Combining parenthesis handling with the base level of regular expression
++ * is a trifle forced, but the need to tie the tails of the branches to what
++ * follows makes it hard to avoid.
++ */
++static char *
++reg(int paren, int *flagp /* Parenthesized? */ )
++{
++      register char *ret;
++      register char *br;
++      register char *ender;
++      register int parno = 0; /* 0 makes gcc happy */
++      int flags;
++
++      *flagp = HASWIDTH;      /* Tentatively. */
++
++      /* Make an OPEN node, if parenthesized. */
++      if (paren) {
++              if (regnpar >= NSUBEXP)
++                      FAIL("too many ()");
++              parno = regnpar;
++              regnpar++;
++              ret = regnode(OPEN+parno);
++      } else
++              ret = NULL;
++
++      /* Pick up the branches, linking them together. */
++      br = regbranch(&flags);
++      if (br == NULL)
++              return(NULL);
++      if (ret != NULL)
++              regtail(ret, br);       /* OPEN -> first. */
++      else
++              ret = br;
++      if (!(flags&HASWIDTH))
++              *flagp &= ~HASWIDTH;
++      *flagp |= flags&SPSTART;
++      while (*regparse == '|') {
++              regparse++;
++              br = regbranch(&flags);
++              if (br == NULL)
++                      return(NULL);
++              regtail(ret, br);       /* BRANCH -> BRANCH. */
++              if (!(flags&HASWIDTH))
++                      *flagp &= ~HASWIDTH;
++              *flagp |= flags&SPSTART;
++      }
++
++      /* Make a closing node, and hook it on the end. */
++      ender = regnode((paren) ? CLOSE+parno : END);   
++      regtail(ret, ender);
++
++      /* Hook the tails of the branches to the closing node. */
++      for (br = ret; br != NULL; br = regnext(br))
++              regoptail(br, ender);
++
++      /* Check for proper termination. */
++      if (paren && *regparse++ != ')') {
++              FAIL("unmatched ()");
++      } else if (!paren && *regparse != '\0') {
++              if (*regparse == ')') {
++                      FAIL("unmatched ()");
++              } else
++                      FAIL("junk on end");    /* "Can't happen". */
++              /* NOTREACHED */
++      }
++
++      return(ret);
++}
++
++/*
++ - regbranch - one alternative of an | operator
++ *
++ * Implements the concatenation operator.
++ */
++static char *
++regbranch(int *flagp)
++{
++      register char *ret;
++      register char *chain;
++      register char *latest;
++      int flags;
++
++      *flagp = WORST;         /* Tentatively. */
++
++      ret = regnode(BRANCH);
++      chain = NULL;
++      while (*regparse != '\0' && *regparse != '|' && *regparse != ')') {
++              latest = regpiece(&flags);
++              if (latest == NULL)
++                      return(NULL);
++              *flagp |= flags&HASWIDTH;
++              if (chain == NULL)      /* First piece. */
++                      *flagp |= flags&SPSTART;
++              else
++                      regtail(chain, latest);
++              chain = latest;
++      }
++      if (chain == NULL)      /* Loop ran zero times. */
++              (void) regnode(NOTHING);
++
++      return(ret);
++}
++
++/*
++ - regpiece - something followed by possible [*+?]
++ *
++ * Note that the branching code sequences used for ? and the general cases
++ * of * and + are somewhat optimized:  they use the same NOTHING node as
++ * both the endmarker for their branch list and the body of the last branch.
++ * It might seem that this node could be dispensed with entirely, but the
++ * endmarker role is not redundant.
++ */
++static char *
++regpiece(int *flagp)
++{
++      register char *ret;
++      register char op;
++      register char *next;
++      int flags;
++
++      ret = regatom(&flags);
++      if (ret == NULL)
++              return(NULL);
++
++      op = *regparse;
++      if (!ISMULT(op)) {
++              *flagp = flags;
++              return(ret);
++      }
++
++      if (!(flags&HASWIDTH) && op != '?')
++              FAIL("*+ operand could be empty");
++      *flagp = (op != '+') ? (WORST|SPSTART) : (WORST|HASWIDTH);
++
++      if (op == '*' && (flags&SIMPLE))
++              reginsert(STAR, ret);
++      else if (op == '*') {
++              /* Emit x* as (x&|), where & means "self". */
++              reginsert(BRANCH, ret);                 /* Either x */
++              regoptail(ret, regnode(BACK));          /* and loop */
++              regoptail(ret, ret);                    /* back */
++              regtail(ret, regnode(BRANCH));          /* or */
++              regtail(ret, regnode(NOTHING));         /* null. */
++      } else if (op == '+' && (flags&SIMPLE))
++              reginsert(PLUS, ret);
++      else if (op == '+') {
++              /* Emit x+ as x(&|), where & means "self". */
++              next = regnode(BRANCH);                 /* Either */
++              regtail(ret, next);
++              regtail(regnode(BACK), ret);            /* loop back */
++              regtail(next, regnode(BRANCH));         /* or */
++              regtail(ret, regnode(NOTHING));         /* null. */
++      } else if (op == '?') {
++              /* Emit x? as (x|) */
++              reginsert(BRANCH, ret);                 /* Either x */
++              regtail(ret, regnode(BRANCH));          /* or */
++              next = regnode(NOTHING);                /* null. */
++              regtail(ret, next);
++              regoptail(ret, next);
++      }
++      regparse++;
++      if (ISMULT(*regparse))
++              FAIL("nested *?+");
++
++      return(ret);
++}
++
++/*
++ - regatom - the lowest level
++ *
++ * Optimization:  gobbles an entire sequence of ordinary characters so that
++ * it can turn them into a single node, which is smaller to store and
++ * faster to run.  Backslashed characters are exceptions, each becoming a
++ * separate node; the code is simpler that way and it's not worth fixing.
++ */
++static char *
++regatom(int *flagp)
++{
++      register char *ret;
++      int flags;
++
++      *flagp = WORST;         /* Tentatively. */
++
++      switch (*regparse++) {
++      case '^':
++              ret = regnode(BOL);
++              break;
++      case '$':
++              ret = regnode(EOL);
++              break;
++      case '.':
++              ret = regnode(ANY);
++              *flagp |= HASWIDTH|SIMPLE;
++              break;
++      case '[': {
++                      register int class;
++                      register int classend;
++
++                      if (*regparse == '^') { /* Complement of range. */
++                              ret = regnode(ANYBUT);
++                              regparse++;
++                      } else
++                              ret = regnode(ANYOF);
++                      if (*regparse == ']' || *regparse == '-')
++                              regc(*regparse++);
++                      while (*regparse != '\0' && *regparse != ']') {
++                              if (*regparse == '-') {
++                                      regparse++;
++                                      if (*regparse == ']' || *regparse == '\0')
++                                              regc('-');
++                                      else {
++                                              class = UCHARAT(regparse-2)+1;
++                                              classend = UCHARAT(regparse);
++                                              if (class > classend+1)
++                                                      FAIL("invalid [] range");
++                                              for (; class <= classend; class++)
++                                                      regc(class);
++                                              regparse++;
++                                      }
++                              } else
++                                      regc(*regparse++);
++                      }
++                      regc('\0');
++                      if (*regparse != ']')
++                              FAIL("unmatched []");
++                      regparse++;
++                      *flagp |= HASWIDTH|SIMPLE;
++              }
++              break;
++      case '(':
++              ret = reg(1, &flags);
++              if (ret == NULL)
++                      return(NULL);
++              *flagp |= flags&(HASWIDTH|SPSTART);
++              break;
++      case '\0':
++      case '|':
++      case ')':
++              FAIL("internal urp");   /* Supposed to be caught earlier. */
++              break;
++      case '?':
++      case '+':
++      case '*':
++              FAIL("?+* follows nothing");
++              break;
++      case '\\':
++              if (*regparse == '\0')
++                      FAIL("trailing \\");
++              ret = regnode(EXACTLY);
++              regc(*regparse++);
++              regc('\0');
++              *flagp |= HASWIDTH|SIMPLE;
++              break;
++      default: {
++                      register int len;
++                      register char ender;
++
++                      regparse--;
++                      len = my_strcspn((const char *)regparse, (const char *)META);
++                      if (len <= 0)
++                              FAIL("internal disaster");
++                      ender = *(regparse+len);
++                      if (len > 1 && ISMULT(ender))
++                              len--;          /* Back off clear of ?+* operand. */
++                      *flagp |= HASWIDTH;
++                      if (len == 1)
++                              *flagp |= SIMPLE;
++                      ret = regnode(EXACTLY);
++                      while (len > 0) {
++                              regc(*regparse++);
++                              len--;
++                      }
++                      regc('\0');
++              }
++              break;
++      }
++
++      return(ret);
++}
++
++/*
++ - regnode - emit a node
++ */
++static char *                 /* Location. */
++regnode(char op)
++{
++      register char *ret;
++      register char *ptr;
++
++      ret = regcode;
++      if (ret == &regdummy) {
++              regsize += 3;
++              return(ret);
++      }
++
++      ptr = ret;
++      *ptr++ = op;
++      *ptr++ = '\0';          /* Null "next" pointer. */
++      *ptr++ = '\0';
++      regcode = ptr;
++
++      return(ret);
++}
++
++/*
++ - regc - emit (if appropriate) a byte of code
++ */
++static void
++regc(char b)
++{
++      if (regcode != &regdummy)
++              *regcode++ = b;
++      else
++              regsize++;
++}
++
++/*
++ - reginsert - insert an operator in front of already-emitted operand
++ *
++ * Means relocating the operand.
++ */
++static void
++reginsert(char op, char* opnd)
++{
++      register char *src;
++      register char *dst;
++      register char *place;
++
++      if (regcode == &regdummy) {
++              regsize += 3;
++              return;
++      }
++
++      src = regcode;
++      regcode += 3;
++      dst = regcode;
++      while (src > opnd)
++              *--dst = *--src;
++
++      place = opnd;           /* Op node, where operand used to be. */
++      *place++ = op;
++      *place++ = '\0';
++      *place++ = '\0';
++}
++
++/*
++ - regtail - set the next-pointer at the end of a node chain
++ */
++static void
++regtail(char *p, char *val)
++{
++      register char *scan;
++      register char *temp;
++      register int offset;
++
++      if (p == &regdummy)
++              return;
++
++      /* Find last node. */
++      scan = p;
++      for (;;) {
++              temp = regnext(scan);
++              if (temp == NULL)
++                      break;
++              scan = temp;
++      }
++
++      if (OP(scan) == BACK)
++              offset = scan - val;
++      else
++              offset = val - scan;
++      *(scan+1) = (offset>>8)&0377;
++      *(scan+2) = offset&0377;
++}
++
++/*
++ - regoptail - regtail on operand of first argument; nop if operandless
++ */
++static void
++regoptail(char *p, char *val)
++{
++      /* "Operandless" and "op != BRANCH" are synonymous in practice. */
++      if (p == NULL || p == &regdummy || OP(p) != BRANCH)
++              return;
++      regtail(OPERAND(p), val);
++}
++
++/*
++ * regexec and friends
++ */
++
++/*
++ * Global work variables for regexec().
++ */
++static char *reginput;                /* String-input pointer. */
++static char *regbol;          /* Beginning of input, for ^ check. */
++static char **regstartp;      /* Pointer to startp array. */
++static char **regendp;                /* Ditto for endp. */
++
++/*
++ * Forwards.
++ */
++STATIC int regtry(regexp *prog, char *string);
++STATIC int regmatch(char *prog);
++STATIC int regrepeat(char *p);
++
++#ifdef DEBUG
++int regnarrate = 0;
++void regdump();
++STATIC char *regprop(char *op);
++#endif
++
++/*
++ - regexec - match a regexp against a string
++ */
++int
++regexec(regexp *prog, char *string)
++{
++      register char *s;
++
++      /* Be paranoid... */
++      if (prog == NULL || string == NULL) {
++              printk("<3>Regexp: NULL parameter\n");
++              return(0);
++      }
++
++      /* Check validity of program. */
++      if (UCHARAT(prog->program) != MAGIC) {
++              printk("<3>Regexp: corrupted program\n");
++              return(0);
++      }
++
++      /* If there is a "must appear" string, look for it. */
++      if (prog->regmust != NULL) {
++              s = string;
++              while ((s = strchr(s, prog->regmust[0])) != NULL) {
++                      if (strncmp(s, prog->regmust, prog->regmlen) == 0)
++                              break;  /* Found it. */
++                      s++;
++              }
++              if (s == NULL)  /* Not present. */
++                      return(0);
++      }
++
++      /* Mark beginning of line for ^ . */
++      regbol = string;
++
++      /* Simplest case:  anchored match need be tried only once. */
++      if (prog->reganch)
++              return(regtry(prog, string));
++
++      /* Messy cases:  unanchored match. */
++      s = string;
++      if (prog->regstart != '\0')
++              /* We know what char it must start with. */
++              while ((s = strchr(s, prog->regstart)) != NULL) {
++                      if (regtry(prog, s))
++                              return(1);
++                      s++;
++              }
++      else
++              /* We don't -- general case. */
++              do {
++                      if (regtry(prog, s))
++                              return(1);
++              } while (*s++ != '\0');
++
++      /* Failure. */
++      return(0);
++}
++
++/*
++ - regtry - try match at specific point
++ */
++static int                    /* 0 failure, 1 success */
++regtry(regexp *prog, char *string)
++{
++      register int i;
++      register char **sp;
++      register char **ep;
++
++      reginput = string;
++      regstartp = prog->startp;
++      regendp = prog->endp;
++
++      sp = prog->startp;
++      ep = prog->endp;
++      for (i = NSUBEXP; i > 0; i--) {
++              *sp++ = NULL;
++              *ep++ = NULL;
++      }
++      if (regmatch(prog->program + 1)) {
++              prog->startp[0] = string;
++              prog->endp[0] = reginput;
++              return(1);
++      } else
++              return(0);
++}
++
++/*
++ - regmatch - main matching routine
++ *
++ * Conceptually the strategy is simple:  check to see whether the current
++ * node matches, call self recursively to see whether the rest matches,
++ * and then act accordingly.  In practice we make some effort to avoid
++ * recursion, in particular by going through "ordinary" nodes (that don't
++ * need to know whether the rest of the match failed) by a loop instead of
++ * by recursion.
++ */
++static int                    /* 0 failure, 1 success */
++regmatch(char *prog)
++{
++      register char *scan = prog; /* Current node. */
++      char *next;                 /* Next node. */
++
++#ifdef DEBUG
++      if (scan != NULL && regnarrate)
++              fprintf(stderr, "%s(\n", regprop(scan));
++#endif
++      while (scan != NULL) {
++#ifdef DEBUG
++              if (regnarrate)
++                      fprintf(stderr, "%s...\n", regprop(scan));
++#endif
++              next = regnext(scan);
++
++              switch (OP(scan)) {
++              case BOL:
++                      if (reginput != regbol)
++                              return(0);
++                      break;
++              case EOL:
++                      if (*reginput != '\0')
++                              return(0);
++                      break;
++              case ANY:
++                      if (*reginput == '\0')
++                              return(0);
++                      reginput++;
++                      break;
++              case EXACTLY: {
++                              register int len;
++                              register char *opnd;
++
++                              opnd = OPERAND(scan);
++                              /* Inline the first character, for speed. */
++                              if (*opnd != *reginput)
++                                      return(0);
++                              len = strlen(opnd);
++                              if (len > 1 && strncmp(opnd, reginput, len) != 0)
++                                      return(0);
++                              reginput += len;
++                      }
++                      break;
++              case ANYOF:
++                      if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL)
++                              return(0);
++                      reginput++;
++                      break;
++              case ANYBUT:
++                      if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL)
++                              return(0);
++                      reginput++;
++                      break;
++              case NOTHING:
++              case BACK:
++                      break;
++              case OPEN+1:
++              case OPEN+2:
++              case OPEN+3:
++              case OPEN+4:
++              case OPEN+5:
++              case OPEN+6:
++              case OPEN+7:
++              case OPEN+8:
++              case OPEN+9: {
++                              register int no;
++                              register char *save;
++
++                              no = OP(scan) - OPEN;
++                              save = reginput;
++
++                              if (regmatch(next)) {
++                                      /*
++                                       * Don't set startp if some later
++                                       * invocation of the same parentheses
++                                       * already has.
++                                       */
++                                      if (regstartp[no] == NULL)
++                                              regstartp[no] = save;
++                                      return(1);
++                              } else
++                                      return(0);
++                      }
++                      break;
++              case CLOSE+1:
++              case CLOSE+2:
++              case CLOSE+3:
++              case CLOSE+4:
++              case CLOSE+5:
++              case CLOSE+6:
++              case CLOSE+7:
++              case CLOSE+8:
++              case CLOSE+9:
++                      {
++                              register int no;
++                              register char *save;
++
++                              no = OP(scan) - CLOSE;
++                              save = reginput;
++
++                              if (regmatch(next)) {
++                                      /*
++                                       * Don't set endp if some later
++                                       * invocation of the same parentheses
++                                       * already has.
++                                       */
++                                      if (regendp[no] == NULL)
++                                              regendp[no] = save;
++                                      return(1);
++                              } else
++                                      return(0);
++                      }
++                      break;
++              case BRANCH: {
++                              register char *save;
++
++                              if (OP(next) != BRANCH)         /* No choice. */
++                                      next = OPERAND(scan);   /* Avoid recursion. */
++                              else {
++                                      do {
++                                              save = reginput;
++                                              if (regmatch(OPERAND(scan)))
++                                                      return(1);
++                                              reginput = save;
++                                              scan = regnext(scan);
++                                      } while (scan != NULL && OP(scan) == BRANCH);
++                                      return(0);
++                                      /* NOTREACHED */
++                              }
++                      }
++                      break;
++              case STAR:
++              case PLUS: {
++                              register char nextch;
++                              register int no;
++                              register char *save;
++                              register int min;
++
++                              /*
++                               * Lookahead to avoid useless match attempts
++                               * when we know what character comes next.
++                               */
++                              nextch = '\0';
++                              if (OP(next) == EXACTLY)
++                                      nextch = *OPERAND(next);
++                              min = (OP(scan) == STAR) ? 0 : 1;
++                              save = reginput;
++                              no = regrepeat(OPERAND(scan));
++                              while (no >= min) {
++                                      /* If it could work, try it. */
++                                      if (nextch == '\0' || *reginput == nextch)
++                                              if (regmatch(next))
++                                                      return(1);
++                                      /* Couldn't or didn't -- back up. */
++                                      no--;
++                                      reginput = save + no;
++                              }
++                              return(0);
++                      }
++                      break;
++              case END:
++                      return(1);      /* Success! */
++                      break;
++              default:
++                      printk("<3>Regexp: memory corruption\n");
++                      return(0);
++                      break;
++              }
++
++              scan = next;
++      }
++
++      /*
++       * We get here only if there's trouble -- normally "case END" is
++       * the terminating point.
++       */
++      printk("<3>Regexp: corrupted pointers\n");
++      return(0);
++}
++
++/*
++ - regrepeat - repeatedly match something simple, report how many
++ */
++static int
++regrepeat(char *p)
++{
++      register int count = 0;
++      register char *scan;
++      register char *opnd;
++
++      scan = reginput;
++      opnd = OPERAND(p);
++      switch (OP(p)) {
++      case ANY:
++              count = strlen(scan);
++              scan += count;
++              break;
++      case EXACTLY:
++              while (*opnd == *scan) {
++                      count++;
++                      scan++;
++              }
++              break;
++      case ANYOF:
++              while (*scan != '\0' && strchr(opnd, *scan) != NULL) {
++                      count++;
++                      scan++;
++              }
++              break;
++      case ANYBUT:
++              while (*scan != '\0' && strchr(opnd, *scan) == NULL) {
++                      count++;
++                      scan++;
++              }
++              break;
++      default:                /* Oh dear.  Called inappropriately. */
++              printk("<3>Regexp: internal foulup\n");
++              count = 0;      /* Best compromise. */
++              break;
++      }
++      reginput = scan;
++
++      return(count);
++}
++
++/*
++ - regnext - dig the "next" pointer out of a node
++ */
++static char* 
++regnext(char *p)
++{
++      register int offset;
++
++      if (p == &regdummy)
++              return(NULL);
++
++      offset = NEXT(p);
++      if (offset == 0)
++              return(NULL);
++
++      if (OP(p) == BACK)
++              return(p-offset);
++      else
++              return(p+offset);
++}
++
++#ifdef DEBUG
++
++STATIC char *regprop();
++
++/*
++ - regdump - dump a regexp onto stdout in vaguely comprehensible form
++ */
++void
++regdump(regexp *r)
++{
++      register char *s;
++      register char op = EXACTLY;     /* Arbitrary non-END op. */
++      register char *next;
++      /* extern char *strchr(); */
++
++
++      s = r->program + 1;
++      while (op != END) {     /* While that wasn't END last time... */
++              op = OP(s);
++              printf("%2d%s", s-r->program, regprop(s));      /* Where, what. */
++              next = regnext(s);
++              if (next == NULL)               /* Next ptr. */
++                      printf("(0)");
++              else 
++                      printf("(%d)", (s-r->program)+(next-s));
++              s += 3;
++              if (op == ANYOF || op == ANYBUT || op == EXACTLY) {
++                      /* Literal string, where present. */
++                      while (*s != '\0') {
++                              putchar(*s);
++                              s++;
++                      }
++                      s++;
++              }
++              putchar('\n');
++      }
++
++      /* Header fields of interest. */
++      if (r->regstart != '\0')
++              printf("start `%c' ", r->regstart);
++      if (r->reganch)
++              printf("anchored ");
++      if (r->regmust != NULL)
++              printf("must have \"%s\"", r->regmust);
++      printf("\n");
++}
++
++/*
++ - regprop - printable representation of opcode
++ */
++static char *
++regprop(char *op)
++{
++#define BUFLEN 50
++      register char *p;
++      static char buf[BUFLEN];
++
++      strcpy(buf, ":");
++
++      switch (OP(op)) {
++      case BOL:
++              p = "BOL";
++              break;
++      case EOL:
++              p = "EOL";
++              break;
++      case ANY:
++              p = "ANY";
++              break;
++      case ANYOF:
++              p = "ANYOF";
++              break;
++      case ANYBUT:
++              p = "ANYBUT";
++              break;
++      case BRANCH:
++              p = "BRANCH";
++              break;
++      case EXACTLY:
++              p = "EXACTLY";
++              break;
++      case NOTHING:
++              p = "NOTHING";
++              break;
++      case BACK:
++              p = "BACK";
++              break;
++      case END:
++              p = "END";
++              break;
++      case OPEN+1:
++      case OPEN+2:
++      case OPEN+3:
++      case OPEN+4:
++      case OPEN+5:
++      case OPEN+6:
++      case OPEN+7:
++      case OPEN+8:
++      case OPEN+9:
++              snprintf(buf+strlen(buf),BUFLEN-strlen(buf), "OPEN%d", OP(op)-OPEN);
++              p = NULL;
++              break;
++      case CLOSE+1:
++      case CLOSE+2:
++      case CLOSE+3:
++      case CLOSE+4:
++      case CLOSE+5:
++      case CLOSE+6:
++      case CLOSE+7:
++      case CLOSE+8:
++      case CLOSE+9:
++              snprintf(buf+strlen(buf),BUFLEN-strlen(buf), "CLOSE%d", OP(op)-CLOSE);
++              p = NULL;
++              break;
++      case STAR:
++              p = "STAR";
++              break;
++      case PLUS:
++              p = "PLUS";
++              break;
++      default:
++              printk("<3>Regexp: corrupted opcode\n");
++              break;
++      }
++      if (p != NULL)
++              strncat(buf, p, BUFLEN-strlen(buf));
++      return(buf);
++}
++#endif
++
++
+diff -uNr linux-2.6.7.orig/net/ipv4/netfilter/regexp/regexp.h linux-2.6.7/net/ipv4/netfilter/regexp/regexp.h
+--- linux-2.6.7.orig/net/ipv4/netfilter/regexp/regexp.h        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7/net/ipv4/netfilter/regexp/regexp.h     2004-07-14 09:48:56.066938920 +0200
+@@ -0,0 +1,27 @@
++/*
++ * Definitions etc. for regexp(3) routines.
++ *
++ * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
++ * not the System V one.
++ */
++
++#ifndef REGEXP_H
++#define REGEXP_H
++
++#define NSUBEXP  10
++typedef struct regexp {
++      char *startp[NSUBEXP];
++      char *endp[NSUBEXP];
++      char regstart;          /* Internal use only. */
++      char reganch;           /* Internal use only. */
++      char *regmust;          /* Internal use only. */
++      int regmlen;            /* Internal use only. */
++      char program[1];        /* Unwarranted chumminess with compiler. */
++} regexp;
++
++regexp * regcomp(char *exp, int *patternsize);
++int regexec(regexp *prog, char *string);
++void regsub(regexp *prog, char *source, char *dest);
++void regerror(char *s);
++
++#endif
+diff -uNr linux-2.6.7.orig/net/ipv4/netfilter/regexp/regmagic.h linux-2.6.7/net/ipv4/netfilter/regexp/regmagic.h
+--- linux-2.6.7.orig/net/ipv4/netfilter/regexp/regmagic.h      1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7/net/ipv4/netfilter/regexp/regmagic.h   2004-07-14 09:48:56.066938920 +0200
+@@ -0,0 +1,5 @@
++/*
++ * The first byte of the regexp internal "program" is actually this magic
++ * number; the start node begins in the second byte.
++ */
++#define       MAGIC   0234
+diff -uNr linux-2.6.7.orig/net/ipv4/netfilter/regexp/regsub.c linux-2.6.7/net/ipv4/netfilter/regexp/regsub.c
+--- linux-2.6.7.orig/net/ipv4/netfilter/regexp/regsub.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7/net/ipv4/netfilter/regexp/regsub.c     2004-07-14 09:48:56.067938768 +0200
+@@ -0,0 +1,95 @@
++/*
++ * regsub
++ * @(#)regsub.c       1.3 of 2 April 86
++ *
++ *    Copyright (c) 1986 by University of Toronto.
++ *    Written by Henry Spencer.  Not derived from licensed software.
++ *
++ *    Permission is granted to anyone to use this software for any
++ *    purpose on any computer system, and to redistribute it freely,
++ *    subject to the following restrictions:
++ *
++ *    1. The author is not responsible for the consequences of use of
++ *            this software, no matter how awful, even if they arise
++ *            from defects in it.
++ *
++ *    2. The origin of this software must not be misrepresented, either
++ *            by explicit claim or by omission.
++ *
++ *    3. Altered versions must be plainly marked as such, and must not
++ *            be misrepresented as being the original software.
++ *
++ *
++ * This code was modified by Ethan Sommer to work within the kernel
++ * (it now uses kmalloc etc..)
++ *
++ */
++#include "regexp.h"
++#include "regmagic.h"
++#include <linux/string.h>
++
++
++#ifndef CHARBITS
++#define       UCHARAT(p)      ((int)*(unsigned char *)(p))
++#else
++#define       UCHARAT(p)      ((int)*(p)&CHARBITS)
++#endif
++
++#if 0
++//void regerror(char * s)
++//{
++//        printk("regexp(3): %s", s);
++//        /* NOTREACHED */
++//}
++#endif
++
++/*
++ - regsub - perform substitutions after a regexp match
++ */
++void
++regsub(regexp * prog, char * source, char * dest)
++{
++      register char *src;
++      register char *dst;
++      register char c;
++      register int no;
++      register int len;
++      
++      /* Not necessary and gcc doesn't like it -MLS */
++      /*extern char *strncpy();*/
++
++      if (prog == NULL || source == NULL || dest == NULL) {
++              regerror("NULL parm to regsub");
++              return;
++      }
++      if (UCHARAT(prog->program) != MAGIC) {
++              regerror("damaged regexp fed to regsub");
++              return;
++      }
++
++      src = source;
++      dst = dest;
++      while ((c = *src++) != '\0') {
++              if (c == '&')
++                      no = 0;
++              else if (c == '\\' && '0' <= *src && *src <= '9')
++                      no = *src++ - '0';
++              else
++                      no = -1;
++
++              if (no < 0) {   /* Ordinary character. */
++                      if (c == '\\' && (*src == '\\' || *src == '&'))
++                              c = *src++;
++                      *dst++ = c;
++              } else if (prog->startp[no] != NULL && prog->endp[no] != NULL) {
++                      len = prog->endp[no] - prog->startp[no];
++                      (void) strncpy(dst, prog->startp[no], len);
++                      dst += len;
++                      if (len != 0 && *(dst-1) == '\0') {     /* strncpy hit NUL. */
++                              regerror("damaged match string");
++                              return;
++                      }
++              }
++      }
++      *dst++ = '\0';
++}
diff --git a/2.6.8-lirc-0.7.0-pre7.patch b/2.6.8-lirc-0.7.0-pre7.patch
new file mode 100644 (file)
index 0000000..77daec5
--- /dev/null
@@ -0,0 +1,9550 @@
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/Kconfig linux-2.6.8-rc4/drivers/char/Kconfig
+--- linux-2.6.8-rc4.orig/drivers/char/Kconfig  2004-08-10 09:33:29.000000000 +0200
++++ linux-2.6.8-rc4/drivers/char/Kconfig       2004-08-10 10:22:53.524975088 +0200
+@@ -427,6 +427,7 @@
+ source "drivers/serial/Kconfig"
++source "drivers/char/lirc/Kconfig"
+ config UNIX98_PTYS
+       bool "Unix98 PTY support" if EMBEDDED
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/Kconfig linux-2.6.8-rc4/drivers/char/lirc/Kconfig
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/Kconfig     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/Kconfig  2004-08-10 10:21:59.728153448 +0200
+@@ -0,0 +1,204 @@
++menu "Linux InfraRed Controller"
++
++config LIRC_SUPPORT
++      tristate "Linux InfraRed Controller"
++
++      config LIRC_MAX_DEV
++              int "Maximum LIRC devices"
++              default "2"
++              depends on LIRC_SUPPORT
++
++      config LIRC_IRCTL_DEV_MAJOR
++              int "Major device number"
++              default "61"
++              depends on LIRC_SUPPORT
++
++      config LIRC_I2C
++              tristate "I2C Driver"
++              depends on LIRC_SUPPORT && VIDEO_BT848 && I2C && I2C_ALGOBIT
++              help
++                Say Y here if you need support for the following cards:
++
++                Pixelview IR
++                Hauppauage IR
++                PV951 IR
++                TV-Box IR
++                KNC ONE IR
++
++                If these dont make sense to you, then dont use the module.
++
++      config LIRC_GPIO
++              tristate "GPIO Driver"
++              depends on LIRC_SUPPORT && VIDEO_BT848
++
++      config LIRC_BT829
++              tristate "BT829 Driver"
++              depends on LIRC_SUPPORT
++
++      config LIRC_IT87
++              tristate "IT87 Driver"
++              depends on LIRC_SUPPORT
++
++      config LIRC_ATIUSB
++              tristate "ATI USB Driver"
++              depends on LIRC_SUPPORT && USB
++
++      config LIRC_MCEUSB
++              tristate "MCE USB Driver"
++              depends on LIRC_SUPPORT && USB
++
++      config LIRC_SASEM
++              tristate "USB Driver for Sasem Remote Controller"
++              depends on LIRC_SUPPORT && USB
++
++      config LIRC_PARALLEL
++              tristate "Parallel Driver"
++              depends on LIRC_SUPPORT && !SMP && PARPORT
++
++              choice
++                      prompt "Parallel Port"
++                      depends on LIRC_PARALLEL
++                      config LIRC_PARALLEL_LPT1
++                              bool "LPT1 (0x378, 7)"
++                      config LIRC_PARALLEL_LPT2
++                              bool "LPT2 (0x278, 5)"
++                      config LIRC_PARALLEL_LPT3
++                              bool "COM3 (0x3bc, none)"
++                      config LIRC_PARALLEL_OTHER
++                              bool "Other (custom values)"
++              endchoice
++
++              config LIRC_PORT_PARALLEL
++                      hex "I/O Port"
++                              default "0x378" if LIRC_PARALLEL_LPT1
++                              default "0x278" if LIRC_PARALLEL_LPT2
++                              default "0x3bc" if LIRC_PARALLEL_LPT3
++                      depends on LIRC_PARALLEL
++
++              config LIRC_IRQ_PARALLEL
++                      hex "IRQ"
++                              default "7" if LIRC_PARALLEL_LPT1
++                              default "5" if LIRC_PARALLEL_LPT2
++                      depends on LIRC_PARALLEL
++
++              config LIRC_TIMER
++                      int "Timer"
++                      default "65535"
++                      depends on LIRC_PARALLEL
++
++      config LIRC_SERIAL
++              tristate "Serial Driver"
++              depends on LIRC_SUPPORT && SERIAL_8250
++
++              choice
++                      prompt "Serial Receiver Type"
++                      depends on LIRC_SERIAL
++
++                      config LIRC_HOMEBREW
++                              bool "Homebrew"
++
++                      config LIRC_SERIAL_ANIMAX
++                              bool "Animax"
++
++                      config LIRC_SERIAL_IRDEO
++                              bool "IRdeo"
++
++                      config LIRC_SERIAL_IRDEO_REMOTE
++                              bool "IRdeo Remote"
++
++              endchoice
++
++              config LIRC_SERIAL_TRANSMITTER
++                      bool "With transmitter diode"
++                      depends on LIRC_SERIAL && !LIRC_SERIAL_ANIMAX
++
++              config LIRC_SERIAL_SOFTCARRIER
++                      bool "With software carrier"
++                      depends on LIRC_SERIAL_TRANSMITTER
++
++              config LIRC_SERIAL_IGOR
++                      bool "Igor Ceska's variation"
++                      depends on LIRC_SERIAL
++
++              choice
++                      prompt "Serial Port"
++                      depends on LIRC_SERIAL
++                      config LIRC_SERIAL_COM1
++                              bool "COM1 (0x3f8, 4)"
++                      config LIRC_SERIAL_COM2
++                              bool "COM2 (0x2f8, 3)"
++                      config LIRC_SERIAL_COM3
++                              bool "COM3 (0x3e8, 4)"
++                      config LIRC_SERIAL_COM4
++                              bool "COM4 (0x2e8, 3)"
++                      config LIRC_SERIAL_OTHER
++                              bool "Other (custom values)"
++              endchoice
++
++              config LIRC_PORT_SERIAL
++                      hex "I/O Port"
++                              default "0x3f8" if LIRC_SERIAL_COM1
++                              default "0x2f8" if LIRC_SERIAL_COM2
++                              default "0x3e8" if LIRC_SERIAL_COM3
++                              default "0x2e8" if LIRC_SERIAL_COM4
++                      depends on LIRC_SERIAL
++
++              config LIRC_IRQ_SERIAL
++                      hex "IRQ"
++                              default "4" if LIRC_SERIAL_COM1 || LIRC_SERIAL_COM3
++                              default "3" if LIRC_SERIAL_COM2 || LIRC_SERIAL_COM4
++                      depends on LIRC_SERIAL
++
++      config LIRC_SIR
++              tristate "SIR Driver"
++              depends on LIRC_SUPPORT
++
++              config LIRC_ON_SA1100
++                      bool "LIRC driver for StrongARM SA1100 embedded microprocessor"
++                      depends on LIRC_SIR
++
++              choice
++                      prompt "SIR Type"
++                      depends on LIRC_SIR && !LIRC_ON_SA1100
++
++                      config LIRC_SIR_IRDA
++                              bool "SIR IrDA (built-in IR ports)"
++
++                      config LIRC_SIR_TEKRAM
++                              bool "Tekram Irmate 210 (16x50 UART compatible serial port)"
++
++                      config LIRC_SIR_ACTISYS_ACT200L
++                              bool "Actisys Act200L SIR driver support"
++
++              endchoice
++
++              choice
++                      prompt "Serial Port"
++                      depends on LIRC_SIR
++                      config LIRC_SIR_COM1
++                              bool "COM1 (0x3f8, 4)"
++                      config LIRC_SIR_COM2
++                              bool "COM2 (0x2f8, 3)"
++                      config LIRC_SIR_COM3
++                              bool "COM3 (0x3e8, 4)"
++                      config LIRC_SIR_COM4
++                              bool "COM4 (0x2e8, 3)"
++                      config LIRC_SIR_OTHER
++                              bool "Other (custom values)"
++              endchoice
++
++              config LIRC_PORT_SIR
++                      hex "I/O Port"
++                              default "0x3f8" if LIRC_SIR_COM1
++                              default "0x2f8" if LIRC_SIR_COM2
++                              default "0x3e8" if LIRC_SIR_COM3
++                              default "0x2e8" if LIRC_SIR_COM4
++                      depends on LIRC_SIR
++
++              config LIRC_IRQ_SIR
++                      hex "IRQ"
++                              default "4" if LIRC_SIR_COM1 || LIRC_SIR_COM3
++                              default "3" if LIRC_SIR_COM2 || LIRC_SIR_COM4
++                      depends on LIRC_SIR
++
++endmenu
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_atiusb.c linux-2.6.8-rc4/drivers/char/lirc/lirc_atiusb.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_atiusb.c       1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_atiusb.c    2004-06-13 16:33:11.000000000 +0200
+@@ -0,0 +1,681 @@
++/* lirc_atiusb - USB remote support for LIRC
++ * (currently only supports X10 USB remotes)
++ *
++ * Copyright (C) 2003-2004 Paul Miller <pmiller9@users.sourceforge.net>
++ *
++ * This driver was derived from:
++ *   Vladimir Dergachev <volodya@minspring.com>'s 2002
++ *      "USB ATI Remote support" (input device)
++ *   Adrian Dewhurst <sailor-lk@sailorfrag.net>'s 2002
++ *      "USB StreamZap remote driver" (LIRC)
++ *   Artur Lipowski <alipowski@kki.net.pl>'s 2002
++ *      "lirc_dev" and "lirc_gpio" LIRC modules
++ *
++ * $Id$
++ */
++
++/*
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ */
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 4)
++#error "*******************************************************"
++#error "Sorry, this driver needs kernel version 2.2.4 or higher"
++#error "*******************************************************"
++#endif
++
++#include <linux/config.h>
++
++#include <linux/kernel.h>
++#include <linux/errno.h>
++#include <linux/init.h>
++#include <linux/slab.h>
++#include <linux/module.h>
++#include <linux/kmod.h>
++#include <linux/smp_lock.h>
++#include <linux/completion.h>
++#include <asm/uaccess.h>
++#include <linux/usb.h>
++#include <linux/poll.h>
++#include <linux/wait.h>
++
++#include <linux/lirc.h>
++#include "kcompat.h"
++#include "lirc_dev.h"
++
++#define DRIVER_VERSION                "0.4"
++#define DRIVER_AUTHOR         "Paul Miller <pmiller9@users.sourceforge.net>"
++#define DRIVER_DESC           "USB remote driver for LIRC"
++#define DRIVER_NAME           "lirc_atiusb"
++
++#define CODE_LENGTH           5
++#define CODE_MIN_LENGTH               4
++#define USB_BUFLEN            (CODE_LENGTH*4)
++
++/* module parameters */
++#ifdef CONFIG_USB_DEBUG
++      static int debug = 1;
++#else
++      static int debug = 0;
++#endif
++#define dprintk                       if (debug) printk
++static int mask = 0xFFFF;     // channel acceptance bit mask
++static int unique = 0;                // enable channel-specific codes
++static int repeat = 10;               // repeat time in 1/100 sec
++static unsigned long repeat_jiffies; // repeat timeout
++
++/* get hi and low bytes of a 16-bits int */
++#define HI(a)                 ((unsigned char)((a) >> 8))
++#define LO(a)                 ((unsigned char)((a) & 0xff))
++
++/* lock irctl structure */
++#define IRLOCK                        down_interruptible(&ir->lock)
++#define IRUNLOCK              up(&ir->lock)
++
++/* general constants */
++#define SUCCESS                       0
++#define SEND_FLAG_IN_PROGRESS 1
++#define SEND_FLAG_COMPLETE    2
++
++
++/* data structure for each usb remote */
++struct irctl {
++
++      /* usb */
++      struct usb_device *usbdev;
++      struct urb *urb_in;
++      struct urb *urb_out;
++      int devnum;
++
++      /* buffers and dma */
++      unsigned char *buf_in;
++      unsigned char *buf_out;
++      unsigned int len_in;
++#ifdef KERNEL_2_5
++      dma_addr_t dma_in;
++      dma_addr_t dma_out;
++#endif
++
++      /* handle repeats */
++      unsigned char old[CODE_LENGTH];
++      unsigned long old_jiffies;
++
++      /* lirc */
++      struct lirc_plugin *p;
++      int connected;
++
++      /* handle sending (init strings) */
++      int send_flags;
++      wait_queue_head_t wait_out;
++
++      struct semaphore lock;
++};
++
++/* init strings */
++static char init1[] = {0x01, 0x00, 0x20, 0x14};
++static char init2[] = {0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20};
++
++/* send packet - used to initialize remote */
++static void send_packet(struct irctl *ir, u16 cmd, unsigned char *data)
++{
++      DECLARE_WAITQUEUE(wait, current);
++      int timeout = HZ; /* 1 second */
++      unsigned char buf[USB_BUFLEN];
++
++      dprintk(DRIVER_NAME "[%d]: send called (%#x)\n", ir->devnum, cmd);
++
++      IRLOCK;
++      ir->urb_out->transfer_buffer_length = LO(cmd) + 1;
++      ir->urb_out->dev = ir->usbdev;
++      ir->send_flags = SEND_FLAG_IN_PROGRESS;
++
++      memcpy(buf+1, data, LO(cmd));
++      buf[0] = HI(cmd);
++      memcpy(ir->buf_out, buf, LO(cmd)+1);
++
++      set_current_state(TASK_INTERRUPTIBLE);
++      add_wait_queue(&ir->wait_out, &wait);
++
++#ifdef KERNEL_2_5
++      if (usb_submit_urb(ir->urb_out, SLAB_ATOMIC)) {
++#else
++      if (usb_submit_urb(ir->urb_out)) {
++#endif
++              set_current_state(TASK_RUNNING);
++              remove_wait_queue(&ir->wait_out, &wait);
++              IRUNLOCK;
++              return;
++      }
++      IRUNLOCK;
++
++      while (timeout && (ir->urb_out->status == -EINPROGRESS)
++              && !(ir->send_flags & SEND_FLAG_COMPLETE)) {
++              timeout = schedule_timeout(timeout);
++              rmb();
++      }
++
++      dprintk(DRIVER_NAME "[%d]: send complete (%#x)\n", ir->devnum, cmd);
++
++      set_current_state(TASK_RUNNING);
++      remove_wait_queue(&ir->wait_out, &wait);
++      usb_unlink_urb(ir->urb_out);
++}
++
++static int unregister_from_lirc(struct irctl *ir)
++{
++      struct lirc_plugin *p = ir->p;
++      int devnum;
++      int rtn;
++
++      devnum = ir->devnum;
++      dprintk(DRIVER_NAME "[%d]: unregister from lirc called\n", devnum);
++
++      if ((rtn = lirc_unregister_plugin(p->minor)) > 0) {
++              printk(DRIVER_NAME "[%d]: error in lirc_unregister minor: %d\n"
++                      "Trying again...\n", devnum, p->minor);
++              if (rtn == -EBUSY) {
++                      printk(DRIVER_NAME
++                              "[%d]: device is opened, will unregister"
++                              " on close\n", devnum);
++                      return -EAGAIN;
++              }
++              set_current_state(TASK_INTERRUPTIBLE);
++              schedule_timeout(HZ);
++
++              if ((rtn = lirc_unregister_plugin(p->minor)) > 0) {
++                      printk(DRIVER_NAME "[%d]: lirc_unregister failed\n",
++                      devnum);
++              }
++      }
++
++      if (rtn != SUCCESS) {
++              printk(DRIVER_NAME "[%d]: didn't free resources\n", devnum);
++              return -EAGAIN;
++      }
++
++      printk(DRIVER_NAME "[%d]: usb remote disconnected\n", devnum);
++
++      lirc_buffer_free(p->rbuf);
++      kfree(p->rbuf);
++      kfree(p);
++      kfree(ir);
++      return SUCCESS;
++}
++
++static int set_use_inc(void *data)
++{
++      struct irctl *ir = data;
++
++      if (!ir) {
++              printk(DRIVER_NAME "[?]: set_use_inc called with no context\n");
++              return -EIO;
++      }
++      dprintk(DRIVER_NAME "[%d]: set use inc\n", ir->devnum);
++
++      MOD_INC_USE_COUNT;
++
++      if (!ir->connected) {
++              if (!ir->usbdev)
++                      return -ENOENT;
++              ir->urb_in->dev = ir->usbdev;
++#ifdef KERNEL_2_5
++              if (usb_submit_urb(ir->urb_in, SLAB_ATOMIC)) {
++#else
++              if (usb_submit_urb(ir->urb_in)) {
++#endif
++                      printk(DRIVER_NAME "[%d]: open result = -EIO error "
++                              "submitting urb\n", ir->devnum);
++                      MOD_DEC_USE_COUNT;
++                      return -EIO;
++              }
++              ir->connected = 1;
++      }
++
++      return SUCCESS;
++}
++
++static void set_use_dec(void *data)
++{
++      struct irctl *ir = data;
++
++      if (!ir) {
++              printk(DRIVER_NAME "[?]: set_use_dec called with no context\n");
++              return;
++      }
++      dprintk(DRIVER_NAME "[%d]: set use dec\n", ir->devnum);
++
++      if (ir->connected) {
++              IRLOCK;
++              usb_unlink_urb(ir->urb_in);
++              ir->connected = 0;
++              IRUNLOCK;
++      }
++      MOD_DEC_USE_COUNT;
++}
++
++static void usb_remote_printdata(struct irctl *ir, char *buf, int len)
++{
++      char codes[USB_BUFLEN*3 + 1];
++      int i;
++
++      if (len <= 0)
++              return;
++
++      for (i = 0; i < len && i < USB_BUFLEN; i++) {
++              snprintf(codes+i*3, 4, "%02x ", buf[i] & 0xFF);
++      }
++      printk(DRIVER_NAME "[%d]: data received %s (length=%d)\n",
++              ir->devnum, codes, len);
++}
++
++#ifdef KERNEL_2_5
++static void usb_remote_recv(struct urb *urb, struct pt_regs *regs)
++#else
++static void usb_remote_recv(struct urb *urb)
++#endif
++{
++      struct irctl *ir;
++      int i, len;
++      int chan;
++
++      if (!urb)
++              return;
++
++      if (!(ir = urb->context)) {
++              usb_unlink_urb(urb);
++              return;
++      }
++
++      len = urb->actual_length;
++      if (debug)
++              usb_remote_printdata(ir,urb->transfer_buffer,len);
++
++      switch (urb->status) {
++
++      /* success */
++      case SUCCESS:
++              /* some remotes emit both 4 and 5 byte length codes. */
++              if (len < CODE_MIN_LENGTH || len > CODE_LENGTH)
++                      break;
++
++              // *** channel not tested with 4/5-byte Dutch remotes ***
++              chan = ((ir->buf_in[len-1]>>4) & 0x0F);
++              if ( !((1<<chan) & mask) ) {
++                      dprintk(DRIVER_NAME "[%d]: ignore channel %d\n",
++                              ir->devnum, chan+1);
++                      break;
++              }
++
++              dprintk(DRIVER_NAME "[%d]: accept channel %d\n",
++                      ir->devnum, chan+1);
++
++              /* strip channel code */
++              if (!unique)
++                      ir->buf_in[len-1] &= 0x0F;
++
++              /* check for repeats */
++              if (memcmp(ir->old, ir->buf_in, len) == 0) {
++                      if (ir->old_jiffies + repeat_jiffies > jiffies) {
++                              break;
++                      }
++              } else {
++                      memcpy(ir->old, ir->buf_in, len);
++                      for (i = len; i < CODE_LENGTH; i++) ir->old[i] = 0;
++              }
++              ir->old_jiffies = jiffies;
++
++              lirc_buffer_write_1(ir->p->rbuf, ir->old);
++              wake_up(&ir->p->rbuf->wait_poll);
++              break;
++
++      /* unlink */
++      case -ECONNRESET:
++      case -ENOENT:
++      case -ESHUTDOWN:
++              usb_unlink_urb(urb);
++              return;
++      }
++
++      /* resubmit urb */
++#ifdef KERNEL_2_5
++      usb_submit_urb(urb, SLAB_ATOMIC);
++#else
++      usb_submit_urb(urb);
++#endif
++}
++
++#ifdef KERNEL_2_5
++static void usb_remote_send(struct urb *urb, struct pt_regs *regs)
++#else
++static void usb_remote_send(struct urb *urb)
++#endif
++{
++      struct irctl *ir;
++
++      if (!urb)
++              return;
++
++      if (!(ir = urb->context)) {
++              usb_unlink_urb(urb);
++              return;
++      }
++
++      dprintk(DRIVER_NAME "[%d]: usb out called\n", ir->devnum);
++
++      if (urb->status)
++              return;
++
++      ir->send_flags |= SEND_FLAG_COMPLETE;
++      wmb();
++      if (waitqueue_active(&ir->wait_out))
++              wake_up(&ir->wait_out);
++}
++
++#ifdef KERNEL_2_5
++static int usb_remote_probe(struct usb_interface *intf,
++                              const struct usb_device_id *id)
++{
++      struct usb_device *dev = NULL;
++      struct usb_host_interface *idesc = NULL;
++#else
++static void *usb_remote_probe(struct usb_device *dev, unsigned int ifnum,
++                              const struct usb_device_id *id)
++{
++      struct usb_interface *intf;
++      struct usb_interface_descriptor *idesc;
++#endif
++      struct usb_endpoint_descriptor *ep_in, *ep_out;
++      struct irctl *ir = NULL;
++      struct lirc_plugin *plugin = NULL;
++      struct lirc_buffer *rbuf = NULL;
++      int devnum, pipe, maxp, len, buf_len, bytes_in_key;
++      int minor = 0;
++      char buf[63], name[128]="";
++      int mem_failure = 0;
++
++      dprintk(DRIVER_NAME ": usb probe called\n");
++
++#ifdef KERNEL_2_5
++      dev = interface_to_usbdev(intf);
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,4)
++      idesc = intf->cur_altsetting;
++#else
++      idesc = &intf->altsetting[intf->act_altsetting];
++#endif
++      if (idesc->desc.bNumEndpoints != 2)
++              return -ENODEV;
++      ep_in = &idesc->endpoint[0].desc;
++      ep_out = &idesc->endpoint[1].desc;
++      if (((ep_in->bEndpointAddress & USB_ENDPOINT_DIR_MASK) != USB_DIR_IN)
++              || (ep_in->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
++              != USB_ENDPOINT_XFER_INT)
++              return -ENODEV;
++#else
++      intf = &dev->actconfig->interface[ifnum];
++      idesc = &intf->altsetting[intf->act_altsetting];
++      if (idesc->bNumEndpoints != 2)
++              return NULL;
++      ep_in = idesc->endpoint + 0;
++      ep_out = idesc->endpoint + 1;
++      if (((ep_in->bEndpointAddress & USB_ENDPOINT_DIR_MASK) != USB_DIR_IN)
++              || (ep_in->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
++              != USB_ENDPOINT_XFER_INT)
++              return NULL;
++#endif
++      devnum = dev->devnum;
++      pipe = usb_rcvintpipe(dev, ep_in->bEndpointAddress);
++      maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
++
++      bytes_in_key = CODE_LENGTH;
++      len = (maxp > USB_BUFLEN) ? USB_BUFLEN : maxp;
++      buf_len = len - (len % bytes_in_key);
++
++      dprintk(DRIVER_NAME "[%d]: bytes_in_key=%d len=%d maxp=%d buf_len=%d\n",
++              devnum, bytes_in_key, len, maxp, buf_len);
++
++
++      /* allocate kernel memory */
++      mem_failure = 0;
++      if (!(ir = kmalloc(sizeof(struct irctl), GFP_KERNEL))) {
++              mem_failure = 1;
++      } else {
++              memset(ir, 0, sizeof(struct irctl));
++
++              if (!(plugin = kmalloc(sizeof(struct lirc_plugin), GFP_KERNEL))) {
++                      mem_failure = 2;
++              } else if (!(rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL))) {
++                      mem_failure = 3;
++              } else if (lirc_buffer_init(rbuf, bytes_in_key, USB_BUFLEN/bytes_in_key)) {
++                      mem_failure = 4;
++#ifdef KERNEL_2_5
++              } else if (!(ir->buf_in = usb_buffer_alloc(dev, buf_len, SLAB_ATOMIC, &ir->dma_in))) {
++                      mem_failure = 5;
++              } else if (!(ir->buf_out = usb_buffer_alloc(dev, USB_BUFLEN, SLAB_ATOMIC, &ir->dma_out))) {
++                      mem_failure = 6;
++              } else if (!(ir->urb_in = usb_alloc_urb(0, GFP_KERNEL))) {
++                      mem_failure = 7;
++              } else if (!(ir->urb_out = usb_alloc_urb(0, GFP_KERNEL))) {
++                      mem_failure = 8;
++#else
++              } else if (!(ir->buf_in = kmalloc(buf_len, GFP_KERNEL))) {
++                      mem_failure = 5;
++              } else if (!(ir->buf_out = kmalloc(USB_BUFLEN, GFP_KERNEL))) {
++                      mem_failure = 6;
++              } else if (!(ir->urb_in = usb_alloc_urb(0))) {
++                      mem_failure = 7;
++              } else if (!(ir->urb_out = usb_alloc_urb(0))) {
++                      mem_failure = 8;
++#endif
++              } else {
++
++                      memset(plugin, 0, sizeof(struct lirc_plugin));
++
++                      strcpy(plugin->name, DRIVER_NAME " ");
++                      plugin->minor = -1;
++                      plugin->code_length = bytes_in_key*8;
++                      plugin->features = LIRC_CAN_REC_LIRCCODE;
++                      plugin->data = ir;
++                      plugin->rbuf = rbuf;
++                      plugin->set_use_inc = &set_use_inc;
++                      plugin->set_use_dec = &set_use_dec;
++
++                      init_MUTEX(&ir->lock);
++                      init_waitqueue_head(&ir->wait_out);
++
++                      if ((minor = lirc_register_plugin(plugin)) < 0) {
++                              mem_failure = 9;
++                      }
++              }
++      }
++
++      /* free allocated memory incase of failure */
++      switch (mem_failure) {
++      case 9:
++              lirc_buffer_free(rbuf);
++      case 8:
++              usb_free_urb(ir->urb_out);
++      case 7:
++              usb_free_urb(ir->urb_in);
++#ifdef KERNEL_2_5
++      case 6:
++              usb_buffer_free(dev, USB_BUFLEN, ir->buf_out, ir->dma_out);
++      case 5:
++              usb_buffer_free(dev, buf_len, ir->buf_in, ir->dma_in);
++#else
++      case 6:
++              kfree(ir->buf_out);
++      case 5:
++              kfree(ir->buf_in);
++#endif
++      case 4:
++              kfree(rbuf);
++      case 3:
++              kfree(plugin);
++      case 2:
++              kfree(ir);
++      case 1:
++              printk(DRIVER_NAME "[%d]: out of memory (code=%d)\n",
++                      devnum, mem_failure);
++#ifdef KERNEL_2_5
++              return -ENOMEM;
++#else
++              return NULL;
++#endif
++      }
++
++      plugin->minor = minor;
++      ir->p = plugin;
++      ir->devnum = devnum;
++      ir->usbdev = dev;
++      ir->len_in = buf_len;
++      ir->connected = 0;
++
++      usb_fill_int_urb(ir->urb_in, dev, pipe, ir->buf_in,
++              buf_len, usb_remote_recv, ir, ep_in->bInterval);
++      usb_fill_int_urb(ir->urb_out, dev,
++              usb_sndintpipe(dev, ep_out->bEndpointAddress), ir->buf_out,
++              USB_BUFLEN, usb_remote_send, ir, ep_out->bInterval);
++
++      if (dev->descriptor.iManufacturer
++              && usb_string(dev, dev->descriptor.iManufacturer, buf, 63) > 0)
++              strncpy(name, buf, 128);
++      if (dev->descriptor.iProduct
++              && usb_string(dev, dev->descriptor.iProduct, buf, 63) > 0)
++              snprintf(name, 128, "%s %s", name, buf);
++      printk(DRIVER_NAME "[%d]: %s on usb%d:%d\n", devnum, name,
++             dev->bus->busnum, devnum);
++
++      send_packet(ir, 0x8004, init1);
++      send_packet(ir, 0x8007, init2);
++
++#ifdef KERNEL_2_5
++      usb_set_intfdata(intf, ir);
++      return SUCCESS;
++#else
++      return ir;
++#endif
++}
++
++
++#ifdef KERNEL_2_5
++static void usb_remote_disconnect(struct usb_interface *intf)
++{
++      struct usb_device *dev = interface_to_usbdev(intf);
++      struct irctl *ir = usb_get_intfdata(intf);
++      usb_set_intfdata(intf, NULL);
++#else
++static void usb_remote_disconnect(struct usb_device *dev, void *ptr)
++{
++      struct irctl *ir = ptr;
++#endif
++
++      if (!ir || !ir->p)
++              return;
++
++      ir->usbdev = NULL;
++      wake_up_all(&ir->wait_out);
++
++      IRLOCK;
++      usb_unlink_urb(ir->urb_in);
++      usb_unlink_urb(ir->urb_out);
++      usb_free_urb(ir->urb_in);
++      usb_free_urb(ir->urb_out);
++#ifdef KERNEL_2_5
++      usb_buffer_free(dev, ir->len_in, ir->buf_in, ir->dma_in);
++      usb_buffer_free(dev, USB_BUFLEN, ir->buf_out, ir->dma_out);
++#else
++      kfree(ir->buf_in);
++      kfree(ir->buf_out);
++#endif
++      IRUNLOCK;
++
++      unregister_from_lirc(ir);
++}
++
++static struct usb_device_id usb_remote_id_table [] = {
++      { USB_DEVICE(0x0bc7, 0x0002) },         /* X10 USB Firecracker Interface */
++      { USB_DEVICE(0x0bc7, 0x0003) },         /* X10 VGA Video Sender */
++      { USB_DEVICE(0x0bc7, 0x0004) },         /* ATI Wireless Remote Receiver */
++      { USB_DEVICE(0x0bc7, 0x0005) },         /* NVIDIA Wireless Remote Receiver */
++      { USB_DEVICE(0x0bc7, 0x0006) },         /* ATI Wireless Remote Receiver */
++      { USB_DEVICE(0x0bc7, 0x0007) },         /* X10 USB Wireless Transceiver */
++      { USB_DEVICE(0x0bc7, 0x0008) },         /* X10 USB Wireless Transceiver */
++      { USB_DEVICE(0x0bc7, 0x0009) },         /* X10 USB Wireless Transceiver */
++      { USB_DEVICE(0x0bc7, 0x000A) },         /* X10 USB Wireless Transceiver */
++      { USB_DEVICE(0x0bc7, 0x000B) },         /* X10 USB Transceiver */
++      { USB_DEVICE(0x0bc7, 0x000C) },         /* X10 USB Transceiver */
++      { USB_DEVICE(0x0bc7, 0x000D) },         /* X10 USB Transceiver */
++      { USB_DEVICE(0x0bc7, 0x000E) },         /* X10 USB Transceiver */
++      { USB_DEVICE(0x0bc7, 0x000F) },         /* X10 USB Transceiver */
++
++      { }                                     /* Terminating entry */
++};
++
++static struct usb_driver usb_remote_driver = {
++      .owner =        THIS_MODULE,
++      .name =         DRIVER_NAME,
++      .probe =        usb_remote_probe,
++      .disconnect =   usb_remote_disconnect,
++      .id_table =     usb_remote_id_table
++};
++
++static int __init usb_remote_init(void)
++{
++      int i;
++
++      printk("\n" DRIVER_NAME ": " DRIVER_DESC " v" DRIVER_VERSION "\n");
++      printk(DRIVER_NAME ": " DRIVER_AUTHOR "\n");
++      dprintk(DRIVER_NAME ": debug mode enabled\n");
++
++      request_module("lirc_dev");
++
++      repeat_jiffies = repeat*HZ/100;
++
++      if ((i = usb_register(&usb_remote_driver)) < 0) {
++              printk(DRIVER_NAME ": usb register failed, result = %d\n", i);
++              return -ENODEV;
++      }
++
++      return SUCCESS;
++}
++
++static void __exit usb_remote_exit(void)
++{
++      usb_deregister(&usb_remote_driver);
++}
++
++module_init(usb_remote_init);
++module_exit(usb_remote_exit);
++
++MODULE_AUTHOR (DRIVER_AUTHOR);
++MODULE_DESCRIPTION (DRIVER_DESC);
++MODULE_LICENSE ("GPL");
++MODULE_DEVICE_TABLE (usb, usb_remote_id_table);
++
++MODULE_PARM(debug, "i");
++MODULE_PARM_DESC(debug, "enable driver debug mode");
++MODULE_PARM(mask, "i");
++MODULE_PARM_DESC(mask, "set channel acceptance bit mask");
++MODULE_PARM(unique, "i");
++MODULE_PARM_DESC(unique, "enable channel-specific codes");
++MODULE_PARM(repeat, "i");
++MODULE_PARM_DESC(repeat, "repeat timeout (1/100 sec)");
++
++#ifndef KERNEL_2_5
++EXPORT_NO_SYMBOLS;
++#endif
++
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_bt829.c linux-2.6.8-rc4/drivers/char/lirc/lirc_bt829.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_bt829.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_bt829.c     2004-04-27 20:45:34.000000000 +0200
+@@ -0,0 +1,389 @@
++/*
++ * Remote control driver for the TV-card based on bt829
++ *
++ *  by Leonid Froenchenko <lfroen@galileo.co.il>
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
++#error "This driver needs kernel version 2.4.0 or higher"
++#endif
++
++#include <linux/config.h>
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/threads.h>
++#include <linux/sched.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/delay.h>
++
++#include "kcompat.h"
++#include "lirc_dev.h"
++
++
++
++MODULE_AUTHOR("Froenchenko Leonid");
++MODULE_DESCRIPTION("IR remote driver for bt829 based TV cards");
++
++
++int poll_main(void);
++int atir_init_start(void);
++
++void write_index(unsigned char index,unsigned int value);
++unsigned int read_index(unsigned char index);
++
++void do_i2c_start(void);
++void do_i2c_stop(void);
++
++void seems_wr_byte(unsigned char al);
++unsigned char seems_rd_byte(void);
++
++unsigned int read_index(unsigned char al);
++void write_index(unsigned char ah,unsigned int edx);
++
++void cycle_delay(int cycle);
++
++void do_set_bits(unsigned char bl);
++unsigned char do_get_bits(void);
++
++#define DATA_PCI_OFF 0x7FFC00
++#define WAIT_CYCLE   20
++
++
++int atir_minor;
++unsigned long pci_addr_phys, pci_addr_lin;
++
++struct lirc_plugin atir_plugin;
++
++int do_pci_probe(void)
++{
++      struct pci_dev *my_dev;
++#ifndef KERNEL_2_5
++      /* unnecessary with recent kernels */
++      if ( !pci_present() ) {
++              printk(KERN_ERR "ATIR: no pci in this kernel\n");
++      }
++#endif
++      my_dev = (struct pci_dev *)pci_find_device(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_264VT,NULL);
++      if ( my_dev ) {
++              printk(KERN_ERR "ATIR: Using device: %s\n",
++                     pci_pretty_name(my_dev));
++              pci_addr_phys = 0;
++              if ( my_dev->resource[0].flags & IORESOURCE_MEM ) {
++                      pci_addr_phys = my_dev->resource[0].start;
++                      printk(KERN_INFO "ATIR memory at 0x%08X \n",(unsigned int)pci_addr_phys);
++              }
++              if ( pci_addr_phys == 0 ) {
++                      printk(KERN_ERR "ATIR no memory resource ?\n");
++                      return 0;
++              }
++      } else {
++              printk(KERN_ERR "ATIR: pci_prob failed\n");
++              return 0;
++      }
++      return 1;
++}
++
++
++int atir_add_to_buf (void* data, struct lirc_buffer* buf)
++{
++      unsigned char key;
++      int status;
++      status = poll_main();
++      key = (status >> 8) & 0xFF;
++      if( status & 0xFF )
++      {
++      //    printk(KERN_INFO "ATIR reading key %02X\n",*key);
++              lirc_buffer_write_1( buf, &key );
++              return 0;
++      }
++      return -ENODATA;
++}
++
++int atir_set_use_inc(void* data)
++{
++      MOD_INC_USE_COUNT;
++      printk(KERN_DEBUG "ATIR driver is opened\n");
++      return 0;
++}
++
++void atir_set_use_dec(void* data)
++{
++      MOD_DEC_USE_COUNT;
++      printk(KERN_DEBUG "ATIR driver is closed\n");
++}
++
++int init_module(void)
++{
++      if ( !do_pci_probe() ) {
++              return 1;
++      }
++
++      if ( !atir_init_start() ) {
++              return 1;
++      }
++
++      strcpy(atir_plugin.name,"ATIR");
++      atir_plugin.minor       = -1;
++      atir_plugin.code_length = 8;
++      atir_plugin.sample_rate = 10;
++      atir_plugin.data        = 0;
++      atir_plugin.add_to_buf  = atir_add_to_buf;
++      atir_plugin.set_use_inc = atir_set_use_inc;
++      atir_plugin.set_use_dec = atir_set_use_dec;
++
++      atir_minor = lirc_register_plugin(&atir_plugin);
++      printk(KERN_DEBUG "ATIR driver is registered on minor %d\n",atir_minor);
++
++      return 0;
++}
++
++
++void cleanup_module(void)
++{
++      lirc_unregister_plugin(atir_minor);
++}
++
++
++int atir_init_start(void)
++{
++      pci_addr_lin = (unsigned long)ioremap(pci_addr_phys + DATA_PCI_OFF,0x400);
++      if ( pci_addr_lin == 0 ) {
++              printk(KERN_INFO "atir: pci mem must be mapped\n");
++              return 0;
++      }
++      return 1;
++}
++
++void cycle_delay(int cycle)
++{
++      udelay(WAIT_CYCLE*cycle);
++}
++
++
++int poll_main()
++{
++      unsigned char status_high, status_low;
++      
++      do_i2c_start();
++
++      seems_wr_byte(0xAA);
++      seems_wr_byte(0x01);
++
++      do_i2c_start();
++
++      seems_wr_byte(0xAB);
++
++      status_low = seems_rd_byte();
++      status_high = seems_rd_byte();
++
++      do_i2c_stop();
++
++      return (status_high << 8) | status_low;
++}
++
++void do_i2c_start(void)
++{
++      do_set_bits(3);
++      cycle_delay(4);
++
++      do_set_bits(1);
++      cycle_delay(7);
++
++      do_set_bits(0);
++      cycle_delay(2);
++}
++
++void do_i2c_stop(void)
++{
++      unsigned char bits;
++      bits =  do_get_bits() & 0xFD;
++      do_set_bits(bits);
++      cycle_delay(1);
++
++      bits |= 1;
++      do_set_bits(bits);
++      cycle_delay(2);
++
++      bits |= 2;
++      do_set_bits(bits);
++      bits = 3;
++      do_set_bits(bits);
++      cycle_delay(2);
++}
++
++
++void seems_wr_byte(unsigned char value)
++{
++      int i;
++      unsigned char reg;
++    
++      reg = do_get_bits();
++      for(i = 0;i < 8;i++) {
++              if ( value & 0x80 ) {
++                      reg |= 0x02;
++              } else {
++                      reg &= 0xFD;
++              }
++              do_set_bits(reg);
++              cycle_delay(1);
++
++              reg |= 1;
++              do_set_bits(reg);
++              cycle_delay(1);
++
++              reg &= 0xFE;
++              do_set_bits(reg);
++              cycle_delay(1);
++              value <<= 1;
++      }
++      cycle_delay(2);
++
++      reg |= 2;
++      do_set_bits(reg);
++
++      reg |= 1;
++      do_set_bits(reg);
++
++      cycle_delay(1);
++      do_get_bits();
++
++      reg &= 0xFE;
++      do_set_bits(reg);
++      cycle_delay(3);
++}
++
++unsigned char seems_rd_byte(void)
++{
++      int i;
++      int rd_byte;
++      unsigned char bits_2, bits_1;
++
++      bits_1 = do_get_bits() | 2;
++      do_set_bits(bits_1);
++
++      rd_byte = 0;
++      for(i = 0;i < 8;i++) {
++              bits_1 &= 0xFE;
++              do_set_bits(bits_1);
++              cycle_delay(2);
++
++              bits_1 |= 1;
++              do_set_bits(bits_1);
++              cycle_delay(1);
++
++              if ( (bits_2 = do_get_bits()) & 2 ) {
++                      rd_byte |= 1;
++              }
++              rd_byte <<= 1;
++      }
++
++      bits_1 = 0;
++      if ( bits_2 == 0 ) {
++              bits_1 |= 2;
++      }
++      do_set_bits(bits_1);
++      cycle_delay(2);
++
++      bits_1 |= 1;
++      do_set_bits(bits_1);
++      cycle_delay(3);
++
++      bits_1 &= 0xFE;
++      do_set_bits(bits_1);
++      cycle_delay(2);
++
++      rd_byte >>= 1;
++      rd_byte &= 0xFF;
++      return rd_byte;
++}
++
++void do_set_bits(unsigned char new_bits)
++{
++      int reg_val;
++      reg_val = read_index(0x34);
++      if ( new_bits & 2 ) {
++              reg_val &= 0xFFFFFFDF;
++              reg_val |= 1;
++      } else {
++              reg_val &= 0xFFFFFFFE;
++              reg_val |= 0x20;
++      }
++      reg_val |= 0x10;
++      write_index(0x34,reg_val);
++
++      reg_val = read_index(0x31);
++      if ( new_bits & 1 ) {
++              reg_val |= 0x1000000;
++      } else {
++              reg_val &= 0xFEFFFFFF;
++      }
++      reg_val |= 0x8000000;
++      write_index(0x31,reg_val);
++}
++
++unsigned char do_get_bits(void)
++{
++      unsigned char bits;
++      int reg_val;
++
++      reg_val = read_index(0x34);
++      reg_val |= 0x10;
++      reg_val &= 0xFFFFFFDF;
++      write_index(0x34,reg_val);
++
++      reg_val = read_index(0x34);
++      bits = 0;
++      if ( reg_val & 8 ) {
++              bits |= 2;
++      } else {
++              bits &= 0xFD;
++      }
++      reg_val = read_index(0x31);
++      if ( reg_val & 0x1000000 ) {
++              bits |= 1;      
++      } else {
++              bits &= 0xFE;
++      }
++      return bits;
++}
++
++unsigned int read_index(unsigned char index)
++{
++      unsigned int addr, value;
++      //  addr = pci_addr_lin + DATA_PCI_OFF + ((index & 0xFF) << 2);
++      addr = pci_addr_lin + ((index & 0xFF) << 2);
++      value = readl(addr);
++      return value;
++}
++
++void write_index(unsigned char index,unsigned int reg_val)
++{
++      unsigned int addr;
++      addr = pci_addr_lin + ((index & 0xFF) << 2);
++      writel(reg_val,addr);
++}
++
++
++/*
++ * Overrides for Emacs so that we follow Linus's tabbing style.
++ * ---------------------------------------------------------------------------
++ * Local variables:
++ * c-basic-offset: 8
++ * End:
++ */
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_dev.c linux-2.6.8-rc4/drivers/char/lirc/lirc_dev.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_dev.c  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_dev.c       2004-04-08 23:17:46.000000000 +0200
+@@ -0,0 +1,795 @@
++/*
++ * LIRC base driver
++ * 
++ * (L) by Artur Lipowski <alipowski@interia.pl>
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ *
++ * $Id$
++ *
++ */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++ 
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
++#define LIRC_HAVE_DEVFS
++#endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
++#warning "**********************************************************"
++#warning "************ disabling devfs for 2.6 kernels *************"
++#warning "**********************************************************"
++#undef LIRC_HAVE_DEVFS
++#endif
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18)
++#error "**********************************************************"
++#error " Sorry, this driver needs kernel version 2.2.18 or higher "
++#error "**********************************************************"
++#endif
++
++#include <linux/config.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/errno.h>
++#include <linux/ioctl.h>
++#include <linux/fs.h>
++#include <linux/poll.h>
++#ifdef LIRC_HAVE_DEVFS
++#include <linux/devfs_fs_kernel.h>
++#endif
++#include <linux/smp_lock.h>
++#include <asm/uaccess.h>
++#include <asm/semaphore.h>
++#include <asm/errno.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
++#include <linux/wrapper.h>
++#endif
++#define __KERNEL_SYSCALLS__
++#include <linux/unistd.h>
++
++#include "kcompat.h"
++#include <linux/lirc.h>
++
++#include "lirc_dev.h"
++
++static int debug = 0;
++
++MODULE_PARM(debug,"i");
++
++#define IRCTL_DEV_NAME    "BaseRemoteCtl"
++#define SUCCESS           0
++#define NOPLUG            -1
++#define dprintk           if (debug) printk
++
++#define LOGHEAD           "lirc_dev (%s[%d]): "
++
++struct irctl
++{
++      struct lirc_plugin p;
++      int open;
++
++      struct lirc_buffer *buf;
++
++      int tpid;
++      struct semaphore *t_notify;
++      struct semaphore *t_notify2;
++      int shutdown;
++      long jiffies_to_wait;
++
++#ifdef LIRC_HAVE_DEVFS
++      devfs_handle_t devfs_handle;
++#endif
++};
++
++DECLARE_MUTEX(plugin_lock);
++
++static struct irctl irctls[MAX_IRCTL_DEVICES];
++static struct file_operations fops;
++
++
++/*  helper function
++ *  initializes the irctl structure
++ */
++static inline void init_irctl(struct irctl *ir)
++{
++      memset(&ir->p, 0, sizeof(struct lirc_plugin));
++      ir->p.minor = NOPLUG;
++
++      ir->tpid = -1;
++      ir->t_notify = NULL;
++      ir->t_notify2 = NULL;
++      ir->shutdown = 0;
++      ir->jiffies_to_wait = 0;
++
++      ir->open = 0;
++}
++
++
++/*  helper function
++ *  reads key codes from plugin and puts them into buffer
++ *  buffer free space is checked and locking performed
++ *  returns 0 on success
++ */
++
++inline static int add_to_buf(struct irctl *ir)
++{
++      if (lirc_buffer_full(ir->buf)) {
++              dprintk(LOGHEAD "buffer overflow\n",
++                      ir->p.name, ir->p.minor);
++              return -EOVERFLOW;
++      }
++
++      if(ir->p.add_to_buf) {
++              int res = -ENODATA;
++              int got_data = 0;
++              
++              /* service the device as long as it is returning
++               * data and we have space
++               */
++              while( !lirc_buffer_full(ir->buf) )
++              {
++                      res = ir->p.add_to_buf( ir->p.data, ir->buf );
++                      if( res == SUCCESS )
++                              got_data++;
++                      else
++                              break;
++              }
++              
++              if( res == -ENODEV )
++              {
++                      ir->shutdown = 1;
++              }
++              return (got_data ? SUCCESS : res);
++      }
++      
++      return SUCCESS;
++}
++
++/* main function of the polling thread
++ */
++static int lirc_thread(void *irctl)
++{
++      struct irctl *ir = irctl;
++      
++      /* This thread doesn't need any user-level access,
++       * so get rid of all our resources
++       */
++      daemonize("lirc_dev");
++      
++      if (ir->t_notify != NULL) {
++              up(ir->t_notify);
++      }
++      
++      dprintk(LOGHEAD "poll thread started\n", ir->p.name, ir->p.minor);
++      
++      do {
++              if (ir->open) {
++                      if (ir->jiffies_to_wait) {
++                              current->state = TASK_INTERRUPTIBLE;
++                              schedule_timeout(ir->jiffies_to_wait);
++                      } else {
++                              interruptible_sleep_on(ir->p.get_queue(ir->p.data));
++                      }
++                      if (ir->shutdown) {
++                              break;
++                      }
++                      if (!add_to_buf(ir)) {
++                              wake_up_interruptible(&ir->buf->wait_poll);
++                      }
++              } else {
++                      /* if device not opened so we can sleep half a second */
++                      current->state = TASK_INTERRUPTIBLE;
++                      schedule_timeout(HZ/2);
++              }
++      } while (!ir->shutdown);
++      
++      if (ir->t_notify2 != NULL) {
++              down(ir->t_notify2);
++      }
++
++      ir->tpid = -1;
++      if (ir->t_notify != NULL) {
++              up(ir->t_notify);
++      }
++      
++      dprintk(LOGHEAD "poll thread ended\n", ir->p.name, ir->p.minor);
++      
++      return 0;
++}
++
++/*
++ *
++ */
++int lirc_register_plugin(struct lirc_plugin *p)
++{
++      struct irctl *ir;
++      int minor;
++      int bytes_in_key;
++#ifdef LIRC_HAVE_DEVFS
++      char name[16];
++#endif
++      DECLARE_MUTEX_LOCKED(tn);
++
++      if (!p) {
++              printk("lirc_dev: lirc_register_plugin:"
++                     "plugin pointer must be not NULL!\n");
++              return -EBADRQC;
++      }
++
++      if (MAX_IRCTL_DEVICES <= p->minor) {
++              printk("lirc_dev: lirc_register_plugin:"
++                     "\" minor\" must be between 0 and %d (%d)!\n",
++                     MAX_IRCTL_DEVICES-1, p->minor);
++              return -EBADRQC;
++      }
++
++      if (1 > p->code_length || (BUFLEN*8) < p->code_length) {
++              printk("lirc_dev: lirc_register_plugin:"
++                     "code length in bits for minor (%d) "
++                     "must be less than %d!\n",
++                     p->minor, BUFLEN*8);
++              return -EBADRQC;
++      }
++
++      printk("lirc_dev: lirc_register_plugin:"
++             "sample_rate: %d\n",p->sample_rate);
++      if (p->sample_rate) {
++              if (2 > p->sample_rate || HZ < p->sample_rate) {
++                      printk("lirc_dev: lirc_register_plugin:"
++                             "sample_rate must be between 2 and %d!\n", HZ);
++                      return -EBADRQC;
++              }
++              if (!p->add_to_buf) {
++                      printk("lirc_dev: lirc_register_plugin:"
++                             "add_to_buf cannot be NULL when "
++                             "sample_rate is set\n");
++                      return -EBADRQC;
++              }
++      } else if (!(p->fops && p->fops->read)
++                 && !p->get_queue && !p->rbuf) {
++              printk("lirc_dev: lirc_register_plugin:"
++                     "fops->read, get_queue and rbuf "
++                     "cannot all be NULL!\n");
++              return -EBADRQC;
++      } else if (!p->get_queue && !p->rbuf) {
++              if (!(p->fops && p->fops->read && p->fops->poll) 
++                  || (!p->fops->ioctl && !p->ioctl)) {
++                      printk("lirc_dev: lirc_register_plugin:"
++                             "neither read, poll nor ioctl can be NULL!\n");
++                      return -EBADRQC;
++              }
++      }
++
++      down_interruptible(&plugin_lock);
++
++      minor = p->minor;
++
++      if (0 > minor) {
++              /* find first free slot for plugin */
++              for (minor=0; minor<MAX_IRCTL_DEVICES; minor++)
++                      if (irctls[minor].p.minor == NOPLUG)
++                              break;
++              if (MAX_IRCTL_DEVICES == minor) {
++                      printk("lirc_dev: lirc_register_plugin: "
++                             "no free slots for plugins!\n");
++                      up(&plugin_lock);
++                      return -ENOMEM;
++              }
++      } else if (irctls[minor].p.minor != NOPLUG) {
++              printk("lirc_dev: lirc_register_plugin:"
++                     "minor (%d) just registered!\n", minor);
++              up(&plugin_lock);
++              return -EBUSY;
++      }
++
++      ir = &irctls[minor];
++
++      if (p->sample_rate) {
++              ir->jiffies_to_wait = HZ / p->sample_rate;
++      } else {
++                /* it means - wait for externeal event in task queue */
++              ir->jiffies_to_wait = 0;
++      } 
++
++      /* some safety check 8-) */
++      p->name[sizeof(p->name)-1] = '\0';
++
++      bytes_in_key = p->code_length/8 + (p->code_length%8 ? 1 : 0);
++      
++      if (p->rbuf) {
++              ir->buf = p->rbuf;
++      } else {
++              ir->buf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL);
++              lirc_buffer_init(ir->buf, bytes_in_key, BUFLEN/bytes_in_key);
++      }
++
++      if (p->features==0)
++              p->features = (p->code_length > 8) ?
++                      LIRC_CAN_REC_LIRCCODE : LIRC_CAN_REC_CODE;
++
++      ir->p = *p;
++      ir->p.minor = minor;
++
++#ifdef LIRC_HAVE_DEVFS
++      sprintf (name, DEV_LIRC "/%d", ir->p.minor);
++      ir->devfs_handle = devfs_register(NULL, name, DEVFS_FL_DEFAULT,
++                                        CONFIG_LIRC_IRCTL_DEV_MAJOR, ir->p.minor,
++                                        S_IFCHR | S_IRUSR | S_IWUSR,
++                                        &fops, NULL);
++#endif
++
++      if(p->sample_rate || p->get_queue) {
++              /* try to fire up polling thread */
++              ir->t_notify = &tn;
++              ir->tpid = kernel_thread(lirc_thread, (void*)ir, 0);
++              if (ir->tpid < 0) {
++                      up(&plugin_lock);
++                      printk("lirc_dev: lirc_register_plugin:"
++                             "cannot run poll thread for minor = %d\n",
++                             p->minor);
++                      return -ECHILD;
++              }
++              down(&tn);
++              ir->t_notify = NULL;
++      }
++      up(&plugin_lock);
++
++      MOD_INC_USE_COUNT;
++
++      dprintk("lirc_dev: plugin %s registered at minor number = %d\n",
++              ir->p.name, ir->p.minor);
++
++      return minor;
++}
++
++/*
++ *
++ */
++int lirc_unregister_plugin(int minor)
++{
++      struct irctl *ir;
++      DECLARE_MUTEX_LOCKED(tn);
++      DECLARE_MUTEX_LOCKED(tn2);
++
++      if (minor < 0 || minor >= MAX_IRCTL_DEVICES) {
++              printk("lirc_dev: lirc_unregister_plugin:"
++                     "\" minor\" must be between 0 and %d!\n",
++                     MAX_IRCTL_DEVICES-1);
++              return -EBADRQC;
++      }
++
++      ir = &irctls[minor];
++
++      down_interruptible(&plugin_lock);
++
++      if (ir->p.minor != minor) {
++              printk("lirc_dev: lirc_unregister_plugin:"
++                     "minor (%d) device not registered!", minor);
++              up(&plugin_lock);
++              return -ENOENT;
++      }
++
++      if (ir->open) {
++              printk("lirc_dev: lirc_unregister_plugin:"
++                     "plugin %s[%d] in use!", ir->p.name, ir->p.minor);
++              up(&plugin_lock);
++              return -EBUSY;
++      }
++
++      /* end up polling thread */
++      if (ir->tpid >= 0) {
++              ir->t_notify = &tn;
++              ir->t_notify2 = &tn2;
++              ir->shutdown = 1;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
++              {
++                      struct task_struct *p;
++                      
++                      p = find_task_by_pid(ir->tpid);
++                      wake_up_process(p);
++              }
++#else
++              /* 2.2.x does not export wake_up_process() */
++              wake_up_interruptible(ir->p.get_queue(ir->p.data));
++#endif
++              up(&tn2);
++              down(&tn);
++              ir->t_notify = NULL;
++              ir->t_notify2 = NULL;
++      }
++
++      dprintk("lirc_dev: plugin %s unregistered from minor number = %d\n",
++              ir->p.name, ir->p.minor);
++
++#ifdef LIRC_HAVE_DEVFS
++      devfs_unregister(ir->devfs_handle);
++#endif
++      if (ir->buf != ir->p.rbuf){
++              lirc_buffer_free(ir->buf);
++              kfree(ir->buf);
++      }
++      ir->buf = NULL;
++      init_irctl(ir);
++      up(&plugin_lock);
++
++      MOD_DEC_USE_COUNT;
++
++      return SUCCESS;
++}
++
++/*
++ *
++ */
++static int irctl_open(struct inode *inode, struct file *file)
++{
++      struct irctl *ir;
++      int retval;
++      
++      if (MINOR(inode->i_rdev) >= MAX_IRCTL_DEVICES) {
++              dprintk("lirc_dev [%d]: open result = -ENODEV\n",
++                      MINOR(inode->i_rdev));
++              return -ENODEV;
++      }
++
++      ir = &irctls[MINOR(inode->i_rdev)];
++
++      dprintk(LOGHEAD "open called\n", ir->p.name, ir->p.minor);
++
++      /* if the plugin has an open function use it instead */
++      if(ir->p.fops && ir->p.fops->open)
++              return ir->p.fops->open(inode, file);
++
++      down_interruptible(&plugin_lock);
++
++      if (ir->p.minor == NOPLUG) {
++              up(&plugin_lock);
++              dprintk(LOGHEAD "open result = -ENODEV\n",
++                      ir->p.name, ir->p.minor);
++              return -ENODEV;
++      }
++
++      if (ir->open) {
++              up(&plugin_lock);
++              dprintk(LOGHEAD "open result = -EBUSY\n",
++                      ir->p.name, ir->p.minor);
++              return -EBUSY;
++      }
++
++      /* there is no need for locking here because ir->open is 0 
++         * and lirc_thread isn't using buffer
++       * plugins which use irq's should allocate them on set_use_inc,
++       * so there should be no problem with those either.
++         */
++      ir->buf->head = ir->buf->tail;
++      ir->buf->fill = 0;
++
++      ++ir->open;
++      retval = ir->p.set_use_inc(ir->p.data);
++
++      up(&plugin_lock);
++
++      if (retval != SUCCESS) {
++              --ir->open;
++              return retval;
++      }
++
++      dprintk(LOGHEAD "open result = %d\n", ir->p.name, ir->p.minor, SUCCESS);
++
++      return SUCCESS;
++}
++
++/*
++ *
++ */
++static int irctl_close(struct inode *inode, struct file *file)
++{
++      struct irctl *ir = &irctls[MINOR(inode->i_rdev)];
++
++      dprintk(LOGHEAD "close called\n", ir->p.name, ir->p.minor);
++ 
++      /* if the plugin has a close function use it instead */
++      if(ir->p.fops && ir->p.fops->release)
++              return ir->p.fops->release(inode, file);
++
++      down_interruptible(&plugin_lock);
++
++      --ir->open;
++      ir->p.set_use_dec(ir->p.data);
++
++      up(&plugin_lock);
++
++      return SUCCESS;
++}
++
++/*
++ *
++ */
++static unsigned int irctl_poll(struct file *file, poll_table *wait)
++{
++      struct irctl *ir = &irctls[MINOR(file->f_dentry->d_inode->i_rdev)];
++
++      dprintk(LOGHEAD "poll called\n", ir->p.name, ir->p.minor);
++
++      /* if the plugin has a poll function use it instead */
++      if(ir->p.fops && ir->p.fops->poll)
++              return ir->p.fops->poll(file, wait);
++
++      poll_wait(file, &ir->buf->wait_poll, wait);
++
++      dprintk(LOGHEAD "poll result = %s\n",
++              ir->p.name, ir->p.minor, 
++              lirc_buffer_empty(ir->buf) ? "0" : "POLLIN|POLLRDNORM");
++
++      return lirc_buffer_empty(ir->buf) ? 0 : (POLLIN|POLLRDNORM);
++}
++
++/*
++ *
++ */
++static int irctl_ioctl(struct inode *inode, struct file *file,
++                       unsigned int cmd, unsigned long arg)
++{
++      unsigned long mode;
++      int result;
++      struct irctl *ir = &irctls[MINOR(inode->i_rdev)];
++
++      dprintk(LOGHEAD "ioctl called (%u)\n",
++              ir->p.name, ir->p.minor, cmd);
++
++      /* if the plugin has a ioctl function use it instead */
++      if(ir->p.fops && ir->p.fops->ioctl)
++              return ir->p.fops->ioctl(inode, file, cmd, arg);
++
++      if (ir->p.minor == NOPLUG) {
++              dprintk(LOGHEAD "ioctl result = -ENODEV\n",
++                      ir->p.name, ir->p.minor);
++              return -ENODEV;
++      }
++
++      /* Give the plugin a chance to handle the ioctl */
++      if(ir->p.ioctl){
++              result = ir->p.ioctl(inode, file, cmd, arg);
++              if (result != -ENOIOCTLCMD)
++                      return result;
++      }
++      /* The plugin can't handle cmd */
++      result = SUCCESS;
++
++      switch(cmd)
++      {
++      case LIRC_GET_FEATURES:
++              result = put_user(ir->p.features, (unsigned long*)arg);
++              break;
++      case LIRC_GET_REC_MODE:
++              if(!(ir->p.features&LIRC_CAN_REC_MASK))
++                      return(-ENOSYS);
++              
++              result = put_user(LIRC_REC2MODE
++                                (ir->p.features&LIRC_CAN_REC_MASK),
++                                (unsigned long*)arg);
++              break;
++      case LIRC_SET_REC_MODE:
++              if(!(ir->p.features&LIRC_CAN_REC_MASK))
++                      return(-ENOSYS);
++
++              result = get_user(mode, (unsigned long*)arg);
++              if(!result && !(LIRC_MODE2REC(mode) & ir->p.features)) {
++                      result = -EINVAL;
++              }
++              /* FIXME: We should actually set the mode somehow 
++               * but for now, lirc_serial doesn't support mode changin
++               * eighter */
++              break;
++      case LIRC_GET_LENGTH:
++              result = put_user((unsigned long)ir->p.code_length, 
++                                (unsigned long *)arg);
++              break;
++      default:
++              result = -ENOIOCTLCMD;
++      }
++
++      dprintk(LOGHEAD "ioctl result = %d\n",
++              ir->p.name, ir->p.minor, result);
++
++      return result;
++}
++
++/*
++ *
++ */
++static ssize_t irctl_read(struct file *file,
++                        char *buffer,   
++                        size_t length, 
++                        loff_t *ppos)     
++{
++      struct irctl *ir = &irctls[MINOR(file->f_dentry->d_inode->i_rdev)];
++      unsigned char buf[ir->buf->chunk_size];
++      int ret=0, written=0;
++      DECLARE_WAITQUEUE(wait, current);
++
++      dprintk(LOGHEAD "read called\n", ir->p.name, ir->p.minor);
++
++      /* if the plugin has a specific read function use it instead */
++      if(ir->p.fops && ir->p.fops->read)
++              return ir->p.fops->read(file, buffer, length, ppos);
++
++      if (length % ir->buf->chunk_size) {
++              dprintk(LOGHEAD "read result = -EINVAL\n",
++                      ir->p.name, ir->p.minor);
++              return -EINVAL;
++      }
++
++      /* we add ourselves to the task queue before buffer check 
++         * to avoid losing scan code (in case when queue is awaken somewhere 
++       * beetwen while condition checking and scheduling)
++       */
++      add_wait_queue(&ir->buf->wait_poll, &wait);
++      current->state = TASK_INTERRUPTIBLE;
++
++      /* while we did't provide 'length' bytes, device is opened in blocking
++       * mode and 'copy_to_user' is happy, wait for data.
++       */
++      while (written < length && ret == 0) { 
++              if (lirc_buffer_empty(ir->buf)) {
++                      /* According to the read(2) man page, 'written' can be
++                       * returned as less than 'length', instead of blocking
++                       * again, returning -EWOULDBLOCK, or returning
++                       * -ERESTARTSYS */
++                      if (written) break;
++                      if (file->f_flags & O_NONBLOCK) {
++                              dprintk(LOGHEAD "read result = -EWOULDBLOCK\n", 
++                                              ir->p.name, ir->p.minor);
++                              remove_wait_queue(&ir->buf->wait_poll, &wait);
++                              current->state = TASK_RUNNING;
++                              return -EWOULDBLOCK;
++                      }
++                      if (signal_pending(current)) {
++                              dprintk(LOGHEAD "read result = -ERESTARTSYS\n", 
++                                              ir->p.name, ir->p.minor);
++                              remove_wait_queue(&ir->buf->wait_poll, &wait);
++                              current->state = TASK_RUNNING;
++                              return -ERESTARTSYS;
++                      }
++                      schedule();
++                      current->state = TASK_INTERRUPTIBLE;
++              } else {
++                      lirc_buffer_read_1(ir->buf, buf);
++                      ret = copy_to_user((void *)buffer+written, buf,
++                                         ir->buf->chunk_size);
++                      written += ir->buf->chunk_size;
++              }
++      }
++
++      remove_wait_queue(&ir->buf->wait_poll, &wait);
++      current->state = TASK_RUNNING;
++
++      dprintk(LOGHEAD "read result = %s (%d)\n",
++              ir->p.name, ir->p.minor, ret ? "-EFAULT" : "OK", ret);
++
++      return ret ? -EFAULT : written;
++}
++
++static ssize_t irctl_write(struct file *file, const char *buffer,
++                         size_t length, loff_t * ppos)
++{
++      struct irctl *ir = &irctls[MINOR(file->f_dentry->d_inode->i_rdev)];
++
++      dprintk(LOGHEAD "read called\n", ir->p.name, ir->p.minor);
++
++      /* if the plugin has a specific read function use it instead */
++      if(ir->p.fops && ir->p.fops->write)
++              return ir->p.fops->write(file, buffer, length, ppos);
++
++      return -EINVAL;
++}
++
++
++static struct file_operations fops = {
++      read:    irctl_read, 
++      write:   irctl_write,
++      poll:    irctl_poll,
++      ioctl:   irctl_ioctl,
++      open:    irctl_open,
++      release: irctl_close
++};
++
++
++
++EXPORT_SYMBOL(lirc_register_plugin);
++EXPORT_SYMBOL(lirc_unregister_plugin);
++
++/*
++ *
++ */
++int lirc_dev_init(void)
++{     
++      int i;
++
++      for (i=0; i < MAX_IRCTL_DEVICES; ++i) {
++              init_irctl(&irctls[i]); 
++      }
++
++#ifndef LIRC_HAVE_DEVFS
++      i = register_chrdev(CONFIG_LIRC_IRCTL_DEV_MAJOR,
++#else
++      i = devfs_register_chrdev(CONFIG_LIRC_IRCTL_DEV_MAJOR,
++#endif
++                                 IRCTL_DEV_NAME,
++                                 &fops);
++      
++      if (i < 0) {
++              printk ("lirc_dev: device registration failed with %d\n", i);
++              return i;
++      }
++      
++      printk("lirc_dev: IR Remote Control driver registered, at major %d \n", 
++             CONFIG_LIRC_IRCTL_DEV_MAJOR);
++
++      return SUCCESS;
++}
++
++/* ---------------------------------------------------------------------- */
++
++/* For now dont try to use it as a static version !  */
++
++#ifdef MODULE
++
++MODULE_DESCRIPTION("LIRC base driver module");
++MODULE_AUTHOR("Artur Lipowski");
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("GPL");
++#endif
++
++/*
++ *
++ */
++int init_module(void)
++{
++      return lirc_dev_init();
++}
++
++/*
++ *
++ */
++void cleanup_module(void)
++{
++      int ret;
++      
++#ifndef LIRC_HAVE_DEVFS
++      ret = unregister_chrdev(CONFIG_LIRC_IRCTL_DEV_MAJOR, IRCTL_DEV_NAME);
++#else
++      ret = devfs_unregister_chrdev(CONFIG_LIRC_IRCTL_DEV_MAJOR, IRCTL_DEV_NAME);
++#endif
++ 
++      if (0 > ret){
++              printk("lirc_dev: error in module_unregister_chrdev: %d\n",
++                     ret);
++      } else {
++              dprintk("lirc_dev: module successfully unloaded\n");
++      }
++}
++#endif
++
++/*
++ * Overrides for Emacs so that we follow Linus's tabbing style.
++ * ---------------------------------------------------------------------------
++ * Local variables:
++ * c-basic-offset: 8
++ * End:
++ */
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_dev.h linux-2.6.8-rc4/drivers/char/lirc/lirc_dev.h
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_dev.h  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_dev.h       2004-04-09 17:33:40.000000000 +0200
+@@ -0,0 +1,238 @@
++/*
++ * LIRC base driver
++ * 
++ * (L) by Artur Lipowski <alipowski@interia.pl>
++ *        This code is licensed under GNU GPL
++ *
++ * $Id$
++ *
++ */
++
++#ifndef _LINUX_LIRC_DEV_H
++#define _LINUX_LIRC_DEV_H
++
++#define MAX_IRCTL_DEVICES 2
++#define BUFLEN            16
++
++//#define LIRC_BUFF_POWER_OF_2
++#ifdef LIRC_BUFF_POWER_OF_2
++#define mod(n, div) ((n) & ((div) -1))
++#else
++#define mod(n, div) ((n) % (div))
++#endif
++#include <linux/slab.h>
++#include <linux/fs.h>
++struct lirc_buffer
++{
++        wait_queue_head_t wait_poll;
++      spinlock_t lock;
++
++      unsigned char *data;
++      unsigned int chunk_size;
++      unsigned int size; /* in chunks */
++      unsigned int fill; /* in chunks */
++      int head, tail;    /* in chunks */
++      /* Using chunks instead of bytes pretends to simplify boundary checking 
++       * And should allow for some performance fine tunning later */
++};
++static inline int lirc_buffer_init(struct lirc_buffer *buf,
++                                  unsigned int chunk_size,
++                                  unsigned int size)
++{
++      /* Adjusting size to the next power of 2 would allow for
++       * inconditional LIRC_BUFF_POWER_OF_2 optimization */
++      init_waitqueue_head(&buf->wait_poll);
++      spin_lock_init(&buf->lock);
++      buf->head = buf->tail = buf->fill = 0;
++      buf->chunk_size = chunk_size;
++      buf->size = size;
++      buf->data = kmalloc(size*chunk_size, GFP_KERNEL);
++      if (buf->data == NULL)
++              return -1;
++      memset(buf->data, 0, size*chunk_size);
++      return 0;
++}
++static inline void lirc_buffer_free(struct lirc_buffer *buf)
++{
++      kfree(buf->data);
++      buf->data = NULL;
++      buf->head = buf->tail = buf->fill = 0;
++      buf->chunk_size = 0;
++      buf->size = 0;
++}
++static inline int  lirc_buffer_full(struct lirc_buffer *buf)
++{
++      return (buf->fill >= buf->size);
++}
++static inline int  lirc_buffer_empty(struct lirc_buffer *buf)
++{
++      return !(buf->fill);
++}
++static inline int  lirc_buffer_available(struct lirc_buffer *buf)
++{
++    return (buf->size - buf->fill);
++}
++extern inline void lirc_buffer_lock(struct lirc_buffer *buf, unsigned long *flags)
++{
++      spin_lock_irqsave(&buf->lock, *flags);
++}
++extern inline void lirc_buffer_unlock(struct lirc_buffer *buf, unsigned long *flags)
++{
++      spin_unlock_irqrestore(&buf->lock, *flags);
++}
++static inline void _lirc_buffer_remove_1(struct lirc_buffer *buf)
++{
++      buf->head = mod(buf->head+1, buf->size);
++      buf->fill -= 1;
++}
++static inline void lirc_buffer_remove_1(struct lirc_buffer *buf)
++{
++      unsigned long flags;
++      lirc_buffer_lock(buf, &flags);
++      _lirc_buffer_remove_1(buf);
++      lirc_buffer_unlock(buf, &flags);
++}
++static inline void _lirc_buffer_read_1(struct lirc_buffer *buf,
++                                   unsigned char *dest)
++{
++      memcpy(dest, &buf->data[buf->head*buf->chunk_size], buf->chunk_size);
++      buf->head = mod(buf->head+1, buf->size);
++      buf->fill -= 1;
++}
++static inline void lirc_buffer_read_1(struct lirc_buffer *buf,
++                                    unsigned char *dest)
++{
++      unsigned long flags;
++      lirc_buffer_lock(buf, &flags);
++      _lirc_buffer_read_1(buf, dest);
++      lirc_buffer_unlock(buf, &flags);
++}
++static inline void _lirc_buffer_write_1(struct lirc_buffer *buf,
++                                    unsigned char *orig)
++{
++      memcpy(&buf->data[buf->tail*buf->chunk_size], orig, buf->chunk_size);
++      buf->tail = mod(buf->tail+1, buf->size);
++      buf->fill++;
++}
++static inline void lirc_buffer_write_1(struct lirc_buffer *buf,
++                                     unsigned char *orig)
++{
++      unsigned long flags;
++      lirc_buffer_lock(buf, &flags);
++      _lirc_buffer_write_1(buf, orig);
++      lirc_buffer_unlock(buf, &flags);
++}
++static inline void _lirc_buffer_write_n(struct lirc_buffer *buf,
++                                      unsigned char* orig, int count)
++{
++      memcpy(&buf->data[buf->tail*buf->chunk_size], orig,
++             count*buf->chunk_size);
++      buf->tail = mod(buf->tail+count, buf->size);
++      buf->fill += count;
++}
++static inline void lirc_buffer_write_n(struct lirc_buffer *buf,
++                                     unsigned char* orig, int count)
++{
++      unsigned long flags;
++      int space1;
++      lirc_buffer_lock(buf,&flags);
++      if( buf->head > buf->tail ) space1 = buf->head - buf->tail;
++      else space1 = buf->size - buf->tail;
++      
++      if( count > space1 )
++      {
++              _lirc_buffer_write_n(buf, orig, space1);
++              _lirc_buffer_write_n(buf, orig+(space1*buf->chunk_size),
++                                   count-space1);
++      }
++      else
++      {
++              _lirc_buffer_write_n(buf, orig, count);
++      }
++      lirc_buffer_unlock(buf, &flags);
++}
++
++struct lirc_plugin
++{
++      char name[40];
++      int minor;
++      int code_length;
++      int sample_rate;
++      unsigned long features;
++      void* data;
++      int (*add_to_buf) (void* data, struct lirc_buffer* buf);
++      wait_queue_head_t* (*get_queue) (void* data);
++      struct lirc_buffer *rbuf;
++      int (*set_use_inc) (void* data);
++      void (*set_use_dec) (void* data);
++      int (*ioctl) (struct inode *,struct file *,unsigned int,
++                    unsigned long);
++      struct file_operations *fops;
++};
++/* name:
++ * this string will be used for logs
++ *
++ * minor:
++ * indicates minor device (/dev/lirc) number for registered plugin
++ * if caller fills it with negative value, then the first free minor 
++ * number will be used (if available)
++ *
++ * code_length:
++ * length of the remote control key code expressed in bits
++ *
++ * sample_rate:
++ * sample_rate equal to 0 means that no polling will be performed and
++ * add_to_buf will be triggered by external events (through task queue
++ * returned by get_queue)
++ *
++ * data:
++ * it may point to any plugin data and this pointer will be passed to
++ * all callback functions
++ *
++ * add_to_buf:
++ * add_to_buf will be called after specified period of the time or
++ * triggered by the external event, this behavior depends on value of
++ * the sample_rate this function will be called in user context. This
++ * routine should return 0 if data was added to the buffer and
++ * -ENODATA if none was available. This should add some number of bits
++ * evenly divisible by code_length to the buffer
++ *
++ * get_queue:
++ * this callback should return a pointer to the task queue which will
++ * be used for external event waiting
++ *
++ * rbuf:
++ * if not NULL, it will be used as a read buffer, you will have to
++ * write to the buffer by other means, like irq's (see also
++ * lirc_serial.c).
++ *
++ * set_use_inc:
++ * set_use_inc will be called after device is opened
++ *
++ * set_use_dec:
++ * set_use_dec will be called after device is closed
++ *
++ * ioctl:
++ * Some ioctl's can be directly handled by lirc_dev but will be
++ * forwared here if not NULL and only handled if it returns
++ * -ENOIOCTLCMD (see also lirc_serial.c).
++ *
++ * fops:
++ * file_operations for drivers which don't fit the current plugin model.
++ */
++
++
++/* following functions can be called ONLY from user context
++ *
++ * returns negative value on error or minor number 
++ * of the registered device if success
++ * contens of the structure pointed by p is copied
++ */
++extern int lirc_register_plugin(struct lirc_plugin *p);
++
++/* returns negative value on error or 0 if success
++*/
++extern int lirc_unregister_plugin(int minor);
++
++
++#endif
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_gpio.c linux-2.6.8-rc4/drivers/char/lirc/lirc_gpio.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_gpio.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_gpio.c      2004-04-27 08:08:24.000000000 +0200
+@@ -0,0 +1,572 @@
++/*
++ * Remote control driver for the TV-card
++ * key codes are obtained from GPIO port
++ * 
++ * (L) by Artur Lipowski <alipowski@interia.pl>
++ *     patch for the AverMedia by Santiago Garcia Mantinan <manty@i.am>
++ *                            and Christoph Bartelmus <lirc@bartelmus.de>
++ *     patch for the BestBuy by Miguel Angel Alvarez <maacruz@navegalia.com>
++ *     patch for the Winfast TV2000 by Juan Toledo
++ *     <toledo@users.sourceforge.net>
++ *     patch for the I-O Data GV-BCTV5/PCI by Jens C. Rasmussen
++ *     <jens.rasmussen@ieee.org>
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ *
++ * $Id$
++ *
++ */
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 4)
++#error "*******************************************************"
++#error "Sorry, this driver needs kernel version 2.2.4 or higher"
++#error "*******************************************************"
++#endif
++
++#include <linux/module.h>
++#include <linux/kmod.h>
++#include <linux/sched.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
++#include <linux/wrapper.h>
++#endif
++#include <linux/errno.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
++#include "../drivers/char/bttv.h"
++#include "../drivers/char/bttvp.h"
++#else
++#include "../drivers/media/video/bttv.h"
++#include "../drivers/media/video/bttvp.h"
++#endif
++
++#if BTTV_VERSION_CODE < KERNEL_VERSION(0,7,45)
++#error "*******************************************************"
++#error " Sorry, this driver needs bttv version 0.7.45 or       "
++#error " higher. If you are using the bttv package, copy it to "
++#error " the kernel                                            "
++#error "*******************************************************"
++#endif
++
++#include "kcompat.h"
++#include "lirc_dev.h"
++
++static int debug = 0;
++static int card = 0;
++static int minor = -1;
++static int bttv_id = BTTV_UNKNOWN;
++static unsigned long gpio_mask = 0;
++static unsigned long gpio_enable = 0;
++static unsigned long gpio_lock_mask = 0;
++static unsigned long gpio_xor_mask = 0;
++static unsigned int soft_gap = 0;
++static unsigned char sample_rate = 10;
++
++MODULE_PARM(debug,"i");
++MODULE_PARM(card,"i");
++MODULE_PARM(minor,"i");
++MODULE_PARM(gpio_mask,"l");
++MODULE_PARM(gpio_lock_mask,"l");
++MODULE_PARM(gpio_xor_mask,"l");
++MODULE_PARM(soft_gap,"i");
++MODULE_PARM(sample_rate,"b");
++MODULE_PARM(bttv_id,"i");
++
++#undef dprintk
++#define dprintk  if (debug) printk
++
++struct rcv_info {
++      int bttv_id;
++      int card_id;
++      unsigned long gpio_mask;
++      unsigned long gpio_enable;
++      unsigned long gpio_lock_mask;
++      unsigned long gpio_xor_mask;
++      unsigned int soft_gap;
++      unsigned char sample_rate;
++      unsigned char code_length;
++};
++
++static struct rcv_info rcv_infos[] = {
++      {BTTV_UNKNOWN,                0,          0,          0,         0,          0,   0,  1,  0},
++      {BTTV_PXELVWPLTVPAK,          0, 0x00003e00,          0, 0x0010000,          0,   0, 15, 32},
++      {BTTV_PXELVWPLTVPRO,          0, 0x00001f00,          0, 0x0008000,          0, 500, 12, 32},
++      {BTTV_PV_BT878P_9B,           0, 0x00001f00,          0, 0x0008000,          0, 500, 12, 32},
++      {BTTV_PV_BT878P_PLUS,         0, 0x00001f00,          0, 0x0008000,          0, 500, 12, 32},
++      {BTTV_AVERMEDIA,              0, 0x00f88000,          0, 0x0010000, 0x00010000,   0, 10, 32},
++      {BTTV_AVPHONE98,     0x00011461, 0x003b8000, 0x00004000, 0x0800000, 0x00800000,   0, 10,  0}, /*mapped to Capture98*/
++      {BTTV_AVERMEDIA98,   0x00021461, 0x003b8000, 0x00004000, 0x0800000, 0x00800000,   0, 10,  0}, /*mapped to Capture98*/
++      {BTTV_AVPHONE98,     0x00031461, 0x00f88000,          0, 0x0010000, 0x00010000,   0, 10, 32}, /*mapped to Phone98*/
++      /* is this one correct? */
++      {BTTV_AVERMEDIA98,   0x00041461, 0x00f88000,          0, 0x0010000, 0x00010000,   0, 10, 32}, /*mapped to Phone98*/
++      /* work-around for VDOMATE */
++      {BTTV_AVERMEDIA98,   0x03001461, 0x00f88000,          0, 0x0010000, 0x00010000,   0, 10, 32}, /*mapped to Phone98*/
++      /* reported by Danijel Korzinek, AVerTV GOw/FM */
++      {BTTV_AVERMEDIA98,   0x00000000, 0x00f88000,          0, 0x0010000, 0x00010000,   0, 10, 32}, /*mapped to Phone98*/
++      {BTTV_CHRONOS_VS2,            0, 0x000000f8,          0, 0x0000100,          0,   0, 20,  0},
++      /* CPH031 and CPH033 cards (?) */
++      /* MIRO was just a work-around */
++      {BTTV_MIRO,                   0, 0x00001f00,          0, 0x0004000,          0,   0, 10, 32},
++      {BTTV_DYNALINK,               0, 0x00001f00,          0, 0x0004000,          0,   0, 10, 32},
++      {BTTV_WINVIEW_601,            0, 0x00001f00,          0, 0x0004000,          0,   0,  0, 32},
++#ifdef BTTV_KWORLD
++      {BTTV_KWORLD,                 0, 0x00007f00,          0, 0x0004000,          0,   0, 12, 32},
++#endif
++      /* just a guess */
++      {BTTV_MAGICTVIEW061,          0, 0x0028e000,          0, 0x0020000,          0,   0, 20, 32},
++      {BTTV_MAGICTVIEW063,          0, 0x0028e000,          0, 0x0020000,          0,   0, 20, 32},
++      {BTTV_PHOEBE_TVMAS,           0, 0x0028e000,          0, 0x0020000,          0,   0, 20, 32},
++#ifdef BTTV_BESTBUY_EASYTV2
++        {BTTV_BESTBUY_EASYTV,         0, 0x00007F00,          0, 0x0004000,          0,   0, 10,  8},
++        {BTTV_BESTBUY_EASYTV2,        0, 0x00007F00,          0, 0x0008000,          0,   0, 10,  8},
++#endif
++      /* lock_mask probably also 0x100, or maybe it is 0x0 for all others !?! */
++      {BTTV_FLYVIDEO,               0, 0x000000f8,          0,         0,          0,   0,  0, 42},
++      {BTTV_FLYVIDEO_98,            0, 0x000000f8,          0, 0x0000100,          0,   0,  0, 42},
++      {BTTV_TYPHOON_TVIEW,          0, 0x000000f8,          0, 0x0000100,          0,   0,  0, 42},
++#ifdef BTTV_FLYVIDEO_98FM
++      /* smorar@alfonzo.smuts.uct.ac.za */
++      {BTTV_FLYVIDEO_98FM,          0, 0x000000f8,          0, 0x0000100,          0,   0,  0, 42},
++#endif
++      /* The Leadtek WinFast TV 2000 XP card (id 0x6606107d) uses an
++       * extra gpio bit compared to the original TV 2000 card (id
++       * 0x217d6606); as the bttv-0.7.100 driver does not
++       * distinguish between the two cards, we enable the extra bit
++       * based on the card id: */
++      {BTTV_WINFAST2000,   0x6606107d, 0x000008f8,          0, 0x0000100,          0,   0,  0, 32},
++      /* default: */
++      {BTTV_WINFAST2000,            0, 0x000000f8,          0, 0x0000100,          0,   0,  0, 32},
++#ifdef BTTV_GVBCTV5PCI
++      {BTTV_GVBCTV5PCI,             0, 0x00f0b000,          0,         0,          0,   0, 20,  8},
++#endif
++};
++
++static unsigned char code_length = 0;
++static unsigned char code_bytes = 1;
++
++#define MAX_BYTES 8
++
++#define SUCCESS 0
++#define LOGHEAD "lirc_gpio (%d): "
++
++/* how many bits GPIO value can be shifted right before processing
++ * it is computed from the value of gpio_mask_parameter
++ */
++static unsigned char gpio_pre_shift = 0;
++
++
++static inline int reverse(int data, int bits)
++{
++      int i;
++      int c;
++      
++      for (c=0,i=0; i<bits; i++) {
++              c |= (((data & (1<<i)) ? 1:0)) << (bits-1-i);
++      }
++
++      return c;
++}
++
++static int build_key(unsigned long gpio_val, unsigned char codes[MAX_BYTES])
++{
++      unsigned long mask = gpio_mask;
++      unsigned char shift = 0;
++
++      dprintk(LOGHEAD "gpio_val is %lx\n",card,(unsigned long) gpio_val);
++      
++      gpio_val ^= gpio_xor_mask;
++      
++      if (gpio_lock_mask && (gpio_val & gpio_lock_mask)) {
++              return -EBUSY;
++      }
++      
++      switch (bttv_id)
++      {
++      case BTTV_AVERMEDIA98:
++              if (bttv_write_gpio(card, gpio_enable, gpio_enable)) {
++                      dprintk(LOGHEAD "cannot write to GPIO\n", card);
++                      return -EIO;
++              }
++              if (bttv_read_gpio(card, &gpio_val)) {
++                      dprintk(LOGHEAD "cannot read GPIO\n", card);
++                      return -EIO;
++              }
++              if (bttv_write_gpio(card, gpio_enable, 0)) {
++                      dprintk(LOGHEAD "cannot write to GPIO\n", card);
++                      return -EIO;
++              }
++              break;
++      default:
++              break;
++      }
++      
++      /* extract bits from "raw" GPIO value using gpio_mask */
++      codes[0] = 0;
++      gpio_val >>= gpio_pre_shift;
++      while (mask) {
++              if (mask & 1u) {
++                      codes[0] |= (gpio_val & 1u) << shift++;
++              }
++              mask >>= 1;
++              gpio_val >>= 1;
++      }
++      
++      dprintk(LOGHEAD "code is %lx\n",card,(unsigned long) codes[0]);
++      switch (bttv_id)
++      {
++      case BTTV_AVERMEDIA:
++              codes[2] = (codes[0]<<2)&0xff;
++              codes[3] = (~codes[2])&0xff;
++              codes[0] = 0x02;
++              codes[1] = 0xFD;
++              break;
++      case BTTV_AVPHONE98:
++              codes[2] = ((codes[0]&(~0x1))<<2)&0xff;
++              codes[3] = (~codes[2])&0xff;
++              if (codes[0]&0x1) {
++                      codes[0] = 0xc0;
++                      codes[1] = 0x3f;
++              } else {
++                      codes[0] = 0x40;
++                      codes[1] = 0xbf;
++              }
++              break;
++      case BTTV_AVERMEDIA98:
++              break;
++      case BTTV_FLYVIDEO:
++      case BTTV_FLYVIDEO_98:
++      case BTTV_TYPHOON_TVIEW:
++#ifdef BTTV_FLYVIDEO_98FM
++      case BTTV_FLYVIDEO_98FM:
++#endif
++              codes[4]=codes[0]<<3;
++              codes[5]=((~codes[4])&0xff);
++              
++              codes[0]=0x00;
++              codes[1]=0x1A;
++              codes[2]=0x1F;
++              codes[3]=0x2F;
++              break;
++        case BTTV_MAGICTVIEW061:
++        case BTTV_MAGICTVIEW063:
++      case BTTV_PHOEBE_TVMAS:
++              codes[0] = (codes[0]&0x01)
++                      |((codes[0]&0x02)<<1)
++                      |((codes[0]&0x04)<<2)
++                      |((codes[0]&0x08)>>2)
++                      |((codes[0]&0x10)>>1);
++              /* FALLTHROUGH */
++      case BTTV_MIRO:
++      case BTTV_DYNALINK:
++      case BTTV_PXELVWPLTVPAK:
++      case BTTV_PXELVWPLTVPRO:
++      case BTTV_PV_BT878P_9B:
++      case BTTV_PV_BT878P_PLUS:
++#ifdef BTTV_KWORLD
++      case BTTV_KWORLD:
++#endif
++              codes[2] = reverse(codes[0],8);
++              codes[3] = (~codes[2])&0xff;
++              codes[0] = 0x61;
++              codes[1] = 0xD6;
++              break;
++#if 0
++              /* derived from e-tech config file */
++              /* 26 + 16 bits */
++              /* won't apply it until it's confirmed with a fly98 */
++      case BTTV_FLYVIDEO_98:
++      case BTTV_FLYVIDEO_98FM:
++              codes[4]=codes[0]<<3;
++              codes[5]=(~codes[4])&0xff;
++              
++              codes[0]=0x00;
++              codes[1]=0x1A;
++              codes[2]=0x1F;
++              codes[3]=0x2F;
++              break;
++#endif
++      case BTTV_WINFAST2000:
++              /* shift extra bit */
++              codes[0] = (codes[0]&0x1f) | ((codes[0]&0x20) << 1);
++      case BTTV_WINVIEW_601:
++              codes[2] = reverse(codes[0],8);
++              codes[3] = (~codes[2])&0xff;
++              codes[0] = 0xC0;
++              codes[1] = 0x3F;
++              break;
++      default:
++              break;
++      }
++
++      return SUCCESS;
++}
++
++/* add_to_buf - copy a code to the buffer */
++static int add_to_buf(void* data, struct lirc_buffer* buf)
++{
++      static unsigned long next_time = 0;
++      static unsigned char prev_codes[MAX_BYTES];
++      unsigned long code = 0;
++      unsigned char cur_codes[MAX_BYTES];
++    
++      if (bttv_read_gpio(card, &code)) {
++              dprintk(LOGHEAD "cannot read GPIO\n", card);
++              return -EIO;
++      }
++      
++      if (build_key(code, cur_codes)) {
++              return -EFAULT;
++      }
++      
++      if (soft_gap) {
++              if (!memcmp(prev_codes, cur_codes, code_bytes) &&
++                      jiffies < next_time) {
++                      return -EAGAIN;
++              }
++              next_time = jiffies + soft_gap;
++      }
++      memcpy( prev_codes, cur_codes, code_bytes );
++              
++      lirc_buffer_write_1( buf, cur_codes );
++              
++      return SUCCESS;
++}
++
++static int set_use_inc(void* data)
++{
++      MOD_INC_USE_COUNT;
++      return 0;
++}
++
++static void set_use_dec(void* data)
++{
++      MOD_DEC_USE_COUNT;
++}
++
++static wait_queue_head_t* get_queue(void* data)
++{
++      return bttv_get_gpio_queue(card);
++}
++
++static struct lirc_plugin plugin = {
++      .name           = "lirc_gpio  ",
++      .add_to_buf     = add_to_buf,
++      .get_queue      = get_queue,
++      .set_use_inc    = set_use_inc,
++      .set_use_dec    = set_use_dec,
++};
++
++/*
++ *
++ */
++int gpio_remote_init(void)
++{     
++      int ret;
++      unsigned int mask;
++
++      /* "normalize" gpio_mask
++       * this means shift it right until first bit is set
++       */
++      while (!(gpio_mask & 1u)) {
++              gpio_pre_shift++;
++              gpio_mask >>= 1;
++      }
++
++      if (code_length) {
++              plugin.code_length = code_length;
++      } else {
++              /* calculate scan code length in bits if needed */
++              plugin.code_length = 1;
++              mask = gpio_mask >> 1;
++              while (mask) {
++                      if (mask & 1u) {
++                              plugin.code_length++;
++                      }
++                      mask >>= 1;
++              }
++      }
++
++      code_bytes = (plugin.code_length/8) + (plugin.code_length%8 ? 1 : 0);
++      if (MAX_BYTES < code_bytes) {
++              printk (LOGHEAD "scan code too long (%d bytes)\n",
++                      minor, code_bytes);
++              return -EBADRQC;
++      }
++
++      if (gpio_enable) {
++              if(bttv_gpio_enable(card, gpio_enable, gpio_enable)) {
++                      printk(LOGHEAD "gpio_enable failure\n", minor);
++                      return -EIO;
++              }
++      }
++
++
++      /* translate ms to jiffies */
++      soft_gap = (soft_gap*HZ) / 1000;
++
++      plugin.minor = minor;
++      plugin.sample_rate = sample_rate;
++
++      ret = lirc_register_plugin(&plugin);
++      
++      if (0 > ret) {
++              printk (LOGHEAD "device registration failed with %d\n",
++                      minor, ret);
++              return ret;
++      }
++      
++      minor = ret;
++      printk(LOGHEAD "driver registered\n", minor);
++
++      return SUCCESS;
++}
++
++#ifndef KERNEL_2_5
++EXPORT_NO_SYMBOLS;
++#endif
++
++/* Dont try to use it as a static version !  */
++
++#ifdef MODULE
++MODULE_DESCRIPTION("Driver module for remote control (data from bt848 GPIO port)");
++MODULE_AUTHOR("Artur Lipowski");
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("GPL");
++#endif
++
++/*
++ *
++ */
++int init_module(void)
++{
++      int type,cardid,card_type;
++
++      if (MAX_IRCTL_DEVICES < minor) {
++              printk("lirc_gpio: parameter minor (%d) must be less than %d!\n",
++                     minor, MAX_IRCTL_DEVICES-1);
++              return -EBADRQC;
++      }
++      
++      request_module("bttv");
++
++      /* if gpio_mask not zero then use module parameters 
++       * instead of autodetecting TV card
++       */
++      if (gpio_mask) {
++              if (sample_rate!=0 &&
++                  (2 > sample_rate || HZ < sample_rate)) {
++                      printk(LOGHEAD "parameter sample_rate "
++                             "must be between 2 and %d!\n", minor, HZ);
++                      return -EBADRQC;
++              }
++
++              if (sample_rate!=0 && soft_gap && 
++                  ((2000/sample_rate) > soft_gap || 1000 < soft_gap)) {
++                      printk(LOGHEAD "parameter soft_gap "
++                             "must be between %d and 1000!\n",
++                             minor, 2000/sample_rate);
++                      return -EBADRQC;
++              }
++      } else {
++              if(bttv_get_cardinfo(card,&type,&cardid)==-1) {
++                      printk(LOGHEAD "could not get card type\n", minor);
++                      return -EBADRQC;
++              }
++              printk(LOGHEAD "card type 0x%x, id 0x%x\n",minor,
++                     type,cardid);
++
++              if (type == BTTV_UNKNOWN) {
++                      printk(LOGHEAD "cannot detect TV card nr %d!\n",
++                             minor, card);
++                      return -EBADRQC;
++              }
++              for (card_type = 1;
++                   card_type < sizeof(rcv_infos)/sizeof(struct rcv_info); 
++                   card_type++) {
++                      if (rcv_infos[card_type].bttv_id == type &&
++                          (rcv_infos[card_type].card_id == 0 ||
++                           rcv_infos[card_type].card_id == cardid)) {
++                              bttv_id = rcv_infos[card_type].bttv_id;
++                              gpio_mask = rcv_infos[card_type].gpio_mask;
++                              gpio_enable = rcv_infos[card_type].gpio_enable;
++                              gpio_lock_mask = rcv_infos[card_type].gpio_lock_mask;
++                              gpio_xor_mask = rcv_infos[card_type].gpio_xor_mask;
++                              soft_gap = rcv_infos[card_type].soft_gap;
++                              sample_rate = rcv_infos[card_type].sample_rate;
++                              code_length = rcv_infos[card_type].code_length;
++                              break;
++                      }
++              }
++              if (type==BTTV_AVPHONE98 && cardid==0x00011461) {
++                      bttv_id = BTTV_AVERMEDIA98;
++              }
++              if (type==BTTV_AVERMEDIA98 && cardid==0x00041461) {
++                      bttv_id = BTTV_AVPHONE98;
++              }
++              if (type==BTTV_AVERMEDIA98 && cardid==0x03001461) {
++                      bttv_id = BTTV_AVPHONE98;
++              }
++              if (type==BTTV_AVERMEDIA98 && cardid==0x00000000) {
++                      bttv_id = BTTV_AVPHONE98;
++              }
++              if (card_type == sizeof(rcv_infos)/sizeof(struct rcv_info)) {
++                      printk(LOGHEAD "TV card type 0x%x not supported!\n",
++                             minor, type);
++                      return -EBADRQC;
++              }
++      }
++
++      request_module("lirc_dev");
++
++      return gpio_remote_init();
++}
++
++/*
++ *
++ */
++void cleanup_module(void)
++{
++      int ret;
++
++      ret = lirc_unregister_plugin(minor);
++ 
++      if (0 > ret) {
++              printk(LOGHEAD "error in lirc_unregister_minor: %d\n"
++                     "Trying again...\n",
++                     minor, ret);
++
++              current->state = TASK_INTERRUPTIBLE;
++              schedule_timeout(HZ);
++
++              ret = lirc_unregister_plugin(minor);
++ 
++              if (0 > ret) {
++                      printk(LOGHEAD "error in lirc_unregister_minor: %d!!!\n",
++                             minor, ret);
++                      return;
++              }
++      }
++
++      dprintk(LOGHEAD "module successfully unloaded\n", minor);
++}
++#endif
++
++/*
++ * Overrides for Emacs so that we follow Linus's tabbing style.
++ * ---------------------------------------------------------------------------
++ * Local variables:
++ * c-basic-offset: 8
++ * End:
++ */
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_i2c.c linux-2.6.8-rc4/drivers/char/lirc/lirc_i2c.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_i2c.c  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_i2c.c       2004-04-09 17:33:41.000000000 +0200
+@@ -0,0 +1,545 @@
++/*      $Id$      */
++
++/*
++ * i2c IR lirc plugin for Hauppauge and Pixelview cards - new 2.3.x i2c stack
++ *
++ * Copyright (c) 2000 Gerd Knorr <kraxel@goldbach.in-berlin.de>
++ * modified for PixelView (BT878P+W/FM) by
++ *      Michal Kochanowicz <mkochano@pld.org.pl>
++ *      Christoph Bartelmus <lirc@bartelmus.de>
++ * modified for KNC ONE TV Station/Anubis Typhoon TView Tuner by
++ *      Ulrich Mueller <ulrich.mueller42@web.de>
++ * modified for Asus TV-Box and Creative/VisionTek BreakOut-Box by
++ *      Stefan Jahn <stefan@lkcc.org>
++ *
++ * parts are cut&pasted from the old lirc_haup.c driver
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ *
++ */
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < 0x020200
++#error "--- Sorry, this driver needs kernel version 2.2.0 or higher. ---"
++#endif
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#include <linux/module.h>
++#include <linux/kmod.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/string.h>
++#include <linux/timer.h>
++#include <linux/delay.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/i2c.h>
++
++#ifndef I2C_CLIENT_END
++#error "********************************************************"
++#error " Sorry, this driver needs the new I2C stack.            "
++#error " You can get it at http://www2.lm-sensors.nu/~lm78/.    "
++#error "********************************************************"
++#endif
++
++#include <linux/i2c-algo-bit.h>
++
++#include <asm/semaphore.h>
++
++#include "kcompat.h"
++#include "lirc_dev.h"
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
++#include "../drivers/char/bttv.h"
++#else
++#include "../drivers/media/video/bttv.h"
++#endif
++
++struct IR {
++      struct lirc_plugin l;
++      struct i2c_client  c;
++      int nextkey;
++      unsigned char b[3];
++      unsigned char bits;
++      unsigned char flag;
++};
++
++/* ----------------------------------------------------------------------- */
++/* insmod parameters                                                       */
++
++static int debug   = 0;    /* debug output */
++static int minor   = -1;   /* minor number */
++
++MODULE_PARM(debug,"i");
++MODULE_PARM(minor,"i");
++
++#define dprintk if (debug) printk
++
++/* ----------------------------------------------------------------------- */
++
++#define DEVICE_NAME "lirc_i2c"
++
++/* ----------------------------------------------------------------------- */
++
++static inline int reverse(int data, int bits)
++{
++      int i;
++      int c;
++      
++      for (c=0,i=0; i<bits; i++) {
++              c |= (((data & (1<<i)) ? 1:0)) << (bits-1-i);
++      }
++
++      return c;
++}
++
++static int add_to_buf_pcf8574(void* data, struct lirc_buffer* buf)
++{
++      struct IR *ir = data;
++      int rc;
++      unsigned char all, mask;
++      unsigned char key;
++
++      /* compute all valid bits (key code + pressed/release flag) */
++      all = ir->bits | ir->flag;
++
++      /* save IR writable mask bits */
++      mask = i2c_smbus_read_byte(&ir->c) & ~all;
++
++      /* send bit mask */
++      rc = i2c_smbus_write_byte(&ir->c, (0xff & all) | mask);
++
++      /* receive scan code */
++      rc = i2c_smbus_read_byte(&ir->c);
++
++      if (rc == -1) {
++              dprintk(DEVICE_NAME ": %s read error\n", ir->c.name);
++              return -EIO;
++      }
++
++      /* drop duplicate polls */
++      if (ir->b[0] == (rc & all)) {
++              return -ENODATA;
++      }
++      ir->b[0] = rc & all;
++
++      dprintk(DEVICE_NAME ": %s key 0x%02X %s\n",
++              ir->c.name, rc & ir->bits,
++              (rc & ir->flag) ? "released" : "pressed");
++
++      if (rc & ir->flag) {
++              /* ignore released buttons */
++              return -ENODATA;
++      }
++
++      /* set valid key code */
++      key  = rc & ir->bits;
++      lirc_buffer_write_1( buf, &key );
++      return 0;
++}
++
++static int add_to_buf_haup(void* data, struct lirc_buffer* buf)
++{
++      struct IR *ir = data;
++      unsigned char keybuf[3];
++      __u16 code;
++      unsigned char codes[2];
++
++      /* poll IR chip */
++      if (3 == i2c_master_recv(&ir->c,keybuf,3)) {
++              ir->b[0] = keybuf[0];
++              ir->b[1] = keybuf[1];
++              ir->b[2] = keybuf[2];
++              dprintk(KERN_DEBUG DEVICE_NAME ": key (0x%02x/0x%02x)\n",
++                      ir->b[0], ir->b[1]);
++      } else {
++              dprintk(KERN_DEBUG DEVICE_NAME ": read error\n");
++              /* keep last successfull read buffer */
++      }
++
++      /* key pressed ? */
++      if ((ir->b[0] & 0x80) == 0)
++              return -ENODATA;
++      
++      /* look what we have */
++      code = (((__u16)ir->b[0]&0x7f)<<6) | (ir->b[1]>>2);
++      
++      codes[0] = (code >> 8) & 0xff;
++      codes[1] = code & 0xff;
++
++      /* return it */
++      lirc_buffer_write_1( buf, codes );
++      return 0;
++}
++
++static int add_to_buf_pixelview(void* data, struct lirc_buffer* buf)
++{
++      struct IR *ir = data;
++      unsigned char key;
++      
++      /* poll IR chip */
++      if (1 != i2c_master_recv(&ir->c,&key,1)) {
++              dprintk(KERN_DEBUG DEVICE_NAME ": read error\n");
++              return -1;
++      }
++      dprintk(KERN_DEBUG DEVICE_NAME ": key %02x\n", key);
++
++      /* return it */
++      lirc_buffer_write_1( buf, &key );
++      return 0;
++}
++
++static int add_to_buf_pv951(void* data, struct lirc_buffer* buf)
++{
++      struct IR *ir = data;
++      unsigned char key;
++      unsigned char codes[4];
++      
++      /* poll IR chip */
++      if (1 != i2c_master_recv(&ir->c,&key,1)) {
++              dprintk(KERN_DEBUG DEVICE_NAME ": read error\n");
++              return -ENODATA;
++      }
++      /* ignore 0xaa */
++      if (key==0xaa)
++              return -ENODATA;
++      dprintk(KERN_DEBUG DEVICE_NAME ": key %02x\n", key);
++
++      codes[0] = 0x61;
++      codes[1] = 0xD6;
++      codes[2] = reverse(key,8);
++      codes[3] = (~codes[2])&0xff;
++      
++      lirc_buffer_write_1( buf, codes );
++      return 0;
++}
++
++static int add_to_buf_knc1(void *data, struct lirc_buffer* buf)
++{
++      static unsigned char last_key = 0xFF;
++      struct IR *ir = data;
++      unsigned char key;
++      
++      /* poll IR chip */
++      if (1 != i2c_master_recv(&ir->c,&key,1)) {
++              dprintk(KERN_DEBUG DEVICE_NAME ": read error\n");
++              return -ENODATA;
++      }
++      
++      /* it seems that 0xFE indicates that a button is still hold
++         down, while 0xFF indicates that no button is hold
++         down. 0xFE sequences are sometimes interrupted by 0xFF */
++      
++      dprintk(KERN_DEBUG DEVICE_NAME ": key %02x\n", key);
++      
++      if( key == 0xFF )
++              return -ENODATA;
++      
++      if ( key == 0xFE )
++              key = last_key;
++
++      last_key = key;
++      lirc_buffer_write_1( buf, &key );
++
++      return 0;
++}
++
++static int set_use_inc(void* data)
++{
++      struct IR *ir = data;
++
++      /* lock bttv in memory while /dev/lirc is in use  */
++      /* this is completely broken code. lirc_unregister_plugin()
++         must be possible even when the device is open */
++#ifdef KERNEL_2_5
++      i2c_use_client(&ir->c);
++#else
++      if (ir->c.adapter->inc_use) 
++              ir->c.adapter->inc_use(ir->c.adapter);
++#endif
++
++      MOD_INC_USE_COUNT;
++      return 0;
++}
++
++static void set_use_dec(void* data)
++{
++      struct IR *ir = data;
++
++#ifdef KERNEL_2_5
++      i2c_release_client(&ir->c);
++#else
++      if (ir->c.adapter->dec_use) 
++              ir->c.adapter->dec_use(ir->c.adapter);
++#endif
++      MOD_DEC_USE_COUNT;
++}
++
++static struct lirc_plugin lirc_template = {
++      name:        "lirc_i2c",
++      set_use_inc: set_use_inc,
++      set_use_dec: set_use_dec
++};
++
++/* ----------------------------------------------------------------------- */
++
++static int ir_attach(struct i2c_adapter *adap, int addr,
++                    unsigned short flags, int kind);
++static int ir_detach(struct i2c_client *client);
++static int ir_probe(struct i2c_adapter *adap);
++static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg);
++
++static struct i2c_driver driver = {
++        name:           "i2c ir driver",
++        id:             I2C_DRIVERID_EXP3, /* FIXME */
++        flags:          I2C_DF_NOTIFY,
++        attach_adapter: ir_probe,
++        detach_client:  ir_detach,
++        command:        ir_command,
++};
++
++static struct i2c_client client_template = 
++{
++        name:   "unset",
++        driver: &driver
++};
++
++static int ir_attach(struct i2c_adapter *adap, int addr,
++                   unsigned short flags, int kind)
++{
++        struct IR *ir;
++      
++        client_template.adapter = adap;
++        client_template.addr = addr;
++      
++        if (NULL == (ir = kmalloc(sizeof(struct IR),GFP_KERNEL)))
++                return -ENOMEM;
++        memcpy(&ir->l,&lirc_template,sizeof(struct lirc_plugin));
++        memcpy(&ir->c,&client_template,sizeof(struct i2c_client));
++      
++      ir->c.adapter = adap;
++      ir->c.addr    = addr;
++#ifdef KERNEL_2_5
++      i2c_set_clientdata(&ir->c, ir);
++#else
++      ir->c.data    = ir;
++#endif
++      ir->l.data    = ir;
++      ir->l.minor   = minor;
++      ir->l.sample_rate = 10;
++      ir->nextkey   = -1;
++
++      switch(addr)
++      {
++      case 0x64:
++              strcpy(ir->c.name,"Pixelview IR");
++              ir->l.code_length = 8;
++              ir->l.add_to_buf=add_to_buf_pixelview;
++              break;
++      case 0x4b:
++              strcpy(ir->c.name,"PV951 IR");
++              ir->l.code_length = 32;
++              ir->l.add_to_buf=add_to_buf_pv951;
++              break;
++      case 0x18:
++      case 0x1a:
++              strcpy(ir->c.name,"Hauppauge IR");
++              ir->l.code_length = 13;
++              ir->l.add_to_buf=add_to_buf_haup;
++              break;
++      case 0x30:
++              strcpy(ir->c.name,"KNC ONE IR");
++              ir->l.code_length = 8;
++              ir->l.add_to_buf=add_to_buf_knc1;
++              break;
++      case 0x21:
++      case 0x23:
++              strcpy(ir->c.name,"TV-Box IR");
++              ir->l.code_length = 8;
++              ir->l.add_to_buf=add_to_buf_pcf8574;
++              ir->bits = flags & 0xff;
++              ir->flag = (flags >> 8) & 0xff;
++              break;
++              
++      default:
++              /* shouldn't happen */
++              printk("lirc_i2c: Huh? unknown i2c address (0x%02x)?\n",addr);
++              kfree(ir);
++              return -1;
++      }
++      printk("lirc_i2c: chip found @ 0x%02x (%s)\n",addr,ir->c.name);
++      
++      /* register device */
++      i2c_attach_client(&ir->c);
++      ir->l.minor = lirc_register_plugin(&ir->l);
++#ifdef KERNEL_2_5
++      i2c_use_client(&ir->c);
++#else
++      if (ir->c.adapter->inc_use) 
++              ir->c.adapter->inc_use(ir->c.adapter);
++#endif
++      
++      return 0;
++}
++
++static int ir_detach(struct i2c_client *client)
++{
++#ifdef KERNEL_2_5
++      struct IR *ir = i2c_get_clientdata(client);
++#else
++        struct IR *ir = client->data;
++#endif
++      
++      /* unregister device */
++#ifdef KERNEL_2_5
++      i2c_release_client(&ir->c);
++#else
++      if (ir->c.adapter->dec_use) 
++              ir->c.adapter->dec_use(ir->c.adapter);
++#endif
++      lirc_unregister_plugin(ir->l.minor);
++      i2c_detach_client(&ir->c);
++
++      /* free memory */
++      kfree(ir);
++      return 0;
++}
++
++static int ir_probe(struct i2c_adapter *adap) {
++      
++      /* The external IR receiver is at i2c address 0x34 (0x35 for
++         reads).  Future Hauppauge cards will have an internal
++         receiver at 0x30 (0x31 for reads).  In theory, both can be
++         fitted, and Hauppauge suggest an external overrides an
++         internal. 
++         
++         That's why we probe 0x1a (~0x34) first. CB 
++      */
++      
++      static const int probe[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1};
++      struct i2c_client c; char buf; int i,rc;
++
++      if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) {
++              memset(&c,0,sizeof(c));
++              c.adapter = adap;
++              for (i = 0; -1 != probe[i]; i++) {
++                      c.addr = probe[i];
++                      rc = i2c_master_recv(&c,&buf,1);
++                      dprintk("lirc_i2c: probe 0x%02x @ %s: %s\n",
++                              probe[i], adap->name, 
++                              (1 == rc) ? "yes" : "no");
++                      if (1 == rc)
++                      {
++                              ir_attach(adap,probe[i],0,0);
++                      }
++              }
++      }
++
++      /* Asus TV-Box and Creative/VisionTek BreakOut-Box (PCF8574) */
++      else if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_RIVA)) {
++              /* addresses to probe;
++                 leave 0x24 and 0x25 because SAA7113H possibly uses it 
++                 0x21 and 0x22 possibly used by SAA7108E 
++                 Asus:      0x21 is a correct address (channel 1 of PCF8574)
++                 Creative:  0x23 is a correct address (channel 3 of PCF8574)
++                 VisionTek: 0x23 is a correct address (channel 3 of PCF8574)
++              */
++              static const int pcf_probe[] = { 0x20, 0x21, 0x22, 0x23,
++                                               0x24, 0x25, 0x26, 0x27, -1 };
++              int ret1, ret2, ret3, ret4;
++              unsigned char bits = 0, flag = 0;
++
++              memset(&c,0,sizeof(c));
++              c.adapter = adap;
++              for (i = 0; -1 != pcf_probe[i]; i++) {
++                      c.addr = pcf_probe[i];
++                      ret1 = i2c_smbus_write_byte(&c, 0xff);
++                      ret2 = i2c_smbus_read_byte(&c);
++                      ret3 = i2c_smbus_write_byte(&c, 0x00);
++                      ret4 = i2c_smbus_read_byte(&c);
++
++                      /* ensure that the writable bitmask works correctly */
++                      rc = 0;
++                      if (ret1 != -1 && ret2 != -1 && 
++                          ret3 != -1 && ret4 != -1) {
++                              /* in the Asus TV-Box: bit 1-0 */
++                              if (((ret2 & 0x03) == 0x03) && 
++                                  ((ret4 & 0x03) == 0x00)) {
++                                      bits = (unsigned char) ~0x07;
++                                      flag = 0x04;
++                                      rc = 1;
++                              }
++                              /* in the Creative/VisionTek BreakOut-Box: bit 7-6 */
++                              if (((ret2 & 0xc0) == 0xc0) && 
++                                  ((ret4 & 0xc0) == 0x00)) {
++                                      bits = (unsigned char) ~0xe0;
++                                      flag = 0x20;
++                                      rc = 1;
++                              }
++                      }
++                      dprintk(DEVICE_NAME ": probe 0x%02x @ %s: %s\n",
++                              c.addr, adap->name, rc ? "yes" : "no");
++                      if (rc)
++                              ir_attach(adap,pcf_probe[i],bits|(flag<<8),0);
++              }
++      }
++              
++      return 0;
++}
++
++static int ir_command(struct i2c_client *client,unsigned int cmd, void *arg)
++{
++      /* nothing */
++      return 0;
++}
++
++/* ----------------------------------------------------------------------- */
++#ifdef MODULE
++MODULE_AUTHOR("Gerd Knorr, Michal Kochanowicz, Christoph Bartelmus, Ulrich Mueller, Stefan Jahn");
++MODULE_DESCRIPTION("Infrared receiver driver for Hauppauge and Pixelview cards (i2c stack)");
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("GPL");
++#endif
++#endif
++
++
++#ifdef MODULE
++int init_module(void)
++#else
++int lirc_i2c_init(void)
++#endif
++{
++      request_module("bttv");
++      request_module("rivatv");
++      i2c_add_driver(&driver);
++      return 0;
++}
++
++#ifdef MODULE
++void cleanup_module(void)
++{
++      i2c_del_driver(&driver);
++}
++#endif
++
++/*
++ * Overrides for Emacs so that we follow Linus's tabbing style.
++ * ---------------------------------------------------------------------------
++ * Local variables:
++ * c-basic-offset: 8
++ * End:
++ */
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_it87.c linux-2.6.8-rc4/drivers/char/lirc/lirc_it87.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_it87.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_it87.c      2004-04-27 20:45:31.000000000 +0200
+@@ -0,0 +1,970 @@
++/*
++ * LIRC driver for ITE IT8712/IT8705 CIR port
++ *
++ * Copyright (C) 2001 Hans-Günter Lütke Uphues <hg_lu@web.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
++ * USA
++ *
++ * ITE IT8705 and IT8712(not tested) CIR-port support for lirc based
++ * via cut and paste from lirc_sir.c (C) 2000 Milan Pikula
++ *
++ * Attention: Sendmode only tested with debugging logs 
++ *
++ * 2001/02/27 Christoph Bartelmus <lirc@bartelmus.de> :
++ *   reimplemented read function
++ */
++
++
++#include <linux/version.h>
++#include <linux/module.h>
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++ 
++#include <linux/config.h>
++
++
++#include <linux/sched.h>
++#include <linux/errno.h>
++#include <linux/signal.h>
++#include <linux/fs.h>
++#include <linux/interrupt.h>
++#include <linux/ioport.h>
++#include <linux/kernel.h>
++#include <linux/major.h>
++#include <linux/serial_reg.h>
++#include <linux/time.h>
++#include <linux/string.h>
++#include <linux/types.h>
++#include <linux/wait.h>
++#include <linux/mm.h>
++#include <linux/delay.h>
++#include <linux/poll.h>
++#include <asm/system.h>
++#include <asm/segment.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/fcntl.h>
++
++#include <linux/timer.h>
++
++#include <linux/lirc.h>
++#include "lirc_dev.h"
++#include "kcompat.h"
++
++#include "lirc_it87.h"
++
++static unsigned long it87_bits_in_byte_out = 0;
++static unsigned long it87_send_counter = 0;
++static unsigned char it87_RXEN_mask = IT87_CIR_RCR_RXEN;
++
++#define RBUF_LEN 1024
++#define WBUF_LEN 1024
++
++#define LIRC_DRIVER_NAME "lirc_it87"
++
++/* timeout for sequences in jiffies (=5/100s) */
++/* must be longer than TIME_CONST */
++#define IT87_TIMEOUT  (HZ*5/100)
++
++static int io = IT87_CIR_DEFAULT_IOBASE;
++static int irq = IT87_CIR_DEFAULT_IRQ;
++static unsigned char it87_freq = 38; /* kHz */
++/* receiver demodulator default: off */
++static unsigned char it87_enable_demodulator = 0;
++
++static spinlock_t timer_lock = SPIN_LOCK_UNLOCKED;
++static struct timer_list timerlist;
++/* time of last signal change detected */
++static struct timeval last_tv = {0, 0};
++/* time of last UART data ready interrupt */
++static struct timeval last_intr_tv = {0, 0};
++static int last_value = 0;
++
++static DECLARE_WAIT_QUEUE_HEAD(lirc_read_queue);
++
++static spinlock_t hardware_lock = SPIN_LOCK_UNLOCKED;
++static spinlock_t dev_lock = SPIN_LOCK_UNLOCKED;
++
++static lirc_t rx_buf[RBUF_LEN]; unsigned int rx_tail = 0, rx_head = 0;
++static lirc_t tx_buf[WBUF_LEN];
++
++/* SECTION: Prototypes */
++
++/* Communication with user-space */
++static int lirc_open(struct inode * inode,
++                   struct file * file);
++static int lirc_close(struct inode * inode,
++                    struct file *file);
++static unsigned int lirc_poll(struct file * file,
++                            poll_table * wait);
++static ssize_t lirc_read(struct file * file,
++                       char * buf,
++                       size_t count,
++                       loff_t * ppos);
++static ssize_t lirc_write(struct file * file,
++                        const char * buf,
++                        size_t n,
++                        loff_t * pos);
++static int lirc_ioctl(struct inode *node,
++                    struct file *filep,
++                    unsigned int cmd,
++                    unsigned long arg);
++static void add_read_queue(int flag,
++                         unsigned long val);
++#ifdef MODULE
++static int init_chrdev(void);
++static void drop_chrdev(void);
++#endif
++      /* Hardware */
++static irqreturn_t it87_interrupt(int irq, void * dev_id,
++                               struct pt_regs * regs);
++static void send_space(unsigned long len);
++static void send_pulse(unsigned long len);
++static void init_send(void);
++static void terminate_send(unsigned long len);
++static int init_hardware(void);
++static void drop_hardware(void);
++      /* Initialisation */
++static int init_port(void);
++static void drop_port(void);
++int init_module(void);
++void cleanup_module(void);
++
++
++/* SECTION: Communication with user-space */
++
++static int lirc_open(struct inode * inode,
++                   struct file * file)
++{
++      spin_lock(&dev_lock);
++      if (MOD_IN_USE) {
++              spin_unlock(&dev_lock);
++              return -EBUSY;
++      }
++      MOD_INC_USE_COUNT;
++      spin_unlock(&dev_lock);
++      return 0;
++}
++
++
++static int lirc_close(struct inode * inode,
++                    struct file *file)
++{
++      MOD_DEC_USE_COUNT;
++      return 0;
++}
++
++
++static unsigned int lirc_poll(struct file * file,
++                            poll_table * wait)
++{
++      poll_wait(file, &lirc_read_queue, wait);
++      if (rx_head != rx_tail)
++              return POLLIN | POLLRDNORM;
++      return 0;
++}
++
++
++static ssize_t lirc_read(struct file * file,
++                       char * buf,
++                       size_t count,
++                       loff_t * ppos)
++{
++      int n=0;
++      int retval=0;
++      
++      while(n<count)
++      {
++              if(file->f_flags & O_NONBLOCK &&
++                 rx_head==rx_tail)
++              {
++                      retval = -EAGAIN;
++                      break;
++              }
++              retval=wait_event_interruptible(lirc_read_queue,
++                                              rx_head!=rx_tail);
++              if(retval)
++              {
++                      break;
++              }
++              
++              retval=verify_area(VERIFY_WRITE,(void *) buf+n,
++                                 sizeof(lirc_t));
++              if (retval)
++              {
++                      return retval;
++              }
++              copy_to_user((void *) buf+n,(void *) (rx_buf+rx_head),
++                           sizeof(lirc_t));
++              rx_head=(rx_head+1)&(RBUF_LEN-1);
++              n+=sizeof(lirc_t);
++      }
++      if(n)
++      {
++              return n;
++      }
++      return retval;
++}
++
++
++static ssize_t lirc_write(struct file * file,
++                        const char * buf,
++                        size_t n,
++                        loff_t * pos)
++{
++      int i;
++      int retval;
++
++        if(n%sizeof(lirc_t) || (n/sizeof(lirc_t)) > WBUF_LEN)
++              return(-EINVAL);
++      retval = verify_area(VERIFY_READ, buf, n);
++      if (retval)
++              return retval;
++      copy_from_user(tx_buf, buf, n);
++      i = 0;
++      n/=sizeof(lirc_t);
++      init_send();
++      while (1) {
++              if (i >= n)
++                      break;
++              if (tx_buf[i])
++                      send_pulse(tx_buf[i]);
++              i++;
++              if (i >= n)
++                      break;
++              if (tx_buf[i])
++                      send_space(tx_buf[i]);
++              i++;
++      }
++      terminate_send(tx_buf[i-1]);
++      return n;
++}
++
++
++static int lirc_ioctl(struct inode *node,
++                    struct file *filep,
++                    unsigned int cmd,
++                    unsigned long arg)
++{
++      int retval = 0;
++      unsigned long value = 0;
++      unsigned int ivalue;
++
++      if (cmd == LIRC_GET_FEATURES)
++              value = LIRC_CAN_SEND_PULSE |
++                      LIRC_CAN_SET_SEND_CARRIER |
++                      LIRC_CAN_REC_MODE2;
++      else if (cmd == LIRC_GET_SEND_MODE)
++              value = LIRC_MODE_PULSE;
++      else if (cmd == LIRC_GET_REC_MODE)
++              value = LIRC_MODE_MODE2;
++      
++      switch (cmd) {
++      case LIRC_GET_FEATURES:
++      case LIRC_GET_SEND_MODE:
++      case LIRC_GET_REC_MODE:
++              retval = put_user(value, (unsigned long *) arg);
++              break;
++
++      case LIRC_SET_SEND_MODE:
++      case LIRC_SET_REC_MODE:
++              retval = get_user(value, (unsigned long *) arg);
++              break;
++
++      case LIRC_SET_SEND_CARRIER:
++              retval=get_user(ivalue,(unsigned int *) arg);
++              if(retval) return(retval);
++              ivalue /= 1000;
++              if (ivalue > IT87_CIR_FREQ_MAX ||
++                  ivalue < IT87_CIR_FREQ_MIN) return(-EINVAL);
++
++              it87_freq = ivalue;
++              {
++                      unsigned long hw_flags;
++
++                      spin_lock_irqsave(&hardware_lock, hw_flags);
++                      outb(((inb(io + IT87_CIR_TCR2) & IT87_CIR_TCR2_TXMPW) |
++                            (it87_freq - IT87_CIR_FREQ_MIN) << 3),
++                           io + IT87_CIR_TCR2);
++                      spin_unlock_irqrestore(&hardware_lock, hw_flags);
++#ifdef DEBUG
++                      printk(KERN_DEBUG LIRC_DRIVER_NAME 
++                             " demodulation frequency: %d kHz\n", it87_freq);
++#endif
++              }
++
++              break;
++
++      default:
++              retval = -ENOIOCTLCMD;
++      }
++      
++      if (retval)
++              return retval;
++      
++      if (cmd == LIRC_SET_REC_MODE) {
++              if (value != LIRC_MODE_MODE2)
++                      retval = -ENOSYS;
++      } else if (cmd == LIRC_SET_SEND_MODE) {
++              if (value != LIRC_MODE_PULSE)
++                      retval = -ENOSYS;
++      }
++      return retval;
++}
++
++static void add_read_queue(int flag,
++                         unsigned long val)
++{
++      unsigned int new_rx_tail;
++      lirc_t newval;
++
++#ifdef DEBUG_SIGNAL
++      printk(KERN_DEBUG LIRC_DRIVER_NAME
++             ": add flag %d with val %lu\n",
++             flag,val);
++#endif
++      
++      newval = val & PULSE_MASK;
++
++      /* statistically pulses are ~TIME_CONST/2 too long: we could
++         maybe make this more exactly but this is good enough */
++      if(flag) /* pulse */ {
++              if(newval>TIME_CONST/2) {
++                      newval-=TIME_CONST/2;
++              }
++              else /* should not ever happen */ {
++                      newval=1;
++              }
++              newval|=PULSE_BIT;
++      }
++      else {
++              newval+=TIME_CONST/2;
++      }
++      new_rx_tail = (rx_tail + 1) & (RBUF_LEN - 1);
++      if (new_rx_tail == rx_head) {
++#ifdef DEBUG
++              printk(KERN_WARNING LIRC_DRIVER_NAME ": Buffer overrun.\n");
++#endif
++              return;
++      }
++      rx_buf[rx_tail] = newval;
++      rx_tail = new_rx_tail;
++      wake_up_interruptible(&lirc_read_queue);
++}
++
++
++static struct file_operations lirc_fops = {
++      read:    lirc_read,
++      write:   lirc_write,
++      poll:    lirc_poll,
++      ioctl:   lirc_ioctl,
++      open:    lirc_open,
++      release: lirc_close,
++};
++
++static int set_use_inc(void* data)
++{
++#if WE_DONT_USE_LOCAL_OPEN_CLOSE
++      MOD_INC_USE_COUNT;
++#endif
++       return 0;
++}
++
++static void set_use_dec(void* data)
++{
++#if WE_DONT_USE_LOCAL_OPEN_CLOSE
++      MOD_DEC_USE_COUNT;
++#endif
++}
++static struct lirc_plugin plugin = {
++       name:           LIRC_DRIVER_NAME,
++       minor:          -1,
++       code_length:    1,
++       sample_rate:    0,
++       data:           NULL,
++       add_to_buf:     NULL,
++       get_queue:      NULL,
++       set_use_inc:    set_use_inc,
++       set_use_dec:    set_use_dec,
++       fops:           &lirc_fops,
++};
++
++
++#ifdef MODULE
++int init_chrdev(void)
++{
++      plugin.minor = lirc_register_plugin(&plugin);
++      
++      if (plugin.minor < 0) {
++              printk(KERN_ERR LIRC_DRIVER_NAME ": init_chrdev() failed.\n");
++              return -EIO;
++      }
++      return 0;
++}
++
++
++static void drop_chrdev(void)
++{
++      lirc_unregister_plugin(plugin.minor);
++}
++#endif
++
++
++/* SECTION: Hardware */
++static long delta(struct timeval * tv1,
++                struct timeval * tv2)
++{
++      unsigned long deltv;
++      
++      deltv = tv2->tv_sec - tv1->tv_sec;
++      if (deltv > 15)
++              deltv = 0xFFFFFF;
++      else
++              deltv = deltv*1000000 +
++                      tv2->tv_usec -
++                      tv1->tv_usec;
++      return deltv;
++}
++
++
++static void it87_timeout(unsigned long data) 
++{
++      /* if last received signal was a pulse, but receiving stopped
++         within the 9 bit frame, we need to finish this pulse and
++         simulate a signal change to from pulse to space. Otherwise
++         upper layers will receive two sequences next time. */
++      
++      unsigned long flags;
++      unsigned long pulse_end;
++      
++      /* avoid interference with interrupt */
++      spin_lock_irqsave(&timer_lock, flags);
++      if (last_value) {
++              /* determine 'virtual' pulse end: */
++              pulse_end = delta(&last_tv, &last_intr_tv);
++#ifdef DEBUG_SIGNAL
++              printk(KERN_DEBUG LIRC_DRIVER_NAME
++                     ": timeout add %d for %lu usec\n",
++                     last_value,
++                     pulse_end);
++#endif
++              add_read_queue(last_value,
++                             pulse_end);
++              last_value = 0;
++              last_tv=last_intr_tv;
++      }
++      spin_unlock_irqrestore(&timer_lock, flags);             
++}
++
++
++static irqreturn_t it87_interrupt(int irq,
++                               void * dev_id,
++                               struct pt_regs * regs)
++{
++      unsigned char data;
++      struct timeval curr_tv;
++      static unsigned long deltv;
++      unsigned long deltintrtv;
++      unsigned long flags, hw_flags;
++      int iir, lsr;
++      int fifo = 0;
++
++      iir = inb(io + IT87_CIR_IIR);
++
++      switch (iir & IT87_CIR_IIR_IID) {
++      case 0x4:
++      case 0x6:
++              lsr = inb(io + IT87_CIR_RSR) & (IT87_CIR_RSR_RXFTO |
++                                                  IT87_CIR_RSR_RXFBC);
++              fifo = lsr & IT87_CIR_RSR_RXFBC;
++#ifdef DEBUG_SIGNAL
++              printk(KERN_DEBUG LIRC_DRIVER_NAME
++                     "iir: 0x%x fifo: 0x%x\n", iir, lsr);
++#endif
++      
++              /* avoid interference with timer */
++              spin_lock_irqsave(&timer_lock, flags);
++              spin_lock_irqsave(&hardware_lock, hw_flags);
++              do {
++                      del_timer(&timerlist);
++                      data = inb(io + IT87_CIR_DR);
++#ifdef DEBUG_SIGNAL
++                      printk(KERN_DEBUG LIRC_DRIVER_NAME
++                             ": data=%.2x\n",
++                             data);
++#endif
++                      do_gettimeofday(&curr_tv);
++                      deltv = delta(&last_tv, &curr_tv);
++                      deltintrtv = delta(&last_intr_tv, &curr_tv);
++#ifdef DEBUG_SIGNAL
++                      printk(KERN_DEBUG LIRC_DRIVER_NAME
++                             ": t %lu , d %d\n",
++                             deltintrtv,
++                             (int)data);
++#endif
++                      /* if nothing came in last 2 cycles,
++                         it was gap */
++                      if (deltintrtv > TIME_CONST * 2) {
++                              if (last_value) {
++#ifdef DEBUG_SIGNAL
++                                      printk(KERN_DEBUG LIRC_DRIVER_NAME ": GAP\n");
++#endif
++                                      /* simulate signal change */
++                                      add_read_queue(last_value,
++                                                     deltv-
++                                                     deltintrtv);
++                                      last_value = 0;
++                                      last_tv.tv_sec = last_intr_tv.tv_sec;
++                                      last_tv.tv_usec = last_intr_tv.tv_usec;
++                                      deltv = deltintrtv;
++                              }
++                      }
++                      data = 1;
++                      if (data ^ last_value) {
++                              /* deltintrtv > 2*TIME_CONST,
++                                 remember ? */
++                              /* the other case is timeout */
++                              add_read_queue(last_value,
++                                             deltv-TIME_CONST);
++                              last_value = data;
++                              last_tv = curr_tv;
++                              if(last_tv.tv_usec>=TIME_CONST) {
++                                      last_tv.tv_usec-=TIME_CONST;
++                              }
++                              else {
++                                      last_tv.tv_sec--;
++                                      last_tv.tv_usec+=1000000-
++                                              TIME_CONST;
++                              }
++                      }
++                      last_intr_tv = curr_tv;
++                      if (data) {
++                              /* start timer for end of sequence detection */
++                              timerlist.expires = jiffies + IT87_TIMEOUT;
++                              add_timer(&timerlist);
++                      }
++                      outb((inb(io + IT87_CIR_RCR) & ~IT87_CIR_RCR_RXEN) |
++                           IT87_CIR_RCR_RXACT,
++                           io + IT87_CIR_RCR);
++                      if (it87_RXEN_mask) {
++                              outb(inb(io + IT87_CIR_RCR) | IT87_CIR_RCR_RXEN, 
++                                   io + IT87_CIR_RCR);
++                      }
++                      fifo--;
++              }
++              while (fifo != 0);
++              spin_unlock_irqrestore(&hardware_lock, hw_flags);
++              spin_unlock_irqrestore(&timer_lock, flags);
++              
++              return IRQ_RETVAL(IRQ_HANDLED);
++
++      default:
++              /* not our irq */
++#ifdef DEBUG_SIGNAL
++              printk(KERN_DEBUG LIRC_DRIVER_NAME
++                     "unknown IRQ (shouldn't happen) !!\n");
++#endif
++              return IRQ_RETVAL(IRQ_NONE);
++      }
++}
++
++
++static void send_it87(unsigned long len,
++                    unsigned long stime,
++                    unsigned char send_byte,
++                    unsigned int count_bits)
++{
++        long count = len / stime;
++      long time_left = 0;
++      static unsigned char byte_out = 0;
++
++#ifdef DEBUG_SIGNAL
++      printk(KERN_DEBUG LIRC_DRIVER_NAME
++             "send_it87: len=%ld, sb=%d\n",
++             len,
++             send_byte);
++#endif
++      time_left = (long)len - (long)count * (long)stime;
++      count += ((2 * time_left) / stime);
++      while (count) {
++              long i=0;
++              for (i=0; i<count_bits; i++) {
++                      byte_out = (byte_out << 1) | (send_byte & 1);
++                      it87_bits_in_byte_out++;
++              }
++              if (it87_bits_in_byte_out == 8) {
++#ifdef DEBUG_SIGNAL
++                      printk(KERN_DEBUG LIRC_DRIVER_NAME
++                             "out=0x%x, tsr_txfbc: 0x%x\n",
++                             byte_out,
++                             inb(io + IT87_CIR_TSR) &
++                             IT87_CIR_TSR_TXFBC);
++#endif
++                      while ((inb(io + IT87_CIR_TSR) &
++                              IT87_CIR_TSR_TXFBC) >= IT87_CIR_FIFO_SIZE);
++                      {
++                              unsigned long hw_flags;
++
++                              spin_lock_irqsave(&hardware_lock, hw_flags);
++                              outb(byte_out, io + IT87_CIR_DR);
++                              spin_unlock_irqrestore(&hardware_lock, hw_flags);
++                      }
++                      it87_bits_in_byte_out = 0;
++                      it87_send_counter++;
++                      byte_out = 0;
++              }
++              count--;
++      }
++}
++
++
++/*
++maybe: exchange space and pulse because
++it8705 only modulates 0-bits
++*/
++
++
++static void send_space(unsigned long len)
++{
++      send_it87(len,
++                TIME_CONST,
++                IT87_CIR_SPACE,
++                IT87_CIR_BAUDRATE_DIVISOR);
++}
++
++static void send_pulse(unsigned long len)
++{
++      send_it87(len,
++                TIME_CONST,
++                IT87_CIR_PULSE,
++                IT87_CIR_BAUDRATE_DIVISOR);
++}
++
++
++static void init_send()
++{
++      unsigned long flags;
++
++      spin_lock_irqsave(&hardware_lock, flags);
++      /* RXEN=0: receiver disable */
++      it87_RXEN_mask = 0;
++      outb(inb(io + IT87_CIR_RCR) & ~IT87_CIR_RCR_RXEN,
++           io + IT87_CIR_RCR);
++      spin_unlock_irqrestore(&hardware_lock, flags);
++      it87_bits_in_byte_out = 0;
++      it87_send_counter = 0;
++}
++
++
++static void terminate_send(unsigned long len)
++{
++      unsigned long flags;
++      unsigned long last = 0;
++
++      last = it87_send_counter;
++      /* make sure all necessary data has been sent */
++      while (last == it87_send_counter)
++              send_space(len);
++      /* wait until all data sent */
++      while ((inb(io + IT87_CIR_TSR) & IT87_CIR_TSR_TXFBC) != 0);
++      /* then reenable receiver */
++      spin_lock_irqsave(&hardware_lock, flags);
++      it87_RXEN_mask = IT87_CIR_RCR_RXEN;
++      outb(inb(io + IT87_CIR_RCR) | IT87_CIR_RCR_RXEN,
++           io + IT87_CIR_RCR);
++      spin_unlock_irqrestore(&hardware_lock, flags);
++}
++
++
++static int init_hardware(void)
++{
++      unsigned long flags;
++      unsigned char it87_rcr = 0;
++      
++      spin_lock_irqsave(&hardware_lock, flags);
++      /* init cir-port */
++      /* enable r/w-access to Baudrate-Register */
++      outb(IT87_CIR_IER_BR, io + IT87_CIR_IER);
++      outb(IT87_CIR_BAUDRATE_DIVISOR % 0x100, io+IT87_CIR_BDLR);
++      outb(IT87_CIR_BAUDRATE_DIVISOR / 0x100, io+IT87_CIR_BDHR);
++      /* Baudrate Register off, define IRQs: Input only */
++      outb(IT87_CIR_IER_IEC | IT87_CIR_IER_RDAIE, io + IT87_CIR_IER);
++      /* RX: HCFS=0, RXDCR = 001b (35,6..40,3 kHz), RXEN=1 */
++      it87_rcr = (IT87_CIR_RCR_RXEN & it87_RXEN_mask) | 0x1;
++      if (it87_enable_demodulator)
++              it87_rcr |= IT87_CIR_RCR_RXEND;
++      outb(it87_rcr, io + IT87_CIR_RCR);
++      /* TX: 38kHz, 13,3us (pulse-width */
++      outb(((it87_freq - IT87_CIR_FREQ_MIN) << 3) | 0x06,
++           io + IT87_CIR_TCR2);
++      spin_unlock_irqrestore(&hardware_lock, flags);
++      return 0;
++}
++
++
++static void drop_hardware(void)
++{
++      unsigned long flags;
++      
++      spin_lock_irqsave(&hardware_lock, flags);
++      disable_irq(irq);
++      /* receiver disable */
++      it87_RXEN_mask = 0;
++      outb(0x1, io + IT87_CIR_RCR);
++      /* turn off irqs */
++      outb(0, io + IT87_CIR_IER);
++      /* fifo clear */
++        outb(IT87_CIR_TCR1_FIFOCLR, io+IT87_CIR_TCR1);
++        /* reset */
++        outb(IT87_CIR_IER_RESET, io+IT87_CIR_IER);
++      enable_irq(irq);
++      spin_unlock_irqrestore(&hardware_lock, flags);
++}
++
++
++static unsigned char it87_read(unsigned char port)
++{
++      outb(port, IT87_ADRPORT);
++      return inb(IT87_DATAPORT);
++}
++
++
++static void it87_write(unsigned char port,
++                     unsigned char data)
++{
++      outb(port, IT87_ADRPORT);
++      outb(data, IT87_DATAPORT);
++}
++
++
++/* SECTION: Initialisation */
++
++static int init_port(void)
++{
++      int retval = 0;
++      
++      unsigned char init_bytes[4] = {IT87_INIT};
++      unsigned char it87_chipid = 0;
++      unsigned char ldn = 0;
++      unsigned int  it87_io = 0;
++      unsigned int  it87_irq = 0;
++      
++      /* Enter MB PnP Mode */
++      outb(init_bytes[0], IT87_ADRPORT);
++      outb(init_bytes[1], IT87_ADRPORT);
++      outb(init_bytes[2], IT87_ADRPORT);
++      outb(init_bytes[3], IT87_ADRPORT);
++      
++      /* 8712 or 8705 ? */
++      it87_chipid = it87_read(IT87_CHIP_ID1);
++      if (it87_chipid != 0x87) {
++              retval = -ENXIO;
++              return retval;
++      }
++      it87_chipid = it87_read(IT87_CHIP_ID2);
++      if ((it87_chipid != 0x12) && (it87_chipid != 0x05)) {
++              printk(KERN_INFO LIRC_DRIVER_NAME
++                     ": no IT8705/12 found, exiting..\n");
++              retval = -ENXIO;
++              return retval;
++      }
++      printk(KERN_INFO LIRC_DRIVER_NAME
++             ": found IT87%.2x.\n",
++             it87_chipid);
++
++      /* get I/O-Port and IRQ */
++      if (it87_chipid == 0x12)
++              ldn = IT8712_CIR_LDN;
++      else
++              ldn = IT8705_CIR_LDN;
++      it87_write(IT87_LDN, ldn);
++      
++      it87_io = it87_read(IT87_CIR_BASE_MSB) * 256 +
++              it87_read(IT87_CIR_BASE_LSB);
++      if (it87_io == 0) {
++              if (io == 0)
++                      io = IT87_CIR_DEFAULT_IOBASE;
++              printk(KERN_INFO LIRC_DRIVER_NAME
++                     ": set default io 0x%x\n",
++                     io);
++              it87_write(IT87_CIR_BASE_MSB, io / 0x100);
++              it87_write(IT87_CIR_BASE_LSB, io % 0x100);
++      }
++      else
++              io = it87_io;
++      
++      it87_irq = it87_read(IT87_CIR_IRQ);
++      if (it87_irq == 0) {
++              if (irq == 0)
++                      irq = IT87_CIR_DEFAULT_IRQ;
++              printk(KERN_INFO LIRC_DRIVER_NAME
++                     ": set default irq 0x%x\n",
++                     irq);
++              it87_write(IT87_CIR_IRQ, irq);
++      }
++      else
++              irq = it87_irq;
++      
++      {
++              unsigned long hw_flags;
++
++              spin_lock_irqsave(&hardware_lock, hw_flags);
++              /* reset */
++              outb(IT87_CIR_IER_RESET, io+IT87_CIR_IER);
++              /* fifo clear */
++              outb(IT87_CIR_TCR1_FIFOCLR |
++                   /*      IT87_CIR_TCR1_ILE | */
++                   IT87_CIR_TCR1_TXRLE |
++                   IT87_CIR_TCR1_TXENDF, io+IT87_CIR_TCR1);
++              spin_unlock_irqrestore(&hardware_lock, hw_flags);
++      }
++      
++      /* get I/O port access and IRQ line */
++      retval = check_region(io, 8);
++      if (retval < 0) {
++              printk(KERN_ERR LIRC_DRIVER_NAME
++                     ": i/o port 0x%.4x already in use.\n",
++                     io);
++              /* Leaving MB PnP Mode */
++              it87_write(IT87_CFGCTRL, 0x2);
++              return retval;
++      }
++
++      /* activate CIR-Device */
++      it87_write(IT87_CIR_ACT, 0x1);
++
++      /* Leaving MB PnP Mode */
++      it87_write(IT87_CFGCTRL, 0x2);
++
++      retval = request_irq(irq, it87_interrupt, 0 /*SA_INTERRUPT*/,
++                           LIRC_DRIVER_NAME, NULL);
++      if (retval < 0) {
++              printk(KERN_ERR LIRC_DRIVER_NAME
++                     ": IRQ %d already in use.\n",
++                     irq);
++              return retval;
++      }
++
++      request_region(io, 8, LIRC_DRIVER_NAME);
++      printk(KERN_INFO LIRC_DRIVER_NAME
++             ": I/O port 0x%.4x, IRQ %d.\n",
++             io,
++             irq);
++
++      init_timer(&timerlist);
++      timerlist.function = it87_timeout;
++      timerlist.data = 0xabadcafe;
++      
++      return 0;
++}
++
++
++static void drop_port(void)
++{
++/*
++        unsigned char init_bytes[4] = {IT87_INIT};
++ 
++        / * Enter MB PnP Mode * /
++        outb(init_bytes[0], IT87_ADRPORT);
++        outb(init_bytes[1], IT87_ADRPORT);
++        outb(init_bytes[2], IT87_ADRPORT);
++        outb(init_bytes[3], IT87_ADRPORT);
++
++        / * deactivate CIR-Device * /
++        it87_write(IT87_CIR_ACT, 0x0);
++
++        / * Leaving MB PnP Mode * /
++        it87_write(IT87_CFGCTRL, 0x2);
++*/
++
++      del_timer_sync(&timerlist);
++      free_irq(irq, NULL);
++      release_region(io, 8);
++}
++
++
++int init_lirc_it87(void)
++{
++      int retval;
++      
++      init_waitqueue_head(&lirc_read_queue);
++      retval = init_port();
++      if (retval < 0)
++              return retval;
++      init_hardware();
++      printk(KERN_INFO LIRC_DRIVER_NAME
++             ": Installed.\n");
++      return 0;
++}
++
++
++#ifdef MODULE
++
++MODULE_AUTHOR("Hans-Günter Lütke Uphues");
++MODULE_DESCRIPTION("LIRC driver for ITE IT8712/IT8705 CIR port");
++MODULE_PARM(io, "i");
++MODULE_PARM_DESC(io,
++               "I/O base address (default: 0x310)");
++MODULE_PARM(irq, "i");
++MODULE_PARM_DESC(irq,
++               "Interrupt (1,3-12) (default: 7)");
++MODULE_PARM(it87_enable_demodulator, "i");
++MODULE_PARM_DESC(it87_enable_demodulator,
++               "Receiver demodulator enable/disable (1/0), default: 0");
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("GPL");
++#endif
++
++#ifndef KERNEL_2_5
++EXPORT_NO_SYMBOLS;
++#endif
++
++
++int init_module(void)
++{
++      int retval;
++      
++      retval=init_chrdev();
++      if(retval < 0)
++              return retval;
++      retval = init_lirc_it87();
++      if (retval) {
++              drop_chrdev();
++              return retval;
++      }
++      return 0;
++}
++
++
++void cleanup_module(void)
++{
++      drop_hardware();
++      drop_chrdev();
++      drop_port();
++      printk(KERN_INFO LIRC_DRIVER_NAME ": Uninstalled.\n");
++}
++#endif
++
++
++/*
++ * Overrides for Emacs so that we follow Linus's tabbing style.
++ * ---------------------------------------------------------------------------
++ * Local variables:
++ * c-basic-offset: 8
++ * End:
++ */
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_it87.h linux-2.6.8-rc4/drivers/char/lirc/lirc_it87.h
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_it87.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_it87.h      2001-11-15 11:50:19.000000000 +0100
+@@ -0,0 +1,116 @@
++/* lirc_it87.h */
++/* SECTION: Definitions */
++
++/********************************* ITE IT87xx ************************/
++
++/* based on the following documentation from ITE:
++   a) IT8712F Preliminary CIR Programming Guide V0.1
++   b) IT8705F Simple LPC I/O Preliminary Specifiction V0.3
++   c) IT8712F EC-LPC I/O Preliminary Specification V0.5
++*/
++
++/* IT8712/05 Ports: */
++#define IT87_ADRPORT      0x2e
++#define IT87_DATAPORT     0x2f
++#define IT87_INIT         0x87, 0x01, 0x55, 0x55
++
++/* alternate Ports: */
++/*
++#define IT87_ADRPORT      0x4e
++#define IT87_DATAPORT     0x4f
++#define IT87_INIT         0x87, 0x01, 0x55, 0xaa
++ */
++
++/* IT8712/05 Registers */
++#define IT87_CFGCTRL      0x2
++#define IT87_LDN          0x7
++#define IT87_CHIP_ID1     0x20
++#define IT87_CHIP_ID2     0x21
++#define IT87_CFG_VERSION  0x22
++#define IT87_SWSUSPEND    0x23
++
++#define IT8712_CIR_LDN    0xa
++#define IT8705_CIR_LDN    0x7
++
++/* CIR Configuration Registers: */
++#define IT87_CIR_ACT      0x30
++#define IT87_CIR_BASE_MSB 0x60
++#define IT87_CIR_BASE_LSB 0x61
++#define IT87_CIR_IRQ      0x70
++#define IT87_CIR_CONFIG   0xf0
++
++/* List of IT87_CIR registers: offset to BaseAddr */
++#define IT87_CIR_DR   0
++#define IT87_CIR_IER  1
++#define IT87_CIR_RCR  2
++#define IT87_CIR_TCR1 3
++#define IT87_CIR_TCR2 4
++#define IT87_CIR_TSR  5
++#define IT87_CIR_RSR  6
++#define IT87_CIR_BDLR 5
++#define IT87_CIR_BDHR 6
++#define IT87_CIR_IIR  7
++
++/* Bit Definitionen */
++/* IER: */
++#define IT87_CIR_IER_TM_EN   0x80
++#define IT87_CIR_IER_RESEVED 0x40
++#define IT87_CIR_IER_RESET   0x20
++#define IT87_CIR_IER_BR      0x10
++#define IT87_CIR_IER_IEC     0x8
++#define IT87_CIR_IER_RFOIE   0x4
++#define IT87_CIR_IER_RDAIE   0x2
++#define IT87_CIR_IER_TLDLIE  0x1
++
++/* RCR: */
++#define IT87_CIR_RCR_RDWOS  0x80
++#define IT87_CIR_RCR_HCFS   0x40
++#define IT87_CIR_RCR_RXEN   0x20
++#define IT87_CIR_RCR_RXEND  0x10
++#define IT87_CIR_RCR_RXACT  0x8
++#define IT87_CIR_RCR_RXDCR  0x7
++
++/* TCR1: */
++#define IT87_CIR_TCR1_FIFOCLR 0x80
++#define IT87_CIR_TCR1_ILE     0x40
++#define IT87_CIR_TCR1_FIFOTL  0x30
++#define IT87_CIR_TCR1_TXRLE   0x8
++#define IT87_CIR_TCR1_TXENDF  0x4
++#define IT87_CIR_TCR1_TXMPM   0x3
++
++/* TCR2: */
++#define IT87_CIR_TCR2_CFQ   0xf8
++#define IT87_CIR_TCR2_TXMPW 0x7
++
++/* TSR: */
++#define IT87_CIR_TSR_RESERVED 0xc0
++#define IT87_CIR_TSR_TXFBC    0x3f
++
++/* RSR: */
++#define IT87_CIR_RSR_RXFTO    0x80
++#define IT87_CIR_RSR_RESERVED 0x40
++#define IT87_CIR_RSR_RXFBC    0x3f
++
++/* IIR: */
++#define IT87_CIR_IIR_RESERVED 0xf8
++#define IT87_CIR_IIR_IID      0x6
++#define IT87_CIR_IIR_IIP      0x1
++
++/* TM: */
++#define IT87_CIR_TM_IL_SEL    0x80
++#define IT87_CIR_TM_RESERVED  0x40
++#define IT87_CIR_TM_TM_REG    0x3f
++
++#define IT87_CIR_FIFO_SIZE 32
++
++/* Baudratedivisor for IT87: power of 2: only 1,2,4 or 8) */
++#define IT87_CIR_BAUDRATE_DIVISOR 0x1
++#define IT87_CIR_DEFAULT_IOBASE 0x310
++#define IT87_CIR_DEFAULT_IRQ    0x7
++#define IT87_CIR_SPACE 0x00
++#define IT87_CIR_PULSE 0xff
++#define IT87_CIR_FREQ_MIN 27
++#define IT87_CIR_FREQ_MAX 58
++#define TIME_CONST (IT87_CIR_BAUDRATE_DIVISOR * 8000000ul / 115200ul)
++
++/********************************* ITE IT87xx ************************/
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_mceusb.c linux-2.6.8-rc4/drivers/char/lirc/lirc_mceusb.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_mceusb.c       1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_mceusb.c    2004-07-25 18:27:33.000000000 +0200
+@@ -0,0 +1,1026 @@
++/*
++ * USB Microsoft IR Transceiver driver - 0.2
++ *
++ * Copyright (c) 2003-2004 Dan Conti (dconti@acm.wwu.edu)
++ *
++ * This driver is based on the USB skeleton driver packaged with the
++ * kernel, and the notice from that package has been retained below.
++ *
++ * The Microsoft IR Transceiver is a neat little IR receiver with two
++ * emitters on it designed for Windows Media Center. This driver might
++ * work for all media center remotes, but I have only tested it with
++ * the philips model. The first revision of this driver only supports
++ * the receive function - the transmit function will be much more
++ * tricky due to the nature of the hardware. Microsoft chose to build
++ * this device inexpensively, therefore making it extra dumb.
++ * There is no interrupt endpoint on this device; all usb traffic
++ * happens over two bulk endpoints. As a result of this, poll() for
++ * this device is an actual hardware poll (instead of a receive queue
++ * check) and is rather expensive.
++ *
++ * All trademarks property of their respective owners. This driver was
++ * originally based on the USB skeleton driver, although significant
++ * portions of that code have been removed as the driver has evolved.
++ *
++ * 2003_11_11 - Restructured to minimalize code interpretation in the
++ *              driver. The normal use case will be with lirc.
++ *
++ * 2004_01_01 - Removed all code interpretation. Generate mode2 data
++ *              for passing off to lirc. Cleanup
++ *
++ * 2004_01_04 - Removed devfs handle. Put in a temporary workaround
++ *              for a known issue where repeats generate two
++ *              sequential spaces (last_was_repeat_gap)
++ *
++ * 2004_02_17 - Changed top level api to no longer use fops, and
++ *              instead use new interface for polling via
++ *              lirc_thread. Restructure data read/mode2 generation to
++ *              a single pass, reducing number of buffers. Rev to .2
++ *
++ * 2004_02_27 - Last of fixups to plugin->add_to_buf API. Properly
++ *              handle broken fragments from the receiver. Up the
++ *              sample rate and remove any pacing from
++ *              fetch_more_data. Fixes all known issues.
++ * 
++ * TODO
++ *   - Fix up minor number, registration of major/minor with usb subsystem
++ *
++ */
++/*
++ * USB Skeleton driver - 1.1
++ *
++ * Copyright (C) 2001-2003 Greg Kroah-Hartman (greg@kroah.com)
++ *
++ *    This program is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU General Public License as
++ *    published by the Free Software Foundation, version 2.
++ *
++ *
++ * This driver is to be used as a skeleton driver to be able to create a
++ * USB driver quickly.  The design of it is based on the usb-serial and
++ * dc2xx drivers.
++ *
++ * Thanks to Oliver Neukum, David Brownell, and Alan Stern for their help
++ * in debugging this driver.
++ *
++ *
++ * History:
++ *
++ * 2003-05-06 - 1.1 - changes due to usb core changes with usb_register_dev()
++ * 2003-02-25 - 1.0 - fix races involving urb->status, unlink_urb(), and
++ *                    disconnect.  Fix transfer amount in read().  Use
++ *                    macros instead of magic numbers in probe().  Change
++ *                    size variables to size_t.  Show how to eliminate
++ *                    DMA bounce buffer.
++ * 2002_12_12 - 0.9 - compile fixes and got rid of fixed minor array.
++ * 2002_09_26 - 0.8 - changes due to USB core conversion to struct device
++ *                    driver.
++ * 2002_02_12 - 0.7 - zero out dev in probe function for devices that do
++ *                    not have both a bulk in and bulk out endpoint.
++ *                    Thanks to Holger Waechtler for the fix.
++ * 2001_11_05 - 0.6 - fix minor locking problem in skel_disconnect.
++ *                    Thanks to Pete Zaitcev for the fix.
++ * 2001_09_04 - 0.5 - fix devfs bug in skel_disconnect. Thanks to wim delvaux
++ * 2001_08_21 - 0.4 - more small bug fixes.
++ * 2001_05_29 - 0.3 - more bug fixes based on review from linux-usb-devel
++ * 2001_05_24 - 0.2 - bug fixes based on review from linux-usb-devel people
++ * 2001_05_01 - 0.1 - first version
++ *
++ */
++
++#include <linux/config.h>
++#include <linux/kernel.h>
++#include <linux/errno.h>
++#include <linux/init.h>
++#include <linux/slab.h>
++#include <linux/module.h>
++#include <linux/smp_lock.h>
++#include <linux/usb.h>
++#ifdef KERNEL_2_5
++#include <linux/completion.h>
++#include <asm/uaccess.h>
++#else
++#include <linux/spinlock.h>
++#include <linux/list.h>
++#include <linux/fcntl.h>
++#include <linux/poll.h>
++#include <linux/sched.h>
++#include <linux/signal.h>
++#endif
++
++#ifdef CONFIG_USB_DEBUG
++      static int debug = 1;
++#else
++      static int debug;
++#endif
++
++#include <linux/lirc.h>
++#include "kcompat.h"
++#include "lirc_dev.h"
++
++
++/* Use our own dbg macro */
++#undef dbg
++#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg); } while (0)
++
++/* Version Information */
++#define DRIVER_VERSION "v0.2"
++#define DRIVER_AUTHOR "Dan Conti, dconti@acm.wwu.edu"
++#define DRIVER_DESC "USB Microsoft IR Transceiver Driver"
++#define DRIVER_NAME "lirc_mceusb"
++
++/* Module paramaters */
++MODULE_PARM(debug, "i");
++MODULE_PARM_DESC(debug, "Debug enabled or not");
++
++/* Define these values to match your device */
++#define USB_MCEUSB_VENDOR_ID  0x045e
++#define USB_MCEUSB_PRODUCT_ID 0x006d
++
++/* table of devices that work with this driver */
++static struct usb_device_id mceusb_table [] = {
++      { USB_DEVICE(USB_MCEUSB_VENDOR_ID, USB_MCEUSB_PRODUCT_ID) },
++      { }                                     /* Terminating entry */
++};
++
++MODULE_DEVICE_TABLE (usb, mceusb_table);
++
++/* we can have up to this number of device plugged in at once */
++#define MAX_DEVICES           16
++
++/* Structure to hold all of our device specific stuff */
++struct usb_skel {
++      struct usb_device *         udev;               /* save off the usb device pointer */
++      struct usb_interface *  interface;              /* the interface for this device */
++      unsigned char   minor;                          /* the starting minor number for this device */
++      unsigned char   num_ports;                      /* the number of ports this device has */
++      char            num_interrupt_in;               /* number of interrupt in endpoints we have */
++      char            num_bulk_in;                    /* number of bulk in endpoints we have */
++      char            num_bulk_out;                   /* number of bulk out endpoints we have */
++
++      unsigned char *    bulk_in_buffer;              /* the buffer to receive data */
++      int                bulk_in_size;                /* the size of the receive buffer */
++      __u8               bulk_in_endpointAddr;        /* the address of the bulk in endpoint */
++
++      unsigned char *    bulk_out_buffer;             /* the buffer to send data */
++      int                    bulk_out_size;           /* the size of the send buffer */
++      struct urb *       write_urb;                   /* the urb used to send data */
++      __u8               bulk_out_endpointAddr;       /* the address of the bulk out endpoint */
++
++      atomic_t                write_busy;             /* true iff write urb is busy */
++      struct completion       write_finished;         /* wait for the write to finish */
++      
++      wait_queue_head_t  wait_q;                      /* for timeouts */
++      int                open_count;                  /* number of times this port has been opened */
++      struct semaphore   sem;                         /* locks this structure */
++      
++      int                     present;                /* if the device is not disconnected */         
++
++      struct lirc_plugin* plugin;
++      
++      lirc_t lircdata[256];                           /* place to store values until lirc processes them */
++      int    lircidx;                                 /* current index */
++      int    lirccnt;                                 /* remaining values */
++      
++      int    usb_valid_bytes_in_bulk_buffer;          /* leftover data from a previous read */
++      int    mce_bytes_left_in_packet;                /* for packets split across multiple reads */
++      
++      /* Value to hold the last received space; 0 if last value
++       * received was a pulse
++       */
++      int    last_space;
++      
++#ifdef KERNEL_2_5
++      dma_addr_t dma_in;
++      dma_addr_t dma_out;
++#endif
++};
++
++#define MCE_TIME_UNIT 50
++
++/* driver api */
++#ifdef KERNEL_2_5
++static int mceusb_probe               (struct usb_interface *interface, const struct usb_device_id *id);
++static void mceusb_disconnect (struct usb_interface *interface);
++static void mceusb_write_bulk_callback        (struct urb *urb, struct pt_regs *regs);
++#else
++static void * mceusb_probe    (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id);
++static void mceusb_disconnect (struct usb_device *dev, void *ptr);
++static void mceusb_write_bulk_callback        (struct urb *urb);
++#endif
++
++/* read data from the usb bus; convert to mode2 */
++static int msir_fetch_more_data( struct usb_skel* dev, int dont_block );
++
++/* helper functions */
++static void msir_cleanup( struct usb_skel* dev );
++static void set_use_dec( void* data );
++static int set_use_inc( void* data );
++    
++/* array of pointers to our devices that are currently connected */
++static struct usb_skel                *minor_table[MAX_DEVICES];
++
++/* lock to protect the minor_table structure */
++static DECLARE_MUTEX (minor_table_mutex);
++static void mceusb_setup( struct usb_device *udev );
++
++/* usb specific object needed to register this driver with the usb subsystem */
++static struct usb_driver mceusb_driver = {
++      .owner =        THIS_MODULE,
++      .name =         DRIVER_NAME,
++      .probe =        mceusb_probe,
++      .disconnect =   mceusb_disconnect,
++      .id_table =     mceusb_table,
++};
++
++
++/**
++ *    usb_mceusb_debug_data
++ */
++static inline void usb_mceusb_debug_data (const char *function, int size,
++                                        const unsigned char *data)
++{
++      int i;
++
++      if (!debug)
++              return;
++      
++      printk (KERN_DEBUG __FILE__": %s - length = %d, data = ", 
++              function, size);
++      for (i = 0; i < size; ++i) {
++              printk ("%.2x ", data[i]);
++      }
++      printk ("\n");
++}
++
++/**
++ *mceusb_delete
++ */
++static inline void mceusb_delete (struct usb_skel *dev)
++{
++      dbg("%s",__func__);
++      minor_table[dev->minor] = NULL;
++#ifdef KERNEL_2_5
++      usb_buffer_free(dev->udev, dev->bulk_in_size, dev->bulk_in_buffer, dev->dma_in);
++      usb_buffer_free(dev->udev, dev->bulk_out_size, dev->bulk_out_buffer, dev->dma_out);
++#else
++      if (dev->bulk_in_buffer != NULL)
++              kfree (dev->bulk_in_buffer);
++      if (dev->bulk_out_buffer != NULL)
++              kfree (dev->bulk_out_buffer);
++#endif
++      if (dev->write_urb != NULL)
++              usb_free_urb (dev->write_urb);
++      kfree (dev);
++}
++
++static void mceusb_setup( struct usb_device *udev )
++{
++      char data[8];
++      int res;
++      
++      memset( data, 0, 8 );
++
++      /* Get Status */
++      res = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
++                            USB_REQ_GET_STATUS, USB_DIR_IN,
++                            0, 0, data, 2, HZ * 3);
++    
++      /*    res = usb_get_status( udev, 0, 0, data ); */
++      dbg("%s - res = %d status = 0x%x 0x%x",__func__,res,data[0],data[1]);
++    
++      /* This is a strange one. They issue a set address to the device
++       * on the receive control pipe and expect a certain value pair back
++       */
++      memset( data, 0, 8 );
++
++      res = usb_control_msg( udev, usb_rcvctrlpipe(udev, 0),
++                             5, USB_TYPE_VENDOR, 0, 0,
++                             data, 2, HZ * 3 );
++      dbg("%s - res = %d, devnum = %d", __func__, res, udev->devnum);
++      dbg("%s - data[0] = %d, data[1] = %d", __func__, data[0], data[1] );
++
++    
++      /* set feature */
++      res = usb_control_msg( udev, usb_sndctrlpipe(udev, 0),
++                             USB_REQ_SET_FEATURE, USB_TYPE_VENDOR,
++                             0xc04e, 0x0000, NULL, 0, HZ * 3 );
++    
++      dbg("%s - res = %d", __func__, res);
++
++      /* These two are sent by the windows driver, but stall for
++       * me. I dont have an analyzer on the linux side so i can't
++       * see what is actually different and why the device takes
++       * issue with them
++       */
++#if 0
++      /* this is some custom control message they send */
++      res = usb_control_msg( udev, usb_sndctrlpipe(udev, 0),
++                             0x04, USB_TYPE_VENDOR,
++                             0x0808, 0x0000, NULL, 0, HZ * 3 );
++    
++      dbg("%s - res = %d", __func__, res);
++    
++      /* this is another custom control message they send */
++      res = usb_control_msg( udev, usb_sndctrlpipe(udev, 0),
++                             0x02, USB_TYPE_VENDOR,
++                             0x0000, 0x0100, NULL, 0, HZ * 3 );
++    
++      dbg("%s - res = %d", __func__, res);
++#endif
++}
++
++static void msir_cleanup( struct usb_skel* dev )
++{
++      memset( dev->bulk_in_buffer, 0, dev->bulk_in_size );
++
++      dev->usb_valid_bytes_in_bulk_buffer = 0;
++
++      dev->last_space = PULSE_MASK;
++    
++      dev->mce_bytes_left_in_packet = 0;
++      dev->lircidx = 0;
++      dev->lirccnt = 0;
++      memset( dev->lircdata, 0, sizeof(dev->lircdata) );
++}
++
++static int set_use_inc(void* data)
++{
++      MOD_INC_USE_COUNT;
++      return 0;
++}
++
++static void set_use_dec(void* data)
++{
++      /* check for unplug here */
++      struct usb_skel* dev = (struct usb_skel*) data;
++      if( !dev->udev )
++      { 
++              lirc_unregister_plugin( dev->minor );
++              lirc_buffer_free( dev->plugin->rbuf );
++              kfree( dev->plugin->rbuf );
++              kfree( dev->plugin );
++      }
++      
++      MOD_DEC_USE_COUNT;
++}
++
++/*
++ * msir_fetch_more_data
++ *
++ * The goal here is to read in more remote codes from the remote. In
++ * the event that the remote isn't sending us anything, the caller
++ * will block until a key is pressed (i.e. this performs phys read,
++ * filtering, and queueing of data) unless dont_block is set to 1; in
++ * this situation, it will perform a few reads and will exit out if it
++ * does not see any appropriate data
++ *
++ * dev->sem should be locked when this function is called - fine grain
++ * locking isn't really important here anyways
++ *
++ * This routine always returns the number of words available
++ *
++ */
++static int msir_fetch_more_data( struct usb_skel* dev, int dont_block )
++{
++      int retries = 0;
++      int words_to_read = 
++              (sizeof(dev->lircdata)/sizeof(lirc_t)) - dev->lirccnt;
++      int partial, this_read = 0;
++      int bulkidx = 0;
++      int bytes_left_in_packet = 0;
++      signed char* signedp = (signed char*)dev->bulk_in_buffer;
++      
++      if( words_to_read == 0 )
++              return dev->lirccnt;
++
++      /* this forces all existing data to be read by lirc before we
++       * issue another usb command. this is the only form of
++       * throttling we have
++       */
++      if( dev->lirccnt )
++      {
++              return dev->lirccnt;
++      }
++
++      /* reserve room for our leading space */
++      if( dev->last_space )
++              words_to_read--;
++              
++      while( words_to_read )
++      {
++              /* handle signals and USB disconnects */
++              if( signal_pending(current) )
++              {
++                      return dev->lirccnt ? dev->lirccnt : -EINTR;
++              }
++              if( !dev->udev )
++              {
++                      return -ENODEV;
++              }
++
++              bulkidx = 0;
++
++              /*
++               * perform data read (phys or from previous buffer)
++               */
++        
++              /* use leftovers if present, otherwise perform a read */
++              if( dev->usb_valid_bytes_in_bulk_buffer )
++              {
++                      this_read = partial = 
++                              dev->usb_valid_bytes_in_bulk_buffer;
++                      dev->usb_valid_bytes_in_bulk_buffer = 0;
++              }
++              else
++              {
++                      int retval;
++            
++                      this_read = dev->bulk_in_size;
++                      partial = 0;
++                      retval = usb_bulk_msg
++                              (dev->udev,
++                               usb_rcvbulkpipe
++                               (dev->udev, dev->bulk_in_endpointAddr),
++                               (unsigned char*)dev->bulk_in_buffer,
++                               this_read, &partial, HZ*10);
++                      
++                      /* retry a few times on overruns; map all
++                         other errors to -EIO */
++                      if( retval )
++                      {
++                              if( retval == -EOVERFLOW && 
++                                  retries < 5 )
++                              {
++                                      retries++;
++                                      interruptible_sleep_on_timeout
++                                              ( &dev->wait_q, HZ );
++                                      continue;
++                              }
++                              else
++                              {
++                                      return -EIO;
++                              }
++                      }
++            
++                      retries = 0;
++                      if( partial )
++                              this_read = partial;
++
++                      /* skip the header */
++                      bulkidx += 2;
++            
++                      /* check for empty reads (header only) */
++                      if( this_read == 2 )
++                      {
++                              /* assume no data */
++                              if( dont_block )
++                              {
++                                      break;
++                              }
++
++                              /* sleep for a bit before performing
++                                 another read */
++                              interruptible_sleep_on_timeout
++                                      ( &dev->wait_q, 1 );
++                              continue;
++                      }
++              }
++
++              /*
++               * process data
++               */
++        
++              /* at this point this_read is > 0 */
++              while( bulkidx < this_read &&
++                     (words_to_read > (dev->last_space ? 1 : 0)) )
++                      //while( bulkidx < this_read && words_to_read )
++              {
++                      int keycode;
++                      int pulse = 0;
++            
++                      /* read packet length if needed */
++                      if( !bytes_left_in_packet )
++                      {
++                              
++                              /* we assume we are on a packet length
++                               * value. it is possible, in some
++                               * cases, to get a packet that does
++                               * not start with a length, apparently
++                               * due to some sort of fragmenting,
++                               * but occaisonally we do not receive
++                               * the second half of a fragment
++                               */
++                              bytes_left_in_packet = 
++                                      128 + signedp[bulkidx++];
++
++                              /* unfortunately rather than keep all
++                               * the data in the packetized format,
++                               * the transceiver sends a trailing 8
++                               * bytes that aren't part of the
++                               * transmittion from the remote,
++                               * aren't packetized, and dont really
++                               * have any value. we can basically
++                               * tell we have hit them if 1) we have
++                               * a loooong space currently stored
++                               * up, and 2) the bytes_left value for
++                               * this packet is obviously wrong
++                               */
++                              if( bytes_left_in_packet > 4  )
++                              {
++                                      if( dev->mce_bytes_left_in_packet )
++                                      {
++                                              bytes_left_in_packet = dev->mce_bytes_left_in_packet;
++                                              bulkidx--;
++                                      }
++                                      bytes_left_in_packet = 0;
++                                      bulkidx = this_read;
++                              }
++
++                              /* always clear this if we have a
++                                 valid packet */
++                              dev->mce_bytes_left_in_packet = 0;
++                    
++                              /* continue here to verify we haven't
++                                 hit the end of the bulk_in */
++                              continue;
++                              
++                      }
++
++                      /*
++                       * generate mode2
++                       */
++            
++                      keycode = signedp[bulkidx++];
++                      if( keycode < 0 )
++                      {
++                              pulse = 1;
++                              keycode += 128;
++                      }
++                      keycode *= MCE_TIME_UNIT;
++
++                      bytes_left_in_packet--;
++            
++                      if( pulse )
++                      {
++                              if( dev->last_space )
++                              {
++                                      dev->lircdata[dev->lirccnt++] =
++                                              dev->last_space;
++                                      dev->last_space = 0;
++                                      words_to_read--;
++
++                                      /* clear the lirc_t for the pulse */
++                                      dev->lircdata[dev->lirccnt] = 0;
++                              }
++                              dev->lircdata[dev->lirccnt] += keycode;
++                              dev->lircdata[dev->lirccnt] |= PULSE_BIT;
++                      }
++                      else
++                      {
++                              /* on pulse->space transition, add one
++                                 for the existing pulse */
++                              if( dev->lircdata[dev->lirccnt] &&
++                                  !dev->last_space )
++                              {
++                                      dev->lirccnt++;
++                                      words_to_read--;
++                              }
++                
++                              dev->last_space += keycode;
++                      }
++              }
++      }
++      
++      /* save off some info if we are exiting mid-packet, or with
++         leftovers */
++      if( bytes_left_in_packet )
++      {
++              dev->mce_bytes_left_in_packet = bytes_left_in_packet;
++      }
++      if( bulkidx < this_read )
++      {
++              dev->usb_valid_bytes_in_bulk_buffer = (this_read - bulkidx);
++              memcpy( dev->bulk_in_buffer, &(dev->bulk_in_buffer[bulkidx]),
++                      dev->usb_valid_bytes_in_bulk_buffer );
++      }
++      return dev->lirccnt;
++}
++
++/* mceusb_add_to_buf: called by lirc_dev to fetch all available keys
++ * this is used as a polling interface for us: since we set
++ * plugin->sample_rate we will periodically get the below call to
++ * check for new data returns 0 on success, or -ENODATA if nothing is
++ * available
++ */
++static int mceusb_add_to_buf(void* data, struct lirc_buffer* buf )
++{
++      struct usb_skel* dev = (struct usb_skel*) data;
++
++      down( &dev->sem );
++
++      /* verify device still present */
++      if( dev->udev == NULL )
++      {
++              up( &dev->sem );
++              return -ENODEV;
++      }
++
++      if( !dev->lirccnt )
++      {
++              int res;
++              dev->lircidx = 0;
++        
++              res = msir_fetch_more_data( dev, 1 );
++              
++              if( res == 0 )
++                      res = -ENODATA;
++              if( res < 0 ) {
++                      up( &dev->sem );
++                      return res;
++              }
++      }
++
++      if( dev->lirccnt )
++      {
++              int keys_to_copy;
++
++              /* determine available buffer space and available data */
++              keys_to_copy = lirc_buffer_available( buf );
++              if( keys_to_copy > dev->lirccnt )
++              {
++                      keys_to_copy = dev->lirccnt;
++              }
++        
++              lirc_buffer_write_n( buf, (unsigned char*) &(dev->lircdata[dev->lircidx]), keys_to_copy );
++              dev->lircidx += keys_to_copy;
++              dev->lirccnt -= keys_to_copy;
++        
++              up( &dev->sem );
++              return 0;
++      }
++
++      up( &dev->sem );
++      return -ENODATA;
++}
++
++/**
++ *    mceusb_write_bulk_callback
++ */
++#ifdef KERNEL_2_5 
++static void mceusb_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
++#else
++static void mceusb_write_bulk_callback (struct urb *urb)
++#endif
++{
++      struct usb_skel *dev = (struct usb_skel *)urb->context;
++
++      dbg("%s - minor %d", __func__, dev->minor);
++
++      if ((urb->status != -ENOENT) && 
++          (urb->status != -ECONNRESET)) {
++              dbg("%s - nonzero write buld status received: %d\n", __func__, urb->status);
++              return;
++      }
++
++      return;
++}
++
++/**
++ *    mceusb_probe
++ *
++ *    Called by the usb core when a new device is connected that it 
++ *    thinks this driver might be interested in.
++ */
++#ifdef KERNEL_2_5 
++static int mceusb_probe(struct usb_interface *interface, const struct usb_device_id *id)
++{
++      struct usb_device *udev = interface_to_usbdev(interface);
++      struct usb_host_interface *iface_desc;
++#else
++static void * mceusb_probe(struct usb_device *udev, unsigned int ifnum,
++                         const struct usb_device_id *id)
++{
++      struct usb_interface *interface = &udev->actconfig->interface[ifnum];
++      struct usb_interface_descriptor *iface_desc;    
++#endif
++      struct usb_skel *dev = NULL;
++      struct usb_endpoint_descriptor *endpoint;
++      
++      struct lirc_plugin* plugin;
++      struct lirc_buffer* rbuf;
++
++      int minor;
++      size_t buffer_size;
++      int i;
++      int retval = -ENOMEM;
++      
++      /* See if the device offered us matches what we can accept */
++      if ((udev->descriptor.idVendor != USB_MCEUSB_VENDOR_ID) ||
++          (udev->descriptor.idProduct != USB_MCEUSB_PRODUCT_ID)) {
++              dbg("Wrong Vendor/Product IDs");
++#ifdef KERNEL_2_5
++              return -ENODEV;
++#else
++              return NULL;
++#endif
++      }
++
++      /* select a "subminor" number (part of a minor number) */
++      down (&minor_table_mutex);
++      for (minor = 0; minor < MAX_DEVICES; ++minor) {
++              if (minor_table[minor] == NULL)
++                      break;
++      }
++      if (minor >= MAX_DEVICES) {
++              info ("Too many devices plugged in, "
++                    "can not handle this device.");
++              goto error;
++      }
++
++      /* allocate memory for our device state and initialize it */
++      dev = kmalloc (sizeof(struct usb_skel), GFP_KERNEL);
++      if (dev == NULL) {
++              err ("Out of memory");
++#ifdef KERNEL_2_5
++              retval = -ENOMEM;
++#endif
++              goto error;
++      }
++      minor_table[minor] = dev;
++      
++      memset (dev, 0x00, sizeof (*dev));
++      init_MUTEX (&dev->sem);
++      dev->udev = udev;
++      dev->interface = interface;
++      dev->minor = minor;
++
++      /* set up the endpoint information */
++      /* check out the endpoints */
++      /* use only the first bulk-in and bulk-out endpoints */
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,4)
++      iface_desc = interface->cur_altsetting;
++#else
++      iface_desc = &interface->altsetting[0];
++#endif
++
++#ifdef KERNEL_2_5
++      for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
++              endpoint = &iface_desc->endpoint[i].desc;
++#else
++      for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
++              endpoint = &iface_desc->endpoint[i];
++#endif
++              if ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) &&
++                  ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
++                   USB_ENDPOINT_XFER_BULK)) {
++                      dbg("we found a bulk in endpoint");
++                      buffer_size = endpoint->wMaxPacketSize;
++                      dev->bulk_in_size = buffer_size;
++                      dev->bulk_in_endpointAddr = endpoint->bEndpointAddress;
++#ifdef KERNEL_2_5
++                      dev->bulk_in_buffer = usb_buffer_alloc
++                              (udev, buffer_size, SLAB_ATOMIC, &dev->dma_in);
++#else
++                      dev->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
++#endif
++                      if (!dev->bulk_in_buffer) {
++                              err("Couldn't allocate bulk_in_buffer");
++                              goto error;
++                      }
++              }
++              
++              if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == 0x00) &&
++                  ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
++                   USB_ENDPOINT_XFER_BULK)) {
++                      dbg("we found a bulk out endpoint");
++#ifdef KERNEL_2_5
++                      dev->write_urb = usb_alloc_urb(0, GFP_KERNEL);
++#else
++                      dev->write_urb = usb_alloc_urb(0);
++#endif
++                      if (!dev->write_urb) {
++                              err("No free urbs available");
++                              goto error;
++                      }
++                      buffer_size = endpoint->wMaxPacketSize;
++                      dev->bulk_out_size = buffer_size;
++                      dev->bulk_out_endpointAddr = endpoint->bEndpointAddress;
++#ifdef KERNEL_2_5
++                      dev->bulk_out_buffer = usb_buffer_alloc(udev, buffer_size, SLAB_ATOMIC, &dev->dma_out);
++#else
++                      dev->bulk_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
++#endif
++                      if (!dev->bulk_out_buffer) {
++                              err("Couldn't allocate bulk_out_buffer");
++                              goto error;
++                      }
++#ifdef KERNEL_2_5
++                      usb_fill_bulk_urb(dev->write_urb, udev, 
++                                    usb_sndbulkpipe
++                                    (udev, endpoint->bEndpointAddress),
++                                    dev->bulk_out_buffer, buffer_size,
++                                    mceusb_write_bulk_callback, dev);
++#else
++                      FILL_BULK_URB(dev->write_urb, udev,
++                                    usb_sndbulkpipe
++                                    (udev, endpoint->bEndpointAddress),
++                                    dev->bulk_out_buffer, buffer_size,
++                                    mceusb_write_bulk_callback, dev);
++#endif 
++              }
++      }
++
++      if (!(dev->bulk_in_endpointAddr && dev->bulk_out_endpointAddr)) {
++              err("Couldn't find both bulk-in and bulk-out endpoints");
++              goto error;
++      }
++
++      /* init the waitq */
++      init_waitqueue_head( &dev->wait_q );
++
++
++      /* Set up our lirc plugin */
++      if(!(plugin = kmalloc(sizeof(struct lirc_plugin), GFP_KERNEL))) {
++              err("out of memory");
++              goto error;
++      }
++      memset( plugin, 0, sizeof(struct lirc_plugin) );
++
++      if(!(rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL))) {
++              err("out of memory");
++              kfree( plugin );
++              goto error;
++      }
++    
++      /* the lirc_atiusb module doesn't memset rbuf here ... ? */
++      if( lirc_buffer_init( rbuf, sizeof(lirc_t), 128)) {
++              err("out of memory");
++              kfree( plugin );
++              kfree( rbuf );
++              goto error;
++      }
++
++      strcpy(plugin->name, DRIVER_NAME " ");
++      plugin->minor       = minor;
++      plugin->code_length = sizeof(lirc_t) * 8;
++      plugin->features    = LIRC_CAN_REC_MODE2; // | LIRC_CAN_SEND_MODE2;
++      plugin->data        = dev;
++      plugin->rbuf        = rbuf;
++      plugin->ioctl       = NULL;
++      plugin->set_use_inc = &set_use_inc;
++      plugin->set_use_dec = &set_use_dec;
++      plugin->sample_rate = 80;   // sample at 100hz (10ms)
++      plugin->add_to_buf  = &mceusb_add_to_buf;
++      //    plugin->fops        = &mceusb_fops;
++      if( lirc_register_plugin(plugin) < 0 )
++      {
++              kfree( plugin );
++              lirc_buffer_free( rbuf );
++              kfree( rbuf );
++              goto error;
++      }
++      dev->plugin = plugin;
++      
++      /* clear off the first few messages. these look like
++       * calibration or test data, i can't really tell
++       * this also flushes in case we have random ir data queued up
++       */
++      {
++              char junk[64];
++              int partial = 0, retval, i;
++              for( i = 0; i < 40; i++ )
++              {
++                      retval = usb_bulk_msg
++                              (udev, usb_rcvbulkpipe
++                               (udev, dev->bulk_in_endpointAddr),
++                               junk, 64,
++                               &partial, HZ*10);
++              }
++      }
++    
++      msir_cleanup( dev );
++      mceusb_setup( udev );
++      
++#ifdef KERNEL_2_5
++      /* we can register the device now, as it is ready */
++      usb_set_intfdata (interface, dev);
++#endif        
++      /* let the user know what node this device is now attached to */
++      //info ("USB Microsoft IR Transceiver device now attached to msir%d", dev->minor);
++      up (&minor_table_mutex);
++#ifdef KERNEL_2_5
++      return 0;
++#else
++      return dev;
++#endif
++ error:
++      mceusb_delete (dev);
++      dev = NULL;
++      dbg("%s: retval = %x",__func__,retval);
++      up (&minor_table_mutex);
++#ifdef KERNEL_2_5
++      return retval;
++#else
++      return NULL;
++#endif
++}
++
++/**
++ *    mceusb_disconnect
++ *
++ *    Called by the usb core when the device is removed from the system.
++ *
++ *    This routine guarantees that the driver will not submit any more urbs
++ *    by clearing dev->udev.  It is also supposed to terminate any currently
++ *    active urbs.  Unfortunately, usb_bulk_msg(), used in skel_read(), does
++ *    not provide any way to do this.  But at least we can cancel an active
++ *    write.
++ */
++#ifdef KERNEL_2_5 
++static void mceusb_disconnect(struct usb_interface *interface)
++#else
++static void mceusb_disconnect(struct usb_device *udev, void *ptr)
++#endif
++{
++      struct usb_skel *dev;
++      int minor;
++#ifdef KERNEL_2_5
++      dev = usb_get_intfdata (interface);
++      usb_set_intfdata (interface, NULL);
++#else
++      dev = (struct usb_skel *)ptr;
++#endif
++      
++      down (&minor_table_mutex);
++      down (&dev->sem);
++      minor = dev->minor;
++
++      /* unhook lirc things */
++      lirc_unregister_plugin( minor );
++      lirc_buffer_free( dev->plugin->rbuf );
++      kfree( dev->plugin->rbuf );
++      kfree( dev->plugin );
++#ifdef KERNEL_2_5
++      /* terminate an ongoing write */
++      if (atomic_read (&dev->write_busy)) {
++              usb_unlink_urb (dev->write_urb);
++              wait_for_completion (&dev->write_finished);
++      }
++
++      /* prevent device read, write and ioctl */
++      dev->present = 0;
++#endif
++      
++      mceusb_delete (dev);
++      
++      info("Microsoft IR Transceiver #%d now disconnected", minor);
++      up (&dev->sem);
++      up (&minor_table_mutex);
++}
++
++
++
++/**
++ *    usb_mceusb_init
++ */
++static int __init usb_mceusb_init(void)
++{
++      int result;
++
++      /* register this driver with the USB subsystem */
++      result = usb_register(&mceusb_driver);
++#ifdef KERNEL_2_5     
++      if ( result ) {
++#else
++      if ( result < 0 ) {
++#endif
++              err("usb_register failed for the " DRIVER_NAME " driver. error number %d",result);
++#ifdef KERNEL_2_5
++              return result;
++#else
++              return -1;
++#endif
++      }
++
++      info(DRIVER_DESC " " DRIVER_VERSION);
++      return 0;
++}
++
++
++/**
++ *    usb_mceusb_exit
++ */
++static void __exit usb_mceusb_exit(void)
++{
++      /* deregister this driver with the USB subsystem */
++      usb_deregister(&mceusb_driver);
++}
++
++
++module_init (usb_mceusb_init);
++module_exit (usb_mceusb_exit);
++
++MODULE_AUTHOR(DRIVER_AUTHOR);
++MODULE_DESCRIPTION(DRIVER_DESC);
++MODULE_LICENSE("GPL");
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_parallel.c linux-2.6.8-rc4/drivers/char/lirc/lirc_parallel.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_parallel.c     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_parallel.c  2004-05-16 11:14:39.000000000 +0200
+@@ -0,0 +1,762 @@
++/*      $Id$      */
++
++/****************************************************************************
++ ** lirc_parallel.c *********************************************************
++ ****************************************************************************
++ * 
++ * lirc_parallel - device driver for infra-red signal receiving and
++ *                 transmitting unit built by the author
++ * 
++ * Copyright (C) 1998 Christoph Bartelmus <lirc@bartelmus.de>
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ *
++ */ 
++
++/***********************************************************************
++ *************************       Includes        ***********************
++ ***********************************************************************/
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18)
++#error "**********************************************************"
++#error " Sorry, this driver needs kernel version 2.2.18 or higher "
++#error "**********************************************************"
++#endif
++
++#include <linux/config.h>
++
++#ifdef CONFIG_SMP
++#error "--- Sorry, this driver is not SMP safe. ---"
++#endif
++
++#include <linux/module.h>
++#include <linux/sched.h>
++#include <linux/errno.h>
++#include <linux/signal.h>
++#include <linux/config.h>
++#include <linux/fs.h>
++#include <linux/kernel.h>
++#include <linux/ioport.h>
++#include <linux/time.h>
++#include <linux/mm.h>
++#include <linux/delay.h>
++
++#include <asm/io.h>
++#include <asm/signal.h>
++#include <asm/irq.h>
++
++#include <asm/uaccess.h>
++#include <linux/poll.h>
++#include <linux/parport.h>
++
++#include <linux/lirc.h>
++#include "kcompat.h"
++#include "lirc_dev.h"
++
++#include "lirc_parallel.h"
++
++#define LIRC_DRIVER_NAME "lirc_parallel"
++
++/***********************************************************************
++ *************************   Globale Variablen   ***********************
++ ***********************************************************************/
++
++unsigned int irq = CONFIG_LIRC_IRQ_PARALLEL;
++unsigned int io = CONFIG_LIRC_PORT_PARALLEL;
++#ifdef CONFIG_LIRC_TIMER
++unsigned int timer = 0;
++unsigned int default_timer = CONFIG_LIRC_TIMER;
++#endif
++
++#define WBUF_SIZE (256)
++#define RBUF_SIZE (256) /* this must be a power of 2 larger than 1 */
++
++static lirc_t wbuf[WBUF_SIZE];
++static lirc_t rbuf[RBUF_SIZE];
++
++DECLARE_WAIT_QUEUE_HEAD(lirc_wait);
++
++unsigned int rptr=0,wptr=0;
++unsigned int lost_irqs=0;
++int is_open=0;
++
++struct parport *pport;
++struct pardevice *ppdevice;
++int is_claimed=0;
++
++/***********************************************************************
++ *************************   Interne Funktionen  ***********************
++ ***********************************************************************/
++
++unsigned int __inline__ in(int offset)
++{
++      switch(offset)
++      {
++      case LIRC_LP_BASE:
++              return(parport_read_data(pport));
++      case LIRC_LP_STATUS:
++              return(parport_read_status(pport));
++      case LIRC_LP_CONTROL:
++              return(parport_read_control(pport));
++      }
++      return(0); /* make compiler happy */
++}
++
++void __inline__ out(int offset, int value)
++{
++      switch(offset)
++      {
++      case LIRC_LP_BASE:
++              parport_write_data(pport,value);
++              break;
++      case LIRC_LP_CONTROL:
++              parport_write_control(pport,value);
++              break;
++      case LIRC_LP_STATUS:
++              printk(KERN_INFO "%s: attempt to write to status register\n",
++                     LIRC_DRIVER_NAME);
++              break;
++      }
++}
++
++unsigned int __inline__ lirc_get_timer(void)
++{
++      return(in(LIRC_PORT_TIMER)&LIRC_PORT_TIMER_BIT);
++}
++
++unsigned int __inline__  lirc_get_signal(void)
++{
++      return(in(LIRC_PORT_SIGNAL)&LIRC_PORT_SIGNAL_BIT);
++}
++
++void __inline__ lirc_on(void)
++{
++      out(LIRC_PORT_DATA,LIRC_PORT_DATA_BIT);
++}
++
++void __inline__ lirc_off(void)
++{
++      out(LIRC_PORT_DATA,0);
++}
++
++unsigned int init_lirc_timer(void)
++{
++      struct timeval tv,now;
++      unsigned int level,newlevel,timeelapsed,newtimer;
++      int count=0;
++      
++      do_gettimeofday(&tv);
++      tv.tv_sec++;                     /* wait max. 1 sec. */
++      level=lirc_get_timer();
++      do
++      {
++              newlevel=lirc_get_timer();
++              if(level==0 && newlevel!=0) count++;
++              level=newlevel;
++              do_gettimeofday(&now);
++      }
++      while(count<1000 && (now.tv_sec<tv.tv_sec 
++                           || (now.tv_sec==tv.tv_sec 
++                               && now.tv_usec<tv.tv_usec)));
++
++      timeelapsed=((now.tv_sec+1-tv.tv_sec)*1000000
++                   +(now.tv_usec-tv.tv_usec));
++      if(count>=1000 && timeelapsed>0)
++      {
++              if(default_timer==0)                    /* autodetect timer */
++              {
++                      newtimer=(1000000*count)/timeelapsed;
++                      printk(KERN_INFO "%s: %u Hz timer detected\n",
++                             LIRC_DRIVER_NAME,newtimer);
++                      return(newtimer);
++              }
++              else
++              {
++                      newtimer=(1000000*count)/timeelapsed;
++                      if(abs(newtimer-default_timer)>
++                         default_timer/10) /* bad timer */
++                      {
++                              printk(KERN_NOTICE "%s: bad timer: %u Hz\n",
++                                     LIRC_DRIVER_NAME,newtimer);
++                              printk(KERN_NOTICE "%s: using default timer: "
++                                     "%u Hz\n",
++                                     LIRC_DRIVER_NAME,default_timer);
++                              return(default_timer);
++                      }
++                      else
++                      {
++                              printk(KERN_INFO "%s: %u Hz timer detected\n",
++                                     LIRC_DRIVER_NAME,newtimer);
++                              return(newtimer); /* use detected value */
++                      }
++              }
++      }
++      else
++      {
++              printk(KERN_NOTICE "%s: no timer detected\n",LIRC_DRIVER_NAME);
++              return(0);
++      }
++}
++
++int lirc_claim(void)
++{
++      if(parport_claim(ppdevice)!=0)
++      {
++              printk(KERN_WARNING "%s: could not claim port\n",
++                     LIRC_DRIVER_NAME);
++              printk(KERN_WARNING "%s: waiting for port becoming available"
++                     "\n",LIRC_DRIVER_NAME);
++              if(parport_claim_or_block(ppdevice)<0)
++              {
++                      printk(KERN_NOTICE "%s: could not claim port, giving"
++                             " up\n",LIRC_DRIVER_NAME);
++                      return(0);
++              }
++      }
++      out(LIRC_LP_CONTROL,LP_PSELECP|LP_PINITP);
++      is_claimed=1;
++      return(1);
++}
++
++/***********************************************************************
++ *************************   interrupt handler  ************************
++ ***********************************************************************/
++
++static inline void rbuf_write(lirc_t signal)
++{
++      unsigned int nwptr;
++
++      nwptr=(wptr+1) & (RBUF_SIZE-1);
++      if(nwptr==rptr) /* no new signals will be accepted */
++      {
++              lost_irqs++;
++              printk(KERN_NOTICE "%s: buffer overrun\n",LIRC_DRIVER_NAME);
++              return;
++      }       
++      rbuf[wptr]=signal;
++      wptr=nwptr;
++}
++
++void irq_handler(int i,void *blah,struct pt_regs * regs)
++{
++      struct timeval tv;
++      static struct timeval lasttv;
++      static int init=0;
++      long signal;
++      lirc_t data;
++      unsigned int level,newlevel;
++      unsigned int timeout;
++
++      if(!MOD_IN_USE)
++              return;
++
++      if(!is_claimed)
++      {
++              return;
++      }
++
++      /* disable interrupt */
++      /*
++        disable_irq(irq);
++        out(LIRC_PORT_IRQ,in(LIRC_PORT_IRQ)&(~LP_PINTEN));
++      */
++      if(in(1)&LP_PSELECD)
++      {
++              return;
++      }
++
++#ifdef LIRC_TIMER
++      if(init)
++      {
++              do_gettimeofday(&tv);
++              
++              signal=tv.tv_sec-lasttv.tv_sec;
++              if(signal>15)
++              {
++                      data=PULSE_MASK;  /* really long time */
++              }
++              else
++              {
++                      data=(lirc_t) (signal*1000000+
++                                     tv.tv_usec-lasttv.tv_usec+
++                                     LIRC_SFH506_DELAY);
++              };
++
++              rbuf_write(data); /* space */
++      }
++      else
++      {
++              if(timer==0) /* wake up; we'll lose this signal 
++                              but it will be garbage if the device 
++                              is turned on anyway
++                            */
++              {
++                      timer=init_lirc_timer();
++                      /* enable_irq(irq); */
++                      return;
++              }
++              init=1;
++      }
++
++      timeout=timer/10;           /* timeout after 1/10 sec. */
++      signal=1;
++      level=lirc_get_timer();
++      do{
++              newlevel=lirc_get_timer();
++              if(level==0 && newlevel!=0) signal++;
++              level=newlevel;
++
++              /* giving up */
++              if(signal>timeout || (in(1)&LP_PSELECD))
++              {
++                      signal=0;
++                      printk(KERN_NOTICE "%s: timeout\n",LIRC_DRIVER_NAME);
++                      break;
++              }
++      }
++      while(lirc_get_signal());
++      if(signal!=0)
++      {
++              /* ajust value to usecs */
++              signal=(long) (((unsigned long long) signal)*1000000)/timer;
++
++              if(signal>LIRC_SFH506_DELAY)
++              {
++                      data=signal-LIRC_SFH506_DELAY;
++              }
++              else
++              {
++                      data=1;
++              }
++              rbuf_write(PULSE_BIT|data); /* pulse */
++      }
++      do_gettimeofday(&lasttv);
++#else
++      /* add your code here */
++#endif
++      
++      wake_up_interruptible(&lirc_wait);
++
++      /* enable interrupt */
++      /*
++        enable_irq(irq);
++        out(LIRC_PORT_IRQ,in(LIRC_PORT_IRQ)|LP_PINTEN);
++      */
++}
++
++/***********************************************************************
++ **************************   file_operations   ************************
++ ***********************************************************************/
++
++static loff_t lirc_lseek(struct file *filep,loff_t offset,int orig)
++{
++      return(-ESPIPE);
++}
++
++static ssize_t lirc_read(struct file *filep,char *buf,size_t n,loff_t *ppos)
++{
++      int result;
++      int count=0;
++      DECLARE_WAITQUEUE(wait, current);
++      
++      if(n%sizeof(lirc_t)) return(-EINVAL);
++      
++      result=verify_area(VERIFY_WRITE,buf,n);
++      if(result) return(result);
++      
++      add_wait_queue(&lirc_wait,&wait);
++      current->state=TASK_INTERRUPTIBLE;
++      while(count<n)
++      {
++              if(rptr!=wptr)
++              {
++                      copy_to_user(buf+count,(char *) &rbuf[rptr],
++                                   sizeof(lirc_t));
++                      rptr=(rptr+1)&(RBUF_SIZE-1);
++                      count+=sizeof(lirc_t);
++              }
++              else
++              {
++                      if(filep->f_flags & O_NONBLOCK)
++                      {
++                              result=-EAGAIN;
++                              break;
++                      }
++                      if (signal_pending(current))
++                      {
++                              result=-ERESTARTSYS;
++                              break;
++                      }
++                      schedule();
++                      current->state=TASK_INTERRUPTIBLE;
++              }
++      }
++      remove_wait_queue(&lirc_wait,&wait);
++      current->state=TASK_RUNNING;
++      return(count ? count:result);
++}
++
++static ssize_t lirc_write(struct file *filep,const char *buf,size_t n,
++                        loff_t *ppos)
++{
++      int result,count;
++      unsigned int i;
++      unsigned int level,newlevel;
++      unsigned long flags;
++      lirc_t counttimer;
++      
++      if(!is_claimed)
++      {
++              return(-EBUSY);
++      }
++      if(n%sizeof(lirc_t)) return(-EINVAL);
++      result=verify_area(VERIFY_READ,buf,n);
++      if(result) return(result);
++      
++      count=n/sizeof(lirc_t);
++      
++      if(count>WBUF_SIZE || count%2==0) return(-EINVAL);
++      
++      copy_from_user(wbuf,buf,n);
++      
++#ifdef LIRC_TIMER
++      if(timer==0) /* try again if device is ready */
++      {
++              timer=init_lirc_timer();
++              if(timer==0) return(-EIO);
++      }
++
++      /* ajust values from usecs */
++      for(i=0;i<count;i++)
++      {
++              wbuf[i]=(lirc_t) (((double) wbuf[i])*timer/1000000);
++      }
++      
++      local_irq_save(flags);
++      i=0;
++      while(i<count)
++      {
++              level=lirc_get_timer();
++              counttimer=0;
++              lirc_on();
++              do
++              {
++                      newlevel=lirc_get_timer();
++                      if(level==0 && newlevel!=0) counttimer++;
++                      level=newlevel;
++                      if(in(1)&LP_PSELECD)
++                      {
++                              lirc_off();
++                              local_irq_restore(flags);
++                              return(-EIO);
++                      }
++              }
++              while(counttimer<wbuf[i]);i++;
++              
++              lirc_off();
++              if(i==count) break;
++              counttimer=0;
++              do
++              {
++                      newlevel=lirc_get_timer();
++                      if(level==0 && newlevel!=0) counttimer++;
++                      level=newlevel;
++                      if(in(1)&LP_PSELECD)
++                      {
++                              local_irq_restore(flags);
++                              return(-EIO);
++                      }
++              }
++              while(counttimer<wbuf[i]);i++;
++      }
++      local_irq_restore(flags);
++#else
++      /* 
++         place code that handles write
++         without extarnal timer here
++      */
++#endif
++      return(n);
++}
++
++static unsigned int lirc_poll(struct file *file, poll_table * wait)
++{
++      poll_wait(file, &lirc_wait,wait);
++      if (rptr!=wptr)
++              return(POLLIN|POLLRDNORM);
++      return(0);
++}
++
++static int lirc_ioctl(struct inode *node,struct file *filep,unsigned int cmd,
++                    unsigned long arg)
++{
++        int result;
++      unsigned long features=LIRC_CAN_SEND_PULSE|LIRC_CAN_REC_MODE2,mode;
++      
++      switch(cmd)
++      {
++      case LIRC_GET_FEATURES:
++              result=put_user(features,(unsigned long *) arg);
++              if(result) return(result); 
++              break;
++      case LIRC_GET_SEND_MODE:
++              result=put_user(LIRC_MODE_PULSE,(unsigned long *) arg);
++              if(result) return(result); 
++              break;
++      case LIRC_GET_REC_MODE:
++              result=put_user(LIRC_MODE_MODE2,(unsigned long *) arg);
++              if(result) return(result); 
++              break;
++      case LIRC_SET_SEND_MODE:
++              result=get_user(mode,(unsigned long *) arg);
++              if(result) return(result);
++              if(mode!=LIRC_MODE_PULSE) return(-EINVAL);
++              break;
++      case LIRC_SET_REC_MODE:
++              result=get_user(mode,(unsigned long *) arg);
++              if(result) return(result);
++              if(mode!=LIRC_MODE_MODE2) return(-ENOSYS);
++              break;
++      default:
++              return(-ENOIOCTLCMD);
++      }
++      return(0);
++}
++
++static int lirc_open(struct inode* node,struct file* filep)
++{
++      if(MOD_IN_USE)
++      {
++              return(-EBUSY);
++      }
++      if(!lirc_claim())
++      {
++              return(-EBUSY);
++      }
++      pport->ops->enable_irq(pport);
++
++      /* init read ptr */
++      rptr=wptr=0;
++      lost_irqs=0;
++
++      MOD_INC_USE_COUNT;
++      is_open=1;
++      return(0);
++}
++
++static int lirc_close(struct inode* node,struct file* filep)
++{
++      if(is_claimed)
++      {
++              is_claimed=0;
++              parport_release(ppdevice);
++      }
++      is_open=0;
++      MOD_DEC_USE_COUNT;
++      return(0);
++}
++
++static struct file_operations lirc_fops = 
++{
++      llseek:  lirc_lseek,
++      read:    lirc_read,
++      write:   lirc_write,
++      poll:    lirc_poll,
++      ioctl:   lirc_ioctl,
++      open:    lirc_open,
++      release: lirc_close
++};
++
++static int set_use_inc(void* data)
++{
++#if WE_DONT_USE_LOCAL_OPEN_CLOSE
++      MOD_INC_USE_COUNT;
++#endif
++      return 0;
++}
++
++static void set_use_dec(void* data)
++{
++#if WE_DONT_USE_LOCAL_OPEN_CLOSE
++      MOD_DEC_USE_COUNT;
++#endif
++}
++
++static struct lirc_plugin plugin = {
++       name:           LIRC_DRIVER_NAME,
++       minor:          -1,
++       code_length:    1,
++       sample_rate:    0,
++       data:           NULL,
++       add_to_buf:     NULL,
++       get_queue:      NULL,
++       set_use_inc:    set_use_inc,
++       set_use_dec:    set_use_dec,
++       fops:           &lirc_fops,
++};
++
++#ifdef MODULE
++
++MODULE_AUTHOR("Christoph Bartelmus");
++MODULE_DESCRIPTION("Infrared receiver driver for parallel ports.");
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("GPL");
++#endif
++
++MODULE_PARM(io, "i");
++MODULE_PARM_DESC(io, "I/O address base (0x3bc, 0x378 or 0x278)");
++
++MODULE_PARM(irq, "i");
++MODULE_PARM_DESC(irq, "Interrupt (7 or 5)");
++
++#ifndef KERNEL_2_5
++EXPORT_NO_SYMBOLS;
++#endif
++
++int pf(void *handle);
++void kf(void *handle);
++
++static struct timer_list poll_timer;
++static void poll_state(unsigned long ignored);
++
++static void poll_state(unsigned long ignored)
++{
++      printk(KERN_NOTICE "%s: time\n",
++             LIRC_DRIVER_NAME);
++      del_timer(&poll_timer);
++      if(is_claimed)
++              return;
++      kf(NULL);
++      if(!is_claimed)
++      {
++              printk(KERN_NOTICE "%s: could not claim port, giving up\n",
++                     LIRC_DRIVER_NAME);
++              init_timer(&poll_timer);
++              poll_timer.expires=jiffies+HZ;
++              poll_timer.data=(unsigned long) current;
++              poll_timer.function=poll_state;
++              add_timer(&poll_timer);
++      }
++}
++
++int pf(void *handle)
++{
++      pport->ops->disable_irq(pport);
++      is_claimed=0;
++      return(0);
++}
++
++
++void kf(void *handle)
++{
++      if(!is_open)
++              return;
++      if(!lirc_claim())
++              return;
++      pport->ops->enable_irq(pport);
++      /* this is a bit annoying when you actually print...*/
++      /*
++      printk(KERN_INFO "%s: reclaimed port\n",LIRC_DRIVER_NAME);
++      */
++}
++
++/***********************************************************************
++ ******************   init_module()/cleanup_module()  ******************
++ ***********************************************************************/
++
++int init_module(void)
++{
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 3)
++      pport=parport_find_base(io);
++#else
++      pport=parport_enumerate();
++      while(pport!=NULL)
++      {
++              if(pport->base==io)
++              {
++                      break;
++              }
++              pport=pport->next;
++      }
++#endif
++      if(pport==NULL)
++      {
++              printk(KERN_NOTICE "%s: no port at %x found\n",
++                     LIRC_DRIVER_NAME,io);
++              return(-ENXIO);
++      }
++      ppdevice=parport_register_device(pport,LIRC_DRIVER_NAME,
++                                       pf,kf,irq_handler,0,NULL);
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 3)
++      parport_put_port(pport);
++#endif
++      if(ppdevice==NULL)
++      {
++              printk(KERN_NOTICE "%s: parport_register_device() failed\n",
++                     LIRC_DRIVER_NAME);
++              return(-ENXIO);
++      }
++      if(parport_claim(ppdevice)!=0)
++              goto skip_init;
++      is_claimed=1;
++      out(LIRC_LP_CONTROL,LP_PSELECP|LP_PINITP);
++
++#ifdef LIRC_TIMER
++#       ifdef DEBUG
++      out(LIRC_PORT_DATA,LIRC_PORT_DATA_BIT);
++#       endif
++      
++      timer=init_lirc_timer();
++
++#       if 0  /* continue even if device is offline */
++      if(timer==0) 
++      {
++              is_claimed=0;
++              parport_release(pport);
++              parport_unregister_device(ppdevice);
++              return(-EIO);
++      }
++      
++#       endif
++#       ifdef DEBUG
++      out(LIRC_PORT_DATA,0);
++#       endif
++#endif 
++
++      is_claimed=0;
++      parport_release(ppdevice);
++ skip_init:
++      if ((plugin.minor = lirc_register_plugin(&plugin)) < 0)
++      {
++              printk(KERN_NOTICE "%s: register_chrdev() failed\n",LIRC_DRIVER_NAME);
++              parport_unregister_device(ppdevice);
++              return(-EIO);
++      }
++      printk(KERN_INFO "%s: installed using port 0x%04x irq %d\n",LIRC_DRIVER_NAME,io,irq);
++      return(0);
++}
++  
++void cleanup_module(void)
++{
++      if(MOD_IN_USE) return;
++      parport_unregister_device(ppdevice);
++      lirc_unregister_plugin(plugin.minor);
++}
++#endif
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_parallel.h linux-2.6.8-rc4/drivers/char/lirc/lirc_parallel.h
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_parallel.h     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_parallel.h  2001-06-23 18:59:16.000000000 +0200
+@@ -0,0 +1,24 @@
++/*      $Id$      */
++
++#ifndef _LIRC_PARALLEL_H
++#define _LIRC_PARALLEL_H
++
++#include <linux/lp.h>
++
++#define LIRC_PORT_LEN 3
++
++#define LIRC_LP_BASE    0
++#define LIRC_LP_STATUS  1
++#define LIRC_LP_CONTROL 2
++
++#define LIRC_PORT_DATA           LIRC_LP_BASE    /* base */
++#define LIRC_PORT_DATA_BIT               0x01    /* 1st bit */
++#define LIRC_PORT_TIMER        LIRC_LP_STATUS    /* status port */
++#define LIRC_PORT_TIMER_BIT          LP_PBUSY    /* busy signal */
++#define LIRC_PORT_SIGNAL       LIRC_LP_STATUS    /* status port */
++#define LIRC_PORT_SIGNAL_BIT          LP_PACK    /* ack signal */
++#define LIRC_PORT_IRQ         LIRC_LP_CONTROL    /* control port */
++
++#define LIRC_SFH506_DELAY 0             /* delay t_phl in usecs */
++
++#endif
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_sasem.c linux-2.6.8-rc4/drivers/char/lirc/lirc_sasem.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_sasem.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_sasem.c     2004-06-19 08:29:09.000000000 +0200
+@@ -0,0 +1,453 @@
++/* lirc_sasem.c - USB remote support for LIRC
++ * Version 0.1  [beta status]
++ *
++ * Copyright (C) 2004 Oliver Stabel <oliver.stabel@gmx.de>
++ *
++ * This driver was derived from:
++ *   Paul Miller <pmiller9@users.sourceforge.net>'s 2003-2004
++ *      "lirc_atiusb - USB remote support for LIRC"
++ *   Culver Consulting Services <henry@culcon.com>'s 2003
++ *      "Sasem OnAir VFD/IR USB driver"
++ *
++ *
++ * 2004/06/13 -       1st version
++ *
++ * TODO
++ *    - keypresses seem to be rather sluggish sometimes; check
++ *      intervall and timing
++ *    - simulate USBLCD device to work with LCDProc
++ *    - include fs operations
++ *    - analyse LCD command set
++ *    - check USB Minor allocation
++ *    - param to enable/disable LIRC communication (??)
++ *
++ */
++
++/*
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ */
++
++#include <linux/module.h>
++#include <linux/kmod.h>
++#include <linux/kernel.h>
++#include <linux/usb.h>
++#include <linux/init.h>
++#include <linux/slab.h>
++#include <linux/sched.h>
++#include <asm/uaccess.h>
++#include <asm/atomic.h>
++#include <linux/poll.h>
++#include "lirc_sasem.h"
++
++#include <linux/lirc.h>
++#include "lirc_dev.h"
++
++MODULE_AUTHOR( DRIVER_AUTHOR );
++MODULE_DESCRIPTION( DRIVER_DESC );
++MODULE_LICENSE("GPL");
++
++static int debug = 0;
++
++MODULE_PARM(debug, "i");
++MODULE_PARM_DESC(debug, "enable debug = 1, disable = 0 (default)");
++
++static t_usb_device_id s_sasemID [] = {
++      { USB_DEVICE(0x11ba, 0x0101) },
++      { }
++};
++MODULE_DEVICE_TABLE (usb, s_sasemID);
++
++static t_usb_driver s_SasemDriver =
++{
++      owner:                  THIS_MODULE,
++      name:                   "Sasem",
++      probe:                  s_sasemProbe,
++      disconnect:             s_sasemDisconnect,
++      minor:                  SASEM_MINOR,
++      id_table:               s_sasemID,
++};
++
++static int __init s_sasemInit (void)
++{
++      printk(BANNER);
++
++      if (usb_register(&s_SasemDriver)) {
++              printk("USB registration failed");
++              return -ENOSYS;
++      }
++
++      return 0;
++}
++
++static void __exit s_sasemExit (void)
++{
++      usb_deregister (&s_SasemDriver);
++}
++
++module_init (s_sasemInit);
++module_exit (s_sasemExit);
++
++static void * s_sasemProbe(t_usb_device *p_dev, unsigned p_iInterfaceNum,
++                         const t_usb_device_id *p_id)
++{
++      t_sasemDevice *l_sasemDevice = NULL;
++      t_usb_endpoint_descriptor *l_endpoint;
++      t_usb_interface_descriptor *l_currentInterfaceDescriptor;
++      int l_iPipe;
++      int l_iDevnum;
++      t_lirc_plugin *l_lircPlugin = NULL;
++      t_lirc_buffer *l_lircBuffer = NULL;
++      int l_iLircMinor = -1;
++      int l_iMemFailure;
++      char l_cBuf[63], l_cName[128]="";
++
++      if (debug) printk("onair probe\n");
++      
++      l_currentInterfaceDescriptor = p_dev->actconfig->interface->
++              altsetting;
++      l_endpoint = l_currentInterfaceDescriptor->endpoint;
++      
++      if (!(l_endpoint->bEndpointAddress & 0x80) ||
++              ((l_endpoint->bmAttributes & 3) != 0x03)) {
++              printk("OnAir config endpoint error");
++              return NULL;
++      }
++
++      l_iDevnum = p_dev->devnum;
++
++      l_iMemFailure = 0;
++      if (!(l_sasemDevice = kmalloc(sizeof(t_sasemDevice), GFP_KERNEL))) {
++              printk("kmalloc(sizeof(t_sasemDevice), GFP_KERNEL)) failed");
++              l_iMemFailure = 1;
++      }
++      else {
++              memset(l_sasemDevice, 0, sizeof(t_sasemDevice));
++              if (!(l_lircPlugin = kmalloc(sizeof(t_lirc_plugin), GFP_KERNEL))) {
++                      printk("kmalloc(sizeof(t_lirc_plugin), GFP_KERNEL)) failed");
++                      l_iMemFailure = 2;
++              }
++              else if (!(l_lircBuffer = kmalloc(sizeof(t_lirc_buffer), GFP_KERNEL))) {
++                      printk("kmalloc(sizeof(t_lirc_buffer), GFP_KERNEL)) failed");
++                      l_iMemFailure = 3;
++              }
++              else if (lirc_buffer_init(l_lircBuffer, MAX_INTERRUPT_DATA, 4)) {
++                      printk("lirc_buffer_init failed");
++                      l_iMemFailure = 4;
++              }
++              else if (!(l_sasemDevice->m_urbIn = usb_alloc_urb(0))) {
++                      printk("usb_alloc_urb(0) failed");
++                      l_iMemFailure = 5;
++              } else {
++
++                      memset(l_lircPlugin, 0, sizeof(t_lirc_plugin));
++                      strcpy(l_lircPlugin->name, DRIVER_NAME " ");
++                      l_lircPlugin->minor = -1;
++                      l_lircPlugin->code_length = MAX_INTERRUPT_DATA*8;
++                      l_lircPlugin->features = LIRC_CAN_REC_LIRCCODE;
++                      l_lircPlugin->data = l_sasemDevice;
++                      
++                      l_lircPlugin->rbuf = l_lircBuffer;
++                      l_lircPlugin->set_use_inc = &s_lirc_set_use_inc;
++                      l_lircPlugin->set_use_dec = &s_lirc_set_use_dec;
++
++                      if ((l_iLircMinor = lirc_register_plugin(l_lircPlugin)) < 0) {
++                              printk("lirc_register_plugin(l_lircPlugin)) failed");
++                              l_iMemFailure = 9;
++                      }
++              }
++      }
++      switch (l_iMemFailure) {
++      case 9:
++              usb_free_urb(l_sasemDevice->m_urbIn);
++      case 5:
++      case 4:
++              kfree(l_lircBuffer);
++      case 3:
++              kfree(l_lircPlugin);
++      case 2:
++              kfree(l_sasemDevice);
++      case 1:
++              return NULL;
++      }
++      
++      l_lircPlugin->minor = l_iLircMinor;     
++      
++      init_MUTEX(&l_sasemDevice->m_semLock);
++      down_interruptible(&l_sasemDevice->m_semLock);
++      l_sasemDevice->m_descriptorIn = l_endpoint;
++      l_sasemDevice->m_device = p_dev;
++      l_sasemDevice->m_lircPlugin = l_lircPlugin;
++      up(&l_sasemDevice->m_semLock);
++
++      l_iPipe = usb_rcvintpipe(l_sasemDevice->m_device,
++                               l_sasemDevice->m_descriptorIn->
++                               bEndpointAddress);
++      
++      usb_fill_int_urb(l_sasemDevice->m_urbIn, l_sasemDevice->m_device,
++                       l_iPipe, l_sasemDevice->m_cBufferIn,
++                       sizeof(l_sasemDevice->m_cBufferIn),
++                       s_sasemCallbackIn, l_sasemDevice, 
++                       l_sasemDevice->m_descriptorIn->bInterval);
++
++      if (p_dev->descriptor.iManufacturer &&
++          usb_string(p_dev, p_dev->descriptor.iManufacturer, l_cBuf, 63) > 0)
++      {
++              strncpy(l_cName, l_cBuf, 128);
++      }
++      if (p_dev->descriptor.iProduct &&
++          usb_string(p_dev, p_dev->descriptor.iProduct, l_cBuf, 63) > 0)
++      {
++              snprintf(l_cName, 128, "%s %s", l_cName, l_cBuf);
++      }
++      printk(DRIVER_NAME "[%d]: %s on usb%d\n", l_iDevnum, l_cName,
++             p_dev->bus->busnum);
++
++      return l_sasemDevice;
++}
++
++
++static void s_sasemDisconnect(t_usb_device *p_dev, void *p_ptr) {
++      t_sasemDevice *l_sasemDevice = p_ptr;
++      if (debug) printk("s_sasemDisconnect\n");
++
++      down_interruptible(&l_sasemDevice->m_semLock);
++      usb_unlink_urb(l_sasemDevice->m_urbIn);
++      usb_free_urb(l_sasemDevice->m_urbIn);
++      s_unregister_from_lirc(l_sasemDevice);
++      up(&l_sasemDevice->m_semLock);
++      kfree (l_sasemDevice);
++}
++
++static void s_sasemCallbackIn(t_urb *p_urb)
++{
++      t_sasemDevice *l_sasemDevice;
++      int l_iDevnum;
++      int l_iLen;
++      char l_cBuf[MAX_INTERRUPT_DATA];
++      int i;
++
++      if (debug) printk("s_sasemCallbackIn\n");
++      
++      if (!p_urb)
++      {
++              return;
++      }
++
++      if (!(l_sasemDevice = p_urb->context)) {
++              usb_unlink_urb(p_urb);
++              return;
++      }
++
++      l_iDevnum = l_sasemDevice->m_iDevnum;
++      if (debug) {
++              printk(DRIVER_NAME "[%d]: data received (length %d)\n",
++                     l_iDevnum, p_urb->actual_length);
++              printk(DRIVER_NAME 
++                     " intr_callback called %x %x %x %x %x %x %x %x\n", 
++                     l_sasemDevice->m_cBufferIn[0],
++                     l_sasemDevice->m_cBufferIn[1],
++                     l_sasemDevice->m_cBufferIn[2],
++                     l_sasemDevice->m_cBufferIn[3],
++                     l_sasemDevice->m_cBufferIn[4],
++                     l_sasemDevice->m_cBufferIn[5],
++                     l_sasemDevice->m_cBufferIn[6],
++                     l_sasemDevice->m_cBufferIn[7]);
++      }
++
++      switch (p_urb->status) {
++
++      /* success */
++      case 0:
++              l_iLen = p_urb->actual_length;
++              if (l_iLen > MAX_INTERRUPT_DATA) return;
++
++              memcpy(l_cBuf,p_urb->transfer_buffer,l_iLen);
++
++              // is this needed? The OnAir device should always
++              // return 8 bytes
++              for (i = l_iLen; i < MAX_INTERRUPT_DATA; i++) l_cBuf[i] = 0;
++
++              // the OnAir device seems not to be able to signal a
++              // pressed button by repeating its code. Keeping a
++              // button pressed first sends the real code (e.g. 0C
++              // 80 7F 41 BE 00 00 00) and then keeps sending 08 00
++              // 00 00 00 00 00 00 as long as the button is pressed
++              // (notice that in the real key code 80 = !7F and 41 =
++              // !BE is this important? maybe for validation?) maybe
++              // 08 00 00 00 00 00 00 00 is the number of presses?
++              // who knows ...
++              // so lets do the following: if a code != the 08 code
++              // arrives, store it to repeat it if necessary for
++              // LIRC. If an 08 code follows afterwards, send the
++              // old code again to the buffer do this as long as the
++              // 08 code is being sent
++              // example:
++              // Code from Remote          Lirc Buffer
++              //  0C 80 7F 41 BE 00 00 00   0C 80 7F 41 BE 00 00 00
++              //  08 00 00 00 00 00 00 00   0C 80 7F 41 BE 00 00 00
++              //  08 00 00 00 00 00 00 00   0C 80 7F 41 BE 00 00 00
++              //  08 00 00 00 00 00 00 00   0C 80 7F 41 BE 00 00 00
++              //  08 00 00 00 00 00 00 00   0C 80 7F 41 BE 00 00 00
++              //  0C 80 7F 40 BF 00 00 00   0C 80 7F 40 BF 00 00 00
++              //  08 00 00 00 00 00 00 00   0C 80 7F 40 BF 00 00 00
++              //  08 00 00 00 00 00 00 00   0C 80 7F 40 BF 00 00 00
++              //  0C 80 7F 41 BE 00 00 00   0C 80 7F 41 BE 00 00 00
++              
++              if (memcmp(l_cBuf, sc_cSasemCode, MAX_INTERRUPT_DATA) == 0) {
++                      // the repeat code is being sent, so we copy
++                      // the old code to LIRC
++                      if (l_sasemDevice->m_iCodeSaved != 0) {
++                              memcpy(l_cBuf, &l_sasemDevice->m_cLastCode,
++                                     MAX_INTERRUPT_DATA);
++                      }
++                      // there was no old code so what to do?
++                      else {
++                              // TODO
++                      }
++              }
++              else
++              {
++                      // save the current valid code for repeats
++                      memcpy(&l_sasemDevice->m_cLastCode, l_cBuf,
++                             MAX_INTERRUPT_DATA);
++                      // set flag to signal a valid code was save;
++                      // just for safety reasons
++                      l_sasemDevice->m_iCodeSaved = 1;
++              }
++              
++              /* copy 1 code to lirc_buffer */
++              lirc_buffer_write_1(l_sasemDevice->m_lircPlugin->rbuf,
++                                  l_cBuf);
++              wake_up(&l_sasemDevice->m_lircPlugin->rbuf->wait_poll);
++              break;
++
++      /* unlink */
++      case -ECONNRESET:
++      case -ENOENT:
++      case -ESHUTDOWN:
++              usb_unlink_urb(p_urb);
++              return;
++      }
++
++      /* resubmit urb */
++      usb_submit_urb(p_urb);
++}
++
++static int s_unregister_from_lirc(t_sasemDevice *p_sasemDevice) {
++      t_lirc_plugin *l_lircPlugin = p_sasemDevice->m_lircPlugin;
++      int l_iDevnum;
++      int l_iReturn;
++
++      l_iDevnum = p_sasemDevice->m_iDevnum;
++      if (debug) printk(DRIVER_NAME "[%d]: unregister from lirc called\n",
++                        l_iDevnum);
++      
++      if ((l_iReturn = lirc_unregister_plugin(l_lircPlugin->minor)) > 0) {
++              printk(DRIVER_NAME "[%d]: error in lirc_unregister minor: %d\n"
++                     "Trying again...\n", l_iDevnum, l_lircPlugin->minor);
++              if (l_iReturn == -EBUSY) {
++                      printk(DRIVER_NAME "[%d]: device is opened, "
++                             "will unregister on close\n", l_iDevnum);
++                      return -EAGAIN;
++              }
++              set_current_state(TASK_INTERRUPTIBLE);
++              schedule_timeout(HZ);
++
++              if ((l_iReturn = lirc_unregister_plugin(l_lircPlugin->minor)) > 0) {
++                      printk(DRIVER_NAME "[%d]: lirc_unregister failed\n",
++                             l_iDevnum);
++              }
++      }
++      
++      if (l_iReturn != 0) {
++              printk(DRIVER_NAME "[%d]: didn't free resources\n",
++                     l_iDevnum);
++              return -EAGAIN;
++      }
++      
++      printk(DRIVER_NAME "[%d]: usb remote disconnected\n", l_iDevnum);
++      
++      lirc_buffer_free(l_lircPlugin->rbuf);
++      kfree(l_lircPlugin->rbuf);
++      kfree(l_lircPlugin);
++      return 0;
++}
++
++static int s_lirc_set_use_inc(void *p_data)
++{
++      t_sasemDevice *l_sasemDevice = p_data;
++      int l_iDevnum;
++
++      if (!l_sasemDevice) {
++              printk(DRIVER_NAME "[?]: s_lirc_set_use_inc called with no context\n");
++              return -EIO;
++      }
++      
++      l_iDevnum = l_sasemDevice->m_iDevnum;
++      if (debug) printk(DRIVER_NAME "[%d]: s_lirc_set_use_inc\n", 
++                        l_iDevnum);
++
++      if (!l_sasemDevice->m_iConnected) {
++              
++              /*
++                      this is the trigger from LIRC to start
++                      transfering data so the URB is being submitted
++              */
++
++              if (!l_sasemDevice->m_device)
++                      return -ENOENT;
++              
++              /* set USB device in URB */
++              l_sasemDevice->m_urbIn->dev = l_sasemDevice->m_device;
++              
++              /* start communication by submitting URB */
++              if (usb_submit_urb(l_sasemDevice->m_urbIn)) {
++                      printk(DRIVER_NAME "[%d]: open result = -EIO error "
++                              "submitting urb\n", l_iDevnum);
++                      return -EIO;
++              }
++              
++              /* indicate that URB has been submitted */
++              l_sasemDevice->m_iConnected = 1;
++      }
++
++      return 0;
++}
++
++static void s_lirc_set_use_dec(void *p_data) {
++      t_sasemDevice *l_sasemDevice = p_data;
++      int l_iDevnum;
++
++      if (!l_sasemDevice) {
++              printk(DRIVER_NAME "[?]: s_lirc_set_use_dec called with no context\n");
++              return;
++      }
++
++      l_iDevnum = l_sasemDevice->m_iDevnum;
++      if (debug) printk(DRIVER_NAME "[%d]: s_lirc_set_use_dec\n", 
++                        l_iDevnum);
++
++      if (l_sasemDevice->m_iConnected) {
++
++              /*
++                      URB has been submitted before so it can be unlinked
++              */
++
++              down_interruptible(&l_sasemDevice->m_semLock);
++              usb_unlink_urb(l_sasemDevice->m_urbIn);
++              l_sasemDevice->m_iConnected = 0;
++              up(&l_sasemDevice->m_semLock);
++      }
++}
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_sasem.h linux-2.6.8-rc4/drivers/char/lirc/lirc_sasem.h
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_sasem.h        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_sasem.h     2004-06-19 08:34:35.000000000 +0200
+@@ -0,0 +1,70 @@
++/*
++ * Version Information
++ */
++#define DRIVER_VERSION                "v0.1"
++#define DATE                  "June 2004"
++#define DRIVER_AUTHOR                 "Oliver Stabel <oliver.stabel@gmx.de>"
++#define DRIVER_DESC           "USB Driver for Sasem Remote Controller V1.1"
++#define DRIVER_SHORTDESC      "Sasem"
++#define DRIVER_NAME           "lirc_sasem"
++
++#define BANNER \
++  KERN_INFO DRIVER_SHORTDESC " " DRIVER_VERSION " (" DATE ")\n" \
++  KERN_INFO "   by " DRIVER_AUTHOR "\n"
++
++static const char longbanner[] = {
++      DRIVER_DESC ", " DRIVER_VERSION " (" DATE "), by " DRIVER_AUTHOR
++};
++
++#define MAX_INTERRUPT_DATA 8
++#define SASEM_MINOR 144
++
++static const char sc_cSasemCode[MAX_INTERRUPT_DATA] =
++      { 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
++
++typedef struct usb_driver t_usb_driver, *tp_usb_driver;
++typedef struct usb_device t_usb_device, *tp_usb_device;
++typedef struct usb_interface t_usb_interface, *tp_usb_interface;
++typedef struct usb_device_id t_usb_device_id, *tp_usb_device_id;
++typedef struct usb_host_interface t_usb_host_interface,
++      *tp_usb_host_interface;
++typedef struct usb_interface_descriptor t_usb_interface_descriptor,
++      *tp_usb_interface_descriptor;
++typedef struct usb_endpoint_descriptor t_usb_endpoint_descriptor,
++      *tp_usb_endpoint_descriptor;
++typedef struct urb t_urb, *tp_urb;
++
++typedef struct semaphore t_semaphore, *tp_semaphore;
++
++typedef struct lirc_plugin t_lirc_plugin, *tp_lirc_plugin;
++typedef struct lirc_buffer t_lirc_buffer;
++
++struct sasemDevice {
++      t_usb_device *m_device;
++      t_usb_endpoint_descriptor *m_descriptorIn;
++      t_usb_endpoint_descriptor *m_descriptorOut;
++      t_urb *m_urbIn;
++      t_urb *m_urbOut;
++      unsigned int m_iInterfaceNum;
++      int     m_iDevnum;
++      unsigned char m_cBufferIn[MAX_INTERRUPT_DATA];
++      t_semaphore m_semLock;
++
++      char m_cLastCode[MAX_INTERRUPT_DATA];
++      int m_iCodeSaved;
++      
++      /* lirc */
++      t_lirc_plugin *m_lircPlugin;
++      int m_iConnected;
++};
++
++typedef struct sasemDevice t_sasemDevice, *tp_sasemDevice;
++
++static void* s_sasemProbe(t_usb_device *p_dev, unsigned p_iInterfaceNum,
++                        const t_usb_device_id *p_id);
++static void s_sasemDisconnect(t_usb_device *p_dev, void *p_ptr);
++static void s_sasemCallbackIn(t_urb *p_urb);
++
++static int s_unregister_from_lirc(t_sasemDevice *p_sasemDevice);
++static int s_lirc_set_use_inc(void *p_data);
++static void s_lirc_set_use_dec(void *p_data);
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_serial.c linux-2.6.8-rc4/drivers/char/lirc/lirc_serial.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_serial.c       1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_serial.c    2004-04-24 21:59:07.000000000 +0200
+@@ -0,0 +1,1100 @@
++/*      $Id$      */
++
++/****************************************************************************
++ ** lirc_serial.c ***********************************************************
++ ****************************************************************************
++ *
++ * lirc_serial - Device driver that records pulse- and pause-lengths
++ *               (space-lengths) between DDCD event on a serial port.
++ *
++ * Copyright (C) 1996,97 Ralph Metzler <rjkm@thp.uni-koeln.de>
++ * Copyright (C) 1998 Trent Piepho <xyzzy@u.washington.edu>
++ * Copyright (C) 1998 Ben Pfaff <blp@gnu.org>
++ * Copyright (C) 1999 Christoph Bartelmus <lirc@bartelmus.de>
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ *
++ */
++
++/* Steve's changes to improve transmission fidelity:
++     - for systems with the rdtsc instruction and the clock counter, a 
++       send_pule that times the pulses directly using the counter.
++       This means that the LIRC_SERIAL_TRANSMITTER_LATENCY fudge is
++       not needed. Measurement shows very stable waveform, even where
++       PCI activity slows the access to the UART, which trips up other
++       versions.
++     - For other system, non-integer-microsecond pulse/space lengths,
++       done using fixed point binary. So, much more accurate carrier
++       frequency.
++     - fine tuned transmitter latency, taking advantage of fractional
++       microseconds in previous change
++     - Fixed bug in the way transmitter latency was accounted for by
++       tuning the pulse lengths down - the send_pulse routine ignored
++       this overhead as it timed the overall pulse length - so the
++       pulse frequency was right but overall pulse length was too
++       long. Fixed by accounting for latency on each pulse/space
++       iteration.
++
++   Steve Davies <steve@daviesfam.org>  July 2001
++*/
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++ 
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18)
++#error "**********************************************************"
++#error " Sorry, this driver needs kernel version 2.2.18 or higher "
++#error "**********************************************************"
++#endif
++
++#include <linux/config.h>
++
++#ifndef CONFIG_SERIAL_MODULE
++#warning "******************************************"
++#warning " Your serial port driver is compiled into "
++#warning " the kernel. You will have to release the "
++#warning " port you want to use for LIRC with:      "
++#warning "    setserial /dev/ttySx uart none        "
++#warning "******************************************"
++#endif
++
++#include <linux/module.h>
++#include <linux/errno.h>
++#include <linux/signal.h>
++#include <linux/sched.h>
++#include <linux/fs.h>
++#include <linux/interrupt.h>
++#include <linux/ioport.h>
++#include <linux/kernel.h>
++#include <linux/major.h>
++#include <linux/serial_reg.h>
++#include <linux/time.h>
++#include <linux/string.h>
++#include <linux/types.h>
++#include <linux/wait.h>
++#include <linux/mm.h>
++#include <linux/delay.h>
++#include <linux/poll.h>
++
++#include <asm/system.h>
++#include <asm/segment.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/fcntl.h>
++
++#include <linux/lirc.h>
++#include "kcompat.h"
++#include "lirc_dev.h"
++
++#if defined(LIRC_SERIAL_SOFTCARRIER) && !defined(LIRC_SERIAL_TRANSMITTER)
++#warning "Software carrier only affects transmitting"
++#endif
++
++#if defined(rdtsc)
++
++#define USE_RDTSC
++#warning "Note: using rdtsc instruction"
++#endif
++
++#ifdef LIRC_SERIAL_ANIMAX
++#ifdef LIRC_SERIAL_TRANSMITTER
++#warning "******************************************"
++#warning " This receiver does not have a            "
++#warning " transmitter diode                        "
++#warning "******************************************"
++#endif
++#endif
++
++struct lirc_serial
++{
++      int type;
++      int signal_pin;
++      int signal_pin_change;
++      int on;
++      int off;
++      long (*send_pulse)(unsigned long length);
++      void (*send_space)(long length);
++      int features;
++};
++
++#define LIRC_HOMEBREW        0
++#define LIRC_IRDEO           1
++#define LIRC_IRDEO_REMOTE    2
++#define LIRC_ANIMAX          3
++#define LIRC_IGOR            4
++
++#ifdef LIRC_SERIAL_IRDEO
++int type=LIRC_IRDEO;
++#elif defined(LIRC_SERIAL_IRDEO_REMOTE)
++int type=LIRC_IRDEO_REMOTE;
++#elif defined(LIRC_SERIAL_ANIMAX)
++int type=LIRC_ANIMAX;
++#elif defined(LIRC_SERIAL_IGOR)
++int type=LIRC_IGOR;
++#else
++int type=LIRC_HOMEBREW;
++#endif
++
++#ifdef LIRC_SERIAL_SOFTCARRIER
++int softcarrier=1;
++#else
++int softcarrier=0;
++#endif
++
++/* forward declarations */
++long send_pulse_irdeo(unsigned long length);
++long send_pulse_homebrew(unsigned long length);
++void send_space_irdeo(long length);
++void send_space_homebrew(long length);
++
++struct lirc_serial hardware[]=
++{
++      /* home-brew receiver/transmitter */
++      {
++              LIRC_HOMEBREW,
++              UART_MSR_DCD,
++              UART_MSR_DDCD,
++              UART_MCR_RTS|UART_MCR_OUT2|UART_MCR_DTR,
++              UART_MCR_RTS|UART_MCR_OUT2,
++              send_pulse_homebrew,
++              send_space_homebrew,
++              (
++#ifdef LIRC_SERIAL_TRANSMITTER
++               LIRC_CAN_SET_SEND_DUTY_CYCLE|
++               LIRC_CAN_SET_SEND_CARRIER|
++               LIRC_CAN_SEND_PULSE|
++#endif
++               LIRC_CAN_REC_MODE2)
++      },
++      
++      /* IRdeo classic */
++      {
++              LIRC_IRDEO,
++              UART_MSR_DSR,
++              UART_MSR_DDSR,
++              UART_MCR_OUT2,
++              UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2,
++              send_pulse_irdeo,
++              send_space_irdeo,
++              (LIRC_CAN_SET_SEND_DUTY_CYCLE|
++               LIRC_CAN_SEND_PULSE|
++               LIRC_CAN_REC_MODE2)
++      },
++      
++      /* IRdeo remote */
++      {
++              LIRC_IRDEO_REMOTE,
++              UART_MSR_DSR,
++              UART_MSR_DDSR,
++              UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2,
++              UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2,
++              send_pulse_irdeo,
++              send_space_irdeo,
++              (LIRC_CAN_SET_SEND_DUTY_CYCLE|
++               LIRC_CAN_SEND_PULSE|
++               LIRC_CAN_REC_MODE2)
++      },
++      
++      /* AnimaX */
++      {
++              LIRC_ANIMAX,
++              UART_MSR_DCD,
++              UART_MSR_DDCD,
++              0,
++              UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2,
++              NULL,
++              NULL,
++              LIRC_CAN_REC_MODE2
++      },
++      
++      /* home-brew receiver/transmitter (Igor Cesko's variation) */
++      {
++              LIRC_HOMEBREW,
++              UART_MSR_DSR,
++              UART_MSR_DDSR,
++              UART_MCR_RTS|UART_MCR_OUT2|UART_MCR_DTR,
++              UART_MCR_RTS|UART_MCR_OUT2,
++              send_pulse_homebrew,
++              send_space_homebrew,
++              (
++#ifdef LIRC_SERIAL_TRANSMITTER
++               LIRC_CAN_SET_SEND_DUTY_CYCLE|
++               LIRC_CAN_SET_SEND_CARRIER|
++               LIRC_CAN_SEND_PULSE|
++#endif
++               LIRC_CAN_REC_MODE2)
++      }
++      
++};
++
++#define LIRC_DRIVER_NAME "lirc_serial"
++
++#define RS_ISR_PASS_LIMIT 256
++
++/* A long pulse code from a remote might take upto 300 bytes.  The
++   daemon should read the bytes as soon as they are generated, so take
++   the number of keys you think you can push before the daemon runs
++   and multiply by 300.  The driver will warn you if you overrun this
++   buffer.  If you have a slow computer or non-busmastering IDE disks,
++   maybe you will need to increase this.  */
++
++/* This MUST be a power of two!  It has to be larger than 1 as well. */
++
++#define RBUF_LEN 256
++#define WBUF_LEN 256
++
++static int sense = -1;   /* -1 = auto, 0 = active high, 1 = active low */
++
++static spinlock_t lirc_lock = SPIN_LOCK_UNLOCKED;
++
++static int io = CONFIG_LIRC_PORT_SERIAL;
++static int irq = CONFIG_LIRC_IRQ_SERIAL;
++
++static struct timeval lasttv = {0, 0};
++
++static struct lirc_buffer rbuf;
++
++static lirc_t wbuf[WBUF_LEN];
++
++unsigned int freq = 38000;
++unsigned int duty_cycle = 50;
++
++/* Initialized in init_timing_params() */
++unsigned long period = 0;
++unsigned long pulse_width = 0;
++unsigned long space_width = 0;
++
++#if defined(__i386__)
++/*
++  From:
++  Linux I/O port programming mini-HOWTO
++  Author: Riku Saikkonen <Riku.Saikkonen@hut.fi>
++  v, 28 December 1997
++  
++  [...]
++  Actually, a port I/O instruction on most ports in the 0-0x3ff range
++  takes almost exactly 1 microsecond, so if you're, for example, using
++  the parallel port directly, just do additional inb()s from that port
++  to delay.
++  [...]
++*/
++/* transmitter latency 1.5625us 0x1.90 - this figure arrived at from
++ * comment above plus trimming to match actual measured frequency.
++ * This will be sensitive to cpu speed, though hopefully most of the 1.5us
++ * is spent in the uart access.  Still - for reference test machine was a
++ * 1.13GHz Athlon system - Steve
++ */
++
++/* changed from 400 to 450 as this works better on slower machines;
++   faster machines will use the rdtsc code anyway */
++
++#define LIRC_SERIAL_TRANSMITTER_LATENCY 450
++
++#else
++
++/* does anybody have information on other platforms ? */
++/* 256 = 1<<8 */
++#define LIRC_SERIAL_TRANSMITTER_LATENCY 256
++
++#endif  /* __i386__ */
++
++static inline unsigned int sinp(int offset)
++{
++      return inb(io + offset);
++}
++
++static inline void soutp(int offset, int value)
++{
++      outb(value, io + offset);
++}
++
++static inline void on(void)
++{
++      soutp(UART_MCR,hardware[type].on);
++}
++  
++static inline void off(void)
++{
++      soutp(UART_MCR,hardware[type].off);
++}
++
++#ifndef MAX_UDELAY_MS
++#define MAX_UDELAY_US 5000
++#else
++#define MAX_UDELAY_US (MAX_UDELAY_MS*1000)
++#endif
++
++static inline void safe_udelay(unsigned long usecs)
++{
++      while(usecs>MAX_UDELAY_US)
++      {
++              udelay(MAX_UDELAY_US);
++              usecs-=MAX_UDELAY_US;
++      }
++      udelay(usecs);
++}
++
++#ifdef USE_RDTSC
++/* This is an overflow/precision juggle, complicated in that we can't
++   do long long divide in the kernel */
++
++/* When we use the rdtsc instruction to measure clocks, we keep the
++ * pulse and space widths as clock cycles.  As this is CPU speed
++ * dependent, the widths must be calculated in init_port and ioctl
++ * time
++ */
++
++/* So send_pulse can quickly convert microseconds to clocks */
++unsigned long conv_us_to_clocks = 0;
++
++static inline int init_timing_params(unsigned int new_duty_cycle,
++              unsigned int new_freq)
++{
++      unsigned long long loops_per_sec,work;
++      
++      duty_cycle=new_duty_cycle;
++      freq=new_freq;
++
++      loops_per_sec=current_cpu_data.loops_per_jiffy;
++      loops_per_sec*=HZ;
++      
++      /* How many clocks in a microsecond?, avoiding long long divide */
++      work=loops_per_sec;
++      work*=4295;  /* 4295 = 2^32 / 1e6 */
++      conv_us_to_clocks=(work>>32);
++      
++      /* Carrier period in clocks, approach good up to 32GHz clock,
++           gets carrier frequency within 8Hz */
++      period=loops_per_sec>>3;
++      period/=(freq>>3);
++
++      /* Derive pulse and space from the period */
++
++      pulse_width = period*duty_cycle/100;
++      space_width = period - pulse_width;
++#ifdef DEBUG
++      printk(KERN_INFO LIRC_DRIVER_NAME
++             ": in init_timing_params, freq=%d, duty_cycle=%d, "
++             "clk/jiffy=%ld, pulse=%ld, space=%ld, conv_us_to_clocks=%ld\n",
++             freq, duty_cycle, current_cpu_data.loops_per_jiffy,
++             pulse_width, space_width, conv_us_to_clocks);
++#endif
++      return 0;
++}
++#else /* ! USE_RDTSC */
++static inline int init_timing_params(unsigned int new_duty_cycle,
++              unsigned int new_freq)
++{
++/* period, pulse/space width are kept with 8 binary places -
++ * IE multiplied by 256. */
++      if(256*1000000L/new_freq*new_duty_cycle/100<=
++         LIRC_SERIAL_TRANSMITTER_LATENCY) return(-EINVAL);
++      if(256*1000000L/new_freq*(100-new_duty_cycle)/100<=
++         LIRC_SERIAL_TRANSMITTER_LATENCY) return(-EINVAL);
++      duty_cycle=new_duty_cycle;
++      freq=new_freq;
++      period=256*1000000L/freq;
++      pulse_width=period*duty_cycle/100;
++      space_width=period-pulse_width;
++#ifdef DEBUG
++      printk(KERN_WARNING LIRC_DRIVER_NAME
++             ": in init_timing_params, freq=%d pulse=%ld, "
++             "space=%ld\n", freq, pulse_width, space_width);
++#endif
++      return 0;
++}
++#endif /* USE_RDTSC */
++
++
++/* return value: space length delta */
++
++long send_pulse_irdeo(unsigned long length)
++{
++      long rawbits;
++      int i;
++      unsigned char output;
++      unsigned char chunk,shifted;
++      
++      /* how many bits have to be sent ? */
++      rawbits=length*1152/10000;
++      if(duty_cycle>50) chunk=3;
++      else chunk=1;
++      for(i=0,output=0x7f;rawbits>0;rawbits-=3)
++      {
++              shifted=chunk<<(i*3);
++              shifted>>=1;
++              output&=(~shifted);
++              i++;
++              if(i==3)
++              {
++                      soutp(UART_TX,output);
++                      while(!(sinp(UART_LSR) & UART_LSR_THRE));
++                      output=0x7f;
++                      i=0;
++              }
++      }
++      if(i!=0)
++      {
++              soutp(UART_TX,output);
++              while(!(sinp(UART_LSR) & UART_LSR_TEMT));
++      }
++
++      if(i==0)
++      {
++              return((-rawbits)*10000/1152);
++      }
++      else
++      {
++              return((3-i)*3*10000/1152+(-rawbits)*10000/1152);
++      }
++}
++
++#ifdef USE_RDTSC
++/* Version that uses Pentium rdtsc instruction to measure clocks */
++
++/* This version does sub-microsecond timing using rdtsc instruction,
++ * and does away with the fudged LIRC_SERIAL_TRANSMITTER_LATENCY
++ * Implicitly i586 architecture...  - Steve
++ */
++
++static inline long send_pulse_homebrew_softcarrier(unsigned long length)
++{
++      int flag;
++      unsigned long target, start, now;
++
++      /* Get going quick as we can */
++      rdtscl(start);on();
++      /* Convert length from microseconds to clocks */
++      length*=conv_us_to_clocks;
++      /* And loop till time is up - flipping at right intervals */
++      now=start;
++      target=pulse_width;
++      flag=1;
++      while((now-start)<length)
++      {
++              /* Delay till flip time */
++              do
++              {
++                      rdtscl(now);
++              }
++              while ((now-start)<target);
++              /* flip */
++              if(flag)
++              {
++                      rdtscl(now);off();
++                      target+=space_width;
++              }
++              else
++              {
++                      rdtscl(now);on();
++                      target+=pulse_width;
++              }
++              flag=!flag;
++      }
++      rdtscl(now);
++      return(((now-start)-length)/conv_us_to_clocks);
++}
++#else /* ! USE_RDTSC */
++/* Version using udelay() */
++
++/* here we use fixed point arithmetic, with 8
++   fractional bits.  that gets us within 0.1% or so of the right average
++   frequency, albeit with some jitter in pulse length - Steve */
++
++/* To match 8 fractional bits used for pulse/space length */
++
++static inline long send_pulse_homebrew_softcarrier(unsigned long length)
++{
++      int flag;
++      unsigned long actual, target, d;
++      length<<=8;
++
++      actual=target=0; flag=0;
++      while(actual<length)
++      {
++              if(flag)
++              {
++                      off();
++                      target+=space_width;
++              }
++              else
++              {
++                      on();
++                      target+=pulse_width;
++              }
++              d=(target-actual-LIRC_SERIAL_TRANSMITTER_LATENCY+128)>>8;
++              /* Note - we've checked in ioctl that the pulse/space
++                 widths are big enough so that d is > 0 */
++              udelay(d);
++              actual+=(d<<8)+LIRC_SERIAL_TRANSMITTER_LATENCY;
++              flag=!flag;
++      }
++      return((actual-length)>>8);
++}
++#endif /* USE_RDTSC */
++
++long send_pulse_homebrew(unsigned long length)
++{
++      if(length<=0) return 0;
++      if(softcarrier)
++      {
++              return send_pulse_homebrew_softcarrier(length);
++      }
++      else
++      {
++              on();
++              safe_udelay(length);
++              return(0);
++      }
++}
++
++void send_space_irdeo(long length)
++{
++      if(length<=0) return;
++      safe_udelay(length);
++}
++
++void send_space_homebrew(long length)
++{
++        off();
++      if(length<=0) return;
++      safe_udelay(length);
++}
++
++static void inline rbwrite(lirc_t l)
++{
++      if(lirc_buffer_full(&rbuf))    /* no new signals will be accepted */
++      {
++#               ifdef DEBUG
++              printk(KERN_WARNING  LIRC_DRIVER_NAME  ": Buffer overrun\n");
++#               endif
++              return;
++      }
++      _lirc_buffer_write_1(&rbuf, (void *)&l);
++}
++
++static void inline frbwrite(lirc_t l)
++{
++      /* simple noise filter */
++      static lirc_t pulse=0L,space=0L;
++      static unsigned int ptr=0;
++      
++      if(ptr>0 && (l&PULSE_BIT))
++      {
++              pulse+=l&PULSE_MASK;
++              if(pulse>250)
++              {
++                      rbwrite(space);
++                      rbwrite(pulse|PULSE_BIT);
++                      ptr=0;
++                      pulse=0;
++              }
++              return;
++      }
++      if(!(l&PULSE_BIT))
++      {
++              if(ptr==0)
++              {
++                      if(l>20000)
++                      {
++                              space=l;
++                              ptr++;
++                              return;
++                      }
++              }
++              else
++              {
++                      if(l>20000)
++                      {
++                              space+=pulse;
++                              if(space>PULSE_MASK) space=PULSE_MASK;
++                              space+=l;
++                              if(space>PULSE_MASK) space=PULSE_MASK;
++                              pulse=0;
++                              return;
++                      }
++                      rbwrite(space);
++                      rbwrite(pulse|PULSE_BIT);
++                      ptr=0;
++                      pulse=0;
++              }
++      }
++      rbwrite(l);
++}
++
++irqreturn_t irq_handler(int i, void *blah, struct pt_regs *regs)
++{
++      struct timeval tv;
++      int status,counter,dcd;
++      long deltv;
++      lirc_t data;
++      
++      counter=0;
++      do{
++              counter++;
++              status=sinp(UART_MSR);
++              if(counter>RS_ISR_PASS_LIMIT)
++              {
++                      printk(KERN_WARNING LIRC_DRIVER_NAME ": AIEEEE: "
++                             "We're caught!\n");
++                      break;
++              }
++              if((status&hardware[type].signal_pin_change) && sense!=-1)
++              {
++                      /* get current time */
++                      do_gettimeofday(&tv);
++                      
++                      /* New mode, written by Trent Piepho 
++                         <xyzzy@u.washington.edu>. */
++                      
++                      /* The old format was not very portable.
++                         We now use the type lirc_t to pass pulses
++                         and spaces to user space.
++                         
++                         If PULSE_BIT is set a pulse has been
++                         received, otherwise a space has been
++                         received.  The driver needs to know if your
++                         receiver is active high or active low, or
++                         the space/pulse sense could be
++                         inverted. The bits denoted by PULSE_MASK are
++                         the length in microseconds. Lengths greater
++                         than or equal to 16 seconds are clamped to
++                         PULSE_MASK.  All other bits are unused.
++                         This is a much simpler interface for user
++                         programs, as well as eliminating "out of
++                         phase" errors with space/pulse
++                         autodetection. */
++
++                      /* calculate time since last interrupt in
++                         microseconds */
++                      dcd=(status & hardware[type].signal_pin) ? 1:0;
++                      
++                      deltv=tv.tv_sec-lasttv.tv_sec;
++                      if(deltv>15) 
++                      {
++#ifdef DEBUG
++                              printk(KERN_WARNING LIRC_DRIVER_NAME
++                                     ": AIEEEE: %d %d %lx %lx %lx %lx\n",
++                                     dcd,sense,
++                                     tv.tv_sec,lasttv.tv_sec,
++                                     tv.tv_usec,lasttv.tv_usec);
++#endif
++                              data=PULSE_MASK; /* really long time */
++                              if(!(dcd^sense)) /* sanity check */
++                              {
++                                      /* detecting pulse while this
++                                         MUST be a space! */
++                                      sense=sense ? 0:1;
++                              }
++                      }
++                      else
++                      {
++                              data=(lirc_t) (deltv*1000000+
++                                             tv.tv_usec-
++                                             lasttv.tv_usec);
++                      };
++                      if(tv.tv_sec<lasttv.tv_sec ||
++                         (tv.tv_sec==lasttv.tv_sec &&
++                          tv.tv_usec<lasttv.tv_usec))
++                      {
++                              printk(KERN_WARNING LIRC_DRIVER_NAME
++                                     ": AIEEEE: your clock just jumped "
++                                     "backwards\n");
++                              printk(KERN_WARNING LIRC_DRIVER_NAME
++                                     ": %d %d %lx %lx %lx %lx\n",
++                                     dcd,sense,
++                                     tv.tv_sec,lasttv.tv_sec,
++                                     tv.tv_usec,lasttv.tv_usec);
++                              data=PULSE_MASK;
++                      }
++                      frbwrite(dcd^sense ? data : (data|PULSE_BIT));
++                      lasttv=tv;
++                      wake_up_interruptible(&rbuf.wait_poll);
++              }
++      } while(!(sinp(UART_IIR) & UART_IIR_NO_INT)); /* still pending ? */
++      return IRQ_RETVAL(IRQ_HANDLED);
++}
++
++static DECLARE_WAIT_QUEUE_HEAD(power_supply_queue);
++
++static int init_port(void)
++{
++      unsigned long flags;
++
++        /* Check io region*/
++      
++        if((check_region(io,8))==-EBUSY)
++      {
++              printk(KERN_ERR  LIRC_DRIVER_NAME  
++                     ": port %04x already in use\n", io);
++              printk(KERN_WARNING LIRC_DRIVER_NAME  
++                     ": use 'setserial /dev/ttySX uart none'\n");
++              printk(KERN_WARNING LIRC_DRIVER_NAME  
++                     ": or compile the serial port driver as module and\n");
++              printk(KERN_WARNING LIRC_DRIVER_NAME  
++                     ": make sure this module is loaded first\n");
++              return(-EBUSY);
++      }
++      
++      /* Reserve io region. */
++      request_region(io, 8, LIRC_DRIVER_NAME);
++      
++      local_irq_save(flags);
++      
++      /* Set DLAB 0. */
++      soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB));
++      
++      /* First of all, disable all interrupts */
++      soutp(UART_IER, sinp(UART_IER)&
++            (~(UART_IER_MSI|UART_IER_RLSI|UART_IER_THRI|UART_IER_RDI)));
++      
++      /* Clear registers. */
++      sinp(UART_LSR);
++      sinp(UART_RX);
++      sinp(UART_IIR);
++      sinp(UART_MSR);
++      
++      /* Set line for power source */
++      soutp(UART_MCR, hardware[type].off);
++      
++      /* Clear registers again to be sure. */
++      sinp(UART_LSR);
++      sinp(UART_RX);
++      sinp(UART_IIR);
++      sinp(UART_MSR);
++
++      switch(hardware[type].type)
++      {
++      case LIRC_IRDEO:
++      case LIRC_IRDEO_REMOTE:
++              /* setup port to 7N1 @ 115200 Baud */
++              /* 7N1+start = 9 bits at 115200 ~ 3 bits at 38kHz */
++              
++              /* Set DLAB 1. */
++              soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB);
++              /* Set divisor to 1 => 115200 Baud */
++              soutp(UART_DLM,0);
++              soutp(UART_DLL,1);
++              /* Set DLAB 0 +  7N1 */
++              soutp(UART_LCR,UART_LCR_WLEN7);
++              /* THR interrupt already disabled at this point */
++              break;
++      default:
++              break;
++      }
++      
++      local_irq_restore(flags);
++      
++      /* Initialize pulse/space widths */
++      init_timing_params(duty_cycle, freq);
++
++      /* If pin is high, then this must be an active low receiver. */
++      if(sense==-1)
++      {
++              /* wait 1 sec for the power supply */
++              
++              sleep_on_timeout(&power_supply_queue,HZ);
++              
++              sense=(sinp(UART_MSR) & hardware[type].signal_pin) ? 1:0;
++              printk(KERN_INFO  LIRC_DRIVER_NAME  ": auto-detected active "
++                     "%s receiver\n",sense ? "low":"high");
++      }
++      else
++      {
++              printk(KERN_INFO  LIRC_DRIVER_NAME  ": Manually using active "
++                     "%s receiver\n",sense ? "low":"high");
++      };
++      
++      return 0;
++}
++
++static int set_use_inc(void* data)
++{
++      int result;
++      unsigned long flags;
++      
++      spin_lock(&lirc_lock);
++      if(MOD_IN_USE)
++      {
++              spin_unlock(&lirc_lock);
++              return -EBUSY;
++      }
++      
++      /* Init read buffer. */
++      if (lirc_buffer_init(&rbuf, sizeof(lirc_t), RBUF_LEN) < 0)
++              return -ENOMEM;
++      
++      /* initialize timestamp */
++      do_gettimeofday(&lasttv);
++      
++      result=request_irq(irq,irq_handler,SA_INTERRUPT,LIRC_DRIVER_NAME,NULL);
++      switch(result)
++      {
++      case -EBUSY:
++              printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d busy\n", irq);
++              spin_unlock(&lirc_lock);
++                lirc_buffer_free(&rbuf);
++              return -EBUSY;
++      case -EINVAL:
++              printk(KERN_ERR LIRC_DRIVER_NAME
++                     ": Bad irq number or handler\n");
++              spin_unlock(&lirc_lock);
++                lirc_buffer_free(&rbuf);
++              return -EINVAL;
++      default:
++#               ifdef DEBUG
++              printk(KERN_INFO LIRC_DRIVER_NAME
++                     ": Interrupt %d, port %04x obtained\n", irq, io);
++#               endif
++              break;
++      };
++
++      local_irq_save(flags);
++      
++      /* Set DLAB 0. */
++      soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB));
++      
++      soutp(UART_IER, sinp(UART_IER)|UART_IER_MSI);
++      
++      local_irq_restore(flags);
++      
++      MOD_INC_USE_COUNT;
++      spin_unlock(&lirc_lock);
++      return 0;
++}
++
++static void set_use_dec(void* data)
++{     unsigned long flags;
++      
++      local_irq_save(flags);
++      
++      /* Set DLAB 0. */
++      soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB));
++      
++      /* First of all, disable all interrupts */
++      soutp(UART_IER, sinp(UART_IER)&
++            (~(UART_IER_MSI|UART_IER_RLSI|UART_IER_THRI|UART_IER_RDI)));
++      local_irq_restore(flags);
++      
++      free_irq(irq, NULL);
++#       ifdef DEBUG
++      printk(KERN_INFO  LIRC_DRIVER_NAME  ": freed IRQ %d\n", irq);
++#       endif
++      lirc_buffer_free(&rbuf);
++      
++      MOD_DEC_USE_COUNT;
++}
++
++static ssize_t lirc_write(struct file *file, const char *buf,
++                       size_t n, loff_t * ppos)
++{
++      int retval,i,count;
++      unsigned long flags;
++      long delta=0;
++      
++      if(!(hardware[type].features&LIRC_CAN_SEND_PULSE))
++      {
++              return(-EBADF);
++      }
++      
++      if(n%sizeof(lirc_t)) return(-EINVAL);
++      retval=verify_area(VERIFY_READ,buf,n);
++      if(retval) return(retval);
++      count=n/sizeof(lirc_t);
++      if(count>WBUF_LEN || count%2==0) return(-EINVAL);
++      copy_from_user(wbuf,buf,n);
++      local_irq_save(flags);
++      if(hardware[type].type==LIRC_IRDEO)
++      {
++              /* DTR, RTS down */
++              on();
++      }
++      for(i=0;i<count;i++)
++      {
++              if(i%2) hardware[type].send_space(wbuf[i]-delta);
++              else delta=hardware[type].send_pulse(wbuf[i]);
++      }
++      off();
++      local_irq_restore(flags);
++      return(n);
++}
++
++static int lirc_ioctl(struct inode *node,struct file *filep,unsigned int cmd,
++                    unsigned long arg)
++{
++        int result;
++      unsigned long value;
++      unsigned int ivalue;
++      
++      switch(cmd)
++      {
++      case LIRC_GET_SEND_MODE:
++              if(!(hardware[type].features&LIRC_CAN_SEND_MASK))
++              {
++                      return(-ENOIOCTLCMD);
++              }
++              
++              result=put_user(LIRC_SEND2MODE
++                              (hardware[type].features&LIRC_CAN_SEND_MASK),
++                              (unsigned long *) arg);
++              if(result) return(result); 
++              break;
++              
++      case LIRC_SET_SEND_MODE:
++              if(!(hardware[type].features&LIRC_CAN_SEND_MASK))
++              {
++                      return(-ENOIOCTLCMD);
++              }
++              
++              result=get_user(value,(unsigned long *) arg);
++              if(result) return(result);
++              /* only LIRC_MODE_PULSE supported */
++              if(value!=LIRC_MODE_PULSE) return(-ENOSYS);
++              break;
++              
++      case LIRC_GET_LENGTH:
++              return(-ENOSYS);
++              break;
++              
++      case LIRC_SET_SEND_DUTY_CYCLE:
++#               ifdef DEBUG
++              printk(KERN_WARNING LIRC_DRIVER_NAME ": SET_SEND_DUTY_CYCLE\n");
++#               endif
++              if(!(hardware[type].features&LIRC_CAN_SET_SEND_DUTY_CYCLE))
++              {
++                      return(-ENOIOCTLCMD);
++              }
++              
++              result=get_user(ivalue,(unsigned int *) arg);
++              if(result) return(result);
++              if(ivalue<=0 || ivalue>100) return(-EINVAL);
++              return init_timing_params(ivalue, freq);
++              break;
++              
++      case LIRC_SET_SEND_CARRIER:
++#               ifdef DEBUG
++              printk(KERN_WARNING LIRC_DRIVER_NAME ": SET_SEND_CARRIER\n");
++#               endif
++              if(!(hardware[type].features&LIRC_CAN_SET_SEND_CARRIER))
++              {
++                      return(-ENOIOCTLCMD);
++              }
++              
++              result=get_user(ivalue,(unsigned int *) arg);
++              if(result) return(result);
++              if(ivalue>500000 || ivalue<20000) return(-EINVAL);
++              return init_timing_params(duty_cycle, ivalue);
++              break;
++              
++      default:
++              return(-ENOIOCTLCMD);
++      }
++      return(0);
++}
++
++static struct file_operations lirc_fops =
++{
++      write:   lirc_write,
++};
++
++static struct lirc_plugin plugin = {
++      name:           LIRC_DRIVER_NAME,
++      minor:          -1,
++      code_length:    1,
++      sample_rate:    0,
++      data:           NULL,
++      add_to_buf:     NULL,
++      get_queue:      NULL,
++      rbuf:           &rbuf,
++      set_use_inc:    set_use_inc,
++      set_use_dec:    set_use_dec,
++      ioctl:          lirc_ioctl,
++      fops:           &lirc_fops,
++};
++
++#ifdef MODULE
++
++MODULE_AUTHOR("Ralph Metzler, Trent Piepho, Ben Pfaff, Christoph Bartelmus");
++MODULE_DESCRIPTION("Infra-red receiver driver for serial ports.");
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("GPL");
++#endif
++
++MODULE_PARM(type, "i");
++MODULE_PARM_DESC(type, "Hardware type (0 = home-brew, 1 = IRdeo,"
++               " 2 = IRdeo Remote, 3 = AnimaX, 4 = IgorPlug");
++
++MODULE_PARM(io, "i");
++MODULE_PARM_DESC(io, "I/O address base (0x3f8 or 0x2f8)");
++
++MODULE_PARM(irq, "i");
++MODULE_PARM_DESC(irq, "Interrupt (4 or 3)");
++
++MODULE_PARM(sense, "i");
++MODULE_PARM_DESC(sense, "Override autodetection of IR receiver circuit"
++               " (0 = active high, 1 = active low )");
++
++MODULE_PARM(softcarrier, "i");
++MODULE_PARM_DESC(softcarrier, "Software carrier (0 = off, 1 = on)");
++
++
++#ifndef KERNEL_2_5
++EXPORT_NO_SYMBOLS;
++#endif
++
++int init_module(void)
++{
++      int result;
++      
++      switch(type)
++      {
++      case LIRC_HOMEBREW:
++      case LIRC_IRDEO:
++      case LIRC_IRDEO_REMOTE:
++      case LIRC_ANIMAX:
++      case LIRC_IGOR:
++              break;
++      default:
++              return(-EINVAL);
++      }
++      if(!softcarrier && hardware[type].type==LIRC_HOMEBREW)
++      {
++              hardware[type].features&=~(LIRC_CAN_SET_SEND_DUTY_CYCLE|
++                                         LIRC_CAN_SET_SEND_CARRIER);
++      }
++      if ((result = init_port()) < 0)
++              return result;
++      plugin.features = hardware[type].features;
++      if ((plugin.minor = lirc_register_plugin(&plugin)) < 0) {
++              printk(KERN_ERR  LIRC_DRIVER_NAME  
++                     ": register_chrdev failed!\n");
++              release_region(io, 8);
++              return -EIO;
++      }
++      return 0;
++}
++
++void cleanup_module(void)
++{
++      release_region(io, 8);
++      lirc_unregister_plugin(plugin.minor);
++#       ifdef DEBUG
++      printk(KERN_INFO  LIRC_DRIVER_NAME  ": cleaned up module\n");
++#       endif
++}
++
++#endif
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_sir.c linux-2.6.8-rc4/drivers/char/lirc/lirc_sir.c
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/lirc_sir.c  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/lirc_sir.c       2004-04-27 20:28:16.000000000 +0200
+@@ -0,0 +1,1321 @@
++/*
++ * LIRC SIR driver, (C) 2000 Milan Pikula <www@fornax.sk>
++ *
++ * lirc_sir - Device driver for use with SIR (serial infra red)
++ * mode of IrDA on many notebooks.
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ *
++ *
++ * 2000/09/16 Frank Przybylski <mail@frankprzybylski.de> :
++ *  added timeout and relaxed pulse detection, removed gap bug
++ *
++ * 2000/12/15 Christoph Bartelmus <lirc@bartelmus.de> : 
++ *   added support for Tekram Irmate 210 (sending does not work yet,
++ *   kind of disappointing that nobody was able to implement that
++ *   before),
++ *   major clean-up
++ *
++ * 2001/02/27 Christoph Bartelmus <lirc@bartelmus.de> : 
++ *   added support for StrongARM SA1100 embedded microprocessor
++ *   parts cut'n'pasted from sa1100_ir.c (C) 2000 Russell King
++ */
++
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18)
++#error "**********************************************************"
++#error " Sorry, this driver needs kernel version 2.2.18 or higher "
++#error "**********************************************************"
++#endif
++#include <linux/module.h>
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++ 
++#include <linux/config.h>
++
++#if !defined(LIRC_ON_SA1100) && !defined(CONFIG_SERIAL_MODULE)
++#warning "******************************************"
++#warning " Your serial port driver is compiled into "
++#warning " the kernel. You will have to release the "
++#warning " port you want to use for LIRC with:      "
++#warning "    setserial /dev/ttySx uart none        "
++#warning "******************************************"
++#endif
++
++#include <linux/sched.h>
++#include <linux/errno.h>
++#include <linux/signal.h>
++#include <linux/fs.h>
++#include <linux/interrupt.h>
++#include <linux/ioport.h>
++#include <linux/kernel.h>
++#include <linux/major.h>
++#include <linux/serial_reg.h>
++#include <linux/time.h>
++#include <linux/string.h>
++#include <linux/types.h>
++#include <linux/wait.h>
++#include <linux/mm.h>
++#include <linux/delay.h>
++#include <linux/poll.h>
++#include <asm/system.h>
++#include <asm/segment.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/fcntl.h>
++#ifdef LIRC_ON_SA1100
++#include <asm/hardware.h>
++#ifdef CONFIG_SA1100_COLLIE
++#include <asm/arch/tc35143.h>
++#include <asm/ucb1200.h>
++#endif
++#endif
++
++#include <linux/timer.h>
++
++#include <linux/lirc.h>
++#include "lirc_dev.h"
++#include "kcompat.h"
++
++/* SECTION: Definitions */
++
++/**************************** Tekram dongle ***************************/
++#ifdef LIRC_SIR_TEKRAM
++/* stolen from kernel source */
++/* definitions for Tekram dongle */
++#define TEKRAM_115200 0x00
++#define TEKRAM_57600  0x01
++#define TEKRAM_38400  0x02
++#define TEKRAM_19200  0x03
++#define TEKRAM_9600   0x04
++#define TEKRAM_2400   0x08
++
++#define TEKRAM_PW 0x10 /* Pulse select bit */
++
++/* 10bit * 1s/115200bit in milli seconds = 87ms*/
++#define TIME_CONST (10000000ul/115200ul)
++
++#endif
++
++#ifdef LIRC_SIR_ACTISYS_ACT200L
++static void init_act200(void);
++#endif
++
++/******************************* SA1100 ********************************/
++#ifdef LIRC_ON_SA1100
++struct sa1100_ser2_registers
++{
++      /* HSSP control register */
++      unsigned char hscr0;
++      /* UART registers */
++      unsigned char utcr0;
++      unsigned char utcr1;
++      unsigned char utcr2;
++      unsigned char utcr3;
++      unsigned char utcr4;
++      unsigned char utdr;
++      unsigned char utsr0;
++      unsigned char utsr1;
++} sr;
++
++static int irq=IRQ_Ser2ICP;
++
++#define LIRC_ON_SA1100_TRANSMITTER_LATENCY 0
++
++/* pulse/space ratio of 50/50 */
++unsigned long pulse_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY);
++/* 1000000/freq-pulse_width */
++unsigned long space_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY);
++unsigned int freq = 38000;      /* modulation frequency */
++unsigned int duty_cycle = 50;   /* duty cycle of 50% */
++
++#endif
++
++#define RBUF_LEN 1024
++#define WBUF_LEN 1024
++
++#define LIRC_DRIVER_NAME "lirc_sir"
++
++#ifndef LIRC_SIR_TEKRAM
++#define PULSE '['
++
++/* 9bit * 1s/115200bit in milli seconds = 78.125ms*/
++#define TIME_CONST (9000000ul/115200ul)
++#endif
++
++
++/* timeout for sequences in jiffies (=5/100s) */
++/* must be longer than TIME_CONST */
++#define SIR_TIMEOUT   (HZ*5/100)
++
++#ifndef LIRC_ON_SA1100
++static int io = CONFIG_LIRC_PORT_SIR;
++static int irq = CONFIG_LIRC_IRQ_SIR;
++static int threshold = 3;
++#endif
++
++static spinlock_t timer_lock = SPIN_LOCK_UNLOCKED;
++static struct timer_list timerlist;
++/* time of last signal change detected */
++static struct timeval last_tv = {0, 0};
++/* time of last UART data ready interrupt */
++static struct timeval last_intr_tv = {0, 0};
++static int last_value = 0;
++
++static DECLARE_WAIT_QUEUE_HEAD(lirc_read_queue);
++
++static spinlock_t hardware_lock = SPIN_LOCK_UNLOCKED;
++static spinlock_t dev_lock = SPIN_LOCK_UNLOCKED;
++
++static lirc_t rx_buf[RBUF_LEN]; unsigned int rx_tail = 0, rx_head = 0;
++#ifndef LIRC_SIR_TEKRAM
++static lirc_t tx_buf[WBUF_LEN];
++#endif
++
++/* SECTION: Prototypes */
++
++/* Communication with user-space */
++static int lirc_open(struct inode * inode, struct file * file);
++static int lirc_close(struct inode * inode, struct file *file);
++static unsigned int lirc_poll(struct file * file, poll_table * wait);
++static ssize_t lirc_read(struct file * file, char * buf, size_t count,
++              loff_t * ppos);
++static ssize_t lirc_write(struct file * file, const char * buf, size_t n, loff_t * pos);
++static int lirc_ioctl(struct inode *node,struct file *filep,unsigned int cmd,
++              unsigned long arg);
++static void add_read_queue(int flag, unsigned long val);
++#ifdef MODULE
++static int init_chrdev(void);
++static void drop_chrdev(void);
++#endif
++      /* Hardware */
++static irqreturn_t sir_interrupt(int irq, void * dev_id,
++                               struct pt_regs * regs);
++#ifndef LIRC_SIR_TEKRAM
++static void send_space(unsigned long len);
++static void send_pulse(unsigned long len);
++#endif
++static int init_hardware(void);
++static void drop_hardware(void);
++      /* Initialisation */
++static int init_port(void);
++static void drop_port(void);
++int init_module(void);
++void cleanup_module(void);
++
++#ifdef LIRC_ON_SA1100
++void inline on(void)
++{
++      PPSR|=PPC_TXD2;
++}
++  
++void inline off(void)
++{
++      PPSR&=~PPC_TXD2;
++}
++#else
++static inline unsigned int sinp(int offset)
++{
++      return inb(io + offset);
++}
++
++static inline void soutp(int offset, int value)
++{
++      outb(value, io + offset);
++}
++#endif
++
++#ifndef MAX_UDELAY_MS
++#define MAX_UDELAY_US 5000
++#else
++#define MAX_UDELAY_US (MAX_UDELAY_MS*1000)
++#endif
++
++static inline void safe_udelay(unsigned long usecs)
++{
++      while(usecs>MAX_UDELAY_US)
++      {
++              udelay(MAX_UDELAY_US);
++              usecs-=MAX_UDELAY_US;
++      }
++      udelay(usecs);
++}
++
++/* SECTION: Communication with user-space */
++
++static int lirc_open(struct inode * inode, struct file * file)
++{
++      spin_lock(&dev_lock);
++      if (MOD_IN_USE) {
++              spin_unlock(&dev_lock);
++              return -EBUSY;
++      }
++      MOD_INC_USE_COUNT;
++      spin_unlock(&dev_lock);
++      return 0;
++}
++
++static int lirc_close(struct inode * inode, struct file *file)
++{
++      MOD_DEC_USE_COUNT;
++      return 0;
++}
++
++static unsigned int lirc_poll(struct file * file, poll_table * wait)
++{
++      poll_wait(file, &lirc_read_queue, wait);
++      if (rx_head != rx_tail)
++              return POLLIN | POLLRDNORM;
++      return 0;
++}
++
++static ssize_t lirc_read(struct file * file, char * buf, size_t count,
++              loff_t * ppos)
++{
++      int n=0;
++      int retval = 0;
++      DECLARE_WAITQUEUE(wait,current);
++      
++      if(n%sizeof(lirc_t)) return(-EINVAL);
++      
++      add_wait_queue(&lirc_read_queue,&wait);
++      current->state=TASK_INTERRUPTIBLE;
++      while(n<count)
++      {
++              if(rx_head!=rx_tail)
++              {
++                      retval=verify_area(VERIFY_WRITE,
++                                         (void *) buf+n,sizeof(lirc_t));
++                      if (retval)
++                      {
++                              return retval;
++                      }
++                      copy_to_user((void *) buf+n,(void *) (rx_buf+rx_head),
++                                   sizeof(lirc_t));
++                      rx_head=(rx_head+1)&(RBUF_LEN-1);
++                      n+=sizeof(lirc_t);
++              }
++              else
++              {
++                      if(file->f_flags & O_NONBLOCK)
++                      {
++                              retval=-EAGAIN;
++                              break;
++                      }
++                      if(signal_pending(current))
++                      {
++                              retval=-ERESTARTSYS;
++                              break;
++                      }
++                      schedule();
++                      current->state=TASK_INTERRUPTIBLE;
++              }
++      }
++      remove_wait_queue(&lirc_read_queue,&wait);
++      current->state=TASK_RUNNING;
++      return (n ? n : retval);
++}
++static ssize_t lirc_write(struct file * file, const char * buf, size_t n, loff_t * pos)
++{
++      unsigned long flags;
++#ifdef LIRC_SIR_TEKRAM
++      return(-EBADF);
++#else
++      int i;
++      int retval;
++
++        if(n%sizeof(lirc_t) || (n/sizeof(lirc_t)) > WBUF_LEN)
++              return(-EINVAL);
++      retval = verify_area(VERIFY_READ, buf, n);
++      if (retval)
++              return retval;
++      copy_from_user(tx_buf, buf, n);
++      i = 0;
++      n/=sizeof(lirc_t);
++#ifdef LIRC_ON_SA1100
++      /* disable receiver */
++      Ser2UTCR3=0;
++#endif
++      local_irq_save(flags);
++      while (1) {
++              if (i >= n)
++                      break;
++              if (tx_buf[i])
++                      send_pulse(tx_buf[i]);
++              i++;
++              if (i >= n)
++                      break;
++              if (tx_buf[i])
++                      send_space(tx_buf[i]);
++              i++;
++      }
++      local_irq_restore(flags);
++#ifdef LIRC_ON_SA1100
++      off();
++      udelay(1000); /* wait 1ms for IR diode to recover */
++      Ser2UTCR3=0;
++      /* clear status register to prevent unwanted interrupts */
++      Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
++      /* enable receiver */
++      Ser2UTCR3=UTCR3_RXE|UTCR3_RIE;
++#endif
++      return n;
++#endif
++}
++
++static int lirc_ioctl(struct inode *node,struct file *filep,unsigned int cmd,
++              unsigned long arg)
++{
++      int retval = 0;
++      unsigned long value = 0;
++#ifdef LIRC_ON_SA1100
++      unsigned int ivalue;
++#endif
++
++#ifdef LIRC_SIR_TEKRAM
++      if (cmd == LIRC_GET_FEATURES)
++              value = LIRC_CAN_REC_MODE2;
++      else if (cmd == LIRC_GET_SEND_MODE)
++              value = 0;
++      else if (cmd == LIRC_GET_REC_MODE)
++              value = LIRC_MODE_MODE2;
++#elif defined(LIRC_ON_SA1100)
++      if (cmd == LIRC_GET_FEATURES)
++              value = LIRC_CAN_SEND_PULSE |
++                      LIRC_CAN_SET_SEND_DUTY_CYCLE |
++                      LIRC_CAN_SET_SEND_CARRIER |
++                      LIRC_CAN_REC_MODE2;
++      else if (cmd == LIRC_GET_SEND_MODE)
++              value = LIRC_MODE_PULSE;
++      else if (cmd == LIRC_GET_REC_MODE)
++              value = LIRC_MODE_MODE2;
++#else
++      if (cmd == LIRC_GET_FEATURES)
++              value = LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2;
++      else if (cmd == LIRC_GET_SEND_MODE)
++              value = LIRC_MODE_PULSE;
++      else if (cmd == LIRC_GET_REC_MODE)
++              value = LIRC_MODE_MODE2;
++#endif
++
++      switch (cmd) {
++      case LIRC_GET_FEATURES:
++      case LIRC_GET_SEND_MODE:
++      case LIRC_GET_REC_MODE:
++              retval = put_user(value, (unsigned long *) arg);
++              break;
++
++      case LIRC_SET_SEND_MODE:
++      case LIRC_SET_REC_MODE:
++              retval = get_user(value, (unsigned long *) arg);
++              break;
++#ifdef LIRC_ON_SA1100
++      case LIRC_SET_SEND_DUTY_CYCLE:
++              retval=get_user(ivalue,(unsigned int *) arg);
++              if(retval) return(retval);
++              if(ivalue<=0 || ivalue>100) return(-EINVAL);
++              /* (ivalue/100)*(1000000/freq) */
++              duty_cycle=ivalue;
++              pulse_width=(unsigned long) duty_cycle*10000/freq;
++              space_width=(unsigned long) 1000000L/freq-pulse_width;
++              if(pulse_width>=LIRC_ON_SA1100_TRANSMITTER_LATENCY)
++                      pulse_width-=LIRC_ON_SA1100_TRANSMITTER_LATENCY;
++              if(space_width>=LIRC_ON_SA1100_TRANSMITTER_LATENCY)
++                      space_width-=LIRC_ON_SA1100_TRANSMITTER_LATENCY;
++              break;
++      case LIRC_SET_SEND_CARRIER:
++              retval=get_user(ivalue,(unsigned int *) arg);
++              if(retval) return(retval);
++              if(ivalue>500000 || ivalue<20000) return(-EINVAL);
++              freq=ivalue;
++              pulse_width=(unsigned long) duty_cycle*10000/freq;
++              space_width=(unsigned long) 1000000L/freq-pulse_width;
++              if(pulse_width>=LIRC_ON_SA1100_TRANSMITTER_LATENCY)
++                      pulse_width-=LIRC_ON_SA1100_TRANSMITTER_LATENCY;
++              if(space_width>=LIRC_ON_SA1100_TRANSMITTER_LATENCY)
++                      space_width-=LIRC_ON_SA1100_TRANSMITTER_LATENCY;
++              break;
++#endif
++      default:
++              retval = -ENOIOCTLCMD;
++
++      }
++      
++      if (retval)
++              return retval;
++      
++#ifdef LIRC_SIR_TEKRAM
++      if (cmd == LIRC_SET_REC_MODE) {
++              if (value != LIRC_MODE_MODE2)
++                      retval = -ENOSYS;
++      } else if (cmd == LIRC_SET_SEND_MODE) {
++              retval = -ENOSYS;
++      }
++#else
++      if (cmd == LIRC_SET_REC_MODE) {
++              if (value != LIRC_MODE_MODE2)
++                      retval = -ENOSYS;
++      } else if (cmd == LIRC_SET_SEND_MODE) {
++              if (value != LIRC_MODE_PULSE)
++                      retval = -ENOSYS;
++      }
++#endif
++      return retval;
++}
++
++static void add_read_queue(int flag, unsigned long val)
++{
++      unsigned int new_rx_tail;
++      lirc_t newval;
++
++#ifdef DEBUG_SIGNAL
++      printk(KERN_DEBUG LIRC_DRIVER_NAME
++              ": add flag %d with val %lu\n",
++              flag,val);
++#endif
++
++      newval = val & PULSE_MASK;
++
++      /* statistically pulses are ~TIME_CONST/2 too long: we could
++         maybe make this more exactly but this is good enough */
++      if(flag) /* pulse */
++      {
++              if(newval>TIME_CONST/2)
++              {
++                      newval-=TIME_CONST/2;
++              }
++              else /* should not ever happen */
++              {
++                      newval=1;
++              }
++              newval|=PULSE_BIT;
++      }
++      else
++      {
++              newval+=TIME_CONST/2;
++      }
++      new_rx_tail = (rx_tail + 1) & (RBUF_LEN - 1);
++      if (new_rx_tail == rx_head) {
++#               ifdef DEBUG
++              printk(KERN_WARNING LIRC_DRIVER_NAME ": Buffer overrun.\n");
++#               endif
++              return;
++      }
++      rx_buf[rx_tail] = newval;
++      rx_tail = new_rx_tail;
++      wake_up_interruptible(&lirc_read_queue);
++}
++
++static struct file_operations lirc_fops =
++{
++      read:    lirc_read,
++      write:   lirc_write,
++      poll:    lirc_poll,
++      ioctl:   lirc_ioctl,
++      open:    lirc_open,
++      release: lirc_close,
++};
++
++static int set_use_inc(void* data)
++{
++#if WE_DONT_USE_LOCAL_OPEN_CLOSE
++      MOD_INC_USE_COUNT;
++#endif
++       return 0;
++}
++
++static void set_use_dec(void* data)
++{
++#if WE_DONT_USE_LOCAL_OPEN_CLOSE
++      MOD_DEC_USE_COUNT;
++#endif
++}
++static struct lirc_plugin plugin = {
++       name:           LIRC_DRIVER_NAME,
++       minor:          -1,
++       code_length:    1,
++       sample_rate:    0,
++       data:           NULL,
++       add_to_buf:     NULL,
++       get_queue:      NULL,
++       set_use_inc:    set_use_inc,
++       set_use_dec:    set_use_dec,
++       fops:           &lirc_fops,
++};
++
++
++#ifdef MODULE
++int init_chrdev(void)
++{
++      plugin.minor = lirc_register_plugin(&plugin);
++      if (plugin.minor < 0) {
++              printk(KERN_ERR LIRC_DRIVER_NAME ": init_chrdev() failed.\n");
++              return -EIO;
++      }
++      return 0;
++}
++
++static void drop_chrdev(void)
++{
++      lirc_unregister_plugin(plugin.minor);
++}
++#endif
++
++/* SECTION: Hardware */
++static long delta(struct timeval * tv1, struct timeval * tv2)
++{
++      unsigned long deltv;
++      
++      deltv = tv2->tv_sec - tv1->tv_sec;
++      if (deltv > 15)
++              deltv = 0xFFFFFF;
++      else
++              deltv = deltv*1000000 +
++                      tv2->tv_usec -
++                      tv1->tv_usec;
++      return deltv;
++}
++
++static void sir_timeout(unsigned long data) 
++{
++      /* if last received signal was a pulse, but receiving stopped
++         within the 9 bit frame, we need to finish this pulse and
++         simulate a signal change to from pulse to space. Otherwise
++         upper layers will receive two sequences next time. */
++      
++      unsigned long flags;
++      unsigned long pulse_end;
++      
++      /* avoid interference with interrupt */
++      spin_lock_irqsave(&timer_lock, flags);
++      if (last_value)
++      {
++#ifndef LIRC_ON_SA1100
++              /* clear unread bits in UART and restart */
++              outb(UART_FCR_CLEAR_RCVR, io + UART_FCR);
++#endif
++              /* determine 'virtual' pulse end: */
++              pulse_end = delta(&last_tv, &last_intr_tv);
++#ifdef DEBUG_SIGNAL
++              printk(KERN_DEBUG LIRC_DRIVER_NAME
++                      ": timeout add %d for %lu usec\n",last_value,pulse_end);
++#endif
++              add_read_queue(last_value,pulse_end);
++              last_value = 0;
++              last_tv=last_intr_tv;
++      }
++      spin_unlock_irqrestore(&timer_lock, flags);             
++}
++
++static irqreturn_t sir_interrupt(int irq, void * dev_id,
++                               struct pt_regs * regs)
++{
++      unsigned char data;
++      struct timeval curr_tv;
++      static unsigned long deltv;
++#ifdef LIRC_ON_SA1100
++      int status;
++      static int n=0;
++      
++      //printk("interrupt\n");
++      status = Ser2UTSR0;
++      /*
++       * Deal with any receive errors first.  The bytes in error may be
++       * the only bytes in the receive FIFO, so we do this first.
++       */
++      while (status & UTSR0_EIF)
++      {
++              int bstat;
++              
++#ifdef DEBUG
++              printk("EIF\n");
++              bstat = Ser2UTSR1;
++              
++              if (bstat & UTSR1_FRE)
++                      printk("frame error\n");
++              if (bstat & UTSR1_ROR)
++                      printk("receive fifo overrun\n");
++              if(bstat&UTSR1_PRE)
++                      printk("parity error\n");
++#endif
++              
++              bstat = Ser2UTDR;
++              n++;
++              status = Ser2UTSR0;
++      }
++
++      if (status & (UTSR0_RFS | UTSR0_RID))
++      {
++              do_gettimeofday(&curr_tv);
++              deltv = delta(&last_tv, &curr_tv);
++              do
++              {
++#ifdef DEBUG_SIGNAL
++                      printk(KERN_DEBUG LIRC_DRIVER_NAME": t %lu , d %d\n",
++                             deltintrtv,(int)data);
++#endif
++                      data=Ser2UTDR;
++                      //printk("data: %d\n",data);
++                      n++;
++              }
++              while(status&UTSR0_RID && /* do not empty fifo in
++                                             order to get UTSR0_RID in
++                                             any case */
++                    Ser2UTSR1 & UTSR1_RNE); /* data ready */
++              
++              if(status&UTSR0_RID)
++              {
++                      //printk("add\n");
++                      add_read_queue(0,deltv-n*TIME_CONST); /*space*/
++                      add_read_queue(1,n*TIME_CONST); /*pulse*/
++                      n=0;
++                      last_tv=curr_tv;
++              }
++      }
++
++      if (status & UTSR0_TFS) {
++
++              printk("transmit fifo not full, shouldn't ever happen\n");
++      }
++
++      /*
++       * We must clear certain bits.
++       */
++      status &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
++      if (status)
++              Ser2UTSR0 = status;
++#else
++      unsigned long deltintrtv;
++      unsigned long flags;
++      int iir, lsr;
++
++      while ((iir = inb(io + UART_IIR) & UART_IIR_ID)) {
++              switch (iir&UART_IIR_ID) { /* FIXME toto treba preriedit */
++              case UART_IIR_MSI:
++                      (void) inb(io + UART_MSR);
++                      break;
++              case UART_IIR_RLSI:
++                      (void) inb(io + UART_LSR);
++                      break;
++              case UART_IIR_THRI:
++#if 0
++                      if (lsr & UART_LSR_THRE) /* FIFO is empty */
++                              outb(data, io + UART_TX)
++#endif
++                      break;
++              case UART_IIR_RDI:
++                      /* avoid interference with timer */
++                      spin_lock_irqsave(&timer_lock, flags);
++                      do
++                      {
++                              del_timer(&timerlist);
++                              data = inb(io + UART_RX);
++                              do_gettimeofday(&curr_tv);
++                              deltv = delta(&last_tv, &curr_tv);
++                              deltintrtv = delta(&last_intr_tv, &curr_tv);
++#ifdef DEBUG_SIGNAL
++                              printk(KERN_DEBUG LIRC_DRIVER_NAME": t %lu , d %d\n",deltintrtv,(int)data);
++#endif
++                              /* if nothing came in last X cycles,
++                                 it was gap */
++                              if (deltintrtv > TIME_CONST * threshold) {
++                                      if (last_value) {
++#ifdef DEBUG_SIGNAL
++                                              printk(KERN_DEBUG LIRC_DRIVER_NAME ": GAP\n");
++#endif
++                                              /* simulate signal change */
++                                              add_read_queue(last_value,
++                                                             deltv-
++                                                             deltintrtv);
++                                              last_value = 0;
++                                              last_tv.tv_sec = last_intr_tv.tv_sec;
++                                              last_tv.tv_usec = last_intr_tv.tv_usec;
++                                              deltv = deltintrtv;
++                                      }
++                              }
++                              data = 1;
++                              if (data ^ last_value) {
++                                      /* deltintrtv > 2*TIME_CONST,
++                                           remember ? */
++                                      /* the other case is timeout */
++                                      add_read_queue(last_value,
++                                                     deltv-TIME_CONST);
++                                      last_value = data;
++                                      last_tv = curr_tv;
++                                      if(last_tv.tv_usec>=TIME_CONST)
++                                      {
++                                              last_tv.tv_usec-=TIME_CONST;
++                                      }
++                                      else
++                                      {
++                                              last_tv.tv_sec--;
++                                              last_tv.tv_usec+=1000000-
++                                                      TIME_CONST;
++                                      }
++                              }
++                              last_intr_tv = curr_tv;
++                              if (data)
++                              {
++                                      /* start timer for end of sequence detection */
++                                      timerlist.expires = jiffies + SIR_TIMEOUT;
++                                      add_timer(&timerlist);
++                              }
++                      }
++                      while ((lsr = inb(io + UART_LSR))
++                              & UART_LSR_DR); /* data ready */
++                      spin_unlock_irqrestore(&timer_lock, flags);
++                      break;
++              default:
++                      break;
++              }
++      }
++#endif
++      return IRQ_RETVAL(IRQ_HANDLED);
++}
++
++#ifdef LIRC_ON_SA1100
++void send_pulse(unsigned long length)
++{
++      unsigned long k,delay;
++      int flag;
++
++      if(length==0) return;
++      /* this won't give us the carrier frequency we really want
++         due to integer arithmetic, but we can accept this inaccuracy */
++
++      for(k=flag=0;k<length;k+=delay,flag=!flag)
++      {
++              if(flag)
++              {
++                      off();
++                      delay=space_width;
++              }
++              else
++              {
++                      on();
++                      delay=pulse_width;
++              }
++              safe_udelay(delay);
++      }
++      off();
++}
++
++void send_space(unsigned long length)
++{
++      if(length==0) return;
++      off();
++      safe_udelay(length);
++}
++#elif defined(LIRC_SIR_TEKRAM)
++#else
++static void send_space(unsigned long len)
++{
++      safe_udelay(len);
++}
++
++static void send_pulse(unsigned long len)
++{
++      long bytes_out = len / TIME_CONST;
++      long time_left;
++
++      if (!bytes_out)
++              bytes_out++;
++      time_left = (long)len - (long)bytes_out * (long)TIME_CONST;
++      while (--bytes_out) {
++              outb(PULSE, io + UART_TX);
++              /* FIXME treba seriozne cakanie z drivers/char/serial.c */
++              while (!(inb(io + UART_LSR) & UART_LSR_THRE));
++      }
++#if 0
++      if (time_left > 0)
++              safe_udelay(time_left);
++#endif
++}
++#endif
++
++#ifdef CONFIG_SA1100_COLLIE
++static inline int sa1100_irda_set_power_collie(int state)
++{
++      if (state) {
++              /*
++               *  0 - off
++               *  1 - short range, lowest power
++               *  2 - medium range, medium power
++               *  3 - maximum range, high power
++               */
++              ucb1200_set_io_direction(TC35143_GPIO_IR_ON,
++                                       TC35143_IODIR_OUTPUT);
++              ucb1200_set_io(TC35143_GPIO_IR_ON, TC35143_IODAT_LOW);
++              udelay(100);
++      }
++      else {
++              /* OFF */
++              ucb1200_set_io_direction(TC35143_GPIO_IR_ON,
++                                       TC35143_IODIR_OUTPUT);
++              ucb1200_set_io(TC35143_GPIO_IR_ON, TC35143_IODAT_HIGH);
++      }
++      return 0;
++}
++#endif
++
++static int init_hardware(void)
++{
++      unsigned long flags;
++      
++      spin_lock_irqsave(&hardware_lock, flags);
++      /* reset UART */
++#ifdef LIRC_ON_SA1100
++#ifdef CONFIG_SA1100_BITSY
++      if (machine_is_bitsy()) {
++              printk("Power on IR module\n");
++              set_bitsy_egpio(EGPIO_BITSY_IR_ON);
++      }
++#endif
++#ifdef CONFIG_SA1100_COLLIE
++      sa1100_irda_set_power_collie(3);        /* power on */
++#endif
++      sr.hscr0=Ser2HSCR0;
++
++      sr.utcr0=Ser2UTCR0;
++      sr.utcr1=Ser2UTCR1;
++      sr.utcr2=Ser2UTCR2;
++      sr.utcr3=Ser2UTCR3;
++      sr.utcr4=Ser2UTCR4;
++
++      sr.utdr=Ser2UTDR;
++      sr.utsr0=Ser2UTSR0;
++      sr.utsr1=Ser2UTSR1;
++
++      /* configure GPIO */
++      /* output */
++      PPDR|=PPC_TXD2;
++      PSDR|=PPC_TXD2;
++      /* set output to 0 */
++      off();
++      
++      /*
++       * Enable HP-SIR modulation, and ensure that the port is disabled.
++       */
++      Ser2UTCR3=0;
++      Ser2HSCR0=sr.hscr0 & (~HSCR0_HSSP);
++      
++      /* clear status register to prevent unwanted interrupts */
++      Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
++      
++      /* 7N1 */
++      Ser2UTCR0=UTCR0_1StpBit|UTCR0_7BitData;
++      /* 115200 */
++      Ser2UTCR1=0;
++      Ser2UTCR2=1;
++      /* use HPSIR, 1.6 usec pulses */
++      Ser2UTCR4=UTCR4_HPSIR|UTCR4_Z1_6us;
++      
++      /* enable receiver, receive fifo interrupt */
++      Ser2UTCR3=UTCR3_RXE|UTCR3_RIE;
++      
++      /* clear status register to prevent unwanted interrupts */
++      Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
++      
++#elif defined(LIRC_SIR_TEKRAM)
++      /* disable FIFO */ 
++      soutp(UART_FCR,
++            UART_FCR_CLEAR_RCVR|
++            UART_FCR_CLEAR_XMIT|
++            UART_FCR_TRIGGER_1);
++      
++      /* Set DLAB 0. */
++      soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB));
++      
++      /* First of all, disable all interrupts */
++      soutp(UART_IER, sinp(UART_IER)&
++            (~(UART_IER_MSI|UART_IER_RLSI|UART_IER_THRI|UART_IER_RDI)));
++      
++      /* Set DLAB 1. */
++      soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB);
++      
++      /* Set divisor to 12 => 9600 Baud */
++      soutp(UART_DLM,0);
++      soutp(UART_DLL,12);
++      
++      /* Set DLAB 0. */
++      soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB));
++      
++      /* power supply */
++      soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2);
++      safe_udelay(50*1000);
++      
++      /* -DTR low -> reset PIC */
++      soutp(UART_MCR, UART_MCR_RTS|UART_MCR_OUT2);
++      udelay(1*1000);
++      
++      soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2);
++      udelay(100);
++
++
++        /* -RTS low -> send control byte */
++      soutp(UART_MCR, UART_MCR_DTR|UART_MCR_OUT2);
++      udelay(7);
++      soutp(UART_TX, TEKRAM_115200|TEKRAM_PW);
++      
++      /* one byte takes ~1042 usec to transmit at 9600,8N1 */
++      udelay(1500);
++      
++      /* back to normal operation */
++      soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2);
++      udelay(50);
++
++      udelay(1500);
++      
++      /* read previous control byte */
++      printk(KERN_INFO LIRC_DRIVER_NAME
++             ": 0x%02x\n",sinp(UART_RX));
++      
++      /* Set DLAB 1. */
++      soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB);
++      
++      /* Set divisor to 1 => 115200 Baud */
++      soutp(UART_DLM,0);
++      soutp(UART_DLL,1);
++
++      /* Set DLAB 0, 8 Bit */
++      soutp(UART_LCR, UART_LCR_WLEN8);
++      /* enable interrupts */
++      soutp(UART_IER, sinp(UART_IER)|UART_IER_RDI);
++#else
++      outb(0, io + UART_MCR);
++      outb(0, io + UART_IER);
++      /* init UART */
++              /* set DLAB, speed = 115200 */
++      outb(UART_LCR_DLAB | UART_LCR_WLEN7, io + UART_LCR);
++      outb(1, io + UART_DLL); outb(0, io + UART_DLM);
++              /* 7N1+start = 9 bits at 115200 ~ 3 bits at 44000 */
++      outb(UART_LCR_WLEN7, io + UART_LCR);
++              /* FIFO operation */
++      outb(UART_FCR_ENABLE_FIFO, io + UART_FCR);
++              /* interrupts */
++      // outb(UART_IER_RLSI|UART_IER_RDI|UART_IER_THRI, io + UART_IER);
++      outb(UART_IER_RDI, io + UART_IER);      
++      /* turn on UART */
++      outb(UART_MCR_DTR|UART_MCR_RTS|UART_MCR_OUT2, io + UART_MCR);
++#ifdef LIRC_SIR_ACTISYS_ACT200L
++      init_act200();
++#endif
++#endif
++      spin_unlock_irqrestore(&hardware_lock, flags);
++      return 0;
++}
++
++static void drop_hardware(void)
++{
++      unsigned long flags;
++
++      spin_lock_irqsave(&hardware_lock, flags);
++
++#ifdef LIRC_ON_SA1100
++      Ser2UTCR3=0;
++      
++      Ser2UTCR0=sr.utcr0;
++      Ser2UTCR1=sr.utcr1;
++      Ser2UTCR2=sr.utcr2;
++      Ser2UTCR4=sr.utcr4;
++      Ser2UTCR3=sr.utcr3;
++      
++      Ser2HSCR0=sr.hscr0;
++#ifdef CONFIG_SA1100_BITSY
++      if (machine_is_bitsy()) {
++              clr_bitsy_egpio(EGPIO_BITSY_IR_ON);
++      }
++#endif
++#ifdef CONFIG_SA1100_COLLIE
++      sa1100_irda_set_power_collie(0);        /* power off */
++#endif
++#else
++      /* turn off interrupts */
++      outb(0, io + UART_IER); 
++#endif
++      spin_unlock_irqrestore(&hardware_lock, flags);
++}
++
++/* SECTION: Initialisation */
++
++static int init_port(void)
++{
++      int retval;
++      
++#ifndef LIRC_ON_SA1100
++      /* get I/O port access and IRQ line */
++      retval = check_region(io, 8);
++      if (retval < 0) {
++              printk(KERN_ERR LIRC_DRIVER_NAME
++                      ": i/o port 0x%.4x already in use.\n",
++                      io);
++              return retval;
++      }
++#endif
++      retval = request_irq(irq, sir_interrupt, SA_INTERRUPT,
++                           LIRC_DRIVER_NAME, NULL);
++      if (retval < 0) {
++              printk(KERN_ERR LIRC_DRIVER_NAME
++                      ": IRQ %d already in use.\n",
++                      irq);
++              return retval;
++      }
++#ifndef LIRC_ON_SA1100
++      request_region(io, 8, LIRC_DRIVER_NAME);
++      printk(KERN_INFO LIRC_DRIVER_NAME
++              ": I/O port 0x%.4x, IRQ %d.\n",
++              io, irq);
++#endif
++
++      init_timer(&timerlist);
++      timerlist.function = sir_timeout;
++      timerlist.data = 0xabadcafe;
++
++      return 0;
++}
++
++static void drop_port(void)
++{
++      disable_irq(irq);
++      free_irq(irq, NULL);
++      del_timer_sync(&timerlist);
++#ifndef LIRC_ON_SA1100
++      release_region(io, 8);
++#endif
++}
++
++#ifdef LIRC_SIR_ACTISYS_ACT200L
++/******************************************************/
++/* Crystal/Cirrus CS8130 IR transceiver, used in Actisys Act200L dongle */
++/* some code borrowed from Linux IRDA driver */
++
++/* Regsiter 0: Control register #1 */
++#define ACT200L_REG0    0x00
++#define ACT200L_TXEN    0x01 /* Enable transmitter */
++#define ACT200L_RXEN    0x02 /* Enable receiver */
++#define ACT200L_ECHO    0x08 /* Echo control chars */
++
++/* Register 1: Control register #2 */
++#define ACT200L_REG1    0x10
++#define ACT200L_LODB    0x01 /* Load new baud rate count value */
++#define ACT200L_WIDE    0x04 /* Expand the maximum allowable pulse */
++
++/* Register 3: Transmit mode register #2 */
++#define ACT200L_REG3    0x30
++#define ACT200L_B0      0x01 /* DataBits, 0=6, 1=7, 2=8, 3=9(8P)  */
++#define ACT200L_B1      0x02 /* DataBits, 0=6, 1=7, 2=8, 3=9(8P)  */
++#define ACT200L_CHSY    0x04 /* StartBit Synced 0=bittime, 1=startbit */
++
++/* Register 4: Output Power register */
++#define ACT200L_REG4    0x40
++#define ACT200L_OP0     0x01 /* Enable LED1C output */
++#define ACT200L_OP1     0x02 /* Enable LED2C output */
++#define ACT200L_BLKR    0x04
++
++/* Register 5: Receive Mode register */
++#define ACT200L_REG5    0x50
++#define ACT200L_RWIDL   0x01 /* fixed 1.6us pulse mode */
++    /*.. other various IRDA bit modes, and TV remote modes..*/
++
++/* Register 6: Receive Sensitivity register #1 */
++#define ACT200L_REG6    0x60
++#define ACT200L_RS0     0x01 /* receive threshold bit 0 */
++#define ACT200L_RS1     0x02 /* receive threshold bit 1 */
++
++/* Register 7: Receive Sensitivity register #2 */
++#define ACT200L_REG7    0x70
++#define ACT200L_ENPOS   0x04 /* Ignore the falling edge */
++
++/* Register 8,9: Baud Rate Dvider register #1,#2 */
++#define ACT200L_REG8    0x80
++#define ACT200L_REG9    0x90
++
++#define ACT200L_2400    0x5f
++#define ACT200L_9600    0x17
++#define ACT200L_19200   0x0b
++#define ACT200L_38400   0x05
++#define ACT200L_57600   0x03
++#define ACT200L_115200  0x01
++
++/* Register 13: Control register #3 */
++#define ACT200L_REG13   0xd0
++#define ACT200L_SHDW    0x01 /* Enable access to shadow registers */
++
++/* Register 15: Status register */
++#define ACT200L_REG15   0xf0
++
++/* Register 21: Control register #4 */
++#define ACT200L_REG21   0x50
++#define ACT200L_EXCK    0x02 /* Disable clock output driver */
++#define ACT200L_OSCL    0x04 /* oscillator in low power, medium accuracy mode */
++
++static void init_act200(void)
++{
++  int i;
++      __u8 control[] = {
++              ACT200L_REG15,
++              ACT200L_REG13 | ACT200L_SHDW,
++              ACT200L_REG21 | ACT200L_EXCK | ACT200L_OSCL,
++              ACT200L_REG13,
++              ACT200L_REG7  | ACT200L_ENPOS,
++              ACT200L_REG6  | ACT200L_RS0  | ACT200L_RS1,
++              ACT200L_REG5  | ACT200L_RWIDL,
++              ACT200L_REG4  | ACT200L_OP0  | ACT200L_OP1 | ACT200L_BLKR,
++              ACT200L_REG3  | ACT200L_B0,
++              ACT200L_REG0  | ACT200L_TXEN | ACT200L_RXEN,
++              ACT200L_REG8 |  (ACT200L_115200       & 0x0f),
++              ACT200L_REG9 | ((ACT200L_115200 >> 4) & 0x0f),
++              ACT200L_REG1 | ACT200L_LODB | ACT200L_WIDE
++      };
++
++      /* Set DLAB 1. */
++      soutp(UART_LCR, UART_LCR_DLAB | UART_LCR_WLEN8);
++      
++      /* Set divisor to 12 => 9600 Baud */
++      soutp(UART_DLM,0);
++      soutp(UART_DLL,12);
++      
++      /* Set DLAB 0. */
++      soutp(UART_LCR, UART_LCR_WLEN8);
++      /* Set divisor to 12 => 9600 Baud */
++
++      /* power supply */
++      soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2);
++      for (i=0; i<50; i++) {
++              safe_udelay(1000);
++      }
++
++              /* Reset the dongle : set RTS low for 25 ms */
++      soutp(UART_MCR, UART_MCR_DTR|UART_MCR_OUT2);
++      for (i=0; i<25; i++) {
++              udelay(1000);
++      }
++
++      soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2);
++      udelay(100);
++
++      /* Clear DTR and set RTS to enter command mode */
++      soutp(UART_MCR, UART_MCR_RTS|UART_MCR_OUT2);
++      udelay(7);
++
++/* send out the control register settings for 115K 7N1 SIR operation */
++      for (i=0; i<sizeof(control); i++) {
++              soutp(UART_TX, control[i]);
++              /* one byte takes ~1042 usec to transmit at 9600,8N1 */
++              udelay(1500);
++      }
++
++      /* back to normal operation */
++      soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2);
++      udelay(50);
++
++      udelay(1500);
++      soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB);
++
++      /* Set DLAB 1. */
++      soutp(UART_LCR, UART_LCR_DLAB | UART_LCR_WLEN7);
++
++      /* Set divisor to 1 => 115200 Baud */
++      soutp(UART_DLM,0);
++      soutp(UART_DLL,1);
++
++      /* Set DLAB 0. */
++      soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB));
++
++      /* Set DLAB 0, 7 Bit */
++      soutp(UART_LCR, UART_LCR_WLEN7);
++
++      /* enable interrupts */
++      soutp(UART_IER, sinp(UART_IER)|UART_IER_RDI);
++}
++#endif
++
++int init_lirc_sir(void)
++{
++      int retval;
++
++      init_waitqueue_head(&lirc_read_queue);
++      retval = init_port();
++      if (retval < 0)
++              return retval;
++      init_hardware();
++      enable_irq(irq);
++      printk(KERN_INFO LIRC_DRIVER_NAME
++              ": Installed.\n");
++      return 0;
++}
++
++#ifdef MODULE
++
++#ifdef LIRC_SIR_TEKRAM
++MODULE_AUTHOR("Christoph Bartelmus");
++MODULE_DESCRIPTION("Infrared receiver driver for Tekram Irmate 210");
++#elif defined(LIRC_ON_SA1100)
++MODULE_AUTHOR("Christoph Bartelmus");
++MODULE_DESCRIPTION("LIRC driver for StrongARM SA1100 embedded microprocessor");
++#elif defined(LIRC_SIR_ACTISYS_ACT200L)
++MODULE_AUTHOR("Karl Bongers");
++MODULE_DESCRIPTION("LIRC driver for Actisys Act200L");
++#else
++MODULE_AUTHOR("Milan Pikula");
++MODULE_DESCRIPTION("Infrared receiver driver for SIR type serial ports");
++#endif
++
++#ifdef LIRC_ON_SA1100
++MODULE_PARM(irq, "i");
++MODULE_PARM_DESC(irq, "Interrupt (16)");
++#else
++MODULE_PARM(io, "i");
++MODULE_PARM_DESC(io, "I/O address base (0x3f8 or 0x2f8)");
++MODULE_PARM(irq, "i");
++MODULE_PARM_DESC(irq, "Interrupt (4 or 3)");
++MODULE_PARM(threshold, "i");
++MODULE_PARM_DESC(threshold, "space detection threshold (3)");
++#endif
++
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("GPL");
++#endif
++
++#ifndef KERNEL_2_5
++EXPORT_NO_SYMBOLS;
++#endif
++
++int init_module(void)
++{
++      int retval;
++      
++      retval=init_chrdev();
++      if(retval < 0)
++              return retval;
++      retval = init_lirc_sir();
++      if (retval) {
++              drop_chrdev();
++              return retval;
++      }
++      return 0;
++}
++
++void cleanup_module(void)
++{
++      drop_hardware();
++      drop_chrdev();
++      drop_port();
++      printk(KERN_INFO LIRC_DRIVER_NAME ": Uninstalled.\n");
++}
++#endif
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/Makefile linux-2.6.8-rc4/drivers/char/lirc/Makefile
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/Makefile    1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/Makefile 2004-08-10 10:22:06.189171224 +0200
+@@ -0,0 +1,11 @@
++obj-$(CONFIG_LIRC_SUPPORT) += lirc_dev.o
++obj-$(CONFIG_LIRC_GPIO) += lirc_gpio.o
++obj-$(CONFIG_LIRC_BT829) += lirc_bt829.o
++obj-$(CONFIG_LIRC_IT87) += lirc_it87.o
++obj-$(CONFIG_LIRC_PARALLEL) += lirc_parallel.o
++obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o
++obj-$(CONFIG_LIRC_SERIAL) += lirc_serial.o
++obj-$(CONFIG_LIRC_SIR) += lirc_sir.o
++obj-$(CONFIG_LIRC_ATIUSB) += lirc_atiusb.o
++obj-$(CONFIG_LIRC_MCEUSB) += lirc_mceusb.o
++obj-$(CONFIG_LIRC_I2C) += lirc_i2c.o
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/Makefile linux-2.6.8-rc4/drivers/char/Makefile
+--- linux-2.6.8-rc4.orig/drivers/char/Makefile 2004-08-10 09:33:45.000000000 +0200
++++ linux-2.6.8-rc4/drivers/char/Makefile      2004-08-10 10:23:05.725120384 +0200
+@@ -7,7 +7,7 @@
+ #
+ FONTMAPFILE = cp437.uni
+-obj-y  += mem.o random.o tty_io.o n_tty.o tty_ioctl.o
++obj-y  += mem.o random.o tty_io.o n_tty.o tty_ioctl.o lirc/
+ obj-$(CONFIG_VT)              += vt_ioctl.o vc_screen.o consolemap.o \
+                                  consolemap_deftbl.o selection.o keyboard.o
+diff -uNr linux-2.6.8-rc4.orig/include/linux/lirc.h linux-2.6.8-rc4/include/linux/lirc.h
+--- linux-2.6.8-rc4.orig/include/linux/lirc.h  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/include/linux/lirc.h       2003-01-26 13:57:59.000000000 +0100
+@@ -0,0 +1,100 @@
++/*      $Id$      */
++
++#ifndef _LINUX_LIRC_H
++#define _LINUX_LIRC_H
++
++#if defined (__linux__)
++#include <asm/types.h>
++#include <linux/ioctl.h>
++#else
++#include <sys/types.h>
++typedef u_int32_t __u32;
++#endif
++
++#define PULSE_BIT  0x01000000
++#define PULSE_MASK 0x00FFFFFF
++
++typedef int lirc_t;
++
++/*
++ * lirc compatible hardware features
++ */
++
++
++#define LIRC_MODE2SEND(x) (x)
++#define LIRC_SEND2MODE(x) (x)
++#define LIRC_MODE2REC(x) ((x) << 16)
++#define LIRC_REC2MODE(x) ((x) >> 16)
++
++#define LIRC_MODE_RAW                  0x00000001
++#define LIRC_MODE_PULSE                0x00000002
++#define LIRC_MODE_MODE2                0x00000004
++#define LIRC_MODE_CODE                 0x00000008
++#define LIRC_MODE_LIRCCODE             0x00000010
++#define LIRC_MODE_STRING               0x00000020
++
++
++#define LIRC_CAN_SEND_RAW              LIRC_MODE2SEND(LIRC_MODE_RAW)
++#define LIRC_CAN_SEND_PULSE            LIRC_MODE2SEND(LIRC_MODE_PULSE)
++#define LIRC_CAN_SEND_MODE2            LIRC_MODE2SEND(LIRC_MODE_MODE2)
++#define LIRC_CAN_SEND_CODE             LIRC_MODE2SEND(LIRC_MODE_CODE)
++#define LIRC_CAN_SEND_LIRCCODE         LIRC_MODE2SEND(LIRC_MODE_LIRCCODE)
++#define LIRC_CAN_SEND_STRING           LIRC_MODE2SEND(LIRC_MODE_STRING)
++
++#define LIRC_CAN_SEND_MASK             0x0000003f
++
++#define LIRC_CAN_SET_SEND_CARRIER      0x00000100
++#define LIRC_CAN_SET_SEND_DUTY_CYCLE   0x00000200
++
++#define LIRC_CAN_REC_RAW               LIRC_MODE2REC(LIRC_MODE_RAW)
++#define LIRC_CAN_REC_PULSE             LIRC_MODE2REC(LIRC_MODE_PULSE)
++#define LIRC_CAN_REC_MODE2             LIRC_MODE2REC(LIRC_MODE_MODE2)
++#define LIRC_CAN_REC_CODE              LIRC_MODE2REC(LIRC_MODE_CODE)
++#define LIRC_CAN_REC_LIRCCODE          LIRC_MODE2REC(LIRC_MODE_LIRCCODE)
++#define LIRC_CAN_REC_STRING            LIRC_MODE2REC(LIRC_MODE_STRING)
++
++#define LIRC_CAN_REC_MASK              LIRC_MODE2REC(LIRC_CAN_SEND_MASK)
++
++#define LIRC_CAN_SET_REC_CARRIER       (LIRC_CAN_SET_SEND_CARRIER << 16)
++#define LIRC_CAN_SET_REC_DUTY_CYCLE    (LIRC_CAN_SET_SEND_DUTY_CYCLE << 16)
++
++#define LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE 0x40000000
++#define LIRC_CAN_SET_REC_CARRIER_RANGE    0x80000000
++
++
++#define LIRC_CAN_SEND(x) ((x)&LIRC_CAN_SEND_MASK)
++#define LIRC_CAN_REC(x) ((x)&LIRC_CAN_REC_MASK)
++
++/*
++ * IOCTL commands for lirc driver
++ */
++
++#define LIRC_GET_FEATURES              _IOR('i', 0x00000000, __u32)
++
++#define LIRC_GET_SEND_MODE             _IOR('i', 0x00000001, __u32)
++#define LIRC_GET_REC_MODE              _IOR('i', 0x00000002, __u32)
++#define LIRC_GET_SEND_CARRIER          _IOR('i', 0x00000003, __u32)
++#define LIRC_GET_REC_CARRIER           _IOR('i', 0x00000004, __u32)
++#define LIRC_GET_SEND_DUTY_CYCLE       _IOR('i', 0x00000005, __u32)
++#define LIRC_GET_REC_DUTY_CYCLE        _IOR('i', 0x00000006, __u32)
++
++/* code length in bits, currently only for LIRC_MODE_LIRCCODE */
++#define LIRC_GET_LENGTH                _IOR('i', 0x0000000f, __u32)
++
++#define LIRC_SET_SEND_MODE             _IOW('i', 0x00000011, __u32)
++#define LIRC_SET_REC_MODE              _IOW('i', 0x00000012, __u32)
++/* Note: these can reset the according pulse_width */
++#define LIRC_SET_SEND_CARRIER          _IOW('i', 0x00000013, __u32)
++#define LIRC_SET_REC_CARRIER           _IOW('i', 0x00000014, __u32)
++#define LIRC_SET_SEND_DUTY_CYCLE       _IOW('i', 0x00000015, __u32)
++#define LIRC_SET_REC_DUTY_CYCLE        _IOW('i', 0x00000016, __u32)
++
++/* to set a range use
++   LIRC_SET_REC_DUTY_CYCLE_RANGE/LIRC_SET_REC_CARRIER_RANGE with the
++   lower bound first and later
++   LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER with the upper bound */
++
++#define LIRC_SET_REC_DUTY_CYCLE_RANGE  _IOW('i', 0x0000001e, __u32)
++#define LIRC_SET_REC_CARRIER_RANGE     _IOW('i', 0x0000001f, __u32)
++
++#endif
+diff -uNr linux-2.6.8-rc4.orig/drivers/char/lirc/kcompat.h linux-2.6.8-rc4/drivers/char/lirc/kcompat.h
+--- linux-2.6.8-rc4.orig/drivers/char/lirc/kcompat.h   1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8-rc4/drivers/char/lirc/kcompat.h        2004-04-27 20:52:33.000000000 +0200
+@@ -0,0 +1,74 @@
++/*      $Id$      */
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
++#include <linux/timer.h>
++#include <linux/interrupt.h>
++static inline void del_timer_sync(struct timer_list * timerlist)
++{
++      start_bh_atomic();
++      del_timer(timerlist);
++      end_bh_atomic();
++}
++#endif
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
++#undef daemonize
++#define daemonize(name) do {                                           \
++                                                                       \
++      lock_kernel();                                                 \
++                                                                     \
++      exit_mm(current);                                              \
++      exit_files(current);                                           \
++      exit_fs(current);                                              \
++      current->session = 1;                                          \
++      current->pgrp = 1;                                             \
++      current->euid = 0;                                             \
++      current->tty = NULL;                                           \
++      sigfillset(&current->blocked);                                 \
++                                                                     \
++      strcpy(current->comm, name);                                   \
++                                                                     \
++      unlock_kernel();                                               \
++                                                                       \
++} while (0)
++
++#endif
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
++#define KERNEL_2_5
++
++#undef MOD_INC_USE_COUNT
++#define MOD_INC_USE_COUNT try_module_get(THIS_MODULE)
++#undef MOD_DEC_USE_COUNT
++#define MOD_DEC_USE_COUNT module_put(THIS_MODULE)
++
++#endif
++
++#ifndef IRQ_RETVAL
++typedef void irqreturn_t;
++#define IRQ_NONE
++#define IRQ_HANDLED
++#define IRQ_RETVAL(x)
++#endif
++
++#ifndef MOD_IN_USE
++#ifdef CONFIG_MODULE_UNLOAD
++#define MOD_IN_USE module_refcount(THIS_MODULE)
++#else
++#error "LIRC modules currently require"
++#error "  'Loadable module support  --->  Module unloading'"
++#error "to be enabled in the kernel"
++#endif
++#endif
++
++#if !defined(local_irq_save)
++#define local_irq_save(flags) do{ save_flags(flags);cli(); } while(0)
++#endif
++#if !defined(local_irq_restore)
++#define local_irq_restore(flags) do{ restore_flags(flags); } while(0)
++#endif
++
++#if !defined(pci_pretty_name)
++#define pci_pretty_name(dev) ((dev)->name)
++#endif
index 04ac5a01441838647cfbe3c5d65059751f51d22c..eba3814ed930df550df594796a28ddf794d30812 100644 (file)
@@ -37,9 +37,9 @@ diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/tgafb.c fbdev-2.6/d
  #include <asm/io.h>
 -#include <video/tgafb.h>
 +#include <video/tga.h>
+ #include <linux/selection.h>
  
  /*
-  * Local functions.
 @@ -41,6 +41,7 @@
  static void tgafb_imageblit(struct fb_info *, const struct fb_image *);
  static void tgafb_fillrect(struct fb_info *, const struct fb_fillrect *);
@@ -387,7 +387,7 @@ diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/tgafb.c fbdev-2.6/d
  
        /* Request the mem regions.  */
        bar0_start = pci_resource_start(pdev, 0);
-@@ -1416,24 +1465,22 @@
+@@ -1416,25 +1465,23 @@
  
        /* Grab info about the card.  */
        tga_type = (readl(mem_base) >> 12) & 0x0f;
@@ -405,13 +405,15 @@ diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/tgafb.c fbdev-2.6/d
 +      pci_read_config_byte(pdev, PCI_REVISION_ID, par->tga_chip_rev);
  
        /* Setup framebuffer.  */
--      all->info.flags = FBINFO_FLAG_DEFAULT;
+-      all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA |
+-                          FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT;
 -      all->info.fbops = &tgafb_ops;
 -      all->info.screen_base = (char *) all->par.tga_fb_base;
 -      all->info.currcon = -1;
 -      all->info.par = &all->par;
 -      all->info.pseudo_palette = all->pseudo_palette;
-+      info->flags = FBINFO_FLAG_DEFAULT;
++      info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA |
++                     FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT;
 +      info->fbops = &tgafb_ops;
 +      info->screen_base = (char *) par->tga_fb_base;
 +      info->pseudo_palette = par->pseudo_palette;
index ba62326512012dec23036cbcab6592640c8c7c50..8e766f101aee41dbf4c0535fe94b4e8514c18a30 100644 (file)
@@ -1,6 +1,6 @@
---- exec-shield-on-nx-2.6.7-rc2-bk2-A9.org     2004-06-27 02:56:05.713193032 +0200
-+++ exec-shield-on-nx-2.6.7-rc2-bk2-A9 2004-06-27 03:17:55.149128512 +0200
-@@ -787,12 +787,12 @@
+--- exec-shield-nx-2.6.7-A0.org        2004-06-27 03:39:46.397788416 +0200
++++ exec-shield-nx-2.6.7-A0    2004-06-27 03:44:09.132846616 +0200
+@@ -999,12 +999,12 @@
   #include <linux/percpu.h>
   
   struct exec_domain;
   
   /*
 -  * cloning flags:
- @@ -196,6 +199,8 @@ struct mm_struct {
+ @@ -194,6 +197,8 @@ struct mm_struct {
        struct rb_root mm_rb;
        struct vm_area_struct * mmap_cache;     /* last find_vma result */
-@@ -1763,23 +1763,23 @@
+@@ -2168,23 +2168,23 @@
   /*
    * vma is the first one with address > vma->vm_end.  Have to extend vma.
- @@ -1183,7 +1197,7 @@ int expand_stack(struct vm_area_struct *
+ @@ -1210,7 +1224,7 @@ int expand_stack(struct vm_area_struct *
 -              return -ENOMEM;
 -      }
 -      
@@ -31,7 +31,7 @@
 -              anon_vma_unlock(vma);
 +                      current->rlim[RLIMIT_AS].rlim_cur ||
 +                      ((vma->vm_flags & VM_LOCKED) &&
- @@ -1244,7 +1258,7 @@ int expand_stack(struct vm_area_struct *
+ @@ -1271,7 +1285,7 @@ int expand_stack(struct vm_area_struct *
 -              return -ENOMEM;
 -      }
 -      
@@ -45,6 +45,6 @@
 -              anon_vma_unlock(vma);
 +                      current->rlim[RLIMIT_AS].rlim_cur ||
 +                      ((vma->vm_flags & VM_LOCKED) &&
- @@ -1357,6 +1371,7 @@ no_mmaps:
+ @@ -1384,6 +1398,7 @@ no_mmaps:
   static void unmap_vma(struct mm_struct *mm, struct vm_area_struct *area)
   {
diff --git a/fbsplash-0.9-r7-2.6.9-rc1.patch b/fbsplash-0.9-r7-2.6.9-rc1.patch
new file mode 100644 (file)
index 0000000..fcfbfd4
--- /dev/null
@@ -0,0 +1,1909 @@
+diff -Nru a/Documentation/fb/00-INDEX b/Documentation/fb/00-INDEX
+--- a/Documentation/fb/00-INDEX        2004-08-26 21:34:52 +02:00
++++ b/Documentation/fb/00-INDEX        2004-08-26 21:34:52 +02:00
+@@ -19,6 +19,8 @@
+       - info on the Matrox frame buffer driver
+ pvr2fb.txt
+       - info on the PowerVR 2 frame buffer driver
++splash.txt
++      - info on the Framebuffer Splash
+ tgafb.txt
+       - info on the TGA (DECChip 21030) frame buffer driver
+ vesafb.txt
+diff -Nru a/Documentation/fb/splash.txt b/Documentation/fb/splash.txt
+--- /dev/null  Wed Dec 31 16:00:00 196900
++++ b/Documentation/fb/splash.txt      2004-08-26 21:34:52 +02:00
+@@ -0,0 +1,230 @@
++What is it?
++-----------
++
++The framebuffer splash is a kernel feature that allows displaying a background
++picture on selected consoles and switching the first console to the so-called
++silent mode, while booting/rebooting/shutting down the system.
++
++What do I need to get it to work?
++---------------------------------
++
++To get fb splash up-and-running you will have to:
++ 1) get a copy of splashutils from (FIXME URL)
++ 2) get some splash themes (FIXME URL)
++ 3) build the kernel helper program
++ 4) build your kernel with the FB_SPLASH option enabled.
++
++To get fb splash operational right after fbcon initialization is finished, you
++will have to include a theme and the kernel helper into your initramfs image.
++Please refer to splashutils documentation for instructions on how to do that.
++
++Operation modes
++---------------
++
++The framebuffer splash can work in two modes: verbose and silent. The first
++one means "console with a background image". The latter one is a concept
++first introduced in bootsplash. When silent mode is active, the console is
++switched to a graphic mode and no text is displayed. It's up to the userspace
++programs to display something (a progress bar for example) on the screen. 
++
++Kernel command line parameters
++------------------------------
++
++Framebuffer splash can be configured from the kernel command line by passing
++options in the following way: "splash=option1,option2".
++
++The following options are recognized:
++
++off     - do not enable fbsplash after fbcon initialization; this is
++          default behaviour
++verbose - switch fbsplash to verbose mode after fbcon is initialized
++silent  - switch fbsplash to silent mode after fbcon is initialized
++
++theme:<name> - use theme 'name' on the first console, default theme name
++               is 'default' (who'd have guessed?)
++
++Example - you want to get verbose splash with the theme 'tux' right after 
++fbcon is up:
++  splash=verbose,theme:tux
++
++The userspace helper
++--------------------
++
++The userspace splash helper (by default: /sbin/splash_helper) is called by the
++kernel whenever an important event occurs and the kernel needs some kind of
++job to be carried out. Important events include console switches and graphic
++mode switches (the kernel requests background images and config for the current 
++console). The splash helper must be accessible at all times. If it's not,
++fbsplash will be switched off automatically.
++
++It's possible to set path to the splash helper by writing it to 
++/proc/sys/kernel/fbsplash.
++
++*****************************************************************************
++
++The information below is mostly technical stuff. If you don't plan to develop
++something fbsplash-related, there's probably no need to read it.
++
++The splash protocol
++-------------------
++
++The splash protocol defines a communication interface between the kernel and 
++the userspace splash helper.
++
++The kernel side is responsible for:
++
++ o rendering console text, using an image as a background (instead of a
++   standard solid color fbcon uses),
++ o accepting commands from the user via ioctls on the fbsplash device,
++ o calling the userspace helper to set things up as soon as the fb subsystem is
++   initialized.
++
++The userspace helper is responsible for everything else, including parsing
++configuration files, decompressing the image files whenever the kernel needs
++it, and communicating with the kernel if necessary.
++
++The splash protocol specifies how communication is done in both ways:
++kernel->userspace and userspace->helper.
++  
++Kernel -> Userspace
++-------------------
++
++The kernel communicates with the userspace helper by calling it and specifying
++the task that to be done in a series of arguments.
++
++The arguments follow the pattern:
++<splash protocol version> <command> <parameters>
++
++All commands defined in splash protocol v1 have the following parameters:
++ virtual console
++ framebuffer number
++ splash mode - 'v' indicates verbose, 's' indicates silent
++ theme
++
++Splash protocol v1 specifies the following commands:
++
++getpic
++------
++ The kernel issues this command to request image data. It's up to the userspace
++ helper to find a background image appropriate for the specified theme and the 
++ current resolution. The userspace helper should respond by issuing the
++ FBIOSPLASH_SETPIC ioctl.
++
++init
++----
++ The kernel issues this command if either 'verbose' or 'silent' has been
++ specified in splash= on the kernel command line. Upon receiving this command,
++ the userspace helper should find a proper configuration file for the
++ specified theme and the current resolution, and issue the FBIOSPLASH_SETCFG.
++ FBIOSPLASH_SETPIC and FBIOSPLASH_SETSTATE commands.
++
++ When the userspace helper is called in an early phase of the boot process
++ (right after the initialization of fbcon), no filesystems will be mounted.
++ The helper program should mount sysfs and then create the appropriate 
++ framebuffer, fbsplash and tty0 devices (if they don't already exist) to get 
++ current display settings and to be able to communicate with the kernel side.
++
++ Note that the console sem is not held when the kernel calls splash_helper
++ with the 'init' command. The splash helper should perform all ioctls with
++ origin set to FB_SPLASH_IO_ORIG_USER.
++
++modechange
++----------
++ The kernel issues this command on a mode change. The helper's response should
++ be similar to the response to the 'init' command. Note that this time the
++ console sem is held and all ioctls must be performed with origin set to
++ FB_SPLASH_IO_ORIG_KERNEL.
++
++
++Userspace -> Kernel
++-------------------
++
++Userspace programs can communicate with the kernel side via ioctls on the 
++on the fbsplash device. These ioctls are to be used by both the userspace helper 
++(called only by the kernel) and userspace configuration tools (run by the users).
++The splash helper should set the origin field to FB_SPLASH_IO_ORIG_KERNEL when
++doing the appropriate ioctls. All userspace configuration tools should use
++FB_SPLASH_IO_ORIG_USER. Failure to set the appropriate value in the origin
++field when performing ioctls from the kernel helper may result in a deadlock.
++
++The framebuffer splash provides the following ioctls (all defined in linux/fb.h):
++
++FBIOSPLASH_SETMODE
++description: sets the global fbsplash mode
++argument: unsigned int; values: FB_SPLASH_MODE_VERBOSE, FB_SPLASH_MODE_SILENT
++
++FBIOSPLASH_GETMODE
++description: gets the global fbsplash mode 
++argument: unsigned int*; values as in FBIOSPLASH_SETMODE
++
++FBIOSPLASH_SETPIC
++description: loads a background picture for a virtual console
++argument: struct fb_splash_iowrapper*; data: struct fb_image*
++notes: 
++If called for consoles other than the current foreground one, the picture data 
++will be ignored.
++
++If the current virtual console is running in a 8-bpp mode, the cmap substruct
++of fb_image has to be filled appropriately: start should be set to 16 (first 16 
++colors are reserved for fbcon), len to a value <= 240 and red, green and blue
++should point to valid cmap data. The transp field is ingored. The fields dx, dy
++bg_color, fg_color in fb_image are ignored as well.
++
++FBIOSPLASH_SETCFG
++description: sets the fbsplash config for a virtual console
++argument: struct fb_splash_iowrapper*; data: struct vc_splash*; 
++          the structure has to be filled with valid data.
++
++FBIOSPLASH_GETCFG
++description: gets the fbsplash config for a virtual console
++argument: struct fb_splash_iowrapper*; data: struct vc_splash*
++
++FBIOSPLASH_SETSTATE
++description: sets the fbsplash state for a virtual console
++argument: struct fb_splash_iowrapper*; data: unsigned int*
++        values: 0 = disabled, 1 = enabled.
++
++FBIOSPLASH_GETSTATE
++description: gets the fbsplash state for a virtual console
++argument: struct fb_splash_iowrapper*; data: unsigned int*
++          values: as in FBIOSPLASH_SETSTATE
++
++Info on used structures:
++
++Definition of struct vc_splash can be found in linux/console_splash.h, it's
++heavily commented, so no special descriptions are necessary. Note that 
++the 'theme' field should point to a string no longer than FB_SPLASH_THEME_LEN.
++When FBIOSPLASH_GETCFG call is performed, the theme field should point to a
++char buffer of length FB_SPLASH_THEME_LEN.
++
++Definition of struct fb_splash_iowrapper can be found in linux/fb.h. 
++The fields in this struct have the following meaning:
++
++vc: 
++Virtual console number.
++
++origin: 
++Specifies if the ioctl is performed as a response to a kernel request. The
++splash helper should set this field to FB_SPLASH_IO_ORIG_KERNEL, userspace
++programs should set it to FB_SPLASH_IO_ORIG_USER. This field is necessary to
++avoid console semaphore deadlocks.
++
++data: 
++Pointer to a data structure appropriate for the performed ioctl. Type of
++the data struct is specified in the ioctls description, for example 'data:
++struct vc_splash*' means that the 'data' field should be a pointer to a
++vc_splash struct.
++
++*****************************************************************************
++
++Credit
++------
++
++Original idea & implementation by:
++  Volker Poplawski <volker@poplawski.de>, Stefan Reinauer <stepan@suse.de>,
++  Steffen Winterfeldt <snwint@suse.de>, Michael Schroeder <mls@suse.de>,
++  Ken Wimer <wimer@suse.de>.
++
++Splash protocol redesign, current implementation, docs by:
++  Michal Januszewski <spock@gentoo.org>
++
+diff -Nru a/drivers/char/keyboard.c b/drivers/char/keyboard.c
+--- a/drivers/char/keyboard.c  2004-08-26 21:34:52 +02:00
++++ b/drivers/char/keyboard.c  2004-08-26 21:34:52 +02:00
+@@ -41,6 +41,8 @@
+ #include <linux/sysrq.h>
+ #include <linux/input.h>
++#include "../video/fbsplash.h"
++
+ static void kbd_disconnect(struct input_handle *handle);
+ extern void ctrl_alt_del(void);
+@@ -1057,6 +1059,12 @@
+               if (emulate_raw(vc, keycode, !down << 7))
+                       if (keycode < BTN_MISC)
+                               printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);
++
++      /* switch splash to verbose mode if ESC or F2 is pressed */
++      if (down == 1 && (keycode == KEY_ESC || keycode == KEY_F2)) {
++              if (fbsplash_verbose())
++                      return;
++      }
+ #ifdef CONFIG_MAGIC_SYSRQ            /* Handle the SysRq Hack */
+       if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) {
+diff -Nru a/drivers/char/n_tty.c b/drivers/char/n_tty.c
+--- a/drivers/char/n_tty.c     2004-08-26 21:34:52 +02:00
++++ b/drivers/char/n_tty.c     2004-08-26 21:34:52 +02:00
+@@ -49,6 +49,8 @@
+ #include <asm/system.h>
+ #include <asm/bitops.h>
++#include "../video/fbsplash.h"
++
+ /* number of characters left in xmit buffer before select has we have room */
+ #define WAKEUP_CHARS 256
+@@ -987,6 +989,15 @@
+       if (!tty->read_buf) {
+               printk("n_tty_read_chan: called with read_buf == NULL?!?\n");
+               return -EIO;
++      }
++
++      /* automatically switch splash to verbose mode if someone tries to 
++         read from tty0 */
++      if (file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,0) ||
++          file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,1) ||
++          file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,0) || 
++          file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,1)) {
++              fbsplash_verbose();
+       }
+       /* Job control check -- must be done at start and after
+diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig
+--- a/drivers/video/Kconfig    2004-08-26 21:34:52 +02:00
++++ b/drivers/video/Kconfig    2004-08-26 21:34:52 +02:00
+@@ -1011,5 +1011,15 @@
+       source "drivers/video/logo/Kconfig"
+ endif
+-endmenu
++config FB_SPLASH
++      bool "Support for the framebuffer splash"
++      depends on FRAMEBUFFER_CONSOLE=y
++      default n
++      ---help---
++        This option enables support for the Linux boot-up splash screen and
++        graphical backgrounds on consoles. Note that you will need userspace
++        splashutils in order to take advantage of these features. Refer to
++        Documentation/fb/splash.txt for more information.
++        If unsure, say N.
++endmenu
+diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile
+--- a/drivers/video/Makefile   2004-08-26 21:34:52 +02:00
++++ b/drivers/video/Makefile   2004-08-26 21:34:52 +02:00
+@@ -6,6 +6,7 @@
+ obj-$(CONFIG_VT)                += console/
+ obj-$(CONFIG_LOGO)              += logo/
++obj-$(CONFIG_FB_SPLASH)           += fbsplash.o cfbsplash.o
+ obj-$(CONFIG_FB)                  += fbmem.o fbmon.o fbcmap.o fbsysfs.o modedb.o softcursor.o
+ # Only include macmodes.o if we have FB support and are PPC
+diff -Nru a/drivers/video/cfbsplash.c b/drivers/video/cfbsplash.c
+--- /dev/null  Wed Dec 31 16:00:00 196900
++++ b/drivers/video/cfbsplash.c        2004-08-26 21:34:52 +02:00
+@@ -0,0 +1,471 @@
++/*
++ *  linux/drivers/video/cfbsplash.c -- Framebuffer splash render functions
++ *  
++ *  Copyright (C) 2004 Michal Januszewski <spock@gentoo.org>
++ *
++ *  Code based upon "Bootsplash" (C) 2001-2003 
++ *       Volker Poplawski <volker@poplawski.de>,
++ *       Stefan Reinauer <stepan@suse.de>,
++ *       Steffen Winterfeldt <snwint@suse.de>,
++ *       Michael Schroeder <mls@suse.de>,
++ *       Ken Wimer <wimer@suse.de>.
++ *
++ *  This file is subject to the terms and conditions of the GNU General Public
++ *  License.  See the file COPYING in the main directory of this archive for
++ *  more details.
++ */ 
++#include <linux/config.h>
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/fb.h>
++#include <linux/vt_kern.h>
++#include <asm/irq.h>
++#include <asm/system.h>
++
++#include "console/fbcon.h"
++#include "fbsplash.h"
++
++#define parse_pixel(shift,bpp,type)                                           \
++      do {                                                                    \
++              if (d & (0x80 >> (shift)))                                      \
++                      dd2[(shift)] = fgx;                                     \
++              else                                                            \
++                      dd2[(shift)] = transparent ? *(type *)splash_src : bgx; \
++              splash_src += (bpp);                                            \
++      } while (0)                                                             \
++
++void fbsplash_renderc(struct fb_info *info, int ypos, int xpos, int height, 
++                    int width, u8* src, u32 fgx, u32 bgx, u8 transparent)
++{     
++      unsigned int x, y;
++      u32 dd;
++      int bytespp = ((info->var.bits_per_pixel + 7) >> 3);
++      unsigned int d = ypos * info->fix.line_length + xpos * bytespp;
++      u16 dd2[4];
++
++      u8* splash_src = (u8 *)(info->splash.data + d);
++      u8* dst = (u8 *)(info->screen_base + d);
++
++      if ((ypos + height) > info->var.yres || (xpos + width) > info->var.xres)
++              return;
++      
++      for (y = 0; y < height; y++) {
++              switch (info->var.bits_per_pixel) {
++      
++              case 32:
++                      for (x = 0; x < width; x++) {
++
++                              if ((x & 7) == 0)
++                                      d = *src++;
++                              if (d & 0x80)
++                                      dd = fgx;
++                              else
++                                      dd = transparent ? 
++                                           *(u32 *)splash_src : bgx;
++                              
++                              d <<= 1;
++                              splash_src += 4;
++                              fb_writel(dd, dst);
++                              dst += 4;
++                      }
++                      break;
++              case 24:
++                      for (x = 0; x < width; x++) {
++
++                              if ((x & 7) == 0)
++                                      d = *src++;
++                              if (d & 0x80)
++                                      dd = fgx;
++                              else
++                                      dd = transparent ? 
++                                           (*(u32 *)splash_src & 0xffffff) : bgx;
++                              
++                              d <<= 1;
++                              splash_src += 3;
++#ifdef __LITTLE_ENDIAN
++                              fb_writew(dd & 0xffff, dst);
++                              dst += 2;
++                              fb_writeb((dd >> 16), dst);
++#else
++                              fb_writew(dd >> 8, dst);
++                              dst += 2;
++                              fb_writeb(dd & 0xff, dst);
++#endif
++                              dst++;
++                      }
++                      break;
++              case 16:
++                      for (x = 0; x < width; x += 2) {
++                              if ((x & 7) == 0)
++                                      d = *src++;
++
++                              parse_pixel(0, 2, u16);
++                              parse_pixel(1, 2, u16);
++#ifdef __LITTLE_ENDIAN
++                              dd = dd2[0] | (dd2[1] << 16);
++#else
++                              dd = dd2[1] | (dd2[1] << 16);
++#endif
++                              d <<= 2;
++                              fb_writel(dd, dst);
++                              dst += 4;
++                      }
++                      break;
++
++              case 8:
++                      for (x = 0; x < width; x += 4) {
++                              if ((x & 7) == 0)
++                                      d = *src++;
++      
++                              parse_pixel(0, 1, u8);
++                              parse_pixel(1, 1, u8);
++                              parse_pixel(2, 1, u8);
++                              parse_pixel(3, 1, u8);
++              
++#ifdef __LITTLE_ENDIAN
++                              dd = dd2[0] | (dd2[1] << 8) | (dd2[2] << 16) | (dd2[3] << 24);
++#else
++                              dd = dd2[3] | (dd2[2] << 8) | (dd2[1] << 16) | (dd2[0] << 24);
++#endif
++                              d <<= 4;
++                              fb_writel(dd, dst);
++                              dst += 4;
++                      }               
++              }
++
++              d = info->fix.line_length - width * bytespp;
++              dst += d;
++              splash_src += d;
++      }
++}
++
++#define cc2cx(a)                                              \
++      ((info->fix.visual == FB_VISUAL_TRUECOLOR ||            \
++        info->fix.visual == FB_VISUAL_DIRECTCOLOR) ?          \
++       ((u32*)info->pseudo_palette)[a] : a)
++
++void fbsplash_putcs(struct vc_data *vc, struct fb_info *info,
++                 const unsigned short *s, int count, int yy, int xx)
++{
++      unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
++      int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
++      int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
++      int fg_color, bg_color, transparent;
++      
++      u8 *src;
++      u32 bgx, fgx;
++
++      u16 c = scr_readw(s);
++
++      fg_color = attr_fgcol(fgshift, c);
++        bg_color = attr_bgcol(bgshift, c);
++      transparent = vc->vc_splash.bg_color == bg_color;
++
++      xx = xx * vc->vc_font.width + vc->vc_splash.tx;
++      yy = yy * vc->vc_font.height + vc->vc_splash.ty;
++
++      fgx = cc2cx(fg_color);
++      bgx = cc2cx(bg_color);
++
++      while (count--) {
++              c = scr_readw(s++);
++              src = vc->vc_font.data + (c & charmask) * vc->vc_font.height *
++                    ((vc->vc_font.width + 7) >> 3);
++
++              fbsplash_renderc(info, yy, xx, vc->vc_font.height, 
++                             vc->vc_font.width, src, fgx, bgx, transparent);
++              xx += vc->vc_font.width;
++      }
++}
++
++void fbsplash_putc(struct vc_data *vc, struct fb_info *info, int c, 
++                 int ypos, int xpos)
++{
++      unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
++      int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
++      int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
++      u32 bg_color = attr_bgcol(bgshift, c);
++      u32 fg_color = attr_fgcol(fgshift, c);
++      u8 *src = vc->vc_font.data + (c & charmask) * vc->vc_font.height * 
++                ((vc->vc_font.width + 7) >> 3);
++      xpos = xpos * vc->vc_font.width + vc->vc_splash.tx;
++      ypos = ypos * vc->vc_font.height + vc->vc_splash.ty;
++      
++      fbsplash_renderc(info, ypos, xpos, vc->vc_font.height, vc->vc_font.width, 
++                       src, cc2cx(fg_color), cc2cx(bg_color), 
++                       vc->vc_splash.bg_color == bg_color);
++}
++
++void fbsplash_cursor(struct fb_info *info, struct fb_cursor *cursor)
++{
++      int i;
++      unsigned int dsize, s_pitch;
++      char *t = (char *)info->cursor.image.data;
++      struct vc_data* vc;     
++
++      vc = vc_cons[info->currcon].d;
++
++      if (cursor->set & FB_CUR_SETSIZE) {
++                info->cursor.image.height = cursor->image.height;
++                info->cursor.image.width = cursor->image.width;
++        }
++        if (cursor->set & FB_CUR_SETPOS) {
++                info->cursor.image.dx = cursor->image.dx;
++                info->cursor.image.dy = cursor->image.dy;
++        }
++        if (cursor->set & FB_CUR_SETHOT)
++                info->cursor.hot = cursor->hot;
++        if (cursor->set & FB_CUR_SETCMAP) {
++                if (cursor->image.depth == 1) {
++                        info->cursor.image.bg_color = cursor->image.bg_color;
++                        info->cursor.image.fg_color = cursor->image.fg_color;
++                } else {
++                        if (cursor->image.cmap.len)
++                                fb_copy_cmap(&cursor->image.cmap, 
++                                           &info->cursor.image.cmap);
++                }
++                info->cursor.image.depth = cursor->image.depth;
++        }
++      s_pitch = (info->cursor.image.width + 7) >> 3;
++        dsize = s_pitch * info->cursor.image.height;
++        if (info->cursor.enable) {
++                switch (info->cursor.rop) {
++                case ROP_XOR:
++                        for (i = 0; i < dsize; i++)
++                                t[i] = cursor->image.data[i] ^ info->cursor.mask[i];
++                        break;
++                case ROP_COPY:
++                default:
++                        for (i = 0; i < dsize; i++)
++                                t[i] = cursor->image.data[i] & info->cursor.mask[i];
++                        break;
++                }
++        } else if (t != cursor->image.data)
++                memcpy(t, cursor->image.data, dsize);
++      
++      fbsplash_renderc(info,
++                      info->cursor.image.dy + vc->vc_splash.ty,
++                      info->cursor.image.dx + vc->vc_splash.tx,
++                      info->cursor.image.height,
++                      info->cursor.image.width,
++                      (u8*)info->cursor.image.data,
++                      cc2cx(info->cursor.image.fg_color),
++                      cc2cx(info->cursor.image.bg_color),
++                      info->cursor.image.bg_color == vc->vc_splash.bg_color);
++}
++
++static void splashset(u8 *dst, int height, int width, int dstbytes, 
++                      u32 bgx, int bpp)
++{
++      int i;
++      
++      if (bpp == 8)
++              bgx |= bgx << 8;
++      if (bpp == 16 || bpp == 8)
++              bgx |= bgx << 16;
++      
++      while (height-- > 0) {
++              u8 *p = dst;
++              
++              switch (bpp) {
++              
++              case 32:
++                      for (i=0; i < width; i++) {
++                              fb_writel(bgx, p); p += 4;
++                      }
++                      break;
++              case 24:        
++                      for (i=0; i < width; i++) {
++#ifdef __LITTLE_ENDIAN
++                              fb_writew((bgx & 0xffff),(u16*)p); p += 2;
++                              fb_writeb((bgx >> 16),p++);
++#else
++                              fb_writew((bgx >> 8),(u16*)p); p += 2;
++                              fb_writeb((bgx & 0xff),p++);
++#endif
++                      }
++              case 16:
++                      for (i=0; i < width/4; i++) {
++                              fb_writel(bgx,p); p += 4;
++                              fb_writel(bgx,p); p += 4;
++                      }
++                      if (width & 2) {
++                              fb_writel(bgx,p); p += 4;
++                      }
++                      if (width & 1)
++                              fb_writew(bgx,(u16*)p);
++                      break;
++              case 8:
++                      for (i=0; i < width/4; i++) {
++                              fb_writel(bgx,p); p += 4;
++                      }
++                      
++                      if (width & 2) {
++                              fb_writew(bgx,p); p += 2;
++                      }
++                      if (width & 1)
++                              fb_writeb(bgx,(u8*)p);
++                      break;
++
++              }               
++              dst += dstbytes;
++      }
++}
++
++void fbsplash_copy(u8 *dst, u8 *src, int height, int width, int linebytes, 
++                 int bpp)
++{
++      int i;
++
++      while (height-- > 0) {
++              u32 *p = (u32 *)dst;
++              u32 *q = (u32 *)src;
++
++              switch (bpp) {
++      
++              case 32:
++                      for (i=0; i < width; i++)
++                              fb_writel(*q++, p++);
++                      break;  
++              case 24:        
++                      for (i=0; i < (width*3/4); i++)
++                              fb_writel(*q++, p++);
++                      if ((width*3) % 4) {
++                              if (width & 2) {
++                                      fb_writeb(*(u8*)q, (u8*)p);
++                              } else if (width & 1) {
++                                      fb_writew(*(u16*)q, (u16*)p);
++                                      fb_writeb(*(u8*)((u16*)q+1),(u8*)((u16*)p+2));
++                              }
++                      }
++                      break;
++              case 16:
++                      for (i=0; i < width/4; i++) {
++                              fb_writel(*q++, p++);
++                              fb_writel(*q++, p++);
++                      }
++                      if (width & 2)
++                              fb_writel(*q++, p++);
++                      if (width & 1)
++                              fb_writew(*(u16*)q, (u16*)p);
++                      break;
++              case 8:
++                      for (i=0; i < width/4; i++) 
++                              fb_writel(*q++, p++);
++                              
++                      if (width & 2) {
++                              fb_writew(*(u16*)q, (u16*)p); 
++                              q = (u32*) ((u16*)q + 1);
++                              p = (u32*) ((u16*)p + 1);
++                      }
++                      if (width & 1)
++                              fb_writeb(*(u8*)q, (u8*)p);
++                      break;
++              }
++
++              dst += linebytes;
++              src += linebytes;
++      }
++}
++
++static void splashfill(struct fb_info *info, int sy, int sx, int height, 
++                     int width) 
++{
++      int d = sy * info->fix.line_length + sx * ((info->var.bits_per_pixel + 7) >> 3);
++      
++      fbsplash_copy((u8 *)(info->screen_base + d), (u8 *)(info->splash.data + d),
++                  height, width, info->fix.line_length, info->var.bits_per_pixel);
++}
++
++void fbsplash_clear(struct vc_data *vc, struct fb_info *info, int sy, int sx, 
++                  int height, int width)
++{
++      int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
++      int bg_color = attr_bgcol_ec(bgshift, vc);
++      int transparent = vc->vc_splash.bg_color == bg_color;
++      u8 *dst;
++
++      sy = sy * vc->vc_font.height + vc->vc_splash.ty;
++      sx = sx * vc->vc_font.width + vc->vc_splash.tx;
++      height *= vc->vc_font.height;
++      width *= vc->vc_font.width;
++
++      if (transparent) {
++              splashfill(info, sy, sx, height, width);
++      } else {
++              dst = (u8 *)(info->screen_base + sy * info->fix.line_length + 
++                           sx * ((info->var.bits_per_pixel + 7) >> 3));
++              splashset(dst, height, width, info->fix.line_length, cc2cx(bg_color), 
++                        info->var.bits_per_pixel);
++      }
++}
++
++void fbsplash_clear_margins(struct vc_data *vc, struct fb_info *info, 
++                          int bottom_only)
++{
++      unsigned int tw = vc->vc_cols*vc->vc_font.width;
++      unsigned int th = vc->vc_rows*vc->vc_font.height;
++
++      if (!bottom_only) {
++              /* top margin */
++              splashfill(info, 0, 0, vc->vc_splash.ty, info->var.xres);
++              /* left margin */
++              splashfill(info, vc->vc_splash.ty, 0, th, vc->vc_splash.tx);
++              /* right margin */
++              splashfill(info, vc->vc_splash.ty, vc->vc_splash.tx + tw, th, 
++                         info->var.xres - vc->vc_splash.tx - tw);
++      }
++      splashfill(info, vc->vc_splash.ty + th, 0, 
++                 info->var.yres - vc->vc_splash.ty - th, info->var.xres);
++}
++
++void fbsplash_bmove_redraw(struct vc_data *vc, struct fb_info *info, int y, 
++                         int sx, int dx, int width)
++{
++      u16 *d = (u16 *) (vc->vc_origin + vc->vc_size_row * y + dx * 2);
++      u16 *s = d + (dx - sx);
++      u16 *start = d;
++      u16 *ls = d;
++      u16 *le = d + width;
++      u16 c;
++      int x = dx;
++      u16 attr = 1;
++
++      do {
++              c = scr_readw(d);
++              if (attr != (c & 0xff00)) {
++                      attr = c & 0xff00;
++                      if (d > start) {
++                              fbsplash_putcs(vc, info, start, d - start, y, x);
++                              x += d - start;
++                              start = d;
++                      }
++              }
++              if (s >= ls && s < le && c == scr_readw(s)) {
++                      if (d > start) {
++                              fbsplash_putcs(vc, info, start, d - start, y, x);
++                              x += d - start + 1;
++                              start = d + 1;
++                      } else {
++                              x++;
++                              start++;
++                      }
++              }
++              s++;
++              d++;
++      } while (d < le);
++      if (d > start)
++              fbsplash_putcs(vc, info, start, d - start, y, x);
++}
++
++void fbsplash_blank(struct vc_data *vc, struct fb_info *info, int blank)
++{
++      if (blank) {
++              splashset((u8 *)info->screen_base, info->var.yres, info->var.xres,
++                        info->fix.line_length, 0, info->var.bits_per_pixel);
++      } else {
++              update_screen(vc->vc_num);
++              fbsplash_clear_margins(vc, info, 0);
++      }
++}
++
+diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
+--- a/drivers/video/console/fbcon.c    2004-08-26 21:34:52 +02:00
++++ b/drivers/video/console/fbcon.c    2004-08-26 21:34:52 +02:00
+@@ -93,6 +93,7 @@
+ #endif
+ #include "fbcon.h"
++#include "../fbsplash.h"
+ #ifdef FBCONDEBUG
+ #  define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
+@@ -210,9 +211,14 @@
+           info->cursor.rop == ROP_COPY || !vc || !CON_IS_VISIBLE(vc)
+           || registered_fb[(int) con2fb_map[vc->vc_num]] != info)
+               return;
++
+       acquire_console_sem();
+       info->cursor.enable ^= 1;
+-      info->fbops->fb_cursor(info, &info->cursor);
++      if (fbsplash_active(info, vc_cons[info->currcon].d)) {
++              fbsplash_cursor(info, &info->cursor);
++      } else {
++              info->fbops->fb_cursor(info, &info->cursor);
++      }
+       release_console_sem();
+ }
+@@ -516,6 +522,14 @@
+       area.sy = sy * vc->vc_font.height;
+       area.dx = dx * vc->vc_font.width;
+       area.dy = dy * vc->vc_font.height;
++
++      if (fbsplash_active(info, vc)) {
++              area.sx += vc->vc_splash.tx;
++              area.sy += vc->vc_splash.ty;
++              area.dx += vc->vc_splash.tx;
++              area.dy += vc->vc_splash.ty;
++      }
++              
+       area.height = height * vc->vc_font.height;
+       area.width = width * vc->vc_font.width;
+@@ -528,6 +542,11 @@
+       int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
+       struct fb_fillrect region;
++      if (fbsplash_active(info, vc)) {
++              fbsplash_clear(vc, info, sy, sx, height, width);
++              return;
++      }
++      
+       region.color = attr_bgcol_ec(bgshift, vc);
+       region.dx = sx * vc->vc_font.width;
+       region.dy = sy * vc->vc_font.height;
+@@ -561,6 +580,11 @@
+       struct fb_image image;
+       u8 *src, *dst, *buf = NULL;
++      if (fbsplash_active(info, vc)) {
++              fbsplash_putcs(vc, info, s, count, yy, xx);
++              return;
++      }
++
+       if (attribute) {
+               buf = kmalloc(cellsize, GFP_KERNEL);
+               if (!buf)
+@@ -648,6 +672,13 @@
+       unsigned int bs = info->var.yres - bh;
+       struct fb_fillrect region;
++      if (fbsplash_active(info, vc)) {
++              if (!fbsplash_isverbose)
++                      return;
++              fbsplash_clear_margins(vc, info, bottom_only);
++              return;
++      }
++      
+       region.color = 0;
+       region.rop = ROP_COPY;
+@@ -785,6 +816,12 @@
+       cols = info->var.xres / vc->vc_font.width;
+       rows = info->var.yres / vc->vc_font.height;
++
++      if (fbsplash_active(info, vc)) {
++              cols = vc->vc_splash.twidth / vc->vc_font.width;
++              rows = vc->vc_splash.theight / vc->vc_font.height;
++      }
++
+       vc_resize(vc->vc_num, cols, rows);
+       DPRINTK("mode:   %s\n", info->fix.id);
+@@ -881,7 +918,7 @@
+       if (info_idx == -1 || info == NULL)
+           return;
+       if (vc->vc_num != display_fg || (info->flags & FBINFO_MODULE) ||
+-          (info->fix.type == FB_TYPE_TEXT))
++          (info->fix.type == FB_TYPE_TEXT) || fbsplash_active(info, vc))
+               logo = 0;
+       info->var.xoffset = info->var.yoffset = p->yscroll = 0; /* reset wrap/pan */
+@@ -1166,7 +1203,11 @@
+               if (info->cursor.rop == ROP_XOR) {
+                       info->cursor.enable = 0;
+                       info->cursor.rop = ROP_COPY;
+-                      info->fbops->fb_cursor(info, &cursor);
++                      if (fbsplash_active(info, vc)) {
++                              fbsplash_cursor(info, &cursor);
++                      } else {
++                              info->fbops->fb_cursor(info, &cursor);
++                      }
+               }       
+               break;
+       case CM_MOVE:
+@@ -1246,7 +1287,11 @@
+                               mask[i++] = msk;
+               }
+               info->cursor.rop = ROP_XOR;
+-              info->fbops->fb_cursor(info, &cursor);
++              if (fbsplash_active(info, vc)) {
++                      fbsplash_cursor(info, &cursor);
++              } else {
++                      info->fbops->fb_cursor(info, &cursor);
++              }
+               vbl_cursor_cnt = CURSOR_DRAW_DELAY;
+               break;
+       }
+@@ -1685,7 +1730,7 @@
+                       count = vc->vc_rows;
+               if (softback_top)
+                       fbcon_softback_note(vc, t, count);
+-              if (logo_shown >= 0)
++              if (logo_shown >= 0 || fbsplash_active(info, vc))
+                       goto redraw_up;
+               switch (p->scrollmode) {
+               case SCROLL_MOVE:
+@@ -1772,6 +1817,8 @@
+       case SM_DOWN:
+               if (count > vc->vc_rows)        /* Maximum realistic size */
+                       count = vc->vc_rows;
++              if (fbsplash_active(info, vc))
++                      goto redraw_down;
+               switch (p->scrollmode) {
+               case SCROLL_MOVE:
+                       accel_bmove(vc, info, t, 0, t + count, 0,
+@@ -1914,6 +1961,13 @@
+               }
+               return;
+       }
++
++      if (fbsplash_active(info, vc) && sy == dy && height == 1) {
++              /* must use slower redraw bmove to keep background pic intact */
++              fbsplash_bmove_redraw(vc, info, sy, sx, dx, width);
++              return;
++      }
++
+       accel_bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
+                       height, width);
+ }
+@@ -1968,7 +2022,8 @@
+       var.yres = height * fh;
+       x_diff = info->var.xres - var.xres;
+       y_diff = info->var.yres - var.yres;
+-      if (x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) {
++
++      if ((x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) && !vc->vc_splash.state) {
+               struct fb_videomode *mode;
+               DPRINTK("attempting resize %ix%i\n", var.xres, var.yres);
+@@ -2014,6 +2069,15 @@
+       struct fb_var_screeninfo var;
+       int i;
++      if (fbsplash_active_vc(vc)) {
++              struct vc_data *vc_curr = vc_cons[info->currcon].d;
++
++              if (!vc_curr->vc_splash.theme || strcmp(vc->vc_splash.theme, vc_curr->vc_splash.theme)) {
++                      if (fbsplash_call_helper("getpic", vc->vc_num))
++                              fbsplash_disable(vc, 0);
++              }
++      }
++
+       if (softback_top) {
+               int l = fbcon_softback_size / vc->vc_size_row;
+               if (softback_lines)
+@@ -2144,6 +2208,12 @@
+       fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
+       if (!info->fbops->fb_blank) {
++              
++              if (fbsplash_active(info, vc)) {
++                      fbsplash_blank(vc, info, blank);
++                      return 0;
++              }
++              
+               if (blank) {
+                       unsigned short oldc;
+                       u_int height;
+@@ -2312,9 +2382,16 @@
+       }
+       if (resize) {
++              u32 xres = info->var.xres, yres = info->var.yres;
+               /* reset wrap/pan */
+               info->var.xoffset = info->var.yoffset = p->yscroll = 0;
+-              vc_resize(vc->vc_num, info->var.xres / w, info->var.yres / h);
++
++              if (fbsplash_active(info, vc)) {
++                      xres = vc->vc_splash.twidth;
++                      yres = vc->vc_splash.theight;
++              }
++              
++              vc_resize(vc->vc_num, xres / w, yres / h);
+               if (CON_IS_VISIBLE(vc) && softback_buf) {
+                       int l = fbcon_softback_size / vc->vc_size_row;
+                       if (l > 5)
+@@ -2493,7 +2570,62 @@
+       } else
+               fb_copy_cmap(fb_default_cmap(1 << depth), &palette_cmap);
+-      return fb_set_cmap(&palette_cmap, info);
++      if (fbsplash_active(info, vc) && info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
++
++              u16 *red, *green, *blue;
++              u32 col;
++              int minlen = min(min(info->var.red.length, info->var.green.length), 
++                                   info->var.blue.length);
++              int h;
++
++              struct fb_cmap cmap = {
++                      .start = 0,
++                      .len = (1 << minlen),
++                      .red = NULL,
++                      .green = NULL,
++                      .blue = NULL,
++                      .transp = NULL
++              };
++
++              red = kmalloc(256 * sizeof(u16) * 3, GFP_KERNEL);
++      
++              if (!red)
++                      goto out;               
++      
++              green = red + 256;
++              blue = green + 265;
++              cmap.red = red;
++              cmap.green = green;
++              cmap.blue = blue;
++              
++              for (i = 0; i < cmap.len; i++) {
++                      red[i] = green[i] = blue[i] = (0xffff * i)/(cmap.len-1);
++              }
++
++              h = fb_set_cmap(&cmap, info);
++
++              for (j = i = 0; i < 16; i++) {
++                      k = table[i];
++                       
++                      col = ((vc->vc_palette[j++]  >> (8-minlen)) 
++                              << info->var.red.offset);
++                      col |= ((vc->vc_palette[j++] >> (8-minlen)) 
++                              << info->var.green.offset);
++                      col |= ((vc->vc_palette[j++] >> (8-minlen)) 
++                              << info->var.blue.offset);
++
++                      ((u32 *)info->pseudo_palette)[k] = col;
++              }
++
++              kfree(red);
++              
++              return h;
++              
++      } else if (fbsplash_active(info, vc) && info->var.bits_per_pixel == 8 && 
++                 info->splash.cmap.red != NULL) 
++              fb_set_cmap(&info->splash.cmap, info);
++              
++out:  return fb_set_cmap(&palette_cmap, info);
+ }
+ static u16 *fbcon_screen_pos(struct vc_data *vc, int offset)
+@@ -2673,7 +2805,10 @@
+ {
+       /* Clear cursor, restore saved data */
+       info->cursor.enable = 0;
+-      info->fbops->fb_cursor(info, &info->cursor);
++      if (fbsplash_active(info, vc_cons[info->currcon].d))
++              fbsplash_cursor(info, &info->cursor);
++      else
++              info->fbops->fb_cursor(info, &info->cursor);
+ }
+ static void fbcon_resumed(struct fb_info *info)
+@@ -2704,7 +2839,14 @@
+               var_to_display(p, &info->var, info);
+               cols = info->var.xres / vc->vc_font.width;
+               rows = info->var.yres / vc->vc_font.height;
+-              vc_resize(vc->vc_num, cols, rows);
++              
++              if (!fbsplash_active(info, vc)) {
++                      vc_resize(vc->vc_num, cols, rows);
++              } else {
++                      if (fbsplash_call_helper("modechange", vc->vc_num))
++                              fbsplash_disable(vc, 0);
++              }
++      
+               updatescrollmode(p, info, vc);
+               scrollback_max = 0;
+               scrollback_current = 0;
+@@ -2842,6 +2984,7 @@
+       acquire_console_sem();
+       fb_register_client(&fbcon_event_notifier);
+       release_console_sem();
++      fbsplash_init();
+       for (i = 0; i < MAX_NR_CONSOLES; i++)
+               con2fb_map[i] = -1;
+diff -Nru a/drivers/video/fbsplash.c b/drivers/video/fbsplash.c
+--- /dev/null  Wed Dec 31 16:00:00 196900
++++ b/drivers/video/fbsplash.c 2004-08-26 21:34:52 +02:00
+@@ -0,0 +1,527 @@
++/* 
++ *  linux/drivers/video/fbsplash.c -- Framebuffer splash routines
++ *
++ *  Copyright (C) 2004 Michal Januszewski <spock@gentoo.org>
++ *
++ *  Code based upon "Bootsplash" (C) 2001-2003 
++ *       Volker Poplawski <volker@poplawski.de>,
++ *       Stefan Reinauer <stepan@suse.de>,
++ *       Steffen Winterfeldt <snwint@suse.de>,
++ *       Michael Schroeder <mls@suse.de>,
++ *       Ken Wimer <wimer@suse.de>.
++ *
++ *  Splash render routines are located in /linux/drivers/video/cfbsplash.c
++ * 
++ *  This file is subject to the terms and conditions of the GNU General Public
++ *  License.  See the file COPYING in the main directory of this archive for
++ *  more details.
++ * 
++ */
++#include <linux/config.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/string.h>
++#include <linux/types.h>
++#include <linux/fb.h>
++#include <linux/vt_kern.h>
++#include <linux/vmalloc.h>
++#include <linux/unistd.h>
++#include <linux/syscalls.h>
++#include <linux/init.h>
++#include <linux/proc_fs.h>
++#include <linux/workqueue.h>
++#include <linux/kmod.h>
++#include <linux/miscdevice.h>
++#include <linux/device.h>
++#include <linux/fs.h>
++
++#include <asm/uaccess.h>
++#include <asm/irq.h>
++#include <asm/system.h>
++
++#include "console/fbcon.h"
++#include "fbsplash.h"
++
++#define SPLASH_VERSION "0.9"
++
++#ifdef DEBUG
++#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
++#else
++#define DPRINTK(fmt, args...)
++#endif
++
++static void splash_work_verbose(void *data);
++static int fbsplash_enable(struct vc_data *vc);
++
++DECLARE_WORK(splash_wq_verbose, splash_work_verbose, NULL);
++
++int fbsplash_mode = 0;
++char fbsplash_path[KMOD_PATH_LEN] = "/sbin/splash_helper";
++static char fbsplash_theme[FB_SPLASH_THEME_LEN] __initdata = "default";
++
++int fbsplash_call_helper(char* cmd, unsigned short vc)
++{
++      char *envp[] = {
++              "HOME=/",
++              "PATH=/sbin:/bin",
++              NULL
++      };
++
++      char tfb[5];
++      char tcons[5];
++      unsigned char fb = (int) con2fb_map[vc];
++
++      char *argv[] = {
++              fbsplash_path,
++              "1",
++              cmd,
++              tcons,
++              tfb,
++              (fbsplash_mode == FB_SPLASH_MODE_SILENT) ? "s" : "v",
++              vc_cons[vc].d->vc_splash.theme,
++              NULL
++      };
++
++      snprintf(tfb,5,"%d",fb);
++      snprintf(tcons,5,"%d",vc);
++      
++      return call_usermodehelper(fbsplash_path, argv, envp, 1);
++}
++
++int fbsplash_verbose(void)
++{
++      if (fbsplash_mode == FB_SPLASH_MODE_VERBOSE)
++              return 0;
++
++      fbsplash_mode = FB_SPLASH_MODE_VERBOSE;
++      
++      /* We have to do the switch from a workqueue helper, because chances are this
++       * function gets called from interrupt context, and we can't get hold of the 
++       * console sem this way. */
++      schedule_work(&splash_wq_verbose);
++
++      return 1;
++}
++
++/* Switches the first console to verbose mode. */
++static void splash_work_verbose(void *data)
++{
++      struct fb_info *info;
++      struct vc_data *vc;
++      
++      vc = vc_cons[0].d;
++      info = registered_fb[(int) con2fb_map[vc->vc_num]];
++
++      if (info == NULL)
++              return;
++
++      printk(KERN_INFO "fbsplash: switching to verbose mode\n");
++
++      vt_cons[0]->vc_mode = KD_TEXT;
++
++      acquire_console_sem();
++      do_unblank_screen(0);
++
++      if (info->splash.data) {
++              fbsplash_enable(vc);
++      } else {
++              fbsplash_disable(vc, 1);
++      }
++      release_console_sem();
++}
++
++/* Disables fbsplash on a virtual console; called with console sem held. */
++int fbsplash_disable(struct vc_data *vc, unsigned char redraw)
++{
++      struct fb_info* info;
++
++      if (!vc->vc_splash.state)
++              return -EINVAL;
++
++      info = registered_fb[(int) con2fb_map[vc->vc_num]];
++
++      if (info == NULL)
++              return -EINVAL;
++
++      vc->vc_splash.state = 0; 
++      vc_resize(vc->vc_num, info->var.xres / vc->vc_font.width, 
++                info->var.yres / vc->vc_font.height);
++
++      if (fg_console == vc->vc_num && redraw) {
++              redraw_screen(fg_console, 0);
++              update_region(fg_console, vc->vc_origin + 
++                            vc->vc_size_row * vc->vc_top, 
++                            vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2);
++      }
++
++      printk(KERN_INFO "fbsplash: switched splash state to 'off' on console %d\n", 
++                       vc->vc_num);
++
++      return 0;
++}
++
++/* Enables fbsplash on a virtual console; called with console sem held. */
++static int fbsplash_enable(struct vc_data *vc)
++{
++      struct fb_info* info;
++
++      info = registered_fb[(int) con2fb_map[vc->vc_num]];
++              
++      if (vc->vc_splash.twidth == 0 || vc->vc_splash.theight == 0 || 
++          info == NULL || !info->splash.data || vc->vc_splash.state)
++              return -EINVAL;
++      
++      vc->vc_splash.state = 1;
++      vc_resize(vc->vc_num, vc->vc_splash.twidth / vc->vc_font.width, 
++                vc->vc_splash.theight / vc->vc_font.height);
++
++      if (fg_console == vc->vc_num) {
++              redraw_screen(fg_console, 0);
++              update_region(fg_console, vc->vc_origin + 
++                            vc->vc_size_row * vc->vc_top, 
++                            vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2);
++              fbsplash_clear_margins(vc, info, 0);
++      }
++
++      printk(KERN_INFO "fbsplash: switched splash state to 'on' on console %d\n", 
++                       vc->vc_num);
++
++      return 0;
++}
++
++static int __init splash_setup(char *options)
++{
++      char *this_opt;
++      
++      while ((this_opt = strsep(&options, ",")) != NULL) {
++      
++              if (!strcmp(this_opt, "silent")) {
++                      fbsplash_mode = FB_SPLASH_MODE_SILENT;
++                      printk(KERN_INFO "fbsplash: silent\n");
++              } else if (!strcmp(this_opt, "verbose")) {
++                      fbsplash_mode = FB_SPLASH_MODE_VERBOSE;
++                      printk(KERN_INFO "fbsplash: verbose\n");
++              } else if (!strcmp(this_opt, "off")) {
++                      fbsplash_mode = 0;
++              } else if (!strncmp(this_opt, "theme:", 6)) {
++                      strncpy(fbsplash_theme, this_opt+6, 64);
++                      printk(KERN_INFO "fbsplash: theme %s\n", fbsplash_theme);
++              } else {
++                      printk(KERN_WARNING "fbsplash: unrecognized option %s\n", this_opt);
++              }
++      }
++      return 0;
++}
++
++__setup("splash=", splash_setup);
++
++static int splash_get_info(char *buf, char **start, off_t fpos, int length)
++{
++      char *p = buf;
++      
++      p += sprintf(p, "Framebuffer splash v%s, mode: %s\n", SPLASH_VERSION,
++                   ((fbsplash_mode == 2) ? "silent" : (fbsplash_mode == 1) ? "verbose" : "off"));
++
++      return p - buf;
++}
++
++static inline int fbsplash_ioctl_dosetstate(struct vc_data *vc, unsigned int __user* state, unsigned char origin)
++{
++      int tmp, ret;
++
++      if (get_user(tmp, state))
++              return -EFAULT;
++
++      if (origin == FB_SPLASH_IO_ORIG_USER)
++              acquire_console_sem();
++      if (!tmp)
++              ret = fbsplash_disable(vc, 1);
++      else
++              ret = fbsplash_enable(vc);
++      if (origin == FB_SPLASH_IO_ORIG_USER)
++              release_console_sem();
++
++      return ret;
++}
++
++static inline int fbsplash_ioctl_dogetstate(struct vc_data *vc, unsigned int __user *state)
++{
++      return put_user(vc->vc_splash.state, (unsigned int __user*) state);
++}
++
++static int fbsplash_ioctl_dosetcfg(struct vc_data *vc, struct vc_splash __user *arg, unsigned char origin)
++{
++      struct vc_splash cfg;
++      struct fb_info *info;
++      int len;
++      char *tmp;
++      
++      info = registered_fb[(int) con2fb_map[vc->vc_num]];
++
++      if (copy_from_user(&cfg, arg, sizeof(struct vc_splash)))
++              return -EFAULT;
++      if (info == NULL || !cfg.twidth || !cfg.theight || 
++          cfg.tx + cfg.twidth  > info->var.xres ||
++          cfg.ty + cfg.theight > info->var.yres)
++              return -EINVAL;
++
++      len = strlen_user(cfg.theme);
++      if (!len || len > FB_SPLASH_THEME_LEN)
++              return -EINVAL;
++      tmp = kmalloc(len, GFP_KERNEL);
++      if (!tmp)
++              return -ENOMEM;
++      if (copy_from_user(tmp, (void __user *)cfg.theme, len))
++              return -EFAULT;
++      cfg.theme = tmp;
++      cfg.state = 0;
++
++      /* If this ioctl is a response to a request from kernel, the console sem
++       * is already held; we also don't need to disable splash because either the
++       * new config and background picture will be successfully loaded, and the 
++       * splash will stay on, or in case of a failure it'll be turned off in fbcon. */
++      if (origin == FB_SPLASH_IO_ORIG_USER) {
++              acquire_console_sem();
++              if (vc->vc_splash.state)
++                      fbsplash_disable(vc, 1);
++      }
++
++      if (vc->vc_splash.theme)
++              kfree(vc->vc_splash.theme);
++
++      vc->vc_splash = cfg;
++
++      if (origin == FB_SPLASH_IO_ORIG_USER)
++              release_console_sem();
++
++      printk(KERN_INFO "fbsplash: console %d using theme '%s'\n", 
++                       vc->vc_num, vc->vc_splash.theme);
++      return 0;       
++}
++
++static int fbsplash_ioctl_dogetcfg(struct vc_data *vc, struct vc_splash __user *arg)
++{
++      struct vc_splash splash;
++      char __user *tmp;
++
++      if (get_user(tmp, &arg->theme))
++              return -EFAULT;
++      
++      splash = vc->vc_splash;
++      splash.theme = tmp;
++
++      if (vc->vc_splash.theme) {
++              if (copy_to_user(tmp, vc->vc_splash.theme, strlen(vc->vc_splash.theme) + 1))
++                      return -EFAULT;
++      } else
++              if (put_user(0, tmp))
++                      return -EFAULT;
++
++      if (copy_to_user(arg, &splash, sizeof(struct vc_splash)))
++              return -EFAULT;
++
++      return 0;
++}
++
++static int fbsplash_ioctl_dosetpic(struct vc_data *vc, struct fb_image __user *arg, unsigned char origin)
++{
++      struct fb_image img;
++      struct fb_info *info;
++      int len;
++      u8 *tmp;
++      
++      if (vc->vc_num != fg_console) 
++              return -EINVAL;
++
++      info = registered_fb[(int) con2fb_map[vc->vc_num]];
++      
++      if (info == NULL)
++              return -EINVAL;
++      
++      if (copy_from_user(&img, arg, sizeof(struct fb_image)))
++              return -EFAULT;
++      
++      if (img.width != info->var.xres || img.height != info->var.yres) {
++              printk(KERN_ERR "fbsplash: picture dimensions mismatch\n");
++              return -EINVAL;
++      }
++
++      if (img.depth != info->var.bits_per_pixel) {
++              printk(KERN_ERR "fbsplash: picture depth mismatch\n");
++              return -EINVAL;
++      }
++              
++      if (img.depth == 8) {
++              if (!img.cmap.len || !img.cmap.red || !img.cmap.green || 
++                  !img.cmap.blue)
++                      return -EINVAL;
++              
++              tmp = vmalloc(img.cmap.len * 3 * 2);
++              if (!tmp)
++                      return -ENOMEM;
++
++              if (copy_from_user(tmp, (void __user*)img.cmap.red, img.cmap.len * 2) ||
++                  copy_from_user(tmp + (img.cmap.len << 1),
++                                 (void __user*)img.cmap.green, (img.cmap.len << 1)) ||
++                  copy_from_user(tmp + (img.cmap.len << 2),
++                                 (void __user*)img.cmap.blue, (img.cmap.len << 1))) {
++                      vfree(tmp);
++                      return -EFAULT;
++              }
++                      
++              img.cmap.transp = NULL;
++              img.cmap.red = (u16*)tmp;
++              img.cmap.green = img.cmap.red + img.cmap.len;
++              img.cmap.blue = img.cmap.green + img.cmap.len;
++      } else {
++              img.cmap.red = NULL;
++      }
++              
++      len = ((img.depth + 7) >> 3) * img.width * img.height;
++      tmp = vmalloc(len);
++
++      if (!tmp)
++              goto out;
++
++      if (copy_from_user(tmp, (void __user*)img.data, len))
++              goto out;
++              
++      img.data = tmp;
++
++      /* If this ioctl is a response to a request from kernel, the console sem
++       * is already held. */
++      if (origin == FB_SPLASH_IO_ORIG_USER)
++              acquire_console_sem();
++      
++      if (info->splash.data)
++              vfree((u8*)info->splash.data);
++      if (info->splash.cmap.red)
++              vfree(info->splash.cmap.red);
++      
++      info->splash = img;
++
++      if (origin == FB_SPLASH_IO_ORIG_USER)
++              release_console_sem();
++
++      return 0;
++
++out:  if (img.cmap.red)
++              vfree(img.cmap.red);
++      if (tmp)
++              vfree(tmp);
++      return -ENOMEM;
++}
++
++static int splash_ioctl(struct inode * inode, struct file *filp, u_int cmd, 
++                      u_long arg)
++{
++      struct fb_splash_iowrapper __user *wrapper = (void __user*) arg;
++      struct vc_data *vc = NULL;
++      unsigned short vc_num = 0;
++      unsigned char origin = 0;
++      void __user *data = NULL;
++      
++      if (cmd != FBIOSPLASH_SETMODE && cmd != FBIOSPLASH_GETMODE)
++      {
++              if (verify_area(VERIFY_READ, wrapper, 
++                              sizeof(struct fb_splash_iowrapper)))
++                      return -EFAULT;
++      
++              __get_user(vc_num, &wrapper->vc);
++              __get_user(origin, &wrapper->origin);
++              __get_user(data, &wrapper->data);
++              
++              if (!vc_cons_allocated(vc_num))
++                      return -EINVAL;
++
++              vc = vc_cons[vc_num].d;
++      }
++      
++      switch (cmd) {
++      
++      case FBIOSPLASH_SETMODE:
++              if (arg != FB_SPLASH_MODE_SILENT && arg != FB_SPLASH_MODE_VERBOSE)
++                      return -EINVAL;
++      
++              if (fbsplash_mode == arg)
++                      return 0;
++      
++              fbsplash_mode = arg;
++              if (arg == FB_SPLASH_MODE_VERBOSE)
++                      splash_work_verbose(NULL);
++              return 0;
++      
++      case FBIOSPLASH_GETMODE:
++              return put_user(fbsplash_mode, (unsigned int __user *)arg);
++      case FBIOSPLASH_SETPIC:
++              return fbsplash_ioctl_dosetpic(vc, (struct fb_image __user*)data, origin);
++      case FBIOSPLASH_SETCFG:
++              return fbsplash_ioctl_dosetcfg(vc, (struct vc_splash*)data, origin);
++      case FBIOSPLASH_GETCFG:
++              return fbsplash_ioctl_dogetcfg(vc, (struct vc_splash*)data);
++      case FBIOSPLASH_SETSTATE:
++              return fbsplash_ioctl_dosetstate(vc, (unsigned int *)data, origin);
++      case FBIOSPLASH_GETSTATE:
++              return fbsplash_ioctl_dogetstate(vc, (unsigned int *)data);
++      default:
++              return -ENOIOCTLCMD;
++      }       
++}
++
++static struct file_operations splash_ops = {
++      .owner = THIS_MODULE,
++      .ioctl = splash_ioctl
++};
++
++static struct miscdevice splash_dev = {
++      .minor = MISC_DYNAMIC_MINOR,
++      .name = "fbsplash",
++      .fops = &splash_ops
++};
++
++int fbsplash_init(void)
++{
++      struct proc_dir_entry *splash_proc;
++      struct fb_info *info;
++      struct vc_data *vc;
++      int i;
++      
++      vc = vc_cons[0].d;
++      info = registered_fb[0];
++
++      for (i = 0; i < num_registered_fb; i++) {
++              registered_fb[i]->splash.data = NULL;
++              registered_fb[i]->splash.cmap.red = NULL;
++      }
++
++      for (i = 0; i < MAX_NR_CONSOLES && vc_cons[i].d; i++) {
++              vc_cons[i].d->vc_splash.state = vc_cons[i].d->vc_splash.twidth = 
++                                              vc_cons[i].d->vc_splash.theight = 0;
++              vc_cons[i].d->vc_splash.theme = NULL;
++      }
++
++      i = misc_register(&splash_dev);
++      if (i) {
++              printk(KERN_ERR "fbsplash: failed to register device\n");
++              return i;
++      }
++
++#ifdef CONFIG_PROC_FS
++      splash_proc = create_proc_info_entry("fbsplash", 0, NULL, splash_get_info);
++      if (splash_proc)
++              splash_proc->owner = THIS_MODULE;
++#endif
++      
++      if (fbsplash_mode && info) {
++              vc->vc_splash.theme = kmalloc((strlen(fbsplash_theme)+1) * sizeof(char), GFP_KERNEL);
++              strcpy(vc->vc_splash.theme, fbsplash_theme);
++              if (fbsplash_call_helper("init", 0))
++                      fbsplash_mode = FB_SPLASH_MODE_VERBOSE;
++      } else {
++              fbsplash_mode = FB_SPLASH_MODE_VERBOSE;
++      }
++              
++      return 0;
++}
++
++EXPORT_SYMBOL(fbsplash_path);
+diff -Nru a/drivers/video/fbsplash.h b/drivers/video/fbsplash.h
+--- /dev/null  Wed Dec 31 16:00:00 196900
++++ b/drivers/video/fbsplash.h 2004-08-26 21:34:52 +02:00
+@@ -0,0 +1,75 @@
++/* 
++ *  linux/drivers/video/fbsplash.h -- Framebuffer splash headers
++ *
++ *  Copyright (C) 2004 Michal Januszewski <spock@gentoo.org>
++ *
++ */
++
++#ifndef __FB_SPLASH_H
++#define __FB_SPLASH_H
++
++#ifndef _LINUX_FB_H
++#include <linux/fb.h>
++#endif
++
++struct fb_cursor;
++struct fb_info;
++struct vc_data;
++
++#ifdef CONFIG_FB_SPLASH
++/* fbsplash.c */
++int fbsplash_init(void);
++int fbsplash_verbose(void);
++int fbsplash_call_helper(char* cmd, unsigned short cons);
++int fbsplash_disable(struct vc_data *vc, unsigned char redraw);
++
++/* cfbsplash.c */
++void fbsplash_putcs(struct vc_data *vc, struct fb_info *info, const unsigned short *s, int count, int yy, int xx);
++void fbsplash_putc(struct vc_data *vc, struct fb_info *info, int c, int ypos, int xpos);
++void fbsplash_cursor(struct fb_info *info, struct fb_cursor *cursor);
++void fbsplash_clear(struct vc_data *vc, struct fb_info *info, int sy, int sx, int height, int width);
++void fbsplash_clear_margins(struct vc_data *vc, struct fb_info *info, int bottom_only);
++void fbsplash_blank(struct vc_data *vc, struct fb_info *info, int blank);
++void fbsplash_bmove_redraw(struct vc_data *vc, struct fb_info *info, int y, int sx, int dx, int width);
++void fbsplash_copy(u8 *dst, u8 *src, int height, int width, int linebytes, int bpp);
++
++/* vt.c */
++void acquire_console_sem(void);
++void release_console_sem(void);
++void do_unblank_screen(int entering_gfx);
++
++extern int fbsplash_mode;
++#define fbsplash_isverbose (fbsplash_mode == FB_SPLASH_MODE_VERBOSE)
++#define fbsplash_issilent  (fbsplash_mode == FB_SPLASH_MODE_SILENT)
++
++/* struct vc_data *y */
++#define fbsplash_active_vc(y) (y->vc_splash.state && y->vc_splash.theme) 
++
++/* struct fb_info *x, struct vc_data *y */
++#define fbsplash_active(x,y) (x->splash.data && fbsplash_active_vc(y) &&              \
++                            x->splash.width == x->var.xres &&                         \
++                            x->splash.height == x->var.yres &&                        \
++                            x->splash.depth == x->var.bits_per_pixel)
++
++#else /* CONFIG_FB_SPLASH */
++
++static inline void fbsplash_putcs(struct vc_data *vc, struct fb_info *info, const unsigned short *s, int count, int yy, int xx) {}
++static inline void fbsplash_putc(struct vc_data *vc, struct fb_info *info, int c, int ypos, int xpos) {}
++static inline void fbsplash_cursor(struct fb_info *info, struct fb_cursor *cursor) {}
++static inline void fbsplash_clear(struct vc_data *vc, struct fb_info *info, int sy, int sx, int height, int width) {}
++static inline void fbsplash_clear_margins(struct vc_data *vc, struct fb_info *info, int bottom_only) {}
++static inline void fbsplash_blank(struct vc_data *vc, struct fb_info *info, int blank) {}
++static inline void fbsplash_bmove_redraw(struct vc_data *vc, struct fb_info *info, int y, int sx, int dx, int width) {}
++static inline int fbsplash_call_helper(char* cmd, unsigned short cons) { return 0; }
++static inline int fbsplash_init(void) { return 0; }
++static inline int fbsplash_verbose(void) { return 0; }
++static inline int fbsplash_disable(struct vc_data *vc, unsigned char redraw) { return 0; }
++
++#define fbsplash_issilent (0)
++#define fbsplash_isverbose (1)
++#define fbsplash_active_vc(y) (0)
++#define fbsplash_active(x,y) (0)
++
++#endif /* CONFIG_FB_SPLASH */
++
++#endif /* __FB_SPLASH_H */
+diff -Nru a/include/linux/console_splash.h b/include/linux/console_splash.h
+--- /dev/null  Wed Dec 31 16:00:00 196900
++++ b/include/linux/console_splash.h   2004-08-26 21:34:52 +02:00
+@@ -0,0 +1,13 @@
++#ifndef _LINUX_CONSOLE_SPLASH_H_
++#define _LINUX_CONSOLE_SPLASH_H_ 1
++
++/* A structure used by the framebuffer splash code (drivers/video/fbsplash.c) */
++struct vc_splash {
++      __u8 bg_color;                          /* The color that is to be treated as transparent */
++      __u8 state;                             /* Current splash state: 0 = off, 1 = on */
++      __u16 tx, ty;                           /* Top left corner coordinates of the text field */
++      __u16 twidth, theight;                  /* Width and height of the text field */
++      char* theme;
++};
++
++#endif
+diff -Nru a/include/linux/console_struct.h b/include/linux/console_struct.h
+--- a/include/linux/console_struct.h   2004-08-26 21:34:52 +02:00
++++ b/include/linux/console_struct.h   2004-08-26 21:34:52 +02:00
+@@ -10,6 +10,7 @@
+  */
+ #define NPAR 16
++#include <linux/console_splash.h>
+ struct vc_data {
+       unsigned short  vc_num;                 /* Console number */
+@@ -87,6 +88,8 @@
+       struct vc_data **vc_display_fg;         /* [!] Ptr to var holding fg console for this display */
+       unsigned long   vc_uni_pagedir;
+       unsigned long   *vc_uni_pagedir_loc;  /* [!] Location of uni_pagedir variable for this console */
++
++      struct vc_splash vc_splash;
+       /* additional information is in vt_kern.h */
+ };
+diff -Nru a/include/linux/fb.h b/include/linux/fb.h
+--- a/include/linux/fb.h       2004-08-26 21:34:52 +02:00
++++ b/include/linux/fb.h       2004-08-26 21:34:52 +02:00
+@@ -9,6 +9,13 @@
+ #define FB_MAJOR              29
+ #define FB_MAX                        32      /* sufficient for now */
++struct fb_splash_iowrapper
++{
++      unsigned short vc;              /* Virtual console */
++      unsigned char origin;           /* Point of origin of the request */
++      void *data;
++};
++
+ /* ioctls
+    0x46 is 'F'                                                                */
+ #define FBIOGET_VSCREENINFO   0x4600
+@@ -36,7 +43,19 @@
+ #define FBIOGET_HWCINFO         0x4616
+ #define FBIOPUT_MODEINFO        0x4617
+ #define FBIOGET_DISPINFO        0x4618
+-
++#define FBIOSPLASH_SETCFG     _IOWR('F', 0x19, struct fb_splash_iowrapper)
++#define FBIOSPLASH_GETCFG     _IOR('F', 0x1A, struct fb_splash_iowrapper)
++#define FBIOSPLASH_SETSTATE   _IOWR('F', 0x1B, struct fb_splash_iowrapper)
++#define FBIOSPLASH_GETSTATE   _IOR('F', 0x1C, struct fb_splash_iowrapper)
++#define FBIOSPLASH_SETMODE    _IOWR('F', 0x1D, unsigned int)
++#define FBIOSPLASH_GETMODE    _IOR('F', 0x1E, unsigned int)
++#define FBIOSPLASH_SETPIC     _IOWR('F', 0x1F, struct fb_splash_iowrapper)
++
++#define FB_SPLASH_MODE_VERBOSE                1       /* Verbose mode */
++#define FB_SPLASH_MODE_SILENT                 2       /* Silent mode */
++#define FB_SPLASH_THEME_LEN           128     /* Maximum lenght of a theme name */
++#define FB_SPLASH_IO_ORIG_KERNEL      0       /* Kernel ioctl origin */
++#define FB_SPLASH_IO_ORIG_USER                1       /* User ioctl origin */
+ #define FB_TYPE_PACKED_PIXELS         0       /* Packed Pixels        */
+ #define FB_TYPE_PLANES                        1       /* Non interleaved planes */
+@@ -601,6 +620,8 @@
+ #define FBINFO_STATE_RUNNING  0
+ #define FBINFO_STATE_SUSPENDED        1
+       u32 state;                      /* Hardware state i.e suspend */
++
++      struct fb_image splash;
+       /* From here on everything is device dependent */
+       void *par;      
+diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h
+--- a/include/linux/sysctl.h   2004-08-26 21:34:52 +02:00
++++ b/include/linux/sysctl.h   2004-08-26 21:34:52 +02:00
+@@ -134,6 +134,7 @@
+       KERN_SPARC_SCONS_PWROFF=64, /* int: serial console power-off halt */
+       KERN_HZ_TIMER=65,       /* int: hz timer on or off */
+       KERN_UNKNOWN_NMI_PANIC=66, /* int: unknown nmi panic flag */
++      KERN_FBSPLASH=67,       /* string: path to fbsplash helper */
+ };
+diff -Nru a/kernel/panic.c b/kernel/panic.c
+--- a/kernel/panic.c   2004-08-26 21:34:52 +02:00
++++ b/kernel/panic.c   2004-08-26 21:34:52 +02:00
+@@ -19,6 +19,7 @@
+ #include <linux/syscalls.h>
+ #include <linux/interrupt.h>
+ #include <linux/nmi.h>
++#include "../drivers/video/fbsplash.h"
+ int panic_timeout;
+ int panic_on_oops;
+@@ -76,6 +77,8 @@
+                * We can't use the "normal" timers since we just panicked..
+                */
+               printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
++              fbsplash_verbose();
++              
+               for (i = 0; i < panic_timeout; i++) {
+                       touch_nmi_watchdog();
+                       mdelay(1000);
+@@ -99,6 +102,8 @@
+         disabled_wait(caller);
+ #endif
+       local_irq_enable();
++      fbsplash_verbose();
++
+       for (;;)
+               ;
+ }
+diff -Nru a/kernel/power/console.c b/kernel/power/console.c
+--- a/kernel/power/console.c   2004-08-26 21:34:52 +02:00
++++ b/kernel/power/console.c   2004-08-26 21:34:52 +02:00
+@@ -9,6 +9,8 @@
+ #include <linux/console.h>
+ #include "power.h"
++#include "../drivers/video/fbsplash.h"
++
+ static int new_loglevel = 10;
+ static int orig_loglevel;
+ static int orig_fgconsole, orig_kmsg;
+@@ -19,6 +21,9 @@
+       console_loglevel = new_loglevel;
+ #ifdef SUSPEND_CONSOLE
++      if (fbsplash_issilent)
++              fbsplash_verbose();
++
+       acquire_console_sem();
+       orig_fgconsole = fg_console;
+diff -Nru a/kernel/sysctl.c b/kernel/sysctl.c
+--- a/kernel/sysctl.c  2004-08-26 21:34:52 +02:00
++++ b/kernel/sysctl.c  2004-08-26 21:34:52 +02:00
+@@ -83,6 +83,9 @@
+ #ifdef CONFIG_HOTPLUG
+ extern char hotplug_path[];
+ #endif
++#ifdef CONFIG_FB_SPLASH
++extern char fbsplash_path[];
++#endif
+ #ifdef CONFIG_CHR_DEV_SG
+ extern int sg_big_buff;
+ #endif
+@@ -409,6 +412,17 @@
+               .ctl_name       = KERN_HOTPLUG,
+               .procname       = "hotplug",
+               .data           = &hotplug_path,
++              .maxlen         = KMOD_PATH_LEN,
++              .mode           = 0644,
++              .proc_handler   = &proc_dostring,
++              .strategy       = &sysctl_string,
++      },
++#endif
++#ifdef CONFIG_FB_SPLASH
++      {
++              .ctl_name       = KERN_FBSPLASH,
++              .procname       = "fbsplash",
++              .data           = &fbsplash_path,
+               .maxlen         = KMOD_PATH_LEN,
+               .mode           = 0644,
+               .proc_handler   = &proc_dostring,
diff --git a/i2o-build_105-fixes.patch b/i2o-build_105-fixes.patch
new file mode 100644 (file)
index 0000000..c55b10b
--- /dev/null
@@ -0,0 +1,67 @@
+--- linux-2.6.8/drivers/message/i2o/driver.c.orig      2004-08-18 17:59:08.000000000 +0200
++++ linux-2.6.8/drivers/message/i2o/driver.c   2004-08-18 20:31:27.451288416 +0200
+@@ -102,7 +102,13 @@
+       DBG("Register driver %s\n", drv->name);
+       if(drv->event) {
+-              drv->event_queue = create_workqueue(drv->name);
++/*
++ * create_workqueue(name, freezer_flag)
++ *                        ^^ PF_SYNCTHREAD if needed for syncing data to disk.
++ *                           PF_NOFREEZE if also needed for writing the image.
++ *                           0 otherwise.
++ */
++              drv->event_queue = create_workqueue(drv->name, 0);
+               if(!drv->event_queue)
+               {
+                       printk(KERN_ERR "i2o: Could not initialize event queue "
+--- linux-2.6.8/drivers/message/i2o/iop.c.orig 2004-08-18 17:59:08.000000000 +0200
++++ linux-2.6.8/drivers/message/i2o/iop.c      2004-08-18 20:53:48.639396832 +0200
+@@ -561,8 +561,19 @@
+       writel(0, &msg->tcntxt); //FIXME: use reasonable transaction context
+       writel(0, &msg->body[0]);
+       writel(0, &msg->body[1]);
++
++#ifdef CONFIG_X86_PAE
++/*
++ * sizeof(dma_addr_t) == 8
++ * sizeof(void *) == 4
++ * don't cast 'dma_addr_t' to 'void *'.
++*/
++      writel((u32) ((u64)c->status.phys), &msg->body[2]);
++      writel((u32)(((u64)c->status.phys) >> 32), &msg->body[3]);
++#else
+       writel(i2o_ptr_low((void *)c->status.phys), &msg->body[2]);
+       writel(i2o_ptr_high((void *)c->status.phys), &msg->body[3]);
++#endif
+       i2o_msg_post(c,m);
+@@ -875,8 +886,13 @@
+       writel(0, &msg->tcntxt); // FIXME: use resonable transaction context
+       writel(0, &msg->body[0]);
+       writel(0, &msg->body[1]);
++#ifdef CONFIG_X86_PAE
++      writel((u32) ((u64)c->status_block.phys), &msg->body[2]);
++      writel((u32)(((u64)c->status_block.phys) >> 32), &msg->body[3]);
++#else
+       writel(i2o_ptr_low((void *)c->status_block.phys), &msg->body[2]);
+       writel(i2o_ptr_high((void *)c->status_block.phys), &msg->body[3]);
++#endif
+       writel(sizeof(i2o_status_block), &msg->body[4]); /* always 88 bytes */
+       i2o_msg_post(c,m);
+@@ -992,8 +1008,13 @@
+       writel(MSG_FRAME_SIZE<<16|0x80, &msg->body[1]); /* Outbound msg frame
+                                               size in words and Initcode */
+       writel(0xd0000004, &msg->body[2]);
++#ifdef CONFIG_X86_PAE
++      writel((u32) ((u64)c->status.phys), &msg->body[2]);
++      writel((u32)(((u64)c->status.phys) >> 32), &msg->body[3]);
++#else
+       writel(i2o_ptr_low((void *)c->status.phys), &msg->body[3]);
+       writel(i2o_ptr_high((void *)c->status.phys), &msg->body[4]);
++#endif
+       i2o_msg_post(c, m);
index 8c5d157bbd0119f54079233d4a13474965426ac6..aa5e388dd040e0a347ea743b019edd1dcda0a496 100644 (file)
@@ -4,10 +4,66 @@
  /*
   * Boot command-line arguments
   */
--#define MAX_INIT_ARGS 8
--#define MAX_INIT_ENVS 8
+-#define MAX_INIT_ARGS 32
+-#define MAX_INIT_ENVS 32
 +#define MAX_INIT_ARGS 256
 +#define MAX_INIT_ENVS 256
  
  extern void time_init(void);
  /* Default late time init is NULL. archs can override this later. */
+--- linux-2.6.7/include/asm-i386/param.h.orig  2004-07-03 16:56:41.000000000 +0200
++++ linux-2.6.7/include/asm-i386/param.h       2004-07-03 19:10:53.358244832 +0200
+@@ -18,6 +18,6 @@
+ #endif
+ #define MAXHOSTNAMELEN        64      /* max length of hostname */
+-#define COMMAND_LINE_SIZE 256
++#define COMMAND_LINE_SIZE 4096
+ #endif
+diff -Nur --exclude '*.orig' linux-2.6.7-rc3.org/include/asm-i386/setup.h linux-2.6.7-rc3/include/asm-i386/setup.h
+--- linux-2.6.7-rc3.org/include/asm-i386/setup.h       2004-06-07 21:14:42.000000000 +0200
++++ linux-2.6.7-rc3/include/asm-i386/setup.h   2004-06-08 11:29:19.000000000 +0200
+@@ -17,7 +17,7 @@
+ #define MAX_NONPAE_PFN        (1 << 20)
+ #define PARAM_SIZE 2048
+-#define COMMAND_LINE_SIZE 256
++#define COMMAND_LINE_SIZE 4096
+ #define OLD_CL_MAGIC_ADDR     0x90020
+ #define OLD_CL_MAGIC          0xA33F
+diff -Nur --exclude '*.orig' linux-2.6.7-rc3.org/include/asm-s390/setup.h linux-2.6.7-rc3/include/asm-s390/setup.h
+--- linux-2.6.7-rc3.org/include/asm-s390/setup.h       2004-06-07 21:14:58.000000000 +0200
++++ linux-2.6.7-rc3/include/asm-s390/setup.h   2004-06-08 11:30:38.000000000 +0200
+@@ -9,7 +9,7 @@
+ #define _ASM_S390_SETUP_H
+ #define PARMAREA              0x10400
+-#define COMMAND_LINE_SIZE     896
++#define COMMAND_LINE_SIZE     4096
+ #define RAMDISK_ORIGIN                0x800000
+ #define RAMDISK_SIZE          0x800000
+--- linux-2.6.7/include/asm-ppc/setup.h.orig   2004-07-06 17:53:17.000000000 +0200
++++ linux-2.6.7/include/asm-ppc/setup.h        2004-07-06 17:55:37.428864888 +0200
+@@ -8,7 +8,7 @@
+ #include <asm-m68k/setup.h>
+ /* We have a bigger command line buffer. */
+ #undef COMMAND_LINE_SIZE
+-#define COMMAND_LINE_SIZE     512
++#define COMMAND_LINE_SIZE     4096
+ #endif /* _PPC_SETUP_H */
+ #endif /* __KERNEL__ */
+--- linux-2.6.7/arch/ppc/syslib/prom.c.orig    2004-07-06 17:53:30.000000000 +0200
++++ linux-2.6.7/arch/ppc/syslib/prom.c 2004-07-06 17:55:57.781770776 +0200
+@@ -85,7 +85,7 @@
+ extern void enter_rtas(void *);
+ void phys_call_rtas(int, int, int, ...);
+-extern char cmd_line[512];    /* XXX */
++extern char cmd_line[COMMAND_LINE_SIZE];
+ extern boot_infos_t *boot_infos;
+ unsigned long dev_tree_size;
diff --git a/kernel-alpha-smp.config b/kernel-alpha-smp.config
new file mode 100644 (file)
index 0000000..17cf2a8
--- /dev/null
@@ -0,0 +1,2207 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_ALPHA=y
+CONFIG_64BIT=y
+CONFIG_MMU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_ISA_DMA=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+# CONFIG_STANDALONE is not set
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HOTPLUG=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# System setup
+#
+CONFIG_ALPHA_GENERIC=y
+# CONFIG_ALPHA_ALCOR is not set
+# CONFIG_ALPHA_XL is not set
+# CONFIG_ALPHA_BOOK1 is not set
+# CONFIG_ALPHA_AVANTI_CH is not set
+# CONFIG_ALPHA_CABRIOLET is not set
+# CONFIG_ALPHA_DP264 is not set
+# CONFIG_ALPHA_EB164 is not set
+# CONFIG_ALPHA_EB64P_CH is not set
+# CONFIG_ALPHA_EB66 is not set
+# CONFIG_ALPHA_EB66P is not set
+# CONFIG_ALPHA_EIGER is not set
+# CONFIG_ALPHA_JENSEN is not set
+# CONFIG_ALPHA_LX164 is not set
+# CONFIG_ALPHA_LYNX is not set
+# CONFIG_ALPHA_MARVEL is not set
+# CONFIG_ALPHA_MIATA is not set
+# CONFIG_ALPHA_MIKASA is not set
+# CONFIG_ALPHA_NAUTILUS is not set
+# CONFIG_ALPHA_NONAME_CH is not set
+# CONFIG_ALPHA_NORITAKE is not set
+# CONFIG_ALPHA_PC164 is not set
+# CONFIG_ALPHA_P2K is not set
+# CONFIG_ALPHA_RAWHIDE is not set
+# CONFIG_ALPHA_RUFFIAN is not set
+# CONFIG_ALPHA_RX164 is not set
+# CONFIG_ALPHA_SX164 is not set
+# CONFIG_ALPHA_SABLE is not set
+# CONFIG_ALPHA_SHARK is not set
+# CONFIG_ALPHA_TAKARA is not set
+# CONFIG_ALPHA_TITAN is not set
+# CONFIG_ALPHA_WILDFIRE is not set
+CONFIG_ISA=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_ALPHA_CORE_AGP=y
+CONFIG_ALPHA_BROKEN_IRQ_MASK=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EISA=y
+CONFIG_SMP=y
+CONFIG_SCHED_SMT=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_NR_CPUS=64
+# CONFIG_DISCONTIGMEM is not set
+# CONFIG_VERBOSE_MCHECK is not set
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+CONFIG_EISA_PCI_EISA=y
+CONFIG_EISA_VIRTUAL_ROOT=y
+CONFIG_EISA_NAMES=y
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_YENTA=m
+CONFIG_CARDBUS=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_I82365=m
+CONFIG_TCIC=m
+CONFIG_PCMCIA_PROBE=y
+CONFIG_SRM_ENV=m
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+# CONFIG_OSF4_COMPAT is not set
+# CONFIG_BINFMT_EM86 is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_CML1=m
+CONFIG_PARPORT_SERIAL=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_PC_PCMCIA=m
+# CONFIG_PARPORT_OTHER is not set
+CONFIG_PARPORT_1284=y
+
+#
+# Plug and Play support
+#
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+CONFIG_ISAPNP=y
+# CONFIG_PNPBIOS is not set
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=m
+CONFIG_BLK_DEV_XD=m
+CONFIG_PARIDE=m
+CONFIG_PARIDE_PARPORT=m
+
+#
+# Parallel IDE high-level drivers
+#
+CONFIG_PARIDE_PD=m
+CONFIG_PARIDE_PCD=m
+CONFIG_PARIDE_PF=m
+CONFIG_PARIDE_PT=m
+CONFIG_PARIDE_PG=m
+
+#
+# Parallel IDE protocol modules
+#
+CONFIG_PARIDE_ATEN=m
+CONFIG_PARIDE_BPCK=m
+CONFIG_PARIDE_COMM=m
+CONFIG_PARIDE_DSTR=m
+CONFIG_PARIDE_FIT2=m
+CONFIG_PARIDE_FIT3=m
+CONFIG_PARIDE_EPAT=m
+CONFIG_PARIDE_EPATC8=y
+CONFIG_PARIDE_EPIA=m
+CONFIG_PARIDE_FRIQ=m
+CONFIG_PARIDE_FRPW=m
+CONFIG_PARIDE_KBIC=m
+CONFIG_PARIDE_KTTI=m
+CONFIG_PARIDE_ON20=m
+CONFIG_PARIDE_ON26=m
+CONFIG_BLK_CPQ_DA=m
+CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+CONFIG_BLK_DEV_DAC960=m
+CONFIG_BLK_DEV_UMEM=m
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_CARMEL=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_IDEDISK_STROKE is not set
+CONFIG_BLK_DEV_IDECS=m
+CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDETAPE=m
+CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDESCSI=m
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=m
+CONFIG_BLK_DEV_IDEPNP=y
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=y
+CONFIG_BLK_DEV_OPTI621=m
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_ONLYDISK is not set
+CONFIG_BLK_DEV_ADMA=y
+CONFIG_BLK_DEV_AEC62XX=m
+CONFIG_BLK_DEV_ALI15X3=m
+# CONFIG_WDC_ALI15X3 is not set
+CONFIG_BLK_DEV_AMD74XX=m
+CONFIG_BLK_DEV_CMD64X=m
+CONFIG_BLK_DEV_TRIFLEX=m
+CONFIG_BLK_DEV_CY82C693=m
+CONFIG_BLK_DEV_CS5520=m
+CONFIG_BLK_DEV_CS5530=m
+CONFIG_BLK_DEV_HPT34X=m
+# CONFIG_HPT34X_AUTODMA is not set
+CONFIG_BLK_DEV_HPT366=m
+CONFIG_BLK_DEV_SC1200=m
+CONFIG_BLK_DEV_PIIX=m
+CONFIG_BLK_DEV_NS87415=m
+CONFIG_BLK_DEV_PDC202XX_OLD=m
+CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=m
+CONFIG_PDC202XX_FORCE=y
+CONFIG_BLK_DEV_SVWKS=m
+CONFIG_BLK_DEV_SIIMAGE=m
+CONFIG_BLK_DEV_SLC90E66=m
+CONFIG_BLK_DEV_TRM290=m
+CONFIG_BLK_DEV_VIA82CXXX=y
+CONFIG_IDE_CHIPSETS=y
+
+#
+# Note: most of these also require special kernel boot parameters
+#
+CONFIG_BLK_DEV_4DRIVES=y
+CONFIG_BLK_DEV_ALI14XX=m
+CONFIG_BLK_DEV_DTC2278=m
+CONFIG_BLK_DEV_HT6560B=m
+CONFIG_BLK_DEV_PDC4030=m
+CONFIG_BLK_DEV_QD65XX=m
+CONFIG_BLK_DEV_UMC8672=m
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDEDMA_IVB=y
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_DMA_NONPCI is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_REPORT_LUNS=y
+# CONFIG_SCSI_CONSTANTS is not set
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_7000FASST=m
+CONFIG_SCSI_ACARD=m
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AHA1740 is not set
+CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
+CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
+# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
+# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+CONFIG_AIC79XX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_ADVANSYS=m
+CONFIG_SCSI_IN2000=m
+CONFIG_SCSI_MEGARAID=m
+# CONFIG_SCSI_SATA is not set
+CONFIG_SCSI_BUSLOGIC=m
+# CONFIG_SCSI_OMIT_FLASHPOINT is not set
+# CONFIG_SCSI_CPQFCTS is not set
+CONFIG_SCSI_DMX3191D=m
+CONFIG_SCSI_DTC3280=m
+CONFIG_SCSI_EATA=m
+CONFIG_SCSI_EATA_TAGGED_QUEUE=y
+CONFIG_SCSI_EATA_LINKED_COMMANDS=y
+CONFIG_SCSI_EATA_MAX_TAGS=16
+CONFIG_SCSI_EATA_PIO=m
+CONFIG_SCSI_FUTURE_DOMAIN=m
+CONFIG_SCSI_GDTH=m
+CONFIG_SCSI_GENERIC_NCR5380=m
+CONFIG_SCSI_GENERIC_NCR5380_MMIO=m
+CONFIG_SCSI_GENERIC_NCR53C400=y
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_INITIO=m
+CONFIG_SCSI_INIA100=m
+CONFIG_SCSI_PPA=m
+CONFIG_SCSI_IMM=m
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+CONFIG_SCSI_NCR53C406A=m
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+CONFIG_SCSI_PAS16=m
+CONFIG_SCSI_PSI240I=m
+CONFIG_SCSI_QLOGIC_FAS=m
+CONFIG_SCSI_QLOGIC_ISP=m
+CONFIG_SCSI_QLOGIC_FC=m
+CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA2XXX=m
+CONFIG_SCSI_QLA21XX=m
+CONFIG_SCSI_QLA22XX=m
+CONFIG_SCSI_QLA2300=m
+CONFIG_SCSI_QLA2322=m
+CONFIG_SCSI_QLA6312=m
+CONFIG_SCSI_QLA6322=m
+# CONFIG_SCSI_SIM710 is not set
+CONFIG_SCSI_SYM53C416=m
+CONFIG_SCSI_DC395x=m
+# CONFIG_SCSI_DC390T is not set
+CONFIG_SCSI_T128=m
+CONFIG_SCSI_U14_34F=m
+CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y
+CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y
+CONFIG_SCSI_U14_34F_MAX_TAGS=8
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# PCMCIA SCSI adapter support
+#
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+CONFIG_CD_NO_IDESCSI=y
+CONFIG_AZTCD=m
+CONFIG_GSCD=m
+# CONFIG_MCD is not set
+# CONFIG_MCDX is not set
+CONFIG_OPTCD=m
+CONFIG_SJCD=m
+CONFIG_ISP16_CDI=m
+CONFIG_CDU535=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_IOCTL_V4=y
+CONFIG_DM_CRYPT=m
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_ISENSE=m
+CONFIG_FUSION_CTL=m
+
+#
+# IEEE 1394 (FireWire) support
+#
+CONFIG_IEEE1394=m
+
+#
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_IEEE1394_OUI_DB=y
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
+
+#
+# Device Drivers
+#
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
+
+#
+# Protocol Drivers
+#
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# I2O device support
+#
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_DECNET=m
+# CONFIG_DECNET_SIOCGIFCONF is not set
+# CONFIG_DECNET_ROUTER is not set
+CONFIG_BRIDGE=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=m
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+CONFIG_ATM_CLIP_NO_ICMP=y
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_LLC=y
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=y
+CONFIG_LTPC=m
+CONFIG_COPS=m
+CONFIG_COPS_DAYNA=y
+CONFIG_COPS_TANGENT=y
+CONFIG_IPDDP=m
+# CONFIG_IPDDP_ENCAP is not set
+# CONFIG_IPDDP_DECAP is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+CONFIG_ECONET_AUNUDP=y
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+CONFIG_ARCNET=m
+CONFIG_ARCNET_1201=m
+CONFIG_ARCNET_1051=m
+CONFIG_ARCNET_RAW=m
+CONFIG_ARCNET_COM90xx=m
+CONFIG_ARCNET_COM90xxIO=m
+CONFIG_ARCNET_RIM_I=m
+CONFIG_ARCNET_COM20020=m
+CONFIG_ARCNET_COM20020_ISA=m
+CONFIG_ARCNET_COM20020_PCI=m
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_ETHERTAP=m
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_EL1=m
+CONFIG_EL2=m
+CONFIG_ELPLUS=m
+CONFIG_EL16=m
+# CONFIG_EL3 is not set
+CONFIG_3C515=m
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+# CONFIG_LANCE is not set
+CONFIG_NET_VENDOR_SMC=y
+CONFIG_WD80x3=m
+CONFIG_ULTRA=m
+# CONFIG_ULTRA32 is not set
+CONFIG_SMC9194=m
+CONFIG_NET_VENDOR_RACAL=y
+CONFIG_NI52=m
+CONFIG_NI65=m
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_PCMCIA_XIRCOM=m
+# CONFIG_AT1700 is not set
+CONFIG_DEPCA=m
+CONFIG_HP100=m
+CONFIG_NET_ISA=y
+CONFIG_E2100=m
+CONFIG_EWRK3=m
+# CONFIG_EEXPRESS is not set
+CONFIG_EEXPRESS_PRO=m
+CONFIG_HPLAN_PLUS=m
+CONFIG_HPLAN=m
+CONFIG_LP486E=m
+CONFIG_ETH16I=m
+CONFIG_NE2000=m
+CONFIG_ZNET=m
+# CONFIG_SEEQ8005 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_AMD8111_ETH=m
+CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
+CONFIG_AC3200=m
+CONFIG_APRICOT=m
+CONFIG_B44=m
+# CONFIG_FORCEDETH is not set
+CONFIG_CS89x0=m
+CONFIG_DGRS=m
+CONFIG_EEPRO100=m
+# CONFIG_EEPRO100_PIO is not set
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+# CONFIG_LNE390 is not set
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+# CONFIG_NE3210 is not set
+# CONFIG_ES3210 is not set
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+# CONFIG_8139TOO_8129 is not set
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_8139_RXBUF_IDX=2
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_VIA_RHINE=m
+# CONFIG_VIA_RHINE_MMIO is not set
+CONFIG_NET_POCKET=y
+CONFIG_DE600=m
+CONFIG_DE620=m
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_NET_GIGE=y
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_SIS190=m
+CONFIG_SK98LIN=m
+CONFIG_TIGON3=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+CONFIG_FDDI=y
+# CONFIG_DEFXX is not set
+CONFIG_SKFP=m
+CONFIG_HIPPI=y
+CONFIG_ROADRUNNER=m
+# CONFIG_ROADRUNNER_LARGE_RINGS is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+# CONFIG_ARLAN is not set
+CONFIG_WAVELAN=m
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+CONFIG_PCMCIA_RAYCS=m
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_NET_WIRELESS=y
+CONFIG_PRISM54=m
+
+#
+# Token Ring devices
+#
+CONFIG_TR=y
+CONFIG_IBMTR=m
+CONFIG_IBMOL=m
+CONFIG_IBMLS=m
+CONFIG_3C359=m
+CONFIG_TMS380TR=m
+CONFIG_TMSPCI=m
+CONFIG_SKISA=m
+CONFIG_PROTEON=m
+CONFIG_ABYSS=m
+# CONFIG_SMCTR is not set
+# CONFIG_NET_FC is not set
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_ARCNET_COM20020_CS=m
+
+#
+# ATM drivers
+#
+CONFIG_ATM_TCP=m
+CONFIG_ATM_LANAI=m
+CONFIG_ATM_ENI=m
+# CONFIG_ATM_ENI_DEBUG is not set
+# CONFIG_ATM_ENI_TUNE_BURST is not set
+CONFIG_ATM_FIRESTREAM=m
+# CONFIG_ATM_ZATM is not set
+CONFIG_ATM_IDT77252=m
+# CONFIG_ATM_IDT77252_DEBUG is not set
+# CONFIG_ATM_IDT77252_RCV_ALL is not set
+CONFIG_ATM_IDT77252_USE_SUNI=y
+CONFIG_ATM_AMBASSADOR=m
+# CONFIG_ATM_AMBASSADOR_DEBUG is not set
+CONFIG_ATM_HORIZON=m
+# CONFIG_ATM_HORIZON_DEBUG is not set
+CONFIG_ATM_FORE200E_MAYBE=m
+CONFIG_ATM_FORE200E_PCA=y
+CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E=m
+CONFIG_ATM_HE=m
+CONFIG_ATM_HE_USE_SUNI=y
+
+#
+# Amateur Radio support
+#
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+# CONFIG_AX25_DAMA_SLAVE is not set
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_BPQETHER=m
+CONFIG_SCC=m
+# CONFIG_SCC_DELAY is not set
+CONFIG_SCC_TRXECHO=y
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_YAM=m
+
+#
+# IrDA (infrared) support
+#
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+CONFIG_SIGMATEL_FIR=m
+CONFIG_NSC_FIR=m
+CONFIG_WINBOND_FIR=m
+CONFIG_TOSHIBA_FIR=m
+CONFIG_SMC_IRCC_FIR=m
+CONFIG_ALI_FIR=m
+CONFIG_VIA_FIR=m
+
+#
+# Bluetooth support
+#
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+CONFIG_PHONE=m
+CONFIG_PHONE_IXJ=m
+CONFIG_PHONE_IXJ_PCMCIA=m
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_VORTEX=m
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_SERIO_CT82C710=m
+CONFIG_SERIO_PARKBD=m
+CONFIG_SERIO_PCIPS2=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_INPORT=m
+CONFIG_MOUSE_ATIXL=y
+CONFIG_MOUSE_LOGIBM=m
+CONFIG_MOUSE_PC110PAD=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+# CONFIG_JOYSTICK_ANALOG is not set
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+CONFIG_JOYSTICK_GUILLEMOT=m
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_USB=y
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+CONFIG_JOYSTICK_TWIDDLER=m
+CONFIG_JOYSTICK_DB9=m
+CONFIG_JOYSTICK_GAMECON=m
+CONFIG_JOYSTICK_TURBOGRAFX=m
+CONFIG_INPUT_JOYDUMP=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_SERIAL_NONSTANDARD=y
+CONFIG_ROCKETPORT=m
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_N_HDLC=m
+CONFIG_STALDRV=y
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=8
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_MULTIPORT=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=m
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+CONFIG_PPDEV=m
+# CONFIG_TIPAR is not set
+
+#
+# Mice
+#
+CONFIG_BUSMOUSE=m
+CONFIG_QIC02_TAPE=m
+CONFIG_QIC02_DYNCONF=y
+
+#
+# Setting runtime QIC-02 configuration is done with qic02conf
+#
+
+#
+# from the tpqic02-support package.  It is available at
+#
+
+#
+# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/
+#
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_KCS=m
+CONFIG_IPMI_WATCHDOG=m
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+
+#
+# ISA-based Watchdog Cards
+#
+CONFIG_PCWATCHDOG=m
+CONFIG_MIXCOMWD=m
+CONFIG_WDT=m
+CONFIG_WDT_501=y
+CONFIG_WDT_501_FAN=y
+
+#
+# PCI-based Watchdog Cards
+#
+CONFIG_PCIPCWATCHDOG=m
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+CONFIG_USBPCWATCHDOG=m
+# CONFIG_NVRAM is not set
+CONFIG_RTC=m
+CONFIG_GEN_RTC=m
+CONFIG_GEN_RTC_X=y
+CONFIG_DTLK=m
+CONFIG_R3964=m
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+CONFIG_AGP=m
+CONFIG_AGP_ALPHA_CORE=m
+CONFIG_DRM=y
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_GAMMA=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_SYNCLINK_CS=m
+CONFIG_RAW_DRIVER=m
+CONFIG_MAX_RAW_DEVS=1024
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+CONFIG_I2C_ELV=m
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+CONFIG_I2C_ISA=m
+# CONFIG_I2C_NFORCE2 is not set
+CONFIG_I2C_PHILIPSPAR=m
+CONFIG_I2C_PARPORT=m
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VELLEMAN=m
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+CONFIG_I2C_VOODOO3=m
+
+#
+# I2C Hardware Sensors Chip support
+#
+CONFIG_I2C_SENSOR=m
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+# CONFIG_SENSORS_VIA686A is not set
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+
+#
+# Video For Linux
+#
+
+#
+# Video Adapters
+#
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_PMS=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+CONFIG_VIDEO_ZORAN=m
+CONFIG_VIDEO_ZORAN_BUZ=m
+CONFIG_VIDEO_ZORAN_DC10=m
+CONFIG_VIDEO_ZORAN_DC30=m
+CONFIG_VIDEO_ZORAN_LML33=m
+CONFIG_VIDEO_ZORAN_LML33R10=m
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+# CONFIG_VIDEO_HEXIUM_ORION is not set
+# CONFIG_VIDEO_HEXIUM_GEMINI is not set
+CONFIG_VIDEO_CX88=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_CADET=m
+CONFIG_RADIO_RTRACK=m
+CONFIG_RADIO_RTRACK2=m
+CONFIG_RADIO_AZTECH=m
+CONFIG_RADIO_GEMTEK=m
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+CONFIG_RADIO_MIROPCM20=m
+CONFIG_RADIO_MIROPCM20_RDS=m
+CONFIG_RADIO_SF16FMI=m
+CONFIG_RADIO_SF16FMR2=m
+CONFIG_RADIO_TERRATEC=m
+CONFIG_RADIO_TRUST=m
+CONFIG_RADIO_TYPHOON=m
+CONFIG_RADIO_TYPHOON_PROC_FS=y
+CONFIG_RADIO_ZOLTRIX=m
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_TWINHAN_DST=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+# CONFIG_DVB_MT312 is not set
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_VES1X93=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_NXT6000=m
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+# CONFIG_DVB_AV7110_FIRMWARE is not set
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+# CONFIG_DVB_TTUSB_BUDGET is not set
+# CONFIG_DVB_TTUSB_DEC is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR=m
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_PM2=m
+CONFIG_FB_PM2_FIFO_DISCONNECT=y
+CONFIG_FB_CYBER2000=m
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_TGA is not set
+CONFIG_FB_RIVA=m
+CONFIG_FB_RIVA_I2C=y
+# CONFIG_FB_RIVA_DEBUG is not set
+CONFIG_FB_MATROX=m
+CONFIG_FB_MATROX_MILLENIUM=y
+CONFIG_FB_MATROX_MYSTIQUE=y
+CONFIG_FB_MATROX_G450=y
+CONFIG_FB_MATROX_G100=y
+CONFIG_FB_MATROX_I2C=m
+CONFIG_FB_MATROX_MAVEN=m
+CONFIG_FB_MATROX_MULTIHEAD=y
+CONFIG_FB_RADEON_OLD=m
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=m
+CONFIG_FB_ATY=m
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
+# CONFIG_FB_ATY_XL_INIT is not set
+CONFIG_FB_SIS=m
+CONFIG_FB_SIS_300=y
+CONFIG_FB_SIS_315=y
+CONFIG_FB_NEOMAGIC=m
+CONFIG_FB_KYRO=m
+CONFIG_FB_3DFX=m
+# CONFIG_FB_3DFX_ACCEL is not set
+CONFIG_FB_VOODOO1=m
+CONFIG_FB_TRIDENT=m
+# CONFIG_FB_TRIDENT_ACCEL is not set
+CONFIG_FB_VIRTUAL=m
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_MDA_CONSOLE=m
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_LOGO_DEC_CLUT224 is not set
+
+#
+# Bootsplash configuration
+#
+# CONFIG_BOOTSPLASH is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_RTCTIMER=m
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# ISA devices
+#
+CONFIG_SND_AD1816A=m
+CONFIG_SND_AD1848=m
+CONFIG_SND_CS4231=m
+CONFIG_SND_CS4232=m
+CONFIG_SND_CS4236=m
+CONFIG_SND_ES968=m
+CONFIG_SND_ES1688=m
+CONFIG_SND_ES18XX=m
+CONFIG_SND_GUSCLASSIC=m
+CONFIG_SND_GUSEXTREME=m
+CONFIG_SND_GUSMAX=m
+CONFIG_SND_INTERWAVE=m
+CONFIG_SND_INTERWAVE_STB=m
+CONFIG_SND_OPTI92X_AD1848=m
+CONFIG_SND_OPTI92X_CS4231=m
+CONFIG_SND_OPTI93X=m
+CONFIG_SND_SB8=m
+CONFIG_SND_SB16=m
+CONFIG_SND_SBAWE=m
+CONFIG_SND_SB16_CSP=y
+CONFIG_SND_WAVEFRONT=m
+CONFIG_SND_ALS100=m
+CONFIG_SND_AZT2320=m
+CONFIG_SND_CMI8330=m
+CONFIG_SND_DT019X=m
+CONFIG_SND_OPL3SA2=m
+CONFIG_SND_SGALAXY=m
+CONFIG_SND_SSCAPE=m
+
+#
+# PCI devices
+#
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+CONFIG_SND_CS46XX=m
+CONFIG_SND_CS46XX_NEW_DSP=y
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VX222=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+
+#
+# PCMCIA devices
+#
+CONFIG_SND_VXPOCKET=m
+CONFIG_SND_VXP440=m
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+CONFIG_SOUND_BT878=m
+CONFIG_SOUND_CMPCI=m
+# CONFIG_SOUND_CMPCI_FM is not set
+# CONFIG_SOUND_CMPCI_MIDI is not set
+CONFIG_SOUND_CMPCI_JOYSTICK=y
+CONFIG_SOUND_CMPCI_CM8738=y
+# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
+# CONFIG_SOUND_CMPCI_SPDIFLOOP is not set
+CONFIG_SOUND_CMPCI_SPEAKERS=2
+CONFIG_SOUND_EMU10K1=m
+# CONFIG_MIDI_EMU10K1 is not set
+CONFIG_SOUND_FUSION=m
+CONFIG_SOUND_CS4281=m
+CONFIG_SOUND_ES1370=m
+CONFIG_SOUND_ES1371=m
+CONFIG_SOUND_ESSSOLO1=m
+CONFIG_SOUND_MAESTRO=m
+CONFIG_SOUND_MAESTRO3=m
+CONFIG_SOUND_ICH=m
+CONFIG_SOUND_SONICVIBES=m
+CONFIG_SOUND_TRIDENT=m
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_VIA82CXXX=m
+# CONFIG_MIDI_VIA82CXXX is not set
+CONFIG_SOUND_OSS=m
+# CONFIG_SOUND_TRACEINIT is not set
+# CONFIG_SOUND_DMAP is not set
+CONFIG_SOUND_AD1816=m
+CONFIG_SOUND_AD1889=m
+CONFIG_SOUND_SGALAXY=m
+CONFIG_SOUND_ADLIB=m
+CONFIG_SOUND_ACI_MIXER=m
+CONFIG_SOUND_CS4232=m
+CONFIG_SOUND_SSCAPE=m
+CONFIG_SOUND_GUS=m
+# CONFIG_SOUND_GUS16 is not set
+CONFIG_SOUND_GUSMAX=y
+CONFIG_SOUND_VMIDI=m
+CONFIG_SOUND_TRIX=m
+CONFIG_SOUND_MSS=m
+CONFIG_SOUND_MPU401=m
+CONFIG_SOUND_NM256=m
+CONFIG_SOUND_MAD16=m
+# CONFIG_MAD16_OLDCARD is not set
+CONFIG_SOUND_PAS=m
+CONFIG_SOUND_PSS=m
+CONFIG_PSS_MIXER=y
+# CONFIG_PSS_HAVE_BOOT is not set
+CONFIG_SOUND_SB=m
+CONFIG_SOUND_AWE32_SYNTH=m
+CONFIG_SOUND_WAVEFRONT=m
+CONFIG_SOUND_MAUI=m
+CONFIG_SOUND_YM3812=m
+CONFIG_SOUND_OPL3SA1=m
+CONFIG_SOUND_OPL3SA2=m
+CONFIG_SOUND_YMFPCI=m
+# CONFIG_SOUND_YMFPCI_LEGACY is not set
+CONFIG_SOUND_UART6850=m
+CONFIG_SOUND_AEDSP16=m
+CONFIG_SC6600=y
+CONFIG_SC6600_JOY=y
+CONFIG_SC6600_CDROM=4
+CONFIG_SC6600_CDROMBASE=0x0
+# CONFIG_AEDSP16_MSS is not set
+CONFIG_AEDSP16_SBPRO=y
+CONFIG_AEDSP16_MPU401=y
+CONFIG_SOUND_TVMIXER=m
+CONFIG_SOUND_KAHLUA=m
+CONFIG_SOUND_ALI5455=m
+CONFIG_SOUND_FORTE=m
+CONFIG_SOUND_RME96XX=m
+CONFIG_SOUND_AD1980=m
+
+#
+# USB support
+#
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+CONFIG_USB_DYNAMIC_MINORS=y
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_UHCI_HCD=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_AUDIO=m
+
+#
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+#
+CONFIG_USB_MIDI=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+
+#
+# USB Human Interface Devices (HID)
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_AIPTEK=m
+CONFIG_USB_WACOM=m
+CONFIG_USB_KBTAB=m
+CONFIG_USB_POWERMATE=m
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_XPAD=m
+CONFIG_USB_ATI_REMOTE=m
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_DABUSB=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_OV511=m
+CONFIG_USB_PWC=m
+CONFIG_USB_SE401=m
+CONFIG_USB_STV680=m
+CONFIG_USB_W9968CF=m
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_AX8817X=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_BRLVGER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_LED=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_TEST=m
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+# CONFIG_UMSDOS_FS is not set
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+CONFIG_ADFS_FS_RW=y
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_QNX4FS_RW=y
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="iso8859-2"
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=n
+CONFIG_CIFS_XATTR=y
+CONFIG_NCP_FS=m
+CONFIG_NCPFS_PACKET_SIGNING=y
+CONFIG_NCPFS_IOCTL_LOCKING=y
+CONFIG_NCPFS_STRONG=y
+CONFIG_NCPFS_NFS_NS=y
+CONFIG_NCPFS_OS2_NS=y
+CONFIG_NCPFS_SMALLDOS=y
+CONFIG_NCPFS_NLS=y
+CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_INTERMEZZO_FS=m
+CONFIG_AFS_FS=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+CONFIG_RXRPC=m
+
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_OSF_PARTITION=y
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-2"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Profiling support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+
+#
+# Kernel hacking
+#
+CONFIG_ALPHA_LEGACY_START_ADDRESS=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_MATHEMU=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_RWLOCK is not set
+# CONFIG_DEBUG_SEMAPHORE is not set
+# CONFIG_DEBUG_INFO is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+
+# CONFIG_AGP_INTEL_MCH is not set
+#
+# Config for 2.6.6-rc2+cset-20040422_0013
+#
+
+CONFIG_POSIX_MQUEUE=y
+CONFIG_AUDIT=y
+CONFIG_AMD8111E_NAPI=y
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+CONFIG_IPMI_SI=m
+CONFIG_I2C_ALI1563=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_CYTHERM=m
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_CYCLADES=m
+# CONFIG_CYZ_INTR is not set
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_LIBCRC32C=m
+
+# CONFIG_ATM_FORE200E_USE_TASKLET is not set
+
+# for pramfs filesystem
+
+# CONFIG_PRAMFS is not set
+# CONFIG_PRAMFS_NOWP is not set
+# CONFIG_ROOT_PRAMFS is not set
+
+# CONFIG_LIRC_SUPPORT is not set
+
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+
+CONFIG_SENSORS_RTC8564=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_PHIDGETSERVO=m
+
+CONFIG_KALLSYMS_ALL=y
+
+# CONFIG_I2O is not set
+# CONFIG_FB_ASILIANT is not set
+# 2.6.7 + cset-20040620_0609
+
+CONFIG_BSD_PROCESS_ACCT_V3=y
+
+CONFIG_SCSI_3W_9XXX=m
+
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+CONFIG_VIA_VELOCITY=m
+
+# CONFIG_CIFS_POSIX is not set
+
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+
+# 2.6.7 + cset-20040621_0519
+
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+
+CONFIG_NLS_ASCII=m
+
+CONFIG_VIDEO_OVCAMCHIP=m
+# 2.6.7 + cset-20040622_1819
+
+CONFIG_BLK_DEV_SX8=m
+
+# CONFIG_BLK_DEV_IDE_SATA is not set
+
+CONFIG_SCSI_SATA_NV=m
+
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_BLK_DEV_GNBD=m
+CONFIG_CRC16=m
+
+# cset-20040701_0409
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+# CONFIG_NET_CLS_ACT is not set
+# CONFIG_NET_ACT_POLICE is not set
+# CONFIG_FB_CIRRUS is not set
+# cset-20040702_0108
+CONFIG_CRYPTO_TEA=m
+
+
+CONFIG_NET_SCH_NETEM=m
+CONFIG_BT_HIDP=m
+
diff --git a/kernel-alpha.config b/kernel-alpha.config
new file mode 100644 (file)
index 0000000..016d12a
--- /dev/null
@@ -0,0 +1,2265 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_ALPHA=y
+CONFIG_64BIT=y
+CONFIG_MMU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_ISA_DMA=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+# CONFIG_STANDALONE is not set
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HOTPLUG=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# System setup
+#
+CONFIG_ALPHA_GENERIC=y
+# CONFIG_ALPHA_ALCOR is not set
+# CONFIG_ALPHA_XL is not set
+# CONFIG_ALPHA_BOOK1 is not set
+# CONFIG_ALPHA_AVANTI_CH is not set
+# CONFIG_ALPHA_CABRIOLET is not set
+# CONFIG_ALPHA_DP264 is not set
+# CONFIG_ALPHA_EB164 is not set
+# CONFIG_ALPHA_EB64P_CH is not set
+# CONFIG_ALPHA_EB66 is not set
+# CONFIG_ALPHA_EB66P is not set
+# CONFIG_ALPHA_EIGER is not set
+# CONFIG_ALPHA_JENSEN is not set
+# CONFIG_ALPHA_LX164 is not set
+# CONFIG_ALPHA_LYNX is not set
+# CONFIG_ALPHA_MARVEL is not set
+# CONFIG_ALPHA_MIATA is not set
+# CONFIG_ALPHA_MIKASA is not set
+# CONFIG_ALPHA_NAUTILUS is not set
+# CONFIG_ALPHA_NONAME_CH is not set
+# CONFIG_ALPHA_NORITAKE is not set
+# CONFIG_ALPHA_PC164 is not set
+# CONFIG_ALPHA_P2K is not set
+# CONFIG_ALPHA_RAWHIDE is not set
+# CONFIG_ALPHA_RUFFIAN is not set
+# CONFIG_ALPHA_RX164 is not set
+# CONFIG_ALPHA_SX164 is not set
+# CONFIG_ALPHA_SABLE is not set
+# CONFIG_ALPHA_SHARK is not set
+# CONFIG_ALPHA_TAKARA is not set
+# CONFIG_ALPHA_TITAN is not set
+# CONFIG_ALPHA_WILDFIRE is not set
+CONFIG_ISA=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_ALPHA_CORE_AGP=y
+CONFIG_ALPHA_BROKEN_IRQ_MASK=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EISA=y
+# CONFIG_SMP is not set
+# CONFIG_DISCONTIGMEM is not set
+# CONFIG_VERBOSE_MCHECK is not set
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+CONFIG_EISA_PCI_EISA=y
+CONFIG_EISA_VIRTUAL_ROOT=y
+CONFIG_EISA_NAMES=y
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_YENTA=m
+CONFIG_CARDBUS=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_I82365=m
+CONFIG_TCIC=m
+CONFIG_PCMCIA_PROBE=y
+CONFIG_SRM_ENV=m
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+# CONFIG_OSF4_COMPAT is not set
+# CONFIG_BINFMT_EM86 is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_CML1=m
+CONFIG_PARPORT_SERIAL=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_PC_PCMCIA=m
+# CONFIG_PARPORT_OTHER is not set
+CONFIG_PARPORT_1284=y
+
+#
+# Plug and Play support
+#
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+CONFIG_ISAPNP=y
+# CONFIG_PNPBIOS is not set
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=m
+CONFIG_BLK_DEV_XD=m
+CONFIG_PARIDE=m
+CONFIG_PARIDE_PARPORT=m
+
+#
+# Parallel IDE high-level drivers
+#
+CONFIG_PARIDE_PD=m
+CONFIG_PARIDE_PCD=m
+CONFIG_PARIDE_PF=m
+CONFIG_PARIDE_PT=m
+CONFIG_PARIDE_PG=m
+
+#
+# Parallel IDE protocol modules
+#
+CONFIG_PARIDE_ATEN=m
+CONFIG_PARIDE_BPCK=m
+CONFIG_PARIDE_COMM=m
+CONFIG_PARIDE_DSTR=m
+CONFIG_PARIDE_FIT2=m
+CONFIG_PARIDE_FIT3=m
+CONFIG_PARIDE_EPAT=m
+CONFIG_PARIDE_EPATC8=y
+CONFIG_PARIDE_EPIA=m
+CONFIG_PARIDE_FRIQ=m
+CONFIG_PARIDE_FRPW=m
+CONFIG_PARIDE_KBIC=m
+CONFIG_PARIDE_KTTI=m
+CONFIG_PARIDE_ON20=m
+CONFIG_PARIDE_ON26=m
+CONFIG_BLK_CPQ_DA=m
+CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+CONFIG_BLK_DEV_DAC960=m
+CONFIG_BLK_DEV_UMEM=m
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_CARMEL=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_IDEDISK_STROKE is not set
+CONFIG_BLK_DEV_IDECS=m
+CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDETAPE=m
+CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDESCSI=m
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=m
+CONFIG_BLK_DEV_IDEPNP=y
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=y
+CONFIG_BLK_DEV_OPTI621=m
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_ONLYDISK is not set
+CONFIG_BLK_DEV_ADMA=y
+CONFIG_BLK_DEV_AEC62XX=m
+CONFIG_BLK_DEV_ALI15X3=m
+# CONFIG_WDC_ALI15X3 is not set
+CONFIG_BLK_DEV_AMD74XX=m
+CONFIG_BLK_DEV_CMD64X=m
+CONFIG_BLK_DEV_TRIFLEX=m
+CONFIG_BLK_DEV_CY82C693=m
+CONFIG_BLK_DEV_CS5520=m
+CONFIG_BLK_DEV_CS5530=m
+CONFIG_BLK_DEV_HPT34X=m
+# CONFIG_HPT34X_AUTODMA is not set
+CONFIG_BLK_DEV_HPT366=m
+CONFIG_BLK_DEV_SC1200=m
+CONFIG_BLK_DEV_PIIX=m
+CONFIG_BLK_DEV_NS87415=m
+CONFIG_BLK_DEV_PDC202XX_OLD=m
+CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=m
+CONFIG_PDC202XX_FORCE=y
+CONFIG_BLK_DEV_SVWKS=m
+CONFIG_BLK_DEV_SIIMAGE=m
+CONFIG_BLK_DEV_SLC90E66=m
+CONFIG_BLK_DEV_TRM290=m
+CONFIG_BLK_DEV_VIA82CXXX=y
+CONFIG_IDE_CHIPSETS=y
+
+#
+# Note: most of these also require special kernel boot parameters
+#
+CONFIG_BLK_DEV_4DRIVES=y
+CONFIG_BLK_DEV_ALI14XX=m
+CONFIG_BLK_DEV_DTC2278=m
+CONFIG_BLK_DEV_HT6560B=m
+CONFIG_BLK_DEV_PDC4030=m
+CONFIG_BLK_DEV_QD65XX=m
+CONFIG_BLK_DEV_UMC8672=m
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDEDMA_IVB=y
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_DMA_NONPCI is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_REPORT_LUNS=y
+# CONFIG_SCSI_CONSTANTS is not set
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_7000FASST=m
+CONFIG_SCSI_ACARD=m
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AHA1740 is not set
+CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
+CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
+# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
+# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+CONFIG_AIC79XX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_ADVANSYS=m
+CONFIG_SCSI_IN2000=m
+CONFIG_SCSI_MEGARAID=m
+# CONFIG_SCSI_SATA is not set
+CONFIG_SCSI_BUSLOGIC=m
+# CONFIG_SCSI_OMIT_FLASHPOINT is not set
+# CONFIG_SCSI_CPQFCTS is not set
+CONFIG_SCSI_DMX3191D=m
+CONFIG_SCSI_DTC3280=m
+CONFIG_SCSI_EATA=m
+CONFIG_SCSI_EATA_TAGGED_QUEUE=y
+CONFIG_SCSI_EATA_LINKED_COMMANDS=y
+CONFIG_SCSI_EATA_MAX_TAGS=16
+CONFIG_SCSI_EATA_PIO=m
+CONFIG_SCSI_FUTURE_DOMAIN=m
+CONFIG_SCSI_GDTH=m
+CONFIG_SCSI_GENERIC_NCR5380=m
+CONFIG_SCSI_GENERIC_NCR5380_MMIO=m
+CONFIG_SCSI_GENERIC_NCR53C400=y
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_INITIO=m
+CONFIG_SCSI_INIA100=m
+CONFIG_SCSI_PPA=m
+CONFIG_SCSI_IMM=m
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+CONFIG_SCSI_NCR53C406A=m
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+CONFIG_SCSI_PAS16=m
+CONFIG_SCSI_PSI240I=m
+CONFIG_SCSI_QLOGIC_FAS=m
+CONFIG_SCSI_QLOGIC_ISP=m
+CONFIG_SCSI_QLOGIC_FC=m
+CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA2XXX=m
+CONFIG_SCSI_QLA21XX=m
+CONFIG_SCSI_QLA22XX=m
+CONFIG_SCSI_QLA2300=m
+CONFIG_SCSI_QLA2322=m
+CONFIG_SCSI_QLA6312=m
+CONFIG_SCSI_QLA6322=m
+# CONFIG_SCSI_SIM710 is not set
+CONFIG_SCSI_SYM53C416=m
+CONFIG_SCSI_DC395x=m
+# CONFIG_SCSI_DC390T is not set
+CONFIG_SCSI_T128=m
+CONFIG_SCSI_U14_34F=m
+CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y
+CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y
+CONFIG_SCSI_U14_34F_MAX_TAGS=8
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# PCMCIA SCSI adapter support
+#
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+CONFIG_CD_NO_IDESCSI=y
+CONFIG_AZTCD=m
+CONFIG_GSCD=m
+CONFIG_SBPCD=m
+# CONFIG_MCD is not set
+# CONFIG_MCDX is not set
+CONFIG_OPTCD=m
+CONFIG_CM206=m
+CONFIG_SJCD=m
+CONFIG_ISP16_CDI=m
+CONFIG_CDU31A=m
+CONFIG_CDU535=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_IOCTL_V4=y
+CONFIG_DM_CRYPT=m
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_ISENSE=m
+CONFIG_FUSION_CTL=m
+
+#
+# IEEE 1394 (FireWire) support
+#
+CONFIG_IEEE1394=m
+
+#
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_IEEE1394_OUI_DB=y
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
+
+#
+# Device Drivers
+#
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
+
+#
+# Protocol Drivers
+#
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# I2O device support
+#
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_DECNET=m
+# CONFIG_DECNET_SIOCGIFCONF is not set
+# CONFIG_DECNET_ROUTER is not set
+CONFIG_BRIDGE=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=m
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+CONFIG_ATM_CLIP_NO_ICMP=y
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_LLC=y
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=y
+CONFIG_LTPC=m
+CONFIG_COPS=m
+CONFIG_COPS_DAYNA=y
+CONFIG_COPS_TANGENT=y
+CONFIG_IPDDP=m
+# CONFIG_IPDDP_ENCAP is not set
+# CONFIG_IPDDP_DECAP is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+CONFIG_ECONET_AUNUDP=y
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+CONFIG_ARCNET=m
+CONFIG_ARCNET_1201=m
+CONFIG_ARCNET_1051=m
+CONFIG_ARCNET_RAW=m
+CONFIG_ARCNET_COM90xx=m
+CONFIG_ARCNET_COM90xxIO=m
+CONFIG_ARCNET_RIM_I=m
+CONFIG_ARCNET_COM20020=m
+CONFIG_ARCNET_COM20020_ISA=m
+CONFIG_ARCNET_COM20020_PCI=m
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_ETHERTAP=m
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_EL1=m
+CONFIG_EL2=m
+CONFIG_ELPLUS=m
+CONFIG_EL16=m
+# CONFIG_EL3 is not set
+CONFIG_3C515=m
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+# CONFIG_LANCE is not set
+CONFIG_NET_VENDOR_SMC=y
+CONFIG_WD80x3=m
+CONFIG_ULTRA=m
+# CONFIG_ULTRA32 is not set
+CONFIG_SMC9194=m
+CONFIG_NET_VENDOR_RACAL=y
+CONFIG_NI5010=m
+CONFIG_NI52=m
+CONFIG_NI65=m
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_PCMCIA_XIRCOM=m
+CONFIG_PCMCIA_XIRTULIP=m
+# CONFIG_AT1700 is not set
+CONFIG_DEPCA=m
+CONFIG_HP100=m
+CONFIG_NET_ISA=y
+CONFIG_E2100=m
+CONFIG_EWRK3=m
+# CONFIG_EEXPRESS is not set
+CONFIG_EEXPRESS_PRO=m
+CONFIG_HPLAN_PLUS=m
+CONFIG_HPLAN=m
+CONFIG_LP486E=m
+CONFIG_ETH16I=m
+CONFIG_NE2000=m
+CONFIG_ZNET=m
+# CONFIG_SEEQ8005 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_AMD8111_ETH=m
+CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
+CONFIG_AC3200=m
+CONFIG_APRICOT=m
+CONFIG_B44=m
+# CONFIG_FORCEDETH is not set
+CONFIG_CS89x0=m
+CONFIG_DGRS=m
+CONFIG_EEPRO100=m
+# CONFIG_EEPRO100_PIO is not set
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+# CONFIG_LNE390 is not set
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+# CONFIG_NE3210 is not set
+# CONFIG_ES3210 is not set
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+# CONFIG_8139TOO_8129 is not set
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_8139_RXBUF_IDX=2
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_VIA_RHINE=m
+# CONFIG_VIA_RHINE_MMIO is not set
+CONFIG_NET_POCKET=y
+CONFIG_DE600=m
+CONFIG_DE620=m
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_NET_GIGE=y
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_SIS190=m
+CONFIG_SK98LIN=m
+CONFIG_TIGON3=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+CONFIG_FDDI=y
+# CONFIG_DEFXX is not set
+CONFIG_SKFP=m
+CONFIG_HIPPI=y
+CONFIG_ROADRUNNER=m
+# CONFIG_ROADRUNNER_LARGE_RINGS is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+# CONFIG_ARLAN is not set
+CONFIG_WAVELAN=m
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+CONFIG_PCMCIA_RAYCS=m
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_NET_WIRELESS=y
+CONFIG_PRISM54=m
+
+#
+# Token Ring devices
+#
+CONFIG_TR=y
+CONFIG_IBMTR=m
+CONFIG_IBMOL=m
+CONFIG_IBMLS=m
+CONFIG_3C359=m
+CONFIG_TMS380TR=m
+CONFIG_TMSPCI=m
+CONFIG_SKISA=m
+CONFIG_PROTEON=m
+CONFIG_ABYSS=m
+# CONFIG_SMCTR is not set
+# CONFIG_NET_FC is not set
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_ARCNET_COM20020_CS=m
+
+#
+# ATM drivers
+#
+CONFIG_ATM_TCP=m
+CONFIG_ATM_LANAI=m
+CONFIG_ATM_ENI=m
+# CONFIG_ATM_ENI_DEBUG is not set
+# CONFIG_ATM_ENI_TUNE_BURST is not set
+CONFIG_ATM_FIRESTREAM=m
+# CONFIG_ATM_ZATM is not set
+CONFIG_ATM_IDT77252=m
+# CONFIG_ATM_IDT77252_DEBUG is not set
+# CONFIG_ATM_IDT77252_RCV_ALL is not set
+CONFIG_ATM_IDT77252_USE_SUNI=y
+CONFIG_ATM_AMBASSADOR=m
+# CONFIG_ATM_AMBASSADOR_DEBUG is not set
+CONFIG_ATM_HORIZON=m
+# CONFIG_ATM_HORIZON_DEBUG is not set
+CONFIG_ATM_FORE200E_MAYBE=m
+CONFIG_ATM_FORE200E_PCA=y
+CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E=m
+CONFIG_ATM_HE=m
+CONFIG_ATM_HE_USE_SUNI=y
+
+#
+# Amateur Radio support
+#
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+# CONFIG_AX25_DAMA_SLAVE is not set
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_MKISS=m
+CONFIG_6PACK=m
+CONFIG_BPQETHER=m
+CONFIG_DMASCC=m
+CONFIG_SCC=m
+# CONFIG_SCC_DELAY is not set
+CONFIG_SCC_TRXECHO=y
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_YAM=m
+
+#
+# IrDA (infrared) support
+#
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+CONFIG_IRPORT_SIR=m
+
+#
+# Old Serial dongle support
+#
+CONFIG_DONGLE_OLD=y
+CONFIG_ESI_DONGLE_OLD=m
+CONFIG_ACTISYS_DONGLE_OLD=m
+CONFIG_TEKRAM_DONGLE_OLD=m
+CONFIG_GIRBIL_DONGLE_OLD=m
+CONFIG_LITELINK_DONGLE_OLD=m
+CONFIG_MCP2120_DONGLE_OLD=m
+CONFIG_OLD_BELKIN_DONGLE_OLD=m
+CONFIG_ACT200L_DONGLE_OLD=m
+CONFIG_MA600_DONGLE_OLD=m
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+CONFIG_SIGMATEL_FIR=m
+CONFIG_NSC_FIR=m
+CONFIG_WINBOND_FIR=m
+CONFIG_TOSHIBA_FIR=m
+CONFIG_SMC_IRCC_FIR=m
+CONFIG_ALI_FIR=m
+CONFIG_VIA_FIR=m
+
+#
+# Bluetooth support
+#
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+CONFIG_PHONE=m
+CONFIG_PHONE_IXJ=m
+CONFIG_PHONE_IXJ_PCMCIA=m
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_VORTEX=m
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_SERIO_CT82C710=m
+CONFIG_SERIO_PARKBD=m
+CONFIG_SERIO_PCIPS2=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_INPORT=m
+CONFIG_MOUSE_ATIXL=y
+CONFIG_MOUSE_LOGIBM=m
+CONFIG_MOUSE_PC110PAD=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+# CONFIG_JOYSTICK_ANALOG is not set
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+CONFIG_JOYSTICK_GUILLEMOT=m
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_USB=y
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+CONFIG_JOYSTICK_TWIDDLER=m
+CONFIG_JOYSTICK_DB9=m
+CONFIG_JOYSTICK_GAMECON=m
+CONFIG_JOYSTICK_TURBOGRAFX=m
+CONFIG_INPUT_JOYDUMP=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_SERIAL_NONSTANDARD=y
+# CONFIG_COMPUTONE is not set
+CONFIG_ROCKETPORT=m
+CONFIG_CYCLADES=m
+# CONFIG_CYZ_INTR is not set
+# CONFIG_DIGIEPCA is not set
+# CONFIG_DIGI is not set
+# CONFIG_ESPSERIAL is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_ISI is not set
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_N_HDLC=m
+# CONFIG_RISCOM8 is not set
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
+# CONFIG_RIO is not set
+CONFIG_STALDRV=y
+CONFIG_STALLION=m
+CONFIG_ISTALLION=m
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=8
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_MULTIPORT=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=m
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+CONFIG_PPDEV=m
+# CONFIG_TIPAR is not set
+
+#
+# Mice
+#
+CONFIG_BUSMOUSE=m
+CONFIG_QIC02_TAPE=m
+CONFIG_QIC02_DYNCONF=y
+
+#
+# Setting runtime QIC-02 configuration is done with qic02conf
+#
+
+#
+# from the tpqic02-support package.  It is available at
+#
+
+#
+# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/
+#
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_KCS=m
+CONFIG_IPMI_WATCHDOG=m
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+
+#
+# ISA-based Watchdog Cards
+#
+CONFIG_PCWATCHDOG=m
+CONFIG_MIXCOMWD=m
+CONFIG_WDT=m
+CONFIG_WDT_501=y
+CONFIG_WDT_501_FAN=y
+
+#
+# PCI-based Watchdog Cards
+#
+CONFIG_PCIPCWATCHDOG=m
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+CONFIG_USBPCWATCHDOG=m
+# CONFIG_NVRAM is not set
+CONFIG_RTC=m
+CONFIG_GEN_RTC=m
+CONFIG_GEN_RTC_X=y
+CONFIG_DTLK=m
+CONFIG_R3964=m
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+CONFIG_FTAPE=m
+CONFIG_ZFTAPE=m
+CONFIG_ZFT_DFLT_BLK_SZ=10240
+
+#
+# The compressor will be built as a module only!
+#
+CONFIG_ZFT_COMPRESSOR=m
+CONFIG_FT_NR_BUFFERS=3
+CONFIG_FT_PROC_FS=y
+CONFIG_FT_NORMAL_DEBUG=y
+# CONFIG_FT_FULL_DEBUG is not set
+# CONFIG_FT_NO_TRACE is not set
+# CONFIG_FT_NO_TRACE_AT_ALL is not set
+
+#
+# Hardware configuration
+#
+CONFIG_FT_STD_FDC=y
+# CONFIG_FT_MACH2 is not set
+# CONFIG_FT_PROBE_FC10 is not set
+# CONFIG_FT_ALT_FDC is not set
+CONFIG_FT_FDC_THR=8
+CONFIG_FT_FDC_MAX_RATE=2000
+CONFIG_FT_ALPHA_CLOCK=1
+CONFIG_AGP=m
+CONFIG_AGP_ALPHA_CORE=m
+CONFIG_DRM=y
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_GAMMA=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_SYNCLINK_CS=m
+CONFIG_RAW_DRIVER=m
+CONFIG_MAX_RAW_DEVS=1024
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+CONFIG_I2C_ELEKTOR=m
+CONFIG_I2C_ELV=m
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+CONFIG_I2C_ISA=m
+# CONFIG_I2C_NFORCE2 is not set
+CONFIG_I2C_PHILIPSPAR=m
+CONFIG_I2C_PARPORT=m
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VELLEMAN=m
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+CONFIG_I2C_VOODOO3=m
+
+#
+# I2C Hardware Sensors Chip support
+#
+CONFIG_I2C_SENSOR=m
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+# CONFIG_SENSORS_VIA686A is not set
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+
+#
+# Video For Linux
+#
+
+#
+# Video Adapters
+#
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_PMS=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+CONFIG_VIDEO_ZORAN=m
+CONFIG_VIDEO_ZORAN_BUZ=m
+CONFIG_VIDEO_ZORAN_DC10=m
+CONFIG_VIDEO_ZORAN_DC30=m
+CONFIG_VIDEO_ZORAN_LML33=m
+CONFIG_VIDEO_ZORAN_LML33R10=m
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+# CONFIG_VIDEO_HEXIUM_ORION is not set
+# CONFIG_VIDEO_HEXIUM_GEMINI is not set
+CONFIG_VIDEO_CX88=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_CADET=m
+CONFIG_RADIO_RTRACK=m
+CONFIG_RADIO_RTRACK2=m
+CONFIG_RADIO_AZTECH=m
+CONFIG_RADIO_GEMTEK=m
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+CONFIG_RADIO_MIROPCM20=m
+CONFIG_RADIO_MIROPCM20_RDS=m
+CONFIG_RADIO_SF16FMI=m
+CONFIG_RADIO_SF16FMR2=m
+CONFIG_RADIO_TERRATEC=m
+CONFIG_RADIO_TRUST=m
+CONFIG_RADIO_TYPHOON=m
+CONFIG_RADIO_TYPHOON_PROC_FS=y
+CONFIG_RADIO_ZOLTRIX=m
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_TWINHAN_DST=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+# CONFIG_DVB_MT312 is not set
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_VES1X93=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_NXT6000=m
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+# CONFIG_DVB_AV7110_FIRMWARE is not set
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+# CONFIG_DVB_TTUSB_BUDGET is not set
+# CONFIG_DVB_TTUSB_DEC is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR=m
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_PM2=m
+CONFIG_FB_PM2_FIFO_DISCONNECT=y
+CONFIG_FB_CYBER2000=m
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_TGA is not set
+CONFIG_FB_RIVA=m
+CONFIG_FB_RIVA_I2C=y
+# CONFIG_FB_RIVA_DEBUG is not set
+CONFIG_FB_MATROX=m
+CONFIG_FB_MATROX_MILLENIUM=y
+CONFIG_FB_MATROX_MYSTIQUE=y
+CONFIG_FB_MATROX_G450=y
+CONFIG_FB_MATROX_G100=y
+CONFIG_FB_MATROX_I2C=m
+CONFIG_FB_MATROX_MAVEN=m
+CONFIG_FB_MATROX_MULTIHEAD=y
+CONFIG_FB_RADEON_OLD=m
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=m
+CONFIG_FB_ATY=m
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
+# CONFIG_FB_ATY_XL_INIT is not set
+CONFIG_FB_SIS=m
+CONFIG_FB_SIS_300=y
+CONFIG_FB_SIS_315=y
+CONFIG_FB_NEOMAGIC=m
+CONFIG_FB_KYRO=m
+CONFIG_FB_3DFX=m
+# CONFIG_FB_3DFX_ACCEL is not set
+CONFIG_FB_VOODOO1=m
+CONFIG_FB_TRIDENT=m
+# CONFIG_FB_TRIDENT_ACCEL is not set
+CONFIG_FB_VIRTUAL=m
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_MDA_CONSOLE=m
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_LOGO_DEC_CLUT224 is not set
+
+#
+# Bootsplash configuration
+#
+# CONFIG_BOOTSPLASH is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_RTCTIMER=m
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# ISA devices
+#
+CONFIG_SND_AD1816A=m
+CONFIG_SND_AD1848=m
+CONFIG_SND_CS4231=m
+CONFIG_SND_CS4232=m
+CONFIG_SND_CS4236=m
+CONFIG_SND_ES968=m
+CONFIG_SND_ES1688=m
+CONFIG_SND_ES18XX=m
+CONFIG_SND_GUSCLASSIC=m
+CONFIG_SND_GUSEXTREME=m
+CONFIG_SND_GUSMAX=m
+CONFIG_SND_INTERWAVE=m
+CONFIG_SND_INTERWAVE_STB=m
+CONFIG_SND_OPTI92X_AD1848=m
+CONFIG_SND_OPTI92X_CS4231=m
+CONFIG_SND_OPTI93X=m
+CONFIG_SND_SB8=m
+CONFIG_SND_SB16=m
+CONFIG_SND_SBAWE=m
+CONFIG_SND_SB16_CSP=y
+CONFIG_SND_WAVEFRONT=m
+CONFIG_SND_ALS100=m
+CONFIG_SND_AZT2320=m
+CONFIG_SND_CMI8330=m
+CONFIG_SND_DT019X=m
+CONFIG_SND_OPL3SA2=m
+CONFIG_SND_SGALAXY=m
+CONFIG_SND_SSCAPE=m
+
+#
+# PCI devices
+#
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+CONFIG_SND_CS46XX=m
+CONFIG_SND_CS46XX_NEW_DSP=y
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VX222=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+
+#
+# PCMCIA devices
+#
+CONFIG_SND_VXPOCKET=m
+CONFIG_SND_VXP440=m
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+CONFIG_SOUND_BT878=m
+CONFIG_SOUND_CMPCI=m
+# CONFIG_SOUND_CMPCI_FM is not set
+# CONFIG_SOUND_CMPCI_MIDI is not set
+CONFIG_SOUND_CMPCI_JOYSTICK=y
+CONFIG_SOUND_CMPCI_CM8738=y
+# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
+# CONFIG_SOUND_CMPCI_SPDIFLOOP is not set
+CONFIG_SOUND_CMPCI_SPEAKERS=2
+CONFIG_SOUND_EMU10K1=m
+# CONFIG_MIDI_EMU10K1 is not set
+CONFIG_SOUND_FUSION=m
+CONFIG_SOUND_CS4281=m
+CONFIG_SOUND_ES1370=m
+CONFIG_SOUND_ES1371=m
+CONFIG_SOUND_ESSSOLO1=m
+CONFIG_SOUND_MAESTRO=m
+CONFIG_SOUND_MAESTRO3=m
+CONFIG_SOUND_ICH=m
+CONFIG_SOUND_SONICVIBES=m
+CONFIG_SOUND_TRIDENT=m
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_VIA82CXXX=m
+# CONFIG_MIDI_VIA82CXXX is not set
+CONFIG_SOUND_OSS=m
+# CONFIG_SOUND_TRACEINIT is not set
+# CONFIG_SOUND_DMAP is not set
+CONFIG_SOUND_AD1816=m
+CONFIG_SOUND_AD1889=m
+CONFIG_SOUND_SGALAXY=m
+CONFIG_SOUND_ADLIB=m
+CONFIG_SOUND_ACI_MIXER=m
+CONFIG_SOUND_CS4232=m
+CONFIG_SOUND_SSCAPE=m
+CONFIG_SOUND_GUS=m
+# CONFIG_SOUND_GUS16 is not set
+CONFIG_SOUND_GUSMAX=y
+CONFIG_SOUND_VMIDI=m
+CONFIG_SOUND_TRIX=m
+CONFIG_SOUND_MSS=m
+CONFIG_SOUND_MPU401=m
+CONFIG_SOUND_NM256=m
+CONFIG_SOUND_MAD16=m
+# CONFIG_MAD16_OLDCARD is not set
+CONFIG_SOUND_PAS=m
+CONFIG_SOUND_PSS=m
+CONFIG_PSS_MIXER=y
+# CONFIG_PSS_HAVE_BOOT is not set
+CONFIG_SOUND_SB=m
+CONFIG_SOUND_AWE32_SYNTH=m
+CONFIG_SOUND_WAVEFRONT=m
+CONFIG_SOUND_MAUI=m
+CONFIG_SOUND_YM3812=m
+CONFIG_SOUND_OPL3SA1=m
+CONFIG_SOUND_OPL3SA2=m
+CONFIG_SOUND_YMFPCI=m
+# CONFIG_SOUND_YMFPCI_LEGACY is not set
+CONFIG_SOUND_UART6850=m
+CONFIG_SOUND_AEDSP16=m
+CONFIG_SC6600=y
+CONFIG_SC6600_JOY=y
+CONFIG_SC6600_CDROM=4
+CONFIG_SC6600_CDROMBASE=0x0
+# CONFIG_AEDSP16_MSS is not set
+CONFIG_AEDSP16_SBPRO=y
+CONFIG_AEDSP16_MPU401=y
+CONFIG_SOUND_TVMIXER=m
+CONFIG_SOUND_KAHLUA=m
+CONFIG_SOUND_ALI5455=m
+CONFIG_SOUND_FORTE=m
+CONFIG_SOUND_RME96XX=m
+CONFIG_SOUND_AD1980=m
+
+#
+# USB support
+#
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+CONFIG_USB_DYNAMIC_MINORS=y
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_UHCI_HCD=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_AUDIO=m
+
+#
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+#
+CONFIG_USB_MIDI=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+
+#
+# USB Human Interface Devices (HID)
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_AIPTEK=m
+CONFIG_USB_WACOM=m
+CONFIG_USB_KBTAB=m
+CONFIG_USB_POWERMATE=m
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_XPAD=m
+CONFIG_USB_ATI_REMOTE=m
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_DABUSB=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_OV511=m
+CONFIG_USB_PWC=m
+CONFIG_USB_SE401=m
+CONFIG_USB_STV680=m
+CONFIG_USB_W9968CF=m
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_AX8817X=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_BRLVGER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_LED=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_TEST=m
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+# CONFIG_UMSDOS_FS is not set
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+CONFIG_ADFS_FS_RW=y
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_QNX4FS_RW=y
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="iso8859-2"
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=n
+CONFIG_CIFS_XATTR=y
+CONFIG_NCP_FS=m
+CONFIG_NCPFS_PACKET_SIGNING=y
+CONFIG_NCPFS_IOCTL_LOCKING=y
+CONFIG_NCPFS_STRONG=y
+CONFIG_NCPFS_NFS_NS=y
+CONFIG_NCPFS_OS2_NS=y
+CONFIG_NCPFS_SMALLDOS=y
+CONFIG_NCPFS_NLS=y
+CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_INTERMEZZO_FS=m
+CONFIG_AFS_FS=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+CONFIG_RXRPC=m
+
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_OSF_PARTITION=y
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-2"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Profiling support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+
+#
+# Kernel hacking
+#
+CONFIG_ALPHA_LEGACY_START_ADDRESS=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_MATHEMU=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_RWLOCK is not set
+# CONFIG_DEBUG_SEMAPHORE is not set
+# CONFIG_DEBUG_INFO is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+
+# CONFIG_AGP_INTEL_MCH is not set
+#
+# Config for 2.6.6-rc2+cset-20040422_0013
+#
+
+CONFIG_POSIX_MQUEUE=y
+CONFIG_AUDIT=y
+CONFIG_AMD8111E_NAPI=y
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+CONFIG_IPMI_SI=m
+CONFIG_I2C_ALI1563=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_CYTHERM=m
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_LIBCRC32C=m
+
+# CONFIG_ATM_FORE200E_USE_TASKLET is not set
+
+# for pramfs filesystem
+
+# CONFIG_PRAMFS is not set
+# CONFIG_PRAMFS_NOWP is not set
+# CONFIG_ROOT_PRAMFS is not set
+
+# CONFIG_LIRC_SUPPORT is not set
+
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+
+CONFIG_SENSORS_RTC8564=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_PHIDGETSERVO=m
+
+CONFIG_KALLSYMS_ALL=y
+
+# CONFIG_I2O is not set
+# CONFIG_FB_ASILIANT is not set
+# 2.6.7 + cset-20040620_0609
+
+CONFIG_BSD_PROCESS_ACCT_V3=y
+
+CONFIG_SCSI_3W_9XXX=m
+
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+CONFIG_VIA_VELOCITY=m
+
+# CONFIG_CIFS_POSIX is not set
+
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+
+# 2.6.7 + cset-20040621_0519
+
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+
+CONFIG_NLS_ASCII=m
+
+CONFIG_VIDEO_OVCAMCHIP=m
+# 2.6.7 + cset-20040622_1819
+
+CONFIG_BLK_DEV_SX8=m
+
+# CONFIG_BLK_DEV_IDE_SATA is not set
+
+CONFIG_SCSI_SATA_NV=m
+
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_BLK_DEV_GNBD=m
+CONFIG_CRC16=m
+
+# cset-20040701_0409
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+# CONFIG_NET_CLS_ACT is not set
+# CONFIG_NET_ACT_POLICE is not set
+# CONFIG_FB_CIRRUS is not set
+# cset-20040702_0108
+CONFIG_CRYPTO_TEA=m
+
+
+CONFIG_NET_SCH_NETEM=m
+CONFIG_BT_HIDP=m
+
diff --git a/kernel-autoconf.h b/kernel-autoconf.h
new file mode 100644 (file)
index 0000000..ca46a29
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __pld_kernel_autoconf_h__
+#define __pld_kernel_autoconf_h__
+
+/*
+ * Define some nasty macros o we can construct the file names
+ * we want to include
+ */
+
+#if defined(__pld_autoconf_included_file__)
+#undef __pld_autoconf_included_file__
+#endif /* __pld_autoconf_included_file__ */
+
+#if defined(__KERNEL_SMP)
+#include <linux/autoconf-smp.h>
+#define __pld_autoconf_included_file__ 1
+#endif /* __KERNEL_SMP */
+
+#if !defined(__pld_autoconf_included_file__)
+#include <linux/autoconf-up.h>
+#else
+#undef __pld_autoconf_included_file__
+#endif /* __pld_autoconf_included_file__ */
+
+#endif /* __pld_kernel_autoconf_h__ */
diff --git a/kernel-fbcon-margins.patch b/kernel-fbcon-margins.patch
new file mode 100644 (file)
index 0000000..b02536a
--- /dev/null
@@ -0,0 +1,29 @@
+This fixes "margin colour" (colour used to clear margins - e.g. a half of line
+at the bottom of 100x37 console on 800x600 framebuffer).
+
+I don't know what was the intention behind using attr_bgcol_ec() here, but it
+caused using of background colour of last erase character to clear margins -
+which definitely isn't what we want...
+This patch changes margin colour to black (or colour 0 in palette modes).
+
+       -- Jakub Bogusz <qboosh@pld-linux.org>
+
+--- linux-2.6.0-test2/drivers/video/console/fbcon.c.orig       2003-07-14 05:36:32.000000000 +0200
++++ linux-2.6.0-test2/drivers/video/console/fbcon.c    2003-07-31 00:53:26.000000000 +0200
+@@ -518,7 +518,6 @@
+ void accel_clear_margins(struct vc_data *vc, struct fb_info *info,
+                               int bottom_only)
+ {
+-      int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
+       unsigned int cw = vc->vc_font.width;
+       unsigned int ch = vc->vc_font.height;
+       unsigned int rw = info->var.xres - (vc->vc_cols*cw);
+@@ -527,7 +526,7 @@
+       unsigned int bs = info->var.yres - bh;
+       struct fb_fillrect region;
+-      region.color = attr_bgcol_ec(bgshift, vc);
++      region.color = 0;
+       region.rop = ROP_COPY;
+       if (rw && !bottom_only) {
diff --git a/kernel-grsec+pax.config b/kernel-grsec+pax.config
new file mode 100644 (file)
index 0000000..053b088
--- /dev/null
@@ -0,0 +1,135 @@
+#
+# Grsecurity
+#
+CONFIG_GRKERNSEC=y
+# CONFIG_GRKERNSEC_LOW is not set
+# CONFIG_GRKERNSEC_MEDIUM is not set
+# CONFIG_GRKERNSEC_HIGH is not set
+CONFIG_GRKERNSEC_CUSTOM=y
+
+#
+# Address Space Protection
+#
+# CONFIG_GRKERNSEC_KMEM is not set
+# CONFIG_GRKERNSEC_IO is not set
+CONFIG_GRKERNSEC_PROC_MEMMAP=y
+CONFIG_GRKERNSEC_BRUTE=y
+CONFIG_GRKERNSEC_HIDESYM=y
+
+#
+# Role Based Access Control Options
+#
+CONFIG_GRKERNSEC_ACL_HIDEKERN=y
+CONFIG_GRKERNSEC_ACL_MAXTRIES=3
+CONFIG_GRKERNSEC_ACL_TIMEOUT=30
+
+#
+# Filesystem Protections
+#
+CONFIG_GRKERNSEC_PROC=y
+# CONFIG_GRKERNSEC_PROC_USER is not set
+CONFIG_GRKERNSEC_PROC_USERGROUP=y
+CONFIG_GRKERNSEC_PROC_GID=17
+CONFIG_GRKERNSEC_PROC_ADD=y
+CONFIG_GRKERNSEC_LINK=y
+CONFIG_GRKERNSEC_FIFO=y
+CONFIG_GRKERNSEC_CHROOT=y
+CONFIG_GRKERNSEC_CHROOT_MOUNT=y
+CONFIG_GRKERNSEC_CHROOT_DOUBLE=y
+CONFIG_GRKERNSEC_CHROOT_PIVOT=y
+CONFIG_GRKERNSEC_CHROOT_CHDIR=y
+CONFIG_GRKERNSEC_CHROOT_CHMOD=y
+CONFIG_GRKERNSEC_CHROOT_FCHDIR=y
+CONFIG_GRKERNSEC_CHROOT_MKNOD=y
+CONFIG_GRKERNSEC_CHROOT_SHMAT=y
+CONFIG_GRKERNSEC_CHROOT_UNIX=y
+CONFIG_GRKERNSEC_CHROOT_FINDTASK=y
+CONFIG_GRKERNSEC_CHROOT_NICE=y
+CONFIG_GRKERNSEC_CHROOT_SYSCTL=y
+CONFIG_GRKERNSEC_CHROOT_CAPS=y
+
+#
+# Kernel Auditing
+#
+# CONFIG_GRKERNSEC_AUDIT_GROUP is not set
+# CONFIG_GRKERNSEC_EXECLOG is not set
+CONFIG_GRKERNSEC_RESLOG=y
+# CONFIG_GRKERNSEC_CHROOT_EXECLOG is not set
+# CONFIG_GRKERNSEC_AUDIT_CHDIR is not set
+# CONFIG_GRKERNSEC_AUDIT_MOUNT is not set
+# CONFIG_GRKERNSEC_AUDIT_IPC is not set
+CONFIG_GRKERNSEC_SIGNAL=y
+CONFIG_GRKERNSEC_FORKFAIL=y
+CONFIG_GRKERNSEC_TIME=y
+CONFIG_GRKERNSEC_PROC_IPADDR=y
+# CONFIG_GRKERNSEC_AUDIT_TEXTREL is not set
+
+#
+# Executable Protections
+#
+CONFIG_GRKERNSEC_EXECVE=y
+CONFIG_GRKERNSEC_DMESG=y
+CONFIG_GRKERNSEC_RANDPID=y
+# CONFIG_GRKERNSEC_TPE is not set
+
+#
+# Network Protections
+#
+CONFIG_GRKERNSEC_RANDNET=y
+CONFIG_GRKERNSEC_RANDISN=y
+CONFIG_GRKERNSEC_RANDID=y
+CONFIG_GRKERNSEC_RANDSRC=y
+CONFIG_GRKERNSEC_RANDRPC=y
+CONFIG_GRKERNSEC_SOCKET=y
+CONFIG_GRKERNSEC_SOCKET_ALL=y
+CONFIG_GRKERNSEC_SOCKET_ALL_GID=65501
+CONFIG_GRKERNSEC_SOCKET_CLIENT=y
+CONFIG_GRKERNSEC_SOCKET_CLIENT_GID=65502
+CONFIG_GRKERNSEC_SOCKET_SERVER=y
+CONFIG_GRKERNSEC_SOCKET_SERVER_GID=65503
+
+#
+# Sysctl support
+#
+CONFIG_GRKERNSEC_SYSCTL=y
+
+#
+# Logging Options
+#
+CONFIG_GRKERNSEC_FLOODTIME=10
+CONFIG_GRKERNSEC_FLOODBURST=4
+
+#
+# PaX
+#
+CONFIG_PAX=y
+
+#
+# PaX Control
+#
+# CONFIG_PAX_SOFTMODE is not set
+# CONFIG_PAX_EI_PAX is not set
+CONFIG_PAX_PT_PAX_FLAGS=y
+CONFIG_PAX_NO_ACL_FLAGS=y
+# CONFIG_PAX_HAVE_ACL_FLAGS is not set
+# CONFIG_PAX_HOOK_ACL_FLAGS is not set
+
+#
+# Non-executable pages
+#
+CONFIG_PAX_NOEXEC=y
+CONFIG_PAX_PAGEEXEC=y
+# CONFIG_PAX_SEGMEXEC is not set
+CONFIG_PAX_EMUTRAMP=y
+CONFIG_PAX_MPROTECT=y
+# CONFIG_PAX_NOELFRELOCS is not set
+
+#
+# Address Space Layout Randomization
+#
+CONFIG_PAX_ASLR=y
+CONFIG_PAX_RANDKSTACK=y
+CONFIG_PAX_RANDUSTACK=y
+CONFIG_PAX_RANDMMAP=y
+# CONFIG_PAX_RANDEXEC is not set
+CONFIG_PAX_NOVSYSCALL=y
diff --git a/kernel-grsec-2.0.1.patch b/kernel-grsec-2.0.1.patch
new file mode 100644 (file)
index 0000000..01eb4ea
--- /dev/null
@@ -0,0 +1,22057 @@
+diff -uNr linux-2.6.8/arch/alpha/kernel/osf_sys.c linux-2.6.8.grsecurity/arch/alpha/kernel/osf_sys.c
+--- linux-2.6.8/arch/alpha/kernel/osf_sys.c    2004-08-14 07:36:09.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/alpha/kernel/osf_sys.c 2004-08-16 17:06:17.583265784 +0200
+@@ -37,6 +37,7 @@
+ #include <linux/namei.h>
+ #include <linux/uio.h>
+ #include <linux/vfs.h>
++#include <linux/grsecurity.h>
+ #include <asm/fpu.h>
+ #include <asm/io.h>
+@@ -179,6 +180,11 @@
+       struct file *file = NULL;
+       unsigned long ret = -EBADF;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+ #if 0
+       if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED))
+               printk("%s: unimplemented OSF mmap flags %04lx\n", 
+@@ -189,6 +195,13 @@
+               if (!file)
+                       goto out;
+       }
++
++      if (gr_handle_mmap(file, prot)) {
++              fput(file);
++              ret = -EACCES;
++              goto out;
++      }
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       down_write(&current->mm->mmap_sem);
+       ret = do_mmap(file, addr, len, prot, flags, off);
+@@ -1274,6 +1287,10 @@
+          merely specific addresses, but regions of memory -- perhaps
+          this feature should be incorporated into all ports?  */
++#ifdef CONFIG_PAX_RANDMMAP
++      if (!(current->flags & PF_PAX_RANDMMAP) || !filp)
++#endif
++
+       if (addr) {
+               addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
+               if (addr != (unsigned long) -ENOMEM)
+@@ -1281,8 +1298,16 @@
+       }
+       /* Next, try allocating at TASK_UNMAPPED_BASE.  */
+-      addr = arch_get_unmapped_area_1 (PAGE_ALIGN(TASK_UNMAPPED_BASE),
+-                                       len, limit);
++
++      addr = TASK_UNMAPPED_BASE;
++
++#ifdef CONFIG_PAX_RANDMMAP
++      if (current->flags & PF_PAX_RANDMMAP)
++              addr += current->mm->delta_mmap;
++#endif
++
++      addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
++
+       if (addr != (unsigned long) -ENOMEM)
+               return addr;
+diff -uNr linux-2.6.8/arch/alpha/kernel/ptrace.c linux-2.6.8.grsecurity/arch/alpha/kernel/ptrace.c
+--- linux-2.6.8/arch/alpha/kernel/ptrace.c     2004-08-14 07:37:40.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/alpha/kernel/ptrace.c  2004-08-16 17:06:17.598263504 +0200
+@@ -14,6 +14,7 @@
+ #include <linux/user.h>
+ #include <linux/slab.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+@@ -288,6 +289,9 @@
+       if (!child)
+               goto out_notsk;
++      if (gr_handle_ptrace(child, request))
++              goto out;
++
+       if (request == PTRACE_ATTACH) {
+               ret = ptrace_attach(child);
+               goto out;
+diff -uNr linux-2.6.8/arch/alpha/mm/fault.c linux-2.6.8.grsecurity/arch/alpha/mm/fault.c
+--- linux-2.6.8/arch/alpha/mm/fault.c  2004-08-14 07:36:44.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/alpha/mm/fault.c       2004-08-16 17:06:17.639257272 +0200
+@@ -25,6 +25,7 @@
+ #include <linux/smp_lock.h>
+ #include <linux/interrupt.h>
+ #include <linux/module.h>
++#include <linux/binfmts.h>
+ #include <asm/system.h>
+ #include <asm/uaccess.h>
+@@ -56,6 +57,142 @@
+       __reload_thread(pcb);
+ }
++#ifdef CONFIG_PAX_PAGEEXEC
++/*
++ * PaX: decide what to do with offenders (regs->pc = fault address)
++ *
++ * returns 1 when task should be killed
++ *         2 when patched PLT trampoline was detected
++ *         3 when unpatched PLT trampoline was detected
++ *         4 when legitimate ET_EXEC was detected
++ */
++static int pax_handle_fetch_fault(struct pt_regs *regs)
++{
++
++#ifdef CONFIG_PAX_EMUPLT
++      int err;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++      if (current->flags & PF_PAX_RANDEXEC) {
++              if (regs->pc >= current->mm->start_code &&
++                  regs->pc < current->mm->end_code)
++              {
++                      if (regs->r26 == regs->pc)
++                              return 1;
++
++                      regs->pc += current->mm->delta_exec;
++                      return 4;
++              }
++      }
++#endif
++
++#ifdef CONFIG_PAX_EMUPLT
++      do { /* PaX: patched PLT emulation #1 */
++              unsigned int ldah, ldq, jmp;
++
++              err = get_user(ldah, (unsigned int *)regs->pc);
++              err |= get_user(ldq, (unsigned int *)(regs->pc+4));
++              err |= get_user(jmp, (unsigned int *)(regs->pc+8));
++
++              if (err)
++                      break;
++
++              if ((ldah & 0xFFFF0000U) == 0x277B0000U &&
++                  (ldq & 0xFFFF0000U) == 0xA77B0000U &&
++                  jmp == 0x6BFB0000U)
++              {
++                      unsigned long r27, addr;
++                      unsigned long addrh = (ldah | 0xFFFFFFFFFFFF0000UL) << 16;
++                      unsigned long addrl = ldq | 0xFFFFFFFFFFFF0000UL;
++
++                      addr = regs->r27 + ((addrh ^ 0x80000000UL) + 0x80000000UL) + ((addrl ^ 0x8000UL) + 0x8000UL);
++                      err = get_user(r27, (unsigned long*)addr);
++                      if (err)
++                              break;
++
++                      regs->r27 = r27;
++                      regs->pc = r27;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: patched PLT emulation #2 */
++              unsigned int ldah, lda, br;
++
++              err = get_user(ldah, (unsigned int *)regs->pc);
++              err |= get_user(lda, (unsigned int *)(regs->pc+4));
++              err |= get_user(br, (unsigned int *)(regs->pc+8));
++
++              if (err)
++                      break;
++
++              if ((ldah & 0xFFFF0000U)== 0x277B0000U &&
++                  (lda & 0xFFFF0000U) == 0xA77B0000U &&
++                  (br & 0xFFE00000U) == 0xC3E00000U)
++              {
++                      unsigned long addr = br | 0xFFFFFFFFFFE00000UL;
++                      unsigned long addrh = (ldah | 0xFFFFFFFFFFFF0000UL) << 16;
++                      unsigned long addrl = lda | 0xFFFFFFFFFFFF0000UL;
++
++                      regs->r27 += ((addrh ^ 0x80000000UL) + 0x80000000UL) + ((addrl ^ 0x8000UL) + 0x8000UL);
++                      regs->pc += 12 + (((addr ^ 0x00100000UL) + 0x00100000UL) << 2);
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: unpatched PLT emulation */
++              unsigned int br;
++
++              err = get_user(br, (unsigned int *)regs->pc);
++
++              if (!err && (br & 0xFFE00000U) == 0xC3800000U) {
++                      unsigned int br2, ldq, nop, jmp;
++                      unsigned long addr = br | 0xFFFFFFFFFFE00000UL, resolver;
++
++                      addr = regs->pc + 4 + (((addr ^ 0x00100000UL) + 0x00100000UL) << 2);
++                      err = get_user(br2, (unsigned int *)addr);
++                      err |= get_user(ldq, (unsigned int *)(addr+4));
++                      err |= get_user(nop, (unsigned int *)(addr+8));
++                      err |= get_user(jmp, (unsigned int *)(addr+12));
++                      err |= get_user(resolver, (unsigned long *)(addr+16));
++
++                      if (err)
++                              break;
++
++                      if (br2 == 0xC3600000U &&
++                          ldq == 0xA77B000CU &&
++                          nop == 0x47FF041FU &&
++                          jmp == 0x6B7B0000U)
++                      {
++                              regs->r28 = regs->pc+4;
++                              regs->r27 = addr+16;
++                              regs->pc = resolver;
++                              return 3;
++                      }
++              }
++      } while (0);
++#endif
++
++      return 1;
++}
++
++void pax_report_insns(void *pc, void *sp)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 5; i++) {
++              unsigned int c;
++              if (get_user(c, (unsigned int*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08x ", c);
++      }
++      printk("\n");
++}
++#endif
+ /*
+  * This routine handles page faults.  It determines the address,
+@@ -133,8 +270,34 @@
+  good_area:
+       si_code = SEGV_ACCERR;
+       if (cause < 0) {
+-              if (!(vma->vm_flags & VM_EXEC))
++              if (!(vma->vm_flags & VM_EXEC)) {
++
++#ifdef CONFIG_PAX_PAGEEXEC
++                      if (!(current->flags & PF_PAX_PAGEEXEC) || address != regs->pc)
++                              goto bad_area;
++
++                      up_read(&mm->mmap_sem);
++                      switch(pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_EMUPLT
++                      case 2:
++                      case 3:
++                              return;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++                      case 4:
++                              return;
++#endif
++
++                      }
++                      pax_report_fault(regs, (void*)regs->pc, (void*)rdusp());
++                      do_exit(SIGKILL);
++#else
+                       goto bad_area;
++#endif
++
++              }
+       } else if (!cause) {
+               /* Allow reads even for write-only mappings */
+               if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
+diff -uNr linux-2.6.8/arch/i386/Kconfig linux-2.6.8.grsecurity/arch/i386/Kconfig
+--- linux-2.6.8/arch/i386/Kconfig      2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/Kconfig   2004-08-16 17:06:17.684250432 +0200
+@@ -396,7 +396,7 @@
+ config X86_ALIGNMENT_16
+       bool
+-      depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2
++      depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK8 || MK7 || MK6 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2
+       default y
+ config X86_GOOD_APIC
+diff -uNr linux-2.6.8/arch/i386/kernel/apm.c linux-2.6.8.grsecurity/arch/i386/kernel/apm.c
+--- linux-2.6.8/arch/i386/kernel/apm.c 2004-08-14 07:36:13.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/apm.c      2004-08-16 17:06:17.705247240 +0200
+@@ -598,19 +598,40 @@
+       int                     cpu;
+       struct desc_struct      save_desc_40;
++#ifdef CONFIG_PAX_KERNEXEC
++      unsigned long           cr3;
++#endif
++
+       cpus = apm_save_cpus();
+       
+       cpu = get_cpu();
++
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_open_kernel(flags, cr3);
++#endif
++
+       save_desc_40 = cpu_gdt_table[cpu][0x40 / 8];
+       cpu_gdt_table[cpu][0x40 / 8] = bad_bios_desc;
++#ifndef CONFIG_PAX_KERNEXEC
+       local_save_flags(flags);
+       APM_DO_CLI;
++#endif
++
+       APM_DO_SAVE_SEGS;
+       apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi);
+       APM_DO_RESTORE_SEGS;
++
++#ifndef CONFIG_PAX_KERNEXEC
+       local_irq_restore(flags);
++#endif
++
+       cpu_gdt_table[cpu][0x40 / 8] = save_desc_40;
++
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_close_kernel(flags, cr3);
++#endif
++
+       put_cpu();
+       apm_restore_cpus(cpus);
+       
+@@ -640,20 +661,40 @@
+       int                     cpu;
+       struct desc_struct      save_desc_40;
++#ifdef CONFIG_PAX_KERNEXEC
++      unsigned long           cr3;
++#endif
+       cpus = apm_save_cpus();
+       
+       cpu = get_cpu();
++
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_open_kernel(flags, cr3);
++#endif
++
+       save_desc_40 = cpu_gdt_table[cpu][0x40 / 8];
+       cpu_gdt_table[cpu][0x40 / 8] = bad_bios_desc;
++#ifndef CONFIG_PAX_KERNEXEC
+       local_save_flags(flags);
+       APM_DO_CLI;
++#endif
++
+       APM_DO_SAVE_SEGS;
+       error = apm_bios_call_simple_asm(func, ebx_in, ecx_in, eax);
+       APM_DO_RESTORE_SEGS;
++
++#ifndef CONFIG_PAX_KERNEXEC
+       local_irq_restore(flags);
++#endif
++
+       cpu_gdt_table[smp_processor_id()][0x40 / 8] = save_desc_40;
++
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_close_kernel(flags, cr3);
++#endif
++
+       put_cpu();
+       apm_restore_cpus(cpus);
+       return error;
+diff -uNr linux-2.6.8/arch/i386/kernel/cpu/common.c linux-2.6.8.grsecurity/arch/i386/kernel/cpu/common.c
+--- linux-2.6.8/arch/i386/kernel/cpu/common.c  2004-08-14 07:36:13.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/cpu/common.c       2004-08-16 17:06:17.737242376 +0200
+@@ -358,6 +358,10 @@
+       if (this_cpu->c_init)
+               this_cpu->c_init(c);
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_KERNEXEC) || defined(CONFIG_PAX_NOVSYSCALL)
++      clear_bit(X86_FEATURE_SEP, c->x86_capability);
++#endif
++
+       /* Disable the PN if appropriate */
+       squash_the_stupid_serial_number(c);
+@@ -554,7 +558,7 @@
+       set_tss_desc(cpu,t);
+       cpu_gdt_table[cpu][GDT_ENTRY_TSS].b &= 0xfffffdff;
+       load_TR_desc();
+-      load_LDT(&init_mm.context);
++      _load_LDT(&init_mm.context);
+       /* Set up doublefault TSS pointer in the GDT */
+       __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
+diff -uNr linux-2.6.8/arch/i386/kernel/entry.S linux-2.6.8.grsecurity/arch/i386/kernel/entry.S
+--- linux-2.6.8/arch/i386/kernel/entry.S       2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/entry.S    2004-08-16 17:06:17.755239640 +0200
+@@ -266,6 +266,11 @@
+       movl TI_flags(%ebp), %ecx
+       testw $_TIF_ALLWORK_MASK, %cx
+       jne syscall_exit_work
++
++#ifdef CONFIG_PAX_RANDKSTACK
++      call pax_randomize_kstack
++#endif
++
+ /* if something modifies registers it must also disable sysexit */
+       movl EIP(%esp), %edx
+       movl OLDESP(%esp), %ecx
+@@ -293,6 +298,11 @@
+       movl TI_flags(%ebp), %ecx
+       testw $_TIF_ALLWORK_MASK, %cx   # current->work
+       jne syscall_exit_work
++
++#ifdef CONFIG_PAX_RANDKSTACK
++      call pax_randomize_kstack
++#endif
++
+ restore_all:
+       RESTORE_ALL
+@@ -600,7 +610,7 @@
+       pushl $do_spurious_interrupt_bug
+       jmp error_code
+-.data
++.section .rodata,"a",@progbits
+ ENTRY(sys_call_table)
+       .long sys_restart_syscall       /* 0 - old "setup()" system call, used for restarting */
+       .long sys_exit
+diff -uNr linux-2.6.8/arch/i386/kernel/head.S linux-2.6.8.grsecurity/arch/i386/kernel/head.S
+--- linux-2.6.8/arch/i386/kernel/head.S        2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/head.S     2004-08-16 17:06:17.777236296 +0200
+@@ -48,6 +48,12 @@
+ /*
++ * Real beginning of normal "text" segment
++ */
++ENTRY(stext)
++ENTRY(_stext)
++
++/*
+  * 32-bit kernel entrypoint; only used by the boot CPU.  On entry,
+  * %esi points to the real-mode code as a 32-bit pointer.
+  * CS and DS must be 4 GB flat segments, but we don't depend on
+@@ -92,9 +98,9 @@
+       movl $(pg0 - __PAGE_OFFSET), %edi
+       movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
+-      movl $0x007, %eax                       /* 0x007 = PRESENT+RW+USER */
++      movl $0x067, %eax                       /* 0x067 = DIRTY+ACCESSED+PRESENT+RW+USER */
+ 10:
+-      leal 0x007(%edi),%ecx                   /* Create PDE entry */
++      leal 0x067(%edi),%ecx                   /* Create PDE entry */
+       movl %ecx,(%edx)                        /* Store identity PDE entry */
+       movl %ecx,page_pde_offset(%edx)         /* Store kernel PDE entry */
+       addl $4,%edx
+@@ -104,8 +110,8 @@
+       addl $0x1000,%eax
+       loop 11b
+       /* End condition: we must map up to and including INIT_MAP_BEYOND_END */
+-      /* bytes beyond the end of our own page tables; the +0x007 is the attribute bits */
+-      leal (INIT_MAP_BEYOND_END+0x007)(%edi),%ebp
++      /* bytes beyond the end of our own page tables; the +0x067 is the attribute bits */
++      leal (INIT_MAP_BEYOND_END+0x067)(%edi),%ebp
+       cmpl %ebp,%eax
+       jb 10b
+       movl %edi,(init_pg_tables_end - __PAGE_OFFSET)
+@@ -190,7 +196,7 @@
+       movl %cr0,%eax
+       orl $0x80000000,%eax
+       movl %eax,%cr0          /* ..and set paging (PG) bit */
+-      ljmp $__BOOT_CS,$1f     /* Clear prefetch and normalize %eip */
++      ljmp $__BOOT_CS,$1f + __KERNEL_TEXT_OFFSET      /* Clear prefetch and normalize %eip */
+ 1:
+       /* Set up the stack pointer */
+       lss stack_start,%esp
+@@ -405,31 +411,39 @@
+       iret
+ /*
+- * Real beginning of normal "text" segment
++ * This starts the data section.
+  */
+-ENTRY(stext)
+-ENTRY(_stext)
++.data
++ready:        .byte 0
+-/*
+- * BSS section
+- */
+-.section ".bss.page_aligned","w"
++.section .data.swapper_pg_dir,"a",@progbits
+ ENTRY(swapper_pg_dir)
+       .fill 1024,4,0
++
++#ifdef CONFIG_PAX_KERNEXEC
++ENTRY(kernexec_pg_dir)
++      .fill 1024,4,0
++#endif
++
++.section .rodata.empty_zero_page,"a",@progbits
+ ENTRY(empty_zero_page)
+       .fill 4096,1,0
+ /*
+- * This starts the data section.
+- */
+-.data
++ * The IDT has to be page-aligned to simplify the Pentium
++ * F0 0F bug workaround.. We have a special link segment
++ * for this.
++ */
++.section .rodata.idt,"a",@progbits
++ENTRY(idt_table)
++      .fill 256,8,0
++.section .rodata,"a",@progbits
+ ENTRY(stack_start)
+       .long init_thread_union+THREAD_SIZE
+       .long __BOOT_DS
+-ready:        .byte 0
+-
++/* This is the default interrupt "handler" :-) */
+ int_msg:
+       .asciz "Unknown interrupt or fault at EIP %p %p %p\n"
+@@ -471,8 +485,8 @@
+       .align L1_CACHE_BYTES
+ ENTRY(boot_gdt_table)
+       .fill GDT_ENTRY_BOOT_CS,8,0
+-      .quad 0x00cf9a000000ffff        /* kernel 4GB code at 0x00000000 */
+-      .quad 0x00cf92000000ffff        /* kernel 4GB data at 0x00000000 */
++      .quad 0x00cf9b000000ffff        /* kernel 4GB code at 0x00000000 */
++      .quad 0x00cf93000000ffff        /* kernel 4GB data at 0x00000000 */
+ /*
+  * The Global Descriptor Table contains 28 quadwords, per-CPU.
+@@ -483,7 +497,13 @@
+       .quad 0x0000000000000000        /* 0x0b reserved */
+       .quad 0x0000000000000000        /* 0x13 reserved */
+       .quad 0x0000000000000000        /* 0x1b reserved */
++
++#if defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_PCI_BIOS)
++      .quad 0x00cf9b000000ffff        /* 0x20 kernel 4GB code at 0x00000000 */
++#else
+       .quad 0x0000000000000000        /* 0x20 unused */
++#endif
++
+       .quad 0x0000000000000000        /* 0x28 unused */
+       .quad 0x0000000000000000        /* 0x33 TLS entry 1 */
+       .quad 0x0000000000000000        /* 0x3b TLS entry 2 */
+@@ -492,27 +512,32 @@
+       .quad 0x0000000000000000        /* 0x53 reserved */
+       .quad 0x0000000000000000        /* 0x5b reserved */
+-      .quad 0x00cf9a000000ffff        /* 0x60 kernel 4GB code at 0x00000000 */
+-      .quad 0x00cf92000000ffff        /* 0x68 kernel 4GB data at 0x00000000 */
+-      .quad 0x00cffa000000ffff        /* 0x73 user 4GB code at 0x00000000 */
+-      .quad 0x00cff2000000ffff        /* 0x7b user 4GB data at 0x00000000 */
++#ifdef CONFIG_PAX_KERNEXEC
++      .quad 0xc0cf9b400000ffff        /* 0x60 kernel 4GB code at 0xc0400000 */
++#else
++      .quad 0x00cf9b000000ffff        /* 0x60 kernel 4GB code at 0x00000000 */
++#endif
++
++      .quad 0x00cf93000000ffff        /* 0x68 kernel 4GB data at 0x00000000 */
++      .quad 0x00cffb000000ffff        /* 0x73 user 4GB code at 0x00000000 */
++      .quad 0x00cff3000000ffff        /* 0x7b user 4GB data at 0x00000000 */
+       .quad 0x0000000000000000        /* 0x80 TSS descriptor */
+       .quad 0x0000000000000000        /* 0x88 LDT descriptor */
+       /* Segments used for calling PnP BIOS */
+-      .quad 0x00c09a0000000000        /* 0x90 32-bit code */
+-      .quad 0x00809a0000000000        /* 0x98 16-bit code */
+-      .quad 0x0080920000000000        /* 0xa0 16-bit data */
+-      .quad 0x0080920000000000        /* 0xa8 16-bit data */
+-      .quad 0x0080920000000000        /* 0xb0 16-bit data */
++      .quad 0x00c09b0000000000        /* 0x90 32-bit code */
++      .quad 0x00809b0000000000        /* 0x98 16-bit code */
++      .quad 0x0080930000000000        /* 0xa0 16-bit data */
++      .quad 0x0080930000000000        /* 0xa8 16-bit data */
++      .quad 0x0080930000000000        /* 0xb0 16-bit data */
+       /*
+        * The APM segments have byte granularity and their bases
+        * and limits are set at run time.
+        */
+-      .quad 0x00409a0000000000        /* 0xb8 APM CS    code */
+-      .quad 0x00009a0000000000        /* 0xc0 APM CS 16 code (16 bit) */
+-      .quad 0x0040920000000000        /* 0xc8 APM DS    data */
++      .quad 0x00409b0000000000        /* 0xb8 APM CS    code */
++      .quad 0x00009b0000000000        /* 0xc0 APM CS 16 code (16 bit) */
++      .quad 0x0040930000000000        /* 0xc8 APM DS    data */
+       .quad 0x0000000000000000        /* 0xd0 - unused */
+       .quad 0x0000000000000000        /* 0xd8 - unused */
+diff -uNr linux-2.6.8/arch/i386/kernel/ioport.c linux-2.6.8.grsecurity/arch/i386/kernel/ioport.c
+--- linux-2.6.8/arch/i386/kernel/ioport.c      2004-08-14 07:36:57.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/ioport.c   2004-08-16 17:06:17.793233864 +0200
+@@ -15,6 +15,7 @@
+ #include <linux/stddef.h>
+ #include <linux/slab.h>
+ #include <linux/thread_info.h>
++#include <linux/grsecurity.h>
+ /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
+ static void set_bitmap(unsigned long *bitmap, unsigned int base, unsigned int extent, int new_value)
+@@ -62,9 +63,16 @@
+       if ((from + num <= from) || (from + num > IO_BITMAP_BITS))
+               return -EINVAL;
++#ifdef CONFIG_GRKERNSEC_IO
++      if (turn_on) {
++              gr_handle_ioperm();
++#else
+       if (turn_on && !capable(CAP_SYS_RAWIO))
++#endif
+               return -EPERM;
+-
++#ifdef CONFIG_GRKERNSEC_IO
++      }
++#endif
+       /*
+        * If it's the first ioperm() call in this thread's lifetime, set the
+        * IO bitmap up. ioperm() is much less timing critical than clone(),
+@@ -115,8 +123,13 @@
+               return -EINVAL;
+       /* Trying to gain more privileges? */
+       if (level > old) {
++#ifdef CONFIG_GRKERNSEC_IO
++              gr_handle_iopl();
++              return -EPERM;
++#else
+               if (!capable(CAP_SYS_RAWIO))
+                       return -EPERM;
++#endif
+       }
+       regs->eflags = (regs->eflags &~ 0x3000UL) | (level << 12);
+       /* Make sure we return the long way (not sysenter) */
+diff -uNr linux-2.6.8/arch/i386/kernel/ldt.c linux-2.6.8.grsecurity/arch/i386/kernel/ldt.c
+--- linux-2.6.8/arch/i386/kernel/ldt.c 2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/ldt.c      2004-08-16 17:06:17.801232648 +0200
+@@ -102,6 +102,19 @@
+               retval = copy_ldt(&mm->context, &old_mm->context);
+               up(&old_mm->context.sem);
+       }
++
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++      if (!mm->context.user_cs_limit) {
++              mm->context.user_cs_base = 0UL;
++              mm->context.user_cs_limit = ~0UL;
++
++#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP)
++              cpus_clear(mm->context.cpu_user_cs_mask);
++#endif
++
++      }
++#endif
++
+       return retval;
+ }
+@@ -154,7 +167,7 @@
+ {
+       int err;
+       unsigned long size;
+-      void *address;
++      const void *address;
+       err = 0;
+       address = &default_ldt[0];
+@@ -211,6 +224,13 @@
+               }
+       }
++#ifdef CONFIG_PAX_SEGMEXEC
++      if ((current->flags & PF_PAX_SEGMEXEC) && (ldt_info.contents & 2)) {
++              error = -EINVAL;
++              goto out_unlock;
++      }
++#endif
++
+       entry_1 = LDT_entry_a(&ldt_info);
+       entry_2 = LDT_entry_b(&ldt_info);
+       if (oldmode)
+diff -uNr linux-2.6.8/arch/i386/kernel/process.c linux-2.6.8.grsecurity/arch/i386/kernel/process.c
+--- linux-2.6.8/arch/i386/kernel/process.c     2004-08-14 07:36:09.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/process.c  2004-08-16 17:12:06.850169144 +0200
+@@ -352,7 +352,7 @@
+       struct task_struct *tsk;
+       int err;
+-      childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
++      childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info - sizeof(unsigned long))) - 1;
+       *childregs = *regs;
+       childregs->eax = 0;
+       childregs->esp = esp;
+@@ -454,9 +454,8 @@
+ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
+ {
+       struct pt_regs ptregs;
+-      
+-      ptregs = *(struct pt_regs *)
+-              ((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs));
++
++      ptregs = *(struct pt_regs *)(tsk->thread.esp0 - sizeof(ptregs));
+       ptregs.xcs &= 0xffff;
+       ptregs.xds &= 0xffff;
+       ptregs.xes &= 0xffff;
+@@ -509,10 +508,18 @@
+       int cpu = smp_processor_id();
+       struct tss_struct *tss = init_tss + cpu;
++#ifdef CONFIG_PAX_KERNEXEC
++      unsigned long flags, cr3;
++#endif
++
+       /* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
+       __unlazy_fpu(prev_p);
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_open_kernel(flags, cr3);
++#endif
++
+       /*
+        * Reload esp0, LDT and the page table pointer:
+        */
+@@ -523,6 +530,10 @@
+        */
+       load_TLS(next, cpu);
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_close_kernel(flags, cr3);
++#endif
++
+       /*
+        * Save away %fs and %gs. No need to save %es and %ds, as
+        * those are always kernel segments while inside the kernel.
+@@ -688,6 +699,10 @@
+       struct desc_struct *desc;
+       int cpu, idx;
++#ifdef CONFIG_PAX_KERNEXEC
++      unsigned long flags, cr3;
++#endif
++
+       if (copy_from_user(&info, u_info, sizeof(info)))
+               return -EFAULT;
+       idx = info.entry_number;
+@@ -721,8 +736,17 @@
+               desc->a = LDT_entry_a(&info);
+               desc->b = LDT_entry_b(&info);
+       }
++
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_open_kernel(flags, cr3);
++#endif
++
+       load_TLS(t, cpu);
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_close_kernel(flags, cr3);
++#endif
++
+       put_cpu();
+       return 0;
+@@ -776,3 +800,29 @@
+       return 0;
+ }
++#ifdef CONFIG_PAX_RANDKSTACK
++asmlinkage void pax_randomize_kstack(void)
++{
++      struct tss_struct *tss = init_tss + smp_processor_id();
++      unsigned long time;
++
++#ifdef CONFIG_PAX_SOFTMODE
++      if (!pax_aslr)
++              return;
++#endif
++
++      rdtscl(time);
++
++      /* P4 seems to return a 0 LSB, ignore it */
++#ifdef CONFIG_MPENTIUM4
++      time &= 0x3EUL;
++      time <<= 1;
++#else
++      time &= 0x1FUL;
++      time <<= 2;
++#endif
++
++      tss->esp0 ^= time;
++      current->thread.esp0 = tss->esp0;
++}
++#endif
+diff -uNr linux-2.6.8/arch/i386/kernel/ptrace.c linux-2.6.8.grsecurity/arch/i386/kernel/ptrace.c
+--- linux-2.6.8/arch/i386/kernel/ptrace.c      2004-08-14 07:36:33.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/ptrace.c   2004-08-16 17:06:17.838227024 +0200
+@@ -15,6 +15,7 @@
+ #include <linux/user.h>
+ #include <linux/security.h>
+ #include <linux/audit.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+@@ -264,6 +265,9 @@
+       if (pid == 1)           /* you may not mess with init */
+               goto out_tsk;
++      if (gr_handle_ptrace(child, request))
++              goto out_tsk;
++
+       if (request == PTRACE_ATTACH) {
+               ret = ptrace_attach(child);
+               goto out_tsk;
+@@ -342,6 +346,17 @@
+                         if(addr == (long) &dummy->u_debugreg[5]) break;
+                         if(addr < (long) &dummy->u_debugreg[4] &&
+                            ((unsigned long) data) >= TASK_SIZE-3) break;
++
++#ifdef CONFIG_GRKERNSEC
++                        if(addr >= (long) &dummy->u_debugreg[0] &&
++                           addr <= (long) &dummy->u_debugreg[3]){
++                              long reg   = (addr - (long) &dummy->u_debugreg[0]) >> 2;
++                              long type  = (child->thread.debugreg[7] >> (DR_CONTROL_SHIFT + 4*reg)) & 3;
++                              long align = (child->thread.debugreg[7] >> (DR_CONTROL_SHIFT + 2 + 4*reg)) & 3;
++                              if((type & 1) && (data & align))
++                                      break;
++                        }
++#endif
+                         
+                         if(addr == (long) &dummy->u_debugreg[7]) {
+                                 data &= ~DR_CONTROL_RESERVED;
+diff -uNr linux-2.6.8/arch/i386/kernel/reboot.c linux-2.6.8.grsecurity/arch/i386/kernel/reboot.c
+--- linux-2.6.8/arch/i386/kernel/reboot.c      2004-08-14 07:36:44.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/reboot.c   2004-08-16 17:06:17.843226264 +0200
+@@ -152,18 +152,18 @@
+    doesn't work with at least one type of 486 motherboard.  It is easy
+    to stop this code working; hence the copious comments. */
+-static unsigned long long
++static const unsigned long long
+ real_mode_gdt_entries [3] =
+ {
+       0x0000000000000000ULL,  /* Null descriptor */
+-      0x00009a000000ffffULL,  /* 16-bit real-mode 64k code at 0x00000000 */
+-      0x000092000100ffffULL   /* 16-bit real-mode 64k data at 0x00000100 */
++      0x00009b000000ffffULL,  /* 16-bit real-mode 64k code at 0x00000000 */
++      0x000093000100ffffULL   /* 16-bit real-mode 64k data at 0x00000100 */
+ };
+ static struct
+ {
+       unsigned short       size __attribute__ ((packed));
+-      unsigned long long * base __attribute__ ((packed));
++      const unsigned long long * base __attribute__ ((packed));
+ }
+ real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, real_mode_gdt_entries },
+ real_mode_idt = { 0x3ff, NULL },
+diff -uNr linux-2.6.8/arch/i386/kernel/setup.c linux-2.6.8.grsecurity/arch/i386/kernel/setup.c
+--- linux-2.6.8/arch/i386/kernel/setup.c       2004-08-14 07:36:57.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/setup.c    2004-08-16 17:06:17.864223072 +0200
+@@ -1326,7 +1326,7 @@
+       code_resource.start = virt_to_phys(_text);
+       code_resource.end = virt_to_phys(_etext)-1;
+-      data_resource.start = virt_to_phys(_etext);
++      data_resource.start = virt_to_phys(_data);
+       data_resource.end = virt_to_phys(_edata)-1;
+       parse_cmdline_early(cmdline_p);
+@@ -1386,6 +1386,15 @@
+ #endif
+ }
++#ifdef CONFIG_PAX_SOFTMODE
++static int __init setup_pax_softmode(char *str)
++{
++      get_option (&str, &pax_softmode);
++      return 1;
++}
++__setup("pax_softmode=", setup_pax_softmode);
++#endif
++
+ #include "setup_arch_post.h"
+ /*
+  * Local Variables:
+diff -uNr linux-2.6.8/arch/i386/kernel/signal.c linux-2.6.8.grsecurity/arch/i386/kernel/signal.c
+--- linux-2.6.8/arch/i386/kernel/signal.c      2004-08-14 07:36:57.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/signal.c   2004-08-16 17:06:17.870222160 +0200
+@@ -371,7 +371,17 @@
+       if (err)
+               goto give_sigsegv;
++#ifdef CONFIG_PAX_NOVSYSCALL
++      restorer = frame->retcode;
++#else
+       restorer = &__kernel_sigreturn;
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (current->flags & PF_PAX_SEGMEXEC)
++              restorer -= SEGMEXEC_TASK_SIZE;
++#endif
++#endif
++
+       if (ka->sa.sa_flags & SA_RESTORER)
+               restorer = ka->sa.sa_restorer;
+@@ -454,7 +464,18 @@
+               goto give_sigsegv;
+       /* Set up to return from userspace.  */
++
++#ifdef CONFIG_PAX_NOVSYSCALL
++      restorer = frame->retcode;
++#else
+       restorer = &__kernel_rt_sigreturn;
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (current->flags & PF_PAX_SEGMEXEC)
++              restorer -= SEGMEXEC_TASK_SIZE;
++#endif
++#endif
++
+       if (ka->sa.sa_flags & SA_RESTORER)
+               restorer = ka->sa.sa_restorer;
+       err |= __put_user(restorer, &frame->pretcode);
+diff -uNr linux-2.6.8/arch/i386/kernel/sysenter.c linux-2.6.8.grsecurity/arch/i386/kernel/sysenter.c
+--- linux-2.6.8/arch/i386/kernel/sysenter.c    2004-08-14 07:38:09.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/sysenter.c 2004-08-16 17:06:17.889219272 +0200
+@@ -41,6 +41,7 @@
+ extern const char vsyscall_int80_start, vsyscall_int80_end;
+ extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
++#ifndef CONFIG_PAX_NOVSYSCALL
+ static int __init sysenter_setup(void)
+ {
+       unsigned long page = get_zeroed_page(GFP_ATOMIC);
+@@ -63,3 +64,4 @@
+ }
+ __initcall(sysenter_setup);
++#endif
+diff -uNr linux-2.6.8/arch/i386/kernel/sys_i386.c linux-2.6.8.grsecurity/arch/i386/kernel/sys_i386.c
+--- linux-2.6.8/arch/i386/kernel/sys_i386.c    2004-08-14 07:38:08.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/sys_i386.c 2004-08-16 17:06:17.887219576 +0200
+@@ -19,6 +19,7 @@
+ #include <linux/mman.h>
+ #include <linux/file.h>
+ #include <linux/utsname.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/ipc.h>
+@@ -49,6 +50,11 @@
+       int error = -EBADF;
+       struct file * file = NULL;
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(fd);
+@@ -56,6 +62,12 @@
+                       goto out;
+       }
++      if (gr_handle_mmap(file, prot)) {
++              fput(file);
++              error = -EACCES;
++              goto out;
++      }
++
+       down_write(&current->mm->mmap_sem);
+       error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+       up_write(&current->mm->mmap_sem);
+@@ -106,6 +118,77 @@
+       return err;
+ }
++unsigned long
++arch_get_unmapped_area(struct file *filp, unsigned long addr,
++              unsigned long len, unsigned long pgoff, unsigned long flags)
++{
++      struct mm_struct *mm = current->mm;
++      struct vm_area_struct *vma;
++      unsigned long start_addr, start_mmap, task_unmapped_base, task_size = TASK_SIZE;
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (current->flags & PF_PAX_SEGMEXEC)
++              task_size = SEGMEXEC_TASK_SIZE;
++#endif
++
++      if (len > task_size)
++              return -ENOMEM;
++
++#ifdef CONFIG_PAX_RANDMMAP
++      if (!(current->flags & PF_PAX_RANDMMAP) || !filp)
++#endif
++
++      if (addr) {
++              addr = PAGE_ALIGN(addr);
++              vma = find_vma(mm, addr);
++              if (task_size - len >= addr &&
++                  (!vma || addr + len <= vma->vm_start))
++                      return addr;
++      }
++      start_addr = addr = mm->free_area_cache;
++      start_mmap = PAGE_ALIGN(task_size/3);
++      task_unmapped_base = TASK_UNMAPPED_BASE;
++
++#ifdef CONFIG_PAX_RANDMMAP
++      if (current->flags & PF_PAX_RANDMMAP) {
++              start_mmap += mm->delta_mmap;
++              task_unmapped_base += mm->delta_mmap;
++      }
++#endif
++
++      if (!(flags & MAP_EXECUTABLE) && start_addr < start_mmap)
++              start_addr = addr = start_mmap;
++      else if ((flags & MAP_EXECUTABLE) && start_addr >= start_mmap)
++              start_addr = addr = task_unmapped_base;
++
++full_search:
++      for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
++              /* At this point:  (!vma || addr < vma->vm_end). */
++              if (task_size - len < addr) {
++                      /*
++                       * Start a new search - just in case we missed
++                       * some holes.
++                       */
++                      if (start_addr != task_unmapped_base) {
++                              start_addr = addr = task_unmapped_base;
++                              goto full_search;
++                      }
++                      return -ENOMEM;
++              }
++              if (!vma || (addr + len <= vma->vm_start && (addr + len <= mm->start_brk || start_mmap <= addr))) {
++                      /*
++                       * Remember the place where we stopped the search:
++                       */
++                      mm->free_area_cache = addr + len;
++                      return addr;
++              }
++              if (addr < start_mmap && addr + len > mm->start_brk) {
++                      addr = start_mmap;
++                      goto full_search;
++              } else
++                      addr = vma->vm_end;
++      }
++}
+ struct sel_arg_struct {
+       unsigned long n;
+diff -uNr linux-2.6.8/arch/i386/kernel/trampoline.S linux-2.6.8.grsecurity/arch/i386/kernel/trampoline.S
+--- linux-2.6.8/arch/i386/kernel/trampoline.S  2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/trampoline.S       2004-08-16 17:06:17.891218968 +0200
+@@ -58,7 +58,7 @@
+       inc     %ax             # protected mode (PE) bit
+       lmsw    %ax             # into protected mode
+       # flush prefetch and jump to startup_32_smp in arch/i386/kernel/head.S
+-      ljmpl   $__BOOT_CS, $(startup_32_smp-__PAGE_OFFSET)
++      ljmpl   $__BOOT_CS, $(startup_32_smp+__KERNEL_TEXT_OFFSET-__PAGE_OFFSET)
+       # These need to be in the same 64K segment as the above;
+       # hence we don't use the boot_gdt_descr defined in head.S
+diff -uNr linux-2.6.8/arch/i386/kernel/traps.c linux-2.6.8.grsecurity/arch/i386/kernel/traps.c
+--- linux-2.6.8/arch/i386/kernel/traps.c       2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/traps.c    2004-08-16 17:06:17.919214712 +0200
+@@ -26,6 +26,7 @@
+ #include <linux/kallsyms.h>
+ #include <linux/ptrace.h>
+ #include <linux/version.h>
++#include <linux/binfmts.h>
+ #ifdef CONFIG_EISA
+ #include <linux/ioport.h>
+@@ -58,18 +59,13 @@
+ asmlinkage void lcall7(void);
+ asmlinkage void lcall27(void);
+-struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 },
++const struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 },
+               { 0, 0 }, { 0, 0 } };
+ /* Do we ignore FPU interrupts ? */
+ char ignore_fpu_irq = 0;
+-/*
+- * The IDT has to be page-aligned to simplify the Pentium
+- * F0 0F bug workaround.. We have a special link segment
+- * for this.
+- */
+-struct desc_struct idt_table[256] __attribute__((__section__(".data.idt"))) = { {0, 0}, };
++extern struct desc_struct idt_table[256];
+ asmlinkage void divide_error(void);
+ asmlinkage void debug(void);
+@@ -107,13 +103,15 @@
+                        unsigned long ebp)
+ {
+       unsigned long addr;
++      int i = kstack_depth_to_print;
+-      while (valid_stack_ptr(task, (void *)ebp)) {
++      while (i && valid_stack_ptr(task, (void *)ebp)) {
+               addr = *(unsigned long *)(ebp + 4);
+               printk(" [<%08lx>] ", addr);
+               print_symbol("%s", addr);
+               printk("\n");
+               ebp = *(unsigned long *)ebp;
++              --i;
+       }
+ }
+ #else
+@@ -239,14 +237,23 @@
+               show_stack(NULL, (unsigned long*)esp);
+               printk("Code: ");
++
++#ifndef CONFIG_PAX_KERNEXEC
+               if(regs->eip < PAGE_OFFSET)
+                       goto bad;
++#endif
+               for(i=0;i<20;i++)
+               {
+                       unsigned char c;
++
++#ifdef CONFIG_PAX_KERNEXEC
++                      if(__get_user(c, &((unsigned char*)regs->eip)[i+__KERNEL_TEXT_OFFSET])) {
++#else
+                       if(__get_user(c, &((unsigned char*)regs->eip)[i])) {
+ bad:
++#endif
++
+                               printk(" Bad EIP value.");
+                               break;
+                       }
+@@ -269,8 +276,13 @@
+       eip = regs->eip;
++#ifdef CONFIG_PAX_KERNEXEC
++      eip += __KERNEL_TEXT_OFFSET;
++#else
+       if (eip < PAGE_OFFSET)
+               goto no_bug;
++#endif
++
+       if (__get_user(ud2, (unsigned short *)eip))
+               goto no_bug;
+       if (ud2 != 0x0b0f)
+@@ -278,7 +290,13 @@
+       if (__get_user(line, (unsigned short *)(eip + 2)))
+               goto bug;
+       if (__get_user(file, (char **)(eip + 4)) ||
++
++#ifdef CONFIG_PAX_KERNEXEC
++              __get_user(c, file + __KERNEL_TEXT_OFFSET))
++#else
+               (unsigned long)file < PAGE_OFFSET || __get_user(c, file))
++#endif
++
+               file = "<bad filename>";
+       printk("------------[ cut here ]------------\n");
+@@ -440,6 +458,22 @@
+       if (!(regs->xcs & 3))
+               goto gp_in_kernel;
++#ifdef CONFIG_PAX_PAGEEXEC
++      if ((current->flags & PF_PAX_PAGEEXEC)) {
++              struct mm_struct *mm = current->mm;
++              unsigned long limit;
++
++              down_write(&mm->mmap_sem);
++              limit = mm->context.user_cs_limit;
++              if (limit < TASK_SIZE) {
++                      track_exec_limit(mm, limit, TASK_SIZE, PROT_EXEC);
++                      up_write(&mm->mmap_sem);
++                      return;
++              }
++              up_write(&mm->mmap_sem);
++      }
++#endif
++
+       current->thread.error_code = error_code;
+       current->thread.trap_no = 13;
+       force_sig(SIGSEGV, current);
+@@ -451,8 +485,16 @@
+       return;
+ gp_in_kernel:
+-      if (!fixup_exception(regs))
++      if (!fixup_exception(regs)) {
++
++#ifdef CONFIG_PAX_KERNEXEC
++              if ((regs->xcs & 0xFFFF) == __KERNEL_CS)
++                      die("PAX: suspicious general protection fault", regs, error_code);
++              else
++#endif
++
+               die("general protection fault", regs, error_code);
++      }
+ }
+ static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
+@@ -885,7 +927,7 @@
+       _set_gate(idt_table+n,15,3,addr,__KERNEL_CS);
+ }
+-static void __init set_call_gate(void *a, void *addr)
++static void __init set_call_gate(const void *a, void *addr)
+ {
+       _set_gate(a,12,3,addr,__KERNEL_CS);
+ }
+diff -uNr linux-2.6.8/arch/i386/kernel/vmlinux.lds.S linux-2.6.8.grsecurity/arch/i386/kernel/vmlinux.lds.S
+--- linux-2.6.8/arch/i386/kernel/vmlinux.lds.S 2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/kernel/vmlinux.lds.S      2004-08-16 17:06:17.921214408 +0200
+@@ -2,7 +2,12 @@
+  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
+  */
++#include <linux/config.h>
++
+ #include <asm-generic/vmlinux.lds.h>
++#include <asm-i386/page.h>
++#include <asm-i386/segment.h>
++
+ #include <asm/thread_info.h>
+ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+@@ -11,26 +16,16 @@
+ jiffies = jiffies_64;
+ SECTIONS
+ {
+-  . = 0xC0000000 + 0x100000;
+-  /* read-only */
+-  _text = .;                  /* Text and read-only data */
+-  .text : {
+-      *(.text)
+-      SCHED_TEXT
+-      *(.fixup)
+-      *(.gnu.warning)
+-      } = 0x9090
+-
+-  _etext = .;                 /* End of text section */
+-
+-  . = ALIGN(16);              /* Exception table */
+-  __start___ex_table = .;
+-  __ex_table : { *(__ex_table) }
+-  __stop___ex_table = .;
+-
+-  RODATA
++  . = __PAGE_OFFSET + 0x100000;
++  .text.startup : {
++      BYTE(0xEA) /* jmp far */
++      LONG(startup_32 + __KERNEL_TEXT_OFFSET - __PAGE_OFFSET)
++      SHORT(__BOOT_CS)
++      }
+   /* writeable */
++  . = ALIGN(32);
++  _data = .;
+   .data : {                   /* Data */
+       *(.data)
+       CONSTRUCTORS
+@@ -42,25 +37,29 @@
+   . = ALIGN(4096);
+   __nosave_end = .;
+-  . = ALIGN(4096);
+-  .data.page_aligned : { *(.data.idt) }
+-
+   . = ALIGN(32);
+   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+-  _edata = .;                 /* End of data section */
+-
+   . = ALIGN(THREAD_SIZE);     /* init_task */
+   .data.init_task : { *(.data.init_task) }
++  . = ALIGN(4096);
++  .data.page_aligned : { *(.data.swapper_pg_dir) }
++
++  _edata = .;                 /* End of data section */
++
++  __bss_start = .;            /* BSS */
++  .bss : {
++      *(.bss.page_aligned)
++      *(.bss)
++      LONG(0)
++      }
++  . = ALIGN(4);
++  __bss_stop = .; 
++
+   /* will be freed after init */
+   . = ALIGN(4096);            /* Init code and data */
+   __init_begin = .;
+-  .init.text : { 
+-      _sinittext = .;
+-      *(.init.text)
+-      _einittext = .;
+-  }
+   .init.data : { *(.init.data) }
+   . = ALIGN(16);
+   __setup_start = .;
+@@ -89,9 +88,13 @@
+   .altinstructions : { *(.altinstructions) } 
+   __alt_instructions_end = .; 
+  .altinstr_replacement : { *(.altinstr_replacement) } 
++
++#ifndef CONFIG_PAX_KERNEXEC
+   /* .exit.text is discard at runtime, not link time, to deal with references
+      from .altinstructions and .eh_frame */
+   .exit.text : { *(.exit.text) }
++#endif
++
+   .exit.data : { *(.exit.data) }
+   . = ALIGN(4096);
+   __initramfs_start = .;
+@@ -101,17 +104,67 @@
+   __per_cpu_start = .;
+   .data.percpu  : { *(.data.percpu) }
+   __per_cpu_end = .;
++
++  /* read-only */
++
++#ifdef CONFIG_PAX_KERNEXEC
++  __init_text_start = .;
++  .init.text (. - __KERNEL_TEXT_OFFSET) : AT (__init_text_start) {
++      _sinittext = .;
++      *(.init.text)
++      _einittext = .;
++      *(.exit.text)
++      . = ALIGN(4*1024*1024) - 1;
++      BYTE(0)
++  }
+   . = ALIGN(4096);
+-  __init_end = .;
++  __init_end = . + __KERNEL_TEXT_OFFSET;
+   /* freed after init ends here */
+-      
+-  __bss_start = .;            /* BSS */
+-  .bss : {
+-      *(.bss.page_aligned)
+-      *(.bss)
++
++/*
++ * PaX: this must be kept in synch with the KERNEL_CS base
++ * in the GDTs in arch/i386/kernel/head.S
++ */
++  _text = .;                  /* Text and read-only data */
++  .text : AT (. + __KERNEL_TEXT_OFFSET) {
++#else
++  .init.text : {
++      _sinittext = .;
++      *(.init.text)
++      _einittext = .;
+   }
+-  . = ALIGN(4);
+-  __bss_stop = .; 
++  . = ALIGN(4096);
++  __init_end = .;
++  /* freed after init ends here */
++
++  _text = .;                  /* Text and read-only data */
++  .text : {
++#endif
++
++      *(.text)
++      SCHED_TEXT
++      *(.fixup)
++      *(.gnu.warning)
++      } = 0x9090
++
++  _etext = .;                 /* End of text section */
++  . += __KERNEL_TEXT_OFFSET;
++  . = ALIGN(16);              /* Exception table */
++  __start___ex_table = .;
++  __ex_table : { *(__ex_table) }
++  __stop___ex_table = .;
++
++  . = ALIGN(4096);
++  .rodata.page_aligned : {
++      *(.rodata.empty_zero_page)
++      *(.rodata.idt)
++      }
++
++  RODATA
++
++#ifdef CONFIG_PAX_KERNEXEC
++  . = ALIGN(4*1024*1024);
++#endif
+   _end = . ;
+diff -uNr linux-2.6.8/arch/i386/mm/fault.c linux-2.6.8.grsecurity/arch/i386/mm/fault.c
+--- linux-2.6.8/arch/i386/mm/fault.c   2004-08-14 07:36:10.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/mm/fault.c        2004-08-16 17:18:30.449853128 +0200
+@@ -21,6 +21,9 @@
+ #include <linux/vt_kern.h>            /* For unblank_screen() */
+ #include <linux/highmem.h>
+ #include <linux/module.h>
++#include <linux/unistd.h>
++#include <linux/compiler.h>
++#include <linux/binfmts.h>
+ #include <asm/system.h>
+ #include <asm/uaccess.h>
+@@ -203,6 +206,27 @@
+ asmlinkage void do_invalid_op(struct pt_regs *, unsigned long);
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_EMUTRAMP) || defined(CONFIG_PAX_RANDEXEC)
++static int pax_handle_fetch_fault(struct pt_regs *regs);
++#endif
++
++#ifdef CONFIG_PAX_PAGEEXEC
++/* PaX: called with the page_table_lock spinlock held */
++static inline pte_t * pax_get_pte(struct mm_struct *mm, unsigned long address)
++{
++      pgd_t *pgd;
++      pmd_t *pmd;
++
++      pgd = pgd_offset(mm, address);
++      if (!pgd || !pgd_present(*pgd))
++              return 0;
++      pmd = pmd_offset(pgd, address);
++      if (!pmd || !pmd_present(*pmd))
++              return 0;
++      return pte_offset_map(pmd, address);
++}
++#endif
++
+ /*
+  * This routine handles page faults.  It determines the address,
+  * and the problem, and then passes it off to one of the appropriate
+@@ -223,6 +247,11 @@
+       int write;
+       siginfo_t info;
++#ifdef CONFIG_PAX_PAGEEXEC
++      pte_t *pte;
++      unsigned char pte_mask1, pte_mask2;
++#endif
++
+       /* get the address */
+       __asm__("movl %%cr2,%0":"=r" (address));
+@@ -266,6 +295,91 @@
+       if (in_atomic() || !mm)
+               goto bad_area_nosemaphore;
++#ifdef CONFIG_PAX_PAGEEXEC
++      if (unlikely(!(tsk->flags & PF_PAX_PAGEEXEC) || (error_code & 5) != 5))
++              goto not_pax_fault;
++
++      /* PaX: it's our fault, let's handle it if we can */
++
++      /* PaX: take a look at read faults before acquiring any locks */
++      if (unlikely((error_code == 5) && (regs->eip == address))) {
++              /* instruction fetch attempt from a protected page in user mode */
++              switch (pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_RANDEXEC
++              case 3:
++                      return;
++#endif
++
++#ifdef CONFIG_PAX_EMUTRAMP
++              case 2:
++                      return;
++#endif
++
++              }
++              pax_report_fault(regs, (void*)regs->eip, (void*)regs->esp);
++              do_exit(SIGKILL);
++      }
++
++      spin_lock(&mm->page_table_lock);
++      pte = pax_get_pte(mm, address);
++      if (unlikely(!pte || !(pte_val(*pte) & _PAGE_PRESENT) || pte_exec(*pte))) {
++              pte_unmap(pte);
++              spin_unlock(&mm->page_table_lock);
++              goto not_pax_fault;
++      }
++
++      if (unlikely((error_code == 7) && !pte_write(*pte))) {
++              /* write attempt to a protected page in user mode */
++              pte_unmap(pte);
++              spin_unlock(&mm->page_table_lock);
++              goto not_pax_fault;
++      }
++
++      pte_mask1 = _PAGE_ACCESSED | _PAGE_USER | ((error_code & 2) << (_PAGE_BIT_DIRTY-1));
++
++#ifdef CONFIG_SMP
++      if (likely(cpu_isset(smp_processor_id(), mm->context.cpu_user_cs_mask)) && address >= get_limit(regs->xcs))
++              pte_mask2 = 0;
++      else
++              pte_mask2 = _PAGE_USER;
++#else
++      pte_mask2 = (address >= get_limit(regs->xcs)) ? 0 : _PAGE_USER;
++#endif
++
++      /*
++       * PaX: fill DTLB with user rights and retry
++       */
++      __asm__ __volatile__ (
++              "orb %2,%1\n"
++#if defined(CONFIG_M586) || defined(CONFIG_M586TSC)
++/*
++ * PaX: let this uncommented 'invlpg' remind us on the behaviour of Intel's
++ * (and AMD's) TLBs. namely, they do not cache PTEs that would raise *any*
++ * page fault when examined during a TLB load attempt. this is true not only
++ * for PTEs holding a non-present entry but also present entries that will
++ * raise a page fault (such as those set up by PaX, or the copy-on-write
++ * mechanism). in effect it means that we do *not* need to flush the TLBs
++ * for our target pages since their PTEs are simply not in the TLBs at all.
++
++ * the best thing in omitting it is that we gain around 15-20% speed in the
++ * fast path of the page fault handler and can get rid of tracing since we
++ * can no longer flush unintended entries.
++ */
++              "invlpg %0\n"
++#endif
++              "testb $0,%0\n"
++              "xorb %3,%1\n"
++              :
++              : "m" (*(char*)address), "m" (*(char*)pte), "q" (pte_mask1), "q" (pte_mask2)
++              : "memory", "cc");
++      pte_unmap(pte);
++      spin_unlock(&mm->page_table_lock);
++      return;
++
++not_pax_fault:
++#endif
++
+       /* When running in the kernel we expect faults to occur only to
+        * addresses in user space.  All other faults represent errors in the
+        * kernel and should generate an OOPS.  Unfortunatly, in the case of an
+@@ -382,6 +496,34 @@
+               if (is_prefetch(regs, address, error_code))
+                       return;
++#ifdef CONFIG_PAX_SEGMEXEC
++              if (current->flags & PF_PAX_SEGMEXEC) {
++
++#if defined(CONFIG_PAX_EMUTRAMP) || defined(CONFIG_PAX_RANDEXEC)
++                      if ((error_code == 4) && (regs->eip + SEGMEXEC_TASK_SIZE == address)) {
++                              switch (pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_RANDEXEC
++                              case 3:
++                                      return;
++#endif
++
++#ifdef CONFIG_PAX_EMUTRAMP
++                              case 2:
++                                      return;
++#endif
++
++                              }
++                      }
++#endif
++
++                      if (address >= SEGMEXEC_TASK_SIZE) {
++                              pax_report_fault(regs, (void*)regs->eip, (void*)regs->esp);
++                              do_exit(SIGKILL);
++                      }
++              }
++#endif
++
+               tsk->thread.cr2 = address;
+               /* Kernel addresses are always protection faults */
+               tsk->thread.error_code = error_code | (address >= TASK_SIZE);
+@@ -440,6 +582,13 @@
+ #endif
+       if (address < PAGE_SIZE)
+               printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
++
++#ifdef CONFIG_PAX_KERNEXEC
++      else if (init_mm.start_code + __KERNEL_TEXT_OFFSET <= address && address < init_mm.end_code + __KERNEL_TEXT_OFFSET)
++              printk(KERN_ERR "PAX: %s:%d, uid/euid: %u/%u, attempted to modify kernel code",
++                               tsk->comm, tsk->pid, tsk->uid, tsk->euid);
++#endif
++
+       else
+               printk(KERN_ALERT "Unable to handle kernel paging request");
+       printk(" at virtual address %08lx\n",address);
+@@ -541,3 +690,249 @@
+               return;
+       }
+ }
++
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_EMUTRAMP) || defined(CONFIG_PAX_RANDEXEC)
++/*
++ * PaX: decide what to do with offenders (regs->eip = fault address)
++ *
++ * returns 1 when task should be killed
++ *         2 when gcc trampoline was detected
++ *         3 when legitimate ET_EXEC was detected
++ */
++static int pax_handle_fetch_fault(struct pt_regs *regs)
++{
++
++#ifdef CONFIG_PAX_EMUTRAMP
++      static const unsigned char trans[8] = {6, 1, 2, 0, 13, 5, 3, 4};
++#endif
++
++#if defined(CONFIG_PAX_RANDEXEC) || defined(CONFIG_PAX_EMUTRAMP)
++      int err;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++      if (current->flags & PF_PAX_RANDEXEC) {
++              unsigned long esp_4;
++
++              if (regs->eip >= current->mm->start_code &&
++                  regs->eip < current->mm->end_code)
++              {
++                      err = get_user(esp_4, (unsigned long*)(regs->esp-4UL));
++                      if (err || esp_4 == regs->eip)
++                              return 1;
++
++                      regs->eip += current->mm->delta_exec;
++                      return 3;
++              }
++      }
++#endif
++
++#ifdef CONFIG_PAX_EMUTRAMP
++      do { /* PaX: gcc trampoline emulation #1 */
++              unsigned char mov1, mov2;
++              unsigned short jmp;
++              unsigned long addr1, addr2, ret;
++              unsigned short call;
++
++              err = get_user(mov1, (unsigned char *)regs->eip);
++              err |= get_user(addr1, (unsigned long *)(regs->eip + 1));
++              err |= get_user(mov2, (unsigned char *)(regs->eip + 5));
++              err |= get_user(addr2, (unsigned long *)(regs->eip + 6));
++              err |= get_user(jmp, (unsigned short *)(regs->eip + 10));
++              err |= get_user(ret, (unsigned long *)regs->esp);
++
++              if (err)
++                      break;
++
++              err = get_user(call, (unsigned short *)(ret-2));
++              if (err)
++                      break;
++
++              if ((mov1 & 0xF8) == 0xB8 &&
++                  (mov2 & 0xF8) == 0xB8 &&
++                  (mov1 & 0x07) != (mov2 & 0x07) &&
++                  (jmp & 0xF8FF) == 0xE0FF &&
++                  (mov2 & 0x07) == ((jmp>>8) & 0x07) &&
++                  (call & 0xF8FF) == 0xD0FF &&
++                  regs->eip == ((unsigned long*)regs)[trans[(call>>8) & 0x07]])
++              {
++                      ((unsigned long *)regs)[trans[mov1 & 0x07]] = addr1;
++                      ((unsigned long *)regs)[trans[mov2 & 0x07]] = addr2;
++                      regs->eip = addr2;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: gcc trampoline emulation #2 */
++              unsigned char mov, jmp;
++              unsigned long addr1, addr2, ret;
++              unsigned short call;
++
++              err = get_user(mov, (unsigned char *)regs->eip);
++              err |= get_user(addr1, (unsigned long *)(regs->eip + 1));
++              err |= get_user(jmp, (unsigned char *)(regs->eip + 5));
++              err |= get_user(addr2, (unsigned long *)(regs->eip + 6));
++              err |= get_user(ret, (unsigned long *)regs->esp);
++
++              if (err)
++                      break;
++
++              err = get_user(call, (unsigned short *)(ret-2));
++              if (err)
++                      break;
++
++              if ((mov & 0xF8) == 0xB8 &&
++                  jmp == 0xE9 &&
++                  (call & 0xF8FF) == 0xD0FF &&
++                  regs->eip == ((unsigned long*)regs)[trans[(call>>8) & 0x07]])
++              {
++                      ((unsigned long *)regs)[trans[mov & 0x07]] = addr1;
++                      regs->eip += addr2 + 10;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: gcc trampoline emulation #3 */
++              unsigned char mov, jmp;
++              char offset;
++              unsigned long addr1, addr2, ret;
++              unsigned short call;
++
++              err = get_user(mov, (unsigned char *)regs->eip);
++              err |= get_user(addr1, (unsigned long *)(regs->eip + 1));
++              err |= get_user(jmp, (unsigned char *)(regs->eip + 5));
++              err |= get_user(addr2, (unsigned long *)(regs->eip + 6));
++              err |= get_user(ret, (unsigned long *)regs->esp);
++
++              if (err)
++                      break;
++
++              err = get_user(call, (unsigned short *)(ret-3));
++              err |= get_user(offset, (char *)(ret-1));
++              if (err)
++                      break;
++
++              if ((mov & 0xF8) == 0xB8 &&
++                  jmp == 0xE9 &&
++                  call == 0x55FF)
++              {
++                      unsigned long addr;
++
++                      err = get_user(addr, (unsigned long*)(regs->ebp + (unsigned long)(long)offset));
++                      if (err || regs->eip != addr)
++                              break;
++
++                      ((unsigned long *)regs)[trans[mov & 0x07]] = addr1;
++                      regs->eip += addr2 + 10;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: gcc trampoline emulation #4 */
++              unsigned char mov, jmp, sib;
++              char offset;
++              unsigned long addr1, addr2, ret;
++              unsigned short call;
++
++              err = get_user(mov, (unsigned char *)regs->eip);
++              err |= get_user(addr1, (unsigned long *)(regs->eip + 1));
++              err |= get_user(jmp, (unsigned char *)(regs->eip + 5));
++              err |= get_user(addr2, (unsigned long *)(regs->eip + 6));
++              err |= get_user(ret, (unsigned long *)regs->esp);
++
++              if (err)
++                      break;
++
++              err = get_user(call, (unsigned short *)(ret-4));
++              err |= get_user(sib, (unsigned char *)(ret-2));
++              err |= get_user(offset, (char *)(ret-1));
++              if (err)
++                      break;
++
++              if ((mov & 0xF8) == 0xB8 &&
++                  jmp == 0xE9 &&
++                  call == 0x54FF &&
++                  sib == 0x24)
++              {
++                      unsigned long addr;
++
++                      err = get_user(addr, (unsigned long*)(regs->esp + 4 + (unsigned long)(long)offset));
++                      if (err || regs->eip != addr)
++                              break;
++
++                      ((unsigned long *)regs)[trans[mov & 0x07]] = addr1;
++                      regs->eip += addr2 + 10;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: gcc trampoline emulation #5 */
++              unsigned char mov, jmp, sib;
++              unsigned long addr1, addr2, ret, offset;
++              unsigned short call;
++
++              err = get_user(mov, (unsigned char *)regs->eip);
++              err |= get_user(addr1, (unsigned long *)(regs->eip + 1));
++              err |= get_user(jmp, (unsigned char *)(regs->eip + 5));
++              err |= get_user(addr2, (unsigned long *)(regs->eip + 6));
++              err |= get_user(ret, (unsigned long *)regs->esp);
++
++              if (err)
++                      break;
++
++              err = get_user(call, (unsigned short *)(ret-7));
++              err |= get_user(sib, (unsigned char *)(ret-5));
++              err |= get_user(offset, (unsigned long *)(ret-4));
++              if (err)
++                      break;
++
++              if ((mov & 0xF8) == 0xB8 &&
++                  jmp == 0xE9 &&
++                  call == 0x94FF &&
++                  sib == 0x24)
++              {
++                      unsigned long addr;
++
++                      err = get_user(addr, (unsigned long*)(regs->esp + 4 + offset));
++                      if (err || regs->eip != addr)
++                              break;
++
++                      ((unsigned long *)regs)[trans[mov & 0x07]] = addr1;
++                      regs->eip += addr2 + 10;
++                      return 2;
++              }
++      } while (0);
++#endif
++
++      return 1; /* PaX in action */
++}
++#endif
++
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++void pax_report_insns(void *pc, void *sp)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 20; i++) {
++              unsigned char c;
++              if (get_user(c, (unsigned char*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%02x ", c);
++      }
++      printk("\n");
++
++      printk(KERN_ERR "PAX: bytes at SP: ");
++      for (i = 0; i < 20; i++) {
++              unsigned long c;
++              if (get_user(c, (unsigned long*)sp+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08lx ", c);
++      }
++      printk("\n");
++}
++#endif
+diff -uNr linux-2.6.8/arch/i386/mm/init.c linux-2.6.8.grsecurity/arch/i386/mm/init.c
+--- linux-2.6.8/arch/i386/mm/init.c    2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/mm/init.c 2004-08-16 17:06:18.014200272 +0200
+@@ -39,6 +39,7 @@
+ #include <asm/tlb.h>
+ #include <asm/tlbflush.h>
+ #include <asm/sections.h>
++#include <asm/desc.h>
+ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
+ unsigned long highstart_pfn, highend_pfn;
+@@ -513,6 +514,10 @@
+ #endif
+       __flush_tlb_all();
++#ifdef CONFIG_PAX_KERNEXEC
++      memcpy(kernexec_pg_dir, swapper_pg_dir, sizeof(kernexec_pg_dir));
++#endif
++
+       kmap_init();
+       zone_sizes_init();
+ }
+@@ -607,7 +612,7 @@
+       set_highmem_pages_init(bad_ppro);
+       codesize =  (unsigned long) &_etext - (unsigned long) &_text;
+-      datasize =  (unsigned long) &_edata - (unsigned long) &_etext;
++      datasize =  (unsigned long) &_edata - (unsigned long) &_data;
+       initsize =  (unsigned long) &__init_end - (unsigned long) &__init_begin;
+       kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT); 
+@@ -706,6 +711,42 @@
+               totalram_pages++;
+       }
+       printk (KERN_INFO "Freeing unused kernel memory: %dk freed\n", (__init_end - __init_begin) >> 10);
++
++#ifdef CONFIG_PAX_KERNEXEC
++      /* PaX: limit KERNEL_CS to actual size */
++      {
++              unsigned long limit;
++              int cpu;
++              pgd_t *pgd;
++              pmd_t *pmd;
++
++              limit = (unsigned long)&_etext >> PAGE_SHIFT;
++              for (cpu = 0; cpu < NR_CPUS; cpu++) {
++                      cpu_gdt_table[cpu][GDT_ENTRY_KERNEL_CS].a = (cpu_gdt_table[cpu][GDT_ENTRY_KERNEL_CS].a & 0xFFFF0000UL) | (limit & 0x0FFFFUL);
++                      cpu_gdt_table[cpu][GDT_ENTRY_KERNEL_CS].b = (cpu_gdt_table[cpu][GDT_ENTRY_KERNEL_CS].b & 0xFFF0FFFFUL) | (limit & 0xF0000UL);
++
++#ifdef CONFIG_PCI_BIOS
++              printk(KERN_INFO "PAX: warning, PCI BIOS might still be in use, keeping flat KERNEL_CS.\n");
++#endif
++
++              }
++
++      /* PaX: make KERNEL_CS read-only */
++              for (addr = __KERNEL_TEXT_OFFSET; addr < __KERNEL_TEXT_OFFSET + 0x00400000UL; addr += (1UL << PMD_SHIFT)) {
++                      pgd = pgd_offset_k(addr);
++                      pmd = pmd_offset(pgd, addr);
++                      set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_GLOBAL));
++              }
++              memcpy(kernexec_pg_dir, swapper_pg_dir, sizeof(kernexec_pg_dir));
++              for (addr = __KERNEL_TEXT_OFFSET; addr < __KERNEL_TEXT_OFFSET + 0x00400000UL; addr += (1UL << PMD_SHIFT)) {
++                      pgd = pgd_offset_k(addr);
++                      pmd = pmd_offset(pgd, addr);
++                      set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
++              }
++              flush_tlb_all();
++      }
++#endif
++
+ }
+ #ifdef CONFIG_BLK_DEV_INITRD
+diff -uNr linux-2.6.8/arch/i386/pci/pcbios.c linux-2.6.8.grsecurity/arch/i386/pci/pcbios.c
+--- linux-2.6.8/arch/i386/pci/pcbios.c 2004-08-14 07:36:14.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/i386/pci/pcbios.c      2004-08-16 17:06:18.059193432 +0200
+@@ -6,7 +6,7 @@
+ #include <linux/init.h>
+ #include "pci.h"
+ #include "pci-functions.h"
+-
++#include <asm/desc.h>
+ /* BIOS32 signature: "_32_" */
+ #define BIOS32_SIGNATURE      (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24))
+@@ -33,6 +33,12 @@
+  * and the PCI BIOS specification.
+  */
++#if defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_PCI_BIOS)
++#define __FLAT_KERNEL_CS 0x20
++#else
++#define __FLAT_KERNEL_CS __KERNEL_CS
++#endif
++
+ union bios32 {
+       struct {
+               unsigned long signature;        /* _32_ */
+@@ -55,7 +61,7 @@
+ static struct {
+       unsigned long address;
+       unsigned short segment;
+-} bios32_indirect = { 0, __KERNEL_CS };
++} bios32_indirect = { 0, __FLAT_KERNEL_CS };
+ /*
+  * Returns the entry point for the given service, NULL on error
+@@ -96,7 +102,9 @@
+ static struct {
+       unsigned long address;
+       unsigned short segment;
+-} pci_indirect = { 0, __KERNEL_CS };
++} pci_indirect = { 0, __FLAT_KERNEL_CS };
++
++#undef __FLAT_KERNEL_CS
+ static int pci_bios_present;
+diff -uNr linux-2.6.8/arch/ia64/ia32/binfmt_elf32.c linux-2.6.8.grsecurity/arch/ia64/ia32/binfmt_elf32.c
+--- linux-2.6.8/arch/ia64/ia32/binfmt_elf32.c  2004-08-14 07:37:42.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ia64/ia32/binfmt_elf32.c       2004-08-16 17:06:18.110185680 +0200
+@@ -43,6 +43,17 @@
+ #define elf_read_implies_exec(ex, have_pt_gnu_stack)  (!(have_pt_gnu_stack))
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      ((tsk)->personality == PER_LINUX32 ? 0x08048000UL : 0x4000000000000000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               IA32_PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               ((tsk)->personality == PER_LINUX32 ? 16 : 43 - IA32_PAGE_SHIFT)
++#define PAX_DELTA_EXEC_LSB(tsk)               IA32_PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               ((tsk)->personality == PER_LINUX32 ? 16 : 43 - IA32_PAGE_SHIFT)
++#define PAX_DELTA_STACK_LSB(tsk)      IA32_PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      ((tsk)->personality == PER_LINUX32 ? 16 : 43 - IA32_PAGE_SHIFT)
++#endif
++
+ /* Ugly but avoids duplication */
+ #include "../../../fs/binfmt_elf.c"
+diff -uNr linux-2.6.8/arch/ia64/ia32/ia32priv.h linux-2.6.8.grsecurity/arch/ia64/ia32/ia32priv.h
+--- linux-2.6.8/arch/ia64/ia32/ia32priv.h      2004-08-14 07:38:08.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ia64/ia32/ia32priv.h   2004-08-16 17:06:18.155178840 +0200
+@@ -323,7 +323,14 @@
+ #define ELF_ARCH      EM_386
+ #define IA32_PAGE_OFFSET      0xc0000000
+-#define IA32_STACK_TOP                IA32_PAGE_OFFSET
++
++#ifdef CONFIG_PAX_RANDUSTACK
++#define __IA32_DELTA_STACK    (current->mm->delta_stack)
++#else
++#define __IA32_DELTA_STACK 0UL
++#endif
++
++#define IA32_STACK_TOP                (IA32_PAGE_OFFSET - __IA32_DELTA_STACK)
+ /*
+  * The system segments (GDT, TSS, LDT) have to be mapped below 4GB so the IA-32 engine can
+diff -uNr linux-2.6.8/arch/ia64/ia32/sys_ia32.c linux-2.6.8.grsecurity/arch/ia64/ia32/sys_ia32.c
+--- linux-2.6.8/arch/ia64/ia32/sys_ia32.c      2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ia64/ia32/sys_ia32.c   2004-08-16 17:06:18.178175344 +0200
+@@ -942,6 +942,11 @@
+       flags = a.flags;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(a.fd);
+@@ -963,6 +968,11 @@
+       struct file *file = NULL;
+       unsigned long retval;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(fd);
+diff -uNr linux-2.6.8/arch/ia64/kernel/ptrace.c linux-2.6.8.grsecurity/arch/ia64/kernel/ptrace.c
+--- linux-2.6.8/arch/ia64/kernel/ptrace.c      2004-08-14 07:38:08.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ia64/kernel/ptrace.c   2004-08-16 17:06:18.251164248 +0200
+@@ -17,6 +17,7 @@
+ #include <linux/smp_lock.h>
+ #include <linux/user.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
+ #include <asm/pgtable.h>
+ #include <asm/processor.h>
+@@ -1314,6 +1315,9 @@
+       if (pid == 1)           /* no messing around with init! */
+               goto out_tsk;
++      if (gr_handle_ptrace(child, request))
++              goto out_tsk;
++
+       if (request == PTRACE_ATTACH) {
+               ret = ptrace_attach(child);
+               goto out_tsk;
+diff -uNr linux-2.6.8/arch/ia64/kernel/sys_ia64.c linux-2.6.8.grsecurity/arch/ia64/kernel/sys_ia64.c
+--- linux-2.6.8/arch/ia64/kernel/sys_ia64.c    2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ia64/kernel/sys_ia64.c 2004-08-16 17:06:18.262162576 +0200
+@@ -18,6 +18,7 @@
+ #include <linux/syscalls.h>
+ #include <linux/highuid.h>
+ #include <linux/hugetlb.h>
++#include <linux/grsecurity.h>
+ #include <asm/shmparam.h>
+ #include <asm/uaccess.h>
+@@ -27,7 +28,7 @@
+                       unsigned long pgoff, unsigned long flags)
+ {
+       long map_shared = (flags & MAP_SHARED);
+-      unsigned long start_addr, align_mask = PAGE_SIZE - 1;
++      unsigned long start_addr, align_mask = PAGE_SIZE - 1, task_unmapped_base = TASK_UNMAPPED_BASE;
+       struct mm_struct *mm = current->mm;
+       struct vm_area_struct *vma;
+@@ -38,6 +39,15 @@
+       if (REGION_NUMBER(addr) == REGION_HPAGE)
+               addr = 0;
+ #endif
++
++#ifdef CONFIG_PAX_RANDMMAP
++      if (current->flags & PF_PAX_RANDMMAP)
++              task_unmapped_base += mm->delta_mmap;
++      if ((current->flags & PF_PAX_RANDMMAP) && addr && filp)
++              addr = mm->free_area_cache;
++      else
++#endif
++
+       if (!addr)
+               addr = mm->free_area_cache;
+@@ -56,9 +66,9 @@
+       for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
+               /* At this point:  (!vma || addr < vma->vm_end). */
+               if (TASK_SIZE - len < addr || RGN_MAP_LIMIT - len < REGION_OFFSET(addr)) {
+-                      if (start_addr != TASK_UNMAPPED_BASE) {
++                      if (start_addr != task_unmapped_base) {
+                               /* Start a new search --- just in case we missed some holes.  */
+-                              addr = TASK_UNMAPPED_BASE;
++                              addr = task_unmapped_base;
+                               goto full_search;
+                       }
+                       return -ENOMEM;
+@@ -185,6 +195,11 @@
+       unsigned long roff;
+       struct file *file = 0;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(fd);
+@@ -222,6 +237,11 @@
+               goto out;
+       }
++      if (gr_handle_mmap(file, prot)) {
++              addr = -EACCES;
++              goto out;
++      }
++
+       down_write(&current->mm->mmap_sem);
+       addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+       up_write(&current->mm->mmap_sem);
+diff -uNr linux-2.6.8/arch/ia64/mm/fault.c linux-2.6.8.grsecurity/arch/ia64/mm/fault.c
+--- linux-2.6.8/arch/ia64/mm/fault.c   2004-08-14 07:38:07.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ia64/mm/fault.c        2004-08-16 17:06:18.387143576 +0200
+@@ -9,6 +9,7 @@
+ #include <linux/mm.h>
+ #include <linux/smp_lock.h>
+ #include <linux/interrupt.h>
++#include <linux/binfmts.h>
+ #include <asm/pgtable.h>
+ #include <asm/processor.h>
+@@ -70,6 +71,54 @@
+       return pte_present(pte);
+ }
++#ifdef CONFIG_PAX_PAGEEXEC
++/*
++ * PaX: decide what to do with offenders (regs->cr_iip = fault address)
++ *
++ * returns 1 when task should be killed
++ *         2 when legitimate ET_EXEC was detected
++ */
++static int pax_handle_fetch_fault(struct pt_regs *regs)
++{
++
++#ifdef CONFIG_PAX_RANDEXEC
++      int err;
++
++      if (current->flags & PF_PAX_RANDEXEC) {
++              if (regs->cr_iip >= current->mm->start_code &&
++                  regs->cr_iip < current->mm->end_code)
++              {
++#if 0
++                      /* PaX: this needs fixing */
++                      if (regs->b0 == regs->cr_iip)
++                              return 1;
++#endif
++                      regs->cr_iip += current->mm->delta_exec;
++                      return 2;
++              }
++      }
++#endif
++
++      return 1;
++}
++
++void pax_report_insns(void *pc, void *sp)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 8; i++) {
++              unsigned int c;
++              if (get_user(c, (unsigned int*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08x ", c);
++      }
++      printk("\n");
++}
++#endif
++
+ void
+ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *regs)
+ {
+@@ -125,9 +174,31 @@
+               | (((isr >> IA64_ISR_W_BIT) & 1UL) << VM_WRITE_BIT)
+               | (((isr >> IA64_ISR_R_BIT) & 1UL) << VM_READ_BIT));
+-      if ((vma->vm_flags & mask) != mask)
++      if ((vma->vm_flags & mask) != mask) {
++
++#ifdef CONFIG_PAX_PAGEEXEC
++              if (!(vma->vm_flags & VM_EXEC) && (mask & VM_EXEC)) {
++                      if (!(current->flags & PF_PAX_PAGEEXEC) || address != regs->cr_iip)
++                              goto bad_area;
++
++                      up_read(&mm->mmap_sem);
++                      switch(pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_RANDEXEC
++                      case 2:
++                              return;
++#endif
++
++                      }
++                      pax_report_fault(regs, (void*)regs->cr_iip, (void*)regs->r12);
++                      do_exit(SIGKILL);
++              }
++#endif
++
+               goto bad_area;
++      }
++
+   survive:
+       /*
+        * If for any reason at all we couldn't handle the fault, make
+diff -uNr linux-2.6.8/arch/mips/kernel/binfmt_elfn32.c linux-2.6.8.grsecurity/arch/mips/kernel/binfmt_elfn32.c
+--- linux-2.6.8/arch/mips/kernel/binfmt_elfn32.c       2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/mips/kernel/binfmt_elfn32.c    2004-08-16 17:06:18.428137344 +0200
+@@ -50,6 +50,17 @@
+ #undef ELF_ET_DYN_BASE
+ #define ELF_ET_DYN_BASE         (TASK32_SIZE / 3 * 2)
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 0x00400000UL : 0x00400000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
++#endif
++
+ #include <asm/processor.h>
+ #include <linux/module.h>
+ #include <linux/config.h>
+diff -uNr linux-2.6.8/arch/mips/kernel/binfmt_elfo32.c linux-2.6.8.grsecurity/arch/mips/kernel/binfmt_elfo32.c
+--- linux-2.6.8/arch/mips/kernel/binfmt_elfo32.c       2004-08-14 07:36:45.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/mips/kernel/binfmt_elfo32.c    2004-08-16 17:06:18.445134760 +0200
+@@ -52,6 +52,17 @@
+ #undef ELF_ET_DYN_BASE
+ #define ELF_ET_DYN_BASE         (TASK32_SIZE / 3 * 2)
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 0x00400000UL : 0x00400000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
++#endif
++
+ #include <asm/processor.h>
+ #include <linux/module.h>
+ #include <linux/config.h>
+diff -uNr linux-2.6.8/arch/mips/kernel/syscall.c linux-2.6.8.grsecurity/arch/mips/kernel/syscall.c
+--- linux-2.6.8/arch/mips/kernel/syscall.c     2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/mips/kernel/syscall.c  2004-08-16 17:06:18.471130808 +0200
+@@ -86,6 +86,11 @@
+       do_color_align = 0;
+       if (filp || (flags & MAP_SHARED))
+               do_color_align = 1;
++
++#ifdef CONFIG_PAX_RANDMMAP
++      if (!(current->flags & PF_PAX_RANDMMAP) || !filp)
++#endif
++
+       if (addr) {
+               if (do_color_align)
+                       addr = COLOUR_ALIGN(addr, pgoff);
+@@ -96,6 +101,13 @@
+                   (!vmm || addr + len <= vmm->vm_start))
+                       return addr;
+       }
++
++#ifdef CONFIG_PAX_RANDMMAP
++      if ((current->flags & PF_PAX_RANDMMAP) && (!addr || filp))
++              addr = TASK_UNMAPPED_BASE + current->mm->delta_mmap;
++      else
++#endif
++
+       addr = TASK_UNMAPPED_BASE;
+       if (do_color_align)
+               addr = COLOUR_ALIGN(addr, pgoff);
+diff -uNr linux-2.6.8/arch/mips/mm/fault.c linux-2.6.8.grsecurity/arch/mips/mm/fault.c
+--- linux-2.6.8/arch/mips/mm/fault.c   2004-08-14 07:36:33.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/mips/mm/fault.c        2004-08-16 17:06:18.498126704 +0200
+@@ -27,6 +27,24 @@
+ #include <asm/uaccess.h>
+ #include <asm/ptrace.h>
++#ifdef CONFIG_PAX_PAGEEXEC
++void pax_report_insns(void *pc)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 5; i++) {
++              unsigned int c;
++              if (get_user(c, (unsigned int*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08x ", c);
++      }
++      printk("\n");
++}
++#endif
++
+ /*
+  * This routine handles page faults.  It determines the address,
+  * and the problem, and then passes it off to one of the appropriate
+diff -uNr linux-2.6.8/arch/parisc/kernel/ptrace.c linux-2.6.8.grsecurity/arch/parisc/kernel/ptrace.c
+--- linux-2.6.8/arch/parisc/kernel/ptrace.c    2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/parisc/kernel/ptrace.c 2004-08-16 17:06:18.531121688 +0200
+@@ -17,6 +17,7 @@
+ #include <linux/personality.h>
+ #include <linux/security.h>
+ #include <linux/compat.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+@@ -114,6 +115,9 @@
+       if (pid == 1)           /* no messing around with init! */
+               goto out_tsk;
++      if (gr_handle_ptrace(child, request))
++              goto out_tsk;
++
+       if (request == PTRACE_ATTACH) {
+               ret = ptrace_attach(child);
+               goto out_tsk;
+diff -uNr linux-2.6.8/arch/parisc/kernel/sys_parisc32.c linux-2.6.8.grsecurity/arch/parisc/kernel/sys_parisc32.c
+--- linux-2.6.8/arch/parisc/kernel/sys_parisc32.c      2004-08-14 07:36:45.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/parisc/kernel/sys_parisc32.c   2004-08-16 17:06:18.679099192 +0200
+@@ -48,6 +48,7 @@
+ #include <linux/ptrace.h>
+ #include <linux/swap.h>
+ #include <linux/syscalls.h>
++#include <linux/grsecurity.h>
+ #include <asm/types.h>
+ #include <asm/uaccess.h>
+diff -uNr linux-2.6.8/arch/parisc/kernel/sys_parisc.c linux-2.6.8.grsecurity/arch/parisc/kernel/sys_parisc.c
+--- linux-2.6.8/arch/parisc/kernel/sys_parisc.c        2004-08-14 07:37:40.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/parisc/kernel/sys_parisc.c     2004-08-16 17:06:18.547119256 +0200
+@@ -31,6 +31,7 @@
+ #include <linux/shm.h>
+ #include <linux/smp_lock.h>
+ #include <linux/syscalls.h>
++#include <linux/grsecurity.h>
+ int sys_pipe(int *fildes)
+ {
+@@ -104,6 +105,13 @@
+ {
+       if (len > TASK_SIZE)
+               return -ENOMEM;
++
++#ifdef CONFIG_PAX_RANDMMAP
++      if ((current->flags & PF_PAX_RANDMMAP) && (!addr || filp))
++              addr = TASK_UNMAPPED_BASE + current->mm->delta_mmap;
++      else
++#endif
++
+       if (!addr)
+               addr = TASK_UNMAPPED_BASE;
+@@ -123,12 +131,23 @@
+ {
+       struct file * file = NULL;
+       unsigned long error = -EBADF;
++
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(fd);
+               if (!file)
+                       goto out;
+       }
++      if (gr_handle_mmap(file, prot)) {
++              fput(file);
++              return -EACCES;
++      }
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       down_write(&current->mm->mmap_sem);
+diff -uNr linux-2.6.8/arch/parisc/kernel/traps.c linux-2.6.8.grsecurity/arch/parisc/kernel/traps.c
+--- linux-2.6.8/arch/parisc/kernel/traps.c     2004-08-14 07:38:10.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/parisc/kernel/traps.c  2004-08-16 17:06:18.697096456 +0200
+@@ -625,9 +625,7 @@
+                       down_read(&current->mm->mmap_sem);
+                       vma = find_vma(current->mm,regs->iaoq[0]);
+-                      if (vma && (regs->iaoq[0] >= vma->vm_start)
+-                              && (vma->vm_flags & VM_EXEC)) {
+-
++                      if (vma && (regs->iaoq[0] >= vma->vm_start)) {
+                               fault_address = regs->iaoq[0];
+                               fault_space = regs->iasq[0];
+diff -uNr linux-2.6.8/arch/parisc/mm/fault.c linux-2.6.8.grsecurity/arch/parisc/mm/fault.c
+--- linux-2.6.8/arch/parisc/mm/fault.c 2004-08-14 07:37:40.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/parisc/mm/fault.c      2004-08-16 17:06:18.704095392 +0200
+@@ -16,6 +16,8 @@
+ #include <linux/sched.h>
+ #include <linux/interrupt.h>
+ #include <linux/module.h>
++#include <linux/unistd.h>
++#include <linux/binfmts.h>
+ #include <asm/uaccess.h>
+ #include <asm/traps.h>
+@@ -54,7 +56,7 @@
+ static unsigned long
+ parisc_acctyp(unsigned long code, unsigned int inst)
+ {
+-      if (code == 6 || code == 16)
++      if (code == 6 || code == 7 || code == 16)
+           return VM_EXEC;
+       switch (inst & 0xf0000000) {
+@@ -140,6 +142,139 @@
+                       }
+ #endif
++#ifdef CONFIG_PAX_PAGEEXEC
++/*
++ * PaX: decide what to do with offenders (instruction_pointer(regs) = fault address)
++ *
++ * returns 1 when task should be killed
++ *         2 when rt_sigreturn trampoline was detected
++ *         3 when unpatched PLT trampoline was detected
++ *         4 when legitimate ET_EXEC was detected
++ */
++static int pax_handle_fetch_fault(struct pt_regs *regs)
++{
++
++#if defined(CONFIG_PAX_EMUPLT) || defined(CONFIG_PAX_EMUTRAMP)
++      int err;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++      if (current->flags & PF_PAX_RANDEXEC) {
++              if (instruction_pointer(regs) >= current->mm->start_code &&
++                  instruction_pointer(regs) < current->mm->end_code)
++              {
++#if 0
++                      /* PaX: this needs fixing */
++                      if ((regs->gr[2] & ~3UL) == instruction_pointer(regs))
++                              return 1;
++#endif
++                      regs->iaoq[0] += current->mm->delta_exec;
++                      if ((regs->iaoq[1] & ~3UL) >= current->mm->start_code &&
++                          (regs->iaoq[1] & ~3UL) < current->mm->end_code)
++                              regs->iaoq[1] += current->mm->delta_exec;
++                      return 4;
++              }
++      }
++#endif
++
++#ifdef CONFIG_PAX_EMUPLT
++      do { /* PaX: unpatched PLT emulation */
++              unsigned int bl, depwi;
++
++              err = get_user(bl, (unsigned int*)instruction_pointer(regs));
++              err |= get_user(depwi, (unsigned int*)(instruction_pointer(regs)+4));
++
++              if (err)
++                      break;
++
++              if (bl == 0xEA9F1FDDU && depwi == 0xD6801C1EU) {
++                      unsigned int ldw, bv, ldw2, addr = instruction_pointer(regs)-12;
++
++                      err = get_user(ldw, (unsigned int*)addr);
++                      err |= get_user(bv, (unsigned int*)(addr+4));
++                      err |= get_user(ldw2, (unsigned int*)(addr+8));
++
++                      if (err)
++                              break;
++
++                      if (ldw == 0x0E801096U &&
++                          bv == 0xEAC0C000U &&
++                          ldw2 == 0x0E881095U)
++                      {
++                              unsigned int resolver, map;
++
++                              err = get_user(resolver, (unsigned int*)(instruction_pointer(regs)+8));
++                              err |= get_user(map, (unsigned int*)(instruction_pointer(regs)+12));
++                              if (err)
++                                      break;
++
++                              regs->gr[20] = instruction_pointer(regs)+8;
++                              regs->gr[21] = map;
++                              regs->gr[22] = resolver;
++                              regs->iaoq[0] = resolver | 3UL;
++                              regs->iaoq[1] = regs->iaoq[0] + 4;
++                              return 3;
++                      }
++              }
++      } while (0);
++#endif
++
++#ifdef CONFIG_PAX_EMUTRAMP
++
++#ifndef CONFIG_PAX_EMUSIGRT
++      if (!(current->flags & PF_PAX_EMUTRAMP))
++              return 1;
++#endif
++
++      do { /* PaX: rt_sigreturn emulation */
++              unsigned int ldi1, ldi2, bel, nop;
++
++              err = get_user(ldi1, (unsigned int *)instruction_pointer(regs));
++              err |= get_user(ldi2, (unsigned int *)(instruction_pointer(regs)+4));
++              err |= get_user(bel, (unsigned int *)(instruction_pointer(regs)+8));
++              err |= get_user(nop, (unsigned int *)(instruction_pointer(regs)+12));
++
++              if (err)
++                      break;
++
++              if ((ldi1 == 0x34190000U || ldi1 == 0x34190002U) &&
++                  ldi2 == 0x3414015AU &&
++                  bel == 0xE4008200U &&
++                  nop == 0x08000240U)
++              {
++                      regs->gr[25] = (ldi1 & 2) >> 1;
++                      regs->gr[20] = __NR_rt_sigreturn;
++                      regs->gr[31] = regs->iaoq[1] + 16;
++                      regs->sr[0] = regs->iasq[1];
++                      regs->iaoq[0] = 0x100UL;
++                      regs->iaoq[1] = regs->iaoq[0] + 4;
++                      regs->iasq[0] = regs->sr[2];
++                      regs->iasq[1] = regs->sr[2];
++                      return 2;
++              }
++      } while (0);
++#endif
++
++      return 1;
++}
++
++void pax_report_insns(void *pc, void *sp)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 5; i++) {
++              unsigned int c;
++              if (get_user(c, (unsigned int*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08x ", c);
++      }
++      printk("\n");
++}
++#endif
++
+ void do_page_fault(struct pt_regs *regs, unsigned long code,
+                             unsigned long address)
+ {
+@@ -165,8 +300,38 @@
+       acc_type = parisc_acctyp(code,regs->iir);
+-      if ((vma->vm_flags & acc_type) != acc_type)
++      if ((vma->vm_flags & acc_type) != acc_type) {
++
++#ifdef CONFIG_PAX_PAGEEXEC
++              if ((current->flags & PF_PAX_PAGEEXEC) && (acc_type & VM_EXEC) &&
++                  (address & ~3UL) == instruction_pointer(regs))
++              {
++                      up_read(&mm->mmap_sem);
++                      switch(pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_RANDEXEC
++                      case 4:
++                              return;
++#endif
++
++#ifdef CONFIG_PAX_EMUPLT
++                      case 3:
++                              return;
++#endif
++
++#ifdef CONFIG_PAX_EMUTRAMP
++                      case 2:
++                              return;
++#endif
++
++                      }
++                      pax_report_fault(regs, (void*)instruction_pointer(regs), (void*)regs->gr[30]);
++                      do_exit(SIGKILL);
++              }
++#endif
++
+               goto bad_area;
++      }
+       /*
+        * If for any reason at all we couldn't handle the fault, make
+diff -uNr linux-2.6.8/arch/ppc/kernel/ptrace.c linux-2.6.8.grsecurity/arch/ppc/kernel/ptrace.c
+--- linux-2.6.8/arch/ppc/kernel/ptrace.c       2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ppc/kernel/ptrace.c    2004-08-16 17:06:18.736090528 +0200
+@@ -26,6 +26,7 @@
+ #include <linux/ptrace.h>
+ #include <linux/user.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/page.h>
+@@ -266,6 +267,9 @@
+       if (pid == 1)           /* you may not mess with init */
+               goto out_tsk;
++      if (gr_handle_ptrace(child, request))
++              goto out_tsk;
++
+       if (request == PTRACE_ATTACH) {
+               ret = ptrace_attach(child);
+               goto out_tsk;
+diff -uNr linux-2.6.8/arch/ppc/kernel/syscalls.c linux-2.6.8.grsecurity/arch/ppc/kernel/syscalls.c
+--- linux-2.6.8/arch/ppc/kernel/syscalls.c     2004-08-14 07:38:04.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ppc/kernel/syscalls.c  2004-08-16 17:06:18.789082472 +0200
+@@ -36,6 +36,7 @@
+ #include <linux/utsname.h>
+ #include <linux/file.h>
+ #include <linux/unistd.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/ipc.h>
+@@ -165,12 +166,23 @@
+       struct file * file = NULL;
+       int ret = -EBADF;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       if (!(flags & MAP_ANONYMOUS)) {
+               if (!(file = fget(fd)))
+                       goto out;
+       }
++      if (gr_handle_mmap(file, prot)) {
++              fput(file);
++              ret = -EACCES;
++              goto out;
++      }
++
+       down_write(&current->mm->mmap_sem);
+       ret = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+       up_write(&current->mm->mmap_sem);
+diff -uNr linux-2.6.8/arch/ppc/mm/fault.c linux-2.6.8.grsecurity/arch/ppc/mm/fault.c
+--- linux-2.6.8/arch/ppc/mm/fault.c    2004-08-14 07:36:44.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ppc/mm/fault.c 2004-08-16 17:23:13.778780584 +0200
+@@ -28,6 +28,11 @@
+ #include <linux/interrupt.h>
+ #include <linux/highmem.h>
+ #include <linux/module.h>
++#include <linux/slab.h>
++#include <linux/pagemap.h>
++#include <linux/compiler.h>
++#include <linux/binfmts.h>
++#include <linux/unistd.h>
+ #include <asm/page.h>
+ #include <asm/pgtable.h>
+@@ -51,6 +56,363 @@
+ unsigned long pte_errors;     /* updated by do_page_fault() */
+ unsigned int probingmem;
++#ifdef CONFIG_PAX_EMUSIGRT
++void pax_syscall_close(struct vm_area_struct * vma)
++{
++      vma->vm_mm->call_syscall = 0UL;
++}
++
++static struct page* pax_syscall_nopage(struct vm_area_struct *vma, unsigned long address, int *type)
++{
++      struct page* page;
++      unsigned int *kaddr;
++
++      page = alloc_page(GFP_HIGHUSER);
++      if (!page)
++              return NOPAGE_OOM;
++
++      kaddr = kmap(page);
++      memset(kaddr, 0, PAGE_SIZE);
++      kaddr[0] = 0x44000002U; /* sc */
++      __flush_dcache_icache(kaddr);
++      kunmap(page);
++      if (type)
++              *type = VM_FAULT_MAJOR;
++      return page;
++}
++
++static struct vm_operations_struct pax_vm_ops = {
++      close:          pax_syscall_close,
++      nopage:         pax_syscall_nopage,
++};
++
++static void pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
++{
++      memset(vma, 0, sizeof(*vma));
++      vma->vm_mm = current->mm;
++      vma->vm_start = addr;
++      vma->vm_end = addr + PAGE_SIZE;
++      vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYEXEC;
++      vma->vm_page_prot = protection_map[vma->vm_flags & 0x0f];
++      vma->vm_ops = &pax_vm_ops;
++      insert_vm_struct(current->mm, vma);
++      ++current->mm->total_vm;
++}
++#endif
++
++#ifdef CONFIG_PAX_PAGEEXEC
++/*
++ * PaX: decide what to do with offenders (regs->nip = fault address)
++ *
++ * returns 1 when task should be killed
++ *         2 when patched GOT trampoline was detected
++ *         3 when patched PLT trampoline was detected
++ *         4 when unpatched PLT trampoline was detected
++ *         5 when legitimate ET_EXEC was detected
++ *         6 when sigreturn trampoline was detected
++ *         7 when rt_sigreturn trampoline was detected
++ */
++static int pax_handle_fetch_fault(struct pt_regs *regs)
++{
++
++#if defined(CONFIG_PAX_EMUPLT) || defined(CONFIG_PAX_EMUSIGRT)
++      int err;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++      if (current->flags & PF_PAX_RANDEXEC) {
++              if (regs->nip >= current->mm->start_code &&
++                  regs->nip < current->mm->end_code)
++              {
++                      if (regs->link == regs->nip)
++                              return 1;
++
++                      regs->nip += current->mm->delta_exec;
++                      return 5;
++              }
++      }
++#endif
++
++#ifdef CONFIG_PAX_EMUPLT
++      do { /* PaX: patched GOT emulation */
++              unsigned int blrl;
++
++              err = get_user(blrl, (unsigned int*)regs->nip);
++
++              if (!err && blrl == 0x4E800021U) {
++                      unsigned long temp = regs->nip;
++
++                      regs->nip = regs->link & 0xFFFFFFFCUL;
++                      regs->link = temp + 4UL;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: patched PLT emulation #1 */
++              unsigned int b;
++
++              err = get_user(b, (unsigned int *)regs->nip);
++
++              if (!err && (b & 0xFC000003U) == 0x48000000U) {
++                      regs->nip += (((b | 0xFC000000UL) ^ 0x02000000UL) + 0x02000000UL);
++                      return 3;
++              }
++      } while (0);
++
++      do { /* PaX: unpatched PLT emulation #1 */
++              unsigned int li, b;
++
++              err = get_user(li, (unsigned int *)regs->nip);
++              err |= get_user(b, (unsigned int *)(regs->nip+4));
++
++              if (!err && (li & 0xFFFF0000U) == 0x39600000U && (b & 0xFC000003U) == 0x48000000U) {
++                      unsigned int rlwinm, add, li2, addis2, mtctr, li3, addis3, bctr;
++                      unsigned long addr = b | 0xFC000000UL;
++
++                      addr = regs->nip + 4 + ((addr ^ 0x02000000UL) + 0x02000000UL);
++                      err = get_user(rlwinm, (unsigned int*)addr);
++                      err |= get_user(add, (unsigned int*)(addr+4));
++                      err |= get_user(li2, (unsigned int*)(addr+8));
++                      err |= get_user(addis2, (unsigned int*)(addr+12));
++                      err |= get_user(mtctr, (unsigned int*)(addr+16));
++                      err |= get_user(li3, (unsigned int*)(addr+20));
++                      err |= get_user(addis3, (unsigned int*)(addr+24));
++                      err |= get_user(bctr, (unsigned int*)(addr+28));
++
++                      if (err)
++                              break;
++
++                      if (rlwinm == 0x556C083CU &&
++                          add == 0x7D6C5A14U &&
++                          (li2 & 0xFFFF0000U) == 0x39800000U &&
++                          (addis2 & 0xFFFF0000U) == 0x3D8C0000U &&
++                          mtctr == 0x7D8903A6U &&
++                          (li3 & 0xFFFF0000U) == 0x39800000U &&
++                          (addis3 & 0xFFFF0000U) == 0x3D8C0000U &&
++                          bctr == 0x4E800420U)
++                      {
++                              regs->gpr[PT_R11] = 3 * (((li | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
++                              regs->gpr[PT_R12] = (((li3 | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
++                              regs->gpr[PT_R12] += (addis3 & 0xFFFFU) << 16;
++                              regs->ctr = (((li2 | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
++                              regs->ctr += (addis2 & 0xFFFFU) << 16;
++                              regs->nip = regs->ctr;
++                              return 4;
++                      }
++              }
++      } while (0);
++
++#if 0
++      do { /* PaX: unpatched PLT emulation #2 */
++              unsigned int lis, lwzu, b, bctr;
++
++              err = get_user(lis, (unsigned int *)regs->nip);
++              err |= get_user(lwzu, (unsigned int *)(regs->nip+4));
++              err |= get_user(b, (unsigned int *)(regs->nip+8));
++              err |= get_user(bctr, (unsigned int *)(regs->nip+12));
++
++              if (err)
++                      break;
++
++              if ((lis & 0xFFFF0000U) == 0x39600000U &&
++                  (lwzu & 0xU) == 0xU &&
++                  (b & 0xFC000003U) == 0x48000000U &&
++                  bctr == 0x4E800420U)
++              {
++                      unsigned int addis, addi, rlwinm, add, li2, addis2, mtctr, li3, addis3, bctr;
++                      unsigned long addr = b | 0xFC000000UL;
++
++                      addr = regs->nip + 12 + ((addr ^ 0x02000000UL) + 0x02000000UL);
++                      err = get_user(addis, (unsigned int*)addr);
++                      err |= get_user(addi, (unsigned int*)(addr+4));
++                      err |= get_user(rlwinm, (unsigned int*)(addr+8));
++                      err |= get_user(add, (unsigned int*)(addr+12));
++                      err |= get_user(li2, (unsigned int*)(addr+16));
++                      err |= get_user(addis2, (unsigned int*)(addr+20));
++                      err |= get_user(mtctr, (unsigned int*)(addr+24));
++                      err |= get_user(li3, (unsigned int*)(addr+28));
++                      err |= get_user(addis3, (unsigned int*)(addr+32));
++                      err |= get_user(bctr, (unsigned int*)(addr+36));
++
++                      if (err)
++                              break;
++
++                      if ((addis & 0xFFFF0000U) == 0x3D6B0000U &&
++                          (addi & 0xFFFF0000U) == 0x396B0000U &&
++                          rlwinm == 0x556C083CU &&
++                          add == 0x7D6C5A14U &&
++                          (li2 & 0xFFFF0000U) == 0x39800000U &&
++                          (addis2 & 0xFFFF0000U) == 0x3D8C0000U &&
++                          mtctr == 0x7D8903A6U &&
++                          (li3 & 0xFFFF0000U) == 0x39800000U &&
++                          (addis3 & 0xFFFF0000U) == 0x3D8C0000U &&
++                          bctr == 0x4E800420U)
++                      {
++                              regs->gpr[PT_R11] = 
++                              regs->gpr[PT_R11] = 3 * (((li | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
++                              regs->gpr[PT_R12] = (((li3 | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
++                              regs->gpr[PT_R12] += (addis3 & 0xFFFFU) << 16;
++                              regs->ctr = (((li2 | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
++                              regs->ctr += (addis2 & 0xFFFFU) << 16;
++                              regs->nip = regs->ctr;
++                              return 4;
++                      }
++              }
++      } while (0);
++#endif
++
++      do { /* PaX: unpatched PLT emulation #3 */
++              unsigned int li, b;
++
++              err = get_user(li, (unsigned int *)regs->nip);
++              err |= get_user(b, (unsigned int *)(regs->nip+4));
++
++              if (!err && (li & 0xFFFF0000U) == 0x39600000U && (b & 0xFC000003U) == 0x48000000U) {
++                      unsigned int addis, lwz, mtctr, bctr;
++                      unsigned long addr = b | 0xFC000000UL;
++
++                      addr = regs->nip + 4 + ((addr ^ 0x02000000UL) + 0x02000000UL);
++                      err = get_user(addis, (unsigned int*)addr);
++                      err |= get_user(lwz, (unsigned int*)(addr+4));
++                      err |= get_user(mtctr, (unsigned int*)(addr+8));
++                      err |= get_user(bctr, (unsigned int*)(addr+12));
++
++                      if (err)
++                              break;
++
++                      if ((addis & 0xFFFF0000U) == 0x3D6B0000U &&
++                          (lwz & 0xFFFF0000U) == 0x816B0000U &&
++                          mtctr == 0x7D6903A6U &&
++                          bctr == 0x4E800420U)
++                      {
++                              unsigned int r11;
++
++                              addr = (addis << 16) + (((li | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
++                              addr += (((lwz | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
++
++                              err = get_user(r11, (unsigned int*)addr);
++                              if (err)
++                                      break;
++
++                              regs->gpr[PT_R11] = r11;
++                              regs->ctr = r11;
++                              regs->nip = r11;
++                              return 4;
++                      }
++              }
++      } while (0);
++#endif
++
++#ifdef CONFIG_PAX_EMUSIGRT
++      do { /* PaX: sigreturn emulation */
++              unsigned int li, sc;
++
++              err = get_user(li, (unsigned int *)regs->nip);
++              err |= get_user(sc, (unsigned int *)(regs->nip+4));
++
++              if (!err && li == 0x38000000U + __NR_sigreturn && sc == 0x44000002U) {
++                      struct vm_area_struct *vma;
++                      unsigned long call_syscall;
++
++                      down_read(&current->mm->mmap_sem);
++                      call_syscall = current->mm->call_syscall;
++                      up_read(&current->mm->mmap_sem);
++                      if (likely(call_syscall))
++                              goto emulate;
++
++                      vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
++
++                      down_write(&current->mm->mmap_sem);
++                      if (current->mm->call_syscall) {
++                              call_syscall = current->mm->call_syscall;
++                              up_write(&current->mm->mmap_sem);
++                              if (vma) kmem_cache_free(vm_area_cachep, vma);
++                              goto emulate;
++                      }
++
++                      call_syscall = get_unmapped_area(NULL, 0UL, PAGE_SIZE, 0UL, MAP_PRIVATE);
++                      if (!vma || (call_syscall & ~PAGE_MASK)) {
++                              up_write(&current->mm->mmap_sem);
++                              if (vma) kmem_cache_free(vm_area_cachep, vma);
++                              return 1;
++                      }
++
++                      pax_insert_vma(vma, call_syscall);
++                      current->mm->call_syscall = call_syscall;
++                      up_write(&current->mm->mmap_sem);
++
++emulate:
++                      regs->gpr[PT_R0] = __NR_sigreturn;
++                      regs->nip = call_syscall;
++                      return 6;
++              }
++      } while (0);
++
++      do { /* PaX: rt_sigreturn emulation */
++              unsigned int li, sc;
++
++              err = get_user(li, (unsigned int *)regs->nip);
++              err |= get_user(sc, (unsigned int *)(regs->nip+4));
++
++              if (!err && li == 0x38000000U + __NR_rt_sigreturn && sc == 0x44000002U) {
++                      struct vm_area_struct *vma;
++                      unsigned int call_syscall;
++
++                      down_read(&current->mm->mmap_sem);
++                      call_syscall = current->mm->call_syscall;
++                      up_read(&current->mm->mmap_sem);
++                      if (likely(call_syscall))
++                              goto rt_emulate;
++
++                      vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
++
++                      down_write(&current->mm->mmap_sem);
++                      if (current->mm->call_syscall) {
++                              call_syscall = current->mm->call_syscall;
++                              up_write(&current->mm->mmap_sem);
++                              if (vma) kmem_cache_free(vm_area_cachep, vma);
++                              goto rt_emulate;
++                      }
++
++                      call_syscall = get_unmapped_area(NULL, 0UL, PAGE_SIZE, 0UL, MAP_PRIVATE);
++                      if (!vma || (call_syscall & ~PAGE_MASK)) {
++                              up_write(&current->mm->mmap_sem);
++                              if (vma) kmem_cache_free(vm_area_cachep, vma);
++                              return 1;
++                      }
++
++                      pax_insert_vma(vma, call_syscall);
++                      current->mm->call_syscall = call_syscall;
++                      up_write(&current->mm->mmap_sem);
++
++rt_emulate:
++                      regs->gpr[PT_R0] = __NR_rt_sigreturn;
++                      regs->nip = call_syscall;
++                      return 7;
++              }
++      } while (0);
++#endif
++
++      return 1;
++}
++
++void pax_report_insns(void *pc, void *sp)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 5; i++) {
++              unsigned int c;
++              if (get_user(c, (unsigned int*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08x ", c);
++      }
++      printk("\n");
++}
++#endif
++
+ /*
+  * Check whether the instruction at regs->nip is a store using
+  * an update addressing form which will update r1.
+@@ -111,7 +473,7 @@
+        * indicate errors in DSISR but can validly be set in SRR1.
+        */
+       if (TRAP(regs) == 0x400)
+-              error_code &= 0x48200000;
++              error_code &= 0x58200000;
+       else
+               is_write = error_code & 0x02000000;
+ #endif /* CONFIG_4xx || CONFIG_BOOKE */
+@@ -205,14 +567,14 @@
+       } else if (TRAP(regs) == 0x400) {
+               pte_t *ptep;
+-#if 0
++#if 1
+               /* It would be nice to actually enforce the VM execute
+                  permission on CPUs which can do so, but far too
+                  much stuff in userspace doesn't get the permissions
+                  right, so we let any page be executed for now. */
+               if (! (vma->vm_flags & VM_EXEC))
+                       goto bad_area;
+-#endif
++#else
+               /* Since 4xx/Book-E supports per-page execute permission,
+                * we lazily flush dcache to icache. */
+@@ -233,6 +595,7 @@
+               if (ptep != NULL)
+                       pte_unmap(ptep);
+ #endif
++#endif
+       /* a read */
+       } else {
+               /* protection fault */
+@@ -278,6 +641,38 @@
+       /* User mode accesses cause a SIGSEGV */
+       if (user_mode(regs)) {
++
++#ifdef CONFIG_PAX_PAGEEXEC
++              if (current->flags & PF_PAX_PAGEEXEC) {
++                      if ((TRAP(regs) == 0x400) && (regs->nip == address)) {
++                              switch (pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_EMUPLT
++                              case 2:
++                              case 3:
++                              case 4:
++                                      return 0;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++                              case 5:
++                                      return 0;
++#endif
++
++#ifdef CONFIG_PAX_EMUSIGRT
++                              case 6:
++                              case 7:
++                                      return 0;
++#endif
++
++                              }
++
++                              pax_report_fault(regs, (void*)regs->nip, (void*)regs->gpr[1]);
++                              do_exit(SIGKILL);
++                      }
++              }
++#endif
++
+               info.si_signo = SIGSEGV;
+               info.si_errno = 0;
+               info.si_code = code;
+diff -uNr linux-2.6.8/arch/ppc64/kernel/syscalls.c linux-2.6.8.grsecurity/arch/ppc64/kernel/syscalls.c
+--- linux-2.6.8/arch/ppc64/kernel/syscalls.c   2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ppc64/kernel/syscalls.c        2004-08-16 17:06:18.852072896 +0200
+@@ -177,6 +177,11 @@
+       struct file * file = NULL;
+       unsigned long ret = -EBADF;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       if (!(flags & MAP_ANONYMOUS)) {
+               if (!(file = fget(fd)))
+                       goto out;
+diff -uNr linux-2.6.8/arch/ppc64/mm/fault.c linux-2.6.8.grsecurity/arch/ppc64/mm/fault.c
+--- linux-2.6.8/arch/ppc64/mm/fault.c  2004-08-14 07:37:37.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/ppc64/mm/fault.c       2004-08-16 17:06:18.876069248 +0200
+@@ -29,6 +29,7 @@
+ #include <linux/interrupt.h>
+ #include <linux/smp_lock.h>
+ #include <linux/module.h>
++#include <linux/binfmts.h>
+ #include <asm/page.h>
+ #include <asm/pgtable.h>
+@@ -75,6 +76,54 @@
+       return 0;
+ }
++#ifdef CONFIG_PAX_PAGEEXEC
++/*
++ * PaX: decide what to do with offenders (regs->nip = fault address)
++ *
++ * returns 1 when task should be killed
++ *         2 when legitimate ET_EXEC was detected
++ */
++static int pax_handle_fetch_fault(struct pt_regs *regs)
++{
++
++#if defined(CONFIG_PAX_EMUPLT) || defined(CONFIG_PAX_EMUSIGRT)
++      int err;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++      if (current->flags & PF_PAX_RANDEXEC) {
++              if (regs->nip >= current->mm->start_code &&
++                  regs->nip < current->mm->end_code)
++              {
++                      if (regs->link == regs->nip)
++                              return 1;
++
++                      regs->nip += current->mm->delta_exec;
++                      return 2;
++              }
++      }
++#endif
++
++      return 1;
++}
++
++void pax_report_insns(void *pc, void *sp)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 5; i++) {
++              unsigned int c;
++              if (get_user(c, (unsigned int*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08x ", c);
++      }
++      printk("\n");
++}
++#endif
++
+ /*
+  * The error_code parameter is
+  *  - DSISR for a non-SLB data access fault,
+@@ -235,6 +284,25 @@
+ bad_area_nosemaphore:
+       /* User mode accesses cause a SIGSEGV */
+       if (user_mode(regs)) {
++
++#ifdef CONFIG_PAX_PAGEEXEC
++              if (current->flags & PF_PAX_PAGEEXEC) {
++                      if ((regs->trap == 0x400) && (regs->nip == address)) {
++                              switch (pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_RANDEXEC
++                              case 2:
++                                      return;
++#endif
++
++                              }
++
++                              pax_report_fault(regs, (void*)regs->nip, (void*)regs->gpr[1]);
++                              do_exit(SIGKILL);
++                      }
++              }
++#endif
++
+               info.si_signo = SIGSEGV;
+               info.si_errno = 0;
+               info.si_code = code;
+diff -uNr linux-2.6.8/arch/sparc/kernel/ptrace.c linux-2.6.8.grsecurity/arch/sparc/kernel/ptrace.c
+--- linux-2.6.8/arch/sparc/kernel/ptrace.c     2004-08-14 07:38:09.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc/kernel/ptrace.c  2004-08-16 17:06:18.905064840 +0200
+@@ -18,6 +18,7 @@
+ #include <linux/smp.h>
+ #include <linux/smp_lock.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
+ #include <asm/pgtable.h>
+ #include <asm/system.h>
+@@ -322,6 +323,11 @@
+               goto out;
+       }
++      if (gr_handle_ptrace(child, request)) {
++              pt_error_return(regs, EPERM);
++              goto out_tsk;
++      }
++
+       if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH)
+           || (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) {
+               if (ptrace_attach(child)) {
+diff -uNr linux-2.6.8/arch/sparc/kernel/sys_sparc.c linux-2.6.8.grsecurity/arch/sparc/kernel/sys_sparc.c
+--- linux-2.6.8/arch/sparc/kernel/sys_sparc.c  2004-08-14 07:36:46.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc/kernel/sys_sparc.c       2004-08-16 17:06:18.931060888 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/utsname.h>
+ #include <linux/smp.h>
+ #include <linux/smp_lock.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/ipc.h>
+@@ -55,6 +56,13 @@
+               return -ENOMEM;
+       if (ARCH_SUN4C_SUN4 && len > 0x20000000)
+               return -ENOMEM;
++
++#ifdef CONFIG_PAX_RANDMMAP
++      if ((current->flags & PF_PAX_RANDMMAP) && (!addr || filp))
++              addr = TASK_UNMAPPED_BASE + current->mm->delta_mmap;
++      else
++#endif
++
+       if (!addr)
+               addr = TASK_UNMAPPED_BASE;
+@@ -228,6 +236,11 @@
+       struct file * file = NULL;
+       unsigned long retval = -EBADF;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(fd);
+               if (!file)
+@@ -246,6 +259,12 @@
+       if (len > TASK_SIZE - PAGE_SIZE || addr + len > TASK_SIZE - PAGE_SIZE)
+               goto out_putf;
++      if (gr_handle_mmap(file, prot)) {
++              fput(file);
++              retval = -EACCES;
++              goto out;
++      }
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       down_write(&current->mm->mmap_sem);
+diff -uNr linux-2.6.8/arch/sparc/kernel/sys_sunos.c linux-2.6.8.grsecurity/arch/sparc/kernel/sys_sunos.c
+--- linux-2.6.8/arch/sparc/kernel/sys_sunos.c  2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc/kernel/sys_sunos.c       2004-08-16 17:06:18.935060280 +0200
+@@ -71,6 +71,11 @@
+       struct file * file = NULL;
+       unsigned long retval, ret_type;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       if (flags & MAP_NORESERVE) {
+               static int cnt;
+               if (cnt++ < 10)
+diff -uNr linux-2.6.8/arch/sparc/mm/fault.c linux-2.6.8.grsecurity/arch/sparc/mm/fault.c
+--- linux-2.6.8/arch/sparc/mm/fault.c  2004-08-14 07:38:11.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc/mm/fault.c       2004-08-16 17:06:18.973054504 +0200
+@@ -21,6 +21,10 @@
+ #include <linux/smp_lock.h>
+ #include <linux/interrupt.h>
+ #include <linux/module.h>
++#include <linux/slab.h>
++#include <linux/pagemap.h>
++#include <linux/compiler.h>
++#include <linux/binfmts.h>
+ #include <asm/system.h>
+ #include <asm/segment.h>
+@@ -220,6 +224,269 @@
+       return safe_compute_effective_address(regs, insn);
+ }
++#ifdef CONFIG_PAX_PAGEEXEC
++void pax_emuplt_close(struct vm_area_struct * vma)
++{
++      vma->vm_mm->call_dl_resolve = 0UL;
++}
++
++static struct page* pax_emuplt_nopage(struct vm_area_struct *vma, unsigned long address, int *type)
++{
++      struct page* page;
++      unsigned int *kaddr;
++
++      page = alloc_page(GFP_HIGHUSER);
++      if (!page)
++              return NOPAGE_OOM;
++
++      kaddr = kmap(page);
++      memset(kaddr, 0, PAGE_SIZE);
++      kaddr[0] = 0x9DE3BFA8U; /* save */
++      flush_dcache_page(page);
++      kunmap(page);
++      if (type)
++              *type = VM_FAULT_MAJOR;
++
++      return page;
++}
++
++static struct vm_operations_struct pax_vm_ops = {
++      close:          pax_emuplt_close,
++      nopage:         pax_emuplt_nopage,
++};
++
++static void pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
++{
++      memset(vma, 0, sizeof(*vma));
++      vma->vm_mm = current->mm;
++      vma->vm_start = addr;
++      vma->vm_end = addr + PAGE_SIZE;
++      vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYEXEC;
++      vma->vm_page_prot = protection_map[vma->vm_flags & 0x0f];
++      vma->vm_ops = &pax_vm_ops;
++      insert_vm_struct(current->mm, vma);
++      ++current->mm->total_vm;
++}
++
++/*
++ * PaX: decide what to do with offenders (regs->pc = fault address)
++ *
++ * returns 1 when task should be killed
++ *         2 when patched PLT trampoline was detected
++ *         3 when unpatched PLT trampoline was detected
++ *         4 when legitimate ET_EXEC was detected
++ */
++static int pax_handle_fetch_fault(struct pt_regs *regs)
++{
++
++#ifdef CONFIG_PAX_EMUPLT
++      int err;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++      if (current->flags & PF_PAX_RANDEXEC) {
++              if (regs->pc >= current->mm->start_code &&
++                  regs->pc < current->mm->end_code)
++              {
++                      if (regs->u_regs[UREG_RETPC] + 8UL == regs->pc)
++                              return 1;
++
++                      regs->pc += current->mm->delta_exec;
++                      if (regs->npc >= current->mm->start_code &&
++                          regs->npc < current->mm->end_code)
++                              regs->npc += current->mm->delta_exec;
++                      return 4;
++              }
++              if (regs->pc >= current->mm->start_code + current->mm->delta_exec &&
++                  regs->pc < current->mm->end_code + current->mm->delta_exec)
++              {
++                      regs->pc -= current->mm->delta_exec;
++                      if (regs->npc >= current->mm->start_code + current->mm->delta_exec &&
++                          regs->npc < current->mm->end_code + current->mm->delta_exec)
++                              regs->npc -= current->mm->delta_exec;
++              }
++      }
++#endif
++
++#ifdef CONFIG_PAX_EMUPLT
++      do { /* PaX: patched PLT emulation #1 */
++              unsigned int sethi1, sethi2, jmpl;
++
++              err = get_user(sethi1, (unsigned int*)regs->pc);
++              err |= get_user(sethi2, (unsigned int*)(regs->pc+4));
++              err |= get_user(jmpl, (unsigned int*)(regs->pc+8));
++
++              if (err)
++                      break;
++
++              if ((sethi1 & 0xFFC00000U) == 0x03000000U &&
++                  (sethi2 & 0xFFC00000U) == 0x03000000U &&
++                  (jmpl & 0xFFFFE000U) == 0x81C06000U)
++              {
++                      unsigned int addr;
++
++                      regs->u_regs[UREG_G1] = (sethi2 & 0x003FFFFFU) << 10;
++                      addr = regs->u_regs[UREG_G1];
++                      addr += (((jmpl | 0xFFFFE000U) ^ 0x00001000U) + 0x00001000U);
++                      regs->pc = addr;
++                      regs->npc = addr+4;
++                      return 2;
++              }
++      } while (0);
++
++      { /* PaX: patched PLT emulation #2 */
++              unsigned int ba;
++
++              err = get_user(ba, (unsigned int*)regs->pc);
++
++              if (!err && (ba & 0xFFC00000U) == 0x30800000U) {
++                      unsigned int addr;
++
++                      addr = regs->pc + 4 + (((ba | 0xFFC00000U) ^ 0x00200000U) + 0x00200000U);
++                      regs->pc = addr;
++                      regs->npc = addr+4;
++                      return 2;
++              }
++      }
++
++      do { /* PaX: patched PLT emulation #3 */
++              unsigned int sethi, jmpl, nop;
++
++              err = get_user(sethi, (unsigned int*)regs->pc);
++              err |= get_user(jmpl, (unsigned int*)(regs->pc+4));
++              err |= get_user(nop, (unsigned int*)(regs->pc+8));
++
++              if (err)
++                      break;
++
++              if ((sethi & 0xFFC00000U) == 0x03000000U &&
++                  (jmpl & 0xFFFFE000U) == 0x81C06000U &&
++                  nop == 0x01000000U)
++              {
++                      unsigned int addr;
++
++                      addr = (sethi & 0x003FFFFFU) << 10;
++                      regs->u_regs[UREG_G1] = addr;
++                      addr += (((jmpl | 0xFFFFE000U) ^ 0x00001000U) + 0x00001000U);
++                      regs->pc = addr;
++                      regs->npc = addr+4;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: unpatched PLT emulation step 1 */
++              unsigned int sethi, ba, nop;
++
++              err = get_user(sethi, (unsigned int*)regs->pc);
++              err |= get_user(ba, (unsigned int*)(regs->pc+4));
++              err |= get_user(nop, (unsigned int*)(regs->pc+8));
++
++              if (err)
++                      break;
++
++              if ((sethi & 0xFFC00000U) == 0x03000000U &&
++                  ((ba & 0xFFC00000U) == 0x30800000U || (ba & 0xFFF80000U) == 0x30680000U) &&
++                  nop == 0x01000000U)
++              {
++                      unsigned int addr, save, call;
++
++                      if ((ba & 0xFFC00000U) == 0x30800000U)
++                              addr = regs->pc + 4 + ((((ba | 0xFFC00000U) ^ 0x00200000U) + 0x00200000U) << 2);
++                      else
++                              addr = regs->pc + 4 + ((((ba | 0xFFF80000U) ^ 0x00040000U) + 0x00040000U) << 2);
++
++                      err = get_user(save, (unsigned int*)addr);
++                      err |= get_user(call, (unsigned int*)(addr+4));
++                      err |= get_user(nop, (unsigned int*)(addr+8));
++                      if (err)
++                              break;
++
++                      if (save == 0x9DE3BFA8U &&
++                          (call & 0xC0000000U) == 0x40000000U &&
++                          nop == 0x01000000U)
++                      {
++                              struct vm_area_struct *vma;
++                              unsigned long call_dl_resolve;
++
++                              down_read(&current->mm->mmap_sem);
++                              call_dl_resolve = current->mm->call_dl_resolve;
++                              up_read(&current->mm->mmap_sem);
++                              if (likely(call_dl_resolve))
++                                      goto emulate;
++
++                              vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
++
++                              down_write(&current->mm->mmap_sem);
++                              if (current->mm->call_dl_resolve) {
++                                      call_dl_resolve = current->mm->call_dl_resolve;
++                                      up_write(&current->mm->mmap_sem);
++                                      if (vma) kmem_cache_free(vm_area_cachep, vma);
++                                      goto emulate;
++                              }
++
++                              call_dl_resolve = get_unmapped_area(NULL, 0UL, PAGE_SIZE, 0UL, MAP_PRIVATE);
++                              if (!vma || (call_dl_resolve & ~PAGE_MASK)) {
++                                      up_write(&current->mm->mmap_sem);
++                                      if (vma) kmem_cache_free(vm_area_cachep, vma);
++                                      return 1;
++                              }
++
++                              pax_insert_vma(vma, call_dl_resolve);
++                              current->mm->call_dl_resolve = call_dl_resolve;
++                              up_write(&current->mm->mmap_sem);
++
++emulate:
++                              regs->u_regs[UREG_G1] = (sethi & 0x003FFFFFU) << 10;
++                              regs->pc = call_dl_resolve;
++                              regs->npc = addr+4;
++                              return 3;
++                      }
++              }
++      } while (0);
++
++      do { /* PaX: unpatched PLT emulation step 2 */
++              unsigned int save, call, nop;
++
++              err = get_user(save, (unsigned int*)(regs->pc-4));
++              err |= get_user(call, (unsigned int*)regs->pc);
++              err |= get_user(nop, (unsigned int*)(regs->pc+4));
++              if (err)
++                      break;
++
++              if (save == 0x9DE3BFA8U &&
++                  (call & 0xC0000000U) == 0x40000000U &&
++                  nop == 0x01000000U)
++              {
++                      unsigned int dl_resolve = regs->pc + ((((call | 0xC0000000U) ^ 0x20000000U) + 0x20000000U) << 2);
++
++                      regs->u_regs[UREG_RETPC] = regs->pc;
++                      regs->pc = dl_resolve;
++                      regs->npc = dl_resolve+4;
++                      return 3;
++              }
++      } while (0);
++#endif
++
++      return 1;
++}
++
++void pax_report_insns(void *pc, void *sp)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 5; i++) {
++              unsigned int c;
++              if (get_user(c, (unsigned int*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08x ", c);
++      }
++      printk("\n");
++}
++#endif
++
+ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
+                              unsigned long address)
+ {
+@@ -283,6 +550,29 @@
+               if(!(vma->vm_flags & VM_WRITE))
+                       goto bad_area;
+       } else {
++
++#ifdef CONFIG_PAX_PAGEEXEC
++              if ((current->flags & PF_PAX_PAGEEXEC) && text_fault && !(vma->vm_flags & VM_EXEC)) {
++                      up_read(&mm->mmap_sem);
++                      switch (pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_EMUPLT
++                      case 2:
++                      case 3:
++                              return;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++                      case 4:
++                              return;
++#endif
++
++                      }
++                      pax_report_fault(regs, (void*)regs->pc, (void*)regs->u_regs[UREG_FP]);
++                      do_exit(SIGKILL);
++              }
++#endif
++
+               /* Allow reads even for write-only mappings */
+               if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
+                       goto bad_area;
+diff -uNr linux-2.6.8/arch/sparc/mm/init.c linux-2.6.8.grsecurity/arch/sparc/mm/init.c
+--- linux-2.6.8/arch/sparc/mm/init.c   2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc/mm/init.c        2004-08-16 17:06:18.982053136 +0200
+@@ -337,17 +337,17 @@
+       /* Initialize the protection map with non-constant, MMU dependent values. */
+       protection_map[0] = PAGE_NONE;
+-      protection_map[1] = PAGE_READONLY;
+-      protection_map[2] = PAGE_COPY;
+-      protection_map[3] = PAGE_COPY;
++      protection_map[1] = PAGE_READONLY_NOEXEC;
++      protection_map[2] = PAGE_COPY_NOEXEC;
++      protection_map[3] = PAGE_COPY_NOEXEC;
+       protection_map[4] = PAGE_READONLY;
+       protection_map[5] = PAGE_READONLY;
+       protection_map[6] = PAGE_COPY;
+       protection_map[7] = PAGE_COPY;
+       protection_map[8] = PAGE_NONE;
+-      protection_map[9] = PAGE_READONLY;
+-      protection_map[10] = PAGE_SHARED;
+-      protection_map[11] = PAGE_SHARED;
++      protection_map[9] = PAGE_READONLY_NOEXEC;
++      protection_map[10] = PAGE_SHARED_NOEXEC;
++      protection_map[11] = PAGE_SHARED_NOEXEC;
+       protection_map[12] = PAGE_READONLY;
+       protection_map[13] = PAGE_READONLY;
+       protection_map[14] = PAGE_SHARED;
+diff -uNr linux-2.6.8/arch/sparc/mm/srmmu.c linux-2.6.8.grsecurity/arch/sparc/mm/srmmu.c
+--- linux-2.6.8/arch/sparc/mm/srmmu.c  2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc/mm/srmmu.c       2004-08-16 17:06:18.991051768 +0200
+@@ -2145,6 +2145,13 @@
+       BTFIXUPSET_INT(page_shared, pgprot_val(SRMMU_PAGE_SHARED));
+       BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY));
+       BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY));
++
++#ifdef CONFIG_PAX_PAGEEXEC
++      BTFIXUPSET_INT(page_shared_noexec, pgprot_val(SRMMU_PAGE_SHARED_NOEXEC));
++      BTFIXUPSET_INT(page_copy_noexec, pgprot_val(SRMMU_PAGE_COPY_NOEXEC));
++      BTFIXUPSET_INT(page_readonly_noexec, pgprot_val(SRMMU_PAGE_RDONLY_NOEXEC));
++#endif
++
+       BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
+       page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
+       pg_iobits = SRMMU_VALID | SRMMU_WRITE | SRMMU_REF;
+diff -uNr linux-2.6.8/arch/sparc64/kernel/itlb_base.S linux-2.6.8.grsecurity/arch/sparc64/kernel/itlb_base.S
+--- linux-2.6.8/arch/sparc64/kernel/itlb_base.S        2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc64/kernel/itlb_base.S     2004-08-16 17:06:19.045043560 +0200
+@@ -74,8 +74,6 @@
+ /* ITLB ** ICACHE line 4: Unused...   */
+       nop
+       nop
+-      nop
+-      nop
+       CREATE_VPTE_NOP
+ #undef CREATE_VPTE_OFFSET1
+diff -uNr linux-2.6.8/arch/sparc64/kernel/ptrace.c linux-2.6.8.grsecurity/arch/sparc64/kernel/ptrace.c
+--- linux-2.6.8/arch/sparc64/kernel/ptrace.c   2004-08-14 07:38:08.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc64/kernel/ptrace.c        2004-08-16 17:06:19.063040824 +0200
+@@ -19,6 +19,7 @@
+ #include <linux/smp.h>
+ #include <linux/smp_lock.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
+ #include <asm/asi.h>
+ #include <asm/pgtable.h>
+@@ -173,6 +174,11 @@
+               goto out;
+       }
++      if (gr_handle_ptrace(child, (long)request)) {
++              pt_error_return(regs, EPERM);
++              goto out_tsk;
++      }
++
+       if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH)
+           || (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) {
+               if (ptrace_attach(child)) {
+diff -uNr linux-2.6.8/arch/sparc64/kernel/sys_sparc32.c linux-2.6.8.grsecurity/arch/sparc64/kernel/sys_sparc32.c
+--- linux-2.6.8/arch/sparc64/kernel/sys_sparc32.c      2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc64/kernel/sys_sparc32.c   2004-08-16 17:06:19.090036720 +0200
+@@ -54,6 +54,7 @@
+ #include <linux/netfilter_ipv4/ip_tables.h>
+ #include <linux/ptrace.h>
+ #include <linux/highuid.h>
++#include <linux/grsecurity.h>
+ #include <asm/types.h>
+ #include <asm/ipc.h>
+diff -uNr linux-2.6.8/arch/sparc64/kernel/sys_sparc.c linux-2.6.8.grsecurity/arch/sparc64/kernel/sys_sparc.c
+--- linux-2.6.8/arch/sparc64/kernel/sys_sparc.c        2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc64/kernel/sys_sparc.c     2004-08-16 17:06:19.077038696 +0200
+@@ -25,6 +25,7 @@
+ #include <linux/syscalls.h>
+ #include <linux/ipc.h>
+ #include <linux/personality.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/ipc.h>
+@@ -49,7 +50,7 @@
+ {
+       struct mm_struct *mm = current->mm;
+       struct vm_area_struct * vma;
+-      unsigned long task_size = TASK_SIZE;
++      unsigned long task_size = TASK_SIZE, task_unmapped_base = TASK_UNMAPPED_BASE;
+       unsigned long start_addr;
+       int do_color_align;
+@@ -72,6 +73,12 @@
+       if (filp || (flags & MAP_SHARED))
+               do_color_align = 1;
++#ifdef CONFIG_PAX_RANDMMAP
++      if (current->flags & PF_PAX_RANDMMAP)
++              task_unmapped_base += mm->delta_mmap;
++      if (!(current->flags & PF_PAX_RANDMMAP) || !filp)
++#endif
++
+       if (addr) {
+               if (do_color_align)
+                       addr = COLOUR_ALIGN(addr, pgoff);
+@@ -101,8 +108,8 @@
+                       vma = find_vma(mm, PAGE_OFFSET);
+               }
+               if (task_size < addr) {
+-                      if (start_addr != TASK_UNMAPPED_BASE) {
+-                              start_addr = addr = TASK_UNMAPPED_BASE;
++                      if (start_addr != task_unmapped_base) {
++                              start_addr = addr = task_unmapped_base;
+                               goto full_search;
+                       }
+                       return -ENOMEM;
+@@ -319,11 +326,22 @@
+       struct file * file = NULL;
+       unsigned long retval = -EBADF;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(fd);
+               if (!file)
+                       goto out;
+       }
++
++      if (gr_handle_mmap(file, prot)) {
++              retval = -EACCES;
++              goto out_putf;
++      }
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       len = PAGE_ALIGN(len);
+       retval = -EINVAL;
+diff -uNr linux-2.6.8/arch/sparc64/kernel/sys_sunos32.c linux-2.6.8.grsecurity/arch/sparc64/kernel/sys_sunos32.c
+--- linux-2.6.8/arch/sparc64/kernel/sys_sunos32.c      2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc64/kernel/sys_sunos32.c   2004-08-16 17:06:19.111033528 +0200
+@@ -66,6 +66,11 @@
+       struct file *file = NULL;
+       unsigned long retval, ret_type;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       if (flags & MAP_NORESERVE) {
+               static int cnt;
+               if (cnt++ < 10)
+diff -uNr linux-2.6.8/arch/sparc64/mm/fault.c linux-2.6.8.grsecurity/arch/sparc64/mm/fault.c
+--- linux-2.6.8/arch/sparc64/mm/fault.c        2004-08-14 07:38:04.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc64/mm/fault.c     2004-08-16 17:06:19.171024408 +0200
+@@ -18,6 +18,10 @@
+ #include <linux/smp_lock.h>
+ #include <linux/init.h>
+ #include <linux/interrupt.h>
++#include <linux/slab.h>
++#include <linux/pagemap.h>
++#include <linux/compiler.h>
++#include <linux/binfmts.h>
+ #include <asm/page.h>
+ #include <asm/pgtable.h>
+@@ -310,6 +314,361 @@
+       unhandled_fault (address, current, regs);
+ }
++#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_EMUPLT
++static void pax_emuplt_close(struct vm_area_struct * vma)
++{
++      vma->vm_mm->call_dl_resolve = 0UL;
++}
++
++static struct page* pax_emuplt_nopage(struct vm_area_struct *vma, unsigned long address, int *type)
++{
++      struct page* page;
++      unsigned int *kaddr;
++
++      page = alloc_page(GFP_HIGHUSER);
++      if (!page)
++              return NOPAGE_OOM;
++
++      kaddr = kmap(page);
++      memset(kaddr, 0, PAGE_SIZE);
++      kaddr[0] = 0x9DE3BFA8U; /* save */
++      flush_dcache_page(page);
++      kunmap(page);
++      if (type)
++              *type = VM_FAULT_MAJOR;
++      return page;
++}
++
++static struct vm_operations_struct pax_vm_ops = {
++      close:          pax_emuplt_close,
++      nopage:         pax_emuplt_nopage,
++};
++
++static void pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
++{
++      memset(vma, 0, sizeof(*vma));
++      vma->vm_mm = current->mm;
++      vma->vm_start = addr;
++      vma->vm_end = addr + PAGE_SIZE;
++      vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYEXEC;
++      vma->vm_page_prot = protection_map[vma->vm_flags & 0x0f];
++      vma->vm_ops = &pax_vm_ops;
++      insert_vm_struct(current->mm, vma);
++      ++current->mm->total_vm;
++}
++#endif
++
++/*
++ * PaX: decide what to do with offenders (regs->tpc = fault address)
++ *
++ * returns 1 when task should be killed
++ *         2 when patched PLT trampoline was detected
++ *         3 when unpatched PLT trampoline was detected
++ *         4 when legitimate ET_EXEC was detected
++ */
++static int pax_handle_fetch_fault(struct pt_regs *regs)
++{
++
++#ifdef CONFIG_PAX_EMUPLT
++      int err;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++      if (current->flags & PF_PAX_RANDEXEC) {
++              if (regs->tpc >= current->mm->start_code &&
++                  regs->tpc < current->mm->end_code)
++              {
++                      if (regs->u_regs[UREG_RETPC] + 8UL == regs->tpc)
++                              return 1;
++
++                      regs->tpc += current->mm->delta_exec;
++                      if (regs->tnpc >= current->mm->start_code &&
++                          regs->tnpc < current->mm->end_code)
++                              regs->tnpc += current->mm->delta_exec;
++                      return 4;
++              }
++              if (regs->tpc >= current->mm->start_code + current->mm->delta_exec &&
++                  regs->tpc < current->mm->end_code + current->mm->delta_exec)
++              {
++                      regs->tpc -= current->mm->delta_exec;
++                      if (regs->tnpc >= current->mm->start_code + current->mm->delta_exec &&
++                          regs->tnpc < current->mm->end_code + current->mm->delta_exec)
++                              regs->tnpc -= current->mm->delta_exec;
++              }
++      }
++#endif
++
++#ifdef CONFIG_PAX_EMUPLT
++      do { /* PaX: patched PLT emulation #1 */
++              unsigned int sethi1, sethi2, jmpl;
++
++              err = get_user(sethi1, (unsigned int*)regs->tpc);
++              err |= get_user(sethi2, (unsigned int*)(regs->tpc+4));
++              err |= get_user(jmpl, (unsigned int*)(regs->tpc+8));
++
++              if (err)
++                      break;
++
++              if ((sethi1 & 0xFFC00000U) == 0x03000000U &&
++                  (sethi2 & 0xFFC00000U) == 0x03000000U &&
++                  (jmpl & 0xFFFFE000U) == 0x81C06000U)
++              {
++                      unsigned long addr;
++
++                      regs->u_regs[UREG_G1] = (sethi2 & 0x003FFFFFU) << 10;
++                      addr = regs->u_regs[UREG_G1];
++                      addr += (((jmpl | 0xFFFFFFFFFFFFE000UL) ^ 0x00001000UL) + 0x00001000UL);
++                      regs->tpc = addr;
++                      regs->tnpc = addr+4;
++                      return 2;
++              }
++      } while (0);
++
++      { /* PaX: patched PLT emulation #2 */
++              unsigned int ba;
++
++              err = get_user(ba, (unsigned int*)regs->tpc);
++
++              if (!err && (ba & 0xFFC00000U) == 0x30800000U) {
++                      unsigned long addr;
++
++                      addr = regs->tpc + 4 + (((ba | 0xFFFFFFFFFFC00000UL) ^ 0x00200000UL) + 0x00200000UL);
++                      regs->tpc = addr;
++                      regs->tnpc = addr+4;
++                      return 2;
++              }
++      }
++
++      do { /* PaX: patched PLT emulation #3 */
++              unsigned int sethi, jmpl, nop;
++
++              err = get_user(sethi, (unsigned int*)regs->tpc);
++              err |= get_user(jmpl, (unsigned int*)(regs->tpc+4));
++              err |= get_user(nop, (unsigned int*)(regs->tpc+8));
++
++              if (err)
++                      break;
++
++              if ((sethi & 0xFFC00000U) == 0x03000000U &&
++                  (jmpl & 0xFFFFE000U) == 0x81C06000U &&
++                  nop == 0x01000000U)
++              {
++                      unsigned long addr;
++
++                      addr = (sethi & 0x003FFFFFU) << 10;
++                      regs->u_regs[UREG_G1] = addr;
++                      addr += (((jmpl | 0xFFFFFFFFFFFFE000UL) ^ 0x00001000UL) + 0x00001000UL);
++                      regs->tpc = addr;
++                      regs->tnpc = addr+4;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: patched PLT emulation #4 */
++              unsigned int mov1, call, mov2;
++
++              err = get_user(mov1, (unsigned int*)regs->tpc);
++              err |= get_user(call, (unsigned int*)(regs->tpc+4));
++              err |= get_user(mov2, (unsigned int*)(regs->tpc+8));
++
++              if (err)
++                      break;
++
++              if (mov1 == 0x8210000FU &&
++                  (call & 0xC0000000U) == 0x40000000U &&
++                  mov2 == 0x9E100001U)
++              {
++                      unsigned long addr;
++
++                      regs->u_regs[UREG_G1] = regs->u_regs[UREG_RETPC];
++                      addr = regs->tpc + 4 + ((((call | 0xFFFFFFFFC0000000UL) ^ 0x20000000UL) + 0x20000000UL) << 2);
++                      regs->tpc = addr;
++                      regs->tnpc = addr+4;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: patched PLT emulation #5 */
++              unsigned int sethi1, sethi2, or1, or2, sllx, jmpl, nop;
++
++              err = get_user(sethi1, (unsigned int*)regs->tpc);
++              err |= get_user(sethi2, (unsigned int*)(regs->tpc+4));
++              err |= get_user(or1, (unsigned int*)(regs->tpc+8));
++              err |= get_user(or2, (unsigned int*)(regs->tpc+12));
++              err |= get_user(sllx, (unsigned int*)(regs->tpc+16));
++              err |= get_user(jmpl, (unsigned int*)(regs->tpc+20));
++              err |= get_user(nop, (unsigned int*)(regs->tpc+24));
++
++              if (err)
++                      break;
++
++              if ((sethi1 & 0xFFC00000U) == 0x03000000U &&
++                  (sethi2 & 0xFFC00000U) == 0x0B000000U &&
++                  (or1 & 0xFFFFE000U) == 0x82106000U &&
++                  (or2 & 0xFFFFE000U) == 0x8A116000U &&
++                  sllx == 0x83287020 &&
++                  jmpl == 0x81C04005U &&
++                  nop == 0x01000000U)
++              {
++                      unsigned long addr;
++
++                      regs->u_regs[UREG_G1] = ((sethi1 & 0x003FFFFFU) << 10) | (or1 & 0x000003FFU);
++                      regs->u_regs[UREG_G1] <<= 32;
++                      regs->u_regs[UREG_G5] = ((sethi2 & 0x003FFFFFU) << 10) | (or2 & 0x000003FFU);
++                      addr = regs->u_regs[UREG_G1] + regs->u_regs[UREG_G5];
++                      regs->tpc = addr;
++                      regs->tnpc = addr+4;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: patched PLT emulation #6 */
++              unsigned int sethi1, sethi2, sllx, or,  jmpl, nop;
++
++              err = get_user(sethi1, (unsigned int*)regs->tpc);
++              err |= get_user(sethi2, (unsigned int*)(regs->tpc+4));
++              err |= get_user(sllx, (unsigned int*)(regs->tpc+8));
++              err |= get_user(or, (unsigned int*)(regs->tpc+12));
++              err |= get_user(jmpl, (unsigned int*)(regs->tpc+16));
++              err |= get_user(nop, (unsigned int*)(regs->tpc+20));
++
++              if (err)
++                      break;
++
++              if ((sethi1 & 0xFFC00000U) == 0x03000000U &&
++                  (sethi2 & 0xFFC00000U) == 0x0B000000U &&
++                  sllx == 0x83287020 &&
++                  (or & 0xFFFFE000U) == 0x8A116000U &&
++                  jmpl == 0x81C04005U &&
++                  nop == 0x01000000U)
++              {
++                      unsigned long addr;
++
++                      regs->u_regs[UREG_G1] = (sethi1 & 0x003FFFFFU) << 10;
++                      regs->u_regs[UREG_G1] <<= 32;
++                      regs->u_regs[UREG_G5] = ((sethi2 & 0x003FFFFFU) << 10) | (or & 0x3FFU);
++                      addr = regs->u_regs[UREG_G1] + regs->u_regs[UREG_G5];
++                      regs->tpc = addr;
++                      regs->tnpc = addr+4;
++                      return 2;
++              }
++      } while (0);
++
++      do { /* PaX: unpatched PLT emulation step 1 */
++              unsigned int sethi, ba, nop;
++
++              err = get_user(sethi, (unsigned int*)regs->tpc);
++              err |= get_user(ba, (unsigned int*)(regs->tpc+4));
++              err |= get_user(nop, (unsigned int*)(regs->tpc+8));
++
++              if (err)
++                      break;
++
++              if ((sethi & 0xFFC00000U) == 0x03000000U &&
++                  ((ba & 0xFFC00000U) == 0x30800000U || (ba & 0xFFF80000U) == 0x30680000U) &&
++                  nop == 0x01000000U)
++              {
++                      unsigned long addr;
++                      unsigned int save, call;
++
++                      if ((ba & 0xFFC00000U) == 0x30800000U)
++                              addr = regs->tpc + 4 + ((((ba | 0xFFFFFFFFFFC00000UL) ^ 0x00200000UL) + 0x00200000UL) << 2);
++                      else
++                              addr = regs->tpc + 4 + ((((ba | 0xFFFFFFFFFFF80000UL) ^ 0x00040000UL) + 0x00040000UL) << 2);
++
++                      err = get_user(save, (unsigned int*)addr);
++                      err |= get_user(call, (unsigned int*)(addr+4));
++                      err |= get_user(nop, (unsigned int*)(addr+8));
++                      if (err)
++                              break;
++
++                      if (save == 0x9DE3BFA8U &&
++                          (call & 0xC0000000U) == 0x40000000U &&
++                          nop == 0x01000000U)
++                      {
++                              struct vm_area_struct *vma;
++                              unsigned long call_dl_resolve;
++
++                              down_read(&current->mm->mmap_sem);
++                              call_dl_resolve = current->mm->call_dl_resolve;
++                              up_read(&current->mm->mmap_sem);
++                              if (likely(call_dl_resolve))
++                                      goto emulate;
++
++                              vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
++
++                              down_write(&current->mm->mmap_sem);
++                              if (current->mm->call_dl_resolve) {
++                                      call_dl_resolve = current->mm->call_dl_resolve;
++                                      up_write(&current->mm->mmap_sem);
++                                      if (vma) kmem_cache_free(vm_area_cachep, vma);
++                                      goto emulate;
++                              }
++
++                              call_dl_resolve = get_unmapped_area(NULL, 0UL, PAGE_SIZE, 0UL, MAP_PRIVATE);
++                              if (!vma || (call_dl_resolve & ~PAGE_MASK)) {
++                                      up_write(&current->mm->mmap_sem);
++                                      if (vma) kmem_cache_free(vm_area_cachep, vma);
++                                      return 1;
++                              }
++
++                              pax_insert_vma(vma, call_dl_resolve);
++                              current->mm->call_dl_resolve = call_dl_resolve;
++                              up_write(&current->mm->mmap_sem);
++
++emulate:
++                              regs->u_regs[UREG_G1] = (sethi & 0x003FFFFFU) << 10;
++                              regs->tpc = call_dl_resolve;
++                              regs->tnpc = addr+4;
++                              return 3;
++                      }
++              }
++      } while (0);
++
++      do { /* PaX: unpatched PLT emulation step 2 */
++              unsigned int save, call, nop;
++
++              err = get_user(save, (unsigned int*)(regs->tpc-4));
++              err |= get_user(call, (unsigned int*)regs->tpc);
++              err |= get_user(nop, (unsigned int*)(regs->tpc+4));
++              if (err)
++                      break;
++
++              if (save == 0x9DE3BFA8U &&
++                  (call & 0xC0000000U) == 0x40000000U &&
++                  nop == 0x01000000U)
++              {
++                      unsigned long dl_resolve = regs->tpc + ((((call | 0xFFFFFFFFC0000000UL) ^ 0x20000000UL) + 0x20000000UL) << 2);
++
++                      regs->u_regs[UREG_RETPC] = regs->tpc;
++                      regs->tpc = dl_resolve;
++                      regs->tnpc = dl_resolve+4;
++                      return 3;
++              }
++      } while (0);
++#endif
++
++      return 1;
++}
++
++void pax_report_insns(void *pc, void *sp)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 5; i++) {
++              unsigned int c;
++              if (get_user(c, (unsigned int*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08x ", c);
++      }
++      printk("\n");
++}
++#endif
++
+ asmlinkage void do_sparc64_fault(struct pt_regs *regs)
+ {
+       struct mm_struct *mm = current->mm;
+@@ -347,8 +706,10 @@
+               goto intr_or_no_mm;
+       if (test_thread_flag(TIF_32BIT)) {
+-              if (!(regs->tstate & TSTATE_PRIV))
++              if (!(regs->tstate & TSTATE_PRIV)) {
+                       regs->tpc &= 0xffffffff;
++                      regs->tnpc &= 0xffffffff;
++              }
+               address &= 0xffffffff;
+       }
+@@ -357,6 +718,34 @@
+       if (!vma)
+               goto bad_area;
++#ifdef CONFIG_PAX_PAGEEXEC
++      /* PaX: detect ITLB misses on non-exec pages */
++      if ((current->flags & PF_PAX_PAGEEXEC) && vma->vm_start <= address &&
++          !(vma->vm_flags & VM_EXEC) && (fault_code & FAULT_CODE_ITLB))
++      {
++              if (address != regs->tpc)
++                      goto good_area;
++
++              up_read(&mm->mmap_sem);
++              switch (pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_EMUPLT
++              case 2:
++              case 3:
++                      goto fault_done;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++              case 4:
++                      goto fault_done;
++#endif
++
++              }
++              pax_report_fault(regs, (void*)regs->tpc, (void*)(regs->u_regs[UREG_FP] + STACK_BIAS));
++              do_exit(SIGKILL);
++      }
++#endif
++
+       /* Pure DTLB misses do not tell us whether the fault causing
+        * load/store/atomic was a write or not, it only says that there
+        * was no match.  So in such a case we (carefully) read the
+diff -uNr linux-2.6.8/arch/sparc64/solaris/misc.c linux-2.6.8.grsecurity/arch/sparc64/solaris/misc.c
+--- linux-2.6.8/arch/sparc64/solaris/misc.c    2004-08-14 07:38:04.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/sparc64/solaris/misc.c 2004-08-16 17:06:19.209018632 +0200
+@@ -56,6 +56,11 @@
+       struct file *file = NULL;
+       unsigned long retval, ret_type;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       /* Do we need it here? */
+       set_personality(PER_SVR4);
+       if (flags & MAP_NORESERVE) {
+diff -uNr linux-2.6.8/arch/x86_64/ia32/ia32_binfmt.c linux-2.6.8.grsecurity/arch/x86_64/ia32/ia32_binfmt.c
+--- linux-2.6.8/arch/x86_64/ia32/ia32_binfmt.c 2004-08-14 07:36:12.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/x86_64/ia32/ia32_binfmt.c      2004-08-16 17:06:19.234014832 +0200
+@@ -185,6 +185,17 @@
+ //#include <asm/ia32.h>
+ #include <linux/elf.h>
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      (test_thread_flag(TIF_IA32) ? 0x08048000UL : 0x400000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               (test_thread_flag(TIF_IA32) ? 16 : 24)
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               (test_thread_flag(TIF_IA32) ? 16 : 24)
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      (test_thread_flag(TIF_IA32) ? 16 : 24)
++#endif
++
+ typedef struct user_i387_ia32_struct elf_fpregset_t;
+ typedef struct user32_fxsr_struct elf_fpxregset_t;
+@@ -361,7 +372,13 @@
+               else if (executable_stack == EXSTACK_DISABLE_X)
+                       mpnt->vm_flags = vm_stack_flags32 & ~VM_EXEC;
+               else
++
++#ifdef CONFIG_PAX_PAGEEXEC
++                      mpnt->vm_flags = VM_STACK_FLAGS;
++#else
+                       mpnt->vm_flags = vm_stack_flags32;
++#endif
++
+               mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC) ? 
+                       PAGE_COPY_EXEC : PAGE_COPY;
+               insert_vm_struct(mm, mpnt);
+diff -uNr linux-2.6.8/arch/x86_64/ia32/sys_ia32.c linux-2.6.8.grsecurity/arch/x86_64/ia32/sys_ia32.c
+--- linux-2.6.8/arch/x86_64/ia32/sys_ia32.c    2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/x86_64/ia32/sys_ia32.c 2004-08-16 17:06:19.253011944 +0200
+@@ -212,6 +212,11 @@
+       if (a.offset & ~PAGE_MASK)
+               return -EINVAL; 
++#ifdef CONFIG_PAX_RANDEXEC
++      if (a.flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       if (!(a.flags & MAP_ANONYMOUS)) {
+               file = fget(a.fd);
+               if (!file)
+@@ -1037,6 +1042,11 @@
+       unsigned long error;
+       struct file * file = NULL;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              return -EINVAL;
++#endif
++
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(fd);
+diff -uNr linux-2.6.8/arch/x86_64/kernel/ptrace.c linux-2.6.8.grsecurity/arch/x86_64/kernel/ptrace.c
+--- linux-2.6.8/arch/x86_64/kernel/ptrace.c    2004-08-14 07:36:44.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/x86_64/kernel/ptrace.c 2004-08-16 17:06:19.278008144 +0200
+@@ -213,6 +213,9 @@
+       if (pid == 1)           /* you may not mess with init */
+               goto out_tsk;
++        if (gr_handle_ptrace(child, request))
++                goto out_tsk;
++
+       if (request == PTRACE_ATTACH) {
+               ret = ptrace_attach(child);
+               goto out_tsk;
+diff -uNr linux-2.6.8/arch/x86_64/kernel/setup64.c linux-2.6.8.grsecurity/arch/x86_64/kernel/setup64.c
+--- linux-2.6.8/arch/x86_64/kernel/setup64.c   2004-08-14 07:36:33.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/x86_64/kernel/setup64.c        2004-08-16 17:06:19.280007840 +0200
+@@ -43,8 +43,15 @@
+ unsigned long __supported_pte_mask = ~0UL;
+ static int do_not_nx __initdata = 0;
++
++#ifdef CONFIG_PAX_PAGEEXEC
++unsigned long vm_stack_flags = VM_GROWSDOWN | __VM_DATA_DEFAULT_FLAGS;
++unsigned long vm_stack_flags32 = VM_GROWSDOWN | __VM_DATA_DEFAULT_FLAGS;
++#else
+ unsigned long vm_stack_flags = __VM_STACK_FLAGS; 
+ unsigned long vm_stack_flags32 = __VM_STACK_FLAGS; 
++#endif
++
+ unsigned long vm_data_default_flags = __VM_DATA_DEFAULT_FLAGS; 
+ unsigned long vm_data_default_flags32 = __VM_DATA_DEFAULT_FLAGS; 
+ unsigned long vm_force_exec32 = PROT_EXEC; 
+diff -uNr linux-2.6.8/arch/x86_64/kernel/sys_x86_64.c linux-2.6.8.grsecurity/arch/x86_64/kernel/sys_x86_64.c
+--- linux-2.6.8/arch/x86_64/kernel/sys_x86_64.c        2004-08-14 07:37:25.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/x86_64/kernel/sys_x86_64.c     2004-08-16 17:06:19.290006320 +0200
+@@ -48,6 +48,11 @@
+       if (off & ~PAGE_MASK)
+               goto out;
++#ifdef CONFIG_PAX_RANDEXEC
++      if (flags & MAP_MIRROR)
++              goto out;
++#endif
++
+       error = -EBADF;
+       file = NULL;
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+@@ -102,6 +107,15 @@
+       
+       find_start_end(flags, &begin, &end); 
++#ifdef CONFIG_PAX_RANDMMAP
++      if ((current->flags & PF_PAX_RANDMMAP) && (!addr || filp)) {
++              if (begin == 0x40000000)
++                      begin += current->mm->delta_mmap & 0x0FFFFFFFU;
++              else
++                      begin += current->mm->delta_mmap;
++      }
++#endif
++
+       if (len > end)
+               return -ENOMEM;
+diff -uNr linux-2.6.8/arch/x86_64/mm/fault.c linux-2.6.8.grsecurity/arch/x86_64/mm/fault.c
+--- linux-2.6.8/arch/x86_64/mm/fault.c 2004-08-14 07:36:11.000000000 +0200
++++ linux-2.6.8.grsecurity/arch/x86_64/mm/fault.c      2004-08-16 17:06:19.312002976 +0200
+@@ -23,6 +23,7 @@
+ #include <linux/vt_kern.h>            /* For unblank_screen() */
+ #include <linux/compiler.h>
+ #include <linux/module.h>
++#include <linux/binfmts.h>
+ #include <asm/system.h>
+ #include <asm/uaccess.h>
+@@ -218,6 +219,63 @@
+               (tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL);
+ }
++#ifdef CONFIG_PAX_PAGEEXEC
++/*
++ * PaX: decide what to do with offenders (regs->rip = fault address)
++ *
++ * returns 1 when task should be killed
++ *         2 when legitimate ET_EXEC was detected
++ */
++static int pax_handle_fetch_fault(struct pt_regs *regs)
++{
++
++#ifdef CONFIG_PAX_RANDEXEC
++      int err;
++
++      if (current->flags & PF_PAX_RANDEXEC) {
++              if (regs->rip >= current->mm->start_code &&
++                  regs->rip < current->mm->end_code)
++              {
++                      if (test_thread_flag(TIF_IA32)) {
++                              unsigned int esp_4;
++
++                              err = get_user(esp_4, (unsigned int*)(regs->rsp-4UL));
++                              if (err || esp_4 == regs->rip)
++                                      return 1;
++                      } else {
++                              unsigned long esp_8;
++
++                              err = get_user(esp_8, (unsigned long*)(regs->rsp-8UL));
++                              if (err || esp_8 == regs->rip)
++                                      return 1;
++                      }
++
++                      regs->rip += current->mm->delta_exec;
++                      return 2;
++              }
++      }
++#endif
++
++      return 1;
++}
++
++void pax_report_insns(void *pc, void *sp)
++{
++      unsigned long i;
++
++      printk(KERN_ERR "PAX: bytes at PC: ");
++      for (i = 0; i < 20; i++) {
++              unsigned int c;
++              if (get_user(c, (unsigned char*)pc+i)) {
++                      printk("<invalid address>.");
++                      break;
++              }
++              printk("%08x ", c);
++      }
++      printk("\n");
++}
++#endif
++
+ int page_fault_trace; 
+ int exception_trace = 1;
+@@ -303,6 +361,23 @@
+  * we can handle it..
+  */
+ good_area:
++
++#ifdef CONFIG_PAX_PAGEEXEC
++      if ((current->flags & PF_PAX_PAGEEXEC) && (error_code & 16) && !(vma->vm_flags & VM_EXEC)) {
++              up_read(&mm->mmap_sem);
++              switch(pax_handle_fetch_fault(regs)) {
++
++#ifdef CONFIG_PAX_RANDEXEC
++              case 2:
++                      return;
++#endif
++
++              }
++              pax_report_fault(regs, (void*)regs->rip, (void*)regs->rsp);
++              do_exit(SIGKILL);
++      }
++#endif
++
+       info.si_code = SEGV_ACCERR;
+       write = 0;
+       switch (error_code & 3) {
+diff -uNr linux-2.6.8/drivers/char/keyboard.c linux-2.6.8.grsecurity/drivers/char/keyboard.c
+--- linux-2.6.8/drivers/char/keyboard.c        2004-08-14 07:38:11.000000000 +0200
++++ linux-2.6.8.grsecurity/drivers/char/keyboard.c     2004-08-16 17:06:19.352996744 +0200
+@@ -605,6 +605,16 @@
+            kbd->kbdmode == VC_MEDIUMRAW) && 
+            value != KVAL(K_SAK))
+               return;         /* SAK is allowed even in raw mode */
++
++#if defined(CONFIG_GRKERNSEC_PROC) || defined(CONFIG_GRKERNSEC_PROC_MEMMAP)
++      {
++              void *func = fn_handler[value];
++              if (func == fn_show_state || func == fn_show_ptregs ||
++                  func == fn_show_mem)
++                      return;
++      }
++#endif
++
+       fn_handler[value](vc, regs);
+ }
+diff -uNr linux-2.6.8/drivers/char/mem.c linux-2.6.8.grsecurity/drivers/char/mem.c
+--- linux-2.6.8/drivers/char/mem.c     2004-08-14 07:36:58.000000000 +0200
++++ linux-2.6.8.grsecurity/drivers/char/mem.c  2004-08-16 17:06:19.424985800 +0200
+@@ -23,6 +23,7 @@
+ #include <linux/devfs_fs_kernel.h>
+ #include <linux/ptrace.h>
+ #include <linux/device.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/io.h>
+@@ -38,6 +39,10 @@
+ extern void tapechar_init(void);
+ #endif
++#ifdef CONFIG_GRKERNSEC
++extern struct file_operations grsec_fops;
++#endif
++
+ /*
+  * Architectures vary in how they handle caching for addresses
+  * outside of main memory.
+@@ -190,6 +195,12 @@
+       if (!valid_phys_addr_range(p, &count))
+               return -EFAULT;
++
++#ifdef CONFIG_GRKERNSEC_KMEM
++      gr_handle_mem_write();
++      return -EPERM;
++#endif
++
+       return do_write_mem(__va(p), p, buf, count, ppos);
+ }
+@@ -204,6 +215,11 @@
+               vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+ #endif
++#ifdef CONFIG_GRKERNSEC_KMEM
++      if (gr_handle_mem_mmap(offset, vma))
++              return -EPERM;
++#endif
++
+       /* Don't try to swap out physical pages.. */
+       vma->vm_flags |= VM_RESERVED;
+@@ -297,6 +313,11 @@
+       ssize_t written;
+       char * kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */
++#ifdef CONFIG_GRKERNSEC_KMEM
++      gr_handle_kmem_write();
++      return -EPERM;
++#endif
++
+       if (p < (unsigned long) high_memory) {
+               wrote = count;
+@@ -423,7 +444,23 @@
+                       count = size;
+               zap_page_range(vma, addr, count, NULL);
+-              zeromap_page_range(vma, addr, count, PAGE_COPY);
++              zeromap_page_range(vma, addr, count, vma->vm_page_prot);
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++              if (vma->vm_flags & VM_MIRROR) {
++                      unsigned long addr_m;
++                      struct vm_area_struct * vma_m;
++
++                      addr_m = vma->vm_start + vma->vm_mirror;
++                      vma_m = find_vma(mm, addr_m);
++                      if (vma_m && vma_m->vm_start == addr_m && (vma_m->vm_flags & VM_MIRROR)) {
++                              addr_m = addr + vma->vm_mirror;
++                              zap_page_range(vma_m, addr_m, count, NULL);
++                      } else
++                              printk(KERN_ERR "PAX: VMMIRROR: read_zero bug, %08lx, %08lx\n",
++                                     addr, vma->vm_start);
++              }
++#endif
+               size -= count;
+               buf += count;
+@@ -572,6 +609,16 @@
+ static int open_port(struct inode * inode, struct file * filp)
+ {
++#ifdef CONFIG_GRKERNSEC_KMEM
++      gr_handle_open_port();
++      return -EPERM;
++#endif
++
++      return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
++}
++
++static int open_mem(struct inode * inode, struct file * filp)
++{
+       return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
+ }
+@@ -580,7 +627,6 @@
+ #define full_lseek      null_lseek
+ #define write_zero    write_null
+ #define read_full       read_zero
+-#define open_mem      open_port
+ #define open_kmem     open_mem
+ static struct file_operations mem_fops = {
+@@ -681,6 +727,11 @@
+               case 11:
+                       filp->f_op = &kmsg_fops;
+                       break;
++#ifdef CONFIG_GRKERNSEC
++              case 12:
++                      filp->f_op = &grsec_fops;
++                      break;
++#endif
+               default:
+                       return -ENXIO;
+       }
+@@ -710,6 +761,9 @@
+       {8, "random",  S_IRUGO | S_IWUSR,           &random_fops},
+       {9, "urandom", S_IRUGO | S_IWUSR,           &urandom_fops},
+       {11,"kmsg",    S_IRUGO | S_IWUSR,           &kmsg_fops},
++#ifdef CONFIG_GRKERNSEC
++      {12,"grsec",   S_IRUSR | S_IWUGO,           &grsec_fops},
++#endif
+ };
+ static struct class_simple *mem_class;
+diff -uNr linux-2.6.8/drivers/char/random.c linux-2.6.8.grsecurity/drivers/char/random.c
+--- linux-2.6.8/drivers/char/random.c  2004-08-14 07:36:14.000000000 +0200
++++ linux-2.6.8.grsecurity/drivers/char/random.c       2004-08-16 17:06:19.463979872 +0200
+@@ -263,9 +263,15 @@
+ /*
+  * Configuration information
+  */
++#ifdef CONFIG_GRKERNSEC_RANDNET
++#define DEFAULT_POOL_SIZE 1024
++#define SECONDARY_POOL_SIZE 256
++#define BATCH_ENTROPY_SIZE 512
++#else
+ #define DEFAULT_POOL_SIZE 512
+ #define SECONDARY_POOL_SIZE 128
+ #define BATCH_ENTROPY_SIZE 256
++#endif
+ #define USE_SHA
+ /*
+@@ -2384,6 +2390,29 @@
+       return halfMD4Transform(hash, keyptr->secret);
+ }
++#ifdef CONFIG_GRKERNSEC
++/* the following function is provided by PaX under the GPL */
++unsigned long get_random_long(void)
++{
++      static time_t rekey_time;
++      static __u32 secret[12];
++      time_t t;
++
++      /*
++       * Pick a random secret every REKEY_INTERVAL seconds
++       */
++      t = get_seconds();
++      if (!rekey_time || (t - rekey_time) > REKEY_INTERVAL) {
++              rekey_time = t;
++              get_random_bytes(secret, sizeof(secret));
++      }
++
++      secret[1] = halfMD4Transform(secret+8, secret);
++      secret[0] = halfMD4Transform(secret+8, secret);
++      return *(unsigned long *)secret;
++}
++#endif
++
+ #ifdef CONFIG_SYN_COOKIES
+ /*
+  * Secure SYN cookie computation. This is the algorithm worked out by
+@@ -2483,3 +2512,25 @@
+       return (cookie - tmp[17]) & COOKIEMASK; /* Leaving the data behind */
+ }
+ #endif
++
++#ifdef CONFIG_PAX_ASLR
++unsigned long pax_get_random_long(void)
++{
++      static time_t   rekey_time;
++      static __u32    secret[12];
++      time_t          t;
++
++      /*
++       * Pick a random secret every REKEY_INTERVAL seconds.
++       */
++      t = get_seconds();
++      if (!rekey_time || (t - rekey_time) > REKEY_INTERVAL) {
++              rekey_time = t;
++              get_random_bytes(secret, sizeof(secret));
++      }
++
++      secret[1] = halfMD4Transform(secret+8, secret);
++      secret[0] = halfMD4Transform(secret+8, secret);
++      return *(unsigned long *)secret;
++}
++#endif
+diff -uNr linux-2.6.8/drivers/char/vt_ioctl.c linux-2.6.8.grsecurity/drivers/char/vt_ioctl.c
+--- linux-2.6.8/drivers/char/vt_ioctl.c        2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/drivers/char/vt_ioctl.c     2004-08-16 17:06:19.484976680 +0200
+@@ -96,6 +96,12 @@
+       case KDSKBENT:
+               if (!perm)
+                       return -EPERM;
++
++#ifdef CONFIG_GRKERNSEC
++              if (!capable(CAP_SYS_TTY_CONFIG))
++                      return -EPERM;
++#endif
++
+               if (!i && v == K_NOSUCHMAP) {
+                       /* disallocate map */
+                       key_map = key_maps[s];
+@@ -233,6 +239,13 @@
+                       goto reterr;
+               }
++#ifdef CONFIG_GRKERNSEC
++              if (!capable(CAP_SYS_TTY_CONFIG)) {
++                      return -EPERM;
++                      goto reterr;
++              }
++#endif
++
+               q = func_table[i];
+               first_free = funcbufptr + (funcbufsize - funcbufleft);
+               for (j = i+1; j < MAX_NR_FUNC && !func_table[j]; j++) 
+diff -uNr linux-2.6.8/drivers/pci/proc.c linux-2.6.8.grsecurity/drivers/pci/proc.c
+--- linux-2.6.8/drivers/pci/proc.c     2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/drivers/pci/proc.c  2004-08-16 17:06:19.534969080 +0200
+@@ -565,7 +565,15 @@
+ static void legacy_proc_init(void)
+ {
++#ifdef CONFIG_GRKERNSEC_PROC_ADD
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      struct proc_dir_entry * entry = create_proc_entry("pci", S_IRUSR, NULL);
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      struct proc_dir_entry * entry = create_proc_entry("pci", S_IRUSR | S_IRGRP, NULL);
++#endif
++#else
+       struct proc_dir_entry * entry = create_proc_entry("pci", 0, NULL);
++#endif
+       if (entry)
+               entry->proc_fops = &proc_pci_operations;
+ }
+@@ -594,7 +602,15 @@
+ {
+       struct proc_dir_entry *entry;
+       struct pci_dev *dev = NULL;
++#ifdef CONFIG_GRKERNSEC_PROC_ADD
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      proc_bus_pci_dir = proc_mkdir_mode("pci", S_IRUSR | S_IXUSR, proc_bus);
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      proc_bus_pci_dir = proc_mkdir_mode("pci", S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP, proc_bus);
++#endif
++#else
+       proc_bus_pci_dir = proc_mkdir("pci", proc_bus);
++#endif
+       entry = create_proc_entry("devices", 0, proc_bus_pci_dir);
+       if (entry)
+               entry->proc_fops = &proc_bus_pci_dev_operations;
+diff -uNr linux-2.6.8/drivers/pnp/pnpbios/bioscalls.c linux-2.6.8.grsecurity/drivers/pnp/pnpbios/bioscalls.c
+--- linux-2.6.8/drivers/pnp/pnpbios/bioscalls.c        2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/drivers/pnp/pnpbios/bioscalls.c     2004-08-16 17:06:19.557965584 +0200
+@@ -79,7 +79,7 @@
+ set_limit(cpu_gdt_table[cpu][(selname) >> 3], size); \
+ } while(0)
+-static struct desc_struct bad_bios_desc = { 0, 0x00409200 };
++static struct desc_struct bad_bios_desc = { 0, 0x00409300 };
+ /*
+  * At some point we want to use this stack frame pointer to unwind
+@@ -107,6 +107,10 @@
+       struct desc_struct save_desc_40;
+       int cpu;
++#ifdef CONFIG_PAX_KERNEXEC
++      unsigned long cr3;
++#endif
++
+       /*
+        * PnP BIOSes are generally not terribly re-entrant.
+        * Also, don't rely on them to save everything correctly.
+@@ -115,12 +119,17 @@
+               return PNP_FUNCTION_NOT_SUPPORTED;
+       cpu = get_cpu();
+-      save_desc_40 = cpu_gdt_table[cpu][0x40 / 8];
+-      cpu_gdt_table[cpu][0x40 / 8] = bad_bios_desc;
+       /* On some boxes IRQ's during PnP BIOS calls are deadly.  */
+       spin_lock_irqsave(&pnp_bios_lock, flags);
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_open_kernel_noirq(cr3);
++#endif
++
++      save_desc_40 = cpu_gdt_table[cpu][0x40 / 8];
++      cpu_gdt_table[cpu][0x40 / 8] = bad_bios_desc;
++
+       /* The lock prevents us bouncing CPU here */
+       if (ts1_size)
+               Q2_SET_SEL(smp_processor_id(), PNP_TS1, ts1_base, ts1_size);
+@@ -156,9 +165,14 @@
+                 "i" (0)
+               : "memory"
+       );
+-      spin_unlock_irqrestore(&pnp_bios_lock, flags);
+       cpu_gdt_table[cpu][0x40 / 8] = save_desc_40;
++
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_close_kernel_noirq(cr3);
++#endif
++
++      spin_unlock_irqrestore(&pnp_bios_lock, flags);
+       put_cpu();
+       /* If we get here and this is set then the PnP BIOS faulted on us. */
+diff -uNr linux-2.6.8/drivers/video/vesafb.c linux-2.6.8.grsecurity/drivers/video/vesafb.c
+--- linux-2.6.8/drivers/video/vesafb.c 2004-08-14 07:36:14.000000000 +0200
++++ linux-2.6.8.grsecurity/drivers/video/vesafb.c      2004-08-16 17:08:28.000000000 +0200
+@@ -250,7 +250,7 @@
+       if (vesafb_fix.smem_len > 16 * 1024 * 1024)
+               vesafb_fix.smem_len = 16 * 1024 * 1024;
+-#ifndef __i386__
++#if !defined(__i386__) || defined(CONFIG_PAX_KERNEXEC)
+       screen_info.vesapm_seg = 0;
+ #endif
+diff -uNr linux-2.6.8/fs/binfmt_aout.c linux-2.6.8.grsecurity/fs/binfmt_aout.c
+--- linux-2.6.8/fs/binfmt_aout.c       2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/binfmt_aout.c    2004-08-16 17:08:28.000000000 +0200
+@@ -24,6 +24,7 @@
+ #include <linux/binfmts.h>
+ #include <linux/personality.h>
+ #include <linux/init.h>
++#include <linux/grsecurity.h>
+ #include <asm/system.h>
+ #include <asm/uaccess.h>
+@@ -117,10 +118,12 @@
+ /* If the size of the dump file exceeds the rlimit, then see what would happen
+    if we wrote the stack, but not the data area.  */
+ #ifdef __sparc__
++      gr_learn_resource(current, RLIMIT_CORE, dump.u_dsize+dump.u_ssize, 1);
+       if ((dump.u_dsize+dump.u_ssize) >
+           current->rlim[RLIMIT_CORE].rlim_cur)
+               dump.u_dsize = 0;
+ #else
++      gr_learn_resource(current, RLIMIT_CORE, (dump.u_dsize+dump.u_ssize+1) * PAGE_SIZE, 1);
+       if ((dump.u_dsize+dump.u_ssize+1) * PAGE_SIZE >
+           current->rlim[RLIMIT_CORE].rlim_cur)
+               dump.u_dsize = 0;
+@@ -128,10 +131,12 @@
+ /* Make sure we have enough room to write the stack and data areas. */
+ #ifdef __sparc__
++      gr_learn_resource(current, RLIMIT_CORE, dump.u_ssize, 1);
+       if ((dump.u_ssize) >
+           current->rlim[RLIMIT_CORE].rlim_cur)
+               dump.u_ssize = 0;
+ #else
++      gr_learn_resource(current, RLIMIT_CORE, (dump.u_ssize+1) * PAGE_SIZE, 1);
+       if ((dump.u_ssize+1) * PAGE_SIZE >
+           current->rlim[RLIMIT_CORE].rlim_cur)
+               dump.u_ssize = 0;
+@@ -281,6 +286,8 @@
+       rlim = current->rlim[RLIMIT_DATA].rlim_cur;
+       if (rlim >= RLIM_INFINITY)
+               rlim = ~0;
++
++      gr_learn_resource(current, RLIMIT_DATA, ex.a_data + ex.a_bss, 1);
+       if (ex.a_data + ex.a_bss > rlim)
+               return -ENOMEM;
+@@ -309,10 +316,33 @@
+               (current->mm->start_brk = N_BSSADDR(ex));
+       current->mm->free_area_cache = TASK_UNMAPPED_BASE;
++#ifdef CONFIG_PAX_RANDMMAP
++      if (current->flags & PF_PAX_RANDMMAP)
++              current->mm->free_area_cache += current->mm->delta_mmap;
++#endif
++
+       current->mm->rss = 0;
+       current->mm->mmap = NULL;
+       compute_creds(bprm);
+       current->flags &= ~PF_FORKNOEXEC;
++
++#ifdef CONFIG_PAX_PAGEEXEC
++      if (!(N_FLAGS(ex) & F_PAX_PAGEEXEC)) {
++              current->flags |= PF_PAX_PAGEEXEC;
++
++#ifdef CONFIG_PAX_EMUTRAMP
++              if (N_FLAGS(ex) & F_PAX_EMUTRAMP)
++                      current->flags |= PF_PAX_EMUTRAMP;
++#endif
++
++#ifdef CONFIG_PAX_MPROTECT
++              if (!(N_FLAGS(ex) & F_PAX_MPROTECT))
++                      current->flags |= PF_PAX_MPROTECT;
++#endif
++
++      }
++#endif
++
+ #ifdef __sparc__
+       if (N_MAGIC(ex) == NMAGIC) {
+               loff_t pos = fd_offset;
+@@ -401,7 +431,7 @@
+               down_write(&current->mm->mmap_sem);
+               error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
+-                              PROT_READ | PROT_WRITE | PROT_EXEC,
++                              PROT_READ | PROT_WRITE,
+                               MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
+                               fd_offset + ex.a_text);
+               up_write(&current->mm->mmap_sem);
+diff -uNr linux-2.6.8/fs/binfmt_elf.c linux-2.6.8.grsecurity/fs/binfmt_elf.c
+--- linux-2.6.8/fs/binfmt_elf.c        2004-08-14 07:36:57.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/binfmt_elf.c     2004-08-16 17:42:02.000000000 +0200
+@@ -37,6 +37,12 @@
+ #include <linux/pagemap.h>
+ #include <linux/security.h>
+ #include <linux/syscalls.h>
++#include <linux/grsecurity.h>
++#include <linux/random.h>
++  
++#ifdef CONFIG_PAX_SEGMEXEC
++#include <asm/desc.h>
++#endif
+ #include <asm/uaccess.h>
+ #include <asm/param.h>
+@@ -84,14 +90,22 @@
+ static int set_brk(unsigned long start, unsigned long end)
+ {
++      current->mm->start_brk = current->mm->brk = end;
+       start = ELF_PAGEALIGN(start);
+       end = ELF_PAGEALIGN(end);
+       if (end > start) {
+               unsigned long addr = do_brk(start, end - start);
+               if (BAD_ADDR(addr))
+                       return addr;
++
++#ifdef CONFIG_PAX_RANDEXEC
++              if (current->flags & PF_PAX_RANDEXEC)
++                      addr = __do_mmap_pgoff(NULL, ELF_PAGEALIGN(start + current->mm->delta_exec), 0UL, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED | MAP_MIRROR, start);
++              if (BAD_ADDR(addr))
++                      return addr;
++#endif
++
+       }
+-      current->mm->start_brk = current->mm->brk = end;
+       return 0;
+ }
+@@ -305,6 +319,7 @@
+       unsigned long last_bss = 0, elf_bss = 0;
+       unsigned long error = ~0UL;
+       int retval, i, size;
++      unsigned long task_size = TASK_SIZE;
+       /* First of all, some simple consistency checks */
+       if (interp_elf_ex->e_type != ET_EXEC &&
+@@ -338,6 +353,11 @@
+       if (retval < 0)
+               goto out_close;
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (current->flags & PF_PAX_SEGMEXEC)
++              task_size = SEGMEXEC_TASK_SIZE;
++#endif
++
+       eppnt = elf_phdata;
+       for (i=0; i<interp_elf_ex->e_phnum; i++, eppnt++) {
+         if (eppnt->p_type == PT_LOAD) {
+@@ -369,8 +389,8 @@
+            * <= p_memsize so it is only necessary to check p_memsz.
+            */
+           k = load_addr + eppnt->p_vaddr;
+-          if (k > TASK_SIZE || eppnt->p_filesz > eppnt->p_memsz ||
+-              eppnt->p_memsz > TASK_SIZE || TASK_SIZE - eppnt->p_memsz < k) {
++          if (k > task_size || eppnt->p_filesz > eppnt->p_memsz ||
++              eppnt->p_memsz > task_size || task_size - eppnt->p_memsz < k) {
+               error = -ENOMEM;
+               goto out_close;
+           }
+@@ -460,6 +480,227 @@
+       return elf_entry;
+ }
++#if (defined(CONFIG_PAX_EI_PAX) || defined(CONFIG_PAX_PT_PAX_FLAGS)) && defined(CONFIG_PAX_SOFTMODE)
++static unsigned long pax_parse_softmode(const struct elf_phdr * const elf_phdata)
++{
++      unsigned long pax_flags = 0UL;
++
++#ifdef CONFIG_PAX_PAGEEXEC
++      if (elf_phdata->p_flags & PF_PAGEEXEC)
++              pax_flags |= PF_PAX_PAGEEXEC;
++#endif
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (elf_phdata->p_flags & PF_SEGMEXEC)
++              pax_flags |= PF_PAX_SEGMEXEC;
++#endif
++
++#ifdef CONFIG_PAX_DEFAULT_PAGEEXEC
++      if (pax_flags & PF_PAX_PAGEEXEC)
++              pax_flags &= ~PF_PAX_SEGMEXEC;
++#endif
++
++#ifdef CONFIG_PAX_DEFAULT_SEGMEXEC
++      if (pax_flags & PF_PAX_SEGMEXEC)
++              pax_flags &= ~PF_PAX_PAGEEXEC;
++#endif
++
++#ifdef CONFIG_PAX_EMUTRAMP
++      if (elf_phdata->p_flags & PF_EMUTRAMP)
++              pax_flags |= PF_PAX_EMUTRAMP;
++#endif
++
++#ifdef CONFIG_PAX_MPROTECT
++      if (elf_phdata->p_flags & PF_MPROTECT)
++              pax_flags |= PF_PAX_MPROTECT;
++#endif
++
++#if defined(CONFIG_PAX_RANDMMAP) || defined(CONFIG_PAX_RANDUSTACK)
++
++#ifdef CONFIG_PAX_SOFTMODE
++      if (pax_aslr)
++#endif
++
++      if (elf_phdata->p_flags & PF_RANDMMAP)
++              pax_flags |= PF_PAX_RANDMMAP;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++
++#ifdef CONFIG_PAX_SOFTMODE
++      if (pax_aslr)
++#endif
++
++      if (elf_phdata->p_flags & PF_RANDEXEC)
++              pax_flags |= PF_PAX_RANDEXEC;
++#endif
++
++      return pax_flags;
++}
++#endif
++
++#ifdef CONFIG_PAX_PT_PAX_FLAGS
++static unsigned long pax_parse_hardmode(const struct elf_phdr * const elf_phdata)
++{
++      unsigned long pax_flags = 0UL;
++
++#ifdef CONFIG_PAX_PAGEEXEC
++      if (!(elf_phdata->p_flags & PF_NOPAGEEXEC))
++              pax_flags |= PF_PAX_PAGEEXEC;
++#endif
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (!(elf_phdata->p_flags & PF_NOSEGMEXEC))
++              pax_flags |= PF_PAX_SEGMEXEC;
++#endif
++
++#ifdef CONFIG_PAX_DEFAULT_PAGEEXEC
++      if (pax_flags & PF_PAX_PAGEEXEC)
++              pax_flags &= ~PF_PAX_SEGMEXEC;
++#endif
++
++#ifdef CONFIG_PAX_DEFAULT_SEGMEXEC
++      if (pax_flags & PF_PAX_SEGMEXEC)
++              pax_flags &= ~PF_PAX_PAGEEXEC;
++#endif
++
++#ifdef CONFIG_PAX_EMUTRAMP
++      if (!(elf_phdata->p_flags & PF_NOEMUTRAMP))
++              pax_flags |= PF_PAX_EMUTRAMP;
++#endif
++
++#ifdef CONFIG_PAX_MPROTECT
++      if (!(elf_phdata->p_flags & PF_NOMPROTECT))
++              pax_flags |= PF_PAX_MPROTECT;
++#endif
++
++#if defined(CONFIG_PAX_RANDMMAP) || defined(CONFIG_PAX_RANDUSTACK)
++
++#ifdef CONFIG_PAX_SOFTMODE
++      if (pax_aslr)
++#endif
++
++      if (!(elf_phdata->p_flags & PF_NORANDMMAP))
++              pax_flags |= PF_PAX_RANDMMAP;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++
++#ifdef CONFIG_PAX_SOFTMODE
++      if (pax_aslr)
++#endif
++
++      if (!(elf_phdata->p_flags & PF_NORANDEXEC))
++              pax_flags |= PF_PAX_RANDEXEC;
++#endif
++
++      return pax_flags;
++}
++#endif
++
++#ifdef CONFIG_PAX_EI_PAX
++static int pax_parse_ei_pax(const struct elfhdr * const elf_ex)
++{
++      unsigned long pax_flags = 0UL;
++
++#ifdef CONFIG_PAX_PAGEEXEC
++      if (!(elf_ex->e_ident[EI_PAX] & EF_PAX_PAGEEXEC))
++              pax_flags |= PF_PAX_PAGEEXEC;
++#endif
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (!(elf_ex->e_ident[EI_PAX] & EF_PAX_SEGMEXEC))
++              pax_flags |= PF_PAX_SEGMEXEC;
++#endif
++
++#ifdef CONFIG_PAX_DEFAULT_PAGEEXEC
++      if (pax_flags & PF_PAX_PAGEEXEC)
++              pax_flags &= ~PF_PAX_SEGMEXEC;
++#endif
++
++#ifdef CONFIG_PAX_DEFAULT_SEGMEXEC
++      if (pax_flags & PF_PAX_SEGMEXEC)
++              pax_flags &= ~PF_PAX_PAGEEXEC;
++#endif
++
++#ifdef CONFIG_PAX_EMUTRAMP
++      if ((pax_flags & (PF_PAX_PAGEEXEC | PF_PAX_SEGMEXEC)) && (elf_ex->e_ident[EI_PAX] & EF_PAX_EMUTRAMP))
++              pax_flags |= PF_PAX_EMUTRAMP;
++#endif
++
++#ifdef CONFIG_PAX_MPROTECT
++      if ((pax_flags & (PF_PAX_PAGEEXEC | PF_PAX_SEGMEXEC)) && !(elf_ex->e_ident[EI_PAX] & EF_PAX_MPROTECT))
++              pax_flags |= PF_PAX_MPROTECT;
++#endif
++
++#ifdef CONFIG_PAX_ASLR
++
++#ifdef CONFIG_PAX_SOFTMODE
++      if (pax_aslr)
++#endif
++
++      if (!(elf_ex->e_ident[EI_PAX] & EF_PAX_RANDMMAP))
++              pax_flags |= PF_PAX_RANDMMAP;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++
++#ifdef CONFIG_PAX_SOFTMODE
++      if (pax_aslr)
++#endif
++
++      if ((elf_ex->e_ident[EI_PAX] & EF_PAX_RANDEXEC) && (elf_ex->e_type == ET_EXEC) && (pax_flags & PF_PAX_MPROTECT))
++              pax_flags |= PF_PAX_RANDEXEC;
++#endif
++
++      return pax_flags;
++}
++#endif
++
++#if defined(CONFIG_PAX_EI_PAX) || defined(CONFIG_PAX_PT_PAX_FLAGS)
++static int pax_parse_elf_flags(const struct elfhdr * const elf_ex, const struct elf_phdr * const elf_phdata)
++{
++      unsigned long pax_flags = 0UL;
++
++#ifdef CONFIG_PAX_PT_PAX_FLAGS
++      unsigned long i;
++#endif
++
++#ifdef CONFIG_PAX_EI_PAX
++      pax_flags = pax_parse_ei_pax(elf_ex);
++#endif
++
++#ifdef CONFIG_PAX_PT_PAX_FLAGS
++      for (i = 0UL; i < elf_ex->e_phnum; i++)
++              if (elf_phdata[i].p_type == PT_PAX_FLAGS) {
++                      if (((elf_phdata[i].p_flags & PF_PAGEEXEC) && (elf_phdata[i].p_flags & PF_NOPAGEEXEC)) ||
++                          ((elf_phdata[i].p_flags & PF_SEGMEXEC) && (elf_phdata[i].p_flags & PF_NOSEGMEXEC)) ||
++                          ((elf_phdata[i].p_flags & PF_EMUTRAMP) && (elf_phdata[i].p_flags & PF_NOEMUTRAMP)) ||
++                          ((elf_phdata[i].p_flags & PF_MPROTECT) && (elf_phdata[i].p_flags & PF_NOMPROTECT)) ||
++                          ((elf_phdata[i].p_flags & PF_RANDMMAP) && (elf_phdata[i].p_flags & PF_NORANDMMAP)) ||
++                          ((elf_phdata[i].p_flags & PF_RANDEXEC) && ((elf_phdata[i].p_flags & PF_NORANDEXEC) || elf_ex->e_type == ET_DYN || !(elf_phdata[i].p_flags & PF_MPROTECT))) ||
++                          (!(elf_phdata[i].p_flags & PF_NORANDEXEC) && (elf_ex->e_type == ET_DYN || (elf_phdata[i].p_flags & PF_NOMPROTECT))))
++                              return -EINVAL;
++
++#ifdef CONFIG_PAX_SOFTMODE
++                      if (pax_softmode)
++                              pax_flags = pax_parse_softmode(&elf_phdata[i]);
++                      else
++#endif
++
++                              pax_flags = pax_parse_hardmode(&elf_phdata[i]);
++                      break;
++              }
++#endif
++
++      if (0 > pax_check_flags(&pax_flags))
++              return -EINVAL;
++
++      current->flags |= pax_flags;
++      return 0;
++}
++#endif
++
+ /*
+  * These are the functions used to load ELF style executables and shared
+  * libraries.  There is no binary dependent code anywhere else.
+@@ -494,7 +735,13 @@
+       struct files_struct *files;
+       int have_pt_gnu_stack, executable_stack = EXSTACK_DEFAULT;
+       unsigned long def_flags = 0;
+-      
++      unsigned long task_size = TASK_SIZE;
++
++#ifdef CONFIG_PAX_RANDEXEC
++      unsigned long load_addr_random = 0UL;
++      unsigned long load_bias_random = 0UL;
++#endif
++
+       /* Get the exec-header */
+       elf_ex = *((struct elfhdr *) bprm->buf);
+@@ -618,6 +865,7 @@
+               elf_ppnt++;
+       }
++#if 0
+       elf_ppnt = elf_phdata;
+       for (i = 0; i < elf_ex.e_phnum; i++, elf_ppnt++)
+               if (elf_ppnt->p_type == PT_GNU_STACK) {
+@@ -627,6 +875,7 @@
+                               executable_stack = EXSTACK_DISABLE_X;
+                       break;
+               }
++#endif
+       have_pt_gnu_stack = (i < elf_ex.e_phnum);
+       /* Some simple consistency checks for the interpreter */
+@@ -694,9 +943,65 @@
+       current->mm->end_data = 0;
+       current->mm->end_code = 0;
+       current->mm->mmap = NULL;
++
++#ifdef CONFIG_PAX_DLRESOLVE
++      current->mm->call_dl_resolve = 0UL;
++#endif
++
++#if defined(CONFIG_PPC32) && defined(CONFIG_PAX_EMUSIGRT)
++      current->mm->call_syscall = 0UL;
++#endif
++
++#ifdef CONFIG_PAX_ASLR
++      current->mm->delta_mmap = 0UL;
++      current->mm->delta_exec = 0UL;
++      current->mm->delta_stack = 0UL;
++#endif
++
+       current->flags &= ~PF_FORKNOEXEC;
+       current->mm->def_flags = def_flags;
++#if defined(CONFIG_PAX_EI_PAX) || defined(CONFIG_PAX_PT_PAX_FLAGS)
++      if (0 > pax_parse_elf_flags(&elf_ex, elf_phdata)) {
++              send_sig(SIGKILL, current, 0);
++              goto out_free_dentry;
++      }
++#endif
++
++#ifdef CONFIG_PAX_HAVE_ACL_FLAGS
++      pax_set_flags(bprm);
++#elif defined(CONFIG_PAX_HOOK_ACL_FLAGS)
++      if (pax_set_flags_func)
++              (pax_set_flags_func)(bprm);
++#endif
++
++#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
++      if (current->flags & PF_PAX_PAGEEXEC)
++              current->mm->context.user_cs_limit = PAGE_SIZE;
++#endif
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (current->flags & PF_PAX_SEGMEXEC) {
++              int cpu = get_cpu();
++
++              current->mm->context.user_cs_base = SEGMEXEC_TASK_SIZE;
++              current->mm->context.user_cs_limit = -SEGMEXEC_TASK_SIZE;
++              set_user_cs(current->mm, cpu);
++              put_cpu();
++              task_size = SEGMEXEC_TASK_SIZE;
++      }
++#endif
++
++#ifdef CONFIG_PAX_ASLR
++      if (current->flags & PF_PAX_RANDMMAP) {
++#define pax_delta_mask(delta, lsb, len) (((delta) & ((1UL << (len)) - 1)) << (lsb))
++
++              current->mm->delta_mmap = pax_delta_mask(pax_get_random_long(), PAX_DELTA_MMAP_LSB(current), PAX_DELTA_MMAP_LEN(current));
++              current->mm->delta_exec = pax_delta_mask(pax_get_random_long(), PAX_DELTA_EXEC_LSB(current), PAX_DELTA_EXEC_LEN(current));
++              current->mm->delta_stack = pax_delta_mask(pax_get_random_long(), PAX_DELTA_STACK_LSB(current), PAX_DELTA_STACK_LEN(current));
++      }
++#endif
++
+       /* Do this immediately, since STACK_TOP as used in setup_arg_pages
+          may depend on the personality.  */
+       SET_PERSONALITY(elf_ex, ibcs2_interpreter);
+@@ -707,6 +1012,12 @@
+          change some of these later */
+       current->mm->rss = 0;
+       current->mm->free_area_cache = TASK_UNMAPPED_BASE;
++
++#ifdef CONFIG_PAX_RANDMMAP
++      if (current->flags & PF_PAX_RANDMMAP)
++              current->mm->free_area_cache += current->mm->delta_mmap;
++#endif
++
+       retval = setup_arg_pages(bprm, executable_stack);
+       if (retval < 0) {
+               send_sig(SIGKILL, current, 0);
+@@ -761,12 +1072,92 @@
+                       /* Try and get dynamic programs out of the way of the default mmap
+                          base, as well as whatever program they might try to exec.  This
+                          is because the brk will follow the loader, and is not movable.  */
++
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++                      if (current->flags & (PF_PAX_PAGEEXEC | PF_PAX_SEGMEXEC)) {
++                              load_bias = ELF_PAGESTART(PAX_ELF_ET_DYN_BASE(current) - vaddr);
++                              elf_flags |= MAP_FIXED;
++                      } else
++#endif
++
+                       load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
++
++#ifdef CONFIG_PAX_RANDMMAP
++                      /* PaX: randomize base address at the default exe base if requested */
++                      if (current->flags & PF_PAX_RANDMMAP)
++                              load_bias += ELF_PAGESTART(current->mm->delta_exec);
++#endif
++
+               }
+-              error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags);
+-              if (BAD_ADDR(error))
+-                      continue;
++#ifdef CONFIG_PAX_RANDEXEC
++              if ((current->flags & PF_PAX_RANDEXEC) && (elf_ex.e_type == ET_EXEC)) {
++                      error = -ENOMEM;
++
++#ifdef CONFIG_PAX_PAGEEXEC
++                      if (current->flags & PF_PAX_PAGEEXEC)
++                              error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot & ~PROT_EXEC, elf_flags);
++#endif
++
++#ifdef CONFIG_PAX_SEGMEXEC
++                      if (current->flags & PF_PAX_SEGMEXEC) {
++                              unsigned long addr, len;
++
++                              addr = ELF_PAGESTART(load_bias + vaddr);
++                              len = elf_ppnt->p_filesz + ELF_PAGEOFFSET(elf_ppnt->p_vaddr);
++                              if (len > SEGMEXEC_TASK_SIZE || addr > SEGMEXEC_TASK_SIZE-len)
++                                      continue;
++                              down_write(&current->mm->mmap_sem);
++                              error = __do_mmap_pgoff(bprm->file, addr, len, elf_prot, elf_flags, (elf_ppnt->p_offset - ELF_PAGEOFFSET(elf_ppnt->p_vaddr)) >> PAGE_SHIFT);
++                              up_write(&current->mm->mmap_sem);
++                      }
++#endif
++
++                      if (BAD_ADDR(error))
++                              continue;
++
++                      /* PaX: mirror at a randomized base */
++                      down_write(&current->mm->mmap_sem);
++
++                      if (!load_addr_set) {
++                              load_addr_random = get_unmapped_area(bprm->file, 0UL, elf_ppnt->p_filesz + ELF_PAGEOFFSET(elf_ppnt->p_vaddr), (elf_ppnt->p_offset - ELF_PAGEOFFSET(elf_ppnt->p_vaddr)) >> PAGE_SHIFT, MAP_PRIVATE);
++                              if (BAD_ADDR(load_addr_random)) {
++                                      up_write(&current->mm->mmap_sem);
++                                      continue;
++                              }
++                              load_bias_random = load_addr_random - vaddr;
++                      }
++
++#ifdef CONFIG_PAX_PAGEEXEC
++                      if (current->flags & PF_PAX_PAGEEXEC)
++                              load_addr_random = __do_mmap_pgoff(NULL, ELF_PAGESTART(load_bias_random + vaddr), 0UL, elf_prot, elf_flags | MAP_MIRROR, error);
++#endif
++
++#ifdef CONFIG_PAX_SEGMEXEC
++                      if (current->flags & PF_PAX_SEGMEXEC) {
++                              if (elf_prot & PROT_EXEC) {
++                                      load_addr_random = __do_mmap_pgoff(NULL, ELF_PAGESTART(load_bias_random + vaddr), elf_ppnt->p_memsz + ELF_PAGEOFFSET(elf_ppnt->p_vaddr), PROT_NONE, MAP_PRIVATE | MAP_FIXED, 0UL);
++                                      if (!BAD_ADDR(load_addr_random)) {
++                                              load_addr_random = __do_mmap_pgoff(NULL, ELF_PAGESTART(load_bias_random + vaddr + SEGMEXEC_TASK_SIZE), 0UL, elf_prot, elf_flags | MAP_MIRROR, error);
++                                              if (!BAD_ADDR(load_addr_random))
++                                                      load_addr_random -= SEGMEXEC_TASK_SIZE;
++                                      }
++                              } else
++                                      load_addr_random = __do_mmap_pgoff(NULL, ELF_PAGESTART(load_bias_random + vaddr), 0UL, elf_prot, elf_flags | MAP_MIRROR, error);
++                      }
++#endif
++
++                      up_write(&current->mm->mmap_sem);
++                      if (BAD_ADDR(load_addr_random))
++                              continue;
++              } else
++#endif
++
++              {
++                      error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags);
++                      if (BAD_ADDR(error))
++                              continue;
++              }
+               if (!load_addr_set) {
+                       load_addr_set = 1;
+@@ -777,6 +1168,11 @@
+                               load_addr += load_bias;
+                               reloc_func_desc = load_bias;
+                       }
++
++#ifdef CONFIG_PAX_RANDEXEC
++                      current->mm->delta_exec = load_addr_random - load_addr;
++#endif
++
+               }
+               k = elf_ppnt->p_vaddr;
+               if (k < start_code) start_code = k;
+@@ -787,9 +1183,9 @@
+                * allowed task size. Note that p_filesz must always be
+                * <= p_memsz so it is only necessary to check p_memsz.
+                */
+-              if (k > TASK_SIZE || elf_ppnt->p_filesz > elf_ppnt->p_memsz ||
+-                  elf_ppnt->p_memsz > TASK_SIZE ||
+-                  TASK_SIZE - elf_ppnt->p_memsz < k) {
++              if (k > task_size || elf_ppnt->p_filesz > elf_ppnt->p_memsz ||
++                  elf_ppnt->p_memsz > task_size ||
++                  task_size - elf_ppnt->p_memsz < k) {
+                       /* set_brk can never work.  Avoid overflows.  */
+                       send_sig(SIGKILL, current, 0);
+                       goto out_free_dentry;
+@@ -816,6 +1212,16 @@
+       start_data += load_bias;
+       end_data += load_bias;
++#ifdef CONFIG_PAX_RANDMMAP
++
++#ifdef CONFIG_PAX_SOFTMODE
++      if (pax_aslr)
++#endif
++
++      elf_brk += PAGE_SIZE + pax_delta_mask(pax_get_random_long(), 4, PAGE_SHIFT);
++#undef pax_delta_mask
++#endif
++
+       /* Calling set_brk effectively mmaps the pages that we need
+        * for the bss and break sections.  We must do this before
+        * mapping in the interpreter, to make sure it doesn't wind
+@@ -1108,8 +1514,11 @@
+ #undef DUMP_SEEK
+ #define DUMP_WRITE(addr, nr)  \
++      do { \
++      gr_learn_resource(current, RLIMIT_CORE, size + (nr), 1); \
+       if ((size += (nr)) > limit || !dump_write(file, (addr), (nr))) \
+-              goto end_coredump;
++              goto end_coredump; \
++      } while (0);
+ #define DUMP_SEEK(off)        \
+       if (!dump_seek(file, (off))) \
+               goto end_coredump;
+diff -uNr linux-2.6.8/fs/binfmt_flat.c linux-2.6.8.grsecurity/fs/binfmt_flat.c
+--- linux-2.6.8/fs/binfmt_flat.c       2004-08-14 07:36:10.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/binfmt_flat.c    2004-08-16 17:08:28.000000000 +0200
+@@ -540,7 +540,9 @@
+                               realdatastart = (unsigned long) -ENOMEM;
+                       printk("Unable to allocate RAM for process data, errno %d\n",
+                                       (int)-datapos);
++                      down_write(&current->mm->mmap_sem);
+                       do_munmap(current->mm, textpos, text_len);
++                      up_write(&current->mm->mmap_sem);
+                       return realdatastart;
+               }
+               datapos = realdatastart + MAX_SHARED_LIBS * sizeof(unsigned long);
+@@ -561,8 +563,10 @@
+               }
+               if (result >= (unsigned long)-4096) {
+                       printk("Unable to read data+bss, errno %d\n", (int)-result);
++                      down_write(&current->mm->mmap_sem);
+                       do_munmap(current->mm, textpos, text_len);
+                       do_munmap(current->mm, realdatastart, data_len + extra);
++                      up_write(&current->mm->mmap_sem);
+                       return result;
+               }
+@@ -624,8 +628,10 @@
+               }
+               if (result >= (unsigned long)-4096) {
+                       printk("Unable to read code+data+bss, errno %d\n",(int)-result);
++                      down_write(&current->mm->mmap_sem);
+                       do_munmap(current->mm, textpos, text_len + data_len + extra +
+                               MAX_SHARED_LIBS * sizeof(unsigned long));
++                      up_write(&current->mm->mmap_sem);
+                       return result;
+               }
+       }
+diff -uNr linux-2.6.8/fs/binfmt_misc.c linux-2.6.8.grsecurity/fs/binfmt_misc.c
+--- linux-2.6.8/fs/binfmt_misc.c       2004-08-14 07:36:48.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/binfmt_misc.c    2004-08-16 17:08:28.000000000 +0200
+@@ -112,9 +112,11 @@
+       struct files_struct *files = NULL;
+       retval = -ENOEXEC;
+-      if (!enabled)
++      if (!enabled || bprm->misc)
+               goto _ret;
++      bprm->misc++;
++
+       /* to keep locking time low, we copy the interpreter string */
+       read_lock(&entries_lock);
+       fmt = check_file(bprm);
+diff -uNr linux-2.6.8/fs/buffer.c linux-2.6.8.grsecurity/fs/buffer.c
+--- linux-2.6.8/fs/buffer.c    2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/buffer.c 2004-08-16 17:08:28.000000000 +0200
+@@ -37,6 +37,7 @@
+ #include <linux/bio.h>
+ #include <linux/notifier.h>
+ #include <linux/cpu.h>
++#include <linux/grsecurity.h>
+ #include <asm/bitops.h>
+ static void invalidate_bh_lrus(void);
+@@ -2234,6 +2235,9 @@
+       int err;
+       err = -EFBIG;
++
++      gr_learn_resource(current, RLIMIT_FSIZE, (unsigned long) size, 1);
++
+         limit = current->rlim[RLIMIT_FSIZE].rlim_cur;
+       if (limit != RLIM_INFINITY && size > (loff_t)limit) {
+               send_sig(SIGXFSZ, current, 0);
+diff -uNr linux-2.6.8/fs/compat.c linux-2.6.8.grsecurity/fs/compat.c
+--- linux-2.6.8/fs/compat.c    2004-08-14 07:36:57.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/compat.c 2004-08-16 17:08:28.000000000 +0200
+@@ -41,6 +41,7 @@
+ #include <linux/nfsd/nfsd.h>
+ #include <linux/nfsd/syscall.h>
+ #include <linux/personality.h>
++#include <linux/grsecurity.h>
+ #include <net/sock.h>         /* siocdevprivate_ioctl */
+@@ -1372,6 +1373,11 @@
+       struct file *file;
+       int retval;
+       int i;
++#ifdef CONFIG_GRKERNSEC
++      struct file *old_exec_file;
++      struct acl_subject_label *old_acl;
++      struct rlimit old_rlim[RLIM_NLIMITS];
++#endif
+       sched_balance_exec();
+@@ -1381,6 +1387,20 @@
+       if (IS_ERR(file))
+               return retval;
++      gr_learn_resource(current, RLIMIT_NPROC, atomic_read(&current->user->processes), 1);
++
++      if (gr_handle_nproc()) {
++              allow_write_access(file);
++              fput(file);
++              return -EAGAIN;
++      }
++
++      if (!gr_acl_handle_execve(file->f_dentry, file->f_vfsmnt)) {
++              allow_write_access(file);
++              fput(file);
++              return -EACCES;
++      }
++
+       bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
+       memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0]));
+@@ -1429,15 +1449,49 @@
+       if (retval < 0)
+               goto out;
++      if (!gr_tpe_allow(file)) {
++              retval = -EACCES;
++              goto out;
++      }
++
++      if (gr_check_crash_exec(file)) {
++              retval = -EACCES;
++              goto out;
++      }
++
++      gr_log_chroot_exec(file->f_dentry, file->f_vfsmnt);
++
++#ifdef CONFIG_GRKERNSEC
++      old_acl = current->acl;
++      memcpy(old_rlim, current->rlim, sizeof(old_rlim));
++      old_exec_file = current->exec_file;
++      get_file(file);
++      current->exec_file = file;
++#endif
++
++      gr_set_proc_label(file->f_dentry, file->f_vfsmnt);
++
+       retval = search_binary_handler(&bprm,regs);
+       if (retval >= 0) {
+               free_arg_pages(&bprm);
++#ifdef CONFIG_GRKERNSEC
++              if (old_exec_file)
++                      fput(old_exec_file);
++#endif
++
+               /* execve success */
+               security_bprm_free(&bprm);
+               return retval;
+       }
++#ifdef CONFIG_GRKERNSEC
++      current->acl = old_acl;
++      memcpy(current->rlim, old_rlim, sizeof(old_rlim));
++      fput(current->exec_file);
++      current->exec_file = old_exec_file;
++#endif
++
+ out:
+       /* Something went wrong, return the inode and free the argument pages*/
+       for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
+diff -uNr linux-2.6.8/fs/dcache.c linux-2.6.8.grsecurity/fs/dcache.c
+--- linux-2.6.8/fs/dcache.c    2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/dcache.c 2004-08-16 17:08:28.000000000 +0200
+@@ -1277,7 +1277,7 @@
+  *
+  * "buflen" should be positive. Caller holds the dcache_lock.
+  */
+-static char * __d_path( struct dentry *dentry, struct vfsmount *vfsmnt,
++char * __d_path( struct dentry *dentry, struct vfsmount *vfsmnt,
+                       struct dentry *root, struct vfsmount *rootmnt,
+                       char *buffer, int buflen)
+ {
+diff -uNr linux-2.6.8/fs/exec.c linux-2.6.8.grsecurity/fs/exec.c
+--- linux-2.6.8/fs/exec.c      2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/exec.c   2004-08-16 17:50:08.000000000 +0200
+@@ -46,6 +46,8 @@
+ #include <linux/security.h>
+ #include <linux/syscalls.h>
+ #include <linux/rmap.h>
++#include <linux/grsecurity.h>
++#include <linux/random.h>
+ #include <asm/uaccess.h>
+ #include <asm/mmu_context.h>
+@@ -61,6 +63,20 @@
+ static struct linux_binfmt *formats;
+ static rwlock_t binfmt_lock = RW_LOCK_UNLOCKED;
++#ifdef CONFIG_PAX_SOFTMODE
++
++#if defined(CONFIG_PAX_RANDMMAP) || defined(CONFIG_PAX_RANDUSTACK) || defined(CONFIG_PAX_RANDKSTACK)
++unsigned int pax_aslr=1;
++#endif
++
++unsigned int pax_softmode;
++#endif
++
++#ifdef CONFIG_PAX_HOOK_ACL_FLAGS
++void (*pax_set_flags_func)(struct linux_binprm * bprm);
++EXPORT_SYMBOL(pax_set_flags_func);
++#endif
++
+ int register_binfmt(struct linux_binfmt * fmt)
+ {
+       struct linux_binfmt ** tmp = &formats;
+@@ -305,6 +321,10 @@
+       if (unlikely(anon_vma_prepare(vma)))
+               goto out_sig;
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (page_count(page) == 1)
++#endif
++
+       flush_dcache_page(page);
+       pgd = pgd_offset(mm, address);
+@@ -320,6 +340,11 @@
+               goto out;
+       }
+       mm->rss++;
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (page_count(page) == 1)
++#endif
++
+       lru_cache_add_active(page);
+       set_pte(pte, pte_mkdirty(pte_mkwrite(mk_pte(
+                                       page, vma->vm_page_prot))));
+@@ -344,6 +369,10 @@
+       int i;
+       long arg_size;
++#ifdef CONFIG_PAX_SEGMEXEC
++      struct vm_area_struct *mpnt_m = NULL;
++#endif
++
+ #ifdef CONFIG_STACK_GROWSUP
+       /* Move the argument and environment strings to the bottom of the
+        * stack space.
+@@ -403,8 +432,24 @@
+       if (!mpnt)
+               return -ENOMEM;
++#ifdef CONFIG_PAX_SEGMEXEC
++      if ((current->flags & PF_PAX_SEGMEXEC) && (VM_STACK_FLAGS & VM_MAYEXEC)) {
++              mpnt_m = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
++              if (!mpnt_m) {
++                      kmem_cache_free(vm_area_cachep, mpnt);
++                      return -ENOMEM;
++              }
++      }
++#endif
++
+       if (security_vm_enough_memory(arg_size >> PAGE_SHIFT)) {
+               kmem_cache_free(vm_area_cachep, mpnt);
++
++#ifdef CONFIG_PAX_SEGMEXEC
++              if (mpnt_m)
++                      kmem_cache_free(vm_area_cachep, mpnt_m);
++#endif
++
+               return -ENOMEM;
+       }
+@@ -431,9 +476,36 @@
+               else
+                       mpnt->vm_flags = VM_STACK_FLAGS;
+               mpnt->vm_flags |= mm->def_flags;
+-              mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7];
++
++#ifdef CONFIG_PAX_PAGEEXEC
++              if (!(current->flags & PF_PAX_PAGEEXEC))
++                      mpnt->vm_page_prot = protection_map[(mpnt->vm_flags | VM_EXEC) & 0x7];
++              else
++#endif
++                      mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7];
++
+               insert_vm_struct(mm, mpnt);
+               mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
++
++#ifdef CONFIG_PAX_SEGMEXEC
++              if (mpnt_m) {
++                      *mpnt_m = *mpnt;
++                      if (!(mpnt->vm_flags & VM_EXEC)) {
++                              mpnt_m->vm_flags &= ~(VM_READ | VM_WRITE | VM_EXEC);
++                              mpnt_m->vm_page_prot = PAGE_NONE;
++                      }
++                      mpnt_m->vm_start += SEGMEXEC_TASK_SIZE;
++                      mpnt_m->vm_end += SEGMEXEC_TASK_SIZE;
++                      mpnt_m->vm_flags |= VM_MIRROR;
++                      mpnt->vm_flags |= VM_MIRROR;
++                      mpnt_m->vm_mirror = mpnt->vm_start - mpnt_m->vm_start;
++                      mpnt->vm_mirror = mpnt_m->vm_start - mpnt->vm_start;
++                      insert_vm_struct(mm, mpnt_m);
++                      mpnt_m->vm_pgoff = mpnt->vm_pgoff;
++                      mm->total_vm += (mpnt_m->vm_end - mpnt_m->vm_start) >> PAGE_SHIFT;
++              }
++#endif
++
+       }
+       for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
+@@ -441,6 +513,14 @@
+               if (page) {
+                       bprm->page[i] = NULL;
+                       install_arg_page(mpnt, page, stack_base);
++
++#if defined(CONFIG_PAX_SEGMEXEC) && defined(CONFIG_PAX_MPROTECT)
++                      if (mpnt_m) {
++                              page_cache_get(page);
++                              install_arg_page(mpnt_m, page, stack_base + SEGMEXEC_TASK_SIZE);
++                      }
++#endif
++
+               }
+               stack_base += PAGE_SIZE;
+       }
+@@ -836,6 +916,30 @@
+       }
+       current->comm[i] = '\0';
++#ifdef CONFIG_PAX_PAGEEXEC
++      current->flags &= ~PF_PAX_PAGEEXEC;
++#endif
++
++#ifdef CONFIG_PAX_EMUTRAMP
++      current->flags &= ~PF_PAX_EMUTRAMP;
++#endif
++
++#ifdef CONFIG_PAX_MPROTECT
++      current->flags &= ~PF_PAX_MPROTECT;
++#endif
++
++#ifdef CONFIG_PAX_ASLR
++      current->flags &= ~PF_PAX_RANDMMAP;
++#endif
++
++#ifdef CONFIG_PAX_RANDEXEC
++      current->flags &= ~PF_PAX_RANDEXEC;
++#endif
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      current->flags &= ~PF_PAX_SEGMEXEC;
++#endif
++
+       flush_thread();
+       if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || 
+@@ -1078,6 +1182,11 @@
+       struct file *file;
+       int retval;
+       int i;
++#ifdef CONFIG_GRKERNSEC
++      struct file *old_exec_file;
++      struct acl_subject_label *old_acl;
++      struct rlimit old_rlim[RLIM_NLIMITS];
++#endif
+       file = open_exec(filename);
+@@ -1087,7 +1196,29 @@
+       sched_balance_exec();
++      gr_learn_resource(current, RLIMIT_NPROC, atomic_read(&current->user->processes), 1);
++
++      if (gr_handle_nproc()) {
++              allow_write_access(file);
++              fput(file);
++              return -EAGAIN;
++      }
++
++      if (!gr_acl_handle_execve(file->f_dentry, file->f_vfsmnt)) {
++              allow_write_access(file);
++              fput(file);
++              return -EACCES;
++      }
++
+       bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
++
++#ifdef CONFIG_PAX_RANDUSTACK
++#ifdef CONFIG_PAX_SOFTMODE
++      if (pax_aslr)
++#endif
++      bprm.p -= (pax_get_random_long() & ~(sizeof(void *)-1)) & ~PAGE_MASK;
++#endif
++
+       memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0]));
+       bprm.file = file;
+@@ -1096,6 +1227,7 @@
+       bprm.interp_flags = 0;
+       bprm.interp_data = 0;
+       bprm.sh_bang = 0;
++      bprm.misc = 0;
+       bprm.loader = 0;
+       bprm.exec = 0;
+       bprm.security = NULL;
+@@ -1124,11 +1256,26 @@
+       if (retval < 0)
+               goto out;
++      if (!gr_tpe_allow(file)) {
++              retval = -EACCES;
++              goto out;
++      }
++
++      if (gr_check_crash_exec(file)) {
++              retval = -EACCES;
++              goto out;
++      }
++
+       retval = copy_strings_kernel(1, &bprm.filename, &bprm);
+       if (retval < 0)
+               goto out;
+       bprm.exec = bprm.p;
++
++      gr_log_chroot_exec(file->f_dentry, file->f_vfsmnt);
++
++      gr_handle_exec_args(&bprm, argv);
++
+       retval = copy_strings(bprm.envc, envp, &bprm);
+       if (retval < 0)
+               goto out;
+@@ -1137,8 +1284,24 @@
+       if (retval < 0)
+               goto out;
++#ifdef CONFIG_GRKERNSEC
++      old_acl = current->acl;
++      memcpy(old_rlim, current->rlim, sizeof(old_rlim));
++      old_exec_file = current->exec_file;
++      get_file(file);
++      current->exec_file = file;
++#endif
++
++      retval = gr_set_proc_label(file->f_dentry, file->f_vfsmnt);
++      if (retval < 0)
++              goto out_fail;
++
+       retval = search_binary_handler(&bprm,regs);
+       if (retval >= 0) {
++#ifdef CONFIG_GRKERNSEC
++              if (old_exec_file)
++                      fput(old_exec_file);
++#endif
+               free_arg_pages(&bprm);
+               /* execve success */
+@@ -1146,6 +1309,14 @@
+               return retval;
+       }
++out_fail:
++#ifdef CONFIG_GRKERNSEC
++      current->acl = old_acl;
++      memcpy(current->rlim, old_rlim, sizeof(old_rlim));
++      fput(current->exec_file);
++      current->exec_file = old_exec_file;
++#endif
++
+ out:
+       /* Something went wrong, return the inode and free the argument pages*/
+       for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
+@@ -1303,6 +1474,138 @@
+       *out_ptr = 0;
+ }
++int pax_check_flags(unsigned long * flags)
++{
++      int retval = 0;
++
++#if !defined(__i386__) || !defined(CONFIG_PAX_SEGMEXEC)
++      if (*flags & PF_PAX_SEGMEXEC)
++      {
++              *flags &= ~PF_PAX_SEGMEXEC;
++              retval = -EINVAL;
++      }
++#endif
++
++      if ((*flags & PF_PAX_PAGEEXEC)
++
++#ifdef CONFIG_PAX_PAGEEXEC
++          &&  (*flags & PF_PAX_SEGMEXEC)
++#endif
++
++         )
++      {
++              *flags &= ~PF_PAX_PAGEEXEC;
++              retval = -EINVAL;
++      }
++
++      if ((*flags & PF_PAX_MPROTECT)
++
++#ifdef CONFIG_PAX_MPROTECT
++          && !(*flags & (PF_PAX_PAGEEXEC | PF_PAX_SEGMEXEC))
++#endif
++
++         )
++      {
++              *flags &= ~PF_PAX_MPROTECT;
++              retval = -EINVAL;
++      }
++
++      if ((*flags & PF_PAX_EMUTRAMP)
++
++#ifdef CONFIG_PAX_EMUTRAMP
++          && !(*flags & (PF_PAX_PAGEEXEC | PF_PAX_SEGMEXEC))
++#endif
++
++         )
++      {
++              *flags &= ~PF_PAX_EMUTRAMP;
++              retval = -EINVAL;
++      }
++
++      if ((*flags & PF_PAX_RANDEXEC)
++
++#ifdef CONFIG_PAX_RANDEXEC
++          && !(*flags & PF_PAX_MPROTECT)
++#endif
++
++         )
++      {
++              *flags &= ~PF_PAX_RANDEXEC;
++              retval = -EINVAL;
++      }
++
++      return retval;
++}
++
++EXPORT_SYMBOL(pax_check_flags);
++
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++void pax_report_fault(struct pt_regs *regs, void *pc, void *sp)
++{
++      struct task_struct *tsk = current;
++      struct mm_struct *mm = current->mm;
++      char* buffer_exec = (char*)__get_free_page(GFP_ATOMIC);
++      char* buffer_fault = (char*)__get_free_page(GFP_ATOMIC);
++      char* path_exec=NULL;
++      char* path_fault=NULL;
++      unsigned long start=0UL, end=0UL, offset=0UL;
++
++      if (buffer_exec && buffer_fault) {
++              struct vm_area_struct* vma, * vma_exec=NULL, * vma_fault=NULL;
++
++              down_read(&mm->mmap_sem);
++              vma = mm->mmap;
++              while (vma && (!vma_exec || !vma_fault)) {
++                      if ((vma->vm_flags & VM_EXECUTABLE) && vma->vm_file)
++                              vma_exec = vma;
++                      if (vma->vm_start <= (unsigned long)pc && (unsigned long)pc < vma->vm_end)
++                              vma_fault = vma;
++                      vma = vma->vm_next;
++              }
++              if (vma_exec) {
++                      path_exec = d_path(vma_exec->vm_file->f_dentry, vma_exec->vm_file->f_vfsmnt, buffer_exec, PAGE_SIZE);
++                      if (IS_ERR(path_exec))
++                              path_exec = "<path too long>";
++              }
++              if (vma_fault) {
++                      start = vma_fault->vm_start;
++                      end = vma_fault->vm_end;
++                      offset = vma_fault->vm_pgoff << PAGE_SHIFT;
++                      if (vma_fault->vm_file) {
++                              path_fault = d_path(vma_fault->vm_file->f_dentry, vma_fault->vm_file->f_vfsmnt, buffer_fault, PAGE_SIZE);
++                              if (IS_ERR(path_fault))
++                                      path_fault = "<path too long>";
++                      } else
++                              path_fault = "<anonymous mapping>";
++              }
++              up_read(&mm->mmap_sem);
++      }
++      printk(KERN_ERR "PAX: execution attempt in: %s, %08lx-%08lx %08lx\n", path_fault, start, end, offset);
++      if (current->curr_ip && gr_acl_is_enabled())
++              printk(KERN_ERR "PAX: From %u.%u.%u.%u: (%.64s:%c:%.950s) terminating task: %s(%s):%d, uid/euid: %u/%u, "
++                              "PC: %p, SP: %p\n", NIPQUAD(tsk->curr_ip), tsk->role->rolename, gr_roletype_to_char(),
++                              tsk->acl->filename, path_exec, tsk->comm, tsk->pid,
++                              tsk->uid, tsk->euid, pc, sp);
++      else if (current->curr_ip)
++              printk(KERN_ERR "PAX: From %u.%u.%u.%u: terminating task: %s(%s):%d, uid/euid: %u/%u, "
++                              "PC: %p, SP: %p\n", NIPQUAD(tsk->curr_ip), path_exec, tsk->comm, tsk->pid,
++                              tsk->uid, tsk->euid, pc, sp);
++      else if (gr_acl_is_enabled())
++              printk(KERN_ERR "PAX: (%.64s:%c:%.950s) terminating task: %s(%s):%d, uid/euid: %u/%u, "
++                              "PC: %p, SP: %p\n", tsk->role->rolename, gr_roletype_to_char(),
++                              tsk->acl->filename, path_exec, tsk->comm, tsk->pid,
++                              tsk->uid, tsk->euid, pc, sp);
++      else
++              printk(KERN_ERR "PAX: terminating task: %s(%s):%d, uid/euid: %u/%u, "
++                              "PC: %p, SP: %p\n", path_exec, tsk->comm, tsk->pid,
++                              tsk->uid, tsk->euid, pc, sp);
++      if (buffer_exec) free_page((unsigned long)buffer_exec);
++      if (buffer_fault) free_page((unsigned long)buffer_fault);
++      pax_report_insns(pc, sp);
++      do_coredump(SIGKILL, SIGKILL, regs);
++}
++#endif
++
+ static void zap_threads (struct mm_struct *mm)
+ {
+       struct task_struct *g, *p;
+@@ -1372,6 +1675,10 @@
+       current->signal->group_exit_code = exit_code;
+       coredump_wait(mm);
++      if (signr == SIGKILL || signr == SIGILL)
++              gr_handle_brute_attach(current);
++
++      gr_learn_resource(current, RLIMIT_CORE, binfmt->min_coredump, 1);
+       if (current->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump)
+               goto fail_unlock;
+@@ -1391,7 +1698,7 @@
+               goto close_fail;
+       if (!file->f_op->write)
+               goto close_fail;
+-      if (do_truncate(file->f_dentry, 0) != 0)
++      if (do_truncate(file->f_dentry, 0, file->f_vfsmnt) != 0)
+               goto close_fail;
+       retval = binfmt->core_dump(signr, regs, file);
+diff -uNr linux-2.6.8/fs/fcntl.c linux-2.6.8.grsecurity/fs/fcntl.c
+--- linux-2.6.8/fs/fcntl.c     2004-08-14 07:37:25.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/fcntl.c  2004-08-16 17:08:28.000000000 +0200
+@@ -14,6 +14,7 @@
+ #include <linux/module.h>
+ #include <linux/security.h>
+ #include <linux/ptrace.h>
++#include <linux/grsecurity.h>
+ #include <asm/poll.h>
+ #include <asm/siginfo.h>
+@@ -86,6 +87,9 @@
+       int error;
+       error = -EINVAL;
++
++      gr_learn_resource(current, RLIMIT_NOFILE, orig_start, 0);
++
+       if (orig_start >= current->rlim[RLIMIT_NOFILE].rlim_cur)
+               goto out;
+@@ -105,6 +109,9 @@
+       }
+       
+       error = -EMFILE;
++
++      gr_learn_resource(current, RLIMIT_NOFILE, newfd, 0);
++
+       if (newfd >= current->rlim[RLIMIT_NOFILE].rlim_cur)
+               goto out;
+@@ -154,6 +161,8 @@
+       struct file * file, *tofree;
+       struct files_struct * files = current->files;
++      gr_learn_resource(current, RLIMIT_NOFILE, newfd, 0);
++
+       spin_lock(&files->file_lock);
+       if (!(file = fcheck(oldfd)))
+               goto out_unlock;
+@@ -494,13 +503,15 @@
+       if (pid > 0) {
+               p = find_task_by_pid(pid);
+               if (p) {
+-                      send_sigio_to_task(p, fown, fd, band);
++                      if (!gr_check_protected_task(p))
++                              send_sigio_to_task(p, fown, fd, band);
+               }
+       } else {
+               struct list_head *l;
+               struct pid *pidptr;
+               for_each_task_pid(-pid, PIDTYPE_PGID, p, l, pidptr) {
+-                      send_sigio_to_task(p, fown, fd, band);
++                      if (!gr_check_protected_task(p) && !gr_pid_is_chrooted(p))
++                              send_sigio_to_task(p, fown, fd, band);
+               }
+       }
+       read_unlock(&tasklist_lock);
+diff -uNr linux-2.6.8/fs/Kconfig linux-2.6.8.grsecurity/fs/Kconfig
+--- linux-2.6.8/fs/Kconfig     2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/Kconfig  2004-08-16 17:08:28.000000000 +0200
+@@ -806,6 +806,7 @@
+ config PROC_KCORE
+       bool
++      depends on !GRKERNSEC_PROC_ADD
+       default y if !ARM
+ config SYSFS
+diff -uNr linux-2.6.8/fs/namei.c linux-2.6.8.grsecurity/fs/namei.c
+--- linux-2.6.8/fs/namei.c     2004-08-14 07:36:45.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/namei.c  2004-08-16 17:08:28.000000000 +0200
+@@ -27,6 +27,7 @@
+ #include <linux/security.h>
+ #include <linux/mount.h>
+ #include <linux/audit.h>
++#include <linux/grsecurity.h>
+ #include <asm/namei.h>
+ #include <asm/uaccess.h>
+@@ -483,6 +484,13 @@
+       err = security_inode_follow_link(dentry, nd);
+       if (err)
+               goto loop;
++
++      if (gr_handle_follow_link(dentry->d_parent->d_inode,
++                                dentry->d_inode, dentry, nd->mnt)) {
++              err = -EACCES;
++              goto loop;
++      }
++
+       current->link_count++;
+       current->total_link_count++;
+       nd->depth++;
+@@ -844,6 +852,10 @@
+                               break;
+               }
+ return_base:
++              if (!gr_acl_handle_hidden_file(nd->dentry, nd->mnt)) {
++                      path_release(nd);
++                      return -ENOENT;
++              }
+               return 0;
+ out_dput:
+               dput(next.dentry);
+@@ -1293,7 +1305,7 @@
+               if (!error) {
+                       DQUOT_INIT(inode);
+                       
+-                      error = do_truncate(dentry, 0);
++                      error = do_truncate(dentry, 0, nd->mnt);
+               }
+               put_write_access(inode);
+               if (error)
+@@ -1344,6 +1356,17 @@
+               error = path_lookup(pathname, lookup_flags(flag)|LOOKUP_OPEN, nd);
+               if (error)
+                       return error;
++
++              if (gr_handle_rawio(nd->dentry->d_inode)) {
++                      error = -EPERM;
++                      goto exit;
++              }
++
++              if (!gr_acl_handle_open(nd->dentry, nd->mnt, flag)) {
++                      error = -EACCES;
++                      goto exit;
++              }
++
+               goto ok;
+       }
+@@ -1377,9 +1400,19 @@
+       /* Negative dentry, just create the file */
+       if (!dentry->d_inode) {
++              if (!gr_acl_handle_creat(dentry, nd->dentry, nd->mnt, flag, mode)) {
++                      error = -EACCES;
++                      up(&dir->d_inode->i_sem);
++                      goto exit_dput;
++              }
++
+               if (!IS_POSIXACL(dir->d_inode))
+                       mode &= ~current->fs->umask;
+               error = vfs_create(dir->d_inode, dentry, mode, nd);
++
++              if (!error)
++                      gr_handle_create(dentry, nd->mnt);
++
+               up(&dir->d_inode->i_sem);
+               dput(nd->dentry);
+               nd->dentry = dentry;
+@@ -1394,6 +1427,25 @@
+       /*
+        * It already exists.
+        */
++
++      if (gr_handle_rawio(dentry->d_inode)) {
++              error = -EPERM;
++              up(&dir->d_inode->i_sem);
++              goto exit_dput;
++      }
++
++      if (!gr_acl_handle_open(dentry, nd->mnt, flag)) {
++              up(&dir->d_inode->i_sem);
++              error = -EACCES;
++              goto exit_dput;
++      }
++
++      if (gr_handle_fifo(dentry, nd->mnt, dir, flag, acc_mode)) {
++              up(&dir->d_inode->i_sem);
++              error = -EACCES;
++              goto exit_dput;
++      }
++
+       up(&dir->d_inode->i_sem);
+       error = -EEXIST;
+@@ -1447,6 +1499,13 @@
+       error = security_inode_follow_link(dentry, nd);
+       if (error)
+               goto exit_dput;
++
++      if (gr_handle_follow_link(dentry->d_parent->d_inode, dentry->d_inode,
++                                dentry, nd->mnt)) {
++              error = -EACCES;
++              goto exit_dput;
++      }
++
+       touch_atime(nd->mnt, dentry);
+       nd_set_link(nd, NULL);
+       error = dentry->d_inode->i_op->follow_link(dentry, nd);
+@@ -1562,6 +1621,22 @@
+       if (!IS_POSIXACL(nd.dentry->d_inode))
+               mode &= ~current->fs->umask;
+       if (!IS_ERR(dentry)) {
++              if (gr_handle_chroot_mknod(dentry, nd.mnt, mode)) {
++                      error = -EPERM;
++                      dput(dentry);
++                      up(&nd.dentry->d_inode->i_sem);
++                      path_release(&nd);
++                      goto out;
++              }
++
++              if (!gr_acl_handle_mknod(dentry, nd.dentry, nd.mnt, mode)) {
++                      error = -EACCES;
++                      dput(dentry);
++                      up(&nd.dentry->d_inode->i_sem);
++                      path_release(&nd);
++                      goto out;
++              }
++
+               switch (mode & S_IFMT) {
+               case 0: case S_IFREG:
+                       error = vfs_create(nd.dentry->d_inode,dentry,mode,&nd);
+@@ -1579,6 +1654,10 @@
+               default:
+                       error = -EINVAL;
+               }
++
++              if (!error)
++                      gr_handle_create(dentry, nd.mnt);
++
+               dput(dentry);
+       }
+       up(&nd.dentry->d_inode->i_sem);
+@@ -1630,9 +1709,19 @@
+               dentry = lookup_create(&nd, 1);
+               error = PTR_ERR(dentry);
+               if (!IS_ERR(dentry)) {
++                      error = 0;
+                       if (!IS_POSIXACL(nd.dentry->d_inode))
+                               mode &= ~current->fs->umask;
+-                      error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
++
++                      if (!gr_acl_handle_mkdir(dentry, nd.dentry, nd.mnt))
++                              error = -EACCES;
++
++                      if (!error)
++                              error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
++
++                      if (!error)
++                              gr_handle_create(dentry, nd.mnt);
++
+                       dput(dentry);
+               }
+               up(&nd.dentry->d_inode->i_sem);
+@@ -1716,6 +1805,8 @@
+       char * name;
+       struct dentry *dentry;
+       struct nameidata nd;
++      ino_t saved_ino = 0;
++      dev_t saved_dev = 0;
+       name = getname(pathname);
+       if(IS_ERR(name))
+@@ -1740,7 +1831,21 @@
+       dentry = lookup_hash(&nd.last, nd.dentry);
+       error = PTR_ERR(dentry);
+       if (!IS_ERR(dentry)) {
+-              error = vfs_rmdir(nd.dentry->d_inode, dentry);
++              error = 0;
++              if (dentry->d_inode) {
++                      if (dentry->d_inode->i_nlink <= 1) {
++                              saved_ino = dentry->d_inode->i_ino;
++                              saved_dev = dentry->d_inode->i_sb->s_dev;
++                      }
++
++                      if (!gr_acl_handle_rmdir(dentry, nd.mnt))
++                              error = -EACCES;
++              }
++
++              if (!error)
++                      error = vfs_rmdir(nd.dentry->d_inode, dentry);
++              if (!error && (saved_dev || saved_ino))
++                      gr_handle_delete(saved_ino, saved_dev);
+               dput(dentry);
+       }
+       up(&nd.dentry->d_inode->i_sem);
+@@ -1794,6 +1899,8 @@
+       struct dentry *dentry;
+       struct nameidata nd;
+       struct inode *inode = NULL;
++      ino_t saved_ino = 0;
++      dev_t saved_dev = 0;
+       name = getname(pathname);
+       if(IS_ERR(name))
+@@ -1809,13 +1916,26 @@
+       dentry = lookup_hash(&nd.last, nd.dentry);
+       error = PTR_ERR(dentry);
+       if (!IS_ERR(dentry)) {
++              error = 0;
+               /* Why not before? Because we want correct error value */
+               if (nd.last.name[nd.last.len])
+                       goto slashes;
+               inode = dentry->d_inode;
+-              if (inode)
++              if (inode) {
++                      if (inode->i_nlink <= 1) {
++                              saved_ino = inode->i_ino;
++                              saved_dev = inode->i_sb->s_dev;
++                      }
++
++                      if (!gr_acl_handle_unlink(dentry, nd.mnt))
++                              error = -EACCES;
++
+                       atomic_inc(&inode->i_count);
+-              error = vfs_unlink(nd.dentry->d_inode, dentry);
++              }
++              if (!error)
++                      error = vfs_unlink(nd.dentry->d_inode, dentry);
++              if (!error && (saved_ino || saved_dev))
++                      gr_handle_delete(saved_ino, saved_dev);
+       exit2:
+               dput(dentry);
+       }
+@@ -1879,7 +1999,15 @@
+               dentry = lookup_create(&nd, 0);
+               error = PTR_ERR(dentry);
+               if (!IS_ERR(dentry)) {
+-                      error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO);
++                      error = 0;
++                      if (!gr_acl_handle_symlink(dentry, nd.dentry, nd.mnt, from))
++                              error = -EACCES;
++
++                      if (!error)
++                              error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO);
++
++                      if (!error)
++                              gr_handle_create(dentry, nd.mnt);
+                       dput(dentry);
+               }
+               up(&nd.dentry->d_inode->i_sem);
+@@ -1963,7 +2091,20 @@
+       new_dentry = lookup_create(&nd, 0);
+       error = PTR_ERR(new_dentry);
+       if (!IS_ERR(new_dentry)) {
+-              error = vfs_link(old_nd.dentry, nd.dentry->d_inode, new_dentry);
++              error = 0;
++              if (gr_handle_hardlink(old_nd.dentry, old_nd.mnt,
++                                     old_nd.dentry->d_inode,
++                                     old_nd.dentry->d_inode->i_mode, to))
++                      error = -EPERM;
++              if (!gr_acl_handle_link(new_dentry, nd.dentry, nd.mnt,
++                                      old_nd.dentry, old_nd.mnt, to))
++                      error = -EACCES;
++              if (!error)
++                      error = vfs_link(old_nd.dentry, nd.dentry->d_inode, new_dentry);
++
++              if (!error)
++                      gr_handle_create(new_dentry, nd.mnt);
++
+               dput(new_dentry);
+       }
+       up(&nd.dentry->d_inode->i_sem);
+@@ -2185,8 +2326,16 @@
+       if (new_dentry == trap)
+               goto exit5;
+-      error = vfs_rename(old_dir->d_inode, old_dentry,
++      error = gr_acl_handle_rename(new_dentry, newnd.dentry, newnd.mnt,
++                                   old_dentry, old_dir->d_inode, oldnd.mnt,
++                                   newname);
++
++      if (!error)
++              error = vfs_rename(old_dir->d_inode, old_dentry,
+                                  new_dir->d_inode, new_dentry);
++      if (!error)
++              gr_handle_rename(old_dir->d_inode, newnd.dentry->d_inode, old_dentry, 
++                               new_dentry, oldnd.mnt, new_dentry->d_inode ? 1 : 0);
+ exit5:
+       dput(new_dentry);
+ exit4:
+diff -uNr linux-2.6.8/fs/namespace.c linux-2.6.8.grsecurity/fs/namespace.c
+--- linux-2.6.8/fs/namespace.c 2004-08-14 07:37:25.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/namespace.c      2004-08-16 17:08:28.000000000 +0200
+@@ -21,6 +21,8 @@
+ #include <linux/namei.h>
+ #include <linux/security.h>
+ #include <linux/mount.h>
++#include <linux/sched.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/unistd.h>
+@@ -426,6 +428,8 @@
+                       lock_kernel();
+                       retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
+                       unlock_kernel();
++
++                      gr_log_remount(mnt->mnt_devname, retval);
+               }
+               up_write(&sb->s_umount);
+               return retval;
+@@ -454,6 +458,9 @@
+       if (retval)
+               security_sb_umount_busy(mnt);
+       up_write(&current->namespace->sem);
++
++      gr_log_unmount(mnt->mnt_devname, retval);
++
+       return retval;
+ }
+@@ -1016,6 +1023,11 @@
+       if (retval)
+               goto dput_out;
++      if (gr_handle_chroot_mount(nd.dentry, nd.mnt, dev_name)) {
++              retval = -EPERM;
++              goto dput_out;
++      }
++
+       if (flags & MS_REMOUNT)
+               retval = do_remount(&nd, flags & ~MS_REMOUNT, mnt_flags,
+                                   data_page);
+@@ -1028,6 +1040,9 @@
+                                     dev_name, data_page);
+ dput_out:
+       path_release(&nd);
++
++      gr_log_mount(dev_name, dir_name, retval);
++
+       return retval;
+ }
+@@ -1252,6 +1267,9 @@
+       if (!capable(CAP_SYS_ADMIN))
+               return -EPERM;
++      if (gr_handle_chroot_pivot())
++              return -EPERM;
++
+       lock_kernel();
+       error = __user_walk(new_root, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &new_nd);
+diff -uNr linux-2.6.8/fs/open.c linux-2.6.8.grsecurity/fs/open.c
+--- linux-2.6.8/fs/open.c      2004-08-14 07:36:13.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/open.c   2004-08-16 17:08:28.000000000 +0200
+@@ -22,6 +22,7 @@
+ #include <asm/uaccess.h>
+ #include <linux/fs.h>
+ #include <linux/pagemap.h>
++#include <linux/grsecurity.h>
+ #include <asm/unistd.h>
+@@ -191,7 +192,7 @@
+       return error;
+ }
+-int do_truncate(struct dentry *dentry, loff_t length)
++int do_truncate(struct dentry *dentry, loff_t length, struct vfsmount *mnt)
+ {
+       int err;
+       struct iattr newattrs;
+@@ -200,6 +201,9 @@
+       if (length < 0)
+               return -EINVAL;
++      if (!gr_acl_handle_truncate(dentry, mnt))
++              return -EACCES;
++
+       newattrs.ia_size = length;
+       newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
+       down(&dentry->d_inode->i_sem);
+@@ -260,7 +264,7 @@
+       error = locks_verify_truncate(inode, NULL, length);
+       if (!error) {
+               DQUOT_INIT(inode);
+-              error = do_truncate(nd.dentry, length);
++              error = do_truncate(nd.dentry, length, nd.mnt);
+       }
+       put_write_access(inode);
+@@ -312,7 +316,7 @@
+       error = locks_verify_truncate(inode, file, length);
+       if (!error)
+-              error = do_truncate(dentry, length);
++              error = do_truncate(dentry, length, file->f_vfsmnt);
+ out_putf:
+       fput(file);
+ out:
+@@ -391,6 +395,11 @@
+                   (error = permission(inode,MAY_WRITE,&nd)) != 0)
+                       goto dput_and_out;
+       }
++      if (!gr_acl_handle_utime(nd.dentry, nd.mnt)) {
++              error = -EACCES;
++              goto dput_and_out;
++      }
++
+       down(&inode->i_sem);
+       error = notify_change(nd.dentry, &newattrs);
+       up(&inode->i_sem);
+@@ -444,6 +453,12 @@
+                   (error = permission(inode,MAY_WRITE,&nd)) != 0)
+                       goto dput_and_out;
+       }
++
++      if (!gr_acl_handle_utime(nd.dentry, nd.mnt)) {
++              error = -EACCES;
++              goto dput_and_out;
++      }
++
+       down(&inode->i_sem);
+       error = notify_change(nd.dentry, &newattrs);
+       up(&inode->i_sem);
+@@ -505,6 +520,10 @@
+               if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode)
+                  && !special_file(nd.dentry->d_inode->i_mode))
+                       res = -EROFS;
++
++              if (!res && !gr_acl_handle_access(nd.dentry, nd.mnt, mode))
++                      res = -EACCES;
++
+               path_release(&nd);
+       }
+@@ -528,6 +547,8 @@
+       if (error)
+               goto dput_and_out;
++      gr_log_chdir(nd.dentry, nd.mnt);
++
+       set_fs_pwd(current->fs, nd.mnt, nd.dentry);
+ dput_and_out:
+@@ -558,6 +579,13 @@
+               goto out_putf;
+       error = permission(inode, MAY_EXEC, NULL);
++
++      if (!error && !gr_chroot_fchdir(dentry, mnt))
++              error = -EPERM;
++
++      if (!error)
++              gr_log_chdir(dentry, mnt);
++
+       if (!error)
+               set_fs_pwd(current->fs, mnt, dentry);
+ out_putf:
+@@ -583,8 +611,16 @@
+       if (!capable(CAP_SYS_CHROOT))
+               goto dput_and_out;
++      if (gr_handle_chroot_chroot(nd.dentry, nd.mnt))
++              goto dput_and_out;
++
+       set_fs_root(current->fs, nd.mnt, nd.dentry);
+       set_fs_altroot();
++
++      gr_handle_chroot_caps(current);
++
++      gr_handle_chroot_chdir(nd.dentry, nd.mnt);
++
+       error = 0;
+ dput_and_out:
+       path_release(&nd);
+@@ -613,9 +649,22 @@
+       err = -EPERM;
+       if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
+               goto out_putf;
++
++      if (!gr_acl_handle_fchmod(dentry, file->f_vfsmnt, mode)) {
++              err = -EACCES;
++              goto out_putf;
++      }
++
+       down(&inode->i_sem);
+       if (mode == (mode_t) -1)
+               mode = inode->i_mode;
++
++      if (gr_handle_chroot_chmod(dentry, file->f_vfsmnt, mode)) {
++              err = -EPERM;
++              up(&inode->i_sem);
++              goto out_putf;
++      }
++
+       newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
+       newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
+       err = notify_change(dentry, &newattrs);
+@@ -647,9 +696,21 @@
+       if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
+               goto dput_and_out;
++      if (!gr_acl_handle_chmod(nd.dentry, nd.mnt, mode)) {
++              error = -EACCES;
++              goto dput_and_out;
++      }
++
+       down(&inode->i_sem);
+       if (mode == (mode_t) -1)
+               mode = inode->i_mode;
++
++      if (gr_handle_chroot_chmod(nd.dentry, nd.mnt, mode)) {
++              error = -EACCES;
++              up(&inode->i_sem);
++              goto dput_and_out;
++      }
++
+       newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
+       newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
+       error = notify_change(nd.dentry, &newattrs);
+@@ -661,7 +722,7 @@
+       return error;
+ }
+-static int chown_common(struct dentry * dentry, uid_t user, gid_t group)
++static int chown_common(struct dentry * dentry, uid_t user, gid_t group, struct vfsmount *mnt)
+ {
+       struct inode * inode;
+       int error;
+@@ -678,6 +739,12 @@
+       error = -EPERM;
+       if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
+               goto out;
++
++      if (!gr_acl_handle_chown(dentry, mnt)) {
++              error = -EACCES;
++              goto out;
++      }
++
+       newattrs.ia_valid =  ATTR_CTIME;
+       if (user != (uid_t) -1) {
+               newattrs.ia_valid |= ATTR_UID;
+@@ -703,7 +770,7 @@
+       error = user_path_walk(filename, &nd);
+       if (!error) {
+-              error = chown_common(nd.dentry, user, group);
++              error = chown_common(nd.dentry, user, group, nd.mnt);
+               path_release(&nd);
+       }
+       return error;
+@@ -716,7 +783,7 @@
+       error = user_path_walk_link(filename, &nd);
+       if (!error) {
+-              error = chown_common(nd.dentry, user, group);
++              error = chown_common(nd.dentry, user, group, nd.mnt);
+               path_release(&nd);
+       }
+       return error;
+@@ -730,7 +797,8 @@
+       file = fget(fd);
+       if (file) {
+-              error = chown_common(file->f_dentry, user, group);
++              error = chown_common(file->f_dentry, user,
++                                   group, file->f_vfsmnt);
+               fput(file);
+       }
+       return error;
+@@ -852,6 +920,7 @@
+        * N.B. For clone tasks sharing a files structure, this test
+        * will limit the total number of files that can be opened.
+        */
++      gr_learn_resource(current, RLIMIT_NOFILE, fd, 0);
+       if (fd >= current->rlim[RLIMIT_NOFILE].rlim_cur)
+               goto out;
+diff -uNr linux-2.6.8/fs/proc/array.c linux-2.6.8.grsecurity/fs/proc/array.c
+--- linux-2.6.8/fs/proc/array.c        2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/proc/array.c     2004-08-16 17:08:28.000000000 +0200
+@@ -275,6 +275,19 @@
+                           cap_t(p->cap_effective));
+ }
++#if defined(CONFIG_PAX_NOEXEC) || defined(CONFIG_PAX_ASLR)
++static inline char *task_pax(struct task_struct *p, char *buffer)
++{
++      return buffer + sprintf(buffer, "PaX:\t%c%c%c%c%c%c\n",
++                              p->flags & PF_PAX_PAGEEXEC ? 'P' : 'p',
++                              p->flags & PF_PAX_EMUTRAMP ? 'E' : 'e',
++                              p->flags & PF_PAX_MPROTECT ? 'M' : 'm',
++                              p->flags & PF_PAX_RANDMMAP ? 'R' : 'r',
++                              p->flags & PF_PAX_RANDEXEC ? 'X' : 'x',
++                              p->flags & PF_PAX_SEGMEXEC ? 'S' : 's');
++}
++#endif
++
+ extern char *task_mem(struct mm_struct *, char *);
+ int proc_pid_status(struct task_struct *task, char * buffer)
+ {
+@@ -293,9 +306,20 @@
+ #if defined(CONFIG_ARCH_S390)
+       buffer = task_show_regs(task, buffer);
+ #endif
++
++#if defined(CONFIG_PAX_NOEXEC) || defined(CONFIG_PAX_ASLR)
++      buffer = task_pax(task, buffer);
++#endif
++
+       return buffer - orig;
+ }
++#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
++#define PAX_RAND_FLAGS (task->flags & PF_PAX_RANDMMAP || \
++                      task->flags & PF_PAX_SEGMEXEC || \
++                      task->flags & PF_PAX_RANDEXEC)
++#endif
++
+ extern unsigned long task_vsize(struct mm_struct *);
+ int proc_pid_stat(struct task_struct *task, char * buffer)
+ {
+@@ -327,6 +351,19 @@
+       wchan = get_wchan(task);
++#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
++      if (PAX_RAND_FLAGS) {
++              eip = 0;
++              esp = 0;
++              wchan = 0;
++      }
++#endif
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++      wchan = 0;
++      eip =0;
++      esp =0;
++#endif
++
+       sigemptyset(&sigign);
+       sigemptyset(&sigcatch);
+       read_lock(&tasklist_lock);
+@@ -386,9 +423,15 @@
+               vsize,
+               mm ? mm->rss : 0, /* you might want to shift this left 3 */
+               task->rlim[RLIMIT_RSS].rlim_cur,
++#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
++              PAX_RAND_FLAGS ? 0 : (mm ? mm->start_code : 0),
++              PAX_RAND_FLAGS ? 0 : (mm ? mm->end_code : 0),
++              PAX_RAND_FLAGS ? 0 : (mm ? mm->start_stack : 0),
++#else
+               mm ? mm->start_code : 0,
+               mm ? mm->end_code : 0,
+               mm ? mm->start_stack : 0,
++#endif
+               esp,
+               eip,
+               /* The signal information here is obsolete.
+@@ -428,3 +471,14 @@
+       return sprintf(buffer,"%d %d %d %d %d %d %d\n",
+                      size, resident, shared, text, lib, data, 0);
+ }
++
++#ifdef CONFIG_GRKERNSEC_PROC_IPADDR
++int proc_pid_ipaddr(struct task_struct *task, char * buffer)
++{
++      int len;
++
++      len = sprintf(buffer, "%u.%u.%u.%u\n", NIPQUAD(task->curr_ip));
++      return len;
++}
++#endif
++
+diff -uNr linux-2.6.8/fs/proc/base.c linux-2.6.8.grsecurity/fs/proc/base.c
+--- linux-2.6.8/fs/proc/base.c 2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/proc/base.c      2004-08-16 17:08:28.000000000 +0200
+@@ -32,6 +32,7 @@
+ #include <linux/mount.h>
+ #include <linux/security.h>
+ #include <linux/ptrace.h>
++#include <linux/grsecurity.h>
+ /*
+  * For hysterical raisins we keep the same inumbers as in the old procfs.
+@@ -67,6 +68,9 @@
+       PROC_TGID_ATTR_EXEC,
+       PROC_TGID_ATTR_FSCREATE,
+ #endif
++#ifdef CONFIG_GRKERNSEC_PROC_IPADDR
++      PROC_TGID_IPADDR,
++#endif
+       PROC_TGID_FD_DIR,
+       PROC_TID_INO,
+       PROC_TID_STATUS,
+@@ -117,6 +121,9 @@
+       E(PROC_TGID_ROOT,      "root",    S_IFLNK|S_IRWXUGO),
+       E(PROC_TGID_EXE,       "exe",     S_IFLNK|S_IRWXUGO),
+       E(PROC_TGID_MOUNTS,    "mounts",  S_IFREG|S_IRUGO),
++#ifdef CONFIG_GRKERNSEC_PROC_IPADDR
++      E(PROC_TGID_IPADDR,     "ipaddr",  S_IFREG|S_IRUSR),
++#endif
+ #ifdef CONFIG_SECURITY
+       E(PROC_TGID_ATTR,      "attr",    S_IFDIR|S_IRUGO|S_IXUGO),
+ #endif
+@@ -181,6 +188,9 @@
+ int proc_pid_status(struct task_struct*,char*);
+ int proc_pid_statm(struct task_struct*,char*);
+ int proc_pid_cpu(struct task_struct*,char*);
++#ifdef CONFIG_GRKERNSEC_PROC_IPADDR
++int proc_pid_ipaddr(struct task_struct*,char*);
++#endif
+ static int proc_fd_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt)
+ {
+@@ -277,7 +287,7 @@
+       (task == current || \
+       (task->parent == current && \
+       (task->ptrace & PT_PTRACED) &&  task->state == TASK_STOPPED && \
+-       security_ptrace(current,task) == 0))
++       security_ptrace(current,task) == 0 && !gr_handle_proc_ptrace(task)))
+ static int may_ptrace_attach(struct task_struct *task)
+ {
+@@ -292,13 +302,15 @@
+            (current->uid != task->uid) ||
+            (current->gid != task->egid) ||
+            (current->gid != task->sgid) ||
+-           (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE))
++           (current->gid != task->gid)) && !capable_nolog(CAP_SYS_PTRACE))
+               goto out;
+       rmb();
+-      if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE))
++      if (!task->mm->dumpable && !capable_nolog(CAP_SYS_PTRACE))
+               goto out;
+       if (security_ptrace(current, task))
+               goto out;
++      if (gr_handle_proc_ptrace(task))
++              goto out;
+       retval = 1;
+ out:
+@@ -445,9 +457,22 @@
+ static int proc_permission(struct inode *inode, int mask, struct nameidata *nd)
+ {
++      int ret;
++      struct task_struct *task;
++
+       if (vfs_permission(inode, mask) != 0)
+               return -EACCES;
+-      return proc_check_root(inode);
++      ret = proc_check_root(inode);
++
++      if (ret)
++              return ret;
++
++      task = proc_task(inode);
++
++      if (!task)
++              return 0;
++
++      return gr_acl_handle_procpidmem(task);
+ }
+ extern struct seq_operations proc_pid_maps_op;
+@@ -954,6 +979,9 @@
+               inode->i_uid = task->euid;
+               inode->i_gid = task->egid;
+       }
++#ifdef CONFIG_GRKERNSEC_PROC_USERGROUP
++      inode->i_gid = CONFIG_GRKERNSEC_PROC_GID;
++#endif
+       security_task_to_inode(task, inode);
+ out:
+@@ -982,7 +1010,9 @@
+       if (pid_alive(task)) {
+               if (proc_type(inode) == PROC_TGID_INO || proc_type(inode) == PROC_TID_INO || task_dumpable(task)) {
+                       inode->i_uid = task->euid;
++#ifndef CONFIG_GRKERNSEC_PROC_USERGROUP
+                       inode->i_gid = task->egid;
++#endif
+               } else {
+                       inode->i_uid = 0;
+                       inode->i_gid = 0;
+@@ -1318,6 +1348,12 @@
+                       inode->i_fop = &proc_info_file_operations;
+                       ei->op.proc_read = proc_pid_status;
+                       break;
++#ifdef CONFIG_GRKERNSEC_PROC_IPADDR
++              case PROC_TGID_IPADDR:
++                      inode->i_fop = &proc_info_file_operations;
++                      ei->op.proc_read = proc_pid_ipaddr;
++                      break;
++#endif
+               case PROC_TID_STAT:
+               case PROC_TGID_STAT:
+                       inode->i_fop = &proc_info_file_operations;
+@@ -1568,6 +1604,22 @@
+       if (!task)
+               goto out;
++      if (gr_check_hidden_task(task)) {
++              put_task_struct(task);
++              goto out;
++      }
++
++#if defined(CONFIG_GRKERNSEC_PROC_USER) || defined(CONFIG_GRKERNSEC_PROC_USERGROUP)
++      if (current->uid && (task->uid != current->uid)
++#ifdef CONFIG_GRKERNSEC_PROC_USERGROUP
++          && !in_group_p(CONFIG_GRKERNSEC_PROC_GID)
++#endif
++      ) {
++              put_task_struct(task);
++              goto out;
++      }
++#endif
++
+       inode = proc_pid_make_inode(dir->i_sb, task, PROC_TGID_INO);
+@@ -1575,7 +1627,15 @@
+               put_task_struct(task);
+               goto out;
+       }
++
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      inode->i_mode = S_IFDIR|S_IRUSR|S_IXUSR;
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      inode->i_mode = S_IFDIR|S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP;
++      inode->i_gid = CONFIG_GRKERNSEC_PROC_GID;
++#else
+       inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO;
++#endif
+       inode->i_op = &proc_tgid_base_inode_operations;
+       inode->i_fop = &proc_tgid_base_operations;
+       inode->i_nlink = 3;
+@@ -1659,6 +1719,9 @@
+ static int get_tgid_list(int index, unsigned long version, unsigned int *tgids)
+ {
+       struct task_struct *p;
++#if defined(CONFIG_GRKERNSEC_PROC_USER) || defined(CONFIG_GRKERNSEC_PROC_USERGROUP)
++      struct task_struct *tmp = current;
++#endif
+       int nr_tgids = 0;
+       index--;
+@@ -1679,6 +1742,18 @@
+               int tgid = p->pid;
+               if (!pid_alive(p))
+                       continue;
++              if (gr_pid_is_chrooted(p))
++                      continue;
++              if (gr_check_hidden_task(p))
++                      continue;
++#if defined(CONFIG_GRKERNSEC_PROC_USER) || defined(CONFIG_GRKERNSEC_PROC_USERGROUP)
++              if (tmp->uid && (p->uid != tmp->uid)
++#ifdef CONFIG_GRKERNSEC_PROC_USERGROUP
++                  && !in_group_p(CONFIG_GRKERNSEC_PROC_GID)
++#endif
++              )
++                      continue;
++#endif
+               if (--index >= 0)
+                       continue;
+               tgids[nr_tgids] = tgid;
+diff -uNr linux-2.6.8/fs/proc/inode.c linux-2.6.8.grsecurity/fs/proc/inode.c
+--- linux-2.6.8/fs/proc/inode.c        2004-08-14 07:37:40.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/proc/inode.c     2004-08-16 17:08:28.000000000 +0200
+@@ -209,7 +209,11 @@
+               if (de->mode) {
+                       inode->i_mode = de->mode;
+                       inode->i_uid = de->uid;
++#ifdef CONFIG_GRKERNSEC_PROC_USERGROUP
++                      inode->i_gid = CONFIG_GRKERNSEC_PROC_GID;
++#else
+                       inode->i_gid = de->gid;
++#endif
+               }
+               if (de->size)
+                       inode->i_size = de->size;
+diff -uNr linux-2.6.8/fs/proc/proc_misc.c linux-2.6.8.grsecurity/fs/proc/proc_misc.c
+--- linux-2.6.8/fs/proc/proc_misc.c    2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/proc/proc_misc.c 2004-08-16 17:52:36.000000000 +0200
+@@ -640,6 +640,8 @@
+ void __init proc_misc_init(void)
+ {
+       struct proc_dir_entry *entry;
++      int gr_mode = 0;
++
+       static struct {
+               char *name;
+               int (*read_proc)(char*,char**,off_t,int,int*,void*);
+@@ -654,9 +656,13 @@
+ #ifdef CONFIG_STRAM_PROC
+               {"stram",       stram_read_proc},
+ #endif
++#ifndef CONFIG_GRKERNSEC_PROC_ADD
+               {"devices",     devices_read_proc},
++#endif
+               {"filesystems", filesystems_read_proc},
++#ifndef CONFIG_GRKERNSEC_PROC_ADD
+               {"cmdline",     cmdline_read_proc},
++#endif
+               {"locks",       locks_read_proc},
+               {"execdomains", execdomains_read_proc},
+               {NULL,}
+@@ -664,24 +670,39 @@
+       for (p = simple_ones; p->name; p++)
+               create_proc_read_entry(p->name, 0, NULL, p->read_proc, NULL);
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      gr_mode = S_IRUSR;
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      gr_mode = S_IRUSR | S_IRGRP;
++#endif
++#ifdef CONFIG_GRKERNSEC_PROC_ADD
++      create_proc_read_entry("devices", gr_mode, NULL, &devices_read_proc, NULL);
++      create_proc_read_entry("cmdline", gr_mode, NULL, &cmdline_read_proc, NULL);
++#endif        
++
+       proc_symlink("mounts", NULL, "self/mounts");
+       /* And now for trickier ones */
+       entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
+       if (entry)
+               entry->proc_fops = &proc_kmsg_operations;
++#ifdef CONFIG_GRKERNSEC_PROC_ADD
++      create_seq_entry("cpuinfo", gr_mode, &proc_cpuinfo_operations);
++      create_seq_entry("slabinfo",gr_mode,&proc_slabinfo_operations);
++#else
+       create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
++      create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations);
++#endif
+       create_seq_entry("partitions", 0, &proc_partitions_operations);
+       create_seq_entry("stat", 0, &proc_stat_operations);
+       create_seq_entry("interrupts", 0, &proc_interrupts_operations);
+-      create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations);
+       create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations);
+       create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations);
+       create_seq_entry("diskstats", 0, &proc_diskstats_operations);
+ #ifdef CONFIG_MODULES
+-      create_seq_entry("modules", 0, &proc_modules_operations);
++      create_seq_entry("modules", gr_mode, &proc_modules_operations);
+ #endif
+-#ifdef CONFIG_PROC_KCORE
++#if defined(CONFIG_PROC_KCORE)
+       proc_root_kcore = create_proc_entry("kcore", S_IRUSR, NULL);
+       if (proc_root_kcore) {
+               proc_root_kcore->proc_fops = &proc_kcore_operations;
+diff -uNr linux-2.6.8/fs/proc/root.c linux-2.6.8.grsecurity/fs/proc/root.c
+--- linux-2.6.8/fs/proc/root.c 2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/proc/root.c      2004-08-16 17:57:30.000000000 +0200
+@@ -52,13 +52,26 @@
+               return;
+       }
+       proc_misc_init();
+-      proc_net = proc_mkdir("net", NULL);
++
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      proc_net = proc_mkdir_mode("net", S_IRUSR | S_IXUSR, 0);
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      proc_net = proc_mkdir_mode("net", S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP, 0);
++#else
++      proc_net = proc_mkdir("net", 0);
++#endif
+ #ifdef CONFIG_SYSVIPC
+       proc_mkdir("sysvipc", NULL);
+ #endif
+ #ifdef CONFIG_SYSCTL
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      proc_sys_root = proc_mkdir_mode("sys", S_IRUSR | S_IXUSR, 0);
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      proc_sys_root = proc_mkdir_mode("sys", S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP, 0);
++#else
+       proc_sys_root = proc_mkdir("sys", NULL);
+ #endif
++#endif
+ #if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
+       proc_mkdir("sys/fs", NULL);
+       proc_mkdir("sys/fs/binfmt_misc", NULL);
+@@ -74,7 +87,15 @@
+ #ifdef CONFIG_PROC_DEVICETREE
+       proc_device_tree_init();
+ #endif
+-      proc_bus = proc_mkdir("bus", NULL);
++#ifdef CONFIG_GRKERNSEC_PROC_ADD
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      proc_bus = proc_mkdir_mode("bus", S_IRUSR | S_IXUSR, 0);
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      proc_bus = proc_mkdir_mode("bus", S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP, 0);
++#endif
++#else
++      proc_bus = proc_mkdir("bus", 0);
++#endif
+ }
+ static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd)
+diff -uNr linux-2.6.8/fs/proc/task_mmu.c linux-2.6.8.grsecurity/fs/proc/task_mmu.c
+--- linux-2.6.8/fs/proc/task_mmu.c     2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/proc/task_mmu.c  2004-08-16 17:08:28.000000000 +0200
+@@ -34,12 +34,23 @@
+               "VmData:\t%8lu kB\n"
+               "VmStk:\t%8lu kB\n"
+               "VmExe:\t%8lu kB\n"
+-              "VmLib:\t%8lu kB\n",
+-              mm->total_vm << (PAGE_SHIFT-10),
++              "VmLib:\t%8lu kB\n"
++
++#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
++              "CsBase:\t%8lx\nCsLim:\t%8lx\n"
++#endif
++
++              ,mm->total_vm << (PAGE_SHIFT-10),
+               mm->locked_vm << (PAGE_SHIFT-10),
+               mm->rss << (PAGE_SHIFT-10),
+               data - stack, stack,
+-              exec - lib, lib);
++              exec - lib, lib
++
++#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
++              , mm->context.user_cs_base, mm->context.user_cs_limit
++#endif
++
++);
+       up_read(&mm->mmap_sem);
+       return buffer;
+ }
+@@ -76,8 +87,17 @@
+       return size;
+ }
++#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
++#define PAX_RAND_FLAGS (task->flags & PF_PAX_RANDMMAP || \
++                      task->flags & PF_PAX_SEGMEXEC || \
++                      task->flags & PF_PAX_RANDEXEC)
++#endif
++
+ static int show_map(struct seq_file *m, void *v)
+ {
++#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
++      struct task_struct *task = m->private;
++#endif
+       struct vm_area_struct *map = v;
+       struct file *file = map->vm_file;
+       int flags = map->vm_flags;
+@@ -92,8 +112,14 @@
+       }
+       seq_printf(m, "%08lx-%08lx %c%c%c%c %08lx %02x:%02x %lu %n",
++#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
++                      PAX_RAND_FLAGS ? 0UL : map->vm_start,
++                      PAX_RAND_FLAGS ? 0UL : map->vm_end,
++#else
+                       map->vm_start,
+                       map->vm_end,
++#endif
++
+                       flags & VM_READ ? 'r' : '-',
+                       flags & VM_WRITE ? 'w' : '-',
+                       flags & VM_EXEC ? 'x' : '-',
+diff -uNr linux-2.6.8/fs/readdir.c linux-2.6.8.grsecurity/fs/readdir.c
+--- linux-2.6.8/fs/readdir.c   2004-08-14 07:36:57.000000000 +0200
++++ linux-2.6.8.grsecurity/fs/readdir.c        2004-08-16 17:08:28.000000000 +0200
+@@ -15,6 +15,8 @@
+ #include <linux/dirent.h>
+ #include <linux/security.h>
+ #include <linux/unistd.h>
++#include <linux/namei.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+@@ -65,6 +67,7 @@
+ struct readdir_callback {
+       struct old_linux_dirent __user * dirent;
+       int result;
++      struct nameidata nd;
+ };
+ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset,
+@@ -75,6 +78,10 @@
+       if (buf->result)
+               return -EINVAL;
++
++      if (!gr_acl_handle_filldir(buf->nd.dentry, buf->nd.mnt, ino))
++              return 0;
++
+       buf->result++;
+       dirent = buf->dirent;
+       if (!access_ok(VERIFY_WRITE, dirent,
+@@ -107,6 +114,9 @@
+       buf.result = 0;
+       buf.dirent = dirent;
++      buf.nd.dentry = file->f_dentry;
++      buf.nd.mnt = file->f_vfsmnt;
++
+       error = vfs_readdir(file, fillonedir, &buf);
+       if (error >= 0)
+               error = buf.result;
+@@ -134,6 +144,7 @@
+       struct linux_dirent __user * previous;
+       int count;
+       int error;
++      struct nameidata nd;
+ };
+ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
+@@ -146,6 +157,10 @@
+       buf->error = -EINVAL;   /* only used if we fail.. */
+       if (reclen > buf->count)
+               return -EINVAL;
++
++      if (!gr_acl_handle_filldir(buf->nd.dentry, buf->nd.mnt, ino))
++              return 0;
++
+       dirent = buf->previous;
+       if (dirent) {
+               if (__put_user(offset, &dirent->d_off))
+@@ -193,6 +208,9 @@
+       buf.count = count;
+       buf.error = 0;
++      buf.nd.dentry = file->f_dentry;
++      buf.nd.mnt = file->f_vfsmnt;
++
+       error = vfs_readdir(file, filldir, &buf);
+       if (error < 0)
+               goto out_putf;
+@@ -218,6 +236,7 @@
+       struct linux_dirent64 __user * previous;
+       int count;
+       int error;
++      struct nameidata nd;
+ };
+ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
+@@ -230,6 +249,10 @@
+       buf->error = -EINVAL;   /* only used if we fail.. */
+       if (reclen > buf->count)
+               return -EINVAL;
++
++      if (!gr_acl_handle_filldir(buf->nd.dentry, buf->nd.mnt, ino))
++              return 0;
++
+       dirent = buf->previous;
+       if (dirent) {
+               if (__put_user(offset, &dirent->d_off))
+@@ -279,6 +302,9 @@
+       buf.count = count;
+       buf.error = 0;
++      buf.nd.mnt = file->f_vfsmnt;
++      buf.nd.dentry = file->f_dentry;
++
+       error = vfs_readdir(file, filldir64, &buf);
+       if (error < 0)
+               goto out_putf;
+diff -uNr linux-2.6.8/grsecurity/gracl_alloc.c linux-2.6.8.grsecurity/grsecurity/gracl_alloc.c
+--- linux-2.6.8/grsecurity/gracl_alloc.c       1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/gracl_alloc.c    2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,93 @@
++/* stack-based acl allocation tracking (c) Brad Spengler 2002,2003 */
++
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/slab.h>
++#include <linux/vmalloc.h>
++#include <linux/gracl.h>
++#include <linux/grsecurity.h>
++
++static unsigned long alloc_stack_next = 1;
++static unsigned long alloc_stack_size = 1;
++static void **alloc_stack;
++
++static __inline__ int
++alloc_pop(void)
++{
++      if (alloc_stack_next == 1)
++              return 0;
++
++      kfree(alloc_stack[alloc_stack_next - 2]);
++
++      alloc_stack_next--;
++
++      return 1;
++}
++
++static __inline__ void
++alloc_push(void *buf)
++{
++      if (alloc_stack_next >= alloc_stack_size)
++              BUG();
++
++      alloc_stack[alloc_stack_next - 1] = buf;
++
++      alloc_stack_next++;
++
++      return;
++}
++
++void *
++acl_alloc(unsigned long len)
++{
++      void *ret;
++
++      if (len > PAGE_SIZE)
++              BUG();
++
++      ret = kmalloc(len, GFP_KERNEL);
++
++      if (ret)
++              alloc_push(ret);
++
++      return ret;
++}
++
++void
++acl_free_all(void)
++{
++      if (gr_acl_is_enabled() || !alloc_stack)
++              return;
++
++      while (alloc_pop()) ;
++
++      if (alloc_stack) {
++              if ((alloc_stack_size * sizeof (void *)) <= PAGE_SIZE)
++                      kfree(alloc_stack);
++              else
++                      vfree(alloc_stack);
++      }
++
++      alloc_stack = NULL;
++      alloc_stack_size = 1;
++      alloc_stack_next = 1;
++
++      return;
++}
++
++int
++acl_alloc_stack_init(unsigned long size)
++{
++      if ((size * sizeof (void *)) <= PAGE_SIZE)
++              alloc_stack =
++                  (void **) kmalloc(size * sizeof (void *), GFP_KERNEL);
++      else
++              alloc_stack = (void **) vmalloc(size * sizeof (void *));
++
++      alloc_stack_size = size;
++
++      if (!alloc_stack)
++              return 0;
++      else
++              return 1;
++}
+diff -uNr linux-2.6.8/grsecurity/gracl.c linux-2.6.8.grsecurity/grsecurity/gracl.c
+--- linux-2.6.8/grsecurity/gracl.c     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/gracl.c  2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,3440 @@
++/* 
++ * grsecurity/gracl.c
++ * Copyright Brad Spengler 2001, 2002, 2003
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++#include <linux/file.h>
++#include <linux/fs.h>
++#include <linux/namei.h>
++#include <linux/mount.h>
++#include <linux/tty.h>
++#include <linux/proc_fs.h>
++#include <linux/smp_lock.h>
++#include <linux/slab.h>
++#include <linux/vmalloc.h>
++#include <linux/types.h>
++#include <linux/capability.h>
++#include <linux/sysctl.h>
++#include <linux/ptrace.h>
++#include <linux/gracl.h>
++#include <linux/gralloc.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++#include <linux/percpu.h>
++
++#include <asm/uaccess.h>
++#include <asm/errno.h>
++#include <asm/mman.h>
++
++static struct acl_role_db acl_role_set;
++static struct acl_role_label *role_list_head;
++static struct name_db name_set;
++static struct name_db inodev_set;
++
++/* for keeping track of userspace pointers used for subjects, so we
++   can share references in the kernel as well
++*/
++
++static struct dentry *real_root;
++static struct vfsmount *real_root_mnt;
++
++static struct acl_subj_map_db subj_map_set;
++
++static struct acl_role_label *default_role;
++
++static u16 acl_sp_role_value;
++
++extern char *gr_shared_page[4];
++static DECLARE_MUTEX(gr_dev_sem);
++rwlock_t gr_inode_lock = RW_LOCK_UNLOCKED;
++
++struct gr_arg *gr_usermode;
++
++static unsigned long gr_status = GR_STATUS_INIT;
++
++extern int chkpw(struct gr_arg *entry, unsigned char *salt, unsigned char *sum);
++extern void gr_clear_learn_entries(void);
++
++#ifdef CONFIG_GRKERNSEC_RESLOG
++extern void gr_log_resource(const struct task_struct *task,
++                          const int res, const unsigned long wanted, const int gt);
++#endif
++
++extern char * __d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
++                        struct dentry *root, struct vfsmount *rootmnt,
++                        char *buffer, int buflen);
++
++unsigned char *gr_system_salt;
++unsigned char *gr_system_sum;
++
++static struct sprole_pw **acl_special_roles = NULL;
++static __u16 num_sprole_pws = 0;
++
++static struct acl_role_label *kernel_role = NULL;
++
++/* The following are used to keep a place held in the hash table when we move
++   entries around.  They can be replaced during insert. */
++
++static struct acl_subject_label *deleted_subject;
++static struct acl_object_label *deleted_object;
++static struct name_entry *deleted_inodev;
++
++/* for keeping track of the last and final allocated subjects, since
++   nested subject parsing is tricky
++*/
++static struct acl_subject_label *s_last = NULL;
++static struct acl_subject_label *s_final = NULL;
++
++static unsigned int gr_auth_attempts = 0;
++static unsigned long gr_auth_expires = 0UL;
++
++extern int gr_init_uidset(void);
++extern void gr_free_uidset(void);
++extern void gr_remove_uid(uid_t uid);
++extern int gr_find_uid(uid_t uid);
++
++__inline__ int
++gr_acl_is_enabled(void)
++{
++      return (gr_status & GR_READY);
++}
++
++char gr_roletype_to_char(void)
++{
++      switch (current->role->roletype &
++              (GR_ROLE_DEFAULT | GR_ROLE_USER | GR_ROLE_GROUP |
++               GR_ROLE_SPECIAL)) {
++      case GR_ROLE_DEFAULT:
++              return 'D';
++      case GR_ROLE_USER:
++              return 'U';
++      case GR_ROLE_GROUP:
++              return 'G';
++      case GR_ROLE_SPECIAL:
++              return 'S';
++      }
++
++      return 'X';
++}
++
++__inline__ int
++gr_acl_tpe_check(void)
++{
++      if (unlikely(!(gr_status & GR_READY)))
++              return 0;
++      if (current->role->roletype & GR_ROLE_TPE)
++              return 1;
++      else
++              return 0;
++}
++
++int
++gr_handle_rawio(const struct inode *inode)
++{
++      if (inode && S_ISBLK(inode->i_mode) && !capable(CAP_SYS_RAWIO) &&
++          ((gr_status & GR_READY)
++#ifdef CONFIG_GRKERNSEC_CHROOT_CAPS
++           || (grsec_enable_chroot_caps && proc_is_chrooted(current))
++#endif
++          ))
++              return 1;
++      return 0;
++}
++
++
++static __inline__ int
++gr_streq(const char *a, const char *b, const __u16 lena, const __u16 lenb)
++{
++      int i;
++      unsigned long *l1;
++      unsigned long *l2;
++      unsigned char *c1;
++      unsigned char *c2;
++      int num_longs;
++
++      if (likely(lena != lenb))
++              return 0;
++
++      l1 = (unsigned long *)a;
++      l2 = (unsigned long *)b;
++
++      num_longs = lena / sizeof(unsigned long);
++
++      for (i = num_longs; i--; l1++, l2++) {
++              if (unlikely(*l1 != *l2))
++                      return 0;
++      }
++
++      c1 = (unsigned char *) l1;
++      c2 = (unsigned char *) l2;
++
++      i = lena - (num_longs * sizeof(unsigned long)); 
++
++      for (; i--; c1++, c2++) {
++              if (unlikely(*c1 != *c2))
++                      return 0;
++      }
++
++      return 1;
++}
++              
++static char *
++__d_real_path(const struct dentry *dentry, const struct vfsmount *vfsmnt,
++              char *buf, int buflen)
++{
++      char *res;
++      struct dentry *root;
++      struct vfsmount *rootmnt;
++
++      /* we can't use real_root, real_root_mnt, because they belong only to the RBAC system */
++      read_lock(&child_reaper->fs->lock);
++      root = dget(child_reaper->fs->root);
++      rootmnt = mntget(child_reaper->fs->rootmnt);
++      read_unlock(&child_reaper->fs->lock);
++
++      res = __d_path((struct dentry *)dentry, (struct vfsmount *)vfsmnt, root, rootmnt, buf, buflen);
++      if (unlikely(IS_ERR(res)))
++              res = strcpy(buf, "<path too long>");
++      dput(root);
++      mntput(rootmnt);
++      return res;
++}
++
++char *
++gr_to_filename_nolock(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      return __d_real_path(dentry, mnt, per_cpu_ptr(gr_shared_page[0], smp_processor_id()),
++                              PAGE_SIZE);
++}
++
++static char *
++d_real_path(const struct dentry *dentry, const struct vfsmount *vfsmnt,
++          char *buf, int buflen)
++{
++      char *res;
++      struct dentry *root;
++      struct vfsmount *rootmnt;
++
++      /* we can't use real_root, real_root_mnt, because they belong only to the RBAC system */
++      read_lock(&child_reaper->fs->lock);
++      root = dget(child_reaper->fs->root);
++      rootmnt = mntget(child_reaper->fs->rootmnt);
++      read_unlock(&child_reaper->fs->lock);
++
++      spin_lock(&dcache_lock);
++      res = __d_path((struct dentry *)dentry, (struct vfsmount *)vfsmnt, root, rootmnt, buf, buflen);
++      spin_unlock(&dcache_lock);
++      if (unlikely(IS_ERR(res)))
++              res = strcpy(buf, "<path too long>");
++      dput(root);
++      mntput(rootmnt);
++      return res;
++}
++
++char *
++gr_to_filename(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      return d_real_path(dentry, mnt, per_cpu_ptr(gr_shared_page[0], smp_processor_id()),
++                         PAGE_SIZE);
++}
++
++char *
++gr_to_filename1(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      return d_real_path(dentry, mnt, per_cpu_ptr(gr_shared_page[1], smp_processor_id()),
++                         PAGE_SIZE);
++}
++
++char *
++gr_to_filename2(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      return d_real_path(dentry, mnt, per_cpu_ptr(gr_shared_page[2], smp_processor_id()),
++                         PAGE_SIZE);
++}
++
++char *
++gr_to_filename3(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      return d_real_path(dentry, mnt, per_cpu_ptr(gr_shared_page[3], smp_processor_id()),
++                         PAGE_SIZE);
++}
++
++__inline__ __u32
++to_gr_audit(const __u32 reqmode)
++{
++      __u32 retmode = 0;
++
++      retmode |= (reqmode & GR_READ) ? GR_AUDIT_READ : 0;
++      retmode |= (reqmode & GR_WRITE) ? GR_AUDIT_WRITE | GR_AUDIT_APPEND : 0;
++      retmode |= (reqmode & GR_APPEND) ? GR_AUDIT_APPEND : 0;
++      retmode |= (reqmode & GR_EXEC) ? GR_AUDIT_EXEC : 0;
++      retmode |= (reqmode & GR_INHERIT) ? GR_AUDIT_INHERIT : 0;
++      retmode |= (reqmode & GR_FIND) ? GR_AUDIT_FIND : 0;
++      retmode |= (reqmode & GR_SETID) ? GR_AUDIT_SETID : 0;
++      retmode |= (reqmode & GR_CREATE) ? GR_AUDIT_CREATE : 0;
++      retmode |= (reqmode & GR_DELETE) ? GR_AUDIT_DELETE : 0;
++
++      return retmode;
++}
++
++__inline__ struct acl_subject_label *
++lookup_subject_map(const struct acl_subject_label *userp)
++{
++      unsigned long index = shash(userp, subj_map_set.s_size);
++      struct subject_map *match;
++      __u8 i = 0;
++
++      match = subj_map_set.s_hash[index];
++
++      while (match && match->user != userp) {
++              index = (index + (1 << i)) % subj_map_set.s_size;
++              match = subj_map_set.s_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      if (match)
++              return match->kernel;
++      else
++              return NULL;
++}
++
++static void
++insert_subj_map_entry(struct subject_map *subjmap)
++{
++      unsigned long index = shash(subjmap->user, subj_map_set.s_size);
++      struct subject_map **curr;
++      __u8 i = 0;
++
++      curr = &subj_map_set.s_hash[index];
++
++      while (*curr) {
++              index = (index + (1 << i)) % subj_map_set.s_size;
++              curr = &subj_map_set.s_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      *curr = subjmap;
++
++      return;
++}
++
++__inline__ struct acl_role_label *
++lookup_acl_role_label(const struct task_struct *task, const uid_t uid,
++                    const gid_t gid)
++{
++      unsigned long index = rhash(uid, GR_ROLE_USER, acl_role_set.r_size);
++      struct acl_role_label *match;
++      struct role_allowed_ip *ipp;
++      int x;
++      __u8 i = 0;
++
++      match = acl_role_set.r_hash[index];
++
++      while (match) {
++              if ((match->roletype & (GR_ROLE_DOMAIN | GR_ROLE_USER)) == (GR_ROLE_DOMAIN | GR_ROLE_USER)) {
++                      for (x = 0; x < match->domain_child_num; x++) {
++                              if (match->domain_children[x] == uid)
++                                      goto found;
++                      }
++              } else if (match->uidgid == uid && match->roletype & GR_ROLE_USER)
++                      break;
++              index = (index + (1 << i)) % acl_role_set.r_size;
++              match = acl_role_set.r_hash[index];
++              i = (i + 1) % 32;
++      }
++found:
++      if (match == NULL) {
++            try_group:
++              index = rhash(gid, GR_ROLE_GROUP, acl_role_set.r_size);
++              match = acl_role_set.r_hash[index];
++              i = 0;
++
++              while (match) {
++                      if ((match->roletype & (GR_ROLE_DOMAIN | GR_ROLE_GROUP)) == (GR_ROLE_DOMAIN | GR_ROLE_GROUP)) {
++                              for (x = 0; x < match->domain_child_num; x++) {
++                                      if (match->domain_children[x] == gid)
++                                              goto found2;
++                              }
++                      } else if (match->uidgid == gid && match->roletype & GR_ROLE_GROUP)
++                              break;
++                      index = (index + (1 << i)) % acl_role_set.r_size;
++                      match = acl_role_set.r_hash[index];
++                      i = (i + 1) % 32;
++              }
++found2:
++              if (match == NULL)
++                      match = default_role;
++              if (match->allowed_ips == NULL)
++                      return match;
++              else {
++                      for (ipp = match->allowed_ips; ipp; ipp = ipp->next) {
++                              if (likely
++                                  ((ntohl(task->curr_ip) & ipp->netmask) ==
++                                   (ntohl(ipp->addr) & ipp->netmask)))
++                                      return match;
++                      }
++                      match = default_role;
++              }
++      } else if (match->allowed_ips == NULL) {
++              return match;
++      } else {
++              for (ipp = match->allowed_ips; ipp; ipp = ipp->next) {
++                      if (likely
++                          ((ntohl(task->curr_ip) & ipp->netmask) ==
++                           (ntohl(ipp->addr) & ipp->netmask)))
++                              return match;
++              }
++              goto try_group;
++      }
++
++      return match;
++}
++
++__inline__ struct acl_subject_label *
++lookup_acl_subj_label(const ino_t ino, const dev_t dev,
++                    const struct acl_role_label *role)
++{
++      unsigned long subj_size = role->subj_hash_size;
++      struct acl_subject_label **s_hash = role->subj_hash;
++      unsigned long index = fhash(ino, dev, subj_size);
++      struct acl_subject_label *match;
++      __u8 i = 0;
++
++      match = s_hash[index];
++
++      while (match && (match->inode != ino || match->device != dev ||
++             (match->mode & GR_DELETED))) {
++              index = (index + (1 << i)) % subj_size;
++              match = s_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      if (match && (match != deleted_subject) && !(match->mode & GR_DELETED))
++              return match;
++      else
++              return NULL;
++}
++
++static __inline__ struct acl_object_label *
++lookup_acl_obj_label(const ino_t ino, const dev_t dev,
++                   const struct acl_subject_label *subj)
++{
++      unsigned long obj_size = subj->obj_hash_size;
++      struct acl_object_label **o_hash = subj->obj_hash;
++      unsigned long index = fhash(ino, dev, obj_size);
++      struct acl_object_label *match;
++      __u8 i = 0;
++
++      match = o_hash[index];
++
++      while (match && (match->inode != ino || match->device != dev ||
++             (match->mode & GR_DELETED))) {
++              index = (index + (1 << i)) % obj_size;
++              match = o_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      if (match && (match != deleted_object) && !(match->mode & GR_DELETED))
++              return match;
++      else
++              return NULL;
++}
++
++static __inline__ struct acl_object_label *
++lookup_acl_obj_label_create(const ino_t ino, const dev_t dev,
++                   const struct acl_subject_label *subj)
++{
++      unsigned long obj_size = subj->obj_hash_size;
++      struct acl_object_label **o_hash = subj->obj_hash;
++      unsigned long index = fhash(ino, dev, obj_size);
++      struct acl_object_label *match;
++      __u8 i = 0;
++
++      match = o_hash[index];
++
++      while (match && (match->inode != ino || match->device != dev ||
++             !(match->mode & GR_DELETED))) {
++              index = (index + (1 << i)) % obj_size;
++              match = o_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      if (match && (match != deleted_object) && (match->mode & GR_DELETED))
++              return match;
++
++      i = 0;
++      index = fhash(ino, dev, obj_size);
++      match = o_hash[index];
++
++      while (match && (match->inode != ino || match->device != dev ||
++             (match->mode & GR_DELETED))) {
++              index = (index + (1 << i)) % obj_size;
++              match = o_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      if (match && (match != deleted_object) && !(match->mode & GR_DELETED))
++              return match;
++      else
++              return NULL;
++}
++
++static __inline__ struct name_entry *
++lookup_name_entry(const char *name)
++{
++      __u16 len = strlen(name);
++      unsigned long index = nhash(name, len, name_set.n_size);
++      struct name_entry *match;
++      __u8 i = 0;
++
++      match = name_set.n_hash[index];
++
++      while (match && !gr_streq(match->name, name, match->len, len)) {
++              index = (index + (1 << i)) % name_set.n_size;
++              match = name_set.n_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      return match;
++}
++
++static __inline__ struct name_entry *
++lookup_inodev_entry(const ino_t ino, const dev_t dev)
++{
++      unsigned long index = fhash(ino, dev, inodev_set.n_size);
++      struct name_entry *match;
++      __u8 i = 0;
++
++      match = inodev_set.n_hash[index];
++
++      while (match && (match->inode != ino || match->device != dev)) {
++              index = (index + (1 << i)) % inodev_set.n_size;
++              match = inodev_set.n_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      if (match && (match != deleted_inodev))
++              return match;
++      else
++              return NULL;
++}
++
++static void
++insert_inodev_entry(struct name_entry *nentry)
++{
++      unsigned long index = fhash(nentry->inode, nentry->device,
++                                  inodev_set.n_size);
++      struct name_entry **curr;
++      __u8 i = 0;
++
++      curr = &inodev_set.n_hash[index];
++
++      while (*curr && *curr != deleted_inodev) {
++              index = (index + (1 << i)) % inodev_set.n_size;
++              curr = &inodev_set.n_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      *curr = nentry;
++
++      return;
++}
++
++static void
++__insert_acl_role_label(struct acl_role_label *role, uid_t uidgid)
++{
++      unsigned long index =
++          rhash(uidgid, role->roletype & (GR_ROLE_USER | GR_ROLE_GROUP), acl_role_set.r_size);
++      struct acl_role_label **curr;
++      __u8 i = 0;
++
++      curr = &acl_role_set.r_hash[index];
++
++      while (*curr) {
++              index = (index + (1 << i)) % acl_role_set.r_size;
++              curr = &acl_role_set.r_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      *curr = role;
++
++      return;
++}
++
++static void
++insert_acl_role_label(struct acl_role_label *role)
++{
++      int i;
++
++      if (role->roletype & GR_ROLE_DOMAIN) {
++              for (i = 0; i < role->domain_child_num; i++)
++                      __insert_acl_role_label(role, role->domain_children[i]);
++      } else
++              __insert_acl_role_label(role, role->uidgid);
++}
++                                      
++static int
++insert_name_entry(char *name, const ino_t inode, const dev_t device)
++{
++      struct name_entry **curr;
++      __u8 i = 0;
++      __u16 len = strlen(name);
++      unsigned long index = nhash(name, len, name_set.n_size);
++
++      curr = &name_set.n_hash[index];
++
++      while (*curr && !gr_streq((*curr)->name, name, (*curr)->len, len)) {
++              index = (index + (1 << i)) % name_set.n_size;
++              curr = &name_set.n_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      if (!(*curr)) {
++              struct name_entry *nentry =
++                  acl_alloc(sizeof (struct name_entry));
++              if (!nentry)
++                      return 0;
++              nentry->name = name;
++              nentry->inode = inode;
++              nentry->device = device;
++              nentry->len = len;
++              *curr = nentry;
++              /* insert us into the table searchable by inode/dev */
++              insert_inodev_entry(nentry);
++      }
++
++      return 1;
++}
++
++static void
++insert_acl_obj_label(struct acl_object_label *obj,
++                   struct acl_subject_label *subj)
++{
++      unsigned long index =
++          fhash(obj->inode, obj->device, subj->obj_hash_size);
++      struct acl_object_label **curr;
++      __u8 i = 0;
++
++      curr = &subj->obj_hash[index];
++
++      while (*curr && *curr != deleted_object) {
++              index = (index + (1 << i)) % subj->obj_hash_size;
++              curr = &subj->obj_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      *curr = obj;
++
++      return;
++}
++
++static void
++insert_acl_subj_label(struct acl_subject_label *obj,
++                    struct acl_role_label *role)
++{
++      unsigned long subj_size = role->subj_hash_size;
++      struct acl_subject_label **s_hash = role->subj_hash;
++      unsigned long index = fhash(obj->inode, obj->device, subj_size);
++      struct acl_subject_label **curr;
++      __u8 i = 0;
++
++      curr = &s_hash[index];
++
++      while (*curr && *curr != deleted_subject) {
++              index = (index + (1 << i)) % subj_size;
++              curr = &s_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      *curr = obj;
++
++      return;
++}
++
++static void **
++create_table(__u32 * len)
++{
++      unsigned long table_sizes[] = {
++              7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381,
++              32749, 65521, 131071, 262139, 524287, 1048573, 2097143,
++              4194301, 8388593, 16777213, 33554393, 67108859, 134217689,
++              268435399, 536870909, 1073741789, 2147483647
++      };
++      void *newtable = NULL;
++      unsigned int pwr = 0;
++
++      while ((pwr < ((sizeof (table_sizes) / sizeof (table_sizes[0])) - 1)) &&
++             table_sizes[pwr] <= (2 * (*len)))
++              pwr++;
++
++      if (table_sizes[pwr] <= (2 * (*len)))
++              return newtable;
++
++      if ((table_sizes[pwr] * sizeof (void *)) <= PAGE_SIZE)
++              newtable =
++                  kmalloc(table_sizes[pwr] * sizeof (void *), GFP_KERNEL);
++      else
++              newtable = vmalloc(table_sizes[pwr] * sizeof (void *));
++
++      *len = table_sizes[pwr];
++
++      return newtable;
++}
++
++static int
++init_variables(const struct gr_arg *arg)
++{
++      unsigned long stacksize;
++
++      subj_map_set.s_size = arg->role_db.num_subjects;
++      acl_role_set.r_size = arg->role_db.num_roles + arg->role_db.num_domain_children;
++      name_set.n_size = arg->role_db.num_objects;
++      inodev_set.n_size = arg->role_db.num_objects;
++
++      if (!gr_init_uidset())
++              return 1;
++
++      /* set up the stack that holds allocation info */
++
++      stacksize = arg->role_db.num_pointers + 5;
++
++      if (!acl_alloc_stack_init(stacksize))
++              return 1;
++
++      /* create our empty, fake deleted acls */
++      deleted_subject =
++          (struct acl_subject_label *)
++          acl_alloc(sizeof (struct acl_subject_label));
++      deleted_object =
++          (struct acl_object_label *)
++          acl_alloc(sizeof (struct acl_object_label));
++      deleted_inodev =
++          (struct name_entry *) acl_alloc(sizeof (struct name_entry));
++
++      if (!deleted_subject || !deleted_object || !deleted_inodev)
++              return 1;
++
++      memset(deleted_subject, 0, sizeof (struct acl_subject_label));
++      memset(deleted_object, 0, sizeof (struct acl_object_label));
++      memset(deleted_inodev, 0, sizeof (struct name_entry));
++
++      /* grab reference for the real root dentry and vfsmount */
++      read_lock(&child_reaper->fs->lock);
++      real_root_mnt = mntget(child_reaper->fs->rootmnt);
++      real_root = dget(child_reaper->fs->root);
++      read_unlock(&child_reaper->fs->lock);
++      
++
++      /* We only want 50% full tables for now */
++
++      subj_map_set.s_hash =
++          (struct subject_map **) create_table(&subj_map_set.s_size);
++      acl_role_set.r_hash =
++          (struct acl_role_label **) create_table(&acl_role_set.r_size);
++      name_set.n_hash = (struct name_entry **) create_table(&name_set.n_size);
++      inodev_set.n_hash =
++          (struct name_entry **) create_table(&inodev_set.n_size);
++
++      if (!subj_map_set.s_hash || !acl_role_set.r_hash ||
++          !name_set.n_hash || !inodev_set.n_hash)
++              return 1;
++
++      memset(subj_map_set.s_hash, 0,
++             sizeof(struct subject_map *) * subj_map_set.s_size);
++      memset(acl_role_set.r_hash, 0,
++             sizeof (struct acl_role_label *) * acl_role_set.r_size);
++      memset(name_set.n_hash, 0,
++             sizeof (struct name_entry *) * name_set.n_size);
++      memset(inodev_set.n_hash, 0,
++             sizeof (struct name_entry *) * inodev_set.n_size);
++
++      return 0;
++}
++
++/* free information not needed after startup
++   currently contains user->kernel pointer mappings for subjects
++*/
++
++static void
++free_init_variables(void)
++{
++      __u32 i;
++
++      if (subj_map_set.s_hash) {
++              for (i = 0; i < subj_map_set.s_size; i++) {
++                      if (subj_map_set.s_hash[i]) {
++                              kfree(subj_map_set.s_hash[i]);
++                              subj_map_set.s_hash[i] = NULL;
++                      }
++              }
++
++              if ((subj_map_set.s_size * sizeof (struct subject_map *)) <=
++                  PAGE_SIZE)
++                      kfree(subj_map_set.s_hash);
++              else
++                      vfree(subj_map_set.s_hash);
++      }
++
++      return;
++}
++
++static void
++free_variables(void)
++{
++      struct acl_subject_label *s;
++      struct acl_role_label *r;
++      struct task_struct *task, *task2;
++
++      gr_clear_learn_entries();
++
++      read_lock(&tasklist_lock);
++      for_each_process(task) {
++              task2 = task;
++              do {
++                      task2->acl_sp_role = 0;
++                      task2->acl_role_id = 0;
++                      task2->acl = NULL;
++                      task2->role = NULL;
++              } while ((task2 = next_thread(task2)) != task);
++      }
++      read_unlock(&tasklist_lock);
++
++      /* release the reference to the real root dentry and vfsmount */
++      if (real_root)
++              dput(real_root);
++      real_root = NULL;
++      if (real_root_mnt)
++              mntput(real_root_mnt);
++      real_root_mnt = NULL;
++
++      /* free all object hash tables */
++
++      if (role_list_head) {
++              for (r = role_list_head; r; r = r->next) {
++                      if (!r->subj_hash)
++                              break;
++                      for (s = r->hash->first; s; s = s->next) {
++                              if (!s->obj_hash)
++                                      break;
++                              if ((s->obj_hash_size *
++                                   sizeof (struct acl_object_label *)) <=
++                                  PAGE_SIZE)
++                                      kfree(s->obj_hash);
++                              else
++                                      vfree(s->obj_hash);
++                      }
++                      if ((r->subj_hash_size *
++                           sizeof (struct acl_subject_label *)) <= PAGE_SIZE)
++                              kfree(r->subj_hash);
++                      else
++                              vfree(r->subj_hash);
++              }
++      }
++
++      acl_free_all();
++
++      if (acl_role_set.r_hash) {
++              if ((acl_role_set.r_size * sizeof (struct acl_role_label *)) <=
++                  PAGE_SIZE)
++                      kfree(acl_role_set.r_hash);
++              else
++                      vfree(acl_role_set.r_hash);
++      }
++      if (name_set.n_hash) {
++              if ((name_set.n_size * sizeof (struct name_entry *)) <=
++                  PAGE_SIZE)
++                      kfree(name_set.n_hash);
++              else
++                      vfree(name_set.n_hash);
++      }
++
++      if (inodev_set.n_hash) {
++              if ((inodev_set.n_size * sizeof (struct name_entry *)) <=
++                  PAGE_SIZE)
++                      kfree(inodev_set.n_hash);
++              else
++                      vfree(inodev_set.n_hash);
++      }
++
++      gr_free_uidset();
++
++      memset(&name_set, 0, sizeof (struct name_db));
++      memset(&inodev_set, 0, sizeof (struct name_db));
++      memset(&acl_role_set, 0, sizeof (struct acl_role_db));
++      memset(&subj_map_set, 0, sizeof (struct acl_subj_map_db));
++
++      role_list_head = NULL;
++      default_role = NULL;
++
++      return;
++}
++
++static __u32
++count_user_objs(struct acl_object_label *userp)
++{
++      struct acl_object_label o_tmp;
++      __u32 num = 0;
++
++      while (userp) {
++              if (copy_from_user(&o_tmp, userp,
++                                 sizeof (struct acl_object_label)))
++                      break;
++
++              userp = o_tmp.prev;
++              num++;
++      }
++
++      return num;
++}
++
++static struct acl_subject_label *
++do_copy_user_subj(struct acl_subject_label *userp, struct acl_role_label *role);
++
++static int
++copy_user_glob(struct acl_object_label *obj)
++{
++      struct acl_object_label *g_tmp, **guser, *glast = NULL;
++      unsigned int len;
++      char *tmp;
++
++      if (obj->globbed == NULL)
++              return 0;
++
++      guser = &obj->globbed;
++      while (*guser) {
++              g_tmp = (struct acl_object_label *)
++                      acl_alloc(sizeof (struct acl_object_label));
++              if (g_tmp == NULL)
++                      return -ENOMEM;
++
++              if (copy_from_user(g_tmp, *guser,
++                                 sizeof (struct acl_object_label)))
++                      return -EFAULT;
++
++              len = strnlen_user(g_tmp->filename, PATH_MAX);
++
++              if (!len || len >= PATH_MAX)
++                      return -EINVAL;
++
++              if ((tmp = (char *) acl_alloc(len)) == NULL)
++                      return -ENOMEM;
++
++              if (copy_from_user(tmp, g_tmp->filename, len))
++                      return -EFAULT;
++
++              g_tmp->filename = tmp;
++
++              if (glast)
++                      glast->next = g_tmp;
++              g_tmp->prev = glast;
++              *guser = g_tmp;
++              glast = g_tmp;
++              guser = &((*guser)->next);
++      }
++
++      return 0;
++}
++
++static int
++copy_user_objs(struct acl_object_label *userp, struct acl_subject_label *subj,
++             struct acl_role_label *role)
++{
++      struct acl_object_label *o_tmp;
++      unsigned int len;
++      int ret;
++      char *tmp;
++
++      while (userp) {
++              if ((o_tmp = (struct acl_object_label *)
++                   acl_alloc(sizeof (struct acl_object_label))) == NULL)
++                      return -ENOMEM;
++
++              if (copy_from_user(o_tmp, userp,
++                                 sizeof (struct acl_object_label)))
++                      return -EFAULT;
++
++              userp = o_tmp->prev;
++
++              len = strnlen_user(o_tmp->filename, PATH_MAX);
++
++              if (!len || len >= PATH_MAX)
++                      return -EINVAL;
++
++              if ((tmp = (char *) acl_alloc(len)) == NULL)
++                      return -ENOMEM;
++
++              if (copy_from_user(tmp, o_tmp->filename, len))
++                      return -EFAULT;
++
++              o_tmp->filename = tmp;
++
++              insert_acl_obj_label(o_tmp, subj);
++              if (!insert_name_entry(o_tmp->filename, o_tmp->inode,
++                                     o_tmp->device))
++                      return -ENOMEM;
++
++              ret = copy_user_glob(o_tmp);
++              if (ret)
++                      return ret;
++
++              if (o_tmp->nested) {
++                      o_tmp->nested = do_copy_user_subj(o_tmp->nested, role);
++                      if (IS_ERR(o_tmp->nested))
++                              return PTR_ERR(o_tmp->nested);
++
++                      s_final = o_tmp->nested;
++              }
++      }
++
++      return 0;
++}
++
++static __u32
++count_user_subjs(struct acl_subject_label *userp)
++{
++      struct acl_subject_label s_tmp;
++      __u32 num = 0;
++
++      while (userp) {
++              if (copy_from_user(&s_tmp, userp,
++                                 sizeof (struct acl_subject_label)))
++                      break;
++
++              userp = s_tmp.prev;
++              /* do not count nested subjects against this count, since
++                 they are not included in the hash table, but are
++                 attached to objects.  We have already counted
++                 the subjects in userspace for the allocation 
++                 stack
++              */
++              if (!(s_tmp.mode & GR_NESTED))
++                      num++;
++      }
++
++      return num;
++}
++
++static int
++copy_user_allowedips(struct acl_role_label *rolep)
++{
++      struct role_allowed_ip *ruserip, *rtmp = NULL, *rlast;
++
++      ruserip = rolep->allowed_ips;
++
++      while (ruserip) {
++              rlast = rtmp;
++
++              if ((rtmp = (struct role_allowed_ip *)
++                   acl_alloc(sizeof (struct role_allowed_ip))) == NULL)
++                      return -ENOMEM;
++
++              if (copy_from_user(rtmp, ruserip,
++                                 sizeof (struct role_allowed_ip)))
++                      return -EFAULT;
++
++              ruserip = rtmp->prev;
++
++              if (!rlast) {
++                      rtmp->prev = NULL;
++                      rolep->allowed_ips = rtmp;
++              } else {
++                      rlast->next = rtmp;
++                      rtmp->prev = rlast;
++              }
++
++              if (!ruserip)
++                      rtmp->next = NULL;
++      }
++
++      return 0;
++}
++
++static int
++copy_user_transitions(struct acl_role_label *rolep)
++{
++      struct role_transition *rusertp, *rtmp = NULL, *rlast;
++      unsigned int len;
++      char *tmp;
++
++      rusertp = rolep->transitions;
++
++      while (rusertp) {
++              rlast = rtmp;
++
++              if ((rtmp = (struct role_transition *)
++                   acl_alloc(sizeof (struct role_transition))) == NULL)
++                      return -ENOMEM;
++
++              if (copy_from_user(rtmp, rusertp,
++                                 sizeof (struct role_transition)))
++                      return -EFAULT;
++
++              rusertp = rtmp->prev;
++
++              len = strnlen_user(rtmp->rolename, GR_SPROLE_LEN);
++
++              if (!len || len >= GR_SPROLE_LEN)
++                      return -EINVAL;
++
++              if ((tmp = (char *) acl_alloc(len)) == NULL)
++                      return -ENOMEM;
++
++              if (copy_from_user(tmp, rtmp->rolename, len))
++                      return -EFAULT;
++
++              rtmp->rolename = tmp;
++
++              if (!rlast) {
++                      rtmp->prev = NULL;
++                      rolep->transitions = rtmp;
++              } else {
++                      rlast->next = rtmp;
++                      rtmp->prev = rlast;
++              }
++
++              if (!rusertp)
++                      rtmp->next = NULL;
++      }
++
++      return 0;
++}
++
++static struct acl_subject_label *
++do_copy_user_subj(struct acl_subject_label *userp, struct acl_role_label *role)
++{
++      struct acl_subject_label *s_tmp = NULL, *s_tmp2;
++      unsigned int len;
++      char *tmp;
++      __u32 num_objs;
++      struct acl_ip_label **i_tmp, *i_utmp2;
++      struct gr_hash_struct ghash;
++      struct subject_map *subjmap;
++      unsigned long i_num;
++      int err;
++
++      s_tmp = lookup_subject_map(userp);
++
++      /* we've already copied this subject into the kernel, just return
++         the reference to it, and don't copy it over again
++      */
++      if (s_tmp)
++              return(s_tmp);
++
++
++      if ((s_tmp = (struct acl_subject_label *)
++          acl_alloc(sizeof (struct acl_subject_label))) == NULL)
++              return ERR_PTR(-ENOMEM);
++
++      subjmap = (struct subject_map *)kmalloc(sizeof (struct subject_map), GFP_KERNEL);
++      if (subjmap == NULL)
++              return ERR_PTR(-ENOMEM);
++
++      subjmap->user = userp;
++      subjmap->kernel = s_tmp;
++      insert_subj_map_entry(subjmap);
++
++      if (copy_from_user(s_tmp, userp,
++                         sizeof (struct acl_subject_label)))
++              return ERR_PTR(-EFAULT);
++
++      if (!s_last) {
++              s_tmp->prev = NULL;
++              role->hash->first = s_tmp;
++      } else {
++              s_last->next = s_tmp;
++              s_tmp->prev = s_last;
++      }
++
++      s_last = s_tmp;
++
++      len = strnlen_user(s_tmp->filename, PATH_MAX);
++
++      if (!len || len >= PATH_MAX)
++              return ERR_PTR(-EINVAL);
++
++      if ((tmp = (char *) acl_alloc(len)) == NULL)
++              return ERR_PTR(-ENOMEM);
++
++      if (copy_from_user(tmp, s_tmp->filename, len))
++              return ERR_PTR(-EFAULT);
++
++      s_tmp->filename = tmp;
++
++      if (!strcmp(s_tmp->filename, "/"))
++              role->root_label = s_tmp;
++
++      if (copy_from_user(&ghash, s_tmp->hash, sizeof(struct gr_hash_struct)))
++              return ERR_PTR(-EFAULT);
++
++      /* copy user and group transition tables */
++
++      if (s_tmp->user_trans_num) {
++              uid_t *uidlist;
++
++              uidlist = (uid_t *)acl_alloc(s_tmp->user_trans_num * sizeof(uid_t));
++              if (uidlist == NULL)
++                      return ERR_PTR(-ENOMEM);
++              if (copy_from_user(uidlist, s_tmp->user_transitions, s_tmp->user_trans_num * sizeof(uid_t)))
++                      return ERR_PTR(-EFAULT);
++
++              s_tmp->user_transitions = uidlist;
++      }
++
++      if (s_tmp->group_trans_num) {
++              gid_t *gidlist;
++
++              gidlist = (gid_t *)acl_alloc(s_tmp->group_trans_num * sizeof(gid_t));
++              if (gidlist == NULL)
++                      return ERR_PTR(-ENOMEM);
++              if (copy_from_user(gidlist, s_tmp->group_transitions, s_tmp->group_trans_num * sizeof(gid_t)))
++                      return ERR_PTR(-EFAULT);
++
++              s_tmp->group_transitions = gidlist;
++      }
++
++      /* set up object hash table */
++      num_objs = count_user_objs(ghash.first);
++
++      s_tmp->obj_hash_size = num_objs;
++      s_tmp->obj_hash =
++          (struct acl_object_label **)
++          create_table(&(s_tmp->obj_hash_size));
++
++      if (!s_tmp->obj_hash)
++              return ERR_PTR(-ENOMEM);
++
++      memset(s_tmp->obj_hash, 0,
++             s_tmp->obj_hash_size *
++             sizeof (struct acl_object_label *));
++
++      /* copy before adding in objects, since a nested
++         acl could be found and be the final subject
++         copied
++      */
++
++      s_final = s_tmp;
++
++      /* add in objects */
++      err = copy_user_objs(ghash.first, s_tmp, role);
++
++      if (err)
++              return ERR_PTR(err);
++
++      /* set pointer for parent subject */
++      if (s_tmp->parent_subject) {
++              s_tmp2 = do_copy_user_subj(s_tmp->parent_subject, role);
++
++              if (IS_ERR(s_tmp2))
++                      return s_tmp2;
++
++              s_tmp->parent_subject = s_tmp2;
++      }
++
++      /* add in ip acls */
++
++      if (!s_tmp->ip_num) {
++              s_tmp->ips = NULL;
++              goto insert;
++      }
++
++      i_tmp =
++          (struct acl_ip_label **) acl_alloc(s_tmp->ip_num *
++                                             sizeof (struct
++                                                     acl_ip_label *));
++
++      if (!i_tmp)
++              return ERR_PTR(-ENOMEM);
++
++      for (i_num = 0; i_num < s_tmp->ip_num; i_num++) {
++              *(i_tmp + i_num) =
++                  (struct acl_ip_label *)
++                  acl_alloc(sizeof (struct acl_ip_label));
++              if (!*(i_tmp + i_num))
++                      return ERR_PTR(-ENOMEM);
++
++              if (copy_from_user
++                  (&i_utmp2, s_tmp->ips + i_num,
++                   sizeof (struct acl_ip_label *)))
++                      return ERR_PTR(-EFAULT);
++
++              if (copy_from_user
++                  (*(i_tmp + i_num), i_utmp2,
++                   sizeof (struct acl_ip_label)))
++                      return ERR_PTR(-EFAULT);
++      }
++
++      s_tmp->ips = i_tmp;
++
++insert:
++      if (!insert_name_entry(s_tmp->filename, s_tmp->inode,
++                             s_tmp->device))
++              return ERR_PTR(-ENOMEM);
++
++      return s_tmp;
++}
++
++static int
++copy_user_subjs(struct acl_subject_label *userp, struct acl_role_label *role)
++{
++      struct acl_subject_label s_pre;
++      struct acl_subject_label * ret;
++      int err;
++
++      while (userp) {
++              if (copy_from_user(&s_pre, userp,
++                                 sizeof (struct acl_subject_label)))
++                      return -EFAULT;
++              
++              /* do not add nested subjects here, add
++                 while parsing objects
++              */
++
++              if (s_pre.mode & GR_NESTED) {
++                      userp = s_pre.prev;
++                      continue;
++              }
++
++              ret = do_copy_user_subj(userp, role);
++
++              err = PTR_ERR(ret);
++              if (IS_ERR(ret))
++                      return err;
++
++              insert_acl_subj_label(ret, role);
++
++              userp = s_pre.prev;
++      }
++
++      s_final->next = NULL;
++
++      return 0;
++}
++
++static int
++copy_user_acl(struct gr_arg *arg)
++{
++      struct acl_role_label *r_tmp = NULL, **r_utmp, *r_utmp2, *r_last;
++      struct sprole_pw *sptmp;
++      struct gr_hash_struct *ghash;
++      uid_t *domainlist;
++      unsigned long r_num;
++      unsigned int len;
++      char *tmp;
++      int err = 0;
++      __u16 i;
++      __u32 num_subjs;
++
++      /* we need a default and kernel role */
++      if (arg->role_db.num_roles < 2)
++              return -EINVAL;
++
++      /* copy special role authentication info from userspace */
++
++      num_sprole_pws = arg->num_sprole_pws;
++      acl_special_roles = (struct sprole_pw **) acl_alloc(num_sprole_pws * sizeof(struct sprole_pw *));
++
++      if (!acl_special_roles) {
++              err = -ENOMEM;
++              goto cleanup;
++      }
++
++      for (i = 0; i < num_sprole_pws; i++) {
++              sptmp = (struct sprole_pw *) acl_alloc(sizeof(struct sprole_pw));
++              if (!sptmp) {
++                      err = -ENOMEM;
++                      goto cleanup;
++              }
++              if (copy_from_user(sptmp, arg->sprole_pws + i,
++                                 sizeof (struct sprole_pw))) {
++                      err = -EFAULT;
++                      goto cleanup;
++              }
++
++              len =
++                  strnlen_user(sptmp->rolename, GR_SPROLE_LEN);
++
++              if (!len || len >= GR_SPROLE_LEN) {
++                      err = -EINVAL;
++                      goto cleanup;
++              }
++
++              if ((tmp = (char *) acl_alloc(len)) == NULL) {
++                      err = -ENOMEM;
++                      goto cleanup;
++              }
++
++              if (copy_from_user(tmp, sptmp->rolename, len)) {
++                      err = -EFAULT;
++                      goto cleanup;
++              }
++
++#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
++              printk(KERN_ALERT "Copying special role %s\n", tmp);
++#endif
++              sptmp->rolename = tmp;
++              acl_special_roles[i] = sptmp;
++      }
++
++      r_utmp = (struct acl_role_label **) arg->role_db.r_table;
++
++      for (r_num = 0; r_num < arg->role_db.num_roles; r_num++) {
++              r_last = r_tmp;
++
++              r_tmp = acl_alloc(sizeof (struct acl_role_label));
++
++              if (!r_tmp) {
++                      err = -ENOMEM;
++                      goto cleanup;
++              }
++
++              if (copy_from_user(&r_utmp2, r_utmp + r_num,
++                                 sizeof (struct acl_role_label *))) {
++                      err = -EFAULT;
++                      goto cleanup;
++              }
++
++              if (copy_from_user(r_tmp, r_utmp2,
++                                 sizeof (struct acl_role_label))) {
++                      err = -EFAULT;
++                      goto cleanup;
++              }
++
++              if (!r_last) {
++                      r_tmp->prev = NULL;
++                      role_list_head = r_tmp;
++              } else {
++                      r_last->next = r_tmp;
++                      r_tmp->prev = r_last;
++              }
++
++              if (r_num == (arg->role_db.num_roles - 1))
++                      r_tmp->next = NULL;
++
++              len = strnlen_user(r_tmp->rolename, GR_SPROLE_LEN);
++
++              if (!len || len >= PATH_MAX) {
++                      err = -EINVAL;
++                      goto cleanup;
++              }
++
++              if ((tmp = (char *) acl_alloc(len)) == NULL) {
++                      err = -ENOMEM;
++                      goto cleanup;
++              }
++              if (copy_from_user(tmp, r_tmp->rolename, len)) {
++                      err = -EFAULT;
++                      goto cleanup;
++              }
++              r_tmp->rolename = tmp;
++
++              if (!strcmp(r_tmp->rolename, "default")
++                  && (r_tmp->roletype & GR_ROLE_DEFAULT)) {
++                      default_role = r_tmp;
++              } else if (!strcmp(r_tmp->rolename, ":::kernel:::")) {
++                      kernel_role = r_tmp;
++              }
++
++              if ((ghash = (struct gr_hash_struct *) acl_alloc(sizeof(struct gr_hash_struct))) == NULL) {
++                      err = -ENOMEM;
++                      goto cleanup;
++              }
++              if (copy_from_user(ghash, r_tmp->hash, sizeof(struct gr_hash_struct))) {
++                      err = -EFAULT;
++                      goto cleanup;
++              }
++
++              r_tmp->hash = ghash;
++
++              num_subjs = count_user_subjs(r_tmp->hash->first);
++
++              r_tmp->subj_hash_size = num_subjs;
++              r_tmp->subj_hash =
++                  (struct acl_subject_label **)
++                  create_table(&(r_tmp->subj_hash_size));
++
++              if (!r_tmp->subj_hash) {
++                      err = -ENOMEM;
++                      goto cleanup;
++              }
++
++              err = copy_user_allowedips(r_tmp);
++              if (err)
++                      goto cleanup;
++
++              /* copy domain info */
++              if (r_tmp->domain_children != NULL) {
++                      domainlist = acl_alloc(r_tmp->domain_child_num * sizeof(uid_t));
++                      if (domainlist == NULL) {
++                              err = -ENOMEM;
++                              goto cleanup;
++                      }
++                      if (copy_from_user(domainlist, r_tmp->domain_children, r_tmp->domain_child_num * sizeof(uid_t))) {
++                              err = -EFAULT;
++                              goto cleanup;
++                      }
++                      r_tmp->domain_children = domainlist;
++              }
++
++              err = copy_user_transitions(r_tmp);
++              if (err)
++                      goto cleanup;
++
++              memset(r_tmp->subj_hash, 0,
++                     r_tmp->subj_hash_size *
++                     sizeof (struct acl_subject_label *));
++
++              s_last = NULL;
++
++              err = copy_user_subjs(r_tmp->hash->first, r_tmp);
++
++              if (err)
++                      goto cleanup;
++
++              insert_acl_role_label(r_tmp);
++      }
++
++      goto return_err;
++      cleanup:
++      free_variables();
++      return_err:
++      return err;
++
++}
++
++static int
++gracl_init(struct gr_arg *args)
++{
++      int error = 0;
++
++      memcpy(gr_system_salt, args->salt, GR_SALT_LEN);
++      memcpy(gr_system_sum, args->sum, GR_SHA_LEN);
++
++      if (init_variables(args)) {
++              security_alert_good(GR_INITF_ACL_MSG, GR_VERSION);
++              error = -ENOMEM;
++              free_variables();
++              goto out;
++      }
++
++      error = copy_user_acl(args);
++      free_init_variables();
++      if (error) {
++              free_variables();
++              goto out;
++      }
++
++      if ((error = gr_set_acls(0))) {
++              free_variables();
++              goto out;
++      }
++
++      gr_status |= GR_READY;
++      out:
++      return error;
++}
++
++/* derived from glibc fnmatch() 0: match, 1: no match*/
++
++static int
++glob_match(const char *pattern, const char *string)
++{
++      const char *p = pattern, *n = string;
++      char c;
++
++      while ((c = *p++) != '\0') {
++      switch (c) {
++              case '?':
++                      if (*n == '\0')
++                              return 1;
++                      else if (*n == '/')
++                              return 1;
++                      break;
++              case '\\':
++                      if (*n != c)
++                              return 1;
++                      break;
++              case '*':
++                      for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
++                              if ((*n == '/') || (c == '?' && *n == '\0'))
++                                      return 1;
++                      if (c == '\0')
++                              return 0;
++                      {
++                              char c1 = c;
++                              for (--p; *n != '\0'; ++n)
++                                      if (((c == '[') || (*n == c1)) && !glob_match(p, n))
++                                              return 0;
++                              return 1;
++                      }
++              case '[':
++                      {
++                      int not;
++
++                      if (*n == '\0')
++                              return 1;
++                      not = (*p == '!' || *p == '^');
++                      if (not)
++                              ++p;
++
++                      c = *p++;
++                      for (;;) {
++                              char cstart = c, cend = c;
++
++                              if (c == '\0')
++                                      return 1;
++                              c = *p++;
++
++                              if (c == '/')
++                                      return 1;
++
++                              if (c == '-' && *p != ']') {
++                                      cend = *p++;
++                                      if (cend == '\0')
++                                              return 1;
++                                      c = *p++;
++                              }
++
++                              if (*n >= cstart && *n <= cend)
++                                      goto matched;
++
++                              if (c == ']')
++                                      break;
++                      }
++                      if (!not)
++                              return 1;
++                      break;
++              matched:
++                      while (c != ']') {
++                              if (c == '\0')
++                                      return 1;
++
++                              c = *p++;
++                      }
++                      if (not)
++                              return 1;
++              }
++              break;
++      default:
++              if (c != *n)
++                      return 1;
++      }
++
++      ++n;
++      }
++
++      if (*n == '\0')
++              return 0;
++
++      if (*n == '/')
++              return 0;
++
++      return 1;
++}
++
++static struct acl_object_label *
++chk_glob_label(struct acl_object_label *globbed,
++      struct dentry *dentry, struct vfsmount *mnt, char **path)
++{
++      struct acl_object_label *tmp;
++
++      if (*path == NULL)
++              *path = gr_to_filename_nolock(dentry, mnt);
++
++      tmp = globbed;
++
++      while (tmp) {
++              if (!glob_match(tmp->filename, *path))
++                      return tmp;
++              tmp = tmp->next;
++      }
++
++      return NULL;
++}
++
++static __inline__ struct acl_object_label *
++full_lookup(const struct dentry *orig_dentry, const struct vfsmount *orig_mnt,
++          struct dentry *curr_dentry,
++          const struct acl_subject_label *subj, char **path)
++{
++      struct acl_subject_label *tmpsubj;
++      struct acl_object_label *retval;
++      struct acl_object_label *retval2;
++
++      tmpsubj = (struct acl_subject_label *) subj;
++      read_lock(&gr_inode_lock);
++      do {
++              retval = lookup_acl_obj_label(curr_dentry->d_inode->i_ino,
++                                      curr_dentry->d_inode->i_sb->s_dev, tmpsubj);
++              if (retval) {
++                      if (retval->globbed) {
++                              retval2 = chk_glob_label(retval->globbed, (struct dentry *)orig_dentry,
++                                              (struct vfsmount *)orig_mnt, path);
++                              if (retval2)
++                                      retval = retval2;
++                      }
++                      break;
++              }
++      } while ((tmpsubj = tmpsubj->parent_subject));
++      read_unlock(&gr_inode_lock);
++
++      return retval;
++}
++
++static struct acl_object_label *
++chk_obj_label(const struct dentry *l_dentry, const struct vfsmount *l_mnt,
++            const struct acl_subject_label *subj)
++{
++      struct dentry *dentry = (struct dentry *) l_dentry;
++      struct vfsmount *mnt = (struct vfsmount *) l_mnt;
++      struct acl_object_label *retval;
++      char *path = NULL;
++
++      spin_lock(&dcache_lock);
++
++      for (;;) {
++              if (dentry == real_root && mnt == real_root_mnt)
++                      break;
++              if (dentry == mnt->mnt_root || IS_ROOT(dentry)) {
++                      if (mnt->mnt_parent == mnt)
++                              break;
++
++                      retval = full_lookup(l_dentry, l_mnt, dentry, subj, &path);
++                      if (retval != NULL)
++                              goto out;
++
++                      dentry = mnt->mnt_mountpoint;
++                      mnt = mnt->mnt_parent;
++                      continue;
++              }
++
++              retval = full_lookup(l_dentry, l_mnt, dentry, subj, &path);
++              if (retval != NULL)
++                      goto out;
++
++              dentry = dentry->d_parent;
++      }
++
++      retval = full_lookup(l_dentry, l_mnt, dentry, subj, &path);
++
++      if (retval == NULL)
++              retval = full_lookup(l_dentry, l_mnt, real_root, subj, &path);
++out:
++      spin_unlock(&dcache_lock);
++
++      return retval;
++}
++
++static struct acl_object_label *
++chk_obj_create_label(const struct dentry *l_dentry, const struct vfsmount *l_mnt,
++            const struct acl_subject_label *subj, char *path)
++{
++      struct dentry *dentry = (struct dentry *) l_dentry;
++      struct vfsmount *mnt = (struct vfsmount *) l_mnt;
++      struct acl_object_label *retval;
++
++      spin_lock(&dcache_lock);
++
++      for (;;) {
++              if (dentry == real_root && mnt == real_root_mnt)
++                      break;
++              if (dentry == mnt->mnt_root || IS_ROOT(dentry)) {
++                      if (mnt->mnt_parent == mnt)
++                              break;
++
++                      retval = full_lookup(l_dentry, l_mnt, dentry, subj, &path);
++                      if (retval != NULL)
++                              goto out;
++
++                      dentry = mnt->mnt_mountpoint;
++                      mnt = mnt->mnt_parent;
++                      continue;
++              }
++
++              retval = full_lookup(l_dentry, l_mnt, dentry, subj, &path);
++              if (retval != NULL)
++                      goto out;
++
++              dentry = dentry->d_parent;
++      }
++
++      retval = full_lookup(l_dentry, l_mnt, dentry, subj, &path);
++
++      if (retval == NULL)
++              retval = full_lookup(l_dentry, l_mnt, real_root, subj, &path);
++out:
++      spin_unlock(&dcache_lock);
++
++      return retval;
++}
++
++static struct acl_subject_label *
++chk_subj_label(const struct dentry *l_dentry, const struct vfsmount *l_mnt,
++             const struct acl_role_label *role)
++{
++      struct dentry *dentry = (struct dentry *) l_dentry;
++      struct vfsmount *mnt = (struct vfsmount *) l_mnt;
++      struct acl_subject_label *retval;
++
++      spin_lock(&dcache_lock);
++
++      for (;;) {
++              if (unlikely(dentry == real_root && mnt == real_root_mnt))
++                      break;
++              if (unlikely(dentry == mnt->mnt_root || IS_ROOT(dentry))) {
++                      if (mnt->mnt_parent == mnt)
++                              break;
++
++                      read_lock(&gr_inode_lock);
++                      retval =
++                          lookup_acl_subj_label(dentry->d_inode->i_ino,
++                                                dentry->d_inode->i_sb->s_dev, role);
++                      read_unlock(&gr_inode_lock);
++                      if (unlikely(retval != NULL))
++                              goto out;
++
++                      dentry = mnt->mnt_mountpoint;
++                      mnt = mnt->mnt_parent;
++                      continue;
++              }
++
++              read_lock(&gr_inode_lock);
++              retval =
++                  lookup_acl_subj_label(dentry->d_inode->i_ino,
++                                        dentry->d_inode->i_sb->s_dev, role);
++              read_unlock(&gr_inode_lock);
++              if (unlikely(retval != NULL))
++                      goto out;
++
++              dentry = dentry->d_parent;
++      }
++
++      read_lock(&gr_inode_lock);
++      retval =
++          lookup_acl_subj_label(dentry->d_inode->i_ino,
++                                dentry->d_inode->i_sb->s_dev, role);
++      read_unlock(&gr_inode_lock);
++
++      if (unlikely(retval == NULL)) {
++              read_lock(&gr_inode_lock);
++              retval =
++                  lookup_acl_subj_label(real_root->d_inode->i_ino,
++                                        real_root->d_inode->i_sb->s_dev, role);
++              read_unlock(&gr_inode_lock);
++      }
++      out:
++      spin_unlock(&dcache_lock);
++
++      return retval;
++}
++
++static __inline__ void
++gr_log_learn(const struct acl_role_label *role, const uid_t uid, const gid_t gid,
++           const struct task_struct *task, const char *pathname,
++           const __u32 mode)
++{
++      security_learn(GR_LEARN_AUDIT_MSG, role->rolename, role->roletype,
++                     uid, gid, task->exec_file ? gr_to_filename1(task->exec_file->f_dentry,
++                     task->exec_file->f_vfsmnt) : task->acl->filename, task->acl->filename,
++                     1, 1, pathname, (unsigned long) mode, NIPQUAD(task->curr_ip));
++
++      return;
++}
++
++__u32
++gr_check_link(const struct dentry * new_dentry,
++            const struct dentry * parent_dentry,
++            const struct vfsmount * parent_mnt,
++            const struct dentry * old_dentry, const struct vfsmount * old_mnt)
++{
++      struct acl_object_label *obj;
++      __u32 oldmode, newmode;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return (GR_WRITE | GR_CREATE);
++
++      obj = chk_obj_label(old_dentry, old_mnt, current->acl);
++      oldmode = obj->mode;
++
++      if (current->acl->mode & GR_LEARN)
++              oldmode |= (GR_WRITE | GR_CREATE);
++      newmode =
++          gr_check_create(new_dentry, parent_dentry, parent_mnt,
++                          oldmode | GR_CREATE | GR_AUDIT_CREATE |
++                          GR_AUDIT_WRITE | GR_SUPPRESS);
++
++      if ((newmode & oldmode) == oldmode)
++              return newmode;
++      else if (current->acl->mode & GR_LEARN) {
++              gr_log_learn(current->role, current->uid, current->gid,
++                      current, gr_to_filename(old_dentry, old_mnt), oldmode);
++              return (GR_WRITE | GR_CREATE);
++      } else if (newmode & GR_SUPPRESS)
++              return GR_SUPPRESS;
++      else
++              return 0;
++}
++
++__u32
++gr_search_file(const struct dentry * dentry, const __u32 mode,
++             const struct vfsmount * mnt)
++{
++      __u32 retval = mode;
++      struct acl_subject_label *curracl;
++      struct acl_object_label *currobj;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return (mode & ~GR_AUDITS);
++
++      curracl = current->acl;
++
++      currobj = chk_obj_label(dentry, mnt, curracl);
++      retval = currobj->mode & mode;
++
++      if (unlikely
++          ((curracl->mode & GR_LEARN) && !(mode & GR_NOPTRACE)
++           && (retval != (mode & ~(GR_AUDITS | GR_SUPPRESS))))) {
++              __u32 new_mode = mode;
++
++              new_mode &= ~(GR_AUDITS | GR_SUPPRESS);
++
++              retval = new_mode;
++
++              if (!(mode & GR_NOLEARN))
++                      gr_log_learn(current->role, current->uid, current->gid,
++                                   current, gr_to_filename(dentry, mnt), new_mode);
++      }
++
++      return retval;
++}
++
++__u32
++gr_check_create(const struct dentry * new_dentry, const struct dentry * parent,
++              const struct vfsmount * mnt, const __u32 mode)
++{
++      struct name_entry *match;
++      struct acl_object_label *matchpo;
++      struct acl_subject_label *curracl;
++      char *path;
++      __u32 retval;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return (mode & ~GR_AUDITS);
++
++      preempt_disable();
++      path = gr_to_filename(new_dentry, mnt);
++      match = lookup_name_entry(path);
++
++      if (!match)
++              goto check_parent;
++
++      curracl = current->acl;
++
++      read_lock(&gr_inode_lock);
++      matchpo = lookup_acl_obj_label_create(match->inode, match->device, curracl);
++      read_unlock(&gr_inode_lock);
++
++      if (matchpo) {
++              if ((matchpo->mode & mode) !=
++                  (mode & ~(GR_AUDITS | GR_SUPPRESS))
++                  && curracl->mode & GR_LEARN) {
++                      __u32 new_mode = mode;
++
++                      new_mode &= ~(GR_AUDITS | GR_SUPPRESS);
++
++                      gr_log_learn(current->role, current->uid, current->gid,
++                                   current, gr_to_filename(new_dentry, mnt), new_mode);
++
++                      preempt_enable();
++                      return new_mode;
++              }
++              preempt_enable();
++              return (matchpo->mode & mode);
++      }
++
++      check_parent:
++      curracl = current->acl;
++
++      matchpo = chk_obj_create_label(parent, mnt, curracl, path);
++      retval = matchpo->mode & mode;
++
++      if ((retval != (mode & ~(GR_AUDITS | GR_SUPPRESS)))
++          && (curracl->mode & GR_LEARN)) {
++              __u32 new_mode = mode;
++
++              new_mode &= ~(GR_AUDITS | GR_SUPPRESS);
++
++              gr_log_learn(current->role, current->uid, current->gid, 
++                           current, gr_to_filename(new_dentry, mnt), new_mode);
++              preempt_enable();
++              return new_mode;
++      }
++
++      preempt_enable();
++      return retval;
++}
++
++int
++gr_check_hidden_task(const struct task_struct *task)
++{
++      if (unlikely(!(gr_status & GR_READY)))
++              return 0;
++
++      if (!(task->acl->mode & GR_FIND) && !(current->acl->mode & GR_VIEW))
++              return 1;
++
++      return 0;
++}
++
++int
++gr_check_protected_task(const struct task_struct *task)
++{
++      if (unlikely(!(gr_status & GR_READY) || !task))
++              return 0;
++
++      if ((task->acl->mode & GR_PROTECTED) && !(current->acl->mode & GR_KILL))
++              return 1;
++
++      return 0;
++}
++
++__inline__ void
++gr_copy_label(struct task_struct *tsk)
++{
++      tsk->used_accept = 0;
++      tsk->acl_sp_role = 0;
++      tsk->acl_role_id = current->acl_role_id;
++      tsk->acl = current->acl;
++      tsk->role = current->role;
++      tsk->curr_ip = current->curr_ip;
++      if (current->exec_file)
++              get_file(current->exec_file);
++      tsk->exec_file = current->exec_file;
++      tsk->is_writable = current->is_writable;
++      if (unlikely(current->used_accept))
++              current->curr_ip = 0;
++
++      return;
++}
++
++static __inline__ void
++gr_set_proc_res(void)
++{
++      struct acl_subject_label *proc;
++      unsigned short i;
++
++      proc = current->acl;
++
++      if (proc->mode & GR_LEARN)
++              return;
++
++      for (i = 0; i < RLIM_NLIMITS; i++) {
++              if (!(proc->resmask & (1 << i)))
++                      continue;
++
++              current->rlim[i].rlim_cur = proc->res[i].rlim_cur;
++              current->rlim[i].rlim_max = proc->res[i].rlim_max;
++      }
++
++      return;
++}
++
++static __inline__ void
++do_set_role_label(struct task_struct *task, const uid_t uid, const gid_t gid)
++{
++      task->role = lookup_acl_role_label(task, uid, gid);
++
++      return;
++}
++
++EXPORT_SYMBOL(gr_check_user_change);
++
++int
++gr_check_user_change(int real, int effective, int fs)
++{
++      unsigned int i;
++      __u16 num;
++      uid_t *uidlist;
++      int curuid;
++      int realok = 0;
++      int effectiveok = 0;
++      int fsok = 0;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return 0;
++
++      num = current->acl->user_trans_num;
++      uidlist = current->acl->user_transitions;
++
++      if (uidlist == NULL)
++              return 0;
++
++      if (real == -1)
++              realok = 1;
++      if (effective == -1)
++              effectiveok = 1;
++      if (fs == -1)
++              fsok = 1;
++
++      if (current->acl->user_trans_type & GR_ID_ALLOW) {
++              for (i = 0; i < num; i++) {
++                      curuid = (int)uidlist[i];
++                      if (real == curuid)
++                              realok = 1;
++                      if (effective == curuid)
++                              effectiveok = 1;
++                      if (fs == curuid)
++                              fsok = 1;
++              }
++      } else if (current->acl->user_trans_type & GR_ID_DENY) {
++              for (i = 0; i < num; i++) {
++                      curuid = (int)uidlist[i];
++                      if (real == curuid)
++                              break;
++                      if (effective == curuid)
++                              break;
++                      if (fs == curuid)
++                              break;
++              }
++              /* not in deny list */
++              if (i == num) {
++                      realok = 1;
++                      effectiveok = 1;
++                      fsok = 1;
++              }
++      }
++
++      if (realok && effectiveok && fsok)
++              return 0;
++      else {
++              security_alert(GR_USRCHANGE_ACL_MSG,
++                      realok ? (effectiveok ? (fsok ? 0 : fs) : effective) : real, DEFAULTSECARGS);
++              return 1;
++      }
++}
++
++EXPORT_SYMBOL(gr_check_group_change);
++
++int
++gr_check_group_change(int real, int effective, int fs)
++{
++      unsigned int i;
++      __u16 num;
++      gid_t *gidlist;
++      int curgid;
++      int realok = 0;
++      int effectiveok = 0;
++      int fsok = 0;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return 0;
++
++      num = current->acl->group_trans_num;
++      gidlist = current->acl->group_transitions;
++
++      if (gidlist == NULL)
++              return 0;
++
++      if (real == -1)
++              realok = 1;
++      if (effective == -1)
++              effectiveok = 1;
++      if (fs == -1)
++              fsok = 1;
++
++      if (current->acl->group_trans_type & GR_ID_ALLOW) {
++              for (i = 0; i < num; i++) {
++                      curgid = (int)gidlist[i];
++                      if (real == curgid)
++                              realok = 1;
++                      if (effective == curgid)
++                              effectiveok = 1;
++                      if (fs == curgid)
++                              fsok = 1;
++              }
++      } else if (current->acl->group_trans_type & GR_ID_DENY) {
++              for (i = 0; i < num; i++) {
++                      curgid = (int)gidlist[i];
++                      if (real == curgid)
++                              break;
++                      if (effective == curgid)
++                              break;
++                      if (fs == curgid)
++                              break;
++              }
++              /* not in deny list */
++              if (i == num) {
++                      realok = 1;
++                      effectiveok = 1;
++                      fsok = 1;
++              }
++      }
++
++      if (realok && effectiveok && fsok)
++              return 0;
++      else {
++              security_alert(GR_GRPCHANGE_ACL_MSG,
++                      realok ? (effectiveok ? (fsok ? 0 : fs) : effective) : real, DEFAULTSECARGS);
++              return 1;
++      }
++}
++
++void
++gr_set_role_label(struct task_struct *task, const uid_t uid, const uid_t gid)
++{
++      struct acl_object_label *obj;
++      struct file *filp;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return;
++
++      filp = task->exec_file;
++
++      /* kernel process, we'll give them the kernel role */
++      if (unlikely(!filp)) {
++              task->role = kernel_role;
++              task->acl = kernel_role->root_label;
++              return;
++      } else if (!task->role || !(task->role->roletype & GR_ROLE_SPECIAL))
++              do_set_role_label(task, uid, gid);
++
++      task->acl =
++          chk_subj_label(filp->f_dentry, filp->f_vfsmnt, task->role);
++
++      task->is_writable = 0;
++
++      /* ignore additional mmap checks for processes that are writable 
++         by the default ACL */
++      obj = chk_obj_label(filp->f_dentry, filp->f_vfsmnt, default_role->root_label);
++      if (unlikely(obj->mode & GR_WRITE))
++              task->is_writable = 1;
++      obj = chk_obj_label(filp->f_dentry, filp->f_vfsmnt, task->role->root_label);
++      if (unlikely(obj->mode & GR_WRITE))
++              task->is_writable = 1;
++
++#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
++      printk(KERN_ALERT "Set role label for (%s:%d): role:%s, subject:%s\n", task->comm, task->pid, task->role->rolename, task->acl->filename);
++#endif
++
++      gr_set_proc_res();
++
++      return;
++}
++
++int
++gr_set_proc_label(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      struct task_struct *task = current;
++      struct acl_subject_label *newacl;
++      struct acl_object_label *obj;
++      __u32 retmode;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return 0;
++
++      newacl = chk_subj_label(dentry, mnt, task->role);
++
++      task_lock(task);
++      if (((task->ptrace & PT_PTRACED) && !(task->acl->mode &
++           GR_OVERRIDE) && (task->acl != newacl) &&
++           !(task->role->roletype & GR_ROLE_GOD) &&
++           !gr_search_file(dentry, GR_PTRACERD, mnt)) ||
++          (atomic_read(&task->fs->count) > 1 ||
++           atomic_read(&task->files->count) > 1 ||
++           atomic_read(&task->sighand->count) > 1)) {
++                task_unlock(task);
++              security_alert(GR_PTRACE_EXEC_ACL_MSG,
++                             gr_to_filename(dentry, mnt), DEFAULTSECARGS);
++              return -EACCES;
++      }
++      obj = chk_obj_label(dentry, mnt, task->acl);
++      retmode = obj->mode & (GR_INHERIT | GR_AUDIT_INHERIT);
++
++      if ((newacl->mode & GR_LEARN) || !(retmode & GR_INHERIT)) {
++              if (obj->nested)
++                      task->acl = obj->nested;
++              else
++                      task->acl = newacl;
++              task_unlock(task);
++      } else if (retmode & GR_INHERIT && retmode & GR_AUDIT_INHERIT) {
++              task_unlock(task);
++              security_audit(GR_INHERIT_ACL_MSG, task->acl->filename,
++                             gr_to_filename(dentry, mnt), DEFAULTSECARGS);
++      } else
++              task_unlock(task);
++
++      task->is_writable = 0;
++
++      /* ignore additional mmap checks for processes that are writable 
++         by the default ACL */
++      obj = chk_obj_label(dentry, mnt, default_role->root_label);
++      if (unlikely(obj->mode & GR_WRITE))
++              task->is_writable = 1;
++      obj = chk_obj_label(dentry, mnt, task->role->root_label);
++      if (unlikely(obj->mode & GR_WRITE))
++              task->is_writable = 1;
++
++      gr_set_proc_res();
++
++#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
++      printk(KERN_ALERT "Set subject label for (%s:%d): role:%s, subject:%s\n", task->comm, task->pid, task->role->rolename, task->acl->filename);
++#endif
++      return 0;
++}
++
++static __inline__ void
++do_handle_delete(const ino_t ino, const dev_t dev)
++{
++      struct acl_object_label *matchpo;
++      struct acl_subject_label *matchps;
++      struct acl_subject_label *i;
++      struct acl_role_label *role;
++
++      for (role = role_list_head; role; role = role->next) {
++              for (i = role->hash->first; i; i = i->next) {
++                      if (unlikely((i->mode & GR_NESTED) &&
++                                   (i->inode == ino) &&
++                                   (i->device == dev)))
++                              i->mode |= GR_DELETED;
++                      if (unlikely((matchpo =
++                           lookup_acl_obj_label(ino, dev, i)) != NULL))
++                              matchpo->mode |= GR_DELETED;
++              }
++
++              if (unlikely((matchps = lookup_acl_subj_label(ino, dev, role)) != NULL))
++                      matchps->mode |= GR_DELETED;
++      }
++
++      return;
++}
++
++void
++gr_handle_delete(const ino_t ino, const dev_t dev)
++{
++      if (unlikely(!(gr_status & GR_READY)))
++              return;
++
++      write_lock(&gr_inode_lock);
++      if (unlikely((unsigned long)lookup_inodev_entry(ino, dev)))
++              do_handle_delete(ino, dev);
++      write_unlock(&gr_inode_lock);
++
++      return;
++}
++
++static __inline__ void
++update_acl_obj_label(const ino_t oldinode, const dev_t olddevice,
++                   const ino_t newinode, const dev_t newdevice,
++                   struct acl_subject_label *subj)
++{
++      unsigned long index = fhash(oldinode, olddevice, subj->obj_hash_size);
++      struct acl_object_label **match;
++      struct acl_object_label *tmp;
++      __u8 i = 0;
++
++      match = &subj->obj_hash[index];
++
++      while (*match && ((*match)->inode != oldinode ||
++             (*match)->device != olddevice ||
++             !((*match)->mode & GR_DELETED))) {
++              index = (index + (1 << i)) % subj->obj_hash_size;
++              match = &subj->obj_hash[index];
++              i = (i + 1) % 32;
++      }
++
++      if (*match && ((*match) != deleted_object)
++          && ((*match)->inode == oldinode)
++          && ((*match)->device == olddevice)
++          && ((*match)->mode & GR_DELETED)) {
++              tmp = *match;
++              tmp->inode = newinode;
++              tmp->device = newdevice;
++              tmp->mode &= ~GR_DELETED;
++
++              *match = deleted_object;
++
++              insert_acl_obj_label(tmp, subj);
++      }
++
++      return;
++}
++
++static __inline__ void
++update_acl_subj_label(const ino_t oldinode, const dev_t olddevice,
++                    const ino_t newinode, const dev_t newdevice,
++                    struct acl_role_label *role)
++{
++      struct acl_subject_label **s_hash = role->subj_hash;
++      unsigned long subj_size = role->subj_hash_size;
++      unsigned long index = fhash(oldinode, olddevice, subj_size);
++      struct acl_subject_label **match;
++      struct acl_subject_label *tmp;
++      __u8 i = 0;
++
++      match = &s_hash[index];
++
++      while (*match && ((*match)->inode != oldinode ||
++             (*match)->device != olddevice ||
++             !((*match)->mode & GR_DELETED))) {
++              index = (index + (1 << i)) % subj_size;
++              i = (i + 1) % 32;
++              match = &s_hash[index];
++      }
++
++      if (*match && (*match != deleted_subject)
++          && ((*match)->inode == oldinode)
++          && ((*match)->device == olddevice)
++          && ((*match)->mode & GR_DELETED)) {
++              tmp = *match;
++
++              tmp->inode = newinode;
++              tmp->device = newdevice;
++              tmp->mode &= ~GR_DELETED;
++
++              *match = deleted_subject;
++
++              insert_acl_subj_label(tmp, role);
++      }
++
++      return;
++}
++
++static __inline__ void
++update_inodev_entry(const ino_t oldinode, const dev_t olddevice,
++                  const ino_t newinode, const dev_t newdevice)
++{
++      unsigned long index = fhash(oldinode, olddevice, inodev_set.n_size);
++      struct name_entry **match;
++      struct name_entry *tmp;
++      __u8 i = 0;
++
++      match = &inodev_set.n_hash[index];
++
++      while (*match
++             && ((*match)->inode != oldinode
++                 || (*match)->device != olddevice)) {
++              index = (index + (1 << i)) % inodev_set.n_size;
++              i = (i + 1) % 32;
++              match = &inodev_set.n_hash[index];
++      }
++
++      if (*match && (*match != deleted_inodev)
++          && ((*match)->inode == oldinode)
++          && ((*match)->device == olddevice)) {
++              tmp = *match;
++
++              tmp->inode = newinode;
++              tmp->device = newdevice;
++
++              *match = deleted_inodev;
++
++              insert_inodev_entry(tmp);
++      }
++
++      return;
++}
++
++static __inline__ void
++do_handle_create(const struct name_entry *matchn, const struct dentry *dentry,
++               const struct vfsmount *mnt)
++{
++      struct acl_subject_label *i;
++      struct acl_role_label *role;
++
++      for (role = role_list_head; role; role = role->next) {
++              update_acl_subj_label(matchn->inode, matchn->device,
++                                    dentry->d_inode->i_ino,
++                                    dentry->d_inode->i_sb->s_dev, role);
++
++              for (i = role->hash->first; i; i = i->next) {
++                      if (unlikely((i->mode & GR_NESTED) &&
++                                   (i->inode == dentry->d_inode->i_ino) &&
++                                   (i->device == dentry->d_inode->i_sb->s_dev))) {
++                              i->inode = dentry->d_inode->i_ino;
++                              i->device = dentry->d_inode->i_sb->s_dev;
++                      }
++                      update_acl_obj_label(matchn->inode, matchn->device,
++                                           dentry->d_inode->i_ino,
++                                           dentry->d_inode->i_sb->s_dev, i);
++              }
++      }
++
++      update_inodev_entry(matchn->inode, matchn->device,
++                          dentry->d_inode->i_ino, dentry->d_inode->i_sb->s_dev);
++
++      return;
++}
++
++void
++gr_handle_create(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      struct name_entry *matchn;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return;
++
++      preempt_disable();
++      matchn = lookup_name_entry(gr_to_filename(dentry, mnt));
++      preempt_enable();
++
++      if (unlikely((unsigned long)matchn)) {
++              write_lock(&gr_inode_lock);
++              do_handle_create(matchn, dentry, mnt);
++              write_unlock(&gr_inode_lock);
++      }
++
++      return;
++}
++
++void
++gr_handle_rename(struct inode *old_dir, struct inode *new_dir,
++               struct dentry *old_dentry,
++               struct dentry *new_dentry,
++               struct vfsmount *mnt, const __u8 replace)
++{
++      struct name_entry *matchn;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return;
++
++      preempt_disable();
++      matchn = lookup_name_entry(gr_to_filename(new_dentry, mnt));
++      preempt_enable();
++
++      /* we wouldn't have to check d_inode if it weren't for
++         NFS silly-renaming
++       */
++
++      write_lock(&gr_inode_lock);
++      if (unlikely(replace && new_dentry->d_inode)) {
++              if (unlikely(lookup_inodev_entry(new_dentry->d_inode->i_ino,
++                                      new_dentry->d_inode->i_sb->s_dev) &&
++                  (old_dentry->d_inode->i_nlink <= 1)))
++                      do_handle_delete(new_dentry->d_inode->i_ino,
++                                       new_dentry->d_inode->i_sb->s_dev);
++      }
++
++      if (unlikely(lookup_inodev_entry(old_dentry->d_inode->i_ino,
++                              old_dentry->d_inode->i_sb->s_dev) &&
++          (old_dentry->d_inode->i_nlink <= 1)))
++              do_handle_delete(old_dentry->d_inode->i_ino,
++                               old_dentry->d_inode->i_sb->s_dev);
++
++      if (unlikely((unsigned long)matchn))
++              do_handle_create(matchn, old_dentry, mnt);
++      write_unlock(&gr_inode_lock);
++
++      return;
++}
++
++static int
++lookup_special_role_auth(const char *rolename, unsigned char **salt,
++                       unsigned char **sum)
++{
++      struct acl_role_label *r;
++      struct role_allowed_ip *ipp;
++      struct role_transition *trans;
++      __u16 i;
++      int found = 0;
++
++      /* check transition table */
++
++      for (trans = current->role->transitions; trans; trans = trans->next) {
++              if (!strcmp(rolename, trans->rolename)) {
++                      found = 1;
++                      break;
++              }
++      }
++
++      if (!found)
++              return 0;
++
++      /* handle special roles that do not require authentication
++         and check ip */
++
++      for (r = role_list_head; r; r = r->next) {
++              if (!strcmp(rolename, r->rolename) &&
++                  (r->roletype & GR_ROLE_SPECIAL)) {
++                      found = 0;
++                      if (r->allowed_ips != NULL) {
++                              for (ipp = r->allowed_ips; ipp; ipp = ipp->next) {
++                                      if ((ntohl(current->curr_ip) & ipp->netmask) ==
++                                           (ntohl(ipp->addr) & ipp->netmask))
++                                              found = 1;
++                              }
++                      } else
++                              found = 2;
++                      if (!found)
++                              return 0;
++
++                      if (r->roletype & GR_ROLE_NOPW) {
++                              *salt = NULL;
++                              *sum = NULL;
++                              return 1;
++                      }
++              }
++      }
++
++      for (i = 0; i < num_sprole_pws; i++) {
++              if (!strcmp(rolename, acl_special_roles[i]->rolename)) {
++                      *salt = acl_special_roles[i]->salt;
++                      *sum = acl_special_roles[i]->sum;
++                      return 1;
++              }
++      }
++
++      return 0;
++}
++
++static void
++assign_special_role(char *rolename)
++{
++      struct acl_object_label *obj;
++      struct acl_role_label *r;
++      struct acl_role_label *assigned = NULL;
++      struct task_struct *tsk;
++      struct file *filp;
++
++      for (r = role_list_head; r; r = r->next)
++              if (!strcmp(rolename, r->rolename) &&
++                  (r->roletype & GR_ROLE_SPECIAL))
++                      assigned = r;
++
++      if (!assigned)
++              return;
++
++      read_lock(&tasklist_lock);
++      read_lock(&grsec_exec_file_lock);
++
++      tsk = current->parent;
++      if (tsk == NULL) {
++              read_unlock(&grsec_exec_file_lock);
++              read_unlock(&tasklist_lock);
++              return;
++      }
++
++      filp = tsk->exec_file;
++      if (filp == NULL) {
++              read_unlock(&grsec_exec_file_lock);
++              read_unlock(&tasklist_lock);
++              return;
++      }
++
++      tsk->is_writable = 0;
++
++      acl_sp_role_value = (acl_sp_role_value % 65535) + 1;
++      tsk->acl_sp_role = 1;
++      tsk->acl_role_id = acl_sp_role_value;
++      tsk->role = assigned;
++      tsk->acl = chk_subj_label(filp->f_dentry, filp->f_vfsmnt, tsk->role);
++
++      /* ignore additional mmap checks for processes that are writable 
++         by the default ACL */
++      obj = chk_obj_label(filp->f_dentry, filp->f_vfsmnt, default_role->root_label);
++      if (unlikely(obj->mode & GR_WRITE))
++              tsk->is_writable = 1;
++      obj = chk_obj_label(filp->f_dentry, filp->f_vfsmnt, tsk->role->root_label);
++      if (unlikely(obj->mode & GR_WRITE))
++              tsk->is_writable = 1;
++
++#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
++      printk(KERN_ALERT "Assigning special role:%s subject:%s to process (%s:%d)\n", tsk->role->rolename, tsk->acl->filename, tsk->comm, tsk->pid);
++#endif
++
++      read_unlock(&grsec_exec_file_lock);
++      read_unlock(&tasklist_lock);
++      return;
++}
++
++ssize_t
++write_grsec_handler(struct file *file, const char * buf, size_t count, loff_t *ppos)
++{
++      struct gr_arg_wrapper uwrap;
++      unsigned char *sprole_salt;
++      unsigned char *sprole_sum;
++      int error = sizeof (struct gr_arg_wrapper);
++      int error2 = 0;
++
++      down(&gr_dev_sem);
++
++      if (count != sizeof (struct gr_arg_wrapper)) {
++              security_alert_good(GR_DEV_ACL_MSG, (int)count,
++                                  (int) sizeof (struct gr_arg_wrapper));
++              error = -EINVAL;
++              goto out;
++      }
++
++      if ((gr_auth_attempts >= CONFIG_GRKERNSEC_ACL_MAXTRIES)
++          && time_before_eq(gr_auth_expires, get_seconds())) {
++              gr_auth_expires = 0;
++              gr_auth_attempts = 0;
++      }
++
++      if (copy_from_user(&uwrap, buf, sizeof (struct gr_arg_wrapper))) {
++              error = -EFAULT;
++              goto out;
++      }
++
++      if ((uwrap.version != GRSECURITY_VERSION) || (uwrap.size != sizeof(struct gr_arg))) {
++              error = -EINVAL;
++              goto out;
++      }
++
++      if (copy_from_user(gr_usermode, uwrap.arg, sizeof (struct gr_arg))) {
++              error = -EFAULT;
++              goto out;
++      }
++
++      if (gr_usermode->mode != SPROLE && time_after(gr_auth_expires, get_seconds())) {
++              error = -EBUSY;
++              goto out;
++      }
++
++      /* if non-root trying to do anything other than use a special role,
++         do not attempt authentication, do not count towards authentication
++         locking
++       */
++
++      if (gr_usermode->mode != SPROLE && current->uid) {
++              error = -EPERM;
++              goto out;
++      }
++
++      /* ensure pw and special role name are null terminated */
++
++      gr_usermode->pw[GR_PW_LEN - 1] = '\0';
++      gr_usermode->sp_role[GR_SPROLE_LEN - 1] = '\0';
++
++      /* Okay. 
++       * We have our enough of the argument structure..(we have yet
++       * to copy_from_user the tables themselves) . Copy the tables
++       * only if we need them, i.e. for loading operations. */
++
++      switch (gr_usermode->mode) {
++      case STATUS:
++                      if (gr_status & GR_READY)
++                              error = 1;
++                      else
++                              error = 2;
++                      goto out;
++      case SHUTDOWN:
++              if ((gr_status & GR_READY)
++                  && !(chkpw(gr_usermode, gr_system_salt, gr_system_sum))) {
++                      gr_status &= ~GR_READY;
++                      security_alert_good(GR_SHUTS_ACL_MSG, DEFAULTSECARGS);
++                      free_variables();
++                      memset(gr_usermode, 0, sizeof (struct gr_arg));
++                      memset(gr_system_salt, 0, GR_SALT_LEN);
++                      memset(gr_system_sum, 0, GR_SHA_LEN);
++              } else if (gr_status & GR_READY) {
++                      security_alert(GR_SHUTF_ACL_MSG, DEFAULTSECARGS);
++                      error = -EPERM;
++              } else {
++                      security_alert_good(GR_SHUTI_ACL_MSG, DEFAULTSECARGS);
++                      error = -EAGAIN;
++              }
++              break;
++      case ENABLE:
++              if (!(gr_status & GR_READY) && !(error2 = gracl_init(gr_usermode)))
++                      security_alert_good(GR_ENABLE_ACL_MSG, GR_VERSION);
++              else {
++                      if (gr_status & GR_READY)
++                              error = -EAGAIN;
++                      else
++                              error = error2;
++                      security_alert(GR_ENABLEF_ACL_MSG, GR_VERSION,
++                                     DEFAULTSECARGS);
++              }
++              break;
++      case RELOAD:
++              if (!(gr_status & GR_READY)) {
++                      security_alert_good(GR_RELOADI_ACL_MSG);
++                      error = -EAGAIN;
++              } else if (!(chkpw(gr_usermode, gr_system_salt, gr_system_sum))) {
++                      lock_kernel();
++                      gr_status &= ~GR_READY;
++                      free_variables();
++                      if (!(error2 = gracl_init(gr_usermode))) {
++                              unlock_kernel();
++                              security_alert_good(GR_RELOAD_ACL_MSG,
++                                                  GR_VERSION);
++                      } else {
++                              unlock_kernel();
++                              error = error2;
++                              security_alert(GR_RELOADF_ACL_MSG, GR_VERSION,
++                                             DEFAULTSECARGS);
++                      }
++              } else {
++                      security_alert(GR_RELOADF_ACL_MSG, GR_VERSION,
++                                     DEFAULTSECARGS);
++                      error = -EPERM;
++              }
++              break;
++      case SEGVMOD:
++              if (unlikely(!(gr_status & GR_READY))) {
++                      security_alert_good(GR_SEGVMODI_ACL_MSG,
++                                          DEFAULTSECARGS);
++                      error = -EAGAIN;
++                      break;
++              }
++
++              if (!(chkpw(gr_usermode, gr_system_salt, gr_system_sum))) {
++                      security_alert_good(GR_SEGVMODS_ACL_MSG,
++                                          DEFAULTSECARGS);
++                      if (gr_usermode->segv_device && gr_usermode->segv_inode) {
++                              struct acl_subject_label *segvacl;
++                              segvacl =
++                                  lookup_acl_subj_label(gr_usermode->segv_inode,
++                                                        gr_usermode->segv_device,
++                                                        current->role);
++                              if (segvacl) {
++                                      segvacl->crashes = 0;
++                                      segvacl->expires = 0;
++                              }
++                      } else if (gr_find_uid(gr_usermode->segv_uid) >= 0) {
++                              gr_remove_uid(gr_usermode->segv_uid);
++                      }
++              } else {
++                      security_alert(GR_SEGVMODF_ACL_MSG, DEFAULTSECARGS);
++                      error = -EPERM;
++              }
++              break;
++      case SPROLE:
++              if (unlikely(!(gr_status & GR_READY))) {
++                      security_alert_good(GR_SPROLEI_ACL_MSG, DEFAULTSECARGS);
++                      error = -EAGAIN;
++                      break;
++              }
++
++              if ((current->role->auth_attempts >= CONFIG_GRKERNSEC_ACL_MAXTRIES)
++                  && time_before_eq(current->role->expires, get_seconds())) {
++                      current->role->expires = 0;
++                      current->role->auth_attempts = 0;
++              }
++
++              if (time_after(current->role->expires, get_seconds())) {
++                      error = -EBUSY;
++                      goto out;
++              }
++
++              if (lookup_special_role_auth
++                  (gr_usermode->sp_role, &sprole_salt, &sprole_sum)
++                  && ((!sprole_salt && !sprole_sum)
++                      || !(chkpw(gr_usermode, sprole_salt, sprole_sum)))) {
++                      assign_special_role(gr_usermode->sp_role);
++                      security_alert_good(GR_SPROLES_ACL_MSG,
++                                          (current->parent) ? current->
++                                          parent->role->rolename : "",
++                                          acl_sp_role_value, DEFAULTSECARGS);
++              } else {
++                      security_alert(GR_SPROLEF_ACL_MSG, gr_usermode->sp_role,
++                                     DEFAULTSECARGS);
++                      error = -EPERM;
++                      current->role->auth_attempts++;
++                      if (current->role->auth_attempts >= CONFIG_GRKERNSEC_ACL_MAXTRIES) {
++                              current->role->expires =
++                                  get_seconds() + CONFIG_GRKERNSEC_ACL_TIMEOUT;
++                              security_alert(GR_MAXROLEPW_ACL_MSG,
++                                     CONFIG_GRKERNSEC_ACL_MAXTRIES,
++                                     gr_usermode->sp_role, DEFAULTSECARGS);
++                      }
++
++                      goto out;
++              }
++              break;
++      case UNSPROLE:
++              if (unlikely(!(gr_status & GR_READY))) {
++                      security_alert_good(GR_UNSPROLEI_ACL_MSG, DEFAULTSECARGS);
++                      error = -EAGAIN;
++                      break;
++              }
++
++              if (current->role->roletype & GR_ROLE_SPECIAL) {
++                      security_alert_good(GR_UNSPROLES_ACL_MSG,
++                                          (current->parent) ? current->
++                                          parent->role->rolename : "",
++                                          (current->parent) ? current->
++                                          parent->acl_role_id : 0, DEFAULTSECARGS);
++                      gr_set_acls(1);
++              } else {
++                      security_alert(GR_UNSPROLEF_ACL_MSG, current->role->rolename,
++                                     DEFAULTSECARGS);
++                      error = -EPERM;
++                      goto out;
++              }
++              break;
++      default:
++              security_alert(GR_INVMODE_ACL_MSG, gr_usermode->mode,
++                             DEFAULTSECARGS);
++              error = -EINVAL;
++              break;
++      }
++
++      if (error != -EPERM)
++              goto out;
++
++      gr_auth_attempts++;
++
++      if (gr_auth_attempts >= CONFIG_GRKERNSEC_ACL_MAXTRIES) {
++              security_alert(GR_MAXPW_ACL_MSG, CONFIG_GRKERNSEC_ACL_MAXTRIES);
++              gr_auth_expires = get_seconds() + CONFIG_GRKERNSEC_ACL_TIMEOUT;
++      }
++
++      out:
++      up(&gr_dev_sem);
++      return error;
++}
++
++int
++gr_set_acls(const int type)
++{
++      struct acl_object_label *obj;
++      struct task_struct *task, *task2;
++      struct file *filp;
++      unsigned short i;
++
++      read_lock(&tasklist_lock);
++      read_lock(&grsec_exec_file_lock);
++      for_each_process(task2) {
++              task = task2;
++              do {
++              /* check to see if we're called from the exit handler,
++                 if so, only replace ACLs that have inherited the admin
++                 ACL */
++
++              if (type && (task->role != current->role ||
++                           task->acl_role_id != current->acl_role_id))
++                      continue;
++
++              task->acl_role_id = 0;
++              task->acl_sp_role = 0;
++
++              if ((filp = task->exec_file)) {
++                      do_set_role_label(task, task->uid, task->gid);
++
++                      task->acl =
++                          chk_subj_label(filp->f_dentry, filp->f_vfsmnt,
++                                         task->role);
++                      if (task->acl) {
++                              struct acl_subject_label *curr;
++                              curr = task->acl;
++
++                              task->is_writable = 0;
++                              /* ignore additional mmap checks for processes that are writable 
++                                 by the default ACL */
++                              obj = chk_obj_label(filp->f_dentry, filp->f_vfsmnt, default_role->root_label);
++                              if (unlikely(obj->mode & GR_WRITE))
++                                      task->is_writable = 1;
++                              obj = chk_obj_label(filp->f_dentry, filp->f_vfsmnt, task->role->root_label);
++                              if (unlikely(obj->mode & GR_WRITE))
++                                      task->is_writable = 1;
++
++#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
++                              printk(KERN_ALERT "gr_set_acls for (%s:%d): role:%s, subject:%s\n", task->comm, task->pid, task->role->rolename, task->acl->filename);
++#endif
++                              if (!(curr->mode & GR_LEARN))
++                                      for (i = 0; i < RLIM_NLIMITS; i++) {
++                                              if (!(curr->resmask & (1 << i)))
++                                                      continue;
++
++                                              task->rlim[i].rlim_cur =
++                                                  curr->res[i].rlim_cur;
++                                              task->rlim[i].rlim_max =
++                                                  curr->res[i].rlim_max;
++                                      }
++                      } else {
++                              read_unlock(&grsec_exec_file_lock);
++                              read_unlock(&tasklist_lock);
++                              security_alert_good(GR_DEFACL_MSG, task->comm,
++                                                  task->pid);
++                              return 1;
++                      }
++              } else {
++                      // it's a kernel process
++                      task->role = kernel_role;
++                      task->acl = kernel_role->root_label;
++#ifdef CONFIG_GRKERNSEC_ACL_HIDEKERN
++                      task->acl->mode &= ~GR_FIND;
++#endif
++              }
++      } while ((task = next_thread(task)) != task2);
++      }
++      read_unlock(&grsec_exec_file_lock);
++      read_unlock(&tasklist_lock);
++      return 0;
++}
++
++EXPORT_SYMBOL(gr_learn_resource);
++
++void
++gr_learn_resource(const struct task_struct *task,
++                const int res, const unsigned long wanted, const int gt)
++{
++      struct acl_subject_label *acl;
++
++      if (unlikely((gr_status & GR_READY) &&
++                   task->acl && (task->acl->mode & GR_LEARN)))
++              goto skip_reslog;
++
++#ifdef CONFIG_GRKERNSEC_RESLOG
++      gr_log_resource(task, res, wanted, gt);
++#endif
++      skip_reslog:
++
++      if (unlikely(!(gr_status & GR_READY) || !wanted))
++              return;
++
++      acl = task->acl;
++
++      if (likely(!acl || !(acl->mode & GR_LEARN) ||
++                 !(acl->resmask & (1 << (unsigned short) res))))
++              return;
++
++      if (wanted >= acl->res[res].rlim_cur) {
++              unsigned long res_add;
++
++              res_add = wanted;
++              switch (res) {
++              case RLIMIT_CPU:
++                      res_add += GR_RLIM_CPU_BUMP;
++                      break;
++              case RLIMIT_FSIZE:
++                      res_add += GR_RLIM_FSIZE_BUMP;
++                      break;
++              case RLIMIT_DATA:
++                      res_add += GR_RLIM_DATA_BUMP;
++                      break;
++              case RLIMIT_STACK:
++                      res_add += GR_RLIM_STACK_BUMP;
++                      break;
++              case RLIMIT_CORE:
++                      res_add += GR_RLIM_CORE_BUMP;
++                      break;
++              case RLIMIT_RSS:
++                      res_add += GR_RLIM_RSS_BUMP;
++                      break;
++              case RLIMIT_NPROC:
++                      res_add += GR_RLIM_NPROC_BUMP;
++                      break;
++              case RLIMIT_NOFILE:
++                      res_add += GR_RLIM_NOFILE_BUMP;
++                      break;
++              case RLIMIT_MEMLOCK:
++                      res_add += GR_RLIM_MEMLOCK_BUMP;
++                      break;
++              case RLIMIT_AS:
++                      res_add += GR_RLIM_AS_BUMP;
++                      break;
++              case RLIMIT_LOCKS:
++                      res_add += GR_RLIM_LOCKS_BUMP;
++                      break;
++              }
++
++              acl->res[res].rlim_cur = res_add;
++
++              if (wanted > acl->res[res].rlim_max)
++                      acl->res[res].rlim_max = res_add;
++
++              security_learn(GR_LEARN_AUDIT_MSG, current->role->rolename,
++                             current->role->roletype, acl->filename,
++                             acl->res[res].rlim_cur, acl->res[res].rlim_max,
++                             "", (unsigned long) res);
++      }
++
++      return;
++}
++
++#ifdef CONFIG_PAX_HAVE_ACL_FLAGS
++void
++pax_set_flags(struct linux_binprm *bprm)
++{
++      struct task_struct *task = current;
++        struct acl_subject_label *proc;
++
++        if (unlikely(!(gr_status & GR_READY)))
++                return;
++
++        proc = task->acl;
++
++        if (proc->mode & GR_PAXPAGE)
++                task->flags &= ~PF_PAX_PAGEEXEC;
++        if (proc->mode & GR_PAXSEGM)
++                task->flags &= ~PF_PAX_SEGMEXEC;
++        if (proc->mode & GR_PAXGCC)
++                task->flags |= PF_PAX_EMUTRAMP;
++        if (proc->mode & GR_PAXMPROTECT)
++                task->flags &= ~PF_PAX_MPROTECT;
++        if (proc->mode & GR_PAXRANDMMAP)
++                task->flags &= ~PF_PAX_RANDMMAP;
++        if (proc->mode & GR_PAXRANDEXEC)
++                task->flags |= PF_PAX_RANDEXEC;
++
++        return;
++}
++#endif
++
++#ifdef CONFIG_SYSCTL
++extern struct proc_dir_entry *proc_sys_root;
++
++
++/* the following function is called under the BKL */
++
++__u32
++gr_handle_sysctl(const struct ctl_table *table, const void *oldval,
++               const void *newval)
++{
++      struct proc_dir_entry *tmp;
++      struct nameidata nd;
++      const char *proc_sys = "/proc/sys";
++      char *path;
++      struct acl_object_label *obj;
++      unsigned short len = 0, pos = 0, depth = 0, i;
++      __u32 err = 0;
++      __u32 mode = 0;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return 1;
++
++      path = per_cpu_ptr(gr_shared_page[0], smp_processor_id());
++
++      if (oldval)
++              mode |= GR_READ;
++      if (newval)
++              mode |= GR_WRITE;
++
++      /* convert the requested sysctl entry into a pathname */
++
++      for (tmp = table->de; tmp != proc_sys_root; tmp = tmp->parent) {
++              len += strlen(tmp->name);
++              len++;
++              depth++;
++      }
++
++      if ((len + depth + strlen(proc_sys) + 1) > PAGE_SIZE)
++              return 0;       /* deny */
++
++      memset(path, 0, PAGE_SIZE);
++
++      memcpy(path, proc_sys, strlen(proc_sys));
++
++      pos += strlen(proc_sys);
++
++      for (; depth > 0; depth--) {
++              path[pos] = '/';
++              pos++;
++              for (i = 1, tmp = table->de; tmp != proc_sys_root;
++                   tmp = tmp->parent) {
++                      if (depth == i) {
++                              memcpy(path + pos, tmp->name,
++                                     strlen(tmp->name));
++                              pos += strlen(tmp->name);
++                      }
++                      i++;
++              }
++      }
++
++      err = path_lookup(path, LOOKUP_FOLLOW, &nd);
++
++      if (err)
++              goto out;
++
++      obj = chk_obj_label(nd.dentry, nd.mnt, current->acl);
++      err = obj->mode & (mode | to_gr_audit(mode) | GR_SUPPRESS);
++
++      if (unlikely((current->acl->mode & GR_LEARN) && ((err & mode) != mode))) {
++              __u32 new_mode = mode;
++
++              new_mode &= ~(GR_AUDITS | GR_SUPPRESS);
++
++              err = new_mode;
++              gr_log_learn(current->role, current->uid, current->gid,
++                           current, path, new_mode);
++      } else if ((err & mode) != mode && !(err & GR_SUPPRESS)) {
++              security_alert(GR_SYSCTL_ACL_MSG, "denied", path,
++                             (mode & GR_READ) ? " reading" : "",
++                             (mode & GR_WRITE) ? " writing" : "",
++                             DEFAULTSECARGS);
++              err = 0;
++      } else if ((err & mode) != mode) {
++              err = 0;
++      } else if (((err & mode) == mode) && (err & GR_AUDITS)) {
++              security_audit(GR_SYSCTL_ACL_MSG, "successful",
++                             path, (mode & GR_READ) ? " reading" : "",
++                             (mode & GR_WRITE) ? " writing" : "",
++                             DEFAULTSECARGS);
++      }
++
++      path_release(&nd);
++
++      out:
++      return err;
++}
++#endif
++
++int
++gr_handle_proc_ptrace(struct task_struct *task)
++{
++      struct file *filp;
++      struct task_struct *tmp = task;
++      struct task_struct *curtemp = current;
++      __u32 retmode;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return 0;
++
++      read_lock(&tasklist_lock);
++      read_lock(&grsec_exec_file_lock);
++      filp = task->exec_file;
++
++      while (tmp->pid > 0) {
++              if (tmp == curtemp)
++                      break;
++              tmp = tmp->parent;
++      }
++
++      if (!filp || (tmp->pid == 0 && !(current->acl->mode & GR_RELAXPTRACE))) {
++              read_unlock(&grsec_exec_file_lock);
++              read_unlock(&tasklist_lock);
++              return 1;
++      }
++
++      retmode = gr_search_file(filp->f_dentry, GR_NOPTRACE, filp->f_vfsmnt);
++      read_unlock(&grsec_exec_file_lock);
++      read_unlock(&tasklist_lock);
++
++      if (retmode & GR_NOPTRACE)
++              return 1;
++
++      if (!(current->acl->mode & GR_OVERRIDE) && !(current->role->roletype & GR_ROLE_GOD)
++          && (current->acl != task->acl || (current->acl != current->role->root_label
++          && current->pid != task->pid)))
++              return 1;
++
++      return 0;
++}
++
++int
++gr_handle_ptrace(struct task_struct *task, const long request)
++{
++      struct task_struct *tmp = task;
++      struct task_struct *curtemp = current;
++      __u32 retmode;
++
++      if (unlikely(!(gr_status & GR_READY)))
++              return 0;
++
++      read_lock(&tasklist_lock);
++      while (tmp->pid > 0) {
++              if (tmp == curtemp)
++                      break;
++              tmp = tmp->parent;
++      }
++      read_unlock(&tasklist_lock);
++
++      if (tmp->pid == 0 && !(current->acl->mode & GR_RELAXPTRACE)) {
++              security_alert(GR_PTRACE_ACL_MSG, task->exec_file ?
++                             gr_to_filename(task->exec_file->f_dentry, task->exec_file->f_vfsmnt)
++                             : "(none)", task->comm, task->pid,
++                             DEFAULTSECARGS);
++              return 1;
++      }
++
++      read_lock(&grsec_exec_file_lock);
++      if (unlikely(!task->exec_file)) {
++              read_unlock(&grsec_exec_file_lock);
++              return 0;
++      }
++
++      retmode = gr_search_file(task->exec_file->f_dentry, GR_PTRACERD | GR_NOPTRACE, task->exec_file->f_vfsmnt);
++      read_unlock(&grsec_exec_file_lock);
++
++      if (retmode & GR_NOPTRACE) {
++              security_alert(GR_PTRACE_ACL_MSG, gr_to_filename(task->exec_file->f_dentry, task->exec_file->f_vfsmnt),
++                             task->comm, task->pid, DEFAULTSECARGS);
++              return 1;
++      }
++              
++      if (retmode & GR_PTRACERD) {
++              switch (request) {
++              case PTRACE_POKETEXT:
++              case PTRACE_POKEDATA:
++              case PTRACE_POKEUSR:
++#if !defined(CONFIG_PPC32) && !defined(CONFIG_PARISC) && !defined(CONFIG_ALPHA)
++              case PTRACE_SETREGS:
++              case PTRACE_SETFPREGS:
++#endif
++#ifdef CONFIG_X86
++              case PTRACE_SETFPXREGS:
++#endif
++#ifdef CONFIG_ALTIVEC
++              case PTRACE_SETVRREGS:
++#endif
++                      return 1;
++              default:
++                      return 0;
++              }
++      } else if (!(current->acl->mode & GR_OVERRIDE) &&
++                 !(current->role->roletype & GR_ROLE_GOD) &&
++                 (current->acl != task->acl)) {
++              security_alert(GR_PTRACE_ACL_MSG,
++                             gr_to_filename(task->exec_file->f_dentry, task->exec_file->f_vfsmnt),
++                             task->comm, task->pid, DEFAULTSECARGS);
++              return 1;
++      }
++
++      return 0;
++}
++
++int
++gr_handle_mmap(const struct file *filp, const unsigned long prot)
++{
++      struct acl_object_label *obj, *obj2;
++
++      if (unlikely(!(gr_status & GR_READY) ||
++                   (current->acl->mode & GR_OVERRIDE) || !filp ||
++                   !(prot & PROT_EXEC)))
++              return 0;
++
++      if (unlikely(current->is_writable))
++              return 0;
++
++      obj = chk_obj_label(filp->f_dentry, filp->f_vfsmnt, default_role->root_label);
++      obj2 = chk_obj_label(filp->f_dentry, filp->f_vfsmnt,
++                           current->role->root_label);
++      if (unlikely((obj->mode & GR_WRITE) || (obj2->mode & GR_WRITE))) {
++              security_alert(GR_WRITLIB_ACL_MSG,
++                             gr_to_filename(filp->f_dentry, filp->f_vfsmnt),
++                             DEFAULTSECARGS);
++              return 1;
++      }
++
++      return 0;
++}
++
++int
++gr_acl_handle_mmap(const struct file *file, const unsigned long prot)
++{
++      __u32 mode;
++
++      if (unlikely(!file || !(prot & PROT_EXEC)))
++              return 1;
++
++      mode =
++          gr_search_file(file->f_dentry,
++                         GR_EXEC | GR_AUDIT_EXEC | GR_SUPPRESS,
++                         file->f_vfsmnt);
++
++      if (unlikely(!gr_tpe_allow(file) || (!(mode & GR_EXEC) && !(mode & GR_SUPPRESS)))) {
++              security_alert(GR_MMAP_ACL_MSG, "denied",
++                             gr_to_filename(file->f_dentry, file->f_vfsmnt),
++                             DEFAULTSECARGS);
++              return 0;
++      } else if (unlikely(!gr_tpe_allow(file) || !(mode & GR_EXEC))) {
++              return 0;
++      } else if (unlikely(mode & GR_EXEC && mode & GR_AUDIT_EXEC)) {
++              security_audit(GR_MMAP_ACL_MSG, "successful",
++                             gr_to_filename(file->f_dentry, file->f_vfsmnt),
++                             DEFAULTSECARGS);
++              return 1;
++      }
++
++      return 1;
++}
++
++int
++gr_acl_handle_mprotect(const struct file *file, const unsigned long prot)
++{
++      __u32 mode;
++
++      if (unlikely(!file || !(prot & PROT_EXEC)))
++              return 1;
++
++      mode =
++          gr_search_file(file->f_dentry,
++                         GR_EXEC | GR_AUDIT_EXEC | GR_SUPPRESS,
++                         file->f_vfsmnt);
++
++      if (unlikely(!gr_tpe_allow(file) || (!(mode & GR_EXEC) && !(mode & GR_SUPPRESS)))) {
++              security_alert(GR_MPROTECT_ACL_MSG, "denied",
++                             gr_to_filename(file->f_dentry, file->f_vfsmnt),
++                             DEFAULTSECARGS);
++              return 0;
++      } else if (unlikely(!gr_tpe_allow(file) || !(mode & GR_EXEC))) {
++              return 0;
++      } else if (unlikely(mode & GR_EXEC && mode & GR_AUDIT_EXEC)) {
++              security_audit(GR_MPROTECT_ACL_MSG, "successful",
++                             gr_to_filename(file->f_dentry, file->f_vfsmnt),
++                             DEFAULTSECARGS);
++              return 1;
++      }
++
++      return 1;
++}
++
++void
++gr_acl_handle_psacct(struct task_struct *task, const long code)
++{
++      u64 runtime64;
++      unsigned long runtime;
++      unsigned long cputime;
++      unsigned int wday, cday;
++      __u8 whr, chr;
++      __u8 wmin, cmin;
++      __u8 wsec, csec;
++      char cur_tty[64] = { 0 };
++      char parent_tty[64] = { 0 };
++
++      if (unlikely(!(gr_status & GR_READY) || !task->acl ||
++                   !(task->acl->mode & GR_PROCACCT)))
++              return;
++
++      runtime64 = get_jiffies_64() - task->start_time;
++      do_div(runtime64, HZ);
++      runtime = (unsigned long)runtime64;
++      wday = runtime / (3600 * 24);
++      runtime -= wday * (3600 * 24);
++      whr = runtime / 3600;
++      runtime -= whr * 3600;
++      wmin = runtime / 60;
++      runtime -= wmin * 60;
++      wsec = runtime;
++
++      cputime = (task->utime + task->stime) / HZ;
++      cday = cputime / (3600 * 24);
++      cputime -= cday * (3600 * 24);
++      chr = cputime / 3600;
++      cputime -= chr * 3600;
++      cmin = cputime / 60;
++      cputime -= cmin * 60;
++      csec = cputime;
++
++      security_audit(GR_ACL_PROCACCT_MSG, gr_task_fullpath(task), task->comm,
++                     task->pid, NIPQUAD(task->curr_ip), tty_name(task->signal->tty,
++                                                                 cur_tty),
++                     task->uid, task->euid, task->gid, task->egid, wday, whr,
++                     wmin, wsec, cday, chr, cmin, csec,
++                     (task->flags & PF_SIGNALED) ? "killed by signal" : "exited",
++                     code, gr_parent_task_fullpath(task), 
++                     task->parent->comm, task->parent->pid,
++                     NIPQUAD(task->parent->curr_ip),
++                     tty_name(task->parent->signal->tty, parent_tty),
++                     task->parent->uid, task->parent->euid, task->parent->gid,
++                     task->parent->egid);
++
++      return;
++}
++
++EXPORT_SYMBOL(gr_set_kernel_label);
++
++void gr_set_kernel_label(struct task_struct *task)
++{
++      if (gr_status & GR_READY) {
++              task->role = kernel_role;
++              task->acl = kernel_role->root_label;
++      }
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/gracl_cap.c linux-2.6.8.grsecurity/grsecurity/gracl_cap.c
+--- linux-2.6.8/grsecurity/gracl_cap.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/gracl_cap.c      2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,116 @@
++/* capability handling routines, (c) Brad Spengler 2002,2003 */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/sched.h>
++#include <linux/capability.h>
++#include <linux/gracl.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++static const char *captab_log[29] = {
++      "CAP_CHOWN",
++      "CAP_DAC_OVERRIDE",
++      "CAP_DAC_READ_SEARCH",
++      "CAP_FOWNER",
++      "CAP_FSETID",
++      "CAP_KILL",
++      "CAP_SETGID",
++      "CAP_SETUID",
++      "CAP_SETPCAP",
++      "CAP_LINUX_IMMUTABLE",
++      "CAP_NET_BIND_SERVICE",
++      "CAP_NET_BROADCAST",
++      "CAP_NET_ADMIN",
++      "CAP_NET_RAW",
++      "CAP_IPC_LOCK",
++      "CAP_IPC_OWNER",
++      "CAP_SYS_MODULE",
++      "CAP_SYS_RAWIO",
++      "CAP_SYS_CHROOT",
++      "CAP_SYS_PTRACE",
++      "CAP_SYS_PACCT",
++      "CAP_SYS_ADMIN",
++      "CAP_SYS_BOOT",
++      "CAP_SYS_NICE",
++      "CAP_SYS_RESOURCE",
++      "CAP_SYS_TIME",
++      "CAP_SYS_TTY_CONFIG",
++      "CAP_MKNOD",
++      "CAP_LEASE"
++};
++
++EXPORT_SYMBOL(gr_task_is_capable);
++
++int
++gr_task_is_capable(struct task_struct *task, const int cap)
++{
++      struct acl_subject_label *curracl;
++      __u32 cap_drop = 0, cap_mask = 0;
++
++      if (!gr_acl_is_enabled())
++              return 1;
++
++      curracl = task->acl;
++
++      cap_drop = curracl->cap_lower;
++      cap_mask = curracl->cap_mask;
++
++      while ((curracl = curracl->parent_subject)) {
++              if (!(cap_mask & (1 << cap)) && (curracl->cap_mask & (1 << cap)))
++                      cap_drop |= curracl->cap_lower & (1 << cap);
++              cap_mask |= curracl->cap_mask;
++      }
++
++      if (!cap_raised(cap_drop, cap))
++              return 1;
++
++      curracl = task->acl;
++
++      if ((curracl->mode & GR_LEARN)
++          && cap_raised(task->cap_effective, cap)) {
++              security_learn(GR_LEARN_AUDIT_MSG, task->role->rolename,
++                             task->role->roletype, task->uid,
++                             task->gid, task->exec_file ?
++                             gr_to_filename(task->exec_file->f_dentry,
++                             task->exec_file->f_vfsmnt) : curracl->filename,
++                             curracl->filename, 0UL,
++                             0UL, "", (unsigned long) cap, NIPQUAD(task->curr_ip));
++              return 1;
++      }
++
++      if ((cap >= 0) && (cap < 29) && cap_raised(task->cap_effective, cap))
++              security_alert(GR_CAP_ACL_MSG, captab_log[cap],
++                              gr_task_fullpath(task), task->comm, task->pid, task->uid, task->euid,
++                              task->gid, task->egid, gr_parent_task_fullpath(task),
++                              task->parent->comm, task->parent->pid, task->parent->uid,
++                              task->parent->euid, task->parent->gid, task->parent->egid);
++
++      return 0;
++}
++
++int
++gr_is_capable_nolog(const int cap)
++{
++      struct acl_subject_label *curracl;
++      __u32 cap_drop = 0, cap_mask = 0;
++
++      if (!gr_acl_is_enabled())
++              return 1;
++
++      curracl = current->acl;
++
++      cap_drop = curracl->cap_lower;
++      cap_mask = curracl->cap_mask;
++
++      while ((curracl = curracl->parent_subject)) {
++              cap_drop |= curracl->cap_lower & (cap_mask & ~curracl->cap_mask);
++              cap_mask |= curracl->cap_mask;
++      }
++
++      if (!cap_raised(cap_drop, cap))
++              return 1;
++
++      return 0;
++}
++
+diff -uNr linux-2.6.8/grsecurity/gracl_fs.c linux-2.6.8.grsecurity/grsecurity/gracl_fs.c
+--- linux-2.6.8/grsecurity/gracl_fs.c  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/gracl_fs.c       2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,468 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/fs.h>
++#include <linux/file.h>
++#include <linux/stat.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++#include <linux/gracl.h>
++
++__u32
++gr_acl_handle_hidden_file(const struct dentry * dentry,
++                        const struct vfsmount * mnt)
++{
++      __u32 mode;
++
++      if (unlikely(!dentry->d_inode))
++              return GR_FIND;
++
++      mode =
++          gr_search_file(dentry, GR_FIND | GR_AUDIT_FIND | GR_SUPPRESS, mnt);
++
++      if (unlikely(mode & GR_FIND && mode & GR_AUDIT_FIND)) {
++              security_audit(GR_HIDDEN_ACL_MSG, "successful",
++                             gr_to_filename(dentry, mnt), DEFAULTSECARGS);
++              return mode;
++      } else if (unlikely(!(mode & GR_FIND) && !(mode & GR_SUPPRESS))) {
++              security_alert(GR_HIDDEN_ACL_MSG, "denied",
++                             gr_to_filename(dentry, mnt),
++                             DEFAULTSECARGS);
++              return 0;
++      } else if (unlikely(!(mode & GR_FIND)))
++              return 0;
++
++      return GR_FIND;
++}
++
++__u32
++gr_acl_handle_open(const struct dentry * dentry, const struct vfsmount * mnt,
++                 const int fmode)
++{
++      __u32 reqmode = GR_FIND;
++      __u32 mode;
++
++      if (unlikely(!dentry->d_inode))
++              return reqmode;
++
++      if (unlikely(fmode & O_APPEND))
++              reqmode |= GR_APPEND;
++      else if (unlikely(fmode & FMODE_WRITE))
++              reqmode |= GR_WRITE;
++      if (likely((fmode & FMODE_READ) && !(fmode & O_DIRECTORY)))
++              reqmode |= GR_READ;
++
++      mode =
++          gr_search_file(dentry, reqmode | to_gr_audit(reqmode) | GR_SUPPRESS,
++                         mnt);
++
++      if (unlikely(((mode & reqmode) == reqmode) && mode & GR_AUDITS)) {
++              security_audit(GR_OPEN_ACL_MSG, "successful",
++                             gr_to_filename(dentry, mnt),
++                             reqmode & GR_READ ? " reading" : "",
++                             reqmode & GR_WRITE ? " writing" :
++                             reqmode & GR_APPEND ? " appending" : "",
++                             DEFAULTSECARGS);
++              return reqmode;
++      } else
++          if (unlikely((mode & reqmode) != reqmode && !(mode & GR_SUPPRESS)))
++      {
++              security_alert(GR_OPEN_ACL_MSG, "denied",
++                             gr_to_filename(dentry, mnt),
++                             reqmode & GR_READ ? " reading" : "",
++                             reqmode & GR_WRITE ? " writing" : reqmode &
++                             GR_APPEND ? " appending" : "", DEFAULTSECARGS);
++              return 0;
++      } else if (unlikely((mode & reqmode) != reqmode))
++              return 0;
++
++      return reqmode;
++}
++
++__u32
++gr_acl_handle_creat(const struct dentry * dentry,
++                  const struct dentry * p_dentry,
++                  const struct vfsmount * p_mnt, const int fmode,
++                  const int imode)
++{
++      __u32 reqmode = GR_WRITE | GR_CREATE;
++      __u32 mode;
++
++      if (unlikely(fmode & O_APPEND))
++              reqmode |= GR_APPEND;
++      if (unlikely((fmode & FMODE_READ) && !(fmode & O_DIRECTORY)))
++              reqmode |= GR_READ;
++      if (unlikely((fmode & O_CREAT) && (imode & (S_ISUID | S_ISGID))))
++              reqmode |= GR_SETID;
++
++      mode =
++          gr_check_create(dentry, p_dentry, p_mnt,
++                          reqmode | to_gr_audit(reqmode) | GR_SUPPRESS);
++
++      if (unlikely(((mode & reqmode) == reqmode) && mode & GR_AUDITS)) {
++              security_audit(GR_CREATE_ACL_MSG, "successful",
++                             gr_to_filename(dentry, p_mnt),
++                             reqmode & GR_READ ? " reading" : "",
++                             reqmode & GR_WRITE ? " writing" :
++                             reqmode & GR_APPEND ? " appending" : "",
++                             DEFAULTSECARGS);
++              return reqmode;
++      } else
++          if (unlikely((mode & reqmode) != reqmode && !(mode & GR_SUPPRESS)))
++      {
++              security_alert(GR_CREATE_ACL_MSG, "denied",
++                             gr_to_filename(dentry, p_mnt),
++                             reqmode & GR_READ ? " reading" : "",
++                             reqmode & GR_WRITE ? " writing" : reqmode &
++                             GR_APPEND ? " appending" : "", DEFAULTSECARGS);
++              return 0;
++      } else if (unlikely((mode & reqmode) != reqmode))
++              return 0;
++
++      return reqmode;
++}
++
++__u32
++gr_acl_handle_access(const struct dentry * dentry, const struct vfsmount * mnt,
++                   const int fmode)
++{
++      __u32 mode, reqmode = GR_FIND;
++
++      if ((fmode & S_IXOTH) && !S_ISDIR(dentry->d_inode->i_mode))
++              reqmode |= GR_EXEC;
++      if (fmode & S_IWOTH)
++              reqmode |= GR_WRITE;
++      if (fmode & S_IROTH)
++              reqmode |= GR_READ;
++
++      mode =
++          gr_search_file(dentry, reqmode | to_gr_audit(reqmode) | GR_SUPPRESS,
++                         mnt);
++
++      if (unlikely(((mode & reqmode) == reqmode) && mode & GR_AUDITS)) {
++              security_audit(GR_ACCESS_ACL_MSG, "successful",
++                             gr_to_filename(dentry, mnt),
++                             reqmode & GR_READ ? " reading" : "",
++                             reqmode & GR_WRITE ? " writing" : "",
++                             reqmode & GR_EXEC ? " executing" : "",
++                             DEFAULTSECARGS);
++              return reqmode;
++      } else
++          if (unlikely((mode & reqmode) != reqmode && !(mode & GR_SUPPRESS)))
++      {
++              security_alert(GR_ACCESS_ACL_MSG, "denied",
++                             gr_to_filename(dentry, mnt),
++                             reqmode & GR_READ ? " reading" : "",
++                             reqmode & GR_WRITE ? " writing" : "",
++                             reqmode & GR_EXEC ? " executing" : "",
++                             DEFAULTSECARGS);
++              return 0;
++      } else if (unlikely((mode & reqmode) != reqmode))
++              return 0;
++
++      return reqmode;
++}
++
++#define generic_fs_handler(dentry, mnt, reqmode, fmt) \
++{ \
++      __u32 mode; \
++      \
++      mode = gr_search_file(dentry, reqmode | to_gr_audit(reqmode) | GR_SUPPRESS, mnt); \
++      \
++      if (unlikely(((mode & (reqmode)) == (reqmode)) && mode & GR_AUDITS)) { \
++              security_audit(fmt, "successful", \
++                              gr_to_filename(dentry, mnt), DEFAULTSECARGS); \
++              return mode; \
++      } else if (unlikely((mode & (reqmode)) != (reqmode) && !(mode & GR_SUPPRESS))) { \
++              security_alert(fmt, "denied", gr_to_filename(dentry, mnt), \
++                              DEFAULTSECARGS); \
++              return 0; \
++      } else if (unlikely((mode & (reqmode)) != (reqmode))) \
++              return 0; \
++      \
++      return (reqmode); \
++}
++
++__u32
++gr_acl_handle_rmdir(const struct dentry * dentry, const struct vfsmount * mnt)
++{
++      generic_fs_handler(dentry, mnt, GR_WRITE | GR_DELETE , GR_RMDIR_ACL_MSG);
++}
++
++__u32
++gr_acl_handle_unlink(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      generic_fs_handler(dentry, mnt, GR_WRITE | GR_DELETE , GR_UNLINK_ACL_MSG);
++}
++
++__u32
++gr_acl_handle_truncate(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      generic_fs_handler(dentry, mnt, GR_WRITE, GR_TRUNCATE_ACL_MSG);
++}
++
++__u32
++gr_acl_handle_utime(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      generic_fs_handler(dentry, mnt, GR_WRITE, GR_ATIME_ACL_MSG);
++}
++
++__u32
++gr_acl_handle_fchmod(const struct dentry *dentry, const struct vfsmount *mnt,
++                   mode_t mode)
++{
++      if (unlikely(dentry->d_inode && S_ISSOCK(dentry->d_inode->i_mode)))
++              return 1;
++
++      if (unlikely((mode != (mode_t)-1) && (mode & (S_ISUID | S_ISGID)))) {
++              generic_fs_handler(dentry, mnt, GR_WRITE | GR_SETID,
++                                 GR_FCHMOD_ACL_MSG);
++      } else {
++              generic_fs_handler(dentry, mnt, GR_WRITE, GR_FCHMOD_ACL_MSG);
++      }
++}
++
++__u32
++gr_acl_handle_chmod(const struct dentry *dentry, const struct vfsmount *mnt,
++                  mode_t mode)
++{
++      if (unlikely((mode != (mode_t)-1) && (mode & (S_ISUID | S_ISGID)))) {
++              generic_fs_handler(dentry, mnt, GR_WRITE | GR_SETID,
++                                 GR_CHMOD_ACL_MSG);
++      } else {
++              generic_fs_handler(dentry, mnt, GR_WRITE, GR_CHMOD_ACL_MSG);
++      }
++}
++
++__u32
++gr_acl_handle_chown(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      generic_fs_handler(dentry, mnt, GR_WRITE, GR_CHOWN_ACL_MSG);
++}
++
++__u32
++gr_acl_handle_execve(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      generic_fs_handler(dentry, mnt, GR_EXEC, GR_EXEC_ACL_MSG);
++}
++
++__u32
++gr_acl_handle_unix(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      generic_fs_handler(dentry, mnt, GR_READ | GR_WRITE,
++                         GR_UNIXCONNECT_ACL_MSG);
++}
++
++__u32
++gr_acl_handle_filldir(const struct dentry *dentry, const struct vfsmount *mnt,
++                    const ino_t ino)
++{
++      if (likely((unsigned long)(dentry->d_inode))) {
++              struct dentry d = *dentry;
++              struct inode inode = *(dentry->d_inode);
++
++              inode.i_ino = ino;
++              d.d_inode = &inode;
++
++              if (unlikely(!gr_search_file(&d, GR_FIND | GR_NOLEARN, mnt)))
++                      return 0;
++      }
++
++      return 1;
++}
++
++__u32
++gr_acl_handle_link(const struct dentry * new_dentry,
++                 const struct dentry * parent_dentry,
++                 const struct vfsmount * parent_mnt,
++                 const struct dentry * old_dentry,
++                 const struct vfsmount * old_mnt, const char *to)
++{
++      __u32 needmode = GR_WRITE | GR_CREATE;
++      __u32 mode;
++
++      mode =
++          gr_check_link(new_dentry, parent_dentry, parent_mnt, old_dentry,
++                        old_mnt);
++
++      if (unlikely(((mode & needmode) == needmode) && mode & GR_AUDITS)) {
++              security_audit(GR_LINK_ACL_MSG, "successful",
++                             gr_to_filename(old_dentry, old_mnt), to,
++                             DEFAULTSECARGS);
++              return mode;
++      } else if (unlikely(((mode & needmode) != needmode) && !(mode & GR_SUPPRESS))) {
++              security_alert(GR_LINK_ACL_MSG, "denied",
++                             gr_to_filename(old_dentry, old_mnt), to,
++                             DEFAULTSECARGS);
++              return 0;
++      } else if (unlikely((mode & needmode) != needmode))
++              return 0;
++
++      return (GR_WRITE | GR_CREATE);
++}
++
++__u32
++gr_acl_handle_symlink(const struct dentry * new_dentry,
++                    const struct dentry * parent_dentry,
++                    const struct vfsmount * parent_mnt, const char *from)
++{
++      __u32 needmode = GR_WRITE | GR_CREATE;
++      __u32 mode;
++
++      mode =
++          gr_check_create(new_dentry, parent_dentry, parent_mnt,
++                          GR_CREATE | GR_AUDIT_CREATE |
++                          GR_WRITE | GR_AUDIT_WRITE | GR_SUPPRESS);
++
++      if (unlikely(mode & GR_WRITE && mode & GR_AUDITS)) {
++              security_audit(GR_SYMLINK_ACL_MSG, "successful",
++                             from, gr_to_filename(new_dentry, parent_mnt),
++                             DEFAULTSECARGS);
++              return mode;
++      } else if (unlikely(((mode & needmode) != needmode) && !(mode & GR_SUPPRESS))) {
++              security_alert(GR_SYMLINK_ACL_MSG, "denied",
++                             from, gr_to_filename(new_dentry, parent_mnt),
++                             DEFAULTSECARGS);
++              return 0;
++      } else if (unlikely((mode & needmode) != needmode))
++              return 0;
++
++      return (GR_WRITE | GR_CREATE);
++}
++
++#define generic_fs_create_handler(new_dentry, parent_dentry, parent_mnt, reqmode, fmt) \
++{ \
++      __u32 mode; \
++      \
++      mode = gr_check_create(new_dentry, parent_dentry, parent_mnt, reqmode | to_gr_audit(reqmode) | GR_SUPPRESS); \
++      \
++      if (unlikely(((mode & (reqmode)) == (reqmode)) && mode & GR_AUDITS)) { \
++              security_audit(fmt, "successful", \
++                              gr_to_filename(new_dentry, parent_mnt), \
++                              DEFAULTSECARGS); \
++              return mode; \
++      } else if (unlikely((mode & (reqmode)) != (reqmode) && !(mode & GR_SUPPRESS))) { \
++              security_alert(fmt, "denied", \
++                              gr_to_filename(new_dentry, parent_mnt), \
++                              DEFAULTSECARGS); \
++              return 0; \
++      } else if (unlikely((mode & (reqmode)) != (reqmode))) \
++              return 0; \
++      \
++      return (reqmode); \
++}
++
++__u32
++gr_acl_handle_mknod(const struct dentry * new_dentry,
++                  const struct dentry * parent_dentry,
++                  const struct vfsmount * parent_mnt,
++                  const int mode)
++{
++      __u32 reqmode = GR_WRITE | GR_CREATE;
++      if (unlikely(mode & (S_ISUID | S_ISGID)))
++              reqmode |= GR_SETID;
++
++      generic_fs_create_handler(new_dentry, parent_dentry, parent_mnt,
++                                reqmode, GR_MKNOD_ACL_MSG);
++}
++
++__u32
++gr_acl_handle_mkdir(const struct dentry *new_dentry,
++                  const struct dentry *parent_dentry,
++                  const struct vfsmount *parent_mnt)
++{
++      generic_fs_create_handler(new_dentry, parent_dentry, parent_mnt,
++                                GR_WRITE | GR_CREATE, GR_MKDIR_ACL_MSG);
++}
++
++#define RENAME_CHECK_SUCCESS(old, new) \
++      (((old & (GR_WRITE | GR_READ)) == (GR_WRITE | GR_READ)) && \
++       ((new & (GR_WRITE | GR_READ)) == (GR_WRITE | GR_READ)))
++
++int
++gr_acl_handle_rename(struct dentry *new_dentry,
++                   struct dentry *parent_dentry,
++                   const struct vfsmount *parent_mnt,
++                   struct dentry *old_dentry,
++                   struct inode *old_parent_inode,
++                   struct vfsmount *old_mnt, const char *newname)
++{
++      __u32 comp1, comp2;
++      int error = 0;
++
++      if (unlikely(!gr_acl_is_enabled()))
++              return 0;
++
++      if (!new_dentry->d_inode) {
++              comp1 = gr_check_create(new_dentry, parent_dentry, parent_mnt,
++                                      GR_READ | GR_WRITE | GR_CREATE | GR_AUDIT_READ |
++                                      GR_AUDIT_WRITE | GR_AUDIT_CREATE | GR_SUPPRESS);
++              comp2 = gr_search_file(old_dentry, GR_READ | GR_WRITE |
++                                     GR_DELETE | GR_AUDIT_DELETE |
++                                     GR_AUDIT_READ | GR_AUDIT_WRITE |
++                                     GR_SUPPRESS, old_mnt);
++      } else {
++              comp1 = gr_search_file(new_dentry, GR_READ | GR_WRITE |
++                                     GR_CREATE | GR_DELETE |
++                                     GR_AUDIT_CREATE | GR_AUDIT_DELETE |
++                                     GR_AUDIT_READ | GR_AUDIT_WRITE |
++                                     GR_SUPPRESS, parent_mnt);
++              comp2 =
++                  gr_search_file(old_dentry,
++                                 GR_READ | GR_WRITE | GR_AUDIT_READ |
++                                 GR_DELETE | GR_AUDIT_DELETE |
++                                 GR_AUDIT_WRITE | GR_SUPPRESS, old_mnt);
++      }
++
++      if (RENAME_CHECK_SUCCESS(comp1, comp2) &&
++          ((comp1 & GR_AUDITS) || (comp2 & GR_AUDITS)))
++              security_audit(GR_RENAME_ACL_MSG, "successful",
++                             gr_to_filename(old_dentry, old_mnt),
++                             newname, DEFAULTSECARGS);
++      else if (!RENAME_CHECK_SUCCESS(comp1, comp2) && !(comp1 & GR_SUPPRESS)
++               && !(comp2 & GR_SUPPRESS)) {
++              security_alert(GR_RENAME_ACL_MSG, "denied",
++                             gr_to_filename(old_dentry, old_mnt), newname,
++                             DEFAULTSECARGS);
++              error = -EACCES;
++      } else if (unlikely(!RENAME_CHECK_SUCCESS(comp1, comp2)))
++              error = -EACCES;
++
++      return error;
++}
++
++void
++gr_acl_handle_exit(void)
++{
++      u16 id;
++      char *rolename;
++      struct file *exec_file;
++
++      if (unlikely(current->acl_sp_role && gr_acl_is_enabled())) {
++              id = current->acl_role_id;
++              rolename = current->role->rolename;
++              gr_set_acls(1);
++              security_alert_good(GR_SPROLEL_ACL_MSG,
++                                  rolename, id, DEFAULTSECARGS);
++      }
++
++      write_lock(&grsec_exec_file_lock);
++      exec_file = current->exec_file;
++      current->exec_file = NULL;
++      write_unlock(&grsec_exec_file_lock);
++
++      if (exec_file)
++              fput(exec_file);
++}
++
++int
++gr_acl_handle_procpidmem(const struct task_struct *task)
++{
++      if (unlikely(!gr_acl_is_enabled()))
++              return 0;
++
++      if (task->acl->mode & GR_PROTPROCFD)
++              return -EACCES;
++
++      return 0;
++}
+diff -uNr linux-2.6.8/grsecurity/gracl_ip.c linux-2.6.8.grsecurity/grsecurity/gracl_ip.c
+--- linux-2.6.8/grsecurity/gracl_ip.c  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/gracl_ip.c       2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,236 @@
++/* 
++ * grsecurity/gracl_ip.c
++ * Copyright Brad Spengler 2002, 2003
++ *
++ */
++
++#include <linux/kernel.h>
++#include <asm/uaccess.h>
++#include <asm/errno.h>
++#include <net/sock.h>
++#include <linux/file.h>
++#include <linux/fs.h>
++#include <linux/net.h>
++#include <linux/in.h>
++#include <linux/skbuff.h>
++#include <linux/ip.h>
++#include <linux/udp.h>
++#include <linux/smp_lock.h>
++#include <linux/types.h>
++#include <linux/sched.h>
++#include <linux/gracl.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++#define GR_BIND       0x01
++#define GR_CONNECT    0x02
++
++static const char * gr_protocols[256] = {
++      "ip", "icmp", "igmp", "ggp", "ipencap", "st", "tcp", "cbt",
++      "egp", "igp", "bbn-rcc", "nvp", "pup", "argus", "emcon", "xnet",
++      "chaos", "udp", "mux", "dcn", "hmp", "prm", "xns-idp", "trunk-1",
++      "trunk-2", "leaf-1", "leaf-2", "rdp", "irtp", "iso-tp4", "netblt", "mfe-nsp",
++      "merit-inp", "sep", "3pc", "idpr", "xtp", "ddp", "idpr-cmtp", "tp++",
++      "il", "ipv6", "sdrp", "ipv6-route", "ipv6-frag", "idrp", "rsvp", "gre",
++      "mhrp", "bna", "ipv6-crypt", "ipv6-auth", "i-nlsp", "swipe", "narp", "mobile",
++      "tlsp", "skip", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts", "unknown:61", "cftp", "unknown:63",
++      "sat-expak", "kryptolan", "rvd", "ippc", "unknown:68", "sat-mon", "visa", "ipcv",
++      "cpnx", "cphb", "wsn", "pvp", "br-sat-mon", "sun-nd", "wb-mon", "wb-expak", 
++      "iso-ip", "vmtp", "secure-vmtp", "vines", "ttp", "nfsnet-igp", "dgp", "tcf", 
++      "eigrp", "ospf", "sprite-rpc", "larp", "mtp", "ax.25", "ipip", "micp",
++      "scc-sp", "etherip", "encap", "unknown:99", "gmtp", "ifmp", "pnni", "pim",
++      "aris", "scps", "qnx", "a/n", "ipcomp", "snp", "compaq-peer", "ipx-in-ip",
++      "vrrp", "pgm", "unknown:114", "l2tp", "ddx", "iatp", "stp", "srp",
++      "uti", "smp", "sm", "ptp", "isis", "fire", "crtp", "crdup",
++      "sscopmce", "iplt", "sps", "pipe", "sctp", "fc", "unkown:134", "unknown:135",
++      "unknown:136", "unknown:137", "unknown:138", "unknown:139", "unknown:140", "unknown:141", "unknown:142", "unknown:143",
++      "unknown:144", "unknown:145", "unknown:146", "unknown:147", "unknown:148", "unknown:149", "unknown:150", "unknown:151",
++      "unknown:152", "unknown:153", "unknown:154", "unknown:155", "unknown:156", "unknown:157", "unknown:158", "unknown:159",
++      "unknown:160", "unknown:161", "unknown:162", "unknown:163", "unknown:164", "unknown:165", "unknown:166", "unknown:167",
++      "unknown:168", "unknown:169", "unknown:170", "unknown:171", "unknown:172", "unknown:173", "unknown:174", "unknown:175",
++      "unknown:176", "unknown:177", "unknown:178", "unknown:179", "unknown:180", "unknown:181", "unknown:182", "unknown:183",
++      "unknown:184", "unknown:185", "unknown:186", "unknown:187", "unknown:188", "unknown:189", "unknown:190", "unknown:191",
++      "unknown:192", "unknown:193", "unknown:194", "unknown:195", "unknown:196", "unknown:197", "unknown:198", "unknown:199",
++      "unknown:200", "unknown:201", "unknown:202", "unknown:203", "unknown:204", "unknown:205", "unknown:206", "unknown:207",
++      "unknown:208", "unknown:209", "unknown:210", "unknown:211", "unknown:212", "unknown:213", "unknown:214", "unknown:215",
++      "unknown:216", "unknown:217", "unknown:218", "unknown:219", "unknown:220", "unknown:221", "unknown:222", "unknown:223",
++      "unknown:224", "unknown:225", "unknown:226", "unknown:227", "unknown:228", "unknown:229", "unknown:230", "unknown:231",
++      "unknown:232", "unknown:233", "unknown:234", "unknown:235", "unknown:236", "unknown:237", "unknown:238", "unknown:239",
++      "unknown:240", "unknown:241", "unknown:242", "unknown:243", "unknown:244", "unknown:245", "unknown:246", "unknown:247",
++      "unknown:248", "unknown:249", "unknown:250", "unknown:251", "unknown:252", "unknown:253", "unknown:254", "unknown:255",
++      };
++
++static const char * gr_socktypes[11] = {
++      "unknown:0", "stream", "dgram", "raw", "rdm", "seqpacket", "unknown:6", 
++      "unknown:7", "unknown:8", "unknown:9", "packet"
++      };
++
++__inline__ const char *
++gr_proto_to_name(unsigned char proto)
++{
++      return gr_protocols[proto];
++}
++
++__inline__ const char *
++gr_socktype_to_name(unsigned char type)
++{
++      return gr_socktypes[type];
++}
++
++int
++gr_search_socket(const int domain, const int type, const int protocol)
++{
++      struct acl_subject_label *curr;
++
++      if (unlikely(!gr_acl_is_enabled()))
++              goto exit;
++
++      if ((domain < 0) || (type < 0) || (protocol < 0) || (domain != PF_INET)
++          || (domain >= NPROTO) || (type >= SOCK_MAX) || (protocol > 255))
++              goto exit;      // let the kernel handle it
++
++      curr = current->acl;
++
++      if (!curr->ips)
++              goto exit;
++
++      if ((curr->ip_type & (1 << type)) &&
++          (curr->ip_proto[protocol / 32] & (1 << (protocol % 32))))
++              goto exit;
++
++      if (curr->mode & GR_LEARN) {
++              /* we don't place acls on raw sockets , and sometimes
++                 dgram/ip sockets are opened for ioctl and not
++                 bind/connect, so we'll fake a bind learn log */
++              if (type == SOCK_RAW || type == SOCK_PACKET) {
++                      __u32 fakeip = 0;
++                      security_learn(GR_IP_LEARN_MSG, current->role->rolename,
++                                     current->role->roletype, current->uid,
++                                     current->gid, current->exec_file ?
++                                     gr_to_filename(current->exec_file->f_dentry,
++                                     current->exec_file->f_vfsmnt) :
++                                     curr->filename, curr->filename,
++                                     NIPQUAD(fakeip), 0, type,
++                                     protocol, GR_CONNECT, NIPQUAD(current->curr_ip));
++              } else if ((type == SOCK_DGRAM) && (protocol == IPPROTO_IP)) {
++                      __u32 fakeip = 0;
++                      security_learn(GR_IP_LEARN_MSG, current->role->rolename,
++                                     current->role->roletype, current->uid,
++                                     current->gid, current->exec_file ?
++                                     gr_to_filename(current->exec_file->f_dentry,
++                                     current->exec_file->f_vfsmnt) :
++                                     curr->filename, curr->filename,
++                                     NIPQUAD(fakeip), 0, type,
++                                     protocol, GR_BIND, NIPQUAD(current->curr_ip));
++              }
++              /* we'll log when they use connect or bind */
++              goto exit;
++      }
++
++      security_alert(GR_SOCK_MSG, "inet", gr_socktype_to_name(type),
++                     gr_proto_to_name(protocol), DEFAULTSECARGS);
++
++      return 0;
++      exit:
++      return 1;
++}
++
++static __inline__ int
++gr_search_connectbind(const int mode, const struct sock *sk,
++                    const struct sockaddr_in *addr, const int type)
++{
++      struct acl_subject_label *curr;
++      struct acl_ip_label *ip;
++      unsigned long i;
++      __u32 ip_addr = 0;
++      __u16 ip_port = 0;
++
++      if (unlikely(!gr_acl_is_enabled() || sk->sk_family != PF_INET))
++              return 1;
++
++      curr = current->acl;
++
++      if (!curr->ips)
++              return 1;
++
++      ip_addr = addr->sin_addr.s_addr;
++      ip_port = ntohs(addr->sin_port);
++
++      for (i = 0; i < curr->ip_num; i++) {
++              ip = *(curr->ips + i);
++              if ((ip->mode & mode) &&
++                  (ip_port >= ip->low) &&
++                  (ip_port <= ip->high) &&
++                  ((ntohl(ip_addr) & ip->netmask) ==
++                   (ntohl(ip->addr) & ip->netmask))
++                  && (ip->
++                      proto[sk->sk_protocol / 32] & (1 << (sk->sk_protocol % 32)))
++                  && (ip->type & (1 << type)))
++                      return 1;
++      }
++
++      if (curr->mode & GR_LEARN) {
++              security_learn(GR_IP_LEARN_MSG, current->role->rolename,
++                             current->role->roletype, current->uid,
++                             current->gid, current->exec_file ?
++                             gr_to_filename(current->exec_file->f_dentry,
++                             current->exec_file->f_vfsmnt) :
++                             curr->filename, curr->filename,
++                             NIPQUAD(ip_addr), ip_port, type,
++                             sk->sk_protocol, mode, NIPQUAD(current->curr_ip));
++              return 1;
++      }
++
++      if (mode == GR_BIND)
++              security_alert(GR_BIND_ACL_MSG, NIPQUAD(ip_addr), ip_port,
++                             gr_socktype_to_name(type), gr_proto_to_name(sk->sk_protocol),
++                             DEFAULTSECARGS);
++      else if (mode == GR_CONNECT)
++              security_alert(GR_CONNECT_ACL_MSG, NIPQUAD(ip_addr), ip_port,
++                             gr_socktype_to_name(type), gr_proto_to_name(sk->sk_protocol),
++                             DEFAULTSECARGS);
++
++      return 0;
++}
++
++int
++gr_search_connect(const struct socket *sock, const struct sockaddr_in *addr)
++{
++      return gr_search_connectbind(GR_CONNECT, sock->sk, addr, sock->type);
++}
++
++int
++gr_search_bind(const struct socket *sock, const struct sockaddr_in *addr)
++{
++      return gr_search_connectbind(GR_BIND, sock->sk, addr, sock->type);
++}
++
++int
++gr_search_udp_sendmsg(const struct sock *sk, const struct sockaddr_in *addr)
++{
++      if (addr)
++              return gr_search_connectbind(GR_CONNECT, sk, addr, SOCK_DGRAM);
++      else {
++              struct sockaddr_in sin;
++              const struct inet_opt *inet = inet_sk(sk);
++
++              sin.sin_addr.s_addr = inet->daddr;
++              sin.sin_port = inet->dport;
++
++              return gr_search_connectbind(GR_CONNECT, sk, &sin, SOCK_DGRAM);
++      }
++}
++
++int
++gr_search_udp_recvmsg(const struct sock *sk, const struct sk_buff *skb)
++{
++      struct sockaddr_in sin;
++
++      if (unlikely(skb->len < sizeof (struct udphdr)))
++              return 1;       // skip this packet
++
++      sin.sin_addr.s_addr = skb->nh.iph->saddr;
++      sin.sin_port = skb->h.uh->source;
++
++      return gr_search_connectbind(GR_CONNECT, sk, &sin, SOCK_DGRAM);
++}
+diff -uNr linux-2.6.8/grsecurity/gracl_learn.c linux-2.6.8.grsecurity/grsecurity/gracl_learn.c
+--- linux-2.6.8/grsecurity/gracl_learn.c       1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/gracl_learn.c    2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,204 @@
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/sched.h>
++#include <linux/poll.h>
++#include <linux/smp_lock.h>
++#include <linux/string.h>
++#include <linux/file.h>
++#include <linux/types.h>
++#include <linux/vmalloc.h>
++#include <linux/grinternal.h>
++
++extern ssize_t write_grsec_handler(struct file * file, const char * buf,
++                                 size_t count, loff_t *ppos);
++extern int gr_acl_is_enabled(void);
++
++static DECLARE_WAIT_QUEUE_HEAD(learn_wait);
++static int gr_learn_attached;
++
++/* use a 512k buffer */
++#define LEARN_BUFFER_SIZE (512 * 1024)
++
++static spinlock_t gr_learn_lock = SPIN_LOCK_UNLOCKED;
++static DECLARE_MUTEX(gr_learn_user_sem);
++
++/* we need to maintain two buffers, so that the kernel context of grlearn
++   uses a semaphore around the userspace copying, and the other kernel contexts
++   use a spinlock when copying into the buffer, since they cannot sleep
++*/
++static char *learn_buffer;
++static char *learn_buffer_user;
++static int learn_buffer_len;
++static int learn_buffer_user_len;
++
++static ssize_t
++read_learn(struct file *file, char * buf, size_t count, loff_t * ppos)
++{
++      DECLARE_WAITQUEUE(wait, current);
++      ssize_t retval = 0;
++
++      add_wait_queue(&learn_wait, &wait);
++      set_current_state(TASK_INTERRUPTIBLE);
++      do {
++              down(&gr_learn_user_sem);
++              spin_lock(&gr_learn_lock);
++              if (learn_buffer_len)
++                      break;
++              spin_unlock(&gr_learn_lock);
++              up(&gr_learn_user_sem);
++              if (file->f_flags & O_NONBLOCK) {
++                      retval = -EAGAIN;
++                      goto out;
++              }
++              if (signal_pending(current)) {
++                      retval = -ERESTARTSYS;
++                      goto out;
++              }
++
++              schedule();
++      } while (1);
++
++      memcpy(learn_buffer_user, learn_buffer, learn_buffer_len);
++      learn_buffer_user_len = learn_buffer_len;
++      retval = learn_buffer_len;
++      learn_buffer_len = 0;
++
++      spin_unlock(&gr_learn_lock);
++
++      if (copy_to_user(buf, learn_buffer_user, learn_buffer_user_len))
++              retval = -EFAULT;
++
++      up(&gr_learn_user_sem);
++out:
++      set_current_state(TASK_RUNNING);
++      remove_wait_queue(&learn_wait, &wait);
++      return retval;
++}
++
++static unsigned int
++poll_learn(struct file * file, poll_table * wait)
++{
++      poll_wait(file, &learn_wait, wait);
++
++      if (learn_buffer_len)
++              return (POLLIN | POLLRDNORM);
++
++      return 0;
++}
++
++void
++gr_clear_learn_entries(void)
++{
++      char *tmp;
++
++      down(&gr_learn_user_sem);
++      if (learn_buffer != NULL) {
++              spin_lock(&gr_learn_lock);
++              tmp = learn_buffer;
++              learn_buffer = NULL;
++              spin_unlock(&gr_learn_lock);
++              vfree(learn_buffer);
++      }
++      if (learn_buffer_user != NULL) {
++              vfree(learn_buffer_user);
++              learn_buffer_user = NULL;
++      }
++      learn_buffer_len = 0;
++      up(&gr_learn_user_sem);
++
++      return;
++}
++
++void
++gr_add_learn_entry(const char *fmt, ...)
++{
++      va_list args;
++      unsigned int len;
++
++      if (!gr_learn_attached)
++              return;
++
++      spin_lock(&gr_learn_lock);
++
++      /* leave a gap at the end so we know when it's "full" but don't have to
++         compute the exact length of the string we're trying to append
++      */
++      if (learn_buffer_len > LEARN_BUFFER_SIZE - 16384) {
++              spin_unlock(&gr_learn_lock);
++              wake_up_interruptible(&learn_wait);
++              return;
++      }
++      if (learn_buffer == NULL) {
++              spin_unlock(&gr_learn_lock);
++              return;
++      }
++
++      va_start(args, fmt);
++      len = vsnprintf(learn_buffer + learn_buffer_len, LEARN_BUFFER_SIZE - learn_buffer_len, fmt, args);
++      va_end(args);
++
++      learn_buffer_len += len + 1;
++
++      spin_unlock(&gr_learn_lock);
++      wake_up_interruptible(&learn_wait);
++
++      return;
++}
++
++static int
++open_learn(struct inode *inode, struct file *file)
++{
++      if (file->f_mode & FMODE_READ && gr_learn_attached)
++              return -EBUSY;
++      if (file->f_mode & FMODE_READ) {
++              down(&gr_learn_user_sem);
++              if (learn_buffer == NULL)
++                      learn_buffer = vmalloc(LEARN_BUFFER_SIZE);
++              if (learn_buffer_user == NULL)
++                      learn_buffer_user = vmalloc(LEARN_BUFFER_SIZE);
++              if (learn_buffer == NULL)
++                      return -ENOMEM;
++              if (learn_buffer_user == NULL)
++                      return -ENOMEM;
++              learn_buffer_len = 0;
++              learn_buffer_user_len = 0;
++              gr_learn_attached = 1;
++              up(&gr_learn_user_sem);
++      }
++      return 0;
++}
++
++static int
++close_learn(struct inode *inode, struct file *file)
++{
++      char *tmp;
++
++      if (file->f_mode & FMODE_READ) {
++              down(&gr_learn_user_sem);
++              if (learn_buffer != NULL) {
++                      spin_lock(&gr_learn_lock);
++                      tmp = learn_buffer;
++                      learn_buffer = NULL;
++                      spin_unlock(&gr_learn_lock);
++                      vfree(tmp);
++              }
++              if (learn_buffer_user != NULL) {
++                      vfree(learn_buffer_user);
++                      learn_buffer_user = NULL;
++              }
++              learn_buffer_len = 0;
++              learn_buffer_user_len = 0;
++              gr_learn_attached = 0;
++              up(&gr_learn_user_sem);
++      }
++
++      return 0;
++}
++              
++struct file_operations grsec_fops = {
++      read:           read_learn,
++      write:          write_grsec_handler,
++      open:           open_learn,
++      release:        close_learn,
++      poll:           poll_learn,
++};
+diff -uNr linux-2.6.8/grsecurity/gracl_res.c linux-2.6.8.grsecurity/grsecurity/gracl_res.c
+--- linux-2.6.8/grsecurity/gracl_res.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/gracl_res.c      2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,50 @@
++/* resource handling routines (c) Brad Spengler 2002, 2003 */
++
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/gracl.h>
++#include <linux/grinternal.h>
++
++static const char *restab_log[11] = {
++      "RLIMIT_CPU",
++      "RLIMIT_FSIZE",
++      "RLIMIT_DATA",
++      "RLIMIT_STACK",
++      "RLIMIT_CORE",
++      "RLIMIT_RSS",
++      "RLIMIT_NPROC",
++      "RLIMIT_NOFILE",
++      "RLIMIT_MEMLOCK",
++      "RLIMIT_AS",
++      "RLIMIT_LOCKS"
++};
++
++__inline__ void
++gr_log_resource(const struct task_struct *task,
++              const int res, const unsigned long wanted, const int gt)
++{
++      if (unlikely(res == RLIMIT_NPROC && 
++          (cap_raised(task->cap_effective, CAP_SYS_ADMIN) || 
++           cap_raised(task->cap_effective, CAP_SYS_RESOURCE))))
++              return;
++
++      preempt_disable();
++
++      if (unlikely(((gt && wanted > task->rlim[res].rlim_cur) ||
++                    (!gt && wanted >= task->rlim[res].rlim_cur)) &&
++                   task->rlim[res].rlim_cur != RLIM_INFINITY))
++              security_alert(GR_RESOURCE_MSG, wanted, restab_log[res],
++                             task->rlim[res].rlim_cur,
++                             gr_task_fullpath(task), task->comm,
++                             task->pid, task->uid, task->euid,
++                             task->gid, task->egid,
++                             gr_parent_task_fullpath(task),
++                             task->parent->comm,
++                             task->parent->pid, task->parent->uid, 
++                             task->parent->euid, task->parent->gid,
++                             task->parent->egid);
++
++      preempt_enable_no_resched();
++
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/gracl_segv.c linux-2.6.8.grsecurity/grsecurity/gracl_segv.c
+--- linux-2.6.8/grsecurity/gracl_segv.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/gracl_segv.c     2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,330 @@
++/* 
++ * grsecurity/gracl_segv.c
++ * Copyright Brad Spengler 2002, 2003
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <asm/uaccess.h>
++#include <asm/errno.h>
++#include <asm/mman.h>
++#include <net/sock.h>
++#include <linux/file.h>
++#include <linux/fs.h>
++#include <linux/net.h>
++#include <linux/in.h>
++#include <linux/smp_lock.h>
++#include <linux/slab.h>
++#include <linux/types.h>
++#include <linux/sched.h>
++#include <linux/timer.h>
++#include <linux/gracl.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++static struct crash_uid *uid_set;
++static unsigned short uid_used;
++static rwlock_t gr_uid_lock = RW_LOCK_UNLOCKED;
++extern rwlock_t gr_inode_lock;
++extern struct acl_subject_label *
++      lookup_acl_subj_label(const ino_t inode, const dev_t dev,
++                            struct acl_role_label *role);
++extern int specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t);
++
++int
++gr_init_uidset(void)
++{
++      uid_set =
++          kmalloc(GR_UIDTABLE_MAX * sizeof (struct crash_uid), GFP_KERNEL);
++      uid_used = 0;
++
++      return uid_set ? 1 : 0;
++}
++
++void
++gr_free_uidset(void)
++{
++      if (uid_set)
++              kfree(uid_set);
++
++      return;
++}
++
++int
++gr_find_uid(const uid_t uid)
++{
++      struct crash_uid *tmp = uid_set;
++      uid_t buid;
++      int low = 0, high = uid_used - 1, mid;
++
++      while (high >= low) {
++              mid = (low + high) >> 1;
++              buid = tmp[mid].uid;
++              if (buid == uid)
++                      return mid;
++              if (buid > uid)
++                      high = mid - 1;
++              if (buid < uid)
++                      low = mid + 1;
++      }
++
++      return -1;
++}
++
++static __inline__ void
++gr_insertsort(void)
++{
++      unsigned short i, j;
++      struct crash_uid index;
++
++      for (i = 1; i < uid_used; i++) {
++              index = uid_set[i];
++              j = i;
++              while ((j > 0) && uid_set[j - 1].uid > index.uid) {
++                      uid_set[j] = uid_set[j - 1];
++                      j--;
++              }
++              uid_set[j] = index;
++      }
++
++      return;
++}
++
++static __inline__ void
++gr_insert_uid(const uid_t uid, const unsigned long expires)
++{
++      int loc;
++
++      if (uid_used == GR_UIDTABLE_MAX)
++              return;
++
++      loc = gr_find_uid(uid);
++
++      if (loc >= 0) {
++              uid_set[loc].expires = expires;
++              return;
++      }
++
++      uid_set[uid_used].uid = uid;
++      uid_set[uid_used].expires = expires;
++      uid_used++;
++
++      gr_insertsort();
++
++      return;
++}
++
++void
++gr_remove_uid(const unsigned short loc)
++{
++      unsigned short i;
++
++      for (i = loc + 1; i < uid_used; i++)
++              uid_set[i - i] = uid_set[i];
++
++      uid_used--;
++
++      return;
++}
++
++int
++gr_check_crash_uid(const uid_t uid)
++{
++      int loc;
++
++      if (unlikely(!gr_acl_is_enabled()))
++              return 0;
++
++      read_lock(&gr_uid_lock);
++      loc = gr_find_uid(uid);
++      read_unlock(&gr_uid_lock);
++
++      if (loc < 0)
++              return 0;
++
++      write_lock(&gr_uid_lock);
++      if (time_before_eq(uid_set[loc].expires, get_seconds()))
++              gr_remove_uid(loc);
++      else {
++              write_unlock(&gr_uid_lock);
++              return 1;
++      }
++
++      write_unlock(&gr_uid_lock);
++      return 0;
++}
++
++static __inline__ int
++proc_is_setxid(const struct task_struct *task)
++{
++      if (task->uid != task->euid || task->uid != task->suid ||
++          task->uid != task->fsuid)
++              return 1;
++      if (task->gid != task->egid || task->gid != task->sgid ||
++          task->gid != task->fsgid)
++              return 1;
++
++      return 0;
++}
++static __inline__ int
++gr_fake_force_sig(int sig, struct task_struct *t)
++{
++      unsigned long int flags;
++      int ret;
++
++      spin_lock_irqsave(&t->sighand->siglock, flags);
++      if (sigismember(&t->blocked, sig) || t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) {
++              t->sighand->action[sig-1].sa.sa_handler = SIG_DFL;
++              sigdelset(&t->blocked, sig);
++              recalc_sigpending_tsk(t);
++      }
++      ret = specific_send_sig_info(sig, (void*)1L, t);
++      spin_unlock_irqrestore(&t->sighand->siglock, flags);
++
++      return ret;
++}
++
++void
++gr_handle_crash(struct task_struct *task, const int sig)
++{
++      struct acl_subject_label *curr;
++      struct acl_subject_label *curr2;
++      struct task_struct *tsk, *tsk2;
++
++      if (sig != SIGSEGV && sig != SIGKILL && sig != SIGBUS && sig != SIGILL)
++              return;
++
++      if (unlikely(!gr_acl_is_enabled()))
++              return;
++
++      curr = task->acl;
++
++      if (!(curr->resmask & (1 << GR_CRASH_RES)))
++              return;
++
++      if (time_before_eq(curr->expires, get_seconds())) {
++              curr->expires = 0;
++              curr->crashes = 0;
++      }
++
++      curr->crashes++;
++
++      if (!curr->expires)
++              curr->expires = get_seconds() + curr->res[GR_CRASH_RES].rlim_max;
++
++      if ((curr->crashes >= curr->res[GR_CRASH_RES].rlim_cur) &&
++          time_after(curr->expires, get_seconds())) {
++              if (task->uid && proc_is_setxid(task)) {
++                      security_alert(GR_SEGVSTART_ACL_MSG,
++                                     gr_task_fullpath(task), task->comm,
++                                     task->pid, task->uid, task->euid,
++                                     task->gid, task->egid,
++                                     gr_parent_task_fullpath(task),
++                                     task->parent->comm, task->parent->pid,
++                                     task->parent->uid, task->parent->euid,
++                                     task->parent->gid, task->parent->egid,
++                                     task->uid,
++                                     curr->res[GR_CRASH_RES].rlim_max);
++                      write_lock(&gr_uid_lock);
++                      gr_insert_uid(task->uid, curr->expires);
++                      write_unlock(&gr_uid_lock);
++                      curr->expires = 0;
++                      curr->crashes = 0;
++                      read_lock(&tasklist_lock);
++                      for_each_process(tsk) {
++                              tsk2 = tsk;
++                              do {
++                                      if (tsk2 != task && tsk2->uid == task->uid)
++                                      gr_fake_force_sig(SIGKILL, tsk2);
++                              } while ((tsk2 = next_thread(tsk2)) != tsk);
++                      }
++                      read_unlock(&tasklist_lock);
++              } else {
++                      security_alert(GR_SEGVNOSUID_ACL_MSG,
++                                     gr_task_fullpath(task), task->comm,
++                                     task->pid, task->uid, task->euid,
++                                     task->gid, task->egid,
++                                     gr_parent_task_fullpath(task),
++                                     task->parent->comm, task->parent->pid,
++                                     task->parent->uid, task->parent->euid,
++                                     task->parent->gid, task->parent->egid,
++                                     curr->res[GR_CRASH_RES].rlim_max);
++                      read_lock(&tasklist_lock);
++                      for_each_process(tsk) {
++                              tsk2 = tsk;
++                              do {
++                                      if (likely(tsk2 != task)) {
++                                              curr2 = tsk2->acl;
++
++                                              if (curr2->device == curr->device &&
++                                                  curr2->inode == curr->inode)
++                                                      gr_fake_force_sig(SIGKILL, tsk2);
++                                      }
++                              } while ((tsk2 = next_thread(tsk2)) != tsk);
++                      }
++                      read_unlock(&tasklist_lock);
++              }
++      }
++
++      return;
++}
++
++int
++gr_check_crash_exec(const struct file *filp)
++{
++      struct acl_subject_label *curr;
++
++      if (unlikely(!gr_acl_is_enabled()))
++              return 0;
++
++      read_lock(&gr_inode_lock);
++      curr = lookup_acl_subj_label(filp->f_dentry->d_inode->i_ino,
++                                   filp->f_dentry->d_inode->i_sb->s_dev,
++                                   current->role);
++      read_unlock(&gr_inode_lock);
++
++      if (!curr || !(curr->resmask & (1 << GR_CRASH_RES)) ||
++          (!curr->crashes && !curr->expires))
++              return 0;
++
++      if ((curr->crashes >= curr->res[GR_CRASH_RES].rlim_cur) &&
++          time_after(curr->expires, get_seconds()))
++              return 1;
++      else if (time_before_eq(curr->expires, get_seconds())) {
++              curr->crashes = 0;
++              curr->expires = 0;
++      }
++
++      return 0;
++}
++
++void
++gr_handle_alertkill(void)
++{
++      struct acl_subject_label *curracl;
++      __u32 curr_ip;
++      struct task_struct *task, *task2;
++
++      if (unlikely(!gr_acl_is_enabled()))
++              return;
++
++      curracl = current->acl;
++      curr_ip = current->curr_ip;
++
++      if ((curracl->mode & GR_KILLIPPROC) && curr_ip &&
++          (curr_ip != 0xffffffff)) {
++              read_lock(&tasklist_lock);
++              for_each_process(task) {
++                      task2 = task;
++                      do {
++                              if (task2->curr_ip == curr_ip)
++                                      gr_fake_force_sig(SIGKILL, task2);
++                      } while ((task2 = next_thread(task2)) != task);
++              }
++              read_unlock(&tasklist_lock);
++      } else if (curracl->mode & GR_KILLPROC)
++              gr_fake_force_sig(SIGKILL, current);
++
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/gracl_shm.c linux-2.6.8.grsecurity/grsecurity/gracl_shm.c
+--- linux-2.6.8/grsecurity/gracl_shm.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/gracl_shm.c      2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,36 @@
++/* shared memory handling routines, (c) Brad Spengler 2002, 2003 */
++
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/sched.h>
++#include <linux/file.h>
++#include <linux/ipc.h>
++#include <linux/gracl.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++int
++gr_handle_shmat(const pid_t shm_cprid, const pid_t shm_lapid,
++              const time_t shm_createtime, const uid_t cuid, const int shmid)
++{
++      struct task_struct *task;
++
++      if (!gr_acl_is_enabled())
++              return 1;
++
++      task = find_task_by_pid(shm_cprid);
++
++      if (unlikely(!task))
++              task = find_task_by_pid(shm_lapid);
++
++      if (unlikely(task && ((task->start_time < shm_createtime) ||
++                            (task->pid == shm_lapid)) &&
++                   (task->acl->mode & GR_PROTSHM) &&
++                   (task->acl != current->acl))) {
++              security_alert(GR_SHMAT_ACL_MSG, cuid, shm_cprid, shmid,
++                             DEFAULTSECARGS);
++              return 0;
++      }
++
++      return 1;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_chdir.c linux-2.6.8.grsecurity/grsecurity/grsec_chdir.c
+--- linux-2.6.8/grsecurity/grsec_chdir.c       1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_chdir.c    2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,20 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/fs.h>
++#include <linux/file.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++void
++gr_log_chdir(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_CHDIR
++      if ((grsec_enable_chdir && grsec_enable_group &&
++           in_group_p(grsec_audit_gid)) || (grsec_enable_chdir &&
++                                            !grsec_enable_group)) {
++              security_audit(GR_CHDIR_AUDIT_MSG, gr_to_filename(dentry, mnt),
++                             DEFAULTSECARGS);
++      }
++#endif
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_chroot.c linux-2.6.8.grsecurity/grsecurity/grsec_chroot.c
+--- linux-2.6.8/grsecurity/grsec_chroot.c      1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_chroot.c   2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,362 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/sched.h>
++#include <linux/file.h>
++#include <linux/fs.h>
++#include <linux/mount.h>
++#include <linux/types.h>
++#include <linux/grinternal.h>
++
++int
++gr_handle_chroot_unix(const pid_t pid)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_UNIX
++      struct pid *spid = NULL;
++
++      if (unlikely(!grsec_enable_chroot_unix))
++              return 1;
++
++      if (likely(!proc_is_chrooted(current)))
++              return 1;
++
++      read_lock(&tasklist_lock);
++
++      spid = find_pid(PIDTYPE_PID, pid);
++      if (spid) {
++              struct task_struct *p;
++              p = pid_task(spid->task_list.next, PIDTYPE_PID);
++              task_lock(p);
++              if (unlikely(!have_same_root(current, p))) {
++                      task_unlock(p);
++                      read_unlock(&tasklist_lock);
++                      security_alert(GR_UNIX_CHROOT_MSG, DEFAULTSECARGS);
++                      return 0;
++              }
++              task_unlock(p);
++      }
++      read_unlock(&tasklist_lock);
++#endif
++      return 1;
++}
++
++int
++gr_handle_chroot_nice(void)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_NICE
++      if (grsec_enable_chroot_nice && proc_is_chrooted(current)) {
++              security_alert(GR_NICE_CHROOT_MSG, DEFAULTSECARGS);
++              return -EPERM;
++      }
++#endif
++      return 0;
++}
++
++int
++gr_handle_chroot_setpriority(struct task_struct *p, const int niceval)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_NICE
++      if (grsec_enable_chroot_nice && (niceval < task_nice(p))
++                      && proc_is_chrooted(current)) {
++              security_alert(GR_PRIORITY_CHROOT_MSG, p->comm, p->pid,
++                             DEFAULTSECARGS);
++              return -EACCES;
++      }
++#endif
++      return 0;
++}
++
++int
++gr_handle_chroot_capset(struct task_struct *target)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_CAPS
++      if (!grsec_enable_chroot_caps || !proc_is_chrooted(current))
++              return 0;
++
++      task_lock(target);
++      if (!have_same_root(current, target)) {
++              task_unlock(target);
++              security_alert(GR_CAPSET_CHROOT_MSG, target->comm, target->pid,
++                             DEFAULTSECARGS);
++              return 1;
++      }
++      task_unlock(target);
++#endif
++      return 0;
++}
++
++int
++gr_handle_chroot_rawio(const struct inode *inode)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_CAPS
++      if (grsec_enable_chroot_caps && proc_is_chrooted(current) && 
++          inode && S_ISBLK(inode->i_mode) && !capable(CAP_SYS_RAWIO))
++              return 1;
++#endif
++      return 0;
++}
++
++int
++gr_pid_is_chrooted(struct task_struct *p)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_FINDTASK
++      if (!grsec_enable_chroot_findtask || !current->fs || 
++          !proc_is_chrooted(current) || !p)
++              return 0;
++
++      task_lock(p);
++      if (p->fs && !have_same_root(current, p)) {
++              task_unlock(p);
++              return 1;
++      }
++      task_unlock(p);
++#endif
++      return 0;
++}
++
++EXPORT_SYMBOL(gr_pid_is_chrooted);
++
++#if defined(CONFIG_GRKERNSEC_CHROOT_DOUBLE) || defined(CONFIG_GRKERNSEC_CHROOT_FCHDIR)
++int gr_is_outside_chroot(const struct dentry *u_dentry, const struct vfsmount *u_mnt)
++{
++      struct dentry *dentry = (struct dentry *)u_dentry;
++      struct vfsmount *mnt = (struct vfsmount *)u_mnt;
++      struct dentry *realroot;
++      struct vfsmount *realrootmnt;
++      struct dentry *currentroot;
++      struct vfsmount *currentmnt;
++
++      read_lock(&child_reaper->fs->lock);
++      realrootmnt = mntget(child_reaper->fs->rootmnt);
++      realroot = dget(child_reaper->fs->root);
++      read_unlock(&child_reaper->fs->lock);
++
++      read_lock(&current->fs->lock);
++      currentmnt = mntget(current->fs->rootmnt);
++      currentroot = dget(current->fs->root);
++      read_unlock(&current->fs->lock);
++
++      spin_lock(&dcache_lock);
++      for (;;) {
++              if (unlikely((dentry == realroot && mnt == realrootmnt)
++                   || (dentry == currentroot && mnt == currentmnt)))
++                      break;
++              if (unlikely(dentry == mnt->mnt_root || IS_ROOT(dentry))) {
++                      if (mnt->mnt_parent == mnt)
++                              break;
++                      dentry = mnt->mnt_mountpoint;
++                      mnt = mnt->mnt_parent;
++                      continue;
++              }
++              dentry = dentry->d_parent;
++      }
++      spin_unlock(&dcache_lock);
++
++      dput(currentroot);
++      mntput(currentmnt);
++
++      if (dentry == realroot && mnt == realrootmnt) {
++              /* access is outside of chroot */
++              dput(realroot);
++              mntput(realrootmnt);
++              return 0;
++      }
++
++      dput(realroot);
++      mntput(realrootmnt);
++      return 1;
++}
++#endif
++
++int
++gr_chroot_fchdir(struct dentry *u_dentry, struct vfsmount *u_mnt)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_FCHDIR
++      if (!grsec_enable_chroot_fchdir)
++              return 1;
++
++      if (!proc_is_chrooted(current))
++              return 1;
++      else if (!gr_is_outside_chroot(u_dentry, u_mnt)) {
++              security_alert(GR_CHROOT_FCHDIR_MSG,
++                             gr_to_filename(u_dentry, u_mnt),
++                             DEFAULTSECARGS);
++              return 0;
++      }
++#endif
++      return 1;
++}
++
++int
++gr_chroot_shmat(const pid_t shm_cprid, const pid_t shm_lapid,
++              const time_t shm_createtime)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_SHMAT
++      struct pid *pid = NULL;
++      u64 starttime64;
++      time_t starttime;
++
++      if (unlikely(!grsec_enable_chroot_shmat))
++              return 1;
++
++      if (likely(!proc_is_chrooted(current)))
++              return 1;
++
++      read_lock(&tasklist_lock);
++
++      pid = find_pid(PIDTYPE_PID, shm_cprid);
++      if (pid) {
++              struct task_struct *p;
++              p = pid_task(pid->task_list.next, PIDTYPE_PID);
++              task_lock(p);
++              starttime64 = p->start_time;
++              do_div(starttime64, HZ);
++              starttime = (time_t) starttime64;
++              if (unlikely(!have_same_root(current, p) &&
++                           time_before((unsigned long)starttime, (unsigned long)shm_createtime))) {
++                      task_unlock(p);
++                      read_unlock(&tasklist_lock);
++                      security_alert(GR_SHMAT_CHROOT_MSG, DEFAULTSECARGS);
++                      return 0;
++              }
++              task_unlock(p);
++      } else {
++              pid = find_pid(PIDTYPE_PID, shm_lapid);
++              if (pid) {
++                      struct task_struct *p;
++                      p = pid_task(pid->task_list.next, PIDTYPE_PID);
++                      task_lock(p);
++                      if (unlikely(!have_same_root(current, p))) {
++                              task_unlock(p);
++                              read_unlock(&tasklist_lock);
++                              security_alert(GR_SHMAT_CHROOT_MSG, DEFAULTSECARGS);
++                              return 0;
++                      }
++                      task_unlock(p);
++              }
++      }
++
++      read_unlock(&tasklist_lock);
++#endif
++      return 1;
++}
++
++void
++gr_log_chroot_exec(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_EXECLOG
++      if (grsec_enable_chroot_execlog && proc_is_chrooted(current))
++              security_audit(GR_EXEC_CHROOT_MSG, gr_to_filename(dentry, mnt),
++                             DEFAULTSECARGS);
++#endif
++      return;
++}
++
++int
++gr_handle_chroot_mknod(const struct dentry *dentry,
++                     const struct vfsmount *mnt, const int mode)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_MKNOD
++      if (grsec_enable_chroot_mknod && !S_ISFIFO(mode) && !S_ISREG(mode) && 
++          proc_is_chrooted(current)) {
++              security_alert(GR_MKNOD_CHROOT_MSG,
++                             gr_to_filename(dentry, mnt), DEFAULTSECARGS);
++              return -EPERM;
++      }
++#endif
++      return 0;
++}
++
++int
++gr_handle_chroot_mount(const struct dentry *dentry,
++                     const struct vfsmount *mnt, const char *dev_name)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_MOUNT
++      if (grsec_enable_chroot_mount && proc_is_chrooted(current)) {
++              security_alert(GR_MOUNT_CHROOT_MSG, dev_name,
++                             gr_to_filename(dentry, mnt), DEFAULTSECARGS);
++              return -EPERM;
++      }
++#endif
++      return 0;
++}
++
++int
++gr_handle_chroot_pivot(void)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_PIVOT
++      if (grsec_enable_chroot_pivot && proc_is_chrooted(current)) {
++              security_alert(GR_PIVOT_CHROOT_MSG, DEFAULTSECARGS);
++              return -EPERM;
++      }
++#endif
++      return 0;
++}
++
++int
++gr_handle_chroot_chroot(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_DOUBLE
++      if (grsec_enable_chroot_double && proc_is_chrooted(current) &&
++          !gr_is_outside_chroot(dentry, mnt)) {
++              security_alert(GR_CHROOT_CHROOT_MSG,
++                             gr_to_filename(dentry, mnt), DEFAULTSECARGS);
++              return -EPERM;
++      }
++#endif
++      return 0;
++}
++
++void
++gr_handle_chroot_caps(struct task_struct *task)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_CAPS
++      if (grsec_enable_chroot_caps && proc_is_chrooted(task)) {
++              task->cap_permitted =
++                  cap_drop(task->cap_permitted, GR_CHROOT_CAPS);
++              task->cap_inheritable =
++                  cap_drop(task->cap_inheritable, GR_CHROOT_CAPS);
++              task->cap_effective =
++                  cap_drop(task->cap_effective, GR_CHROOT_CAPS);
++      }
++#endif
++      return;
++}
++
++EXPORT_SYMBOL(gr_handle_chroot_caps);
++
++int
++gr_handle_chroot_sysctl(const int op)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_SYSCTL
++      if (grsec_enable_chroot_sysctl && proc_is_chrooted(current)
++          && (op & 002))
++              return -EACCES;
++#endif
++      return 0;
++}
++
++void
++gr_handle_chroot_chdir(struct dentry *dentry, struct vfsmount *mnt)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_CHDIR
++      if (grsec_enable_chroot_chdir)
++              set_fs_pwd(current->fs, mnt, dentry);
++#endif
++      return;
++}
++
++int
++gr_handle_chroot_chmod(const struct dentry *dentry,
++                     const struct vfsmount *mnt, const int mode)
++{
++#ifdef CONFIG_GRKERNSEC_CHROOT_CHMOD
++      if (grsec_enable_chroot_chmod &&
++          ((mode & S_ISUID) || ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP))) &&
++          proc_is_chrooted(current)) {
++              security_alert(GR_CHMOD_CHROOT_MSG,
++                             gr_to_filename(dentry, mnt), DEFAULTSECARGS);
++              return -EPERM;
++      }
++#endif
++      return 0;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_disabled.c linux-2.6.8.grsecurity/grsecurity/grsec_disabled.c
+--- linux-2.6.8/grsecurity/grsec_disabled.c    1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_disabled.c 2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,415 @@
++/* 
++ * when grsecurity is disabled, compile all external functions into nothing
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/config.h>
++#include <linux/sched.h>
++#include <linux/file.h>
++#include <linux/fs.h>
++#include <linux/kdev_t.h>
++#include <linux/net.h>
++#include <linux/in.h>
++#include <linux/ip.h>
++#include <linux/skbuff.h>
++#include <linux/sysctl.h>
++
++#ifdef CONFIG_PAX_HAVE_ACL_FLAGS
++__inline__ void
++pax_set_flags(struct linux_binprm *bprm)
++{
++      return;
++}
++#endif
++
++#ifdef CONFIG_SYSCTL
++__inline__ __u32
++gr_handle_sysctl(const struct ctl_table * table, __u32 mode)
++{
++      return mode;
++}
++#endif
++
++__inline__ int
++gr_acl_is_enabled(void)
++{
++      return 0;
++}
++
++__inline__ int
++gr_handle_rawio(const struct inode *inode)
++{
++      return 0;
++}
++
++__inline__ void
++gr_acl_handle_psacct(struct task_struct *task, const long code)
++{
++      return;
++}
++
++__inline__ int
++gr_handle_mmap(const struct file *filp, const unsigned long prot)
++{
++      return 0;
++}
++
++__inline__ int
++gr_handle_ptrace(struct task_struct *task, const long request)
++{
++      return 0;
++}
++
++__inline__ int
++gr_handle_proc_ptrace(struct task_struct *task)
++{
++      return 0;
++}
++
++__inline__ void
++gr_learn_resource(const struct task_struct *task,
++                const int res, const unsigned long wanted, const int gt)
++{
++      return;
++}
++
++__inline__ int
++gr_set_acls(const int type)
++{
++      return 0;
++}
++
++__inline__ int
++gr_check_hidden_task(const struct task_struct *tsk)
++{
++      return 0;
++}
++
++__inline__ int
++gr_check_protected_task(const struct task_struct *task)
++{
++      return 0;
++}
++
++__inline__ void
++gr_copy_label(struct task_struct *tsk)
++{
++      return;
++}
++
++__inline__ void
++gr_set_pax_flags(struct task_struct *task)
++{
++      return;
++}
++
++__inline__ int
++gr_set_proc_label(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      return 0;
++}
++
++__inline__ void
++gr_handle_delete(const ino_t ino, const dev_t dev)
++{
++      return;
++}
++
++__inline__ void
++gr_handle_create(const struct dentry *dentry, const struct vfsmount *mnt)
++{
++      return;
++}
++
++__inline__ void
++gr_handle_crash(struct task_struct *task, const int sig)
++{
++      return;
++}
++
++__inline__ int
++gr_check_crash_exec(const struct file *filp)
++{
++      return 0;
++}
++
++__inline__ int
++gr_check_crash_uid(const uid_t uid)
++{
++      return 0;
++}
++
++__inline__ void
++gr_handle_rename(struct inode *old_dir, struct inode *new_dir,
++               struct dentry *old_dentry,
++               struct dentry *new_dentry,
++               struct vfsmount *mnt, const __u8 replace)
++{
++      return;
++}
++
++__inline__ int
++gr_search_socket(const int family, const int type, const int protocol)
++{
++      return 1;
++}
++
++__inline__ int
++gr_search_connectbind(const int mode, const struct socket *sock,
++                    const struct sockaddr_in *addr)
++{
++      return 1;
++}
++
++__inline__ int
++gr_task_is_capable(struct task_struct *task, const int cap)
++{
++      return 1;
++}
++
++__inline__ int
++gr_is_capable_nolog(const int cap)
++{
++      return 1;
++}
++
++__inline__ void
++gr_handle_alertkill(void)
++{
++      return;
++}
++
++__inline__ __u32
++gr_acl_handle_execve(const struct dentry * dentry, const struct vfsmount * mnt)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_hidden_file(const struct dentry * dentry,
++                        const struct vfsmount * mnt)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_open(const struct dentry * dentry, const struct vfsmount * mnt,
++                 const int fmode)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_rmdir(const struct dentry * dentry, const struct vfsmount * mnt)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_unlink(const struct dentry * dentry, const struct vfsmount * mnt)
++{
++      return 1;
++}
++
++__inline__ int
++gr_acl_handle_mmap(const struct file *file, const unsigned long prot,
++                 unsigned int *vm_flags)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_truncate(const struct dentry * dentry,
++                     const struct vfsmount * mnt)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_utime(const struct dentry * dentry, const struct vfsmount * mnt)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_access(const struct dentry * dentry,
++                   const struct vfsmount * mnt, const int fmode)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_fchmod(const struct dentry * dentry, const struct vfsmount * mnt,
++                   mode_t mode)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_chmod(const struct dentry * dentry, const struct vfsmount * mnt,
++                  mode_t mode)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_chown(const struct dentry * dentry, const struct vfsmount * mnt)
++{
++      return 1;
++}
++
++__inline__ void
++grsecurity_init(void)
++{
++      return;
++}
++
++__inline__ __u32
++gr_acl_handle_mknod(const struct dentry * new_dentry,
++                  const struct dentry * parent_dentry,
++                  const struct vfsmount * parent_mnt,
++                  const int mode)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_mkdir(const struct dentry * new_dentry,
++                  const struct dentry * parent_dentry,
++                  const struct vfsmount * parent_mnt)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_symlink(const struct dentry * new_dentry,
++                    const struct dentry * parent_dentry,
++                    const struct vfsmount * parent_mnt, const char *from)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_link(const struct dentry * new_dentry,
++                 const struct dentry * parent_dentry,
++                 const struct vfsmount * parent_mnt,
++                 const struct dentry * old_dentry,
++                 const struct vfsmount * old_mnt, const char *to)
++{
++      return 1;
++}
++
++__inline__ int
++gr_acl_handle_rename(const struct dentry *new_dentry,
++                   const struct dentry *parent_dentry,
++                   const struct vfsmount *parent_mnt,
++                   const struct dentry *old_dentry,
++                   const struct inode *old_parent_inode,
++                   const struct vfsmount *old_mnt, const char *newname)
++{
++      return 0;
++}
++
++__inline__ __u32
++gr_acl_handle_filldir(const struct dentry * dentry,
++                    const struct vfsmount * mnt, const ino_t ino)
++{
++      return 1;
++}
++
++__inline__ int
++gr_handle_shmat(const pid_t shm_cprid, const pid_t shm_lapid,
++              const time_t shm_createtime, const uid_t cuid, const int shmid)
++{
++      return 1;
++}
++
++__inline__ int
++gr_search_bind(const struct socket *sock, const struct sockaddr_in *addr)
++{
++      return 1;
++}
++
++__inline__ int
++gr_search_connect(const struct socket *sock, const struct sockaddr_in *addr)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_unix(const struct dentry * dentry, const struct vfsmount * mnt)
++{
++      return 1;
++}
++
++__inline__ __u32
++gr_acl_handle_creat(const struct dentry * dentry,
++                  const struct dentry * p_dentry,
++                  const struct vfsmount * p_mnt, const int fmode,
++                  const int imode)
++{
++      return 1;
++}
++
++__inline__ void
++gr_acl_handle_exit(void)
++{
++      return;
++}
++
++__inline__ int
++gr_acl_handle_mprotect(const struct file *file, const unsigned long prot)
++{
++      return 1;
++}
++
++__inline__ void
++gr_set_role_label(const uid_t uid, const gid_t gid)
++{
++      return;
++}
++
++__inline__ int
++gr_acl_handle_procpidmem(const struct task_struct *task)
++{
++      return 0;
++}
++
++__inline__ int
++gr_search_udp_recvmsg(const struct sock *sk, const struct sk_buff *skb)
++{
++      return 1;
++}
++
++__inline__ int
++gr_search_udp_sendmsg(const struct sock *sk, const struct sockaddr_in *addr)
++{
++      return 1;
++}
++
++__inline__ void
++gr_set_kernel_label(struct task_struct *task)
++{
++      return;
++}
++
++__inline__ int
++gr_check_user_change(int real, int effective, int fs)
++{
++      return 0;
++}
++
++__inline__ int
++gr_check_group_change(int real, int effective, int fs)
++{
++      return 0;
++}
++
++
++EXPORT_SYMBOL(gr_check_user_change);
++EXPORT_SYMBOL(gr_check_group_change);
++EXPORT_SYMBOL(gr_task_is_capable);
++EXPORT_SYMBOL(gr_learn_resource);
++EXPORT_SYMBOL(gr_set_kernel_label);
++
+diff -uNr linux-2.6.8/grsecurity/grsec_exec.c linux-2.6.8.grsecurity/grsecurity/grsec_exec.c
+--- linux-2.6.8/grsecurity/grsec_exec.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_exec.c     2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,71 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/file.h>
++#include <linux/binfmts.h>
++#include <linux/fs.h>
++#include <linux/types.h>
++#include <linux/grdefs.h>
++#include <linux/grinternal.h>
++#include <linux/capability.h>
++
++#include <asm/uaccess.h>
++
++int
++gr_handle_nproc(void)
++{
++#ifdef CONFIG_GRKERNSEC_EXECVE
++      if (grsec_enable_execve && current->user &&
++          (atomic_read(&current->user->processes) >
++           current->rlim[RLIMIT_NPROC].rlim_cur) &&
++          !capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE)) {
++              security_alert(GR_NPROC_MSG, DEFAULTSECARGS);
++              return -EAGAIN;
++      }
++#endif
++      return 0;
++}
++
++void
++gr_handle_exec_args(struct linux_binprm *bprm, char **argv)
++{
++#ifdef CONFIG_GRKERNSEC_EXECLOG
++      char grarg[64] = { 0 };
++      __u8 execlen = 0;
++      unsigned int i;
++
++      if (!((grsec_enable_execlog && grsec_enable_group &&
++             in_group_p(grsec_audit_gid))
++            || (grsec_enable_execlog && !grsec_enable_group)))
++              return;
++
++      if (unlikely(!argv))
++              goto log;
++
++      for (i = 0; i < bprm->argc && execlen < 62; i++) {
++              char *p;
++              __u8 len;
++
++              if (get_user(p, argv + i))
++                      goto log;
++              if (!p)
++                      goto log;
++              len = strnlen_user(p, 62 - execlen);
++              if (len > 62 - execlen)
++                      len = 62 - execlen;
++              else if (len > 0)
++                      len--;
++              if (copy_from_user(grarg + execlen, p, len))
++                      goto log;
++              execlen += len;
++              *(grarg + execlen) = ' ';
++              *(grarg + execlen + 1) = '\0';
++              execlen++;
++      }
++
++      log:
++      security_audit(GR_EXEC_AUDIT_MSG, gr_to_filename(bprm->file->f_dentry,
++                                                       bprm->file->f_vfsmnt),
++                     grarg, DEFAULTSECARGS);
++#endif
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_fifo.c linux-2.6.8.grsecurity/grsecurity/grsec_fifo.c
+--- linux-2.6.8/grsecurity/grsec_fifo.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_fifo.c     2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,24 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/fs.h>
++#include <linux/file.h>
++#include <linux/grinternal.h>
++
++int
++gr_handle_fifo(const struct dentry *dentry, const struct vfsmount *mnt,
++             const struct dentry *dir, const int flag, const int acc_mode)
++{
++#ifdef CONFIG_GRKERNSEC_FIFO
++      if (grsec_enable_fifo && S_ISFIFO(dentry->d_inode->i_mode) &&
++          !(flag & O_EXCL) && (dir->d_inode->i_mode & S_ISVTX) &&
++          (dentry->d_inode->i_uid != dir->d_inode->i_uid) &&
++          (current->fsuid != dentry->d_inode->i_uid)) {
++              if (!vfs_permission(dentry->d_inode, acc_mode))
++                      security_alert(GR_FIFO_MSG, gr_to_filename(dentry, mnt),
++                                     dentry->d_inode->i_uid,
++                                     dentry->d_inode->i_gid, DEFAULTSECARGS);
++              return -EACCES;
++      }
++#endif
++      return 0;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_fork.c linux-2.6.8.grsecurity/grsecurity/grsec_fork.c
+--- linux-2.6.8/grsecurity/grsec_fork.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_fork.c     2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,14 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++void
++gr_log_forkfail(const int retval)
++{
++#ifdef CONFIG_GRKERNSEC_FORKFAIL
++      if (grsec_enable_forkfail)
++              security_alert(GR_FAILFORK_MSG, retval, DEFAULTSECARGS);
++#endif
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_init.c linux-2.6.8.grsecurity/grsecurity/grsec_init.c
+--- linux-2.6.8/grsecurity/grsec_init.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_init.c     2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,225 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++#include <linux/smp_lock.h>
++#include <linux/gracl.h>
++#include <linux/slab.h>
++#include <linux/vmalloc.h>
++#include <linux/percpu.h>
++
++int grsec_enable_link;
++int grsec_enable_dmesg;
++int grsec_enable_fifo;
++int grsec_enable_execve;
++int grsec_enable_execlog;
++int grsec_enable_signal;
++int grsec_enable_forkfail;
++int grsec_enable_time;
++int grsec_enable_audit_textrel;
++int grsec_enable_group;
++int grsec_audit_gid;
++int grsec_enable_chdir;
++int grsec_enable_audit_ipc;
++int grsec_enable_mount;
++int grsec_enable_chroot_findtask;
++int grsec_enable_chroot_mount;
++int grsec_enable_chroot_shmat;
++int grsec_enable_chroot_fchdir;
++int grsec_enable_chroot_double;
++int grsec_enable_chroot_pivot;
++int grsec_enable_chroot_chdir;
++int grsec_enable_chroot_chmod;
++int grsec_enable_chroot_mknod;
++int grsec_enable_chroot_nice;
++int grsec_enable_chroot_execlog;
++int grsec_enable_chroot_caps;
++int grsec_enable_chroot_sysctl;
++int grsec_enable_chroot_unix;
++int grsec_enable_tpe;
++int grsec_tpe_gid;
++int grsec_enable_tpe_all;
++int grsec_enable_randpid;
++int grsec_enable_randid;
++int grsec_enable_randisn;
++int grsec_enable_randsrc;
++int grsec_enable_randrpc;
++int grsec_enable_socket_all;
++int grsec_socket_all_gid;
++int grsec_enable_socket_client;
++int grsec_socket_client_gid;
++int grsec_enable_socket_server;
++int grsec_socket_server_gid;
++int grsec_lock;
++
++spinlock_t grsec_alert_lock = SPIN_LOCK_UNLOCKED;
++unsigned long grsec_alert_wtime = 0;
++unsigned long grsec_alert_fyet = 0;
++
++spinlock_t grsec_audit_lock = SPIN_LOCK_UNLOCKED;
++
++rwlock_t grsec_exec_file_lock = RW_LOCK_UNLOCKED;
++
++char *gr_shared_page[4];
++extern struct gr_arg *gr_usermode;
++extern unsigned char *gr_system_salt;
++extern unsigned char *gr_system_sum;
++extern struct task_struct **gr_conn_table;
++extern const unsigned int gr_conn_table_size;
++
++void
++grsecurity_init(void)
++{
++      int j;
++      /* create the per-cpu shared pages */
++
++      preempt_disable();
++      for (j = 0; j < 4; j++) {
++              gr_shared_page[j] = (char *)__alloc_percpu(PAGE_SIZE, __alignof__(char *));
++              if (gr_shared_page[j] == NULL) {
++                      panic("Unable to allocate grsecurity shared page");
++                      return;
++              }
++      }
++      preempt_enable();
++
++      /* create hash tables for ip tagging */
++
++      gr_conn_table = (struct task_struct **) vmalloc(gr_conn_table_size * sizeof(struct task_struct *));
++      if (gr_conn_table == NULL) {
++              panic("Unable to allocate grsecurity IP tagging table");
++              return;
++      }
++      memset(gr_conn_table, 0, gr_conn_table_size * sizeof(struct task_struct *));
++
++      /* allocate memory for authentication structure */
++      gr_usermode = kmalloc(sizeof(struct gr_arg), GFP_KERNEL);
++      gr_system_salt = kmalloc(GR_SALT_LEN, GFP_KERNEL);
++      gr_system_sum = kmalloc(GR_SHA_LEN, GFP_KERNEL);
++
++      if (!gr_usermode || !gr_system_salt || !gr_system_sum) {
++              panic("Unable to allocate grsecurity authentication structure");
++              return;
++      }
++
++#ifndef CONFIG_GRKERNSEC_SYSCTL
++      grsec_lock = 1;
++#ifdef CONFIG_GRKERNSEC_AUDIT_TEXTREL
++      grsec_enable_audit_textrel = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_AUDIT_GROUP
++      grsec_enable_group = 1;
++      grsec_audit_gid = CONFIG_GRKERNSEC_AUDIT_GID;
++#endif
++#ifdef CONFIG_GRKERNSEC_AUDIT_CHDIR
++      grsec_enable_chdir = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
++      grsec_enable_audit_ipc = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_AUDIT_MOUNT
++      grsec_enable_mount = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_LINK
++      grsec_enable_link = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_DMESG
++      grsec_enable_dmesg = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_FIFO
++      grsec_enable_fifo = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_EXECVE
++      grsec_enable_execve = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_EXECLOG
++      grsec_enable_execlog = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_SIGNAL
++      grsec_enable_signal = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_FORKFAIL
++      grsec_enable_forkfail = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_TIME
++      grsec_enable_time = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_FINDTASK
++      grsec_enable_chroot_findtask = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_UNIX
++      grsec_enable_chroot_unix = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_MOUNT
++      grsec_enable_chroot_mount = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_FCHDIR
++      grsec_enable_chroot_fchdir = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_SHMAT
++      grsec_enable_chroot_shmat = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_DOUBLE
++      grsec_enable_chroot_double = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_PIVOT
++      grsec_enable_chroot_pivot = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_CHDIR
++      grsec_enable_chroot_chdir = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_CHMOD
++      grsec_enable_chroot_chmod = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_MKNOD
++      grsec_enable_chroot_mknod = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_NICE
++      grsec_enable_chroot_nice = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_EXECLOG
++      grsec_enable_chroot_execlog = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_CAPS
++      grsec_enable_chroot_caps = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_SYSCTL
++      grsec_enable_chroot_sysctl = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_TPE
++      grsec_enable_tpe = 1;
++      grsec_tpe_gid = CONFIG_GRKERNSEC_TPE_GID;
++#ifdef CONFIG_GRKERNSEC_TPE_ALL
++      grsec_enable_tpe_all = 1;
++#endif
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDPID
++      grsec_enable_randpid = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDID
++      grsec_enable_randid = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDISN
++      grsec_enable_randisn = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDSRC
++      grsec_enable_randsrc = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDRPC
++      grsec_enable_randrpc = 1;
++#endif
++#ifdef CONFIG_GRKERNSEC_SOCKET_ALL
++      grsec_enable_socket_all = 1;
++      grsec_socket_all_gid = CONFIG_GRKERNSEC_SOCKET_ALL_GID;
++#endif
++#ifdef CONFIG_GRKERNSEC_SOCKET_CLIENT
++      grsec_enable_socket_client = 1;
++      grsec_socket_client_gid = CONFIG_GRKERNSEC_SOCKET_CLIENT_GID;
++#endif
++#ifdef CONFIG_GRKERNSEC_SOCKET_SERVER
++      grsec_enable_socket_server = 1;
++      grsec_socket_server_gid = CONFIG_GRKERNSEC_SOCKET_SERVER_GID;
++#endif
++#endif
++
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_ipc.c linux-2.6.8.grsecurity/grsecurity/grsec_ipc.c
+--- linux-2.6.8/grsecurity/grsec_ipc.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_ipc.c      2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,81 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/ipc.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++void
++gr_log_msgget(const int ret, const int msgflg)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
++      if (((grsec_enable_group && in_group_p(grsec_audit_gid) &&
++            grsec_enable_audit_ipc) || (grsec_enable_audit_ipc &&
++                                        !grsec_enable_group)) && (ret >= 0)
++          && (msgflg & IPC_CREAT))
++              security_audit(GR_MSGQ_AUDIT_MSG, DEFAULTSECARGS);
++#endif
++      return;
++}
++
++void
++gr_log_msgrm(const uid_t uid, const uid_t cuid)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
++      if ((grsec_enable_group && in_group_p(grsec_audit_gid) &&
++           grsec_enable_audit_ipc) ||
++          (grsec_enable_audit_ipc && !grsec_enable_group))
++              security_audit(GR_MSGQR_AUDIT_MSG, uid, cuid, DEFAULTSECARGS);
++#endif
++      return;
++}
++
++void
++gr_log_semget(const int err, const int semflg)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
++      if (((grsec_enable_group && in_group_p(grsec_audit_gid) &&
++            grsec_enable_audit_ipc) || (grsec_enable_audit_ipc &&
++                                        !grsec_enable_group)) && (err >= 0)
++          && (semflg & IPC_CREAT))
++              security_audit(GR_SEM_AUDIT_MSG, DEFAULTSECARGS);
++#endif
++      return;
++}
++
++void
++gr_log_semrm(const uid_t uid, const uid_t cuid)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
++      if ((grsec_enable_group && in_group_p(grsec_audit_gid) &&
++           grsec_enable_audit_ipc) ||
++          (grsec_enable_audit_ipc && !grsec_enable_group))
++              security_audit(GR_SEMR_AUDIT_MSG, uid, cuid, DEFAULTSECARGS);
++#endif
++      return;
++}
++
++void
++gr_log_shmget(const int err, const int shmflg, const size_t size)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
++      if (((grsec_enable_group && in_group_p(grsec_audit_gid) &&
++            grsec_enable_audit_ipc) || (grsec_enable_audit_ipc &&
++                                        !grsec_enable_group)) && (err >= 0)
++          && (shmflg & IPC_CREAT))
++              security_audit(GR_SHM_AUDIT_MSG, size, DEFAULTSECARGS);
++#endif
++      return;
++}
++
++void
++gr_log_shmrm(const uid_t uid, const uid_t cuid)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
++      if ((grsec_enable_group && in_group_p(grsec_audit_gid) &&
++           grsec_enable_audit_ipc) ||
++          (grsec_enable_audit_ipc && !grsec_enable_group))
++              security_audit(GR_SHMR_AUDIT_MSG, uid, cuid, DEFAULTSECARGS);
++#endif
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_link.c linux-2.6.8.grsecurity/grsecurity/grsec_link.c
+--- linux-2.6.8/grsecurity/grsec_link.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_link.c     2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,41 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/fs.h>
++#include <linux/file.h>
++#include <linux/grinternal.h>
++
++int
++gr_handle_follow_link(const struct inode *parent,
++                    const struct inode *inode,
++                    const struct dentry *dentry, const struct vfsmount *mnt)
++{
++#ifdef CONFIG_GRKERNSEC_LINK
++      if (grsec_enable_link && S_ISLNK(inode->i_mode) &&
++          (parent->i_mode & S_ISVTX) && (parent->i_uid != inode->i_uid) &&
++          (parent->i_mode & S_IWOTH) && (current->fsuid != inode->i_uid)) {
++              security_alert(GR_SYMLINK_MSG, gr_to_filename(dentry, mnt),
++                             inode->i_uid, inode->i_gid, DEFAULTSECARGS);
++              return -EACCES;
++      }
++#endif
++      return 0;
++}
++
++int
++gr_handle_hardlink(const struct dentry *dentry,
++                 const struct vfsmount *mnt,
++                 struct inode *inode, const int mode, const char *to)
++{
++#ifdef CONFIG_GRKERNSEC_LINK
++      if (grsec_enable_link && current->fsuid != inode->i_uid &&
++          (!S_ISREG(mode) || (mode & S_ISUID) ||
++           ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) ||
++           (vfs_permission(inode, MAY_READ | MAY_WRITE))) &&
++          !capable(CAP_FOWNER) && current->uid) {
++              security_alert(GR_HARDLINK_MSG, gr_to_filename(dentry, mnt),
++                             inode->i_uid, inode->i_gid, to, DEFAULTSECARGS);
++              return -EPERM;
++      }
++#endif
++      return 0;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_mem.c linux-2.6.8.grsecurity/grsecurity/grsec_mem.c
+--- linux-2.6.8/grsecurity/grsec_mem.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_mem.c      2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,62 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++#include <linux/mman.h>
++#include <linux/grinternal.h>
++
++void
++gr_handle_ioperm(void)
++{
++      security_alert(GR_IOPERM_MSG, DEFAULTSECARGS);
++      return;
++}
++
++void
++gr_handle_iopl(void)
++{
++      security_alert(GR_IOPL_MSG, DEFAULTSECARGS);
++      return;
++}
++
++void
++gr_handle_mem_write(void)
++{
++      security_alert(GR_MEM_WRITE_MSG, DEFAULTSECARGS);
++      return;
++}
++
++void
++gr_handle_kmem_write(void)
++{
++      security_alert(GR_KMEM_MSG, DEFAULTSECARGS);
++      return;
++}
++
++void
++gr_handle_open_port(void)
++{
++      security_alert(GR_PORT_OPEN_MSG, DEFAULTSECARGS);
++      return;
++}
++
++int
++gr_handle_mem_mmap(const unsigned long offset, struct vm_area_struct *vma)
++{
++      if (offset + vma->vm_end - vma->vm_start <= offset) {
++              security_alert(GR_MEM_MMAP_MSG, DEFAULTSECARGS);
++              return -EPERM;
++      }
++
++      if (offset < __pa(high_memory) && (vma->vm_flags & VM_WRITE)
++#ifdef CONFIG_X86
++          && !(offset == 0xf0000 && ((vma->vm_end - vma->vm_start) <= 0x10000))
++          && !(offset == 0xa0000 && ((vma->vm_end - vma->vm_start) <= 0x20000))
++#endif
++         ) {
++              security_alert(GR_MEM_MMAP_MSG, DEFAULTSECARGS);
++              return -EPERM;
++      } else if (offset < __pa(high_memory))
++              vma->vm_flags &= ~VM_MAYWRITE;
++
++      return 0;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_mount.c linux-2.6.8.grsecurity/grsecurity/grsec_mount.c
+--- linux-2.6.8/grsecurity/grsec_mount.c       1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_mount.c    2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,34 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++void
++gr_log_remount(const char *devname, const int retval)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_MOUNT
++      if (grsec_enable_mount && (retval >= 0))
++              security_audit(GR_REMOUNT_AUDIT_MSG, devname ? devname : "none", DEFAULTSECARGS);
++#endif
++      return;
++}
++
++void
++gr_log_unmount(const char *devname, const int retval)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_MOUNT
++      if (grsec_enable_mount && (retval >= 0))
++              security_audit(GR_UNMOUNT_AUDIT_MSG, devname ? devname : "none", DEFAULTSECARGS);
++#endif
++      return;
++}
++
++void
++gr_log_mount(const char *from, const char *to, const int retval)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_MOUNT
++      if (grsec_enable_mount && (retval >= 0))
++              security_audit(GR_MOUNT_AUDIT_MSG, from, to, DEFAULTSECARGS);
++#endif
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_rand.c linux-2.6.8.grsecurity/grsecurity/grsec_rand.c
+--- linux-2.6.8/grsecurity/grsec_rand.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_rand.c     2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,22 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/smp_lock.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++extern int pid_max;
++
++int
++gr_random_pid(void)
++{
++#ifdef CONFIG_GRKERNSEC_RANDPID
++      int pid;
++
++      if (grsec_enable_randpid && current->fs->root) {
++
++              pid = 1 + (get_random_long() % pid_max);
++              return pid;
++      }
++#endif
++      return 0;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_sig.c linux-2.6.8.grsecurity/grsecurity/grsec_sig.c
+--- linux-2.6.8/grsecurity/grsec_sig.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_sig.c      2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,73 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++void
++gr_log_signal(const int sig, const struct task_struct *t)
++{
++#ifdef CONFIG_GRKERNSEC_SIGNAL
++      if (grsec_enable_signal && ((sig == SIGSEGV) || (sig == SIGILL) ||
++                                  (sig == SIGABRT) || (sig == SIGBUS))) {
++              if (t->pid == current->pid) {
++                      security_alert_good(GR_UNISIGLOG_MSG, sig,
++                                          DEFAULTSECARGS);
++              } else {
++                      security_alert_good(GR_DUALSIGLOG_MSG, sig,
++                                          gr_task_fullpath0(t), t->comm,
++                                          t->pid, t->uid, t->euid, t->gid,
++                                          t->egid, gr_parent_task_fullpath0(t),
++                                          t->parent->comm,
++                                          t->parent->pid, t->parent->uid,
++                                          t->parent->euid, t->parent->gid,
++                                          t->parent->egid, DEFAULTSECARGS);
++              }
++      }
++#endif
++      return;
++}
++
++int
++gr_handle_signal(const struct task_struct *p, const int sig)
++{
++#ifdef CONFIG_GRKERNSEC
++      if (current->pid > 1 && gr_check_protected_task(p)) {
++              security_alert(GR_SIG_ACL_MSG, sig, gr_task_fullpath0(p),
++                             p->comm, p->pid, p->uid,
++                             p->euid, p->gid, p->egid,
++                             gr_parent_task_fullpath0(p), p->parent->comm,
++                             p->parent->pid, p->parent->uid,
++                             p->parent->euid, p->parent->gid,
++                             p->parent->egid, DEFAULTSECARGS);
++              return -EPERM;
++      } else if (gr_pid_is_chrooted((struct task_struct *)p)) {
++              return -EPERM;
++      }
++#endif
++      return 0;
++}
++
++void gr_handle_brute_attach(struct task_struct *p)
++{
++#ifdef CONFIG_GRKERNSEC_BRUTE
++      read_lock(&tasklist_lock);
++      read_lock(&grsec_exec_file_lock);
++      if (p->parent && p->parent->exec_file == p->exec_file)
++              p->parent->brute = 1;
++      read_unlock(&grsec_exec_file_lock);
++      read_unlock(&tasklist_lock);
++#endif
++      return;
++}
++
++void gr_handle_brute_check(void)
++{
++#ifdef CONFIG_GRKERNSEC_BRUTE
++      if (current->brute) {
++              set_current_state(TASK_UNINTERRUPTIBLE);
++              schedule_timeout(30 * HZ);
++      }
++#endif
++      return;
++}
++
+diff -uNr linux-2.6.8/grsecurity/grsec_sock.c linux-2.6.8.grsecurity/grsecurity/grsec_sock.c
+--- linux-2.6.8/grsecurity/grsec_sock.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_sock.c     2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,259 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/sched.h>
++#include <linux/file.h>
++#include <linux/net.h>
++#include <linux/in.h>
++#include <linux/ip.h>
++#include <net/sock.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++#include <linux/gracl.h>
++
++#if defined(CONFIG_IP_NF_MATCH_STEALTH_MODULE)
++extern struct sock *udp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport, int dif);
++EXPORT_SYMBOL(udp_v4_lookup);
++#endif
++#if defined(CONFIG_GRKERNSEC_RANDID)
++EXPORT_SYMBOL(ip_randomid);
++#endif
++#if defined(CONFIG_GRKERNSEC_RANDSRC) || defined(CONFIG_GRKERNSEC_RANDRPC)
++EXPORT_SYMBOL(get_random_long);
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDISN
++EXPORT_SYMBOL(ip_randomisn);
++EXPORT_SYMBOL(grsec_enable_randisn);
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDID
++EXPORT_SYMBOL(grsec_enable_randid);
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDSRC
++EXPORT_SYMBOL(grsec_enable_randsrc);
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDRPC
++EXPORT_SYMBOL(grsec_enable_randrpc);
++#endif
++
++EXPORT_SYMBOL(gr_cap_rtnetlink);
++
++extern int gr_search_udp_recvmsg(const struct sock *sk, const struct sk_buff *skb);
++extern int gr_search_udp_sendmsg(const struct sock *sk, const struct sockaddr_in *addr);
++
++EXPORT_SYMBOL(gr_search_udp_recvmsg);
++EXPORT_SYMBOL(gr_search_udp_sendmsg);
++
++#ifdef CONFIG_UNIX_MODULE
++EXPORT_SYMBOL(gr_acl_handle_unix);
++EXPORT_SYMBOL(gr_acl_handle_mknod);
++EXPORT_SYMBOL(gr_handle_chroot_unix);
++EXPORT_SYMBOL(gr_handle_create);
++#endif
++
++#ifdef CONFIG_GRKERNSEC
++struct task_struct **gr_conn_table;
++const unsigned int gr_conn_table_size = 65521;
++struct task_struct *deleted_conn = (struct task_struct *)~0;
++spinlock_t gr_conn_table_lock = SPIN_LOCK_UNLOCKED;
++
++extern __inline__ const char * gr_socktype_to_name(unsigned char type);
++extern __inline__ const char * gr_proto_to_name(unsigned char proto);
++
++static __inline__ int 
++conn_hash(__u32 saddr, __u32 daddr, __u16 sport, __u16 dport, unsigned int size)
++{
++      return ((daddr + saddr + (sport << 8) + (dport << 16)) % size);
++}
++
++static __inline__ int
++conn_match(const struct task_struct *task, __u32 saddr, __u32 daddr, 
++         __u16 sport, __u16 dport)
++{
++      if (unlikely(task != deleted_conn && task->gr_saddr == saddr && 
++                   task->gr_daddr == daddr && task->gr_sport == sport &&
++                   task->gr_dport == dport))
++              return 1;
++      else
++              return 0;
++}
++
++void gr_add_to_task_ip_table(struct task_struct *task)
++{
++      unsigned int index;
++
++      if (unlikely(gr_conn_table == NULL))
++              return;
++
++      if (!thread_group_leader(task))
++              task = task->group_leader;
++
++      index = conn_hash(task->gr_saddr, task->gr_daddr, 
++                        task->gr_sport, task->gr_dport, 
++                        gr_conn_table_size);
++
++      spin_lock(&gr_conn_table_lock);
++
++      while (gr_conn_table[index] && gr_conn_table[index] != deleted_conn) {
++              index = (index + 1) % gr_conn_table_size;
++      }
++
++      gr_conn_table[index] = task;
++
++      spin_unlock(&gr_conn_table_lock);
++
++      return;
++}
++
++void gr_del_task_from_ip_table_nolock(struct task_struct *task)
++{
++      unsigned int index;
++
++      if (unlikely(gr_conn_table == NULL))
++              return;
++
++      if (!thread_group_leader(task))
++              task = task->group_leader;
++
++      index = conn_hash(task->gr_saddr, task->gr_daddr, 
++                        task->gr_sport, task->gr_dport, 
++                        gr_conn_table_size);
++
++      while (gr_conn_table[index] && !conn_match(gr_conn_table[index], 
++              task->gr_saddr, task->gr_daddr, task->gr_sport, 
++              task->gr_dport)) {
++              index = (index + 1) % gr_conn_table_size;
++      }
++
++      if (gr_conn_table[index]) {
++              if (gr_conn_table[(index + 1) % gr_conn_table_size])
++                      gr_conn_table[index] = deleted_conn;
++              else
++                      gr_conn_table[index] = NULL;
++      }
++
++      return;
++}
++
++struct task_struct * gr_lookup_task_ip_table(__u32 saddr, __u32 daddr,
++                                           __u16 sport, __u16 dport)
++{
++      unsigned int index;
++
++      if (unlikely(gr_conn_table == NULL))
++              return NULL;
++
++      index = conn_hash(saddr, daddr, sport, dport, gr_conn_table_size);
++
++      while (gr_conn_table[index] && !conn_match(gr_conn_table[index], 
++              saddr, daddr, sport, dport)) {
++              index = (index + 1) % gr_conn_table_size;
++      }
++
++      return gr_conn_table[index];
++}
++
++#endif
++
++void gr_del_task_from_ip_table(struct task_struct *task)
++{
++#ifdef CONFIG_GRKERNSEC
++      spin_lock(&gr_conn_table_lock);
++      if (!thread_group_leader(task))
++              gr_del_task_from_ip_table_nolock(task->group_leader);
++      else
++              gr_del_task_from_ip_table_nolock(task);
++      spin_unlock(&gr_conn_table_lock);
++#endif
++      return;
++}
++
++void
++gr_attach_curr_ip(const struct sock *sk)
++{
++#ifdef CONFIG_GRKERNSEC
++      struct task_struct *p;
++      struct task_struct *set;
++      const struct inet_opt *inet = inet_sk(sk);      
++
++      if (unlikely(sk->sk_protocol != IPPROTO_TCP))
++              return;
++
++      set = current;
++      if (!thread_group_leader(set))
++              set = set->group_leader;
++
++      spin_lock(&gr_conn_table_lock);
++      p = gr_lookup_task_ip_table(inet->daddr, inet->rcv_saddr,
++                                  inet->dport, inet->sport);
++      if (unlikely(p != NULL)) {
++              set->curr_ip = p->curr_ip;
++              set->used_accept = 1;
++              gr_del_task_from_ip_table_nolock(p);
++              spin_unlock(&gr_conn_table_lock);
++              return;
++      }
++      spin_unlock(&gr_conn_table_lock);
++
++      set->curr_ip = inet->daddr;
++      set->used_accept = 1;
++#endif
++      return;
++}
++
++int
++gr_handle_sock_all(const int family, const int type, const int protocol)
++{
++#ifdef CONFIG_GRKERNSEC_SOCKET_ALL
++      if (grsec_enable_socket_all && in_group_p(grsec_socket_all_gid) &&
++          (family != AF_UNIX) && (family != AF_LOCAL)) {
++              security_alert(GR_SOCK2_MSG, family, gr_socktype_to_name(type), gr_proto_to_name(protocol),
++                             DEFAULTSECARGS);
++              return -EACCES;
++      }
++#endif
++      return 0;
++}
++
++int
++gr_handle_sock_server(const struct sockaddr *sck)
++{
++#ifdef CONFIG_GRKERNSEC_SOCKET_SERVER
++      if (grsec_enable_socket_server &&
++          in_group_p(grsec_socket_server_gid) &&
++          sck && (sck->sa_family != AF_UNIX) &&
++          (sck->sa_family != AF_LOCAL)) {
++              security_alert(GR_BIND_MSG, DEFAULTSECARGS);
++              return -EACCES;
++      }
++#endif
++      return 0;
++}
++
++int
++gr_handle_sock_client(const struct sockaddr *sck)
++{
++#ifdef CONFIG_GRKERNSEC_SOCKET_CLIENT
++      if (grsec_enable_socket_client && in_group_p(grsec_socket_client_gid) &&
++          sck && (sck->sa_family != AF_UNIX) &&
++          (sck->sa_family != AF_LOCAL)) {
++              security_alert(GR_CONNECT_MSG, DEFAULTSECARGS);
++              return -EACCES;
++      }
++#endif
++      return 0;
++}
++
++__u32
++gr_cap_rtnetlink(void)
++{
++#ifdef CONFIG_GRKERNSEC
++      if (!gr_acl_is_enabled())
++              return current->cap_effective;
++      else if (cap_raised(current->cap_effective, CAP_NET_ADMIN) &&
++               gr_task_is_capable(current, CAP_NET_ADMIN))
++              return current->cap_effective;
++      else
++              return 0;
++#else
++      return current->cap_effective;
++#endif
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_sysctl.c linux-2.6.8.grsecurity/grsecurity/grsec_sysctl.c
+--- linux-2.6.8/grsecurity/grsec_sysctl.c      1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_sysctl.c   2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,453 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/sysctl.h>
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++int
++gr_handle_sysctl_mod(const char *dirname, const char *name, const int op)
++{
++#ifdef CONFIG_GRKERNSEC_SYSCTL
++      if (!strcmp(dirname, "grsecurity") && grsec_lock && (op & 002)) {
++              security_alert(GR_SYSCTL_MSG, name, DEFAULTSECARGS);
++              return -EACCES;
++      }
++#endif
++      return 0;
++}
++
++#ifdef CONFIG_GRKERNSEC_SYSCTL
++enum {GS_LINK=1, GS_FIFO, GS_EXECVE, GS_EXECLOG, GS_SIGNAL,
++GS_FORKFAIL, GS_TIME, GS_CHROOT_SHMAT, GS_CHROOT_UNIX, GS_CHROOT_MNT,
++GS_CHROOT_FCHDIR, GS_CHROOT_DBL, GS_CHROOT_PVT, GS_CHROOT_CD, GS_CHROOT_CM,
++GS_CHROOT_MK, GS_CHROOT_NI, GS_CHROOT_EXECLOG, GS_CHROOT_CAPS,
++GS_CHROOT_SYSCTL, GS_TPE, GS_TPE_GID, GS_TPE_ALL, GS_SIDCAPS,
++GS_RANDPID, GS_RANDID, GS_RANDSRC, GS_RANDISN,
++GS_SOCKET_ALL, GS_SOCKET_ALL_GID, GS_SOCKET_CLIENT,
++GS_SOCKET_CLIENT_GID, GS_SOCKET_SERVER, GS_SOCKET_SERVER_GID, GS_TTY, GS_TTYS,
++GS_PTY, GS_GROUP, GS_GID, GS_ACHDIR, GS_AMOUNT, GS_AIPC, GS_DMSG, GS_RANDRPC,
++GS_TEXTREL, GS_FINDTASK, GS_LOCK};
++
++
++ctl_table grsecurity_table[] = {
++#ifdef CONFIG_GRKERNSEC_LINK
++      {
++              .ctl_name       = GS_LINK,
++              .procname       = "linking_restrictions",
++              .data           = &grsec_enable_link,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_FIFO
++      {
++              .ctl_name       = GS_FIFO,
++              .procname       = "fifo_restrictions",
++              .data           = &grsec_enable_fifo,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_EXECVE
++      {
++              .ctl_name       = GS_EXECVE,
++              .procname       = "execve_limiting",
++              .data           = &grsec_enable_execve,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_EXECLOG
++      {
++              .ctl_name       = GS_EXECLOG,
++              .procname       = "exec_logging",
++              .data           = &grsec_enable_execlog,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_SIGNAL
++      {
++              .ctl_name       = GS_SIGNAL,
++              .procname       = "signal_logging",
++              .data           = &grsec_enable_signal,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_FORKFAIL
++      {
++              .ctl_name       = GS_FORKFAIL,
++              .procname       = "forkfail_logging",
++              .data           = &grsec_enable_forkfail,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_TIME
++      {
++              .ctl_name       = GS_TIME,
++              .procname       = "timechange_logging",
++              .data           = &grsec_enable_time,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_SHMAT
++      {
++              .ctl_name       = GS_CHROOT_SHMAT,
++              .procname       = "chroot_deny_shmat",
++              .data           = &grsec_enable_chroot_shmat,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_UNIX
++      {
++              .ctl_name       = GS_CHROOT_UNIX,
++              .procname       = "chroot_deny_unix",
++              .data           = &grsec_enable_chroot_unix,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_MOUNT
++      {
++              .ctl_name       = GS_CHROOT_MNT,
++              .procname       = "chroot_deny_mount",
++              .data           = &grsec_enable_chroot_mount,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_FCHDIR
++      {
++              .ctl_name       = GS_CHROOT_FCHDIR,
++              .procname       = "chroot_deny_fchdir",
++              .data           = &grsec_enable_chroot_fchdir,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_DOUBLE
++      {
++              .ctl_name       = GS_CHROOT_DBL,
++              .procname       = "chroot_deny_chroot",
++              .data           = &grsec_enable_chroot_double,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_PIVOT
++      {
++              .ctl_name       = GS_CHROOT_PVT,
++              .procname       = "chroot_deny_pivot",
++              .data           = &grsec_enable_chroot_pivot,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_CHDIR
++      {
++              .ctl_name       = GS_CHROOT_CD,
++              .procname       = "chroot_enforce_chdir",
++              .data           = &grsec_enable_chroot_chdir,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_CHMOD
++      {
++              .ctl_name       = GS_CHROOT_CM,
++              .procname       = "chroot_deny_chmod",
++              .data           = &grsec_enable_chroot_chmod,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_MKNOD
++      {
++              .ctl_name       = GS_CHROOT_MK,
++              .procname       = "chroot_deny_mknod",
++              .data           = &grsec_enable_chroot_mknod,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_NICE
++      {
++              .ctl_name       = GS_CHROOT_NI,
++              .procname       = "chroot_restrict_nice",
++              .data           = &grsec_enable_chroot_nice,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_EXECLOG
++      {
++              .ctl_name       = GS_CHROOT_EXECLOG,
++              .procname       = "chroot_execlog",
++              .data           = &grsec_enable_chroot_execlog,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_CAPS
++      {
++              .ctl_name       = GS_CHROOT_CAPS,
++              .procname       = "chroot_caps",
++              .data           = &grsec_enable_chroot_caps,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_SYSCTL
++      {
++              .ctl_name       = GS_CHROOT_SYSCTL,
++              .procname       = "chroot_deny_sysctl",
++              .data           = &grsec_enable_chroot_sysctl,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_TPE
++      {
++              .ctl_name       = GS_TPE,
++              .procname       = "tpe",
++              .data           = &grsec_enable_tpe,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++      {
++              .ctl_name       = GS_TPE_GID,
++              .procname       = "tpe_gid",
++              .data           = &grsec_tpe_gid,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_TPE_ALL
++      {
++              .ctl_name       = GS_TPE_ALL,
++              .procname       = "tpe_restrict_all",
++              .data           = &grsec_enable_tpe_all,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDPID
++      {
++              .ctl_name       = GS_RANDPID,
++              .procname       = "rand_pids",
++              .data           = &grsec_enable_randpid,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDID
++      {
++              .ctl_name       = GS_RANDID,
++              .procname       = "rand_ip_ids",
++              .data           = &grsec_enable_randid,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDSRC
++      {
++              .ctl_name       = GS_RANDSRC,
++              .procname       = "rand_tcp_src_ports",
++              .data           = &grsec_enable_randsrc,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDISN
++      {
++              .ctl_name       = GS_RANDISN,
++              .procname       = "rand_isns",
++              .data           = &grsec_enable_randisn,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_SOCKET_ALL
++      {
++              .ctl_name       = GS_SOCKET_ALL,
++              .procname       = "socket_all",
++              .data           = &grsec_enable_socket_all,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++      {
++              .ctl_name       = GS_SOCKET_ALL_GID,
++              .procname       = "socket_all_gid",
++              .data           = &grsec_socket_all_gid,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_SOCKET_CLIENT
++      {
++              .ctl_name       = GS_SOCKET_CLIENT,
++              .procname       = "socket_client",
++              .data           = &grsec_enable_socket_client,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++      {
++              .ctl_name       = GS_SOCKET_CLIENT_GID,
++              .procname       = "socket_client_gid",
++              .data           = &grsec_socket_client_gid,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_SOCKET_SERVER
++      {
++              .ctl_name       = GS_SOCKET_SERVER,
++              .procname       = "socket_server",
++              .data           = &grsec_enable_socket_server,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++      {
++              .ctl_name       = GS_SOCKET_SERVER_GID,
++              .procname       = "socket_server_gid",
++              .data           = &grsec_socket_server_gid,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_AUDIT_GROUP
++      {
++              .ctl_name       = GS_GROUP,
++              .procname       = "audit_group",
++              .data           = &grsec_enable_group,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++      {
++              .ctl_name       = GS_GID,
++              .procname       = "audit_gid",
++              .data           = &grsec_audit_gid,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_AUDIT_CHDIR
++      {
++              .ctl_name       = GS_ACHDIR,
++              .procname       = "audit_chdir",
++              .data           = &grsec_enable_chdir,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_AUDIT_MOUNT
++      {
++              .ctl_name       = GS_AMOUNT,
++              .procname       = "audit_mount",
++              .data           = &grsec_enable_mount,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
++      {
++              .ctl_name       = GS_AIPC,
++              .procname       = "audit_ipc",
++              .data           = &grsec_enable_audit_ipc,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_AUDIT_TEXTREL
++      {
++              .ctl_name       = GS_TEXTREL,
++              .procname       = "audit_textrel",
++              .data           = &grsec_enable_audit_textrel,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_DMESG
++      {
++              .ctl_name       = GS_DMSG,
++              .procname       = "dmesg",
++              .data           = &grsec_enable_dmesg,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_RANDRPC
++      {
++              .ctl_name       = GS_RANDRPC,
++              .procname       = "rand_rpc",
++              .data           = &grsec_enable_randrpc,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++#ifdef CONFIG_GRKERNSEC_CHROOT_FINDTASK
++      {
++              .ctl_name       = GS_FINDTASK,
++              .procname       = "chroot_findtask",
++              .data           = &grsec_enable_chroot_findtask,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++      {
++              .ctl_name       = GS_LOCK,
++              .procname       = "grsec_lock",
++              .data           = &grsec_lock,
++              .maxlen         = sizeof(int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++      { .ctl_name = 0 }
++};
++#endif
+diff -uNr linux-2.6.8/grsecurity/grsec_textrel.c linux-2.6.8.grsecurity/grsecurity/grsec_textrel.c
+--- linux-2.6.8/grsecurity/grsec_textrel.c     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_textrel.c  2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,19 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++#include <linux/file.h>
++#include <linux/grinternal.h>
++#include <linux/grsecurity.h>
++
++void
++gr_log_textrel(struct vm_area_struct * vma)
++{
++#ifdef CONFIG_GRKERNSEC_AUDIT_TEXTREL
++      if (grsec_enable_audit_textrel)
++              security_audit(GR_TEXTREL_AUDIT_MSG, vma->vm_file ? 
++                              gr_to_filename(vma->vm_file->f_dentry, vma->vm_file->f_vfsmnt)
++                              : "<anonymous mapping>", vma->vm_start, 
++                              vma->vm_pgoff, DEFAULTSECARGS);
++#endif
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_time.c linux-2.6.8.grsecurity/grsecurity/grsec_time.c
+--- linux-2.6.8/grsecurity/grsec_time.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_time.c     2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,13 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/grinternal.h>
++
++void
++gr_log_timechange(void)
++{
++#ifdef CONFIG_GRKERNSEC_TIME
++      if (grsec_enable_time)
++              security_alert_good(GR_TIME_MSG, DEFAULTSECARGS);
++#endif
++      return;
++}
+diff -uNr linux-2.6.8/grsecurity/grsec_tpe.c linux-2.6.8.grsecurity/grsecurity/grsec_tpe.c
+--- linux-2.6.8/grsecurity/grsec_tpe.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsec_tpe.c      2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,35 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/file.h>
++#include <linux/fs.h>
++#include <linux/grinternal.h>
++
++extern int gr_acl_tpe_check(void);
++
++int
++gr_tpe_allow(const struct file *file)
++{
++#ifdef CONFIG_GRKERNSEC
++      struct inode *inode = file->f_dentry->d_parent->d_inode;
++
++      if (current->uid && ((grsec_enable_tpe && in_group_p(grsec_tpe_gid)) || gr_acl_tpe_check()) &&
++          (inode->i_uid || (!inode->i_uid && ((inode->i_mode & S_IWGRP) ||
++                                              (inode->i_mode & S_IWOTH))))) {
++              security_alert(GR_EXEC_TPE_MSG,
++                             gr_to_filename(file->f_dentry, file->f_vfsmnt),
++                             DEFAULTSECARGS);
++              return 0;
++      }
++#ifdef CONFIG_GRKERNSEC_TPE_ALL
++      if (current->uid && grsec_enable_tpe && grsec_enable_tpe_all &&
++          ((inode->i_uid && (inode->i_uid != current->uid)) ||
++           (inode->i_mode & S_IWGRP) || (inode->i_mode & S_IWOTH))) {
++              security_alert(GR_EXEC_TPE_MSG,
++                             gr_to_filename(file->f_dentry, file->f_vfsmnt),
++                             DEFAULTSECARGS);
++              return 0;
++      }
++#endif
++#endif
++      return 1;
++}
+diff -uNr linux-2.6.8/grsecurity/grsum.c linux-2.6.8.grsecurity/grsecurity/grsum.c
+--- linux-2.6.8/grsecurity/grsum.c     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/grsum.c  2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,59 @@
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++#include <asm/scatterlist.h>
++#include <linux/crypto.h>
++#include <linux/gracl.h>
++
++
++#if !defined(CONFIG_CRYPTO) || defined(CONFIG_CRYPTO_MODULE) || !defined(CONFIG_CRYPTO_SHA256) || defined(CONFIG_CRYPTO_SHA256_MODULE)
++#error "crypto and sha256 must be built into the kernel"
++#endif
++
++int
++chkpw(struct gr_arg *entry, unsigned char *salt, unsigned char *sum)
++{
++      char *p;
++      struct crypto_tfm *tfm;
++      unsigned char temp_sum[GR_SHA_LEN];
++      struct scatterlist sg[2];
++      volatile int retval = 0;
++      volatile int dummy = 0;
++      unsigned int i;
++
++      tfm = crypto_alloc_tfm("sha256", 0);
++      if (tfm == NULL) {
++              /* should never happen, since sha256 should be built in */
++              return 1;
++      }
++
++      crypto_digest_init(tfm);
++
++      p = salt;
++      sg[0].page = virt_to_page(p);
++      sg[0].offset = ((long) p & ~PAGE_MASK);
++      sg[0].length = GR_SALT_LEN;
++      
++      crypto_digest_update(tfm, sg, 1);
++
++      p = entry->pw;
++      sg[0].page = virt_to_page(p);
++      sg[0].offset = ((long) p & ~PAGE_MASK);
++      sg[0].length = strlen(entry->pw);
++
++      crypto_digest_update(tfm, sg, 1);
++
++      crypto_digest_final(tfm, temp_sum);
++
++      memset(entry->pw, 0, GR_PW_LEN);
++
++      for (i = 0; i < GR_SHA_LEN; i++)
++              if (sum[i] != temp_sum[i])
++                      retval = 1;
++              else
++                      dummy = 1;      // waste a cycle
++
++      crypto_free_tfm(tfm);
++
++      return retval;
++}
+diff -uNr linux-2.6.8/grsecurity/Kconfig linux-2.6.8.grsecurity/grsecurity/Kconfig
+--- linux-2.6.8/grsecurity/Kconfig     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/Kconfig  2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,1291 @@
++#
++# grecurity configuration
++#
++
++menu "Grsecurity"
++
++config GRKERNSEC
++      bool "Grsecurity"
++      select CRYPTO
++      select CRYPTO_SHA256
++      help
++        If you say Y here, you will be able to configure many features
++        that will enhance the security of your system.  It is highly
++        recommended that you say Y here and read through the help
++        for each option so that you fully understand the features and
++        can evaluate their usefulness for your machine.
++
++choice
++      prompt "Security Level"
++      depends GRKERNSEC
++      default GRKERNSEC_CUSTOM
++
++config GRKERNSEC_LOW
++      bool "Low"
++      select GRKERNSEC_LINK
++      select GRKERNSEC_FIFO
++      select GRKERNSEC_RANDPID
++      select GRKERNSEC_EXECVE
++      select GRKERNSEC_RANDNET
++      select GRKERNSEC_RANDISN
++      select GRKERNSEC_DMESG
++      select GRKERNSEC_RANDID
++      select GRKERNSEC_CHROOT_CHDIR
++      help
++        If you choose this option, several of the grsecurity options will
++        be enabled that will give you greater protection against a number
++        of attacks, while assuring that none of your software will have any
++        conflicts with the additional security measures.  If you run a lot
++        of unusual software, or you are having problems with the higher
++        security levels, you should say Y here.  With this option, the
++        following features are enabled:
++
++        - Linking Restrictions
++        - FIFO Restrictions
++        - Randomized PIDs
++        - Enforcing RLIMIT_NPROC on execve
++        - Restricted dmesg
++        - Randomized IP IDs
++        - Enforced chdir("/") on chroot
++
++config GRKERNSEC_MEDIUM
++      bool "Medium"
++      select PAX_EI_PAX
++      select PAX_PT_PAX_FLAGS
++      select PAX_HAVE_ACL_FLAGS
++      select GRKERNSEC_PROC_MEMMAP
++      select GRKERNSEC_CHROOT_SYSCTL
++      select GRKERNSEC_LINK
++      select GRKERNSEC_FIFO
++      select GRKERNSEC_RANDPID
++      select GRKERNSEC_EXECVE
++      select GRKERNSEC_DMESG
++      select GRKERNSEC_RANDID
++      select GRKERNSEC_RANDNET
++      select GRKERNSEC_RANDISN
++      select GRKERNSEC_RANDSRC
++      select GRKERNSEC_RANDRPC
++      select GRKERNSEC_FORKFAIL
++      select GRKERNSEC_TIME
++      select GRKERNSEC_SIGNAL
++      select GRKERNSEC_CHROOT
++      select GRKERNSEC_CHROOT_UNIX
++      select GRKERNSEC_CHROOT_MOUNT
++      select GRKERNSEC_CHROOT_PIVOT
++      select GRKERNSEC_CHROOT_DOUBLE
++      select GRKERNSEC_CHROOT_CHDIR
++      select GRKERNSEC_CHROOT_MKNOD
++      select GRKERNSEC_PROC
++      select GRKERNSEC_PROC_USERGROUP
++      select PAX_RANDUSTACK
++      select PAX_ASLR
++      select PAX_RANDMMAP
++
++      help
++        If you say Y here, several features in addition to those included
++        in the low additional security level will be enabled.  These
++        features provide even more security to your system, though in rare
++        cases they may be incompatible with very old or poorly written
++        software.  If you enable this option, make sure that your auth
++        service (identd) is running as gid 1001.  With this option, 
++        the following features (in addition to those provided in the 
++        low additional security level) will be enabled:
++
++        - Randomized TCP Source Ports
++        - Failed Fork Logging
++        - Time Change Logging
++        - Signal Logging
++        - Deny Mounts in chroot
++        - Deny Double chrooting
++        - Deny Sysctl Writes in chroot
++        - Deny Mknod in chroot
++        - Deny Access to Abstract AF_UNIX Sockets out of chroot
++        - Deny pivot_root in chroot
++        - Denied Writes of /dev/kmem, /dev/mem, and /dev/port
++        - /proc restrictions with special GID set to 10 (usually wheel)
++        - Address Space Layout Randomization (ASLR)
++
++config GRKERNSEC_HIGH
++      bool "High"
++      select GRKERNSEC_LINK
++      select GRKERNSEC_FIFO
++      select GRKERNSEC_RANDPID
++      select GRKERNSEC_EXECVE
++      select GRKERNSEC_DMESG
++      select GRKERNSEC_RANDID
++      select GRKERNSEC_RANDSRC
++      select GRKERNSEC_RANDRPC
++      select GRKERNSEC_FORKFAIL
++      select GRKERNSEC_TIME
++      select GRKERNSEC_SIGNAL
++      select GRKERNSEC_CHROOT_SHMAT
++      select GRKERNSEC_CHROOT_UNIX
++      select GRKERNSEC_CHROOT_MOUNT
++      select GRKERNSEC_CHROOT_FCHDIR
++      select GRKERNSEC_CHROOT_PIVOT
++      select GRKERNSEC_CHROOT_DOUBLE
++      select GRKERNSEC_CHROOT_CHDIR
++      select GRKERNSEC_CHROOT_MKNOD
++      select GRKERNSEC_CHROOT_CAPS
++      select GRKERNSEC_CHROOT_SYSCTL
++      select GRKERNSEC_CHROOT_FINDTASK
++      select GRKERNSEC_PROC
++      select GRKERNSEC_PROC_MEMMAP
++      select GRKERNSEC_HIDESYM
++      select GRKERNSEC_BRUTE
++      select GRKERNSEC_PROC_USERGROUP
++      select GRKERNSEC_KMEM
++      select GRKERNSEC_RESLOG
++      select GRKERNSEC_RANDNET
++      select GRKERNSEC_RANDISN
++      select GRKERNSEC_PROC_ADD
++      select GRKERNSEC_CHROOT_CHMOD
++      select GRKERNSEC_CHROOT_NICE
++      select GRKERNSEC_AUDIT_MOUNT
++      select PAX_RANDUSTACK
++      select PAX_ASLR
++      select PAX_RANDMMAP
++      select PAX_NOEXEC
++      select PAX_MPROTECT
++      select PAX_EI_PAX
++      select PAX_PT_PAX_FLAGS
++      select PAX_HAVE_ACL_FLAGS
++      select PAX_KERNEXEC
++      select PAX_RANDKSTACK
++      select PAX_RANDEXEC
++      select PAX_SEGMEXEC
++      select PAX_EMUTRAMP
++      select PAX_NOVSYSCALL
++      help
++        If you say Y here, many of the features of grsecurity will be
++        enabled, which will protect you against many kinds of attacks
++        against your system.  The heightened security comes at a cost
++        of an increased chance of incompatibilities with rare software
++        on your machine.  Since this security level enables PaX, you should
++        view <http://pax.grsecurity.net> and read about the PaX
++        project.  While you are there, download chpax and run it on
++        binaries that cause problems with PaX.  Also remember that
++        since the /proc restrictions are enabled, you must run your
++        identd as gid 1001.  This security level enables the following 
++        features in addition to those listed in the low and medium 
++        security levels:
++
++        - Additional /proc Restrictions
++        - Chmod Restrictions in chroot
++        - No Signals, Ptrace, or Viewing of Processes Outside of chroot
++        - Capability Restrictions in chroot
++        - Deny fchdir out of chroot
++        - Priority Restrictions in chroot
++        - Segmentation-based Implementation of PaX
++        - Mprotect Restrictions
++        - Removal of Addresses from /proc/<pid>/[maps|stat]
++        - Kernel Stack Randomization
++        - Mount/Unmount/Remount Logging
++        - Kernel Symbol Hiding
++      
++config GRKERNSEC_CUSTOM
++      bool "Custom"
++      help
++        If you say Y here, you will be able to configure every grsecurity
++        option, which allows you to enable many more features that aren't
++        covered in the basic security levels.  These additional features
++        include TPE, socket restrictions, and the sysctl system for
++        grsecurity.  It is advised that you read through the help for
++        each option to determine its usefulness in your situation.
++
++endchoice
++
++menu "Address Space Protection"
++depends on GRKERNSEC
++
++config GRKERNSEC_KMEM
++      bool "Deny writing to /dev/kmem, /dev/mem, and /dev/port"
++      help
++        If you say Y here, /dev/kmem and /dev/mem won't be allowed to
++        be written to via mmap or otherwise to modify the running kernel.
++        /dev/port will also not be allowed to be opened. If you have module
++        support disabled, enabling this will close up four ways that are
++        currently used  to insert malicious code into the running kernel.
++        Even with all these features enabled, we still highly recommend that
++        you use the ACL system, as it is still possible for an attacker to
++        modify the running kernel through privileged I/O granted by ioperm/iopl.
++        If you are not using XFree86, you may be able to stop this additional
++        case by enabling the 'Disable privileged I/O' option. Though nothing
++        legitimately writes to /dev/kmem, XFree86 does need to write to /dev/mem,
++        but only to video memory, which is the only writing we allow in this
++        case.  If /dev/kmem or /dev/mem are mmaped without PROT_WRITE, they will
++        not be allowed to mprotect it with PROT_WRITE later.
++        Enabling this feature could make certain apps like VMWare stop working,
++        as they need to write to other locations in /dev/mem.
++        It is highly recommended that you say Y here if you meet all the
++        conditions above.
++
++config GRKERNSEC_IO
++      bool "Disable privileged I/O"
++      depends on X86
++      select RTC
++      help
++        If you say Y here, all ioperm and iopl calls will return an error.
++        Ioperm and iopl can be used to modify the running kernel.
++        Unfortunately, some programs need this access to operate properly,
++        the most notable of which are XFree86 and hwclock.  hwclock can be
++        remedied by having RTC support in the kernel, so CONFIG_RTC is
++        enabled if this option is enabled, to ensure that hwclock operates
++        correctly.  XFree86 still will not operate correctly with this option
++        enabled, so DO NOT CHOOSE Y IF YOU USE XFree86.  If you use XFree86
++        and you still want to protect your kernel against modification,
++        use the ACL system.
++
++config GRKERNSEC_PROC_MEMMAP
++      bool "Remove addresses from /proc/<pid>/[maps|stat]"
++      help
++        If you say Y here, the /proc/<pid>/maps and /proc/<pid>/stat files will
++        give no information about the addresses of its mappings if
++        PaX features that rely on random addresses are enabled on the task.
++        If you use PaX it is greatly recommended that you say Y here as it
++        closes up a hole that makes the full ASLR useless for suid
++        binaries.
++
++config GRKERNSEC_BRUTE
++      bool "Deter exploit bruteforcing"
++      help
++        If you say Y here, attempts to bruteforce exploits against forking
++        daemons such as apache or sshd will be deterred.  When a child of a
++        forking daemon is killed by PaX or crashes due to an illegal
++        instruction, the parent process will be delayed 30 seconds upon every
++        subsequent fork until the administrator is able to assess the
++        situation and restart the daemon.  It is recommended that you also
++        enable signal logging in the auditing section so that logs are
++        generated when a process performs an illegal instruction.
++
++config GRKERNSEC_HIDESYM
++      bool "Hide kernel symbols"
++      help
++        If you say Y here, getting information on loaded modules, and
++        displaying all kernel symbols through a syscall will be restricted
++        to users with CAP_SYS_MODULE.  This option is only effective
++        provided the following conditions are met:
++        1) The kernel using grsecurity is not precompiled by some distribution
++        2) You are using the ACL system and hiding other files such as your
++           kernel image and System.map
++        3) You have the additional /proc restrictions enabled, which removes
++           /proc/kcore
++        If the above conditions are met, this option will aid to provide a
++        useful protection against local and remote kernel exploitation of
++        overflows and arbitrary read/write vulnerabilities.
++
++endmenu
++menu "Role Based Access Control Options"
++depends on GRKERNSEC
++
++config GRKERNSEC_ACL_HIDEKERN
++      bool "Hide kernel processes"
++      help
++        If you say Y here, when the RBAC system is enabled via gradm -E,
++        an additional ACL will be passed to the kernel that hides all kernel
++        processes.  These processes will only be viewable by the authenticated
++        admin, or processes that have viewing access set.
++
++config GRKERNSEC_ACL_MAXTRIES
++      int "Maximum tries before password lockout"
++      default 3
++      help
++        This option enforces the maximum number of times a user can attempt
++        to authorize themselves with the grsecurity ACL system before being
++        denied the ability to attempt authorization again for a specified time.
++        The lower the number, the harder it will be to brute-force a password.
++
++config GRKERNSEC_ACL_TIMEOUT
++      int "Time to wait after max password tries, in seconds"
++      default 30
++      help
++        This option specifies the time the user must wait after attempting to
++        authorize to the ACL system with the maximum number of invalid
++        passwords.  The higher the number, the harder it will be to brute-force
++        a password.
++
++endmenu
++menu "Filesystem Protections"
++depends on GRKERNSEC
++
++config GRKERNSEC_PROC
++      bool "Proc restrictions"
++      help
++        If you say Y here, the permissions of the /proc filesystem
++        will be altered to enhance system security and privacy.  Depending
++        upon the options you choose, you can either restrict users to see
++        only the processes they themselves run, or choose a group that can
++        view all processes and files normally restricted to root if you choose
++        the "restrict to user only" option.  NOTE: If you're running identd as
++        a non-root user, you will have to run it as the group you specify here.
++
++config GRKERNSEC_PROC_USER
++      bool "Restrict /proc to user only"
++      depends on GRKERNSEC_PROC
++      help
++        If you say Y here, non-root users will only be able to view their own
++        processes, and restricts them from viewing network-related information,
++        and viewing kernel symbol and module information.
++
++config GRKERNSEC_PROC_USERGROUP
++      bool "Allow special group"
++      depends on GRKERNSEC_PROC && !GRKERNSEC_PROC_USER
++      help
++        If you say Y here, you will be able to select a group that will be
++        able to view all processes, network-related information, and
++        kernel and symbol information.  This option is useful if you want
++        to run identd as a non-root user.
++
++config GRKERNSEC_PROC_GID
++      int "GID for special group"
++      depends on GRKERNSEC_PROC_USERGROUP
++      default 1001
++
++config GRKERNSEC_PROC_ADD
++      bool "Additional restrictions"
++      depends on GRKERNSEC_PROC_USER || GRKERNSEC_PROC_USERGROUP
++      help
++        If you say Y here, additional restrictions will be placed on
++        /proc that keep normal users from viewing cpu and device information.
++
++config GRKERNSEC_LINK
++      bool "Linking restrictions"
++      help
++        If you say Y here, /tmp race exploits will be prevented, since users
++        will no longer be able to follow symlinks owned by other users in
++        world-writable +t directories (i.e. /tmp), unless the owner of the
++        symlink is the owner of the directory. users will also not be
++        able to hardlink to files they do not own.  If the sysctl option is
++        enabled, a sysctl option with name "linking_restrictions" is created.
++
++config GRKERNSEC_FIFO
++      bool "FIFO restrictions"
++      help
++        If you say Y here, users will not be able to write to FIFOs they don't
++        own in world-writable +t directories (i.e. /tmp), unless the owner of
++        the FIFO is the same owner of the directory it's held in.  If the sysctl
++        option is enabled, a sysctl option with name "fifo_restrictions" is
++        created.
++
++config GRKERNSEC_CHROOT
++      bool "Chroot jail restrictions"
++      help
++        If you say Y here, you will be able to choose several options that will
++        make breaking out of a chrooted jail much more difficult.  If you
++        encounter no software incompatibilities with the following options, it
++        is recommended that you enable each one.
++
++config GRKERNSEC_CHROOT_MOUNT
++      bool "Deny mounts"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, processes inside a chroot will not be able to
++        mount or remount filesystems.  If the sysctl option is enabled, a
++        sysctl option with name "chroot_deny_mount" is created.
++
++config GRKERNSEC_CHROOT_DOUBLE
++      bool "Deny double-chroots"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, processes inside a chroot will not be able to chroot
++        again outside the chroot.  This is a widely used method of breaking
++        out of a chroot jail and should not be allowed.  If the sysctl 
++        option is enabled, a sysctl option with name 
++        "chroot_deny_chroot" is created.
++
++config GRKERNSEC_CHROOT_PIVOT
++      bool "Deny pivot_root in chroot"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, processes inside a chroot will not be able to use
++        a function called pivot_root() that was introduced in Linux 2.3.41.  It
++        works similar to chroot in that it changes the root filesystem.  This
++        function could be misused in a chrooted process to attempt to break out
++        of the chroot, and therefore should not be allowed.  If the sysctl
++        option is enabled, a sysctl option with name "chroot_deny_pivot" is
++        created.
++
++config GRKERNSEC_CHROOT_CHDIR
++      bool "Enforce chdir(\"/\") on all chroots"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, the current working directory of all newly-chrooted
++        applications will be set to the the root directory of the chroot.
++        The man page on chroot(2) states:
++        Note that this call does not change  the  current  working
++        directory,  so  that `.' can be outside the tree rooted at
++        `/'.  In particular, the  super-user  can  escape  from  a
++        `chroot jail' by doing `mkdir foo; chroot foo; cd ..'.
++
++        It is recommended that you say Y here, since it's not known to break
++        any software.  If the sysctl option is enabled, a sysctl option with
++        name "chroot_enforce_chdir" is created.
++
++config GRKERNSEC_CHROOT_CHMOD
++      bool "Deny (f)chmod +s"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, processes inside a chroot will not be able to chmod
++        or fchmod files to make them have suid or sgid bits.  This protects
++        against another published method of breaking a chroot.  If the sysctl
++        option is enabled, a sysctl option with name "chroot_deny_chmod" is
++        created.
++
++config GRKERNSEC_CHROOT_FCHDIR
++      bool "Deny fchdir out of chroot"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, a well-known method of breaking chroots by fchdir'ing
++        to a file descriptor of the chrooting process that points to a directory
++        outside the filesystem will be stopped.  If the sysctl option
++        is enabled, a sysctl option with name "chroot_deny_fchdir" is created.
++
++config GRKERNSEC_CHROOT_MKNOD
++      bool "Deny mknod"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, processes inside a chroot will not be allowed to
++        mknod.  The problem with using mknod inside a chroot is that it
++        would allow an attacker to create a device entry that is the same
++        as one on the physical root of your system, which could range from
++        anything from the console device to a device for your harddrive (which
++        they could then use to wipe the drive or steal data).  It is recommended
++        that you say Y here, unless you run into software incompatibilities.
++        If the sysctl option is enabled, a sysctl option with name
++        "chroot_deny_mknod" is created.
++
++config GRKERNSEC_CHROOT_SHMAT
++      bool "Deny shmat() out of chroot"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, processes inside a chroot will not be able to attach
++        to shared memory segments that were created outside of the chroot jail.
++        It is recommended that you say Y here.  If the sysctl option is enabled,
++        a sysctl option with name "chroot_deny_shmat" is created.
++
++config GRKERNSEC_CHROOT_UNIX
++      bool "Deny access to abstract AF_UNIX sockets out of chroot"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, processes inside a chroot will not be able to
++        connect to abstract (meaning not belonging to a filesystem) Unix
++        domain sockets that were bound outside of a chroot.  It is recommended
++        that you say Y here.  If the sysctl option is enabled, a sysctl option
++        with name "chroot_deny_unix" is created.
++
++config GRKERNSEC_CHROOT_FINDTASK
++      bool "Protect outside processes"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, processes inside a chroot will not be able to
++        kill, send signals with fcntl, ptrace, capget, setpgid, getpgid,
++        getsid, or view any process outside of the chroot.  If the sysctl
++        option is enabled, a sysctl option with name "chroot_findtask" is
++        created.
++
++config GRKERNSEC_CHROOT_NICE
++      bool "Restrict priority changes"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, processes inside a chroot will not be able to raise
++        the priority of processes in the chroot, or alter the priority of
++        processes outside the chroot.  This provides more security than simply
++        removing CAP_SYS_NICE from the process' capability set.  If the
++        sysctl option is enabled, a sysctl option with name "chroot_restrict_nice"
++        is created.
++
++config GRKERNSEC_CHROOT_SYSCTL
++      bool "Deny sysctl writes"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, an attacker in a chroot will not be able to
++        write to sysctl entries, either by sysctl(2) or through a /proc
++        interface.  It is strongly recommended that you say Y here. If the
++        sysctl option is enabled, a sysctl option with name
++        "chroot_deny_sysctl" is created.
++
++config GRKERNSEC_CHROOT_CAPS
++      bool "Capability restrictions"
++      depends on GRKERNSEC_CHROOT
++      help
++        If you say Y here, the capabilities on all root processes within a
++        chroot jail will be lowered to stop module insertion, raw i/o,
++        system and net admin tasks, rebooting the system, modifying immutable
++        files, modifying IPC owned by another, and changing the system time.
++        This is left an option because it can break some apps.  Disable this
++        if your chrooted apps are having problems performing those kinds of
++        tasks.  If the sysctl option is enabled, a sysctl option with
++        name "chroot_caps" is created.
++
++endmenu
++menu "Kernel Auditing"
++depends on GRKERNSEC
++
++config GRKERNSEC_AUDIT_GROUP
++      bool "Single group for auditing"
++      help
++        If you say Y here, the exec, chdir, (un)mount, and ipc logging features
++        will only operate on a group you specify.  This option is recommended
++        if you only want to watch certain users instead of having a large
++        amount of logs from the entire system.  If the sysctl option is enabled,
++        a sysctl option with name "audit_group" is created.
++
++config GRKERNSEC_AUDIT_GID
++      int "GID for auditing"
++      depends on GRKERNSEC_AUDIT_GROUP
++      default 1007
++
++config GRKERNSEC_EXECLOG
++      bool "Exec logging"
++      help
++        If you say Y here, all execve() calls will be logged (since the
++        other exec*() calls are frontends to execve(), all execution
++        will be logged).  Useful for shell-servers that like to keep track
++        of their users.  If the sysctl option is enabled, a sysctl option with
++        name "exec_logging" is created.
++        WARNING: This option when enabled will produce a LOT of logs, especially
++        on an active system.
++
++config GRKERNSEC_RESLOG
++      bool "Resource logging"
++      help
++        If you say Y here, all attempts to overstep resource limits will
++        be logged with the resource name, the requested size, and the current
++        limit.  It is highly recommended that you say Y here.
++
++config GRKERNSEC_CHROOT_EXECLOG
++      bool "Log execs within chroot"
++      help
++        If you say Y here, all executions inside a chroot jail will be logged
++        to syslog.  This can cause a large amount of logs if certain
++        applications (eg. djb's daemontools) are installed on the system, and
++        is therefore left as an option.  If the sysctl option is enabled, a
++        sysctl option with name "chroot_execlog" is created.
++
++config GRKERNSEC_AUDIT_CHDIR
++      bool "Chdir logging"
++      help
++        If you say Y here, all chdir() calls will be logged.  If the sysctl
++        option is enabled, a sysctl option with name "audit_chdir" is created.
++
++config GRKERNSEC_AUDIT_MOUNT
++      bool "(Un)Mount logging"
++      help
++        If you say Y here, all mounts and unmounts will be logged.  If the
++        sysctl option is enabled, a sysctl option with name "audit_mount" is
++        created.
++
++config GRKERNSEC_AUDIT_IPC
++      bool "IPC logging"
++      help
++        If you say Y here, creation and removal of message queues, semaphores,
++        and shared memory will be logged.  If the sysctl option is enabled, a
++        sysctl option with name "audit_ipc" is created.
++
++config GRKERNSEC_SIGNAL
++      bool "Signal logging"
++      help
++        If you say Y here, certain important signals will be logged, such as
++        SIGSEGV, which will as a result inform you of when a error in a program
++        occurred, which in some cases could mean a possible exploit attempt.
++        If the sysctl option is enabled, a sysctl option with name
++        "signal_logging" is created.
++
++config GRKERNSEC_FORKFAIL
++      bool "Fork failure logging"
++      help
++        If you say Y here, all failed fork() attempts will be logged.
++        This could suggest a fork bomb, or someone attempting to overstep
++        their process limit.  If the sysctl option is enabled, a sysctl option
++        with name "forkfail_logging" is created.
++
++config GRKERNSEC_TIME
++      bool "Time change logging"
++      help
++        If you say Y here, any changes of the system clock will be logged.
++        If the sysctl option is enabled, a sysctl option with name
++        "timechange_logging" is created.
++
++config GRKERNSEC_PROC_IPADDR
++      bool "/proc/<pid>/ipaddr support"
++      help
++        If you say Y here, a new entry will be added to each /proc/<pid>
++        directory that contains the IP address of the person using the task.
++        The IP is carried across local TCP and AF_UNIX stream sockets.
++        This information can be useful for IDS/IPSes to perform remote response
++        to a local attack.  The entry is readable by only the owner of the
++        process (and root if he has CAP_DAC_OVERRIDE, which can be removed via
++        the RBAC system), and thus does not create privacy concerns.
++
++config GRKERNSEC_AUDIT_TEXTREL
++      bool 'ELF text relocations logging (READ HELP)'
++      depends on PAX_MPROTECT
++      help
++        If you say Y here, text relocations will be logged with the filename
++        of the offending library or binary.  The purpose of the feature is
++        to help Linux distribution developers get rid of libraries and
++        binaries that need text relocations which hinder the future progress
++        of PaX.  Only Linux distribution developers should say Y here, and
++        never on a production machine, as this option creates an information
++        leak that could aid an attacker in defeating the randomization of
++        a single memory region.  If the sysctl option is enabled, a sysctl
++        option with name "audit_textrel" is created.
++
++endmenu
++
++menu "Executable Protections"
++depends on GRKERNSEC
++
++config GRKERNSEC_EXECVE
++      bool "Enforce RLIMIT_NPROC on execs"
++      help
++        If you say Y here, users with a resource limit on processes will
++        have the value checked during execve() calls.  The current system
++        only checks the system limit during fork() calls.  If the sysctl option
++        is enabled, a sysctl option with name "execve_limiting" is created.
++
++config GRKERNSEC_DMESG
++      bool "Dmesg(8) restriction"
++      help
++        If you say Y here, non-root users will not be able to use dmesg(8)
++        to view up to the last 4kb of messages in the kernel's log buffer.
++        If the sysctl option is enabled, a sysctl option with name "dmesg" is
++        created.
++
++config GRKERNSEC_RANDPID
++      bool "Randomized PIDs"
++      help
++        If you say Y here, all PIDs created on the system will be
++        pseudo-randomly generated.  This is extremely effective along
++        with the /proc restrictions to disallow an attacker from guessing
++        pids of daemons, etc.  PIDs are also used in some cases as part
++        of a naming system for temporary files, so this option would keep
++        those filenames from being predicted as well.  We also use code
++        to make sure that PID numbers aren't reused too soon.  If the sysctl
++        option is enabled, a sysctl option with name "rand_pids" is created.
++
++config GRKERNSEC_TPE
++      bool "Trusted Path Execution (TPE)"
++      help
++        If you say Y here, you will be able to choose a gid to add to the
++        supplementary groups of users you want to mark as "untrusted."
++        These users will not be able to execute any files that are not in
++        root-owned directories writable only by root.  If the sysctl option
++        is enabled, a sysctl option with name "tpe" is created.
++
++config GRKERNSEC_TPE_ALL
++      bool "Partially restrict non-root users"
++      depends on GRKERNSEC_TPE
++      help
++        If you say Y here, All non-root users other than the ones in the
++        group specified in the main TPE option will only be allowed to
++        execute files in directories they own that are not group or
++        world-writable, or in directories owned by root and writable only by
++        root.  If the sysctl option is enabled, a sysctl option with name
++        "tpe_restrict_all" is created.
++
++config GRKERNSEC_TPE_GID
++      int "GID for untrusted users"
++      depends on GRKERNSEC_TPE
++      default 1005
++      help
++        Here you can choose the GID to enable trusted path protection for.
++        Remember to add the users you want protection enabled for to the GID
++        specified here.  If the sysctl option is enabled, whatever you choose
++        here won't matter. You'll have to specify the GID in your bootup
++        script by echoing the GID to the proper /proc entry.  View the help
++        on the sysctl option for more information.  If the sysctl option is
++        enabled, a sysctl option with name "tpe_gid" is created.
++
++endmenu
++menu "Network Protections"
++depends on GRKERNSEC
++
++config GRKERNSEC_RANDNET
++      bool "Larger entropy pools"
++      help
++        If you say Y here, the entropy pools used for many features of Linux
++        and grsecurity will be doubled in size.  Since several grsecurity
++        features use additional randomness, it is recommended that you say Y
++        here.  Saying Y here has a similar effect as modifying
++        /proc/sys/kernel/random/poolsize.
++
++config GRKERNSEC_RANDISN
++      bool "Truly random TCP ISN selection"
++      help
++        If you say Y here, Linux's default selection of TCP Initial Sequence
++        Numbers (ISNs) will be replaced with that of OpenBSD.  Linux uses
++        an MD4 hash based on the connection plus a time value to create the
++        ISN, while OpenBSD's selection is random.  If the sysctl option is
++        enabled, a sysctl option with name "rand_isns" is created.
++
++config GRKERNSEC_RANDID
++      bool "Randomized IP IDs"
++      help
++        If you say Y here, all the id field on all outgoing packets
++        will be randomized.  This hinders os fingerprinters and
++        keeps your machine from being used as a bounce for an untraceable
++        portscan.  Ids are used for fragmented packets, fragments belonging
++        to the same packet have the same id.  By default linux only
++        increments the id value on each packet sent to an individual host.
++        We use a port of the OpenBSD random ip id code to achieve the
++        randomness, while keeping the possibility of id duplicates to
++        near none.  If the sysctl option is enabled, a sysctl option with name
++        "rand_ip_ids" is created.
++
++config GRKERNSEC_RANDSRC
++      bool "Randomized TCP source ports"
++      default n if GRKERNSEC_LOW || GRKERNSEC_MID
++      default y if GRKERNSEC_HIGH
++      help
++        If you say Y here, situations where a source port is generated on the
++        fly for the TCP protocol (ie. with connect() ) will be altered so that
++        the source port is generated at random, instead of a simple incrementing
++        algorithm.  If the sysctl option is enabled, a sysctl option with name
++        "rand_tcp_src_ports" is created.
++
++config GRKERNSEC_RANDRPC
++      bool "Randomized RPC XIDs"
++      help
++        If you say Y here, the method of determining XIDs for RPC requests will
++        be randomized, instead of using linux's default behavior of simply
++        incrementing the XID.  If you want your RPC connections to be more
++        secure, say Y here.  If the sysctl option is enabled, a sysctl option
++        with name "rand_rpc" is created.
++
++config GRKERNSEC_SOCKET
++      bool "Socket restrictions"
++      help
++        If you say Y here, you will be able to choose from several options.
++        If you assign a GID on your system and add it to the supplementary
++        groups of users you want to restrict socket access to, this patch
++        will perform up to three things, based on the option(s) you choose.
++
++config GRKERNSEC_SOCKET_ALL
++      bool "Deny any sockets to group"
++      depends on GRKERNSEC_SOCKET
++      help
++        If you say Y here, you will be able to choose a GID of whose users will
++        be unable to connect to other hosts from your machine or run server
++        applications from your machine.  If the sysctl option is enabled, a
++        sysctl option with name "socket_all" is created.
++
++config GRKERNSEC_SOCKET_ALL_GID
++      int "GID to deny all sockets for"
++      depends on GRKERNSEC_SOCKET_ALL
++      default 1004
++      help
++        Here you can choose the GID to disable socket access for. Remember to
++        add the users you want socket access disabled for to the GID
++        specified here.  If the sysctl option is enabled, whatever you choose
++        here won't matter. You'll have to specify the GID in your bootup
++        script by echoing the GID to the proper /proc entry.  View the help
++        on the sysctl option for more information.  If the sysctl option is
++        enabled, a sysctl option with name "socket_all_gid" is created.
++
++config GRKERNSEC_SOCKET_CLIENT
++      bool "Deny client sockets to group"
++      depends on GRKERNSEC_SOCKET
++      help
++        If you say Y here, you will be able to choose a GID of whose users will
++        be unable to connect to other hosts from your machine, but will be
++        able to run servers.  If this option is enabled, all users in the group
++        you specify will have to use passive mode when initiating ftp transfers
++        from the shell on your machine.  If the sysctl option is enabled, a
++        sysctl option with name "socket_client" is created.
++
++config GRKERNSEC_SOCKET_CLIENT_GID
++      int "GID to deny client sockets for"
++      depends on GRKERNSEC_SOCKET_CLIENT
++      default 1003
++      help
++        Here you can choose the GID to disable client socket access for.
++        Remember to add the users you want client socket access disabled for to
++        the GID specified here.  If the sysctl option is enabled, whatever you
++        choose here won't matter. You'll have to specify the GID in your bootup
++        script by echoing the GID to the proper /proc entry.  View the help
++        on the sysctl option for more information.  If the sysctl option is
++        enabled, a sysctl option with name "socket_client_gid" is created.
++
++config GRKERNSEC_SOCKET_SERVER
++      bool "Deny server sockets to group"
++      depends on GRKERNSEC_SOCKET
++      help
++        If you say Y here, you will be able to choose a GID of whose users will
++        be unable to run server applications from your machine.  If the sysctl
++        option is enabled, a sysctl option with name "socket_server" is created.
++
++config GRKERNSEC_SOCKET_SERVER_GID
++      int "GID to deny server sockets for"
++      depends on GRKERNSEC_SOCKET_SERVER
++      default 1002
++      help
++        Here you can choose the GID to disable server socket access for.
++        Remember to add the users you want server socket access disabled for to
++        the GID specified here.  If the sysctl option is enabled, whatever you
++        choose here won't matter. You'll have to specify the GID in your bootup
++        script by echoing the GID to the proper /proc entry.  View the help
++        on the sysctl option for more information.  If the sysctl option is
++        enabled, a sysctl option with name "socket_server_gid" is created.
++
++endmenu
++menu "Sysctl support"
++depends on GRKERNSEC && SYSCTL
++
++config GRKERNSEC_SYSCTL
++      bool "Sysctl support"
++      help
++        If you say Y here, you will be able to change the options that
++        grsecurity runs with at bootup, without having to recompile your
++        kernel.  You can echo values to files in /proc/sys/kernel/grsecurity
++        to enable (1) or disable (0) various features.  All the sysctl entries
++        are mutable until the "grsec_lock" entry is set to a non-zero value.
++        All features are disabled by default. Please note that this option could
++        reduce the effectiveness of the added security of this patch if an ACL
++        system is not put in place.  Your init scripts should be read-only, and
++        root should not have access to adding modules or performing raw i/o
++        operations.  All options should be set at startup, and the grsec_lock
++        entry should be set to a non-zero value after all the options are set.
++        *THIS IS EXTREMELY IMPORTANT*
++
++endmenu
++menu "Logging Options"
++depends on GRKERNSEC
++
++config GRKERNSEC_FLOODTIME
++      int "Seconds in between log messages (minimum)"
++      default 10
++      help
++        This option allows you to enforce the number of seconds between
++        grsecurity log messages.  The default should be suitable for most
++        people, however, if you choose to change it, choose a value small enough
++        to allow informative logs to be produced, but large enough to
++        prevent flooding.
++
++config GRKERNSEC_FLOODBURST
++      int "Number of messages in a burst (maximum)"
++      default 4
++      help
++        This option allows you to choose the maximum number of messages allowed
++        within the flood time interval you chose in a separate option.  The
++        default should be suitable for most people, however if you find that
++        many of your logs are being interpreted as flooding, you may want to
++        raise this value.
++
++endmenu
++
++menu "PaX"
++depends on GRKERNSEC
++
++config PAX
++      bool "Enable various PaX features"
++      depends on ALPHA || IA64 || MIPS32 || MIPS64 || PARISC || PPC32 || PPC64 || SPARC32 || SPARC64 || X86 || X86_64
++      help
++        This allows you to enable various PaX features.  PaX adds
++        intrusion prevention mechanisms to the kernel that reduce
++        the risks posed by exploitable memory corruption bugs.
++
++menu "PaX Control"
++      depends on PAX
++
++config PAX_SOFTMODE
++      bool 'Support soft mode'
++      help
++        Enabling this option will allow you to run PaX in soft mode, that
++        is, PaX features will not be enforced by default, only on executables
++        marked explicitly.  You must also enable PT_PAX_FLAGS support as it
++        is the only way to mark executables for soft mode use.
++
++        Soft mode can be activated by using the "pax_softmode=1" kernel command
++        line option on boot.  Furthermore you can control various PaX features
++        at runtime via the entries in /proc/sys/kernel/pax.
++
++config PAX_EI_PAX
++      bool 'Use legacy ELF header marking'
++      help
++        Enabling this option will allow you to control PaX features on
++        a per executable basis via the 'chpax' utility available at
++        http://pax.grsecurity.net/.  The control flags will be read from
++        an otherwise reserved part of the ELF header.  This marking has
++        numerous drawbacks (no support for soft-mode, toolchain does not
++        know about the non-standard use of the ELF header) therefore it
++        has been deprecated in favour of PT_PAX_FLAGS support.
++
++        You should enable this option only if your toolchain does not yet
++        support the new control flag location (PT_PAX_FLAGS) or you still
++        have applications not marked by PT_PAX_FLAGS.
++
++        Note that if you enable PT_PAX_FLAGS marking support as well,
++        it will override the legacy EI_PAX marks.
++
++config PAX_PT_PAX_FLAGS
++      bool 'Use ELF program header marking'
++      help
++        Enabling this option will allow you to control PaX features on
++        a per executable basis via the 'paxctl' utility available at
++        http://pax.grsecurity.net/.  The control flags will be read from
++        a PaX specific ELF program header (PT_PAX_FLAGS).  This marking
++        has the benefits of supporting both soft mode and being fully
++        integrated into the toolchain (the binutils patch is available
++        from http://pax.grsecurity.net).
++
++        Note that if you enable the legacy EI_PAX marking support as well,
++        it will be overridden by the PT_PAX_FLAGS marking.
++
++choice
++      prompt 'MAC system integration'
++      default PAX_NO_ACL_FLAGS
++      help
++        Mandatory Access Control systems have the option of controlling
++        PaX flags on a per executable basis, choose the method supported
++        by your particular system.
++
++        - "none": if your MAC system does not interact with PaX,
++        - "direct": if your MAC system defines pax_set_flags() itself,
++        - "hook": if your MAC system uses the pax_set_flags_func callback.
++
++        NOTE: this option is for developers/integrators only.
++
++config PAX_NO_ACL_FLAGS
++      bool 'none'
++
++config PAX_HAVE_ACL_FLAGS
++      bool 'direct'
++
++config PAX_HOOK_ACL_FLAGS
++      bool 'hook'
++endchoice
++
++endmenu
++
++menu "Non-executable pages"
++      depends on PAX
++
++config PAX_NOEXEC
++      bool "Enforce non-executable pages"
++      depends on (PAX_EI_PAX || PAX_PT_PAX_FLAGS || PAX_HAVE_ACL_FLAGS || PAX_HOOK_ACL_FLAGS) && (ALPHA || IA64 || MIPS32 || MIPS64 || PARISC || PPC32 || PPC64 || SPARC32 || SPARC64 || X86 || X86_64)
++      help
++        By design some architectures do not allow for protecting memory
++        pages against execution or even if they do, Linux does not make
++        use of this feature.  In practice this means that if a page is
++        readable (such as the stack or heap) it is also executable.
++
++        There is a well known exploit technique that makes use of this
++        fact and a common programming mistake where an attacker can
++        introduce code of his choice somewhere in the attacked program's
++        memory (typically the stack or the heap) and then execute it.
++
++        If the attacked program was running with different (typically
++        higher) privileges than that of the attacker, then he can elevate
++        his own privilege level (e.g. get a root shell, write to files for
++        which he does not have write access to, etc).
++
++        Enabling this option will let you choose from various features
++        that prevent the injection and execution of 'foreign' code in
++        a program.
++
++        This will also break programs that rely on the old behaviour and
++        expect that dynamically allocated memory via the malloc() family
++        of functions is executable (which it is not).  Notable examples
++        are the XFree86 4.x server, the java runtime and wine.
++
++config PAX_PAGEEXEC
++      bool "Paging based non-executable pages"
++      depends on PAX_NOEXEC && !HIGHPTE && (!X86 || X86_64 || M586 || M586TSC || M586MMX || M686 || MPENTIUMII || MPENTIUMIII || MPENTIUM4 || MK7 || MK8)
++      select PAX_NOVSYSCALL if X86 && !X86_64
++      help
++        This implementation is based on the paging feature of the CPU.
++        On i386 and ppc there is a variable but usually low performance
++        impact on applications.  On alpha, ia64, parisc, sparc, sparc64
++        and x86_64 there is no performance impact.
++
++config PAX_SEGMEXEC
++      bool "Segmentation based non-executable pages"
++      depends on PAX_NOEXEC && X86 && !X86_64
++      help
++        This implementation is based on the segmentation feature of the
++        CPU and has little performance impact, however applications will
++        be limited to a 1.5 GB address space instead of the normal 3 GB.
++
++choice
++      prompt "Default non-executable page method"
++      depends on PAX_PAGEEXEC && PAX_SEGMEXEC
++      default PAX_DEFAULT_SEGMEXEC
++      help
++        Select the default non-executable page method applied to applications
++        that do not select one themselves.
++
++config        PAX_DEFAULT_PAGEEXEC
++      bool "PAGEEXEC"
++
++config        PAX_DEFAULT_SEGMEXEC
++      bool "SEGMEXEC"
++endchoice
++
++config PAX_EMUTRAMP
++      bool "Emulate trampolines" if (PAX_PAGEEXEC || PAX_SEGMEXEC) && (PARISC || PPC32 || X86) && !X86_64
++      default y if PARISC || PPC32
++      help
++        There are some programs and libraries that for one reason or
++        another attempt to execute special small code snippets from
++        non-executable memory pages.  Most notable examples are the
++        signal handler return code generated by the kernel itself and
++        the GCC trampolines.
++
++        If you enabled CONFIG_PAX_PAGEEXEC or CONFIG_PAX_SEGMEXEC then
++        such programs will no longer work under your kernel.
++
++        As a remedy you can say Y here and use the 'chpax' or 'paxctl'
++        utilities to enable trampoline emulation for the affected programs
++        yet still have the protection provided by the non-executable pages.
++
++        On parisc and ppc you MUST enable this option and EMUSIGRT as
++        well, otherwise your system will not even boot.
++
++        Alternatively you can say N here and use the 'chpax' or 'paxctl'
++        utilities to disable CONFIG_PAX_PAGEEXEC and CONFIG_PAX_SEGMEXEC
++        for the affected files.
++
++        NOTE: enabling this feature *may* open up a loophole in the
++        protection provided by non-executable pages that an attacker
++        could abuse.  Therefore the best solution is to not have any
++        files on your system that would require this option.  This can
++        be achieved by not using libc5 (which relies on the kernel
++        signal handler return code) and not using or rewriting programs
++        that make use of the nested function implementation of GCC.
++        Skilled users can just fix GCC itself so that it implements
++        nested function calls in a way that does not interfere with PaX.
++
++config PAX_EMUSIGRT
++      bool "Automatically emulate sigreturn trampolines"
++      depends on PAX_EMUTRAMP && (PARISC || PPC32)
++      default y
++      help
++        Enabling this option will have the kernel automatically detect
++        and emulate signal return trampolines executing on the stack
++        that would otherwise lead to task termination.
++
++        This solution is intended as a temporary one for users with
++        legacy versions of libc (libc5, glibc 2.0, uClibc before 0.9.17,
++        Modula-3 runtime, etc) or executables linked to such, basically
++        everything that does not specify its own SA_RESTORER function in
++        normal executable memory like glibc 2.1+ does.
++
++        On parisc and ppc you MUST enable this option, otherwise your
++        system will not even boot.
++
++        NOTE: this feature cannot be disabled on a per executable basis
++        and since it *does* open up a loophole in the protection provided
++        by non-executable pages, the best solution is to not have any
++        files on your system that would require this option.
++
++config PAX_MPROTECT
++      bool "Restrict mprotect()"
++      depends on (PAX_PAGEEXEC || PAX_SEGMEXEC) && !PPC64
++      help
++        Enabling this option will prevent programs from
++         - changing the executable status of memory pages that were
++           not originally created as executable,
++         - making read-only executable pages writable again,
++         - creating executable pages from anonymous memory.
++
++        You should say Y here to complete the protection provided by
++        the enforcement of non-executable pages.
++
++        NOTE: you can use the 'chpax' or 'paxctl' utilities to control
++        this feature on a per file basis.
++
++config PAX_NOELFRELOCS
++      bool "Disallow ELF text relocations"
++      depends on PAX_MPROTECT && (IA64 || X86 || X86_64)
++      help
++        Non-executable pages and mprotect() restrictions are effective
++        in preventing the introduction of new executable code into an
++        attacked task's address space.  There remain only two venues
++        for this kind of attack: if the attacker can execute already
++        existing code in the attacked task then he can either have it
++        create and mmap() a file containing his code or have it mmap()
++        an already existing ELF library that does not have position
++        independent code in it and use mprotect() on it to make it
++        writable and copy his code there.  While protecting against
++        the former approach is beyond PaX, the latter can be prevented
++        by having only PIC ELF libraries on one's system (which do not
++        need to relocate their code).  If you are sure this is your case,
++        then enable this option otherwise be careful as you may not even
++        be able to boot or log on your system (for example, some PAM
++        modules are erroneously compiled as non-PIC by default).
++
++        NOTE: if you are using dynamic ELF executables (as suggested
++        when using ASLR) then you must have made sure that you linked
++        your files using the PIC version of crt1 (the et_dyn.tar.gz package
++        referenced there has already been updated to support this).
++
++config PAX_ETEXECRELOCS
++      bool "Allow ELF ET_EXEC text relocations"
++      depends on PAX_MPROTECT && (ALPHA || IA64 || PARISC)
++      default y
++      help
++        On some architectures there are incorrectly created applications
++        that require text relocations and would not work without enabling
++        this option.  If you are an alpha, ia64 or parisc user, you should
++        enable this option and disable it once you have made sure that
++        none of your applications need it.
++
++config PAX_EMUPLT
++      bool "Automatically emulate ELF PLT"
++      depends on PAX_MPROTECT && (ALPHA || PARISC || PPC32 || SPARC32 || SPARC64)
++      default y
++      help
++        Enabling this option will have the kernel automatically detect
++        and emulate the Procedure Linkage Table entries in ELF files.
++        On some architectures such entries are in writable memory, and
++        become non-executable leading to task termination.  Therefore
++        it is mandatory that you enable this option on alpha, parisc, ppc,
++        sparc and sparc64, otherwise your system would not even boot.
++
++        NOTE: this feature *does* open up a loophole in the protection
++        provided by the non-executable pages, therefore the proper
++        solution is to modify the toolchain to produce a PLT that does
++        not need to be writable.
++
++config PAX_DLRESOLVE
++      bool
++      depends on PAX_EMUPLT && (SPARC32 || SPARC64)
++      default y
++
++config PAX_SYSCALL
++      bool
++      depends on PAX_PAGEEXEC && PPC32
++      default y
++
++config PAX_KERNEXEC
++      bool "Enforce non-executable kernel pages"
++      depends on PAX_NOEXEC && X86 && !X86_64 && !MODULES && !HOTPLUG_PCI_COMPAQ_NVRAM
++      help
++        This is the kernel land equivalent of PAGEEXEC and MPROTECT,
++        that is, enabling this option will make it harder to inject
++        and execute 'foreign' code in kernel memory itself.
++
++endmenu
++
++menu "Address Space Layout Randomization"
++      depends on PAX
++
++config PAX_ASLR
++      bool "Address Space Layout Randomization"
++      depends on PAX_EI_PAX || PAX_PT_PAX_FLAGS || PAX_HAVE_ACL_FLAGS || PAX_HOOK_ACL_FLAGS
++      help
++        Many if not most exploit techniques rely on the knowledge of
++        certain addresses in the attacked program.  The following options
++        will allow the kernel to apply a certain amount of randomization
++        to specific parts of the program thereby forcing an attacker to
++        guess them in most cases.  Any failed guess will most likely crash
++        the attacked program which allows the kernel to detect such attempts
++        and react on them.  PaX itself provides no reaction mechanisms,
++        instead it is strongly encouraged that you make use of Nergal's
++        segvguard (ftp://ftp.pl.openwall.com/misc/segvguard/) or grsecurity's
++        (http://www.grsecurity.net/) built-in crash detection features or
++        develop one yourself.
++
++        By saying Y here you can choose to randomize the following areas:
++         - top of the task's kernel stack
++         - top of the task's userland stack
++         - base address for mmap() requests that do not specify one
++           (this includes all libraries)
++         - base address of the main executable
++
++        It is strongly recommended to say Y here as address space layout
++        randomization has negligible impact on performance yet it provides
++        a very effective protection.
++
++        NOTE: you can use the 'chpax' or 'paxctl' utilities to control
++        this feature on a per file basis.
++
++config PAX_RANDKSTACK
++      bool "Randomize kernel stack base"
++      depends on PAX_ASLR && X86_TSC && !X86_64
++      help
++        By saying Y here the kernel will randomize every task's kernel
++        stack on every system call.  This will not only force an attacker
++        to guess it but also prevent him from making use of possible
++        leaked information about it.
++
++        Since the kernel stack is a rather scarce resource, randomization
++        may cause unexpected stack overflows, therefore you should very
++        carefully test your system.  Note that once enabled in the kernel
++        configuration, this feature cannot be disabled on a per file basis.
++
++config PAX_RANDUSTACK
++      bool "Randomize user stack base"
++      depends on PAX_ASLR
++      help
++        By saying Y here the kernel will randomize every task's userland
++        stack.  The randomization is done in two steps where the second
++        one may apply a big amount of shift to the top of the stack and
++        cause problems for programs that want to use lots of memory (more
++        than 2.5 GB if SEGMEXEC is not active, or 1.25 GB when it is).
++        For this reason the second step can be controlled by 'chpax' or
++        'paxctl' on a per file basis.
++
++config PAX_RANDMMAP
++      bool "Randomize mmap() base"
++      depends on PAX_ASLR
++      help
++        By saying Y here the kernel will use a randomized base address for
++        mmap() requests that do not specify one themselves.  As a result
++        all dynamically loaded libraries will appear at random addresses
++        and therefore be harder to exploit by a technique where an attacker
++        attempts to execute library code for his purposes (e.g. spawn a
++        shell from an exploited program that is running at an elevated
++        privilege level).
++
++        Furthermore, if a program is relinked as a dynamic ELF file, its
++        base address will be randomized as well, completing the full
++        randomization of the address space layout.  Attacking such programs
++        becomes a guess game.  You can find an example of doing this at
++        http://pax.grsecurity.net/et_dyn.tar.gz and practical samples at
++        http://www.grsecurity.net/grsec-gcc-specs.tar.gz .
++
++        NOTE: you can use the 'chpax' or 'paxctl' utilities to control this
++        feature on a per file basis.
++
++config PAX_RANDEXEC
++      bool "Randomize ET_EXEC base"
++      depends on PAX_MPROTECT && PAX_RANDMMAP
++      help
++        By saying Y here the kernel will randomize the base address of normal
++        ET_EXEC ELF executables as well.  This is accomplished by mapping the
++        executable in memory in a special way which also allows for detecting
++        attackers who attempt to execute its code for their purposes.  Since
++        this special mapping causes performance degradation and the attack
++        detection may create false alarms as well, you should carefully test
++        your executables when this feature is enabled.
++
++        This solution is intended only as a temporary one until you relink
++        your programs as a dynamic ELF file.
++
++        NOTE: you can use the 'chpax' or 'paxctl' utilities to control this
++        feature on a per file basis.
++
++config PAX_NOVSYSCALL
++      bool "Disable the vsyscall page"
++      depends on PAX_ASLR && X86 && !X86_64
++      help
++        The Linux 2.6 kernel introduced a new feature that speeds up or
++        simplifies certain operations, such as system calls or returns
++        from signal handlers.
++
++        Unfortunately the implementation also gives a powerful instrument
++        into the hands of exploit writers: the so-called vsyscall page exists
++        in every task at the same fixed address and it contains machine code
++        that is very useful in performing the return-to-libc style attack.
++
++        Since this exploit technique cannot in general be protected against
++        via kernel solutions, this option will allow you to disable the use
++        of the vsyscall page and revert back to the old behaviour.
++
++endmenu
++
++endmenu
++
++endmenu
+diff -uNr linux-2.6.8/grsecurity/Makefile linux-2.6.8.grsecurity/grsecurity/Makefile
+--- linux-2.6.8/grsecurity/Makefile    1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/Makefile 2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,21 @@
++# grsecurity's ACL system was originally written in 2001 by Michael Dalton
++# during 2001, 2002, and 2003 it has been completely redesigned by
++# Brad Spengler
++#
++# All code in this directory and various hooks inserted throughout the kernel
++# are copyright Brad Spengler, and released under the GPL, unless otherwise
++# noted (as in obsd_rand.c)
++
++obj-y = grsec_chdir.o grsec_chroot.o grsec_exec.o grsec_fifo.o grsec_fork.o \
++      grsec_mount.o grsec_rand.o grsec_sig.o grsec_sock.o grsec_sysctl.o \
++      grsec_time.o grsec_tpe.o grsec_ipc.o grsec_link.o grsec_textrel.o
++
++obj-$(CONFIG_GRKERNSEC) += grsec_init.o grsum.o gracl.o gracl_ip.o gracl_segv.o obsd_rand.o \
++      gracl_cap.o gracl_alloc.o gracl_shm.o grsec_mem.o gracl_fs.o \
++      gracl_learn.o
++obj-$(CONFIG_GRKERNSEC_RESLOG) += gracl_res.o
++
++ifndef CONFIG_GRKERNSEC
++obj-y += grsec_disabled.o
++endif
++
+diff -uNr linux-2.6.8/grsecurity/obsd_rand.c linux-2.6.8.grsecurity/grsecurity/obsd_rand.c
+--- linux-2.6.8/grsecurity/obsd_rand.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/grsecurity/obsd_rand.c      2004-08-16 17:08:29.000000000 +0200
+@@ -0,0 +1,186 @@
++
++/*
++ * Copyright (c) 1996, 1997, 2000-2002 Michael Shalayeff.
++ * 
++ * Version 1.89, last modified 19-Sep-99
++ *    
++ * Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999.
++ * All rights reserved.
++ *
++ * Copyright 1998 Niels Provos <provos@citi.umich.edu>
++ * All rights reserved.
++ * Theo de Raadt <deraadt@openbsd.org> came up with the idea of using
++ * such a mathematical system to generate more random (yet non-repeating)
++ * ids to solve the resolver/named problem.  But Niels designed the
++ * actual system based on the constraints.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer,
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/time.h>
++#include <linux/timer.h>
++#include <linux/smp_lock.h>
++#include <linux/random.h>
++#include <linux/grsecurity.h>
++
++#define RU_OUT 180
++#define RU_MAX 30000
++#define RU_GEN 2
++#define RU_N 32749
++#define RU_AGEN 7
++#define RU_M 31104
++#define PFAC_N 3
++const static __u16 pfacts[PFAC_N] = { 2, 3, 2729 };
++
++static __u16 ru_x;
++static __u16 ru_seed, ru_seed2;
++static __u16 ru_a, ru_b;
++static __u16 ru_g;
++static __u16 ru_counter = 0;
++static __u16 ru_msb = 0;
++static unsigned long ru_reseed = 0;
++static __u32 tmp;
++
++#define TCP_RNDISS_ROUNDS     15
++#define TCP_RNDISS_OUT                7200
++#define TCP_RNDISS_MAX                30000
++
++static __u8 tcp_rndiss_sbox[128];
++static __u16 tcp_rndiss_msb;
++static __u16 tcp_rndiss_cnt;
++static unsigned long tcp_rndiss_reseed;
++
++static __u16 pmod(__u16, __u16, __u16);
++static void ip_initid(void);
++__u16 ip_randomid(void);
++
++static __u16
++pmod(__u16 gen, __u16 exp, __u16 mod)
++{
++      __u16 s, t, u;
++
++      s = 1;
++      t = gen;
++      u = exp;
++
++      while (u) {
++              if (u & 1)
++                      s = (s * t) % mod;
++              u >>= 1;
++              t = (t * t) % mod;
++      }
++      return (s);
++}
++
++static void
++ip_initid(void)
++{
++      __u16 j, i;
++      int noprime = 1;
++
++      ru_x = ((tmp = get_random_long()) & 0xFFFF) % RU_M;
++
++      ru_seed = (tmp >> 16) & 0x7FFF;
++      ru_seed2 = get_random_long() & 0x7FFF;
++
++      ru_b = ((tmp = get_random_long()) & 0xfffe) | 1;
++      ru_a = pmod(RU_AGEN, (tmp >> 16) & 0xfffe, RU_M);
++      while (ru_b % 3 == 0)
++              ru_b += 2;
++
++      j = (tmp = get_random_long()) % RU_N;
++      tmp = tmp >> 16;
++
++      while (noprime) {
++              for (i = 0; i < PFAC_N; i++)
++                      if (j % pfacts[i] == 0)
++                              break;
++
++              if (i >= PFAC_N)
++                      noprime = 0;
++              else
++                      j = (j + 1) % RU_N;
++      }
++
++      ru_g = pmod(RU_GEN, j, RU_N);
++      ru_counter = 0;
++
++      ru_reseed = xtime.tv_sec + RU_OUT;
++      ru_msb = ru_msb == 0x8000 ? 0 : 0x8000;
++}
++
++__u16
++ip_randomid(void)
++{
++      int i, n;
++
++      if (ru_counter >= RU_MAX || time_after(get_seconds(), ru_reseed))
++              ip_initid();
++
++      if (!tmp)
++              tmp = get_random_long();
++
++      n = tmp & 0x3;
++      tmp = tmp >> 2;
++      if (ru_counter + n >= RU_MAX)
++              ip_initid();
++      for (i = 0; i <= n; i++)
++              ru_x = (ru_a * ru_x + ru_b) % RU_M;
++      ru_counter += i;
++
++      return ((ru_seed ^ pmod(ru_g, ru_seed2 ^ ru_x, RU_N)) | ru_msb);
++}
++
++__u16
++tcp_rndiss_encrypt(__u16 val)
++{
++      __u16 sum = 0, i;
++
++      for (i = 0; i < TCP_RNDISS_ROUNDS; i++) {
++              sum += 0x79b9;
++              val ^= ((__u16) tcp_rndiss_sbox[(val ^ sum) & 0x7f]) << 7;
++              val = ((val & 0xff) << 7) | (val >> 8);
++      }
++
++      return val;
++}
++
++static void
++tcp_rndiss_init(void)
++{
++      get_random_bytes(tcp_rndiss_sbox, sizeof (tcp_rndiss_sbox));
++      tcp_rndiss_reseed = get_seconds() + TCP_RNDISS_OUT;
++      tcp_rndiss_msb = tcp_rndiss_msb == 0x8000 ? 0 : 0x8000;
++      tcp_rndiss_cnt = 0;
++}
++
++__u32
++ip_randomisn(void)
++{
++      if (tcp_rndiss_cnt >= TCP_RNDISS_MAX ||
++          time_after(get_seconds(), tcp_rndiss_reseed))
++              tcp_rndiss_init();
++
++      return (((tcp_rndiss_encrypt(tcp_rndiss_cnt++) |
++                tcp_rndiss_msb) << 16) | (get_random_long() & 0x7fff));
++}
+diff -uNr linux-2.6.8/include/asm-alpha/a.out.h linux-2.6.8.grsecurity/include/asm-alpha/a.out.h
+--- linux-2.6.8/include/asm-alpha/a.out.h      2004-08-14 07:37:37.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-alpha/a.out.h   2004-08-16 17:08:29.000000000 +0200
+@@ -98,7 +98,7 @@
+       set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000 \
+                          ? ADDR_LIMIT_32BIT : 0) | PER_OSF4))
+-#define STACK_TOP \
++#define __STACK_TOP \
+   (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
+ #endif
+diff -uNr linux-2.6.8/include/asm-alpha/elf.h linux-2.6.8.grsecurity/include/asm-alpha/elf.h
+--- linux-2.6.8/include/asm-alpha/elf.h        2004-08-14 07:36:58.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-alpha/elf.h     2004-08-16 17:08:29.000000000 +0200
+@@ -89,6 +89,17 @@
+ #define ELF_ET_DYN_BASE               (TASK_UNMAPPED_BASE + 0x1000000)
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      ((tsk)->personality & ADDR_LIMIT_32BIT ? 0x10000 : 0x120000000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               ((tsk)->personality & ADDR_LIMIT_32BIT ? 14 : 28)
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               ((tsk)->personality & ADDR_LIMIT_32BIT ? 14 : 28)
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      ((tsk)->personality & ADDR_LIMIT_32BIT ? 14 : 19)
++#endif
++
+ /* $0 is set by ld.so to a pointer to a function which might be 
+    registered using atexit.  This provides a mean for the dynamic
+    linker to call DT_FINI functions for shared libraries that have
+diff -uNr linux-2.6.8/include/asm-alpha/mman.h linux-2.6.8.grsecurity/include/asm-alpha/mman.h
+--- linux-2.6.8/include/asm-alpha/mman.h       2004-08-14 07:36:12.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-alpha/mman.h    2004-08-16 17:08:29.000000000 +0200
+@@ -29,6 +29,10 @@
+ #define MAP_POPULATE  0x20000         /* populate (prefault) pagetables */
+ #define MAP_NONBLOCK  0x40000         /* do not block on IO */
++#ifdef CONFIG_PAX_RANDEXEC
++#define MAP_MIRROR    0x20000
++#endif
++
+ #define MS_ASYNC      1               /* sync memory asynchronously */
+ #define MS_SYNC               2               /* synchronous memory sync */
+ #define MS_INVALIDATE 4               /* invalidate the caches */
+diff -uNr linux-2.6.8/include/asm-alpha/page.h linux-2.6.8.grsecurity/include/asm-alpha/page.h
+--- linux-2.6.8/include/asm-alpha/page.h       2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-alpha/page.h    2004-08-16 17:08:29.000000000 +0200
+@@ -106,6 +106,15 @@
+ #define VM_DATA_DEFAULT_FLAGS         (VM_READ | VM_WRITE | VM_EXEC | \
+                                        VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                        ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#endif
++#endif
++
+ #endif /* __KERNEL__ */
+ #endif /* _ALPHA_PAGE_H */
+diff -uNr linux-2.6.8/include/asm-alpha/pgtable.h linux-2.6.8.grsecurity/include/asm-alpha/pgtable.h
+--- linux-2.6.8/include/asm-alpha/pgtable.h    2004-08-14 07:36:44.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-alpha/pgtable.h 2004-08-16 17:08:29.000000000 +0200
+@@ -96,6 +96,17 @@
+ #define PAGE_SHARED   __pgprot(_PAGE_VALID | __ACCESS_BITS)
+ #define PAGE_COPY     __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
+ #define PAGE_READONLY __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
++
++#ifdef CONFIG_PAX_PAGEEXEC
++# define PAGE_SHARED_NOEXEC   __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOE)
++# define PAGE_COPY_NOEXEC     __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW | _PAGE_FOE)
++# define PAGE_READONLY_NOEXEC __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW | _PAGE_FOE)
++#else
++# define PAGE_SHARED_NOEXEC   PAGE_SHARED
++# define PAGE_COPY_NOEXEC     PAGE_COPY
++# define PAGE_READONLY_NOEXEC PAGE_READONLY
++#endif
++
+ #define PAGE_KERNEL   __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE | _PAGE_KWE)
+ #define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
+diff -uNr linux-2.6.8/include/asm-i386/a.out.h linux-2.6.8.grsecurity/include/asm-i386/a.out.h
+--- linux-2.6.8/include/asm-i386/a.out.h       2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/a.out.h    2004-08-16 17:08:29.000000000 +0200
+@@ -19,7 +19,11 @@
+ #ifdef __KERNEL__
+-#define STACK_TOP     TASK_SIZE
++#ifdef CONFIG_PAX_SEGMEXEC
++#define __STACK_TOP ((current->flags & PF_PAX_SEGMEXEC)?TASK_SIZE/2:TASK_SIZE)
++#else
++#define __STACK_TOP TASK_SIZE
++#endif
+ #endif
+diff -uNr linux-2.6.8/include/asm-i386/desc.h linux-2.6.8.grsecurity/include/asm-i386/desc.h
+--- linux-2.6.8/include/asm-i386/desc.h        2004-08-14 07:36:10.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/desc.h     2004-08-16 18:09:30.000000000 +0200
+@@ -8,11 +8,71 @@
+ #include <linux/preempt.h>
+ #include <linux/smp.h>
++#include <linux/sched.h>
+ #include <asm/mmu.h>
++#include <asm/pgtable.h>
++#include <asm/tlbflush.h>
+ extern struct desc_struct cpu_gdt_table[NR_CPUS][GDT_ENTRIES];
++#define pax_open_kernel(flags, cr3)           \
++do {                                          \
++      typecheck(unsigned long,flags);         \
++      typecheck(unsigned long,cr3);           \
++      local_irq_save(flags);                  \
++      asm("movl %%cr3,%0":"=r" (cr3));        \
++      load_cr3(kernexec_pg_dir);              \
++} while(0)
++
++#define pax_close_kernel(flags, cr3)          \
++do {                                          \
++      typecheck(unsigned long,flags);         \
++      typecheck(unsigned long,cr3);           \
++      asm("movl %0,%%cr3": :"r" (cr3));       \
++      local_irq_restore(flags);               \
++} while(0)
++
++#define pax_open_kernel_noirq(cr3)                    \
++do {                                          \
++      typecheck(unsigned long,cr3);           \
++      asm("movl %%cr3,%0":"=r" (cr3));        \
++      load_cr3(kernexec_pg_dir);              \
++} while(0)
++
++#define pax_close_kernel_noirq(cr3)                   \
++do {                                          \
++      typecheck(unsigned long,cr3);           \
++      asm("movl %0,%%cr3": :"r" (cr3));       \
++} while(0)
++
++static inline void set_user_cs(struct mm_struct *mm, int cpu)
++{
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++      unsigned long base = mm->context.user_cs_base;
++      unsigned long limit = mm->context.user_cs_limit;
++
++#ifdef CONFIG_PAX_KERNEXEC
++      unsigned long flags, cr3;
++
++      pax_open_kernel(flags, cr3);
++#endif
++
++      if (limit) {
++              limit -= 1UL;
++              limit >>= 12;
++      }
++
++      cpu_gdt_table[cpu][GDT_ENTRY_DEFAULT_USER_CS].a = (limit & 0xFFFFUL) | (base << 16);
++      cpu_gdt_table[cpu][GDT_ENTRY_DEFAULT_USER_CS].b = (limit & 0xF0000UL) | 0xC0FB00UL | (base & 0xFF000000UL) | ((base >> 16) & 0xFFUL);
++
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_close_kernel(flags, cr3);
++#endif
++
++#endif
++}
++
+ struct Xgt_desc_struct {
+       unsigned short size;
+       unsigned long address __attribute__((packed));
+@@ -28,7 +88,7 @@
+  * This is the ldt that every process will get unless we need
+  * something other than this.
+  */
+-extern struct desc_struct default_ldt[];
++extern const struct desc_struct default_ldt[];
+ extern void set_intr_gate(unsigned int irq, void * addr);
+ #define _set_tssldt_desc(n,addr,limit,type) \
+@@ -42,7 +102,7 @@
+       "rorl $16,%%eax" \
+       : "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type))
+-static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr)
++static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, const void *addr)
+ {
+       _set_tssldt_desc(&cpu_gdt_table[cpu][entry], (int)addr,
+               offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89);
+@@ -50,11 +110,27 @@
+ #define set_tss_desc(cpu,addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr)
+-static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size)
++static inline void __set_ldt_desc(unsigned int cpu, const void *addr, unsigned int size)
+ {
+       _set_tssldt_desc(&cpu_gdt_table[cpu][GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82);
+ }
++static inline void set_ldt_desc(unsigned int cpu, const void *addr, unsigned int size)
++{
++#ifdef CONFIG_PAX_KERNEXEC
++      unsigned long flags, cr3;
++
++      pax_open_kernel(flags, cr3);
++#endif
++
++      _set_tssldt_desc(&cpu_gdt_table[cpu][GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82);
++
++#ifdef CONFIG_PAX_KERNEXEC
++      pax_close_kernel(flags, cr3);
++#endif
++
++}
++
+ #define LDT_entry_a(info) \
+       ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff))
+@@ -68,7 +144,7 @@
+       ((info)->seg_32bit << 22) | \
+       ((info)->limit_in_pages << 23) | \
+       ((info)->useable << 20) | \
+-      0x7000)
++      0x7100)
+ #define LDT_empty(info) (\
+       (info)->base_addr       == 0    && \
+@@ -105,7 +181,7 @@
+  */
+ static inline void load_LDT_nolock(mm_context_t *pc, int cpu)
+ {
+-      void *segments = pc->ldt;
++      const void *segments = pc->ldt;
+       int count = pc->size;
+       if (likely(!count)) {
+@@ -124,6 +200,22 @@
+       put_cpu();
+ }
++static inline void _load_LDT(mm_context_t *pc)
++{
++      int cpu = get_cpu();
++      const void *segments = pc->ldt;
++      int count = pc->size;
++
++      if (likely(!count)) {
++              segments = &default_ldt[0];
++              count = 5;
++      }
++              
++      __set_ldt_desc(cpu, segments, count);
++      load_LDT_desc();
++      put_cpu();
++}
++
+ #endif /* !__ASSEMBLY__ */
+ #endif
+diff -uNr linux-2.6.8/include/asm-i386/elf.h linux-2.6.8.grsecurity/include/asm-i386/elf.h
+--- linux-2.6.8/include/asm-i386/elf.h 2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/elf.h      2004-08-16 17:08:29.000000000 +0200
+@@ -72,6 +72,19 @@
+ #define ELF_ET_DYN_BASE         (TASK_SIZE / 3 * 2)
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++#define PAX_ELF_ET_DYN_BASE(tsk)      0x10000000UL
++#endif
++
++#ifdef CONFIG_PAX_ASLR
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               15
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               15
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      ((tsk)->flags & PF_PAX_SEGMEXEC ? 15 : 16)
++#endif
++
+ /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
+    now struct_user_regs, they are different) */
+@@ -113,8 +126,11 @@
+  * Architecture-neutral AT_ values in 0-17, leave some room
+  * for more of them, start the x86-specific ones at 32.
+  */
++
++#ifndef CONFIG_PAX_NOVSYSCALL
+ #define AT_SYSINFO            32
+ #define AT_SYSINFO_EHDR               33
++#endif
+ #ifdef __KERNEL__
+ #define SET_PERSONALITY(ex, ibcs2) do { } while (0)
+@@ -135,7 +151,14 @@
+ #define VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL))
+ #define VSYSCALL_EHDR ((const struct elfhdr *) VSYSCALL_BASE)
++
++#ifndef CONFIG_PAX_NOVSYSCALL
++#ifdef CONFIG_PAX_SEGMEXEC
++#define VSYSCALL_ENTRY        ((current->flags & PF_PAX_SEGMEXEC) ? (unsigned long) &__kernel_vsyscall - SEGMEXEC_TASK_SIZE : (unsigned long) &__kernel_vsyscall)
++#else
+ #define VSYSCALL_ENTRY        ((unsigned long) &__kernel_vsyscall)
++#endif
++
+ extern void __kernel_vsyscall;
+ #define ARCH_DLINFO                                           \
+@@ -191,3 +214,5 @@
+ #endif
+ #endif
++
++#endif
+diff -uNr linux-2.6.8/include/asm-i386/mach-default/apm.h linux-2.6.8.grsecurity/include/asm-i386/mach-default/apm.h
+--- linux-2.6.8/include/asm-i386/mach-default/apm.h    2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/mach-default/apm.h 2004-08-16 17:08:29.000000000 +0200
+@@ -36,7 +36,7 @@
+       __asm__ __volatile__(APM_DO_ZERO_SEGS
+               "pushl %%edi\n\t"
+               "pushl %%ebp\n\t"
+-              "lcall *%%cs:apm_bios_entry\n\t"
++              "lcall *%%ss:apm_bios_entry\n\t"
+               "setc %%al\n\t"
+               "popl %%ebp\n\t"
+               "popl %%edi\n\t"
+@@ -60,7 +60,7 @@
+       __asm__ __volatile__(APM_DO_ZERO_SEGS
+               "pushl %%edi\n\t"
+               "pushl %%ebp\n\t"
+-              "lcall *%%cs:apm_bios_entry\n\t"
++              "lcall *%%ss:apm_bios_entry\n\t"
+               "setc %%bl\n\t"
+               "popl %%ebp\n\t"
+               "popl %%edi\n\t"
+diff -uNr linux-2.6.8/include/asm-i386/mman.h linux-2.6.8.grsecurity/include/asm-i386/mman.h
+--- linux-2.6.8/include/asm-i386/mman.h        2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/mman.h     2004-08-16 17:09:58.000000000 +0200
+@@ -23,6 +23,10 @@
+ #define MAP_POPULATE  0x8000          /* populate (prefault) pagetables */
+ #define MAP_NONBLOCK  0x10000         /* do not block on IO */
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++#define MAP_MIRROR    0x20000
++#endif
++
+ #define MS_ASYNC      1               /* sync memory asynchronously */
+ #define MS_INVALIDATE 2               /* invalidate the caches */
+ #define MS_SYNC               4               /* synchronous memory sync */
+diff -uNr linux-2.6.8/include/asm-i386/mmu_context.h linux-2.6.8.grsecurity/include/asm-i386/mmu_context.h
+--- linux-2.6.8/include/asm-i386/mmu_context.h 2004-08-14 07:36:10.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/mmu_context.h      2004-08-16 17:09:58.000000000 +0200
+@@ -46,6 +46,13 @@
+                */
+               if (unlikely(prev->context.ldt != next->context.ldt))
+                       load_LDT_nolock(&next->context, cpu);
++
++#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP)
++              cpu_clear(cpu, prev->context.cpu_user_cs_mask);
++              cpu_set(cpu, next->context.cpu_user_cs_mask);
++#endif
++
++              set_user_cs(next, cpu);
+       }
+ #ifdef CONFIG_SMP
+       else {
+@@ -58,6 +65,12 @@
+                        */
+                       load_cr3(next->pgd);
+                       load_LDT_nolock(&next->context, cpu);
++
++#ifdef CONFIG_PAX_PAGEEXEC
++                      cpu_set(cpu, next->context.cpu_user_cs_mask);
++#endif
++
++                      set_user_cs(next, cpu);
+               }
+       }
+ #endif
+diff -uNr linux-2.6.8/include/asm-i386/mmu.h linux-2.6.8.grsecurity/include/asm-i386/mmu.h
+--- linux-2.6.8/include/asm-i386/mmu.h 2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/mmu.h      2004-08-16 17:09:58.000000000 +0200
+@@ -12,6 +12,17 @@
+       int size;
+       struct semaphore sem;
+       void *ldt;
++
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++      unsigned long user_cs_base;
++      unsigned long user_cs_limit;
++
++#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP)
++      cpumask_t cpu_user_cs_mask;
++#endif
++
++#endif
++
+ } mm_context_t;
+ #endif
+diff -uNr linux-2.6.8/include/asm-i386/module.h linux-2.6.8.grsecurity/include/asm-i386/module.h
+--- linux-2.6.8/include/asm-i386/module.h      2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/module.h   2004-08-16 17:09:58.000000000 +0200
+@@ -66,6 +66,12 @@
+ #define MODULE_STACKSIZE ""
+ #endif
+-#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE
++#ifdef CONFIG_GRKERNSEC
++#define MODULE_GRSEC "GRSECURITY "
++#else
++#define MODULE_GRSEC ""
++#endif
++
++#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE MODULE_GRSEC
+ #endif /* _ASM_I386_MODULE_H */
+diff -uNr linux-2.6.8/include/asm-i386/page.h linux-2.6.8.grsecurity/include/asm-i386/page.h
+--- linux-2.6.8/include/asm-i386/page.h        2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/page.h     2004-08-16 17:09:58.000000000 +0200
+@@ -124,6 +124,19 @@
+ #define __PAGE_OFFSET         (0xC0000000UL)
+ #endif
++#ifdef CONFIG_PAX_KERNEXEC
++#ifdef __ASSEMBLY__
++#define __KERNEL_TEXT_OFFSET  (0xC0400000)
++#else
++#define __KERNEL_TEXT_OFFSET  (0xC0400000UL)
++#endif
++#else
++#ifdef __ASSEMBLY__
++#define __KERNEL_TEXT_OFFSET  (0)
++#else
++#define __KERNEL_TEXT_OFFSET  (0x0UL)
++#endif
++#endif
+ #define PAGE_OFFSET           ((unsigned long)__PAGE_OFFSET)
+ #define VMALLOC_RESERVE               ((unsigned long)__VMALLOC_RESERVE)
+@@ -145,6 +158,19 @@
+       ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
+                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                        ((current->flags & (PF_PAX_PAGEEXEC|PF_PAX_SEGMEXEC))?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & (PF_PAX_PAGEEXEC|PF_PAX_SEGMEXEC))?0:VM_EXEC))
++#endif
++#endif
++
++#ifdef CONFIG_PAX_PAGEEXEC
++#define CONFIG_ARCH_TRACK_EXEC_LIMIT 1
++#endif
++
+ #endif /* __KERNEL__ */
+ #endif /* _I386_PAGE_H */
+diff -uNr linux-2.6.8/include/asm-i386/pgalloc.h linux-2.6.8.grsecurity/include/asm-i386/pgalloc.h
+--- linux-2.6.8/include/asm-i386/pgalloc.h     2004-08-14 07:36:13.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/pgalloc.h  2004-08-16 17:09:58.000000000 +0200
+@@ -8,7 +8,7 @@
+ #include <linux/mm.h>         /* for struct page */
+ #define pmd_populate_kernel(mm, pmd, pte) \
+-              set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
++              set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte)))
+ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte)
+ {
+diff -uNr linux-2.6.8/include/asm-i386/pgtable.h linux-2.6.8.grsecurity/include/asm-i386/pgtable.h
+--- linux-2.6.8/include/asm-i386/pgtable.h     2004-08-14 07:37:37.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/pgtable.h  2004-08-16 18:14:49.000000000 +0200
+@@ -25,13 +25,6 @@
+ #include <linux/list.h>
+ #include <linux/spinlock.h>
+-/*
+- * ZERO_PAGE is a global shared page that is always zero: used
+- * for zero-mapped memory areas etc..
+- */
+-#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
+-extern unsigned long empty_zero_page[1024];
+-extern pgd_t swapper_pg_dir[1024];
+ extern kmem_cache_t *pgd_cache;
+ extern kmem_cache_t *pmd_cache;
+ extern spinlock_t pgd_lock;
+@@ -54,6 +47,17 @@
+ # include <asm/pgtable-2level-defs.h>
+ #endif
++/*
++ * ZERO_PAGE is a global shared page that is always zero: used
++ * for zero-mapped memory areas etc..
++ */
++#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
++extern unsigned long empty_zero_page[1024];
++extern pgd_t swapper_pg_dir[PTRS_PER_PTE];
++#ifdef CONFIG_PAX_KERNEXEC
++extern pgd_t kernexec_pg_dir[PTRS_PER_PTE];
++#endif
++
+ #define PMD_SIZE      (1UL << PMD_SHIFT)
+ #define PMD_MASK      (~(PMD_SIZE-1))
+ #define PGDIR_SIZE    (1UL << PGDIR_SHIFT)
+@@ -133,21 +137,27 @@
+ #define PAGE_NONE \
+       __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
+-#define PAGE_SHARED \
+-      __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
++#define PAGE_SHARED \
++      __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
+ #define PAGE_SHARED_EXEC \
+       __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
+-#define PAGE_COPY_NOEXEC \
++#define PAGE_SHARED_NOEXEC \
++      PAGE_SHARED
++
++#define PAGE_COPY \
+       __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
+ #define PAGE_COPY_EXEC \
+       __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
+-#define PAGE_COPY \
+-      PAGE_COPY_NOEXEC
++#define PAGE_COPY_NOEXEC \
++      PAGE_COPY
++
+ #define PAGE_READONLY \
+       __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
+ #define PAGE_READONLY_EXEC \
+       __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
++#define PAGE_READONLY_NOEXEC \
++      PAGE_READONLY
+ #define _PAGE_KERNEL \
+       (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_NX)
+@@ -173,18 +183,18 @@
+  * This is the closest we can get..
+  */
+ #define __P000        PAGE_NONE
+-#define __P001        PAGE_READONLY
+-#define __P010        PAGE_COPY
+-#define __P011        PAGE_COPY
++#define __P001        PAGE_READONLY_NOEXEC
++#define __P010        PAGE_COPY_NOEXEC
++#define __P011        PAGE_COPY_NOEXEC
+ #define __P100        PAGE_READONLY_EXEC
+ #define __P101        PAGE_READONLY_EXEC
+ #define __P110        PAGE_COPY_EXEC
+ #define __P111        PAGE_COPY_EXEC
+ #define __S000        PAGE_NONE
+-#define __S001        PAGE_READONLY
+-#define __S010        PAGE_SHARED
+-#define __S011        PAGE_SHARED
++#define __S001        PAGE_READONLY_NOEXEC
++#define __S010        PAGE_SHARED_NOEXEC
++#define __S011        PAGE_SHARED_NOEXEC
+ #define __S100        PAGE_READONLY_EXEC
+ #define __S101        PAGE_READONLY_EXEC
+ #define __S110        PAGE_SHARED_EXEC
+@@ -407,6 +417,8 @@
+ #endif /* !__ASSEMBLY__ */
++#define HAVE_ARCH_UNMAPPED_AREA
++
+ #ifndef CONFIG_DISCONTIGMEM
+ #define kern_addr_valid(addr) (1)
+ #endif /* !CONFIG_DISCONTIGMEM */
+diff -uNr linux-2.6.8/include/asm-i386/processor.h linux-2.6.8.grsecurity/include/asm-i386/processor.h
+--- linux-2.6.8/include/asm-i386/processor.h   2004-08-14 07:36:13.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/processor.h        2004-08-16 17:09:58.000000000 +0200
+@@ -28,7 +28,7 @@
+ };
+ #define desc_empty(desc) \
+-              (!((desc)->a + (desc)->b))
++              (!((desc)->a | (desc)->b))
+ #define desc_equal(desc1, desc2) \
+               (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b))
+@@ -291,10 +291,23 @@
+  */
+ #define TASK_SIZE     (PAGE_OFFSET)
++#ifdef CONFIG_PAX_SEGMEXEC
++#define SEGMEXEC_TASK_SIZE    ((PAGE_OFFSET) / 2)
++#endif
++
+ /* This decides where the kernel will search for a free chunk of vm
+  * space during mmap's.
+  */
++
++#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_PAX_SEGMEXEC)
++#define TASK_UNMAPPED_BASE    (PAGE_ALIGN((current->flags & PF_PAX_PAGEEXEC)? 0x00110000UL : (current->flags & PF_PAX_SEGMEXEC) ? SEGMEXEC_TASK_SIZE/3 : TASK_SIZE/3))
++#elif defined(CONFIG_PAX_PAGEEXEC)
++#define TASK_UNMAPPED_BASE    (PAGE_ALIGN((current->flags & PF_PAX_PAGEEXEC)? 0x00110000UL : TASK_SIZE/3))
++#elif defined(CONFIG_PAX_SEGMEXEC)
++#define TASK_UNMAPPED_BASE    (PAGE_ALIGN((current->flags & PF_PAX_SEGMEXEC) ? SEGMEXEC_TASK_SIZE/3 : TASK_SIZE/3))
++#else
+ #define TASK_UNMAPPED_BASE    (PAGE_ALIGN(TASK_SIZE / 3))
++#endif
+ /*
+  * Size of io_bitmap.
+@@ -488,16 +501,12 @@
+ unsigned long get_wchan(struct task_struct *p);
+ #define THREAD_SIZE_LONGS      (THREAD_SIZE/sizeof(unsigned long))
+-#define KSTK_TOP(info)                                                 \
+-({                                                                     \
+-       unsigned long *__ptr = (unsigned long *)(info);                 \
+-       (unsigned long)(&__ptr[THREAD_SIZE_LONGS]);                     \
+-})
++#define KSTK_TOP(info)         ((info)->task.thread.esp0)
+ #define task_pt_regs(task)                                             \
+ ({                                                                     \
+        struct pt_regs *__regs__;                                       \
+-       __regs__ = (struct pt_regs *)KSTK_TOP((task)->thread_info);     \
++       __regs__ = (struct pt_regs *)((task)->thread.esp0);             \
+        __regs__ - 1;                                                   \
+ })
+@@ -621,7 +630,7 @@
+ extern inline void prefetch(const void *x)
+ {
+       alternative_input(ASM_NOP4,
+-                        "prefetchnta (%1)",
++                        "prefetchnta (%2)",
+                         X86_FEATURE_XMM,
+                         "r" (x));
+ }
+@@ -635,7 +644,7 @@
+ extern inline void prefetchw(const void *x)
+ {
+       alternative_input(ASM_NOP4,
+-                        "prefetchw (%1)",
++                        "prefetchw (%2)",
+                         X86_FEATURE_3DNOW,
+                         "r" (x));
+ }
+diff -uNr linux-2.6.8/include/asm-i386/system.h linux-2.6.8.grsecurity/include/asm-i386/system.h
+--- linux-2.6.8/include/asm-i386/system.h      2004-08-14 07:36:11.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-i386/system.h   2004-08-16 17:09:58.000000000 +0200
+@@ -5,6 +5,7 @@
+ #include <linux/kernel.h>
+ #include <asm/segment.h>
+ #include <asm/cpufeature.h>
++#include <asm/page.h>
+ #include <linux/bitops.h> /* for LOCK_PREFIX */
+ #ifdef __KERNEL__
+@@ -301,7 +302,7 @@
+       asm volatile ("661:\n\t" oldinstr "\n662:\n"                 \
+                     ".section .altinstructions,\"a\"\n"            \
+                     "  .align 4\n"                                   \
+-                    "  .long 661b\n"            /* label */          \
++                    "  .long 661b + %c1\n"       /* label */          \
+                     "  .long 663f\n"            /* new instruction */         \
+                     "  .byte %c0\n"             /* feature bit */    \
+                     "  .byte 662b-661b\n"       /* sourcelen */      \
+@@ -309,7 +310,7 @@
+                     ".previous\n"                                             \
+                     ".section .altinstr_replacement,\"ax\"\n"                 \
+                     "663:\n\t" newinstr "\n664:\n"   /* replacement */    \
+-                    ".previous" :: "i" (feature) : "memory")  
++                    ".previous" :: "i" (feature), "i" (__KERNEL_TEXT_OFFSET) : "memory")  
+ /*
+  * Alternative inline assembly with input.
+@@ -325,7 +326,7 @@
+       asm volatile ("661:\n\t" oldinstr "\n662:\n"                            \
+                     ".section .altinstructions,\"a\"\n"                       \
+                     "  .align 4\n"                                            \
+-                    "  .long 661b\n"            /* label */                   \
++                    "  .long 661b + %c1\n"      /* label */                   \
+                     "  .long 663f\n"            /* new instruction */         \
+                     "  .byte %c0\n"             /* feature bit */             \
+                     "  .byte 662b-661b\n"       /* sourcelen */               \
+@@ -333,7 +334,7 @@
+                     ".previous\n"                                             \
+                     ".section .altinstr_replacement,\"ax\"\n"                 \
+                     "663:\n\t" newinstr "\n664:\n"   /* replacement */        \
+-                    ".previous" :: "i" (feature), input)  
++                    ".previous" :: "i" (feature), "i" (__KERNEL_TEXT_OFFSET), input)  
+ /*
+  * Force strict CPU ordering.
+diff -uNr linux-2.6.8/include/asm-ia64/elf.h linux-2.6.8.grsecurity/include/asm-ia64/elf.h
+--- linux-2.6.8/include/asm-ia64/elf.h 2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ia64/elf.h      2004-08-16 17:09:58.000000000 +0200
+@@ -162,6 +162,16 @@
+ typedef struct ia64_fpreg elf_fpreg_t;
+ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      ((tsk)->personality == PER_LINUX32 ? 0x08048000UL : 0x4000000000000000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               ((tsk)->personality == PER_LINUX32 ? 16 : 43 - PAGE_SHIFT)
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               ((tsk)->personality == PER_LINUX32 ? 16 : 43 - PAGE_SHIFT)
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      ((tsk)->personality == PER_LINUX32 ? 16 : 43 - PAGE_SHIFT)
++#endif
+ struct pt_regs;       /* forward declaration... */
+diff -uNr linux-2.6.8/include/asm-ia64/mman.h linux-2.6.8.grsecurity/include/asm-ia64/mman.h
+--- linux-2.6.8/include/asm-ia64/mman.h        2004-08-14 07:36:58.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ia64/mman.h     2004-08-16 17:09:58.000000000 +0200
+@@ -31,6 +31,10 @@
+ #define MAP_POPULATE  0x08000         /* populate (prefault) pagetables */
+ #define MAP_NONBLOCK  0x10000         /* do not block on IO */
++#ifdef CONFIG_PAX_RANDEXEC
++#define MAP_MIRROR    0x40000
++#endif
++
+ #define MS_ASYNC      1               /* sync memory asynchronously */
+ #define MS_INVALIDATE 2               /* invalidate the caches */
+ #define MS_SYNC               4               /* synchronous memory sync */
+diff -uNr linux-2.6.8/include/asm-ia64/page.h linux-2.6.8.grsecurity/include/asm-ia64/page.h
+--- linux-2.6.8/include/asm-ia64/page.h        2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ia64/page.h     2004-08-16 17:09:58.000000000 +0200
+@@ -187,4 +187,13 @@
+                                        (((current->personality & READ_IMPLIES_EXEC) != 0)     \
+                                         ? VM_EXEC : 0))
++#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                        ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#endif
++#endif
++
+ #endif /* _ASM_IA64_PAGE_H */
+diff -uNr linux-2.6.8/include/asm-ia64/pgtable.h linux-2.6.8.grsecurity/include/asm-ia64/pgtable.h
+--- linux-2.6.8/include/asm-ia64/pgtable.h     2004-08-14 07:36:44.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ia64/pgtable.h  2004-08-16 17:09:58.000000000 +0200
+@@ -121,6 +121,17 @@
+ #define PAGE_READONLY __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_R)
+ #define PAGE_COPY     __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_R)
+ #define PAGE_COPY_EXEC        __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_RX)
++
++#ifdef CONFIG_PAX_PAGEEXEC
++# define PAGE_SHARED_NOEXEC   __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_RW)
++# define PAGE_READONLY_NOEXEC __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_R)
++# define PAGE_COPY_NOEXEC     __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_R)
++#else
++# define PAGE_SHARED_NOEXEC   PAGE_SHARED
++# define PAGE_READONLY_NOEXEC PAGE_READONLY
++# define PAGE_COPY_NOEXEC     PAGE_COPY
++#endif
++
+ #define PAGE_GATE     __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_X_RX)
+ #define PAGE_KERNEL   __pgprot(__DIRTY_BITS  | _PAGE_PL_0 | _PAGE_AR_RWX)
+ #define PAGE_KERNELRX __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_RX)
+diff -uNr linux-2.6.8/include/asm-ia64/ustack.h linux-2.6.8.grsecurity/include/asm-ia64/ustack.h
+--- linux-2.6.8/include/asm-ia64/ustack.h      2004-08-14 07:38:08.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ia64/ustack.h   2004-08-16 17:09:58.000000000 +0200
+@@ -11,6 +11,6 @@
+ #define MAX_USER_STACK_SIZE   (RGN_MAP_LIMIT/2)
+ /* Make a default stack size of 2GB */
+ #define DEFAULT_USER_STACK_SIZE       (1UL << 31)
+-#define STACK_TOP             (0x6000000000000000UL + RGN_MAP_LIMIT)
++#define __STACK_TOP           (0x6000000000000000UL + RGN_MAP_LIMIT)
+ #endif /* _ASM_IA64_USTACK_H */
+diff -uNr linux-2.6.8/include/asm-mips/a.out.h linux-2.6.8.grsecurity/include/asm-mips/a.out.h
+--- linux-2.6.8/include/asm-mips/a.out.h       2004-08-14 07:36:48.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-mips/a.out.h    2004-08-16 17:09:58.000000000 +0200
+@@ -36,10 +36,10 @@
+ #ifdef __KERNEL__
+ #ifdef CONFIG_MIPS32
+-#define STACK_TOP     TASK_SIZE
++#define __STACK_TOP   TASK_SIZE
+ #endif
+ #ifdef CONFIG_MIPS64
+-#define STACK_TOP     (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE)
++#define __STACK_TOP   (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE)
+ #endif
+ #endif
+diff -uNr linux-2.6.8/include/asm-mips/elf.h linux-2.6.8.grsecurity/include/asm-mips/elf.h
+--- linux-2.6.8/include/asm-mips/elf.h 2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-mips/elf.h      2004-08-16 17:09:58.000000000 +0200
+@@ -273,4 +273,15 @@
+ #define ELF_ET_DYN_BASE         (TASK_SIZE / 3 * 2)
+ #endif
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 0x00400000UL : 0x00400000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      (((tsk)->thread.mflags & MF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
++#endif
++
+ #endif /* _ASM_ELF_H */
+diff -uNr linux-2.6.8/include/asm-mips/page.h linux-2.6.8.grsecurity/include/asm-mips/page.h
+--- linux-2.6.8/include/asm-mips/page.h        2004-08-14 07:36:48.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-mips/page.h     2004-08-16 17:09:58.000000000 +0200
+@@ -128,6 +128,15 @@
+ #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
+                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                        ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#endif
++#endif
++
+ #define UNCAC_ADDR(addr)      ((addr) - PAGE_OFFSET + UNCAC_BASE)
+ #define CAC_ADDR(addr)                ((addr) - UNCAC_BASE + PAGE_OFFSET)
+diff -uNr linux-2.6.8/include/asm-parisc/a.out.h linux-2.6.8.grsecurity/include/asm-parisc/a.out.h
+--- linux-2.6.8/include/asm-parisc/a.out.h     2004-08-14 07:38:04.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-parisc/a.out.h  2004-08-16 17:09:58.000000000 +0200
+@@ -22,7 +22,7 @@
+ /* XXX: STACK_TOP actually should be STACK_BOTTOM for parisc.
+  * prumpf */
+-#define STACK_TOP     TASK_SIZE
++#define __STACK_TOP   TASK_SIZE
+ #endif
+diff -uNr linux-2.6.8/include/asm-parisc/elf.h linux-2.6.8.grsecurity/include/asm-parisc/elf.h
+--- linux-2.6.8/include/asm-parisc/elf.h       2004-08-14 07:37:37.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-parisc/elf.h    2004-08-16 17:09:58.000000000 +0200
+@@ -337,6 +337,17 @@
+ #define ELF_ET_DYN_BASE         (TASK_UNMAPPED_BASE + 0x01000000)
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      0x10000UL
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               16
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT 
++#define PAX_DELTA_EXEC_LEN(tsk)               16
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      16
++#endif
++
+ /* This yields a mask that user programs can use to figure out what
+    instruction set this CPU supports.  This could be done in user space,
+    but it's not easy, and we've already done it here.  */
+diff -uNr linux-2.6.8/include/asm-parisc/mman.h linux-2.6.8.grsecurity/include/asm-parisc/mman.h
+--- linux-2.6.8/include/asm-parisc/mman.h      2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-parisc/mman.h   2004-08-16 17:09:58.000000000 +0200
+@@ -23,6 +23,10 @@
+ #define MAP_POPULATE  0x10000         /* populate (prefault) pagetables */
+ #define MAP_NONBLOCK  0x20000         /* do not block on IO */
++#ifdef CONFIG_PAX_RANDEXEC
++#define MAP_MIRROR    0x0400
++#endif
++
+ #define MS_SYNC               1               /* synchronous memory sync */
+ #define MS_ASYNC      2               /* sync memory asynchronously */
+ #define MS_INVALIDATE 4               /* invalidate the caches */
+diff -uNr linux-2.6.8/include/asm-parisc/page.h linux-2.6.8.grsecurity/include/asm-parisc/page.h
+--- linux-2.6.8/include/asm-parisc/page.h      2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-parisc/page.h   2004-08-16 17:09:58.000000000 +0200
+@@ -157,6 +157,15 @@
+ #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
+                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                        ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#endif
++#endif
++
+ #endif /* __KERNEL__ */
+ #endif /* _PARISC_PAGE_H */
+diff -uNr linux-2.6.8/include/asm-parisc/pgtable.h linux-2.6.8.grsecurity/include/asm-parisc/pgtable.h
+--- linux-2.6.8/include/asm-parisc/pgtable.h   2004-08-14 07:37:40.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-parisc/pgtable.h        2004-08-16 17:09:58.000000000 +0200
+@@ -208,6 +208,17 @@
+ #define PAGE_EXECREAD   __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED)
+ #define PAGE_COPY       PAGE_EXECREAD
+ #define PAGE_RWX        __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_EXEC |_PAGE_ACCESSED)
++
++#ifdef CONFIG_PAX_PAGEEXEC
++# define PAGE_SHARED_NOEXEC   __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_ACCESSED)
++# define PAGE_COPY_NOEXEC     __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_ACCESSED)
++# define PAGE_READONLY_NOEXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_ACCESSED)
++#else
++# define PAGE_SHARED_NOEXEC   PAGE_SHARED
++# define PAGE_COPY_NOEXEC     PAGE_COPY
++# define PAGE_READONLY_NOEXEC PAGE_READONLY
++#endif
++
+ #define PAGE_KERNEL   __pgprot(_PAGE_KERNEL)
+ #define PAGE_KERNEL_RO        __pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_DIRTY | _PAGE_ACCESSED)
+ #define PAGE_KERNEL_UNC       __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
+diff -uNr linux-2.6.8/include/asm-ppc/a.out.h linux-2.6.8.grsecurity/include/asm-ppc/a.out.h
+--- linux-2.6.8/include/asm-ppc/a.out.h        2004-08-14 07:36:58.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc/a.out.h     2004-08-16 17:09:58.000000000 +0200
+@@ -2,7 +2,7 @@
+ #define __PPC_A_OUT_H__
+ /* grabbed from the intel stuff  */
+-#define STACK_TOP TASK_SIZE
++#define __STACK_TOP TASK_SIZE
+ struct exec
+diff -uNr linux-2.6.8/include/asm-ppc/elf.h linux-2.6.8.grsecurity/include/asm-ppc/elf.h
+--- linux-2.6.8/include/asm-ppc/elf.h  2004-08-14 07:36:10.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc/elf.h       2004-08-16 17:09:58.000000000 +0200
+@@ -90,6 +90,17 @@
+ #define ELF_ET_DYN_BASE         (0x08000000)
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      0x10000000UL
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               15
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               15
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      15
++#endif
++
+ #define USE_ELF_CORE_DUMP
+ #define ELF_EXEC_PAGESIZE     4096
+diff -uNr linux-2.6.8/include/asm-ppc/mman.h linux-2.6.8.grsecurity/include/asm-ppc/mman.h
+--- linux-2.6.8/include/asm-ppc/mman.h 2004-08-14 07:38:11.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc/mman.h      2004-08-16 17:09:58.000000000 +0200
+@@ -24,6 +24,10 @@
+ #define MAP_POPULATE  0x8000          /* populate (prefault) pagetables */
+ #define MAP_NONBLOCK  0x10000         /* do not block on IO */
++#ifdef CONFIG_PAX_RANDEXEC
++#define MAP_MIRROR    0x0200
++#endif
++
+ #define MS_ASYNC      1               /* sync memory asynchronously */
+ #define MS_INVALIDATE 2               /* invalidate the caches */
+ #define MS_SYNC               4               /* synchronous memory sync */
+diff -uNr linux-2.6.8/include/asm-ppc/page.h linux-2.6.8.grsecurity/include/asm-ppc/page.h
+--- linux-2.6.8/include/asm-ppc/page.h 2004-08-14 07:36:33.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc/page.h      2004-08-16 17:09:58.000000000 +0200
+@@ -163,5 +163,14 @@
+ #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
+                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                        ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#endif
++#endif
++
+ #endif /* __KERNEL__ */
+ #endif /* _PPC_PAGE_H */
+diff -uNr linux-2.6.8/include/asm-ppc/pgtable.h linux-2.6.8.grsecurity/include/asm-ppc/pgtable.h
+--- linux-2.6.8/include/asm-ppc/pgtable.h      2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc/pgtable.h   2004-08-16 17:09:58.000000000 +0200
+@@ -386,11 +386,21 @@
+ #define PAGE_NONE     __pgprot(_PAGE_BASE)
+ #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER)
+-#define PAGE_READONLY_X       __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
++#define PAGE_READONLY_X       __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC | _PAGE_HWEXEC)
+ #define PAGE_SHARED   __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW)
+-#define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC)
++#define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC | _PAGE_HWEXEC)
+ #define PAGE_COPY     __pgprot(_PAGE_BASE | _PAGE_USER)
+-#define PAGE_COPY_X   __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
++#define PAGE_COPY_X   __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC | _PAGE_HWEXEC)
++
++#if defined(CONFIG_PAX_PAGEEXEC) && !defined(CONFIG_40x) && !defined(CONFIG_44x)
++# define PAGE_SHARED_NOEXEC   __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_GUARDED)
++# define PAGE_COPY_NOEXEC     __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_GUARDED)
++# define PAGE_READONLY_NOEXEC __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_GUARDED)
++#else
++# define PAGE_SHARED_NOEXEC   PAGE_SHARED
++# define PAGE_COPY_NOEXEC     PAGE_COPY
++# define PAGE_READONLY_NOEXEC PAGE_READONLY
++#endif
+ #define PAGE_KERNEL           __pgprot(_PAGE_RAM)
+ #define PAGE_KERNEL_NOCACHE   __pgprot(_PAGE_IO)
+@@ -402,21 +412,21 @@
+  * This is the closest we can get..
+  */
+ #define __P000        PAGE_NONE
+-#define __P001        PAGE_READONLY_X
+-#define __P010        PAGE_COPY
+-#define __P011        PAGE_COPY_X
+-#define __P100        PAGE_READONLY
++#define __P001        PAGE_READONLY_NOEXEC
++#define __P010        PAGE_COPY_NOEXEC
++#define __P011        PAGE_COPY_NOEXEC
++#define __P100        PAGE_READONLY_X
+ #define __P101        PAGE_READONLY_X
+-#define __P110        PAGE_COPY
++#define __P110        PAGE_COPY_X
+ #define __P111        PAGE_COPY_X
+ #define __S000        PAGE_NONE
+-#define __S001        PAGE_READONLY_X
+-#define __S010        PAGE_SHARED
+-#define __S011        PAGE_SHARED_X
+-#define __S100        PAGE_READONLY
++#define __S001        PAGE_READONLY_NOEXEC
++#define __S010        PAGE_SHARED_NOEXEC
++#define __S011        PAGE_SHARED_NOEXEC
++#define __S100        PAGE_READONLY_X
+ #define __S101        PAGE_READONLY_X
+-#define __S110        PAGE_SHARED
++#define __S110        PAGE_SHARED_X
+ #define __S111        PAGE_SHARED_X
+ #ifndef __ASSEMBLY__
+diff -uNr linux-2.6.8/include/asm-ppc64/a.out.h linux-2.6.8.grsecurity/include/asm-ppc64/a.out.h
+--- linux-2.6.8/include/asm-ppc64/a.out.h      2004-08-14 07:36:12.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc64/a.out.h   2004-08-16 17:09:58.000000000 +0200
+@@ -35,7 +35,7 @@
+ /* Give 32-bit user space a full 4G address space to live in. */
+ #define STACK_TOP_USER32 (TASK_SIZE_USER32)
+-#define STACK_TOP ((test_thread_flag(TIF_32BIT) || \
++#define __STACK_TOP ((test_thread_flag(TIF_32BIT) || \
+               (ppcdebugset(PPCDBG_BINFMT_32ADDR))) ? \
+               STACK_TOP_USER32 : STACK_TOP_USER64)
+diff -uNr linux-2.6.8/include/asm-ppc64/elf.h linux-2.6.8.grsecurity/include/asm-ppc64/elf.h
+--- linux-2.6.8/include/asm-ppc64/elf.h        2004-08-14 07:37:37.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc64/elf.h     2004-08-16 17:09:58.000000000 +0200
+@@ -154,6 +154,17 @@
+ #define ELF_ET_DYN_BASE         (0x08000000)
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      (0x10000000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               ((test_thread_flag(TIF_32BIT) || (ppcdebugset(PPCDBG_BINFMT_32ADDR))) ? 16 : 24)
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               ((test_thread_flag(TIF_32BIT) || (ppcdebugset(PPCDBG_BINFMT_32ADDR))) ? 16 : 24)
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      ((test_thread_flag(TIF_32BIT) || (ppcdebugset(PPCDBG_BINFMT_32ADDR))) ? 16 : 24)
++#endif
++
+ #ifdef __KERNEL__
+ /* Common routine for both 32-bit and 64-bit processes */
+diff -uNr linux-2.6.8/include/asm-ppc64/mman.h linux-2.6.8.grsecurity/include/asm-ppc64/mman.h
+--- linux-2.6.8/include/asm-ppc64/mman.h       2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc64/mman.h    2004-08-16 17:09:58.000000000 +0200
+@@ -29,6 +29,10 @@
+ #define MAP_DENYWRITE 0x0800          /* ETXTBSY */
+ #define MAP_EXECUTABLE        0x1000          /* mark it as an executable */
++#ifdef CONFIG_PAX_RANDEXEC
++#define MAP_MIRROR    0x0200
++#endif
++
+ #define MS_ASYNC      1               /* sync memory asynchronously */
+ #define MS_INVALIDATE 2               /* invalidate the caches */
+ #define MS_SYNC               4               /* synchronous memory sync */
+diff -uNr linux-2.6.8/include/asm-ppc64/page.h linux-2.6.8.grsecurity/include/asm-ppc64/page.h
+--- linux-2.6.8/include/asm-ppc64/page.h       2004-08-14 07:36:11.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc64/page.h    2004-08-16 17:09:58.000000000 +0200
+@@ -246,5 +246,14 @@
+ #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
+                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                       ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#endif
++#endif
++
+ #endif /* __KERNEL__ */
+ #endif /* _PPC64_PAGE_H */
+diff -uNr linux-2.6.8/include/asm-ppc64/pgtable.h linux-2.6.8.grsecurity/include/asm-ppc64/pgtable.h
+--- linux-2.6.8/include/asm-ppc64/pgtable.h    2004-08-14 07:38:04.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-ppc64/pgtable.h 2004-08-16 17:09:58.000000000 +0200
+@@ -112,6 +112,17 @@
+ #define PAGE_COPY_X   __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
+ #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER)
+ #define PAGE_READONLY_X       __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
++
++#ifdef CONFIG_PAX_PAGEEXEC
++# define PAGE_SHARED_NOEXEC   __pgprot(_PAGE_BASE | _PAGE_RW | _PAGE_USER | _PAGE_GUARDED)
++# define PAGE_COPY_NOEXEC     __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_GUARDED)
++# define PAGE_READONLY_NOEXEC __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_GUARDED)
++#else
++# define PAGE_SHARED_NOEXEC   PAGE_SHARED
++# define PAGE_COPY_NOEXEC     PAGE_COPY
++# define PAGE_READONLY_NOEXEC PAGE_READONLY
++#endif
++
+ #define PAGE_KERNEL   __pgprot(_PAGE_BASE | _PAGE_WRENABLE)
+ #define PAGE_KERNEL_CI        __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED | \
+                              _PAGE_WRENABLE | _PAGE_NO_CACHE | _PAGE_GUARDED)
+@@ -123,21 +134,21 @@
+  * This is the closest we can get..
+  */
+ #define __P000        PAGE_NONE
+-#define __P001        PAGE_READONLY_X
+-#define __P010        PAGE_COPY
+-#define __P011        PAGE_COPY_X
+-#define __P100        PAGE_READONLY
++#define __P001        PAGE_READONLY_NOEXEC
++#define __P010        PAGE_COPY_NOEXEC
++#define __P011        PAGE_COPY_NOEXEC
++#define __P100        PAGE_READONLY_X
+ #define __P101        PAGE_READONLY_X
+-#define __P110        PAGE_COPY
++#define __P110        PAGE_COPY_X
+ #define __P111        PAGE_COPY_X
+ #define __S000        PAGE_NONE
+-#define __S001        PAGE_READONLY_X
+-#define __S010        PAGE_SHARED
+-#define __S011        PAGE_SHARED_X
+-#define __S100        PAGE_READONLY
++#define __S001        PAGE_READONLY_NOEXEC
++#define __S010        PAGE_SHARED_NOEXEC
++#define __S011        PAGE_SHARED_NOEXEC
++#define __S100        PAGE_READONLY_X
+ #define __S101        PAGE_READONLY_X
+-#define __S110        PAGE_SHARED
++#define __S110        PAGE_SHARED_X
+ #define __S111        PAGE_SHARED_X
+ #ifndef __ASSEMBLY__
+diff -uNr linux-2.6.8/include/asm-sparc/a.out.h linux-2.6.8.grsecurity/include/asm-sparc/a.out.h
+--- linux-2.6.8/include/asm-sparc/a.out.h      2004-08-14 07:36:13.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc/a.out.h   2004-08-16 17:09:59.000000000 +0200
+@@ -91,7 +91,7 @@
+ #include <asm/page.h>
+-#define STACK_TOP     (PAGE_OFFSET - PAGE_SIZE)
++#define __STACK_TOP   (PAGE_OFFSET - PAGE_SIZE)
+ #endif /* __KERNEL__ */
+diff -uNr linux-2.6.8/include/asm-sparc/elf.h linux-2.6.8.grsecurity/include/asm-sparc/elf.h
+--- linux-2.6.8/include/asm-sparc/elf.h        2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc/elf.h     2004-08-16 17:09:59.000000000 +0200
+@@ -145,6 +145,17 @@
+ #define ELF_ET_DYN_BASE         (0x08000000)
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      0x10000UL
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               16
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               16
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      16
++#endif
++
+ /* This yields a mask that user programs can use to figure out what
+    instruction set this cpu supports.  This can NOT be done in userspace
+    on Sparc.  */
+diff -uNr linux-2.6.8/include/asm-sparc/mman.h linux-2.6.8.grsecurity/include/asm-sparc/mman.h
+--- linux-2.6.8/include/asm-sparc/mman.h       2004-08-14 07:38:04.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc/mman.h    2004-08-16 17:09:59.000000000 +0200
+@@ -27,6 +27,10 @@
+ #define MAP_DENYWRITE 0x0800          /* ETXTBSY */
+ #define MAP_EXECUTABLE        0x1000          /* mark it as an executable */
++#ifdef CONFIG_PAX_RANDEXEC
++#define MAP_MIRROR    0x0400
++#endif
++
+ #define MS_ASYNC      1               /* sync memory asynchronously */
+ #define MS_INVALIDATE 2               /* invalidate the caches */
+ #define MS_SYNC               4               /* synchronous memory sync */
+diff -uNr linux-2.6.8/include/asm-sparc/page.h linux-2.6.8.grsecurity/include/asm-sparc/page.h
+--- linux-2.6.8/include/asm-sparc/page.h       2004-08-14 07:36:33.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc/page.h    2004-08-16 17:09:59.000000000 +0200
+@@ -176,6 +176,15 @@
+ #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
+                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                       ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#endif
++#endif
++
+ #endif /* __KERNEL__ */
+ #endif /* _SPARC_PAGE_H */
+diff -uNr linux-2.6.8/include/asm-sparc/pgtable.h linux-2.6.8.grsecurity/include/asm-sparc/pgtable.h
+--- linux-2.6.8/include/asm-sparc/pgtable.h    2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc/pgtable.h 2004-08-16 17:09:59.000000000 +0200
+@@ -48,6 +48,13 @@
+ BTFIXUPDEF_INT(page_shared)
+ BTFIXUPDEF_INT(page_copy)
+ BTFIXUPDEF_INT(page_readonly)
++
++#ifdef CONFIG_PAX_PAGEEXEC
++BTFIXUPDEF_INT(page_shared_noexec)
++BTFIXUPDEF_INT(page_copy_noexec)
++BTFIXUPDEF_INT(page_readonly_noexec)
++#endif
++
+ BTFIXUPDEF_INT(page_kernel)
+ #define PMD_SHIFT             SUN4C_PMD_SHIFT
+@@ -69,6 +76,16 @@
+ #define PAGE_COPY      __pgprot(BTFIXUP_INT(page_copy))
+ #define PAGE_READONLY  __pgprot(BTFIXUP_INT(page_readonly))
++#ifdef CONFIG_PAX_PAGEEXEC
++# define PAGE_SHARED_NOEXEC   __pgprot(BTFIXUP_INT(page_shared_noexec))
++# define PAGE_COPY_NOEXEC     __pgprot(BTFIXUP_INT(page_copy_noexec))
++# define PAGE_READONLY_NOEXEC __pgprot(BTFIXUP_INT(page_readonly_noexec))
++#else
++# define PAGE_SHARED_NOEXEC   PAGE_SHARED
++# define PAGE_COPY_NOEXEC     PAGE_COPY
++# define PAGE_READONLY_NOEXEC PAGE_READONLY
++#endif
++
+ extern unsigned long page_kernel;
+ #ifdef MODULE
+diff -uNr linux-2.6.8/include/asm-sparc/pgtsrmmu.h linux-2.6.8.grsecurity/include/asm-sparc/pgtsrmmu.h
+--- linux-2.6.8/include/asm-sparc/pgtsrmmu.h   2004-08-14 07:36:45.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc/pgtsrmmu.h        2004-08-16 17:09:59.000000000 +0200
+@@ -114,6 +114,16 @@
+                                   SRMMU_EXEC | SRMMU_REF)
+ #define SRMMU_PAGE_RDONLY  __pgprot(SRMMU_VALID | SRMMU_CACHE | \
+                                   SRMMU_EXEC | SRMMU_REF)
++
++#ifdef CONFIG_PAX_PAGEEXEC
++#define SRMMU_PAGE_SHARED_NOEXEC  __pgprot(SRMMU_VALID | SRMMU_CACHE | \
++                                         SRMMU_WRITE | SRMMU_REF)
++#define SRMMU_PAGE_COPY_NOEXEC    __pgprot(SRMMU_VALID | SRMMU_CACHE | \
++                                         SRMMU_REF)
++#define SRMMU_PAGE_RDONLY_NOEXEC  __pgprot(SRMMU_VALID | SRMMU_CACHE | \
++                                         SRMMU_REF)
++#endif
++
+ #define SRMMU_PAGE_KERNEL  __pgprot(SRMMU_VALID | SRMMU_CACHE | SRMMU_PRIV | \
+                                   SRMMU_DIRTY | SRMMU_REF)
+diff -uNr linux-2.6.8/include/asm-sparc/uaccess.h linux-2.6.8.grsecurity/include/asm-sparc/uaccess.h
+--- linux-2.6.8/include/asm-sparc/uaccess.h    2004-08-14 07:37:40.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc/uaccess.h 2004-08-16 17:09:59.000000000 +0200
+@@ -41,7 +41,7 @@
+  * No one can read/write anything from userland in the kernel space by setting
+  * large size and address near to PAGE_OFFSET - a fault will break his intentions.
+  */
+-#define __user_ok(addr,size) ((addr) < STACK_TOP)
++#define __user_ok(addr,size) ((addr) < __STACK_TOP)
+ #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
+ #define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size)))
+ #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
+diff -uNr linux-2.6.8/include/asm-sparc64/a.out.h linux-2.6.8.grsecurity/include/asm-sparc64/a.out.h
+--- linux-2.6.8/include/asm-sparc64/a.out.h    2004-08-14 07:37:27.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc64/a.out.h 2004-08-16 17:09:59.000000000 +0200
+@@ -95,7 +95,7 @@
+ #ifdef __KERNEL__
+-#define STACK_TOP (test_thread_flag(TIF_32BIT) ? 0xf0000000 : 0x80000000000L)
++#define __STACK_TOP (test_thread_flag(TIF_32BIT) ? 0xf0000000 : 0x80000000000L)
+ #endif
+diff -uNr linux-2.6.8/include/asm-sparc64/elf.h linux-2.6.8.grsecurity/include/asm-sparc64/elf.h
+--- linux-2.6.8/include/asm-sparc64/elf.h      2004-08-14 07:36:45.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc64/elf.h   2004-08-16 17:09:59.000000000 +0200
+@@ -140,6 +140,16 @@
+ #define ELF_ET_DYN_BASE         0x0000010000000000UL
+ #endif
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      (test_thread_flag(TIF_32BIT) ? 0x10000UL : 0x100000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               (PAGE_SHIFT + 1)
++#define PAX_DELTA_MMAP_LEN(tsk)               (test_thread_flag(TIF_32BIT) ? 14 : 28 )
++#define PAX_DELTA_EXEC_LSB(tsk)               (PAGE_SHIFT + 1)
++#define PAX_DELTA_EXEC_LEN(tsk)               (test_thread_flag(TIF_32BIT) ? 14 : 28 )
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      (test_thread_flag(TIF_32BIT) ? 15 : 29 )
++#endif
+ /* This yields a mask that user programs can use to figure out what
+    instruction set this cpu supports.  */
+diff -uNr linux-2.6.8/include/asm-sparc64/mman.h linux-2.6.8.grsecurity/include/asm-sparc64/mman.h
+--- linux-2.6.8/include/asm-sparc64/mman.h     2004-08-14 07:36:57.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc64/mman.h  2004-08-16 17:09:59.000000000 +0200
+@@ -27,6 +27,10 @@
+ #define MAP_DENYWRITE 0x0800          /* ETXTBSY */
+ #define MAP_EXECUTABLE        0x1000          /* mark it as an executable */
++#ifdef CONFIG_PAX_RANDEXEC
++#define MAP_MIRROR    0x0400
++#endif
++
+ #define MS_ASYNC      1               /* sync memory asynchronously */
+ #define MS_INVALIDATE 2               /* invalidate the caches */
+ #define MS_SYNC               4               /* synchronous memory sync */
+diff -uNr linux-2.6.8/include/asm-sparc64/page.h linux-2.6.8.grsecurity/include/asm-sparc64/page.h
+--- linux-2.6.8/include/asm-sparc64/page.h     2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc64/page.h  2004-08-16 17:09:59.000000000 +0200
+@@ -165,6 +165,15 @@
+ #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
+                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                        ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#endif
++#endif
++
+ #endif /* !(__KERNEL__) */
+ #endif /* !(_SPARC64_PAGE_H) */
+diff -uNr linux-2.6.8/include/asm-sparc64/pgtable.h linux-2.6.8.grsecurity/include/asm-sparc64/pgtable.h
+--- linux-2.6.8/include/asm-sparc64/pgtable.h  2004-08-14 07:36:12.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-sparc64/pgtable.h       2004-08-16 18:20:22.000000000 +0200
+@@ -140,7 +140,7 @@
+  * interpreted that way unless _PAGE_PRESENT is clear.
+  */
+ #define _PAGE_EXEC    _AC(0x0000000000001000,UL)      /* Executable SW bit */
+-#define _PAGE_MODIFIED        _AC(0x0000000000000800,UL)      /* Modified (dirty)  */
++#define _PAGE_MODIFIED        _AC(0x0000000000000800,UL)      /* Modified (dirty)   */
+ #define _PAGE_FILE    _AC(0x0000000000000800,UL)      /* Pagecache page    */
+ #define _PAGE_ACCESSED        _AC(0x0000000000000400,UL)      /* Accessed (ref'd)  */
+ #define _PAGE_READ    _AC(0x0000000000000200,UL)      /* Readable SW Bit   */
+diff -uNr linux-2.6.8/include/asm-x86_64/a.out.h linux-2.6.8.grsecurity/include/asm-x86_64/a.out.h
+--- linux-2.6.8/include/asm-x86_64/a.out.h     2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-x86_64/a.out.h  2004-08-16 17:09:59.000000000 +0200
+@@ -21,7 +21,7 @@
+ #ifdef __KERNEL__
+ #include <linux/thread_info.h>
+-#define STACK_TOP (test_thread_flag(TIF_IA32) ? IA32_PAGE_OFFSET : TASK_SIZE)
++#define __STACK_TOP (test_thread_flag(TIF_IA32) ? IA32_PAGE_OFFSET : TASK_SIZE)
+ #endif
+ #endif /* __A_OUT_GNU_H__ */
+diff -uNr linux-2.6.8/include/asm-x86_64/elf.h linux-2.6.8.grsecurity/include/asm-x86_64/elf.h
+--- linux-2.6.8/include/asm-x86_64/elf.h       2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-x86_64/elf.h    2004-08-16 17:09:59.000000000 +0200
+@@ -89,6 +89,17 @@
+ #define ELF_ET_DYN_BASE         (2 * TASK_SIZE / 3)
++#ifdef CONFIG_PAX_ASLR
++#define PAX_ELF_ET_DYN_BASE(tsk)      (test_thread_flag(TIF_IA32) ? 0x08048000UL : 0x400000UL)
++
++#define PAX_DELTA_MMAP_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_MMAP_LEN(tsk)               (test_thread_flag(TIF_IA32) ? 16 : 24)
++#define PAX_DELTA_EXEC_LSB(tsk)               PAGE_SHIFT
++#define PAX_DELTA_EXEC_LEN(tsk)               (test_thread_flag(TIF_IA32) ? 16 : 24)
++#define PAX_DELTA_STACK_LSB(tsk)      PAGE_SHIFT
++#define PAX_DELTA_STACK_LEN(tsk)      (test_thread_flag(TIF_IA32) ? 16 : 24)
++#endif
++
+ /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
+    now struct_user_regs, they are different). Assumes current is the process
+    getting dumped. */
+diff -uNr linux-2.6.8/include/asm-x86_64/mman.h linux-2.6.8.grsecurity/include/asm-x86_64/mman.h
+--- linux-2.6.8/include/asm-x86_64/mman.h      2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-x86_64/mman.h   2004-08-16 17:09:59.000000000 +0200
+@@ -24,6 +24,10 @@
+ #define MAP_POPULATE  0x8000          /* populate (prefault) pagetables */
+ #define MAP_NONBLOCK  0x10000         /* do not block on IO */
++#ifdef CONFIG_PAX_RANDEXEC
++#define MAP_MIRROR    0x8000
++#endif
++
+ #define MS_ASYNC      1               /* sync memory asynchronously */
+ #define MS_INVALIDATE 2               /* invalidate the caches */
+ #define MS_SYNC               4               /* synchronous memory sync */
+diff -uNr linux-2.6.8/include/asm-x86_64/page.h linux-2.6.8.grsecurity/include/asm-x86_64/page.h
+--- linux-2.6.8/include/asm-x86_64/page.h      2004-08-14 07:36:13.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-x86_64/page.h   2004-08-16 17:09:59.000000000 +0200
+@@ -132,6 +132,16 @@
+ #define __VM_DATA_DEFAULT_FLAGS       (VM_READ | VM_WRITE | VM_EXEC | \
+                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++
++#ifdef CONFIG_PAX_PAGEEXEC
++#define VM_DATA_DEFAULT_FLAGS __VM_DATA_DEFAULT_FLAGS
++#ifdef CONFIG_PAX_MPROTECT
++#define __VM_STACK_FLAGS (((current->flags & PF_PAX_MPROTECT)?0:VM_MAYEXEC) | \
++                        ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#else
++#define __VM_STACK_FLAGS (VM_MAYEXEC | ((current->flags & PF_PAX_PAGEEXEC)?0:VM_EXEC))
++#endif
++#else
+ #define __VM_STACK_FLAGS      (VM_GROWSDOWN | VM_READ | VM_WRITE | VM_EXEC | \
+                                 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+@@ -142,6 +152,8 @@
+ #define VM_STACK_DEFAULT_FLAGS \
+       (test_thread_flag(TIF_IA32) ? vm_stack_flags32 : vm_stack_flags) 
+       
++#endif
++
+ #define CONFIG_ARCH_GATE_AREA 1       
+ #ifndef __ASSEMBLY__
+diff -uNr linux-2.6.8/include/asm-x86_64/pgalloc.h linux-2.6.8.grsecurity/include/asm-x86_64/pgalloc.h
+--- linux-2.6.8/include/asm-x86_64/pgalloc.h   2004-08-14 07:36:59.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-x86_64/pgalloc.h        2004-08-16 17:09:59.000000000 +0200
+@@ -8,7 +8,7 @@
+ #include <linux/mm.h>
+ #define pmd_populate_kernel(mm, pmd, pte) \
+-              set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte)))
++              set_pmd(pmd, __pmd(_KERNPG_TABLE | __pa(pte)))
+ #define pgd_populate(mm, pgd, pmd) \
+               set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pmd)))
+diff -uNr linux-2.6.8/include/asm-x86_64/pgtable.h linux-2.6.8.grsecurity/include/asm-x86_64/pgtable.h
+--- linux-2.6.8/include/asm-x86_64/pgtable.h   2004-08-14 07:37:30.000000000 +0200
++++ linux-2.6.8.grsecurity/include/asm-x86_64/pgtable.h        2004-08-16 17:09:59.000000000 +0200
+@@ -170,6 +170,10 @@
+ #define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
+ #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
+ #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
++
++#define PAGE_READONLY_NOEXEC PAGE_READONLY
++#define PAGE_SHARED_NOEXEC PAGE_SHARED
++
+ #define __PAGE_KERNEL \
+       (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_NX)
+ #define __PAGE_KERNEL_EXEC \
+diff -uNr linux-2.6.8/include/linux/a.out.h linux-2.6.8.grsecurity/include/linux/a.out.h
+--- linux-2.6.8/include/linux/a.out.h  2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/a.out.h       2004-08-16 17:09:59.000000000 +0200
+@@ -7,6 +7,16 @@
+ #include <asm/a.out.h>
++#ifdef CONFIG_PAX_RANDUSTACK
++#define __DELTA_STACK (current->mm->delta_stack)
++#else
++#define __DELTA_STACK 0UL
++#endif
++
++#ifndef STACK_TOP
++#define STACK_TOP     (__STACK_TOP - __DELTA_STACK)
++#endif
++
+ #endif /* __STRUCT_EXEC_OVERRIDE__ */
+ /* these go in the N_MACHTYPE field */
+@@ -37,6 +47,14 @@
+   M_MIPS2 = 152               /* MIPS R6000/R4000 binary */
+ };
++/* Constants for the N_FLAGS field */
++#define F_PAX_PAGEEXEC        1       /* Paging based non-executable pages */
++#define F_PAX_EMUTRAMP        2       /* Emulate trampolines */
++#define F_PAX_MPROTECT        4       /* Restrict mprotect() */
++#define F_PAX_RANDMMAP        8       /* Randomize mmap() base */
++#define F_PAX_RANDEXEC        16      /* Randomize ET_EXEC base */
++#define F_PAX_SEGMEXEC        32      /* Segmentation based non-executable pages */
++
+ #if !defined (N_MAGIC)
+ #define N_MAGIC(exec) ((exec).a_info & 0xffff)
+ #endif
+diff -uNr linux-2.6.8/include/linux/binfmts.h linux-2.6.8.grsecurity/include/linux/binfmts.h
+--- linux-2.6.8/include/linux/binfmts.h        2004-08-14 07:36:58.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/binfmts.h     2004-08-16 17:09:59.000000000 +0200
+@@ -38,6 +38,7 @@
+       unsigned interp_flags;
+       unsigned interp_data;
+       unsigned long loader, exec;
++      int misc;
+ };
+ #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0
+@@ -81,5 +82,8 @@
+ extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
+ extern int set_binfmt(struct linux_binfmt *new);
++void pax_report_fault(struct pt_regs *regs, void *pc, void *sp);
++void pax_report_insns(void *pc, void *sp);
++
+ #endif /* __KERNEL__ */
+ #endif /* _LINUX_BINFMTS_H */
+diff -uNr linux-2.6.8/include/linux/elf.h linux-2.6.8.grsecurity/include/linux/elf.h
+--- linux-2.6.8/include/linux/elf.h    2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/elf.h 2004-08-16 17:09:59.000000000 +0200
+@@ -44,6 +44,16 @@
+ #define PT_GNU_STACK  (PT_LOOS + 0x474e551)
++#define PT_PAX_FLAGS  (PT_LOOS + 0x5041580)
++
++/* Constants for the e_flags field */
++#define EF_PAX_PAGEEXEC               1       /* Paging based non-executable pages */
++#define EF_PAX_EMUTRAMP               2       /* Emulate trampolines */
++#define EF_PAX_MPROTECT               4       /* Restrict mprotect() */
++#define EF_PAX_RANDMMAP               8       /* Randomize mmap() base */
++#define EF_PAX_RANDEXEC               16      /* Randomize ET_EXEC base */
++#define EF_PAX_SEGMEXEC               32      /* Segmentation based non-executable pages */
++
+ /* These constants define the different elf file types */
+ #define ET_NONE   0
+ #define ET_REL    1
+@@ -129,6 +139,8 @@
+ #define DT_DEBUG      21
+ #define DT_TEXTREL    22
+ #define DT_JMPREL     23
++#define DT_FLAGS      30
++  #define DF_TEXTREL  0x00000004
+ #define DT_LOPROC     0x70000000
+ #define DT_HIPROC     0x7fffffff
+@@ -279,6 +291,19 @@
+ #define PF_W          0x2
+ #define PF_X          0x1
++#define PF_PAGEEXEC   (1 << 4)        /* Enable  PAGEEXEC */
++#define PF_NOPAGEEXEC (1 << 5)        /* Disable PAGEEXEC */
++#define PF_SEGMEXEC   (1 << 6)        /* Enable  SEGMEXEC */
++#define PF_NOSEGMEXEC (1 << 7)        /* Disable SEGMEXEC */
++#define PF_MPROTECT   (1 << 8)        /* Enable  MPROTECT */
++#define PF_NOMPROTECT (1 << 9)        /* Disable MPROTECT */
++#define PF_RANDEXEC   (1 << 10)       /* Enable  RANDEXEC */
++#define PF_NORANDEXEC (1 << 11)       /* Disable RANDEXEC */
++#define PF_EMUTRAMP   (1 << 12)       /* Enable  EMUTRAMP */
++#define PF_NOEMUTRAMP (1 << 13)       /* Disable EMUTRAMP */
++#define PF_RANDMMAP   (1 << 14)       /* Enable  RANDMMAP */
++#define PF_NORANDMMAP (1 << 15)       /* Disable RANDMMAP */
++
+ typedef struct elf32_phdr{
+   Elf32_Word  p_type;
+   Elf32_Off   p_offset;
+@@ -371,6 +396,8 @@
+ #define       EI_OSABI        7
+ #define       EI_PAD          8
++#define       EI_PAX          14
++
+ #define       ELFMAG0         0x7f            /* EI_MAG */
+ #define       ELFMAG1         'E'
+ #define       ELFMAG2         'L'
+@@ -427,6 +454,7 @@
+ #define elfhdr                elf32_hdr
+ #define elf_phdr      elf32_phdr
+ #define elf_note      elf32_note
++#define elf_dyn               Elf32_Dyn
+ #else
+@@ -434,6 +462,7 @@
+ #define elfhdr                elf64_hdr
+ #define elf_phdr      elf64_phdr
+ #define elf_note      elf64_note
++#define elf_dyn               Elf64_Dyn
+ #endif
+diff -uNr linux-2.6.8/include/linux/fs.h linux-2.6.8.grsecurity/include/linux/fs.h
+--- linux-2.6.8/include/linux/fs.h     2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/fs.h  2004-08-16 17:09:59.000000000 +0200
+@@ -1203,7 +1203,7 @@
+ /* fs/open.c */
+-extern int do_truncate(struct dentry *, loff_t start);
++extern int do_truncate(struct dentry *, loff_t start, struct vfsmount *);
+ extern struct file *filp_open(const char *, int, int);
+ extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
+ extern int filp_close(struct file *, fl_owner_t id);
+diff -uNr linux-2.6.8/include/linux/gracl.h linux-2.6.8.grsecurity/include/linux/gracl.h
+--- linux-2.6.8/include/linux/gracl.h  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/include/linux/gracl.h       2004-08-16 17:09:59.000000000 +0200
+@@ -0,0 +1,250 @@
++#ifndef GR_ACL_H
++#define GR_ACL_H
++
++#include <linux/grdefs.h>
++#include <linux/resource.h>
++#include <linux/dcache.h>
++#include <asm/resource.h>
++
++/* Major status information */
++
++#define GR_VERSION  "grsecurity 2.0.1"
++#define GRSECURITY_VERSION 0x201
++
++enum {
++
++      SHUTDOWN = 0,
++      ENABLE = 1,
++      SPROLE = 2,
++      RELOAD = 3,
++      SEGVMOD = 4,
++      STATUS = 5,
++      UNSPROLE = 6
++};
++
++/* Password setup definitions
++ * kernel/grhash.c */
++enum {
++      GR_PW_LEN = 128,
++      GR_SALT_LEN = 16,
++      GR_SHA_LEN = 32,
++};
++
++enum {
++      GR_SPROLE_LEN = 64,
++};
++
++/* Begin Data Structures */
++
++struct sprole_pw {
++      unsigned char *rolename;
++      unsigned char salt[GR_SALT_LEN];
++      unsigned char sum[GR_SHA_LEN];  /* 256-bit SHA hash of the password */
++};
++
++struct name_entry {
++      ino_t inode;
++      dev_t device;
++      char *name;
++      __u16 len;
++};
++
++struct acl_role_db {
++      struct acl_role_label **r_hash;
++      __u32 r_size;
++};
++
++struct name_db {
++      struct name_entry **n_hash;
++      __u32 n_size;
++};
++
++struct crash_uid {
++      uid_t uid;
++      unsigned long expires;
++};
++
++struct gr_hash_struct {
++      void **table;
++      void **nametable;
++      void *first;
++      __u32 table_size;
++      __u32 used_size;
++      int type;
++};
++
++/* Userspace Grsecurity ACL data structures */
++struct acl_subject_label {
++      char *filename;
++      ino_t inode;
++      dev_t device;
++      __u32 mode;
++      __u32 cap_mask;
++      __u32 cap_lower;
++
++      struct rlimit res[RLIM_NLIMITS + 1];
++      __u16 resmask;
++
++      __u8 user_trans_type;
++      __u8 group_trans_type;
++      uid_t *user_transitions;
++      gid_t *group_transitions;
++      __u16 user_trans_num;
++      __u16 group_trans_num;
++
++      __u32 ip_proto[8];
++      __u32 ip_type;
++      struct acl_ip_label **ips;
++      __u32 ip_num;
++
++      __u32 crashes;
++      unsigned long expires;
++
++      struct acl_subject_label *parent_subject;
++      struct gr_hash_struct *hash;
++      struct acl_subject_label *prev;
++      struct acl_subject_label *next;
++
++      struct acl_object_label **obj_hash;
++      __u32 obj_hash_size;
++};
++
++struct role_allowed_ip {
++      __u32 addr;
++      __u32 netmask;
++
++      struct role_allowed_ip *prev;
++      struct role_allowed_ip *next;
++};
++
++struct role_transition {
++      char *rolename;
++
++      struct role_transition *prev;
++      struct role_transition *next;
++};
++
++struct acl_role_label {
++      char *rolename;
++      uid_t uidgid;
++      __u16 roletype;
++
++      __u16 auth_attempts;
++      unsigned long expires;
++
++      struct acl_subject_label *root_label;
++      struct gr_hash_struct *hash;
++
++      struct acl_role_label *prev;
++      struct acl_role_label *next;
++
++      struct role_transition *transitions;
++      struct role_allowed_ip *allowed_ips;
++      uid_t *domain_children;
++      __u16 domain_child_num;
++
++      struct acl_subject_label **subj_hash;
++      __u32 subj_hash_size;
++};
++
++struct user_acl_role_db {
++      struct acl_role_label **r_table;
++      __u32 num_pointers;             /* Number of allocations to track */
++      __u32 num_roles;                /* Number of roles */
++      __u32 num_domain_children;      /* Number of domain children */
++      __u32 num_subjects;             /* Number of subjects */
++      __u32 num_objects;              /* Number of objects */
++};
++
++struct acl_object_label {
++      char *filename;
++      ino_t inode;
++      dev_t device;
++      __u32 mode;
++
++      struct acl_subject_label *nested;
++      struct acl_object_label *globbed;
++
++      /* next two structures not used */
++
++      struct acl_object_label *prev;
++      struct acl_object_label *next;
++};
++
++struct acl_ip_label {
++      __u32 addr;
++      __u32 netmask;
++      __u16 low, high;
++      __u8 mode;
++      __u32 type;
++      __u32 proto[8];
++
++      /* next two structures not used */
++
++      struct acl_ip_label *prev;
++      struct acl_ip_label *next;
++};
++
++struct gr_arg {
++      struct user_acl_role_db role_db;
++      unsigned char pw[GR_PW_LEN];
++      unsigned char salt[GR_SALT_LEN];
++      unsigned char sum[GR_SHA_LEN];
++      unsigned char sp_role[GR_SPROLE_LEN];
++      struct sprole_pw *sprole_pws;
++      dev_t segv_device;
++      ino_t segv_inode;
++      uid_t segv_uid;
++      __u16 num_sprole_pws;
++      __u16 mode;
++};
++
++struct gr_arg_wrapper {
++      struct gr_arg *arg;
++      __u32 version;
++      __u32 size;
++};
++
++struct subject_map {
++      struct acl_subject_label *user;
++      struct acl_subject_label *kernel;
++};
++
++struct acl_subj_map_db {
++      struct subject_map **s_hash;
++      __u32 s_size;
++};
++
++/* End Data Structures Section */
++
++/* Hash functions generated by empirical testing by Brad Spengler
++   Makes good use of the low bits of the inode.  Generally 0-1 times
++   in loop for successful match.  0-3 for unsuccessful match.
++   Shift/add algorithm with modulus of table size and an XOR*/
++
++static __inline__ unsigned long
++rhash(const uid_t uid, const __u16 type, const unsigned long sz)
++{
++      return (((uid << type) + (uid ^ type)) % sz);
++}
++
++ static __inline__ unsigned long
++shash(const struct acl_subject_label *userp, const unsigned long sz)
++{
++      return ((const unsigned long)userp % sz);
++}
++
++static __inline__ unsigned long
++fhash(const ino_t ino, const dev_t dev, const unsigned long sz)
++{
++      return (((ino + dev) ^ ((ino << 13) + (ino << 23) + (dev << 9))) % sz);
++}
++
++static __inline__ unsigned long
++nhash(const char *name, const __u16 len, const unsigned long sz)
++{
++      return full_name_hash(name, len) % sz;
++}
++
++#endif
++
+diff -uNr linux-2.6.8/include/linux/gralloc.h linux-2.6.8.grsecurity/include/linux/gralloc.h
+--- linux-2.6.8/include/linux/gralloc.h        1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/include/linux/gralloc.h     2004-08-16 17:09:59.000000000 +0200
+@@ -0,0 +1,8 @@
++#ifndef __GRALLOC_H
++#define __GRALLOC_H
++
++void acl_free_all(void);
++int acl_alloc_stack_init(unsigned long size);
++void *acl_alloc(unsigned long len);
++
++#endif
+diff -uNr linux-2.6.8/include/linux/grdefs.h linux-2.6.8.grsecurity/include/linux/grdefs.h
+--- linux-2.6.8/include/linux/grdefs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/include/linux/grdefs.h      2004-08-16 17:09:59.000000000 +0200
+@@ -0,0 +1,117 @@
++#ifndef GRDEFS_H
++#define GRDEFS_H
++
++/* Begin grsecurity status declarations */
++
++enum {
++      GR_READY = 0x01,
++      GR_STATUS_INIT = 0x00   // disabled state
++};
++
++/* Begin  ACL declarations */
++
++/* Role flags */
++
++enum {
++      GR_ROLE_USER = 0x0001,
++      GR_ROLE_GROUP = 0x0002,
++      GR_ROLE_DEFAULT = 0x0004,
++      GR_ROLE_SPECIAL = 0x0008,
++      GR_ROLE_AUTH = 0x0010,
++      GR_ROLE_NOPW = 0x0020,
++      GR_ROLE_GOD = 0x0040,
++      GR_ROLE_LEARN = 0x0080,
++      GR_ROLE_TPE = 0x0100,
++      GR_ROLE_DOMAIN = 0x0200
++};
++
++/* ACL Subject and Object mode flags */
++enum {
++      GR_DELETED = 0x00000080
++};
++
++/* ACL Object-only mode flags */
++enum {
++      GR_READ         = 0x00000001,
++      GR_APPEND       = 0x00000002,
++      GR_WRITE        = 0x00000004,
++      GR_EXEC         = 0x00000008,
++      GR_FIND         = 0x00000010,
++      GR_INHERIT      = 0x00000040,
++      GR_PTRACERD     = 0x00000100,
++      GR_SETID        = 0x00000200,
++      GR_CREATE       = 0x00000400,
++      GR_DELETE       = 0x00000800,
++      GR_NOPTRACE     = 0x00001000,
++      GR_AUDIT_READ   = 0x00002000,
++      GR_AUDIT_APPEND = 0x00004000,
++      GR_AUDIT_WRITE  = 0x00008000,
++      GR_AUDIT_EXEC   = 0x00010000,
++      GR_AUDIT_FIND   = 0x00020000,
++      GR_AUDIT_INHERIT= 0x00040000,
++      GR_AUDIT_SETID  = 0x00080000,
++      GR_AUDIT_CREATE = 0x00100000,
++      GR_AUDIT_DELETE = 0x00200000,
++      GR_SUPPRESS     = 0x00400000,
++      GR_NOLEARN      = 0x00800000
++};
++
++#define GR_AUDITS (GR_AUDIT_READ | GR_AUDIT_WRITE | GR_AUDIT_APPEND | GR_AUDIT_EXEC | \
++                 GR_AUDIT_FIND | GR_AUDIT_INHERIT | GR_AUDIT_SETID | \
++                 GR_AUDIT_CREATE | GR_AUDIT_DELETE)
++
++/* ACL subject-only mode flags */
++enum {
++      GR_KILL         = 0x00000001,
++      GR_VIEW         = 0x00000002,
++      GR_PROTECTED    = 0x00000100,
++      GR_LEARN        = 0x00000200,
++      GR_OVERRIDE     = 0x00000400,
++      /* just a placeholder, this mode is only used in userspace */
++      GR_DUMMY        = 0x00000800,
++      GR_PAXPAGE      = 0x00001000,
++      GR_PAXSEGM      = 0x00002000,
++      GR_PAXGCC       = 0x00004000,
++      GR_PAXRANDMMAP  = 0x00008000,
++      GR_PAXRANDEXEC  = 0x00010000,
++      GR_PAXMPROTECT  = 0x00020000,
++      GR_PROTSHM      = 0x00040000,
++      GR_KILLPROC     = 0x00080000,
++      GR_KILLIPPROC   = 0x00100000,
++      /* just a placeholder, this mode is only used in userspace */
++      GR_NOTROJAN     = 0x00200000,
++      GR_PROTPROCFD   = 0x00400000,
++      GR_PROCACCT     = 0x00800000,
++      GR_RELAXPTRACE  = 0x01000000,
++      GR_NESTED       = 0x02000000
++};
++
++enum {
++      GR_ID_USER      = 0x01,
++      GR_ID_GROUP     = 0x02,
++};
++
++enum {
++      GR_ID_ALLOW     = 0x01,
++      GR_ID_DENY      = 0x02,
++};
++
++#define GR_CRASH_RES  11
++#define GR_UIDTABLE_MAX 500
++
++/* begin resource learning section */
++enum {
++      GR_RLIM_CPU_BUMP = 60,
++      GR_RLIM_FSIZE_BUMP = 50000,
++      GR_RLIM_DATA_BUMP = 10000,
++      GR_RLIM_STACK_BUMP = 1000,
++      GR_RLIM_CORE_BUMP = 10000,
++      GR_RLIM_RSS_BUMP = 500000,
++      GR_RLIM_NPROC_BUMP = 1,
++      GR_RLIM_NOFILE_BUMP = 5,
++      GR_RLIM_MEMLOCK_BUMP = 50000,
++      GR_RLIM_AS_BUMP = 500000,
++      GR_RLIM_LOCKS_BUMP = 2
++};
++
++#endif
+diff -uNr linux-2.6.8/include/linux/grinternal.h linux-2.6.8.grsecurity/include/linux/grinternal.h
+--- linux-2.6.8/include/linux/grinternal.h     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/include/linux/grinternal.h  2004-08-16 17:09:59.000000000 +0200
+@@ -0,0 +1,202 @@
++#ifndef __GRINTERNAL_H
++#define __GRINTERNAL_H
++
++#ifdef CONFIG_GRKERNSEC
++
++#include <linux/fs.h>
++#include <linux/gracl.h>
++#include <linux/grdefs.h>
++#include <linux/grmsg.h>
++
++extern void gr_add_learn_entry(const char *fmt, ...);
++extern __u32 gr_search_file(const struct dentry *dentry, const __u32 mode,
++                          const struct vfsmount *mnt);
++extern __u32 gr_check_create(const struct dentry *new_dentry,
++                           const struct dentry *parent,
++                           const struct vfsmount *mnt, const __u32 mode);
++extern int gr_check_protected_task(const struct task_struct *task);
++extern __u32 to_gr_audit(const __u32 reqmode);
++extern int gr_set_acls(const int type);
++
++extern int gr_acl_is_enabled(void);
++extern char gr_roletype_to_char(void);
++
++extern void gr_handle_alertkill(void);
++extern char *gr_to_filename(const struct dentry *dentry,
++                          const struct vfsmount *mnt);
++extern char *gr_to_filename1(const struct dentry *dentry,
++                          const struct vfsmount *mnt);
++extern char *gr_to_filename2(const struct dentry *dentry,
++                          const struct vfsmount *mnt);
++extern char *gr_to_filename3(const struct dentry *dentry,
++                          const struct vfsmount *mnt);
++
++extern int grsec_enable_link;
++extern int grsec_enable_fifo;
++extern int grsec_enable_execve;
++extern int grsec_enable_forkbomb;
++extern int grsec_forkbomb_gid;
++extern int grsec_forkbomb_sec;
++extern int grsec_forkbomb_max;
++extern int grsec_enable_execlog;
++extern int grsec_enable_signal;
++extern int grsec_enable_forkfail;
++extern int grsec_enable_time;
++extern int grsec_enable_chroot_shmat;
++extern int grsec_enable_chroot_findtask;
++extern int grsec_enable_chroot_mount;
++extern int grsec_enable_chroot_double;
++extern int grsec_enable_chroot_pivot;
++extern int grsec_enable_chroot_chdir;
++extern int grsec_enable_chroot_chmod;
++extern int grsec_enable_chroot_mknod;
++extern int grsec_enable_chroot_fchdir;
++extern int grsec_enable_chroot_nice;
++extern int grsec_enable_chroot_execlog;
++extern int grsec_enable_chroot_caps;
++extern int grsec_enable_chroot_sysctl;
++extern int grsec_enable_chroot_unix;
++extern int grsec_enable_tpe;
++extern int grsec_tpe_gid;
++extern int grsec_enable_tpe_all;
++extern int grsec_enable_sidcaps;
++extern int grsec_enable_randpid;
++extern int grsec_enable_socket_all;
++extern int grsec_socket_all_gid;
++extern int grsec_enable_socket_client;
++extern int grsec_socket_client_gid;
++extern int grsec_enable_socket_server;
++extern int grsec_socket_server_gid;
++extern int grsec_audit_gid;
++extern int grsec_enable_group;
++extern int grsec_enable_audit_ipc;
++extern int grsec_enable_audit_textrel;
++extern int grsec_enable_mount;
++extern int grsec_enable_chdir;
++extern int grsec_lock;
++
++extern struct task_struct *child_reaper;
++
++extern spinlock_t grsec_alert_lock;
++extern unsigned long grsec_alert_wtime;
++extern unsigned long grsec_alert_fyet;
++
++extern spinlock_t grsec_audit_lock;
++
++extern rwlock_t grsec_exec_file_lock;
++
++#define gr_task_fullpath(tsk) (tsk->exec_file ? \
++                      gr_to_filename2(tsk->exec_file->f_dentry, \
++                      tsk->exec_file->f_vfsmnt) : "/")
++
++#define gr_parent_task_fullpath(tsk) (tsk->parent->exec_file ? \
++                      gr_to_filename3(tsk->parent->exec_file->f_dentry, \
++                      tsk->parent->exec_file->f_vfsmnt) : "/")
++
++#define gr_task_fullpath0(tsk) (tsk->exec_file ? \
++                      gr_to_filename(tsk->exec_file->f_dentry, \
++                      tsk->exec_file->f_vfsmnt) : "/")
++
++#define gr_parent_task_fullpath0(tsk) (tsk->parent->exec_file ? \
++                      gr_to_filename1(tsk->parent->exec_file->f_dentry, \
++                      tsk->parent->exec_file->f_vfsmnt) : "/")
++
++#define proc_is_chrooted(tsk_a)  ((tsk_a->pid > 1) && \
++                        ((tsk_a->fs->root->d_inode->i_sb->s_dev != \
++                        child_reaper->fs->root->d_inode->i_sb->s_dev) || \
++                        (tsk_a->fs->root->d_inode->i_ino != \
++                        child_reaper->fs->root->d_inode->i_ino)))
++
++#define have_same_root(tsk_a,tsk_b) ((tsk_a->fs->root->d_inode->i_sb->s_dev == \
++                        tsk_b->fs->root->d_inode->i_sb->s_dev) && \
++                        (tsk_a->fs->root->d_inode->i_ino == \
++                        tsk_b->fs->root->d_inode->i_ino))
++
++#define DEFAULTSECARGS gr_task_fullpath(current), current->comm, \
++                     current->pid, current->uid, \
++                     current->euid, current->gid, current->egid, \
++                     gr_parent_task_fullpath(current), \
++                     current->parent->comm, current->parent->pid, \
++                     current->parent->uid, current->parent->euid, \
++                     current->parent->gid, current->parent->egid
++
++#define GR_CHROOT_CAPS ( \
++      CAP_TO_MASK(CAP_FOWNER) | \
++      CAP_TO_MASK(CAP_LINUX_IMMUTABLE) | CAP_TO_MASK(CAP_NET_ADMIN) | \
++      CAP_TO_MASK(CAP_SYS_MODULE) | CAP_TO_MASK(CAP_SYS_RAWIO) | \
++      CAP_TO_MASK(CAP_SYS_PACCT) | CAP_TO_MASK(CAP_SYS_ADMIN) | \
++      CAP_TO_MASK(CAP_SYS_BOOT) | CAP_TO_MASK(CAP_SYS_TIME) | \
++      CAP_TO_MASK(CAP_NET_RAW) | CAP_TO_MASK(CAP_SYS_TTY_CONFIG) | \
++      CAP_TO_MASK(CAP_IPC_OWNER))
++
++#define security_alert_good(normal_msg,args...) \
++({ \
++      read_lock(&tasklist_lock); \
++      read_lock(&grsec_exec_file_lock); \
++      spin_lock(&grsec_alert_lock); \
++      \
++      if (!grsec_alert_wtime || get_seconds() - grsec_alert_wtime > CONFIG_GRKERNSEC_FLOODTIME) { \
++          grsec_alert_wtime = get_seconds(); grsec_alert_fyet = 0; \
++          if (current->curr_ip && gr_acl_is_enabled()) \
++              printk(KERN_ALERT "grsec: From %u.%u.%u.%u: (%.64s:%c:%.950s) " normal_msg "\n", NIPQUAD(current->curr_ip), current->role->rolename, gr_roletype_to_char(), current->acl->filename , ## args); \
++          else if (current->curr_ip) \
++              printk(KERN_ALERT "grsec: From %u.%u.%u.%u: " normal_msg "\n", NIPQUAD(current->curr_ip) , ## args); \
++          else if (gr_acl_is_enabled()) \
++              printk(KERN_ALERT "grsec: (%.64s:%c:%.950s) " normal_msg "\n", current->role->rolename, gr_roletype_to_char(), current->acl->filename , ## args); \
++          else \
++              printk(KERN_ALERT "grsec: " normal_msg "\n" , ## args); \
++      } else if((get_seconds() - grsec_alert_wtime < CONFIG_GRKERNSEC_FLOODTIME) && (grsec_alert_fyet < CONFIG_GRKERNSEC_FLOODBURST)) { \
++          grsec_alert_fyet++; \
++          if (current->curr_ip && gr_acl_is_enabled()) \
++              printk(KERN_ALERT "grsec: From %u.%u.%u.%u: (%.64s:%c:%.950s) " normal_msg "\n", NIPQUAD(current->curr_ip), current->role->rolename, gr_roletype_to_char(), current->acl->filename , ## args); \
++          else if (current->curr_ip) \
++              printk(KERN_ALERT "grsec: From %u.%u.%u.%u: " normal_msg "\n", NIPQUAD(current->curr_ip) , ## args); \
++          else if (gr_acl_is_enabled()) \
++              printk(KERN_ALERT "grsec: (%.64s:%c:%.950s) " normal_msg "\n", current->role->rolename, gr_roletype_to_char(), current->acl->filename , ## args); \
++          else \
++              printk(KERN_ALERT "grsec: " normal_msg "\n" , ## args); \
++      } else if (grsec_alert_fyet == CONFIG_GRKERNSEC_FLOODBURST) { \
++          grsec_alert_wtime = get_seconds(); grsec_alert_fyet++; \
++          printk(KERN_ALERT "grsec: more alerts, logging disabled for " \
++                  "%d seconds\n", CONFIG_GRKERNSEC_FLOODTIME); \
++      } \
++      \
++      spin_unlock(&grsec_alert_lock); \
++      read_unlock(&grsec_exec_file_lock); \
++      read_unlock(&tasklist_lock); \
++})
++
++#define security_alert(normal_msg,args...) \
++({ \
++      security_alert_good(normal_msg,args); \
++      gr_handle_alertkill(); \
++})
++
++#define security_audit(normal_msg,args...) \
++({ \
++      read_lock(&tasklist_lock); \
++      read_lock(&grsec_exec_file_lock); \
++      spin_lock(&grsec_audit_lock); \
++      if (current->curr_ip && gr_acl_is_enabled()) \
++          printk(KERN_INFO "grsec: From %u.%u.%u.%u: (%.64s:%c:%.950s) " normal_msg "\n", NIPQUAD(current->curr_ip), current->role->rolename, gr_roletype_to_char(), current->acl->filename , ## args); \
++      else if (current->curr_ip) \
++          printk(KERN_INFO "grsec: From %u.%u.%u.%u: " normal_msg "\n", NIPQUAD(current->curr_ip) , ## args); \
++      else if (gr_acl_is_enabled()) \
++          printk(KERN_INFO "grsec: (%.64s:%c:%.950s) " normal_msg "\n", current->role->rolename, gr_roletype_to_char(), current->acl->filename , ## args); \
++      else \
++          printk(KERN_INFO "grsec: " normal_msg "\n" , ## args); \
++      spin_unlock(&grsec_audit_lock); \
++      read_unlock(&grsec_exec_file_lock); \
++      read_unlock(&tasklist_lock); \
++})
++
++#define security_learn(normal_msg,args...) \
++({ \
++      preempt_disable(); \
++      gr_add_learn_entry(normal_msg "\n", ## args); \
++      preempt_enable(); \
++})
++
++#endif
++
++#endif
+diff -uNr linux-2.6.8/include/linux/grmsg.h linux-2.6.8.grsecurity/include/linux/grmsg.h
+--- linux-2.6.8/include/linux/grmsg.h  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/include/linux/grmsg.h       2004-08-16 17:09:59.000000000 +0200
+@@ -0,0 +1,108 @@
++#define DEFAULTSECMSG "%.256s[%.16s:%d] uid/euid:%d/%d gid/egid:%d/%d, parent %.256s[%.16s:%d] uid/euid:%d/%d gid/egid:%d/%d"
++#define GR_ACL_PROCACCT_MSG "%.256s[%.16s:%d] IP:%u.%u.%u.%u TTY:%.64s uid/euid:%d/%d gid/egid:%d/%d run time:[%ud %uh %um %us] cpu time:[%ud %uh %um %us] %s with exit code %ld, parent %.256s[%.16s:%d] IP:%u.%u.%u.%u TTY:%.64s uid/euid:%d/%d gid/egid:%d/%d"
++#define GR_PTRACE_ACL_MSG "denied ptrace of %.950s(%.16s:%d) by " DEFAULTSECMSG
++#define GR_IOPERM_MSG "denied use of ioperm() by " DEFAULTSECMSG
++#define GR_IOPL_MSG "denied use of iopl() by " DEFAULTSECMSG
++#define GR_SHMAT_ACL_MSG "denied attach of shared memory of UID %u, PID %d, ID %u by " DEFAULTSECMSG
++#define GR_UNIX_CHROOT_MSG "denied connect to abstract AF_UNIX socket outside of chroot by " DEFAULTSECMSG
++#define GR_SHMAT_CHROOT_MSG "denied attach of shared memory outside of chroot by " DEFAULTSECMSG
++#define GR_KMEM_MSG "attempted write to /dev/kmem by " DEFAULTSECMSG
++#define GR_PORT_OPEN_MSG "attempted open of /dev/port by " DEFAULTSECMSG
++#define GR_MEM_WRITE_MSG "attempted write of /dev/mem by " DEFAULTSECMSG
++#define GR_MEM_MMAP_MSG "attempted mmap write of /dev/[k]mem by " DEFAULTSECMSG
++#define GR_SYMLINK_MSG "not following symlink %.950s owned by %d.%d by " DEFAULTSECMSG
++#define GR_LEARN_AUDIT_MSG "%s\t%u\t%u\t%u\t%.4095s\t%.4095s\t%lu\t%lu\t%.4095s\t%lu\t%u.%u.%u.%u"
++#define GR_HIDDEN_ACL_MSG "%s access to hidden file %.950s by " DEFAULTSECMSG
++#define GR_OPEN_ACL_MSG "%s open of %.950s for%s%s by " DEFAULTSECMSG
++#define GR_CREATE_ACL_MSG "%s create of %.950s for%s%s by " DEFAULTSECMSG
++#define GR_FIFO_MSG "denied writing FIFO %.950s of %d.%d by " DEFAULTSECMSG
++#define GR_MKNOD_CHROOT_MSG "refused attempt to mknod %.950s from chroot by " DEFAULTSECMSG
++#define GR_MKNOD_ACL_MSG "%s mknod of %.950s by " DEFAULTSECMSG
++#define GR_UNIXCONNECT_ACL_MSG "%s connect to the unix domain socket %.950s by " DEFAULTSECMSG
++#define GR_MKDIR_ACL_MSG "%s mkdir of %.950s by " DEFAULTSECMSG
++#define GR_RMDIR_ACL_MSG "%s rmdir of %.950s by " DEFAULTSECMSG
++#define GR_UNLINK_ACL_MSG "%s unlink of %.950s by " DEFAULTSECMSG
++#define GR_SYMLINK_ACL_MSG "%s symlink from %.480s to %.480s by " DEFAULTSECMSG
++#define GR_HARDLINK_MSG "denied hardlink of %.930s (owned by %d.%d) to %.30s for " DEFAULTSECMSG
++#define GR_LINK_ACL_MSG "%s link of %.480s to %.480s by " DEFAULTSECMSG
++#define GR_INHERIT_ACL_MSG "successful inherit of %.480s's ACL for %.480s by " DEFAULTSECMSG
++#define GR_RENAME_ACL_MSG "%s rename of %.480s to %.480s by " DEFAULTSECMSG
++#define GR_PTRACE_EXEC_ACL_MSG "denied ptrace of %.950s by " DEFAULTSECMSG
++#define GR_NPROC_MSG "attempt to overstep process limit by " DEFAULTSECMSG
++#define GR_EXEC_ACL_MSG "%s execution of %.950s by " DEFAULTSECMSG
++#define GR_EXEC_TPE_MSG "denied untrusted exec of %.950s by " DEFAULTSECMSG
++#define GR_SEGVSTART_ACL_MSG "possible exploit bruteforcing on " DEFAULTSECMSG " Banning uid %u from login for %lu seconds"
++#define GR_SEGVNOSUID_ACL_MSG "possible exploit bruteforcing on " DEFAULTSECMSG " Banning execution for %lu seconds"
++#define GR_MOUNT_CHROOT_MSG "denied attempt to mount %.30s as %.930s from chroot by " DEFAULTSECMSG
++#define GR_PIVOT_CHROOT_MSG "denied attempt to pivot_root from chroot by " DEFAULTSECMSG
++#define GR_TRUNCATE_ACL_MSG "%s truncate of %.950s by " DEFAULTSECMSG
++#define GR_ATIME_ACL_MSG "%s access time change of %.950s by " DEFAULTSECMSG
++#define GR_ACCESS_ACL_MSG "%s access of %.950s for%s%s%s by " DEFAULTSECMSG
++#define GR_CHROOT_CHROOT_MSG "denied attempt to double chroot to %.950s by " DEFAULTSECMSG
++#define GR_FCHMOD_ACL_MSG "%s fchmod of %.950s by " DEFAULTSECMSG
++#define GR_CHMOD_CHROOT_MSG "denied attempt to chmod +s %.950s by " DEFAULTSECMSG
++#define GR_CHMOD_ACL_MSG "%s chmod of %.950s by " DEFAULTSECMSG
++#define GR_CHROOT_FCHDIR_MSG "attempted fchdir outside of chroot to %.950s by " DEFAULTSECMSG
++#define GR_CHOWN_ACL_MSG "%s chown of %.950s by " DEFAULTSECMSG
++#define GR_WRITLIB_ACL_MSG "denied load of writable library %.950s by " DEFAULTSECMSG
++#define GR_INITF_ACL_MSG "init_variables() failed %s"
++#define GR_DISABLED_ACL_MSG "Error loading %s, trying to run kernel with acls disabled. To disable acls at startup use <kernel image name> gracl=off from your boot loader"
++#define GR_DEV_ACL_MSG "/dev/grsec: being fed garbage %d bytes sent %d required"
++#define GR_SHUTS_ACL_MSG "shutdown auth success for " DEFAULTSECMSG
++#define GR_SHUTF_ACL_MSG "shutdown auth failure for " DEFAULTSECMSG
++#define GR_SHUTI_ACL_MSG "ignoring shutdown for disabled RBAC system for " DEFAULTSECMSG
++#define GR_SEGVMODS_ACL_MSG "segvmod auth success for " DEFAULTSECMSG
++#define GR_SEGVMODF_ACL_MSG "segvmod auth failure for " DEFAULTSECMSG
++#define GR_SEGVMODI_ACL_MSG "ignoring segvmod for disabled RBAC system for " DEFAULTSECMSG
++#define GR_ENABLE_ACL_MSG "Loaded %s"
++#define GR_ENABLEF_ACL_MSG "Unable to load %s for " DEFAULTSECMSG " RBAC system may already be enabled."
++#define GR_RELOADI_ACL_MSG "Ignoring reload request for disabled RBAC system"
++#define GR_RELOAD_ACL_MSG "Reloaded %s"
++#define GR_RELOADF_ACL_MSG "Failed reload of %s for " DEFAULTSECMSG
++#define GR_SPROLEI_ACL_MSG "Ignoring change to special role for disabled RBAC system for " DEFAULTSECMSG
++#define GR_SPROLES_ACL_MSG "successful change to special role %s (id %d) by " DEFAULTSECMSG
++#define GR_SPROLEL_ACL_MSG "special role %s (id %d) exited by " DEFAULTSECMSG
++#define GR_SPROLEF_ACL_MSG "special role %s failure for " DEFAULTSECMSG
++#define GR_UNSPROLEI_ACL_MSG "Ignoring unauth of special role for disabled RBAC system for " DEFAULTSECMSG
++#define GR_UNSPROLES_ACL_MSG "successful unauth of special role %s (id %d) by " DEFAULTSECMSG
++#define GR_UNSPROLEF_ACL_MSG "special role unauth of %s failure for " DEFAULTSECMSG
++#define GR_INVMODE_ACL_MSG "Invalid mode %d by " DEFAULTSECMSG
++#define GR_MAXPW_ACL_MSG "Maximum pw attempts reached (%d), locking password authentication"
++#define GR_MAXROLEPW_ACL_MSG "Maximum pw attempts reached (%d) trying to auth to special role %s, locking auth for role of " DEFAULTSECMSG
++#define GR_PRIORITY_CHROOT_MSG "attempted priority change of process (%.16s:%d) by " DEFAULTSECMSG
++#define GR_CAPSET_CHROOT_MSG "denied capset of (%.16s:%d) within chroot by " DEFAULTSECMSG
++#define GR_FAILFORK_MSG "failed fork with errno %d by " DEFAULTSECMSG
++#define GR_NICE_CHROOT_MSG "attempted priority change by " DEFAULTSECMSG
++#define GR_UNISIGLOG_MSG "signal %d sent to " DEFAULTSECMSG
++#define GR_DUALSIGLOG_MSG "signal %d sent to " DEFAULTSECMSG " by " DEFAULTSECMSG
++#define GR_SIG_ACL_MSG "Attempted send of signal %d to protected task " DEFAULTSECMSG " by " DEFAULTSECMSG
++#define GR_SYSCTL_MSG "attempt to modify grsecurity sysctl value : %.32s by " DEFAULTSECMSG
++#define GR_SYSCTL_ACL_MSG "%s sysctl of %.950s for%s%s by " DEFAULTSECMSG
++#define GR_TIME_MSG "time set by " DEFAULTSECMSG
++#define GR_DEFACL_MSG "Fatal: Unable to find ACL for (%.16s:%d)"
++#define GR_MMAP_ACL_MSG "%s executable mmap of %.950s by " DEFAULTSECMSG
++#define GR_MPROTECT_ACL_MSG "%s executable mprotect of %.950s by " DEFAULTSECMSG
++#define GR_SOCK_MSG "attempted socket(%.16s,%.16s,%.16s) by " DEFAULTSECMSG
++#define GR_SOCK2_MSG "attempted socket(%d,%.16s,%.16s) by " DEFAULTSECMSG
++#define GR_BIND_MSG "attempted bind() by " DEFAULTSECMSG
++#define GR_CONNECT_MSG "attempted connect by " DEFAULTSECMSG
++#define GR_BIND_ACL_MSG "attempted bind to %u.%u.%u.%u port %u sock type %.16s protocol %.16s by " DEFAULTSECMSG
++#define GR_CONNECT_ACL_MSG "attempted connect to %u.%u.%u.%u port %u sock type %.16s protocol %.16s by " DEFAULTSECMSG
++#define GR_IP_LEARN_MSG "%s\t%u\t%u\t%u\t%.4095s\t%.4095s\t%u.%u.%u.%u\t%u\t%u\t%u\t%u\t%u.%u.%u.%u"
++#define GR_EXEC_CHROOT_MSG "exec of %.980s within chroot by process " DEFAULTSECMSG
++#define GR_CAP_ACL_MSG "use of %s denied for " DEFAULTSECMSG
++#define GR_USRCHANGE_ACL_MSG "change to uid %d denied for " DEFAULTSECMSG
++#define GR_GRPCHANGE_ACL_MSG "change to gid %d denied for " DEFAULTSECMSG
++#define GR_REMOUNT_AUDIT_MSG "remount of %.30s by " DEFAULTSECMSG
++#define GR_UNMOUNT_AUDIT_MSG "unmount of %.30s by " DEFAULTSECMSG
++#define GR_MOUNT_AUDIT_MSG "mount %.30s to %.64s by " DEFAULTSECMSG
++#define GR_CHDIR_AUDIT_MSG "chdir to %.980s by " DEFAULTSECMSG
++#define GR_EXEC_AUDIT_MSG "exec of %.930s (%.63s) by " DEFAULTSECMSG
++#define GR_MSGQ_AUDIT_MSG "message queue created by " DEFAULTSECMSG
++#define GR_MSGQR_AUDIT_MSG "message queue of uid:%d euid:%d removed by " DEFAULTSECMSG
++#define GR_SEM_AUDIT_MSG "semaphore created by " DEFAULTSECMSG
++#define GR_SEMR_AUDIT_MSG "semaphore of uid:%d euid:%d removed by " DEFAULTSECMSG
++#define GR_SHM_AUDIT_MSG "shared memory of size %d created by " DEFAULTSECMSG
++#define GR_SHMR_AUDIT_MSG "shared memory of uid:%d euid:%d removed by " DEFAULTSECMSG
++#define GR_RESOURCE_MSG "attempted resource overstep by requesting %lu for %.16s against limit %lu by " DEFAULTSECMSG
++#define GR_TEXTREL_AUDIT_MSG "text relocation in %s, VMA:0x%08lx 0x%08lx by " DEFAULTSECMSG
+diff -uNr linux-2.6.8/include/linux/grsecurity.h linux-2.6.8.grsecurity/include/linux/grsecurity.h
+--- linux-2.6.8/include/linux/grsecurity.h     1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/include/linux/grsecurity.h  2004-08-16 17:09:59.000000000 +0200
+@@ -0,0 +1,192 @@
++#ifndef GR_SECURITY_H
++#define GR_SECURITY_H
++#include <linux/fs.h>
++#include <linux/binfmts.h>
++#include <linux/gracl.h>
++
++extern void gr_handle_brute_attach(struct task_struct *p);
++extern void gr_handle_brute_check(void);
++
++extern char gr_roletype_to_char(void);
++
++extern int gr_check_user_change(int real, int effective, int fs);
++extern int gr_check_group_change(int real, int effective, int fs);
++
++extern void gr_add_to_task_ip_table(struct task_struct *p);
++extern void gr_del_task_from_ip_table(struct task_struct *p);
++
++extern int gr_pid_is_chrooted(struct task_struct *p);
++extern int gr_handle_chroot_nice(void);
++extern int gr_handle_chroot_sysctl(const int op);
++extern int gr_handle_chroot_capset(struct task_struct *target);
++extern int gr_handle_chroot_setpriority(struct task_struct *p,
++                                      const int niceval);
++extern int gr_chroot_fchdir(struct dentry *u_dentry, struct vfsmount *u_mnt);
++extern int gr_handle_chroot_chroot(const struct dentry *dentry,
++                                 const struct vfsmount *mnt);
++extern void gr_handle_chroot_caps(struct task_struct *task);
++extern void gr_handle_chroot_chdir(struct dentry *dentry, struct vfsmount *mnt);
++extern int gr_handle_chroot_chmod(const struct dentry *dentry,
++                                const struct vfsmount *mnt, const int mode);
++extern int gr_handle_chroot_mknod(const struct dentry *dentry,
++                                const struct vfsmount *mnt, const int mode);
++extern int gr_handle_chroot_mount(const struct dentry *dentry,
++                                const struct vfsmount *mnt,
++                                const char *dev_name);
++extern int gr_handle_chroot_pivot(void);
++extern int gr_handle_chroot_unix(const pid_t pid);
++
++extern int gr_handle_rawio(const struct inode *inode);
++extern int gr_handle_nproc(void);
++
++extern void gr_handle_ioperm(void);
++extern void gr_handle_iopl(void);
++
++extern int gr_tpe_allow(const struct file *file);
++
++extern int gr_random_pid(void);
++
++extern void gr_log_forkfail(const int retval);
++extern void gr_log_timechange(void);
++extern void gr_log_signal(const int sig, const struct task_struct *t);
++extern void gr_log_chdir(const struct dentry *dentry,
++                       const struct vfsmount *mnt);
++extern void gr_log_chroot_exec(const struct dentry *dentry,
++                             const struct vfsmount *mnt);
++extern void gr_handle_exec_args(struct linux_binprm *bprm, char **argv);
++extern void gr_log_remount(const char *devname, const int retval);
++extern void gr_log_unmount(const char *devname, const int retval);
++extern void gr_log_mount(const char *from, const char *to, const int retval);
++extern void gr_log_msgget(const int ret, const int msgflg);
++extern void gr_log_msgrm(const uid_t uid, const uid_t cuid);
++extern void gr_log_semget(const int err, const int semflg);
++extern void gr_log_semrm(const uid_t uid, const uid_t cuid);
++extern void gr_log_shmget(const int err, const int shmflg, const size_t size);
++extern void gr_log_shmrm(const uid_t uid, const uid_t cuid);
++extern void gr_log_textrel(struct vm_area_struct *vma);
++
++extern int gr_handle_follow_link(const struct inode *parent,
++                               const struct inode *inode,
++                               const struct dentry *dentry,
++                               const struct vfsmount *mnt);
++extern int gr_handle_fifo(const struct dentry *dentry,
++                        const struct vfsmount *mnt,
++                        const struct dentry *dir, const int flag,
++                        const int acc_mode);
++extern int gr_handle_hardlink(const struct dentry *dentry,
++                            const struct vfsmount *mnt,
++                            struct inode *inode,
++                            const int mode, const char *to);
++
++extern int gr_task_is_capable(struct task_struct *task, const int cap);
++extern int gr_is_capable_nolog(const int cap);
++extern void gr_learn_resource(const struct task_struct *task, const int limit,
++                            const unsigned long wanted, const int gt);
++extern void gr_copy_label(struct task_struct *tsk);
++extern void gr_handle_crash(struct task_struct *task, const int sig);
++extern int gr_handle_signal(const struct task_struct *p, const int sig);
++extern int gr_check_crash_uid(const uid_t uid);
++extern int gr_check_protected_task(const struct task_struct *task);
++extern int gr_acl_handle_mmap(const struct file *file,
++                            const unsigned long prot);
++extern int gr_acl_handle_mprotect(const struct file *file,
++                                const unsigned long prot);
++extern int gr_check_hidden_task(const struct task_struct *tsk);
++extern __u32 gr_acl_handle_truncate(const struct dentry *dentry,
++                                  const struct vfsmount *mnt);
++extern __u32 gr_acl_handle_utime(const struct dentry *dentry,
++                               const struct vfsmount *mnt);
++extern __u32 gr_acl_handle_access(const struct dentry *dentry,
++                                const struct vfsmount *mnt, const int fmode);
++extern __u32 gr_acl_handle_fchmod(const struct dentry *dentry,
++                                const struct vfsmount *mnt, mode_t mode);
++extern __u32 gr_acl_handle_chmod(const struct dentry *dentry,
++                               const struct vfsmount *mnt, mode_t mode);
++extern __u32 gr_acl_handle_chown(const struct dentry *dentry,
++                               const struct vfsmount *mnt);
++extern int gr_handle_ptrace(struct task_struct *task, const long request);
++extern int gr_handle_proc_ptrace(struct task_struct *task);
++extern int gr_handle_mmap(const struct file *filp, const unsigned long prot);
++extern __u32 gr_acl_handle_execve(const struct dentry *dentry,
++                                const struct vfsmount *mnt);
++extern int gr_check_crash_exec(const struct file *filp);
++extern int gr_acl_is_enabled(void);
++extern void gr_set_kernel_label(struct task_struct *task);
++extern void gr_set_role_label(struct task_struct *task, const uid_t uid,
++                            const gid_t gid);
++extern int gr_set_proc_label(const struct dentry *dentry,
++                            const struct vfsmount *mnt);
++extern __u32 gr_acl_handle_hidden_file(const struct dentry *dentry,
++                                     const struct vfsmount *mnt);
++extern __u32 gr_acl_handle_open(const struct dentry *dentry,
++                              const struct vfsmount *mnt, const int fmode);
++extern __u32 gr_acl_handle_creat(const struct dentry *dentry,
++                               const struct dentry *p_dentry,
++                               const struct vfsmount *p_mnt, const int fmode,
++                               const int imode);
++extern void gr_handle_create(const struct dentry *dentry,
++                           const struct vfsmount *mnt);
++extern __u32 gr_acl_handle_mknod(const struct dentry *new_dentry,
++                               const struct dentry *parent_dentry,
++                               const struct vfsmount *parent_mnt,
++                               const int mode);
++extern __u32 gr_acl_handle_mkdir(const struct dentry *new_dentry,
++                               const struct dentry *parent_dentry,
++                               const struct vfsmount *parent_mnt);
++extern __u32 gr_acl_handle_rmdir(const struct dentry *dentry,
++                               const struct vfsmount *mnt);
++extern void gr_handle_delete(const ino_t ino, const dev_t dev);
++extern __u32 gr_acl_handle_unlink(const struct dentry *dentry,
++                                const struct vfsmount *mnt);
++extern __u32 gr_acl_handle_symlink(const struct dentry *new_dentry,
++                                 const struct dentry *parent_dentry,
++                                 const struct vfsmount *parent_mnt,
++                                 const char *from);
++extern __u32 gr_acl_handle_link(const struct dentry *new_dentry,
++                              const struct dentry *parent_dentry,
++                              const struct vfsmount *parent_mnt,
++                              const struct dentry *old_dentry,
++                              const struct vfsmount *old_mnt, const char *to);
++extern int gr_acl_handle_rename(struct dentry *new_dentry,
++                              struct dentry *parent_dentry,
++                              const struct vfsmount *parent_mnt,
++                              struct dentry *old_dentry,
++                              struct inode *old_parent_inode,
++                              struct vfsmount *old_mnt, const char *newname);
++extern void gr_handle_rename(struct inode *old_dir, struct inode *new_dir,
++                              struct dentry *old_dentry,
++                              struct dentry *new_dentry,
++                              struct vfsmount *mnt, const __u8 replace);
++extern __u32 gr_check_link(const struct dentry *new_dentry,
++                         const struct dentry *parent_dentry,
++                         const struct vfsmount *parent_mnt,
++                         const struct dentry *old_dentry,
++                         const struct vfsmount *old_mnt);
++extern __u32 gr_acl_handle_filldir(const struct dentry *dentry,
++                                 const struct vfsmount *mnt, const ino_t ino);
++extern __u32 gr_acl_handle_unix(const struct dentry *dentry,
++                              const struct vfsmount *mnt);
++extern void gr_acl_handle_exit(void);
++extern void gr_acl_handle_psacct(struct task_struct *task, const long code);
++extern int gr_acl_handle_procpidmem(const struct task_struct *task);
++extern __u32 gr_cap_rtnetlink(void);
++
++#ifdef CONFIG_GRKERNSEC
++extern void gr_handle_mem_write(void);
++extern void gr_handle_kmem_write(void);
++extern void gr_handle_open_port(void);
++extern int gr_handle_mem_mmap(const unsigned long offset,
++                            struct vm_area_struct *vma);
++
++extern __u16 ip_randomid(void);
++extern __u32 ip_randomisn(void);
++extern unsigned long get_random_long(void);
++
++extern int grsec_enable_dmesg;
++extern int grsec_enable_randid;
++extern int grsec_enable_randisn;
++extern int grsec_enable_randsrc;
++extern int grsec_enable_randrpc;
++#endif
++
++#endif
+diff -uNr linux-2.6.8/include/linux/mman.h linux-2.6.8.grsecurity/include/linux/mman.h
+--- linux-2.6.8/include/linux/mman.h   2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/mman.h        2004-08-16 17:09:59.000000000 +0200
+@@ -56,6 +56,11 @@
+ calc_vm_flag_bits(unsigned long flags)
+ {
+       return _calc_vm_trans(flags, MAP_GROWSDOWN,  VM_GROWSDOWN ) |
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++             _calc_vm_trans(flags, MAP_MIRROR, VM_MIRROR) |
++#endif
++
+              _calc_vm_trans(flags, MAP_DENYWRITE,  VM_DENYWRITE ) |
+              _calc_vm_trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE) |
+              _calc_vm_trans(flags, MAP_LOCKED,     VM_LOCKED    );
+diff -uNr linux-2.6.8/include/linux/mm.h linux-2.6.8.grsecurity/include/linux/mm.h
+--- linux-2.6.8/include/linux/mm.h     2004-08-14 07:36:13.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/mm.h  2004-08-16 17:09:59.000000000 +0200
+@@ -30,6 +30,7 @@
+ #include <asm/pgtable.h>
+ #include <asm/processor.h>
+ #include <asm/atomic.h>
++#include <asm/mman.h>
+ #ifndef MM_VM_SIZE
+ #define MM_VM_SIZE(mm)        TASK_SIZE
+@@ -101,6 +102,11 @@
+ #ifdef CONFIG_NUMA
+       struct mempolicy *vm_policy;    /* NUMA policy for the VMA */
+ #endif
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      unsigned long vm_mirror;        /* PaX: mirror distance */
++#endif
++
+ };
+ /*
+@@ -136,6 +142,18 @@
+ #define VM_HUGETLB    0x00400000      /* Huge TLB Page VM */
+ #define VM_NONLINEAR  0x00800000      /* Is non-linear (remap_file_pages) */
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++#define VM_MIRROR     0x01000000      /* vma is mirroring another */
++#endif
++
++#ifdef CONFIG_PAX_MPROTECT
++#define VM_MAYNOTWRITE        0x02000000      /* vma cannot be granted VM_WRITE any more */
++#endif
++
++#ifdef __VM_STACK_FLAGS
++#define VM_STACK_DEFAULT_FLAGS (0x00000033 | __VM_STACK_FLAGS)
++#endif
++
+ #ifndef VM_STACK_DEFAULT_FLAGS                /* arch can override this */
+ #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
+ #endif
+@@ -637,6 +655,10 @@
+       unsigned long len, unsigned long prot,
+       unsigned long flag, unsigned long pgoff);
++extern unsigned long __do_mmap_pgoff(struct file *file, unsigned long addr,
++      unsigned long len, unsigned long prot,
++      unsigned long flag, unsigned long pgoff);
++
+ static inline unsigned long do_mmap(struct file *file, unsigned long addr,
+       unsigned long len, unsigned long prot,
+       unsigned long flag, unsigned long offset)
+@@ -724,5 +746,11 @@
+ int in_gate_area(struct task_struct *task, unsigned long addr);
+ #endif
++#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
++extern void track_exec_limit(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long prot);
++#else
++static inline void track_exec_limit(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long prot) {}
++#endif
++
+ #endif /* __KERNEL__ */
+ #endif /* _LINUX_MM_H */
+diff -uNr linux-2.6.8/include/linux/proc_fs.h linux-2.6.8.grsecurity/include/linux/proc_fs.h
+--- linux-2.6.8/include/linux/proc_fs.h        2004-08-14 07:38:11.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/proc_fs.h     2004-08-16 17:09:59.000000000 +0200
+@@ -221,7 +221,7 @@
+ #endif /* CONFIG_PROC_FS */
+-#if !defined(CONFIG_PROC_FS)
++#if !defined(CONFIG_PROC_FS) || !defined(CONFIG_PROC_KCORE)
+ static inline void kclist_add(struct kcore_list *new, void *addr, size_t size)
+ {
+ }
+diff -uNr linux-2.6.8/include/linux/random.h linux-2.6.8.grsecurity/include/linux/random.h
+--- linux-2.6.8/include/linux/random.h 2004-08-14 07:38:09.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/random.h      2004-08-16 17:09:59.000000000 +0200
+@@ -69,6 +69,8 @@
+ extern __u32 secure_ipv6_id(__u32 *daddr);
++extern unsigned long pax_get_random_long(void);
++
+ #ifndef MODULE
+ extern struct file_operations random_fops, urandom_fops;
+ #endif
+diff -uNr linux-2.6.8/include/linux/sched.h linux-2.6.8.grsecurity/include/linux/sched.h
+--- linux-2.6.8/include/linux/sched.h  2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/sched.h       2004-08-16 17:09:59.000000000 +0200
+@@ -31,6 +31,7 @@
+ #include <linux/percpu.h>
+ struct exec_domain;
++struct linux_binprm;
+ /*
+  * cloning flags:
+@@ -229,6 +230,21 @@
+       struct kioctx           *ioctx_list;
+       struct kioctx           default_kioctx;
++
++#ifdef CONFIG_PAX_DLRESOLVE
++      unsigned long call_dl_resolve;
++#endif
++
++#if defined(CONFIG_PPC32) && defined(CONFIG_PAX_EMUSIGRT)
++      unsigned long call_syscall;
++#endif
++
++#ifdef CONFIG_PAX_ASLR
++      unsigned long delta_mmap;               /* randomized offset */
++      unsigned long delta_exec;               /* randomized offset */
++      unsigned long delta_stack;              /* randomized offset */
++#endif
++
+ };
+ extern int mmlist_nr;
+@@ -527,6 +543,23 @@
+       struct mempolicy *mempolicy;
+       short il_next;          /* could be shared with used_math */
+ #endif
++
++#ifdef CONFIG_GRKERNSEC
++      /* grsecurity */
++      struct acl_subject_label *acl;
++      struct acl_role_label *role;
++      struct file *exec_file;
++      u32 curr_ip;
++      u32 gr_saddr;
++      u32 gr_daddr;
++      u16 gr_sport;
++      u16 gr_dport;
++      u16 acl_role_id;
++      u8 acl_sp_role:1;
++      u8 used_accept:1;
++      u8 is_writable:1;
++      u8 brute:1;
++#endif
+ };
+ static inline pid_t process_group(struct task_struct *tsk)
+@@ -564,6 +597,29 @@
+ #define PF_LESS_THROTTLE 0x00100000   /* Throttle me less: I clean memory */
+ #define PF_SYNCWRITE  0x00200000      /* I am doing a sync write */
++#define PF_PAX_PAGEEXEC               0x01000000      /* Paging based non-executable pages */
++#define PF_PAX_EMUTRAMP               0x02000000      /* Emulate trampolines */
++#define PF_PAX_MPROTECT               0x04000000      /* Restrict mprotect() */
++#define PF_PAX_RANDMMAP               0x08000000      /* Randomize mmap() base */
++#define PF_PAX_RANDEXEC               0x10000000      /* Randomize ET_EXEC base */
++#define PF_PAX_SEGMEXEC               0x20000000      /* Segmentation based non-executable pages */
++
++#ifdef CONFIG_PAX_SOFTMODE
++#if defined(CONFIG_PAX_RANDMMAP) || defined(CONFIG_PAX_RANDUSTACK) || defined(CONFIG_PAX_RANDKSTACK)
++extern unsigned int pax_aslr;
++#endif
++
++extern unsigned int pax_softmode;
++#endif
++
++extern int pax_check_flags(unsigned long *);
++
++#ifdef CONFIG_PAX_HAVE_ACL_FLAGS
++extern void pax_set_flags(struct linux_binprm * bprm);
++#elif defined(CONFIG_PAX_HOOK_ACL_FLAGS)
++extern void (*pax_set_flags_func)(struct linux_binprm * bprm);
++#endif
++
+ #ifdef CONFIG_SMP
+ #define SCHED_LOAD_SCALE      128UL   /* increase resolution of load */
+@@ -828,14 +884,29 @@
+               : on_sig_stack(sp) ? SS_ONSTACK : 0);
+ }
++extern int gr_task_is_capable(struct task_struct *task, const int cap);
++extern int gr_is_capable_nolog(const int cap);
+ #ifdef CONFIG_SECURITY
+ /* code is in security.c */
+ extern int capable(int cap);
++static inline int capable_nolog(int cap)
++{
++      return capable(cap);
++}
+ #else
+ static inline int capable(int cap)
+ {
+-      if (cap_raised(current->cap_effective, cap)) {
++      if (cap_raised(current->cap_effective, cap) && gr_task_is_capable(current, cap)) {
++              current->flags |= PF_SUPERPRIV;
++              return 1;
++      }
++      return 0;
++}
++
++static inline int capable_nolog(int cap)
++{
++      if (cap_raised(current->cap_effective, cap) && gr_is_capable_nolog(cap)) {
+               current->flags |= PF_SUPERPRIV;
+               return 1;
+       }
+diff -uNr linux-2.6.8/include/linux/shm.h linux-2.6.8.grsecurity/include/linux/shm.h
+--- linux-2.6.8/include/linux/shm.h    2004-08-14 07:37:37.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/shm.h 2004-08-16 17:09:59.000000000 +0200
+@@ -84,6 +84,10 @@
+       time_t                  shm_ctim;
+       pid_t                   shm_cprid;
+       pid_t                   shm_lprid;
++#ifdef CONFIG_GRKERNSEC
++      time_t                  shm_createtime;
++      pid_t                   shm_lapid;
++#endif
+ };
+ /* shm_mode upper byte flags */
+diff -uNr linux-2.6.8/include/linux/sysctl.h linux-2.6.8.grsecurity/include/linux/sysctl.h
+--- linux-2.6.8/include/linux/sysctl.h 2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/include/linux/sysctl.h      2004-08-16 17:09:59.000000000 +0200
+@@ -133,7 +133,20 @@
+       KERN_NGROUPS_MAX=63,    /* int: NGROUPS_MAX */
+       KERN_SPARC_SCONS_PWROFF=64, /* int: serial console power-off halt */
+       KERN_HZ_TIMER=65,       /* int: hz timer on or off */
++      KERN_GRSECURITY=68,     /* grsecurity */
++
++#ifdef CONFIG_PAX_SOFTMODE
++      KERN_PAX=69,            /* PaX control */
++#endif
++
++};
++
++#ifdef CONFIG_PAX_SOFTMODE
++enum {
++      PAX_ASLR=1,             /* PaX: disable/enable all randomization features */
++      PAX_SOFTMODE=2          /* PaX: disable/enable soft mode */
+ };
++#endif
+ /* CTL_VM names: */
+diff -uNr linux-2.6.8/include/net/ip.h linux-2.6.8.grsecurity/include/net/ip.h
+--- linux-2.6.8/include/net/ip.h       2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/include/net/ip.h    2004-08-16 18:21:29.000000000 +0200
+@@ -34,6 +34,11 @@
+ #include <net/arp.h>
+ #include <net/snmp.h>
++#ifdef CONFIG_GRKERNSEC_RANDID
++extern int grsec_enable_randid;
++extern __u16 ip_randomid(void);
++#endif
++
+ struct sock;
+ struct inet_skb_parm
+@@ -188,6 +193,13 @@
+ static inline void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, struct sock *sk)
+ {
++
++#ifdef CONFIG_GRKERNSEC_RANDID
++      if (grsec_enable_randid)
++              iph->id = htons(ip_randomid());
++      else
++#endif
++
+       if (iph->frag_off & htons(IP_DF)) {
+               /* This is only to work around buggy Windows95/2000
+                * VJ compression implementations.  If the ID field
+diff -uNr linux-2.6.8/init/do_mounts.c linux-2.6.8.grsecurity/init/do_mounts.c
+--- linux-2.6.8/init/do_mounts.c       2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/init/do_mounts.c    2004-08-16 17:09:59.000000000 +0200
+@@ -291,6 +291,7 @@
+                       case -EINVAL:
+                               continue;
+               }
++
+               /*
+                * Allow the user to distinguish between failed sys_open
+                * and bad superblock on root device.
+diff -uNr linux-2.6.8/init/Kconfig linux-2.6.8.grsecurity/init/Kconfig
+--- linux-2.6.8/init/Kconfig   2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/init/Kconfig        2004-08-16 17:09:59.000000000 +0200
+@@ -228,6 +228,7 @@
+ config KALLSYMS
+        bool "Load all symbols for debugging/kksymoops" if EMBEDDED
+        default y
++       depends on !GRKERNSEC_HIDESYM
+        help
+          Say Y here to let the kernel print out symbolic crash information and
+          symbolic stack backtraces. This increases the size of the kernel
+diff -uNr linux-2.6.8/init/main.c linux-2.6.8.grsecurity/init/main.c
+--- linux-2.6.8/init/main.c    2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/init/main.c 2004-08-16 17:09:59.000000000 +0200
+@@ -93,6 +93,7 @@
+ extern void populate_rootfs(void);
+ extern void driver_init(void);
+ extern void prepare_namespace(void);
++extern void grsecurity_init(void);
+ #ifdef        CONFIG_ACPI
+ extern void acpi_early_init(void);
+ #else
+@@ -691,6 +692,7 @@
+               execute_command = "/init";
+       else
+               prepare_namespace();
++      grsecurity_init();
+       /*
+        * Ok, we have completed the initial bootup, and
+diff -uNr linux-2.6.8/ipc/msg.c linux-2.6.8.grsecurity/ipc/msg.c
+--- linux-2.6.8/ipc/msg.c      2004-08-14 07:36:11.000000000 +0200
++++ linux-2.6.8.grsecurity/ipc/msg.c   2004-08-16 17:09:59.000000000 +0200
+@@ -24,6 +24,7 @@
+ #include <linux/list.h>
+ #include <linux/security.h>
+ #include <linux/sched.h>
++#include <linux/grsecurity.h>
+ #include <asm/current.h>
+ #include <asm/uaccess.h>
+ #include "util.h"
+@@ -226,6 +227,9 @@
+               msg_unlock(msq);
+       }
+       up(&msg_ids.sem);
++
++      gr_log_msgget(ret, msgflg);
++
+       return ret;
+ }
+@@ -475,6 +479,8 @@
+               break;
+       }
+       case IPC_RMID:
++              gr_log_msgrm(ipcp->uid, ipcp->cuid);
++
+               freeque (msq, msqid); 
+               break;
+       }
+diff -uNr linux-2.6.8/ipc/sem.c linux-2.6.8.grsecurity/ipc/sem.c
+--- linux-2.6.8/ipc/sem.c      2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/ipc/sem.c   2004-08-16 17:09:59.000000000 +0200
+@@ -71,6 +71,7 @@
+ #include <linux/time.h>
+ #include <linux/smp_lock.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include "util.h"
+@@ -238,6 +239,9 @@
+       }
+       up(&sem_ids.sem);
++
++      gr_log_semget(err, semflg);
++
+       return err;
+ }
+@@ -804,6 +808,8 @@
+       switch(cmd){
+       case IPC_RMID:
++              gr_log_semrm(ipcp->uid, ipcp->cuid);
++
+               freeary(sma, semid);
+               err = 0;
+               break;
+diff -uNr linux-2.6.8/ipc/shm.c linux-2.6.8.grsecurity/ipc/shm.c
+--- linux-2.6.8/ipc/shm.c      2004-08-14 07:36:58.000000000 +0200
++++ linux-2.6.8.grsecurity/ipc/shm.c   2004-08-16 17:09:59.000000000 +0200
+@@ -26,6 +26,7 @@
+ #include <linux/proc_fs.h>
+ #include <linux/shmem_fs.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include "util.h"
+@@ -50,6 +51,14 @@
+ static int sysvipc_shm_read_proc(char *buffer, char **start, off_t offset, int length, int *eof, void *data);
+ #endif
++#ifdef CONFIG_GRKERNSEC
++extern int gr_handle_shmat(const pid_t shm_cprid, const pid_t shm_lapid,
++                         const time_t shm_createtime, const uid_t cuid,
++                         const int shmid);
++extern int gr_chroot_shmat(const pid_t shm_cprid, const pid_t shm_lapid,
++                         const time_t shm_createtime);
++#endif
++
+ size_t        shm_ctlmax = SHMMAX;
+ size_t        shm_ctlall = SHMALL;
+ int   shm_ctlmni = SHMMNI;
+@@ -217,6 +226,9 @@
+       shp->shm_lprid = 0;
+       shp->shm_atim = shp->shm_dtim = 0;
+       shp->shm_ctim = get_seconds();
++#ifdef CONFIG_GRKERNSEC
++      shp->shm_createtime = get_seconds();
++#endif
+       shp->shm_segsz = size;
+       shp->shm_nattch = 0;
+       shp->id = shm_buildid(id,shp->shm_perm.seq);
+@@ -271,6 +283,8 @@
+       }
+       up(&shm_ids.sem);
++      gr_log_shmget(err, shmflg, size);
++
+       return err;
+ }
+@@ -569,6 +583,8 @@
+               if (err)
+                       goto out_unlock_up;
++              gr_log_shmrm(shp->shm_perm.uid, shp->shm_perm.cuid);
++
+               if (shp->shm_nattch){
+                       shp->shm_flags |= SHM_DEST;
+                       /* Do not find it any more */
+@@ -707,9 +723,27 @@
+               return err;
+       }
+               
++#ifdef CONFIG_GRKERNSEC
++      if (!gr_handle_shmat(shp->shm_cprid, shp->shm_lapid, shp->shm_createtime,
++                           shp->shm_perm.cuid, shmid)) {
++              shm_unlock(shp);
++              return -EACCES;
++      }
++
++      if (!gr_chroot_shmat(shp->shm_cprid, shp->shm_lapid, shp->shm_createtime)) {
++              shm_unlock(shp);
++              return -EACCES;
++      }
++#endif
++
+       file = shp->shm_file;
+       size = i_size_read(file->f_dentry->d_inode);
+       shp->shm_nattch++;
++
++#ifdef CONFIG_GRKERNSEC
++      shp->shm_lapid = current->pid;
++#endif
++
+       shm_unlock(shp);
+       down_write(&current->mm->mmap_sem);
+diff -uNr linux-2.6.8/kernel/capability.c linux-2.6.8.grsecurity/kernel/capability.c
+--- linux-2.6.8/kernel/capability.c    2004-08-14 07:37:25.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/capability.c 2004-08-16 17:09:59.000000000 +0200
+@@ -10,6 +10,7 @@
+ #include <linux/mm.h>
+ #include <linux/module.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ unsigned securebits = SECUREBITS_DEFAULT; /* systemwide security settings */
+@@ -168,6 +169,11 @@
+      } else
+                target = current;
++     if (gr_handle_chroot_capset(target)) {
++              ret = -ESRCH;
++              goto out;
++     }
++
+      ret = -EPERM;
+      if (security_capset_check(target, &effective, &inheritable, &permitted))
+diff -uNr linux-2.6.8/kernel/configs.c linux-2.6.8.grsecurity/kernel/configs.c
+--- linux-2.6.8/kernel/configs.c       2004-08-14 07:36:45.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/configs.c    2004-08-16 17:09:59.000000000 +0200
+@@ -89,8 +89,16 @@
+       struct proc_dir_entry *entry;
+       /* create the current config file */
++#ifdef CONFIG_GRKERNSEC_PROC_ADD
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      entry = create_proc_entry("config.gz", S_IFREG | S_IRUSR, &proc_root);
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      entry = create_proc_entry("config.gz", S_IFREG | S_IRUSR | S_IRGRP, &proc_root);
++#endif
++#else
+       entry = create_proc_entry("config.gz", S_IFREG | S_IRUGO,
+                                 &proc_root);
++#endif
+       if (!entry)
+               return -ENOMEM;
+diff -uNr linux-2.6.8/kernel/exit.c linux-2.6.8.grsecurity/kernel/exit.c
+--- linux-2.6.8/kernel/exit.c  2004-08-14 07:37:40.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/exit.c       2004-08-16 17:09:59.000000000 +0200
+@@ -23,6 +23,11 @@
+ #include <linux/mount.h>
+ #include <linux/proc_fs.h>
+ #include <linux/mempolicy.h>
++#include <linux/grsecurity.h>
++
++#ifdef CONFIG_GRKERNSEC
++extern rwlock_t grsec_exec_file_lock;
++#endif
+ #include <asm/uaccess.h>
+ #include <asm/unistd.h>
+@@ -233,6 +238,15 @@
+ {
+       write_lock_irq(&tasklist_lock);
++#ifdef CONFIG_GRKERNSEC
++      write_lock(&grsec_exec_file_lock);
++      if (current->exec_file) {
++              fput(current->exec_file);
++              current->exec_file = NULL;
++      }
++      write_unlock(&grsec_exec_file_lock);
++#endif
++
+       ptrace_unlink(current);
+       /* Reparent to init */
+       REMOVE_LINKS(current);
+@@ -240,6 +254,8 @@
+       current->real_parent = child_reaper;
+       SET_LINKS(current);
++      gr_set_kernel_label(current);
++
+       /* Set the exit signal to SIGCHLD so we signal init on exit */
+       current->exit_signal = SIGCHLD;
+@@ -334,6 +350,17 @@
+       vsnprintf(current->comm, sizeof(current->comm), name, args);
+       va_end(args);
++#ifdef CONFIG_GRKERNSEC
++      write_lock(&grsec_exec_file_lock);
++      if (current->exec_file) {
++              fput(current->exec_file);
++              current->exec_file = NULL;
++      }
++      write_unlock(&grsec_exec_file_lock);
++#endif
++
++      gr_set_kernel_label(current);
++
+       /*
+        * If we were started as result of loading a module, close all of the
+        * user space pages.  We don't need them, and if we didn't close them
+@@ -821,6 +848,11 @@
+       }
+       acct_process(code);
++
++      gr_acl_handle_psacct(tsk, code);
++      gr_acl_handle_exit();
++      gr_del_task_from_ip_table(tsk);
++
+       __exit_mm(tsk);
+       exit_sem(tsk);
+diff -uNr linux-2.6.8/kernel/fork.c linux-2.6.8.grsecurity/kernel/fork.c
+--- linux-2.6.8/kernel/fork.c  2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/fork.c       2004-08-16 17:09:59.000000000 +0200
+@@ -36,6 +36,7 @@
+ #include <linux/mount.h>
+ #include <linux/audit.h>
+ #include <linux/rmap.h>
++#include <linux/grsecurity.h>
+ #include <asm/pgtable.h>
+ #include <asm/pgalloc.h>
+@@ -279,7 +280,7 @@
+       mm->locked_vm = 0;
+       mm->mmap = NULL;
+       mm->mmap_cache = NULL;
+-      mm->free_area_cache = TASK_UNMAPPED_BASE;
++      mm->free_area_cache = oldmm->free_area_cache;
+       mm->map_count = 0;
+       mm->rss = 0;
+       cpus_clear(mm->cpu_vm_mask);
+@@ -902,6 +903,9 @@
+               goto fork_out;
+       retval = -EAGAIN;
++
++      gr_learn_resource(p, RLIMIT_NPROC, atomic_read(&p->user->processes), 0);
++
+       if (atomic_read(&p->user->processes) >=
+                       p->rlim[RLIMIT_NPROC].rlim_cur) {
+               if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) &&
+@@ -997,6 +1001,8 @@
+       if (retval)
+               goto bad_fork_cleanup_namespace;
++      gr_copy_label(p);
++
+       p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL;
+       /*
+        * Clear TID on mm_release()?
+@@ -1138,6 +1144,9 @@
+       free_uid(p->user);
+ bad_fork_free:
+       free_task(p);
++
++      gr_log_forkfail(retval);
++
+       goto fork_out;
+ }
+@@ -1174,6 +1183,8 @@
+       int trace = 0;
+       long pid;
++      gr_handle_brute_check();
++
+       if (unlikely(current->ptrace)) {
+               trace = fork_traceflag (clone_flags);
+               if (trace)
+diff -uNr linux-2.6.8/kernel/kallsyms.c linux-2.6.8.grsecurity/kernel/kallsyms.c
+--- linux-2.6.8/kernel/kallsyms.c      2004-08-14 07:38:08.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/kallsyms.c   2004-08-16 17:09:59.000000000 +0200
+@@ -302,7 +302,15 @@
+ {
+       struct proc_dir_entry *entry;
++#ifdef CONFIG_GRKERNSEC_PROC_ADD
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      entry = create_proc_entry("kallsyms", S_IFREG | S_IRUSR, NULL);
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      entry = create_proc_entry("kallsyms", S_IFREG | S_IRUSR | S_IRGRP, NULL);
++#endif
++#else
+       entry = create_proc_entry("kallsyms", 0444, NULL);
++#endif
+       if (entry)
+               entry->proc_fops = &kallsyms_operations;
+       return 0;
+diff -uNr linux-2.6.8/kernel/pid.c linux-2.6.8.grsecurity/kernel/pid.c
+--- linux-2.6.8/kernel/pid.c   2004-08-14 07:37:14.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/pid.c        2004-08-16 17:09:59.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include <linux/init.h>
+ #include <linux/bootmem.h>
+ #include <linux/hash.h>
++#include <linux/grsecurity.h>
+ #define pid_hashfn(nr) hash_long((unsigned long)nr, pidhash_shift)
+ static struct list_head *pid_hash[PIDTYPE_MAX];
+@@ -99,10 +100,12 @@
+ int alloc_pidmap(void)
+ {
+-      int pid, offset, max_steps = PIDMAP_ENTRIES + 1;
++      int pid = 0, offset, max_steps = PIDMAP_ENTRIES + 1;
+       pidmap_t *map;
+-      pid = last_pid + 1;
++      pid = gr_random_pid();
++      if (!pid)
++              pid = last_pid + 1;
+       if (pid >= pid_max)
+               pid = RESERVED_PIDS;
+@@ -225,10 +228,16 @@
+ task_t *find_task_by_pid(int nr)
+ {
+       struct pid *pid = find_pid(PIDTYPE_PID, nr);
++      struct task_struct *task = NULL;
+       if (!pid)
+               return NULL;
+-      return pid_task(pid->task_list.next, PIDTYPE_PID);
++      task = pid_task(pid->task_list.next, PIDTYPE_PID);
++
++      if (gr_pid_is_chrooted(task))
++              return NULL;
++
++      return task;
+ }
+ EXPORT_SYMBOL(find_task_by_pid);
+diff -uNr linux-2.6.8/kernel/printk.c linux-2.6.8.grsecurity/kernel/printk.c
+--- linux-2.6.8/kernel/printk.c        2004-08-14 07:38:10.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/printk.c     2004-08-16 17:09:59.000000000 +0200
+@@ -30,6 +30,7 @@
+ #include <linux/smp.h>
+ #include <linux/security.h>
+ #include <linux/bootmem.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+@@ -249,6 +250,11 @@
+       char c;
+       int error = 0;
++#ifdef CONFIG_GRKERNSEC_DMESG
++      if (!capable(CAP_SYS_ADMIN) && grsec_enable_dmesg)
++              return -EPERM;
++#endif
++
+       error = security_syslog(type);
+       if (error)
+               return error;
+diff -uNr linux-2.6.8/kernel/resource.c linux-2.6.8.grsecurity/kernel/resource.c
+--- linux-2.6.8/kernel/resource.c      2004-08-14 07:37:25.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/resource.c   2004-08-16 17:09:59.000000000 +0200
+@@ -134,10 +134,27 @@
+ {
+       struct proc_dir_entry *entry;
++#ifdef CONFIG_GRKERNSEC_PROC_ADD
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      entry = create_proc_entry("ioports", S_IRUSR, NULL);
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      entry = create_proc_entry("ioports", S_IRUSR | S_IRGRP, NULL);
++#endif
++#else
+       entry = create_proc_entry("ioports", 0, NULL);
++#endif
+       if (entry)
+               entry->proc_fops = &proc_ioports_operations;
++
++#ifdef CONFIG_GRKERNSEC_PROC_ADD
++#ifdef CONFIG_GRKERNSEC_PROC_USER
++      entry = create_proc_entry("iomem", S_IRUSR, NULL);
++#elif CONFIG_GRKERNSEC_PROC_USERGROUP
++      entry = create_proc_entry("iomem", S_IRUSR | S_IRGRP, NULL);
++#endif
++#else
+       entry = create_proc_entry("iomem", 0, NULL);
++#endif
+       if (entry)
+               entry->proc_fops = &proc_iomem_operations;
+       return 0;
+diff -uNr linux-2.6.8/kernel/sched.c linux-2.6.8.grsecurity/kernel/sched.c
+--- linux-2.6.8/kernel/sched.c 2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/sched.c      2004-08-16 17:59:16.000000000 +0200
+@@ -40,6 +40,7 @@
+ #include <linux/cpu.h>
+ #include <linux/percpu.h>
+ #include <linux/kthread.h>
++#include <linux/grsecurity.h>
+ #include <asm/tlb.h>
+ #include <asm/unistd.h>
+@@ -2630,6 +2631,8 @@
+                       return -EPERM;
+               if (increment < -40)
+                       increment = -40;
++              if (gr_handle_chroot_nice())
++                      return -EPERM;
+       }
+       if (increment > 40)
+               increment = 40;
+diff -uNr linux-2.6.8/kernel/signal.c linux-2.6.8.grsecurity/kernel/signal.c
+--- linux-2.6.8/kernel/signal.c        2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/signal.c     2004-08-16 17:09:59.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/binfmts.h>
+ #include <linux/security.h>
+ #include <linux/ptrace.h>
++#include <linux/grsecurity.h>
+ #include <asm/param.h>
+ #include <asm/uaccess.h>
+ #include <asm/unistd.h>
+@@ -613,6 +614,8 @@
+           && (current->uid ^ t->suid) && (current->uid ^ t->uid)
+           && !capable(CAP_KILL))
+               return error;
++      if (gr_handle_signal(t, sig))
++              return error;
+       return security_task_kill(t, info, sig);
+ }
+@@ -773,11 +776,13 @@
+       (((sig) < SIGRTMIN) && sigismember(&(sigptr)->signal, (sig)))
+-static int
++int
+ specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
+ {
+       int ret = 0;
++      gr_log_signal(sig, t);
++
+       if (!irqs_disabled())
+               BUG();
+ #ifdef CONFIG_SMP
+@@ -828,6 +833,8 @@
+       ret = specific_send_sig_info(sig, info, t);
+       spin_unlock_irqrestore(&t->sighand->siglock, flags);
++      gr_handle_crash(t, sig);
++
+       return ret;
+ }
+diff -uNr linux-2.6.8/kernel/sys.c linux-2.6.8.grsecurity/kernel/sys.c
+--- linux-2.6.8/kernel/sys.c   2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/sys.c        2004-08-16 17:09:59.000000000 +0200
+@@ -23,6 +23,7 @@
+ #include <linux/security.h>
+ #include <linux/dcookies.h>
+ #include <linux/suspend.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/io.h>
+@@ -294,6 +295,12 @@
+               error = -EACCES;
+               goto out;
+       }
++
++      if (gr_handle_chroot_setpriority(p, niceval)) {
++              error = -EACCES;
++              goto out;
++      }
++
+       no_nice = security_task_setnice(p, niceval);
+       if (no_nice) {
+               error = no_nice;
+@@ -598,6 +605,9 @@
+       if (rgid != (gid_t) -1 ||
+           (egid != (gid_t) -1 && egid != old_rgid))
+               current->sgid = new_egid;
++
++      gr_set_role_label(current, current->uid, new_rgid);
++
+       current->fsgid = new_egid;
+       current->egid = new_egid;
+       current->gid = new_rgid;
+@@ -625,6 +635,9 @@
+                       current->mm->dumpable=0;
+                       wmb();
+               }
++
++              gr_set_role_label(current, current->uid, gid);
++
+               current->gid = current->egid = current->sgid = current->fsgid = gid;
+       }
+       else if ((gid == current->gid) || (gid == current->sgid))
+@@ -663,6 +676,9 @@
+               current->mm->dumpable = 0;
+               wmb();
+       }
++
++      gr_set_role_label(current, new_ruid, current->gid);
++
+       current->uid = new_ruid;
+       return 0;
+ }
+@@ -763,6 +779,9 @@
+       } else if ((uid != current->uid) && (uid != new_suid))
+               return -EPERM;
++      if (gr_check_crash_uid(uid))
++              return -EPERM;
++
+       if (old_euid != uid)
+       {
+               current->mm->dumpable = 0;
+@@ -862,8 +881,10 @@
+               current->egid = egid;
+       }
+       current->fsgid = current->egid;
+-      if (rgid != (gid_t) -1)
++      if (rgid != (gid_t) -1) {
++              gr_set_role_label(current, current->uid, rgid);
+               current->gid = rgid;
++      }
+       if (sgid != (gid_t) -1)
+               current->sgid = sgid;
+       return 0;
+diff -uNr linux-2.6.8/kernel/sysctl.c linux-2.6.8.grsecurity/kernel/sysctl.c
+--- linux-2.6.8/kernel/sysctl.c        2004-08-14 07:36:16.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/sysctl.c     2004-08-16 17:09:59.000000000 +0200
+@@ -48,6 +48,14 @@
+ #endif
+ #if defined(CONFIG_SYSCTL)
++#include <linux/grsecurity.h>
++#include <linux/grinternal.h>
++
++extern __u32 gr_handle_sysctl(const ctl_table *table, const void *oldval,
++                            const void *newval);
++extern int gr_handle_sysctl_mod(const char *dirname, const char *name,
++                              const int op);
++extern int gr_handle_chroot_sysctl(const int op);
+ /* External variables not in a header file. */
+ extern int panic_timeout;
+@@ -142,6 +150,32 @@
+ #ifdef CONFIG_UNIX98_PTYS
+ extern ctl_table pty_table[];
+ #endif
++extern ctl_table grsecurity_table[];
++
++#ifdef CONFIG_PAX_SOFTMODE
++static ctl_table pax_table[] = {
++
++#if defined(CONFIG_PAX_RANDMMAP) || defined(CONFIG_PAX_RANDUSTACK) || defined(CONFIG_PAX_RANDKSTACK)
++      {
++              .ctl_name       = PAX_ASLR,
++              .procname       = "aslr",
++              .data           = &pax_aslr,
++              .maxlen         = sizeof(unsigned int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      },
++#endif
++
++      {
++              .ctl_name       = PAX_SOFTMODE,
++              .procname       = "softmode",
++              .data           = &pax_softmode,
++              .maxlen         = sizeof(unsigned int),
++              .mode           = 0600,
++              .proc_handler   = &proc_dointvec,
++      }
++};
++#endif
+ /* /proc declarations: */
+@@ -620,6 +654,14 @@
+               .mode           = 0444,
+               .proc_handler   = &proc_dointvec,
+       },
++#ifdef CONFIG_GRKERNSEC_SYSCTL
++      {
++              .ctl_name       = KERN_GRSECURITY,
++              .procname       = "grsecurity",
++              .mode           = 0500,
++              .child          = grsecurity_table,
++      },
++#endif
+       { .ctl_name = 0 }
+ };
+@@ -899,6 +941,16 @@
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec,
+       },
++
++#ifdef CONFIG_PAX_SOFTMODE
++      {
++              .ctl_name       = KERN_PAX,
++              .procname       = "pax",
++              .mode           = 0500,
++              .child          = pax_table,
++      },
++#endif
++
+       { .ctl_name = 0 }
+ };
+@@ -983,6 +1035,10 @@
+ static inline int ctl_perm(ctl_table *table, int op)
+ {
+       int error;
++      if (table->de && gr_handle_sysctl_mod(table->de->parent->name, table->de->name, op))
++              return -EACCES;
++      if (gr_handle_chroot_sysctl(op))
++              return -EACCES;
+       error = security_sysctl(table, op);
+       if (error)
+               return error;
+@@ -1019,6 +1075,10 @@
+                               table = table->child;
+                               goto repeat;
+                       }
++
++                      if (!gr_handle_sysctl(table, oldval, newval))
++                              return -EACCES;
++
+                       error = do_sysctl_strategy(table, name, nlen,
+                                                  oldval, oldlenp,
+                                                  newval, newlen, context);
+diff -uNr linux-2.6.8/kernel/time.c linux-2.6.8.grsecurity/kernel/time.c
+--- linux-2.6.8/kernel/time.c  2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/time.c       2004-08-16 17:09:59.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include <linux/timex.h>
+ #include <linux/errno.h>
+ #include <linux/smp_lock.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/unistd.h>
+@@ -82,6 +83,9 @@
+       tv.tv_nsec = 0;
+       do_settimeofday(&tv);
++
++      gr_log_timechange();
++
+       return 0;
+ }
+@@ -183,6 +187,8 @@
+                       return -EFAULT;
+       }
++      gr_log_timechange();
++
+       return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
+ }
+diff -uNr linux-2.6.8/kernel/timer.c linux-2.6.8.grsecurity/kernel/timer.c
+--- linux-2.6.8/kernel/timer.c 2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/kernel/timer.c      2004-08-16 18:00:05.000000000 +0200
+@@ -31,6 +31,7 @@
+ #include <linux/time.h>
+ #include <linux/jiffies.h>
+ #include <linux/cpu.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/unistd.h>
+@@ -792,6 +793,9 @@
+       psecs = (p->utime += user);
+       psecs += (p->stime += system);
++
++      gr_learn_resource(p, RLIMIT_CPU, psecs / HZ, 1);
++
+       if (psecs / HZ >= p->rlim[RLIMIT_CPU].rlim_cur) {
+               /* Send SIGXCPU every second.. */
+               if (!(psecs % HZ))
+diff -uNr linux-2.6.8/Makefile linux-2.6.8.grsecurity/Makefile
+--- linux-2.6.8/Makefile       2004-08-16 16:56:47.000000000 +0200
++++ linux-2.6.8.grsecurity/Makefile    2004-08-16 17:07:23.000000000 +0200
+@@ -478,7 +478,7 @@
+ ifeq ($(KBUILD_EXTMOD),)
+-core-y                += kernel/ mm/ fs/ ipc/ security/ crypto/
++core-y                += kernel/ mm/ fs/ ipc/ security/ crypto/ grsecurity/
+ vmlinux-dirs  := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
+                    $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
+diff -uNr linux-2.6.8/mm/filemap.c linux-2.6.8.grsecurity/mm/filemap.c
+--- linux-2.6.8/mm/filemap.c   2004-08-14 07:38:11.000000000 +0200
++++ linux-2.6.8.grsecurity/mm/filemap.c        2004-08-16 17:09:59.000000000 +0200
+@@ -27,6 +27,8 @@
+ #include <linux/pagevec.h>
+ #include <linux/blkdev.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
++
+ /*
+  * This is needed for the following functions:
+  *  - try_to_release_page
+@@ -1444,6 +1446,12 @@
+       if (!mapping->a_ops->readpage)
+               return -ENOEXEC;
++
++#ifdef CONFIG_PAX_PAGEEXEC
++      if (current->flags & PF_PAX_PAGEEXEC)
++              vma->vm_page_prot = protection_map[vma->vm_flags & 0x0f];
++#endif
++
+       file_accessed(file);
+       vma->vm_ops = &generic_file_vm_ops;
+       return 0;
+@@ -1742,6 +1750,7 @@
+                         *pos = i_size_read(inode);
+               if (limit != RLIM_INFINITY) {
++                      gr_learn_resource(current, RLIMIT_FSIZE,*pos, 0);
+                       if (*pos >= limit) {
+                               send_sig(SIGXFSZ, current, 0);
+                               return -EFBIG;
+diff -uNr linux-2.6.8/mm/madvise.c linux-2.6.8.grsecurity/mm/madvise.c
+--- linux-2.6.8/mm/madvise.c   2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/mm/madvise.c        2004-08-16 17:09:59.000000000 +0200
+@@ -13,8 +13,42 @@
+  * We can potentially split a vm area into separate
+  * areas, each area with its own behavior.
+  */
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++static long __madvise_behavior(struct vm_area_struct * vma, unsigned long start,
++                           unsigned long end, int behavior);
++
++static long madvise_behavior(struct vm_area_struct * vma, unsigned long start,
++                           unsigned long end, int behavior)
++{
++      if (vma->vm_flags & VM_MIRROR) {
++              struct vm_area_struct * vma_m, * prev_m;
++              unsigned long start_m, end_m;
++              int error;
++
++              start_m = vma->vm_start + vma->vm_mirror;
++              vma_m = find_vma_prev(vma->vm_mm, start_m, &prev_m);
++              if (vma_m && vma_m->vm_start == start_m && (vma_m->vm_flags & VM_MIRROR)) {
++                      start_m = start + vma->vm_mirror;
++                      end_m = end + vma->vm_mirror;
++                      error = __madvise_behavior(vma_m, start_m, end_m, behavior);
++                      if (error)
++                              return error;
++              } else {
++                      printk("PAX: VMMIRROR: madvise bug in %s, %08lx\n", current->comm, vma->vm_start);
++                      return -ENOMEM;
++              }
++      }
++
++      return __madvise_behavior(vma, start, end, behavior);
++}
++
++static long __madvise_behavior(struct vm_area_struct * vma, unsigned long start,
++                           unsigned long end, int behavior)
++#else
+ static long madvise_behavior(struct vm_area_struct * vma, unsigned long start,
+                            unsigned long end, int behavior)
++#endif
+ {
+       struct mm_struct * mm = vma->vm_mm;
+       int error;
+diff -uNr linux-2.6.8/mm/memory.c linux-2.6.8.grsecurity/mm/memory.c
+--- linux-2.6.8/mm/memory.c    2004-08-14 07:36:57.000000000 +0200
++++ linux-2.6.8.grsecurity/mm/memory.c 2004-08-16 17:09:59.000000000 +0200
+@@ -46,6 +46,7 @@
+ #include <linux/rmap.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
++#include <linux/grsecurity.h>
+ #include <asm/pgalloc.h>
+ #include <asm/uaccess.h>
+@@ -1018,6 +1019,81 @@
+       update_mmu_cache(vma, address, entry);
+ }
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++/* PaX: if vma is mirrored, synchronize the mirror's PTE
++ *
++ * mm->page_table_lock is held on entry and is not released on exit or inside
++ * to ensure atomic changes to the PTE states (swapout, mremap, munmap, etc)
++ */
++static void pax_mirror_fault(struct mm_struct *mm, struct vm_area_struct * vma,
++      unsigned long address, pte_t *pte)
++{
++      unsigned long address_m;
++      struct vm_area_struct * vma_m = NULL;
++      pte_t * pte_m, entry_m;
++      struct page * page_m;
++
++      address_m = vma->vm_start + vma->vm_mirror;
++      vma_m = find_vma(mm, address_m);
++      BUG_ON(!vma_m || vma_m->vm_start != address_m);
++
++      address_m = address + vma->vm_mirror;
++
++      {
++              pgd_t *pgd_m;
++              pmd_t *pmd_m;
++
++              pgd_m = pgd_offset(mm, address_m);
++              pmd_m = pmd_offset(pgd_m, address_m);
++              pte_m = pte_offset_map_nested(pmd_m, address_m);
++      }
++
++      if (pte_present(*pte_m)) {
++              flush_cache_page(vma_m, address_m);
++              flush_icache_page(vma_m, pte_page(*pte_m));
++      }
++      entry_m = ptep_get_and_clear(pte_m);
++      if (pte_present(entry_m))
++              flush_tlb_page(vma_m, address_m);
++
++      if (pte_none(entry_m)) {
++              ++mm->rss;
++      } else if (pte_present(entry_m)) {
++              page_m = pte_page(entry_m);
++              if (PageReserved(page_m))
++                      ++mm->rss;
++              else
++                      page_remove_rmap(page_m);
++              page_cache_release(page_m);
++      } else if (!pte_file(entry_m)) {
++              free_swap_and_cache(pte_to_swp_entry(entry_m));
++              ++mm->rss;
++      } else {
++              printk(KERN_ERR "PAX: VMMIRROR: bug in mirror_fault: %08lx, %08lx, %08lx, %08lx\n",
++                              address, vma->vm_start, address_m, vma_m->vm_start);
++      }
++
++      page_m = pte_page(*pte);
++      entry_m = mk_pte(page_m, vma_m->vm_page_prot);
++      if (pte_write(*pte) && (vma_m->vm_flags & VM_WRITE))
++              entry_m = pte_mkdirty(pte_mkwrite(entry_m));
++      if (!PageReserved(page_m)) {
++              page_cache_get(page_m);
++              /*
++               * we can test PG_anon without holding page_map_lock because
++               * we hold the page table lock and have a reference to page_m
++               */
++              if (PageAnon(page_m))
++                      page_add_anon_rmap(page_m, vma_m, address_m);
++              else
++                      page_add_file_rmap(page_m);
++      }
++      ptep_establish(vma_m, address_m, pte_m, entry_m);
++      update_mmu_cache(vma_m, address_m, entry_m);
++      pte_unmap_nested(pte_m);
++}
++#endif
++
+ /*
+  * This routine handles present pages, when users try to write
+  * to a shared page. It is done by copying the page to a new address
+@@ -1105,6 +1181,12 @@
+               /* Free the old page.. */
+               new_page = old_page;
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++              if (vma->vm_flags & VM_MIRROR)
++                      pax_mirror_fault(mm, vma, address, page_table);
++#endif
++
+       }
+       pte_unmap(page_table);
+       page_cache_release(new_page);
+@@ -1237,6 +1319,7 @@
+ do_expand:
+       limit = current->rlim[RLIMIT_FSIZE].rlim_cur;
++      gr_learn_resource(current, RLIMIT_FSIZE, offset, 1);
+       if (limit != RLIM_INFINITY && offset > limit)
+               goto out_sig;
+       if (offset > inode->i_sb->s_maxbytes)
+@@ -1398,6 +1481,12 @@
+       /* No need to invalidate - it was non-present before */
+       update_mmu_cache(vma, address, pte);
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if (vma->vm_flags & VM_MIRROR)
++              pax_mirror_fault(mm, vma, address, page_table);
++#endif
++
+       pte_unmap(page_table);
+       spin_unlock(&mm->page_table_lock);
+ out:
+@@ -1452,10 +1541,16 @@
+       }
+       set_pte(page_table, entry);
+-      pte_unmap(page_table);
+       /* No need to invalidate - it was non-present before */
+       update_mmu_cache(vma, addr, entry);
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if (vma->vm_flags & VM_MIRROR)
++              pax_mirror_fault(mm, vma, addr, page_table);
++#endif
++
++      pte_unmap(page_table);
+       spin_unlock(&mm->page_table_lock);
+ out:
+       return VM_FAULT_MINOR;
+@@ -1562,6 +1657,15 @@
+                       page_add_anon_rmap(new_page, vma, address);
+               } else
+                       page_add_file_rmap(new_page);
++
++              /* no need to invalidate: a not-present page shouldn't be cached */
++              update_mmu_cache(vma, address, entry);
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++              if (vma->vm_flags & VM_MIRROR)
++                      pax_mirror_fault(mm, vma, address, page_table);
++#endif
++
+               pte_unmap(page_table);
+       } else {
+               /* One of our sibling threads was faster, back out. */
+@@ -1571,8 +1675,6 @@
+               goto out;
+       }
+-      /* no need to invalidate: a not-present page shouldn't be cached */
+-      update_mmu_cache(vma, address, entry);
+       spin_unlock(&mm->page_table_lock);
+ out:
+       return ret;
+@@ -1681,6 +1783,11 @@
+       pgd_t *pgd;
+       pmd_t *pmd;
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      unsigned long address_m = 0UL;
++      struct vm_area_struct * vma_m = NULL;
++#endif
++
+       __set_current_state(TASK_RUNNING);
+       pgd = pgd_offset(mm, address);
+@@ -1694,6 +1801,45 @@
+        * and the SMP-safe atomic PTE updates.
+        */
+       spin_lock(&mm->page_table_lock);
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if (vma->vm_flags & VM_MIRROR) {
++              pgd_t *pgd_m;
++              pmd_t *pmd_m;
++              pte_t *pte_m;
++
++              address_m = vma->vm_start + vma->vm_mirror;
++              vma_m = find_vma(mm, address_m);
++
++              /* PaX: sanity checks */
++              if (!vma_m) {
++                      spin_unlock(&mm->page_table_lock);
++                      printk(KERN_ERR "PAX: VMMIRROR: fault bug, %08lx, %p, %08lx, %p\n",
++                             address, vma, address_m, vma_m);
++                      return VM_FAULT_SIGBUS;
++              } else if (!(vma_m->vm_flags & VM_MIRROR) ||
++                         vma_m->vm_start != address_m ||
++                         vma->vm_end - vma->vm_start != vma_m->vm_end - vma_m->vm_start)
++              {
++                      spin_unlock(&mm->page_table_lock);
++                      printk(KERN_ERR "PAX: VMMIRROR: fault bug2, %08lx, %08lx, %08lx, %08lx, %08lx\n",
++                             address, vma->vm_start, vma_m->vm_start, vma->vm_end, vma_m->vm_end);
++                      return VM_FAULT_SIGBUS;
++              }
++
++              address_m = address + vma->vm_mirror;
++              pgd_m = pgd_offset(mm, address_m);
++              pmd_m = pmd_alloc(mm, pgd_m, address_m);
++              if (pmd_m)
++                      pte_m = pte_alloc_map(mm, pmd_m, address_m);
++              if (!pmd_m || !pte_m) {
++                      spin_unlock(&mm->page_table_lock);
++                      return VM_FAULT_OOM;
++              }
++              pte_unmap(pte_m);
++      }
++#endif
++
+       pmd = pmd_alloc(mm, pgd, address);
+       if (pmd) {
+diff -uNr linux-2.6.8/mm/mlock.c linux-2.6.8.grsecurity/mm/mlock.c
+--- linux-2.6.8/mm/mlock.c     2004-08-14 07:36:13.000000000 +0200
++++ linux-2.6.8.grsecurity/mm/mlock.c  2004-08-16 17:09:59.000000000 +0200
+@@ -7,11 +7,43 @@
+ #include <linux/mman.h>
+ #include <linux/mm.h>
++#include <linux/grsecurity.h>
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++static int __mlock_fixup(struct vm_area_struct * vma, 
++      unsigned long start, unsigned long end, unsigned int newflags);
+ static int mlock_fixup(struct vm_area_struct * vma, 
+       unsigned long start, unsigned long end, unsigned int newflags)
+ {
++      if (vma->vm_flags & VM_MIRROR) {
++              struct vm_area_struct * vma_m;
++              unsigned long start_m, end_m;
++              int error;
++
++              start_m = vma->vm_start + vma->vm_mirror;
++              vma_m = find_vma(vma->vm_mm, start_m);
++              if (vma_m && vma_m->vm_start == start_m && (vma_m->vm_flags & VM_MIRROR)) {
++                      start_m = start + vma->vm_mirror;
++                      end_m = end + vma->vm_mirror;
++                      error = __mlock_fixup(vma_m, start_m, end_m, newflags);
++                      if (error)
++                              return error;
++              } else {
++                      printk("PAX: VMMIRROR: mlock bug in %s, %08lx\n", current->comm, vma->vm_start);
++                      return -ENOMEM;
++              }
++      }
++      return __mlock_fixup(vma, start, end, newflags);
++}
++
++static int __mlock_fixup(struct vm_area_struct * vma, 
++      unsigned long start, unsigned long end, unsigned int newflags)
++#else
++static int mlock_fixup(struct vm_area_struct * vma, 
++      unsigned long start, unsigned long end, unsigned int newflags)
++#endif
++{
+       struct mm_struct * mm = vma->vm_mm;
+       int pages;
+       int ret = 0;
+@@ -68,6 +100,17 @@
+               return -EINVAL;
+       if (end == start)
+               return 0;
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (current->flags & PF_PAX_SEGMEXEC) {
++              if (end > SEGMEXEC_TASK_SIZE)
++                      return -EINVAL;
++      } else
++#endif
++
++      if (end > TASK_SIZE)
++              return -EINVAL;
++
+       vma = find_vma(current->mm, start);
+       if (!vma || vma->vm_start > start)
+               return -ENOMEM;
+@@ -118,6 +161,7 @@
+       lock_limit >>= PAGE_SHIFT;
+       /* check against resource limits */
++      gr_learn_resource(current, RLIMIT_MEMLOCK, locked, 1);
+       if (locked <= lock_limit)
+               error = do_mlock(start, len, 1);
+       up_write(&current->mm->mmap_sem);
+@@ -154,6 +198,16 @@
+       for (vma = current->mm->mmap; vma ; vma = vma->vm_next) {
+               unsigned int newflags;
++#ifdef CONFIG_PAX_SEGMEXEC
++              if (current->flags & PF_PAX_SEGMEXEC) {
++                      if (vma->vm_end > SEGMEXEC_TASK_SIZE)
++                              break;
++              } else
++#endif
++
++              if (vma->vm_end > TASK_SIZE)
++                      break;
++
+               newflags = vma->vm_flags | VM_LOCKED;
+               if (!(flags & MCL_CURRENT))
+                       newflags &= ~VM_LOCKED;
+@@ -177,6 +231,7 @@
+       lock_limit >>= PAGE_SHIFT;
+       ret = -ENOMEM;
++      gr_learn_resource(current, RLIMIT_MEMLOCK, current->mm->total_vm, 1);
+       if (current->mm->total_vm <= lock_limit)
+               ret = do_mlockall(flags);
+ out:
+diff -uNr linux-2.6.8/mm/mmap.c linux-2.6.8.grsecurity/mm/mmap.c
+--- linux-2.6.8/mm/mmap.c      2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/mm/mmap.c   2004-08-16 17:09:59.000000000 +0200
+@@ -23,6 +23,7 @@
+ #include <linux/mount.h>
+ #include <linux/mempolicy.h>
+ #include <linux/rmap.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/cacheflush.h>
+@@ -136,6 +137,7 @@
+       /* Check against rlimit.. */
+       rlim = current->rlim[RLIMIT_DATA].rlim_cur;
++      gr_learn_resource(current, RLIMIT_DATA, brk - mm->start_data, 1);
+       if (rlim < RLIM_INFINITY && brk - mm->start_data > rlim)
+               goto out;
+@@ -506,7 +508,11 @@
+  * If the vma has a ->close operation then the driver probably needs to release
+  * per-vma resources, so we don't attempt to merge those.
+  */
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++#define VM_SPECIAL (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED | VM_MIRROR)
++#else
+ #define VM_SPECIAL (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED)
++#endif
+ static inline int is_mergeable_vma(struct vm_area_struct *vma,
+                       struct file *file, unsigned long vm_flags)
+@@ -740,6 +746,42 @@
+                       unsigned long len, unsigned long prot,
+                       unsigned long flags, unsigned long pgoff)
+ {
++      unsigned long ret = -EINVAL;
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if ((current->flags & PF_PAX_SEGMEXEC) &&
++          (len > SEGMEXEC_TASK_SIZE || (addr && addr > SEGMEXEC_TASK_SIZE-len)))
++              return ret;
++#endif
++
++      ret = __do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if ((current->flags & PF_PAX_SEGMEXEC) && ret < TASK_SIZE && ((flags & MAP_TYPE) == MAP_PRIVATE)
++
++#ifdef CONFIG_PAX_MPROTECT
++          && (!(current->flags & PF_PAX_MPROTECT) || ((prot & PROT_EXEC) && file && !(prot & PROT_WRITE)))
++#endif
++
++         )
++      {
++              unsigned long ret_m;
++              prot = prot & PROT_EXEC ? prot : PROT_NONE;
++              ret_m = __do_mmap_pgoff(NULL, ret + SEGMEXEC_TASK_SIZE, 0UL, prot, flags | MAP_MIRROR | MAP_FIXED, ret);
++              if (ret_m >= TASK_SIZE) {
++                      do_munmap(current->mm, ret, len);
++                      ret = ret_m;
++              }
++      }
++#endif
++
++      return ret;
++}
++
++unsigned long __do_mmap_pgoff(struct file * file, unsigned long addr,
++                      unsigned long len, unsigned long prot,
++                      unsigned long flags, unsigned long pgoff)
++{
+       struct mm_struct * mm = current->mm;
+       struct vm_area_struct * vma, * prev;
+       struct inode *inode;
+@@ -757,6 +799,28 @@
+                       (current->personality & READ_IMPLIES_EXEC)))
+               prot |= PROT_EXEC;
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      struct vm_area_struct * vma_m = NULL;
++
++      if (flags & MAP_MIRROR) {
++              /* PaX: sanity checks, to be removed when proved to be stable */
++              if (file || len || ((flags & MAP_TYPE) != MAP_PRIVATE))
++                      return -EINVAL;
++
++              vma_m = find_vma(mm, pgoff);
++
++              if (!vma_m || is_vm_hugetlb_page(vma_m) ||
++                  vma_m->vm_start != pgoff ||
++                  (vma_m->vm_flags & VM_MIRROR) ||
++                  (!(vma_m->vm_flags & VM_WRITE) && (prot & PROT_WRITE)))
++                      return -EINVAL;
++
++              file = vma_m->vm_file;
++              pgoff = vma_m->vm_pgoff;
++              len = vma_m->vm_end - vma_m->vm_start;
++      }
++#endif
++
+       if (file) {
+               if (is_file_hugepages(file))
+                       accountable = 0;
+@@ -788,7 +852,7 @@
+       /* Obtain the address to map to. we verify (or select) it and ensure
+        * that it represents a valid section of the address space.
+        */
+-      addr = get_unmapped_area(file, addr, len, pgoff, flags);
++      addr = get_unmapped_area(file, addr, len, pgoff, flags | ((prot & PROT_EXEC) ? MAP_EXECUTABLE : 0));
+       if (addr & ~PAGE_MASK)
+               return addr;
+@@ -799,6 +863,30 @@
+       vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
+                       mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
++      if (file && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC))
++              vm_flags &= ~VM_MAYEXEC;
++
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++      if (current->flags & (PF_PAX_PAGEEXEC | PF_PAX_SEGMEXEC)) {
++
++#ifdef CONFIG_PAX_MPROTECT
++              if (current->flags & PF_PAX_MPROTECT) {
++                      if (!file || (prot & PROT_WRITE))
++                              vm_flags &= ~(VM_EXEC | VM_MAYEXEC);
++                      else
++                              vm_flags &= ~VM_MAYWRITE;
++
++#ifdef CONFIG_PAX_RANDEXEC
++                      if (file && (flags & MAP_MIRROR) && (vm_flags & VM_EXEC))
++                              vma_m->vm_flags &= ~VM_MAYWRITE;
++#endif
++
++              }
++#endif
++
++      }
++#endif
++
+       if (flags & MAP_LOCKED) {
+               if (!capable(CAP_IPC_LOCK))
+                       return -EPERM;
+@@ -808,6 +896,7 @@
+       if (vm_flags & VM_LOCKED) {
+               unsigned long locked = mm->locked_vm << PAGE_SHIFT;
+               locked += len;
++              gr_learn_resource(current, RLIMIT_MEMLOCK, locked, 1);
+               if (locked > current->rlim[RLIMIT_MEMLOCK].rlim_cur)
+                       return -EAGAIN;
+       }
+@@ -855,6 +944,11 @@
+                       /*
+                        * Set pgoff according to addr for anon_vma.
+                        */
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++                      if (!(flags & MAP_MIRROR))
++#endif
++
+                       pgoff = addr >> PAGE_SHIFT;
+                       break;
+               default:
+@@ -866,6 +960,9 @@
+       if (error)
+               return error;
+               
++      if (!gr_acl_handle_mmap(file, prot))
++              return -EACCES;
++
+       /* Clear old maps */
+       error = -ENOMEM;
+ munmap_back:
+@@ -877,6 +974,7 @@
+       }
+       /* Check against address space limit. */
++      gr_learn_resource(current, RLIMIT_AS, (mm->total_vm << PAGE_SHIFT) + len, 1);
+       if ((mm->total_vm << PAGE_SHIFT) + len
+           > current->rlim[RLIMIT_AS].rlim_cur)
+               return -ENOMEM;
+@@ -923,6 +1021,13 @@
+       vma->vm_start = addr;
+       vma->vm_end = addr + len;
+       vma->vm_flags = vm_flags;
++
++#ifdef CONFIG_PAX_PAGEEXEC
++      if ((file || !(current->flags & PF_PAX_PAGEEXEC)) && (vm_flags & (VM_READ|VM_WRITE)))
++              vma->vm_page_prot = protection_map[(vm_flags | VM_EXEC) & 0x0f];
++      else
++#endif
++
+       vma->vm_page_prot = protection_map[vm_flags & 0x0f];
+       vma->vm_pgoff = pgoff;
+@@ -947,6 +1052,14 @@
+                       goto free_vma;
+       }
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if (flags & MAP_MIRROR) {
++              vma_m->vm_flags |= VM_MIRROR;
++              vma_m->vm_mirror = vma->vm_start - vma_m->vm_start;
++              vma->vm_mirror = vma_m->vm_start - vma->vm_start;
++      }
++#endif
++
+       /* We set VM_ACCOUNT in a shared mapping's vm_flags, to inform
+        * shmem_zero_setup (perhaps called through /dev/zero's ->mmap)
+        * that memory reservation must be checked; but that reservation
+@@ -988,6 +1101,7 @@
+                                       pgoff, flags & MAP_NONBLOCK);
+               down_write(&mm->mmap_sem);
+       }
++      track_exec_limit(mm, addr, addr + len, vm_flags);
+       return addr;
+ unmap_and_free_vma:
+@@ -1007,6 +1121,7 @@
+ }
+ EXPORT_SYMBOL(do_mmap_pgoff);
++EXPORT_SYMBOL(__do_mmap_pgoff);
+ /* Get an address range which is currently unmapped.
+  * For shmat() with addr=0.
+@@ -1026,11 +1141,17 @@
+ {
+       struct mm_struct *mm = current->mm;
+       struct vm_area_struct *vma;
+-      unsigned long start_addr;
++      unsigned long start_addr, task_unmapped_base = TASK_UNMAPPED_BASE;
+       if (len > TASK_SIZE)
+               return -ENOMEM;
++#ifdef CONFIG_PAX_RANDMMAP
++      if (current->flags & PF_PAX_RANDMMAP)
++              task_unmapped_base += mm->delta_mmap;
++      if (!(current->flags & PF_PAX_RANDMMAP) || !filp)
++#endif
++
+       if (addr) {
+               addr = PAGE_ALIGN(addr);
+               vma = find_vma(mm, addr);
+@@ -1048,8 +1169,8 @@
+                        * Start a new search - just in case we missed
+                        * some holes.
+                        */
+-                      if (start_addr != TASK_UNMAPPED_BASE) {
+-                              start_addr = addr = TASK_UNMAPPED_BASE;
++                      if (start_addr != task_unmapped_base) {
++                              start_addr = addr = task_unmapped_base;
+                               goto full_search;
+                       }
+                       return -ENOMEM;
+@@ -1190,6 +1311,11 @@
+ {
+       unsigned long grow;
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      struct vm_area_struct * vma_m = NULL;
++      unsigned long address_m = 0UL;
++#endif
++
+       if (!(vma->vm_flags & VM_GROWSUP))
+               return -EFAULT;
+@@ -1216,17 +1342,76 @@
+               return -ENOMEM;
+       }
+       
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if (vma->vm_flags & VM_MIRROR) {
++              address_m = vma->vm_start + vma->vm_mirror;
++              vma_m = find_vma(vma->vm_mm, address_m);
++              if (!vma_m || vma_m->vm_start != address_m ||
++                              !(vma_m->vm_flags & VM_MIRROR) ||
++                              vma->vm_end - vma->vm_start !=
++                              vma_m->vm_end - vma_m->vm_start) {
++                      anon_vma_unlock(vma);
++                      vm_unacct_memory(grow);
++                      printk(KERN_ERR "PAX: VMMIRROR: expand bug, %08lx, %08lx, %08lx, %08lx, %08lx\n",
++                             address, vma->vm_start, vma_m->vm_start, vma->vm_end, vma_m->vm_end);
++                      return -ENOMEM;
++              }
++
++              gr_learn_resource(current, RLIMIT_STACK, address_m - vma_m->vm_start, 1);
++              gr_learn_resource(current, RLIMIT_AS, (vma_m->vm_mm->total_vm + 2*grow) << PAGE_SHIFT, 1);
++              if (vma_m->vm_flags & VM_LOCKED)
++                      gr_learn_resource(current, RLIMIT_MEMLOCK, (vma_->vm_mm->locked_vm + 2*grow) << PAGE_SHIFT, 1);
++
++              address_m = address + vma->vm_mirror;
++              if (address_m - vma_m->vm_start > current->rlim[RLIMIT_STACK].rlim_cur ||
++                              ((vma_m->vm_mm->total_vm + 2*grow) << PAGE_SHIFT) >
++                              current->rlim[RLIMIT_AS].rlim_cur ||
++                              ((vma_m->vm_flags & VM_LOCKED) &&
++                              ((vma_m->vm_mm->locked_vm + 2*grow) << PAGE_SHIFT) >
++                              current->rlim[RLIMIT_MEMLOCK].rlim_cur)) {
++                      anon_vma_unlock(vma);
++                      vm_unacct_memory(grow);
++                      return -ENOMEM;
++              }
++      } else {
++#endif
++
++      gr_learn_resource(current, RLIMIT_STACK, address - vma->vm_start, 1);
++      gr_learn_resource(current, RLIMIT_AS, (vma->vm_mm->total_vm + grow) << PAGE_SHIFT, 1);
++      if (vma->vm_flags & VM_LOCKED)
++              gr_learn_resource(current, RLIMIT_MEMLOCK, (vma->vm_mm->locked_vm + grow) << PAGE_SHIFT, 1);
++
+       if (address - vma->vm_start > current->rlim[RLIMIT_STACK].rlim_cur ||
+                       ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
+-                      current->rlim[RLIMIT_AS].rlim_cur) {
++                      current->rlim[RLIMIT_AS].rlim_cur ||
++                      ((vma->vm_flags & VM_LOCKED) &&
++                      ((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
++                      current->rlim[RLIMIT_MEMLOCK].rlim_cur)) {
+               anon_vma_unlock(vma);
+               vm_unacct_memory(grow);
+               return -ENOMEM;
+       }
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      }
++#endif
++
+       vma->vm_end = address;
+       vma->vm_mm->total_vm += grow;
+       if (vma->vm_flags & VM_LOCKED)
+               vma->vm_mm->locked_vm += grow;
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if (vma->vm_flags & VM_MIRROR) {
++              vma_m->vm_end = address_m;
++              vma_m->vm_mm->total_vm += grow;
++              if (vma_m->vm_flags & VM_LOCKED)
++                      vma_m->vm_mm->locked_vm += grow;
++              track_exec_limit(vma_m->vm_mm, vma_m->vm_start, vma_m->vm_end, vma_m->vm_flags);
++      }
++#endif
++
++      track_exec_limit(vma->vm_mm, vma->vm_start, vma->vm_end, vma->vm_flags);
+       anon_vma_unlock(vma);
+       return 0;
+ }
+@@ -1255,6 +1440,11 @@
+ {
+       unsigned long grow;
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      struct vm_area_struct * vma_m = NULL;
++      unsigned long address_m = 0UL;
++#endif
++
+       /*
+        * We must make sure the anon_vma is allocated
+        * so that the anon_vma locking is not a noop.
+@@ -1276,19 +1466,80 @@
+               anon_vma_unlock(vma);
+               return -ENOMEM;
+       }
+-      
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if (vma->vm_flags & VM_MIRROR) {
++              address_m = vma->vm_start + vma->vm_mirror;
++              vma_m = find_vma(vma->vm_mm, address_m);
++              if (!vma_m || vma_m->vm_start != address_m ||
++                              !(vma_m->vm_flags & VM_MIRROR) ||
++                              vma->vm_end - vma->vm_start !=
++                              vma_m->vm_end - vma_m->vm_start ||
++                              vma->anon_vma != vma_m->anon_vma) {
++                      anon_vma_unlock(vma);
++                      vm_unacct_memory(grow);
++                      printk(KERN_ERR "PAX: VMMIRROR: expand bug, %08lx, %08lx, %08lx, %08lx, %08lx\n",
++                             address, vma->vm_start, vma_m->vm_start, vma->vm_end, vma_m->vm_end);
++                      return -ENOMEM;
++              }
++
++              gr_learn_resource(current, RLIMIT_STACK, vma_m->vm_end - address_m, 1);
++              gr_learn_resource(current, RLIMIT_AS, (vma_m->vm_mm->total_vm + 2*grow) << PAGE_SHIFT, 1);
++              if (vma_m->vm_flags & VM_LOCKED)
++                      gr_learn_resource(current, RLIMIT_MEMLOCK, (vma_m->vm_mm->locked_vm + 2*grow) << PAGE_SHIFT, 1);
++
++              address_m = address + vma->vm_mirror;
++              if (vma_m->vm_end - address_m > current->rlim[RLIMIT_STACK].rlim_cur ||
++                              ((vma_m->vm_mm->total_vm + 2*grow) << PAGE_SHIFT) >
++                              current->rlim[RLIMIT_AS].rlim_cur ||
++                              ((vma_m->vm_flags & VM_LOCKED) &&
++                              ((vma_m->vm_mm->locked_vm + 2*grow) << PAGE_SHIFT) >
++                              current->rlim[RLIMIT_MEMLOCK].rlim_cur)) {
++                      anon_vma_unlock(vma);
++                      vm_unacct_memory(grow);
++                      return -ENOMEM;
++              }
++      } else {
++#endif
++
++      gr_learn_resource(current, RLIMIT_STACK, vma->vm_end - address, 1);
++      gr_learn_resource(current, RLIMIT_AS, (vma->vm_mm->total_vm + grow) << PAGE_SHIFT, 1);
++      if (vma->vm_flags & VM_LOCKED)
++              gr_learn_resource(current, RLIMIT_MEMLOCK, (vma->vm_mm->locked_vm + grow) << PAGE_SHIFT, 1);
++
+       if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur ||
+                       ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
+-                      current->rlim[RLIMIT_AS].rlim_cur) {
++                      current->rlim[RLIMIT_AS].rlim_cur ||
++                      ((vma->vm_flags & VM_LOCKED) &&
++                      ((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
++                      current->rlim[RLIMIT_MEMLOCK].rlim_cur)) {
+               anon_vma_unlock(vma);
+               vm_unacct_memory(grow);
+               return -ENOMEM;
+       }
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      }
++#endif
++
+       vma->vm_start = address;
+       vma->vm_pgoff -= grow;
+       vma->vm_mm->total_vm += grow;
+       if (vma->vm_flags & VM_LOCKED)
+               vma->vm_mm->locked_vm += grow;
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if (vma->vm_flags & VM_MIRROR) {
++              vma_m->vm_start = address_m;
++              vma_m->vm_pgoff -= grow;
++              vma_m->vm_mm->total_vm += grow;
++              if (vma_m->vm_flags & VM_LOCKED)
++                      vma_m->vm_mm->locked_vm += grow;
++              track_exec_limit(vma_m->vm_mm, vma_m->vm_start, vma_m->vm_end, vma_m->vm_flags);
++      }
++#endif
++
++      track_exec_limit(vma->vm_mm, vma->vm_start, vma->vm_end, vma->vm_flags);
+       anon_vma_unlock(vma);
+       return 0;
+ }
+@@ -1391,15 +1642,15 @@
+ {
+       size_t len = area->vm_end - area->vm_start;
+-      area->vm_mm->total_vm -= len >> PAGE_SHIFT;
++      mm->total_vm -= len >> PAGE_SHIFT;
+       if (area->vm_flags & VM_LOCKED)
+-              area->vm_mm->locked_vm -= len >> PAGE_SHIFT;
++              mm->locked_vm -= len >> PAGE_SHIFT;
+       /*
+        * Is this a new hole at the lowest possible address?
+        */
+       if (area->vm_start >= TASK_UNMAPPED_BASE &&
+-                              area->vm_start < area->vm_mm->free_area_cache)
+-            area->vm_mm->free_area_cache = area->vm_start;
++                              area->vm_start < mm->free_area_cache)
++            mm->free_area_cache = area->vm_start;
+       remove_vm_struct(area);
+ }
+@@ -1453,21 +1704,73 @@
+  */
+ static void
+ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
+-      struct vm_area_struct *prev, unsigned long end)
++      struct vm_area_struct *prev, unsigned long *start, unsigned long *end)
+ {
+       struct vm_area_struct **insertion_point;
+       struct vm_area_struct *tail_vma = NULL;
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      unsigned long start_m;
++      struct vm_area_struct *vma_m, *head_vma = vma, *mirrors = NULL, *head_vma_m = NULL;
++#endif
++
+       insertion_point = (prev ? &prev->vm_next : &mm->mmap);
+       do {
+               rb_erase(&vma->vm_rb, &mm->mm_rb);
+               mm->map_count--;
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++              if ((vma->vm_flags & VM_MIRROR) &&
++                  vma->vm_start + vma->vm_mirror >= *start &&
++                  vma->vm_start + vma->vm_mirror < *end)
++              {
++                      mm->mmap_cache = NULL;          /* Kill the cache. */
++                      start_m = vma->vm_start + vma->vm_mirror;
++                      vma_m = find_vma(mm, start_m);
++                      if (vma_m && (vma_m->vm_flags & VM_MIRROR) && vma_m->vm_start == start_m) {
++                              vma->vm_flags &= ~VM_MIRROR;
++                              vma_m->vm_flags &= ~VM_MIRROR;
++                      } else
++                              printk("PAX: VMMIRROR: munmap bug in %s, %08lx\n", current->comm, vma->vm_start);
++              }
++#endif
++
+               tail_vma = vma;
+               vma = vma->vm_next;
+-      } while (vma && vma->vm_start < end);
++      } while (vma && vma->vm_start < *end);
+       *insertion_point = vma;
+       tail_vma->vm_next = NULL;
+       mm->mmap_cache = NULL;          /* Kill the cache. */
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      for (; head_vma; head_vma = head_vma->vm_next) {
++              struct vm_area_struct *prev_m;
++
++              if (!(head_vma->vm_flags & VM_MIRROR))
++                      continue;
++
++              start_m = head_vma->vm_start + head_vma->vm_mirror;
++              vma_m = find_vma_prev(mm, start_m, &prev_m);
++              rb_erase(&vma_m->vm_rb, &mm->mm_rb);
++              mm->map_count--;
++              insertion_point = prev_m ? &prev_m->vm_next : &mm->mmap;
++              *insertion_point = vma_m->vm_next;
++              if (head_vma_m) {
++                      mirrors->vm_next = vma_m;
++                      mirrors = vma_m;
++              } else
++                      head_vma_m = mirrors = vma_m;
++              mirrors->vm_next = NULL;
++              if (vma_m->vm_start < *start)
++                      *start = vma_m->vm_start;
++              if (vma_m->vm_end > *end)
++                      *end = vma_m->vm_end;
++              mm->mmap_cache = NULL;          /* Kill the cache. */
++      }
++      if (head_vma_m)
++              tail_vma->vm_next = head_vma_m;
++#endif
++
+ }
+ /*
+@@ -1530,6 +1833,10 @@
+       unsigned long end;
+       struct vm_area_struct *mpnt, *prev, *last;
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      struct vm_area_struct *mpnt_m = NULL, *last_m;
++#endif
++
+       if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
+               return -EINVAL;
+@@ -1566,6 +1873,20 @@
+        * places tmp vma above, and higher split_vma places tmp vma below.
+        */
+       if (start > mpnt->vm_start) {
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++              if (mpnt->vm_flags & VM_MIRROR) {
++                      unsigned long start_m = mpnt->vm_start + mpnt->vm_mirror;
++
++                      mpnt_m = find_vma(mm, start_m);
++                      if (!mpnt_m || (!mpnt_m->vm_flags & VM_MIRROR) || mpnt_m->vm_start != start_m)
++                              return -EINVAL;
++                      start_m = start + mpnt->vm_mirror;
++                      if (split_vma(mm, mpnt_m, start_m, 0))
++                              return -ENOMEM;
++              }
++#endif
++
+               if (split_vma(mm, mpnt, start, 0))
+                       return -ENOMEM;
+               prev = mpnt;
+@@ -1574,6 +1895,20 @@
+       /* Does it split the last one? */
+       last = find_vma(mm, end);
+       if (last && end > last->vm_start) {
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++              if (last->vm_flags & VM_MIRROR) {
++                      unsigned long end_m = last->vm_start + last->vm_mirror;
++
++                      last_m = find_vma(mm, end_m);
++                      if (!last_m || (!last_m->vm_flags & VM_MIRROR) || last_m->vm_start != end_m)
++                              return -EINVAL;
++                      end_m = end + last->vm_mirror;
++                      if (split_vma(mm, last_m, end_m, 1))
++                              return -ENOMEM;
++              }
++#endif
++
+               if (split_vma(mm, last, end, 1))
+                       return -ENOMEM;
+       }
+@@ -1582,7 +1917,7 @@
+       /*
+        * Remove the vma's, and unmap the actual pages
+        */
+-      detach_vmas_to_be_unmapped(mm, mpnt, prev, end);
++      detach_vmas_to_be_unmapped(mm, mpnt, prev, &start, &end);
+       spin_lock(&mm->page_table_lock);
+       unmap_region(mm, mpnt, prev, start, end);
+       spin_unlock(&mm->page_table_lock);
+@@ -1590,6 +1925,8 @@
+       /* Fix up all other VM information */
+       unmap_vma_list(mm, mpnt);
++      track_exec_limit(mm, start, end, 0UL);
++
+       return 0;
+ }
+@@ -1600,6 +1937,12 @@
+       int ret;
+       struct mm_struct *mm = current->mm;
++#ifdef CONFIG_PAX_SEGMEXEC
++      if ((current->flags & PF_PAX_SEGMEXEC) &&
++          (len > SEGMEXEC_TASK_SIZE || addr > SEGMEXEC_TASK_SIZE-len))
++              return -EINVAL;
++#endif
++
+       down_write(&mm->mmap_sem);
+       ret = do_munmap(mm, addr, len);
+       up_write(&mm->mmap_sem);
+@@ -1611,7 +1954,31 @@
+  *  anonymous maps.  eventually we may be able to do some
+  *  brk-specific accounting here.
+  */
++#if defined(CONFIG_PAX_SEGMEXEC) && defined(CONFIG_PAX_MPROTECT)
++unsigned long __do_brk(unsigned long addr, unsigned long len);
++
++unsigned long do_brk(unsigned long addr, unsigned long len)
++{
++      unsigned long ret;
++
++      ret = __do_brk(addr, len);
++      if (ret == addr && (current->flags & (PF_PAX_SEGMEXEC | PF_PAX_MPROTECT)) == PF_PAX_SEGMEXEC) {
++              unsigned long ret_m;
++
++              ret_m = __do_mmap_pgoff(NULL, addr + SEGMEXEC_TASK_SIZE, 0UL, PROT_NONE, MAP_PRIVATE | MAP_FIXED | MAP_MIRROR, addr);
++              if (ret_m > TASK_SIZE) {
++                      do_munmap(current->mm, addr, len);
++                      ret = ret_m;
++              }
++      }
++
++      return ret;
++}
++
++unsigned long __do_brk(unsigned long addr, unsigned long len)
++#else
+ unsigned long do_brk(unsigned long addr, unsigned long len)
++#endif
+ {
+       struct mm_struct * mm = current->mm;
+       struct vm_area_struct * vma, * prev;
+@@ -1623,6 +1990,13 @@
+       if (!len)
+               return addr;
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (current->flags & PF_PAX_SEGMEXEC) {
++              if ((addr + len) > SEGMEXEC_TASK_SIZE || (addr + len) < addr)
++                      return -EINVAL;
++      } else
++#endif
++
+       if ((addr + len) > TASK_SIZE || (addr + len) < addr)
+               return -EINVAL;
+@@ -1632,6 +2006,7 @@
+       if (mm->def_flags & VM_LOCKED) {
+               unsigned long locked = mm->locked_vm << PAGE_SHIFT;
+               locked += len;
++              gr_learn_resource(current, RLIMIT_MEMLOCK, locked, 1);
+               if (locked > current->rlim[RLIMIT_MEMLOCK].rlim_cur)
+                       return -EAGAIN;
+       }
+@@ -1648,6 +2023,7 @@
+       }
+       /* Check against address space limits *after* clearing old maps... */
++      gr_learn_resource(current, RLIMIT_AS, (mm->total_vm << PAGE_SHIFT) + len, 1);
+       if ((mm->total_vm << PAGE_SHIFT) + len
+           > current->rlim[RLIMIT_AS].rlim_cur)
+               return -ENOMEM;
+@@ -1660,6 +2036,18 @@
+       flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++      if (current->flags & (PF_PAX_PAGEEXEC | PF_PAX_SEGMEXEC)) {
++              flags &= ~VM_EXEC;
++
++#ifdef CONFIG_PAX_MPROTECT
++              if (current->flags & PF_PAX_MPROTECT)
++                      flags &= ~VM_MAYEXEC;
++#endif
++
++      }
++#endif
++
+       /* Can we just expand an old private anonymous mapping? */
+       if (vma_merge(mm, prev, addr, addr + len, flags,
+                                       NULL, NULL, pgoff, NULL))
+@@ -1680,6 +2068,13 @@
+       vma->vm_end = addr + len;
+       vma->vm_pgoff = pgoff;
+       vma->vm_flags = flags;
++
++#ifdef CONFIG_PAX_PAGEEXEC
++      if (!(current->flags & PF_PAX_PAGEEXEC) && (flags & (VM_READ|VM_WRITE)))
++              vma->vm_page_prot = protection_map[(flags | VM_EXEC) & 0x0f];
++      else
++#endif
++
+       vma->vm_page_prot = protection_map[flags & 0x0f];
+       vma_link(mm, vma, prev, rb_link, rb_parent);
+ out:
+@@ -1688,6 +2083,7 @@
+               mm->locked_vm += len >> PAGE_SHIFT;
+               make_pages_present(addr, addr + len);
+       }
++      track_exec_limit(mm, addr, addr + len, flags);
+       return addr;
+ }
+diff -uNr linux-2.6.8/mm/mprotect.c linux-2.6.8.grsecurity/mm/mprotect.c
+--- linux-2.6.8/mm/mprotect.c  2004-08-14 07:38:11.000000000 +0200
++++ linux-2.6.8.grsecurity/mm/mprotect.c       2004-08-16 18:01:21.000000000 +0200
+@@ -18,11 +18,18 @@
+ #include <linux/security.h>
+ #include <linux/mempolicy.h>
+ #include <linux/personality.h>
++#include <linux/grsecurity.h>
++
++#ifdef CONFIG_PAX_MPROTECT
++#include <linux/elf.h>
++#include <linux/fs.h>
++#endif
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+ #include <asm/cacheflush.h>
+ #include <asm/tlbflush.h>
++#include <asm/mmu_context.h>
+ static inline void
+ change_pte_range(pmd_t *pmd, unsigned long address,
+@@ -108,6 +115,90 @@
+       return;
+ }
++#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
++/* called while holding the mmap semaphor for writing */
++static inline void establish_user_cs_limit(struct mm_struct *mm, unsigned long start, unsigned long end)
++{
++      struct vm_area_struct *vma = find_vma(mm, start);
++
++      for (; vma && vma->vm_start < end; vma = vma->vm_next)
++              change_protection(vma, vma->vm_start, vma->vm_end, vma->vm_page_prot);
++
++}
++
++void track_exec_limit(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long prot)
++{
++      if (current->flags & PF_PAX_PAGEEXEC) {
++              unsigned long oldlimit, newlimit = 0UL;
++
++              spin_lock(&mm->page_table_lock);
++              oldlimit = mm->context.user_cs_limit;
++              if ((prot & VM_EXEC) && oldlimit < end)
++                      /* USER_CS limit moved up */
++                      newlimit = end;
++              else if (!(prot & VM_EXEC) && start < oldlimit && oldlimit <= end)
++                      /* USER_CS limit moved down */
++                      newlimit = start;
++
++              if (newlimit) {
++                      mm->context.user_cs_limit = newlimit;
++
++#ifdef CONFIG_SMP
++                      wmb();
++                      cpus_clear(mm->context.cpu_user_cs_mask);
++                      cpu_set(smp_processor_id(), mm->context.cpu_user_cs_mask);
++#endif
++
++                      set_user_cs(mm, smp_processor_id());
++              }
++              spin_unlock(&mm->page_table_lock);
++              if (newlimit == end)
++                      establish_user_cs_limit(mm, oldlimit, end);
++      }
++}
++#endif
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++static int __mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
++      unsigned long start, unsigned long end, unsigned int newflags);
++
++static int mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
++      unsigned long start, unsigned long end, unsigned int newflags)
++{
++      if (vma->vm_flags & VM_MIRROR) {
++              struct vm_area_struct * vma_m, * prev_m;
++              unsigned long start_m, end_m;
++              int error;
++
++              start_m = vma->vm_start + vma->vm_mirror;
++              vma_m = find_vma_prev(vma->vm_mm, start_m, &prev_m);
++              if (vma_m && vma_m->vm_start == start_m && (vma_m->vm_flags & VM_MIRROR)) {
++                      start_m = start + vma->vm_mirror;
++                      end_m = end + vma->vm_mirror;
++                      if ((current->flags & PF_PAX_SEGMEXEC) && !(newflags & VM_EXEC))
++                              error = __mprotect_fixup(vma_m, &prev_m, start_m, end_m, vma_m->vm_flags & ~(PROT_READ | PROT_WRITE | PROT_EXEC));
++                      else
++                              error = __mprotect_fixup(vma_m, &prev_m, start_m, end_m, newflags);
++                      if (error)
++                              return error;
++              } else {
++                      printk("PAX: VMMIRROR: mprotect bug in %s, %08lx\n", current->comm, vma->vm_start);
++                      return -ENOMEM;
++              }
++      }
++
++      return __mprotect_fixup(vma, pprev, start, end, newflags);
++}
++
++static int __mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
++      unsigned long start, unsigned long end, unsigned int newflags)
++{
++      struct mm_struct * mm = vma->vm_mm;
++      unsigned long charged = 0;
++      pgprot_t newprot;
++      pgoff_t pgoff;
++      int error;
++#else
+ static int
+ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
+       unsigned long start, unsigned long end, unsigned int newflags)
+@@ -122,6 +213,7 @@
+               *pprev = vma;
+               return 0;
+       }
++#endif
+       /*
+        * If we make a private mapping writable we increase our commit;
+@@ -140,6 +232,12 @@
+               }
+       }
++#ifdef CONFIG_PAX_PAGEEXEC
++      if (!(current->flags & PF_PAX_PAGEEXEC) && (newflags & (VM_READ|VM_WRITE)))
++              newprot = protection_map[(newflags | VM_EXEC) & 0xf];
++      else
++#endif
++
+       newprot = protection_map[newflags & 0xf];
+       /*
+@@ -185,6 +283,69 @@
+       return error;
+ }
++#ifdef CONFIG_PAX_MPROTECT
++/* PaX: non-PIC ELF libraries need relocations on their executable segments
++ * therefore we'll grant them VM_MAYWRITE once during their life.
++ *
++ * The checks favour ld-linux.so behaviour which operates on a per ELF segment
++ * basis because we want to allow the common case and not the special ones.
++ */
++static inline void pax_handle_maywrite(struct vm_area_struct * vma, unsigned long start)
++{
++      struct elfhdr elf_h;
++      struct elf_phdr elf_p, p_dyn;
++      elf_dyn dyn;
++      unsigned long i, j = 65536UL / sizeof(struct elf_phdr);
++
++#ifndef CONFIG_PAX_NOELFRELOCS
++      if ((vma->vm_start != start) ||
++          !vma->vm_file ||
++          !(vma->vm_flags & VM_MAYEXEC) ||
++          (vma->vm_flags & VM_MAYNOTWRITE))
++#endif
++
++              return;
++
++      if (0 > kernel_read(vma->vm_file, 0UL, (char*)&elf_h, sizeof(elf_h)) ||
++          memcmp(elf_h.e_ident, ELFMAG, SELFMAG) ||
++
++#ifdef CONFIG_PAX_ETEXECRELOCS
++          (elf_h.e_type != ET_DYN && elf_h.e_type != ET_EXEC) ||
++#else
++          elf_h.e_type != ET_DYN ||
++#endif
++
++          !elf_check_arch(&elf_h) ||
++          elf_h.e_phentsize != sizeof(struct elf_phdr) ||
++          elf_h.e_phnum > j)
++              return;
++
++      for (i = 0UL; i < elf_h.e_phnum; i++) {
++              if (0 > kernel_read(vma->vm_file, elf_h.e_phoff + i*sizeof(elf_p), (char*)&elf_p, sizeof(elf_p)))
++                      return;
++              if (elf_p.p_type == PT_DYNAMIC) {
++                      p_dyn = elf_p;
++                      j = i;
++              }
++      }
++      if (elf_h.e_phnum <= j)
++              return;
++
++      i = 0UL;
++      do {
++              if (0 > kernel_read(vma->vm_file, p_dyn.p_offset + i*sizeof(dyn), (char*)&dyn, sizeof(dyn)))
++                      return;
++              if (dyn.d_tag == DT_TEXTREL || (dyn.d_tag == DT_FLAGS && (dyn.d_un.d_val & DF_TEXTREL))) {
++                      vma->vm_flags |= VM_MAYWRITE | VM_MAYNOTWRITE;
++                      gr_log_textrel(vma);
++                      return;
++              }
++              i++;
++      } while (dyn.d_tag != DT_NULL);
++      return;
++}
++#endif
++
+ asmlinkage long
+ sys_mprotect(unsigned long start, size_t len, unsigned long prot)
+ {
+@@ -202,6 +363,17 @@
+       end = start + len;
+       if (end < start)
+               return -ENOMEM;
++
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (current->flags & PF_PAX_SEGMEXEC) {
++              if (end > SEGMEXEC_TASK_SIZE)
++                      return -EINVAL;
++      } else
++#endif
++
++      if (end > TASK_SIZE)
++              return -EINVAL;
++
+       if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM))
+               return -EINVAL;
+       if (end == start)
+@@ -242,6 +414,16 @@
+       if (start > vma->vm_start)
+               prev = vma;
++      if (!gr_acl_handle_mprotect(vma->vm_file, prot)) {
++              error = -EACCES;
++              goto out;
++      }
++
++#ifdef CONFIG_PAX_MPROTECT
++      if ((current->flags & PF_PAX_MPROTECT) && (prot & PROT_WRITE))
++              pax_handle_maywrite(vma, start);
++#endif
++
+       for (nstart = start ; ; ) {
+               unsigned int newflags;
+@@ -259,6 +441,12 @@
+                       goto out;
+               }
++#ifdef CONFIG_PAX_MPROTECT
++              /* PaX: disallow write access after relocs are done, hopefully noone else needs it... */
++              if ((current->flags & PF_PAX_MPROTECT) && (prot & PROT_WRITE) && (vma->vm_flags & VM_MAYNOTWRITE))
++                      newflags &= ~VM_MAYWRITE;
++#endif
++
+               error = security_file_mprotect(vma, prot);
+               if (error)
+                       goto out;
+@@ -282,6 +470,9 @@
+                       goto out;
+               }
+       }
++
++      track_exec_limit(current->mm, start, end, vm_flags);
++
+ out:
+       up_write(&current->mm->mmap_sem);
+       return error;
+diff -uNr linux-2.6.8/mm/mremap.c linux-2.6.8.grsecurity/mm/mremap.c
+--- linux-2.6.8/mm/mremap.c    2004-08-14 07:36:59.000000000 +0200
++++ linux-2.6.8.grsecurity/mm/mremap.c 2004-08-16 17:09:59.000000000 +0200
+@@ -128,6 +128,12 @@
+                       if (dst) {
+                               pte_t pte;
+                               pte = ptep_clear_flush(vma, old_addr, src);
++
++#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
++                              if ((current->flags & PF_PAX_PAGEEXEC) && !(vma->vm_flags & VM_EXEC))
++                                      pte_exprotect(pte);
++#endif
++
+                               set_pte(dst, pte);
+                       } else
+                               error = -ENOMEM;
+@@ -266,6 +272,18 @@
+       if (!new_len)
+               goto out;
++#ifdef CONFIG_PAX_SEGMEXEC
++      if (current->flags & PF_PAX_SEGMEXEC) {
++              if (new_len > SEGMEXEC_TASK_SIZE || addr > SEGMEXEC_TASK_SIZE-new_len ||
++                  old_len > SEGMEXEC_TASK_SIZE || addr > SEGMEXEC_TASK_SIZE-old_len)
++                      goto out;
++      } else
++#endif
++
++      if (new_len > TASK_SIZE || addr > TASK_SIZE-new_len ||
++          old_len > TASK_SIZE || addr > TASK_SIZE-old_len)
++              goto out;
++
+       /* new_addr is only valid if MREMAP_FIXED is specified */
+       if (flags & MREMAP_FIXED) {
+               if (new_addr & ~PAGE_MASK)
+@@ -273,6 +291,13 @@
+               if (!(flags & MREMAP_MAYMOVE))
+                       goto out;
++#ifdef CONFIG_PAX_SEGMEXEC
++              if (current->flags & PF_PAX_SEGMEXEC) {
++                      if (new_len > SEGMEXEC_TASK_SIZE || new_addr > SEGMEXEC_TASK_SIZE-new_len)
++                              goto out;
++              } else
++#endif
++
+               if (new_len > TASK_SIZE || new_addr > TASK_SIZE - new_len)
+                       goto out;
+@@ -316,6 +341,16 @@
+               ret = -EINVAL;
+               goto out;
+       }
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++      if ((current->flags & (PF_PAX_SEGMEXEC | PF_PAX_RANDEXEC)) &&
++          (vma->vm_flags & VM_MIRROR))
++      {
++              ret = -EINVAL;
++              goto out;
++      }
++#endif
++
+       /* We can't remap across vm area boundaries */
+       if (old_len > vma->vm_end - addr)
+               goto out;
+@@ -364,6 +399,7 @@
+                                                  addr + new_len);
+                       }
+                       ret = addr;
++                      track_exec_limit(vma->vm_mm, vma->vm_start, addr + new_len, vma->vm_flags);
+                       goto out;
+               }
+       }
+@@ -374,8 +410,8 @@
+        */
+       ret = -ENOMEM;
+       if (flags & MREMAP_MAYMOVE) {
++              unsigned long map_flags = 0;
+               if (!(flags & MREMAP_FIXED)) {
+-                      unsigned long map_flags = 0;
+                       if (vma->vm_flags & VM_MAYSHARE)
+                               map_flags |= MAP_SHARED;
+@@ -385,7 +421,12 @@
+                       if (new_addr & ~PAGE_MASK)
+                               goto out;
+               }
++              map_flags = vma->vm_flags;
+               ret = move_vma(vma, addr, old_len, new_len, new_addr);
++              if (!(ret & ~PAGE_MASK)) {
++                      track_exec_limit(current->mm, addr, addr + old_len, 0UL);
++                      track_exec_limit(current->mm, new_addr, new_addr + new_len, map_flags);
++              }
+       }
+ out:
+       if (ret & ~PAGE_MASK)
+diff -uNr linux-2.6.8/mm/rmap.c linux-2.6.8.grsecurity/mm/rmap.c
+--- linux-2.6.8/mm/rmap.c      2004-08-14 07:37:42.000000000 +0200
++++ linux-2.6.8.grsecurity/mm/rmap.c   2004-08-16 17:09:59.000000000 +0200
+@@ -84,6 +84,19 @@
+                               spin_unlock(&anon_vma->lock);
+                       allocated = NULL;
+               }
++
++#if defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_RANDEXEC)
++              if (vma->vm_flags & VM_MIRROR) {
++                      struct vm_area_struct *vma_m;
++
++                      vma_m = find_vma(vma->vm_mm, vma->vm_start + vma->vm_mirror);
++                      BUG_ON(!vma_m || vma_m->vm_start != vma->vm_start + vma->vm_mirror);
++                      BUG_ON(vma_m->anon_vma || vma->vm_pgoff != vma_m->vm_pgoff);
++                      vma_m->anon_vma = anon_vma;
++                      __anon_vma_link(vma_m);
++              }
++#endif
++
+               spin_unlock(&mm->page_table_lock);
+               if (unlikely(allocated))
+                       anon_vma_free(allocated);
+diff -uNr linux-2.6.8/net/ipv4/af_inet.c linux-2.6.8.grsecurity/net/ipv4/af_inet.c
+--- linux-2.6.8/net/ipv4/af_inet.c     2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/net/ipv4/af_inet.c  2004-08-16 17:09:59.000000000 +0200
+@@ -87,6 +87,7 @@
+ #include <linux/init.h>
+ #include <linux/poll.h>
+ #include <linux/netfilter_ipv4.h>
++#include <linux/grsecurity.h>
+ #include <asm/uaccess.h>
+ #include <asm/system.h>
+@@ -320,7 +321,12 @@
+       else
+               inet->pmtudisc = IP_PMTUDISC_WANT;
+-      inet->id = 0;
++#ifdef CONFIG_GRKERNSEC_RANDID
++      if (grsec_enable_randid)
++              inet->id = htons(ip_randomid());
++      else
++#endif
++              inet->id = 0;
+       sock_init_data(sock, sk);
+       sk_set_owner(sk, THIS_MODULE);
+diff -uNr linux-2.6.8/net/ipv4/datagram.c linux-2.6.8.grsecurity/net/ipv4/datagram.c
+--- linux-2.6.8/net/ipv4/datagram.c    2004-08-14 07:36:09.000000000 +0200
++++ linux-2.6.8.grsecurity/net/ipv4/datagram.c 2004-08-16 18:04:59.000000000 +0200
+@@ -63,7 +63,13 @@
+       inet->daddr = rt->rt_dst;
+       inet->dport = usin->sin_port;
+       sk->sk_state = TCP_ESTABLISHED;
+-      inet->id = jiffies;
++
++#ifdef CONFIG_GRKERNSEC_RANDID
++      if (grsec_enable_randid)
++              inet->id = htons(ip_randomid());
++      else
++#endif
++              inet->id = jiffies;
+       sk_dst_set(sk, &rt->u.dst);
+       return(0);
+diff -uNr linux-2.6.8/net/ipv4/ip_output.c linux-2.6.8.grsecurity/net/ipv4/ip_output.c
+--- linux-2.6.8/net/ipv4/ip_output.c   2004-08-14 07:38:08.000000000 +0200
++++ linux-2.6.8.grsecurity/net/ipv4/ip_output.c        2004-08-16 17:10:00.000000000 +0200
+@@ -64,6 +64,7 @@
+ #include <linux/proc_fs.h>
+ #include <linux/stat.h>
+ #include <linux/init.h>
++#include <linux/grsecurity.h>
+ #include <net/snmp.h>
+ #include <net/ip.h>
+@@ -1147,6 +1148,12 @@
+       iph->tos = inet->tos;
+       iph->tot_len = htons(skb->len);
+       iph->frag_off = df;
++
++#ifdef CONFIG_GRKERNSEC_RANDID
++      if (grsec_enable_randid)
++              iph->id = htons(ip_randomid());
++      else
++#endif
+       if (!df) {
+               __ip_select_ident(iph, &rt->u.dst, 0);
+       } else {
+diff -uNr linux-2.6.8/net/ipv4/netfilter/ipt_stealth.c linux-2.6.8.grsecurity/net/ipv4/netfilter/ipt_stealth.c
+--- linux-2.6.8/net/ipv4/netfilter/ipt_stealth.c       1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.grsecurity/net/ipv4/netfilter/ipt_stealth.c    2004-08-16 17:10:00.000000000 +0200
+@@ -0,0 +1,112 @@
++/* Kernel module to add stealth support.
++ *
++ * Copyright (C) 2002 Brad Spengler  <spender@grsecurity.net>
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/skbuff.h>
++#include <linux/net.h>
++#include <linux/sched.h>
++#include <linux/inet.h>
++#include <linux/stddef.h>
++
++#include <net/ip.h>
++#include <net/sock.h>
++#include <net/tcp.h>
++#include <net/udp.h>
++#include <net/route.h>
++#include <net/inet_common.h>
++
++#include <linux/netfilter_ipv4/ip_tables.h>
++
++MODULE_LICENSE("GPL");
++
++extern struct sock *udp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport, int dif);
++
++static int
++match(const struct sk_buff *skb,
++      const struct net_device *in,
++      const struct net_device *out,
++      const void *matchinfo,
++      int offset,
++      int *hotdrop)
++{
++      struct iphdr *ip = skb->nh.iph;
++      struct tcphdr th;
++      struct udphdr uh;
++      struct sock *sk = NULL;
++
++      if (!ip || offset) return 0;
++
++      switch(ip->protocol) {
++      case IPPROTO_TCP:
++              if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &th, sizeof(th)) < 0) {
++                      *hotdrop = 1;
++                      return 0;
++              }
++              if (!(th.syn && !th.ack)) return 0;
++              sk = tcp_v4_lookup_listener(ip->daddr, ntohs(th.dest), ((struct rtable*)skb->dst)->rt_iif);     
++              break;
++      case IPPROTO_UDP:
++              if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &uh, sizeof(uh)) < 0) {
++                      *hotdrop = 1;
++                      return 0;
++              }
++              sk = udp_v4_lookup(ip->saddr, uh.source, ip->daddr, uh.dest, skb->dev->ifindex);
++              break;
++      default:
++              return 0;
++      }
++
++      if(!sk) // port is being listened on, match this
++              return 1;
++      else {
++              sock_put(sk);
++              return 0;
++      }
++}
++
++/* Called when user tries to insert an entry of this type. */
++static int
++checkentry(const char *tablename,
++           const struct ipt_ip *ip,
++           void *matchinfo,
++           unsigned int matchsize,
++           unsigned int hook_mask)
++{
++        if (matchsize != IPT_ALIGN(0))
++                return 0;
++
++      if(((ip->proto == IPPROTO_TCP && !(ip->invflags & IPT_INV_PROTO)) ||
++              ((ip->proto == IPPROTO_UDP) && !(ip->invflags & IPT_INV_PROTO)))
++              && (hook_mask & (1 << NF_IP_LOCAL_IN)))
++                      return 1;
++
++      printk("stealth: Only works on TCP and UDP for the INPUT chain.\n");
++
++        return 0;
++}
++
++
++static struct ipt_match stealth_match = {
++      .name = "stealth",
++      .match = &match,
++      .checkentry = &checkentry,
++      .destroy = NULL,
++      .me = THIS_MODULE
++};
++
++static int __init init(void)
++{
++      return ipt_register_match(&stealth_match);
++}
++
++static void __exit fini(void)
++{
++      ipt_unregister_match(&stealth_match);
++}
++
++module_init(init);
++module_exit(fini);
+diff -uNr linux-2.6.8/net/ipv4/netfilter/Kconfig linux-2.6.8.grsecurity/net/ipv4/netfilter/Kconfig
+--- linux-2.6.8/net/ipv4/netfilter/Kconfig     2004-08-14 07:37:38.000000000 +0200
++++ linux-2.6.8.grsecurity/net/ipv4/netfilter/Kconfig  2004-08-16 17:10:00.000000000 +0200
+@@ -225,6 +225,21 @@
+         To compile it as a module, choose M here.  If unsure, say N.
++config IP_NF_MATCH_STEALTH
++      tristate "stealth match support"
++      depends on IP_NF_IPTABLES
++      help
++        Enabling this option will drop all syn packets coming to unserved tcp
++        ports as well as all packets coming to unserved udp ports.  If you
++        are using your system to route any type of packets (ie. via NAT)
++        you should put this module at the end of your ruleset, since it will
++        drop packets that aren't going to ports that are listening on your
++        machine itself, it doesn't take into account that the packet might be
++        destined for someone on your internal network if you're using NAT for
++        instance.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
+ config IP_NF_MATCH_HELPER
+       tristate "Helper match support"
+       depends on IP_NF_CONNTRACK && IP_NF_IPTABLES
+diff -uNr linux-2.6.8/net/ipv4/netfilter/Makefile linux-2.6.8.grsecurity/net/ipv4/netfilter/Makefile
+--- linux-2.6.8/net/ipv4/netfilter/Makefile    2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/net/ipv4/netfilter/Makefile 2004-08-16 17:10:00.000000000 +0200
+@@ -67,6 +67,8 @@
+ obj-$(CONFIG_IP_NF_MATCH_REALM) += ipt_realm.o
+ obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
++obj-$(CONFIG_IP_NF_MATCH_STEALTH) += ipt_stealth.o
++
+ obj-$(CONFIG_IP_NF_MATCH_PHYSDEV) += ipt_physdev.o
+ # targets
+diff -uNr linux-2.6.8/net/ipv4/tcp_ipv4.c linux-2.6.8.grsecurity/net/ipv4/tcp_ipv4.c
+--- linux-2.6.8/net/ipv4/tcp_ipv4.c    2004-08-14 07:36:44.000000000 +0200
++++ linux-2.6.8.grsecurity/net/ipv4/tcp_ipv4.c 2004-08-16 17:10:00.000000000 +0200
+@@ -62,6 +62,7 @@
+ #include <linux/jhash.h>
+ #include <linux/init.h>
+ #include <linux/times.h>
++#include <linux/grsecurity.h>
+ #include <net/icmp.h>
+ #include <net/tcp.h>
+@@ -223,6 +224,10 @@
+               spin_lock(&tcp_portalloc_lock);
+               rover = tcp_port_rover;
++#ifdef CONFIG_GRKERNSEC_RANDSRC
++              if (grsec_enable_randsrc && (high > low))
++                      rover = low + (get_random_long() % remaining);
++#endif
+               do {
+                       rover++;
+                       if (rover < low || rover > high)
+@@ -537,6 +542,11 @@
+ static inline __u32 tcp_v4_init_sequence(struct sock *sk, struct sk_buff *skb)
+ {
++#ifdef CONFIG_GRKERNSEC_RANDISN
++      if (likely(grsec_enable_randisn))
++              return ip_randomisn();
++      else
++#endif
+       return secure_tcp_sequence_number(skb->nh.iph->daddr,
+                                         skb->nh.iph->saddr,
+                                         skb->h.th->dest,
+@@ -669,12 +679,15 @@
+                */
+               spin_lock(&tcp_portalloc_lock);
+               rover = tcp_port_rover;
+-
++#ifdef CONFIG_GRKERNSEC_RANDSRC
++              if (grsec_enable_randsrc && (high > low))
++                      rover = low + (get_random_long() % remaining);
++#endif
+               do {
+                       rover++;
+                       if ((rover < low) || (rover > high))
+                               rover = low;
+-                      head = &tcp_bhash[tcp_bhashfn(rover)];
++                      head = &tcp_bhash[tcp_bhashfn(rover)];
+                       spin_lock(&head->lock);
+                       /* Does not bother with rcv_saddr checks,
+@@ -724,6 +737,15 @@
+               }
+               spin_unlock(&head->lock);
++#ifdef CONFIG_GRKERNSEC
++              gr_del_task_from_ip_table(current);
++              current->gr_saddr = inet_sk(sk)->rcv_saddr;
++              current->gr_daddr = inet_sk(sk)->daddr;
++              current->gr_sport = inet_sk(sk)->sport;
++              current->gr_dport = inet_sk(sk)->dport;
++              gr_add_to_task_ip_table(current);
++#endif
++
+               if (tw) {
+                       tcp_tw_deschedule(tw);
+                       tcp_tw_put(tw);
+@@ -843,13 +865,24 @@
+       tcp_v4_setup_caps(sk, &rt->u.dst);
+       tp->ext2_header_len = rt->u.dst.header_len;
+-      if (!tp->write_seq)
++      if (!tp->write_seq) {
++#ifdef CONFIG_GRKERNSEC_RANDISN
++              if (likely(grsec_enable_randisn))
++                      tp->write_seq = ip_randomisn();
++              else
++#endif
+               tp->write_seq = secure_tcp_sequence_number(inet->saddr,
+                                                          inet->daddr,
+                                                          inet->sport,
+                                                          usin->sin_port);
++      }
+-      inet->id = tp->write_seq ^ jiffies;
++#ifdef CONFIG_GRKERNSEC_RANDID
++      if (grsec_enable_randid)
++              inet->id = htons(ip_randomid());
++      else
++#endif
++              inet->id = tp->write_seq ^ jiffies;
+       err = tcp_connect(sk);
+       rt = NULL;
+@@ -1593,7 +1626,13 @@
+       if (newinet->opt)
+               newtp->ext_header_len = newinet->opt->optlen;
+       newtp->ext2_header_len = dst->header_len;
+-      newinet->id = newtp->write_seq ^ jiffies;
++
++#ifdef CONFIG_GRKERNSEC_RANDID
++      if (grsec_enable_randid)
++              newinet->id = htons(ip_randomid());
++      else
++#endif
++              newinet->id = newtp->write_seq ^ jiffies;
+       tcp_sync_mss(newsk, dst_pmtu(dst));
+       newtp->advmss = dst_metric(dst, RTAX_ADVMSS);
+diff -uNr linux-2.6.8/net/ipv4/udp.c linux-2.6.8.grsecurity/net/ipv4/udp.c
+--- linux-2.6.8/net/ipv4/udp.c 2004-08-14 07:36:17.000000000 +0200
++++ linux-2.6.8.grsecurity/net/ipv4/udp.c      2004-08-16 17:10:00.000000000 +0200
+@@ -100,6 +100,7 @@
+ #include <linux/skbuff.h>
+ #include <linux/proc_fs.h>
+ #include <linux/seq_file.h>
++#include <linux/grsecurity.h>
+ #include <net/sock.h>
+ #include <net/udp.h>
+ #include <net/icmp.h>
+@@ -108,6 +109,12 @@
+ #include <net/checksum.h>
+ #include <net/xfrm.h>
++extern int gr_search_udp_recvmsg(const struct sock *sk,
++                               const struct sk_buff *skb);
++extern int gr_search_udp_sendmsg(const struct sock *sk,
++                               const struct sockaddr_in *addr);
++
++
+ /*
+  *    Snmp MIB for the UDP layer
+  */
+@@ -538,9 +545,16 @@
+               dport = usin->sin_port;
+               if (dport == 0)
+                       return -EINVAL;
++
++              if (!gr_search_udp_sendmsg(sk, usin))
++                      return -EPERM;
+       } else {
+               if (sk->sk_state != TCP_ESTABLISHED)
+                       return -EDESTADDRREQ;
++
++              if (!gr_search_udp_sendmsg(sk, NULL))
++                      return -EPERM;
++
+               daddr = inet->daddr;
+               dport = inet->dport;
+               /* Open fast path for connected socket.
+@@ -792,7 +806,12 @@
+       if (!skb)
+               goto out;
+   
+-      copied = skb->len - sizeof(struct udphdr);
++      if (!gr_search_udp_recvmsg(sk, skb)) {
++              err = -EPERM;
++              goto out_free;
++      }
++
++      copied = skb->len - sizeof(struct udphdr);
+       if (copied > len) {
+               copied = len;
+               msg->msg_flags |= MSG_TRUNC;
+diff -uNr linux-2.6.8/net/socket.c linux-2.6.8.grsecurity/net/socket.c
+--- linux-2.6.8/net/socket.c   2004-08-14 07:36:45.000000000 +0200
++++ linux-2.6.8.grsecurity/net/socket.c        2004-08-16 17:10:00.000000000 +0200
+@@ -81,6 +81,7 @@
+ #include <linux/syscalls.h>
+ #include <linux/compat.h>
+ #include <linux/kmod.h>
++#include <linux/in.h>
+ #ifdef CONFIG_NET_RADIO
+ #include <linux/wireless.h>           /* Note : will define WIRELESS_EXT */
+@@ -94,6 +95,18 @@
+ #include <net/sock.h>
+ #include <linux/netfilter.h>
++extern void gr_attach_curr_ip(const struct sock *sk);
++extern int gr_handle_sock_all(const int family, const int type,
++                            const int protocol);
++extern int gr_handle_sock_server(const struct sockaddr *sck);
++extern int gr_handle_sock_client(const struct sockaddr *sck);
++extern int gr_search_connect(const struct socket * sock,
++                           const struct sockaddr_in * addr);
++extern int gr_search_bind(const struct socket * sock,
++                         const struct sockaddr_in * addr);
++extern int gr_search_socket(const int domain, const int type,
++                          const int protocol);
++
+ static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
+ static ssize_t sock_aio_read(struct kiocb *iocb, char __user *buf,
+                        size_t size, loff_t pos);
+@@ -960,6 +973,7 @@
+               printk(KERN_DEBUG "sock_close: NULL inode\n");
+               return 0;
+       }
++
+       sock_fasync(-1, filp, 0);
+       sock_release(SOCKET_I(inode));
+       return 0;
+@@ -1189,6 +1203,16 @@
+       int retval;
+       struct socket *sock;
++      if(!gr_search_socket(family, type, protocol)) {
++              retval = -EACCES;
++              goto out;
++      }
++
++      if (gr_handle_sock_all(family, type, protocol)) {
++              retval = -EACCES;
++              goto out;
++      }
++
+       retval = sock_create(family, type, protocol, &sock);
+       if (retval < 0)
+               goto out;
+@@ -1284,11 +1308,23 @@
+ {
+       struct socket *sock;
+       char address[MAX_SOCK_ADDR];
++      struct sockaddr *sck;
+       int err;
+       if((sock = sockfd_lookup(fd,&err))!=NULL)
+       {
+               if((err=move_addr_to_kernel(umyaddr,addrlen,address))>=0) {
++                      sck = (struct sockaddr *)address;
++                      if (!gr_search_bind(sock, (struct sockaddr_in *)sck)) {
++                              sockfd_put(sock);
++                              return -EACCES;
++                      }
++
++                      if (gr_handle_sock_server(sck)) {
++                              sockfd_put(sock);
++                              return -EACCES;
++                      }
++
+                       err = security_socket_bind(sock, (struct sockaddr *)address, addrlen);
+                       if (err) {
+                               sockfd_put(sock);
+@@ -1391,6 +1427,7 @@
+               goto out_release;
+       security_socket_post_accept(sock, newsock);
++      gr_attach_curr_ip(newsock->sk);
+ out_put:
+       sockfd_put(sock);
+@@ -1418,6 +1455,7 @@
+ {
+       struct socket *sock;
+       char address[MAX_SOCK_ADDR];
++      struct sockaddr *sck;
+       int err;
+       sock = sockfd_lookup(fd, &err);
+@@ -1427,6 +1465,18 @@
+       if (err < 0)
+               goto out_put;
++      sck = (struct sockaddr *)address;
++
++      if (!gr_search_connect(sock, (struct sockaddr_in *)sck)) {
++              err = -EACCES;
++              goto out_put;
++      }
++
++      if (gr_handle_sock_client(sck)) {
++              err = -EACCES;
++              goto out_put;
++      }
++
+       err = security_socket_connect(sock, (struct sockaddr *)address, addrlen);
+       if (err)
+               goto out_put;
+@@ -1680,6 +1730,7 @@
+               err=sock->ops->shutdown(sock, how);
+               sockfd_put(sock);
+       }
++
+       return err;
+ }
+diff -uNr linux-2.6.8/net/sunrpc/xprt.c linux-2.6.8.grsecurity/net/sunrpc/xprt.c
+--- linux-2.6.8/net/sunrpc/xprt.c      2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/net/sunrpc/xprt.c   2004-08-16 17:10:00.000000000 +0200
+@@ -58,6 +58,7 @@
+ #include <linux/file.h>
+ #include <linux/workqueue.h>
+ #include <linux/random.h>
++#include <linux/grsecurity.h>
+ #include <net/sock.h>
+ #include <net/checksum.h>
+@@ -1337,6 +1338,12 @@
+  */
+ static inline u32 xprt_alloc_xid(struct rpc_xprt *xprt)
+ {
++
++#ifdef CONFIG_GRKERNSEC_RANDRPC
++      if (grsec_enable_randrpc)
++              return (u32) get_random_long();
++#endif
++
+       return xprt->xid++;
+ }
+diff -uNr linux-2.6.8/net/unix/af_unix.c linux-2.6.8.grsecurity/net/unix/af_unix.c
+--- linux-2.6.8/net/unix/af_unix.c     2004-08-14 07:37:15.000000000 +0200
++++ linux-2.6.8.grsecurity/net/unix/af_unix.c  2004-08-16 17:10:00.000000000 +0200
+@@ -118,6 +118,7 @@
+ #include <linux/mount.h>
+ #include <net/checksum.h>
+ #include <linux/security.h>
++#include <linux/grsecurity.h>
+ int sysctl_unix_max_dgram_qlen = 10;
+@@ -681,6 +682,11 @@
+               if (err)
+                       goto put_fail;
++              if (!gr_acl_handle_unix(nd.dentry, nd.mnt)) {
++                      err = -EACCES;
++                      goto put_fail;
++              }
++
+               err = -ECONNREFUSED;
+               if (!S_ISSOCK(nd.dentry->d_inode->i_mode))
+                       goto put_fail;
+@@ -704,6 +710,13 @@
+               if (u) {
+                       struct dentry *dentry;
+                       dentry = unix_sk(u)->dentry;
++
++                      if (!gr_handle_chroot_unix(u->sk_peercred.pid)) {
++                              err = -EPERM;
++                              sock_put(u);
++                              goto fail;
++                      }
++
+                       if (dentry)
+                               touch_atime(unix_sk(u)->mnt, dentry);
+               } else
+@@ -803,9 +816,18 @@
+                */
+               mode = S_IFSOCK |
+                      (SOCK_INODE(sock)->i_mode & ~current->fs->umask);
++
++              if (!gr_acl_handle_mknod(dentry, nd.dentry, nd.mnt, mode)) {
++                      err = -EACCES;
++                      goto out_mknod_dput;
++              }
++
+               err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0);
+               if (err)
+                       goto out_mknod_dput;
++
++              gr_handle_create(dentry, nd.mnt);
++
+               up(&nd.dentry->d_inode->i_sem);
+               dput(nd.dentry);
+               nd.dentry = dentry;
+@@ -823,6 +845,10 @@
+                       goto out_unlock;
+               }
++#ifdef CONFIG_GRKERNSEC_CHROOT_UNIX
++              sk->sk_peercred.pid = current->pid;
++#endif
++
+               list = &unix_socket_table[addr->hash];
+       } else {
+               list = &unix_socket_table[dentry->d_inode->i_ino & (UNIX_HASH_SIZE-1)];
+diff -uNr linux-2.6.8/security/commoncap.c linux-2.6.8.grsecurity/security/commoncap.c
+--- linux-2.6.8/security/commoncap.c   2004-08-14 07:36:56.000000000 +0200
++++ linux-2.6.8.grsecurity/security/commoncap.c        2004-08-16 17:10:00.000000000 +0200
+@@ -23,11 +23,12 @@
+ #include <linux/ptrace.h>
+ #include <linux/xattr.h>
+ #include <linux/hugetlb.h>
++#include <linux/grsecurity.h>
+ int cap_capable (struct task_struct *tsk, int cap)
+ {
+       /* Derived from include/linux/sched.h:capable. */
+-      if (cap_raised (tsk->cap_effective, cap))
++      if (cap_raised (tsk->cap_effective, cap) && gr_task_is_capable(tsk, cap))
+               return 0;
+       else
+               return -EPERM;
+@@ -37,7 +38,7 @@
+ {
+       /* Derived from arch/i386/kernel/ptrace.c:sys_ptrace. */
+       if (!cap_issubset (child->cap_permitted, current->cap_permitted) &&
+-          !capable (CAP_SYS_PTRACE))
++          !capable_nolog (CAP_SYS_PTRACE))
+               return -EPERM;
+       else
+               return 0;
+@@ -141,8 +142,11 @@
+               }
+       }
+-      current->suid = current->euid = current->fsuid = bprm->e_uid;
+-      current->sgid = current->egid = current->fsgid = bprm->e_gid;
++      if (!gr_check_user_change(-1, bprm->e_uid, bprm->e_uid))
++              current->suid = current->euid = current->fsuid = bprm->e_uid;
++
++      if (!gr_check_group_change(-1, bprm->e_gid, bprm->e_gid))
++              current->sgid = current->egid = current->fsgid = bprm->e_gid;
+       /* For init, we want to retain the capabilities set
+        * in the init_task struct. Thus we skip the usual
+@@ -153,6 +157,8 @@
+                   cap_intersect (new_permitted, bprm->cap_effective);
+       }
++      gr_handle_chroot_caps(current);
++
+       /* AUD: Audit candidate if current->cap_effective is set */
+       current->keep_capabilities = 0;
+@@ -334,7 +340,7 @@
+               /*
+                * Leave the last 3% for root
+                */
+-              if (!capable(CAP_SYS_ADMIN))
++              if (!capable_nolog(CAP_SYS_ADMIN))
+                       free -= free / 32;
+               if (free > pages)
+@@ -345,7 +351,7 @@
+                * only call if we're about to fail.
+                */
+               n = nr_free_pages();
+-              if (!capable(CAP_SYS_ADMIN))
++              if (!capable_nolog(CAP_SYS_ADMIN))
+                       n -= n / 32;
+               free += n;
+diff -uNr linux-2.6.8/security/dummy.c linux-2.6.8.grsecurity/security/dummy.c
+--- linux-2.6.8/security/dummy.c       2004-08-14 07:36:32.000000000 +0200
++++ linux-2.6.8.grsecurity/security/dummy.c    2004-08-16 17:10:00.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include <linux/hugetlb.h>
+ #include <linux/ptrace.h>
+ #include <linux/file.h>
++#include <linux/grsecurity.h>
+ static int dummy_ptrace (struct task_struct *parent, struct task_struct *child)
+ {
+@@ -182,8 +183,11 @@
+               }
+       }
+-      current->suid = current->euid = current->fsuid = bprm->e_uid;
+-      current->sgid = current->egid = current->fsgid = bprm->e_gid;
++      if (!gr_check_user_change(-1, bprm->e_uid, bprm->e_uid))
++              current->suid = current->euid = current->fsuid = bprm->e_uid;
++
++      if (!gr_check_group_change(-1, bprm->e_gid, bprm->e_gid))
++              current->sgid = current->egid = current->fsgid = bprm->e_gid;
+ }
+ static int dummy_bprm_set_security (struct linux_binprm *bprm)
+diff -uNr linux-2.6.8/security/Kconfig linux-2.6.8.grsecurity/security/Kconfig
+--- linux-2.6.8/security/Kconfig       2004-08-14 07:37:26.000000000 +0200
++++ linux-2.6.8.grsecurity/security/Kconfig    2004-08-16 17:10:00.000000000 +0200
+@@ -2,6 +2,8 @@
+ # Security configuration
+ #
++source grsecurity/Kconfig
++
+ menu "Security options"
+ config SECURITY
+diff -uNr linux-2.6.8/security/security.c linux-2.6.8.grsecurity/security/security.c
+--- linux-2.6.8/security/security.c    2004-08-14 07:36:11.000000000 +0200
++++ linux-2.6.8.grsecurity/security/security.c 2004-08-16 17:10:00.000000000 +0200
+@@ -206,4 +206,5 @@
+ EXPORT_SYMBOL_GPL(mod_reg_security);
+ EXPORT_SYMBOL_GPL(mod_unreg_security);
+ EXPORT_SYMBOL(capable);
++EXPORT_SYMBOL(capable_nolog);
+ EXPORT_SYMBOL(security_ops);
diff --git a/kernel-grsec.config b/kernel-grsec.config
new file mode 100644 (file)
index 0000000..7f1a334
--- /dev/null
@@ -0,0 +1,105 @@
+#
+# Grsecurity
+#
+CONFIG_GRKERNSEC=y
+# CONFIG_GRKERNSEC_LOW is not set
+# CONFIG_GRKERNSEC_MEDIUM is not set
+# CONFIG_GRKERNSEC_HIGH is not set
+CONFIG_GRKERNSEC_CUSTOM=y
+
+#
+# Address Space Protection
+#
+# CONFIG_GRKERNSEC_KMEM is not set
+# CONFIG_GRKERNSEC_IO is not set
+CONFIG_GRKERNSEC_PROC_MEMMAP=y
+CONFIG_GRKERNSEC_BRUTE=y
+CONFIG_GRKERNSEC_HIDESYM=y
+
+#
+# Role Based Access Control Options
+#
+CONFIG_GRKERNSEC_ACL_HIDEKERN=y
+CONFIG_GRKERNSEC_ACL_MAXTRIES=3
+CONFIG_GRKERNSEC_ACL_TIMEOUT=30
+
+#
+# Filesystem Protections
+#
+CONFIG_GRKERNSEC_PROC=y
+# CONFIG_GRKERNSEC_PROC_USER is not set
+CONFIG_GRKERNSEC_PROC_USERGROUP=y
+CONFIG_GRKERNSEC_PROC_GID=17
+CONFIG_GRKERNSEC_PROC_ADD=y
+CONFIG_GRKERNSEC_LINK=y
+CONFIG_GRKERNSEC_FIFO=y
+CONFIG_GRKERNSEC_CHROOT=y
+CONFIG_GRKERNSEC_CHROOT_MOUNT=y
+CONFIG_GRKERNSEC_CHROOT_DOUBLE=y
+CONFIG_GRKERNSEC_CHROOT_PIVOT=y
+CONFIG_GRKERNSEC_CHROOT_CHDIR=y
+CONFIG_GRKERNSEC_CHROOT_CHMOD=y
+CONFIG_GRKERNSEC_CHROOT_FCHDIR=y
+CONFIG_GRKERNSEC_CHROOT_MKNOD=y
+CONFIG_GRKERNSEC_CHROOT_SHMAT=y
+CONFIG_GRKERNSEC_CHROOT_UNIX=y
+CONFIG_GRKERNSEC_CHROOT_FINDTASK=y
+CONFIG_GRKERNSEC_CHROOT_NICE=y
+CONFIG_GRKERNSEC_CHROOT_SYSCTL=y
+CONFIG_GRKERNSEC_CHROOT_CAPS=y
+
+#
+# Kernel Auditing
+#
+# CONFIG_GRKERNSEC_AUDIT_GROUP is not set
+# CONFIG_GRKERNSEC_EXECLOG is not set
+CONFIG_GRKERNSEC_RESLOG=y
+# CONFIG_GRKERNSEC_CHROOT_EXECLOG is not set
+# CONFIG_GRKERNSEC_AUDIT_CHDIR is not set
+# CONFIG_GRKERNSEC_AUDIT_MOUNT is not set
+# CONFIG_GRKERNSEC_AUDIT_IPC is not set
+CONFIG_GRKERNSEC_SIGNAL=y
+CONFIG_GRKERNSEC_FORKFAIL=y
+CONFIG_GRKERNSEC_TIME=y
+CONFIG_GRKERNSEC_PROC_IPADDR=y
+# CONFIG_GRKERNSEC_AUDIT_TEXTREL is not set
+
+#
+# Executable Protections
+#
+CONFIG_GRKERNSEC_EXECVE=y
+CONFIG_GRKERNSEC_DMESG=y
+CONFIG_GRKERNSEC_RANDPID=y
+# CONFIG_GRKERNSEC_TPE is not set
+
+#
+# Network Protections
+#
+CONFIG_GRKERNSEC_RANDNET=y
+CONFIG_GRKERNSEC_RANDISN=y
+CONFIG_GRKERNSEC_RANDID=y
+CONFIG_GRKERNSEC_RANDSRC=y
+CONFIG_GRKERNSEC_RANDRPC=y
+CONFIG_GRKERNSEC_SOCKET=y
+CONFIG_GRKERNSEC_SOCKET_ALL=y
+CONFIG_GRKERNSEC_SOCKET_ALL_GID=65501
+CONFIG_GRKERNSEC_SOCKET_CLIENT=y
+CONFIG_GRKERNSEC_SOCKET_CLIENT_GID=65502
+CONFIG_GRKERNSEC_SOCKET_SERVER=y
+CONFIG_GRKERNSEC_SOCKET_SERVER_GID=65503
+
+#
+# Sysctl support
+#
+CONFIG_GRKERNSEC_SYSCTL=y
+
+#
+# Logging Options
+#
+CONFIG_GRKERNSEC_FLOODTIME=10
+CONFIG_GRKERNSEC_FLOODBURST=4
+
+#
+# PaX
+#
+# CONFIG_PAX is not set
diff --git a/kernel-hotfixes.patch b/kernel-hotfixes.patch
new file mode 100644 (file)
index 0000000..630a9ac
--- /dev/null
@@ -0,0 +1,221 @@
+--- linux-2.6.8-rc3/arch/i386/crypto/Makefile.orig     2004-08-07 14:54:25.000000000 +0200
++++ linux-2.6.8-rc3/arch/i386/crypto/Makefile  2004-08-07 18:41:49.000000000 +0200
+@@ -6,4 +6,4 @@
+ obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o
+-aes-i586-y := aes-i586-asm.o aes.o
++aes-i586-objs := aes-i586-asm.o aes.o
+
+--- linux-2.6.8/drivers/scsi/scsi_sysfs.c.orig 2004-08-14 14:36:42.953272032 +0200
++++ linux-2.6.8/drivers/scsi/scsi_sysfs.c      2004-08-14 14:36:47.490582256 +0200
+@@ -190,6 +190,7 @@
+         .name         = "scsi",
+         .match                = scsi_bus_match,
+ };
++EXPORT_SYMBOL(scsi_bus_type);
+ int scsi_sysfs_register(void)
+ {
+--- linux-2.6.9-rc1/drivers/scsi/qla2xxx/qla_os.c.orig 2004-08-29 16:44:20.000000000 +0200
++++ linux-2.6.9-rc1/drivers/scsi/qla2xxx/qla_os.c      2004-08-29 18:39:44.022077312 +0200
+@@ -229,72 +229,10 @@
+ void qla2x00_cmd_timeout(srb_t *);
+-static __inline__ void qla2x00_callback(scsi_qla_host_t *, struct scsi_cmnd *);
+-static __inline__ void sp_put(struct scsi_qla_host * ha, srb_t *sp);
+-static __inline__ void sp_get(struct scsi_qla_host * ha, srb_t *sp);
+-static __inline__ void
+-qla2x00_delete_from_done_queue(scsi_qla_host_t *, srb_t *); 
+-
+-/**************************************************************************
+-* sp_put
+-*
+-* Description:
+-*   Decrement reference count and call the callback if we're the last
+-*   owner of the specified sp. Will get the host_lock before calling
+-*   the callback.
+-*
+-* Input:
+-*   ha - pointer to the scsi_qla_host_t where the callback is to occur.
+-*   sp - pointer to srb_t structure to use.
+-*
+-* Returns:
+-*
+-**************************************************************************/
+-static inline void
+-sp_put(struct scsi_qla_host * ha, srb_t *sp)
+-{
+-        if (atomic_read(&sp->ref_count) == 0) {
+-              qla_printk(KERN_INFO, ha,
+-                      "%s(): **** SP->ref_count not zero\n",
+-                      __func__);
+-                DEBUG2(BUG();)
+-
+-                return;
+-      }
+-
+-        if (!atomic_dec_and_test(&sp->ref_count)) {
+-                return;
+-        }
+-
+-        qla2x00_callback(ha, sp->cmd);
+-}
+-
+-/**************************************************************************
+-* sp_get
+-*
+-* Description:
+-*   Increment reference count of the specified sp.
+-*
+-* Input:
+-*   sp - pointer to srb_t structure to use.
+-*
+-* Returns:
+-*
+-**************************************************************************/
++static inline void sp_put(struct scsi_qla_host * ha, srb_t *sp);
++static inline void sp_get(struct scsi_qla_host * ha, srb_t *sp);
+ static inline void
+-sp_get(struct scsi_qla_host * ha, srb_t *sp)
+-{
+-        atomic_inc(&sp->ref_count);
+-
+-        if (atomic_read(&sp->ref_count) > 2) {
+-              qla_printk(KERN_INFO, ha,
+-                      "%s(): **** SP->ref_count greater than two\n",
+-                      __func__);
+-                DEBUG2(BUG();)
+-
+-              return;
+-      }
+-}
++qla2x00_delete_from_done_queue(scsi_qla_host_t *, srb_t *); 
+ /*
+ * qla2x00_callback
+@@ -366,6 +304,68 @@
+       (*(cmd)->scsi_done)(cmd);
+ }
++/**************************************************************************
++* sp_put
++*
++* Description:
++*   Decrement reference count and call the callback if we're the last
++*   owner of the specified sp. Will get the host_lock before calling
++*   the callback.
++*
++* Input:
++*   ha - pointer to the scsi_qla_host_t where the callback is to occur.
++*   sp - pointer to srb_t structure to use.
++*
++* Returns:
++*
++**************************************************************************/
++static inline void
++sp_put(struct scsi_qla_host * ha, srb_t *sp)
++{
++        if (atomic_read(&sp->ref_count) == 0) {
++              qla_printk(KERN_INFO, ha,
++                      "%s(): **** SP->ref_count not zero\n",
++                      __func__);
++                DEBUG2(BUG();)
++
++                return;
++      }
++
++        if (!atomic_dec_and_test(&sp->ref_count)) {
++                return;
++        }
++
++        qla2x00_callback(ha, sp->cmd);
++}
++
++/**************************************************************************
++* sp_get
++*
++* Description:
++*   Increment reference count of the specified sp.
++*
++* Input:
++*   sp - pointer to srb_t structure to use.
++*
++* Returns:
++*
++**************************************************************************/
++static inline void
++sp_get(struct scsi_qla_host * ha, srb_t *sp)
++{
++        atomic_inc(&sp->ref_count);
++
++        if (atomic_read(&sp->ref_count) > 2) {
++              qla_printk(KERN_INFO, ha,
++                      "%s(): **** SP->ref_count greater than two\n",
++                      __func__);
++                DEBUG2(BUG();)
++
++              return;
++      }
++}
++
++
+ static inline void 
+ qla2x00_delete_from_done_queue(scsi_qla_host_t *dest_ha, srb_t *sp) 
+ {
+--- linux-2.6.9-rc1/drivers/scsi/qla2xxx/qla_rscn.c.orig       2004-08-24 09:02:26.000000000 +0200
++++ linux-2.6.9-rc1/drivers/scsi/qla2xxx/qla_rscn.c    2004-08-29 18:50:47.678186248 +0200
+@@ -242,6 +242,20 @@
+ }
+ /**
++ * qla2x00_remove_iodesc_timer() - Remove an active timer from an IO descriptor.
++ * @iodesc: io descriptor
++ */
++static inline void
++qla2x00_remove_iodesc_timer(struct io_descriptor *iodesc)
++{
++      if (iodesc->timer.function != NULL) {
++              del_timer_sync(&iodesc->timer);
++              iodesc->timer.data = (unsigned long) NULL;
++              iodesc->timer.function = NULL;
++      }
++}
++
++/**
+  * qla2x00_init_io_descriptors() - Initialize the pool of IO descriptors.
+  * @ha: HA context
+  */
+@@ -311,19 +325,6 @@
+       add_timer(&iodesc->timer);
+ }
+-/**
+- * qla2x00_remove_iodesc_timer() - Remove an active timer from an IO descriptor.
+- * @iodesc: io descriptor
+- */
+-static inline void
+-qla2x00_remove_iodesc_timer(struct io_descriptor *iodesc)
+-{
+-      if (iodesc->timer.function != NULL) {
+-              del_timer_sync(&iodesc->timer);
+-              iodesc->timer.data = (unsigned long) NULL;
+-              iodesc->timer.function = NULL;
+-      }
+-}
+ /** 
+  * IO descriptor support routines.
+diff -puN include/linux/spinlock.h~fix_outofline_spinlocks include/linux/spinlock.h
+--- gr_work/include/linux/spinlock.h~fix_outofline_spinlocks   2004-09-05 02:05:53.243858818 -0500
++++ gr_work-anton/include/linux/spinlock.h     2004-09-05 02:06:06.177805993 -0500
+@@ -38,7 +38,7 @@
+ #ifdef CONFIG_SMP
+ #include <asm/spinlock.h>
+-#define __lockfunc fastcall __attribute__((section(".spinlock.text")))
++#define __lockfunc fastcall __attribute__((section(".lock.text")))
+ int __lockfunc _spin_trylock(spinlock_t *lock);
+ int __lockfunc _write_trylock(rwlock_t *lock);
index b50723da468caa0d2661b7612c5228b5b0999112..4f8ce48d948f6b46c243a9f45539086c6de51a38 100644 (file)
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
 CONFIG_X86=y
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_GENERIC_ISA_DMA=y
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_SYSCTL=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HOTPLUG=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
 
 #
 # Processor type and features
 #
+CONFIG_X86_PC=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_GENERICARCH is not set
+# CONFIG_X86_ES7000 is not set
 CONFIG_M386=y
 # CONFIG_M486 is not set
 # CONFIG_M586 is not set
 # CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
 # CONFIG_M686 is not set
-# CONFIG_M686_L1_64 is not set
-# CONFIG_M686_L1_128 is not set
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_F00F_BUG=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_SMP=y
+CONFIG_NR_CPUS=16
+CONFIG_SCHED_SMT=y
+# CONFIG_PREEMPT is not set
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_NONFATAL=y
+# CONFIG_X86_MCE_P4THERMAL is not set
+CONFIG_TOSHIBA=m
+CONFIG_I8K=m
+CONFIG_OMNIBOOK=m
 CONFIG_MICROCODE=m
 CONFIG_X86_MSR=m
 CONFIG_X86_CPUID=m
-CONFIG_1GB=y
-# CONFIG_2GB is not set
+
+#
+# Firmware Drivers
+#
+# CONFIG_EDD is not set
+CONFIG_EFI_VARS=m
+# CONFIG_NOHIGHMEM is not set
+# CONFIG_HIGHMEM4G is not set
+CONFIG_HIGHMEM64G=y
+CONFIG_HIGHMEM=y
+CONFIG_X86_PAE=y
+# CONFIG_HIGHPTE is not set
 CONFIG_MATH_EMULATION=y
 CONFIG_MTRR=y
-CONFIG_SMP=y
+CONFIG_EFI=y
+CONFIG_IRQBALANCE=y
+CONFIG_BOOT_IOREMAP=y
+# CONFIG_REGPARM is not set
 
 #
-# Loadable module support
+# Power management options (ACPI, APM)
 #
-CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
-CONFIG_KMOD=y
+CONFIG_PM=y
+# CONFIG_SOFTWARE_SUSPEND is not set
+# CONFIG_PM_DISK is not set
 
 #
-# General setup
+# Software Suspend 2
+#
+CONFIG_SOFTWARE_SUSPEND2_CORE=m
+CONFIG_SOFTWARE_SUSPEND2=y
+CONFIG_SOFTWARE_SUSPEND2_WRITER=y
+
+#
+# Image Storage (you need at least one writer)
+#
+CONFIG_SOFTWARE_SUSPEND_SWAPWRITER=m
+CONFIG_SOFTWARE_SUSPEND_NULLWRITER=m
+
+#
+# Page Transformers
+#
+CONFIG_SOFTWARE_SUSPEND_LZF_COMPRESSION=m
+CONFIG_SOFTWARE_SUSPEND_GZIP_COMPRESSION=m
+CONFIG_SOFTWARE_SUSPEND_NULLTRANSFORMER=m
+
+#
+# User Interface Options
+#
+CONFIG_SOFTWARE_SUSPEND_BOOTSPLASH=m
+CONFIG_SOFTWARE_SUSPEND_TEXT_MODE=m
+
+#
+# General Options
+#
+CONFIG_SOFTWARE_SUSPEND_ACPI=y
+# CONFIG_SOFTWARE_SUSPEND_RELAXED_PROC is not set
+CONFIG_SOFTWARE_SUSPEND_DEFAULT_RESUME2=""
+CONFIG_SOFTWARE_SUSPEND_KEEP_IMAGE=y
+
+#
+# Debugging
+#
+# CONFIG_SOFTWARE_SUSPEND_DEBUG is not set
+# CONFIG_SOFTWARE_SUSPEND_VARIATION_ANALYSIS is not set
+CONFIG_SOFTWARE_SUSPEND2_DUMP=y
+
+#
+# ACPI (Advanced Configuration and Power Interface) Support
+#
+CONFIG_ACPI=y
+CONFIG_ACPI_BOOT=y
+CONFIG_ACPI_INTERPRETER=y
+CONFIG_ACPI_SLEEP=y
+CONFIG_ACPI_SLEEP_PROC_FS=y
+CONFIG_ACPI_AC=m
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_FAN=m
+CONFIG_ACPI_PROCESSOR=m
+CONFIG_ACPI_THERMAL=m
+CONFIG_ACPI_ASUS=m
+CONFIG_ACPI_TOSHIBA=m
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_BUS=y
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_PCI=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+
+#
+# APM (Advanced Power Management) BIOS Support
+#
+CONFIG_APM=m
+# CONFIG_APM_IGNORE_USER_SUSPEND is not set
+# CONFIG_APM_DO_ENABLE is not set
+CONFIG_APM_CPU_IDLE=y
+# CONFIG_APM_DISPLAY_BLANK is not set
+# CONFIG_APM_RTC_IS_GMT is not set
+# CONFIG_APM_ALLOW_INTS is not set
+# CONFIG_APM_REAL_MODE_POWER_OFF is not set
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_PROC_INTF=m
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+# CONFIG_CPU_FREQ_24_API is not set
+CONFIG_CPU_FREQ_TABLE=m
+
+#
+# CPUFreq processor drivers
+#
+CONFIG_X86_ACPI_CPUFREQ=m
+CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
+CONFIG_X86_POWERNOW_K6=m
+CONFIG_X86_POWERNOW_K7=m
+CONFIG_X86_POWERNOW_K7_ACPI=y
+CONFIG_X86_POWERNOW_K8=m
+CONFIG_X86_POWERNOW_K8_ACPI=y
+CONFIG_X86_GX_SUSPMOD=m
+CONFIG_X86_SPEEDSTEP_CENTRINO=m
+CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
+CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
+CONFIG_X86_SPEEDSTEP_ICH=m
+CONFIG_X86_SPEEDSTEP_SMI=m
+CONFIG_X86_P4_CLOCKMOD=m
+CONFIG_X86_SPEEDSTEP_LIB=m
+CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y
+CONFIG_X86_LONGRUN=m
+CONFIG_X86_LONGHAUL=m
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-CONFIG_BIGMEM=y
-CONFIG_NET=y
 CONFIG_PCI=y
 # CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
 # CONFIG_PCI_GODIRECT is not set
 CONFIG_PCI_GOANY=y
 CONFIG_PCI_BIOS=y
 CONFIG_PCI_DIRECT=y
-CONFIG_PCI_QUIRKS=y
-# CONFIG_PCI_OPTIMIZE is not set
-# CONFIG_PCI_OLD_PROC is not set
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+CONFIG_ISA=y
+# CONFIG_EISA is not set
 # CONFIG_MCA is not set
-# CONFIG_VISWS is not set
-CONFIG_SYSVIPC=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_BINFMT_AOUT=m
+CONFIG_SCx200=m
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_YENTA=m
+CONFIG_CARDBUS=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_I82365=m
+CONFIG_TCIC=m
+CONFIG_PCMCIA_PROBE=y
+
+#
+# PCI Hotplug Support
+#
+CONFIG_HOTPLUG_PCI=m
+CONFIG_HOTPLUG_PCI_FAKE=m
+CONFIG_HOTPLUG_PCI_COMPAQ=m
+CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y
+CONFIG_HOTPLUG_PCI_IBM=m
+CONFIG_HOTPLUG_PCI_ACPI=m
+CONFIG_HOTPLUG_PCI_ACPI_IBM=m
+CONFIG_HOTPLUG_PCI_CPCI=y
+CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
+CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
+CONFIG_HOTPLUG_PCI_PCIE=m
+CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE=y
+CONFIG_HOTPLUG_PCI_SHPC=m
+CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE=y
+
+#
+# Executable file formats
+#
 CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_ELF_AOUT=y
+CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
-CONFIG_BINFMT_JAVA=m
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+# CONFIG_STANDALONE is not set
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_REDBOOT_PARTS=m
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
+CONFIG_MTD_REDBOOT_PARTS_READONLY=y
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLOCK=m
+CONFIG_MTD_BLOCK_RO=m
+CONFIG_FTL=m
+CONFIG_NFTL=m
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=m
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=m
+CONFIG_MTD_CFI_AMDSTD=m
+CONFIG_MTD_CFI_AMDSTD_RETRY=0
+CONFIG_MTD_CFI_STAA=m
+CONFIG_MTD_CFI_UTIL=m
+CONFIG_MTD_RAM=m
+CONFIG_MTD_ROM=m
+CONFIG_MTD_ABSENT=m
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=m
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x4000000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+CONFIG_MTD_PNC2000=m
+CONFIG_MTD_SC520CDP=m
+CONFIG_MTD_NETSC520=m
+CONFIG_MTD_SBC_GXX=m
+CONFIG_MTD_ELAN_104NC=m
+CONFIG_MTD_SCx200_DOCFLASH=m
+CONFIG_MTD_AMD76XROM=m
+CONFIG_MTD_ICHXROM=m
+CONFIG_MTD_SCB2_FLASH=m
+CONFIG_MTD_NETtel=m
+CONFIG_MTD_DILNETPC=m
+CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
+CONFIG_MTD_L440GX=m
+CONFIG_MTD_PCI=m
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_PMC551=m
+CONFIG_MTD_PMC551_BUGFIX=y
+# CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_SLRAM=m
+CONFIG_MTD_PHRAM=m
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+CONFIG_MTD_BLKMTD=m
+
+#
+# Disk-On-Chip Device Drivers
+#
+CONFIG_MTD_DOC2000=m
+CONFIG_MTD_DOC2001=m
+CONFIG_MTD_DOC2001PLUS=m
+CONFIG_MTD_DOCPROBE=m
+CONFIG_MTD_DOCECC=m
+# CONFIG_MTD_DOCPROBE_ADVANCED is not set
+CONFIG_MTD_DOCPROBE_ADDRESS=0
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+CONFIG_MTD_NAND_IDS=m
+CONFIG_MTD_NAND_DISKONCHIP=m
+# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
+CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
+CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
+
+#
+# Parallel port support
+#
 CONFIG_PARPORT=m
 CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_CML1=m
+CONFIG_PARPORT_SERIAL=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_PC_PCMCIA=m
 # CONFIG_PARPORT_OTHER is not set
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-# CONFIG_APM_CPU_IDLE is not set
-# CONFIG_APM_DISPLAY_BLANK is not set
-CONFIG_APM_RTC_IS_GMT=y
-# CONFIG_APM_ALLOW_INTS is not set
-CONFIG_APM_REAL_MODE_POWER_OFF=y
-CONFIG_TOSHIBA=m
+CONFIG_PARPORT_1284=y
 
 #
-# Crypto options
+# Plug and Play support
 #
-CONFIG_CRYPTO=m
-CONFIG_CIPHERS=m
-CONFIG_CIPHER_AES=m
-CONFIG_CIPHER_RIJNDAEL=y
-CONFIG_CIPHER_TWOFISH=m
-CONFIG_CIPHER_MARS=m
-CONFIG_CIPHER_RC6=m
-CONFIG_CIPHER_SERPENT=m
-CONFIG_CIPHER_DFC=m
-CONFIG_CIPHER_BLOWFISH=m
-CONFIG_CIPHER_IDEA=m
-CONFIG_CIPHER_RC5=m
-CONFIG_CIPHER_DES_EDE3=m
-CONFIG_CIPHER_DES=m
-CONFIG_DIGEST=m
-CONFIG_DIGEST_MD5=m
-CONFIG_DIGEST_SHA1=m
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
 
 #
-# Plug and Play support
+# Protocols
 #
-CONFIG_PNP=y
-CONFIG_PNP_PARPORT=m
+CONFIG_ISAPNP=y
+CONFIG_PNPBIOS=y
+CONFIG_PNPBIOS_PROC_FS=y
 
 #
 # Block devices
 #
 CONFIG_BLK_DEV_FD=m
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_LOOP_USE_REL_BLOCK=y
-CONFIG_BLK_DEV_LOOP_GEN_SEL="m"
-CONFIG_BLK_DEV_LOOP_GEN=m
-CONFIG_BLK_DEV_LOOP_CAST=m
-CONFIG_BLK_DEV_LOOP_FISH2=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_MD=y
-CONFIG_AUTODETECT_RAID=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_STRIPED=m
-CONFIG_MD_MIRRORING=m
-CONFIG_MD_RAID5=m
-# CONFIG_MD_TRANSLUCENT is not set
-# CONFIG_MD_HSM is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_INITRD=y
 CONFIG_BLK_DEV_XD=m
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_PARIDE_PARPORT=m
 CONFIG_PARIDE=m
+CONFIG_PARIDE_PARPORT=m
+
+#
+# Parallel IDE high-level drivers
+#
 CONFIG_PARIDE_PD=m
 CONFIG_PARIDE_PCD=m
 CONFIG_PARIDE_PF=m
 CONFIG_PARIDE_PT=m
 CONFIG_PARIDE_PG=m
+
+#
+# Parallel IDE protocol modules
+#
 CONFIG_PARIDE_ATEN=m
 CONFIG_PARIDE_BPCK=m
+CONFIG_PARIDE_BPCK6=m
 CONFIG_PARIDE_COMM=m
 CONFIG_PARIDE_DSTR=m
 CONFIG_PARIDE_FIT2=m
 CONFIG_PARIDE_FIT3=m
 CONFIG_PARIDE_EPAT=m
+CONFIG_PARIDE_EPATC8=y
 CONFIG_PARIDE_EPIA=m
 CONFIG_PARIDE_FRIQ=m
 CONFIG_PARIDE_FRPW=m
@@ -145,350 +482,624 @@ CONFIG_PARIDE_ON20=m
 CONFIG_PARIDE_ON26=m
 CONFIG_BLK_CPQ_DA=m
 CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+CONFIG_BLK_DEV_DAC960=m
+CONFIG_BLK_DEV_UMEM=m
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_SX8=m
+CONFIG_BLK_DEV_UB=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_GNBD=m
 
 #
-# Networking options
-#
-CONFIG_CIPE=m
-CONFIG_PACKET=m
-CONFIG_NETLINK=y
-CONFIG_RTNETLINK=y
-CONFIG_NETLINK_DEV=y
-CONFIG_FIREWALL=y
-# CONFIG_NET_SECURITY is not set
-CONFIG_FILTER=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_RTNETLINK=y
-CONFIG_NETLINK=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_ROUTE_LARGE_TABLES is not set
-CONFIG_IP_ROUTE_NAT=y
-# CONFIG_IP_PNP is not set
-CONFIG_IP_FIREWALL=y
-CONFIG_IP_FIREWALL_NETLINK=y
-CONFIG_NETLINK_DEV=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_TRANSPARENT_PROXY=y
-CONFIG_IP_MASQUERADE=y
-CONFIG_IP_MASQUERADE_ICMP=y
-CONFIG_IP_MASQUERADE_MOD=y
-CONFIG_IP_MASQUERADE_IPAUTOFW=m
-CONFIG_IP_MASQUERADE_IPPORTFW=m
-CONFIG_IP_MASQUERADE_MFW=m
-CONFIG_IP_MASQUERADE_VS=y
-CONFIG_IP_VS_DEBUG=y
-CONFIG_IP_MASQUERADE_VS_TAB_BITS=12
-CONFIG_IP_MASQUERADE_VS_RR=m
-CONFIG_IP_MASQUERADE_VS_WRR=m
-CONFIG_IP_MASQUERADE_VS_LC=m
-CONFIG_IP_MASQUERADE_VS_WLC=m
-CONFIG_IP_MASQUERADE_VS_LBLC=m
-CONFIG_IP_MASQUERADE_VS_LBLCR=m
-CONFIG_IP_ROUTER=y
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-CONFIG_IP_ALIAS=y
-CONFIG_ARPD=y
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_RARP=m
-CONFIG_SKB_LARGE=y
-CONFIG_IPV6=m
-CONFIG_IPV6_EUI64=y
-CONFIG_IPV6_NO_PB=y
-CONFIG_ATM=y
-CONFIG_ATM_SKB=y
-CONFIG_ATM_CLIP=y
-CONFIG_ATM_CLIP_NO_ICMP=y
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_SPX=m
-CONFIG_ATALK=m
-CONFIG_BRIDGE=m
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-# CONFIG_LLC is not set
-CONFIG_VLAN_802_1Q=y
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-# CONFIG_CPU_IS_SLOW is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NETLINK=y
-CONFIG_RTNETLINK=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_ATM=y
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_WRR=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-CONFIG_IPSEC=m
-CONFIG_IPSEC_IPIP=y
-CONFIG_IPSEC_AH=y
-CONFIG_IPSEC_AUTH_HMAC_MD5=y
-CONFIG_IPSEC_AUTH_HMAC_SHA1=y
-CONFIG_IPSEC_ESP=y
-CONFIG_IPSEC_ENC_3DES=y
-CONFIG_IPSEC_IPCOMP=y
-# CONFIG_IPSEC_DEBUG is not set
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-
-#
-# ATA/IDE/MFM/RLL support
+# ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=m
+CONFIG_BLK_DEV_IDE=m
 
 #
-# IDE, ATA and ATAPI Block devices
+# Please see Documentation/ide.txt for help/info on IDE drives
 #
-CONFIG_BLK_DEV_IDE=m
+# CONFIG_BLK_DEV_IDE_SATA is not set
 # CONFIG_BLK_DEV_HD_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=m
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
-# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set
-# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set
-# CONFIG_BLK_DEV_IDEDISK_IBM is not set
-# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set
-# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set
-# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set
-# CONFIG_BLK_DEV_IDEDISK_WD is not set
-# CONFIG_BLK_DEV_COMMERIAL is not set
-# CONFIG_BLK_DEV_TIVO is not set
+CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_BLK_DEV_IDECS=m
 CONFIG_BLK_DEV_IDECD=m
 CONFIG_BLK_DEV_IDETAPE=m
 CONFIG_BLK_DEV_IDEFLOPPY=m
 CONFIG_BLK_DEV_IDESCSI=m
 # CONFIG_IDE_TASK_IOCTL is not set
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_RZ1000=y
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=m
+# CONFIG_BLK_DEV_CMD640 is not set
+CONFIG_BLK_DEV_IDEPNP=y
 CONFIG_BLK_DEV_IDEPCI=y
 CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=m
+CONFIG_BLK_DEV_OPTI621=m
+CONFIG_BLK_DEV_RZ1000=m
+CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_PCI_AUTO is not set
+CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_PCI_WIP is not set
-# CONFIG_BLK_DEV_IDEDMA_TIMEOUT is not set
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
 CONFIG_BLK_DEV_ADMA=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_AEC62XX_TUNING=y
-CONFIG_BLK_DEV_ALI15X3=y
-CONFIG_WDC_ALI15X3=y
-CONFIG_BLK_DEV_AMD74XX=y
-# CONFIG_AMD74XX_OVERRIDE is not set
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_CMD680=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
+CONFIG_BLK_DEV_AEC62XX=m
+CONFIG_BLK_DEV_ALI15X3=m
+# CONFIG_WDC_ALI15X3 is not set
+CONFIG_BLK_DEV_AMD74XX=m
+CONFIG_BLK_DEV_ATIIXP=m
+CONFIG_BLK_DEV_CMD64X=m
+CONFIG_BLK_DEV_TRIFLEX=m
+CONFIG_BLK_DEV_CY82C693=m
+CONFIG_BLK_DEV_CS5520=m
+CONFIG_BLK_DEV_CS5530=m
+CONFIG_BLK_DEV_HPT34X=m
 # CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_PIIX_TUNING=y
-CONFIG_BLK_DEV_NS87415=y
-CONFIG_BLK_DEV_OPTI621=y
-# CONFIG_BLK_DEV_PDC_ADMA is not set
-CONFIG_BLK_DEV_PDC202XX=y
+CONFIG_BLK_DEV_HPT366=m
+CONFIG_BLK_DEV_SC1200=m
+CONFIG_BLK_DEV_PIIX=m
+CONFIG_BLK_DEV_NS87415=m
+CONFIG_BLK_DEV_PDC202XX_OLD=m
 CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=m
 CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-CONFIG_BLK_DEV_TRM290=y
-CONFIG_BLK_DEV_VIA82CXXX=n
+CONFIG_BLK_DEV_SVWKS=m
+CONFIG_BLK_DEV_SIIMAGE=m
+CONFIG_BLK_DEV_SIS5513=m
+CONFIG_BLK_DEV_SLC90E66=m
+CONFIG_BLK_DEV_TRM290=m
+CONFIG_BLK_DEV_VIA82CXXX=m
+# CONFIG_IDE_ARM is not set
 CONFIG_IDE_CHIPSETS=y
+
+#
+# Note: most of these also require special kernel boot parameters
+#
 CONFIG_BLK_DEV_4DRIVES=y
-CONFIG_BLK_DEV_ALI14XX=y
-CONFIG_BLK_DEV_DTC2278=y
-CONFIG_BLK_DEV_HT6560B=y
-# CONFIG_BLK_DEV_QD65XX is not set
-CONFIG_BLK_DEV_UMC8672=y
-CONFIG_IDEDMA_AUTO=n
+CONFIG_BLK_DEV_ALI14XX=m
+CONFIG_BLK_DEV_DTC2278=m
+CONFIG_BLK_DEV_HT6560B=m
+CONFIG_BLK_DEV_PDC4030=m
+CONFIG_BLK_DEV_QD65XX=m
+CONFIG_BLK_DEV_UMC8672=m
+CONFIG_BLK_DEV_IDEDMA=y
 CONFIG_IDEDMA_IVB=y
-# CONFIG_DMA_NONPCI is not set
-CONFIG_BLK_DEV_IDE_MODES=y
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_BLK_DEV_HD is not set
 
 #
-# SCSI support
+# SCSI device support
 #
 CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
 CONFIG_BLK_DEV_SD=m
 CONFIG_CHR_DEV_ST=m
 CONFIG_CHR_DEV_OSST=m
 CONFIG_BLK_DEV_SR=m
 CONFIG_BLK_DEV_SR_VENDOR=y
 CONFIG_CHR_DEV_SG=m
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
 CONFIG_SCSI_LOGGING=y
 
+#
+# SCSI Transport Attributes
+#
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
 #
 # SCSI low-level drivers
 #
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_7000FASST=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AHA152X=m
 CONFIG_SCSI_AHA1542=m
-CONFIG_SCSI_AHA1740=m
+CONFIG_SCSI_AACRAID=m
 CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+CONFIG_AIC79XX_REG_PRETTY_PRINT=y
 CONFIG_SCSI_DPT_I2O=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_ADVANSYS=m
 CONFIG_SCSI_IN2000=m
-CONFIG_SCSI_AM53C974=m
-CONFIG_SCSI_MEGARAID=m
+CONFIG_MEGARAID_NEWGEN=y
+CONFIG_MEGARAID_MM=m
+CONFIG_MEGARAID_MAILBOX=m
+CONFIG_SCSI_SATA=y
+CONFIG_SCSI_SATA_SVW=m
+CONFIG_SCSI_ATA_PIIX=m
+CONFIG_SCSI_SATA_NV=m
+CONFIG_SCSI_SATA_PROMISE=m
+CONFIG_SCSI_SATA_SX4=m
+CONFIG_SCSI_SATA_SIL=m
+CONFIG_SCSI_SATA_SIS=m
+CONFIG_SCSI_SATA_VIA=m
+CONFIG_SCSI_SATA_VITESSE=m
 CONFIG_SCSI_BUSLOGIC=m
 # CONFIG_SCSI_OMIT_FLASHPOINT is not set
-CONFIG_SCSI_CPQFCTS=m
+CONFIG_SCSI_DMX3191D=m
 CONFIG_SCSI_DTC3280=m
 CONFIG_SCSI_EATA=m
 CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-# CONFIG_SCSI_EATA_LINKED_COMMANDS is not set
+CONFIG_SCSI_EATA_LINKED_COMMANDS=y
 CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_EATA_DMA=m
 CONFIG_SCSI_EATA_PIO=m
 CONFIG_SCSI_FUTURE_DOMAIN=m
 CONFIG_SCSI_GDTH=m
 CONFIG_SCSI_GENERIC_NCR5380=m
+CONFIG_SCSI_GENERIC_NCR5380_MMIO=m
 CONFIG_SCSI_GENERIC_NCR53C400=y
-CONFIG_SCSI_G_NCR5380_PORT=y
-# CONFIG_SCSI_G_NCR5380_MEM is not set
+CONFIG_SCSI_IPS=m
 CONFIG_SCSI_INITIO=m
 CONFIG_SCSI_INIA100=m
 CONFIG_SCSI_PPA=m
 CONFIG_SCSI_IMM=m
-CONFIG_SCSI_IZIP_EPP16=y
+# CONFIG_SCSI_IZIP_EPP16 is not set
 # CONFIG_SCSI_IZIP_SLOW_CTR is not set
 CONFIG_SCSI_NCR53C406A=m
-CONFIG_SCSI_SYM53C416=m
-CONFIG_SCSI_SIM710=m
-CONFIG_SCSI_NCR53C7xx=m
-# CONFIG_SCSI_NCR53C7xx_sync is not set
-CONFIG_SCSI_NCR53C7xx_FAST=y
-CONFIG_SCSI_NCR53C7xx_DISCONNECT=y
-CONFIG_SCSI_NCR53C8XX=m
-CONFIG_SCSI_SYM53C8XX=m
-CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
-CONFIG_SCSI_NCR53C8XX_SYNC=80
-# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
-CONFIG_SCSI_NCR53C8XX_PQS_PDS=y
-# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
 CONFIG_SCSI_PAS16=m
-CONFIG_SCSI_PCI2000=m
-CONFIG_SCSI_PCI2220I=m
 CONFIG_SCSI_PSI240I=m
 CONFIG_SCSI_QLOGIC_FAS=m
 CONFIG_SCSI_QLOGIC_ISP=m
 CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_SEAGATE=m
-CONFIG_SCSI_DC395x_TRMS1040=m
+CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA2XXX=m
+CONFIG_SCSI_QLA21XX=m
+CONFIG_SCSI_QLA22XX=m
+CONFIG_SCSI_QLA2300=m
+CONFIG_SCSI_QLA2322=m
+CONFIG_SCSI_QLA6312=m
+CONFIG_SCSI_QLA6322=m
+CONFIG_SCSI_SYM53C416=m
+CONFIG_SCSI_DC395x=m
 CONFIG_SCSI_DC390T=m
-# CONFIG_SCSI_DC390T_NOGENSUPP is not set
 CONFIG_SCSI_T128=m
 CONFIG_SCSI_U14_34F=m
-# CONFIG_SCSI_U14_34F_LINKED_COMMANDS is not set
+CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y
+CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y
 CONFIG_SCSI_U14_34F_MAX_TAGS=8
 CONFIG_SCSI_ULTRASTOR=m
-CONFIG_SCSI_DEBUG=m
+CONFIG_SCSI_NSP32=m
+# CONFIG_SCSI_DEBUG is not set
 
 #
-# I2O device support
+# PCMCIA SCSI adapter support
 #
-CONFIG_I2O=m
-CONFIG_I2O_PCI=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
+CONFIG_PCMCIA_AHA152X=m
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_NINJA_SCSI=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+CONFIG_CD_NO_IDESCSI=y
+CONFIG_AZTCD=m
+CONFIG_GSCD=m
+CONFIG_MCD=m
+CONFIG_MCD_IRQ=11
+CONFIG_MCD_BASE=0x300
+CONFIG_MCDX=m
+CONFIG_OPTCD=m
+CONFIG_SJCD=m
+CONFIG_ISP16_CDI=m
+CONFIG_CDU535=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_CTL=m
+CONFIG_FUSION_LAN=m
 
 #
 # IEEE 1394 (FireWire) support
 #
 CONFIG_IEEE1394=m
-CONFIG_FORCE_MODULE=m
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_PCILYNX_LOCALRAM=y
-CONFIG_IEEE1394_PCILYNX_PORTS=y
-CONFIG_IEEE1394_OHCI1394=m
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_RAWIO=m
-# CONFIG_IEEE1394_SBP2 is not set
+
+#
+# Subsystem Options
+#
 # CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_IEEE1394_OUI_DB=y
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
 
 #
-# Network device support
+# Device Drivers
 #
-CONFIG_NETDEVICES=y
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
 
 #
-# ARCnet devices
+# Protocol Drivers
 #
-CONFIG_ARCNET=m
-CONFIG_ARCNET_ETH=y
-CONFIG_ARCNET_1051=y
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-CONFIG_ARCNET_COM20020=m
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# I2O device support
+#
+CONFIG_I2O=m
+CONFIG_I2O_CONFIG=m
+CONFIG_I2O_BLOCK=m
+CONFIG_I2O_SCSI=m
+CONFIG_I2O_PROC=m
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_TUNNEL=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+CONFIG_ATM_CLIP_NO_ICMP=y
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+CONFIG_DECNET=m
+# CONFIG_DECNET_SIOCGIFCONF is not set
+# CONFIG_DECNET_ROUTER is not set
+CONFIG_LLC=y
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=y
+CONFIG_LTPC=m
+CONFIG_COPS=m
+CONFIG_COPS_DAYNA=y
+CONFIG_COPS_TANGENT=y
+CONFIG_IPDDP=m
+# CONFIG_IPDDP_ENCAP is not set
+# CONFIG_IPDDP_DECAP is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+CONFIG_ECONET_AUNUDP=y
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+# CONFIG_NET_SCH_CLK_JIFFIES is not set
+# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
+CONFIG_NET_SCH_CLK_CPU=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_WRR=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_ESFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+# CONFIG_NET_CLS_ACT is not set
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+# CONFIG_AX25_DAMA_SLAVE is not set
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_BPQETHER=m
+CONFIG_SCC=m
+# CONFIG_SCC_DELAY is not set
+CONFIG_SCC_TRXECHO=y
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_BAYCOM_EPP=m
+CONFIG_YAM=m
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+CONFIG_SIGMATEL_FIR=m
+CONFIG_NSC_FIR=m
+CONFIG_WINBOND_FIR=m
+CONFIG_TOSHIBA_FIR=m
+CONFIG_SMC_IRCC_FIR=m
+CONFIG_ALI_FIR=m
+CONFIG_VLSI_FIR=m
+CONFIG_VIA_FIR=m
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_NETDEVICES=y
 CONFIG_DUMMY=m
 CONFIG_BONDING=m
 CONFIG_EQUALIZER=m
-CONFIG_IMQ=y
+CONFIG_IMQ=m
+CONFIG_TUN=m
 CONFIG_ETHERTAP=m
 CONFIG_NET_SB1000=m
 
+#
+# ARCnet devices
+#
+CONFIG_ARCNET=m
+CONFIG_ARCNET_1201=m
+CONFIG_ARCNET_1051=m
+CONFIG_ARCNET_RAW=m
+CONFIG_ARCNET_COM90xx=m
+CONFIG_ARCNET_COM90xxIO=m
+CONFIG_ARCNET_RIM_I=m
+CONFIG_ARCNET_COM20020=m
+CONFIG_ARCNET_COM20020_ISA=m
+CONFIG_ARCNET_COM20020_PCI=m
+
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
 CONFIG_NET_VENDOR_3COM=y
 CONFIG_EL1=m
 CONFIG_EL2=m
@@ -497,60 +1108,80 @@ CONFIG_EL16=m
 CONFIG_EL3=m
 CONFIG_3C515=m
 CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
 CONFIG_LANCE=m
 CONFIG_NET_VENDOR_SMC=y
 CONFIG_WD80x3=m
 CONFIG_ULTRA=m
-CONFIG_ULTRA32=m
 CONFIG_SMC9194=m
 CONFIG_NET_VENDOR_RACAL=y
-CONFIG_NI5010=m
 CONFIG_NI52=m
 CONFIG_NI65=m
-CONFIG_RTL8139=m
-CONFIG_RTL8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-CONFIG_NET_ISA=y
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_PCMCIA_XIRCOM=m
 CONFIG_AT1700=m
-CONFIG_E2100=m
 CONFIG_DEPCA=m
+CONFIG_HP100=m
+CONFIG_NET_ISA=y
+CONFIG_E2100=m
 CONFIG_EWRK3=m
 CONFIG_EEXPRESS=m
 CONFIG_EEXPRESS_PRO=m
-CONFIG_FMV18X=m
 CONFIG_HPLAN_PLUS=m
 CONFIG_HPLAN=m
-CONFIG_HP100=m
+CONFIG_LP486E=m
 CONFIG_ETH16I=m
 CONFIG_NE2000=m
+CONFIG_ZNET=m
 CONFIG_SEEQ8005=m
-CONFIG_SK_G16=y
-CONFIG_NET_EISA=y
+CONFIG_NET_PCI=y
 CONFIG_PCNET32=m
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
 CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
 CONFIG_AC3200=m
 CONFIG_APRICOT=m
-CONFIG_LP486E=m
+CONFIG_B44=m
+CONFIG_FORCEDETH=m
 CONFIG_CS89x0=m
-CONFIG_DM9102=m
-CONFIG_DE4X5=m
-CONFIG_DEC_ELCP=m
-CONFIG_DEC_ELCP_OLD=m
 CONFIG_DGRS=m
-CONFIG_EEXPRESS_PRO100=m
-CONFIG_LNE390=m
-CONFIG_NE3210=m
+CONFIG_EEPRO100=m
+# CONFIG_EEPRO100_PIO is not set
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
 CONFIG_NE2K_PCI=m
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
-CONFIG_ES3210=m
 CONFIG_EPIC100=m
-# CONFIG_ZNET is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_TLAN=m
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_VELOCITY=m
 CONFIG_NET_POCKET=y
-CONFIG_ATP=y
+CONFIG_ATP=m
 CONFIG_DE600=m
 CONFIG_DE620=m
 
@@ -558,480 +1189,1052 @@ CONFIG_DE620=m
 # Ethernet (1000 Mbit)
 #
 CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_NS83820=m
 CONFIG_HAMACHI=m
 CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
 CONFIG_SK98LIN=m
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-# CONFIG_ROADRUNNER_LARGE_RINGS is not set
+CONFIG_TIGON3=m
 
 #
-# Appletalk devices
+# Ethernet (10000 Mbit)
 #
-CONFIG_LTPC=m
-CONFIG_COPS=m
-CONFIG_COPS_DAYNA=y
-CONFIG_COPS_TANGENT=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-CONFIG_NET_RADIO=y
-CONFIG_STRIP=m
-CONFIG_WAVELAN=m
-CONFIG_ARLAN=m
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
 
 #
-# Token ring devices
+# Token Ring devices
 #
 CONFIG_TR=y
 CONFIG_IBMTR=m
-CONFIG_IBMLS=m
 CONFIG_IBMOL=m
-CONFIG_SKTR=m
-CONFIG_NET_FC=y
-CONFIG_IPHASE5526=m
-CONFIG_RCPCI=m
-CONFIG_SHAPER=m
+CONFIG_IBMLS=m
+CONFIG_3C359=m
+CONFIG_TMS380TR=m
+CONFIG_TMSPCI=m
+CONFIG_SKISA=m
+CONFIG_PROTEON=m
+CONFIG_ABYSS=m
+CONFIG_SMCTR=m
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+CONFIG_ARLAN=m
+CONFIG_WAVELAN=m
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+CONFIG_PCMCIA_RAYCS=m
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+
+#
+# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
+#
+CONFIG_PRISM54=m
+CONFIG_NET_WIRELESS=y
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_ARCNET_COM20020_CS=m
+CONFIG_PCMCIA_IBMTR=m
 
 #
 # Wan interfaces
 #
+CONFIG_WAN=y
 CONFIG_HOSTESS_SV11=m
 CONFIG_COSA=m
+CONFIG_DSCC4=m
+CONFIG_DSCC4_PCISYNC=y
+CONFIG_DSCC4_PCI_RST=y
+CONFIG_LANMEDIA=m
 CONFIG_SEALEVEL_4021=m
 CONFIG_SYNCLINK_SYNCPPP=m
-CONFIG_FARSYNC=m
-CONFIG_LANMEDIA=m
-CONFIG_COMX=m
-CONFIG_COMX_HW_COMX=m
-CONFIG_COMX_HW_LOCOMX=m
-CONFIG_COMX_HW_MIXCOM=m
-CONFIG_COMX_PROTO_PPP=m
-CONFIG_COMX_PROTO_LAPB=m
-CONFIG_COMX_PROTO_FR=m
 CONFIG_HDLC=m
-CONFIG_N2=m
-CONFIG_C101=m
+CONFIG_HDLC_RAW=y
+CONFIG_HDLC_RAW_ETH=y
+CONFIG_HDLC_CISCO=y
+CONFIG_HDLC_FR=y
+CONFIG_HDLC_PPP=y
+CONFIG_HDLC_X25=y
+CONFIG_TAHOE9XX=m
+CONFIG_PCI200SYN=m
 CONFIG_WANXL=m
 CONFIG_PC300=m
-# CONFIG_PC300_X25 is not set
+CONFIG_PC300_MLPPP=y
+CONFIG_N2=m
+CONFIG_C101=m
+CONFIG_FARSYNC=m
 CONFIG_DLCI=m
 CONFIG_DLCI_COUNT=24
 CONFIG_DLCI_MAX=8
 CONFIG_SDLA=m
-CONFIG_WAN_DRIVERS=y
-CONFIG_VENDOR_SANGOMA=m
-CONFIG_WANPIPE_CARDS=4
-# CONFIG_WANPIPE_X25 is not set
-CONFIG_WANPIPE_FR=y
-CONFIG_WANPIPE_PPP=y
-CONFIG_WANPIPE_CHDLC=y
-CONFIG_XPEED=m
+CONFIG_WAN_ROUTER_DRIVERS=y
+CONFIG_CYCLADES_SYNC=m
+CONFIG_CYCLOMX_X25=y
 CONFIG_LAPBETHER=m
 CONFIG_X25_ASY=m
 CONFIG_SBNI=m
+CONFIG_SBNI_MULTILINE=y
+
+#
+# ATM drivers
+#
 CONFIG_ATM_TCP=m
+CONFIG_ATM_LANAI=m
 CONFIG_ATM_ENI=m
 # CONFIG_ATM_ENI_DEBUG is not set
 # CONFIG_ATM_ENI_TUNE_BURST is not set
-# CONFIG_ATM_ZATM is not set
+CONFIG_ATM_FIRESTREAM=m
+CONFIG_ATM_ZATM=m
+# CONFIG_ATM_ZATM_DEBUG is not set
 CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_AMBASSADOR is not set
-# CONFIG_ATM_HORIZON is not set
-CONFIG_ATM_FORE200E=m
+CONFIG_ATM_NICSTAR_USE_SUNI=y
+CONFIG_ATM_NICSTAR_USE_IDT77105=y
+CONFIG_ATM_IDT77252=m
+# CONFIG_ATM_IDT77252_DEBUG is not set
+# CONFIG_ATM_IDT77252_RCV_ALL is not set
+CONFIG_ATM_IDT77252_USE_SUNI=y
+CONFIG_ATM_AMBASSADOR=m
+# CONFIG_ATM_AMBASSADOR_DEBUG is not set
+CONFIG_ATM_HORIZON=m
+# CONFIG_ATM_HORIZON_DEBUG is not set
+CONFIG_ATM_IA=m
+# CONFIG_ATM_IA_DEBUG is not set
+CONFIG_ATM_FORE200E_MAYBE=m
 CONFIG_ATM_FORE200E_PCA=y
 CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_USE_TASKLET=y
 CONFIG_ATM_FORE200E_TX_RETRY=16
 CONFIG_ATM_FORE200E_DEBUG=0
-
-#
-# Amateur Radio support
+CONFIG_ATM_FORE200E=m
+CONFIG_ATM_HE=m
+CONFIG_ATM_HE_USE_SUNI=y
+CONFIG_FDDI=y
+CONFIG_DEFXX=m
+CONFIG_SKFP=m
+CONFIG_HIPPI=y
+CONFIG_ROADRUNNER=m
+# CONFIG_ROADRUNNER_LARGE_RINGS is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+CONFIG_NET_FC=y
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+
 #
-CONFIG_HAMRADIO=y
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-CONFIG_MKISS=m
-CONFIG_6PACK=m
-CONFIG_BPQETHER=m
-CONFIG_DMASCC=m
-CONFIG_SCC=m
-CONFIG_SCC_DELAY=y
-CONFIG_SCC_TRXECHO=y
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_BAYCOM_EPP=m
-CONFIG_SOUNDMODEM=m
-CONFIG_SOUNDMODEM_SBC=y
-CONFIG_SOUNDMODEM_WSS=y
-CONFIG_SOUNDMODEM_AFSK1200=y
-CONFIG_SOUNDMODEM_AFSK2400_7=y
-CONFIG_SOUNDMODEM_AFSK2400_8=y
-CONFIG_SOUNDMODEM_AFSK2666=y
-CONFIG_SOUNDMODEM_HAPN4800=y
-CONFIG_SOUNDMODEM_PSK4800=y
-CONFIG_SOUNDMODEM_FSK9600=y
-CONFIG_YAM=m
-CONFIG_HFMODEM=m
-CONFIG_HFMODEM_SBC=y
-CONFIG_HFMODEM_WSS=y
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
 
 #
-# IrDA (infrared) support
+# Telephony Support
 #
-CONFIG_IRDA=m
-CONFIG_IRLAN=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-CONFIG_IRDA_OPTIONS=y
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-CONFIG_IRDA_FAST_RR=y
-CONFIG_IRDA_DEBUG=y
-CONFIG_IRDA_COMPRESSION=y
-CONFIG_IRDA_DEFLATE=m
+CONFIG_PHONE=m
+CONFIG_PHONE_IXJ=m
+CONFIG_PHONE_IXJ_PCMCIA=m
 
 #
-# Infrared-port device drivers
+# Input device support
 #
-CONFIG_IRTTY_SIR=m
-CONFIG_IRPORT_SIR=m
-CONFIG_NSC_FIR=m
-CONFIG_WINBOND_FIR=m
-CONFIG_TOSHIBA_FIR=m
-CONFIG_SMC_IRCC_FIR=m
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_INPUT=y
 
 #
-# ISDN subsystem
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_VORTEX=m
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_SERIO_CT82C710=m
+CONFIG_SERIO_PARKBD=m
+CONFIG_SERIO_PCIPS2=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_INPORT=m
+CONFIG_MOUSE_ATIXL=y
+CONFIG_MOUSE_LOGIBM=m
+CONFIG_MOUSE_PC110PAD=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=m
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+CONFIG_JOYSTICK_GUILLEMOT=m
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_USB=y
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+CONFIG_JOYSTICK_TWIDDLER=m
+CONFIG_JOYSTICK_DB9=m
+CONFIG_JOYSTICK_GAMECON=m
+CONFIG_JOYSTICK_TURBOGRAFX=m
+CONFIG_INPUT_JOYDUMP=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_SERIAL_NONSTANDARD=y
+CONFIG_ROCKETPORT=m
+CONFIG_CYCLADES=m
+# CONFIG_CYZ_INTR is not set
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_N_HDLC=m
+CONFIG_STALDRV=y
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_CS=m
+# CONFIG_SERIAL_8250_ACPI is not set
+CONFIG_SERIAL_8250_NR_UARTS=8
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_MULTIPORT=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+
+#
+# Linux InfraRed Controller
+#
+# CONFIG_LIRC_SUPPORT is not set
+
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+CONFIG_PPDEV=m
+# CONFIG_TIPAR is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
+CONFIG_IPMI_POWEROFF=m
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+CONFIG_ACQUIRE_WDT=m
+CONFIG_ADVANTECH_WDT=m
+CONFIG_ALIM1535_WDT=m
+CONFIG_ALIM7101_WDT=m
+CONFIG_SC520_WDT=m
+CONFIG_EUROTECH_WDT=m
+CONFIG_IB700_WDT=m
+CONFIG_WAFER_WDT=m
+CONFIG_I8XX_TCO=m
+CONFIG_SC1200_WDT=m
+CONFIG_SCx200_WDT=m
+CONFIG_60XX_WDT=m
+CONFIG_CPU5_WDT=m
+CONFIG_W83627HF_WDT=m
+CONFIG_W83877F_WDT=m
+CONFIG_MACHZ_WDT=m
+
+#
+# ISA-based Watchdog Cards
+#
+CONFIG_PCWATCHDOG=m
+CONFIG_MIXCOMWD=m
+CONFIG_WDT=m
+CONFIG_WDT_501=y
+
+#
+# PCI-based Watchdog Cards
+#
+CONFIG_PCIPCWATCHDOG=m
+CONFIG_WDTPCI=m
+CONFIG_WDT_501_PCI=y
+
+#
+# USB-based Watchdog Cards
+#
+CONFIG_USBPCWATCHDOG=m
+CONFIG_HW_RANDOM=m
+CONFIG_NVRAM=m
+CONFIG_RTC=y
+CONFIG_DTLK=m
+CONFIG_R3964=m
+CONFIG_APPLICOM=m
+CONFIG_SONYPI=m
+
+#
+# Ftape, the floppy tape device driver
+#
+CONFIG_AGP=m
+CONFIG_AGP_ALI=m
+CONFIG_AGP_ATI=m
+CONFIG_AGP_AMD=m
+CONFIG_AGP_AMD64=m
+CONFIG_AGP_INTEL=m
+CONFIG_AGP_INTEL_MCH=m
+CONFIG_AGP_NVIDIA=m
+CONFIG_AGP_SIS=m
+CONFIG_AGP_SWORKS=m
+CONFIG_AGP_VIA=m
+CONFIG_AGP_EFFICEON=m
+CONFIG_DRM=y
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_GAMMA=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_I810=m
+CONFIG_DRM_I830=m
+CONFIG_DRM_I915=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_SYNCLINK_CS=m
+CONFIG_MWAVE=m
+# CONFIG_SCx200_GPIO is not set
+CONFIG_RAW_DRIVER=m
+CONFIG_HPET=y
+# CONFIG_HPET_RTC_IRQ is not set
+CONFIG_HPET_MMAP=y
+CONFIG_MAX_RAW_DEVS=1024
+CONFIG_HANGCHECK_TIMER=m
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI1563=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_I810=m
+CONFIG_I2C_ISA=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_PARPORT=m
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PIIX4=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+CONFIG_I2C_VOODOO3=m
+CONFIG_I2C_PCA_ISA=m
+
+#
+# Hardware Sensors Chip support
+#
+CONFIG_I2C_SENSOR=m
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+CONFIG_SENSORS_ADM1031=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM77=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+CONFIG_SENSORS_SMSC47M1=m
+CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+
+#
+# Other I2C Chip support
 #
-CONFIG_ISDN=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-# CONFIG_ISDN_TTY_FAX is not set
-# CONFIG_ISDN_X25 is not set
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DRV_LOOP=m
-# CONFIG_ISDN_DIVERSION is not set
-
-#
-# Passive ISDN cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_16_0=y
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_AVM_A1=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_IX1MICROR2=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_ASUSCOM=y
-CONFIG_HISAX_TELEINT=y
-CONFIG_HISAX_HFCS=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_SPORTSTER=y
-CONFIG_HISAX_MIC=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_ISURF=y
-CONFIG_HISAX_HSTSAPHIR=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-
-#
-# Active ISDN cards
-#
-CONFIG_ISDN_DRV_ICN=m
-CONFIG_ISDN_DRV_PCBIT=m
-CONFIG_ISDN_DRV_SC=m
-CONFIG_ISDN_DRV_ACT2000=m
-CONFIG_ISDN_DRV_EICON=y
-CONFIG_ISDN_DRV_EICON_DIVAS=m
-CONFIG_ISDN_DRV_EICON_OLD=m
-CONFIG_ISDN_DRV_EICON_PCI=y
-# CONFIG_ISDN_DRV_EICON_ISA is not set
-CONFIG_ISDN_CAPI=m
-# CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-# CONFIG_ISDN_DRV_AVMB1_B1ISA is not set
-# CONFIG_ISDN_DRV_AVMB1_B1PCI is not set
-# CONFIG_ISDN_DRV_AVMB1_B1PCIV4 is not set
-# CONFIG_ISDN_DRV_AVMB1_T1ISA is not set
-# CONFIG_ISDN_DRV_AVMB1_B1PCMCIA is not set
-# CONFIG_ISDN_DRV_AVMB1_T1PCI is not set
-CONFIG_ISDN_DRV_AVMB1_C4=m
-CONFIG_HYSDN=m
-CONFIG_HYSDN_CAPI=y
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_RTC8564=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=m
+CONFIG_W1_MATROX=m
+CONFIG_W1_DS9490=m
+CONFIG_W1_DS9490R_BRIDGE=m
+CONFIG_W1_THERM=m
+CONFIG_W1_SMEM=m
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+
+#
+# Video For Linux
+#
+
+#
+# Video Adapters
+#
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_PMS=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+CONFIG_VIDEO_ZORAN=m
+CONFIG_VIDEO_ZORAN_BUZ=m
+CONFIG_VIDEO_ZORAN_DC10=m
+CONFIG_VIDEO_ZORAN_DC30=m
+CONFIG_VIDEO_ZORAN_LML33=m
+CONFIG_VIDEO_ZORAN_LML33R10=m
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+CONFIG_VIDEO_HEXIUM_ORION=m
+CONFIG_VIDEO_HEXIUM_GEMINI=m
+CONFIG_VIDEO_CX88=m
+CONFIG_VIDEO_OVCAMCHIP=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_CADET=m
+CONFIG_RADIO_RTRACK=m
+CONFIG_RADIO_RTRACK2=m
+CONFIG_RADIO_AZTECH=m
+CONFIG_RADIO_GEMTEK=m
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+CONFIG_RADIO_MIROPCM20=m
+CONFIG_RADIO_MIROPCM20_RDS=m
+CONFIG_RADIO_SF16FMI=m
+CONFIG_RADIO_SF16FMR2=m
+CONFIG_RADIO_TERRATEC=m
+CONFIG_RADIO_TRUST=m
+CONFIG_RADIO_TYPHOON=m
+CONFIG_RADIO_TYPHOON_PROC_FS=y
+CONFIG_RADIO_ZOLTRIX=m
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_TWINHAN_DST=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_VES1X93=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_NXT6000=m
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+# CONFIG_DVB_AV7110_FIRMWARE is not set
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR=m
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_CIRRUS=m
+CONFIG_FB_PM2=m
+# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
+CONFIG_FB_CYBER2000=m
+CONFIG_FB_ASILIANT=y
+# CONFIG_FB_IMSTT is not set
+CONFIG_FB_VGA16=m
+CONFIG_FB_VESA=y
+CONFIG_VIDEO_SELECT=y
+CONFIG_FB_HGA=m
+# CONFIG_FB_HGA_ACCEL is not set
+CONFIG_FB_RIVA=m
+CONFIG_FB_RIVA_I2C=y
+# CONFIG_FB_RIVA_DEBUG is not set
+CONFIG_FB_I810=m
+CONFIG_FB_I810_GTF=y
+CONFIG_FB_MATROX=m
+CONFIG_FB_MATROX_MILLENIUM=y
+CONFIG_FB_MATROX_MYSTIQUE=y
+CONFIG_FB_MATROX_G450=y
+CONFIG_FB_MATROX_G100=y
+CONFIG_FB_MATROX_I2C=m
+CONFIG_FB_MATROX_MAVEN=m
+CONFIG_FB_MATROX_MULTIHEAD=y
+CONFIG_FB_RADEON_OLD=m
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=m
+CONFIG_FB_ATY=m
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
+# CONFIG_FB_ATY_XL_INIT is not set
+CONFIG_FB_SIS=m
+CONFIG_FB_SIS_300=y
+CONFIG_FB_SIS_315=y
+CONFIG_FB_NEOMAGIC=m
+CONFIG_FB_KYRO=m
+CONFIG_FB_3DFX=m
+# CONFIG_FB_3DFX_ACCEL is not set
+CONFIG_FB_VOODOO1=m
+CONFIG_FB_TRIDENT=m
+CONFIG_FB_TRIDENT_ACCEL=y
+CONFIG_FB_VIRTUAL=m
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_MDA_CONSOLE=m
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_FB_SPLASH=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_RTCTIMER=m
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_MPU401_UART=m
+CONFIG_SND_OPL3_LIB=m
+CONFIG_SND_OPL4_LIB=m
+CONFIG_SND_VX_LIB=m
+# CONFIG_SND_DUMMY is not set
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# ISA devices
+#
+CONFIG_SND_AD1816A=m
+CONFIG_SND_AD1848=m
+CONFIG_SND_CS4231=m
+CONFIG_SND_CS4232=m
+CONFIG_SND_CS4236=m
+CONFIG_SND_ES968=m
+CONFIG_SND_ES1688=m
+CONFIG_SND_ES18XX=m
+CONFIG_SND_GUS_SYNTH=m
+CONFIG_SND_GUSCLASSIC=m
+CONFIG_SND_GUSEXTREME=m
+CONFIG_SND_GUSMAX=m
+CONFIG_SND_INTERWAVE=m
+CONFIG_SND_INTERWAVE_STB=m
+CONFIG_SND_OPTI92X_AD1848=m
+CONFIG_SND_OPTI92X_CS4231=m
+CONFIG_SND_OPTI93X=m
+CONFIG_SND_SB8=m
+CONFIG_SND_SB16=m
+CONFIG_SND_SBAWE=m
+CONFIG_SND_SB16_CSP=y
+CONFIG_SND_WAVEFRONT=m
+CONFIG_SND_ALS100=m
+CONFIG_SND_AZT2320=m
+CONFIG_SND_CMI8330=m
+CONFIG_SND_DT019X=m
+CONFIG_SND_OPL3SA2=m
+CONFIG_SND_SGALAXY=m
+CONFIG_SND_SSCAPE=m
+
+#
+# PCI devices
+#
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_ATIIXP_MODEM=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+CONFIG_SND_CS46XX=m
+CONFIG_SND_CS46XX_NEW_DSP=y
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VX222=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_USB_USX2Y=m
+
+#
+# PCMCIA devices
+#
+CONFIG_SND_VXPOCKET=m
+CONFIG_SND_VXP440=m
+CONFIG_SND_PDAUDIOCF=m
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+CONFIG_SOUND_BT878=m
+CONFIG_SOUND_CMPCI=m
+CONFIG_SOUND_CMPCI_FM=y
+CONFIG_SOUND_CMPCI_MIDI=y
+CONFIG_SOUND_CMPCI_JOYSTICK=y
+CONFIG_SOUND_EMU10K1=m
+CONFIG_MIDI_EMU10K1=y
+CONFIG_SOUND_FUSION=m
+CONFIG_SOUND_CS4281=m
+CONFIG_SOUND_ES1370=m
+CONFIG_SOUND_ES1371=m
+CONFIG_SOUND_ESSSOLO1=m
+CONFIG_SOUND_MAESTRO=m
+CONFIG_SOUND_MAESTRO3=m
+CONFIG_SOUND_ICH=m
+CONFIG_SOUND_SONICVIBES=m
+CONFIG_SOUND_TRIDENT=m
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_VIA82CXXX=m
+CONFIG_MIDI_VIA82CXXX=y
+CONFIG_SOUND_OSS=m
+# CONFIG_SOUND_TRACEINIT is not set
+# CONFIG_SOUND_DMAP is not set
+CONFIG_SOUND_AD1816=m
+CONFIG_SOUND_AD1889=m
+CONFIG_SOUND_SGALAXY=m
+CONFIG_SOUND_ADLIB=m
+CONFIG_SOUND_ACI_MIXER=m
+CONFIG_SOUND_CS4232=m
+CONFIG_SOUND_SSCAPE=m
+CONFIG_SOUND_GUS=m
+CONFIG_SOUND_GUS16=y
+CONFIG_SOUND_GUSMAX=y
+CONFIG_SOUND_VMIDI=m
+CONFIG_SOUND_TRIX=m
+CONFIG_SOUND_MSS=m
+CONFIG_SOUND_MPU401=m
+CONFIG_SOUND_NM256=m
+CONFIG_SOUND_MAD16=m
+CONFIG_MAD16_OLDCARD=y
+CONFIG_SOUND_PAS=m
+CONFIG_SOUND_PSS=m
+CONFIG_PSS_MIXER=y
+# CONFIG_PSS_HAVE_BOOT is not set
+CONFIG_SOUND_SB=m
+CONFIG_SOUND_AWE32_SYNTH=m
+CONFIG_SOUND_WAVEFRONT=m
+CONFIG_SOUND_MAUI=m
+CONFIG_SOUND_YM3812=m
+CONFIG_SOUND_OPL3SA1=m
+CONFIG_SOUND_OPL3SA2=m
+CONFIG_SOUND_YMFPCI=m
+CONFIG_SOUND_YMFPCI_LEGACY=y
+CONFIG_SOUND_UART6850=m
+CONFIG_SOUND_AEDSP16=m
+CONFIG_SC6600=y
+CONFIG_SC6600_JOY=y
+CONFIG_SC6600_CDROM=4
+CONFIG_SC6600_CDROMBASE=0
+# CONFIG_AEDSP16_MSS is not set
+CONFIG_AEDSP16_SBPRO=y
+CONFIG_AEDSP16_MPU401=y
+CONFIG_SOUND_TVMIXER=m
+CONFIG_SOUND_KAHLUA=m
+CONFIG_SOUND_ALI5455=m
+CONFIG_SOUND_FORTE=m
+CONFIG_SOUND_RME96XX=m
+CONFIG_SOUND_AD1980=m
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# USB support
 #
-CONFIG_CD_NO_IDESCSI=y
-CONFIG_AZTCD=m
-CONFIG_GSCD=m
-CONFIG_SBPCD=m
-CONFIG_MCD=m
-CONFIG_MCD_IRQ=11
-CONFIG_MCD_BASE=300
-CONFIG_MCDX=m
-CONFIG_OPTCD=m
-CONFIG_CM206=m
-CONFIG_SJCD=m
-CONFIG_ISP16_CDI=m
-CONFIG_CDU31A=m
-CONFIG_CDU535=m
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
 
 #
-# Character devices
+# Miscellaneous USB options
 #
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-CONFIG_SERIAL_EXTENDED=y
-CONFIG_SERIAL_MANY_PORTS=y
-CONFIG_SERIAL_SHARE_IRQ=y
-# CONFIG_SERIAL_DETECT_IRQ is not set
-CONFIG_SERIAL_MULTIPORT=y
-# CONFIG_HUB6 is not set
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_COMPUTONE=m
-CONFIG_ROCKETPORT=m
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-CONFIG_DIGIEPCA=m
-CONFIG_ESPSERIAL=m
-CONFIG_MOXA_INTELLIO=m
-CONFIG_MOXA_SMARTIO=m
-CONFIG_ISI=m
-CONFIG_RISCOM8=m
-CONFIG_SPECIALIX=m
-CONFIG_SPECIALIX_RTSCTS=y
-CONFIG_SX=m
-CONFIG_RIO=m
-# CONFIG_RIO_OLDPCI is not set
-CONFIG_STALDRV=y
-CONFIG_STALLION=m
-CONFIG_ISTALLION=m
-CONFIG_SYNCLINK=m
-CONFIG_N_HDLC=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
-CONFIG_PRINTER=m
-CONFIG_PRINTER_READBACK=y
-CONFIG_MOUSE=y
-
-#
-# Mice
-#
-CONFIG_ATIXL_BUSMOUSE=m
-CONFIG_BUSMOUSE=m
-CONFIG_MS_BUSMOUSE=m
-CONFIG_PSMOUSE=y
-CONFIG_82C710_MOUSE=m
-CONFIG_PC110_PAD=m
-
-#
-# Joysticks
-#
-CONFIG_JOYSTICK=m
-CONFIG_JOY_ANALOG=m
-CONFIG_JOY_ASSASSIN=m
-CONFIG_JOY_GRAVIS=m
-CONFIG_JOY_LOGITECH=m
-CONFIG_JOY_SIDEWINDER=m
-CONFIG_JOY_THRUSTMASTER=m
-CONFIG_JOY_CREATIVE=m
-CONFIG_JOY_LIGHTNING=m
-CONFIG_JOY_PCI=m
-CONFIG_JOY_MAGELLAN=m
-CONFIG_JOY_SPACEORB=m
-CONFIG_JOY_SPACEBALL=m
-CONFIG_JOY_WARRIOR=m
-CONFIG_JOY_CONSOLE=m
-CONFIG_JOY_DB9=m
-CONFIG_JOY_TURBOGRAFX=m
-CONFIG_QIC02_TAPE=m
-# CONFIG_QIC02_DYNCONF is not set
-CONFIG_WATCHDOG=y
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+CONFIG_USB_DYNAMIC_MINORS=y
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
 
 #
-# Watchdog Cards
+# USB Host Controller Drivers
 #
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_PCWATCHDOG=m
-CONFIG_I810_TCO=m
-CONFIG_MIXCOMWD=m
-CONFIG_60XX_WDT=m
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_WDT=m
-CONFIG_WDT_501=y
-CONFIG_WDT_501_FAN=y
-CONFIG_WDTPCI=m
-CONFIG_MACHZ_WDT=m
-CONFIG_NVRAM=m
-CONFIG_RTC=y
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_UHCI_HCD=m
 
 #
-# I2C support
+# USB Device Class drivers
 #
-CONFIG_I2C=m
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_BITLP=m
-CONFIG_I2C_BITELV=m
-CONFIG_I2C_BITVELLE=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_PCFISA=m
-CONFIG_I2C_CHARDEV=m
-CONFIG_I2C_PROC=m
-# CONFIG_INTEL_RNG is not set
-CONFIG_AGP=m
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_I810=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_SWORKS=y
-CONFIG_DRM=m
-CONFIG_DRM_TDFX=m
-CONFIG_DRM_GAMMA=m
-CONFIG_DRM_R128=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_MGA=m
+CONFIG_USB_AUDIO=m
 
 #
-# Video For Linux
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
 #
-CONFIG_VIDEO_DEV=m
-CONFIG_RADIO_RTRACK=m
-CONFIG_RADIO_RTRACK2=m
-CONFIG_RADIO_AZTECH=m
-CONFIG_RADIO_CADET=m
-CONFIG_RADIO_GEMTEK=m
-CONFIG_RADIO_MAESTRO=m
-CONFIG_RADIO_MIROPCM20=m
-CONFIG_RADIO_TRUST=m
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_PMS=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_RADIO_SF16FMI=m
-CONFIG_RADIO_TYPHOON=m
-CONFIG_RADIO_TYPHOON_PROC_FS=y
-CONFIG_RADIO_ZOLTRIX=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_BUZ=m
-CONFIG_DTLK=m
+CONFIG_USB_MIDI=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
 
 #
-# Ftape, the floppy tape device driver
+# USB Human Interface Devices (HID)
 #
-CONFIG_FTAPE=m
-CONFIG_ZFTAPE=m
-CONFIG_ZFT_DFLT_BLK_SZ=10240
-CONFIG_ZFT_COMPRESSOR=m
-CONFIG_FT_NR_BUFFERS=3
-# CONFIG_FT_PROC_FS is not set
-CONFIG_FT_NORMAL_DEBUG=y
-# CONFIG_FT_FULL_DEBUG is not set
-# CONFIG_FT_NO_TRACE is not set
-# CONFIG_FT_NO_TRACE_AT_ALL is not set
-CONFIG_FT_STD_FDC=y
-# CONFIG_FT_MACH2 is not set
-# CONFIG_FT_PROBE_FC10 is not set
-# CONFIG_FT_ALT_FDC is not set
-CONFIG_FT_FDC_THR=8
-CONFIG_FT_FDC_MAX_RATE=2000
-CONFIG_FT_ALPHA_CLOCK=0
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_USB_HIDDEV=y
 
 #
-# USB support
+# USB HID Boot Protocol drivers
 #
-CONFIG_USB=m
-CONFIG_USB_DEBUG=y
-CONFIG_USB_DEVICEFS=y
-CONFIG_HOTPLUG=y
-CONFIG_USB_BANDWIDTH=y
-CONFIG_USB_UHCI=m
-CONFIG_USB_UHCI_ALT=m
-CONFIG_USB_OHCI=m
-CONFIG_USB_AUDIO=m
-CONFIG_USB_BLUETOOTH=m
-CONFIG_USB_STORAGE=m
-CONFIG_USB_STORAGE_DEBUG=y
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_HID=m
 CONFIG_USB_KBD=m
 CONFIG_USB_MOUSE=m
-CONFIG_INPUT_KEYBDEV=m
-CONFIG_INPUT_MOUSEDEV=m
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_USB_WMFORCE=m
+CONFIG_USB_AIPTEK=m
 CONFIG_USB_WACOM=m
-CONFIG_INPUT_EVDEV=m
-CONFIG_USB_DC2XX=m
+CONFIG_USB_KBTAB=m
+CONFIG_USB_POWERMATE=m
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_XPAD=m
+CONFIG_USB_ATI_REMOTE=m
+
+#
+# USB Imaging devices
+#
 CONFIG_USB_MDC800=m
-CONFIG_USB_SCANNER=m
 CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_DABUSB=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
 CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
 CONFIG_USB_OV511=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_DABUSB=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+CONFIG_USB_W9968CF=m
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_CATC=m
 CONFIG_USB_KAWETH=m
-CONFIG_USB_PLUSB=m
 CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_AX8817X=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
 
 #
 # USB Serial Converter support
@@ -1039,79 +2242,213 @@ CONFIG_USB_PEGASUS=m
 CONFIG_USB_SERIAL=m
 CONFIG_USB_SERIAL_GENERIC=y
 CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
 CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
 CONFIG_USB_SERIAL_EMPEG=m
 CONFIG_USB_SERIAL_FTDI_SIO=m
 CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
 CONFIG_USB_SERIAL_IR=m
 CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
 CONFIG_USB_SERIAL_KEYSPAN_PDA=m
 CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
 CONFIG_USB_SERIAL_KEYSPAN_USA28=y
 CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
 CONFIG_USB_SERIAL_KEYSPAN_USA19=y
 CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
 CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
 CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
 CONFIG_USB_SERIAL_MCT_U232=m
 CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
 CONFIG_USB_SERIAL_CYBERJACK=m
 CONFIG_USB_SERIAL_XIRCOM=m
 CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_AUERSWALD=m
 CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_LED=m
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_TEST=m
 
 #
-# Filesystems
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_NET2280=m
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_SA1100 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_OMAP is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+
 #
-CONFIG_QUOTA=y
-CONFIG_AUTOFS_FS=m
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
-CONFIG_ADFS_FS=m
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_UMSDOS_FS=m
-CONFIG_VFAT_FS=m
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
 CONFIG_ISO9660_FS=m
 CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
 CONFIG_UDF_FS=m
-CONFIG_UDF_RW=y
-CONFIG_MINIX_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_UMSDOS_FS is not set
 CONFIG_NTFS_FS=m
-# CONFIG_NTFS_RW is not set
-CONFIG_HPFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
 CONFIG_PROC_FS=y
-CONFIG_DEVPTS_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+CONFIG_ADFS_FS_RW=y
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_JFFS_FS=m
+CONFIG_JFFS_FS_VERBOSE=0
+# CONFIG_JFFS_PROC_FS is not set
+CONFIG_JFFS2_FS=m
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_NAND=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
 CONFIG_QNX4FS_FS=m
 CONFIG_QNX4FS_RW=y
-CONFIG_ROMFS_FS=y
-CONFIG_EXT2_FS=m
 CONFIG_SYSV_FS=m
 CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-CONFIG_EFS_FS=m
-CONFIG_SGI_PARTITION=y
-CONFIG_JFS_FS=m
+CONFIG_UFS_FS_WRITE=y
 
 #
 # Network File Systems
 #
-CONFIG_CODA_FS=m
 CONFIG_NFS_FS=m
 CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
 CONFIG_NFSD_TCP=y
-CONFIG_SUNRPC=m
 CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_RPCSEC_GSS_SPKM3=m
 CONFIG_SMB_FS=m
 CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_SMB_NLS_REMOTE="iso8859-2"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
 CONFIG_NCP_FS=m
 CONFIG_NCPFS_PACKET_SIGNING=y
 CONFIG_NCPFS_IOCTL_LOCKING=y
@@ -1119,26 +2456,29 @@ CONFIG_NCPFS_STRONG=y
 CONFIG_NCPFS_NFS_NS=y
 CONFIG_NCPFS_OS2_NS=y
 CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_MOUNT_SUBDIR=y
 CONFIG_NCPFS_NLS=y
 CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_AFS_FS=m
+CONFIG_RXRPC=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
 
 #
 # Partition Types
 #
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SMD_DISKLABEL=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_AMIGA_PARTITION=y
-CONFIG_NLS=y
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
 
 #
 # Native Language Support
 #
-CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-2"
 CONFIG_NLS_CODEPAGE_437=m
 CONFIG_NLS_CODEPAGE_737=m
 CONFIG_NLS_CODEPAGE_775=m
@@ -1154,11 +2494,15 @@ CONFIG_NLS_CODEPAGE_864=m
 CONFIG_NLS_CODEPAGE_865=m
 CONFIG_NLS_CODEPAGE_866=m
 CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_CODEPAGE_932=m
 CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_949=m
 CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_2=m
 CONFIG_NLS_ISO8859_3=m
@@ -1166,149 +2510,99 @@ CONFIG_NLS_ISO8859_4=m
 CONFIG_NLS_ISO8859_5=m
 CONFIG_NLS_ISO8859_6=m
 CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_8=m
 CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
 CONFIG_NLS_ISO8859_14=m
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_RU=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
 
 #
-# Console drivers
+# Profiling support
 #
-CONFIG_VGA_CONSOLE=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FB_PM2=m
-CONFIG_FB_ATY=m
-CONFIG_FB_VESA=y
-# CONFIG_FB_VGA16 is not set
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_MULTIHEAD=y
-CONFIG_FB_ATY128=m
-# CONFIG_FB_VIRTUAL is not set
-CONFIG_FBCON_ADVANCED=y
-CONFIG_FBCON_MFB=y
-CONFIG_FBCON_CFB2=y
-CONFIG_FBCON_CFB4=y
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-# CONFIG_FBCON_AFB is not set
-# CONFIG_FBCON_ILBM is not set
-# CONFIG_FBCON_IPLAN2P2 is not set
-# CONFIG_FBCON_IPLAN2P4 is not set
-# CONFIG_FBCON_IPLAN2P8 is not set
-# CONFIG_FBCON_MAC is not set
-# CONFIG_FBCON_VGA_PLANES is not set
-CONFIG_FBCON_VGA=m
-# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
-CONFIG_FBCON_FONTS=y
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-# CONFIG_FONT_SUN8x16 is not set
-# CONFIG_FONT_SUN12x22 is not set
-# CONFIG_FONT_6x11 is not set
-# CONFIG_FONT_PEARL_8x8 is not set
-# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
 
 #
-# Sound
+# Kernel hacking
 #
-CONFIG_SOUND=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_FUSION=m
-CONFIG_SOUND_EMU10K1=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-CONFIG_SOUND_MSNDCLAS=m
-# CONFIG_MSNDCLAS_HAVE_BOOT is not set
-CONFIG_MSNDCLAS_INIT_FILE="/etc/sound/msndinit.bin"
-CONFIG_MSNDCLAS_PERM_FILE="/etc/sound/msndperm.bin"
-CONFIG_SOUND_MSNDPIN=m
-# CONFIG_MSNDPIN_HAVE_BOOT is not set
-CONFIG_MSNDPIN_INIT_FILE="/etc/sound/pndspini.bin"
-CONFIG_MSNDPIN_PERM_FILE="/etc/sound/pndsperm.bin"
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_SB=m
-CONFIG_SOUND_GUS=m
-CONFIG_GUS16=y
-CONFIG_GUSMAX=y
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_PSS=m
-# CONFIG_PSS_MIXER is not set
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_AD1816=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_SOFTOSS=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_HIGHMEM is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_FRAME_POINTER is not set
+CONFIG_EARLY_PRINTK=y
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_4KSTACKS is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
 
 #
-# Additional low level sound drivers
+# Security options
 #
-CONFIG_LOWLEVEL_SOUND=y
-CONFIG_ACI_MIXER=m
-CONFIG_VIDEO_MSP3400=m
-CONFIG_AWE32_SYNTH=m
-CONFIG_AEDSP16=m
-CONFIG_AEDSP16_BASE=220
-CONFIG_MPU_BASE=330
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0
-CONFIG_AEDSP16_SBPRO=y
-CONFIG_AEDSP16_BASE=220
-CONFIG_AEDSP16_SB_IRQ=5
-CONFIG_AEDSP16_SB_DMA=0
-CONFIG_AEDSP16_MPU401=y
-CONFIG_AEDSP16_MPU_IRQ=5
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
 
 #
-# Security options
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WHIRLPOOL=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES_586=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Library routines
 #
-CONFIG_SECURE_STACK=y
-CONFIG_SECURE_STACK_SMART=y
-CONFIG_SECURE_LINK=y
-CONFIG_SECURE_FIFO=y
-CONFIG_SECURE_PROC=y
-CONFIG_SECURE_FD_0_1_2=y
-CONFIG_SECURE_RLIMIT_NPROC=y
-# CONFIG_SECURE_SHM is not set
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_LIBCRC32C=m
+CONFIG_QSORT=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
 
 #
-# Kernel hacking
+# Cluster Support
 #
-CONFIG_MAGIC_SYSRQ=y
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
+CONFIG_X86_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_PC=y
index 9d6e9697ce71485c05aafd68a9fb94df0297b9ae..1b7bf3a04c97978bff0fc2794fff05808020ebd8 100644 (file)
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
 CONFIG_X86=y
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_GENERIC_ISA_DMA=y
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_SYSCTL=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HOTPLUG=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
 
 #
 # Processor type and features
 #
+CONFIG_X86_PC=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_GENERICARCH is not set
+# CONFIG_X86_ES7000 is not set
 CONFIG_M386=y
 # CONFIG_M486 is not set
 # CONFIG_M586 is not set
 # CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
 # CONFIG_M686 is not set
-# CONFIG_M686_L1_64 is not set
-# CONFIG_M686_L1_128 is not set
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_F00F_BUG=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+CONFIG_X86_UP_APIC=y
+CONFIG_X86_UP_IOAPIC=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_NONFATAL=y
+# CONFIG_X86_MCE_P4THERMAL is not set
+CONFIG_TOSHIBA=m
+CONFIG_I8K=m
+CONFIG_OMNIBOOK=m
 CONFIG_MICROCODE=m
 CONFIG_X86_MSR=m
 CONFIG_X86_CPUID=m
-CONFIG_1GB=y
-# CONFIG_2GB is not set
+
+#
+# Firmware Drivers
+#
+# CONFIG_EDD is not set
+CONFIG_EFI_VARS=m
+# CONFIG_NOHIGHMEM is not set
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
+CONFIG_HIGHMEM=y
+# CONFIG_HIGHPTE is not set
 CONFIG_MATH_EMULATION=y
 CONFIG_MTRR=y
-# CONFIG_SMP is not set
+CONFIG_EFI=y
+CONFIG_BOOT_IOREMAP=y
+# CONFIG_REGPARM is not set
 
 #
-# Loadable module support
+# Power management options (ACPI, APM)
 #
-CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
-CONFIG_KMOD=y
+CONFIG_PM=y
+# CONFIG_SOFTWARE_SUSPEND is not set
+# CONFIG_PM_DISK is not set
 
 #
-# General setup
+# Software Suspend 2
+#
+CONFIG_SOFTWARE_SUSPEND2_CORE=m
+CONFIG_SOFTWARE_SUSPEND2=y
+CONFIG_SOFTWARE_SUSPEND2_WRITER=y
+
+#
+# Image Storage (you need at least one writer)
+#
+CONFIG_SOFTWARE_SUSPEND_SWAPWRITER=m
+CONFIG_SOFTWARE_SUSPEND_NULLWRITER=m
+
+#
+# Page Transformers
+#
+CONFIG_SOFTWARE_SUSPEND_LZF_COMPRESSION=m
+CONFIG_SOFTWARE_SUSPEND_GZIP_COMPRESSION=m
+CONFIG_SOFTWARE_SUSPEND_NULLTRANSFORMER=m
+
+#
+# User Interface Options
+#
+CONFIG_SOFTWARE_SUSPEND_BOOTSPLASH=m
+CONFIG_SOFTWARE_SUSPEND_TEXT_MODE=m
+
+#
+# General Options
+#
+CONFIG_SOFTWARE_SUSPEND_ACPI=y
+# CONFIG_SOFTWARE_SUSPEND_RELAXED_PROC is not set
+CONFIG_SOFTWARE_SUSPEND_DEFAULT_RESUME2=""
+CONFIG_SOFTWARE_SUSPEND_KEEP_IMAGE=y
+
+#
+# Debugging
+#
+# CONFIG_SOFTWARE_SUSPEND_DEBUG is not set
+# CONFIG_SOFTWARE_SUSPEND_VARIATION_ANALYSIS is not set
+CONFIG_SOFTWARE_SUSPEND2_DUMP=y
+
+#
+# ACPI (Advanced Configuration and Power Interface) Support
+#
+CONFIG_ACPI=y
+CONFIG_ACPI_BOOT=y
+CONFIG_ACPI_INTERPRETER=y
+CONFIG_ACPI_SLEEP=y
+CONFIG_ACPI_SLEEP_PROC_FS=y
+CONFIG_ACPI_AC=m
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_FAN=m
+CONFIG_ACPI_PROCESSOR=m
+CONFIG_ACPI_THERMAL=m
+CONFIG_ACPI_ASUS=m
+CONFIG_ACPI_TOSHIBA=m
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_BUS=y
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_PCI=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+
+#
+# APM (Advanced Power Management) BIOS Support
+#
+CONFIG_APM=m
+# CONFIG_APM_IGNORE_USER_SUSPEND is not set
+# CONFIG_APM_DO_ENABLE is not set
+CONFIG_APM_CPU_IDLE=y
+# CONFIG_APM_DISPLAY_BLANK is not set
+# CONFIG_APM_RTC_IS_GMT is not set
+# CONFIG_APM_ALLOW_INTS is not set
+# CONFIG_APM_REAL_MODE_POWER_OFF is not set
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_PROC_INTF=m
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+# CONFIG_CPU_FREQ_24_API is not set
+CONFIG_CPU_FREQ_TABLE=m
+
+#
+# CPUFreq processor drivers
+#
+CONFIG_X86_ACPI_CPUFREQ=m
+CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
+CONFIG_X86_POWERNOW_K6=m
+CONFIG_X86_POWERNOW_K7=m
+CONFIG_X86_POWERNOW_K7_ACPI=y
+CONFIG_X86_POWERNOW_K8=m
+CONFIG_X86_POWERNOW_K8_ACPI=y
+CONFIG_X86_GX_SUSPMOD=m
+CONFIG_X86_SPEEDSTEP_CENTRINO=m
+CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
+CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
+CONFIG_X86_SPEEDSTEP_ICH=m
+CONFIG_X86_SPEEDSTEP_SMI=m
+CONFIG_X86_P4_CLOCKMOD=m
+CONFIG_X86_SPEEDSTEP_LIB=m
+CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y
+CONFIG_X86_LONGRUN=m
+CONFIG_X86_LONGHAUL=m
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-CONFIG_BIGMEM=y
-CONFIG_NET=y
 CONFIG_PCI=y
 # CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
 # CONFIG_PCI_GODIRECT is not set
 CONFIG_PCI_GOANY=y
 CONFIG_PCI_BIOS=y
 CONFIG_PCI_DIRECT=y
-CONFIG_PCI_QUIRKS=y
-# CONFIG_PCI_OPTIMIZE is not set
-# CONFIG_PCI_OLD_PROC is not set
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+CONFIG_ISA=y
+# CONFIG_EISA is not set
 # CONFIG_MCA is not set
-# CONFIG_VISWS is not set
-CONFIG_SYSVIPC=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_BINFMT_AOUT=m
+CONFIG_SCx200=m
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_YENTA=m
+CONFIG_CARDBUS=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_I82365=m
+CONFIG_TCIC=m
+CONFIG_PCMCIA_PROBE=y
+
+#
+# PCI Hotplug Support
+#
+CONFIG_HOTPLUG_PCI=m
+CONFIG_HOTPLUG_PCI_FAKE=m
+CONFIG_HOTPLUG_PCI_COMPAQ=m
+CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y
+CONFIG_HOTPLUG_PCI_IBM=m
+CONFIG_HOTPLUG_PCI_ACPI=m
+CONFIG_HOTPLUG_PCI_ACPI_IBM=m
+CONFIG_HOTPLUG_PCI_CPCI=y
+CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
+CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
+CONFIG_HOTPLUG_PCI_PCIE=m
+CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE=y
+CONFIG_HOTPLUG_PCI_SHPC=m
+CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE=y
+
+#
+# Executable file formats
+#
 CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_ELF_AOUT=y
+CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
-CONFIG_BINFMT_JAVA=m
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+# CONFIG_STANDALONE is not set
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_REDBOOT_PARTS=m
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
+CONFIG_MTD_REDBOOT_PARTS_READONLY=y
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLOCK=m
+CONFIG_MTD_BLOCK_RO=m
+CONFIG_FTL=m
+CONFIG_NFTL=m
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=m
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=m
+CONFIG_MTD_CFI_AMDSTD=m
+CONFIG_MTD_CFI_AMDSTD_RETRY=0
+CONFIG_MTD_CFI_STAA=m
+CONFIG_MTD_CFI_UTIL=m
+CONFIG_MTD_RAM=m
+CONFIG_MTD_ROM=m
+CONFIG_MTD_ABSENT=m
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=m
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x4000000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+CONFIG_MTD_PNC2000=m
+CONFIG_MTD_SC520CDP=m
+CONFIG_MTD_NETSC520=m
+CONFIG_MTD_SBC_GXX=m
+CONFIG_MTD_ELAN_104NC=m
+CONFIG_MTD_SCx200_DOCFLASH=m
+CONFIG_MTD_AMD76XROM=m
+CONFIG_MTD_ICHXROM=m
+CONFIG_MTD_SCB2_FLASH=m
+CONFIG_MTD_NETtel=m
+CONFIG_MTD_DILNETPC=m
+CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
+CONFIG_MTD_L440GX=m
+CONFIG_MTD_PCI=m
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_PMC551=m
+CONFIG_MTD_PMC551_BUGFIX=y
+# CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_SLRAM=m
+CONFIG_MTD_PHRAM=m
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+CONFIG_MTD_BLKMTD=m
+
+#
+# Disk-On-Chip Device Drivers
+#
+CONFIG_MTD_DOC2000=m
+CONFIG_MTD_DOC2001=m
+CONFIG_MTD_DOC2001PLUS=m
+CONFIG_MTD_DOCPROBE=m
+CONFIG_MTD_DOCECC=m
+# CONFIG_MTD_DOCPROBE_ADVANCED is not set
+CONFIG_MTD_DOCPROBE_ADDRESS=0
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+CONFIG_MTD_NAND_IDS=m
+CONFIG_MTD_NAND_DISKONCHIP=m
+# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
+CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
+CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
+
+#
+# Parallel port support
+#
 CONFIG_PARPORT=m
 CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_CML1=m
+CONFIG_PARPORT_SERIAL=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_PC_PCMCIA=m
 # CONFIG_PARPORT_OTHER is not set
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-# CONFIG_APM_CPU_IDLE is not set
-# CONFIG_APM_DISPLAY_BLANK is not set
-CONFIG_APM_RTC_IS_GMT=y
-# CONFIG_APM_ALLOW_INTS is not set
-CONFIG_APM_REAL_MODE_POWER_OFF=y
-CONFIG_TOSHIBA=m
+CONFIG_PARPORT_1284=y
 
 #
-# Crypto options
+# Plug and Play support
 #
-CONFIG_CRYPTO=m
-CONFIG_CIPHERS=m
-CONFIG_CIPHER_AES=m
-CONFIG_CIPHER_RIJNDAEL=y
-CONFIG_CIPHER_TWOFISH=m
-CONFIG_CIPHER_MARS=m
-CONFIG_CIPHER_RC6=m
-CONFIG_CIPHER_SERPENT=m
-CONFIG_CIPHER_DFC=m
-CONFIG_CIPHER_BLOWFISH=m
-CONFIG_CIPHER_IDEA=m
-CONFIG_CIPHER_RC5=m
-CONFIG_CIPHER_DES_EDE3=m
-CONFIG_CIPHER_DES=m
-CONFIG_DIGEST=m
-CONFIG_DIGEST_MD5=m
-CONFIG_DIGEST_SHA1=m
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
 
 #
-# Plug and Play support
+# Protocols
 #
-CONFIG_PNP=y
-CONFIG_PNP_PARPORT=m
+CONFIG_ISAPNP=y
+CONFIG_PNPBIOS=y
+CONFIG_PNPBIOS_PROC_FS=y
 
 #
 # Block devices
 #
 CONFIG_BLK_DEV_FD=m
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_LOOP_USE_REL_BLOCK=y
-CONFIG_BLK_DEV_LOOP_GEN_SEL="m"
-CONFIG_BLK_DEV_LOOP_GEN=m
-CONFIG_BLK_DEV_LOOP_CAST=m
-CONFIG_BLK_DEV_LOOP_FISH2=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_MD=y
-CONFIG_AUTODETECT_RAID=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_STRIPED=m
-CONFIG_MD_MIRRORING=m
-CONFIG_MD_RAID5=m
-# CONFIG_MD_TRANSLUCENT is not set
-# CONFIG_MD_HSM is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_INITRD=y
 CONFIG_BLK_DEV_XD=m
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_PARIDE_PARPORT=m
 CONFIG_PARIDE=m
+CONFIG_PARIDE_PARPORT=m
+
+#
+# Parallel IDE high-level drivers
+#
 CONFIG_PARIDE_PD=m
 CONFIG_PARIDE_PCD=m
 CONFIG_PARIDE_PF=m
 CONFIG_PARIDE_PT=m
 CONFIG_PARIDE_PG=m
+
+#
+# Parallel IDE protocol modules
+#
 CONFIG_PARIDE_ATEN=m
 CONFIG_PARIDE_BPCK=m
+CONFIG_PARIDE_BPCK6=m
 CONFIG_PARIDE_COMM=m
 CONFIG_PARIDE_DSTR=m
 CONFIG_PARIDE_FIT2=m
 CONFIG_PARIDE_FIT3=m
 CONFIG_PARIDE_EPAT=m
+CONFIG_PARIDE_EPATC8=y
 CONFIG_PARIDE_EPIA=m
 CONFIG_PARIDE_FRIQ=m
 CONFIG_PARIDE_FRPW=m
@@ -145,350 +480,642 @@ CONFIG_PARIDE_ON20=m
 CONFIG_PARIDE_ON26=m
 CONFIG_BLK_CPQ_DA=m
 CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+CONFIG_BLK_DEV_DAC960=m
+CONFIG_BLK_DEV_UMEM=m
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_SX8=m
+CONFIG_BLK_DEV_UB=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_GNBD=m
 
 #
-# Networking options
-#
-CONFIG_CIPE=m
-CONFIG_PACKET=m
-CONFIG_NETLINK=y
-CONFIG_RTNETLINK=y
-CONFIG_NETLINK_DEV=y
-CONFIG_FIREWALL=y
-# CONFIG_NET_SECURITY is not set
-CONFIG_FILTER=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_RTNETLINK=y
-CONFIG_NETLINK=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_ROUTE_LARGE_TABLES is not set
-CONFIG_IP_ROUTE_NAT=y
-# CONFIG_IP_PNP is not set
-CONFIG_IP_FIREWALL=y
-CONFIG_IP_FIREWALL_NETLINK=y
-CONFIG_NETLINK_DEV=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_TRANSPARENT_PROXY=y
-CONFIG_IP_MASQUERADE=y
-CONFIG_IP_MASQUERADE_ICMP=y
-CONFIG_IP_MASQUERADE_MOD=y
-CONFIG_IP_MASQUERADE_IPAUTOFW=m
-CONFIG_IP_MASQUERADE_IPPORTFW=m
-CONFIG_IP_MASQUERADE_MFW=m
-CONFIG_IP_MASQUERADE_VS=y
-CONFIG_IP_VS_DEBUG=y
-CONFIG_IP_MASQUERADE_VS_TAB_BITS=12
-CONFIG_IP_MASQUERADE_VS_RR=m
-CONFIG_IP_MASQUERADE_VS_WRR=m
-CONFIG_IP_MASQUERADE_VS_LC=m
-CONFIG_IP_MASQUERADE_VS_WLC=m
-CONFIG_IP_MASQUERADE_VS_LBLC=m
-CONFIG_IP_MASQUERADE_VS_LBLCR=m
-CONFIG_IP_ROUTER=y
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-CONFIG_IP_ALIAS=y
-CONFIG_ARPD=y
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_RARP=m
-CONFIG_SKB_LARGE=y
-CONFIG_IPV6=m
-CONFIG_IPV6_EUI64=y
-CONFIG_IPV6_NO_PB=y
-CONFIG_ATM=y
-CONFIG_ATM_SKB=y
-CONFIG_ATM_CLIP=y
-CONFIG_ATM_CLIP_NO_ICMP=y
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_SPX=m
-CONFIG_ATALK=m
-CONFIG_BRIDGE=m
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-# CONFIG_LLC is not set
-CONFIG_VLAN_802_1Q=y
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-# CONFIG_CPU_IS_SLOW is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NETLINK=y
-CONFIG_RTNETLINK=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_ATM=y
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_WRR=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-CONFIG_IPSEC=m
-CONFIG_IPSEC_IPIP=y
-CONFIG_IPSEC_AH=y
-CONFIG_IPSEC_AUTH_HMAC_MD5=y
-CONFIG_IPSEC_AUTH_HMAC_SHA1=y
-CONFIG_IPSEC_ESP=y
-CONFIG_IPSEC_ENC_3DES=y
-CONFIG_IPSEC_IPCOMP=y
-# CONFIG_IPSEC_DEBUG is not set
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-
-#
-# ATA/IDE/MFM/RLL support
+# ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=m
+CONFIG_BLK_DEV_IDE=m
 
 #
-# IDE, ATA and ATAPI Block devices
+# Please see Documentation/ide.txt for help/info on IDE drives
 #
-CONFIG_BLK_DEV_IDE=m
+# CONFIG_BLK_DEV_IDE_SATA is not set
 # CONFIG_BLK_DEV_HD_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=m
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
-# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set
-# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set
-# CONFIG_BLK_DEV_IDEDISK_IBM is not set
-# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set
-# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set
-# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set
-# CONFIG_BLK_DEV_IDEDISK_WD is not set
-# CONFIG_BLK_DEV_COMMERIAL is not set
-# CONFIG_BLK_DEV_TIVO is not set
+CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_BLK_DEV_IDECS=m
 CONFIG_BLK_DEV_IDECD=m
 CONFIG_BLK_DEV_IDETAPE=m
 CONFIG_BLK_DEV_IDEFLOPPY=m
 CONFIG_BLK_DEV_IDESCSI=m
 # CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=m
 CONFIG_BLK_DEV_CMD640=y
 CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_RZ1000=y
+CONFIG_BLK_DEV_IDEPNP=y
 CONFIG_BLK_DEV_IDEPCI=y
 CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=m
+CONFIG_BLK_DEV_OPTI621=m
+CONFIG_BLK_DEV_RZ1000=m
+CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_PCI_AUTO is not set
+CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_PCI_WIP is not set
-# CONFIG_BLK_DEV_IDEDMA_TIMEOUT is not set
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
 CONFIG_BLK_DEV_ADMA=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_AEC62XX_TUNING=y
-CONFIG_BLK_DEV_ALI15X3=y
-CONFIG_WDC_ALI15X3=y
-CONFIG_BLK_DEV_AMD74XX=y
-# CONFIG_AMD74XX_OVERRIDE is not set
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_CMD680=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
+CONFIG_BLK_DEV_AEC62XX=m
+CONFIG_BLK_DEV_ALI15X3=m
+# CONFIG_WDC_ALI15X3 is not set
+CONFIG_BLK_DEV_AMD74XX=m
+CONFIG_BLK_DEV_ATIIXP=m
+CONFIG_BLK_DEV_CMD64X=m
+CONFIG_BLK_DEV_TRIFLEX=m
+CONFIG_BLK_DEV_CY82C693=m
+CONFIG_BLK_DEV_CS5520=m
+CONFIG_BLK_DEV_CS5530=m
+CONFIG_BLK_DEV_HPT34X=m
 # CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_PIIX_TUNING=y
-CONFIG_BLK_DEV_NS87415=y
-CONFIG_BLK_DEV_OPTI621=y
-# CONFIG_BLK_DEV_PDC_ADMA is not set
-CONFIG_BLK_DEV_PDC202XX=y
+CONFIG_BLK_DEV_HPT366=m
+CONFIG_BLK_DEV_SC1200=m
+CONFIG_BLK_DEV_PIIX=m
+CONFIG_BLK_DEV_NS87415=m
+CONFIG_BLK_DEV_PDC202XX_OLD=m
 CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=m
 CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-CONFIG_BLK_DEV_TRM290=y
-CONFIG_BLK_DEV_VIA82CXXX=n
+CONFIG_BLK_DEV_SVWKS=m
+CONFIG_BLK_DEV_SIIMAGE=m
+CONFIG_BLK_DEV_SIS5513=m
+CONFIG_BLK_DEV_SLC90E66=m
+CONFIG_BLK_DEV_TRM290=m
+CONFIG_BLK_DEV_VIA82CXXX=m
+# CONFIG_IDE_ARM is not set
 CONFIG_IDE_CHIPSETS=y
+
+#
+# Note: most of these also require special kernel boot parameters
+#
 CONFIG_BLK_DEV_4DRIVES=y
-CONFIG_BLK_DEV_ALI14XX=y
-CONFIG_BLK_DEV_DTC2278=y
-CONFIG_BLK_DEV_HT6560B=y
-# CONFIG_BLK_DEV_QD65XX is not set
-CONFIG_BLK_DEV_UMC8672=y
-CONFIG_IDEDMA_AUTO=n
+CONFIG_BLK_DEV_ALI14XX=m
+CONFIG_BLK_DEV_DTC2278=m
+CONFIG_BLK_DEV_HT6560B=m
+CONFIG_BLK_DEV_PDC4030=m
+CONFIG_BLK_DEV_QD65XX=m
+CONFIG_BLK_DEV_UMC8672=m
+CONFIG_BLK_DEV_IDEDMA=y
 CONFIG_IDEDMA_IVB=y
-# CONFIG_DMA_NONPCI is not set
-CONFIG_BLK_DEV_IDE_MODES=y
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_BLK_DEV_HD is not set
 
 #
-# SCSI support
+# SCSI device support
 #
 CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
 CONFIG_BLK_DEV_SD=m
 CONFIG_CHR_DEV_ST=m
 CONFIG_CHR_DEV_OSST=m
 CONFIG_BLK_DEV_SR=m
 CONFIG_BLK_DEV_SR_VENDOR=y
 CONFIG_CHR_DEV_SG=m
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
 CONFIG_SCSI_LOGGING=y
 
+#
+# SCSI Transport Attributes
+#
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
 #
 # SCSI low-level drivers
 #
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_7000FASST=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AHA152X=m
 CONFIG_SCSI_AHA1542=m
-CONFIG_SCSI_AHA1740=m
+CONFIG_SCSI_AACRAID=m
 CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+CONFIG_AIC79XX_REG_PRETTY_PRINT=y
 CONFIG_SCSI_DPT_I2O=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_ADVANSYS=m
 CONFIG_SCSI_IN2000=m
-CONFIG_SCSI_AM53C974=m
-CONFIG_SCSI_MEGARAID=m
+CONFIG_MEGARAID_NEWGEN=y
+CONFIG_MEGARAID_MM=m
+CONFIG_MEGARAID_MAILBOX=m
+CONFIG_SCSI_SATA=y
+CONFIG_SCSI_SATA_SVW=m
+CONFIG_SCSI_ATA_PIIX=m
+CONFIG_SCSI_SATA_NV=m
+CONFIG_SCSI_SATA_PROMISE=m
+CONFIG_SCSI_SATA_SX4=m
+CONFIG_SCSI_SATA_SIL=m
+CONFIG_SCSI_SATA_SIS=m
+CONFIG_SCSI_SATA_VIA=m
+CONFIG_SCSI_SATA_VITESSE=m
 CONFIG_SCSI_BUSLOGIC=m
 # CONFIG_SCSI_OMIT_FLASHPOINT is not set
-CONFIG_SCSI_CPQFCTS=m
+CONFIG_SCSI_DMX3191D=m
 CONFIG_SCSI_DTC3280=m
 CONFIG_SCSI_EATA=m
 CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-# CONFIG_SCSI_EATA_LINKED_COMMANDS is not set
+CONFIG_SCSI_EATA_LINKED_COMMANDS=y
 CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_EATA_DMA=m
 CONFIG_SCSI_EATA_PIO=m
 CONFIG_SCSI_FUTURE_DOMAIN=m
 CONFIG_SCSI_GDTH=m
 CONFIG_SCSI_GENERIC_NCR5380=m
+CONFIG_SCSI_GENERIC_NCR5380_MMIO=m
 CONFIG_SCSI_GENERIC_NCR53C400=y
-CONFIG_SCSI_G_NCR5380_PORT=y
-# CONFIG_SCSI_G_NCR5380_MEM is not set
+CONFIG_SCSI_IPS=m
 CONFIG_SCSI_INITIO=m
 CONFIG_SCSI_INIA100=m
 CONFIG_SCSI_PPA=m
 CONFIG_SCSI_IMM=m
-CONFIG_SCSI_IZIP_EPP16=y
+# CONFIG_SCSI_IZIP_EPP16 is not set
 # CONFIG_SCSI_IZIP_SLOW_CTR is not set
 CONFIG_SCSI_NCR53C406A=m
-CONFIG_SCSI_SYM53C416=m
-CONFIG_SCSI_SIM710=m
-CONFIG_SCSI_NCR53C7xx=m
-# CONFIG_SCSI_NCR53C7xx_sync is not set
-CONFIG_SCSI_NCR53C7xx_FAST=y
-CONFIG_SCSI_NCR53C7xx_DISCONNECT=y
-CONFIG_SCSI_NCR53C8XX=m
-CONFIG_SCSI_SYM53C8XX=m
-CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
-CONFIG_SCSI_NCR53C8XX_SYNC=80
-# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
-CONFIG_SCSI_NCR53C8XX_PQS_PDS=y
-# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
 CONFIG_SCSI_PAS16=m
-CONFIG_SCSI_PCI2000=m
-CONFIG_SCSI_PCI2220I=m
 CONFIG_SCSI_PSI240I=m
 CONFIG_SCSI_QLOGIC_FAS=m
 CONFIG_SCSI_QLOGIC_ISP=m
 CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_SEAGATE=m
-CONFIG_SCSI_DC395x_TRMS1040=m
+CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA2XXX=m
+CONFIG_SCSI_QLA21XX=m
+CONFIG_SCSI_QLA22XX=m
+CONFIG_SCSI_QLA2300=m
+CONFIG_SCSI_QLA2322=m
+CONFIG_SCSI_QLA6312=m
+CONFIG_SCSI_QLA6322=m
+CONFIG_SCSI_SYM53C416=m
+CONFIG_SCSI_DC395x=m
 CONFIG_SCSI_DC390T=m
-# CONFIG_SCSI_DC390T_NOGENSUPP is not set
 CONFIG_SCSI_T128=m
 CONFIG_SCSI_U14_34F=m
-# CONFIG_SCSI_U14_34F_LINKED_COMMANDS is not set
+CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y
+CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y
 CONFIG_SCSI_U14_34F_MAX_TAGS=8
 CONFIG_SCSI_ULTRASTOR=m
-CONFIG_SCSI_DEBUG=m
+CONFIG_SCSI_NSP32=m
+# CONFIG_SCSI_DEBUG is not set
 
 #
-# I2O device support
+# PCMCIA SCSI adapter support
 #
-CONFIG_I2O=m
-CONFIG_I2O_PCI=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
+CONFIG_PCMCIA_AHA152X=m
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_NINJA_SCSI=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+CONFIG_CD_NO_IDESCSI=y
+CONFIG_AZTCD=m
+CONFIG_GSCD=m
+CONFIG_SBPCD=m
+CONFIG_MCD=m
+CONFIG_MCD_IRQ=11
+CONFIG_MCD_BASE=0x300
+CONFIG_MCDX=m
+CONFIG_OPTCD=m
+CONFIG_CM206=m
+CONFIG_SJCD=m
+CONFIG_ISP16_CDI=m
+CONFIG_CDU31A=m
+CONFIG_CDU535=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_CTL=m
+CONFIG_FUSION_LAN=m
 
 #
 # IEEE 1394 (FireWire) support
 #
 CONFIG_IEEE1394=m
-CONFIG_FORCE_MODULE=m
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_PCILYNX_LOCALRAM=y
-CONFIG_IEEE1394_PCILYNX_PORTS=y
-CONFIG_IEEE1394_OHCI1394=m
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_RAWIO=m
-# CONFIG_IEEE1394_SBP2 is not set
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
 
 #
-# Network device support
+# Subsystem Options
 #
-CONFIG_NETDEVICES=y
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_IEEE1394_OUI_DB=y
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
 
 #
-# ARCnet devices
+# Device Drivers
 #
-CONFIG_ARCNET=m
-CONFIG_ARCNET_ETH=y
-CONFIG_ARCNET_1051=y
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-CONFIG_ARCNET_COM20020=m
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
+
+#
+# Protocol Drivers
+#
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# I2O device support
+#
+CONFIG_I2O=m
+CONFIG_I2O_CONFIG=m
+CONFIG_I2O_BLOCK=m
+CONFIG_I2O_SCSI=m
+CONFIG_I2O_PROC=m
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_TUNNEL=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+CONFIG_ATM_CLIP_NO_ICMP=y
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+CONFIG_DECNET=m
+# CONFIG_DECNET_SIOCGIFCONF is not set
+# CONFIG_DECNET_ROUTER is not set
+CONFIG_LLC=y
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=y
+CONFIG_LTPC=m
+CONFIG_COPS=m
+CONFIG_COPS_DAYNA=y
+CONFIG_COPS_TANGENT=y
+CONFIG_IPDDP=m
+# CONFIG_IPDDP_ENCAP is not set
+# CONFIG_IPDDP_DECAP is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+CONFIG_ECONET_AUNUDP=y
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+# CONFIG_NET_SCH_CLK_JIFFIES is not set
+# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
+CONFIG_NET_SCH_CLK_CPU=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_WRR=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_ESFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+# CONFIG_NET_CLS_ACT is not set
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+# CONFIG_AX25_DAMA_SLAVE is not set
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_MKISS=m
+CONFIG_6PACK=m
+CONFIG_BPQETHER=m
+CONFIG_DMASCC=m
+CONFIG_SCC=m
+# CONFIG_SCC_DELAY is not set
+CONFIG_SCC_TRXECHO=y
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_BAYCOM_EPP=m
+CONFIG_YAM=m
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+CONFIG_IRPORT_SIR=m
+
+#
+# Old Serial dongle support
+#
+CONFIG_DONGLE_OLD=y
+CONFIG_ESI_DONGLE_OLD=m
+CONFIG_ACTISYS_DONGLE_OLD=m
+CONFIG_TEKRAM_DONGLE_OLD=m
+CONFIG_GIRBIL_DONGLE_OLD=m
+CONFIG_LITELINK_DONGLE_OLD=m
+CONFIG_MCP2120_DONGLE_OLD=m
+CONFIG_OLD_BELKIN_DONGLE_OLD=m
+CONFIG_ACT200L_DONGLE_OLD=m
+CONFIG_MA600_DONGLE_OLD=m
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+CONFIG_SIGMATEL_FIR=m
+CONFIG_NSC_FIR=m
+CONFIG_WINBOND_FIR=m
+CONFIG_TOSHIBA_FIR=m
+CONFIG_SMC_IRCC_FIR=m
+CONFIG_ALI_FIR=m
+CONFIG_VLSI_FIR=m
+CONFIG_VIA_FIR=m
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_NETDEVICES=y
 CONFIG_DUMMY=m
 CONFIG_BONDING=m
 CONFIG_EQUALIZER=m
-CONFIG_IMQ=y
+CONFIG_IMQ=m
+CONFIG_TUN=m
 CONFIG_ETHERTAP=m
 CONFIG_NET_SB1000=m
 
+#
+# ARCnet devices
+#
+CONFIG_ARCNET=m
+CONFIG_ARCNET_1201=m
+CONFIG_ARCNET_1051=m
+CONFIG_ARCNET_RAW=m
+CONFIG_ARCNET_COM90xx=m
+CONFIG_ARCNET_COM90xxIO=m
+CONFIG_ARCNET_RIM_I=m
+CONFIG_ARCNET_COM20020=m
+CONFIG_ARCNET_COM20020_ISA=m
+CONFIG_ARCNET_COM20020_PCI=m
+
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
 CONFIG_NET_VENDOR_3COM=y
 CONFIG_EL1=m
 CONFIG_EL2=m
@@ -497,60 +1124,82 @@ CONFIG_EL16=m
 CONFIG_EL3=m
 CONFIG_3C515=m
 CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
 CONFIG_LANCE=m
 CONFIG_NET_VENDOR_SMC=y
 CONFIG_WD80x3=m
 CONFIG_ULTRA=m
-CONFIG_ULTRA32=m
 CONFIG_SMC9194=m
 CONFIG_NET_VENDOR_RACAL=y
 CONFIG_NI5010=m
 CONFIG_NI52=m
 CONFIG_NI65=m
-CONFIG_RTL8139=m
-CONFIG_RTL8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-CONFIG_NET_ISA=y
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_PCMCIA_XIRCOM=m
+CONFIG_PCMCIA_XIRTULIP=m
 CONFIG_AT1700=m
-CONFIG_E2100=m
 CONFIG_DEPCA=m
+CONFIG_HP100=m
+CONFIG_NET_ISA=y
+CONFIG_E2100=m
 CONFIG_EWRK3=m
 CONFIG_EEXPRESS=m
 CONFIG_EEXPRESS_PRO=m
-CONFIG_FMV18X=m
 CONFIG_HPLAN_PLUS=m
 CONFIG_HPLAN=m
-CONFIG_HP100=m
+CONFIG_LP486E=m
 CONFIG_ETH16I=m
 CONFIG_NE2000=m
+CONFIG_ZNET=m
 CONFIG_SEEQ8005=m
-CONFIG_SK_G16=y
-CONFIG_NET_EISA=y
+CONFIG_NET_PCI=y
 CONFIG_PCNET32=m
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
 CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
 CONFIG_AC3200=m
 CONFIG_APRICOT=m
-CONFIG_LP486E=m
+CONFIG_B44=m
+CONFIG_FORCEDETH=m
 CONFIG_CS89x0=m
-CONFIG_DM9102=m
-CONFIG_DE4X5=m
-CONFIG_DEC_ELCP=m
-CONFIG_DEC_ELCP_OLD=m
 CONFIG_DGRS=m
-CONFIG_EEXPRESS_PRO100=m
-CONFIG_LNE390=m
-CONFIG_NE3210=m
+CONFIG_EEPRO100=m
+# CONFIG_EEPRO100_PIO is not set
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
 CONFIG_NE2K_PCI=m
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
-CONFIG_ES3210=m
 CONFIG_EPIC100=m
-# CONFIG_ZNET is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_TLAN=m
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_VELOCITY=m
 CONFIG_NET_POCKET=y
-CONFIG_ATP=y
+CONFIG_ATP=m
 CONFIG_DE600=m
 CONFIG_DE620=m
 
@@ -558,480 +1207,1123 @@ CONFIG_DE620=m
 # Ethernet (1000 Mbit)
 #
 CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_NS83820=m
 CONFIG_HAMACHI=m
 CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
 CONFIG_SK98LIN=m
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-# CONFIG_ROADRUNNER_LARGE_RINGS is not set
+CONFIG_TIGON3=m
 
 #
-# Appletalk devices
+# Ethernet (10000 Mbit)
 #
-CONFIG_LTPC=m
-CONFIG_COPS=m
-CONFIG_COPS_DAYNA=y
-CONFIG_COPS_TANGENT=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-CONFIG_NET_RADIO=y
-CONFIG_STRIP=m
-CONFIG_WAVELAN=m
-CONFIG_ARLAN=m
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
 
 #
-# Token ring devices
+# Token Ring devices
 #
 CONFIG_TR=y
 CONFIG_IBMTR=m
-CONFIG_IBMLS=m
 CONFIG_IBMOL=m
-CONFIG_SKTR=m
-CONFIG_NET_FC=y
-CONFIG_IPHASE5526=m
-CONFIG_RCPCI=m
-CONFIG_SHAPER=m
+CONFIG_IBMLS=m
+CONFIG_3C359=m
+CONFIG_TMS380TR=m
+CONFIG_TMSPCI=m
+CONFIG_SKISA=m
+CONFIG_PROTEON=m
+CONFIG_ABYSS=m
+CONFIG_SMCTR=m
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+CONFIG_ARLAN=m
+CONFIG_WAVELAN=m
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+CONFIG_PCMCIA_RAYCS=m
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+
+#
+# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
+#
+CONFIG_PRISM54=m
+CONFIG_NET_WIRELESS=y
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_ARCNET_COM20020_CS=m
+CONFIG_PCMCIA_IBMTR=m
 
 #
 # Wan interfaces
 #
+CONFIG_WAN=y
 CONFIG_HOSTESS_SV11=m
 CONFIG_COSA=m
+CONFIG_DSCC4=m
+CONFIG_DSCC4_PCISYNC=y
+CONFIG_DSCC4_PCI_RST=y
+CONFIG_LANMEDIA=m
 CONFIG_SEALEVEL_4021=m
 CONFIG_SYNCLINK_SYNCPPP=m
-CONFIG_FARSYNC=m
-CONFIG_LANMEDIA=m
-CONFIG_COMX=m
-CONFIG_COMX_HW_COMX=m
-CONFIG_COMX_HW_LOCOMX=m
-CONFIG_COMX_HW_MIXCOM=m
-CONFIG_COMX_PROTO_PPP=m
-CONFIG_COMX_PROTO_LAPB=m
-CONFIG_COMX_PROTO_FR=m
 CONFIG_HDLC=m
-CONFIG_N2=m
-CONFIG_C101=m
+CONFIG_HDLC_RAW=y
+CONFIG_HDLC_RAW_ETH=y
+CONFIG_HDLC_CISCO=y
+CONFIG_HDLC_FR=y
+CONFIG_HDLC_PPP=y
+CONFIG_HDLC_X25=y
+CONFIG_TAHOE9XX=m
+CONFIG_PCI200SYN=m
 CONFIG_WANXL=m
 CONFIG_PC300=m
-# CONFIG_PC300_X25 is not set
-CONFIG_DLCI=m
+CONFIG_PC300_MLPPP=y
+CONFIG_N2=m
+CONFIG_C101=m
+CONFIG_FARSYNC=m
+CONFIG_DLCI=m
 CONFIG_DLCI_COUNT=24
 CONFIG_DLCI_MAX=8
 CONFIG_SDLA=m
-CONFIG_WAN_DRIVERS=y
-CONFIG_VENDOR_SANGOMA=m
-CONFIG_WANPIPE_CARDS=4
-# CONFIG_WANPIPE_X25 is not set
-CONFIG_WANPIPE_FR=y
-CONFIG_WANPIPE_PPP=y
-CONFIG_WANPIPE_CHDLC=y
-CONFIG_XPEED=m
+CONFIG_WAN_ROUTER_DRIVERS=y
+CONFIG_CYCLADES_SYNC=m
+CONFIG_CYCLOMX_X25=y
 CONFIG_LAPBETHER=m
 CONFIG_X25_ASY=m
 CONFIG_SBNI=m
+CONFIG_SBNI_MULTILINE=y
+
+#
+# ATM drivers
+#
 CONFIG_ATM_TCP=m
+CONFIG_ATM_LANAI=m
 CONFIG_ATM_ENI=m
 # CONFIG_ATM_ENI_DEBUG is not set
 # CONFIG_ATM_ENI_TUNE_BURST is not set
-# CONFIG_ATM_ZATM is not set
+CONFIG_ATM_FIRESTREAM=m
+CONFIG_ATM_ZATM=m
+# CONFIG_ATM_ZATM_DEBUG is not set
 CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_AMBASSADOR is not set
-# CONFIG_ATM_HORIZON is not set
-CONFIG_ATM_FORE200E=m
+CONFIG_ATM_NICSTAR_USE_SUNI=y
+CONFIG_ATM_NICSTAR_USE_IDT77105=y
+CONFIG_ATM_IDT77252=m
+# CONFIG_ATM_IDT77252_DEBUG is not set
+# CONFIG_ATM_IDT77252_RCV_ALL is not set
+CONFIG_ATM_IDT77252_USE_SUNI=y
+CONFIG_ATM_AMBASSADOR=m
+# CONFIG_ATM_AMBASSADOR_DEBUG is not set
+CONFIG_ATM_HORIZON=m
+# CONFIG_ATM_HORIZON_DEBUG is not set
+CONFIG_ATM_IA=m
+# CONFIG_ATM_IA_DEBUG is not set
+CONFIG_ATM_FORE200E_MAYBE=m
 CONFIG_ATM_FORE200E_PCA=y
 CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_USE_TASKLET=y
 CONFIG_ATM_FORE200E_TX_RETRY=16
 CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E=m
+CONFIG_ATM_HE=m
+CONFIG_ATM_HE_USE_SUNI=y
+CONFIG_FDDI=y
+CONFIG_DEFXX=m
+CONFIG_SKFP=m
+CONFIG_HIPPI=y
+CONFIG_ROADRUNNER=m
+# CONFIG_ROADRUNNER_LARGE_RINGS is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+CONFIG_NET_FC=y
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
 
 #
-# Amateur Radio support
+# ISDN subsystem
 #
-CONFIG_HAMRADIO=y
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-CONFIG_MKISS=m
-CONFIG_6PACK=m
-CONFIG_BPQETHER=m
-CONFIG_DMASCC=m
-CONFIG_SCC=m
-CONFIG_SCC_DELAY=y
-CONFIG_SCC_TRXECHO=y
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_BAYCOM_EPP=m
-CONFIG_SOUNDMODEM=m
-CONFIG_SOUNDMODEM_SBC=y
-CONFIG_SOUNDMODEM_WSS=y
-CONFIG_SOUNDMODEM_AFSK1200=y
-CONFIG_SOUNDMODEM_AFSK2400_7=y
-CONFIG_SOUNDMODEM_AFSK2400_8=y
-CONFIG_SOUNDMODEM_AFSK2666=y
-CONFIG_SOUNDMODEM_HAPN4800=y
-CONFIG_SOUNDMODEM_PSK4800=y
-CONFIG_SOUNDMODEM_FSK9600=y
-CONFIG_YAM=m
-CONFIG_HFMODEM=m
-CONFIG_HFMODEM_SBC=y
-CONFIG_HFMODEM_WSS=y
+# CONFIG_ISDN is not set
 
 #
-# IrDA (infrared) support
+# Telephony Support
 #
-CONFIG_IRDA=m
-CONFIG_IRLAN=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-CONFIG_IRDA_OPTIONS=y
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-CONFIG_IRDA_FAST_RR=y
-CONFIG_IRDA_DEBUG=y
-CONFIG_IRDA_COMPRESSION=y
-CONFIG_IRDA_DEFLATE=m
+CONFIG_PHONE=m
+CONFIG_PHONE_IXJ=m
+CONFIG_PHONE_IXJ_PCMCIA=m
 
 #
-# Infrared-port device drivers
+# Input device support
 #
-CONFIG_IRTTY_SIR=m
-CONFIG_IRPORT_SIR=m
-CONFIG_NSC_FIR=m
-CONFIG_WINBOND_FIR=m
-CONFIG_TOSHIBA_FIR=m
-CONFIG_SMC_IRCC_FIR=m
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_INPUT=y
 
 #
-# ISDN subsystem
+# Userland interfaces
 #
-CONFIG_ISDN=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-# CONFIG_ISDN_TTY_FAX is not set
-# CONFIG_ISDN_X25 is not set
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DRV_LOOP=m
-# CONFIG_ISDN_DIVERSION is not set
-
-#
-# Passive ISDN cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_16_0=y
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_AVM_A1=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_IX1MICROR2=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_ASUSCOM=y
-CONFIG_HISAX_TELEINT=y
-CONFIG_HISAX_HFCS=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_SPORTSTER=y
-CONFIG_HISAX_MIC=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_ISURF=y
-CONFIG_HISAX_HSTSAPHIR=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-
-#
-# Active ISDN cards
-#
-CONFIG_ISDN_DRV_ICN=m
-CONFIG_ISDN_DRV_PCBIT=m
-CONFIG_ISDN_DRV_SC=m
-CONFIG_ISDN_DRV_ACT2000=m
-CONFIG_ISDN_DRV_EICON=y
-CONFIG_ISDN_DRV_EICON_DIVAS=m
-CONFIG_ISDN_DRV_EICON_OLD=m
-CONFIG_ISDN_DRV_EICON_PCI=y
-# CONFIG_ISDN_DRV_EICON_ISA is not set
-CONFIG_ISDN_CAPI=m
-# CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-# CONFIG_ISDN_DRV_AVMB1_B1ISA is not set
-# CONFIG_ISDN_DRV_AVMB1_B1PCI is not set
-# CONFIG_ISDN_DRV_AVMB1_B1PCIV4 is not set
-# CONFIG_ISDN_DRV_AVMB1_T1ISA is not set
-# CONFIG_ISDN_DRV_AVMB1_B1PCMCIA is not set
-# CONFIG_ISDN_DRV_AVMB1_T1PCI is not set
-CONFIG_ISDN_DRV_AVMB1_C4=m
-CONFIG_HYSDN=m
-CONFIG_HYSDN_CAPI=y
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_VORTEX=m
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_SERIO_CT82C710=m
+CONFIG_SERIO_PARKBD=m
+CONFIG_SERIO_PCIPS2=m
+
 #
-CONFIG_CD_NO_IDESCSI=y
-CONFIG_AZTCD=m
-CONFIG_GSCD=m
-CONFIG_SBPCD=m
-CONFIG_MCD=m
-CONFIG_MCD_IRQ=11
-CONFIG_MCD_BASE=300
-CONFIG_MCDX=m
-CONFIG_OPTCD=m
-CONFIG_CM206=m
-CONFIG_SJCD=m
-CONFIG_ISP16_CDI=m
-CONFIG_CDU31A=m
-CONFIG_CDU535=m
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_INPORT=m
+CONFIG_MOUSE_ATIXL=y
+CONFIG_MOUSE_LOGIBM=m
+CONFIG_MOUSE_PC110PAD=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=m
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+CONFIG_JOYSTICK_GUILLEMOT=m
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_USB=y
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+CONFIG_JOYSTICK_TWIDDLER=m
+CONFIG_JOYSTICK_DB9=m
+CONFIG_JOYSTICK_GAMECON=m
+CONFIG_JOYSTICK_TURBOGRAFX=m
+CONFIG_INPUT_JOYDUMP=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
 
 #
 # Character devices
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-CONFIG_SERIAL_EXTENDED=y
-CONFIG_SERIAL_MANY_PORTS=y
-CONFIG_SERIAL_SHARE_IRQ=y
-# CONFIG_SERIAL_DETECT_IRQ is not set
-CONFIG_SERIAL_MULTIPORT=y
-# CONFIG_HUB6 is not set
+CONFIG_HW_CONSOLE=y
 CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_COMPUTONE=m
+# CONFIG_COMPUTONE is not set
 CONFIG_ROCKETPORT=m
 CONFIG_CYCLADES=m
 # CONFIG_CYZ_INTR is not set
 CONFIG_DIGIEPCA=m
-CONFIG_ESPSERIAL=m
-CONFIG_MOXA_INTELLIO=m
-CONFIG_MOXA_SMARTIO=m
-CONFIG_ISI=m
-CONFIG_RISCOM8=m
-CONFIG_SPECIALIX=m
-CONFIG_SPECIALIX_RTSCTS=y
-CONFIG_SX=m
-CONFIG_RIO=m
-# CONFIG_RIO_OLDPCI is not set
+# CONFIG_ESPSERIAL is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_ISI is not set
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_N_HDLC=m
+# CONFIG_RISCOM8 is not set
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
+# CONFIG_RIO is not set
 CONFIG_STALDRV=y
 CONFIG_STALLION=m
 CONFIG_ISTALLION=m
-CONFIG_SYNCLINK=m
-CONFIG_N_HDLC=m
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_CS=m
+# CONFIG_SERIAL_8250_ACPI is not set
+CONFIG_SERIAL_8250_NR_UARTS=8
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_MULTIPORT=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
+CONFIG_LEGACY_PTYS=y
+
+#
+# Linux InfraRed Controller
+#
+CONFIG_LIRC_SUPPORT=m
+CONFIG_LIRC_MAX_DEV=4
+CONFIG_LIRC_IRCTL_DEV_MAJOR=61
+CONFIG_LIRC_I2C=m
+CONFIG_LIRC_GPIO=m
+CONFIG_LIRC_BT829=m
+CONFIG_LIRC_IT87=m
+CONFIG_LIRC_ATIUSB=m
+CONFIG_LIRC_MCEUSB=m
+# CONFIG_LIRC_SASEM is not set
+CONFIG_LIRC_PARALLEL=m
+CONFIG_LIRC_PARALLEL_LPT1=y
+# CONFIG_LIRC_PARALLEL_LPT2 is not set
+# CONFIG_LIRC_PARALLEL_LPT3 is not set
+# CONFIG_LIRC_PARALLEL_OTHER is not set
+CONFIG_LIRC_PORT_PARALLEL=0x378
+CONFIG_LIRC_IRQ_PARALLEL=0x7
+CONFIG_LIRC_TIMER=65535
+CONFIG_LIRC_SERIAL=m
+CONFIG_LIRC_HOMEBREW=y
+# CONFIG_LIRC_SERIAL_ANIMAX is not set
+# CONFIG_LIRC_SERIAL_IRDEO is not set
+# CONFIG_LIRC_SERIAL_IRDEO_REMOTE is not set
+CONFIG_LIRC_SERIAL_TRANSMITTER=y
+CONFIG_LIRC_SERIAL_SOFTCARRIER=y
+# CONFIG_LIRC_SERIAL_IGOR is not set
+CONFIG_LIRC_SERIAL_COM1=y
+# CONFIG_LIRC_SERIAL_COM2 is not set
+# CONFIG_LIRC_SERIAL_COM3 is not set
+# CONFIG_LIRC_SERIAL_COM4 is not set
+# CONFIG_LIRC_SERIAL_OTHER is not set
+CONFIG_LIRC_PORT_SERIAL=0x3f8
+CONFIG_LIRC_IRQ_SERIAL=0x4
+# CONFIG_LIRC_SIR is not set
+CONFIG_LEGACY_PTY_COUNT=256
 CONFIG_PRINTER=m
-CONFIG_PRINTER_READBACK=y
-CONFIG_MOUSE=y
-
-#
-# Mice
-#
-CONFIG_ATIXL_BUSMOUSE=m
-CONFIG_BUSMOUSE=m
-CONFIG_MS_BUSMOUSE=m
-CONFIG_PSMOUSE=y
-CONFIG_82C710_MOUSE=m
-CONFIG_PC110_PAD=m
-
-#
-# Joysticks
-#
-CONFIG_JOYSTICK=m
-CONFIG_JOY_ANALOG=m
-CONFIG_JOY_ASSASSIN=m
-CONFIG_JOY_GRAVIS=m
-CONFIG_JOY_LOGITECH=m
-CONFIG_JOY_SIDEWINDER=m
-CONFIG_JOY_THRUSTMASTER=m
-CONFIG_JOY_CREATIVE=m
-CONFIG_JOY_LIGHTNING=m
-CONFIG_JOY_PCI=m
-CONFIG_JOY_MAGELLAN=m
-CONFIG_JOY_SPACEORB=m
-CONFIG_JOY_SPACEBALL=m
-CONFIG_JOY_WARRIOR=m
-CONFIG_JOY_CONSOLE=m
-CONFIG_JOY_DB9=m
-CONFIG_JOY_TURBOGRAFX=m
-CONFIG_QIC02_TAPE=m
-# CONFIG_QIC02_DYNCONF is not set
+# CONFIG_LP_CONSOLE is not set
+CONFIG_PPDEV=m
+# CONFIG_TIPAR is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
+CONFIG_IPMI_POWEROFF=m
+
+#
+# Watchdog Cards
+#
 CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+CONFIG_ACQUIRE_WDT=m
+CONFIG_ADVANTECH_WDT=m
+CONFIG_ALIM1535_WDT=m
+CONFIG_ALIM7101_WDT=m
+CONFIG_SC520_WDT=m
+CONFIG_EUROTECH_WDT=m
+CONFIG_IB700_WDT=m
+CONFIG_WAFER_WDT=m
+CONFIG_I8XX_TCO=m
+CONFIG_SC1200_WDT=m
+CONFIG_SCx200_WDT=m
+CONFIG_60XX_WDT=m
+CONFIG_CPU5_WDT=m
+CONFIG_W83627HF_WDT=m
+CONFIG_W83877F_WDT=m
+CONFIG_MACHZ_WDT=m
+
+#
+# ISA-based Watchdog Cards
+#
+CONFIG_PCWATCHDOG=m
+CONFIG_MIXCOMWD=m
+CONFIG_WDT=m
+CONFIG_WDT_501=y
+
+#
+# PCI-based Watchdog Cards
+#
+CONFIG_PCIPCWATCHDOG=m
+CONFIG_WDTPCI=m
+CONFIG_WDT_501_PCI=y
+
+#
+# USB-based Watchdog Cards
+#
+CONFIG_USBPCWATCHDOG=m
+CONFIG_HW_RANDOM=m
+CONFIG_NVRAM=m
+CONFIG_RTC=y
+CONFIG_DTLK=m
+CONFIG_R3964=m
+CONFIG_APPLICOM=m
+CONFIG_SONYPI=m
+
+#
+# Ftape, the floppy tape device driver
+#
+CONFIG_FTAPE=m
+CONFIG_ZFTAPE=m
+CONFIG_ZFT_DFLT_BLK_SZ=10240
+
+#
+# The compressor will be built as a module only!
+#
+CONFIG_ZFT_COMPRESSOR=m
+CONFIG_FT_NR_BUFFERS=3
+CONFIG_FT_PROC_FS=y
+CONFIG_FT_NORMAL_DEBUG=y
+# CONFIG_FT_FULL_DEBUG is not set
+# CONFIG_FT_NO_TRACE is not set
+# CONFIG_FT_NO_TRACE_AT_ALL is not set
+
+#
+# Hardware configuration
+#
+CONFIG_FT_STD_FDC=y
+# CONFIG_FT_MACH2 is not set
+# CONFIG_FT_PROBE_FC10 is not set
+# CONFIG_FT_ALT_FDC is not set
+CONFIG_FT_FDC_THR=8
+CONFIG_FT_FDC_MAX_RATE=2000
+CONFIG_FT_ALPHA_CLOCK=0
+CONFIG_AGP=m
+CONFIG_AGP_ALI=m
+CONFIG_AGP_ATI=m
+CONFIG_AGP_AMD=m
+CONFIG_AGP_AMD64=m
+CONFIG_AGP_INTEL=m
+CONFIG_AGP_INTEL_MCH=m
+CONFIG_AGP_NVIDIA=m
+CONFIG_AGP_SIS=m
+CONFIG_AGP_SWORKS=m
+CONFIG_AGP_VIA=m
+CONFIG_AGP_EFFICEON=m
+CONFIG_DRM=y
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_GAMMA=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_I810=m
+CONFIG_DRM_I830=m
+CONFIG_DRM_I915=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_SYNCLINK_CS=m
+CONFIG_MWAVE=m
+# CONFIG_SCx200_GPIO is not set
+CONFIG_RAW_DRIVER=m
+CONFIG_HPET=y
+# CONFIG_HPET_RTC_IRQ is not set
+CONFIG_HPET_MMAP=y
+CONFIG_MAX_RAW_DEVS=1024
+CONFIG_HANGCHECK_TIMER=m
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI1563=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_ELEKTOR=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_I810=m
+CONFIG_I2C_ISA=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_PARPORT=m
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PIIX4=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+CONFIG_I2C_VOODOO3=m
+CONFIG_I2C_PCA_ISA=m
+
+#
+# Hardware Sensors Chip support
+#
+CONFIG_I2C_SENSOR=m
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+CONFIG_SENSORS_ADM1031=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM77=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+CONFIG_SENSORS_SMSC47M1=m
+CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+
+#
+# Other I2C Chip support
+#
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_RTC8564=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=m
+CONFIG_W1_MATROX=m
+CONFIG_W1_DS9490=m
+CONFIG_W1_DS9490R_BRIDGE=m
+CONFIG_W1_THERM=m
+CONFIG_W1_SMEM=m
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+
+#
+# Video For Linux
+#
+
+#
+# Video Adapters
+#
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_PMS=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+CONFIG_VIDEO_ZORAN=m
+CONFIG_VIDEO_ZORAN_BUZ=m
+CONFIG_VIDEO_ZORAN_DC10=m
+CONFIG_VIDEO_ZORAN_DC30=m
+CONFIG_VIDEO_ZORAN_LML33=m
+CONFIG_VIDEO_ZORAN_LML33R10=m
+# CONFIG_VIDEO_MEYE is not set
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+CONFIG_VIDEO_HEXIUM_ORION=m
+CONFIG_VIDEO_HEXIUM_GEMINI=m
+CONFIG_VIDEO_CX88=m
+CONFIG_VIDEO_OVCAMCHIP=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_CADET=m
+CONFIG_RADIO_RTRACK=m
+CONFIG_RADIO_RTRACK2=m
+CONFIG_RADIO_AZTECH=m
+CONFIG_RADIO_GEMTEK=m
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+CONFIG_RADIO_MIROPCM20=m
+CONFIG_RADIO_MIROPCM20_RDS=m
+CONFIG_RADIO_SF16FMI=m
+CONFIG_RADIO_SF16FMR2=m
+CONFIG_RADIO_TERRATEC=m
+CONFIG_RADIO_TRUST=m
+CONFIG_RADIO_TYPHOON=m
+CONFIG_RADIO_TYPHOON_PROC_FS=y
+CONFIG_RADIO_ZOLTRIX=m
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_TWINHAN_DST=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_VES1X93=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_NXT6000=m
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+# CONFIG_DVB_AV7110_FIRMWARE is not set
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR=m
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_CIRRUS=m
+CONFIG_FB_PM2=m
+# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
+CONFIG_FB_CYBER2000=m
+CONFIG_FB_ASILIANT=y
+# CONFIG_FB_IMSTT is not set
+CONFIG_FB_VGA16=m
+CONFIG_FB_VESA=y
+CONFIG_VIDEO_SELECT=y
+CONFIG_FB_HGA=m
+# CONFIG_FB_HGA_ACCEL is not set
+CONFIG_FB_RIVA=m
+CONFIG_FB_RIVA_I2C=y
+# CONFIG_FB_RIVA_DEBUG is not set
+CONFIG_FB_I810=m
+CONFIG_FB_I810_GTF=y
+CONFIG_FB_MATROX=m
+CONFIG_FB_MATROX_MILLENIUM=y
+CONFIG_FB_MATROX_MYSTIQUE=y
+CONFIG_FB_MATROX_G450=y
+CONFIG_FB_MATROX_G100=y
+CONFIG_FB_MATROX_I2C=m
+CONFIG_FB_MATROX_MAVEN=m
+CONFIG_FB_MATROX_MULTIHEAD=y
+CONFIG_FB_RADEON_OLD=m
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=m
+CONFIG_FB_ATY=m
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
+# CONFIG_FB_ATY_XL_INIT is not set
+CONFIG_FB_SIS=m
+CONFIG_FB_SIS_300=y
+CONFIG_FB_SIS_315=y
+CONFIG_FB_NEOMAGIC=m
+CONFIG_FB_KYRO=m
+CONFIG_FB_3DFX=m
+# CONFIG_FB_3DFX_ACCEL is not set
+CONFIG_FB_VOODOO1=m
+CONFIG_FB_TRIDENT=m
+CONFIG_FB_TRIDENT_ACCEL=y
+CONFIG_FB_VIRTUAL=m
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_MDA_CONSOLE=m
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_FB_SPLASH=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_RTCTIMER=m
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_MPU401_UART=m
+CONFIG_SND_OPL3_LIB=m
+CONFIG_SND_OPL4_LIB=m
+CONFIG_SND_VX_LIB=m
+# CONFIG_SND_DUMMY is not set
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# ISA devices
+#
+CONFIG_SND_AD1816A=m
+CONFIG_SND_AD1848=m
+CONFIG_SND_CS4231=m
+CONFIG_SND_CS4232=m
+CONFIG_SND_CS4236=m
+CONFIG_SND_ES968=m
+CONFIG_SND_ES1688=m
+CONFIG_SND_ES18XX=m
+CONFIG_SND_GUS_SYNTH=m
+CONFIG_SND_GUSCLASSIC=m
+CONFIG_SND_GUSEXTREME=m
+CONFIG_SND_GUSMAX=m
+CONFIG_SND_INTERWAVE=m
+CONFIG_SND_INTERWAVE_STB=m
+CONFIG_SND_OPTI92X_AD1848=m
+CONFIG_SND_OPTI92X_CS4231=m
+CONFIG_SND_OPTI93X=m
+CONFIG_SND_SB8=m
+CONFIG_SND_SB16=m
+CONFIG_SND_SBAWE=m
+CONFIG_SND_SB16_CSP=y
+CONFIG_SND_WAVEFRONT=m
+CONFIG_SND_ALS100=m
+CONFIG_SND_AZT2320=m
+CONFIG_SND_CMI8330=m
+CONFIG_SND_DT019X=m
+CONFIG_SND_OPL3SA2=m
+CONFIG_SND_SGALAXY=m
+CONFIG_SND_SSCAPE=m
+
+#
+# PCI devices
+#
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_ATIIXP_MODEM=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+CONFIG_SND_CS46XX=m
+CONFIG_SND_CS46XX_NEW_DSP=y
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VX222=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_USB_USX2Y=m
+
+#
+# PCMCIA devices
+#
+CONFIG_SND_VXPOCKET=m
+CONFIG_SND_VXP440=m
+CONFIG_SND_PDAUDIOCF=m
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+CONFIG_SOUND_BT878=m
+CONFIG_SOUND_CMPCI=m
+CONFIG_SOUND_CMPCI_FM=y
+CONFIG_SOUND_CMPCI_MIDI=y
+CONFIG_SOUND_CMPCI_JOYSTICK=y
+CONFIG_SOUND_EMU10K1=m
+CONFIG_MIDI_EMU10K1=y
+CONFIG_SOUND_FUSION=m
+CONFIG_SOUND_CS4281=m
+CONFIG_SOUND_ES1370=m
+CONFIG_SOUND_ES1371=m
+CONFIG_SOUND_ESSSOLO1=m
+CONFIG_SOUND_MAESTRO=m
+CONFIG_SOUND_MAESTRO3=m
+CONFIG_SOUND_ICH=m
+CONFIG_SOUND_SONICVIBES=m
+CONFIG_SOUND_TRIDENT=m
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_VIA82CXXX=m
+CONFIG_MIDI_VIA82CXXX=y
+CONFIG_SOUND_OSS=m
+# CONFIG_SOUND_TRACEINIT is not set
+# CONFIG_SOUND_DMAP is not set
+CONFIG_SOUND_AD1816=m
+CONFIG_SOUND_AD1889=m
+CONFIG_SOUND_SGALAXY=m
+CONFIG_SOUND_ADLIB=m
+CONFIG_SOUND_ACI_MIXER=m
+CONFIG_SOUND_CS4232=m
+CONFIG_SOUND_SSCAPE=m
+CONFIG_SOUND_GUS=m
+CONFIG_SOUND_GUS16=y
+CONFIG_SOUND_GUSMAX=y
+CONFIG_SOUND_VMIDI=m
+CONFIG_SOUND_TRIX=m
+CONFIG_SOUND_MSS=m
+CONFIG_SOUND_MPU401=m
+CONFIG_SOUND_NM256=m
+CONFIG_SOUND_MAD16=m
+CONFIG_MAD16_OLDCARD=y
+CONFIG_SOUND_PAS=m
+CONFIG_SOUND_PSS=m
+CONFIG_PSS_MIXER=y
+# CONFIG_PSS_HAVE_BOOT is not set
+CONFIG_SOUND_SB=m
+CONFIG_SOUND_AWE32_SYNTH=m
+CONFIG_SOUND_WAVEFRONT=m
+CONFIG_SOUND_MAUI=m
+CONFIG_SOUND_YM3812=m
+CONFIG_SOUND_OPL3SA1=m
+CONFIG_SOUND_OPL3SA2=m
+CONFIG_SOUND_YMFPCI=m
+CONFIG_SOUND_YMFPCI_LEGACY=y
+CONFIG_SOUND_UART6850=m
+CONFIG_SOUND_AEDSP16=m
+CONFIG_SC6600=y
+CONFIG_SC6600_JOY=y
+CONFIG_SC6600_CDROM=4
+CONFIG_SC6600_CDROMBASE=0
+# CONFIG_AEDSP16_MSS is not set
+CONFIG_AEDSP16_SBPRO=y
+CONFIG_AEDSP16_MPU401=y
+CONFIG_SOUND_TVMIXER=m
+CONFIG_SOUND_KAHLUA=m
+CONFIG_SOUND_ALI5455=m
+CONFIG_SOUND_FORTE=m
+CONFIG_SOUND_RME96XX=m
+CONFIG_SOUND_AD1980=m
 
 #
-# Watchdog Cards
+# USB support
 #
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_PCWATCHDOG=m
-CONFIG_I810_TCO=m
-CONFIG_MIXCOMWD=m
-CONFIG_60XX_WDT=m
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_WDT=m
-CONFIG_WDT_501=y
-CONFIG_WDT_501_FAN=y
-CONFIG_WDTPCI=m
-CONFIG_MACHZ_WDT=m
-CONFIG_NVRAM=m
-CONFIG_RTC=y
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
 
 #
-# I2C support
+# Miscellaneous USB options
 #
-CONFIG_I2C=m
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_BITLP=m
-CONFIG_I2C_BITELV=m
-CONFIG_I2C_BITVELLE=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_PCFISA=m
-CONFIG_I2C_CHARDEV=m
-CONFIG_I2C_PROC=m
-# CONFIG_INTEL_RNG is not set
-CONFIG_AGP=m
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_I810=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_SWORKS=y
-CONFIG_DRM=m
-CONFIG_DRM_TDFX=m
-CONFIG_DRM_GAMMA=m
-CONFIG_DRM_R128=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_MGA=m
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+CONFIG_USB_DYNAMIC_MINORS=y
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
 
 #
-# Video For Linux
+# USB Host Controller Drivers
 #
-CONFIG_VIDEO_DEV=m
-CONFIG_RADIO_RTRACK=m
-CONFIG_RADIO_RTRACK2=m
-CONFIG_RADIO_AZTECH=m
-CONFIG_RADIO_CADET=m
-CONFIG_RADIO_GEMTEK=m
-CONFIG_RADIO_MAESTRO=m
-CONFIG_RADIO_MIROPCM20=m
-CONFIG_RADIO_TRUST=m
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_PMS=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_RADIO_SF16FMI=m
-CONFIG_RADIO_TYPHOON=m
-CONFIG_RADIO_TYPHOON_PROC_FS=y
-CONFIG_RADIO_ZOLTRIX=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_BUZ=m
-CONFIG_DTLK=m
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_UHCI_HCD=m
 
 #
-# Ftape, the floppy tape device driver
+# USB Device Class drivers
 #
-CONFIG_FTAPE=m
-CONFIG_ZFTAPE=m
-CONFIG_ZFT_DFLT_BLK_SZ=10240
-CONFIG_ZFT_COMPRESSOR=m
-CONFIG_FT_NR_BUFFERS=3
-# CONFIG_FT_PROC_FS is not set
-CONFIG_FT_NORMAL_DEBUG=y
-# CONFIG_FT_FULL_DEBUG is not set
-# CONFIG_FT_NO_TRACE is not set
-# CONFIG_FT_NO_TRACE_AT_ALL is not set
-CONFIG_FT_STD_FDC=y
-# CONFIG_FT_MACH2 is not set
-# CONFIG_FT_PROBE_FC10 is not set
-# CONFIG_FT_ALT_FDC is not set
-CONFIG_FT_FDC_THR=8
-CONFIG_FT_FDC_MAX_RATE=2000
-CONFIG_FT_ALPHA_CLOCK=0
+CONFIG_USB_AUDIO=m
 
 #
-# USB support
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
 #
-CONFIG_USB=m
-CONFIG_USB_DEBUG=y
-CONFIG_USB_DEVICEFS=y
-CONFIG_HOTPLUG=y
-CONFIG_USB_BANDWIDTH=y
-CONFIG_USB_UHCI=m
-CONFIG_USB_UHCI_ALT=m
-CONFIG_USB_OHCI=m
-CONFIG_USB_AUDIO=m
-CONFIG_USB_BLUETOOTH=m
-CONFIG_USB_STORAGE=m
-CONFIG_USB_STORAGE_DEBUG=y
+CONFIG_USB_MIDI=m
 CONFIG_USB_ACM=m
 CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+
+#
+# USB Human Interface Devices (HID)
+#
 CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
 CONFIG_USB_KBD=m
 CONFIG_USB_MOUSE=m
-CONFIG_INPUT_KEYBDEV=m
-CONFIG_INPUT_MOUSEDEV=m
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_USB_WMFORCE=m
+CONFIG_USB_AIPTEK=m
 CONFIG_USB_WACOM=m
-CONFIG_INPUT_EVDEV=m
-CONFIG_USB_DC2XX=m
+CONFIG_USB_KBTAB=m
+CONFIG_USB_POWERMATE=m
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_XPAD=m
+CONFIG_USB_ATI_REMOTE=m
+
+#
+# USB Imaging devices
+#
 CONFIG_USB_MDC800=m
-CONFIG_USB_SCANNER=m
 CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_DABUSB=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
 CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
 CONFIG_USB_OV511=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_DABUSB=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+CONFIG_USB_W9968CF=m
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_CATC=m
 CONFIG_USB_KAWETH=m
-CONFIG_USB_PLUSB=m
 CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_AX8817X=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
 
 #
 # USB Serial Converter support
@@ -1044,74 +2336,209 @@ CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
 CONFIG_USB_SERIAL_EMPEG=m
 CONFIG_USB_SERIAL_FTDI_SIO=m
 CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
 CONFIG_USB_SERIAL_IR=m
 CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
 CONFIG_USB_SERIAL_KEYSPAN_PDA=m
 CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
 CONFIG_USB_SERIAL_KEYSPAN_USA28=y
 CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
 CONFIG_USB_SERIAL_KEYSPAN_USA19=y
 CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
 CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
 CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
 CONFIG_USB_SERIAL_MCT_U232=m
 CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
 CONFIG_USB_SERIAL_CYBERJACK=m
 CONFIG_USB_SERIAL_XIRCOM=m
 CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_AUERSWALD=m
 CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_LED=m
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_TEST=m
 
 #
-# Filesystems
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_NET2280=m
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_SA1100 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_OMAP is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+
 #
-CONFIG_QUOTA=y
-CONFIG_AUTOFS_FS=m
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
-CONFIG_ADFS_FS=m
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_UMSDOS_FS=m
-CONFIG_VFAT_FS=m
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
 CONFIG_ISO9660_FS=m
 CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
 CONFIG_UDF_FS=m
-CONFIG_UDF_RW=y
-CONFIG_MINIX_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_UMSDOS_FS is not set
 CONFIG_NTFS_FS=m
-# CONFIG_NTFS_RW is not set
-CONFIG_HPFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
 CONFIG_PROC_FS=y
-CONFIG_DEVPTS_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+CONFIG_ADFS_FS_RW=y
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_JFFS_FS=m
+CONFIG_JFFS_FS_VERBOSE=0
+# CONFIG_JFFS_PROC_FS is not set
+CONFIG_JFFS2_FS=m
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_NAND=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
 CONFIG_QNX4FS_FS=m
 CONFIG_QNX4FS_RW=y
-CONFIG_ROMFS_FS=y
-CONFIG_EXT2_FS=m
 CONFIG_SYSV_FS=m
 CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-CONFIG_EFS_FS=m
-CONFIG_SGI_PARTITION=y
-CONFIG_JFS_FS=m
+CONFIG_UFS_FS_WRITE=y
 
 #
 # Network File Systems
 #
-CONFIG_CODA_FS=m
 CONFIG_NFS_FS=m
 CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
 CONFIG_NFSD_TCP=y
-CONFIG_SUNRPC=m
 CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_RPCSEC_GSS_SPKM3=m
 CONFIG_SMB_FS=m
 CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_SMB_NLS_REMOTE="iso8859-2"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
 CONFIG_NCP_FS=m
 CONFIG_NCPFS_PACKET_SIGNING=y
 CONFIG_NCPFS_IOCTL_LOCKING=y
@@ -1119,26 +2546,29 @@ CONFIG_NCPFS_STRONG=y
 CONFIG_NCPFS_NFS_NS=y
 CONFIG_NCPFS_OS2_NS=y
 CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_MOUNT_SUBDIR=y
 CONFIG_NCPFS_NLS=y
 CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_AFS_FS=m
+CONFIG_RXRPC=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
 
 #
 # Partition Types
 #
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SMD_DISKLABEL=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_AMIGA_PARTITION=y
-CONFIG_NLS=y
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
 
 #
 # Native Language Support
 #
-CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-2"
 CONFIG_NLS_CODEPAGE_437=m
 CONFIG_NLS_CODEPAGE_737=m
 CONFIG_NLS_CODEPAGE_775=m
@@ -1154,11 +2584,15 @@ CONFIG_NLS_CODEPAGE_864=m
 CONFIG_NLS_CODEPAGE_865=m
 CONFIG_NLS_CODEPAGE_866=m
 CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_CODEPAGE_932=m
 CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_949=m
 CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_2=m
 CONFIG_NLS_ISO8859_3=m
@@ -1166,149 +2600,97 @@ CONFIG_NLS_ISO8859_4=m
 CONFIG_NLS_ISO8859_5=m
 CONFIG_NLS_ISO8859_6=m
 CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_8=m
 CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
 CONFIG_NLS_ISO8859_14=m
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_RU=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
 
 #
-# Console drivers
+# Profiling support
 #
-CONFIG_VGA_CONSOLE=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FB_PM2=m
-CONFIG_FB_ATY=m
-CONFIG_FB_VESA=y
-# CONFIG_FB_VGA16 is not set
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_MULTIHEAD=y
-CONFIG_FB_ATY128=m
-# CONFIG_FB_VIRTUAL is not set
-CONFIG_FBCON_ADVANCED=y
-CONFIG_FBCON_MFB=y
-CONFIG_FBCON_CFB2=y
-CONFIG_FBCON_CFB4=y
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-# CONFIG_FBCON_AFB is not set
-# CONFIG_FBCON_ILBM is not set
-# CONFIG_FBCON_IPLAN2P2 is not set
-# CONFIG_FBCON_IPLAN2P4 is not set
-# CONFIG_FBCON_IPLAN2P8 is not set
-# CONFIG_FBCON_MAC is not set
-# CONFIG_FBCON_VGA_PLANES is not set
-CONFIG_FBCON_VGA=m
-# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
-CONFIG_FBCON_FONTS=y
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-# CONFIG_FONT_SUN8x16 is not set
-# CONFIG_FONT_SUN12x22 is not set
-# CONFIG_FONT_6x11 is not set
-# CONFIG_FONT_PEARL_8x8 is not set
-# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
 
 #
-# Sound
+# Kernel hacking
 #
-CONFIG_SOUND=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_FUSION=m
-CONFIG_SOUND_EMU10K1=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-CONFIG_SOUND_MSNDCLAS=m
-# CONFIG_MSNDCLAS_HAVE_BOOT is not set
-CONFIG_MSNDCLAS_INIT_FILE="/etc/sound/msndinit.bin"
-CONFIG_MSNDCLAS_PERM_FILE="/etc/sound/msndperm.bin"
-CONFIG_SOUND_MSNDPIN=m
-# CONFIG_MSNDPIN_HAVE_BOOT is not set
-CONFIG_MSNDPIN_INIT_FILE="/etc/sound/pndspini.bin"
-CONFIG_MSNDPIN_PERM_FILE="/etc/sound/pndsperm.bin"
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_SB=m
-CONFIG_SOUND_GUS=m
-CONFIG_GUS16=y
-CONFIG_GUSMAX=y
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_PSS=m
-# CONFIG_PSS_MIXER is not set
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_AD1816=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_SOFTOSS=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_HIGHMEM is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_FRAME_POINTER is not set
+CONFIG_EARLY_PRINTK=y
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_4KSTACKS is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_KPROBES is not set
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
 
 #
-# Additional low level sound drivers
+# Security options
 #
-CONFIG_LOWLEVEL_SOUND=y
-CONFIG_ACI_MIXER=m
-CONFIG_VIDEO_MSP3400=m
-CONFIG_AWE32_SYNTH=m
-CONFIG_AEDSP16=m
-CONFIG_AEDSP16_BASE=220
-CONFIG_MPU_BASE=330
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0
-CONFIG_AEDSP16_SBPRO=y
-CONFIG_AEDSP16_BASE=220
-CONFIG_AEDSP16_SB_IRQ=5
-CONFIG_AEDSP16_SB_DMA=0
-CONFIG_AEDSP16_MPU401=y
-CONFIG_AEDSP16_MPU_IRQ=5
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
 
 #
-# Security options
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WHIRLPOOL=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES_586=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Library routines
 #
-CONFIG_SECURE_STACK=y
-CONFIG_SECURE_STACK_SMART=y
-CONFIG_SECURE_LINK=y
-CONFIG_SECURE_FIFO=y
-CONFIG_SECURE_PROC=y
-CONFIG_SECURE_FD_0_1_2=y
-CONFIG_SECURE_RLIMIT_NPROC=y
-# CONFIG_SECURE_SHM is not set
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_LIBCRC32C=m
+CONFIG_QSORT=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
 
 #
-# Kernel hacking
+# Cluster Support
 #
-CONFIG_MAGIC_SYSRQ=y
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_PC=y
index baa1df68da70fb549c76118dfb2c5af3ae86a555..0dc9afaf0cd13770152c744343ec4a63c076a69c 100644 (file)
@@ -262,11 +262,11 @@ CONFIG_PARPORT=m
 CONFIG_PARPORT_PC=m
 CONFIG_PARPORT_PC_CML1=m
 CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
+# CONFIG_PARPORT_PC_FIFO is not set
 CONFIG_PARPORT_PC_SUPERIO=y
 CONFIG_PARPORT_PC_PCMCIA=m
 # CONFIG_PARPORT_OTHER is not set
-CONFIG_PARPORT_1284=y
+# CONFIG_PARPORT_1284 is not set
 
 #
 # Plug and Play support
@@ -448,14 +448,10 @@ CONFIG_SCSI_SATA_SIL=m
 CONFIG_SCSI_SATA_SIS=m
 CONFIG_SCSI_SATA_VIA=m
 CONFIG_SCSI_SATA_VITESSE=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
+# CONFIG_SCSI_BUSLOGIC is not set
 CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_EATA_PIO=m
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_PIO is not set
 CONFIG_SCSI_FUTURE_DOMAIN=m
 CONFIG_SCSI_GDTH=m
 CONFIG_SCSI_IPS=m
@@ -1175,7 +1171,7 @@ CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_ROCKETPORT=m
 CONFIG_CYCLADES=m
 # CONFIG_CYZ_INTR is not set
-CONFIG_SYNCLINK=m
+# CONFIG_SYNCLINK is not set
 CONFIG_SYNCLINKMP=m
 CONFIG_N_HDLC=m
 CONFIG_STALDRV=y
@@ -1209,6 +1205,7 @@ CONFIG_LEGACY_PTYS=y
 #
 CONFIG_LIRC_SUPPORT=m
 CONFIG_LIRC_MAX_DEV=4
+CONFIG_LIRC_IRCTL_DEV_MAJOR=61
 CONFIG_LIRC_I2C=m
 CONFIG_LIRC_GPIO=m
 CONFIG_LIRC_BT829=m
@@ -1406,9 +1403,7 @@ CONFIG_VIDEO_DEV=m
 CONFIG_VIDEO_BT848=m
 CONFIG_VIDEO_BWQCAM=m
 CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
 CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
 CONFIG_VIDEO_CPIA_USB=m
 CONFIG_VIDEO_SAA5246A=m
 CONFIG_VIDEO_SAA5249=m
@@ -1646,9 +1641,8 @@ CONFIG_SND_USB_USX2Y=m
 #
 CONFIG_SOUND_PRIME=m
 CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
+# CONFIG_SOUND_CMPCI is not set
+# CONFIG_SOUND_EMU10K1 is not set
 CONFIG_SOUND_FUSION=m
 CONFIG_SOUND_CS4281=m
 CONFIG_SOUND_ES1370=m
@@ -1661,52 +1655,9 @@ CONFIG_SOUND_SONICVIBES=m
 CONFIG_SOUND_TRIDENT=m
 # CONFIG_SOUND_MSNDCLAS is not set
 # CONFIG_SOUND_MSNDPIN is not set
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-# CONFIG_SOUND_TRACEINIT is not set
-# CONFIG_SOUND_DMAP is not set
-CONFIG_SOUND_AD1816=m
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_ADLIB=m
-CONFIG_SOUND_ACI_MIXER=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_GUS=m
-CONFIG_SOUND_GUS16=y
-CONFIG_SOUND_GUSMAX=y
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_PSS=m
-CONFIG_PSS_MIXER=y
-# CONFIG_PSS_HAVE_BOOT is not set
-CONFIG_SOUND_SB=m
-CONFIG_SOUND_AWE32_SYNTH=m
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_AEDSP16=m
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0x0
-# CONFIG_AEDSP16_MSS is not set
-CONFIG_AEDSP16_SBPRO=y
-CONFIG_AEDSP16_MPU401=y
+# CONFIG_SOUND_VIA82CXXX is not set
+# CONFIG_SOUND_OSS is not set
 CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_KAHLUA=m
 CONFIG_SOUND_ALI5455=m
 CONFIG_SOUND_FORTE=m
 CONFIG_SOUND_RME96XX=m
index a3ac41d1433305506e59746b39a4a1a2a6c714a2..7fe922180a77550e2be1fc7a88f79dc249536da3 100644 (file)
@@ -1,9 +1,73 @@
 #
-# Netfilter IPv4
-# from patch-o-matic-ng modules
+# IP: Netfilter Configuration
 #
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+CONFIG_IP_NF_TFTP=m
+CONFIG_IP_NF_AMANDA=m
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_LAYER7=m
+# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set
+CONFIG_IP_NF_MATCH_LAYER7_MAXDATALEN=2048
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ACCOUNT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_UNCLEAN=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+# CONFIG_IP_NF_MATCH_STEALTH is not set
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_PHYSDEV=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_IP_NF_NAT_LOCAL=y
+CONFIG_IP_NF_NAT_SNMP_BASIC=m
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+CONFIG_IP_NF_NAT_TFTP=m
+CONFIG_IP_NF_NAT_AMANDA=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_DSCP=m
+CONFIG_IP_NF_TARGET_MARK=m
+CONFIG_IP_NF_TARGET_CLASSIFY=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_IMQ=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+CONFIG_IP_NF_COMPAT_IPCHAINS=m
+CONFIG_IP_NF_COMPAT_IPFWADM=m
+CONFIG_IP_NF_TARGET_NOTRACK=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_MATCH_REALM=m
+# CONFIG_IP_NF_CT_ACCT is not set
 CONFIG_IP_NF_TARGET_IPV4OPTSSTRIP=m
-CONFIG_IP_NF_TARGET_NETLINK=m
 CONFIG_IP_NF_TARGET_TTL=m
 CONFIG_IP_NF_MATCH_CONNLIMIT=m
 CONFIG_IP_NF_MATCH_DSTLIMIT=m
@@ -11,73 +75,77 @@ CONFIG_IP_NF_MATCH_FUZZY=m
 CONFIG_IP_NF_MATCH_IPV4OPTIONS=m
 CONFIG_IP_NF_MATCH_MPORT=m
 CONFIG_IP_NF_MATCH_NTH=m
-CONFIG_IP_NF_MATCH_OSF=m
-CONFIG_IP_POOL_STATISTICS=y
-CONFIG_IP_NF_POOL=m
 CONFIG_IP_NF_MATCH_PSD=m
 CONFIG_IP_NF_MATCH_QUOTA=m
-CONFIG_IP_NF_MATCH_ACCOUNT=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_MATCH_RANDOM=m
-CONFIG_IP_NF_MATCH_REALM=m
 CONFIG_IP_NF_MATCH_SCTP=m
 CONFIG_IP_NF_MATCH_TIME=m
-CONFIG_IP_NF_MATCH_U32=m
-CONFIG_IP_NF_SET=m
-CONFIG_IP_NF_SET_MAX=256
-CONFIG_IP_NF_SET_IPMAP=m
-CONFIG_IP_NF_SET_PORTMAP=m
-CONFIG_IP_NF_SET_MACIPMAP=m
-CONFIG_IP_NF_SET_IPHASH=m
-CONFIG_IP_NF_TARGET_IMQ=m
-CONFIG_NET_SCH_ESFQ=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_IMQ=m
 CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_MATCH_CONNMARK=m
 CONFIG_IP_NF_TARGET_CONNMARK=m
+CONFIG_IP_NF_MATCH_CONNMARK=m
 CONFIG_IP_NF_TARGET_IPMARK=m
 CONFIG_IP_NF_TARGET_ROUTE=m
 CONFIG_IP_NF_TARGET_TARPIT=m
-CONFIG_IP_NF_TARGET_TRACE=m
-CONFIG_IP_NF_TARGET_TCPLAG=m
 CONFIG_IP_NF_TARGET_XOR=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_CONDITION=m
-CONFIG_IP_NF_CUSEEME=m
-CONFIG_IP_NF_EGG=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_MMS=m
 CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_QUAKE3=m
-CONFIG_IP_NF_MATCH_RPC=m
-CONFIG_IP_NF_RSH=m
 CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_RTSP=m
 CONFIG_IP_NF_MATCH_STRING=m
-CONFIG_IP_NF_TALK=m
-CONFIG_IP_NF_MATCH_UNCLEAN=m
-CONFIG_NET_SCH_WRR=m
 
 #
-# Netfilter IPv6
-# from patch-o-matic-ng modules
+# IPv6: Netfilter Configuration
 #
-CONFIG_IP6_NF_MATCH_HOPLIMIT=m
+CONFIG_IP6_NF_QUEUE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_LIMIT=m
+CONFIG_IP6_NF_MATCH_MAC=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_MULTIPORT=m
+CONFIG_IP6_NF_MATCH_OWNER=m
+CONFIG_IP6_NF_MATCH_MARK=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_AHESP=m
+CONFIG_IP6_NF_MATCH_LENGTH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_MARK=m
+CONFIG_IP6_NF_RAW=m
 CONFIG_IP6_NF_TARGET_HL=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MATCH_FUZZY=m
 CONFIG_IP6_NF_MATCH_NTH=m
-CONFIG_IP6_NF_RAW=m
 CONFIG_IP6_NF_TARGET_ROUTE=m
-CONFIG_IP6_NF_MATCH_CONDITION=m
-CONFIG_IP6_NF_MATCH_RANDOM=m
-CONFIG_IP6_NF_TARGET_TRACE=m
 CONFIG_IP6_NF_MATCH_POLICY=m
 
 #
+# DECnet: Netfilter Configuration
 #
-CONFIG_IP_NF_MATCH_LAYER7=m
-# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set
-CONFIG_IP_NF_MATCH_LAYER7_MAXDATALEN=2048
+# CONFIG_DECNET_NF_GRABULATOR is not set
+
+#
+# Bridge: Netfilter Configuration
+#
+CONFIG_BRIDGE_NF_EBTABLES=m
+CONFIG_BRIDGE_EBT_BROUTE=m
+CONFIG_BRIDGE_EBT_T_FILTER=m
+CONFIG_BRIDGE_EBT_T_NAT=m
+CONFIG_BRIDGE_EBT_802_3=m
+CONFIG_BRIDGE_EBT_AMONG=m
+CONFIG_BRIDGE_EBT_ARP=m
+CONFIG_BRIDGE_EBT_IP=m
+CONFIG_BRIDGE_EBT_LIMIT=m
+CONFIG_BRIDGE_EBT_MARK=m
+CONFIG_BRIDGE_EBT_PKTTYPE=m
+CONFIG_BRIDGE_EBT_STP=m
+CONFIG_BRIDGE_EBT_VLAN=m
+CONFIG_BRIDGE_EBT_ARPREPLY=m
+CONFIG_BRIDGE_EBT_DNAT=m
+CONFIG_BRIDGE_EBT_MARK_T=m
+CONFIG_BRIDGE_EBT_REDIRECT=m
+CONFIG_BRIDGE_EBT_SNAT=m
+CONFIG_BRIDGE_EBT_LOG=m
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
diff --git a/kernel-ppc-smp.config b/kernel-ppc-smp.config
new file mode 100644 (file)
index 0000000..6ca3703
--- /dev/null
@@ -0,0 +1,2281 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_MMU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_BROKEN is not set
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_6xx=y
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_PM=y
+# CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_MULTIPLATFORM=y
+# CONFIG_APUS is not set
+# CONFIG_WILLOW_2 is not set
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
+# CONFIG_GEMINI is not set
+CONFIG_PPC_CHRP=y
+CONFIG_PPC_PMAC=y
+CONFIG_PPC_PREP=y
+CONFIG_PPC_OF=y
+CONFIG_SMP=y
+# CONFIG_PREEMPT is not set
+CONFIG_ALTIVEC=y
+CONFIG_TAU=y
+# CONFIG_TAU_INT is not set
+# CONFIG_TAU_AVERAGE is not set
+
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_PROC_INTF=y
+CONFIG_CPU_FREQ_24_API=y
+CONFIG_CPU_FREQ_PMAC=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+
+#
+# General setup
+#
+CONFIG_HIGHMEM=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_KCORE_ELF=y
+CONFIG_KERNEL_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+CONFIG_HOTPLUG=y
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_YENTA=m
+CONFIG_PD6729=m
+CONFIG_CARDBUS=y
+CONFIG_I82092=m
+CONFIG_TCIC=m
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_CML1=m
+CONFIG_PARPORT_SERIAL=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_PC_PCMCIA=m
+CONFIG_PARPORT_OTHER=y
+CONFIG_PARPORT_1284=y
+# CONFIG_PPC601_SYNC_FIX is not set
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_PPC_RTAS is not set
+# CONFIG_PREP_RESIDUAL is not set
+CONFIG_PPCBUG_NVRAM=y
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Generic Driver Options
+#
+CONFIG_FW_LOADER=m
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_REDBOOT_PARTS=n
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=n
+CONFIG_MTD_REDBOOT_READONLY=n
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_CFI_AMDSTD_RETRY=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+CONFIG_MTD_PHRAM=m
+CONFIG_MTD_DOCPROBE_ADVANCED=n
+CONFIG_MTD_NAND_DISKONCHIP=n
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+CONFIG_INFTL=m
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_CFI_INTELEXT=m
+CONFIG_MTD_CFI_AMDSTD=m
+CONFIG_MTD_CFI_STAA=m
+CONFIG_MTD_RAM=m
+CONFIG_MTD_ROM=m
+CONFIG_MTD_ABSENT=m
+CONFIG_MTD_OBSOLETE_CHIPS=y
+CONFIG_MTD_AMDSTD=m
+CONFIG_MTD_SHARP=m
+CONFIG_MTD_JEDEC=m
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=m
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x4000000
+CONFIG_MTD_PHYSMAP_BUSWIDTH=2
+CONFIG_MTD_PCI=m
+CONFIG_MTD_PCMCIA=m
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_PMC551=m
+CONFIG_MTD_PMC551_BUGFIX=y
+# CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_SLRAM=m
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+# CONFIG_MTD_BLKMTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+CONFIG_MTD_DOC2001PLUS=m
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+CONFIG_MTD_NAND_IDS=m
+
+#
+# Plug and Play support
+#
+CONFIG_PNP=y
+CONFIG_PNP_NAMES=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+CONFIG_ISAPNP=y
+# CONFIG_PNPBIOS is not set
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=m
+CONFIG_PARIDE=m
+CONFIG_PARIDE_PARPORT=m
+
+#
+# Parallel IDE high-level drivers
+#
+CONFIG_PARIDE_PD=m
+CONFIG_PARIDE_PCD=m
+CONFIG_PARIDE_PF=m
+CONFIG_PARIDE_PT=m
+CONFIG_PARIDE_PG=m
+
+#
+# Parallel IDE protocol modules
+#
+CONFIG_PARIDE_ATEN=m
+CONFIG_PARIDE_BPCK=m
+# CONFIG_PARIDE_BPCK6 is not set
+CONFIG_PARIDE_COMM=m
+CONFIG_PARIDE_DSTR=m
+CONFIG_PARIDE_FIT2=m
+CONFIG_PARIDE_FIT3=m
+CONFIG_PARIDE_EPAT=m
+CONFIG_PARIDE_EPATC8=y
+CONFIG_PARIDE_EPIA=m
+CONFIG_PARIDE_FRIQ=m
+CONFIG_PARIDE_FRPW=m
+CONFIG_PARIDE_KBIC=m
+CONFIG_PARIDE_KTTI=m
+CONFIG_PARIDE_ON20=m
+CONFIG_PARIDE_ON26=m
+CONFIG_BLK_CPQ_DA=m
+CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_CARMEL=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_GNBD=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
+CONFIG_DM_IOCTL_V4=y
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
+CONFIG_BLK_DEV_IDECS=m
+CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDETAPE=m
+CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDESCSI=m
+CONFIG_IDE_TASK_IOCTL=y
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_BLK_DEV_IDEPNP=y
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_BLK_DEV_GENERIC=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+CONFIG_BLK_DEV_IDE_TCQ=y
+CONFIG_BLK_DEV_IDE_TCQ_DEFAULT=y
+CONFIG_BLK_DEV_IDE_TCQ_DEPTH=8
+CONFIG_BLK_DEV_OFFBOARD=y
+CONFIG_BLK_DEV_IDEDMA_FORCED=y
+CONFIG_IDEDMA_PCI_AUTO=y
+CONFIG_IDEDMA_ONLYDISK=y
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDEDMA_PCI_WIP=y
+CONFIG_IDEDMA_NEW_DRIVE_LISTINGS=y
+CONFIG_BLK_DEV_ADMA=y
+CONFIG_BLK_DEV_AEC62XX=m
+CONFIG_BLK_DEV_ALI15X3=m
+# CONFIG_WDC_ALI15X3 is not set
+CONFIG_BLK_DEV_AMD74XX=m
+CONFIG_BLK_DEV_CMD64X=m
+CONFIG_BLK_DEV_TRIFLEX=m
+CONFIG_BLK_DEV_CY82C693=m
+CONFIG_BLK_DEV_CS5520=m
+CONFIG_BLK_DEV_CS5530=m
+CONFIG_BLK_DEV_HPT34X=m
+CONFIG_HPT34X_AUTODMA=y
+CONFIG_BLK_DEV_HPT366=m
+CONFIG_BLK_DEV_SC1200=m
+CONFIG_BLK_DEV_PIIX=m
+CONFIG_BLK_DEV_NS87415=m
+CONFIG_BLK_DEV_OPTI621=m
+CONFIG_BLK_DEV_PDC202XX_OLD=m
+CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=m
+CONFIG_PDC202XX_FORCE=y
+CONFIG_BLK_DEV_SVWKS=m
+CONFIG_BLK_DEV_SIIMAGE=m
+CONFIG_BLK_DEV_SLC90E66=m
+CONFIG_BLK_DEV_TRM290=m
+CONFIG_BLK_DEV_VIA82CXXX=m
+CONFIG_BLK_DEV_SL82C105=m
+CONFIG_BLK_DEV_IDE_PMAC=y
+CONFIG_IDEDMA_AUTO=y
+CONFIG_IDEDMA_IVB=y
+CONFIG_BLK_DEV_PDC202XX=y
+CONFIG_BLK_DEV_IDE_MODES=y
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+CONFIG_CHR_DEV_SCH=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_REPORT_LUNS is not set
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_ACARD is not set
+CONFIG_SCSI_AACRAID=m
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
+CONFIG_AIC79XX_ENABLE_RD_STRM=y
+CONFIG_AIC79XX_DEBUG_ENABLE=y
+CONFIG_AIC79XX_DEBUG_MASK=0
+CONFIG_AIC79XX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_DPT_I2O=m
+CONFIG_SCSI_ADVANSYS=m
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_CPQFCTS is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+CONFIG_SCSI_PPA=m
+CONFIG_SCSI_IMM=m
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+CONFIG_SCSI_SYM53C8XX_IOMAPPED=y 
+# CONFIG_SCSI_SYM53C8XX is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_QLOGIC_FC is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA21XX is not set
+# CONFIG_SCSI_QLA22XX is not set
+# CONFIG_SCSI_QLA2300 is not set
+# CONFIG_SCSI_QLA2322 is not set
+# CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA6322 is not set
+CONFIG_SCSI_DC395x=m
+# CONFIG_SCSI_DC390T is not set
+CONFIG_SCSI_NSP32=m
+CONFIG_SCSI_DEBUG=m
+CONFIG_SCSI_MESH=m
+CONFIG_SCSI_MESH_SYNC_RATE=5
+CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
+CONFIG_SCSI_MAC53C94=m
+
+#
+# PCMCIA SCSI adapter support
+#
+CONFIG_PCMCIA_AHA152X=m
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_NINJA_SCSI=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+CONFIG_IEEE1394=m
+
+#
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+# CONFIG_IEEE1394_OUI_DB is not set
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
+
+#
+# Device Drivers
+#
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
+
+#
+# Protocol Drivers
+#
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_NAT=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+# CONFIG_IP_PNP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_NET_IPGRE_BROADCAST is not set
+CONFIG_IP_MROUTE=y
+# CONFIG_IP_PIMSM_V1 is not set
+# CONFIG_IP_PIMSM_V2 is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=m
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_ADLER32 is not set
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+CONFIG_SCTP_HMAC_NONE=y
+# CONFIG_SCTP_HMAC_SHA1 is not set
+# CONFIG_SCTP_HMAC_MD5 is not set
+# CONFIG_ATM is not set
+CONFIG_VLAN_8021Q=m
+# CONFIG_LLC is not set
+CONFIG_DECNET=m
+CONFIG_DECNET_SIOCGIFCONF=y
+CONFIG_DECNET_ROUTER=y
+CONFIG_DECNET_ROUTE_FWMARK=y
+
+CONFIG_BRIDGE=m
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+# CONFIG_ECONET_AUNUDP is not set
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+NET_SCH_CLK_JIFFIES=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_SCH_WRR=m
+CONFIG_NET_SCH_ESFQ=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+CONFIG_ARCNET=m
+CONFIG_ARCNET_1201=m
+CONFIG_ARCNET_1051=m
+CONFIG_ARCNET_RAW=m
+# CONFIG_ARCNET_COM90xx is not set
+CONFIG_ARCNET_COM90xxIO=m
+# CONFIG_ARCNET_RIM_I is not set
+CONFIG_ARCNET_COM20020=m
+CONFIG_ARCNET_COM20020_PCI=m
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_IMQ=m
+CONFIG_TUN=m
+CONFIG_ETHERTAP=m
+CONFIG_NET_SB1000=m
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_MACE=m
+# CONFIG_MACE_AAUI_PORT is not set
+CONFIG_BMAC=m
+# CONFIG_OAKNET is not set
+# CONFIG_HAPPYMEAL is not set
+CONFIG_SUNGEM=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_PCMCIA_XIRCOM=m
+CONFIG_PCMCIA_XIRTULIP=m
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+# CONFIG_AMD8111_ETH is not set
+CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
+CONFIG_B44=m
+CONFIG_DGRS=m
+CONFIG_EEPRO100=m
+CONFIG_EEPRO100_PIO=y
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+CONFIG_8139_RXBUF_IDX=3
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+CONFIG_8139_OLD_RX_RESET=y
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+# CONFIG_TLAN is not set
+CONFIG_VIA_RHINE=m
+# CONFIG_VIA_RHINE_MMIO is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_SIS190=m
+CONFIG_SK98LIN=m
+CONFIG_CONFIG_SK98LIN_T1=y
+CONFIG_CONFIG_SK98LIN_T2=y
+CONFIG_CONFIG_SK98LIN_T3=y
+CONFIG_CONFIG_SK98LIN_T4=y
+CONFIG_CONFIG_SK98LIN_T5=y
+CONFIG_CONFIG_SK98LIN_T6=y
+CONFIG_CONFIG_SK98LIN_T7=y
+CONFIG_CONFIG_SK98LIN_T8=y
+CONFIG_CONFIG_SK98LIN_T9=y
+CONFIG_SK98LIN=m
+CONFIG_TIGON3=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+CONFIG_PPPOE=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+# CONFIG_SLIP_SMART is not set
+# CONFIG_SLIP_MODE_SLIP6 is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+CONFIG_PCMCIA_RAYCS=m
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_APPLE_AIRPORT=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_NET_WIRELESS=y
+CONFIG_PRISM54=m
+
+#
+# Wan interfaces
+#
+CONFIG_WAN=y
+# CONFIG_COMX is not set
+CONFIG_DSCC4=m
+CONFIG_DSCC4_PCISYNC=y
+CONFIG_DSCC4_PCI_RST=y
+CONFIG_LANMEDIA=m
+CONFIG_SYNCLINK_SYNCPPP=m
+CONFIG_HDLC=m
+CONFIG_HDLC_RAW=y
+# CONFIG_HDLC_RAW_ETH is not set
+CONFIG_HDLC_CISCO=y
+CONFIG_HDLC_FR=y
+CONFIG_HDLC_PPP=y
+CONFIG_HDLC_X25=y
+CONFIG_PCI200SYN=m
+CONFIG_PC300=m
+CONFIG_PC300_MLPPP=y
+# CONFIG_FARSYNC is not set
+CONFIG_TAHOE9XX=m
+# CONFIG_HDLC_DEBUG_PKT is not set
+# CONFIG_HDLC_DEBUG_HARD_HEADER is not set
+# CONFIG_HDLC_DEBUG_ECN is not set
+# CONFIG_HDLC_DEBUG_RINGS is not set
+CONFIG_DLCI=m
+CONFIG_DLCI_COUNT=24
+CONFIG_DLCI_MAX=8
+CONFIG_WAN_ROUTER_DRIVERS=y
+# CONFIG_VENDOR_SANGOMA is not set
+CONFIG_CYCLADES_SYNC=m
+CONFIG_CYCLOMX_X25=y
+CONFIG_LAPBETHER=m
+CONFIG_X25_ASY=m
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_ARCNET_COM20020_CS=m
+CONFIG_PCMCIA_IBMTR=m
+
+#
+# Amateur Radio support
+#
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+CONFIG_AX25_DAMA_SLAVE=y
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_MKISS=m
+CONFIG_6PACK=m
+CONFIG_BPQETHER=m
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_BAYCOM_EPP=m
+# CONFIG_YAM is not set
+
+#
+# IrDA (infrared) support
+#
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+CONFIG_IRTTY_OLD=m
+CONFIG_IRPORT_SIR=m
+
+#
+# Old Serial dongle support
+#
+CONFIG_DONGLE_OLD=y
+CONFIG_ESI_DONGLE_OLD=m
+CONFIG_ACTISYS_DONGLE_OLD=m
+CONFIG_TEKRAM_DONGLE_OLD=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+CONFIG_MA600_DONGLE=m
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_TOSHIBA_OLD=m
+CONFIG_TOSHIBA_FIR=m
+# CONFIG_VLSI_FIR is not set
+CONFIG_VIA_FIR=m
+
+#
+# ISDN subsystem
+#
+CONFIG_ISDN_BOOL=y
+
+#
+# Old ISDN4Linux
+#
+# CONFIG_ISDN is not set
+
+#
+# CAPI subsystem
+#
+# CONFIG_ISDN_CAPI is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+CONFIG_FB_CYBER2000=m
+CONFIG_FB_OF=y
+# CONFIG_FB_CONTROL is not set
+# CONFIG_FB_PLATINUM is not set
+# CONFIG_FB_VALKYRIE is not set
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_S3TRIO is not set
+CONFIG_FB_VGA16=m
+CONFIG_FB_RIVA=m
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON_OLD is not set
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=y
+CONFIG_FB_ATY=y
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
+CONFIG_FB_ATY_XL_INIT=y
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_KYRO is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_6x11=y
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+# CONFIG_GAMEPORT_EMU10K1 is not set
+# CONFIG_GAMEPORT_VORTEX is not set
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+CONFIG_SERIO_PCIPS2=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=m
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+# CONFIG_JOYSTICK_GUILLEMOT is not set
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_USB=y
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+# CONFIG_JOYSTICK_TWIDDLER is not set
+CONFIG_JOYSTICK_DB9=m
+CONFIG_JOYSTICK_GAMECON=m
+CONFIG_JOYSTICK_TURBOGRAFX=m
+CONFIG_INPUT_JOYDUMP=m
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# Macintosh device drivers
+#
+CONFIG_ADB_CUDA=y
+CONFIG_ADB_PMU=y
+CONFIG_PMAC_PBOOK=y
+CONFIG_PMAC_APM_EMU=y
+CONFIG_PMAC_BACKLIGHT=y
+# CONFIG_MAC_FLOPPY is not set
+# CONFIG_MAC_SERIAL is not set
+CONFIG_ADB=y
+CONFIG_ADB_MACIO=y
+CONFIG_INPUT_ADBHID=y
+CONFIG_MAC_EMUMOUSEBTN=y
+# CONFIG_ANSLCD is not set
+CONFIG_THERM_WINDTUNNEL=m
+CONFIG_THERM_ADT746X=m
+CONFIG_THERM_ADT7467=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_CS=m
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+CONFIG_TIPAR=m
+
+# CONFIG_PHONE is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_PHILIPSPAR=m
+CONFIG_I2C_PARPORT=m
+# CONFIG_I2C_PARPORT_LIGHT is not set
+CONFIG_I2C_ELV=m
+CONFIG_I2C_HYDRA=m
+CONFIG_I2C_VELLEMAN=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ELEKTOR=m
+CONFIG_I2C_KEYWEST=m
+CONFIG_I2C_CHARDEV=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# I2C Hardware Sensors Mainboard support
+#
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_PIIX4=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIAPRO=m
+
+#
+# I2C Hardware Sensors Chip support
+#
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+CONFIG_SENSORS_ADM1031=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM77=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+CONFIG_I2C_SENSOR=m
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+
+#
+# Mice
+#
+CONFIG_BUSMOUSE=m
+# CONFIG_QIC02_TAPE is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_KCS=m
+CONFIG_IPMI_WATCHDOG=m
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_NVRAM=y
+CONFIG_GEN_RTC=m
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+CONFIG_AGP=m
+CONFIG_AGP_UNINORTH=m
+CONFIG_DRM=y
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_GAMMA=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_RADEON=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_SYNCLINK_CS=m
+CONFIG_RAW_DRIVER=m
+CONFIG_MAX_RAW_DEVS=1024
+CONFIG_HANGCHECK_TIMER=m
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+CONFIG_DVB_TWINHAN_DST=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_ALPS_BSRV2=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_VES1820=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_TTUSB_BUDGET=m
+# CONFIG_DVB_TTUSB_DEC is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+CONFIG_DVB_BT8XX=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+CONFIG_JFS_STATISTICS=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+CONFIG_XFS_RT=y
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_NTFS_FS=m
+CONFIG_NTFS_DEBUG=y
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+CONFIG_DEVPTS_FS_XATTR=y
+CONFIG_DEVPTS_FS_SECURITY=y
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+# CONFIG_ADFS_FS_RW is not set
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_QNX4FS_RW=y
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=n
+CONFIG_CIFS_XATTR=y
+CONFIG_NCP_FS=m
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+CONFIG_NCPFS_NFS_NS=y
+CONFIG_NCPFS_OS2_NS=y
+CONFIG_NCPFS_SMALLDOS=y
+CONFIG_NCPFS_NLS=y
+CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+# CONFIG_INTERMEZZO_FS is not set
+CONFIG_AFS_FS=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+CONFIG_RXRPC=m
+
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+CONFIG_AMIGA_PARTITION=y
+CONFIG_ATARI_PARTITION=y
+CONFIG_MAC_PARTITION=y
+CONFIG_MSDOS_PARTITION=y
+CONFIG_BSD_DISKLABEL=y
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_NEC98_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+CONFIG_SMB_NLS=y
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+CONFIG_DMASOUND_PMAC=m
+# CONFIG_DMASOUND_AWACS is not set
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_DUMMY=m
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# PCI devices
+#
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+# CONFIG_SND_CS46XX is not set
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+# CONFIG_SND_KORG1212 is not set
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+# CONFIG_SND_HDSP is not set
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VX222=m
+
+#
+# ALSA PowerMac devices
+#
+CONFIG_SND_POWERMAC=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+
+#
+# PCMCIA devices
+#
+CONFIG_SND_VXPOCKET=m
+CONFIG_SND_VXP440=m
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+CONFIG_SOUND_BT878=m
+CONFIG_SOUND_CMPCI=m
+CONFIG_SOUND_CMPCI_FM=y
+CONFIG_SOUND_CMPCI_FMIO=0x388
+CONFIG_SOUND_CMPCI_MIDI=y
+CONFIG_SOUND_CMPCI_MPUIO=0x330
+CONFIG_SOUND_CMPCI_JOYSTICK=y
+CONFIG_SOUND_CMPCI_CM8738=y
+# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
+# CONFIG_SOUND_CMPCI_SPDIFLOOP is not set
+CONFIG_SOUND_CMPCI_SPEAKERS=2
+CONFIG_SOUND_EMU10K1=m
+CONFIG_MIDI_EMU10K1=y
+CONFIG_SOUND_FUSION=m
+# CONFIG_SOUND_CS4281 is not set
+CONFIG_SOUND_ES1370=m
+CONFIG_SOUND_ES1371=m
+CONFIG_SOUND_ESSSOLO1=m
+CONFIG_SOUND_MAESTRO=m
+CONFIG_SOUND_MAESTRO3=m
+CONFIG_SOUND_ICH=m
+CONFIG_SOUND_RME96XX=m
+CONFIG_SOUND_SONICVIBES=m
+CONFIG_SOUND_TRIDENT=m
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_VIA82CXXX=m
+CONFIG_MIDI_VIA82CXXX=y
+CONFIG_SOUND_OSS=m
+CONFIG_SOUND_TRACEINIT=y
+# CONFIG_SOUND_DMAP is not set
+CONFIG_SOUND_AD1816=m
+CONFIG_SOUND_AD1889=m
+CONFIG_SOUND_SGALAXY=m
+CONFIG_SOUND_ADLIB=m
+CONFIG_SOUND_ACI_MIXER=m
+CONFIG_SOUND_CS4232=m
+CONFIG_SOUND_SSCAPE=m
+CONFIG_SOUND_GUS=m
+CONFIG_SOUND_GUS16=y
+CONFIG_SOUND_GUSMAX=y
+CONFIG_SOUND_VMIDI=m
+CONFIG_SOUND_TRIX=m
+CONFIG_SOUND_MSS=m
+CONFIG_SOUND_MPU401=m
+CONFIG_SOUND_NM256=m
+CONFIG_SOUND_MAD16=m
+CONFIG_MAD16_OLDCARD=y
+CONFIG_SOUND_PAS=m
+# CONFIG_SOUND_PSS is not set
+CONFIG_SOUND_SB=m
+# CONFIG_SOUND_AWE32_SYNTH is not set
+CONFIG_SOUND_WAVEFRONT=m
+CONFIG_SOUND_MAUI=m
+CONFIG_SOUND_YM3812=m
+CONFIG_SOUND_OPL3SA1=m
+CONFIG_SOUND_OPL3SA2=m
+CONFIG_SOUND_YMFPCI=m
+CONFIG_SOUND_YMFPCI_LEGACY=y
+CONFIG_SOUND_UART6850=m
+CONFIG_SOUND_AEDSP16=m
+CONFIG_SC6600=y
+CONFIG_SC6600_JOY=y
+CONFIG_SC6600_CDROM=4
+CONFIG_SC6600_CDROMBASE=0x0
+# CONFIG_AEDSP16_MSS is not set
+# CONFIG_AEDSP16_SBPRO is not set
+CONFIG_AEDSP16_MPU401=y
+CONFIG_SOUND_TVMIXER=m
+CONFIG_SOUND_KAHLUA=m
+CONFIG_SOUND_ALI5455=m
+CONFIG_SOUND_FORTE=m
+CONFIG_SOUND_AD1980=m
+CONFIG_SOUND_WM97XX=m
+
+#
+# USB support
+#
+CONFIG_USB=y
+CONFIG_USB_DEBUG=y
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_UHCI_HCD=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_AUDIO=m
+
+#
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+#
+CONFIG_USB_MIDI=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+
+#
+# USB Human Interface Devices (HID)
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=y
+CONFIG_USB_MOUSE=m
+CONFIG_USB_AIPTEK=m
+CONFIG_USB_WACOM=m
+CONFIG_USB_KBTAB=m
+CONFIG_USB_POWERMATE=m
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_XPAD=m
+CONFIG_USB_ATI_REMOTE=m
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_SCANNER=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_DABUSB=m
+
+#
+# Video4Linux support is needed for USB Multimedia device support
+#
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_AX8817X=y
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI26=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_BRLVGER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_TEST=m
+CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_GADGETFS=m
+# CONFIG_USB_FILE_STORAGE is not set
+CONFIG_USB_NET2280=m
+CONFIG_USB_ZERO=m
+CONFIG_USB_ZERO_NET2280=y
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_NET2280=y
+
+#
+# Bluetooth support
+#
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+# CONFIG_BT_BNEP_MC_FILTER is not set
+# CONFIG_BT_BNEP_PROTO_FILTER is not set
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_USB_SCO=y
+# CONFIG_BT_USB_ZERO_PACKET is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+# CONFIG_BT_HCIUART_BCSP is not set
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+
+#
+# Kernel hacking
+#
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_HIGHMEM is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_BOOTX_TEXT is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_TEST=m
+CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
+CONFIG_BLK_DEV_IDEDMA_PMAC=y
+CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y
+CONFIG_SERIAL_PMACZILOG=m
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=n
+CONFIG_HPET_TIMER=y
+CONFIG_BRIDGE_NETFILTER=y
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_IP_NF_TARGET_CLASSIFY=m
+CONFIG_ALIM1535_WDT=m
+CONFIG_USB_AX8817X_STANDALONE=m
+CONFIG_BLK_DEV_IDE_PMAC_BLINK=y
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_IPT=m
+CONFIG_I2C_VOODOO3=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_I810=m
+CONFIG_I2C_SAVAGE4=m
+# CONFIG_IP_NF_MATCH_SCTP is not set
+CONFIG_NFS_DIRECTIO=y
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_TARGET_TRACE=m
+CONFIG_IP_NF_TARGET_NOTRACK=m
+
+CONFIG_IP6_NF_RAW=m
+CONFIG_IP6_NF_TARGET_TRACE=m
+
+CONFIG_DVB_VES1X93=m
+# CONFIG_SCSI_SATA is not set
+# CONFIG_UMSDOS_FS is not set
+# CONFIG_ISA is not set
+CONFIG_LLC2=m
+CONFIG_IPX=m
+CONFIG_IPX_INTERN=y
+CONFIG_ATALK=m
+# CONFIG_DEV_APPLETALK is not set
+
+# CONFIG_TR is not set
+
+CONFIG_NET_FC=y
+CONFIG_RCPCI=m
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_WANXL=m
+# CONFIG_WANXL_BUILD_FIRMWARE is not set
+
+# CONFIG_FB_ASILIANT is not set
+CONFIG_FB_ATY_GENERIC_LCD=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+
+CONFIG_SENSORS_EEPROM=m
+CONFIG_DRM_SIS=m
+
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_PMS=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+# CONFIG_VIDEO_ZORAN is not set
+# CONFIG_VIDEO_ZR36120 is not set
+# CONFIG_VIDEO_MEYE is not set
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+# CONFIG_VIDEO_HEXIUM_ORION is not set
+# CONFIG_VIDEO_HEXIUM_GEMINI is not set
+CONFIG_VIDEO_CX88=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_CADET=m
+CONFIG_RADIO_RTRACK=m
+CONFIG_RADIO_RTRACK2=m
+CONFIG_RADIO_AZTECH=m
+CONFIG_RADIO_GEMTEK=m
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+CONFIG_RADIO_SF16FMI=m
+CONFIG_RADIO_TERRATEC=m
+CONFIG_RADIO_TRUST=m
+CONFIG_RADIO_TYPHOON=m
+CONFIG_RADIO_TYPHOON_PROC_FS=y
+CONFIG_RADIO_ZOLTRIX=m
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+CONFIG_DVB_TWINHAN_DST=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+# CONFIG_DVB_MT312 is not set
+CONFIG_DVB_VES1820=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_NXT6000=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+# CONFIG_DVB_TTUSB_BUDGET is not set
+# CONFIG_DVB_TTUSB_DEC is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+CONFIG_DVB_BT8XX=m
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+# CONFIG_VIDEO_PLANB is not set
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_OV511=m
+CONFIG_USB_PWC=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+CONFIG_USB_W9968CF=m
+CONFIG_FORCEDETH=m
+
+CONFIG_IP_NF_P2P=m
+
+CONFIG_POSIX_MQUEUE_FS=y
+# bootsplash
+# CONFIG_BOOTSPLASH is not set
+
+# CONFIG_DVB_AV7110_FIRMWARE is not set
+CONFIG_IDE_GENERIC=m
+
+
+CONFIG_BT_CMTP=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+
+CONFIG_MD_RAID6=m
+
+CONFIG_USB_EMI62=m
+CONFIG_USB_LED=m
+CONFIG_USB_G_SERIAL=m
+
+CONFIG_GIRBIL_DONGLE_OLD=m
+CONFIG_LITELINK_DONGLE_OLD=m
+CONFIG_MCP2120_DONGLE_OLD=m
+CONFIG_OLD_BELKIN_DONGLE_OLD=m
+CONFIG_ACT200L_DONGLE_OLD=m
+CONFIG_MA600_DONGLE_OLD=m
+
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+
+# CONFIG_DEBUG_DRIVER is not setCONFIG_CRYPTO_MICHAEL_MIC=m
+
+# CONFIG_AGP_INTEL_MCH is not set
+#
+# Config for 2.6.6-rc2+cset-20040422_0013
+#
+
+CONFIG_POSIX_MQUEUE=y
+CONFIG_AUDIT=y
+CONFIG_AMD8111E_NAPI=y
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+CONFIG_IPMI_SI=m
+CONFIG_I2C_ALI1563=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_CYTHERM=m
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+
+CONFIG_USB_GADGET_NET2280=y
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_LIBCRC32C=m
+
+# for pramfs filesystem
+
+CONFIG_PRAMFS=m
+# CONFIG_PRAMFS_NOWP is not set
+CONFIG_ROOT_PRAMFS=y
+
+# CONFIG_LIRC_SUPPORT is not set
+
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+
+CONFIG_SENSORS_RTC8564=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_PHIDGETSERVO=m
+
+CONFIG_KALLSYMS_ALL=y
+
+# 2.6.7 + cset-20040620_0609
+
+CONFIG_BSD_PROCESS_ACCT_V3=y
+
+CONFIG_SCSI_3W_9XXX=m
+
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+CONFIG_VIA_VELOCITY=m
+
+# CONFIG_CIFS_POSIX is not set
+
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+
+# 2.6.7 + cset-20040621_0519
+
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+
+CONFIG_NLS_ASCII=m
+
+CONFIG_VIDEO_OVCAMCHIP=m
+# 2.6.7 + cset-20040622_1819
+
+CONFIG_BLK_DEV_SX8=m
+
+# CONFIG_BLK_DEV_IDE_SATA is not set
+
+CONFIG_SCSI_SATA_NV=m
+
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_BLK_DEV_GNBD=m
+CONFIG_CRC16=m
+
+# cset-20040701_0409
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+# CONFIG_NET_CLS_ACT is not set
+# CONFIG_NET_ACT_POLICE is not set
+# CONFIG_FB_RIVA_I2C is not set
+# CONFIG_FB_RIVA_DEBUG is not set
+# CONFIG_PROFILING is not set
+
+# cset-20040702_0108
+CONFIG_CRYPTO_TEA=m
+
+
+CONFIG_NET_SCH_NETEM=m
+CONFIG_BT_HIDP=m
+
+CONFIG_W1=n
diff --git a/kernel-ppc.config b/kernel-ppc.config
new file mode 100644 (file)
index 0000000..867d53d
--- /dev/null
@@ -0,0 +1,2281 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_MMU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_BROKEN is not set
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_6xx=y
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_PM=y
+# CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_MULTIPLATFORM=y
+# CONFIG_APUS is not set
+# CONFIG_WILLOW_2 is not set
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
+# CONFIG_GEMINI is not set
+CONFIG_PPC_CHRP=y
+CONFIG_PPC_PMAC=y
+CONFIG_PPC_PREP=y
+CONFIG_PPC_OF=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+CONFIG_ALTIVEC=y
+CONFIG_TAU=y
+# CONFIG_TAU_INT is not set
+# CONFIG_TAU_AVERAGE is not set
+
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_PROC_INTF=y
+CONFIG_CPU_FREQ_24_API=y
+CONFIG_CPU_FREQ_PMAC=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+
+#
+# General setup
+#
+CONFIG_HIGHMEM=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_KCORE_ELF=y
+CONFIG_KERNEL_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+CONFIG_HOTPLUG=y
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_YENTA=m
+CONFIG_PD6729=m
+CONFIG_CARDBUS=y
+CONFIG_I82092=m
+CONFIG_TCIC=m
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_CML1=m
+CONFIG_PARPORT_SERIAL=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_PC_PCMCIA=m
+CONFIG_PARPORT_OTHER=y
+CONFIG_PARPORT_1284=y
+# CONFIG_PPC601_SYNC_FIX is not set
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_PPC_RTAS is not set
+# CONFIG_PREP_RESIDUAL is not set
+CONFIG_PPCBUG_NVRAM=y
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Generic Driver Options
+#
+CONFIG_FW_LOADER=m
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_REDBOOT_PARTS=n
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=n
+CONFIG_MTD_REDBOOT_READONLY=n
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_CFI_AMDSTD_RETRY=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+CONFIG_MTD_PHRAM=m
+CONFIG_MTD_DOCPROBE_ADVANCED=n
+CONFIG_MTD_NAND_DISKONCHIP=n
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+CONFIG_INFTL=m
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_CFI_INTELEXT=m
+CONFIG_MTD_CFI_AMDSTD=m
+CONFIG_MTD_CFI_STAA=m
+CONFIG_MTD_RAM=m
+CONFIG_MTD_ROM=m
+CONFIG_MTD_ABSENT=m
+CONFIG_MTD_OBSOLETE_CHIPS=y
+CONFIG_MTD_AMDSTD=m
+CONFIG_MTD_SHARP=m
+CONFIG_MTD_JEDEC=m
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=m
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x4000000
+CONFIG_MTD_PHYSMAP_BUSWIDTH=2
+CONFIG_MTD_PCI=m
+CONFIG_MTD_PCMCIA=m
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_PMC551=m
+CONFIG_MTD_PMC551_BUGFIX=y
+# CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_SLRAM=m
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+# CONFIG_MTD_BLKMTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+CONFIG_MTD_DOC2001PLUS=m
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+CONFIG_MTD_NAND_IDS=m
+
+#
+# Plug and Play support
+#
+CONFIG_PNP=y
+CONFIG_PNP_NAMES=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+CONFIG_ISAPNP=y
+# CONFIG_PNPBIOS is not set
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=m
+CONFIG_PARIDE=m
+CONFIG_PARIDE_PARPORT=m
+
+#
+# Parallel IDE high-level drivers
+#
+CONFIG_PARIDE_PD=m
+CONFIG_PARIDE_PCD=m
+CONFIG_PARIDE_PF=m
+CONFIG_PARIDE_PT=m
+CONFIG_PARIDE_PG=m
+
+#
+# Parallel IDE protocol modules
+#
+CONFIG_PARIDE_ATEN=m
+CONFIG_PARIDE_BPCK=m
+# CONFIG_PARIDE_BPCK6 is not set
+CONFIG_PARIDE_COMM=m
+CONFIG_PARIDE_DSTR=m
+CONFIG_PARIDE_FIT2=m
+CONFIG_PARIDE_FIT3=m
+CONFIG_PARIDE_EPAT=m
+CONFIG_PARIDE_EPATC8=y
+CONFIG_PARIDE_EPIA=m
+CONFIG_PARIDE_FRIQ=m
+CONFIG_PARIDE_FRPW=m
+CONFIG_PARIDE_KBIC=m
+CONFIG_PARIDE_KTTI=m
+CONFIG_PARIDE_ON20=m
+CONFIG_PARIDE_ON26=m
+CONFIG_BLK_CPQ_DA=m
+CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_CARMEL=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_GNBD=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
+CONFIG_DM_IOCTL_V4=y
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
+CONFIG_BLK_DEV_IDECS=m
+CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDETAPE=m
+CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDESCSI=m
+CONFIG_IDE_TASK_IOCTL=y
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_BLK_DEV_IDEPNP=y
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_BLK_DEV_GENERIC=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+CONFIG_BLK_DEV_IDE_TCQ=y
+CONFIG_BLK_DEV_IDE_TCQ_DEFAULT=y
+CONFIG_BLK_DEV_IDE_TCQ_DEPTH=8
+CONFIG_BLK_DEV_OFFBOARD=y
+CONFIG_BLK_DEV_IDEDMA_FORCED=y
+CONFIG_IDEDMA_PCI_AUTO=y
+CONFIG_IDEDMA_ONLYDISK=y
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDEDMA_PCI_WIP=y
+CONFIG_IDEDMA_NEW_DRIVE_LISTINGS=y
+CONFIG_BLK_DEV_ADMA=y
+CONFIG_BLK_DEV_AEC62XX=m
+CONFIG_BLK_DEV_ALI15X3=m
+# CONFIG_WDC_ALI15X3 is not set
+CONFIG_BLK_DEV_AMD74XX=m
+CONFIG_BLK_DEV_CMD64X=m
+CONFIG_BLK_DEV_TRIFLEX=m
+CONFIG_BLK_DEV_CY82C693=m
+CONFIG_BLK_DEV_CS5520=m
+CONFIG_BLK_DEV_CS5530=m
+CONFIG_BLK_DEV_HPT34X=m
+CONFIG_HPT34X_AUTODMA=y
+CONFIG_BLK_DEV_HPT366=m
+CONFIG_BLK_DEV_SC1200=m
+CONFIG_BLK_DEV_PIIX=m
+CONFIG_BLK_DEV_NS87415=m
+CONFIG_BLK_DEV_OPTI621=m
+CONFIG_BLK_DEV_PDC202XX_OLD=m
+CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=m
+CONFIG_PDC202XX_FORCE=y
+CONFIG_BLK_DEV_SVWKS=m
+CONFIG_BLK_DEV_SIIMAGE=m
+CONFIG_BLK_DEV_SLC90E66=m
+CONFIG_BLK_DEV_TRM290=m
+CONFIG_BLK_DEV_VIA82CXXX=m
+CONFIG_BLK_DEV_SL82C105=m
+CONFIG_BLK_DEV_IDE_PMAC=y
+CONFIG_IDEDMA_AUTO=y
+CONFIG_IDEDMA_IVB=y
+CONFIG_BLK_DEV_PDC202XX=y
+CONFIG_BLK_DEV_IDE_MODES=y
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+CONFIG_CHR_DEV_SCH=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_REPORT_LUNS is not set
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_ACARD is not set
+CONFIG_SCSI_AACRAID=m
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
+CONFIG_AIC79XX_ENABLE_RD_STRM=y
+CONFIG_AIC79XX_DEBUG_ENABLE=y
+CONFIG_AIC79XX_DEBUG_MASK=0
+CONFIG_AIC79XX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_DPT_I2O=m
+CONFIG_SCSI_ADVANSYS=m
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_CPQFCTS is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+CONFIG_SCSI_PPA=m
+CONFIG_SCSI_IMM=m
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+CONFIG_SCSI_SYM53C8XX_IOMAPPED=y 
+# CONFIG_SCSI_SYM53C8XX is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_QLOGIC_FC is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA21XX is not set
+# CONFIG_SCSI_QLA22XX is not set
+# CONFIG_SCSI_QLA2300 is not set
+# CONFIG_SCSI_QLA2322 is not set
+# CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA6322 is not set
+CONFIG_SCSI_DC395x=m
+# CONFIG_SCSI_DC390T is not set
+CONFIG_SCSI_NSP32=m
+CONFIG_SCSI_DEBUG=m
+CONFIG_SCSI_MESH=m
+CONFIG_SCSI_MESH_SYNC_RATE=5
+CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
+CONFIG_SCSI_MAC53C94=m
+
+#
+# PCMCIA SCSI adapter support
+#
+CONFIG_PCMCIA_AHA152X=m
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_NINJA_SCSI=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+CONFIG_IEEE1394=m
+
+#
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+# CONFIG_IEEE1394_OUI_DB is not set
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
+
+#
+# Device Drivers
+#
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
+
+#
+# Protocol Drivers
+#
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_NAT=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+# CONFIG_IP_PNP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_NET_IPGRE_BROADCAST is not set
+CONFIG_IP_MROUTE=y
+# CONFIG_IP_PIMSM_V1 is not set
+# CONFIG_IP_PIMSM_V2 is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=m
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_ADLER32 is not set
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+CONFIG_SCTP_HMAC_NONE=y
+# CONFIG_SCTP_HMAC_SHA1 is not set
+# CONFIG_SCTP_HMAC_MD5 is not set
+# CONFIG_ATM is not set
+CONFIG_VLAN_8021Q=m
+# CONFIG_LLC is not set
+CONFIG_DECNET=m
+CONFIG_DECNET_SIOCGIFCONF=y
+CONFIG_DECNET_ROUTER=y
+CONFIG_DECNET_ROUTE_FWMARK=y
+
+CONFIG_BRIDGE=m
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+# CONFIG_ECONET_AUNUDP is not set
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+NET_SCH_CLK_JIFFIES=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_SCH_WRR=m
+CONFIG_NET_SCH_ESFQ=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+CONFIG_ARCNET=m
+CONFIG_ARCNET_1201=m
+CONFIG_ARCNET_1051=m
+CONFIG_ARCNET_RAW=m
+# CONFIG_ARCNET_COM90xx is not set
+CONFIG_ARCNET_COM90xxIO=m
+# CONFIG_ARCNET_RIM_I is not set
+CONFIG_ARCNET_COM20020=m
+CONFIG_ARCNET_COM20020_PCI=m
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_IMQ=m
+CONFIG_TUN=m
+CONFIG_ETHERTAP=m
+CONFIG_NET_SB1000=m
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_MACE=m
+# CONFIG_MACE_AAUI_PORT is not set
+CONFIG_BMAC=m
+# CONFIG_OAKNET is not set
+# CONFIG_HAPPYMEAL is not set
+CONFIG_SUNGEM=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_PCMCIA_XIRCOM=m
+CONFIG_PCMCIA_XIRTULIP=m
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+# CONFIG_AMD8111_ETH is not set
+CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
+CONFIG_B44=m
+CONFIG_DGRS=m
+CONFIG_EEPRO100=m
+CONFIG_EEPRO100_PIO=y
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+CONFIG_8139_RXBUF_IDX=3
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+CONFIG_8139_OLD_RX_RESET=y
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+# CONFIG_TLAN is not set
+CONFIG_VIA_RHINE=m
+# CONFIG_VIA_RHINE_MMIO is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_SIS190=m
+CONFIG_SK98LIN=m
+CONFIG_CONFIG_SK98LIN_T1=y
+CONFIG_CONFIG_SK98LIN_T2=y
+CONFIG_CONFIG_SK98LIN_T3=y
+CONFIG_CONFIG_SK98LIN_T4=y
+CONFIG_CONFIG_SK98LIN_T5=y
+CONFIG_CONFIG_SK98LIN_T6=y
+CONFIG_CONFIG_SK98LIN_T7=y
+CONFIG_CONFIG_SK98LIN_T8=y
+CONFIG_CONFIG_SK98LIN_T9=y
+CONFIG_SK98LIN=m
+CONFIG_TIGON3=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+CONFIG_PPPOE=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+# CONFIG_SLIP_SMART is not set
+# CONFIG_SLIP_MODE_SLIP6 is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+CONFIG_PCMCIA_RAYCS=m
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_APPLE_AIRPORT=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_NET_WIRELESS=y
+CONFIG_PRISM54=m
+
+#
+# Wan interfaces
+#
+CONFIG_WAN=y
+# CONFIG_COMX is not set
+CONFIG_DSCC4=m
+CONFIG_DSCC4_PCISYNC=y
+CONFIG_DSCC4_PCI_RST=y
+CONFIG_LANMEDIA=m
+CONFIG_SYNCLINK_SYNCPPP=m
+CONFIG_HDLC=m
+CONFIG_HDLC_RAW=y
+# CONFIG_HDLC_RAW_ETH is not set
+CONFIG_HDLC_CISCO=y
+CONFIG_HDLC_FR=y
+CONFIG_HDLC_PPP=y
+CONFIG_HDLC_X25=y
+CONFIG_PCI200SYN=m
+CONFIG_PC300=m
+CONFIG_PC300_MLPPP=y
+# CONFIG_FARSYNC is not set
+CONFIG_TAHOE9XX=m
+# CONFIG_HDLC_DEBUG_PKT is not set
+# CONFIG_HDLC_DEBUG_HARD_HEADER is not set
+# CONFIG_HDLC_DEBUG_ECN is not set
+# CONFIG_HDLC_DEBUG_RINGS is not set
+CONFIG_DLCI=m
+CONFIG_DLCI_COUNT=24
+CONFIG_DLCI_MAX=8
+CONFIG_WAN_ROUTER_DRIVERS=y
+# CONFIG_VENDOR_SANGOMA is not set
+CONFIG_CYCLADES_SYNC=m
+CONFIG_CYCLOMX_X25=y
+CONFIG_LAPBETHER=m
+CONFIG_X25_ASY=m
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_ARCNET_COM20020_CS=m
+CONFIG_PCMCIA_IBMTR=m
+
+#
+# Amateur Radio support
+#
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+CONFIG_AX25_DAMA_SLAVE=y
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_MKISS=m
+CONFIG_6PACK=m
+CONFIG_BPQETHER=m
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_BAYCOM_EPP=m
+# CONFIG_YAM is not set
+
+#
+# IrDA (infrared) support
+#
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+CONFIG_IRTTY_OLD=m
+CONFIG_IRPORT_SIR=m
+
+#
+# Old Serial dongle support
+#
+CONFIG_DONGLE_OLD=y
+CONFIG_ESI_DONGLE_OLD=m
+CONFIG_ACTISYS_DONGLE_OLD=m
+CONFIG_TEKRAM_DONGLE_OLD=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+CONFIG_MA600_DONGLE=m
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_TOSHIBA_OLD=m
+CONFIG_TOSHIBA_FIR=m
+# CONFIG_VLSI_FIR is not set
+CONFIG_VIA_FIR=m
+
+#
+# ISDN subsystem
+#
+CONFIG_ISDN_BOOL=y
+
+#
+# Old ISDN4Linux
+#
+# CONFIG_ISDN is not set
+
+#
+# CAPI subsystem
+#
+# CONFIG_ISDN_CAPI is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+CONFIG_FB_CYBER2000=m
+CONFIG_FB_OF=y
+# CONFIG_FB_CONTROL is not set
+# CONFIG_FB_PLATINUM is not set
+# CONFIG_FB_VALKYRIE is not set
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_S3TRIO is not set
+CONFIG_FB_VGA16=m
+CONFIG_FB_RIVA=m
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON_OLD is not set
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=y
+CONFIG_FB_ATY=y
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
+CONFIG_FB_ATY_XL_INIT=y
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_KYRO is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_6x11=y
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+# CONFIG_GAMEPORT_EMU10K1 is not set
+# CONFIG_GAMEPORT_VORTEX is not set
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+CONFIG_SERIO_PCIPS2=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=m
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+# CONFIG_JOYSTICK_GUILLEMOT is not set
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_USB=y
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+# CONFIG_JOYSTICK_TWIDDLER is not set
+CONFIG_JOYSTICK_DB9=m
+CONFIG_JOYSTICK_GAMECON=m
+CONFIG_JOYSTICK_TURBOGRAFX=m
+CONFIG_INPUT_JOYDUMP=m
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# Macintosh device drivers
+#
+CONFIG_ADB_CUDA=y
+CONFIG_ADB_PMU=y
+CONFIG_PMAC_PBOOK=y
+CONFIG_PMAC_APM_EMU=y
+CONFIG_PMAC_BACKLIGHT=y
+# CONFIG_MAC_FLOPPY is not set
+# CONFIG_MAC_SERIAL is not set
+CONFIG_ADB=y
+CONFIG_ADB_MACIO=y
+CONFIG_INPUT_ADBHID=y
+CONFIG_MAC_EMUMOUSEBTN=y
+# CONFIG_ANSLCD is not set
+CONFIG_THERM_WINDTUNNEL=m
+CONFIG_THERM_ADT746X=m
+CONFIG_THERM_ADT7467=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_CS=m
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+CONFIG_TIPAR=m
+
+# CONFIG_PHONE is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_PHILIPSPAR=m
+CONFIG_I2C_PARPORT=m
+# CONFIG_I2C_PARPORT_LIGHT is not set
+CONFIG_I2C_ELV=m
+CONFIG_I2C_HYDRA=m
+CONFIG_I2C_VELLEMAN=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ELEKTOR=m
+CONFIG_I2C_KEYWEST=m
+CONFIG_I2C_CHARDEV=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# I2C Hardware Sensors Mainboard support
+#
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_PIIX4=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIAPRO=m
+
+#
+# I2C Hardware Sensors Chip support
+#
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+CONFIG_SENSORS_ADM1031=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM77=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+CONFIG_I2C_SENSOR=m
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+
+#
+# Mice
+#
+CONFIG_BUSMOUSE=m
+# CONFIG_QIC02_TAPE is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_KCS=m
+CONFIG_IPMI_WATCHDOG=m
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_NVRAM=y
+CONFIG_GEN_RTC=m
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+CONFIG_AGP=m
+CONFIG_AGP_UNINORTH=m
+CONFIG_DRM=y
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_GAMMA=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_RADEON=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_SYNCLINK_CS=m
+CONFIG_RAW_DRIVER=m
+CONFIG_MAX_RAW_DEVS=1024
+CONFIG_HANGCHECK_TIMER=m
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+CONFIG_DVB_TWINHAN_DST=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_ALPS_BSRV2=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_VES1820=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_TTUSB_BUDGET=m
+# CONFIG_DVB_TTUSB_DEC is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+CONFIG_DVB_BT8XX=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+CONFIG_JFS_STATISTICS=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+CONFIG_XFS_RT=y
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_NTFS_FS=m
+CONFIG_NTFS_DEBUG=y
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+CONFIG_DEVPTS_FS_XATTR=y
+CONFIG_DEVPTS_FS_SECURITY=y
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+# CONFIG_ADFS_FS_RW is not set
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_QNX4FS_RW=y
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=n
+CONFIG_CIFS_XATTR=y
+CONFIG_NCP_FS=m
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+CONFIG_NCPFS_NFS_NS=y
+CONFIG_NCPFS_OS2_NS=y
+CONFIG_NCPFS_SMALLDOS=y
+CONFIG_NCPFS_NLS=y
+CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+# CONFIG_INTERMEZZO_FS is not set
+CONFIG_AFS_FS=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+CONFIG_RXRPC=m
+
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+CONFIG_AMIGA_PARTITION=y
+CONFIG_ATARI_PARTITION=y
+CONFIG_MAC_PARTITION=y
+CONFIG_MSDOS_PARTITION=y
+CONFIG_BSD_DISKLABEL=y
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_NEC98_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+CONFIG_SMB_NLS=y
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+CONFIG_DMASOUND_PMAC=m
+# CONFIG_DMASOUND_AWACS is not set
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_DUMMY=m
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# PCI devices
+#
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+# CONFIG_SND_CS46XX is not set
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+# CONFIG_SND_KORG1212 is not set
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+# CONFIG_SND_HDSP is not set
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VX222=m
+
+#
+# ALSA PowerMac devices
+#
+CONFIG_SND_POWERMAC=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+
+#
+# PCMCIA devices
+#
+CONFIG_SND_VXPOCKET=m
+CONFIG_SND_VXP440=m
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+CONFIG_SOUND_BT878=m
+CONFIG_SOUND_CMPCI=m
+CONFIG_SOUND_CMPCI_FM=y
+CONFIG_SOUND_CMPCI_FMIO=0x388
+CONFIG_SOUND_CMPCI_MIDI=y
+CONFIG_SOUND_CMPCI_MPUIO=0x330
+CONFIG_SOUND_CMPCI_JOYSTICK=y
+CONFIG_SOUND_CMPCI_CM8738=y
+# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
+# CONFIG_SOUND_CMPCI_SPDIFLOOP is not set
+CONFIG_SOUND_CMPCI_SPEAKERS=2
+CONFIG_SOUND_EMU10K1=m
+CONFIG_MIDI_EMU10K1=y
+CONFIG_SOUND_FUSION=m
+# CONFIG_SOUND_CS4281 is not set
+CONFIG_SOUND_ES1370=m
+CONFIG_SOUND_ES1371=m
+CONFIG_SOUND_ESSSOLO1=m
+CONFIG_SOUND_MAESTRO=m
+CONFIG_SOUND_MAESTRO3=m
+CONFIG_SOUND_ICH=m
+CONFIG_SOUND_RME96XX=m
+CONFIG_SOUND_SONICVIBES=m
+CONFIG_SOUND_TRIDENT=m
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_VIA82CXXX=m
+CONFIG_MIDI_VIA82CXXX=y
+CONFIG_SOUND_OSS=m
+CONFIG_SOUND_TRACEINIT=y
+# CONFIG_SOUND_DMAP is not set
+CONFIG_SOUND_AD1816=m
+CONFIG_SOUND_AD1889=m
+CONFIG_SOUND_SGALAXY=m
+CONFIG_SOUND_ADLIB=m
+CONFIG_SOUND_ACI_MIXER=m
+CONFIG_SOUND_CS4232=m
+CONFIG_SOUND_SSCAPE=m
+CONFIG_SOUND_GUS=m
+CONFIG_SOUND_GUS16=y
+CONFIG_SOUND_GUSMAX=y
+CONFIG_SOUND_VMIDI=m
+CONFIG_SOUND_TRIX=m
+CONFIG_SOUND_MSS=m
+CONFIG_SOUND_MPU401=m
+CONFIG_SOUND_NM256=m
+CONFIG_SOUND_MAD16=m
+CONFIG_MAD16_OLDCARD=y
+CONFIG_SOUND_PAS=m
+# CONFIG_SOUND_PSS is not set
+CONFIG_SOUND_SB=m
+# CONFIG_SOUND_AWE32_SYNTH is not set
+CONFIG_SOUND_WAVEFRONT=m
+CONFIG_SOUND_MAUI=m
+CONFIG_SOUND_YM3812=m
+CONFIG_SOUND_OPL3SA1=m
+CONFIG_SOUND_OPL3SA2=m
+CONFIG_SOUND_YMFPCI=m
+CONFIG_SOUND_YMFPCI_LEGACY=y
+CONFIG_SOUND_UART6850=m
+CONFIG_SOUND_AEDSP16=m
+CONFIG_SC6600=y
+CONFIG_SC6600_JOY=y
+CONFIG_SC6600_CDROM=4
+CONFIG_SC6600_CDROMBASE=0x0
+# CONFIG_AEDSP16_MSS is not set
+# CONFIG_AEDSP16_SBPRO is not set
+CONFIG_AEDSP16_MPU401=y
+CONFIG_SOUND_TVMIXER=m
+CONFIG_SOUND_KAHLUA=m
+CONFIG_SOUND_ALI5455=m
+CONFIG_SOUND_FORTE=m
+CONFIG_SOUND_AD1980=m
+CONFIG_SOUND_WM97XX=m
+
+#
+# USB support
+#
+CONFIG_USB=y
+CONFIG_USB_DEBUG=y
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_UHCI_HCD=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_AUDIO=m
+
+#
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+#
+CONFIG_USB_MIDI=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+
+#
+# USB Human Interface Devices (HID)
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=y
+CONFIG_USB_MOUSE=m
+CONFIG_USB_AIPTEK=m
+CONFIG_USB_WACOM=m
+CONFIG_USB_KBTAB=m
+CONFIG_USB_POWERMATE=m
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_XPAD=m
+CONFIG_USB_ATI_REMOTE=m
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_SCANNER=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_DABUSB=m
+
+#
+# Video4Linux support is needed for USB Multimedia device support
+#
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_AX8817X=y
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI26=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_BRLVGER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_TEST=m
+CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_GADGETFS=m
+# CONFIG_USB_FILE_STORAGE is not set
+CONFIG_USB_NET2280=m
+CONFIG_USB_ZERO=m
+CONFIG_USB_ZERO_NET2280=y
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_NET2280=y
+
+#
+# Bluetooth support
+#
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+# CONFIG_BT_BNEP_MC_FILTER is not set
+# CONFIG_BT_BNEP_PROTO_FILTER is not set
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_USB_SCO=y
+# CONFIG_BT_USB_ZERO_PACKET is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+# CONFIG_BT_HCIUART_BCSP is not set
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+
+#
+# Kernel hacking
+#
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_HIGHMEM is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_BOOTX_TEXT is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_TEST=m
+CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
+CONFIG_BLK_DEV_IDEDMA_PMAC=y
+CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y
+CONFIG_SERIAL_PMACZILOG=m
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=n
+CONFIG_HPET_TIMER=y
+CONFIG_BRIDGE_NETFILTER=y
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_IP_NF_TARGET_CLASSIFY=m
+CONFIG_ALIM1535_WDT=m
+CONFIG_USB_AX8817X_STANDALONE=m
+CONFIG_BLK_DEV_IDE_PMAC_BLINK=y
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_IPT=m
+CONFIG_I2C_VOODOO3=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_I810=m
+CONFIG_I2C_SAVAGE4=m
+# CONFIG_IP_NF_MATCH_SCTP is not set
+CONFIG_NFS_DIRECTIO=y
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_TARGET_TRACE=m
+CONFIG_IP_NF_TARGET_NOTRACK=m
+
+CONFIG_IP6_NF_RAW=m
+CONFIG_IP6_NF_TARGET_TRACE=m
+
+CONFIG_DVB_VES1X93=m
+# CONFIG_SCSI_SATA is not set
+# CONFIG_UMSDOS_FS is not set
+# CONFIG_ISA is not set
+CONFIG_LLC2=m
+CONFIG_IPX=m
+CONFIG_IPX_INTERN=y
+CONFIG_ATALK=m
+# CONFIG_DEV_APPLETALK is not set
+
+# CONFIG_TR is not set
+
+CONFIG_NET_FC=y
+CONFIG_RCPCI=m
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_WANXL=m
+# CONFIG_WANXL_BUILD_FIRMWARE is not set
+
+# CONFIG_FB_ASILIANT is not set
+CONFIG_FB_ATY_GENERIC_LCD=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+
+CONFIG_SENSORS_EEPROM=m
+CONFIG_DRM_SIS=m
+
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_PMS=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+# CONFIG_VIDEO_ZORAN is not set
+# CONFIG_VIDEO_ZR36120 is not set
+# CONFIG_VIDEO_MEYE is not set
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+# CONFIG_VIDEO_HEXIUM_ORION is not set
+# CONFIG_VIDEO_HEXIUM_GEMINI is not set
+CONFIG_VIDEO_CX88=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_CADET=m
+CONFIG_RADIO_RTRACK=m
+CONFIG_RADIO_RTRACK2=m
+CONFIG_RADIO_AZTECH=m
+CONFIG_RADIO_GEMTEK=m
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+CONFIG_RADIO_SF16FMI=m
+CONFIG_RADIO_TERRATEC=m
+CONFIG_RADIO_TRUST=m
+CONFIG_RADIO_TYPHOON=m
+CONFIG_RADIO_TYPHOON_PROC_FS=y
+CONFIG_RADIO_ZOLTRIX=m
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+CONFIG_DVB_TWINHAN_DST=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+# CONFIG_DVB_MT312 is not set
+CONFIG_DVB_VES1820=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_NXT6000=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+# CONFIG_DVB_TTUSB_BUDGET is not set
+# CONFIG_DVB_TTUSB_DEC is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+CONFIG_DVB_BT8XX=m
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+# CONFIG_VIDEO_PLANB is not set
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_OV511=m
+CONFIG_USB_PWC=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+CONFIG_USB_W9968CF=m
+CONFIG_FORCEDETH=m
+
+CONFIG_IP_NF_P2P=m
+
+CONFIG_POSIX_MQUEUE_FS=y
+# bootsplash
+# CONFIG_BOOTSPLASH is not set
+
+# CONFIG_DVB_AV7110_FIRMWARE is not set
+CONFIG_IDE_GENERIC=m
+
+
+CONFIG_BT_CMTP=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+
+CONFIG_MD_RAID6=m
+
+CONFIG_USB_EMI62=m
+CONFIG_USB_LED=m
+CONFIG_USB_G_SERIAL=m
+
+CONFIG_GIRBIL_DONGLE_OLD=m
+CONFIG_LITELINK_DONGLE_OLD=m
+CONFIG_MCP2120_DONGLE_OLD=m
+CONFIG_OLD_BELKIN_DONGLE_OLD=m
+CONFIG_ACT200L_DONGLE_OLD=m
+CONFIG_MA600_DONGLE_OLD=m
+
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+
+# CONFIG_DEBUG_DRIVER is not setCONFIG_CRYPTO_MICHAEL_MIC=m
+
+# CONFIG_AGP_INTEL_MCH is not set
+#
+# Config for 2.6.6-rc2+cset-20040422_0013
+#
+
+CONFIG_POSIX_MQUEUE=y
+CONFIG_AUDIT=y
+CONFIG_AMD8111E_NAPI=y
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+CONFIG_IPMI_SI=m
+CONFIG_I2C_ALI1563=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_CYTHERM=m
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+
+CONFIG_USB_GADGET_NET2280=y
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_LIBCRC32C=m
+
+# for pramfs filesystem
+
+CONFIG_PRAMFS=m
+# CONFIG_PRAMFS_NOWP is not set
+CONFIG_ROOT_PRAMFS=y
+
+# CONFIG_LIRC_SUPPORT is not set
+
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+
+CONFIG_SENSORS_RTC8564=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_PHIDGETSERVO=m
+
+CONFIG_KALLSYMS_ALL=y
+
+# 2.6.7 + cset-20040620_0609
+
+CONFIG_BSD_PROCESS_ACCT_V3=y
+
+CONFIG_SCSI_3W_9XXX=m
+
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+CONFIG_VIA_VELOCITY=m
+
+# CONFIG_CIFS_POSIX is not set
+
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+
+# 2.6.7 + cset-20040621_0519
+
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+
+CONFIG_NLS_ASCII=m
+
+CONFIG_VIDEO_OVCAMCHIP=m
+# 2.6.7 + cset-20040622_1819
+
+CONFIG_BLK_DEV_SX8=m
+
+# CONFIG_BLK_DEV_IDE_SATA is not set
+
+CONFIG_SCSI_SATA_NV=m
+
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_BLK_DEV_GNBD=m
+CONFIG_CRC16=m
+
+# cset-20040701_0409
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+# CONFIG_NET_CLS_ACT is not set
+# CONFIG_NET_ACT_POLICE is not set
+# CONFIG_FB_RIVA_I2C is not set
+# CONFIG_FB_RIVA_DEBUG is not set
+# CONFIG_PROFILING is not set
+
+# cset-20040702_0108
+CONFIG_CRYPTO_TEA=m
+
+
+CONFIG_NET_SCH_NETEM=m
+CONFIG_BT_HIDP=m
+
+CONFIG_W1=n
diff --git a/kernel-sparc-smp.config b/kernel-sparc-smp.config
new file mode 100644 (file)
index 0000000..2a8ff76
--- /dev/null
@@ -0,0 +1,1132 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_HIGHMEM=y
+CONFIG_GENERIC_ISA_DMA=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+# CONFIG_STANDALONE is not set
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HOTPLUG=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# General setup
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_SMP=y
+CONFIG_SCHED_SMT=y
+CONFIG_NR_CPUS=16
+CONFIG_SPARC32=y
+CONFIG_SBUS=y
+CONFIG_SBUSCHAR=y
+CONFIG_SERIAL_CONSOLE=y
+CONFIG_SUN_AUXIO=y
+CONFIG_SUN_IO=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_SUN_PM=y
+# CONFIG_SUN4 is not set
+# CONFIG_PCI is not set
+CONFIG_SUN_OPENPROMFS=m
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=y
+CONFIG_BINFMT_MISC=m
+CONFIG_SUNOS_EMUL=y
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Generic Driver Options
+#
+CONFIG_FW_LOADER=m
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_BW2 is not set
+CONFIG_FB_CG3=y
+CONFIG_FB_CG6=y
+CONFIG_FB_SBUS=y
+CONFIG_FB_TCX=y
+CONFIG_FB_CG14=y
+CONFIG_FB_P9100=y
+CONFIG_FB_LEO=y
+CONFIG_FB_VIRTUAL=m
+
+#
+# Console display driver support
+#
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_PROM_CONSOLE=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_SUN8x16=y
+CONFIG_FONT_SUN12x22=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Bootsplash configuration
+#
+# CONFIG_BOOTSPLASH is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=m
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_REDBOOT_PARTS=m
+CONFIG_MTD_CMDLINE_PARTS=m
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+CONFIG_FTL=m
+CONFIG_NFTL=m
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=m
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+CONFIG_MTD_ABSENT=m
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=m
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x4000000
+CONFIG_MTD_PHYSMAP_BUSWIDTH=2
+# CONFIG_MTD_SUN_UFLASH is not set
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_SLRAM=m
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+# CONFIG_MTD_BLKMTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+CONFIG_MTD_DOC2000=m
+CONFIG_MTD_DOC2001=m
+CONFIG_MTD_DOC2001PLUS=m
+CONFIG_MTD_DOCPROBE=m
+# CONFIG_MTD_DOCPROBE_ADVANCED is not set
+CONFIG_MTD_DOCPROBE_ADDRESS=0
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+CONFIG_MTD_NAND_IDS=m
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SUNCORE=y
+CONFIG_SERIAL_SUNZILOG=m
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+
+#
+# Misc Linux/SPARC drivers
+#
+CONFIG_SUN_OPENPROMIO=m
+CONFIG_SUN_MOSTEK_RTC=m
+CONFIG_SUN_BPP=m
+CONFIG_SUN_VIDEOPIX=m
+# CONFIG_SUN_AURORA is not set
+CONFIG_TADPOLE_TS102_UCTRL=m
+CONFIG_SUN_JSFLASH=m
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=y
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_REPORT_LUNS=y
+# CONFIG_SCSI_CONSTANTS is not set
+CONFIG_SCSI_LOGGING=y
+
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+CONFIG_SCSI_SATA=y
+# CONFIG_SCSI_EATA_PIO is not set
+CONFIG_SCSI_QLOGICPTI=m
+# CONFIG_SCSI_DEBUG is not set
+CONFIG_SCSI_SUNESP=m
+
+#
+# Fibre Channel support
+#
+CONFIG_FC4=m
+
+#
+# FC4 drivers
+#
+CONFIG_FC4_SOC=m
+CONFIG_FC4_SOCAL=m
+
+#
+# FC4 targets
+#
+CONFIG_SCSI_PLUTO=m
+CONFIG_SCSI_FCAL=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_IOCTL_V4=y
+CONFIG_DM_CRYPT=m
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_NAT=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_DECNET=m
+# CONFIG_DECNET_SIOCGIFCONF is not set
+# CONFIG_DECNET_ROUTER is not set
+CONFIG_BRIDGE=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=m
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+CONFIG_ATM_CLIP_NO_ICMP=y
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_LLC=m
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=y
+CONFIG_IPDDP=m
+# CONFIG_IPDDP_ENCAP is not set
+# CONFIG_IPDDP_DECAP is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+CONFIG_ECONET_AUNUDP=y
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_ETHERTAP=m
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_SUNLANCE=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNBMAC=m
+CONFIG_SUNQE=m
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_MYRI_SBUS=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+CONFIG_ATMEL=m
+
+#
+# Token Ring devices
+#
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+
+#
+# Wan interfaces
+#
+CONFIG_WAN=y
+CONFIG_SYNCLINK_SYNCPPP=m
+CONFIG_HDLC=m
+CONFIG_HDLC_RAW=y
+CONFIG_HDLC_RAW_ETH=y
+CONFIG_HDLC_CISCO=y
+CONFIG_HDLC_FR=y
+CONFIG_HDLC_PPP=y
+CONFIG_HDLC_X25=y
+CONFIG_DLCI=m
+CONFIG_DLCI_COUNT=24
+CONFIG_DLCI_MAX=8
+CONFIG_WAN_ROUTER_DRIVERS=y
+CONFIG_LAPBETHER=m
+CONFIG_X25_ASY=m
+
+#
+# ATM drivers
+#
+CONFIG_ATM_TCP=m
+CONFIG_ATM_FORE200E_MAYBE=m
+CONFIG_ATM_FORE200E_SBA=y
+CONFIG_ATM_FORE200E_SBA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E=m
+
+#
+# Amateur Radio support
+#
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+# CONFIG_AX25_DAMA_SLAVE is not set
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_MKISS=m
+CONFIG_6PACK=m
+CONFIG_BPQETHER=m
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_YAM=m
+
+#
+# IrDA (infrared) support
+#
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+CONFIG_IRPORT_SIR=m
+
+#
+# Old Serial dongle support
+#
+CONFIG_DONGLE_OLD=y
+CONFIG_ESI_DONGLE_OLD=m
+CONFIG_ACTISYS_DONGLE_OLD=m
+CONFIG_TEKRAM_DONGLE_OLD=m
+CONFIG_GIRBIL_DONGLE_OLD=m
+CONFIG_LITELINK_DONGLE_OLD=m
+CONFIG_MCP2120_DONGLE_OLD=m
+CONFIG_OLD_BELKIN_DONGLE_OLD=m
+CONFIG_ACT200L_DONGLE_OLD=m
+CONFIG_MA600_DONGLE_OLD=m
+
+#
+# FIR device drivers
+#
+# CONFIG_TOSHIBA_FIR is not set
+
+#
+# Bluetooth support
+#
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIVHCI=m
+
+#
+# Unix98 PTY support
+#
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_VORTEX=m
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_SERIO_CT82C710=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=m
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+CONFIG_JOYSTICK_GUILLEMOT=m
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+CONFIG_JOYSTICK_TWIDDLER=m
+CONFIG_INPUT_JOYDUMP=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+# CONFIG_UMSDOS_FS is not set
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+CONFIG_ADFS_FS_RW=y
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_JFFS_FS=m
+CONFIG_JFFS_FS_VERBOSE=0
+CONFIG_JFFS2_FS=m
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_NAND=y
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_QNX4FS_RW=y
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="iso8859-2"
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=n
+CONFIG_CIFS_XATTR=y
+CONFIG_NCP_FS=m
+CONFIG_NCPFS_PACKET_SIGNING=y
+CONFIG_NCPFS_IOCTL_LOCKING=y
+CONFIG_NCPFS_STRONG=y
+CONFIG_NCPFS_NFS_NS=y
+CONFIG_NCPFS_OS2_NS=y
+CONFIG_NCPFS_SMALLDOS=y
+CONFIG_NCPFS_NLS=y
+CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_INTERMEZZO_FS=m
+CONFIG_AFS_FS=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+CONFIG_RXRPC=m
+
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_SUN_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-2"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# ALSA Sparc devices
+#
+CONFIG_SND_SUN_AMD7930=m
+CONFIG_SND_SUN_CS4231=m
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+# CONFIG_SOUND_BT878 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_CS4281 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+# CONFIG_SOUND_OSS is not set
+# CONFIG_SOUND_AD1980 is not set
+
+#
+# USB support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_SELINUX=y
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_LIBCRC32C=m
+
+# for pramfs filesystem
+
+CONFIG_PRAMFS=m
+# CONFIG_PRAMFS_NOWP is not set
+CONFIG_ROOT_PRAMFS=y
+
+# CONFIG_USB_PWC is not set
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+
+CONFIG_SENSORS_RTC8564=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_PHIDGETSERVO=m
+
+CONFIG_KALLSYMS_ALL=y
+
+CONFIG_SCSI_DPT_I2O=m
+CONFIG_POSIX_MQUEUE=y
+CONFIG_AUDIT=y
+CONFIG_ATM_FORE200E_USE_TASKLET=y
+# 2.6.7 + cset-20040620_0609
+
+CONFIG_BSD_PROCESS_ACCT_V3=y
+
+CONFIG_SCSI_3W_9XXX=m
+
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+CONFIG_VIA_VELOCITY=m
+
+# CONFIG_CIFS_POSIX is not set
+
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+
+# 2.6.7 + cset-20040621_0519
+
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+
+CONFIG_NLS_ASCII=m
+
+CONFIG_VIDEO_OVCAMCHIP=m
+# 2.6.7 + cset-20040622_1819
+
+CONFIG_BLK_DEV_SX8=m
+
+# CONFIG_BLK_DEV_IDE_SATA is not set
+
+CONFIG_SCSI_SATA_NV=m
+
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_BLK_DEV_GNBD=m
+CONFIG_CRC16=m
+
+# cset-20040702_0108
+CONFIG_CRYPTO_TEA=m
+
+# cset-20040701_0409
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+# CONFIG_NET_CLS_ACT is not set
+# CONFIG_NET_ACT_POLICE is not set
+# CONFIG_FB_RIVA_I2C is not set
+# CONFIG_FB_RIVA_DEBUG is not set
+# CONFIG_PROFILING is not set
diff --git a/kernel-sparc.config b/kernel-sparc.config
new file mode 100644 (file)
index 0000000..ebb49b4
--- /dev/null
@@ -0,0 +1,1136 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_HIGHMEM=y
+CONFIG_GENERIC_ISA_DMA=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+# CONFIG_STANDALONE is not set
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HOTPLUG=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# General setup
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SMP is not set
+CONFIG_SPARC32=y
+CONFIG_SBUS=y
+CONFIG_SBUSCHAR=y
+CONFIG_SERIAL_CONSOLE=y
+CONFIG_SUN_AUXIO=y
+CONFIG_SUN_IO=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_SUN_PM=y
+# CONFIG_SUN4 is not set
+# CONFIG_PCI is not set
+CONFIG_SUN_OPENPROMFS=m
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=y
+CONFIG_BINFMT_MISC=m
+CONFIG_SUNOS_EMUL=y
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Generic Driver Options
+#
+CONFIG_FW_LOADER=m
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_BW2 is not set
+CONFIG_FB_CG3=y
+CONFIG_FB_CG6=y
+CONFIG_FB_SBUS=y
+CONFIG_FB_TCX=y
+CONFIG_FB_CG14=y
+CONFIG_FB_P9100=y
+CONFIG_FB_LEO=y
+CONFIG_FB_VIRTUAL=m
+
+#
+# Console display driver support
+#
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_PROM_CONSOLE=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_SUN8x16=y
+CONFIG_FONT_SUN12x22=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Bootsplash configuration
+#
+# CONFIG_BOOTSPLASH is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=m
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_REDBOOT_PARTS=m
+CONFIG_MTD_CMDLINE_PARTS=m
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+CONFIG_FTL=m
+CONFIG_NFTL=m
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=m
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+CONFIG_MTD_ABSENT=m
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=m
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x4000000
+CONFIG_MTD_PHYSMAP_BUSWIDTH=2
+# CONFIG_MTD_SUN_UFLASH is not set
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_SLRAM=m
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+# CONFIG_MTD_BLKMTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+CONFIG_MTD_DOC2000=m
+CONFIG_MTD_DOC2001=m
+CONFIG_MTD_DOC2001PLUS=m
+CONFIG_MTD_DOCPROBE=m
+# CONFIG_MTD_DOCPROBE_ADVANCED is not set
+CONFIG_MTD_DOCPROBE_ADDRESS=0
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+CONFIG_MTD_NAND_IDS=m
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SUNCORE=y
+CONFIG_SERIAL_SUNZILOG=m
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+
+#
+# Misc Linux/SPARC drivers
+#
+CONFIG_SUN_OPENPROMIO=m
+CONFIG_SUN_MOSTEK_RTC=m
+CONFIG_SUN_BPP=m
+CONFIG_SUN_VIDEOPIX=m
+# CONFIG_SUN_AURORA is not set
+CONFIG_TADPOLE_TS102_UCTRL=m
+CONFIG_SUN_JSFLASH=m
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=y
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_REPORT_LUNS=y
+# CONFIG_SCSI_CONSTANTS is not set
+CONFIG_SCSI_LOGGING=y
+
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+CONFIG_SCSI_SATA=y
+# CONFIG_SCSI_EATA_PIO is not set
+CONFIG_SCSI_QLOGICPTI=m
+# CONFIG_SCSI_DEBUG is not set
+CONFIG_SCSI_SUNESP=m
+
+#
+# Fibre Channel support
+#
+CONFIG_FC4=m
+
+#
+# FC4 drivers
+#
+CONFIG_FC4_SOC=m
+CONFIG_FC4_SOCAL=m
+
+#
+# FC4 targets
+#
+CONFIG_SCSI_PLUTO=m
+CONFIG_SCSI_FCAL=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_IOCTL_V4=y
+CONFIG_DM_CRYPT=m
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_NAT=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_DECNET=m
+# CONFIG_DECNET_SIOCGIFCONF is not set
+# CONFIG_DECNET_ROUTER is not set
+CONFIG_BRIDGE=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=m
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+CONFIG_ATM_CLIP_NO_ICMP=y
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_LLC=m
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=y
+CONFIG_IPDDP=m
+# CONFIG_IPDDP_ENCAP is not set
+# CONFIG_IPDDP_DECAP is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+CONFIG_ECONET_AUNUDP=y
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_ETHERTAP=m
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_SUNLANCE=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNBMAC=m
+CONFIG_SUNQE=m
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_MYRI_SBUS=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+CONFIG_ATMEL=m
+
+#
+# Token Ring devices
+#
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+
+#
+# Wan interfaces
+#
+CONFIG_WAN=y
+CONFIG_SYNCLINK_SYNCPPP=m
+CONFIG_HDLC=m
+CONFIG_HDLC_RAW=y
+CONFIG_HDLC_RAW_ETH=y
+CONFIG_HDLC_CISCO=y
+CONFIG_HDLC_FR=y
+CONFIG_HDLC_PPP=y
+CONFIG_HDLC_X25=y
+CONFIG_DLCI=m
+CONFIG_DLCI_COUNT=24
+CONFIG_DLCI_MAX=8
+CONFIG_WAN_ROUTER_DRIVERS=y
+CONFIG_LAPBETHER=m
+CONFIG_X25_ASY=m
+
+#
+# ATM drivers
+#
+CONFIG_ATM_TCP=m
+CONFIG_ATM_FORE200E_MAYBE=m
+CONFIG_ATM_FORE200E_SBA=y
+CONFIG_ATM_FORE200E_SBA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_USE_TASKLET=y
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E=m
+
+#
+# Amateur Radio support
+#
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+# CONFIG_AX25_DAMA_SLAVE is not set
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_MKISS=m
+CONFIG_6PACK=m
+CONFIG_BPQETHER=m
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_YAM=m
+
+#
+# IrDA (infrared) support
+#
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+CONFIG_IRPORT_SIR=m
+
+#
+# Old Serial dongle support
+#
+CONFIG_DONGLE_OLD=y
+CONFIG_ESI_DONGLE_OLD=m
+CONFIG_ACTISYS_DONGLE_OLD=m
+CONFIG_TEKRAM_DONGLE_OLD=m
+CONFIG_GIRBIL_DONGLE_OLD=m
+CONFIG_LITELINK_DONGLE_OLD=m
+CONFIG_MCP2120_DONGLE_OLD=m
+CONFIG_OLD_BELKIN_DONGLE_OLD=m
+CONFIG_ACT200L_DONGLE_OLD=m
+CONFIG_MA600_DONGLE_OLD=m
+
+#
+# FIR device drivers
+#
+# CONFIG_TOSHIBA_FIR is not set
+
+#
+# Bluetooth support
+#
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIVHCI=m
+
+#
+# Unix98 PTY support
+#
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_VORTEX=m
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_SERIO_CT82C710=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=m
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+CONFIG_JOYSTICK_GUILLEMOT=m
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+CONFIG_JOYSTICK_TWIDDLER=m
+CONFIG_INPUT_JOYDUMP=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+# CONFIG_UMSDOS_FS is not set
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+CONFIG_ADFS_FS_RW=y
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_JFFS_FS=m
+CONFIG_JFFS_FS_VERBOSE=0
+CONFIG_JFFS2_FS=m
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_NAND=y
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_QNX4FS_RW=y
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="iso8859-2"
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=n
+CONFIG_CIFS_XATTR=y
+CONFIG_NCP_FS=m
+CONFIG_NCPFS_PACKET_SIGNING=y
+CONFIG_NCPFS_IOCTL_LOCKING=y
+CONFIG_NCPFS_STRONG=y
+CONFIG_NCPFS_NFS_NS=y
+CONFIG_NCPFS_OS2_NS=y
+CONFIG_NCPFS_SMALLDOS=y
+CONFIG_NCPFS_NLS=y
+CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_INTERMEZZO_FS=m
+CONFIG_AFS_FS=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+CONFIG_RXRPC=m
+
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_SUN_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-2"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# ALSA Sparc devices
+#
+CONFIG_SND_SUN_AMD7930=m
+CONFIG_SND_SUN_CS4231=m
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+# CONFIG_SOUND_BT878 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_CS4281 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+# CONFIG_SOUND_OSS is not set
+# CONFIG_SOUND_AD1980 is not set
+
+#
+# USB support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_SELINUX=y
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+
+#
+# Config for 2.6.6-rc2+cset-20040422_0013
+#
+
+CONFIG_POSIX_MQUEUE=y
+CONFIG_AUDIT=y
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_LIBCRC32C=m
+
+# for pramfs filesystem
+
+CONFIG_PRAMFS=m
+# CONFIG_PRAMFS_NOWP is not set
+CONFIG_ROOT_PRAMFS=y
+
+# CONFIG_USB_PWC is not set
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+
+CONFIG_SENSORS_RTC8564=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_PHIDGETSERVO=m
+
+CONFIG_KALLSYMS_ALL=y
+
+CONFIG_SCSI_DPT_I2O=m
+# 2.6.7 + cset-20040620_0609
+
+CONFIG_BSD_PROCESS_ACCT_V3=y
+
+CONFIG_SCSI_3W_9XXX=m
+
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+CONFIG_VIA_VELOCITY=m
+
+# CONFIG_CIFS_POSIX is not set
+
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+
+# 2.6.7 + cset-20040621_0519
+
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+
+CONFIG_NLS_ASCII=m
+
+CONFIG_VIDEO_OVCAMCHIP=m
+# 2.6.7 + cset-20040622_1819
+
+CONFIG_BLK_DEV_SX8=m
+
+# CONFIG_BLK_DEV_IDE_SATA is not set
+
+CONFIG_SCSI_SATA_NV=m
+
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_BLK_DEV_GNBD=m
+CONFIG_CRC16=m
+
+# cset-20040702_0108
+CONFIG_CRYPTO_TEA=m
+
+# cset-20040701_0409
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+# CONFIG_NET_CLS_ACT is not set
+# CONFIG_NET_ACT_POLICE is not set
+# CONFIG_FB_RIVA_I2C is not set
+# CONFIG_FB_RIVA_DEBUG is not set
+# CONFIG_PROFILING is not set
diff --git a/kernel-sparc64-smp.config b/kernel-sparc64-smp.config
new file mode 100644 (file)
index 0000000..a6dbab5
--- /dev/null
@@ -0,0 +1,1575 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_64BIT=y
+CONFIG_MMU=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_SYSCTL=y
+CONFIG_AUDIT=y
+CONFIG_LOG_BUF_SHIFT=15
+CONFIG_HOTPLUG=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+
+#
+# General setup
+#
+CONFIG_BBC_I2C=m
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_SMP=y
+# CONFIG_PREEMPT is not set
+CONFIG_NR_CPUS=4
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=m
+CONFIG_US3_FREQ=m
+CONFIG_US2E_FREQ=m
+CONFIG_CPU_FREQ_PROC_INTF=m
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+# CONFIG_CPU_FREQ_24_API is not set
+CONFIG_SPARC64=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HUGETLB_PAGE_SIZE_4MB=y
+# CONFIG_HUGETLB_PAGE_SIZE_512K is not set
+# CONFIG_HUGETLB_PAGE_SIZE_64K is not set
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_SBUS=y
+CONFIG_SBUSCHAR=y
+CONFIG_SUN_AUXIO=y
+CONFIG_SUN_IO=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_RTC=y
+# CONFIG_PCI_LEGACY_PROC is not set
+CONFIG_PCI_NAMES=y
+CONFIG_SUN_OPENPROMFS=m
+CONFIG_SPARC32_COMPAT=y
+CONFIG_COMPAT=y
+CONFIG_UID16=y
+CONFIG_BINFMT_ELF32=y
+CONFIG_BINFMT_AOUT32=y
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=m
+CONFIG_SUNOS_EMUL=y
+CONFIG_SOLARIS_EMUL=m
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_SUNBPP=m
+# CONFIG_PARPORT_OTHER is not set
+CONFIG_PARPORT_1284=y
+CONFIG_PRINTER=m
+CONFIG_ENVCTRL=m
+CONFIG_DISPLAY7SEG=m
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_BW2 is not set
+# CONFIG_FB_CG3 is not set
+# CONFIG_FB_CG6 is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON_OLD is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+CONFIG_FB_SBUS=y
+CONFIG_FB_FFB=y
+# CONFIG_FB_TCX is not set
+# CONFIG_FB_CG14 is not set
+# CONFIG_FB_P9100 is not set
+# CONFIG_FB_LEO is not set
+# CONFIG_FB_PCI is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_PROM_CONSOLE=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_SUN8x16=y
+# CONFIG_FONT_SUN12x22 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_SUN_CLUT224=y
+
+#
+# Serial drivers
+#
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SUNCORE=y
+CONFIG_SERIAL_SUNZILOG=m
+CONFIG_SERIAL_SUNSU=m
+CONFIG_SERIAL_SUNSAB=m
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+
+#
+# Misc Linux/SPARC drivers
+#
+CONFIG_SUN_OPENPROMIO=m
+CONFIG_SUN_MOSTEK_RTC=m
+CONFIG_OBP_FLASH=m
+# CONFIG_SUN_BPP is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_SX8=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_BLK_DEV_GNBD=m
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=m
+CONFIG_BLK_DEV_IDE=m
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=m
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDETAPE=m
+CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDESCSI=m
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_TASKFILE_IO is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=m
+# CONFIG_BLK_DEV_IDEPCI is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=y
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=y
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transport Attributes
+#
+CONFIG_SCSI_SPI_ATTRS=y
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
+CONFIG_SCSI_ACARD=m
+CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
+CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
+CONFIG_AIC79XX_ENABLE_RD_STRM=y
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
+CONFIG_SCSI_DPT_I2O=m
+CONFIG_SCSI_MEGARAID=m
+CONFIG_SCSI_SATA=y
+CONFIG_SCSI_SATA_SVW=m
+CONFIG_SCSI_ATA_PIIX=m
+CONFIG_SCSI_SATA_NV=m
+CONFIG_SCSI_SATA_PROMISE=m
+CONFIG_SCSI_SATA_SX4=m
+CONFIG_SCSI_SATA_SIL=m
+CONFIG_SCSI_SATA_SIS=m
+CONFIG_SCSI_SATA_VIA=m
+CONFIG_SCSI_SATA_VITESSE=m
+CONFIG_SCSI_DMX3191D=m
+CONFIG_SCSI_EATA_PIO=m
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_INITIO=m
+CONFIG_SCSI_INIA100=m
+CONFIG_SCSI_PPA=m
+CONFIG_SCSI_IMM=m
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+CONFIG_SCSI_SYM53C8XX_2=y
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+CONFIG_SCSI_QLOGIC_ISP=m
+CONFIG_SCSI_QLOGIC_FC=m
+# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLOGICPTI=m
+CONFIG_SCSI_QLA2XXX=y
+CONFIG_SCSI_QLA21XX=m
+CONFIG_SCSI_QLA22XX=m
+CONFIG_SCSI_QLA2300=m
+CONFIG_SCSI_QLA2322=m
+CONFIG_SCSI_QLA6312=m
+CONFIG_SCSI_QLA6322=m
+CONFIG_SCSI_DC395x=m
+CONFIG_SCSI_DC390T=m
+CONFIG_SCSI_DEBUG=m
+CONFIG_SCSI_SUNESP=m
+
+#
+# Fibre Channel support
+#
+CONFIG_FC4=m
+
+#
+# FC4 drivers
+#
+CONFIG_FC4_SOC=m
+CONFIG_FC4_SOCAL=m
+
+#
+# FC4 targets
+#
+CONFIG_SCSI_PLUTO=m
+CONFIG_SCSI_FCAL=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_ISENSE=m
+CONFIG_FUSION_CTL=m
+CONFIG_FUSION_LAN=m
+
+#
+# IEEE 1394 (FireWire) support
+#
+CONFIG_IEEE1394=m
+
+#
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_IEEE1394_OUI_DB=y
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
+
+#
+# Device Drivers
+#
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
+
+#
+# Protocol Drivers
+#
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=m
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_NAT=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+CONFIG_ARPD=y
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+# CONFIG_ATM_CLIP_NO_ICMP is not set
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+CONFIG_ATM_BR2684_IPFILTER=y
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+CONFIG_DECNET=m
+CONFIG_DECNET_SIOCGIFCONF=y
+CONFIG_DECNET_ROUTER=y
+CONFIG_DECNET_ROUTE_FWMARK=y
+CONFIG_LLC=m
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+# CONFIG_DEV_APPLETALK is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+CONFIG_NET_DIVERT=y
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CLK_JIFFIES=y
+# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
+# CONFIG_NET_SCH_CLK_CPU is not set
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_WRR=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_ESFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+# CONFIG_NET_CLS_ACT is not set
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_RX is not set
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+CONFIG_AX25_DAMA_SLAVE=y
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+# CONFIG_BPQETHER is not set
+# CONFIG_BAYCOM_SER_FDX is not set
+# CONFIG_BAYCOM_SER_HDX is not set
+# CONFIG_BAYCOM_PAR is not set
+# CONFIG_YAM is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+
+#
+# Old SIR device drivers
+#
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+CONFIG_SIGMATEL_FIR=m
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_IMQ=m
+CONFIG_TUN=m
+# CONFIG_ETHERTAP is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_SUNLANCE=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNBMAC=m
+CONFIG_SUNQE=m
+CONFIG_SUNGEM=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_HP100=m
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_AMD8111_ETH=m
+# CONFIG_AMD8111E_NAPI is not set
+CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
+CONFIG_B44=m
+CONFIG_FORCEDETH=m
+CONFIG_DGRS=m
+CONFIG_EEPRO100=m
+# CONFIG_EEPRO100_PIO is not set
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+CONFIG_SUNDANCE_MMIO=y
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_VELOCITY=m
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_MYRI_SBUS=m
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_SK98LIN=m
+CONFIG_TIGON3=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# ATM drivers
+#
+CONFIG_ATM_TCP=m
+CONFIG_ATM_LANAI=m
+CONFIG_ATM_ENI=m
+# CONFIG_ATM_ENI_DEBUG is not set
+# CONFIG_ATM_ENI_TUNE_BURST is not set
+CONFIG_ATM_FIRESTREAM=m
+CONFIG_ATM_ZATM=m
+# CONFIG_ATM_ZATM_DEBUG is not set
+CONFIG_ATM_IDT77252=m
+# CONFIG_ATM_IDT77252_DEBUG is not set
+# CONFIG_ATM_IDT77252_RCV_ALL is not set
+CONFIG_ATM_IDT77252_USE_SUNI=y
+CONFIG_ATM_AMBASSADOR=m
+# CONFIG_ATM_AMBASSADOR_DEBUG is not set
+CONFIG_ATM_HORIZON=m
+# CONFIG_ATM_HORIZON_DEBUG is not set
+CONFIG_ATM_FORE200E_MAYBE=m
+CONFIG_ATM_FORE200E_PCA=y
+CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_SBA=y
+CONFIG_ATM_FORE200E_SBA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_USE_TASKLET=y
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E=m
+CONFIG_ATM_HE=m
+CONFIG_ATM_HE_USE_SUNI=y
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+# CONFIG_SLIP_MODE_SLIP6 is not set
+CONFIG_NET_FC=y
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+CONFIG_PHONE=m
+CONFIG_PHONE_IXJ=m
+
+#
+# Unix98 PTY support
+#
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# XFree86 DRI support
+#
+CONFIG_DRM=y
+CONFIG_DRM_FFB=m
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_R128=m
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+# CONFIG_GAMEPORT_NS558 is not set
+# CONFIG_GAMEPORT_L4 is not set
+# CONFIG_GAMEPORT_EMU10K1 is not set
+# CONFIG_GAMEPORT_VORTEX is not set
+# CONFIG_GAMEPORT_FM801 is not set
+# CONFIG_GAMEPORT_CS461x is not set
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=m
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+CONFIG_SERIO_PCIPS2=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=m
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_VSXXXAA=m
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_SPARCSPKR=m
+# CONFIG_INPUT_UINPUT is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI1563=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_I810=m
+CONFIG_I2C_ISA=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_PARPORT=m
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+CONFIG_I2C_VOODOO3=m
+
+#
+# Hardware Sensors Chip support
+#
+CONFIG_I2C_SENSOR=m
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+CONFIG_SENSORS_ADM1031=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM77=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+
+#
+# Other I2C Chip support
+#
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_RTC8564=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_UMSDOS_FS is not set
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_SYSFS=y
+# CONFIG_DEVFS_FS is not set
+CONFIG_DEVPTS_FS_XATTR=y
+# CONFIG_DEVPTS_FS_SECURITY is not set
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+# CONFIG_ADFS_FS_RW is not set
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+# CONFIG_QNX4FS_RW is not set
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
+CONFIG_NCP_FS=m
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_AFS_FS=m
+CONFIG_RXRPC=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_SUN_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-2"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+
+#
+# Video For Linux
+#
+
+#
+# Video Adapters
+#
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+CONFIG_VIDEO_ZORAN=m
+CONFIG_VIDEO_ZORAN_BUZ=m
+CONFIG_VIDEO_ZORAN_DC10=m
+CONFIG_VIDEO_ZORAN_DC30=m
+CONFIG_VIDEO_ZORAN_LML33=m
+CONFIG_VIDEO_ZORAN_LML33R10=m
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+CONFIG_VIDEO_HEXIUM_ORION=m
+CONFIG_VIDEO_HEXIUM_GEMINI=m
+CONFIG_VIDEO_CX88=m
+CONFIG_VIDEO_OVCAMCHIP=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR=m
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_BIT32_EMUL=m
+CONFIG_SND_RTCTIMER=m
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_MPU401_UART=m
+CONFIG_SND_OPL3_LIB=m
+CONFIG_SND_VX_LIB=m
+CONFIG_SND_DUMMY=m
+CONFIG_SND_VIRMIDI=m
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# PCI devices
+#
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+CONFIG_SND_CS46XX=m
+CONFIG_SND_CS46XX_NEW_DSP=y
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VX222=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+
+#
+# ALSA Sparc devices
+#
+CONFIG_SND_SUN_AMD7930=m
+CONFIG_SND_SUN_CS4231=m
+
+#
+# USB support
+#
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_BANDWIDTH is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+# CONFIG_USB_EHCI_SPLIT_ISO is not set
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_UHCI_HCD=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_AUDIO=m
+
+#
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+#
+CONFIG_USB_MIDI=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+
+#
+# USB Human Interface Devices (HID)
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+# CONFIG_HID_FF is not set
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+# CONFIG_USB_AIPTEK is not set
+CONFIG_USB_WACOM=m
+CONFIG_USB_KBTAB=m
+# CONFIG_USB_POWERMATE is not set
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_EGALAX=m
+# CONFIG_USB_XPAD is not set
+CONFIG_USB_ATI_REMOTE=m
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+# CONFIG_USB_DABUSB is not set
+# CONFIG_USB_VICAM is not set
+# CONFIG_USB_DSBR is not set
+# CONFIG_USB_IBMCAM is not set
+# CONFIG_USB_KONICAWC is not set
+# CONFIG_USB_OV511 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_SE401 is not set
+# CONFIG_USB_SN9C102 is not set
+# CONFIG_USB_STV680 is not set
+CONFIG_USB_W9968CF=m
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_AX8817X=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_VISOR is not set
+CONFIG_USB_SERIAL_IPAQ=m
+# CONFIG_USB_SERIAL_IR is not set
+CONFIG_USB_SERIAL_EDGEPORT=m
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_SAFE is not set
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_TIGL is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_LED=m
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_TEST=m
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_DCFLUSH is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_STACK_DEBUG is not set
+# CONFIG_DEBUG_BOOTMEM is not set
+CONFIG_HAVE_DEC_LOCK=y
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+# CONFIG_SECURITY_NETWORK is not set
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_LIBCRC32C=m
+CONFIG_QSORT=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
diff --git a/kernel-sparc64.config b/kernel-sparc64.config
new file mode 100644 (file)
index 0000000..b4ff22e
--- /dev/null
@@ -0,0 +1,1699 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_64BIT=y
+CONFIG_MMU=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_SYSCTL=y
+CONFIG_AUDIT=y
+CONFIG_LOG_BUF_SHIFT=15
+CONFIG_HOTPLUG=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# General setup
+#
+CONFIG_BBC_I2C=m
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=m
+CONFIG_US3_FREQ=m
+CONFIG_US2E_FREQ=m
+CONFIG_CPU_FREQ_PROC_INTF=m
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+# CONFIG_CPU_FREQ_24_API is not set
+CONFIG_SPARC64=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HUGETLB_PAGE_SIZE_4MB=y
+# CONFIG_HUGETLB_PAGE_SIZE_512K is not set
+# CONFIG_HUGETLB_PAGE_SIZE_64K is not set
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_SBUS=y
+CONFIG_SBUSCHAR=y
+CONFIG_SUN_AUXIO=y
+CONFIG_SUN_IO=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_RTC=y
+# CONFIG_PCI_LEGACY_PROC is not set
+CONFIG_PCI_NAMES=y
+CONFIG_SUN_OPENPROMFS=m
+CONFIG_SPARC32_COMPAT=y
+CONFIG_COMPAT=y
+CONFIG_UID16=y
+CONFIG_BINFMT_ELF32=y
+CONFIG_BINFMT_AOUT32=y
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=m
+CONFIG_SUNOS_EMUL=y
+CONFIG_SOLARIS_EMUL=m
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_SUNBPP=m
+# CONFIG_PARPORT_OTHER is not set
+CONFIG_PARPORT_1284=y
+CONFIG_PRINTER=m
+CONFIG_ENVCTRL=m
+CONFIG_DISPLAY7SEG=m
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_BW2 is not set
+CONFIG_FB_CG3=y
+CONFIG_FB_CG6=y
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON_OLD is not set
+# CONFIG_FB_RADEON is not set
+CONFIG_FB_ATY128=m
+CONFIG_FB_ATY=m
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
+CONFIG_FB_ATY_XL_INIT=y
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+CONFIG_FB_SBUS=y
+CONFIG_FB_FFB=y
+CONFIG_FB_TCX=y
+CONFIG_FB_CG14=y
+CONFIG_FB_P9100=y
+CONFIG_FB_LEO=y
+CONFIG_FB_PCI=y
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_MDA_CONSOLE is not set
+# CONFIG_PROM_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_SUN8x16=y
+# CONFIG_FONT_SUN12x22 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_SUN_CLUT224=y
+
+#
+# Serial drivers
+#
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SUNCORE=y
+CONFIG_SERIAL_SUNZILOG=y
+CONFIG_SERIAL_SUNZILOG_CONSOLE=y
+CONFIG_SERIAL_SUNSU=y
+CONFIG_SERIAL_SUNSU_CONSOLE=y
+CONFIG_SERIAL_SUNSAB=m
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+
+#
+# Misc Linux/SPARC drivers
+#
+CONFIG_SUN_OPENPROMIO=m
+CONFIG_SUN_MOSTEK_RTC=m
+CONFIG_OBP_FLASH=m
+# CONFIG_SUN_BPP is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_SX8=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_BLK_DEV_GNBD=m
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=m
+CONFIG_BLK_DEV_IDE=m
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=m
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDETAPE=m
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=m
+CONFIG_BLK_DEV_IDEPCI=y
+# CONFIG_IDEPCI_SHARE_IRQ is not set
+# CONFIG_BLK_DEV_OFFBOARD is not set
+# CONFIG_BLK_DEV_GENERIC is not set
+CONFIG_BLK_DEV_OPTI621=m
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+CONFIG_IDEDMA_ONLYDISK=y
+CONFIG_BLK_DEV_ADMA=y
+CONFIG_BLK_DEV_AEC62XX=m
+CONFIG_BLK_DEV_ALI15X3=m
+# CONFIG_WDC_ALI15X3 is not set
+CONFIG_BLK_DEV_AMD74XX=m
+CONFIG_BLK_DEV_CMD64X=m
+CONFIG_BLK_DEV_TRIFLEX=m
+CONFIG_BLK_DEV_CY82C693=m
+CONFIG_BLK_DEV_CS5520=m
+CONFIG_BLK_DEV_CS5530=m
+CONFIG_BLK_DEV_HPT34X=m
+# CONFIG_HPT34X_AUTODMA is not set
+CONFIG_BLK_DEV_HPT366=m
+CONFIG_BLK_DEV_SC1200=m
+CONFIG_BLK_DEV_PIIX=m
+CONFIG_BLK_DEV_NS87415=m
+CONFIG_BLK_DEV_PDC202XX_OLD=m
+CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=m
+CONFIG_PDC202XX_FORCE=y
+CONFIG_BLK_DEV_SVWKS=m
+CONFIG_BLK_DEV_SIIMAGE=m
+CONFIG_BLK_DEV_SLC90E66=m
+CONFIG_BLK_DEV_TRM290=m
+CONFIG_BLK_DEV_VIA82CXXX=m
+# CONFIG_IDE_ARM is not set
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_IVB is not set
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transport Attributes
+#
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
+CONFIG_SCSI_ACARD=m
+CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
+CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
+CONFIG_AIC79XX_ENABLE_RD_STRM=y
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
+CONFIG_SCSI_DPT_I2O=m
+CONFIG_SCSI_MEGARAID=m
+CONFIG_SCSI_SATA=y
+CONFIG_SCSI_SATA_SVW=m
+CONFIG_SCSI_ATA_PIIX=m
+CONFIG_SCSI_SATA_NV=m
+CONFIG_SCSI_SATA_PROMISE=m
+CONFIG_SCSI_SATA_SX4=m
+CONFIG_SCSI_SATA_SIL=m
+CONFIG_SCSI_SATA_SIS=m
+CONFIG_SCSI_SATA_VIA=m
+CONFIG_SCSI_SATA_VITESSE=m
+CONFIG_SCSI_DMX3191D=m
+CONFIG_SCSI_EATA_PIO=m
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_INITIO=m
+CONFIG_SCSI_INIA100=m
+CONFIG_SCSI_PPA=m
+CONFIG_SCSI_IMM=m
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+CONFIG_SCSI_QLOGIC_ISP=m
+CONFIG_SCSI_QLOGIC_FC=m
+CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLOGICPTI=m
+CONFIG_SCSI_QLA2XXX=m
+CONFIG_SCSI_QLA21XX=m
+CONFIG_SCSI_QLA22XX=m
+CONFIG_SCSI_QLA2300=m
+CONFIG_SCSI_QLA2322=m
+CONFIG_SCSI_QLA6312=m
+CONFIG_SCSI_QLA6322=m
+CONFIG_SCSI_DC395x=m
+CONFIG_SCSI_DC390T=m
+CONFIG_SCSI_DEBUG=m
+CONFIG_SCSI_SUNESP=m
+
+#
+# Fibre Channel support
+#
+CONFIG_FC4=m
+
+#
+# FC4 drivers
+#
+CONFIG_FC4_SOC=m
+CONFIG_FC4_SOCAL=m
+
+#
+# FC4 targets
+#
+CONFIG_SCSI_PLUTO=m
+CONFIG_SCSI_FCAL=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_ISENSE=m
+CONFIG_FUSION_CTL=m
+CONFIG_FUSION_LAN=m
+
+#
+# IEEE 1394 (FireWire) support
+#
+CONFIG_IEEE1394=m
+
+#
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_IEEE1394_OUI_DB=y
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
+
+#
+# Device Drivers
+#
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
+
+#
+# Protocol Drivers
+#
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=m
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_NAT=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+CONFIG_ARPD=y
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+# CONFIG_ATM_CLIP_NO_ICMP is not set
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+CONFIG_ATM_BR2684_IPFILTER=y
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+CONFIG_DECNET=m
+CONFIG_DECNET_SIOCGIFCONF=y
+CONFIG_DECNET_ROUTER=y
+CONFIG_DECNET_ROUTE_FWMARK=y
+CONFIG_LLC=m
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+# CONFIG_DEV_APPLETALK is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+CONFIG_NET_DIVERT=y
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+# CONFIG_NET_SCH_CLK_JIFFIES is not set
+# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
+CONFIG_NET_SCH_CLK_CPU=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_WRR=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_ESFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+# CONFIG_NET_CLS_ACT is not set
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+CONFIG_AX25_DAMA_SLAVE=y
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_MKISS=m
+CONFIG_6PACK=m
+CONFIG_BPQETHER=m
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_YAM=m
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+CONFIG_SIGMATEL_FIR=m
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_IMQ=m
+CONFIG_TUN=m
+# CONFIG_ETHERTAP is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_SUNLANCE=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNBMAC=m
+CONFIG_SUNQE=m
+CONFIG_SUNGEM=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_HP100=m
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+# CONFIG_AMD8111_ETH is not set
+CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
+CONFIG_B44=m
+CONFIG_FORCEDETH=m
+CONFIG_DGRS=m
+CONFIG_EEPRO100=m
+# CONFIG_EEPRO100_PIO is not set
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+CONFIG_SUNDANCE_MMIO=y
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_VELOCITY=m
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_MYRI_SBUS=m
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_SK98LIN=m
+CONFIG_TIGON3=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+
+#
+# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
+#
+CONFIG_PRISM54=m
+CONFIG_NET_WIRELESS=y
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# ATM drivers
+#
+CONFIG_ATM_TCP=m
+CONFIG_ATM_LANAI=m
+CONFIG_ATM_ENI=m
+# CONFIG_ATM_ENI_DEBUG is not set
+# CONFIG_ATM_ENI_TUNE_BURST is not set
+CONFIG_ATM_FIRESTREAM=m
+CONFIG_ATM_ZATM=m
+# CONFIG_ATM_ZATM_DEBUG is not set
+CONFIG_ATM_IDT77252=m
+# CONFIG_ATM_IDT77252_DEBUG is not set
+# CONFIG_ATM_IDT77252_RCV_ALL is not set
+CONFIG_ATM_IDT77252_USE_SUNI=y
+CONFIG_ATM_AMBASSADOR=m
+# CONFIG_ATM_AMBASSADOR_DEBUG is not set
+CONFIG_ATM_HORIZON=m
+# CONFIG_ATM_HORIZON_DEBUG is not set
+CONFIG_ATM_FORE200E_MAYBE=m
+CONFIG_ATM_FORE200E_PCA=y
+CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_SBA=y
+CONFIG_ATM_FORE200E_SBA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_USE_TASKLET=y
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E=m
+CONFIG_ATM_HE=m
+CONFIG_ATM_HE_USE_SUNI=y
+CONFIG_FDDI=y
+# CONFIG_DEFXX is not set
+CONFIG_SKFP=m
+CONFIG_HIPPI=y
+# CONFIG_ROADRUNNER is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+# CONFIG_SLIP_MODE_SLIP6 is not set
+CONFIG_NET_FC=y
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+CONFIG_PHONE=m
+CONFIG_PHONE_IXJ=m
+
+#
+# Unix98 PTY support
+#
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# XFree86 DRI support
+#
+CONFIG_DRM=y
+CONFIG_DRM_FFB=m
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_R128=m
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+# CONFIG_GAMEPORT_NS558 is not set
+# CONFIG_GAMEPORT_L4 is not set
+# CONFIG_GAMEPORT_EMU10K1 is not set
+# CONFIG_GAMEPORT_VORTEX is not set
+# CONFIG_GAMEPORT_FM801 is not set
+# CONFIG_GAMEPORT_CS461x is not set
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=m
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+CONFIG_SERIO_PCIPS2=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=m
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_VSXXXAA=m
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_SPARCSPKR=m
+# CONFIG_INPUT_UINPUT is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI1563=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_I810=m
+CONFIG_I2C_ISA=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_PARPORT=m
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+CONFIG_I2C_VOODOO3=m
+
+#
+# Hardware Sensors Chip support
+#
+CONFIG_I2C_SENSOR=m
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+CONFIG_SENSORS_ADM1031=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM77=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+
+#
+# Other I2C Chip support
+#
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_RTC8564=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=m
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_UMSDOS_FS is not set
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS_XATTR=y
+# CONFIG_DEVPTS_FS_SECURITY is not set
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+# CONFIG_ADFS_FS_RW is not set
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+# CONFIG_QNX4FS_RW is not set
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="iso8859-2"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
+CONFIG_NCP_FS=m
+CONFIG_NCPFS_PACKET_SIGNING=y
+CONFIG_NCPFS_IOCTL_LOCKING=y
+CONFIG_NCPFS_STRONG=y
+CONFIG_NCPFS_NFS_NS=y
+CONFIG_NCPFS_OS2_NS=y
+CONFIG_NCPFS_SMALLDOS=y
+CONFIG_NCPFS_NLS=y
+CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_AFS_FS=m
+CONFIG_RXRPC=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_SUN_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-2"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+
+#
+# Video For Linux
+#
+
+#
+# Video Adapters
+#
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+CONFIG_VIDEO_ZORAN=m
+CONFIG_VIDEO_ZORAN_BUZ=m
+CONFIG_VIDEO_ZORAN_DC10=m
+CONFIG_VIDEO_ZORAN_DC30=m
+CONFIG_VIDEO_ZORAN_LML33=m
+CONFIG_VIDEO_ZORAN_LML33R10=m
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+CONFIG_VIDEO_HEXIUM_ORION=m
+CONFIG_VIDEO_HEXIUM_GEMINI=m
+CONFIG_VIDEO_CX88=m
+CONFIG_VIDEO_OVCAMCHIP=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_TWINHAN_DST=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_VES1X93=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_NXT6000=m
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR=m
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_BIT32_EMUL=m
+CONFIG_SND_RTCTIMER=m
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_MPU401_UART=m
+CONFIG_SND_OPL3_LIB=m
+CONFIG_SND_VX_LIB=m
+CONFIG_SND_DUMMY=m
+CONFIG_SND_VIRMIDI=m
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# PCI devices
+#
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+CONFIG_SND_CS46XX=m
+CONFIG_SND_CS46XX_NEW_DSP=y
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+# CONFIG_SND_VIA82XX is not set
+CONFIG_SND_VX222=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+
+#
+# ALSA Sparc devices
+#
+CONFIG_SND_SUN_AMD7930=m
+CONFIG_SND_SUN_CS4231=m
+
+#
+# USB support
+#
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_BANDWIDTH is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_UHCI_HCD=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_AUDIO=m
+
+#
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+#
+CONFIG_USB_MIDI=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+
+#
+# USB Human Interface Devices (HID)
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+# CONFIG_HID_FF is not set
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+# CONFIG_USB_AIPTEK is not set
+CONFIG_USB_WACOM=m
+CONFIG_USB_KBTAB=m
+CONFIG_USB_POWERMATE=m
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_XPAD=m
+CONFIG_USB_ATI_REMOTE=m
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_DABUSB=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_OV511=m
+CONFIG_USB_PWC=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+CONFIG_USB_W9968CF=m
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_AX8817X=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_LED=m
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_TEST=m
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_DCFLUSH is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_STACK_DEBUG is not set
+# CONFIG_DEBUG_BOOTMEM is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+# CONFIG_SECURITY_NETWORK is not set
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_LIBCRC32C=m
+CONFIG_QSORT=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
diff --git a/kernel-x86_64-smp.config b/kernel-x86_64-smp.config
new file mode 100644 (file)
index 0000000..dfcbf96
--- /dev/null
@@ -0,0 +1,2268 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_X86_64=y
+CONFIG_64BIT=y
+CONFIG_X86=y
+CONFIG_MMU=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_GENERIC_ISA_DMA=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_SYSCTL=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HOTPLUG=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+
+#
+# Processor type and features
+#
+CONFIG_MK8=y
+# CONFIG_MPSC is not set
+# CONFIG_GENERIC_CPU is not set
+CONFIG_X86_L1_CACHE_BYTES=64
+CONFIG_X86_L1_CACHE_SHIFT=6
+CONFIG_X86_TSC=y
+CONFIG_X86_GOOD_APIC=y
+# CONFIG_MICROCODE is not set
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_MTRR=y
+CONFIG_SMP=y
+# CONFIG_PREEMPT is not set
+CONFIG_SCHED_SMT=y
+CONFIG_K8_NUMA=y
+CONFIG_DISCONTIGMEM=y
+CONFIG_NUMA=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_NR_CPUS=8
+CONFIG_GART_IOMMU=y
+CONFIG_SWIOTLB=y
+CONFIG_X86_MCE=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_SOFTWARE_SUSPEND is not set
+
+#
+# ACPI (Advanced Configuration and Power Interface) Support
+#
+CONFIG_ACPI=y
+CONFIG_ACPI_BOOT=y
+CONFIG_ACPI_INTERPRETER=y
+CONFIG_ACPI_SLEEP=y
+CONFIG_ACPI_SLEEP_PROC_FS=y
+CONFIG_ACPI_AC=m
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_FAN=m
+CONFIG_ACPI_PROCESSOR=m
+CONFIG_ACPI_THERMAL=m
+CONFIG_ACPI_ASUS=m
+CONFIG_ACPI_TOSHIBA=m
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_BUS=y
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_PCI=y
+CONFIG_ACPI_SYSTEM=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_PROC_INTF=m
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+# CONFIG_CPU_FREQ_24_API is not set
+CONFIG_CPU_FREQ_TABLE=m
+
+#
+# CPUFreq processor drivers
+#
+CONFIG_X86_POWERNOW_K8=m
+CONFIG_X86_POWERNOW_K8_ACPI=y
+# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
+CONFIG_X86_ACPI_CPUFREQ=m
+# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+# CONFIG_UNORDERED_IO is not set
+CONFIG_PCI_MSI=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_YENTA=m
+CONFIG_CARDBUS=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_TCIC=m
+
+#
+# PCI Hotplug Support
+#
+CONFIG_HOTPLUG_PCI=m
+CONFIG_HOTPLUG_PCI_FAKE=m
+CONFIG_HOTPLUG_PCI_ACPI=m
+CONFIG_HOTPLUG_PCI_ACPI_IBM=m
+CONFIG_HOTPLUG_PCI_CPCI=y
+CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
+CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
+CONFIG_HOTPLUG_PCI_PCIE=m
+CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE=y
+CONFIG_HOTPLUG_PCI_SHPC=m
+CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE=y
+
+#
+# Executable file formats / Emulations
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=m
+CONFIG_IA32_EMULATION=y
+CONFIG_IA32_AOUT=y
+CONFIG_COMPAT=y
+CONFIG_SYSVIPC_COMPAT=y
+CONFIG_UID16=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+# CONFIG_STANDALONE is not set
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_REDBOOT_PARTS=m
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
+CONFIG_MTD_REDBOOT_PARTS_READONLY=y
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLOCK=m
+CONFIG_MTD_BLOCK_RO=m
+CONFIG_FTL=m
+CONFIG_NFTL=m
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=m
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=m
+CONFIG_MTD_CFI_AMDSTD=m
+CONFIG_MTD_CFI_AMDSTD_RETRY=0
+CONFIG_MTD_CFI_STAA=m
+CONFIG_MTD_CFI_UTIL=m
+CONFIG_MTD_RAM=m
+CONFIG_MTD_ROM=m
+CONFIG_MTD_ABSENT=m
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=m
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x4000000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+CONFIG_MTD_PNC2000=m
+CONFIG_MTD_SC520CDP=m
+CONFIG_MTD_NETSC520=m
+CONFIG_MTD_SBC_GXX=m
+CONFIG_MTD_ELAN_104NC=m
+CONFIG_MTD_SCx200_DOCFLASH=m
+CONFIG_MTD_AMD76XROM=m
+CONFIG_MTD_ICHXROM=m
+CONFIG_MTD_SCB2_FLASH=m
+CONFIG_MTD_NETtel=m
+CONFIG_MTD_DILNETPC=m
+CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
+CONFIG_MTD_L440GX=m
+CONFIG_MTD_PCI=m
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_PMC551=m
+CONFIG_MTD_PMC551_BUGFIX=y
+# CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_SLRAM=m
+CONFIG_MTD_PHRAM=m
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+CONFIG_MTD_BLKMTD=m
+
+#
+# Disk-On-Chip Device Drivers
+#
+CONFIG_MTD_DOC2000=m
+CONFIG_MTD_DOC2001=m
+CONFIG_MTD_DOC2001PLUS=m
+CONFIG_MTD_DOCPROBE=m
+CONFIG_MTD_DOCECC=m
+# CONFIG_MTD_DOCPROBE_ADVANCED is not set
+CONFIG_MTD_DOCPROBE_ADDRESS=0
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+CONFIG_MTD_NAND_IDS=m
+CONFIG_MTD_NAND_DISKONCHIP=m
+# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
+CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
+CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_CML1=m
+CONFIG_PARPORT_SERIAL=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_PC_PCMCIA=m
+# CONFIG_PARPORT_OTHER is not set
+CONFIG_PARPORT_1284=y
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=m
+CONFIG_PARIDE=m
+CONFIG_PARIDE_PARPORT=m
+
+#
+# Parallel IDE high-level drivers
+#
+CONFIG_PARIDE_PD=m
+CONFIG_PARIDE_PCD=m
+CONFIG_PARIDE_PF=m
+CONFIG_PARIDE_PT=m
+CONFIG_PARIDE_PG=m
+
+#
+# Parallel IDE protocol modules
+#
+CONFIG_PARIDE_ATEN=m
+CONFIG_PARIDE_BPCK=m
+CONFIG_PARIDE_COMM=m
+CONFIG_PARIDE_DSTR=m
+CONFIG_PARIDE_FIT2=m
+CONFIG_PARIDE_FIT3=m
+CONFIG_PARIDE_EPAT=m
+CONFIG_PARIDE_EPATC8=y
+CONFIG_PARIDE_EPIA=m
+CONFIG_PARIDE_FRIQ=m
+CONFIG_PARIDE_FRPW=m
+CONFIG_PARIDE_KBIC=m
+CONFIG_PARIDE_KTTI=m
+CONFIG_PARIDE_ON20=m
+CONFIG_PARIDE_ON26=m
+CONFIG_BLK_CPQ_DA=m
+CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+CONFIG_BLK_DEV_DAC960=m
+CONFIG_BLK_DEV_UMEM=m
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_SX8=m
+CONFIG_BLK_DEV_UB=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_GNBD=m
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=m
+CONFIG_BLK_DEV_IDE=m
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDEDISK=m
+CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_BLK_DEV_IDECS=m
+CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDETAPE=m
+CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDESCSI=m
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=m
+# CONFIG_BLK_DEV_CMD640 is not set
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=m
+CONFIG_BLK_DEV_OPTI621=m
+CONFIG_BLK_DEV_RZ1000=m
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_ONLYDISK is not set
+CONFIG_BLK_DEV_ADMA=y
+CONFIG_BLK_DEV_AEC62XX=m
+CONFIG_BLK_DEV_ALI15X3=m
+# CONFIG_WDC_ALI15X3 is not set
+CONFIG_BLK_DEV_AMD74XX=m
+CONFIG_BLK_DEV_ATIIXP=m
+CONFIG_BLK_DEV_CMD64X=m
+CONFIG_BLK_DEV_TRIFLEX=m
+CONFIG_BLK_DEV_CY82C693=m
+CONFIG_BLK_DEV_CS5520=m
+CONFIG_BLK_DEV_CS5530=m
+CONFIG_BLK_DEV_HPT34X=m
+# CONFIG_HPT34X_AUTODMA is not set
+CONFIG_BLK_DEV_HPT366=m
+CONFIG_BLK_DEV_SC1200=m
+CONFIG_BLK_DEV_PIIX=m
+CONFIG_BLK_DEV_NS87415=m
+CONFIG_BLK_DEV_PDC202XX_OLD=m
+CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=m
+CONFIG_PDC202XX_FORCE=y
+CONFIG_BLK_DEV_SVWKS=m
+CONFIG_BLK_DEV_SIIMAGE=m
+CONFIG_BLK_DEV_SIS5513=m
+CONFIG_BLK_DEV_SLC90E66=m
+CONFIG_BLK_DEV_TRM290=m
+CONFIG_BLK_DEV_VIA82CXXX=m
+# CONFIG_IDE_ARM is not set
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDEDMA_IVB=y
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+CONFIG_SCSI_LOGGING=y
+
+#
+# SCSI Transport Attributes
+#
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
+CONFIG_SCSI_ACARD=m
+CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
+CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+CONFIG_AIC79XX_REG_PRETTY_PRINT=y
+CONFIG_MEGARAID_NEWGEN=y
+CONFIG_MEGARAID_MM=m
+CONFIG_MEGARAID_MAILBOX=m
+CONFIG_SCSI_SATA=y
+CONFIG_SCSI_SATA_SVW=m
+CONFIG_SCSI_ATA_PIIX=m
+CONFIG_SCSI_SATA_NV=m
+CONFIG_SCSI_SATA_PROMISE=m
+CONFIG_SCSI_SATA_SX4=m
+CONFIG_SCSI_SATA_SIL=m
+CONFIG_SCSI_SATA_SIS=m
+CONFIG_SCSI_SATA_VIA=m
+CONFIG_SCSI_SATA_VITESSE=m
+CONFIG_SCSI_BUSLOGIC=m
+# CONFIG_SCSI_OMIT_FLASHPOINT is not set
+CONFIG_SCSI_DMX3191D=m
+CONFIG_SCSI_EATA=m
+CONFIG_SCSI_EATA_TAGGED_QUEUE=y
+CONFIG_SCSI_EATA_LINKED_COMMANDS=y
+CONFIG_SCSI_EATA_MAX_TAGS=16
+CONFIG_SCSI_EATA_PIO=m
+CONFIG_SCSI_FUTURE_DOMAIN=m
+CONFIG_SCSI_GDTH=m
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_INITIO=m
+CONFIG_SCSI_INIA100=m
+CONFIG_SCSI_PPA=m
+CONFIG_SCSI_IMM=m
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+CONFIG_SCSI_QLOGIC_ISP=m
+CONFIG_SCSI_QLOGIC_FC=m
+CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA2XXX=m
+CONFIG_SCSI_QLA21XX=m
+CONFIG_SCSI_QLA22XX=m
+CONFIG_SCSI_QLA2300=m
+CONFIG_SCSI_QLA2322=m
+CONFIG_SCSI_QLA6312=m
+CONFIG_SCSI_QLA6322=m
+CONFIG_SCSI_DC395x=m
+CONFIG_SCSI_DC390T=m
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# PCMCIA SCSI adapter support
+#
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_CTL=m
+CONFIG_FUSION_LAN=m
+
+#
+# IEEE 1394 (FireWire) support
+#
+CONFIG_IEEE1394=m
+
+#
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_IEEE1394_OUI_DB=y
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
+
+#
+# Device Drivers
+#
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
+
+#
+# Protocol Drivers
+#
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# I2O device support
+#
+CONFIG_I2O=m
+CONFIG_I2O_CONFIG=m
+CONFIG_I2O_BLOCK=m
+CONFIG_I2O_SCSI=m
+CONFIG_I2O_PROC=m
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_TUNNEL=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+CONFIG_ATM_CLIP_NO_ICMP=y
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+CONFIG_DECNET=m
+# CONFIG_DECNET_SIOCGIFCONF is not set
+# CONFIG_DECNET_ROUTER is not set
+CONFIG_LLC=y
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=y
+CONFIG_IPDDP=m
+# CONFIG_IPDDP_ENCAP is not set
+# CONFIG_IPDDP_DECAP is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+CONFIG_ECONET_AUNUDP=y
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+# CONFIG_NET_SCH_CLK_JIFFIES is not set
+# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
+CONFIG_NET_SCH_CLK_CPU=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_WRR=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_ESFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+# CONFIG_NET_CLS_ACT is not set
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+# CONFIG_AX25_DAMA_SLAVE is not set
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_BPQETHER=m
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_YAM=m
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+CONFIG_SIGMATEL_FIR=m
+CONFIG_VLSI_FIR=m
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_IMQ=m
+CONFIG_TUN=m
+CONFIG_ETHERTAP=m
+
+#
+# ARCnet devices
+#
+CONFIG_ARCNET=m
+CONFIG_ARCNET_1201=m
+CONFIG_ARCNET_1051=m
+CONFIG_ARCNET_RAW=m
+CONFIG_ARCNET_COM90xx=m
+CONFIG_ARCNET_COM90xxIO=m
+CONFIG_ARCNET_RIM_I=m
+CONFIG_ARCNET_COM20020=m
+CONFIG_ARCNET_COM20020_PCI=m
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_PCMCIA_XIRCOM=m
+CONFIG_HP100=m
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
+CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
+CONFIG_B44=m
+CONFIG_FORCEDETH=m
+CONFIG_DGRS=m
+CONFIG_EEPRO100=m
+# CONFIG_EEPRO100_PIO is not set
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_VELOCITY=m
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
+CONFIG_SK98LIN=m
+CONFIG_TIGON3=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+
+#
+# Token Ring devices
+#
+CONFIG_TR=y
+CONFIG_IBMOL=m
+CONFIG_3C359=m
+CONFIG_TMS380TR=m
+CONFIG_TMSPCI=m
+CONFIG_ABYSS=m
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+CONFIG_PCMCIA_RAYCS=m
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+
+#
+# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
+#
+CONFIG_PRISM54=m
+CONFIG_NET_WIRELESS=y
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_ARCNET_COM20020_CS=m
+
+#
+# Wan interfaces
+#
+CONFIG_WAN=y
+CONFIG_DSCC4=m
+CONFIG_DSCC4_PCISYNC=y
+CONFIG_DSCC4_PCI_RST=y
+CONFIG_LANMEDIA=m
+CONFIG_SYNCLINK_SYNCPPP=m
+CONFIG_HDLC=m
+CONFIG_HDLC_RAW=y
+CONFIG_HDLC_RAW_ETH=y
+CONFIG_HDLC_CISCO=y
+CONFIG_HDLC_FR=y
+CONFIG_HDLC_PPP=y
+CONFIG_HDLC_X25=y
+# CONFIG_TAHOE9XX is not set
+CONFIG_PCI200SYN=m
+CONFIG_WANXL=m
+CONFIG_PC300=m
+CONFIG_PC300_MLPPP=y
+CONFIG_FARSYNC=m
+CONFIG_DLCI=m
+CONFIG_DLCI_COUNT=24
+CONFIG_DLCI_MAX=8
+CONFIG_WAN_ROUTER_DRIVERS=y
+CONFIG_CYCLADES_SYNC=m
+CONFIG_CYCLOMX_X25=y
+CONFIG_LAPBETHER=m
+CONFIG_X25_ASY=m
+CONFIG_SBNI=m
+CONFIG_SBNI_MULTILINE=y
+
+#
+# ATM drivers
+#
+CONFIG_ATM_TCP=m
+CONFIG_ATM_LANAI=m
+CONFIG_ATM_ENI=m
+# CONFIG_ATM_ENI_DEBUG is not set
+# CONFIG_ATM_ENI_TUNE_BURST is not set
+CONFIG_ATM_FIRESTREAM=m
+CONFIG_ATM_ZATM=m
+# CONFIG_ATM_ZATM_DEBUG is not set
+CONFIG_ATM_IDT77252=m
+# CONFIG_ATM_IDT77252_DEBUG is not set
+# CONFIG_ATM_IDT77252_RCV_ALL is not set
+CONFIG_ATM_IDT77252_USE_SUNI=y
+CONFIG_ATM_AMBASSADOR=m
+# CONFIG_ATM_AMBASSADOR_DEBUG is not set
+CONFIG_ATM_HORIZON=m
+# CONFIG_ATM_HORIZON_DEBUG is not set
+CONFIG_ATM_FORE200E_MAYBE=m
+CONFIG_ATM_FORE200E_PCA=y
+CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_USE_TASKLET=y
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E=m
+CONFIG_ATM_HE=m
+CONFIG_ATM_HE_USE_SUNI=y
+CONFIG_FDDI=y
+CONFIG_DEFXX=m
+CONFIG_SKFP=m
+CONFIG_HIPPI=y
+CONFIG_ROADRUNNER=m
+# CONFIG_ROADRUNNER_LARGE_RINGS is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+CONFIG_NET_FC=y
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+CONFIG_PHONE=m
+CONFIG_PHONE_IXJ=m
+CONFIG_PHONE_IXJ_PCMCIA=m
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_VORTEX=m
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_SERIO_CT82C710=m
+CONFIG_SERIO_PARKBD=m
+CONFIG_SERIO_PCIPS2=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=m
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+CONFIG_JOYSTICK_GUILLEMOT=m
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_USB=y
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+CONFIG_JOYSTICK_TWIDDLER=m
+CONFIG_JOYSTICK_DB9=m
+CONFIG_JOYSTICK_GAMECON=m
+CONFIG_JOYSTICK_TURBOGRAFX=m
+CONFIG_INPUT_JOYDUMP=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_SERIAL_NONSTANDARD=y
+CONFIG_ROCKETPORT=m
+CONFIG_CYCLADES=m
+CONFIG_CYZ_INTR=y
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_N_HDLC=m
+CONFIG_STALDRV=y
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_CS=m
+# CONFIG_SERIAL_8250_ACPI is not set
+CONFIG_SERIAL_8250_NR_UARTS=8
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_MULTIPORT=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+
+#
+# Linux InfraRed Controller
+#
+# CONFIG_LIRC_SUPPORT is not set
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+CONFIG_PPDEV=m
+# CONFIG_TIPAR is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
+CONFIG_IPMI_POWEROFF=m
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+CONFIG_ACQUIRE_WDT=m
+CONFIG_ADVANTECH_WDT=m
+CONFIG_ALIM1535_WDT=m
+CONFIG_ALIM7101_WDT=m
+CONFIG_SC520_WDT=m
+CONFIG_EUROTECH_WDT=m
+CONFIG_IB700_WDT=m
+CONFIG_WAFER_WDT=m
+CONFIG_I8XX_TCO=m
+CONFIG_SC1200_WDT=m
+CONFIG_SCx200_WDT=m
+CONFIG_60XX_WDT=m
+CONFIG_CPU5_WDT=m
+CONFIG_W83627HF_WDT=m
+CONFIG_W83877F_WDT=m
+CONFIG_MACHZ_WDT=m
+
+#
+# PCI-based Watchdog Cards
+#
+CONFIG_PCIPCWATCHDOG=m
+CONFIG_WDTPCI=m
+CONFIG_WDT_501_PCI=y
+
+#
+# USB-based Watchdog Cards
+#
+CONFIG_USBPCWATCHDOG=m
+CONFIG_HW_RANDOM=m
+CONFIG_NVRAM=m
+CONFIG_RTC=y
+CONFIG_DTLK=m
+CONFIG_R3964=m
+CONFIG_APPLICOM=m
+
+#
+# Ftape, the floppy tape device driver
+#
+CONFIG_AGP=y
+CONFIG_AGP_AMD64=y
+CONFIG_AGP_INTEL_MCH=m
+CONFIG_DRM=y
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_GAMMA=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_SIS=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_SYNCLINK_CS=m
+CONFIG_MWAVE=m
+CONFIG_RAW_DRIVER=m
+CONFIG_HPET=y
+# CONFIG_HPET_RTC_IRQ is not set
+CONFIG_HPET_MMAP=y
+CONFIG_MAX_RAW_DEVS=1024
+CONFIG_HANGCHECK_TIMER=m
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI1563=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_I810=m
+CONFIG_I2C_ISA=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_PARPORT=m
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+CONFIG_I2C_VOODOO3=m
+CONFIG_I2C_PCA_ISA=m
+
+#
+# Hardware Sensors Chip support
+#
+CONFIG_I2C_SENSOR=m
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+CONFIG_SENSORS_ADM1031=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM77=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+CONFIG_SENSORS_SMSC47M1=m
+CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+
+#
+# Other I2C Chip support
+#
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_RTC8564=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=m
+CONFIG_W1_MATROX=m
+CONFIG_W1_DS9490=m
+CONFIG_W1_DS9490R_BRIDGE=m
+CONFIG_W1_THERM=m
+CONFIG_W1_SMEM=m
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+
+#
+# Video For Linux
+#
+
+#
+# Video Adapters
+#
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+CONFIG_VIDEO_ZORAN=m
+CONFIG_VIDEO_ZORAN_BUZ=m
+CONFIG_VIDEO_ZORAN_DC10=m
+CONFIG_VIDEO_ZORAN_DC30=m
+CONFIG_VIDEO_ZORAN_LML33=m
+CONFIG_VIDEO_ZORAN_LML33R10=m
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+CONFIG_VIDEO_HEXIUM_ORION=m
+CONFIG_VIDEO_HEXIUM_GEMINI=m
+CONFIG_VIDEO_CX88=m
+CONFIG_VIDEO_OVCAMCHIP=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_TWINHAN_DST=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_VES1X93=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_NXT6000=m
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+# CONFIG_DVB_AV7110_FIRMWARE is not set
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR=m
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_CIRRUS=m
+CONFIG_FB_PM2=m
+# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
+CONFIG_FB_CYBER2000=m
+CONFIG_FB_ASILIANT=y
+# CONFIG_FB_IMSTT is not set
+CONFIG_FB_VGA16=m
+CONFIG_FB_VESA=y
+CONFIG_VIDEO_SELECT=y
+CONFIG_FB_HGA=m
+# CONFIG_FB_HGA_ACCEL is not set
+CONFIG_FB_RIVA=m
+CONFIG_FB_RIVA_I2C=y
+# CONFIG_FB_RIVA_DEBUG is not set
+CONFIG_FB_MATROX=m
+CONFIG_FB_MATROX_MILLENIUM=y
+CONFIG_FB_MATROX_MYSTIQUE=y
+CONFIG_FB_MATROX_G450=y
+CONFIG_FB_MATROX_G100=y
+CONFIG_FB_MATROX_I2C=m
+CONFIG_FB_MATROX_MAVEN=m
+CONFIG_FB_MATROX_MULTIHEAD=y
+CONFIG_FB_RADEON_OLD=m
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=m
+CONFIG_FB_ATY=m
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
+# CONFIG_FB_ATY_XL_INIT is not set
+CONFIG_FB_SIS=m
+CONFIG_FB_SIS_300=y
+CONFIG_FB_SIS_315=y
+CONFIG_FB_NEOMAGIC=m
+CONFIG_FB_KYRO=m
+CONFIG_FB_3DFX=m
+# CONFIG_FB_3DFX_ACCEL is not set
+CONFIG_FB_VOODOO1=m
+CONFIG_FB_TRIDENT=m
+CONFIG_FB_TRIDENT_ACCEL=y
+CONFIG_FB_VIRTUAL=m
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_FB_SPLASH=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_BIT32_EMUL=m
+CONFIG_SND_RTCTIMER=m
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_MPU401_UART=m
+CONFIG_SND_OPL3_LIB=m
+CONFIG_SND_VX_LIB=m
+# CONFIG_SND_DUMMY is not set
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# PCI devices
+#
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_ATIIXP_MODEM=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+CONFIG_SND_CS46XX=m
+CONFIG_SND_CS46XX_NEW_DSP=y
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VX222=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_USB_USX2Y=m
+
+#
+# PCMCIA devices
+#
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+CONFIG_SOUND_BT878=m
+CONFIG_SOUND_CMPCI=m
+CONFIG_SOUND_CMPCI_FM=y
+CONFIG_SOUND_CMPCI_MIDI=y
+CONFIG_SOUND_CMPCI_JOYSTICK=y
+CONFIG_SOUND_EMU10K1=m
+CONFIG_MIDI_EMU10K1=y
+CONFIG_SOUND_FUSION=m
+CONFIG_SOUND_CS4281=m
+CONFIG_SOUND_ES1370=m
+CONFIG_SOUND_ES1371=m
+CONFIG_SOUND_ESSSOLO1=m
+CONFIG_SOUND_MAESTRO=m
+CONFIG_SOUND_MAESTRO3=m
+CONFIG_SOUND_ICH=m
+CONFIG_SOUND_SONICVIBES=m
+CONFIG_SOUND_TRIDENT=m
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_VIA82CXXX=m
+CONFIG_MIDI_VIA82CXXX=y
+CONFIG_SOUND_OSS=m
+# CONFIG_SOUND_TRACEINIT is not set
+# CONFIG_SOUND_DMAP is not set
+CONFIG_SOUND_AD1816=m
+CONFIG_SOUND_AD1889=m
+CONFIG_SOUND_SGALAXY=m
+CONFIG_SOUND_ADLIB=m
+CONFIG_SOUND_ACI_MIXER=m
+CONFIG_SOUND_CS4232=m
+CONFIG_SOUND_SSCAPE=m
+CONFIG_SOUND_GUS=m
+CONFIG_SOUND_GUS16=y
+CONFIG_SOUND_GUSMAX=y
+CONFIG_SOUND_VMIDI=m
+CONFIG_SOUND_TRIX=m
+CONFIG_SOUND_MSS=m
+CONFIG_SOUND_MPU401=m
+CONFIG_SOUND_NM256=m
+CONFIG_SOUND_MAD16=m
+CONFIG_MAD16_OLDCARD=y
+CONFIG_SOUND_PAS=m
+CONFIG_SOUND_PSS=m
+CONFIG_PSS_MIXER=y
+# CONFIG_PSS_HAVE_BOOT is not set
+CONFIG_SOUND_SB=m
+CONFIG_SOUND_AWE32_SYNTH=m
+CONFIG_SOUND_WAVEFRONT=m
+CONFIG_SOUND_MAUI=m
+CONFIG_SOUND_YM3812=m
+CONFIG_SOUND_OPL3SA1=m
+CONFIG_SOUND_OPL3SA2=m
+CONFIG_SOUND_YMFPCI=m
+CONFIG_SOUND_YMFPCI_LEGACY=y
+CONFIG_SOUND_UART6850=m
+CONFIG_SOUND_AEDSP16=m
+CONFIG_SC6600=y
+CONFIG_SC6600_JOY=y
+CONFIG_SC6600_CDROM=4
+CONFIG_SC6600_CDROMBASE=0
+# CONFIG_AEDSP16_MSS is not set
+CONFIG_AEDSP16_SBPRO=y
+CONFIG_AEDSP16_MPU401=y
+CONFIG_SOUND_TVMIXER=m
+CONFIG_SOUND_KAHLUA=m
+CONFIG_SOUND_ALI5455=m
+CONFIG_SOUND_FORTE=m
+CONFIG_SOUND_RME96XX=m
+CONFIG_SOUND_AD1980=m
+
+#
+# USB support
+#
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+CONFIG_USB_DYNAMIC_MINORS=y
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_UHCI_HCD=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_AUDIO=m
+
+#
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+#
+CONFIG_USB_MIDI=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+
+#
+# USB Human Interface Devices (HID)
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_AIPTEK=m
+CONFIG_USB_WACOM=m
+CONFIG_USB_KBTAB=m
+CONFIG_USB_POWERMATE=m
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_XPAD=m
+CONFIG_USB_ATI_REMOTE=m
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_DABUSB=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+CONFIG_USB_W9968CF=m
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_AX8817X=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_LED=m
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_TEST=m
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_NET2280=m
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_SA1100 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_OMAP is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+
+#
+# Firmware Drivers
+#
+# CONFIG_EDD is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_UMSDOS_FS is not set
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+CONFIG_ADFS_FS_RW=y
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_JFFS_FS=m
+CONFIG_JFFS_FS_VERBOSE=0
+# CONFIG_JFFS_PROC_FS is not set
+CONFIG_JFFS2_FS=m
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_NAND=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_QNX4FS_RW=y
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_RPCSEC_GSS_SPKM3=m
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="iso8859-2"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
+CONFIG_NCP_FS=m
+CONFIG_NCPFS_PACKET_SIGNING=y
+CONFIG_NCPFS_IOCTL_LOCKING=y
+CONFIG_NCPFS_STRONG=y
+CONFIG_NCPFS_NFS_NS=y
+CONFIG_NCPFS_OS2_NS=y
+CONFIG_NCPFS_SMALLDOS=y
+CONFIG_NCPFS_NLS=y
+CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_AFS_FS=m
+CONFIG_RXRPC=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-2"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_DEBUG_KERNEL=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_INIT_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_IOMMU_DEBUG is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WHIRLPOOL=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_LIBCRC32C=m
+CONFIG_QSORT=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
diff --git a/kernel-x86_64.config b/kernel-x86_64.config
new file mode 100644 (file)
index 0000000..88ea045
--- /dev/null
@@ -0,0 +1,2349 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_X86_64=y
+CONFIG_64BIT=y
+CONFIG_X86=y
+CONFIG_MMU=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_GENERIC_ISA_DMA=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_SYSCTL=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HOTPLUG=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Processor type and features
+#
+CONFIG_MK8=y
+# CONFIG_MPSC is not set
+# CONFIG_GENERIC_CPU is not set
+CONFIG_X86_L1_CACHE_BYTES=64
+CONFIG_X86_L1_CACHE_SHIFT=6
+CONFIG_X86_TSC=y
+CONFIG_X86_GOOD_APIC=y
+# CONFIG_MICROCODE is not set
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_MTRR=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+CONFIG_GART_IOMMU=y
+CONFIG_SWIOTLB=y
+CONFIG_X86_MCE=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_SOFTWARE_SUSPEND is not set
+
+#
+# ACPI (Advanced Configuration and Power Interface) Support
+#
+CONFIG_ACPI=y
+CONFIG_ACPI_BOOT=y
+CONFIG_ACPI_INTERPRETER=y
+CONFIG_ACPI_SLEEP=y
+CONFIG_ACPI_SLEEP_PROC_FS=y
+CONFIG_ACPI_AC=m
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_FAN=m
+CONFIG_ACPI_PROCESSOR=m
+CONFIG_ACPI_THERMAL=m
+CONFIG_ACPI_ASUS=m
+CONFIG_ACPI_TOSHIBA=m
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_BUS=y
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_PCI=y
+CONFIG_ACPI_SYSTEM=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_PROC_INTF=m
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+# CONFIG_CPU_FREQ_24_API is not set
+CONFIG_CPU_FREQ_TABLE=m
+
+#
+# CPUFreq processor drivers
+#
+CONFIG_X86_POWERNOW_K8=m
+CONFIG_X86_POWERNOW_K8_ACPI=y
+# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
+CONFIG_X86_ACPI_CPUFREQ=m
+# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+# CONFIG_UNORDERED_IO is not set
+CONFIG_PCI_MSI=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_YENTA=m
+CONFIG_CARDBUS=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_TCIC=m
+
+#
+# PCI Hotplug Support
+#
+CONFIG_HOTPLUG_PCI=m
+CONFIG_HOTPLUG_PCI_FAKE=m
+CONFIG_HOTPLUG_PCI_ACPI=m
+CONFIG_HOTPLUG_PCI_ACPI_IBM=m
+CONFIG_HOTPLUG_PCI_CPCI=y
+CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
+CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
+CONFIG_HOTPLUG_PCI_PCIE=m
+CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE=y
+CONFIG_HOTPLUG_PCI_SHPC=m
+CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE=y
+
+#
+# Executable file formats / Emulations
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=m
+CONFIG_IA32_EMULATION=y
+CONFIG_IA32_AOUT=y
+CONFIG_COMPAT=y
+CONFIG_SYSVIPC_COMPAT=y
+CONFIG_UID16=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+# CONFIG_STANDALONE is not set
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_REDBOOT_PARTS=m
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
+CONFIG_MTD_REDBOOT_PARTS_READONLY=y
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLOCK=m
+CONFIG_MTD_BLOCK_RO=m
+CONFIG_FTL=m
+CONFIG_NFTL=m
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=m
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=m
+CONFIG_MTD_CFI_AMDSTD=m
+CONFIG_MTD_CFI_AMDSTD_RETRY=0
+CONFIG_MTD_CFI_STAA=m
+CONFIG_MTD_CFI_UTIL=m
+CONFIG_MTD_RAM=m
+CONFIG_MTD_ROM=m
+CONFIG_MTD_ABSENT=m
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=m
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x4000000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+CONFIG_MTD_PNC2000=m
+CONFIG_MTD_SC520CDP=m
+CONFIG_MTD_NETSC520=m
+CONFIG_MTD_SBC_GXX=m
+CONFIG_MTD_ELAN_104NC=m
+CONFIG_MTD_SCx200_DOCFLASH=m
+CONFIG_MTD_AMD76XROM=m
+CONFIG_MTD_ICHXROM=m
+CONFIG_MTD_SCB2_FLASH=m
+CONFIG_MTD_NETtel=m
+CONFIG_MTD_DILNETPC=m
+CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
+CONFIG_MTD_L440GX=m
+CONFIG_MTD_PCI=m
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_PMC551=m
+CONFIG_MTD_PMC551_BUGFIX=y
+# CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_SLRAM=m
+CONFIG_MTD_PHRAM=m
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+CONFIG_MTD_BLKMTD=m
+
+#
+# Disk-On-Chip Device Drivers
+#
+CONFIG_MTD_DOC2000=m
+CONFIG_MTD_DOC2001=m
+CONFIG_MTD_DOC2001PLUS=m
+CONFIG_MTD_DOCPROBE=m
+CONFIG_MTD_DOCECC=m
+# CONFIG_MTD_DOCPROBE_ADVANCED is not set
+CONFIG_MTD_DOCPROBE_ADDRESS=0
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+CONFIG_MTD_NAND_IDS=m
+CONFIG_MTD_NAND_DISKONCHIP=m
+# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
+CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
+CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_CML1=m
+CONFIG_PARPORT_SERIAL=m
+CONFIG_PARPORT_PC_FIFO=y
+CONFIG_PARPORT_PC_SUPERIO=y
+CONFIG_PARPORT_PC_PCMCIA=m
+# CONFIG_PARPORT_OTHER is not set
+CONFIG_PARPORT_1284=y
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=m
+CONFIG_PARIDE=m
+CONFIG_PARIDE_PARPORT=m
+
+#
+# Parallel IDE high-level drivers
+#
+CONFIG_PARIDE_PD=m
+CONFIG_PARIDE_PCD=m
+CONFIG_PARIDE_PF=m
+CONFIG_PARIDE_PT=m
+CONFIG_PARIDE_PG=m
+
+#
+# Parallel IDE protocol modules
+#
+CONFIG_PARIDE_ATEN=m
+CONFIG_PARIDE_BPCK=m
+CONFIG_PARIDE_COMM=m
+CONFIG_PARIDE_DSTR=m
+CONFIG_PARIDE_FIT2=m
+CONFIG_PARIDE_FIT3=m
+CONFIG_PARIDE_EPAT=m
+CONFIG_PARIDE_EPATC8=y
+CONFIG_PARIDE_EPIA=m
+CONFIG_PARIDE_FRIQ=m
+CONFIG_PARIDE_FRPW=m
+CONFIG_PARIDE_KBIC=m
+CONFIG_PARIDE_KTTI=m
+CONFIG_PARIDE_ON20=m
+CONFIG_PARIDE_ON26=m
+CONFIG_BLK_CPQ_DA=m
+CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+CONFIG_BLK_DEV_DAC960=m
+CONFIG_BLK_DEV_UMEM=m
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_SX8=m
+CONFIG_BLK_DEV_UB=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_GNBD=m
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=m
+CONFIG_BLK_DEV_IDE=m
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDEDISK=m
+CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_BLK_DEV_IDECS=m
+CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDETAPE=m
+CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDESCSI=m
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=m
+CONFIG_BLK_DEV_CMD640=y
+CONFIG_BLK_DEV_CMD640_ENHANCED=y
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=m
+CONFIG_BLK_DEV_OPTI621=m
+CONFIG_BLK_DEV_RZ1000=m
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_ONLYDISK is not set
+CONFIG_BLK_DEV_ADMA=y
+CONFIG_BLK_DEV_AEC62XX=m
+CONFIG_BLK_DEV_ALI15X3=m
+# CONFIG_WDC_ALI15X3 is not set
+CONFIG_BLK_DEV_AMD74XX=m
+CONFIG_BLK_DEV_ATIIXP=m
+CONFIG_BLK_DEV_CMD64X=m
+CONFIG_BLK_DEV_TRIFLEX=m
+CONFIG_BLK_DEV_CY82C693=m
+CONFIG_BLK_DEV_CS5520=m
+CONFIG_BLK_DEV_CS5530=m
+CONFIG_BLK_DEV_HPT34X=m
+# CONFIG_HPT34X_AUTODMA is not set
+CONFIG_BLK_DEV_HPT366=m
+CONFIG_BLK_DEV_SC1200=m
+CONFIG_BLK_DEV_PIIX=m
+CONFIG_BLK_DEV_NS87415=m
+CONFIG_BLK_DEV_PDC202XX_OLD=m
+CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=m
+CONFIG_PDC202XX_FORCE=y
+CONFIG_BLK_DEV_SVWKS=m
+CONFIG_BLK_DEV_SIIMAGE=m
+CONFIG_BLK_DEV_SIS5513=m
+CONFIG_BLK_DEV_SLC90E66=m
+CONFIG_BLK_DEV_TRM290=m
+CONFIG_BLK_DEV_VIA82CXXX=m
+# CONFIG_IDE_ARM is not set
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDEDMA_IVB=y
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+CONFIG_SCSI_LOGGING=y
+
+#
+# SCSI Transport Attributes
+#
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+
+#
+# SCSI low-level drivers
+#
+CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
+CONFIG_SCSI_ACARD=m
+CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
+CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+CONFIG_AIC79XX_REG_PRETTY_PRINT=y
+CONFIG_MEGARAID_NEWGEN=y
+CONFIG_MEGARAID_MM=m
+CONFIG_MEGARAID_MAILBOX=m
+CONFIG_SCSI_SATA=y
+CONFIG_SCSI_SATA_SVW=m
+CONFIG_SCSI_ATA_PIIX=m
+CONFIG_SCSI_SATA_NV=m
+CONFIG_SCSI_SATA_PROMISE=m
+CONFIG_SCSI_SATA_SX4=m
+CONFIG_SCSI_SATA_SIL=m
+CONFIG_SCSI_SATA_SIS=m
+CONFIG_SCSI_SATA_VIA=m
+CONFIG_SCSI_SATA_VITESSE=m
+CONFIG_SCSI_BUSLOGIC=m
+# CONFIG_SCSI_OMIT_FLASHPOINT is not set
+CONFIG_SCSI_DMX3191D=m
+CONFIG_SCSI_EATA=m
+CONFIG_SCSI_EATA_TAGGED_QUEUE=y
+CONFIG_SCSI_EATA_LINKED_COMMANDS=y
+CONFIG_SCSI_EATA_MAX_TAGS=16
+CONFIG_SCSI_EATA_PIO=m
+CONFIG_SCSI_FUTURE_DOMAIN=m
+CONFIG_SCSI_GDTH=m
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_INITIO=m
+CONFIG_SCSI_INIA100=m
+CONFIG_SCSI_PPA=m
+CONFIG_SCSI_IMM=m
+# CONFIG_SCSI_IZIP_EPP16 is not set
+# CONFIG_SCSI_IZIP_SLOW_CTR is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
+CONFIG_SCSI_QLOGIC_ISP=m
+CONFIG_SCSI_QLOGIC_FC=m
+CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA2XXX=m
+CONFIG_SCSI_QLA21XX=m
+CONFIG_SCSI_QLA22XX=m
+CONFIG_SCSI_QLA2300=m
+CONFIG_SCSI_QLA2322=m
+CONFIG_SCSI_QLA6312=m
+CONFIG_SCSI_QLA6322=m
+CONFIG_SCSI_DC395x=m
+CONFIG_SCSI_DC390T=m
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# PCMCIA SCSI adapter support
+#
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_RAID6=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_CTL=m
+CONFIG_FUSION_LAN=m
+
+#
+# IEEE 1394 (FireWire) support
+#
+CONFIG_IEEE1394=m
+
+#
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_IEEE1394_OUI_DB=y
+CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
+CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
+
+#
+# Device Drivers
+#
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_OHCI1394=m
+
+#
+# Protocol Drivers
+#
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_CMP=m
+CONFIG_IEEE1394_AMDTP=m
+
+#
+# I2O device support
+#
+CONFIG_I2O=m
+CONFIG_I2O_CONFIG=m
+CONFIG_I2O_BLOCK=m
+CONFIG_I2O_SCSI=m
+CONFIG_I2O_PROC=m
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_UNIX=y
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_TUNNEL=m
+
+#
+# IP: Virtual Server Configuration
+#
+CONFIG_IP_VS=m
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+CONFIG_ATM_CLIP_NO_ICMP=y
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+CONFIG_DECNET=m
+# CONFIG_DECNET_SIOCGIFCONF is not set
+# CONFIG_DECNET_ROUTER is not set
+CONFIG_LLC=y
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=y
+CONFIG_IPDDP=m
+# CONFIG_IPDDP_ENCAP is not set
+# CONFIG_IPDDP_DECAP is not set
+CONFIG_X25=m
+CONFIG_LAPB=m
+# CONFIG_NET_DIVERT is not set
+CONFIG_ECONET=m
+CONFIG_ECONET_AUNUDP=y
+# CONFIG_ECONET_NATIVE is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+# CONFIG_NET_SCH_CLK_JIFFIES is not set
+# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
+CONFIG_NET_SCH_CLK_CPU=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_WRR=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_ESFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+# CONFIG_NET_CLS_ACT is not set
+CONFIG_NET_CLS_POLICE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_RX=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+CONFIG_HAMRADIO=y
+
+#
+# Packet Radio protocols
+#
+CONFIG_AX25=m
+# CONFIG_AX25_DAMA_SLAVE is not set
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+
+#
+# AX.25 network device drivers
+#
+CONFIG_MKISS=m
+CONFIG_6PACK=m
+CONFIG_BPQETHER=m
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_YAM=m
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+CONFIG_ACT200L_DONGLE=m
+
+#
+# Old SIR device drivers
+#
+CONFIG_IRPORT_SIR=m
+
+#
+# Old Serial dongle support
+#
+CONFIG_DONGLE_OLD=y
+CONFIG_ESI_DONGLE_OLD=m
+CONFIG_ACTISYS_DONGLE_OLD=m
+CONFIG_TEKRAM_DONGLE_OLD=m
+CONFIG_GIRBIL_DONGLE_OLD=m
+CONFIG_LITELINK_DONGLE_OLD=m
+CONFIG_MCP2120_DONGLE_OLD=m
+CONFIG_OLD_BELKIN_DONGLE_OLD=m
+CONFIG_ACT200L_DONGLE_OLD=m
+CONFIG_MA600_DONGLE_OLD=m
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+CONFIG_SIGMATEL_FIR=m
+CONFIG_VLSI_FIR=m
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_BCSP_TXCRC=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_IMQ=m
+CONFIG_TUN=m
+CONFIG_ETHERTAP=m
+
+#
+# ARCnet devices
+#
+CONFIG_ARCNET=m
+CONFIG_ARCNET_1201=m
+CONFIG_ARCNET_1051=m
+CONFIG_ARCNET_RAW=m
+CONFIG_ARCNET_COM90xx=m
+CONFIG_ARCNET_COM90xxIO=m
+CONFIG_ARCNET_RIM_I=m
+CONFIG_ARCNET_COM20020=m
+CONFIG_ARCNET_COM20020_PCI=m
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_PCMCIA_XIRCOM=m
+CONFIG_PCMCIA_XIRTULIP=m
+CONFIG_HP100=m
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
+CONFIG_ADAPTEC_STARFIRE=m
+# CONFIG_ADAPTEC_STARFIRE_NAPI is not set
+CONFIG_B44=m
+CONFIG_FORCEDETH=m
+CONFIG_DGRS=m
+CONFIG_EEPRO100=m
+# CONFIG_EEPRO100_PIO is not set
+CONFIG_E100=m
+CONFIG_E100_NAPI=y
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_VELOCITY=m
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
+CONFIG_SK98LIN=m
+CONFIG_TIGON3=m
+
+#
+# Ethernet (10000 Mbit)
+#
+CONFIG_IXGB=m
+# CONFIG_IXGB_NAPI is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+
+#
+# Token Ring devices
+#
+CONFIG_TR=y
+CONFIG_IBMOL=m
+CONFIG_3C359=m
+CONFIG_TMS380TR=m
+CONFIG_TMSPCI=m
+CONFIG_ABYSS=m
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+CONFIG_STRIP=m
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+CONFIG_PCMCIA_RAYCS=m
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+
+#
+# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
+#
+CONFIG_PRISM54=m
+CONFIG_NET_WIRELESS=y
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_ARCNET_COM20020_CS=m
+
+#
+# Wan interfaces
+#
+CONFIG_WAN=y
+CONFIG_DSCC4=m
+CONFIG_DSCC4_PCISYNC=y
+CONFIG_DSCC4_PCI_RST=y
+CONFIG_LANMEDIA=m
+CONFIG_SYNCLINK_SYNCPPP=m
+CONFIG_HDLC=m
+CONFIG_HDLC_RAW=y
+CONFIG_HDLC_RAW_ETH=y
+CONFIG_HDLC_CISCO=y
+CONFIG_HDLC_FR=y
+CONFIG_HDLC_PPP=y
+CONFIG_HDLC_X25=y
+# CONFIG_TAHOE9XX is not set
+CONFIG_PCI200SYN=m
+CONFIG_WANXL=m
+CONFIG_PC300=m
+CONFIG_PC300_MLPPP=y
+CONFIG_FARSYNC=m
+CONFIG_DLCI=m
+CONFIG_DLCI_COUNT=24
+CONFIG_DLCI_MAX=8
+CONFIG_WAN_ROUTER_DRIVERS=y
+CONFIG_CYCLADES_SYNC=m
+CONFIG_CYCLOMX_X25=y
+CONFIG_LAPBETHER=m
+CONFIG_X25_ASY=m
+CONFIG_SBNI=m
+CONFIG_SBNI_MULTILINE=y
+
+#
+# ATM drivers
+#
+CONFIG_ATM_TCP=m
+CONFIG_ATM_LANAI=m
+CONFIG_ATM_ENI=m
+# CONFIG_ATM_ENI_DEBUG is not set
+# CONFIG_ATM_ENI_TUNE_BURST is not set
+CONFIG_ATM_FIRESTREAM=m
+CONFIG_ATM_ZATM=m
+# CONFIG_ATM_ZATM_DEBUG is not set
+CONFIG_ATM_IDT77252=m
+# CONFIG_ATM_IDT77252_DEBUG is not set
+# CONFIG_ATM_IDT77252_RCV_ALL is not set
+CONFIG_ATM_IDT77252_USE_SUNI=y
+CONFIG_ATM_AMBASSADOR=m
+# CONFIG_ATM_AMBASSADOR_DEBUG is not set
+CONFIG_ATM_HORIZON=m
+# CONFIG_ATM_HORIZON_DEBUG is not set
+CONFIG_ATM_FORE200E_MAYBE=m
+CONFIG_ATM_FORE200E_PCA=y
+CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
+CONFIG_ATM_FORE200E_USE_TASKLET=y
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E=m
+CONFIG_ATM_HE=m
+CONFIG_ATM_HE_USE_SUNI=y
+CONFIG_FDDI=y
+CONFIG_DEFXX=m
+CONFIG_SKFP=m
+CONFIG_HIPPI=y
+CONFIG_ROADRUNNER=m
+# CONFIG_ROADRUNNER_LARGE_RINGS is not set
+CONFIG_PLIP=m
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPPOE=m
+CONFIG_PPPOATM=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+CONFIG_NET_FC=y
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+CONFIG_PHONE=m
+CONFIG_PHONE_IXJ=m
+CONFIG_PHONE_IXJ_PCMCIA=m
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+CONFIG_GAMEPORT=m
+CONFIG_SOUND_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_VORTEX=m
+CONFIG_GAMEPORT_FM801=m
+CONFIG_GAMEPORT_CS461x=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_SERIO_CT82C710=m
+CONFIG_SERIO_PARKBD=m
+CONFIG_SERIO_PCIPS2=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=m
+CONFIG_JOYSTICK_A3D=m
+CONFIG_JOYSTICK_ADI=m
+CONFIG_JOYSTICK_COBRA=m
+CONFIG_JOYSTICK_GF2K=m
+CONFIG_JOYSTICK_GRIP=m
+CONFIG_JOYSTICK_GRIP_MP=m
+CONFIG_JOYSTICK_GUILLEMOT=m
+CONFIG_JOYSTICK_INTERACT=m
+CONFIG_JOYSTICK_SIDEWINDER=m
+CONFIG_JOYSTICK_TMDC=m
+CONFIG_JOYSTICK_IFORCE=m
+CONFIG_JOYSTICK_IFORCE_USB=y
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=m
+CONFIG_JOYSTICK_MAGELLAN=m
+CONFIG_JOYSTICK_SPACEORB=m
+CONFIG_JOYSTICK_SPACEBALL=m
+CONFIG_JOYSTICK_STINGER=m
+CONFIG_JOYSTICK_TWIDDLER=m
+CONFIG_JOYSTICK_DB9=m
+CONFIG_JOYSTICK_GAMECON=m
+CONFIG_JOYSTICK_TURBOGRAFX=m
+CONFIG_INPUT_JOYDUMP=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_SERIAL_NONSTANDARD=y
+# CONFIG_COMPUTONE is not set
+CONFIG_ROCKETPORT=m
+CONFIG_CYCLADES=m
+# CONFIG_CYZ_INTR is not set
+# CONFIG_DIGIEPCA is not set
+# CONFIG_DIGI is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_ISI is not set
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_N_HDLC=m
+# CONFIG_RISCOM8 is not set
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
+# CONFIG_RIO is not set
+CONFIG_STALDRV=y
+CONFIG_STALLION=m
+CONFIG_ISTALLION=m
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_CS=m
+# CONFIG_SERIAL_8250_ACPI is not set
+CONFIG_SERIAL_8250_NR_UARTS=8
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_MULTIPORT=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+
+#
+# Linux InfraRed Controller
+#
+CONFIG_LIRC_SUPPORT=m
+CONFIG_LIRC_MAX_DEV=4
+CONFIG_LIRC_IRCTL_DEV_MAJOR=61
+CONFIG_LIRC_I2C=m
+CONFIG_LIRC_GPIO=m
+CONFIG_LIRC_BT829=m
+CONFIG_LIRC_IT87=m
+CONFIG_LIRC_ATIUSB=m
+CONFIG_LIRC_MCEUSB=m
+# CONFIG_LIRC_SASEM is not set
+CONFIG_LIRC_PARALLEL=m
+CONFIG_LIRC_PARALLEL_LPT1=y
+# CONFIG_LIRC_PARALLEL_LPT2 is not set
+# CONFIG_LIRC_PARALLEL_LPT3 is not set
+# CONFIG_LIRC_PARALLEL_OTHER is not set
+CONFIG_LIRC_PORT_PARALLEL=0x378
+CONFIG_LIRC_IRQ_PARALLEL=0x7
+CONFIG_LIRC_TIMER=65535
+CONFIG_LIRC_SERIAL=m
+CONFIG_LIRC_HOMEBREW=y
+# CONFIG_LIRC_SERIAL_ANIMAX is not set
+# CONFIG_LIRC_SERIAL_IRDEO is not set
+# CONFIG_LIRC_SERIAL_IRDEO_REMOTE is not set
+CONFIG_LIRC_SERIAL_TRANSMITTER=y
+CONFIG_LIRC_SERIAL_SOFTCARRIER=y
+# CONFIG_LIRC_SERIAL_IGOR is not set
+CONFIG_LIRC_SERIAL_COM1=y
+# CONFIG_LIRC_SERIAL_COM2 is not set
+# CONFIG_LIRC_SERIAL_COM3 is not set
+# CONFIG_LIRC_SERIAL_COM4 is not set
+# CONFIG_LIRC_SERIAL_OTHER is not set
+CONFIG_LIRC_PORT_SERIAL=0x3f8
+CONFIG_LIRC_IRQ_SERIAL=0x4
+# CONFIG_LIRC_SIR is not set
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+CONFIG_PPDEV=m
+# CONFIG_TIPAR is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
+CONFIG_IPMI_POWEROFF=m
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+CONFIG_ACQUIRE_WDT=m
+CONFIG_ADVANTECH_WDT=m
+CONFIG_ALIM1535_WDT=m
+CONFIG_ALIM7101_WDT=m
+CONFIG_SC520_WDT=m
+CONFIG_EUROTECH_WDT=m
+CONFIG_IB700_WDT=m
+CONFIG_WAFER_WDT=m
+CONFIG_I8XX_TCO=m
+CONFIG_SC1200_WDT=m
+CONFIG_SCx200_WDT=m
+CONFIG_60XX_WDT=m
+CONFIG_CPU5_WDT=m
+CONFIG_W83627HF_WDT=m
+CONFIG_W83877F_WDT=m
+CONFIG_MACHZ_WDT=m
+
+#
+# PCI-based Watchdog Cards
+#
+CONFIG_PCIPCWATCHDOG=m
+CONFIG_WDTPCI=m
+CONFIG_WDT_501_PCI=y
+
+#
+# USB-based Watchdog Cards
+#
+CONFIG_USBPCWATCHDOG=m
+CONFIG_HW_RANDOM=m
+CONFIG_NVRAM=m
+CONFIG_RTC=y
+CONFIG_DTLK=m
+CONFIG_R3964=m
+CONFIG_APPLICOM=m
+
+#
+# Ftape, the floppy tape device driver
+#
+CONFIG_FTAPE=m
+CONFIG_ZFTAPE=m
+CONFIG_ZFT_DFLT_BLK_SZ=10240
+
+#
+# The compressor will be built as a module only!
+#
+CONFIG_ZFT_COMPRESSOR=m
+CONFIG_FT_NR_BUFFERS=3
+CONFIG_FT_PROC_FS=y
+CONFIG_FT_NORMAL_DEBUG=y
+# CONFIG_FT_FULL_DEBUG is not set
+# CONFIG_FT_NO_TRACE is not set
+# CONFIG_FT_NO_TRACE_AT_ALL is not set
+
+#
+# Hardware configuration
+#
+CONFIG_FT_STD_FDC=y
+# CONFIG_FT_MACH2 is not set
+# CONFIG_FT_PROBE_FC10 is not set
+# CONFIG_FT_ALT_FDC is not set
+CONFIG_FT_FDC_THR=8
+CONFIG_FT_FDC_MAX_RATE=2000
+CONFIG_FT_ALPHA_CLOCK=0
+CONFIG_AGP=y
+CONFIG_AGP_AMD64=y
+CONFIG_AGP_INTEL_MCH=m
+CONFIG_DRM=y
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_GAMMA=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_SIS=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_SYNCLINK_CS=m
+CONFIG_MWAVE=m
+CONFIG_RAW_DRIVER=m
+CONFIG_HPET=y
+# CONFIG_HPET_RTC_IRQ is not set
+CONFIG_HPET_MMAP=y
+CONFIG_MAX_RAW_DEVS=1024
+CONFIG_HANGCHECK_TIMER=m
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI1563=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_I810=m
+CONFIG_I2C_ISA=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_PARPORT=m
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_SCx200_ACB=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+CONFIG_I2C_VOODOO3=m
+CONFIG_I2C_PCA_ISA=m
+
+#
+# Hardware Sensors Chip support
+#
+CONFIG_I2C_SENSOR=m
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+CONFIG_SENSORS_ADM1031=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_GL518SM=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM77=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_MAX1619=m
+CONFIG_SENSORS_SMSC47M1=m
+CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+
+#
+# Other I2C Chip support
+#
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_RTC8564=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=m
+CONFIG_W1_MATROX=m
+CONFIG_W1_DS9490=m
+CONFIG_W1_DS9490R_BRIDGE=m
+CONFIG_W1_THERM=m
+CONFIG_W1_SMEM=m
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+
+#
+# Video For Linux
+#
+
+#
+# Video Adapters
+#
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_W9966=m
+CONFIG_VIDEO_CPIA=m
+CONFIG_VIDEO_CPIA_PP=m
+CONFIG_VIDEO_CPIA_USB=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_TUNER_3036=m
+CONFIG_VIDEO_STRADIS=m
+CONFIG_VIDEO_ZORAN=m
+CONFIG_VIDEO_ZORAN_BUZ=m
+CONFIG_VIDEO_ZORAN_DC10=m
+CONFIG_VIDEO_ZORAN_DC30=m
+CONFIG_VIDEO_ZORAN_LML33=m
+CONFIG_VIDEO_ZORAN_LML33R10=m
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_MXB=m
+CONFIG_VIDEO_DPC=m
+CONFIG_VIDEO_HEXIUM_ORION=m
+CONFIG_VIDEO_HEXIUM_GEMINI=m
+CONFIG_VIDEO_CX88=m
+CONFIG_VIDEO_OVCAMCHIP=m
+
+#
+# Radio Adapters
+#
+CONFIG_RADIO_GEMTEK_PCI=m
+CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_MAESTRO=m
+
+#
+# Digital Video Broadcasting Devices
+#
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+
+#
+# Supported Frontend Modules
+#
+CONFIG_DVB_TWINHAN_DST=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
+CONFIG_DVB_ALPS_TDLB7=m
+CONFIG_DVB_ALPS_TDMB7=m
+CONFIG_DVB_ATMEL_AT76C651=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_GRUNDIG_29504_491=m
+CONFIG_DVB_GRUNDIG_29504_401=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_VES1X93=m
+# CONFIG_DVB_TDA1004X is not set
+CONFIG_DVB_NXT6000=m
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+# CONFIG_DVB_AV7110_FIRMWARE is not set
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_SKYSTAR=m
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR=m
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_CIRRUS=m
+CONFIG_FB_PM2=m
+# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
+CONFIG_FB_CYBER2000=m
+CONFIG_FB_ASILIANT=y
+# CONFIG_FB_IMSTT is not set
+CONFIG_FB_VGA16=m
+CONFIG_FB_VESA=y
+CONFIG_VIDEO_SELECT=y
+CONFIG_FB_HGA=m
+# CONFIG_FB_HGA_ACCEL is not set
+CONFIG_FB_RIVA=m
+CONFIG_FB_RIVA_I2C=y
+# CONFIG_FB_RIVA_DEBUG is not set
+CONFIG_FB_MATROX=m
+CONFIG_FB_MATROX_MILLENIUM=y
+CONFIG_FB_MATROX_MYSTIQUE=y
+CONFIG_FB_MATROX_G450=y
+CONFIG_FB_MATROX_G100=y
+CONFIG_FB_MATROX_I2C=m
+CONFIG_FB_MATROX_MAVEN=m
+CONFIG_FB_MATROX_MULTIHEAD=y
+CONFIG_FB_RADEON_OLD=m
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=m
+CONFIG_FB_ATY=m
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
+# CONFIG_FB_ATY_XL_INIT is not set
+CONFIG_FB_SIS=m
+CONFIG_FB_SIS_300=y
+CONFIG_FB_SIS_315=y
+CONFIG_FB_NEOMAGIC=m
+CONFIG_FB_KYRO=m
+CONFIG_FB_3DFX=m
+# CONFIG_FB_3DFX_ACCEL is not set
+CONFIG_FB_VOODOO1=m
+CONFIG_FB_TRIDENT=m
+CONFIG_FB_TRIDENT_ACCEL=y
+CONFIG_FB_VIRTUAL=m
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_FB_SPLASH=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_BIT32_EMUL=m
+CONFIG_SND_RTCTIMER=m
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_MPU401_UART=m
+CONFIG_SND_OPL3_LIB=m
+CONFIG_SND_VX_LIB=m
+# CONFIG_SND_DUMMY is not set
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+
+#
+# PCI devices
+#
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_ALI5451=m
+CONFIG_SND_ATIIXP=m
+CONFIG_SND_ATIIXP_MODEM=m
+CONFIG_SND_AU8810=m
+CONFIG_SND_AU8820=m
+CONFIG_SND_AU8830=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+CONFIG_SND_CS46XX=m
+CONFIG_SND_CS46XX_NEW_DSP=y
+CONFIG_SND_CS4281=m
+CONFIG_SND_EMU10K1=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_ALS4000=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_FM801=m
+CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VX222=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_USB_USX2Y=m
+
+#
+# PCMCIA devices
+#
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+CONFIG_SOUND_BT878=m
+CONFIG_SOUND_CMPCI=m
+CONFIG_SOUND_CMPCI_FM=y
+CONFIG_SOUND_CMPCI_MIDI=y
+CONFIG_SOUND_CMPCI_JOYSTICK=y
+CONFIG_SOUND_EMU10K1=m
+CONFIG_MIDI_EMU10K1=y
+CONFIG_SOUND_FUSION=m
+CONFIG_SOUND_CS4281=m
+CONFIG_SOUND_ES1370=m
+CONFIG_SOUND_ES1371=m
+CONFIG_SOUND_ESSSOLO1=m
+CONFIG_SOUND_MAESTRO=m
+CONFIG_SOUND_MAESTRO3=m
+CONFIG_SOUND_ICH=m
+CONFIG_SOUND_SONICVIBES=m
+CONFIG_SOUND_TRIDENT=m
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_VIA82CXXX=m
+CONFIG_MIDI_VIA82CXXX=y
+CONFIG_SOUND_OSS=m
+# CONFIG_SOUND_TRACEINIT is not set
+# CONFIG_SOUND_DMAP is not set
+CONFIG_SOUND_AD1816=m
+CONFIG_SOUND_AD1889=m
+CONFIG_SOUND_SGALAXY=m
+CONFIG_SOUND_ADLIB=m
+CONFIG_SOUND_ACI_MIXER=m
+CONFIG_SOUND_CS4232=m
+CONFIG_SOUND_SSCAPE=m
+CONFIG_SOUND_GUS=m
+CONFIG_SOUND_GUS16=y
+CONFIG_SOUND_GUSMAX=y
+CONFIG_SOUND_VMIDI=m
+CONFIG_SOUND_TRIX=m
+CONFIG_SOUND_MSS=m
+CONFIG_SOUND_MPU401=m
+CONFIG_SOUND_NM256=m
+CONFIG_SOUND_MAD16=m
+CONFIG_MAD16_OLDCARD=y
+CONFIG_SOUND_PAS=m
+CONFIG_SOUND_PSS=m
+CONFIG_PSS_MIXER=y
+# CONFIG_PSS_HAVE_BOOT is not set
+CONFIG_SOUND_SB=m
+CONFIG_SOUND_AWE32_SYNTH=m
+CONFIG_SOUND_WAVEFRONT=m
+CONFIG_SOUND_MAUI=m
+CONFIG_SOUND_YM3812=m
+CONFIG_SOUND_OPL3SA1=m
+CONFIG_SOUND_OPL3SA2=m
+CONFIG_SOUND_YMFPCI=m
+CONFIG_SOUND_YMFPCI_LEGACY=y
+CONFIG_SOUND_UART6850=m
+CONFIG_SOUND_AEDSP16=m
+CONFIG_SC6600=y
+CONFIG_SC6600_JOY=y
+CONFIG_SC6600_CDROM=4
+CONFIG_SC6600_CDROMBASE=0
+# CONFIG_AEDSP16_MSS is not set
+CONFIG_AEDSP16_SBPRO=y
+CONFIG_AEDSP16_MPU401=y
+CONFIG_SOUND_TVMIXER=m
+CONFIG_SOUND_KAHLUA=m
+CONFIG_SOUND_ALI5455=m
+CONFIG_SOUND_FORTE=m
+CONFIG_SOUND_RME96XX=m
+CONFIG_SOUND_AD1980=m
+
+#
+# USB support
+#
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+CONFIG_USB_DYNAMIC_MINORS=y
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_UHCI_HCD=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_AUDIO=m
+
+#
+# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+#
+CONFIG_USB_MIDI=m
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_RW_DETECT is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+
+#
+# USB Human Interface Devices (HID)
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_AIPTEK=m
+CONFIG_USB_WACOM=m
+CONFIG_USB_KBTAB=m
+CONFIG_USB_POWERMATE=m
+CONFIG_USB_MTOUCH=m
+CONFIG_USB_EGALAX=m
+CONFIG_USB_XPAD=m
+CONFIG_USB_ATI_REMOTE=m
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_DABUSB=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+CONFIG_USB_W9968CF=m
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+
+#
+# USB Host-to-Host Cables
+#
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_GENESYS=y
+CONFIG_USB_NET1080=y
+CONFIG_USB_PL2301=y
+
+#
+# Intelligent USB Devices/Gadgets
+#
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_ZAURUS=y
+CONFIG_USB_CDCETHER=y
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_AX8817X=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_LED=m
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_TEST=m
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_NET2280=m
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_SA1100 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_OMAP is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+
+#
+# Firmware Drivers
+#
+# CONFIG_EDD is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=y
+CONFIG_QUOTA=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_UMSDOS_FS is not set
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_ADFS_FS=m
+CONFIG_ADFS_FS_RW=y
+CONFIG_AFFS_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_JFFS_FS=m
+CONFIG_JFFS_FS_VERBOSE=0
+# CONFIG_JFFS_PROC_FS is not set
+CONFIG_JFFS2_FS=m
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_NAND=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+CONFIG_VXFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_QNX4FS_RW=y
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+CONFIG_UFS_FS_WRITE=y
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_RPCSEC_GSS_SPKM3=m
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="iso8859-2"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
+CONFIG_NCP_FS=m
+CONFIG_NCPFS_PACKET_SIGNING=y
+CONFIG_NCPFS_IOCTL_LOCKING=y
+CONFIG_NCPFS_STRONG=y
+CONFIG_NCPFS_NFS_NS=y
+CONFIG_NCPFS_OS2_NS=y
+CONFIG_NCPFS_SMALLDOS=y
+CONFIG_NCPFS_NLS=y
+CONFIG_NCPFS_EXTRAS=y
+CONFIG_CODA_FS=m
+# CONFIG_CODA_FS_OLD_API is not set
+CONFIG_AFS_FS=m
+CONFIG_RXRPC=m
+CONFIG_LOCK_HARNESS=m
+CONFIG_GFS_FS=m
+CONFIG_LOCK_NOLOCK=m
+CONFIG_LOCK_DLM=m
+CONFIG_LOCK_GULM=m
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-2"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_DEBUG_KERNEL=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_CHECKING is not set
+# CONFIG_INIT_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_IOMMU_DEBUG is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_CAPABILITIES=m
+CONFIG_SECURITY_ROOTPLUG=m
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
+# CONFIG_SECURITY_SELINUX_DISABLE is not set
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+# CONFIG_SECURITY_SELINUX_MLS is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WHIRLPOOL=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=m
+CONFIG_LIBCRC32C=m
+CONFIG_QSORT=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+
+#
+# Cluster Support
+#
+CONFIG_CLUSTER=m
+CONFIG_CLUSTER_DLM=m
+CONFIG_CLUSTER_DLM_PROCLOCKS=y
diff --git a/kernel.FAQ-pl b/kernel.FAQ-pl
new file mode 100644 (file)
index 0000000..52a2562
--- /dev/null
@@ -0,0 +1,9 @@
+P: Dlaczego nie dzia³a mi modu³ lirc_serial?
+O: W j±dro PLD-Linux jest na sta³e wkompilowany modu³ obs³uguj±cy port
+   szeregowy, aby umo¿liwiæ pe³ne monitorowanie i obs³ugê maszyn
+   nie posiadaj±cych monitora, lub klawiatury. Je¶li chcesz u¿ywaæ modu³u
+   lirc_serial, musisz zwolniæ port szeregowy na rzecz modu³u lirc_serial
+   poprzez wydanie komendy:
+   
+   setserial /dev/ttySx uart none
+
index 656638d691f147ca8882ffec5a48707d266a79cc..1e807a9c40def83df3127dae5238593079ab0455 100644 (file)
@@ -8,28 +8,3 @@
  #include <net/ip6_fib.h>
  #include <net/ip6_route.h>
  #include <net/flow.h>
---- linux-2.6.8-rc1/sound/oss/kahlua.c.orig    2004-07-11 19:35:29.000000000 +0200
-+++ linux-2.6.8-rc1/sound/oss/kahlua.c 2004-07-12 08:21:15.783990896 +0200
-@@ -28,6 +28,7 @@
-  */
- #include <linux/config.h>
-+#include <linux/delay.h>
- #include <linux/init.h>
- #include <linux/module.h>
- #include <linux/pci.h>
---- linux-2.6.8-rc1/drivers/mtd/devices/Makefile.orig  2004-07-11 19:33:52.000000000 +0200
-+++ linux-2.6.8-rc1/drivers/mtd/devices/Makefile       2004-07-12 10:11:01.182858096 +0200
-@@ -10,9 +10,9 @@
- # here where previously there was none.  We now have to ensure that
- # doc200[01].o are linked before docprobe.o
--obj-$(CONFIG_MTD_DOC2000)     += doc2000.o
--obj-$(CONFIG_MTD_DOC2001)     += doc2001.o
--obj-$(CONFIG_MTD_DOC2001PLUS) += doc2001plus.o
-+obj-$(CONFIG_MTD_DOC2000)     += doc2000.o docecc.o
-+obj-$(CONFIG_MTD_DOC2001)     += doc2001.o docecc.o
-+obj-$(CONFIG_MTD_DOC2001PLUS) += doc2001plus.o docecc.o
- obj-$(CONFIG_MTD_DOCPROBE)    += docprobe.o docecc.o
- obj-$(CONFIG_MTD_SLRAM)               += slram.o
- obj-$(CONFIG_MTD_PMC551)      += pmc551.o
diff --git a/linux-alpha-isa.patch b/linux-alpha-isa.patch
new file mode 100644 (file)
index 0000000..b1a2413
--- /dev/null
@@ -0,0 +1,26 @@
+--- linux-2.6.3/include/asm-alpha/io.h.orig    2004-02-18 04:59:27.000000000 +0100
++++ linux-2.6.3/include/asm-alpha/io.h 2004-02-25 13:42:10.000000000 +0100
+@@ -17,6 +17,7 @@
+ #ifdef __KERNEL__
+ #include <linux/config.h>
+ #include <linux/kernel.h>
++#include <linux/mm.h>         /* for mem_map, used in page_to_pa */
+ #include <asm/system.h>
+ #include <asm/pgtable.h>
+ #include <asm/machvec.h>
+@@ -118,6 +119,15 @@
+       return (long)address <= 0 ? NULL : virt;
+ }
++#define isa_virt_to_bus virt_to_bus
++#define isa_bus_to_virt bus_to_virt
++static inline unsigned long isa_page_to_bus(struct page *page)
++{
++      unsigned long phys = page_to_phys(page);
++      unsigned long bus = phys + __direct_map_base;
++      return phys <= __direct_map_size ? bus : 0;
++}
++
+ #else /* !__KERNEL__ */
+ /*
diff --git a/linux-fbcon-margins.patch b/linux-fbcon-margins.patch
new file mode 100644 (file)
index 0000000..b02536a
--- /dev/null
@@ -0,0 +1,29 @@
+This fixes "margin colour" (colour used to clear margins - e.g. a half of line
+at the bottom of 100x37 console on 800x600 framebuffer).
+
+I don't know what was the intention behind using attr_bgcol_ec() here, but it
+caused using of background colour of last erase character to clear margins -
+which definitely isn't what we want...
+This patch changes margin colour to black (or colour 0 in palette modes).
+
+       -- Jakub Bogusz <qboosh@pld-linux.org>
+
+--- linux-2.6.0-test2/drivers/video/console/fbcon.c.orig       2003-07-14 05:36:32.000000000 +0200
++++ linux-2.6.0-test2/drivers/video/console/fbcon.c    2003-07-31 00:53:26.000000000 +0200
+@@ -518,7 +518,6 @@
+ void accel_clear_margins(struct vc_data *vc, struct fb_info *info,
+                               int bottom_only)
+ {
+-      int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
+       unsigned int cw = vc->vc_font.width;
+       unsigned int ch = vc->vc_font.height;
+       unsigned int rw = info->var.xres - (vc->vc_cols*cw);
+@@ -527,7 +526,7 @@
+       unsigned int bs = info->var.yres - bh;
+       struct fb_fillrect region;
+-      region.color = attr_bgcol_ec(bgshift, vc);
++      region.color = 0;
+       region.rop = ROP_COPY;
+       if (rw && !bottom_only) {
diff --git a/linux-kbuild-extmod.patch b/linux-kbuild-extmod.patch
new file mode 100644 (file)
index 0000000..45ef986
--- /dev/null
@@ -0,0 +1,27 @@
+--- linux-2.6.6/Makefile.orig  2004-05-23 13:18:32.000000000 +0200
++++ linux-2.6.6/Makefile       2004-05-23 13:20:16.759551080 +0200
+@@ -397,7 +397,6 @@
+ # Build targets only - this includes vmlinux, arch specific targets, clean
+ # targets and others. In general all targets except *config targets.
+-ifeq ($(KBUILD_EXTMOD),)
+ # Additional helpers built in scripts/
+ # Carefully list dependencies so we do not try to build scripts twice
+ # in parrallel
+@@ -407,6 +406,7 @@
+ scripts_basic: include/linux/autoconf.h
++ifeq ($(KBUILD_EXTMOD),)
+ # Objects we will link into vmlinux / subdirs we need to visit
+ init-y                := init/
+ drivers-y     := drivers/ sound/ cluster/
+@@ -957,7 +957,7 @@
+ module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
+ .PHONY: $(module-dirs) modules
+-$(module-dirs): crmodverdir
++$(module-dirs): crmodverdir scripts
+       $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
+ modules: $(module-dirs)
index 985e25159131cf001bfe2913b1c6dc3ae4a4d4a7..3e7885dfb89b28d6120c62aea8e4c6f87410d189 100644 (file)
@@ -1920,7 +1920,7 @@ diff -Nuar -X /home/stevel/dontdiff main.orig/fs/pramfs/super.c main/fs/pramfs/s
 +static inline void * pram_ioremap(unsigned long phys_addr, size_t size,
 +                                unsigned long flags)
 +{
-+      void * retval =  __ioremap(phys_addr, size, flags, PAGE_SIZE);
++      void * retval =  __ioremap(phys_addr, size, flags);
 +#ifndef CONFIG_PRAMFS_NOWP
 +      if (retval) {
 +              spin_lock(&init_mm.page_table_lock);
diff --git a/squashfs2.0-patch b/squashfs2.0-patch
new file mode 100644 (file)
index 0000000..a833af7
--- /dev/null
@@ -0,0 +1,2321 @@
+diff --new-file -ur linux-2.6.7/fs/Kconfig linux-2.6.7-squashfs2.0/fs/Kconfig
+--- linux-2.6.7/fs/Kconfig     2004-06-16 06:19:36.000000000 +0100
++++ linux-2.6.7-squashfs2.0/fs/Kconfig 2004-07-11 05:31:54.000000000 +0100
+@@ -1179,6 +1179,29 @@
+         If unsure, say N.
++config SQUASHFS
++      tristate "SquashFS 2.0 - Squashed file system support"
++      select ZLIB_INFLATE
++      help
++        Saying Y here includes support for SquashFs 2.0 (Compressed Read-Only File
++        System).  Squashfs is a highly compressed read-only filesystem for Linux.
++        It uses zlib compression to compress both files, inodes and directories.
++        Inodes in the system are very small and all blocks are packed to minimise
++        data overhead. Block sizes greater than 4K are supported up to a maximum of 64K.
++
++        Squashfs is intended for general read-only filesystem use, for archival
++        use (i.e. in cases where a .tar.gz file may be used), and in embedded
++        systems where low overhead is needed.  Further information and filesystem tools
++        are available from http://squashfs.sourceforge.net.
++
++        If you want to compile this as a module ( = code which can be
++        inserted in and removed from the running kernel whenever you want),
++        say M here and read <file:Documentation/modules.txt>.  The module
++        will be called squashfs.  Note that the root file system (the one
++        containing the directory /) cannot be compiled as a module.
++
++        If unsure, say N.
++
+ config VXFS_FS
+       tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
+       help
+diff --new-file -ur linux-2.6.7/fs/Makefile linux-2.6.7-squashfs2.0/fs/Makefile
+--- linux-2.6.7/fs/Makefile    2004-06-16 06:19:36.000000000 +0100
++++ linux-2.6.7-squashfs2.0/fs/Makefile        2004-07-11 05:31:55.000000000 +0100
+@@ -50,6 +50,7 @@
+ obj-$(CONFIG_JBD)             += jbd/
+ obj-$(CONFIG_EXT2_FS)         += ext2/
+ obj-$(CONFIG_CRAMFS)          += cramfs/
++obj-$(CONFIG_SQUASHFS)                += squashfs/
+ obj-$(CONFIG_RAMFS)           += ramfs/
+ obj-$(CONFIG_HUGETLBFS)               += hugetlbfs/
+ obj-$(CONFIG_CODA_FS)         += coda/
+diff --new-file -ur linux-2.6.7/fs/squashfs/inode.c linux-2.6.7-squashfs2.0/fs/squashfs/inode.c
+--- linux-2.6.7/fs/squashfs/inode.c    1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7-squashfs2.0/fs/squashfs/inode.c        2004-07-13 00:51:15.000000000 +0100
+@@ -0,0 +1,1626 @@
++/*
++ * Squashfs - a compressed read only filesystem for Linux
++ *
++ * Copyright (c) 2002, 2003, 2004 Phillip Lougher <plougher@users.sourceforge.net>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * inode.c
++ */
++
++#define SQUASHFS_1_0_COMPATIBILITY
++
++#include <linux/types.h>
++#include <linux/squashfs_fs.h>
++#include <linux/module.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/smp_lock.h>
++#include <linux/slab.h>
++#include <linux/squashfs_fs_sb.h>
++#include <linux/squashfs_fs_i.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include <linux/init.h>
++#include <linux/dcache.h>
++#include <asm/uaccess.h>
++#include <linux/wait.h>
++#include <asm/semaphore.h>
++#include <linux/zlib.h>
++#include <linux/blkdev.h>
++#include <linux/vmalloc.h>
++
++#ifdef SQUASHFS_TRACE
++#define TRACE(s, args...)                             printk(KERN_NOTICE "SQUASHFS: "s, ## args)
++#else
++#define TRACE(s, args...)                             {}
++#endif
++
++#define ERROR(s, args...)                             printk(KERN_ERR "SQUASHFS error: "s, ## args)
++
++#define SERROR(s, args...)                            if(!silent) printk(KERN_ERR "SQUASHFS error: "s, ## args)
++#define WARNING(s, args...)                           printk(KERN_WARNING "SQUASHFS: "s, ## args)
++
++static void squashfs_put_super(struct super_block *);
++static int squashfs_statfs(struct super_block *, struct kstatfs *);
++static int squashfs_symlink_readpage(struct file *file, struct page *page);
++static int squashfs_readpage(struct file *file, struct page *page);
++static int squashfs_readpage4K(struct file *file, struct page *page);
++static int squashfs_readdir(struct file *, void *, filldir_t);
++static struct dentry *squashfs_lookup(struct inode *, struct dentry *, struct nameidata *);
++static unsigned int read_data(struct super_block *s, char *buffer,
++              unsigned int index, unsigned int length, int, unsigned int *next_index);
++static int squashfs_get_cached_block(struct super_block *s, char *buffer,
++              unsigned int block, unsigned int offset, int length,
++              unsigned int *next_block, unsigned int *next_offset);
++static struct inode *squashfs_iget(struct super_block *s, squashfs_inode inode);
++static unsigned int read_blocklist(struct inode *inode, int index, int readahead_blks,
++              char *block_list, char **block_p, unsigned int *bsize);
++static void squashfs_put_super(struct super_block *s);
++static struct super_block *squashfs_get_sb(struct file_system_type *, int, const char *, void *);
++static struct inode *squashfs_alloc_inode(struct super_block *sb);
++static void squashfs_destroy_inode(struct inode *inode);
++static int init_inodecache(void);
++static void destroy_inodecache(void);
++
++#ifdef SQUASHFS_1_0_COMPATIBILITY
++static int squashfs_readpage_lessthan4K(struct file *file, struct page *page);
++static struct inode *squashfs_iget_1(struct super_block *s, squashfs_inode inode);
++static unsigned int read_blocklist_1(struct inode *inode, int index, int readahead_blks,
++              char *block_list, char **block_p, unsigned int *bsize);
++#endif
++
++DECLARE_MUTEX(read_data_mutex);
++
++static z_stream stream;
++
++static struct file_system_type squashfs_fs_type = {
++      .owner = THIS_MODULE,
++      .name = "squashfs",
++      .get_sb = squashfs_get_sb,
++      .kill_sb = kill_block_super,
++      .fs_flags = FS_REQUIRES_DEV
++      };
++
++static unsigned char squashfs_filetype_table[] = {
++      DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_FIFO, DT_SOCK
++};
++
++static struct super_operations squashfs_ops = {
++      .alloc_inode = squashfs_alloc_inode,
++      .destroy_inode = squashfs_destroy_inode,
++      .statfs = squashfs_statfs,
++      .put_super = squashfs_put_super,
++};
++
++static struct address_space_operations squashfs_symlink_aops = {
++      .readpage = squashfs_symlink_readpage
++};
++
++static struct address_space_operations squashfs_aops = {
++      .readpage = squashfs_readpage
++};
++
++static struct address_space_operations squashfs_aops_4K = {
++      .readpage = squashfs_readpage4K
++};
++
++#ifdef SQUASHFS_1_0_COMPATIBILITY
++static struct address_space_operations squashfs_aops_lessthan4K = {
++      .readpage = squashfs_readpage_lessthan4K
++};
++#endif
++
++static struct file_operations squashfs_dir_ops = {
++      .read = generic_read_dir,
++      .readdir = squashfs_readdir
++};
++
++static struct inode_operations squashfs_dir_inode_ops = {
++      .lookup = squashfs_lookup
++};
++
++
++static inline struct squashfs_inode_info *SQUASHFS_I(struct inode *inode)
++{
++      return list_entry(inode, struct squashfs_inode_info, vfs_inode);
++}
++
++
++static unsigned int read_data(struct super_block *s, char *buffer,
++              unsigned int index, unsigned int length, int datablock, unsigned int *next_index)
++{
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info;
++      struct buffer_head *bh[((SQUASHFS_FILE_MAX_SIZE - 1) >> msBlk->devblksize_log2) + 2];
++      unsigned int offset = index & ((1 << msBlk->devblksize_log2) - 1);
++      unsigned int cur_index = index >> msBlk->devblksize_log2;
++      int bytes, avail_bytes, b, k;
++      char *c_buffer;
++      unsigned int compressed;
++      unsigned int c_byte = length;
++
++      if(c_byte) {
++              bytes = msBlk->devblksize - offset;
++              if(datablock) {
++                      c_buffer = (compressed = SQUASHFS_COMPRESSED_BLOCK(c_byte)) ? msBlk->read_data : buffer;
++                      c_byte = SQUASHFS_COMPRESSED_SIZE_BLOCK(c_byte);
++              } else {
++                      c_buffer = (compressed = SQUASHFS_COMPRESSED(c_byte)) ? msBlk->read_data : buffer;
++                      c_byte = SQUASHFS_COMPRESSED_SIZE(c_byte);
++              }
++
++              TRACE("Block @ 0x%x, %scompressed size %d\n", index, compressed ? "" : "un", (unsigned int) c_byte);
++
++              if(!(bh[0] = sb_getblk(s, cur_index)))
++                      goto block_release;
++              for(b = 1; bytes < c_byte; b++) {
++                      if(!(bh[b] = sb_getblk(s, ++cur_index)))
++                              goto block_release;
++                      bytes += msBlk->devblksize;
++              }
++              ll_rw_block(READ, b, bh);
++      } else {
++              unsigned short temp;
++              if(!(bh[0] = sb_bread(s, cur_index)))
++                      goto read_failure;
++
++              if(msBlk->devblksize - offset == 1) {
++                      if(msBlk->swap)
++                              ((unsigned char *) &temp)[1] = *((unsigned char *) (bh[0]->b_data + offset));
++                      else
++                              ((unsigned char *) &temp)[0] = *((unsigned char *) (bh[0]->b_data + offset));
++                      brelse(bh[0]);
++                      if(!(bh[0] = sb_bread(s, ++cur_index)))
++                              goto read_failure;
++                      if(msBlk->swap)
++                              ((unsigned char *) &temp)[0] = *((unsigned char *) bh[0]->b_data); 
++                      else
++                              ((unsigned char *) &temp)[1] = *((unsigned char *) bh[0]->b_data); 
++                      c_byte = temp;
++                      offset = 1;
++              }
++              else {
++                      if(msBlk->swap) {
++                              unsigned short temp;
++                              ((unsigned char *) &temp)[1] = *((unsigned char *) (bh[0]->b_data + offset));
++                              ((unsigned char *) &temp)[0] = *((unsigned char *) (bh[0]->b_data + offset + 1)); 
++                              c_byte = temp;
++                      } else
++                              c_byte = *((unsigned short *) (bh[0]->b_data + offset));
++                      offset += 2;
++              }
++              if(SQUASHFS_CHECK_DATA(msBlk->sBlk.flags)) {
++                      if(offset == msBlk->devblksize) {
++                              brelse(bh[0]);
++                              if(!(bh[0] = sb_bread(s, ++cur_index)))
++                                      goto read_failure;
++                              offset = 0;
++                      }
++                      if(*((unsigned char *) (bh[0]->b_data + offset)) != SQUASHFS_MARKER_BYTE) {
++                              ERROR("Metadata block marker corrupt @ %x\n", index);
++                              brelse(bh[0]);
++                              return 0;
++                      }
++                      offset ++;
++              }
++
++              bytes = msBlk->devblksize - offset;
++              if(datablock) {
++                      c_buffer = (compressed = SQUASHFS_COMPRESSED_BLOCK(c_byte)) ? msBlk->read_data : buffer;
++                      c_byte = SQUASHFS_COMPRESSED_SIZE_BLOCK(c_byte);
++              } else {
++                      c_buffer = (compressed = SQUASHFS_COMPRESSED(c_byte)) ? msBlk->read_data : buffer;
++                      c_byte = SQUASHFS_COMPRESSED_SIZE(c_byte);
++              }
++
++              TRACE("Block @ 0x%x, %scompressed size %d\n", index, compressed ? "" : "un", (unsigned int) c_byte);
++
++              for(b = 1; bytes < c_byte; b++) {
++                      if(!(bh[b] = sb_getblk(s, ++cur_index)))
++                              goto block_release;
++                      bytes += msBlk->devblksize;
++              }
++              ll_rw_block(READ, b - 1, bh + 1);
++      }
++
++      if(compressed)
++              down(&read_data_mutex);
++
++      for(bytes = 0, k = 0; k < b; k++) {
++              avail_bytes = (c_byte - bytes) > (msBlk->devblksize - offset) ? msBlk->devblksize - offset : c_byte - bytes;
++              wait_on_buffer(bh[k]);
++              memcpy(c_buffer + bytes, bh[k]->b_data + offset, avail_bytes);
++              bytes += avail_bytes;
++              offset = 0;
++              brelse(bh[k]);
++      }
++
++      /*
++       * uncompress block
++       */
++      if(compressed) {
++              int zlib_err;
++
++              stream.next_in = c_buffer;
++              stream.avail_in = c_byte;
++              stream.next_out = buffer;
++              stream.avail_out = msBlk->read_size;
++              if(((zlib_err = zlib_inflateInit(&stream)) != Z_OK) ||
++                              ((zlib_err = zlib_inflate(&stream, Z_FINISH)) != Z_STREAM_END) ||
++                              ((zlib_err = zlib_inflateEnd(&stream)) != Z_OK)) {
++                      ERROR("zlib_fs returned unexpected result 0x%x\n", zlib_err);
++                      bytes = 0;
++              } else
++                      bytes = stream.total_out;
++              up(&read_data_mutex);
++      }
++
++      if(next_index)
++              *next_index = index + c_byte + (length ? 0 : (SQUASHFS_CHECK_DATA(msBlk->sBlk.flags) ? 3 : 2));
++
++      return bytes;
++
++block_release:
++      while(--b >= 0) brelse(bh[b]);
++
++read_failure:
++      ERROR("sb_bread failed reading block 0x%x\n", cur_index);
++      return 0;
++}
++
++
++static int squashfs_get_cached_block(struct super_block *s, char *buffer,
++              unsigned int block, unsigned int offset, int length,
++              unsigned int *next_block, unsigned int *next_offset)
++{
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info;
++      int n, i, bytes, return_length = length;
++      unsigned int next_index;
++
++      TRACE("Entered squashfs_get_cached_block [%x:%x]\n", block, offset);
++
++      for(;;) {
++              for(i = 0; i < SQUASHFS_CACHED_BLKS; i++) 
++                      if(msBlk->block_cache[i].block == block)
++                              break; 
++              
++              down(&msBlk->block_cache_mutex);
++              if(i == SQUASHFS_CACHED_BLKS) {
++                      /* read inode header block */
++                      for(i = msBlk->next_cache, n = SQUASHFS_CACHED_BLKS; n ; n --, i = (i + 1) % SQUASHFS_CACHED_BLKS)
++                              if(msBlk->block_cache[i].block != SQUASHFS_USED_BLK)
++                                      break;
++                      if(n == 0) {
++                              wait_queue_t wait;
++
++                              init_waitqueue_entry(&wait, current);
++                              add_wait_queue(&msBlk->waitq, &wait);
++                              up(&msBlk->block_cache_mutex);
++                              set_current_state(TASK_UNINTERRUPTIBLE);
++                              schedule();
++                              set_current_state(TASK_RUNNING);
++                              remove_wait_queue(&msBlk->waitq, &wait);
++                              continue;
++                      }
++                      msBlk->next_cache = (i + 1) % SQUASHFS_CACHED_BLKS;
++
++                      if(msBlk->block_cache[i].block == SQUASHFS_INVALID_BLK) {
++                              if(!(msBlk->block_cache[i].data = (unsigned char *)
++                                                      kmalloc(SQUASHFS_METADATA_SIZE, GFP_KERNEL))) {
++                                      ERROR("Failed to allocate cache block\n");
++                                      up(&msBlk->block_cache_mutex);
++                                      return 0;
++                              }
++                      }
++      
++                      msBlk->block_cache[i].block = SQUASHFS_USED_BLK;
++                      up(&msBlk->block_cache_mutex);
++                      if(!(msBlk->block_cache[i].length = read_data(s, msBlk->block_cache[i].data, block, 0, 0,
++                                                      &next_index))) {
++                              ERROR("Unable to read cache block [%x:%x]\n", block, offset);
++                              return 0;
++                      }
++                      down(&msBlk->block_cache_mutex);
++                      wake_up(&msBlk->waitq);
++                      msBlk->block_cache[i].block = block;
++                      msBlk->block_cache[i].next_index = next_index;
++                      TRACE("Read cache block [%x:%x]\n", block, offset);
++              }
++
++              if(msBlk->block_cache[i].block != block) {
++                      up(&msBlk->block_cache_mutex);
++                      continue;
++              }
++
++              if((bytes = msBlk->block_cache[i].length - offset) >= length) {
++                      if(buffer)
++                              memcpy(buffer, msBlk->block_cache[i].data + offset, length);
++                      if(msBlk->block_cache[i].length - offset == length) {
++                              *next_block = msBlk->block_cache[i].next_index;
++                              *next_offset = 0;
++                      } else {
++                              *next_block = block;
++                              *next_offset = offset + length;
++                      }
++      
++                      up(&msBlk->block_cache_mutex);
++                      return return_length;
++              } else {
++                      if(buffer) {
++                              memcpy(buffer, msBlk->block_cache[i].data + offset, bytes);
++                              buffer += bytes;
++                      }
++                      block = msBlk->block_cache[i].next_index;
++                      up(&msBlk->block_cache_mutex);
++                      length -= bytes;
++                      offset = 0;
++              }
++      }
++}
++
++
++static int get_fragment_location(struct super_block *s, unsigned int fragment, unsigned int *fragment_start_block, unsigned int *fragment_size)
++{
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info;
++      unsigned int start_block = msBlk->fragment_index[SQUASHFS_FRAGMENT_INDEX(fragment)];
++      int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment);
++      squashfs_fragment_entry fragment_entry;
++
++      if(msBlk->swap) {
++              squashfs_fragment_entry sfragment_entry;
++
++              if(!squashfs_get_cached_block(s, (char *) &sfragment_entry, start_block, offset,
++                                      sizeof(sfragment_entry), &start_block, &offset))
++                      return 0;
++              SQUASHFS_SWAP_FRAGMENT_ENTRY(&fragment_entry, &sfragment_entry);
++      } else
++              if(!squashfs_get_cached_block(s, (char *) &fragment_entry, start_block, offset,
++                                      sizeof(fragment_entry), &start_block, &offset))
++                      return 0;
++
++      *fragment_start_block = fragment_entry.start_block;
++      *fragment_size = fragment_entry.size;
++
++      return 1;
++}
++
++
++void release_cached_fragment(squashfs_sb_info *msBlk, struct squashfs_fragment_cache *fragment)
++{
++      down(&msBlk->fragment_mutex);
++      fragment->locked --;
++      wake_up(&msBlk->fragment_wait_queue);
++      up(&msBlk->fragment_mutex);
++}
++
++
++struct squashfs_fragment_cache *get_cached_fragment(struct super_block *s, unsigned int start_block, int length)
++{
++      int i, n;
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info;
++
++      for(;;) {
++              down(&msBlk->fragment_mutex);
++              for(i = 0; i < SQUASHFS_CACHED_FRAGMENTS && msBlk->fragment[i].block != start_block; i++);
++              if(i == SQUASHFS_CACHED_FRAGMENTS) {
++                      for(i = msBlk->next_fragment, n = SQUASHFS_CACHED_FRAGMENTS;
++                              n && msBlk->fragment[i].locked; n--, i = (i + 1) % SQUASHFS_CACHED_FRAGMENTS);
++
++                      if(n == 0) {
++                              wait_queue_t wait;
++
++                              init_waitqueue_entry(&wait, current);
++                              add_wait_queue(&msBlk->fragment_wait_queue, &wait);
++                              up(&msBlk->fragment_mutex);
++                              set_current_state(TASK_UNINTERRUPTIBLE);
++                              schedule();
++                              set_current_state(TASK_RUNNING);
++                              remove_wait_queue(&msBlk->fragment_wait_queue, &wait);
++                              continue;
++                      }
++                      msBlk->next_fragment = (msBlk->next_fragment + 1) % SQUASHFS_CACHED_FRAGMENTS;
++                      
++                      if(msBlk->fragment[i].data == NULL)
++                              if(!(msBlk->fragment[i].data = (unsigned char *)
++                                                      kmalloc(SQUASHFS_FILE_MAX_SIZE, GFP_KERNEL))) {
++                                      ERROR("Failed to allocate fragment cache block\n");
++                                      up(&msBlk->fragment_mutex);
++                                      return NULL;
++                              }
++
++                      msBlk->fragment[i].block = SQUASHFS_INVALID_BLK;
++                      msBlk->fragment[i].locked = 1;
++                      up(&msBlk->fragment_mutex);
++                      if(!(msBlk->fragment[i].length = read_data(s, msBlk->fragment[i].data, start_block, length,
++                                                      1, NULL))) {
++                              ERROR("Unable to read fragment cache block [%x]\n", start_block);
++                              msBlk->fragment[i].locked = 0;
++                              return NULL;
++                      }
++                      msBlk->fragment[i].block = start_block;
++                      TRACE("New fragment %d, start block %d, locked %d\n", i, msBlk->fragment[i].block, msBlk->fragment[i].locked);
++                      return &msBlk->fragment[i];
++              }
++
++              msBlk->fragment[i].locked ++;
++              up(&msBlk->fragment_mutex);
++              
++              TRACE("Got fragment %d, start block %d, locked %d\n", i, msBlk->fragment[i].block, msBlk->fragment[i].locked);
++              return &msBlk->fragment[i];
++      }
++}
++
++
++#ifdef SQUASHFS_1_0_COMPATIBILITY
++static struct inode *squashfs_iget_1(struct super_block *s, squashfs_inode inode)
++{
++      struct inode *i = new_inode(s);
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info;
++      squashfs_super_block *sBlk = &msBlk->sBlk;
++      unsigned int block = SQUASHFS_INODE_BLK(inode) + sBlk->inode_table_start;
++      unsigned int offset = SQUASHFS_INODE_OFFSET(inode);
++      unsigned int next_block, next_offset;
++      squashfs_base_inode_header_1 inodeb;
++
++      TRACE("Entered squashfs_iget_1\n");
++
++      if(msBlk->swap) {
++              squashfs_base_inode_header_1 sinodeb;
++
++              if(!squashfs_get_cached_block(s, (char *) &sinodeb, block,  offset,
++                                      sizeof(sinodeb), &next_block, &next_offset))
++                      goto failed_read;
++              SQUASHFS_SWAP_BASE_INODE_HEADER_1(&inodeb, &sinodeb, sizeof(sinodeb));
++      } else
++              if(!squashfs_get_cached_block(s, (char *) &inodeb, block,  offset,
++                                      sizeof(inodeb), &next_block, &next_offset))
++                      goto failed_read;
++
++      i->i_nlink = 1;
++
++      i->i_mtime.tv_sec = sBlk->mkfs_time;
++      i->i_atime.tv_sec = sBlk->mkfs_time;
++      i->i_ctime.tv_sec = sBlk->mkfs_time;
++
++      if(inodeb.inode_type != SQUASHFS_IPC_TYPE)
++              i->i_uid = msBlk->uid[((inodeb.inode_type - 1) / SQUASHFS_TYPES) * 16 + inodeb.uid];
++      i->i_ino = SQUASHFS_MK_VFS_INODE(block - sBlk->inode_table_start, offset);
++
++      i->i_mode = inodeb.mode;
++
++      switch(inodeb.inode_type == SQUASHFS_IPC_TYPE ? SQUASHFS_IPC_TYPE : (inodeb.inode_type - 1) % SQUASHFS_TYPES + 1) {
++              case SQUASHFS_FILE_TYPE: {
++                      squashfs_reg_inode_header_1 inodep;
++
++                      if(msBlk->swap) {
++                              squashfs_reg_inode_header_1 sinodep;
++
++                              if(!squashfs_get_cached_block(s, (char *) &sinodep, block,  offset, sizeof(sinodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++                              SQUASHFS_SWAP_REG_INODE_HEADER_1(&inodep, &sinodep);
++                      } else
++                              if(!squashfs_get_cached_block(s, (char *) &inodep, block,  offset, sizeof(inodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++
++                      i->i_size = inodep.file_size;
++                      i->i_fop = &generic_ro_fops;
++                      if(sBlk->block_size > 4096)
++                              i->i_data.a_ops = &squashfs_aops;
++                      else if(sBlk->block_size == 4096)
++                              i->i_data.a_ops = &squashfs_aops_4K;
++                      else
++                              i->i_data.a_ops = &squashfs_aops_lessthan4K;
++                      i->i_mode |= S_IFREG;
++                      i->i_mtime.tv_sec = inodep.mtime;
++                      i->i_atime.tv_sec = inodep.mtime;
++                      i->i_ctime.tv_sec = inodep.mtime;
++                      i->i_blocks = ((i->i_size - 1) >> 9) + 1;
++                      i->i_blksize = PAGE_CACHE_SIZE;
++                      SQUASHFS_I(i)->fragment_start_block = SQUASHFS_INVALID_BLK;
++                      SQUASHFS_I(i)->fragment_offset = 0;
++                      SQUASHFS_I(i)->start_block = inodep.start_block;
++                      SQUASHFS_I(i)->block_list_start = next_block;
++                      SQUASHFS_I(i)->offset = next_offset;
++                      TRACE("File inode %x:%x, start_block %x, block_list_start %x, offset %x\n",
++                                      SQUASHFS_INODE_BLK(inode), offset, inodep.start_block, next_block, next_offset);
++                      break;
++              }
++              case SQUASHFS_DIR_TYPE: {
++                      squashfs_dir_inode_header_1 inodep;
++
++                      if(msBlk->swap) {
++                              squashfs_dir_inode_header_1 sinodep;
++
++                              if(!squashfs_get_cached_block(s, (char *) &sinodep, block,  offset, sizeof(sinodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++                              SQUASHFS_SWAP_DIR_INODE_HEADER_1(&inodep, &sinodep);
++                      } else
++                              if(!squashfs_get_cached_block(s, (char *) &inodep, block,  offset, sizeof(inodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++
++                      i->i_size = inodep.file_size;
++                      i->i_op = &squashfs_dir_inode_ops;
++                      i->i_fop = &squashfs_dir_ops;
++                      i->i_mode |= S_IFDIR;
++                      i->i_mtime.tv_sec = inodep.mtime;
++                      i->i_atime.tv_sec = inodep.mtime;
++                      i->i_ctime.tv_sec = inodep.mtime;
++                      SQUASHFS_I(i)->start_block = inodep.start_block;
++                      SQUASHFS_I(i)->offset = inodep.offset;
++                      TRACE("Directory inode %x:%x, start_block %x, offset %x\n", SQUASHFS_INODE_BLK(inode), offset,
++                                      inodep.start_block, inodep.offset);
++                      break;
++              }
++              case SQUASHFS_SYMLINK_TYPE: {
++                      squashfs_symlink_inode_header_1 inodep;
++      
++                      if(msBlk->swap) {
++                              squashfs_symlink_inode_header_1 sinodep;
++
++                              if(!squashfs_get_cached_block(s, (char *) &sinodep, block,  offset, sizeof(sinodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++                              SQUASHFS_SWAP_SYMLINK_INODE_HEADER_1(&inodep, &sinodep);
++                      } else
++                              if(!squashfs_get_cached_block(s, (char *) &inodep, block,  offset, sizeof(inodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++
++                      i->i_size = inodep.symlink_size;
++                      i->i_op = &page_symlink_inode_operations;
++                      i->i_data.a_ops = &squashfs_symlink_aops;
++                      i->i_mode |= S_IFLNK;
++                      SQUASHFS_I(i)->start_block = next_block;
++                      SQUASHFS_I(i)->offset = next_offset;
++                      TRACE("Symbolic link inode %x:%x, start_block %x, offset %x\n",
++                              SQUASHFS_INODE_BLK(inode), offset, next_block, next_offset);
++                      break;
++               }
++               case SQUASHFS_BLKDEV_TYPE:
++               case SQUASHFS_CHRDEV_TYPE: {
++                      squashfs_dev_inode_header_1 inodep;
++
++                      if(msBlk->swap) {
++                              squashfs_dev_inode_header_1 sinodep;
++
++                              if(!squashfs_get_cached_block(s, (char *) &sinodep, block,  offset, sizeof(sinodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++                              SQUASHFS_SWAP_DEV_INODE_HEADER_1(&inodep, &sinodep);
++                      } else  
++                              if(!squashfs_get_cached_block(s, (char *) &inodep, block,  offset, sizeof(inodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++
++                      i->i_size = 0;
++                      i->i_mode |= (inodeb.inode_type == SQUASHFS_CHRDEV_TYPE) ? S_IFCHR : S_IFBLK;
++                      init_special_inode(i, i->i_mode, old_decode_dev(inodep.rdev));
++                      TRACE("Device inode %x:%x, rdev %x\n", SQUASHFS_INODE_BLK(inode), offset, inodep.rdev);
++                      break;
++               }
++               case SQUASHFS_IPC_TYPE: {
++                      squashfs_ipc_inode_header_1 inodep;
++
++                      if(msBlk->swap) {
++                              squashfs_ipc_inode_header_1 sinodep;
++
++                              if(!squashfs_get_cached_block(s, (char *) &sinodep, block,  offset, sizeof(sinodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++                              SQUASHFS_SWAP_IPC_INODE_HEADER_1(&inodep, &sinodep);
++                      } else  
++                              if(!squashfs_get_cached_block(s, (char *) &inodep, block,  offset, sizeof(inodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++
++                      i->i_size = 0;
++                      i->i_mode |= (inodep.type == SQUASHFS_FIFO_TYPE) ? S_IFIFO : S_IFSOCK;
++                      i->i_uid = msBlk->uid[inodep.offset * 16 + inodeb.uid];
++                      init_special_inode(i, i->i_mode, 0);
++                      break;
++               }
++               default:
++                      ERROR("Unknown inode type %d in squashfs_iget!\n", inodeb.inode_type);
++                              goto failed_read1;
++      }
++      
++      if(inodeb.guid == 15)
++              i->i_gid = i->i_uid;
++      else
++              i->i_gid = msBlk->guid[inodeb.guid];
++
++      return i;
++
++failed_read:
++      ERROR("Unable to read inode [%x:%x]\n", block, offset);
++
++failed_read1:
++      return NULL;
++}
++#endif
++
++
++static struct inode *squashfs_iget(struct super_block *s, squashfs_inode inode)
++{
++      struct inode *i = new_inode(s);
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info;
++      squashfs_super_block *sBlk = &msBlk->sBlk;
++      unsigned int block = SQUASHFS_INODE_BLK(inode) + sBlk->inode_table_start;
++      unsigned int offset = SQUASHFS_INODE_OFFSET(inode);
++      unsigned int next_block, next_offset;
++      squashfs_base_inode_header inodeb;
++
++      TRACE("Entered squashfs_iget\n");
++
++      if(msBlk->swap) {
++              squashfs_base_inode_header sinodeb;
++
++              if(!squashfs_get_cached_block(s, (char *) &sinodeb, block,  offset,
++                                      sizeof(sinodeb), &next_block, &next_offset))
++                      goto failed_read;
++              SQUASHFS_SWAP_BASE_INODE_HEADER(&inodeb, &sinodeb, sizeof(sinodeb));
++      } else
++              if(!squashfs_get_cached_block(s, (char *) &inodeb, block,  offset,
++                                      sizeof(inodeb), &next_block, &next_offset))
++                      goto failed_read;
++
++      i->i_nlink = 1;
++
++      i->i_mtime.tv_sec = sBlk->mkfs_time;
++      i->i_atime.tv_sec = sBlk->mkfs_time;
++      i->i_ctime.tv_sec = sBlk->mkfs_time;
++
++      i->i_uid = msBlk->uid[inodeb.uid];
++      i->i_ino = SQUASHFS_MK_VFS_INODE(block - sBlk->inode_table_start, offset);
++
++      i->i_mode = inodeb.mode;
++
++      switch(inodeb.inode_type) {
++              case SQUASHFS_FILE_TYPE: {
++                      squashfs_reg_inode_header inodep;
++
++                      if(msBlk->swap) {
++                              squashfs_reg_inode_header sinodep;
++
++                              if(!squashfs_get_cached_block(s, (char *) &sinodep, block,  offset, sizeof(sinodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++                              SQUASHFS_SWAP_REG_INODE_HEADER(&inodep, &sinodep);
++                      } else
++                              if(!squashfs_get_cached_block(s, (char *) &inodep, block,  offset, sizeof(inodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++
++                      SQUASHFS_I(i)->fragment_start_block = SQUASHFS_INVALID_BLK;
++                      if(inodep.fragment != SQUASHFS_INVALID_BLK && !get_fragment_location(s, inodep.fragment,
++                                                      &SQUASHFS_I(i)->fragment_start_block, &SQUASHFS_I(i)->fragment_size))
++                              goto failed_read;
++
++                      SQUASHFS_I(i)->fragment_offset = inodep.offset;
++                      i->i_size = inodep.file_size;
++                      i->i_fop = &generic_ro_fops;
++                      if(sBlk->block_size > 4096)
++                              i->i_data.a_ops = &squashfs_aops;
++                      else
++                              i->i_data.a_ops = &squashfs_aops_4K;
++                      i->i_mode |= S_IFREG;
++                      i->i_mtime.tv_sec = inodep.mtime;
++                      i->i_atime.tv_sec = inodep.mtime;
++                      i->i_ctime.tv_sec = inodep.mtime;
++                      i->i_blocks = ((i->i_size - 1) >> 9) + 1;
++                      i->i_blksize = PAGE_CACHE_SIZE;
++                      SQUASHFS_I(i)->start_block = inodep.start_block;
++                      SQUASHFS_I(i)->block_list_start = next_block;
++                      SQUASHFS_I(i)->offset = next_offset;
++                      TRACE("File inode %x:%x, start_block %x, block_list_start %x, offset %x\n",
++                                      SQUASHFS_INODE_BLK(inode), offset, inodep.start_block, next_block, next_offset);
++                      break;
++              }
++              case SQUASHFS_DIR_TYPE: {
++                      squashfs_dir_inode_header inodep;
++
++                      if(msBlk->swap) {
++                              squashfs_dir_inode_header sinodep;
++
++                              if(!squashfs_get_cached_block(s, (char *) &sinodep, block,  offset, sizeof(sinodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++                              SQUASHFS_SWAP_DIR_INODE_HEADER(&inodep, &sinodep);
++                      } else
++                              if(!squashfs_get_cached_block(s, (char *) &inodep, block,  offset, sizeof(inodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++
++                      i->i_size = inodep.file_size;
++                      i->i_op = &squashfs_dir_inode_ops;
++                      i->i_fop = &squashfs_dir_ops;
++                      i->i_mode |= S_IFDIR;
++                      i->i_mtime.tv_sec = inodep.mtime;
++                      i->i_atime.tv_sec = inodep.mtime;
++                      i->i_ctime.tv_sec = inodep.mtime;
++                      SQUASHFS_I(i)->start_block = inodep.start_block;
++                      SQUASHFS_I(i)->offset = inodep.offset;
++                      TRACE("Directory inode %x:%x, start_block %x, offset %x\n", SQUASHFS_INODE_BLK(inode), offset,
++                                      inodep.start_block, inodep.offset);
++                      break;
++              }
++              case SQUASHFS_SYMLINK_TYPE: {
++                      squashfs_symlink_inode_header inodep;
++      
++                      if(msBlk->swap) {
++                              squashfs_symlink_inode_header sinodep;
++
++                              if(!squashfs_get_cached_block(s, (char *) &sinodep, block,  offset, sizeof(sinodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++                              SQUASHFS_SWAP_SYMLINK_INODE_HEADER(&inodep, &sinodep);
++                      } else
++                              if(!squashfs_get_cached_block(s, (char *) &inodep, block,  offset, sizeof(inodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++
++                      i->i_size = inodep.symlink_size;
++                      i->i_op = &page_symlink_inode_operations;
++                      i->i_data.a_ops = &squashfs_symlink_aops;
++                      i->i_mode |= S_IFLNK;
++                      SQUASHFS_I(i)->start_block = next_block;
++                      SQUASHFS_I(i)->offset = next_offset;
++                      TRACE("Symbolic link inode %x:%x, start_block %x, offset %x\n",
++                              SQUASHFS_INODE_BLK(inode), offset, next_block, next_offset);
++                      break;
++               }
++               case SQUASHFS_BLKDEV_TYPE:
++               case SQUASHFS_CHRDEV_TYPE: {
++                      squashfs_dev_inode_header inodep;
++
++                      if(msBlk->swap) {
++                              squashfs_dev_inode_header sinodep;
++
++                              if(!squashfs_get_cached_block(s, (char *) &sinodep, block,  offset, sizeof(sinodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++                              SQUASHFS_SWAP_DEV_INODE_HEADER(&inodep, &sinodep);
++                      } else  
++                              if(!squashfs_get_cached_block(s, (char *) &inodep, block,  offset, sizeof(inodep),
++                                                      &next_block, &next_offset))
++                                      goto failed_read;
++
++                      i->i_size = 0;
++                      i->i_mode |= (inodeb.inode_type == SQUASHFS_CHRDEV_TYPE) ? S_IFCHR : S_IFBLK;
++                      init_special_inode(i, i->i_mode, old_decode_dev(inodep.rdev));
++                      TRACE("Device inode %x:%x, rdev %x\n", SQUASHFS_INODE_BLK(inode), offset, inodep.rdev);
++                      break;
++               }
++               case SQUASHFS_FIFO_TYPE:
++               case SQUASHFS_SOCKET_TYPE: {
++                      i->i_size = 0;
++                      i->i_mode |= (inodeb.inode_type == SQUASHFS_FIFO_TYPE) ? S_IFIFO : S_IFSOCK;
++                      init_special_inode(i, i->i_mode, 0);
++                      break;
++               }
++               default:
++                      ERROR("Unknown inode type %d in squashfs_iget!\n", inodeb.inode_type);
++                              goto failed_read1;
++      }
++      
++      if(inodeb.guid == SQUASHFS_GUIDS)
++              i->i_gid = i->i_uid;
++      else
++              i->i_gid = msBlk->guid[inodeb.guid];
++
++      return i;
++
++failed_read:
++      ERROR("Unable to read inode [%x:%x]\n", block, offset);
++
++failed_read1:
++      return NULL;
++}
++
++
++static int squashfs_fill_super(struct super_block *s,
++              void *data, int silent)
++{
++      squashfs_sb_info *msBlk;
++      squashfs_super_block *sBlk;
++      int i;
++      char b[BDEVNAME_SIZE];
++
++      TRACE("Entered squashfs_read_superblock\n");
++
++      if(!(msBlk = (squashfs_sb_info *) s->s_fs_info = (void *) kmalloc(sizeof(squashfs_sb_info), GFP_KERNEL))) {
++              ERROR("Failed to allocate superblock\n");
++              return -ENOMEM;
++      }
++      sBlk = &msBlk->sBlk;
++      
++      msBlk->devblksize = sb_min_blocksize(s, BLOCK_SIZE);
++      msBlk->devblksize_log2 = ffz(~msBlk->devblksize);
++
++      init_MUTEX(&msBlk->read_page_mutex);
++      init_MUTEX(&msBlk->block_cache_mutex);
++      init_MUTEX(&msBlk->fragment_mutex);
++      
++      init_waitqueue_head(&msBlk->waitq);
++      init_waitqueue_head(&msBlk->fragment_wait_queue);
++
++      if(!read_data(s, (char *) sBlk, SQUASHFS_START, sizeof(squashfs_super_block) | SQUASHFS_COMPRESSED_BIT, 0, NULL)) {
++              SERROR("unable to read superblock\n");
++              goto failed_mount;
++      }
++
++      /* Check it is a SQUASHFS superblock */
++      msBlk->swap = 0;
++      if((s->s_magic = sBlk->s_magic) != SQUASHFS_MAGIC) {
++              if(sBlk->s_magic == SQUASHFS_MAGIC_SWAP) {
++                      squashfs_super_block sblk;
++                      WARNING("Mounting a different endian SQUASHFS filesystem on %s\n", bdevname(s->s_bdev, b));
++                      SQUASHFS_SWAP_SUPER_BLOCK(&sblk, sBlk);
++                      memcpy(sBlk, &sblk, sizeof(squashfs_super_block));
++                      msBlk->swap = 1;
++              } else  {
++                      SERROR("Can't find a SQUASHFS superblock on %s\n", bdevname(s->s_bdev, b));
++                      goto failed_mount;
++              }
++      }
++
++      /* Check the MAJOR & MINOR versions */
++#ifdef SQUASHFS_1_0_COMPATIBILITY
++      if((sBlk->s_major != 1) && (sBlk->s_major != 2 || sBlk->s_minor > SQUASHFS_MINOR)) {
++              SERROR("Major/Minor mismatch, filesystem is (%d:%d), I support (1 : x) or (2 : <= %d)\n",
++                              sBlk->s_major, sBlk->s_minor, SQUASHFS_MINOR);
++              goto failed_mount;
++      }
++      if(sBlk->s_major == 1)
++              sBlk->block_size = sBlk->block_size_1;
++#else
++      if(sBlk->s_major != SQUASHFS_MAJOR || sBlk->s_minor > SQUASHFS_MINOR) {
++              SERROR("Major/Minor mismatch, filesystem is (%d:%d), I support (%d: <= %d)\n",
++                              sBlk->s_major, sBlk->s_minor, SQUASHFS_MAJOR, SQUASHFS_MINOR);
++              goto failed_mount;
++      }
++#endif
++
++      TRACE("Found valid superblock on %s\n", bdevname(s->s_bdev, b));
++      TRACE("Inodes are %scompressed\n", SQUASHFS_UNCOMPRESSED_INODES(sBlk->flags) ? "un" : "");
++      TRACE("Data is %scompressed\n", SQUASHFS_UNCOMPRESSED_DATA(sBlk->flags) ? "un" : "");
++      TRACE("Check data is %s present in the filesystem\n", SQUASHFS_CHECK_DATA(sBlk->flags) ? "" : "not");
++      TRACE("Filesystem size %d bytes\n", sBlk->bytes_used);
++      TRACE("Block size %d\n", sBlk->block_size);
++      TRACE("Number of inodes %d\n", sBlk->inodes);
++      if(sBlk->s_major > 1)
++              TRACE("Number of fragments %d\n", sBlk->fragments);
++      TRACE("Number of uids %d\n", sBlk->no_uids);
++      TRACE("Number of gids %d\n", sBlk->no_guids);
++      TRACE("sBlk->inode_table_start %x\n", sBlk->inode_table_start);
++      TRACE("sBlk->directory_table_start %x\n", sBlk->directory_table_start);
++              if(sBlk->s_major > 1)
++      TRACE("sBlk->fragment_table_start %x\n", sBlk->fragment_table_start);
++      TRACE("sBlk->uid_start %x\n", sBlk->uid_start);
++
++      s->s_flags |= MS_RDONLY;
++      s->s_op = &squashfs_ops;
++
++      /* Init inode_table block pointer array */
++      if(!(msBlk->block_cache = (squashfs_cache *) kmalloc(sizeof(squashfs_cache) * SQUASHFS_CACHED_BLKS, GFP_KERNEL))) {
++              ERROR("Failed to allocate block cache\n");
++              goto failed_mount;
++      }
++
++      for(i = 0; i < SQUASHFS_CACHED_BLKS; i++)
++              msBlk->block_cache[i].block = SQUASHFS_INVALID_BLK;
++
++      msBlk->next_cache = 0;
++
++      /* Allocate read_data block */
++      msBlk->read_size = (sBlk->block_size < SQUASHFS_METADATA_SIZE) ? SQUASHFS_METADATA_SIZE : sBlk->block_size;
++      if(!(msBlk->read_data = (char *) kmalloc(msBlk->read_size, GFP_KERNEL))) {
++              ERROR("Failed to allocate read_data block\n");
++              goto failed_mount1;
++      }
++
++      /* Allocate read_page block */
++      if(sBlk->block_size > PAGE_CACHE_SIZE && 
++         !(msBlk->read_page = (char *) kmalloc(sBlk->block_size, GFP_KERNEL))) {
++              ERROR("Failed to allocate read_page block\n");
++              goto failed_mount2;
++      }
++
++      /* Allocate uid and gid tables */
++      if(!(msBlk->uid = (squashfs_uid *) kmalloc((sBlk->no_uids +
++              sBlk->no_guids) * sizeof(squashfs_uid), GFP_KERNEL))) {
++              ERROR("Failed to allocate uid/gid table\n");
++              goto failed_mount3;
++      }
++      msBlk->guid = msBlk->uid + sBlk->no_uids;
++   
++      if(msBlk->swap) {
++              squashfs_uid suid[sBlk->no_uids + sBlk->no_guids];
++
++              if(!read_data(s, (char *) &suid, sBlk->uid_start, ((sBlk->no_uids + sBlk->no_guids) *
++                              sizeof(squashfs_uid)) | SQUASHFS_COMPRESSED_BIT, 0, NULL)) {
++                      SERROR("unable to read uid/gid table\n");
++                      goto failed_mount4;
++              }
++              SQUASHFS_SWAP_DATA(msBlk->uid, suid, (sBlk->no_uids + sBlk->no_guids), (sizeof(squashfs_uid) * 8));
++      } else
++              if(!read_data(s, (char *) msBlk->uid, sBlk->uid_start, ((sBlk->no_uids + sBlk->no_guids) *
++                              sizeof(squashfs_uid)) | SQUASHFS_COMPRESSED_BIT, 0, NULL)) {
++                      SERROR("unable to read uid/gid table\n");
++                      goto failed_mount4;
++              }
++
++
++#ifdef SQUASHFS_1_0_COMPATIBILITY
++      if(sBlk->s_major == 1) {
++              msBlk->iget = squashfs_iget_1;
++              msBlk->read_blocklist = read_blocklist_1;
++              msBlk->fragment = (struct squashfs_fragment_cache *) msBlk->fragment_index = NULL;
++              goto allocate_root;
++      }
++#endif
++      msBlk->iget = squashfs_iget;
++      msBlk->read_blocklist = read_blocklist;
++
++      if(!(msBlk->fragment = (struct squashfs_fragment_cache *) kmalloc(sizeof(struct squashfs_fragment_cache) * SQUASHFS_CACHED_FRAGMENTS, GFP_KERNEL))) {
++              ERROR("Failed to allocate fragment block cache\n");
++              goto failed_mount4;
++      }
++
++      for(i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++) {
++              msBlk->fragment[i].locked = 0;
++              msBlk->fragment[i].block = SQUASHFS_INVALID_BLK;
++              msBlk->fragment[i].data = NULL;
++      }
++
++      msBlk->next_fragment = 0;
++
++      /* Allocate fragment index table */
++      if(!(msBlk->fragment_index = (squashfs_fragment_index *) kmalloc(SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk->fragments), GFP_KERNEL))) {
++              ERROR("Failed to allocate uid/gid table\n");
++              goto failed_mount5;
++      }
++   
++      if(SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk->fragments) &&
++              !read_data(s, (char *) msBlk->fragment_index, sBlk->fragment_table_start,
++              SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk->fragments) | SQUASHFS_COMPRESSED_BIT, 0, NULL)) {
++                      SERROR("unable to read fragment index table\n");
++                      goto failed_mount6;
++      }
++
++      if(msBlk->swap) {
++              int i;
++              squashfs_fragment_index fragment;
++
++              for(i = 0; i < SQUASHFS_FRAGMENT_INDEXES(sBlk->fragments); i++) {
++                      SQUASHFS_SWAP_FRAGMENT_INDEXES((&fragment), &msBlk->fragment_index[i], 1);
++                      msBlk->fragment_index[i] = fragment;
++              }
++      }
++
++#ifdef SQUASHFS_1_0_COMPATIBILITY
++allocate_root:
++#endif
++      if(!(s->s_root = d_alloc_root((msBlk->iget)(s, sBlk->root_inode)))) {
++              ERROR("Root inode create failed\n");
++              goto failed_mount5;
++      }
++
++      TRACE("Leaving squashfs_read_super\n");
++      return 0;
++
++failed_mount6:
++      kfree(msBlk->fragment_index);
++failed_mount5:
++      kfree(msBlk->fragment);
++failed_mount4:
++      kfree(msBlk->uid);
++failed_mount3:
++      kfree(msBlk->read_page);
++failed_mount2:
++      kfree(msBlk->read_data);
++failed_mount1:
++      kfree(msBlk->block_cache);
++failed_mount:
++      kfree(s->s_fs_info);
++      s->s_fs_info = NULL;
++      return -EINVAL;
++}
++
++
++static int squashfs_statfs(struct super_block *s, struct kstatfs *buf)
++{
++      squashfs_super_block *sBlk = &((squashfs_sb_info *)s->s_fs_info)->sBlk;
++
++      TRACE("Entered squashfs_statfs\n");
++      buf->f_type = SQUASHFS_MAGIC;
++      buf->f_bsize = sBlk->block_size;
++      buf->f_blocks = ((sBlk->bytes_used - 1) >> sBlk->block_log) + 1;
++      buf->f_bfree = buf->f_bavail = 0;
++      buf->f_files = sBlk->inodes;
++      buf->f_ffree = 0;
++      buf->f_namelen = SQUASHFS_NAME_LEN;
++      return 0;
++}
++
++
++static int squashfs_symlink_readpage(struct file *file, struct page *page)
++{
++      struct inode *inode = page->mapping->host;
++      int index = page->index << PAGE_CACHE_SHIFT, length, bytes;
++      int block = SQUASHFS_I(inode)->start_block;
++      int offset = SQUASHFS_I(inode)->offset;
++      void *pageaddr = kmap(page);
++
++      TRACE("Entered squashfs_symlink_readpage, page index %d, start block %x, offset %x\n",
++              page->index, SQUASHFS_I(inode)->start_block, SQUASHFS_I(inode)->offset);
++
++      for(length = 0; length < index; length += bytes) {
++              if(!(bytes = squashfs_get_cached_block(inode->i_sb, NULL, block, offset,
++                                      PAGE_CACHE_SIZE, &block, &offset))) {
++                      ERROR("Unable to read symbolic link [%x:%x]\n", block, offset);
++                      goto skip_read;
++              }
++      }
++
++      if(length != index) {
++              ERROR("(squashfs_symlink_readpage) length != index\n");
++              bytes = 0;
++              goto skip_read;
++      }
++
++      bytes = (inode->i_size - length) > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : inode->i_size - length;
++      if(!(bytes = squashfs_get_cached_block(inode->i_sb, pageaddr, block, offset, bytes, &block, &offset)))
++              ERROR("Unable to read symbolic link [%x:%x]\n", block, offset);
++
++skip_read:
++      memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
++      kunmap(page);
++      flush_dcache_page(page);
++      SetPageUptodate(page);
++      unlock_page(page);
++
++      return 0;
++}
++
++
++#define SIZE 256
++
++#ifdef SQUASHFS_1_0_COMPATIBILITY
++static unsigned int read_blocklist_1(struct inode *inode, int index, int readahead_blks,
++              char *block_list, char **block_p, unsigned int *bsize)
++{
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info;
++      unsigned short *block_listp;
++      int i = 0;
++      int block_ptr = SQUASHFS_I(inode)->block_list_start;
++      int offset = SQUASHFS_I(inode)->offset;
++      int block = SQUASHFS_I(inode)->start_block;
++
++      for(;;) {
++              int blocks = (index + readahead_blks - i);
++              if(blocks > (SIZE >> 1)) {
++                      if((index - i) <= (SIZE >> 1))
++                              blocks = index - i;
++                      else
++                              blocks = SIZE >> 1;
++              }
++
++              if(msBlk->swap) {
++                      unsigned char sblock_list[SIZE];
++                      if(!squashfs_get_cached_block(inode->i_sb, (char *) sblock_list, block_ptr, offset, blocks << 1, &block_ptr, &offset)) {
++                              ERROR("Unable to read block list [%d:%x]\n", block_ptr, offset);
++                              return 0;
++                      }
++                      SQUASHFS_SWAP_SHORTS(((unsigned short *)block_list), ((unsigned short *)sblock_list), blocks);
++              } else
++                      if(!squashfs_get_cached_block(inode->i_sb, (char *) block_list, block_ptr, offset, blocks << 1, &block_ptr, &offset)) {
++                              ERROR("Unable to read block list [%d:%x]\n", block_ptr, offset);
++                              return 0;
++                      }
++              for(block_listp = (unsigned short *) block_list; i < index && blocks; i ++, block_listp ++, blocks --)
++                      block += SQUASHFS_COMPRESSED_SIZE(*block_listp);
++              if(blocks >= readahead_blks)
++                      break;
++      }
++
++      if(bsize)
++              *bsize = SQUASHFS_COMPRESSED_SIZE(*block_listp) | (!SQUASHFS_COMPRESSED(*block_listp) ? SQUASHFS_COMPRESSED_BIT_BLOCK : 0);
++      else
++              (unsigned short *) *block_p = block_listp;
++      return block;
++}
++#endif
++
++
++static unsigned int read_blocklist(struct inode *inode, int index, int readahead_blks,
++              char *block_list, char **block_p, unsigned int *bsize)
++{
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info;
++      unsigned int *block_listp;
++      int i = 0;
++      int block_ptr = SQUASHFS_I(inode)->block_list_start;
++      int offset = SQUASHFS_I(inode)->offset;
++      int block = SQUASHFS_I(inode)->start_block;
++
++      for(;;) {
++              int blocks = (index + readahead_blks - i);
++              if(blocks > (SIZE >> 2)) {
++                      if((index - i) <= (SIZE >> 2))
++                              blocks = index - i;
++                      else
++                              blocks = SIZE >> 2;
++              }
++
++              if(msBlk->swap) {
++                      unsigned char sblock_list[SIZE];
++                      if(!squashfs_get_cached_block(inode->i_sb, (char *) sblock_list, block_ptr, offset, blocks << 2, &block_ptr, &offset)) {
++                              ERROR("Unable to read block list [%d:%x]\n", block_ptr, offset);
++                              return 0;
++                      }
++                      SQUASHFS_SWAP_INTS(((unsigned int *)block_list), ((unsigned int *)sblock_list), blocks);
++              } else
++                      if(!squashfs_get_cached_block(inode->i_sb, (char *) block_list, block_ptr, offset, blocks << 2, &block_ptr, &offset)) {
++                              ERROR("Unable to read block list [%d:%x]\n", block_ptr, offset);
++                              return 0;
++                      }
++              for(block_listp = (unsigned int *) block_list; i < index && blocks; i ++, block_listp ++, blocks --)
++                      block += SQUASHFS_COMPRESSED_SIZE_BLOCK(*block_listp);
++              if(blocks >= readahead_blks)
++                      break;
++      }
++
++      *bsize = *block_listp;
++      return block;
++}
++
++
++static int squashfs_readpage(struct file *file, struct page *page)
++{
++      struct inode *inode = page->mapping->host;
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info;
++      squashfs_super_block *sBlk = &msBlk->sBlk;
++      unsigned char block_list[SIZE];
++      unsigned int bsize, block, i = 0, bytes = 0, byte_offset = 0;
++      int index = page->index >> (sBlk->block_log - PAGE_CACHE_SHIFT);
++      void *pageaddr = kmap(page);
++      struct squashfs_fragment_cache *fragment;
++      char *data_ptr = msBlk->read_page;
++      
++      int mask = (1 << (sBlk->block_log - PAGE_CACHE_SHIFT)) - 1;
++      int start_index = page->index & ~mask;
++      int end_index = start_index | mask;
++
++      TRACE("Entered squashfs_readpage, page index %x, start block %x\n", (unsigned int) page->index,
++              SQUASHFS_I(inode)->start_block);
++
++      if(SQUASHFS_I(inode)->fragment_start_block == SQUASHFS_INVALID_BLK || index < (inode->i_size >> sBlk->block_log)) {
++              if((block = (msBlk->read_blocklist)(inode, index, 1, block_list, NULL, &bsize)) == 0)
++                      goto skip_read;
++
++              down(&msBlk->read_page_mutex);
++              if(!(bytes = read_data(inode->i_sb, msBlk->read_page, block, bsize, 1, NULL))) {
++                      ERROR("Unable to read page, block %x, size %x\n", block, bsize);
++                      up(&msBlk->read_page_mutex);
++                      goto skip_read;
++              }
++      } else {
++              if((fragment = get_cached_fragment(inode->i_sb, SQUASHFS_I(inode)->fragment_start_block, SQUASHFS_I(inode)->fragment_size)) == NULL) {
++                      ERROR("Unable to read page, block %x, size %x\n", SQUASHFS_I(inode)->fragment_start_block, (int) SQUASHFS_I(inode)->fragment_size);
++                      goto skip_read;
++              }
++              bytes = SQUASHFS_I(inode)->fragment_offset + (inode->i_size & (sBlk->block_size - 1));
++              byte_offset = SQUASHFS_I(inode)->fragment_offset;
++              data_ptr = fragment->data;
++      }
++
++      for(i = start_index; i <= end_index && byte_offset < bytes; i++, byte_offset += PAGE_CACHE_SIZE) {
++              struct page *push_page;
++              int available_bytes = (bytes - byte_offset) > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : bytes - byte_offset;
++
++              TRACE("bytes %d, i %d, byte_offset %d, available_bytes %d\n", bytes, i, byte_offset, available_bytes);
++
++              if(i == page->index)  {
++                      memcpy(pageaddr, data_ptr + byte_offset, available_bytes);
++                      memset(pageaddr + available_bytes, 0, PAGE_CACHE_SIZE - available_bytes);
++                      kunmap(page);
++                      flush_dcache_page(page);
++                      SetPageUptodate(page);
++                      unlock_page(page);
++              } else if((push_page = grab_cache_page_nowait(page->mapping, i))) {
++                      void *pageaddr = kmap(push_page);
++                      memcpy(pageaddr, data_ptr + byte_offset, available_bytes);
++                      memset(pageaddr + available_bytes, 0, PAGE_CACHE_SIZE - available_bytes);
++                      kunmap(push_page);
++                      flush_dcache_page(push_page);
++                      SetPageUptodate(push_page);
++                      unlock_page(push_page);
++                      page_cache_release(push_page);
++              }
++      }
++
++      if(SQUASHFS_I(inode)->fragment_start_block == SQUASHFS_INVALID_BLK || index < (inode->i_size >> sBlk->block_log))
++              up(&msBlk->read_page_mutex);
++      else
++              release_cached_fragment(msBlk, fragment);
++
++      return 0;
++
++skip_read:
++      memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
++      kunmap(page);
++      flush_dcache_page(page);
++      SetPageUptodate(page);
++      unlock_page(page);
++
++      return 0;
++}
++
++
++static int squashfs_readpage4K(struct file *file, struct page *page)
++{
++      struct inode *inode = page->mapping->host;
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info;
++      squashfs_super_block *sBlk = &msBlk->sBlk;
++      unsigned char block_list[SIZE];
++      unsigned int bsize, block, bytes = 0;
++      void *pageaddr = kmap(page);
++      
++      TRACE("Entered squashfs_readpage4K, page index %x, start block %x\n", (unsigned int) page->index,
++              SQUASHFS_I(inode)->start_block);
++
++      if(page->index < (inode->i_size >> sBlk->block_log)) {
++              block = (msBlk->read_blocklist)(inode, page->index, 1, block_list, NULL, &bsize);
++
++              if(!(bytes = read_data(inode->i_sb, pageaddr, block, bsize, 1, NULL)))
++                      ERROR("Unable to read page, block %x, size %x\n", block, bsize);
++      } else {
++              struct squashfs_fragment_cache *fragment;
++
++              if((fragment = get_cached_fragment(inode->i_sb, SQUASHFS_I(inode)->fragment_start_block, SQUASHFS_I(inode)->fragment_size)) == NULL)
++                      ERROR("Unable to read page, block %x, size %x\n", SQUASHFS_I(inode)->fragment_start_block, (int) SQUASHFS_I(inode)->fragment_size);
++              else {
++                      bytes = inode->i_size & (sBlk->block_size - 1);
++                      memcpy(pageaddr, fragment->data + SQUASHFS_I(inode)->fragment_offset, bytes);
++                      release_cached_fragment(msBlk, fragment);
++              }
++      }
++
++      memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
++      kunmap(page);
++      flush_dcache_page(page);
++      SetPageUptodate(page);
++      unlock_page(page);
++
++      return 0;
++}
++
++
++#ifdef SQUASHFS_1_0_COMPATIBILITY
++static int squashfs_readpage_lessthan4K(struct file *file, struct page *page)
++{
++      struct inode *inode = page->mapping->host;
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info;
++      squashfs_super_block *sBlk = &msBlk->sBlk;
++      unsigned char block_list[SIZE];
++      unsigned short *block_listp, block, bytes = 0;
++      int index = page->index << (PAGE_CACHE_SHIFT - sBlk->block_log);
++      int file_blocks = ((inode->i_size - 1) >> sBlk->block_log) + 1;
++      int readahead_blks = 1 << (PAGE_CACHE_SHIFT - sBlk->block_log);
++      void *pageaddr = kmap(page);
++      
++      int i_end = index + (1 << (PAGE_CACHE_SHIFT - sBlk->block_log));
++      int byte;
++
++      TRACE("Entered squashfs_readpage_lessthan4K, page index %x, start block %x\n", (unsigned int) page->index,
++              SQUASHFS_I(inode)->start_block);
++
++      block = read_blocklist_1(inode, index, readahead_blks, block_list, (char **) &block_listp, NULL);
++
++      if(i_end > file_blocks)
++              i_end = file_blocks;
++
++      while(index < i_end) {
++              if(!(byte = read_data(inode->i_sb, pageaddr, block, *block_listp, 0, NULL))) {
++                      ERROR("Unable to read page, block %x, size %x\n", block, *block_listp);
++                      goto skip_read;
++              }
++              block += SQUASHFS_COMPRESSED_SIZE(*block_listp);
++              pageaddr += byte;
++              bytes += byte;
++              index ++;
++              block_listp ++;
++      }
++
++skip_read:
++      memset(pageaddr, 0, PAGE_CACHE_SIZE - bytes);
++      kunmap(page);
++      flush_dcache_page(page);
++      SetPageUptodate(page);
++      unlock_page(page);
++
++      return 0;
++}
++#endif
++
++
++static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir)
++{
++      struct inode *i = file->f_dentry->d_inode;
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)i->i_sb->s_fs_info;
++      squashfs_super_block *sBlk = &msBlk->sBlk;
++      int next_block = SQUASHFS_I(i)->start_block + sBlk->directory_table_start, next_offset =
++              SQUASHFS_I(i)->offset, length = 0, dirs_read = 0, dir_count;
++      squashfs_dir_header dirh;
++      char buffer[sizeof(squashfs_dir_entry) + SQUASHFS_NAME_LEN + 1];
++      squashfs_dir_entry *dire = (squashfs_dir_entry *) buffer;
++
++      TRACE("Entered squashfs_readdir [%x:%x]\n", next_block, next_offset);
++
++      lock_kernel();
++      while(length < i->i_size) {
++              /* read directory header */
++              if(msBlk->swap) {
++                      squashfs_dir_header sdirh;
++                      if(!squashfs_get_cached_block(i->i_sb, (char *) &sdirh, next_block,
++                                              next_offset, sizeof(sdirh), &next_block, &next_offset))
++                              goto failed_read;
++                      length += sizeof(sdirh);
++                      SQUASHFS_SWAP_DIR_HEADER(&dirh, &sdirh);
++              } else {
++                      if(!squashfs_get_cached_block(i->i_sb, (char *) &dirh, next_block,
++                                              next_offset, sizeof(dirh), &next_block, &next_offset))
++                              goto failed_read;
++                      length += sizeof(dirh);
++              }
++
++              dir_count = dirh.count + 1;
++              while(dir_count--) {
++                      if(msBlk->swap) {
++                              squashfs_dir_entry sdire;
++                              if(!squashfs_get_cached_block(i->i_sb, (char *) &sdire, next_block,
++                                                      next_offset, sizeof(sdire), &next_block, &next_offset))
++                                      goto failed_read;
++                              length += sizeof(sdire);
++                              SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire);
++                      } else {
++                              if(!squashfs_get_cached_block(i->i_sb, (char *) dire, next_block,
++                                                      next_offset, sizeof(*dire), &next_block, &next_offset))
++                                      goto failed_read;
++                              length += sizeof(*dire);
++                      }
++
++                      if(!squashfs_get_cached_block(i->i_sb, dire->name, next_block,
++                                              next_offset, dire->size + 1, &next_block, &next_offset))
++                              goto failed_read;
++                      length += dire->size + 1;
++
++                      if(file->f_pos >= length)
++                              continue;
++
++                      dire->name[dire->size + 1] = '\0';
++
++                      TRACE("Calling filldir(%x, %s, %d, %d, %x:%x, %d)\n", (unsigned int) dirent,
++                      dire->name, dire->size + 1, (int) file->f_pos,
++                      dirh.start_block, dire->offset, squashfs_filetype_table[dire->type]);
++
++                      if(filldir(dirent, dire->name, dire->size + 1, file->f_pos, SQUASHFS_MK_VFS_INODE(dirh.start_block,
++                                                      dire->offset), squashfs_filetype_table[dire->type]) < 0) {
++                              TRACE("Filldir returned less than 0\n");
++                              unlock_kernel();
++                              return dirs_read;
++                      }
++
++                      file->f_pos = length;
++                      dirs_read ++;
++              }
++      }
++
++      unlock_kernel();
++      return dirs_read;
++
++failed_read:
++      unlock_kernel();
++      ERROR("Unable to read directory block [%x:%x]\n", next_block, next_offset);
++      return 0;
++}
++
++
++static struct dentry *squashfs_lookup(struct inode *i, struct dentry *dentry, struct nameidata *nd)
++{
++      const char *name =dentry->d_name.name;
++      int len = dentry->d_name.len;
++      struct inode *inode = NULL;
++      squashfs_sb_info *msBlk = (squashfs_sb_info *)i->i_sb->s_fs_info;
++      squashfs_super_block *sBlk = &msBlk->sBlk;
++      int next_block = SQUASHFS_I(i)->start_block + sBlk->directory_table_start, next_offset =
++              SQUASHFS_I(i)->offset, length = 0, dir_count;
++      squashfs_dir_header dirh;
++      char buffer[sizeof(squashfs_dir_entry) + SQUASHFS_NAME_LEN];
++      squashfs_dir_entry *dire = (squashfs_dir_entry *) buffer;
++
++      TRACE("Entered squashfs_lookup [%x:%x]\n", next_block, next_offset);
++
++      lock_kernel();
++      while(length < i->i_size) {
++              /* read directory header */
++              if(msBlk->swap) {
++                      squashfs_dir_header sdirh;
++                      if(!squashfs_get_cached_block(i->i_sb, (char *) &sdirh, next_block, next_offset,
++                                              sizeof(sdirh), &next_block, &next_offset))
++                              goto failed_read;
++                      length += sizeof(sdirh);
++                      SQUASHFS_SWAP_DIR_HEADER(&dirh, &sdirh);
++              } else {
++                      if(!squashfs_get_cached_block(i->i_sb, (char *) &dirh, next_block, next_offset,
++                                              sizeof(dirh), &next_block, &next_offset))
++                              goto failed_read;
++                      length += sizeof(dirh);
++              }
++
++              dir_count = dirh.count + 1;
++              while(dir_count--) {
++                      if(msBlk->swap) {
++                              squashfs_dir_entry sdire;
++                              if(!squashfs_get_cached_block(i->i_sb, (char *) &sdire,
++                                                      next_block,next_offset, sizeof(sdire), &next_block, &next_offset))
++                                      goto failed_read;
++                              length += sizeof(sdire);
++                              SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire);
++                      } else {
++                              if(!squashfs_get_cached_block(i->i_sb, (char *) dire,
++                                                      next_block,next_offset, sizeof(*dire), &next_block, &next_offset))
++                                      goto failed_read;
++                              length += sizeof(*dire);
++                      }
++
++                      if(!squashfs_get_cached_block(i->i_sb, dire->name,
++                                              next_block, next_offset, dire->size + 1, &next_block, &next_offset))
++                              goto failed_read;
++                      length += dire->size + 1;
++
++                      if((len == dire->size + 1) && !strncmp(name, dire->name, len)) {
++                              squashfs_inode ino = SQUASHFS_MKINODE(dirh.start_block, dire->offset);
++
++                              TRACE("calling squashfs_iget for directory entry %s, inode %x:%x\n",
++                                              name, dirh.start_block, dire->offset);
++
++                              inode = (msBlk->iget)(i->i_sb, ino);
++
++                              goto exit_loop;
++                      }
++              }
++      }
++
++exit_loop:
++      d_add(dentry, inode);
++      unlock_kernel();
++      return ERR_PTR(0);
++
++failed_read:
++      ERROR("Unable to read directory block [%x:%x]\n", next_block, next_offset);
++      goto exit_loop;
++}
++
++
++static void squashfs_put_super(struct super_block *s)
++{
++      if(s->s_fs_info) {
++              squashfs_sb_info *sbi = (squashfs_sb_info *) s->s_fs_info;
++              if(sbi->block_cache) kfree(sbi->block_cache);
++              if(sbi->read_data) kfree(sbi->read_data);
++              if(sbi->read_page) kfree(sbi->read_page);
++              if(sbi->uid) kfree(sbi->uid);
++              if(sbi->fragment) kfree(sbi->fragment);
++              if(sbi->fragment_index) kfree(sbi->fragment_index);
++              kfree(s->s_fs_info);
++              s->s_fs_info = NULL;
++      }
++}
++
++
++static struct super_block *squashfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
++{
++      return get_sb_bdev(fs_type, flags, dev_name, data, squashfs_fill_super);
++}
++
++
++static int __init init_squashfs_fs(void)
++{
++      int err = init_inodecache();
++      if(err)
++              return err;
++
++      if(!(stream.workspace = (char *) vmalloc(zlib_inflate_workspacesize()))) {
++              ERROR("Failed to allocate zlib workspace\n");
++              destroy_inodecache();
++              return -ENOMEM;
++      }
++
++      if((err = register_filesystem(&squashfs_fs_type))) {
++              vfree(stream.workspace);
++              destroy_inodecache();
++      }
++
++      return err;
++}
++
++
++static void __exit exit_squashfs_fs(void)
++{
++      vfree(stream.workspace);
++      unregister_filesystem(&squashfs_fs_type);
++      destroy_inodecache();
++}
++
++
++static kmem_cache_t * squashfs_inode_cachep;
++
++
++static struct inode *squashfs_alloc_inode(struct super_block *sb)
++{
++      struct squashfs_inode_info *ei;
++      ei = (struct squashfs_inode_info *)kmem_cache_alloc(squashfs_inode_cachep, SLAB_KERNEL);
++      if (!ei)
++              return NULL;
++      return &ei->vfs_inode;
++}
++
++
++static void squashfs_destroy_inode(struct inode *inode)
++{
++      kmem_cache_free(squashfs_inode_cachep, SQUASHFS_I(inode));
++}
++
++
++static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
++{
++      struct squashfs_inode_info *ei = (struct squashfs_inode_info *) foo;
++
++      if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
++          SLAB_CTOR_CONSTRUCTOR)
++              inode_init_once(&ei->vfs_inode);
++}
++ 
++
++static int init_inodecache(void)
++{
++      squashfs_inode_cachep = kmem_cache_create("squashfs_inode_cache",
++                                           sizeof(struct squashfs_inode_info),
++                                           0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
++                                           init_once, NULL);
++      if (squashfs_inode_cachep == NULL)
++              return -ENOMEM;
++      return 0;
++}
++
++
++static void destroy_inodecache(void)
++{
++      if (kmem_cache_destroy(squashfs_inode_cachep))
++              printk(KERN_INFO "squashfs_inode_cache: not all structures were freed\n");
++}
++
++
++module_init(init_squashfs_fs);
++module_exit(exit_squashfs_fs);
++MODULE_DESCRIPTION("squashfs, a compressed read-only filesystem");
++MODULE_AUTHOR("Phillip Lougher <plougher@users.sourceforge.net>");
++MODULE_LICENSE("GPL");
+diff --new-file -ur linux-2.6.7/fs/squashfs/Makefile linux-2.6.7-squashfs2.0/fs/squashfs/Makefile
+--- linux-2.6.7/fs/squashfs/Makefile   1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7-squashfs2.0/fs/squashfs/Makefile       2004-07-11 05:31:55.000000000 +0100
+@@ -0,0 +1,7 @@
++#
++# Makefile for the linux squashfs routines.
++#
++
++obj-$(CONFIG_SQUASHFS) += squashfs.o
++
++squashfs-objs := inode.o
+diff --new-file -ur linux-2.6.7/include/linux/squashfs_fs.h linux-2.6.7-squashfs2.0/include/linux/squashfs_fs.h
+--- linux-2.6.7/include/linux/squashfs_fs.h    1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7-squashfs2.0/include/linux/squashfs_fs.h        2004-07-11 05:36:08.000000000 +0100
+@@ -0,0 +1,474 @@
++#ifndef SQUASHFS_FS
++#define SQUASHFS_FS
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2002, 2003, 2004 Phillip Lougher <plougher@users.sourceforge.net>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs_fs.h
++ */
++
++#define SQUASHFS_MAJOR                        2
++#define SQUASHFS_MINOR                        0
++#define SQUASHFS_MAGIC                        0x73717368
++#define SQUASHFS_MAGIC_SWAP           0x68737173
++#define SQUASHFS_START                        0
++
++/* size of metadata (inode and directory) blocks */
++#define SQUASHFS_METADATA_SIZE                8192
++#define SQUASHFS_METADATA_LOG         13
++
++/* default size of data blocks */
++#define SQUASHFS_FILE_SIZE            65536
++#define SQUASHFS_FILE_LOG             16
++
++#define SQUASHFS_FILE_MAX_SIZE                65536
++
++/* Max number of uids and gids */
++#define SQUASHFS_UIDS                 256
++#define SQUASHFS_GUIDS                        255
++
++/* Max length of filename (not 255) */
++#define SQUASHFS_NAME_LEN             256
++
++#define SQUASHFS_INVALID              ((long long) 0xffffffffffff)
++#define SQUASHFS_INVALID_BLK          ((long long) 0xffffffff)
++#define SQUASHFS_USED_BLK             ((long long) 0xfffffffe)
++
++/* Filesystem flags */
++#define SQUASHFS_NOI                  0
++#define SQUASHFS_NOD                  1
++#define SQUASHFS_CHECK                        2
++#define SQUASHFS_NOF                  3
++#define SQUASHFS_NO_FRAG              4
++#define SQUASHFS_ALWAYS_FRAG          5
++#define SQUASHFS_DUPLICATE            6
++#define SQUASHFS_BIT(flag, bit)               ((flag >> bit) & 1)
++#define SQUASHFS_UNCOMPRESSED_INODES(flags)   SQUASHFS_BIT(flags, SQUASHFS_NOI)
++#define SQUASHFS_UNCOMPRESSED_DATA(flags)     SQUASHFS_BIT(flags, SQUASHFS_NOD)
++#define SQUASHFS_UNCOMPRESSED_FRAGMENTS(flags)        SQUASHFS_BIT(flags, SQUASHFS_NOF)
++#define SQUASHFS_NO_FRAGMENTS(flags)          SQUASHFS_BIT(flags, SQUASHFS_NO_FRAG)
++#define SQUASHFS_ALWAYS_FRAGMENTS(flags)      SQUASHFS_BIT(flags, SQUASHFS_ALWAYS_FRAG)
++#define SQUASHFS_DUPLICATES(flags)            SQUASHFS_BIT(flags, SQUASHFS_DUPLICATE)
++#define SQUASHFS_CHECK_DATA(flags)            SQUASHFS_BIT(flags, SQUASHFS_CHECK)
++#define SQUASHFS_MKFLAGS(noi, nod, check_data, nof, no_frag, always_frag, duplicate_checking) (noi | (nod << 1) | (check_data << 2) | (nof << 3) | (no_frag << 4) | (always_frag << 5) | (duplicate_checking << 6))
++
++/* Max number of types and file types */
++#define SQUASHFS_DIR_TYPE             1
++#define SQUASHFS_FILE_TYPE            2
++#define SQUASHFS_SYMLINK_TYPE         3
++#define SQUASHFS_BLKDEV_TYPE          4
++#define SQUASHFS_CHRDEV_TYPE          5
++#define SQUASHFS_FIFO_TYPE            6
++#define SQUASHFS_SOCKET_TYPE          7
++
++/* 1.0 filesystem type definitions */
++#define SQUASHFS_TYPES                        5
++#define SQUASHFS_IPC_TYPE             0
++
++/* Flag whether block is compressed or uncompressed, bit is set if block is uncompressed */
++#define SQUASHFS_COMPRESSED_BIT               (1 << 15)
++#define SQUASHFS_COMPRESSED_SIZE(B)   (((B) & ~SQUASHFS_COMPRESSED_BIT) ? \
++                                      (B) & ~SQUASHFS_COMPRESSED_BIT : SQUASHFS_COMPRESSED_BIT)
++
++#define SQUASHFS_COMPRESSED(B)                (!((B) & SQUASHFS_COMPRESSED_BIT))
++
++#define SQUASHFS_COMPRESSED_BIT_BLOCK         (1 << 24)
++#define SQUASHFS_COMPRESSED_SIZE_BLOCK(B)     (((B) & ~SQUASHFS_COMPRESSED_BIT_BLOCK) ? \
++                                      (B) & ~SQUASHFS_COMPRESSED_BIT_BLOCK : SQUASHFS_COMPRESSED_BIT_BLOCK)
++
++#define SQUASHFS_COMPRESSED_BLOCK(B)          (!((B) & SQUASHFS_COMPRESSED_BIT_BLOCK))
++
++/*
++ * Inode number ops.  Inodes consist of a compressed block number, and an uncompressed
++ * offset within that block
++ */
++#define SQUASHFS_INODE_BLK(a)         ((unsigned int) ((a) >> 16))
++#define SQUASHFS_INODE_OFFSET(a)      ((unsigned int) ((a) & 0xffff))
++#define SQUASHFS_MKINODE(A, B)                ((squashfs_inode)(((squashfs_inode) (A) << 16)\
++                                      + (B)))
++
++/* Compute 32 bit VFS inode number from squashfs inode number */
++#define SQUASHFS_MK_VFS_INODE(a, b)   ((unsigned int) (((a) << 8) + ((b) >> 2) + 1))
++
++/* Translate between VFS mode and squashfs mode */
++#define SQUASHFS_MODE(a)              ((a) & 0xfff)
++
++/* fragment and fragment table defines */
++typedef unsigned int                  squashfs_fragment_index;
++#define SQUASHFS_FRAGMENT_BYTES(A)    (A * sizeof(squashfs_fragment_entry))
++#define SQUASHFS_FRAGMENT_INDEX(A)    (SQUASHFS_FRAGMENT_BYTES(A) / SQUASHFS_METADATA_SIZE)
++#define SQUASHFS_FRAGMENT_INDEX_OFFSET(A)     (SQUASHFS_FRAGMENT_BYTES(A) % SQUASHFS_METADATA_SIZE)
++#define SQUASHFS_FRAGMENT_INDEXES(A)  ((SQUASHFS_FRAGMENT_BYTES(A) + SQUASHFS_METADATA_SIZE - 1) / SQUASHFS_METADATA_SIZE)
++#define SQUASHFS_FRAGMENT_INDEX_BYTES(A)      (SQUASHFS_FRAGMENT_INDEXES(A) * sizeof(squashfs_fragment_index))
++#define SQUASHFS_CACHED_FRAGMENTS     3
++
++/* cached data constants for filesystem */
++#define SQUASHFS_CACHED_BLKS          8
++
++#define SQUASHFS_MAX_FILE_SIZE_LOG    32
++#define SQUASHFS_MAX_FILE_SIZE                ((long long) 1 << (SQUASHFS_MAX_FILE_SIZE_LOG - 1))
++
++#define SQUASHFS_MARKER_BYTE          0xff
++
++/*
++ * definitions for structures on disk
++ */
++
++typedef unsigned int          squashfs_block;
++typedef long long             squashfs_inode;
++
++typedef unsigned int          squashfs_uid;
++
++typedef struct squashfs_super_block {
++      unsigned int            s_magic;
++      unsigned int            inodes;
++      unsigned int            bytes_used;
++      unsigned int            uid_start;
++      unsigned int            guid_start;
++      unsigned int            inode_table_start;
++      unsigned int            directory_table_start;
++      unsigned int            s_major:16;
++      unsigned int            s_minor:16;
++      unsigned int            block_size_1:16;
++      unsigned int            block_log:16;
++      unsigned int            flags:8;
++      unsigned int            no_uids:8;
++      unsigned int            no_guids:8;
++      unsigned int            mkfs_time /* time of filesystem creation */;
++      squashfs_inode          root_inode;
++      unsigned int            block_size;
++      unsigned int            fragments;
++      unsigned int            fragment_table_start;
++} __attribute__ ((packed)) squashfs_super_block;
++
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:8; /* index into uid table */
++      unsigned int            guid:8; /* index into guid table */
++} __attribute__ ((packed)) squashfs_base_inode_header;
++
++typedef squashfs_base_inode_header squashfs_ipc_inode_header;
++
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:8; /* index into uid table */
++      unsigned int            guid:8; /* index into guid table */
++      unsigned short          rdev;
++} __attribute__ ((packed)) squashfs_dev_inode_header;
++      
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:8; /* index into uid table */
++      unsigned int            guid:8; /* index into guid table */
++      unsigned short          symlink_size;
++      char                    symlink[0];
++} __attribute__ ((packed)) squashfs_symlink_inode_header;
++
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:8; /* index into uid table */
++      unsigned int            guid:8; /* index into guid table */
++      unsigned int            mtime;
++      squashfs_block          start_block;
++      unsigned int            fragment;
++      unsigned int            offset;
++      unsigned int            file_size:SQUASHFS_MAX_FILE_SIZE_LOG;
++      unsigned short          block_list[0];
++} __attribute__ ((packed)) squashfs_reg_inode_header;
++
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:8; /* index into uid table */
++      unsigned int            guid:8; /* index into guid table */
++      unsigned int            file_size:19;
++      unsigned int            offset:13;
++      unsigned int            mtime;
++      unsigned int            start_block:24;
++} __attribute__  ((packed)) squashfs_dir_inode_header;
++
++typedef union {
++      squashfs_base_inode_header      base;
++      squashfs_dev_inode_header       dev;
++      squashfs_symlink_inode_header   symlink;
++      squashfs_reg_inode_header       reg;
++      squashfs_dir_inode_header       dir;
++      squashfs_ipc_inode_header       ipc;
++} squashfs_inode_header;
++      
++typedef struct {
++      unsigned int            offset:13;
++      unsigned int            type:3;
++      unsigned int            size:8;
++      char                    name[0];
++} __attribute__ ((packed)) squashfs_dir_entry;
++
++typedef struct {
++      unsigned int            count:8;
++      unsigned int            start_block:24;
++} __attribute__ ((packed)) squashfs_dir_header;
++
++
++typedef struct {
++      unsigned int            start_block;
++      unsigned int            size;
++} __attribute__ ((packed)) squashfs_fragment_entry;
++
++extern int squashfs_uncompress_block(void *d, int dstlen, void *s, int srclen);
++extern int squashfs_uncompress_init(void);
++extern int squashfs_uncompress_exit(void);
++
++/*
++ * macros to convert each packed bitfield structure from little endian to big
++ * endian and vice versa.  These are needed when creating or using a filesystem on a
++ * machine with different byte ordering to the target architecture.
++ *
++ */
++
++#define SQUASHFS_SWAP_SUPER_BLOCK(s, d) {\
++      SQUASHFS_MEMSET(s, d, sizeof(squashfs_super_block));\
++      SQUASHFS_SWAP((s)->s_magic, d, 0, 32);\
++      SQUASHFS_SWAP((s)->inodes, d, 32, 32);\
++      SQUASHFS_SWAP((s)->bytes_used, d, 64, 32);\
++      SQUASHFS_SWAP((s)->uid_start, d, 96, 32);\
++      SQUASHFS_SWAP((s)->guid_start, d, 128, 32);\
++      SQUASHFS_SWAP((s)->inode_table_start, d, 160, 32);\
++      SQUASHFS_SWAP((s)->directory_table_start, d, 192, 32);\
++      SQUASHFS_SWAP((s)->s_major, d, 224, 16);\
++      SQUASHFS_SWAP((s)->s_minor, d, 240, 16);\
++      SQUASHFS_SWAP((s)->block_size_1, d, 256, 16);\
++      SQUASHFS_SWAP((s)->block_log, d, 272, 16);\
++      SQUASHFS_SWAP((s)->flags, d, 288, 8);\
++      SQUASHFS_SWAP((s)->no_uids, d, 296, 8);\
++      SQUASHFS_SWAP((s)->no_guids, d, 304, 8);\
++      SQUASHFS_SWAP((s)->mkfs_time, d, 312, 32);\
++      SQUASHFS_SWAP((s)->root_inode, d, 344, 64);\
++      SQUASHFS_SWAP((s)->block_size, d, 408, 32);\
++      SQUASHFS_SWAP((s)->fragments, d, 440, 32);\
++      SQUASHFS_SWAP((s)->fragment_table_start, d, 472, 32);\
++}
++
++#define SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, n) {\
++      SQUASHFS_MEMSET(s, d, n);\
++      SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\
++      SQUASHFS_SWAP((s)->mode, d, 4, 12);\
++      SQUASHFS_SWAP((s)->uid, d, 16, 8);\
++      SQUASHFS_SWAP((s)->guid, d, 24, 8);\
++}
++
++#define SQUASHFS_SWAP_IPC_INODE_HEADER(s, d) SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_ipc_inode_header))
++
++#define SQUASHFS_SWAP_DEV_INODE_HEADER(s, d) {\
++      SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_dev_inode_header));\
++      SQUASHFS_SWAP((s)->rdev, d, 32, 16);\
++}
++
++#define SQUASHFS_SWAP_SYMLINK_INODE_HEADER(s, d) {\
++      SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_symlink_inode_header));\
++      SQUASHFS_SWAP((s)->symlink_size, d, 32, 16);\
++}
++
++#define SQUASHFS_SWAP_REG_INODE_HEADER(s, d) {\
++      SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_reg_inode_header));\
++      SQUASHFS_SWAP((s)->mtime, d, 32, 32);\
++      SQUASHFS_SWAP((s)->start_block, d, 64, 32);\
++      SQUASHFS_SWAP((s)->fragment, d, 96, 32);\
++      SQUASHFS_SWAP((s)->offset, d, 128, 32);\
++      SQUASHFS_SWAP((s)->file_size, d, 160, SQUASHFS_MAX_FILE_SIZE_LOG);\
++}
++
++#define SQUASHFS_SWAP_DIR_INODE_HEADER(s, d) {\
++      SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_dir_inode_header));\
++      SQUASHFS_SWAP((s)->file_size, d, 32, 19);\
++      SQUASHFS_SWAP((s)->offset, d, 51, 13);\
++      SQUASHFS_SWAP((s)->mtime, d, 64, 32);\
++      SQUASHFS_SWAP((s)->start_block, d, 96, 24);\
++}
++
++#define SQUASHFS_SWAP_DIR_HEADER(s, d) {\
++      SQUASHFS_MEMSET(s, d, sizeof(squashfs_dir_header));\
++      SQUASHFS_SWAP((s)->count, d, 0, 8);\
++      SQUASHFS_SWAP((s)->start_block, d, 8, 24);\
++}
++
++#define SQUASHFS_SWAP_DIR_ENTRY(s, d) {\
++      SQUASHFS_MEMSET(s, d, sizeof(squashfs_dir_entry));\
++      SQUASHFS_SWAP((s)->offset, d, 0, 13);\
++      SQUASHFS_SWAP((s)->type, d, 13, 3);\
++      SQUASHFS_SWAP((s)->size, d, 16, 8);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_ENTRY(s, d) {\
++      SQUASHFS_MEMSET(s, d, sizeof(squashfs_fragment_entry));\
++      SQUASHFS_SWAP((s)->start_block, d, 0, 32);\
++      SQUASHFS_SWAP((s)->size, d, 32, 32);\
++}
++
++#define SQUASHFS_SWAP_SHORTS(s, d, n) {\
++      int entry;\
++      int bit_position;\
++      SQUASHFS_MEMSET(s, d, n * 2);\
++      for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += 16)\
++              SQUASHFS_SWAP(s[entry], d, bit_position, 16);\
++}
++
++#define SQUASHFS_SWAP_INTS(s, d, n) {\
++      int entry;\
++      int bit_position;\
++      SQUASHFS_MEMSET(s, d, n * 4);\
++      for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += 32)\
++              SQUASHFS_SWAP(s[entry], d, bit_position, 32);\
++}
++
++#define SQUASHFS_SWAP_DATA(s, d, n, bits) {\
++      int entry;\
++      int bit_position;\
++      SQUASHFS_MEMSET(s, d, n * bits / 8);\
++      for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += bits)\
++              SQUASHFS_SWAP(s[entry], d, bit_position, bits);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_INDEXES(s, d, n) SQUASHFS_SWAP_INTS(s, d, n)
++
++#ifdef SQUASHFS_1_0_COMPATIBILITY
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:4; /* index into uid table */
++      unsigned int            guid:4; /* index into guid table */
++} __attribute__ ((packed)) squashfs_base_inode_header_1;
++
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:4; /* index into uid table */
++      unsigned int            guid:4; /* index into guid table */
++      unsigned int            type:4;
++      unsigned int            offset:4;
++} __attribute__ ((packed)) squashfs_ipc_inode_header_1;
++
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:4; /* index into uid table */
++      unsigned int            guid:4; /* index into guid table */
++      unsigned short          rdev;
++} __attribute__ ((packed)) squashfs_dev_inode_header_1;
++      
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:4; /* index into uid table */
++      unsigned int            guid:4; /* index into guid table */
++      unsigned short          symlink_size;
++      char                    symlink[0];
++} __attribute__ ((packed)) squashfs_symlink_inode_header_1;
++
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:4; /* index into uid table */
++      unsigned int            guid:4; /* index into guid table */
++      unsigned int            mtime;
++      squashfs_block          start_block;
++      unsigned int            file_size:SQUASHFS_MAX_FILE_SIZE_LOG;
++      unsigned short          block_list[0];
++} __attribute__ ((packed)) squashfs_reg_inode_header_1;
++
++typedef struct {
++      unsigned int            inode_type:4;
++      unsigned int            mode:12; /* protection */
++      unsigned int            uid:4; /* index into uid table */
++      unsigned int            guid:4; /* index into guid table */
++      unsigned int            file_size:19;
++      unsigned int            offset:13;
++      unsigned int            mtime;
++      unsigned int            start_block:24;
++} __attribute__  ((packed)) squashfs_dir_inode_header_1;
++
++#define SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, n) {\
++      SQUASHFS_MEMSET(s, d, n);\
++      SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\
++      SQUASHFS_SWAP((s)->mode, d, 4, 12);\
++      SQUASHFS_SWAP((s)->uid, d, 16, 4);\
++      SQUASHFS_SWAP((s)->guid, d, 20, 4);\
++}
++
++#define SQUASHFS_SWAP_IPC_INODE_HEADER_1(s, d) {\
++      SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, sizeof(squashfs_ipc_inode_header_1));\
++      SQUASHFS_SWAP((s)->type, d, 24, 4);\
++      SQUASHFS_SWAP((s)->offset, d, 28, 4);\
++}
++
++#define SQUASHFS_SWAP_DEV_INODE_HEADER_1(s, d) {\
++      SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, sizeof(squashfs_dev_inode_header_1));\
++      SQUASHFS_SWAP((s)->rdev, d, 24, 16);\
++}
++
++#define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_1(s, d) {\
++      SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_symlink_inode_header_1));\
++      SQUASHFS_SWAP((s)->symlink_size, d, 24, 16);\
++}
++
++#define SQUASHFS_SWAP_REG_INODE_HEADER_1(s, d) {\
++      SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_reg_inode_header_1));\
++      SQUASHFS_SWAP((s)->mtime, d, 24, 32);\
++      SQUASHFS_SWAP((s)->start_block, d, 56, 32);\
++      SQUASHFS_SWAP((s)->file_size, d, 88, SQUASHFS_MAX_FILE_SIZE_LOG);\
++}
++
++#define SQUASHFS_SWAP_DIR_INODE_HEADER_1(s, d) {\
++      SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_dir_inode_header_1));\
++      SQUASHFS_SWAP((s)->file_size, d, 24, 19);\
++      SQUASHFS_SWAP((s)->offset, d, 43, 13);\
++      SQUASHFS_SWAP((s)->mtime, d, 56, 32);\
++      SQUASHFS_SWAP((s)->start_block, d, 88, 24);\
++}
++#endif
++
++#ifdef __KERNEL__
++/*
++ * macros used to swap each structure entry, taking into account
++ * bitfields and different bitfield placing conventions on differing architectures
++ */
++#include <asm/byteorder.h>
++#ifdef __BIG_ENDIAN
++      /* convert from little endian to big endian */
++#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, tbits, b_pos)
++#else
++      /* convert from big endian to little endian */ 
++#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, tbits, 64 - tbits - b_pos)
++#endif
++
++#define _SQUASHFS_SWAP(value, p, pos, tbits, SHIFT) {\
++      int bits;\
++      int b_pos = pos % 8;\
++      unsigned long long val = 0;\
++      unsigned char *s = (unsigned char *)p + (pos / 8);\
++      unsigned char *d = ((unsigned char *) &val) + 7;\
++      for(bits = 0; bits < (tbits + b_pos); bits += 8) \
++              *d-- = *s++;\
++      value = (val >> (SHIFT))/* & ((1 << tbits) - 1)*/;\
++}
++#define SQUASHFS_MEMSET(s, d, n)      memset(s, 0, n);
++#endif
++#endif
+diff --new-file -ur linux-2.6.7/include/linux/squashfs_fs_i.h linux-2.6.7-squashfs2.0/include/linux/squashfs_fs_i.h
+--- linux-2.6.7/include/linux/squashfs_fs_i.h  1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7-squashfs2.0/include/linux/squashfs_fs_i.h      2004-07-11 05:31:55.000000000 +0100
+@@ -0,0 +1,34 @@
++#ifndef SQUASHFS_FS_I
++#define SQUASHFS_FS_I
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2002, 2003, 2004 Phillip Lougher <plougher@users.sourceforge.net>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs_fs_i.h
++ */
++
++typedef struct squashfs_inode_info {
++      unsigned int    start_block;
++      unsigned int    block_list_start;
++      unsigned int    offset;
++      unsigned int    fragment_start_block;
++      unsigned int    fragment_size;
++      unsigned int    fragment_offset;
++      struct inode    vfs_inode;
++      } squashfs_inode_info;
++#endif
+diff --new-file -ur linux-2.6.7/include/linux/squashfs_fs_sb.h linux-2.6.7-squashfs2.0/include/linux/squashfs_fs_sb.h
+--- linux-2.6.7/include/linux/squashfs_fs_sb.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.7-squashfs2.0/include/linux/squashfs_fs_sb.h     2004-07-11 05:31:55.000000000 +0100
+@@ -0,0 +1,65 @@
++#ifndef SQUASHFS_FS_SB
++#define SQUASHFS_FS_SB
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2002, 2003, 2004 Phillip Lougher <plougher@users.sourceforge.net>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs_fs_sb.h
++ */
++
++#include <linux/squashfs_fs.h>
++
++typedef struct {
++      unsigned int    block;
++      int             length;
++      unsigned int    next_index;
++      char            *data;
++      } squashfs_cache;
++
++struct squashfs_fragment_cache {
++      unsigned int    block;
++      int             length;
++      unsigned int    locked;
++      char            *data;
++      };
++
++typedef struct squashfs_sb_info {
++      squashfs_super_block    sBlk;
++      int                     devblksize;
++      int                     devblksize_log2;
++      int                     swap;
++      squashfs_cache          *block_cache;
++      struct squashfs_fragment_cache  *fragment;
++      int                     next_cache;
++      int                     next_fragment;
++      squashfs_uid            *uid;
++      squashfs_uid            *guid;
++      squashfs_fragment_index         *fragment_index;
++      unsigned int            read_size;
++      char                    *read_data;
++      char                    *read_page;
++      struct semaphore        read_page_mutex;
++      struct semaphore        block_cache_mutex;
++      struct semaphore        fragment_mutex;
++      wait_queue_head_t       waitq;
++      wait_queue_head_t       fragment_wait_queue;
++      struct inode            *(*iget)(struct super_block *s, squashfs_inode inode);
++      unsigned int            (*read_blocklist)(struct inode *inode, int index, int readahead_blks,
++                                      char *block_list, char **block_p, unsigned int *bsize);
++      } squashfs_sb_info;
++#endif
+diff --new-file -ur linux-2.6.7/init/do_mounts_rd.c linux-2.6.7-squashfs2.0/init/do_mounts_rd.c
+--- linux-2.6.7/init/do_mounts_rd.c    2004-06-16 06:19:43.000000000 +0100
++++ linux-2.6.7-squashfs2.0/init/do_mounts_rd.c        2004-07-11 05:32:03.000000000 +0100
+@@ -5,6 +5,7 @@
+ #include <linux/ext2_fs.h>
+ #include <linux/romfs_fs.h>
+ #include <linux/cramfs_fs.h>
++#include <linux/squashfs_fs.h>
+ #include <linux/initrd.h>
+ #include <linux/string.h>
+@@ -39,6 +40,7 @@
+  * numbers could not be found.
+  *
+  * We currently check for the following magic numbers:
++ *      squashfs
+  *    minix
+  *    ext2
+  *    romfs
+@@ -53,6 +55,7 @@
+       struct ext2_super_block *ext2sb;
+       struct romfs_super_block *romfsb;
+       struct cramfs_super *cramfsb;
++      struct squashfs_super_block *squashfsb;
+       int nblocks = -1;
+       unsigned char *buf;
+@@ -64,6 +67,7 @@
+       ext2sb = (struct ext2_super_block *) buf;
+       romfsb = (struct romfs_super_block *) buf;
+       cramfsb = (struct cramfs_super *) buf;
++      squashfsb = (struct squashfs_super_block *) buf;
+       memset(buf, 0xe5, size);
+       /*
+@@ -101,6 +105,15 @@
+               goto done;
+       }
++      /* squashfs is at block zero too */
++      if (squashfsb->s_magic == SQUASHFS_MAGIC) {
++              printk(KERN_NOTICE
++                     "RAMDISK: squashfs filesystem found at block %d\n",
++                     start_block);
++              nblocks = (squashfsb->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
++              goto done;
++      }
++
+       /*
+        * Read block 1 to test for minix and ext2 superblock
+        */
This page took 2.482999 seconds and 4 git commands to generate.