summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/linux-grsec/APKBUILD22
-rw-r--r--main/linux-grsec/grsecurity-2.1.14-2.6.31.4-200910181015.patch (renamed from main/linux-grsec/grsecurity-2.1.14-2.6.30.8-200909262311.patch)16657
-rw-r--r--main/linux-grsec/kernelconfig.x864481
3 files changed, 14085 insertions, 7075 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 31eaf8923..cde46c6e2 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -2,20 +2,19 @@
_flavor=grsec
pkgname=linux-${_flavor}
-pkgver=2.6.30.8
-_kernver=2.6.30
+pkgver=2.6.31.4
+_kernver=2.6.31
pkgrel=0
pkgdesc="Linux kernel with grsecurity"
url=http://grsecurity.net
depends="mkinitfs linux-firmware"
makedepends="perl installkernel"
-_config=${config:-kernelconfig}
+_config=${config:-kernelconfig.${CARCH:-x86}}
install=
source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
- grsecurity-2.1.14-2.6.30.8-200909262311.patch
- net-next-2.6.git-5ef12d98a19254ee5dc851bd83e214b43ec1f725.patch
- $_config
+ grsecurity-2.1.14-2.6.31.4-200910181015.patch
+ kernelconfig.x86
"
subpackages="$pkgname-dev linux-firmware:firmware"
license="GPL-2"
@@ -80,7 +79,7 @@ dev() {
# first we import config, run prepare to set up for building
# external modules, and create the scripts
mkdir -p "$dir"
- cp "$srcdir"/kernelconfig "$dir"/.config
+ cp "$srcdir"/$_config "$dir"/.config
make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$CC" \
silentoldconfig prepare scripts
@@ -119,8 +118,7 @@ firmware() {
mv "$pkgdir"/lib/firmware "$subpkgdir"/lib/
}
-md5sums="7a80058a6382e5108cdb5554d1609615 linux-2.6.30.tar.bz2
-7e9b405b840bf5ecc70d208bfccee5f9 patch-2.6.30.8.bz2
-287a382cfb72043867d8092996875f5d grsecurity-2.1.14-2.6.30.8-200909262311.patch
-ca05fd252783b82e01610e775cf56498 net-next-2.6.git-5ef12d98a19254ee5dc851bd83e214b43ec1f725.patch
-9f41d910914f5a516072f0aa500fa117 kernelconfig"
+md5sums="84c077a37684e4cbfa67b18154390d8a linux-2.6.31.tar.bz2
+02078f4231baee4f0004212f2875df2b patch-2.6.31.4.bz2
+d4a3559a00702e4c6d6f3b7d64f72dcc grsecurity-2.1.14-2.6.31.4-200910181015.patch
+25d08b2d9f22a06994b1e45ab8276a7b kernelconfig.x86"
diff --git a/main/linux-grsec/grsecurity-2.1.14-2.6.30.8-200909262311.patch b/main/linux-grsec/grsecurity-2.1.14-2.6.31.4-200910181015.patch
index 42b777eb8..3c0533ca2 100644
--- a/main/linux-grsec/grsecurity-2.1.14-2.6.30.8-200909262311.patch
+++ b/main/linux-grsec/grsecurity-2.1.14-2.6.31.4-200910181015.patch
@@ -1,19 +1,53 @@
-diff -urNp linux-2.6.30.8/arch/alpha/include/asm/atomic.h linux-2.6.30.8/arch/alpha/include/asm/atomic.h
---- linux-2.6.30.8/arch/alpha/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/alpha/include/asm/atomic.h 2009-07-30 09:48:09.872868955 -0400
-@@ -246,6 +246,9 @@ static __inline__ int atomic64_add_unles
+diff -urNp linux-2.6.31.4/arch/alpha/include/asm/atomic.h linux-2.6.31.4/arch/alpha/include/asm/atomic.h
+--- linux-2.6.31.4/arch/alpha/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/alpha/include/asm/atomic.h 2009-10-11 15:29:40.123741591 -0400
+@@ -18,9 +18,11 @@
+ #define ATOMIC64_INIT(i) ( (atomic64_t) { (i) } )
+
+ #define atomic_read(v) ((v)->counter + 0)
++#define atomic_read_unchecked(v) ((v)->counter + 0)
+ #define atomic64_read(v) ((v)->counter + 0)
+
+ #define atomic_set(v,i) ((v)->counter = (i))
++#define atomic_set_unchecked(v,i) ((v)->counter = (i))
+ #define atomic64_set(v,i) ((v)->counter = (i))
+
+ /*
+@@ -44,6 +46,11 @@ static __inline__ void atomic_add(int i,
+ :"Ir" (i), "m" (v->counter));
+ }
+
++static __inline__ void atomic_add_unchecked(int i, atomic_unchecked_t * v)
++{
++ atomic_add(i, (atomic_t *)v);
++}
++
+ static __inline__ void atomic64_add(long i, atomic64_t * v)
+ {
+ unsigned long temp;
+@@ -74,6 +81,11 @@ static __inline__ void atomic_sub(int i,
+ :"Ir" (i), "m" (v->counter));
+ }
+
++static __inline__ void atomic_sub_unchecked(int i, atomic_unchecked_t * v)
++{
++ atomic_sub(i, (atomic_t *)v);
++}
++
+ static __inline__ void atomic64_sub(long i, atomic64_t * v)
+ {
+ unsigned long temp;
+@@ -246,6 +258,7 @@ static __inline__ int atomic64_add_unles
#define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0)
#define atomic_inc(v) atomic_add(1,(v))
-+#define atomic_inc_unchecked(v) atomic_inc(v)
-+#define atomic_add_unchecked(i,v) atomic_add((i),(v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i),(v))
++#define atomic_inc_unchecked(v) atomic_add_unchecked(1,(v))
#define atomic64_inc(v) atomic64_add(1,(v))
#define atomic_dec(v) atomic_sub(1,(v))
-diff -urNp linux-2.6.30.8/arch/alpha/include/asm/elf.h linux-2.6.30.8/arch/alpha/include/asm/elf.h
---- linux-2.6.30.8/arch/alpha/include/asm/elf.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/alpha/include/asm/elf.h 2009-07-30 09:48:09.873636524 -0400
+diff -urNp linux-2.6.31.4/arch/alpha/include/asm/elf.h linux-2.6.31.4/arch/alpha/include/asm/elf.h
+--- linux-2.6.31.4/arch/alpha/include/asm/elf.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/alpha/include/asm/elf.h 2009-10-11 15:29:40.124678650 -0400
@@ -91,6 +91,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)
@@ -28,22 +62,9 @@ diff -urNp linux-2.6.30.8/arch/alpha/include/asm/elf.h linux-2.6.30.8/arch/alpha
/* $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 -urNp linux-2.6.30.8/arch/alpha/include/asm/kmap_types.h linux-2.6.30.8/arch/alpha/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/alpha/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/alpha/include/asm/kmap_types.h 2009-07-30 09:48:09.873636524 -0400
-@@ -24,7 +24,8 @@ D(9) KM_IRQ0,
- D(10) KM_IRQ1,
- D(11) KM_SOFTIRQ0,
- D(12) KM_SOFTIRQ1,
--D(13) KM_TYPE_NR
-+D(13) KM_CLEARPAGE,
-+D(14) KM_TYPE_NR
- };
-
- #undef D
-diff -urNp linux-2.6.30.8/arch/alpha/include/asm/pgtable.h linux-2.6.30.8/arch/alpha/include/asm/pgtable.h
---- linux-2.6.30.8/arch/alpha/include/asm/pgtable.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/alpha/include/asm/pgtable.h 2009-07-30 09:48:09.874706218 -0400
+diff -urNp linux-2.6.31.4/arch/alpha/include/asm/pgtable.h linux-2.6.31.4/arch/alpha/include/asm/pgtable.h
+--- linux-2.6.31.4/arch/alpha/include/asm/pgtable.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/alpha/include/asm/pgtable.h 2009-10-11 15:29:40.124678650 -0400
@@ -101,6 +101,17 @@ struct vm_area_struct;
#define PAGE_SHARED __pgprot(_PAGE_VALID | __ACCESS_BITS)
#define PAGE_COPY __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
@@ -62,9 +83,9 @@ diff -urNp linux-2.6.30.8/arch/alpha/include/asm/pgtable.h linux-2.6.30.8/arch/a
#define PAGE_KERNEL __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE | _PAGE_KWE)
#define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
-diff -urNp linux-2.6.30.8/arch/alpha/kernel/module.c linux-2.6.30.8/arch/alpha/kernel/module.c
---- linux-2.6.30.8/arch/alpha/kernel/module.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/alpha/kernel/module.c 2009-07-30 09:48:09.875723461 -0400
+diff -urNp linux-2.6.31.4/arch/alpha/kernel/module.c linux-2.6.31.4/arch/alpha/kernel/module.c
+--- linux-2.6.31.4/arch/alpha/kernel/module.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/alpha/kernel/module.c 2009-10-11 15:29:40.124678650 -0400
@@ -182,7 +182,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs,
/* The small sections were sorted to the end of the segment.
@@ -74,10 +95,10 @@ diff -urNp linux-2.6.30.8/arch/alpha/kernel/module.c linux-2.6.30.8/arch/alpha/k
got = sechdrs[me->arch.gotsecindex].sh_addr;
for (i = 0; i < n; i++) {
-diff -urNp linux-2.6.30.8/arch/alpha/kernel/osf_sys.c linux-2.6.30.8/arch/alpha/kernel/osf_sys.c
---- linux-2.6.30.8/arch/alpha/kernel/osf_sys.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/alpha/kernel/osf_sys.c 2009-07-30 09:48:09.875723461 -0400
-@@ -1215,6 +1215,10 @@ arch_get_unmapped_area(struct file *filp
+diff -urNp linux-2.6.31.4/arch/alpha/kernel/osf_sys.c linux-2.6.31.4/arch/alpha/kernel/osf_sys.c
+--- linux-2.6.31.4/arch/alpha/kernel/osf_sys.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/alpha/kernel/osf_sys.c 2009-10-11 15:29:40.124678650 -0400
+@@ -1212,6 +1212,10 @@ arch_get_unmapped_area(struct file *filp
merely specific addresses, but regions of memory -- perhaps
this feature should be incorporated into all ports? */
@@ -88,7 +109,7 @@ diff -urNp linux-2.6.30.8/arch/alpha/kernel/osf_sys.c linux-2.6.30.8/arch/alpha/
if (addr) {
addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
if (addr != (unsigned long) -ENOMEM)
-@@ -1222,8 +1226,8 @@ arch_get_unmapped_area(struct file *filp
+@@ -1219,8 +1223,8 @@ arch_get_unmapped_area(struct file *filp
}
/* Next, try allocating at TASK_UNMAPPED_BASE. */
@@ -99,9 +120,9 @@ diff -urNp linux-2.6.30.8/arch/alpha/kernel/osf_sys.c linux-2.6.30.8/arch/alpha/
if (addr != (unsigned long) -ENOMEM)
return addr;
-diff -urNp linux-2.6.30.8/arch/alpha/mm/fault.c linux-2.6.30.8/arch/alpha/mm/fault.c
---- linux-2.6.30.8/arch/alpha/mm/fault.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/alpha/mm/fault.c 2009-07-30 09:48:09.876636955 -0400
+diff -urNp linux-2.6.31.4/arch/alpha/mm/fault.c linux-2.6.31.4/arch/alpha/mm/fault.c
+--- linux-2.6.31.4/arch/alpha/mm/fault.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/alpha/mm/fault.c 2009-10-11 15:29:40.124678650 -0400
@@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *
__reload_thread(pcb);
}
@@ -258,22 +279,72 @@ diff -urNp linux-2.6.30.8/arch/alpha/mm/fault.c linux-2.6.30.8/arch/alpha/mm/fau
} else if (!cause) {
/* Allow reads even for write-only mappings */
if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
-diff -urNp linux-2.6.30.8/arch/arm/include/asm/atomic.h linux-2.6.30.8/arch/arm/include/asm/atomic.h
---- linux-2.6.30.8/arch/arm/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/arm/include/asm/atomic.h 2009-07-30 09:48:09.876636955 -0400
-@@ -235,6 +235,9 @@ static inline int atomic_add_unless(atom
+diff -urNp linux-2.6.31.4/arch/arm/include/asm/atomic.h linux-2.6.31.4/arch/arm/include/asm/atomic.h
+--- linux-2.6.31.4/arch/arm/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/arm/include/asm/atomic.h 2009-10-11 15:29:40.230158580 -0400
+@@ -20,6 +20,7 @@
+ #ifdef __KERNEL__
+
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+
+ #if __LINUX_ARM_ARCH__ >= 6
+
+@@ -44,6 +45,11 @@ static inline void atomic_set(atomic_t *
+ : "cc");
+ }
+
++static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i)
++{
++ atomic_set((atomic_t *)v, i);
++}
++
+ static inline void atomic_add(int i, atomic_t *v)
+ {
+ unsigned long tmp;
+@@ -60,6 +66,11 @@ static inline void atomic_add(int i, ato
+ : "cc");
+ }
+
++static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_add(i, (atomic_t *)v);
++}
++
+ static inline int atomic_add_return(int i, atomic_t *v)
+ {
+ unsigned long tmp;
+@@ -98,6 +109,11 @@ static inline void atomic_sub(int i, ato
+ : "cc");
+ }
+
++static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_sub(i, (atomic_t *)v);
++}
++
+ static inline int atomic_sub_return(int i, atomic_t *v)
+ {
+ unsigned long tmp;
+@@ -164,6 +180,7 @@ static inline void atomic_clear_mask(uns
+ #endif
+
+ #define atomic_set(v,i) (((v)->counter) = (i))
++#define atomic_set_unchecked(v,i) (((v)->counter) = (i))
+
+ static inline int atomic_add_return(int i, atomic_t *v)
+ {
+@@ -232,6 +249,7 @@ static inline int atomic_add_unless(atom
+ #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
#define atomic_inc(v) atomic_add(1, v)
++#define atomic_inc_unchecked(v) atomic_add_unchecked(1, v)
#define atomic_dec(v) atomic_sub(1, v)
-+#define atomic_inc_unchecked(v) atomic_inc(v)
-+#define atomic_add_unchecked(i, v) atomic_add(i, v)
-+#define atomic_sub_unchecked(i, v) atomic_sub(i, v)
#define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0)
- #define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0)
-diff -urNp linux-2.6.30.8/arch/arm/include/asm/elf.h linux-2.6.30.8/arch/arm/include/asm/elf.h
---- linux-2.6.30.8/arch/arm/include/asm/elf.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/arm/include/asm/elf.h 2009-07-30 09:48:09.877630671 -0400
+diff -urNp linux-2.6.31.4/arch/arm/include/asm/elf.h linux-2.6.31.4/arch/arm/include/asm/elf.h
+--- linux-2.6.31.4/arch/arm/include/asm/elf.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/arm/include/asm/elf.h 2009-10-11 15:29:40.230158580 -0400
@@ -103,7 +103,14 @@ extern int arm_elf_read_implies_exec(con
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -290,9 +361,9 @@ diff -urNp linux-2.6.30.8/arch/arm/include/asm/elf.h linux-2.6.30.8/arch/arm/inc
/* When the program starts, a1 contains a pointer to a function to be
registered with atexit, as per the SVR4 ABI. A value of 0 means we
-diff -urNp linux-2.6.30.8/arch/arm/include/asm/kmap_types.h linux-2.6.30.8/arch/arm/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/arm/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/arm/include/asm/kmap_types.h 2009-07-30 09:48:09.878525050 -0400
+diff -urNp linux-2.6.31.4/arch/arm/include/asm/kmap_types.h linux-2.6.31.4/arch/arm/include/asm/kmap_types.h
+--- linux-2.6.31.4/arch/arm/include/asm/kmap_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/arm/include/asm/kmap_types.h 2009-10-11 15:29:40.230158580 -0400
@@ -19,6 +19,7 @@ enum km_type {
KM_SOFTIRQ0,
KM_SOFTIRQ1,
@@ -301,10 +372,10 @@ diff -urNp linux-2.6.30.8/arch/arm/include/asm/kmap_types.h linux-2.6.30.8/arch/
KM_TYPE_NR
};
-diff -urNp linux-2.6.30.8/arch/arm/include/asm/uaccess.h linux-2.6.30.8/arch/arm/include/asm/uaccess.h
---- linux-2.6.30.8/arch/arm/include/asm/uaccess.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/arm/include/asm/uaccess.h 2009-07-30 09:48:09.878525050 -0400
-@@ -398,6 +398,9 @@ extern unsigned long __must_check __strn
+diff -urNp linux-2.6.31.4/arch/arm/include/asm/uaccess.h linux-2.6.31.4/arch/arm/include/asm/uaccess.h
+--- linux-2.6.31.4/arch/arm/include/asm/uaccess.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/arm/include/asm/uaccess.h 2009-10-11 15:29:40.230158580 -0400
+@@ -400,6 +400,9 @@ extern unsigned long __must_check __strn
static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n)
{
@@ -314,7 +385,7 @@ diff -urNp linux-2.6.30.8/arch/arm/include/asm/uaccess.h linux-2.6.30.8/arch/arm
if (access_ok(VERIFY_READ, from, n))
n = __copy_from_user(to, from, n);
else /* security hole - plug it */
-@@ -407,6 +410,9 @@ static inline unsigned long __must_check
+@@ -409,6 +412,9 @@ static inline unsigned long __must_check
static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long n)
{
@@ -324,9 +395,9 @@ diff -urNp linux-2.6.30.8/arch/arm/include/asm/uaccess.h linux-2.6.30.8/arch/arm
if (access_ok(VERIFY_WRITE, to, n))
n = __copy_to_user(to, from, n);
return n;
-diff -urNp linux-2.6.30.8/arch/arm/mach-ns9xxx/clock.c linux-2.6.30.8/arch/arm/mach-ns9xxx/clock.c
---- linux-2.6.30.8/arch/arm/mach-ns9xxx/clock.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/arm/mach-ns9xxx/clock.c 2009-07-30 09:48:09.879705308 -0400
+diff -urNp linux-2.6.31.4/arch/arm/mach-ns9xxx/clock.c linux-2.6.31.4/arch/arm/mach-ns9xxx/clock.c
+--- linux-2.6.31.4/arch/arm/mach-ns9xxx/clock.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/arm/mach-ns9xxx/clock.c 2009-10-11 15:29:40.230158580 -0400
@@ -195,7 +195,7 @@ static int clk_debugfs_open(struct inode
return single_open(file, clk_debugfs_show, NULL);
}
@@ -336,9 +407,9 @@ diff -urNp linux-2.6.30.8/arch/arm/mach-ns9xxx/clock.c linux-2.6.30.8/arch/arm/m
.open = clk_debugfs_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.30.8/arch/arm/mm/mmap.c linux-2.6.30.8/arch/arm/mm/mmap.c
---- linux-2.6.30.8/arch/arm/mm/mmap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/arm/mm/mmap.c 2009-07-30 09:48:09.881684524 -0400
+diff -urNp linux-2.6.31.4/arch/arm/mm/mmap.c linux-2.6.31.4/arch/arm/mm/mmap.c
+--- linux-2.6.31.4/arch/arm/mm/mmap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/arm/mm/mmap.c 2009-10-11 15:29:40.231419184 -0400
@@ -62,6 +62,10 @@ arch_get_unmapped_area(struct file *filp
if (len > TASK_SIZE)
return -ENOMEM;
@@ -375,25 +446,73 @@ diff -urNp linux-2.6.30.8/arch/arm/mm/mmap.c linux-2.6.30.8/arch/arm/mm/mmap.c
mm->cached_hole_size = 0;
goto full_search;
}
-diff -urNp linux-2.6.30.8/arch/avr32/include/asm/atomic.h linux-2.6.30.8/arch/avr32/include/asm/atomic.h
---- linux-2.6.30.8/arch/avr32/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/avr32/include/asm/atomic.h 2009-07-30 09:48:09.881684524 -0400
-@@ -176,9 +176,12 @@ static inline int atomic_sub_if_positive
+diff -urNp linux-2.6.31.4/arch/avr32/include/asm/atomic.h linux-2.6.31.4/arch/avr32/include/asm/atomic.h
+--- linux-2.6.31.4/arch/avr32/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/avr32/include/asm/atomic.h 2009-10-11 15:29:40.239493712 -0400
+@@ -20,7 +20,9 @@
+ #define ATOMIC_INIT(i) { (i) }
+
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+ #define atomic_set(v, i) (((v)->counter) = i)
++#define atomic_set_unchecked(v, i) (((v)->counter) = i)
+
+ /*
+ * atomic_sub_return - subtract the atomic variable
+@@ -48,6 +50,18 @@ static inline int atomic_sub_return(int
+ }
+
+ /*
++ * atomic_sub_return_unchecked - subtract the atomic variable
++ * @i: integer value to subtract
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically subtracts @i from @v. Returns the resulting value.
++ */
++static inline int atomic_sub_return_unchecked(int i, atomic_unchecked_t *v)
++{
++ return atomic_sub_return(i, (atomic_t *)v);
++}
++
++/*
+ * atomic_add_return - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+@@ -76,6 +90,18 @@ static inline int atomic_add_return(int
+ }
+
+ /*
++ * atomic_add_return_unchecked - add integer to atomic variable
++ * @i: integer value to add
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically adds @i to @v. Returns the resulting value.
++ */
++static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
++{
++ return atomic_add_return(i, (atomic_t *)v);
++}
++
++/*
+ * atomic_sub_unless - sub unless the number is a given value
+ * @v: pointer of type atomic_t
+ * @a: the amount to add to v...
+@@ -176,9 +202,12 @@ static inline int atomic_sub_if_positive
#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
#define atomic_sub(i, v) (void)atomic_sub_return(i, v)
-+#define atomic_sub_unchecked(i, v) atomic_sub((i), (v))
++#define atomic_sub_unchecked(i, v) (void)atomic_sub_return_unchecked(i, v)
#define atomic_add(i, v) (void)atomic_add_return(i, v)
-+#define atomic_add_unchecked(i, v) atomic_add((i), (v))
++#define atomic_add_unchecked(i, v) (void)atomic_add_return_unchecked(i, v)
#define atomic_dec(v) atomic_sub(1, (v))
#define atomic_inc(v) atomic_add(1, (v))
-+#define atomic_inc_unchecked(v) atomic_inc(v)
++#define atomic_inc_unchecked(v) (void)atomic_add_return_unchecked(1, (v))
#define atomic_dec_return(v) atomic_sub_return(1, v)
#define atomic_inc_return(v) atomic_add_return(1, v)
-diff -urNp linux-2.6.30.8/arch/avr32/include/asm/elf.h linux-2.6.30.8/arch/avr32/include/asm/elf.h
---- linux-2.6.30.8/arch/avr32/include/asm/elf.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/avr32/include/asm/elf.h 2009-07-30 09:48:09.881684524 -0400
+diff -urNp linux-2.6.31.4/arch/avr32/include/asm/elf.h linux-2.6.31.4/arch/avr32/include/asm/elf.h
+--- linux-2.6.31.4/arch/avr32/include/asm/elf.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/avr32/include/asm/elf.h 2009-10-11 15:29:40.239493712 -0400
@@ -85,8 +85,14 @@ typedef struct user_fpu_struct elf_fpreg
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -410,9 +529,9 @@ diff -urNp linux-2.6.30.8/arch/avr32/include/asm/elf.h linux-2.6.30.8/arch/avr32
/* 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,
-diff -urNp linux-2.6.30.8/arch/avr32/include/asm/kmap_types.h linux-2.6.30.8/arch/avr32/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/avr32/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/avr32/include/asm/kmap_types.h 2009-07-30 09:48:09.882650296 -0400
+diff -urNp linux-2.6.31.4/arch/avr32/include/asm/kmap_types.h linux-2.6.31.4/arch/avr32/include/asm/kmap_types.h
+--- linux-2.6.31.4/arch/avr32/include/asm/kmap_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/avr32/include/asm/kmap_types.h 2009-10-11 15:29:40.240390629 -0400
@@ -22,7 +22,8 @@ D(10) KM_IRQ0,
D(11) KM_IRQ1,
D(12) KM_SOFTIRQ0,
@@ -423,9 +542,9 @@ diff -urNp linux-2.6.30.8/arch/avr32/include/asm/kmap_types.h linux-2.6.30.8/arc
};
#undef D
-diff -urNp linux-2.6.30.8/arch/avr32/mm/fault.c linux-2.6.30.8/arch/avr32/mm/fault.c
---- linux-2.6.30.8/arch/avr32/mm/fault.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/avr32/mm/fault.c 2009-07-30 09:48:09.882650296 -0400
+diff -urNp linux-2.6.31.4/arch/avr32/mm/fault.c linux-2.6.31.4/arch/avr32/mm/fault.c
+--- linux-2.6.31.4/arch/avr32/mm/fault.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/avr32/mm/fault.c 2009-10-11 15:29:40.240390629 -0400
@@ -41,6 +41,23 @@ static inline int notify_page_fault(stru
int exception_trace = 1;
@@ -467,45 +586,69 @@ diff -urNp linux-2.6.30.8/arch/avr32/mm/fault.c linux-2.6.30.8/arch/avr32/mm/fau
if (exception_trace && printk_ratelimit())
printk("%s%s[%d]: segfault at %08lx pc %08lx "
"sp %08lx ecr %lu\n",
-diff -urNp linux-2.6.30.8/arch/blackfin/include/asm/atomic.h linux-2.6.30.8/arch/blackfin/include/asm/atomic.h
---- linux-2.6.30.8/arch/blackfin/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/blackfin/include/asm/atomic.h 2009-07-30 09:48:09.882650296 -0400
-@@ -178,6 +178,9 @@ static inline void atomic_set_mask(unsig
+diff -urNp linux-2.6.31.4/arch/blackfin/include/asm/atomic.h linux-2.6.31.4/arch/blackfin/include/asm/atomic.h
+--- linux-2.6.31.4/arch/blackfin/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/blackfin/include/asm/atomic.h 2009-10-11 15:29:40.241333193 -0400
+@@ -15,8 +15,10 @@
- #endif /* !CONFIG_SMP */
+ #define ATOMIC_INIT(i) { (i) }
+ #define atomic_set(v, i) (((v)->counter) = i)
++#define atomic_set_unchecked(v, i) (((v)->counter) = i)
-+#define atomic_add_unchecked(i, v) atomic_add((i), (v))
-+#define atomic_sub_unchecked(i, v) atomic_sub((i), (v))
-+#define atomic_inc_unchecked(v) atomic_inc((v))
- #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
- #define atomic_dec_return(v) atomic_sub_return(1,(v))
- #define atomic_inc_return(v) atomic_add_return(1,(v))
-diff -urNp linux-2.6.30.8/arch/blackfin/include/asm/kmap_types.h linux-2.6.30.8/arch/blackfin/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/blackfin/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/blackfin/include/asm/kmap_types.h 2009-07-30 09:48:09.883618875 -0400
-@@ -15,6 +15,7 @@ enum km_type {
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
-+ KM_CLEARPAGE,
- KM_TYPE_NR
- };
+ #define atomic_read(v) __raw_uncached_fetch_asm(&(v)->counter)
++#define atomic_read_unchecked(v) __raw_uncached_fetch_asm(&(v)->counter)
-diff -urNp linux-2.6.30.8/arch/blackfin/mach-bf561/coreb.c linux-2.6.30.8/arch/blackfin/mach-bf561/coreb.c
---- linux-2.6.30.8/arch/blackfin/mach-bf561/coreb.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/blackfin/mach-bf561/coreb.c 2009-07-30 09:48:09.883618875 -0400
-@@ -292,7 +292,7 @@ static int coreb_ioctl(struct inode *ino
- return retval;
+ asmlinkage int __raw_uncached_fetch_asm(const volatile int *ptr);
+
+@@ -35,11 +37,21 @@ static inline void atomic_add(int i, ato
+ __raw_atomic_update_asm(&v->counter, i);
+ }
+
++static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_add(i, (atomic_t *)v);
++}
++
+ static inline void atomic_sub(int i, atomic_t *v)
+ {
+ __raw_atomic_update_asm(&v->counter, -i);
+ }
+
++static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_sub(i, (atomic_t *)v);
++}
++
+ static inline int atomic_add_return(int i, atomic_t *v)
+ {
+ return __raw_atomic_update_asm(&v->counter, i);
+@@ -55,6 +67,11 @@ static inline void atomic_inc(volatile a
+ __raw_atomic_update_asm(&v->counter, 1);
+ }
+
++static inline void atomic_inc_unchecked(volatile atomic_unchecked_t *v)
++{
++ atomic_inc((atomic_t *)v);
++}
++
+ static inline void atomic_dec(volatile atomic_t *v)
+ {
+ __raw_atomic_update_asm(&v->counter, -1);
+diff -urNp linux-2.6.31.4/arch/blackfin/mach-bf561/coreb.c linux-2.6.31.4/arch/blackfin/mach-bf561/coreb.c
+--- linux-2.6.31.4/arch/blackfin/mach-bf561/coreb.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/blackfin/mach-bf561/coreb.c 2009-10-11 15:29:40.241333193 -0400
+@@ -48,7 +48,7 @@ coreb_ioctl(struct inode *inode, struct
+ return ret;
}
-static struct file_operations coreb_fops = {
+static const struct file_operations coreb_fops = {
- .owner = THIS_MODULE,
- .llseek = coreb_lseek,
- .read = coreb_read,
-diff -urNp linux-2.6.30.8/arch/cris/arch-v10/drivers/sync_serial.c linux-2.6.30.8/arch/cris/arch-v10/drivers/sync_serial.c
---- linux-2.6.30.8/arch/cris/arch-v10/drivers/sync_serial.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/cris/arch-v10/drivers/sync_serial.c 2009-07-30 09:48:09.883618875 -0400
+ .owner = THIS_MODULE,
+ .ioctl = coreb_ioctl,
+ };
+diff -urNp linux-2.6.31.4/arch/cris/arch-v10/drivers/sync_serial.c linux-2.6.31.4/arch/cris/arch-v10/drivers/sync_serial.c
+--- linux-2.6.31.4/arch/cris/arch-v10/drivers/sync_serial.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/cris/arch-v10/drivers/sync_serial.c 2009-10-11 15:29:40.241333193 -0400
@@ -244,7 +244,7 @@ static unsigned sync_serial_prescale_sha
#define NUMBER_OF_PORTS 2
@@ -515,9 +658,9 @@ diff -urNp linux-2.6.30.8/arch/cris/arch-v10/drivers/sync_serial.c linux-2.6.30.
.owner = THIS_MODULE,
.write = sync_serial_write,
.read = sync_serial_read,
-diff -urNp linux-2.6.30.8/arch/cris/arch-v32/drivers/mach-fs/gpio.c linux-2.6.30.8/arch/cris/arch-v32/drivers/mach-fs/gpio.c
---- linux-2.6.30.8/arch/cris/arch-v32/drivers/mach-fs/gpio.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/cris/arch-v32/drivers/mach-fs/gpio.c 2009-07-30 12:06:52.081911892 -0400
+diff -urNp linux-2.6.31.4/arch/cris/arch-v32/drivers/mach-fs/gpio.c linux-2.6.31.4/arch/cris/arch-v32/drivers/mach-fs/gpio.c
+--- linux-2.6.31.4/arch/cris/arch-v32/drivers/mach-fs/gpio.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/cris/arch-v32/drivers/mach-fs/gpio.c 2009-10-11 15:29:40.267744989 -0400
@@ -855,7 +855,7 @@ gpio_leds_ioctl(unsigned int cmd, unsign
return 0;
}
@@ -527,48 +670,103 @@ diff -urNp linux-2.6.30.8/arch/cris/arch-v32/drivers/mach-fs/gpio.c linux-2.6.30
.owner = THIS_MODULE,
.poll = gpio_poll,
.ioctl = gpio_ioctl,
-diff -urNp linux-2.6.30.8/arch/cris/include/asm/atomic.h linux-2.6.30.8/arch/cris/include/asm/atomic.h
---- linux-2.6.30.8/arch/cris/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/cris/include/asm/atomic.h 2009-07-30 09:48:09.884412595 -0400
-@@ -152,6 +152,10 @@ static inline int atomic_add_unless(atom
+diff -urNp linux-2.6.31.4/arch/cris/include/asm/atomic.h linux-2.6.31.4/arch/cris/include/asm/atomic.h
+--- linux-2.6.31.4/arch/cris/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/cris/include/asm/atomic.h 2009-10-11 15:29:40.268620061 -0400
+@@ -16,7 +16,9 @@
+ #define ATOMIC_INIT(i) { (i) }
+
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+ #define atomic_set(v,i) (((v)->counter) = (i))
++#define atomic_set_unchecked(v,i) (((v)->counter) = (i))
+
+ /* These should be written in asm but we do it in C for now. */
+
+@@ -28,6 +30,11 @@ static inline void atomic_add(int i, vol
+ cris_atomic_restore(v, flags);
}
- #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-+#define atomic_inc_unchecked(v) atomic_inc((v))
-+#define atomic_add_unchecked(i,v) atomic_add((i),(v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i),(v))
++static inline void atomic_add_unchecked(int i, volatile atomic_unchecked_t *v)
++{
++ atomic_add(i, (volatile atomic_t *)v);
++}
+
- /* Atomic operations are already serializing */
- #define smp_mb__before_atomic_dec() barrier()
- #define smp_mb__after_atomic_dec() barrier()
-diff -urNp linux-2.6.30.8/arch/cris/include/asm/kmap_types.h linux-2.6.30.8/arch/cris/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/cris/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/cris/include/asm/kmap_types.h 2009-07-30 09:48:09.884412595 -0400
-@@ -19,6 +19,7 @@ enum km_type {
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
-+ KM_CLEARPAGE,
- KM_TYPE_NR
- };
+ static inline void atomic_sub(int i, volatile atomic_t *v)
+ {
+ unsigned long flags;
+@@ -36,6 +43,11 @@ static inline void atomic_sub(int i, vol
+ cris_atomic_restore(v, flags);
+ }
-diff -urNp linux-2.6.30.8/arch/frv/include/asm/atomic.h linux-2.6.30.8/arch/frv/include/asm/atomic.h
---- linux-2.6.30.8/arch/frv/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/frv/include/asm/atomic.h 2009-07-30 09:48:09.885412202 -0400
-@@ -114,6 +114,10 @@ static inline void atomic_dec(atomic_t *
- atomic_sub_return(1, v);
++static inline void atomic_sub_unchecked(int i, volatile atomic_unchecked_t *v)
++{
++ atomic_sub(i, (volatile atomic_t *)v);
++}
++
+ static inline int atomic_add_return(int i, volatile atomic_t *v)
+ {
+ unsigned long flags;
+@@ -76,6 +88,11 @@ static inline void atomic_inc(volatile a
+ cris_atomic_restore(v, flags);
}
-+#define atomic_inc_unchecked(v) atomic_inc(v)
-+#define atomic_add_unchecked(i,v) atomic_add((i),(v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i),(v))
++static inline void atomic_inc_unchecked(volatile atomic_unchecked_t *v)
++{
++ atomic_inc((volatile atomic_t *)v);
++}
+
- #define atomic_dec_return(v) atomic_sub_return(1, (v))
- #define atomic_inc_return(v) atomic_add_return(1, (v))
+ static inline void atomic_dec(volatile atomic_t *v)
+ {
+ unsigned long flags;
+diff -urNp linux-2.6.31.4/arch/frv/include/asm/atomic.h linux-2.6.31.4/arch/frv/include/asm/atomic.h
+--- linux-2.6.31.4/arch/frv/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/frv/include/asm/atomic.h 2009-10-11 15:29:40.268620061 -0400
+@@ -37,7 +37,9 @@
+
+ #define ATOMIC_INIT(i) { (i) }
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+ #define atomic_set(v, i) (((v)->counter) = (i))
++#define atomic_set_unchecked(v, i) (((v)->counter) = (i))
+
+ #ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+ static inline int atomic_add_return(int i, atomic_t *v)
+@@ -99,16 +101,31 @@ static inline void atomic_add(int i, ato
+ atomic_add_return(i, v);
+ }
+
++static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_add_return(i, (atomic_t *)v);
++}
++
+ static inline void atomic_sub(int i, atomic_t *v)
+ {
+ atomic_sub_return(i, v);
+ }
-diff -urNp linux-2.6.30.8/arch/frv/include/asm/kmap_types.h linux-2.6.30.8/arch/frv/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/frv/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/frv/include/asm/kmap_types.h 2009-07-30 09:48:09.885412202 -0400
++static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_sub_return(i, (atomic_t *)v);
++}
++
+ static inline void atomic_inc(atomic_t *v)
+ {
+ atomic_add_return(1, v);
+ }
+
++static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
++{
++ atomic_add_return(1, (atomic_t *)v);
++}
++
+ static inline void atomic_dec(atomic_t *v)
+ {
+ atomic_sub_return(1, v);
+diff -urNp linux-2.6.31.4/arch/frv/include/asm/kmap_types.h linux-2.6.31.4/arch/frv/include/asm/kmap_types.h
+--- linux-2.6.31.4/arch/frv/include/asm/kmap_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/frv/include/asm/kmap_types.h 2009-10-11 15:29:40.268620061 -0400
@@ -23,6 +23,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
@@ -577,47 +775,64 @@ diff -urNp linux-2.6.30.8/arch/frv/include/asm/kmap_types.h linux-2.6.30.8/arch/
KM_TYPE_NR
};
-diff -urNp linux-2.6.30.8/arch/h8300/include/asm/atomic.h linux-2.6.30.8/arch/h8300/include/asm/atomic.h
---- linux-2.6.30.8/arch/h8300/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/h8300/include/asm/atomic.h 2009-07-30 09:48:09.885412202 -0400
-@@ -26,6 +26,7 @@ static __inline__ int atomic_add_return(
+diff -urNp linux-2.6.31.4/arch/h8300/include/asm/atomic.h linux-2.6.31.4/arch/h8300/include/asm/atomic.h
+--- linux-2.6.31.4/arch/h8300/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/h8300/include/asm/atomic.h 2009-10-11 15:29:40.269365271 -0400
+@@ -11,7 +11,9 @@
+ #define ATOMIC_INIT(i) { (i) }
+
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+ #define atomic_set(v, i) (((v)->counter) = i)
++#define atomic_set_unchecked(v, i) (((v)->counter) = i)
+
+ #include <asm/system.h>
+ #include <linux/kernel.h>
+@@ -25,7 +27,13 @@ static __inline__ int atomic_add_return(
+ return ret;
}
++static __inline__ int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
++{
++ return atomic_add_return(i, (atomic_t *)v);
++}
++
#define atomic_add(i, v) atomic_add_return(i, v)
-+#define atomic_add_unchecked(i, v) atomic_add((i), (v))
++#define atomic_add_unchecked(i, v) atomic_add_return_unchecked(i, v)
#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
static __inline__ int atomic_sub_return(int i, atomic_t *v)
-@@ -38,6 +39,7 @@ static __inline__ int atomic_sub_return(
+@@ -37,7 +45,13 @@ static __inline__ int atomic_sub_return(
+ return ret;
}
++static __inline__ int atomic_sub_return_unchecked(int i, atomic_unchecked_t *v)
++{
++ return atomic_sub_return(i, (atomic_t *)v);
++}
++
#define atomic_sub(i, v) atomic_sub_return(i, v)
-+#define atomic_subUnchecked(i, v) atomic_sub(i, v)
++#define atomic_sub_unchecked(i, v) atomic_sub_return_unchecked(i, v)
#define atomic_sub_and_test(i,v) (atomic_sub_return(i, v) == 0)
static __inline__ int atomic_inc_return(atomic_t *v)
-@@ -51,6 +53,7 @@ static __inline__ int atomic_inc_return(
+@@ -50,7 +64,13 @@ static __inline__ int atomic_inc_return(
+ return ret;
}
++static __inline__ int atomic_inc_return_unchecked(atomic_unchecked_t *v)
++{
++ return atomic_inc_return((atomic_t *)v);
++}
++
#define atomic_inc(v) atomic_inc_return(v)
-+#define atomic_inc_unchecked(v) atomic_inc(v)
++#define atomic_inc_unchecked(v) atomic_inc_return_unchecked(v)
/*
* atomic_inc_and_test - increment and test
-diff -urNp linux-2.6.30.8/arch/h8300/include/asm/kmap_types.h linux-2.6.30.8/arch/h8300/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/h8300/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/h8300/include/asm/kmap_types.h 2009-07-30 09:48:09.885412202 -0400
-@@ -15,6 +15,7 @@ enum km_type {
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
-+ KM_CLEARPAGE,
- KM_TYPE_NR
- };
-
-diff -urNp linux-2.6.30.8/arch/ia64/ia32/binfmt_elf32.c linux-2.6.30.8/arch/ia64/ia32/binfmt_elf32.c
---- linux-2.6.30.8/arch/ia64/ia32/binfmt_elf32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/ia32/binfmt_elf32.c 2009-07-30 09:48:09.886522893 -0400
+diff -urNp linux-2.6.31.4/arch/ia64/ia32/binfmt_elf32.c linux-2.6.31.4/arch/ia64/ia32/binfmt_elf32.c
+--- linux-2.6.31.4/arch/ia64/ia32/binfmt_elf32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/ia32/binfmt_elf32.c 2009-10-11 15:29:40.299486229 -0400
@@ -45,6 +45,13 @@ randomize_stack_top(unsigned long stack_
#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack))
@@ -646,9 +861,9 @@ diff -urNp linux-2.6.30.8/arch/ia64/ia32/binfmt_elf32.c linux-2.6.30.8/arch/ia64
.fault = ia32_install_gate_page
};
-diff -urNp linux-2.6.30.8/arch/ia64/ia32/ia32priv.h linux-2.6.30.8/arch/ia64/ia32/ia32priv.h
---- linux-2.6.30.8/arch/ia64/ia32/ia32priv.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/ia32/ia32priv.h 2009-07-30 09:48:09.886522893 -0400
+diff -urNp linux-2.6.31.4/arch/ia64/ia32/ia32priv.h linux-2.6.31.4/arch/ia64/ia32/ia32priv.h
+--- linux-2.6.31.4/arch/ia64/ia32/ia32priv.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/ia32/ia32priv.h 2009-10-11 15:29:40.300380760 -0400
@@ -296,7 +296,14 @@ typedef struct compat_siginfo {
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_386
@@ -665,24 +880,36 @@ diff -urNp linux-2.6.30.8/arch/ia64/ia32/ia32priv.h linux-2.6.30.8/arch/ia64/ia3
#define IA32_GATE_OFFSET IA32_PAGE_OFFSET
#define IA32_GATE_END IA32_PAGE_OFFSET + PAGE_SIZE
-diff -urNp linux-2.6.30.8/arch/ia64/include/asm/atomic.h linux-2.6.30.8/arch/ia64/include/asm/atomic.h
---- linux-2.6.30.8/arch/ia64/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/include/asm/atomic.h 2009-07-30 09:48:09.886522893 -0400
-@@ -201,8 +201,11 @@ atomic64_add_negative (__s64 i, atomic64
+diff -urNp linux-2.6.31.4/arch/ia64/include/asm/atomic.h linux-2.6.31.4/arch/ia64/include/asm/atomic.h
+--- linux-2.6.31.4/arch/ia64/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/include/asm/atomic.h 2009-10-11 15:29:40.300380760 -0400
+@@ -22,9 +22,11 @@
+ #define ATOMIC64_INIT(i) ((atomic64_t) { (i) })
+
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+ #define atomic64_read(v) ((v)->counter)
+
+ #define atomic_set(v,i) (((v)->counter) = (i))
++#define atomic_set_unchecked(v,i) (((v)->counter) = (i))
+ #define atomic64_set(v,i) (((v)->counter) = (i))
+
+ static __inline__ int
+@@ -201,8 +203,11 @@ atomic64_add_negative (__s64 i, atomic64
#define atomic64_inc_and_test(v) (atomic64_add_return(1, (v)) == 0)
#define atomic_add(i,v) atomic_add_return((i), (v))
-+#define atomic_add_unchecked(i,v) atomic_add((i), (v))
++#define atomic_add_unchecked(i,v) atomic_add((i), (atomic_t *)(v))
#define atomic_sub(i,v) atomic_sub_return((i), (v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i), (v))
++#define atomic_sub_unchecked(i,v) atomic_sub((i), (atomic_t *)(v))
#define atomic_inc(v) atomic_add(1, (v))
-+#define atomic_inc_unchecked(v) atomic_inc(v)
++#define atomic_inc_unchecked(v) atomic_inc((atomic_t *)(v))
#define atomic_dec(v) atomic_sub(1, (v))
#define atomic64_add(i,v) atomic64_add_return((i), (v))
-diff -urNp linux-2.6.30.8/arch/ia64/include/asm/elf.h linux-2.6.30.8/arch/ia64/include/asm/elf.h
---- linux-2.6.30.8/arch/ia64/include/asm/elf.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/include/asm/elf.h 2009-07-30 09:48:09.887468908 -0400
+diff -urNp linux-2.6.31.4/arch/ia64/include/asm/elf.h linux-2.6.31.4/arch/ia64/include/asm/elf.h
+--- linux-2.6.31.4/arch/ia64/include/asm/elf.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/include/asm/elf.h 2009-10-11 15:29:40.300380760 -0400
@@ -43,6 +43,13 @@
*/
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x800000000UL)
@@ -697,22 +924,9 @@ diff -urNp linux-2.6.30.8/arch/ia64/include/asm/elf.h linux-2.6.30.8/arch/ia64/i
#define PT_IA_64_UNWIND 0x70000001
/* IA-64 relocations: */
-diff -urNp linux-2.6.30.8/arch/ia64/include/asm/kmap_types.h linux-2.6.30.8/arch/ia64/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/ia64/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/include/asm/kmap_types.h 2009-07-30 09:48:09.887468908 -0400
-@@ -22,7 +22,8 @@ D(9) KM_IRQ0,
- D(10) KM_IRQ1,
- D(11) KM_SOFTIRQ0,
- D(12) KM_SOFTIRQ1,
--D(13) KM_TYPE_NR
-+D(13) KM_CLEARPAGE,
-+D(14) KM_TYPE_NR
- };
-
- #undef D
-diff -urNp linux-2.6.30.8/arch/ia64/include/asm/pgtable.h linux-2.6.30.8/arch/ia64/include/asm/pgtable.h
---- linux-2.6.30.8/arch/ia64/include/asm/pgtable.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/include/asm/pgtable.h 2009-07-30 09:48:09.887468908 -0400
+diff -urNp linux-2.6.31.4/arch/ia64/include/asm/pgtable.h linux-2.6.31.4/arch/ia64/include/asm/pgtable.h
+--- linux-2.6.31.4/arch/ia64/include/asm/pgtable.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/include/asm/pgtable.h 2009-10-11 15:29:40.300380760 -0400
@@ -143,6 +143,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)
@@ -731,9 +945,9 @@ diff -urNp linux-2.6.30.8/arch/ia64/include/asm/pgtable.h linux-2.6.30.8/arch/ia
#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 -urNp linux-2.6.30.8/arch/ia64/include/asm/uaccess.h linux-2.6.30.8/arch/ia64/include/asm/uaccess.h
---- linux-2.6.30.8/arch/ia64/include/asm/uaccess.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/include/asm/uaccess.h 2009-07-30 11:10:48.660249525 -0400
+diff -urNp linux-2.6.31.4/arch/ia64/include/asm/uaccess.h linux-2.6.31.4/arch/ia64/include/asm/uaccess.h
+--- linux-2.6.31.4/arch/ia64/include/asm/uaccess.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/include/asm/uaccess.h 2009-10-11 15:29:40.301438897 -0400
@@ -257,7 +257,7 @@ __copy_from_user (void *to, const void _
const void *__cu_from = (from); \
long __cu_len = (n); \
@@ -752,10 +966,10 @@ diff -urNp linux-2.6.30.8/arch/ia64/include/asm/uaccess.h linux-2.6.30.8/arch/ia
__cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \
__cu_len; \
})
-diff -urNp linux-2.6.30.8/arch/ia64/kernel/module.c linux-2.6.30.8/arch/ia64/kernel/module.c
---- linux-2.6.30.8/arch/ia64/kernel/module.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/kernel/module.c 2009-07-30 09:48:09.888412729 -0400
-@@ -312,8 +312,7 @@ module_alloc (unsigned long size)
+diff -urNp linux-2.6.31.4/arch/ia64/kernel/module.c linux-2.6.31.4/arch/ia64/kernel/module.c
+--- linux-2.6.31.4/arch/ia64/kernel/module.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/kernel/module.c 2009-10-11 15:29:40.433757387 -0400
+@@ -315,8 +315,7 @@ module_alloc (unsigned long size)
void
module_free (struct module *mod, void *module_region)
{
@@ -765,7 +979,7 @@ diff -urNp linux-2.6.30.8/arch/ia64/kernel/module.c linux-2.6.30.8/arch/ia64/ker
unw_remove_unwind_table(mod->arch.init_unw_table);
mod->arch.init_unw_table = NULL;
}
-@@ -499,15 +498,39 @@ module_frob_arch_sections (Elf_Ehdr *ehd
+@@ -502,15 +501,39 @@ module_frob_arch_sections (Elf_Ehdr *ehd
}
static inline int
@@ -807,7 +1021,7 @@ diff -urNp linux-2.6.30.8/arch/ia64/kernel/module.c linux-2.6.30.8/arch/ia64/ker
}
static inline int
-@@ -690,7 +713,14 @@ do_reloc (struct module *mod, uint8_t r_
+@@ -693,7 +716,14 @@ do_reloc (struct module *mod, uint8_t r_
break;
case RV_BDREL:
@@ -823,7 +1037,7 @@ diff -urNp linux-2.6.30.8/arch/ia64/kernel/module.c linux-2.6.30.8/arch/ia64/ker
break;
case RV_LTV:
-@@ -824,15 +854,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs,
+@@ -828,15 +858,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs,
* addresses have been selected...
*/
uint64_t gp;
@@ -843,9 +1057,9 @@ diff -urNp linux-2.6.30.8/arch/ia64/kernel/module.c linux-2.6.30.8/arch/ia64/ker
mod->arch.gp = gp;
DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
}
-diff -urNp linux-2.6.30.8/arch/ia64/kernel/sys_ia64.c linux-2.6.30.8/arch/ia64/kernel/sys_ia64.c
---- linux-2.6.30.8/arch/ia64/kernel/sys_ia64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/kernel/sys_ia64.c 2009-07-30 09:48:09.888412729 -0400
+diff -urNp linux-2.6.31.4/arch/ia64/kernel/sys_ia64.c linux-2.6.31.4/arch/ia64/kernel/sys_ia64.c
+--- linux-2.6.31.4/arch/ia64/kernel/sys_ia64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/kernel/sys_ia64.c 2009-10-11 15:29:40.435419266 -0400
@@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *fil
if (REGION_NUMBER(addr) == RGN_HPAGE)
addr = 0;
@@ -872,9 +1086,21 @@ diff -urNp linux-2.6.30.8/arch/ia64/kernel/sys_ia64.c linux-2.6.30.8/arch/ia64/k
goto full_search;
}
return -ENOMEM;
-diff -urNp linux-2.6.30.8/arch/ia64/mm/fault.c linux-2.6.30.8/arch/ia64/mm/fault.c
---- linux-2.6.30.8/arch/ia64/mm/fault.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/mm/fault.c 2009-07-30 09:48:09.889484146 -0400
+diff -urNp linux-2.6.31.4/arch/ia64/kernel/vmlinux.lds.S linux-2.6.31.4/arch/ia64/kernel/vmlinux.lds.S
+--- linux-2.6.31.4/arch/ia64/kernel/vmlinux.lds.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/kernel/vmlinux.lds.S 2009-10-11 15:29:56.562357747 -0400
+@@ -245,7 +245,7 @@ SECTIONS
+ /* Per-cpu data: */
+ . = ALIGN(PERCPU_PAGE_SIZE);
+ PERCPU_VADDR(PERCPU_ADDR, :percpu)
+- __phys_per_cpu_start = __per_cpu_load;
++ __phys_per_cpu_start = per_cpu_load;
+ . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
+ * into percpu page size
+ */
+diff -urNp linux-2.6.31.4/arch/ia64/mm/fault.c linux-2.6.31.4/arch/ia64/mm/fault.c
+--- linux-2.6.31.4/arch/ia64/mm/fault.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/mm/fault.c 2009-10-11 15:29:40.435419266 -0400
@@ -72,6 +72,23 @@ mapped_kernel_page_is_present (unsigned
return pte_present(pte);
}
@@ -924,9 +1150,9 @@ diff -urNp linux-2.6.30.8/arch/ia64/mm/fault.c linux-2.6.30.8/arch/ia64/mm/fault
survive:
/*
* If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-2.6.30.8/arch/ia64/mm/init.c linux-2.6.30.8/arch/ia64/mm/init.c
---- linux-2.6.30.8/arch/ia64/mm/init.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/ia64/mm/init.c 2009-07-30 09:48:09.889484146 -0400
+diff -urNp linux-2.6.31.4/arch/ia64/mm/init.c linux-2.6.31.4/arch/ia64/mm/init.c
+--- linux-2.6.31.4/arch/ia64/mm/init.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/mm/init.c 2009-10-11 15:29:40.465501498 -0400
@@ -122,6 +122,19 @@ ia64_init_addr_space (void)
vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -947,36 +1173,87 @@ diff -urNp linux-2.6.30.8/arch/ia64/mm/init.c linux-2.6.30.8/arch/ia64/mm/init.c
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
down_write(&current->mm->mmap_sem);
if (insert_vm_struct(current->mm, vma)) {
-diff -urNp linux-2.6.30.8/arch/m32r/include/asm/atomic.h linux-2.6.30.8/arch/m32r/include/asm/atomic.h
---- linux-2.6.30.8/arch/m32r/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/m32r/include/asm/atomic.h 2009-07-30 09:48:09.889484146 -0400
-@@ -308,6 +308,10 @@ static __inline__ void atomic_set_mask(u
+diff -urNp linux-2.6.31.4/arch/ia64/pci/pci.c linux-2.6.31.4/arch/ia64/pci/pci.c
+--- linux-2.6.31.4/arch/ia64/pci/pci.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/ia64/pci/pci.c 2009-10-12 23:35:28.183270176 -0400
+@@ -56,10 +56,13 @@ int raw_pci_read(unsigned int seg, unsig
+ if ((seg | reg) <= 255) {
+ addr = PCI_SAL_ADDRESS(seg, bus, devfn, reg);
+ mode = 0;
+- } else {
++ } else if (sal_revision >= SAL_VERSION_CODE(3,2)) {
+ addr = PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg);
+ mode = 1;
++ } else {
++ return -EINVAL;
+ }
++
+ result = ia64_sal_pci_config_read(addr, mode, len, &data);
+ if (result != 0)
+ return -EINVAL;
+@@ -80,10 +83,13 @@ int raw_pci_write(unsigned int seg, unsi
+ if ((seg | reg) <= 255) {
+ addr = PCI_SAL_ADDRESS(seg, bus, devfn, reg);
+ mode = 0;
+- } else {
++ } else if (sal_revision >= SAL_VERSION_CODE(3,2)) {
+ addr = PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg);
+ mode = 1;
++ } else {
++ return -EINVAL;
+ }
++
+ result = ia64_sal_pci_config_write(addr, mode, len, value);
+ if (result != 0)
+ return -EINVAL;
+diff -urNp linux-2.6.31.4/arch/m32r/include/asm/atomic.h linux-2.6.31.4/arch/m32r/include/asm/atomic.h
+--- linux-2.6.31.4/arch/m32r/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/m32r/include/asm/atomic.h 2009-10-11 15:29:40.466363930 -0400
+@@ -29,6 +29,14 @@
+ #define atomic_read(v) ((v)->counter)
+
+ /**
++ * atomic_read_unchecked - read atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically reads the value of @v.
++ */
++#define atomic_read_unchecked(v) ((v)->counter)
++
++/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+@@ -38,6 +46,15 @@
+ #define atomic_set(v,i) (((v)->counter) = (i))
+
+ /**
++ * atomic_set_unchecked - set atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ * @i: required value
++ *
++ * Atomically sets the value of @v to @i.
++ */
++#define atomic_set_unchecked(v,i) (((v)->counter) = (i))
++
++/**
+ * atomic_add_return - add integer to atomic variable and return it
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+@@ -308,6 +325,10 @@ static __inline__ void atomic_set_mask(u
local_irq_restore(flags);
}
-+#define atomic_inc_unchecked(v) atomic_inc(v)
-+#define atomic_add_unchecked(i,v) atomic_add((i),(v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i),(v))
++#define atomic_inc_unchecked(v) atomic_inc((atomic_t *)(v))
++#define atomic_add_unchecked(i,v) atomic_add((i),(atomic_t *)(v))
++#define atomic_sub_unchecked(i,v) atomic_sub((i),(atomic_t *)(v))
+
/* Atomic operations are already serializing on m32r */
#define smp_mb__before_atomic_dec() barrier()
#define smp_mb__after_atomic_dec() barrier()
-diff -urNp linux-2.6.30.8/arch/m32r/include/asm/kmap_types.h linux-2.6.30.8/arch/m32r/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/m32r/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/m32r/include/asm/kmap_types.h 2009-07-30 09:48:09.890443797 -0400
-@@ -21,7 +21,8 @@ D(9) KM_IRQ0,
- D(10) KM_IRQ1,
- D(11) KM_SOFTIRQ0,
- D(12) KM_SOFTIRQ1,
--D(13) KM_TYPE_NR
-+D(13) KM_CLEARPAGE,
-+D(14) KM_TYPE_NR
- };
-
- #undef D
-diff -urNp linux-2.6.30.8/arch/m32r/lib/usercopy.c linux-2.6.30.8/arch/m32r/lib/usercopy.c
---- linux-2.6.30.8/arch/m32r/lib/usercopy.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/m32r/lib/usercopy.c 2009-07-30 09:48:09.890443797 -0400
+diff -urNp linux-2.6.31.4/arch/m32r/lib/usercopy.c linux-2.6.31.4/arch/m32r/lib/usercopy.c
+--- linux-2.6.31.4/arch/m32r/lib/usercopy.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/m32r/lib/usercopy.c 2009-10-11 15:29:40.488105689 -0400
@@ -14,6 +14,9 @@
unsigned long
__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
@@ -997,61 +1274,147 @@ diff -urNp linux-2.6.30.8/arch/m32r/lib/usercopy.c linux-2.6.30.8/arch/m32r/lib/
prefetchw(to);
if (access_ok(VERIFY_READ, from, n))
__copy_user_zeroing(to,from,n);
-diff -urNp linux-2.6.30.8/arch/m68k/include/asm/atomic_mm.h linux-2.6.30.8/arch/m68k/include/asm/atomic_mm.h
---- linux-2.6.30.8/arch/m68k/include/asm/atomic_mm.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/m68k/include/asm/atomic_mm.h 2009-07-30 09:48:09.890443797 -0400
-@@ -186,6 +186,10 @@ static __inline__ int atomic_add_unless(
+diff -urNp linux-2.6.31.4/arch/m68k/include/asm/atomic_mm.h linux-2.6.31.4/arch/m68k/include/asm/atomic_mm.h
+--- linux-2.6.31.4/arch/m68k/include/asm/atomic_mm.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/m68k/include/asm/atomic_mm.h 2009-10-11 15:29:40.503696410 -0400
+@@ -16,23 +16,40 @@
+ #define ATOMIC_INIT(i) { (i) }
- #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+ #define atomic_set(v, i) (((v)->counter) = i)
++#define atomic_set_unchecked(v, i) (((v)->counter) = i)
-+#define atomic_inc_unchecked(v) atomic_inc((v))
-+#define atomic_add_unchecked(i,v) atomic_add((i),(v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i),(v))
+ static inline void atomic_add(int i, atomic_t *v)
+ {
+ __asm__ __volatile__("addl %1,%0" : "+m" (*v) : "id" (i));
+ }
+
++static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_add(i, (atomic_t *)v);
++}
+
- /* Atomic operations are already serializing */
- #define smp_mb__before_atomic_dec() barrier()
- #define smp_mb__after_atomic_dec() barrier()
-diff -urNp linux-2.6.30.8/arch/m68k/include/asm/atomic_no.h linux-2.6.30.8/arch/m68k/include/asm/atomic_no.h
---- linux-2.6.30.8/arch/m68k/include/asm/atomic_no.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/m68k/include/asm/atomic_no.h 2009-07-30 09:48:09.890443797 -0400
-@@ -151,5 +151,9 @@ static __inline__ int atomic_add_unless(
- #define atomic_dec_return(v) atomic_sub_return(1,(v))
- #define atomic_inc_return(v) atomic_add_return(1,(v))
-
-+#define atomic_inc_unchecked(v) atomic_inc((v))
-+#define atomic_add_unchecked(i,v) atomic_add((i),(v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i),(v))
-+
- #include <asm-generic/atomic.h>
- #endif /* __ARCH_M68KNOMMU_ATOMIC __ */
-diff -urNp linux-2.6.30.8/arch/m68k/include/asm/kmap_types.h linux-2.6.30.8/arch/m68k/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/m68k/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/m68k/include/asm/kmap_types.h 2009-07-30 09:48:09.891413194 -0400
-@@ -15,6 +15,7 @@ enum km_type {
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
-+ KM_CLEARPAGE,
- KM_TYPE_NR
- };
+ static inline void atomic_sub(int i, atomic_t *v)
+ {
+ __asm__ __volatile__("subl %1,%0" : "+m" (*v) : "id" (i));
+ }
+
++static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_sub(i, (atomic_t *)v);
++}
++
+ static inline void atomic_inc(atomic_t *v)
+ {
+ __asm__ __volatile__("addql #1,%0" : "+m" (*v));
+ }
-diff -urNp linux-2.6.30.8/arch/mips/include/asm/atomic.h linux-2.6.30.8/arch/mips/include/asm/atomic.h
---- linux-2.6.30.8/arch/mips/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/include/asm/atomic.h 2009-07-30 09:48:09.891413194 -0400
-@@ -381,6 +381,9 @@ static __inline__ int atomic_add_unless(
++static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
++{
++ atomic_inc((atomic_t *)v);
++}
++
+ static inline void atomic_dec(atomic_t *v)
+ {
+ __asm__ __volatile__("subql #1,%0" : "+m" (*v));
+diff -urNp linux-2.6.31.4/arch/m68k/include/asm/atomic_no.h linux-2.6.31.4/arch/m68k/include/asm/atomic_no.h
+--- linux-2.6.31.4/arch/m68k/include/asm/atomic_no.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/m68k/include/asm/atomic_no.h 2009-10-11 15:29:40.503696410 -0400
+@@ -16,7 +16,9 @@
+ #define ATOMIC_INIT(i) { (i) }
+
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+ #define atomic_set(v, i) (((v)->counter) = i)
++#define atomic_set_unchecked(v, i) (((v)->counter) = i)
+
+ static __inline__ void atomic_add(int i, atomic_t *v)
+ {
+@@ -27,6 +29,11 @@ static __inline__ void atomic_add(int i,
+ #endif
+ }
+
++static __inline__ void atomic_add_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_add(i, (atomic_t *)v);
++}
++
+ static __inline__ void atomic_sub(int i, atomic_t *v)
+ {
+ #ifdef CONFIG_COLDFIRE
+@@ -36,6 +43,11 @@ static __inline__ void atomic_sub(int i,
+ #endif
+ }
+
++static __inline__ void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_sub(i, (atomic_t *)v);
++}
++
+ static __inline__ int atomic_sub_and_test(int i, atomic_t * v)
+ {
+ char c;
+@@ -56,6 +68,11 @@ static __inline__ void atomic_inc(volati
+ __asm__ __volatile__("addql #1,%0" : "+m" (*v));
+ }
+
++static __inline__ void atomic_inc_unchecked(volatile atomic_unchecked_t *v)
++{
++ atomic_inc((volatile atomic_t *)v);
++}
++
+ /*
+ * atomic_inc_and_test - increment and test
+ * @v: pointer of type atomic_t
+diff -urNp linux-2.6.31.4/arch/mips/include/asm/atomic.h linux-2.6.31.4/arch/mips/include/asm/atomic.h
+--- linux-2.6.31.4/arch/mips/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mips/include/asm/atomic.h 2009-10-11 15:29:40.503696410 -0400
+@@ -32,6 +32,14 @@
+ #define atomic_read(v) ((v)->counter)
+
+ /*
++ * atomic_read_unchecked - read atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically reads the value of @v.
++ */
++#define atomic_read_unchecked(v) ((v)->counter)
++
++/*
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+@@ -41,6 +49,15 @@
+ #define atomic_set(v, i) ((v)->counter = (i))
+
+ /*
++ * atomic_set_unchecked - set atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ * @i: required value
++ *
++ * Atomically sets the value of @v to @i.
++ */
++#define atomic_set_unchecked(v, i) ((v)->counter = (i))
++
++/*
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+@@ -381,6 +398,9 @@ static __inline__ int atomic_add_unless(
* Atomically increments @v by 1.
*/
#define atomic_inc(v) atomic_add(1, (v))
-+#define atomic_inc_unchecked(v) atomic_inc(v)
-+#define atomic_add_unchecked(i, v) atomic_add((i), (v))
-+#define atomic_sub_unchecked(i, v) atomic_sub((i), (v))
++#define atomic_inc_unchecked(v) atomic_inc((atomic_t *)(v))
++#define atomic_add_unchecked(i, v) atomic_add((i), (atomic_t *)(v))
++#define atomic_sub_unchecked(i, v) atomic_sub((i), (atomic_t *)(v))
/*
* atomic_dec - decrement and test
-diff -urNp linux-2.6.30.8/arch/mips/include/asm/elf.h linux-2.6.30.8/arch/mips/include/asm/elf.h
---- linux-2.6.30.8/arch/mips/include/asm/elf.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/include/asm/elf.h 2009-07-30 09:48:09.891413194 -0400
-@@ -364,4 +364,11 @@ extern int dump_task_fpu(struct task_str
+diff -urNp linux-2.6.31.4/arch/mips/include/asm/elf.h linux-2.6.31.4/arch/mips/include/asm/elf.h
+--- linux-2.6.31.4/arch/mips/include/asm/elf.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mips/include/asm/elf.h 2009-10-11 15:29:40.504567695 -0400
+@@ -368,4 +368,11 @@ extern int dump_task_fpu(struct task_str
#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
#endif
@@ -1063,23 +1426,10 @@ diff -urNp linux-2.6.30.8/arch/mips/include/asm/elf.h linux-2.6.30.8/arch/mips/i
+#endif
+
#endif /* _ASM_ELF_H */
-diff -urNp linux-2.6.30.8/arch/mips/include/asm/kmap_types.h linux-2.6.30.8/arch/mips/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/mips/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/include/asm/kmap_types.h 2009-07-30 09:48:09.892412592 -0400
-@@ -22,7 +22,8 @@ D(9) KM_IRQ0,
- D(10) KM_IRQ1,
- D(11) KM_SOFTIRQ0,
- D(12) KM_SOFTIRQ1,
--D(13) KM_TYPE_NR
-+D(13) KM_CLEARPAGE,
-+D(14) KM_TYPE_NR
- };
-
- #undef D
-diff -urNp linux-2.6.30.8/arch/mips/include/asm/page.h linux-2.6.30.8/arch/mips/include/asm/page.h
---- linux-2.6.30.8/arch/mips/include/asm/page.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/include/asm/page.h 2009-07-30 09:48:09.892412592 -0400
-@@ -85,7 +85,7 @@ extern void copy_user_highpage(struct pa
+diff -urNp linux-2.6.31.4/arch/mips/include/asm/page.h linux-2.6.31.4/arch/mips/include/asm/page.h
+--- linux-2.6.31.4/arch/mips/include/asm/page.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mips/include/asm/page.h 2009-10-11 15:29:40.519375120 -0400
+@@ -92,7 +92,7 @@ extern void copy_user_highpage(struct pa
#ifdef CONFIG_CPU_MIPS32
typedef struct { unsigned long pte_low, pte_high; } pte_t;
#define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
@@ -1088,9 +1438,9 @@ diff -urNp linux-2.6.30.8/arch/mips/include/asm/page.h linux-2.6.30.8/arch/mips/
#else
typedef struct { unsigned long long pte; } pte_t;
#define pte_val(x) ((x).pte)
-diff -urNp linux-2.6.30.8/arch/mips/include/asm/system.h linux-2.6.30.8/arch/mips/include/asm/system.h
---- linux-2.6.30.8/arch/mips/include/asm/system.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/include/asm/system.h 2009-07-30 09:48:09.892412592 -0400
+diff -urNp linux-2.6.31.4/arch/mips/include/asm/system.h linux-2.6.31.4/arch/mips/include/asm/system.h
+--- linux-2.6.31.4/arch/mips/include/asm/system.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mips/include/asm/system.h 2009-10-11 15:29:40.519375120 -0400
@@ -217,6 +217,6 @@ extern void per_cpu_trap_init(void);
*/
#define __ARCH_WANT_UNLOCKED_CTXSW
@@ -1099,9 +1449,9 @@ diff -urNp linux-2.6.30.8/arch/mips/include/asm/system.h linux-2.6.30.8/arch/mip
+#define arch_align_stack(x) ((x) & ALMASK)
#endif /* _ASM_SYSTEM_H */
-diff -urNp linux-2.6.30.8/arch/mips/kernel/binfmt_elfn32.c linux-2.6.30.8/arch/mips/kernel/binfmt_elfn32.c
---- linux-2.6.30.8/arch/mips/kernel/binfmt_elfn32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/kernel/binfmt_elfn32.c 2009-07-30 09:48:09.892412592 -0400
+diff -urNp linux-2.6.31.4/arch/mips/kernel/binfmt_elfn32.c linux-2.6.31.4/arch/mips/kernel/binfmt_elfn32.c
+--- linux-2.6.31.4/arch/mips/kernel/binfmt_elfn32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mips/kernel/binfmt_elfn32.c 2009-10-11 15:29:40.519375120 -0400
@@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
@@ -1116,9 +1466,9 @@ diff -urNp linux-2.6.30.8/arch/mips/kernel/binfmt_elfn32.c linux-2.6.30.8/arch/m
#include <asm/processor.h>
#include <linux/module.h>
#include <linux/elfcore.h>
-diff -urNp linux-2.6.30.8/arch/mips/kernel/binfmt_elfo32.c linux-2.6.30.8/arch/mips/kernel/binfmt_elfo32.c
---- linux-2.6.30.8/arch/mips/kernel/binfmt_elfo32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/kernel/binfmt_elfo32.c 2009-07-30 09:48:09.893444022 -0400
+diff -urNp linux-2.6.31.4/arch/mips/kernel/binfmt_elfo32.c linux-2.6.31.4/arch/mips/kernel/binfmt_elfo32.c
+--- linux-2.6.31.4/arch/mips/kernel/binfmt_elfo32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mips/kernel/binfmt_elfo32.c 2009-10-11 15:29:40.519375120 -0400
@@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
@@ -1131,12 +1481,12 @@ diff -urNp linux-2.6.30.8/arch/mips/kernel/binfmt_elfo32.c linux-2.6.30.8/arch/m
+#endif
+
#include <asm/processor.h>
- #include <linux/module.h>
- #include <linux/elfcore.h>
-diff -urNp linux-2.6.30.8/arch/mips/kernel/process.c linux-2.6.30.8/arch/mips/kernel/process.c
---- linux-2.6.30.8/arch/mips/kernel/process.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/kernel/process.c 2009-07-30 09:48:09.893444022 -0400
-@@ -457,15 +457,3 @@ unsigned long get_wchan(struct task_stru
+
+ /*
+diff -urNp linux-2.6.31.4/arch/mips/kernel/process.c linux-2.6.31.4/arch/mips/kernel/process.c
+--- linux-2.6.31.4/arch/mips/kernel/process.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mips/kernel/process.c 2009-10-11 15:29:40.519375120 -0400
+@@ -470,15 +470,3 @@ unsigned long get_wchan(struct task_stru
out:
return pc;
}
@@ -1152,9 +1502,9 @@ diff -urNp linux-2.6.30.8/arch/mips/kernel/process.c linux-2.6.30.8/arch/mips/ke
-
- return sp & ALMASK;
-}
-diff -urNp linux-2.6.30.8/arch/mips/kernel/syscall.c linux-2.6.30.8/arch/mips/kernel/syscall.c
---- linux-2.6.30.8/arch/mips/kernel/syscall.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/kernel/syscall.c 2009-07-30 09:48:09.893444022 -0400
+diff -urNp linux-2.6.31.4/arch/mips/kernel/syscall.c linux-2.6.31.4/arch/mips/kernel/syscall.c
+--- linux-2.6.31.4/arch/mips/kernel/syscall.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mips/kernel/syscall.c 2009-10-11 15:29:40.520684872 -0400
@@ -99,6 +99,11 @@ unsigned long arch_get_unmapped_area(str
do_color_align = 0;
if (filp || (flags & MAP_SHARED))
@@ -1176,9 +1526,9 @@ diff -urNp linux-2.6.30.8/arch/mips/kernel/syscall.c linux-2.6.30.8/arch/mips/ke
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
else
-diff -urNp linux-2.6.30.8/arch/mips/mm/fault.c linux-2.6.30.8/arch/mips/mm/fault.c
---- linux-2.6.30.8/arch/mips/mm/fault.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mips/mm/fault.c 2009-07-30 09:48:09.896533953 -0400
+diff -urNp linux-2.6.31.4/arch/mips/mm/fault.c linux-2.6.31.4/arch/mips/mm/fault.c
+--- linux-2.6.31.4/arch/mips/mm/fault.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mips/mm/fault.c 2009-10-11 15:29:40.520684872 -0400
@@ -26,6 +26,23 @@
#include <asm/ptrace.h>
#include <asm/highmem.h> /* For VMALLOC_END */
@@ -1203,34 +1553,77 @@ diff -urNp linux-2.6.30.8/arch/mips/mm/fault.c linux-2.6.30.8/arch/mips/mm/fault
/*
* This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate
-diff -urNp linux-2.6.30.8/arch/mn10300/include/asm/atomic.h linux-2.6.30.8/arch/mn10300/include/asm/atomic.h
---- linux-2.6.30.8/arch/mn10300/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mn10300/include/asm/atomic.h 2009-07-30 09:48:09.897612189 -0400
-@@ -145,6 +145,10 @@ static inline void atomic_clear_mask(uns
- #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v)))
- #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
-
-+#define atomic_inc_unchecked(v) atomic_inc(v)
-+#define atomic_add_unchecked(i,v) atomic_add((i),(v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i),(v))
-+
- /* Atomic operations are already serializing on MN10300??? */
- #define smp_mb__before_atomic_dec() barrier()
- #define smp_mb__after_atomic_dec() barrier()
-diff -urNp linux-2.6.30.8/arch/mn10300/include/asm/kmap_types.h linux-2.6.30.8/arch/mn10300/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/mn10300/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mn10300/include/asm/kmap_types.h 2009-07-30 09:48:09.897612189 -0400
-@@ -25,6 +25,7 @@ enum km_type {
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
-+ KM_CLEARPAGE,
- KM_TYPE_NR
- };
+diff -urNp linux-2.6.31.4/arch/mn10300/include/asm/atomic.h linux-2.6.31.4/arch/mn10300/include/asm/atomic.h
+--- linux-2.6.31.4/arch/mn10300/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mn10300/include/asm/atomic.h 2009-10-11 15:29:40.520684872 -0400
+@@ -34,6 +34,15 @@
+ #define atomic_read(v) ((v)->counter)
+
+ /**
++ * atomic_read_unchecked - read atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically reads the value of @v. Note that the guaranteed
++ * useful range of an atomic_unchecked_t is only 24 bits.
++ */
++#define atomic_read_unchecked(v) ((v)->counter)
++
++/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+@@ -43,6 +52,16 @@
+ */
+ #define atomic_set(v, i) (((v)->counter) = (i))
+
++/**
++ * atomic_set_unchecked - set atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ * @i: required value
++ *
++ * Atomically sets the value of @v to @i. Note that the guaranteed
++ * useful range of an atomic_unchecked_t is only 24 bits.
++ */
++#define atomic_set_unchecked(v, i) (((v)->counter) = (i))
++
+ #include <asm/system.h>
+
+ /**
+@@ -99,16 +118,31 @@ static inline void atomic_add(int i, ato
+ atomic_add_return(i, v);
+ }
+
++static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_add_return(i, (atomic_t *)v);
++}
++
+ static inline void atomic_sub(int i, atomic_t *v)
+ {
+ atomic_sub_return(i, v);
+ }
+
++static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_sub_return(i, (atomic_t *)v);
++}
++
+ static inline void atomic_inc(atomic_t *v)
+ {
+ atomic_add_return(1, v);
+ }
-diff -urNp linux-2.6.30.8/arch/mn10300/kernel/setup.c linux-2.6.30.8/arch/mn10300/kernel/setup.c
---- linux-2.6.30.8/arch/mn10300/kernel/setup.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/mn10300/kernel/setup.c 2009-07-30 09:48:09.897612189 -0400
++static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
++{
++ atomic_add_return(1, (atomic_t *)v);
++}
++
+ static inline void atomic_dec(atomic_t *v)
+ {
+ atomic_sub_return(1, v);
+diff -urNp linux-2.6.31.4/arch/mn10300/kernel/setup.c linux-2.6.31.4/arch/mn10300/kernel/setup.c
+--- linux-2.6.31.4/arch/mn10300/kernel/setup.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/mn10300/kernel/setup.c 2009-10-11 15:29:40.521507126 -0400
@@ -285,7 +285,7 @@ static void c_stop(struct seq_file *m, v
{
}
@@ -1240,24 +1633,70 @@ diff -urNp linux-2.6.30.8/arch/mn10300/kernel/setup.c linux-2.6.30.8/arch/mn1030
.start = c_start,
.next = c_next,
.stop = c_stop,
-diff -urNp linux-2.6.30.8/arch/parisc/include/asm/atomic.h linux-2.6.30.8/arch/parisc/include/asm/atomic.h
---- linux-2.6.30.8/arch/parisc/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/parisc/include/asm/atomic.h 2009-07-30 09:48:09.898625493 -0400
-@@ -223,8 +223,11 @@ static __inline__ int atomic_add_unless(
+diff -urNp linux-2.6.31.4/arch/parisc/include/asm/atomic.h linux-2.6.31.4/arch/parisc/include/asm/atomic.h
+--- linux-2.6.31.4/arch/parisc/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/parisc/include/asm/atomic.h 2009-10-11 15:29:40.521507126 -0400
+@@ -177,6 +177,18 @@ static __inline__ int __atomic_add_retur
+ return ret;
+ }
+
++static __inline__ int __atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
++{
++ int ret;
++ unsigned long flags;
++ _atomic_spin_lock_irqsave(v, flags);
++
++ ret = (v->counter += i);
++
++ _atomic_spin_unlock_irqrestore(v, flags);
++ return ret;
++}
++
+ static __inline__ void atomic_set(atomic_t *v, int i)
+ {
+ unsigned long flags;
+@@ -187,11 +199,26 @@ static __inline__ void atomic_set(atomic
+ _atomic_spin_unlock_irqrestore(v, flags);
+ }
+
++static __inline__ void atomic_set_unchecked(atomic_unchecked_t *v, int i)
++{
++ unsigned long flags;
++ _atomic_spin_lock_irqsave(v, flags);
++
++ v->counter = i;
++
++ _atomic_spin_unlock_irqrestore(v, flags);
++}
++
+ static __inline__ int atomic_read(const atomic_t *v)
+ {
+ return v->counter;
+ }
+
++static __inline__ int atomic_read_unchecked(const atomic_unchecked_t *v)
++{
++ return v->counter;
++}
++
+ /* exported interface */
+ #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
+ #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
+@@ -223,8 +250,11 @@ static __inline__ int atomic_add_unless(
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
- #define atomic_add(i,v) ((void)(__atomic_add_return( ((int)(i)),(v))))
-+#define atomic_add_unchecked(i,v) atomic_add((i), (v))
- #define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)(i)),(v))))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i), (v))
+ #define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v))))
++#define atomic_add_unchecked(i,v) ((void)(__atomic_add_return_unchecked( ((i),(v))))
+ #define atomic_sub(i,v) ((void)(__atomic_add_return(-(i),(v))))
++#define atomic_sub_unchecked(i,v) ((void)(__atomic_add_return_unchecked(-(i),(v))))
#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v))))
-+#define atomic_inc_unchecked(v) atomic_inc(v)
++#define atomic_inc_unchecked(v) ((void)(__atomic_add_return_unchecked( 1,(v))))
#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v))))
- #define atomic_add_return(i,v) (__atomic_add_return( ((int)(i)),(v)))
-diff -urNp linux-2.6.30.8/arch/parisc/include/asm/elf.h linux-2.6.30.8/arch/parisc/include/asm/elf.h
---- linux-2.6.30.8/arch/parisc/include/asm/elf.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/parisc/include/asm/elf.h 2009-07-30 09:48:09.898625493 -0400
+ #define atomic_add_return(i,v) (__atomic_add_return( (i),(v)))
+diff -urNp linux-2.6.31.4/arch/parisc/include/asm/elf.h linux-2.6.31.4/arch/parisc/include/asm/elf.h
+--- linux-2.6.31.4/arch/parisc/include/asm/elf.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/parisc/include/asm/elf.h 2009-10-11 15:29:40.521507126 -0400
@@ -343,6 +343,13 @@ struct pt_regs; /* forward declaration..
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x01000000)
@@ -1272,22 +1711,9 @@ diff -urNp linux-2.6.30.8/arch/parisc/include/asm/elf.h linux-2.6.30.8/arch/pari
/* 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 -urNp linux-2.6.30.8/arch/parisc/include/asm/kmap_types.h linux-2.6.30.8/arch/parisc/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/parisc/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/parisc/include/asm/kmap_types.h 2009-07-30 09:48:09.898625493 -0400
-@@ -22,7 +22,8 @@ D(9) KM_IRQ0,
- D(10) KM_IRQ1,
- D(11) KM_SOFTIRQ0,
- D(12) KM_SOFTIRQ1,
--D(13) KM_TYPE_NR
-+D(13) KM_CLEARPAGE,
-+D(14) KM_TYPE_NR
- };
-
- #undef D
-diff -urNp linux-2.6.30.8/arch/parisc/include/asm/pgtable.h linux-2.6.30.8/arch/parisc/include/asm/pgtable.h
---- linux-2.6.30.8/arch/parisc/include/asm/pgtable.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/parisc/include/asm/pgtable.h 2009-07-30 09:48:09.898625493 -0400
+diff -urNp linux-2.6.31.4/arch/parisc/include/asm/pgtable.h linux-2.6.31.4/arch/parisc/include/asm/pgtable.h
+--- linux-2.6.31.4/arch/parisc/include/asm/pgtable.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/parisc/include/asm/pgtable.h 2009-10-11 15:29:40.521507126 -0400
@@ -207,6 +207,17 @@
#define PAGE_EXECREAD __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED)
#define PAGE_COPY PAGE_EXECREAD
@@ -1306,10 +1732,10 @@ diff -urNp linux-2.6.30.8/arch/parisc/include/asm/pgtable.h linux-2.6.30.8/arch/
#define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
#define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE)
#define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
-diff -urNp linux-2.6.30.8/arch/parisc/kernel/module.c linux-2.6.30.8/arch/parisc/kernel/module.c
---- linux-2.6.30.8/arch/parisc/kernel/module.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/parisc/kernel/module.c 2009-07-30 09:48:09.899565255 -0400
-@@ -91,16 +91,38 @@
+diff -urNp linux-2.6.31.4/arch/parisc/kernel/module.c linux-2.6.31.4/arch/parisc/kernel/module.c
+--- linux-2.6.31.4/arch/parisc/kernel/module.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/parisc/kernel/module.c 2009-10-11 15:29:40.522555387 -0400
+@@ -95,16 +95,38 @@
/* three functions to determine where in the module core
* or init pieces the location is */
@@ -1352,7 +1778,7 @@ diff -urNp linux-2.6.30.8/arch/parisc/kernel/module.c linux-2.6.30.8/arch/parisc
}
static inline int in_local(struct module *me, void *loc)
-@@ -334,13 +356,13 @@ int module_frob_arch_sections(CONST Elf_
+@@ -364,13 +386,13 @@ int module_frob_arch_sections(CONST Elf_
}
/* align things a bit */
@@ -1373,7 +1799,7 @@ diff -urNp linux-2.6.30.8/arch/parisc/kernel/module.c linux-2.6.30.8/arch/parisc
me->arch.got_max = gots;
me->arch.fdesc_max = fdescs;
-@@ -358,7 +380,7 @@ static Elf64_Word get_got(struct module
+@@ -388,7 +410,7 @@ static Elf64_Word get_got(struct module
BUG_ON(value == 0);
@@ -1382,7 +1808,7 @@ diff -urNp linux-2.6.30.8/arch/parisc/kernel/module.c linux-2.6.30.8/arch/parisc
for (i = 0; got[i].addr; i++)
if (got[i].addr == value)
goto out;
-@@ -376,7 +398,7 @@ static Elf64_Word get_got(struct module
+@@ -406,7 +428,7 @@ static Elf64_Word get_got(struct module
#ifdef CONFIG_64BIT
static Elf_Addr get_fdesc(struct module *me, unsigned long value)
{
@@ -1391,7 +1817,7 @@ diff -urNp linux-2.6.30.8/arch/parisc/kernel/module.c linux-2.6.30.8/arch/parisc
if (!value) {
printk(KERN_ERR "%s: zero OPD requested!\n", me->name);
-@@ -394,7 +416,7 @@ static Elf_Addr get_fdesc(struct module
+@@ -424,7 +446,7 @@ static Elf_Addr get_fdesc(struct module
/* Create new one */
fdesc->addr = value;
@@ -1400,7 +1826,7 @@ diff -urNp linux-2.6.30.8/arch/parisc/kernel/module.c linux-2.6.30.8/arch/parisc
return (Elf_Addr)fdesc;
}
#endif /* CONFIG_64BIT */
-@@ -810,7 +832,7 @@ register_unwind_table(struct module *me,
+@@ -848,7 +870,7 @@ register_unwind_table(struct module *me,
table = (unsigned char *)sechdrs[me->arch.unwind_section].sh_addr;
end = table + sechdrs[me->arch.unwind_section].sh_size;
@@ -1409,9 +1835,9 @@ diff -urNp linux-2.6.30.8/arch/parisc/kernel/module.c linux-2.6.30.8/arch/parisc
DEBUGP("register_unwind_table(), sect = %d at 0x%p - 0x%p (gp=0x%lx)\n",
me->arch.unwind_section, table, end, gp);
-diff -urNp linux-2.6.30.8/arch/parisc/kernel/sys_parisc.c linux-2.6.30.8/arch/parisc/kernel/sys_parisc.c
---- linux-2.6.30.8/arch/parisc/kernel/sys_parisc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/parisc/kernel/sys_parisc.c 2009-07-30 09:48:09.899565255 -0400
+diff -urNp linux-2.6.31.4/arch/parisc/kernel/sys_parisc.c linux-2.6.31.4/arch/parisc/kernel/sys_parisc.c
+--- linux-2.6.31.4/arch/parisc/kernel/sys_parisc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/parisc/kernel/sys_parisc.c 2009-10-11 15:29:40.522555387 -0400
@@ -98,7 +98,7 @@ unsigned long arch_get_unmapped_area(str
if (flags & MAP_FIXED)
return addr;
@@ -1421,10 +1847,10 @@ diff -urNp linux-2.6.30.8/arch/parisc/kernel/sys_parisc.c linux-2.6.30.8/arch/pa
if (filp) {
addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
-diff -urNp linux-2.6.30.8/arch/parisc/kernel/traps.c linux-2.6.30.8/arch/parisc/kernel/traps.c
---- linux-2.6.30.8/arch/parisc/kernel/traps.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/parisc/kernel/traps.c 2009-07-30 09:48:09.900676754 -0400
-@@ -734,9 +734,7 @@ void notrace handle_interruption(int cod
+diff -urNp linux-2.6.31.4/arch/parisc/kernel/traps.c linux-2.6.31.4/arch/parisc/kernel/traps.c
+--- linux-2.6.31.4/arch/parisc/kernel/traps.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/parisc/kernel/traps.c 2009-10-11 15:29:40.613367290 -0400
+@@ -733,9 +733,7 @@ void notrace handle_interruption(int cod
down_read(&current->mm->mmap_sem);
vma = find_vma(current->mm,regs->iaoq[0]);
@@ -1435,10 +1861,10 @@ diff -urNp linux-2.6.30.8/arch/parisc/kernel/traps.c linux-2.6.30.8/arch/parisc/
fault_address = regs->iaoq[0];
fault_space = regs->iasq[0];
-diff -urNp linux-2.6.30.8/arch/parisc/mm/fault.c linux-2.6.30.8/arch/parisc/mm/fault.c
---- linux-2.6.30.8/arch/parisc/mm/fault.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/parisc/mm/fault.c 2009-07-30 09:48:09.900676754 -0400
-@@ -16,6 +16,7 @@
+diff -urNp linux-2.6.31.4/arch/parisc/mm/fault.c linux-2.6.31.4/arch/parisc/mm/fault.c
+--- linux-2.6.31.4/arch/parisc/mm/fault.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/parisc/mm/fault.c 2009-10-11 15:29:40.613367290 -0400
+@@ -15,6 +15,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/module.h>
@@ -1446,7 +1872,7 @@ diff -urNp linux-2.6.30.8/arch/parisc/mm/fault.c linux-2.6.30.8/arch/parisc/mm/f
#include <asm/uaccess.h>
#include <asm/traps.h>
-@@ -53,7 +54,7 @@ DEFINE_PER_CPU(struct exception_data, ex
+@@ -52,7 +53,7 @@ DEFINE_PER_CPU(struct exception_data, ex
static unsigned long
parisc_acctyp(unsigned long code, unsigned int inst)
{
@@ -1455,7 +1881,7 @@ diff -urNp linux-2.6.30.8/arch/parisc/mm/fault.c linux-2.6.30.8/arch/parisc/mm/f
return VM_EXEC;
switch (inst & 0xf0000000) {
-@@ -139,6 +140,116 @@ parisc_acctyp(unsigned long code, unsign
+@@ -138,6 +139,116 @@ parisc_acctyp(unsigned long code, unsign
}
#endif
@@ -1572,7 +1998,7 @@ diff -urNp linux-2.6.30.8/arch/parisc/mm/fault.c linux-2.6.30.8/arch/parisc/mm/f
int fixup_exception(struct pt_regs *regs)
{
const struct exception_table_entry *fix;
-@@ -193,8 +304,33 @@ good_area:
+@@ -192,8 +303,33 @@ good_area:
acc_type = parisc_acctyp(code,regs->iir);
@@ -1607,23 +2033,70 @@ diff -urNp linux-2.6.30.8/arch/parisc/mm/fault.c linux-2.6.30.8/arch/parisc/mm/f
/*
* If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/atomic.h linux-2.6.30.8/arch/powerpc/include/asm/atomic.h
---- linux-2.6.30.8/arch/powerpc/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/include/asm/atomic.h 2009-07-30 09:48:09.900676754 -0400
-@@ -244,6 +244,10 @@ static __inline__ int atomic_dec_if_posi
+diff -urNp linux-2.6.31.4/arch/powerpc/include/asm/atomic.h linux-2.6.31.4/arch/powerpc/include/asm/atomic.h
+--- linux-2.6.31.4/arch/powerpc/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/include/asm/atomic.h 2009-10-11 15:29:40.614427595 -0400
+@@ -24,11 +24,21 @@ static __inline__ int atomic_read(const
return t;
}
-+#define atomic_inc_unchecked(v) atomic_inc((v))
-+#define atomic_add_unchecked(i,v) atomic_add((i),(v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i),(v))
++static __inline__ int atomic_read_unchecked(const atomic_unchecked_t *v)
++{
++ return atomic_read((const atomic_t *)v);
++}
+
- #define smp_mb__before_atomic_dec() smp_mb()
- #define smp_mb__after_atomic_dec() smp_mb()
- #define smp_mb__before_atomic_inc() smp_mb()
-diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/elf.h linux-2.6.30.8/arch/powerpc/include/asm/elf.h
---- linux-2.6.30.8/arch/powerpc/include/asm/elf.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/include/asm/elf.h 2009-07-30 09:48:09.901536944 -0400
+ static __inline__ void atomic_set(atomic_t *v, int i)
+ {
+ __asm__ __volatile__("stw%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i));
+ }
+
++static __inline__ void atomic_set_unchecked(atomic_unchecked_t *v, int i)
++{
++ atomic_set((atomic_t *)v, i);
++}
++
+ static __inline__ void atomic_add(int a, atomic_t *v)
+ {
+ int t;
+@@ -44,6 +54,11 @@ static __inline__ void atomic_add(int a,
+ : "cc");
+ }
+
++static __inline__ void atomic_add_unchecked(int a, atomic_unchecked_t *v)
++{
++ atomic_add(a, (atomic_t *)v);
++}
++
+ static __inline__ int atomic_add_return(int a, atomic_t *v)
+ {
+ int t;
+@@ -80,6 +95,11 @@ static __inline__ void atomic_sub(int a,
+ : "cc");
+ }
+
++static __inline__ void atomic_sub_unchecked(int a, atomic_unchecked_t *v)
++{
++ atomic_sub(a, (atomic_t *)v);
++}
++
+ static __inline__ int atomic_sub_return(int a, atomic_t *v)
+ {
+ int t;
+@@ -114,6 +134,11 @@ static __inline__ void atomic_inc(atomic
+ : "cc", "xer");
+ }
+
++static __inline__ void atomic_inc_unchecked(atomic_unchecked_t *v)
++{
++ atomic_inc((atomic_t *)v);
++}
++
+ static __inline__ int atomic_inc_return(atomic_t *v)
+ {
+ int t;
+diff -urNp linux-2.6.31.4/arch/powerpc/include/asm/elf.h linux-2.6.31.4/arch/powerpc/include/asm/elf.h
+--- linux-2.6.31.4/arch/powerpc/include/asm/elf.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/include/asm/elf.h 2009-10-11 15:29:40.614427595 -0400
@@ -179,8 +179,19 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[E
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -1646,9 +2119,19 @@ diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/elf.h linux-2.6.30.8/arch/pow
/*
* Our registers are always unsigned longs, whether we're a 32 bit
-diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/kmap_types.h linux-2.6.30.8/arch/powerpc/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/powerpc/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/include/asm/kmap_types.h 2009-07-30 09:48:09.901536944 -0400
+@@ -279,9 +290,6 @@ extern int arch_setup_additional_pages(s
+ (0x7ff >> (PAGE_SHIFT - 12)) : \
+ (0x3ffff >> (PAGE_SHIFT - 12)))
+
+-extern unsigned long arch_randomize_brk(struct mm_struct *mm);
+-#define arch_randomize_brk arch_randomize_brk
+-
+ #endif /* __KERNEL__ */
+
+ /*
+diff -urNp linux-2.6.31.4/arch/powerpc/include/asm/kmap_types.h linux-2.6.31.4/arch/powerpc/include/asm/kmap_types.h
+--- linux-2.6.31.4/arch/powerpc/include/asm/kmap_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/include/asm/kmap_types.h 2009-10-11 15:29:40.624678541 -0400
@@ -26,6 +26,7 @@ enum km_type {
KM_SOFTIRQ1,
KM_PPC_SYNC_PAGE,
@@ -1657,9 +2140,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/kmap_types.h linux-2.6.30.8/a
KM_TYPE_NR
};
-diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/page_64.h linux-2.6.30.8/arch/powerpc/include/asm/page_64.h
---- linux-2.6.30.8/arch/powerpc/include/asm/page_64.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/include/asm/page_64.h 2009-07-30 09:48:09.902599231 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/include/asm/page_64.h linux-2.6.31.4/arch/powerpc/include/asm/page_64.h
+--- linux-2.6.31.4/arch/powerpc/include/asm/page_64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/include/asm/page_64.h 2009-10-11 15:29:40.625611745 -0400
@@ -170,15 +170,18 @@ do { \
* stack by default, so in the absense of a PT_GNU_STACK program header
* we turn execute permission off.
@@ -1679,11 +2162,11 @@ diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/page_64.h linux-2.6.30.8/arch
VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)
+#endif
- #include <asm-generic/page.h>
+ #include <asm-generic/getorder.h>
-diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/page.h linux-2.6.30.8/arch/powerpc/include/asm/page.h
---- linux-2.6.30.8/arch/powerpc/include/asm/page.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/include/asm/page.h 2009-07-30 09:48:09.902599231 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/include/asm/page.h linux-2.6.31.4/arch/powerpc/include/asm/page.h
+--- linux-2.6.31.4/arch/powerpc/include/asm/page.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/include/asm/page.h 2009-10-11 15:29:40.626417088 -0400
@@ -116,8 +116,9 @@ extern phys_addr_t kernstart_addr;
* and needs to be executable. This means the whole heap ends
* up being executable.
@@ -1696,32 +2179,223 @@ diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/page.h linux-2.6.30.8/arch/po
#define VM_DATA_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-diff -urNp linux-2.6.30.8/arch/powerpc/include/asm/uaccess.h linux-2.6.30.8/arch/powerpc/include/asm/uaccess.h
---- linux-2.6.30.8/arch/powerpc/include/asm/uaccess.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/include/asm/uaccess.h 2009-07-30 11:10:48.774534063 -0400
-@@ -334,6 +334,9 @@ static inline unsigned long copy_from_us
+diff -urNp linux-2.6.31.4/arch/powerpc/include/asm/pte-common.h linux-2.6.31.4/arch/powerpc/include/asm/pte-common.h
+--- linux-2.6.31.4/arch/powerpc/include/asm/pte-common.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/include/asm/pte-common.h 2009-10-11 15:29:40.627363132 -0400
+@@ -121,11 +121,11 @@ extern unsigned long bad_call_to_PMD_PAG
+ */
+ #define PAGE_NONE __pgprot(_PAGE_BASE)
+ #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)
+ #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 __P000 PAGE_NONE
+ #define __P001 PAGE_READONLY
+diff -urNp linux-2.6.31.4/arch/powerpc/include/asm/pte-hash32.h linux-2.6.31.4/arch/powerpc/include/asm/pte-hash32.h
+--- linux-2.6.31.4/arch/powerpc/include/asm/pte-hash32.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/include/asm/pte-hash32.h 2009-10-11 15:29:40.627363132 -0400
+@@ -21,6 +21,7 @@
+ #define _PAGE_FILE 0x004 /* when !present: nonlinear file mapping */
+ #define _PAGE_USER 0x004 /* usermode access allowed */
+ #define _PAGE_GUARDED 0x008 /* G: prohibit speculative access */
++#define _PAGE_HWEXEC _PAGE_GUARDED
+ #define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
+ #define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
+ #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
+diff -urNp linux-2.6.31.4/arch/powerpc/include/asm/reg.h linux-2.6.31.4/arch/powerpc/include/asm/reg.h
+--- linux-2.6.31.4/arch/powerpc/include/asm/reg.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/include/asm/reg.h 2009-10-11 15:29:40.627363132 -0400
+@@ -195,6 +195,7 @@
+ #define SPRN_DBCR 0x136 /* e300 Data Breakpoint Control Reg */
+ #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
+ #define DSISR_NOHPTE 0x40000000 /* no translation found */
++#define DSISR_GUARDED 0x10000000 /* fetch from guarded storage */
+ #define DSISR_PROTFAULT 0x08000000 /* protection fault */
+ #define DSISR_ISSTORE 0x02000000 /* access was a store */
+ #define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */
+diff -urNp linux-2.6.31.4/arch/powerpc/include/asm/uaccess.h linux-2.6.31.4/arch/powerpc/include/asm/uaccess.h
+--- linux-2.6.31.4/arch/powerpc/include/asm/uaccess.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/include/asm/uaccess.h 2009-10-11 15:29:40.627363132 -0400
+@@ -327,52 +327,6 @@ do { \
+ extern unsigned long __copy_tofrom_user(void __user *to,
+ const void __user *from, unsigned long size);
+
+-#ifndef __powerpc64__
+-
+-static inline unsigned long copy_from_user(void *to,
+- const void __user *from, unsigned long n)
+-{
+- unsigned long over;
+-
+- if (access_ok(VERIFY_READ, from, n))
+- return __copy_tofrom_user((__force void __user *)to, from, n);
+- if ((unsigned long)from < TASK_SIZE) {
+- over = (unsigned long)from + n - TASK_SIZE;
+- return __copy_tofrom_user((__force void __user *)to, from,
+- n - over) + over;
+- }
+- return n;
+-}
+-
+-static inline unsigned long copy_to_user(void __user *to,
+- const void *from, unsigned long n)
+-{
+- unsigned long over;
+-
+- if (access_ok(VERIFY_WRITE, to, n))
+- return __copy_tofrom_user(to, (__force void __user *)from, n);
+- if ((unsigned long)to < TASK_SIZE) {
+- over = (unsigned long)to + n - TASK_SIZE;
+- return __copy_tofrom_user(to, (__force void __user *)from,
+- n - over) + over;
+- }
+- return n;
+-}
+-
+-#else /* __powerpc64__ */
+-
+-#define __copy_in_user(to, from, size) \
+- __copy_tofrom_user((to), (from), (size))
+-
+-extern unsigned long copy_from_user(void *to, const void __user *from,
+- unsigned long n);
+-extern unsigned long copy_to_user(void __user *to, const void *from,
+- unsigned long n);
+-extern unsigned long copy_in_user(void __user *to, const void __user *from,
+- unsigned long n);
+-
+-#endif /* __powerpc64__ */
+-
+ static inline unsigned long __copy_from_user_inatomic(void *to,
+ const void __user *from, unsigned long n)
{
- unsigned long over;
+@@ -396,6 +350,9 @@ static inline unsigned long __copy_from_
+ if (ret == 0)
+ return 0;
+ }
++ if (!__builtin_constant_p(n))
++ check_object_size(to, n, false);
++
+ return __copy_tofrom_user((__force void __user *)to, from, n);
+ }
+
+@@ -422,6 +379,9 @@ static inline unsigned long __copy_to_us
+ if (ret == 0)
+ return 0;
+ }
++ if (!__builtin_constant_p(n))
++ check_object_size(from, n, true);
++
+ return __copy_tofrom_user(to, (__force const void __user *)from, n);
+ }
+
+@@ -439,6 +399,97 @@ static inline unsigned long __copy_to_us
+ return __copy_to_user_inatomic(to, from, size);
+ }
++#ifndef __powerpc64__
++
++static inline unsigned long __must_check copy_from_user(void *to,
++ const void __user *from, unsigned long n)
++{
++ unsigned long over;
++
+ if (((long)n < 0) || (n > INT_MAX))
+ return n;
+
- if (access_ok(VERIFY_READ, from, n))
- return __copy_tofrom_user((__force void __user *)to, from, n);
- if ((unsigned long)from < TASK_SIZE) {
-@@ -349,6 +352,9 @@ static inline unsigned long copy_to_user
- {
- unsigned long over;
-
++ if (access_ok(VERIFY_READ, from, n)) {
++ if (!__builtin_constant_p(n))
++ check_object_size(to, n, false);
++
++ return __copy_tofrom_user((__force void __user *)to, from, n);
++ }
++ if ((unsigned long)from < TASK_SIZE) {
++ over = (unsigned long)from + n - TASK_SIZE;
++ if (!__builtin_constant_p(n - over))
++ check_object_size(to, n - over, false);
++ return __copy_tofrom_user((__force void __user *)to, from,
++ n - over) + over;
++ }
++ return n;
++}
++
++static inline unsigned long __must_check copy_to_user(void __user *to,
++ const void *from, unsigned long n)
++{
++ unsigned long over;
++
+ if (((long)n < 0) || (n > INT_MAX))
+ return n;
+
- if (access_ok(VERIFY_WRITE, to, n))
- return __copy_tofrom_user(to, (__force void __user *)from, n);
- if ((unsigned long)to < TASK_SIZE) {
-diff -urNp linux-2.6.30.8/arch/powerpc/kernel/module_32.c linux-2.6.30.8/arch/powerpc/kernel/module_32.c
---- linux-2.6.30.8/arch/powerpc/kernel/module_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/kernel/module_32.c 2009-07-30 09:48:09.903567873 -0400
++ if (access_ok(VERIFY_WRITE, to, n)) {
++ if (!__builtin_constant_p(n))
++ check_object_size(from, n, true);
++ return __copy_tofrom_user(to, (__force void __user *)from, n);
++ }
++ if ((unsigned long)to < TASK_SIZE) {
++ over = (unsigned long)to + n - TASK_SIZE;
++ if (!__builtin_constant_p(n))
++ check_object_size(from, n - over, true);
++ return __copy_tofrom_user(to, (__force void __user *)from,
++ n - over) + over;
++ }
++ return n;
++}
++
++#else /* __powerpc64__ */
++
++#define __copy_in_user(to, from, size) \
++ __copy_tofrom_user((to), (from), (size))
++
++static inline unsigned long __must_check copy_from_user(void *to,
++ const void __user *from, unsigned long n)
++{
++ if (unlikely(((long)n < 0) || (n > INT_MAX)))
++ return n;
++
++ if (!__builtin_constant_p(n))
++ check_object_size(to, n, false);
++
++ if (likely(access_ok(VERIFY_READ, from, n)))
++ n = __copy_from_user(to, from, n);
++ else
++ memset(to, 0, n);
++
++ return n;
++}
++
++static inline unsigned long __must_check copy_to_user(void __user *to,
++ const void *from, unsigned long n)
++{
++ if (unlikely(((long)n < 0) || (n > INT_MAX)))
++ return n;
++
++ if (likely(access_ok(VERIFY_WRITE, to, n))) {
++ if (!__builtin_constant_p(n))
++ check_object_size(from, n, true);
++ n = __copy_to_user(to, from, n);
++ }
++
++ return n;
++}
++
++extern unsigned long copy_in_user(void __user *to, const void __user *from,
++ unsigned long n);
++
++#endif /* __powerpc64__ */
++
+ extern unsigned long __clear_user(void __user *addr, unsigned long size);
+
+ static inline unsigned long clear_user(void __user *addr, unsigned long size)
+diff -urNp linux-2.6.31.4/arch/powerpc/kernel/module_32.c linux-2.6.31.4/arch/powerpc/kernel/module_32.c
+--- linux-2.6.31.4/arch/powerpc/kernel/module_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/kernel/module_32.c 2009-10-11 15:29:40.628592547 -0400
@@ -162,7 +162,7 @@ int module_frob_arch_sections(Elf32_Ehdr
me->arch.core_plt_section = i;
}
@@ -1751,9 +2425,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/kernel/module_32.c linux-2.6.30.8/arch/po
/* Find this entry, or if that fails, the next avail. entry */
while (entry->jump[0]) {
-diff -urNp linux-2.6.30.8/arch/powerpc/kernel/process.c linux-2.6.30.8/arch/powerpc/kernel/process.c
---- linux-2.6.30.8/arch/powerpc/kernel/process.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/kernel/process.c 2009-07-30 09:48:09.903567873 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/kernel/process.c linux-2.6.31.4/arch/powerpc/kernel/process.c
+--- linux-2.6.31.4/arch/powerpc/kernel/process.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/kernel/process.c 2009-10-11 15:29:40.628592547 -0400
@@ -1147,36 +1147,3 @@ unsigned long arch_align_stack(unsigned
sp -= get_random_int() & ~PAGE_MASK;
return sp & ~0xf;
@@ -1791,9 +2465,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/kernel/process.c linux-2.6.30.8/arch/powe
-
- return ret;
-}
-diff -urNp linux-2.6.30.8/arch/powerpc/kernel/setup-common.c linux-2.6.30.8/arch/powerpc/kernel/setup-common.c
---- linux-2.6.30.8/arch/powerpc/kernel/setup-common.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/kernel/setup-common.c 2009-07-30 09:48:09.903567873 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/kernel/setup-common.c linux-2.6.31.4/arch/powerpc/kernel/setup-common.c
+--- linux-2.6.31.4/arch/powerpc/kernel/setup-common.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/kernel/setup-common.c 2009-10-11 15:29:40.628592547 -0400
@@ -328,7 +328,7 @@ static void c_stop(struct seq_file *m, v
{
}
@@ -1803,9 +2477,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/kernel/setup-common.c linux-2.6.30.8/arch
.start =c_start,
.next = c_next,
.stop = c_stop,
-diff -urNp linux-2.6.30.8/arch/powerpc/kernel/signal_32.c linux-2.6.30.8/arch/powerpc/kernel/signal_32.c
---- linux-2.6.30.8/arch/powerpc/kernel/signal_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/kernel/signal_32.c 2009-07-30 09:48:09.903567873 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/kernel/signal_32.c linux-2.6.31.4/arch/powerpc/kernel/signal_32.c
+--- linux-2.6.31.4/arch/powerpc/kernel/signal_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/kernel/signal_32.c 2009-10-11 15:29:40.629482564 -0400
@@ -857,7 +857,7 @@ int handle_rt_signal32(unsigned long sig
/* Save user registers on the stack */
frame = &rt_sf->uc.uc_mcontext;
@@ -1815,9 +2489,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/kernel/signal_32.c linux-2.6.30.8/arch/po
if (save_user_regs(regs, frame, 0, 1))
goto badframe;
regs->link = current->mm->context.vdso_base + vdso32_rt_sigtramp;
-diff -urNp linux-2.6.30.8/arch/powerpc/kernel/signal_64.c linux-2.6.30.8/arch/powerpc/kernel/signal_64.c
---- linux-2.6.30.8/arch/powerpc/kernel/signal_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/kernel/signal_64.c 2009-07-30 09:48:09.905069777 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/kernel/signal_64.c linux-2.6.31.4/arch/powerpc/kernel/signal_64.c
+--- linux-2.6.31.4/arch/powerpc/kernel/signal_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/kernel/signal_64.c 2009-10-11 15:29:40.629482564 -0400
@@ -429,7 +429,7 @@ int handle_rt_signal64(int signr, struct
current->thread.fpscr.val = 0;
@@ -1827,10 +2501,34 @@ diff -urNp linux-2.6.30.8/arch/powerpc/kernel/signal_64.c linux-2.6.30.8/arch/po
regs->link = current->mm->context.vdso_base + vdso64_rt_sigtramp;
} else {
err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
-diff -urNp linux-2.6.30.8/arch/powerpc/kernel/vdso.c linux-2.6.30.8/arch/powerpc/kernel/vdso.c
---- linux-2.6.30.8/arch/powerpc/kernel/vdso.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/kernel/vdso.c 2009-07-30 09:48:09.905069777 -0400
-@@ -211,7 +211,7 @@ int arch_setup_additional_pages(struct l
+diff -urNp linux-2.6.31.4/arch/powerpc/kernel/sys_ppc32.c linux-2.6.31.4/arch/powerpc/kernel/sys_ppc32.c
+--- linux-2.6.31.4/arch/powerpc/kernel/sys_ppc32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/kernel/sys_ppc32.c 2009-10-11 15:29:40.629482564 -0400
+@@ -552,10 +552,10 @@ asmlinkage long compat_sys_sysctl(struct
+ if (oldlenp) {
+ if (!error) {
+ if (get_user(oldlen, oldlenp) ||
+- put_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)))
++ put_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)) ||
++ copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)))
+ error = -EFAULT;
+ }
+- copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused));
+ }
+ return error;
+ }
+diff -urNp linux-2.6.31.4/arch/powerpc/kernel/vdso.c linux-2.6.31.4/arch/powerpc/kernel/vdso.c
+--- linux-2.6.31.4/arch/powerpc/kernel/vdso.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/kernel/vdso.c 2009-10-11 15:29:40.630363096 -0400
+@@ -35,6 +35,7 @@
+ #include <asm/firmware.h>
+ #include <asm/vdso.h>
+ #include <asm/vdso_datapage.h>
++#include <asm/mman.h>
+
+ #include "setup.h"
+
+@@ -211,7 +212,7 @@ int arch_setup_additional_pages(struct l
vdso_base = VDSO32_MBASE;
#endif
@@ -1839,7 +2537,7 @@ diff -urNp linux-2.6.30.8/arch/powerpc/kernel/vdso.c linux-2.6.30.8/arch/powerpc
/* vDSO has a problem and was disabled, just don't "enable" it for the
* process
-@@ -228,7 +228,7 @@ int arch_setup_additional_pages(struct l
+@@ -228,7 +229,7 @@ int arch_setup_additional_pages(struct l
*/
down_write(&mm->mmap_sem);
vdso_base = get_unmapped_area(NULL, vdso_base,
@@ -1848,9 +2546,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/kernel/vdso.c linux-2.6.30.8/arch/powerpc
if (IS_ERR_VALUE(vdso_base)) {
rc = vdso_base;
goto fail_mmapsem;
-diff -urNp linux-2.6.30.8/arch/powerpc/kvm/timing.c linux-2.6.30.8/arch/powerpc/kvm/timing.c
---- linux-2.6.30.8/arch/powerpc/kvm/timing.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/kvm/timing.c 2009-07-30 09:48:09.905069777 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/kvm/timing.c linux-2.6.31.4/arch/powerpc/kvm/timing.c
+--- linux-2.6.31.4/arch/powerpc/kvm/timing.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/kvm/timing.c 2009-10-11 15:29:40.651325654 -0400
@@ -201,7 +201,7 @@ static int kvmppc_exit_timing_open(struc
return single_open(file, kvmppc_exit_timing_show, inode->i_private);
}
@@ -1860,36 +2558,47 @@ diff -urNp linux-2.6.30.8/arch/powerpc/kvm/timing.c linux-2.6.30.8/arch/powerpc/
.owner = THIS_MODULE,
.open = kvmppc_exit_timing_open,
.read = seq_read,
-diff -urNp linux-2.6.30.8/arch/powerpc/lib/usercopy_64.c linux-2.6.30.8/arch/powerpc/lib/usercopy_64.c
---- linux-2.6.30.8/arch/powerpc/lib/usercopy_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/lib/usercopy_64.c 2009-07-30 11:10:48.798471204 -0400
-@@ -11,6 +11,9 @@
-
- unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
- {
-+ if (unlikely(((long)n < 0) || (n > INT_MAX)))
-+ return n;
-+
- if (likely(access_ok(VERIFY_READ, from, n)))
- n = __copy_from_user(to, from, n);
- else
-@@ -20,6 +23,9 @@ unsigned long copy_from_user(void *to, c
+diff -urNp linux-2.6.31.4/arch/powerpc/lib/usercopy_64.c linux-2.6.31.4/arch/powerpc/lib/usercopy_64.c
+--- linux-2.6.31.4/arch/powerpc/lib/usercopy_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/lib/usercopy_64.c 2009-10-11 15:29:40.651325654 -0400
+@@ -9,22 +9,6 @@
+ #include <linux/module.h>
+ #include <asm/uaccess.h>
- unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
+-unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
+-{
+- if (likely(access_ok(VERIFY_READ, from, n)))
+- n = __copy_from_user(to, from, n);
+- else
+- memset(to, 0, n);
+- return n;
+-}
+-
+-unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
+-{
+- if (likely(access_ok(VERIFY_WRITE, to, n)))
+- n = __copy_to_user(to, from, n);
+- return n;
+-}
+-
+ unsigned long copy_in_user(void __user *to, const void __user *from,
+ unsigned long n)
{
-+ if (unlikely(((long)n < 0) || (n > INT_MAX)))
-+ return n;
-+
- if (likely(access_ok(VERIFY_WRITE, to, n)))
- n = __copy_to_user(to, from, n);
+@@ -35,7 +19,5 @@ unsigned long copy_in_user(void __user *
return n;
-diff -urNp linux-2.6.30.8/arch/powerpc/mm/fault.c linux-2.6.30.8/arch/powerpc/mm/fault.c
---- linux-2.6.30.8/arch/powerpc/mm/fault.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/mm/fault.c 2009-07-30 09:48:09.905534132 -0400
-@@ -29,6 +29,10 @@
- #include <linux/module.h>
+ }
+
+-EXPORT_SYMBOL(copy_from_user);
+-EXPORT_SYMBOL(copy_to_user);
+ EXPORT_SYMBOL(copy_in_user);
+
+diff -urNp linux-2.6.31.4/arch/powerpc/mm/fault.c linux-2.6.31.4/arch/powerpc/mm/fault.c
+--- linux-2.6.31.4/arch/powerpc/mm/fault.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/mm/fault.c 2009-10-11 15:29:40.663258967 -0400
+@@ -30,6 +30,10 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
+ #include <linux/perf_counter.h>
+#include <linux/slab.h>
+#include <linux/pagemap.h>
+#include <linux/compiler.h>
@@ -1897,348 +2606,26 @@ diff -urNp linux-2.6.30.8/arch/powerpc/mm/fault.c linux-2.6.30.8/arch/powerpc/mm
#include <asm/firmware.h>
#include <asm/page.h>
-@@ -63,6 +67,363 @@ static inline int notify_page_fault(stru
+@@ -40,6 +44,7 @@
+ #include <asm/uaccess.h>
+ #include <asm/tlbflush.h>
+ #include <asm/siginfo.h>
++#include <asm/ptrace.h>
+
+
+ #ifdef CONFIG_KPROBES
+@@ -64,6 +69,33 @@ static inline int notify_page_fault(stru
}
#endif
-+#ifdef CONFIG_PAX_EMUSIGRT
-+void pax_syscall_close(struct vm_area_struct *vma)
-+{
-+ vma->vm_mm->call_syscall = 0UL;
-+}
-+
-+static int pax_syscall_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
-+{
-+ unsigned int *kaddr;
-+
-+ vmf->page = alloc_page(GFP_HIGHUSER);
-+ if (!vmf->page)
-+ return VM_FAULT_OOM;
-+
-+ kaddr = kmap(vmf->page);
-+ memset(kaddr, 0, PAGE_SIZE);
-+ kaddr[0] = 0x44000002U; /* sc */
-+ __flush_dcache_icache(kaddr);
-+ kunmap(vmf->page);
-+ return VM_FAULT_MAJOR;
-+}
-+
-+static const struct vm_operations_struct pax_vm_ops = {
-+ .close = pax_syscall_close,
-+ .fault = pax_syscall_fault
-+};
-+
-+static int pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
-+{
-+ int ret;
-+
-+ vma->vm_mm = current->mm;
-+ vma->vm_start = addr;
-+ vma->vm_end = addr + PAGE_SIZE;
-+ vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYEXEC;
-+ vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
-+ vma->vm_ops = &pax_vm_ops;
-+
-+ ret = insert_vm_struct(current->mm, vma);
-+ if (ret)
-+ return ret;
-+
-+ ++current->mm->total_vm;
-+ return 0;
-+}
-+#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 sigreturn trampoline was detected
-+ * 6 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_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] = 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_zalloc(vm_area_cachep, GFP_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;
-+ }
-+
-+ if (pax_insert_vma(vma, call_syscall)) {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, vma);
-+ return 1;
-+ }
-+
-+ current->mm->call_syscall = call_syscall;
-+ up_write(&current->mm->mmap_sem);
-+
-+emulate:
-+ regs->gpr[PT_R0] = __NR_sigreturn;
-+ regs->nip = call_syscall;
-+ return 5;
-+ }
-+ } 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_zalloc(vm_area_cachep, GFP_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;
-+ }
-+
-+ if (pax_insert_vma(vma, call_syscall)) {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, vma);
-+ return 1;
-+ }
-+
-+ 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 6;
-+ }
-+ } while (0);
-+#endif
-+
+ return 1;
+}
+
@@ -2261,7 +2648,7 @@ diff -urNp linux-2.6.30.8/arch/powerpc/mm/fault.c linux-2.6.30.8/arch/powerpc/mm
/*
* Check whether the instruction at regs->nip is a store using
* an update addressing form which will update r1.
-@@ -133,7 +494,7 @@ int __kprobes do_page_fault(struct pt_re
+@@ -134,7 +166,7 @@ int __kprobes do_page_fault(struct pt_re
* indicate errors in DSISR but can validly be set in SRR1.
*/
if (trap == 0x400)
@@ -2270,33 +2657,37 @@ diff -urNp linux-2.6.30.8/arch/powerpc/mm/fault.c linux-2.6.30.8/arch/powerpc/mm
else
is_write = error_code & DSISR_ISSTORE;
#else
-@@ -327,6 +688,37 @@ bad_area:
+@@ -250,7 +282,7 @@ good_area:
+ * "undefined". Of those that can be set, this is the only
+ * one which seems bad.
+ */
+- if (error_code & 0x10000000)
++ if (error_code & DSISR_GUARDED)
+ /* Guarded storage error. */
+ goto bad_area;
+ #endif /* CONFIG_8xx */
+@@ -265,7 +297,7 @@ good_area:
+ * processors use the same I/D cache coherency mechanism
+ * as embedded.
+ */
+- if (error_code & DSISR_PROTFAULT)
++ if (error_code & (DSISR_PROTFAULT | DSISR_GUARDED))
+ goto bad_area;
+ #endif /* CONFIG_PPC_STD_MMU */
+
+@@ -335,6 +367,23 @@ bad_area:
bad_area_nosemaphore:
/* User mode accesses cause a SIGSEGV */
if (user_mode(regs)) {
+
+#ifdef CONFIG_PAX_PAGEEXEC
+ if (mm->pax_flags & MF_PAX_PAGEEXEC) {
-+#ifdef CONFIG_PPC64
-+ if (is_exec && (error_code & DSISR_PROTFAULT)) {
++#ifdef CONFIG_PPC_STD_MMU
++ if (is_exec && (error_code & (DSISR_PROTFAULT | DSISR_GUARDED))) {
+#else
+ if (is_exec && regs->nip == address) {
+#endif
+ switch (pax_handle_fetch_fault(regs)) {
-+
-+#ifdef CONFIG_PAX_EMUPLT
-+ case 2:
-+ case 3:
-+ case 4:
-+ return 0;
-+#endif
-+
-+#ifdef CONFIG_PAX_EMUSIGRT
-+ case 5:
-+ case 6:
-+ return 0;
-+#endif
-+
+ }
+
+ pax_report_fault(regs, (void *)regs->nip, (void *)regs->gpr[PT_R1]);
@@ -2308,9 +2699,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/mm/fault.c linux-2.6.30.8/arch/powerpc/mm
_exception(SIGSEGV, regs, code, address);
return 0;
}
-diff -urNp linux-2.6.30.8/arch/powerpc/mm/mmap_64.c linux-2.6.30.8/arch/powerpc/mm/mmap_64.c
---- linux-2.6.30.8/arch/powerpc/mm/mmap_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/mm/mmap_64.c 2009-07-30 09:48:09.905534132 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/mm/mmap_64.c linux-2.6.31.4/arch/powerpc/mm/mmap_64.c
+--- linux-2.6.31.4/arch/powerpc/mm/mmap_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/mm/mmap_64.c 2009-10-11 15:29:40.707202687 -0400
@@ -99,10 +99,22 @@ void arch_pick_mmap_layout(struct mm_str
*/
if (mmap_is_legacy()) {
@@ -2334,9 +2725,24 @@ diff -urNp linux-2.6.30.8/arch/powerpc/mm/mmap_64.c linux-2.6.30.8/arch/powerpc/
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.30.8/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.30.8/arch/powerpc/platforms/cell/spufs/file.c
---- linux-2.6.30.8/arch/powerpc/platforms/cell/spufs/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/platforms/cell/spufs/file.c 2009-07-30 09:48:09.906622773 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/mm/slice.c linux-2.6.31.4/arch/powerpc/mm/slice.c
+--- linux-2.6.31.4/arch/powerpc/mm/slice.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/mm/slice.c 2009-10-11 15:29:40.708190399 -0400
+@@ -426,6 +426,11 @@ unsigned long slice_get_unmapped_area(un
+ if (fixed && addr > (mm->task_size - len))
+ return -EINVAL;
+
++#ifdef CONFIG_PAX_RANDMMAP
++ if (!fixed && (mm->pax_flags & MF_PAX_RANDMMAP))
++ addr = 0;
++#endif
++
+ /* If hint, make sure it matches our alignment restrictions */
+ if (!fixed && addr) {
+ addr = _ALIGN_UP(addr, 1ul << pshift);
+diff -urNp linux-2.6.31.4/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.31.4/arch/powerpc/platforms/cell/spufs/file.c
+--- linux-2.6.31.4/arch/powerpc/platforms/cell/spufs/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/platforms/cell/spufs/file.c 2009-10-11 15:29:40.708190399 -0400
@@ -147,7 +147,7 @@ static int __fops ## _open(struct inode
__simple_attr_check_format(__fmt, 0ull); \
return spufs_attr_open(inode, file, __get, __set, __fmt); \
@@ -2409,9 +2815,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.30.
.fault = spufs_mfc_mmap_fault,
};
-diff -urNp linux-2.6.30.8/arch/powerpc/platforms/pseries/dtl.c linux-2.6.30.8/arch/powerpc/platforms/pseries/dtl.c
---- linux-2.6.30.8/arch/powerpc/platforms/pseries/dtl.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/platforms/pseries/dtl.c 2009-07-30 12:06:52.084821916 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/platforms/pseries/dtl.c linux-2.6.31.4/arch/powerpc/platforms/pseries/dtl.c
+--- linux-2.6.31.4/arch/powerpc/platforms/pseries/dtl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/platforms/pseries/dtl.c 2009-10-11 15:29:40.748219183 -0400
@@ -209,7 +209,7 @@ static ssize_t dtl_file_read(struct file
return n_read * sizeof(struct dtl_entry);
}
@@ -2421,9 +2827,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/platforms/pseries/dtl.c linux-2.6.30.8/ar
.open = dtl_file_open,
.release = dtl_file_release,
.read = dtl_file_read,
-diff -urNp linux-2.6.30.8/arch/powerpc/platforms/pseries/hvCall_inst.c linux-2.6.30.8/arch/powerpc/platforms/pseries/hvCall_inst.c
---- linux-2.6.30.8/arch/powerpc/platforms/pseries/hvCall_inst.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/powerpc/platforms/pseries/hvCall_inst.c 2009-07-30 09:48:09.906622773 -0400
+diff -urNp linux-2.6.31.4/arch/powerpc/platforms/pseries/hvCall_inst.c linux-2.6.31.4/arch/powerpc/platforms/pseries/hvCall_inst.c
+--- linux-2.6.31.4/arch/powerpc/platforms/pseries/hvCall_inst.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/powerpc/platforms/pseries/hvCall_inst.c 2009-10-11 15:29:40.748219183 -0400
@@ -71,7 +71,7 @@ static int hc_show(struct seq_file *m, v
return 0;
}
@@ -2433,9 +2839,9 @@ diff -urNp linux-2.6.30.8/arch/powerpc/platforms/pseries/hvCall_inst.c linux-2.6
.start = hc_start,
.next = hc_next,
.stop = hc_stop,
-diff -urNp linux-2.6.30.8/arch/s390/hypfs/inode.c linux-2.6.30.8/arch/s390/hypfs/inode.c
---- linux-2.6.30.8/arch/s390/hypfs/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/s390/hypfs/inode.c 2009-07-30 09:48:09.907613298 -0400
+diff -urNp linux-2.6.31.4/arch/s390/hypfs/inode.c linux-2.6.31.4/arch/s390/hypfs/inode.c
+--- linux-2.6.31.4/arch/s390/hypfs/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/s390/hypfs/inode.c 2009-10-11 15:29:40.748219183 -0400
@@ -41,7 +41,7 @@ struct hypfs_sb_info {
static const struct file_operations hypfs_file_ops;
@@ -2454,46 +2860,56 @@ diff -urNp linux-2.6.30.8/arch/s390/hypfs/inode.c linux-2.6.30.8/arch/s390/hypfs
.statfs = simple_statfs,
.drop_inode = hypfs_drop_inode,
.show_options = hypfs_show_options,
-diff -urNp linux-2.6.30.8/arch/s390/include/asm/atomic.h linux-2.6.30.8/arch/s390/include/asm/atomic.h
---- linux-2.6.30.8/arch/s390/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/s390/include/asm/atomic.h 2009-07-30 09:48:09.908552392 -0400
-@@ -82,8 +82,10 @@ static __inline__ int atomic_add_return(
+diff -urNp linux-2.6.31.4/arch/s390/include/asm/atomic.h linux-2.6.31.4/arch/s390/include/asm/atomic.h
+--- linux-2.6.31.4/arch/s390/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/s390/include/asm/atomic.h 2009-10-11 15:29:40.749192014 -0400
+@@ -71,19 +71,31 @@ static inline int atomic_read(const atom
+ return v->counter;
+ }
+
++static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
++{
++ return atomic_read((const atomic_t *)v);
++}
++
+ static inline void atomic_set(atomic_t *v, int i)
+ {
+ v->counter = i;
+ barrier();
+ }
+
++static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i)
++{
++ atomic_set((atomic_t *)v, i);
++}
++
+ static __inline__ int atomic_add_return(int i, atomic_t * v)
+ {
return __CS_LOOP(v, i, "ar");
}
#define atomic_add(_i, _v) atomic_add_return(_i, _v)
-+#define atomic_add_unchecked(_i, _v) atomic_add((_i), (_v))
++#define atomic_add_unchecked(_i, _v) atomic_add((_i), (atomic_t *)(_v))
#define atomic_add_negative(_i, _v) (atomic_add_return(_i, _v) < 0)
#define atomic_inc(_v) atomic_add_return(1, _v)
-+#define atomic_inc_unchecked(_v) atomic_inc(_v)
++#define atomic_inc_unchecked(_v) atomic_inc((atomic_t *)(_v))
#define atomic_inc_return(_v) atomic_add_return(1, _v)
#define atomic_inc_and_test(_v) (atomic_add_return(1, _v) == 0)
-@@ -92,6 +94,7 @@ static __inline__ int atomic_sub_return(
+@@ -92,6 +104,7 @@ static __inline__ int atomic_sub_return(
return __CS_LOOP(v, i, "sr");
}
#define atomic_sub(_i, _v) atomic_sub_return(_i, _v)
-+#define atomic_sub_unchecked(_i, _v) atomic_sub((_i), (_v))
++#define atomic_sub_unchecked(_i, _v) atomic_sub((_i), (atomic_t *)(_v))
#define atomic_sub_and_test(_i, _v) (atomic_sub_return(_i, _v) == 0)
#define atomic_dec(_v) atomic_sub_return(1, _v)
#define atomic_dec_return(_v) atomic_sub_return(1, _v)
-diff -urNp linux-2.6.30.8/arch/s390/include/asm/kmap_types.h linux-2.6.30.8/arch/s390/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/s390/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/s390/include/asm/kmap_types.h 2009-07-30 09:48:09.908552392 -0400
-@@ -16,6 +16,7 @@ enum km_type {
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
-+ KM_CLEARPAGE,
- KM_TYPE_NR
- };
-
-diff -urNp linux-2.6.30.8/arch/s390/include/asm/uaccess.h linux-2.6.30.8/arch/s390/include/asm/uaccess.h
---- linux-2.6.30.8/arch/s390/include/asm/uaccess.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/s390/include/asm/uaccess.h 2009-07-30 09:48:09.908552392 -0400
+diff -urNp linux-2.6.31.4/arch/s390/include/asm/uaccess.h linux-2.6.31.4/arch/s390/include/asm/uaccess.h
+--- linux-2.6.31.4/arch/s390/include/asm/uaccess.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/s390/include/asm/uaccess.h 2009-10-11 15:29:40.749192014 -0400
@@ -232,6 +232,10 @@ static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long n)
{
- might_sleep();
+ might_fault();
+
+ if ((long)n < 0)
+ return n;
@@ -2514,7 +2930,7 @@ diff -urNp linux-2.6.30.8/arch/s390/include/asm/uaccess.h linux-2.6.30.8/arch/s3
@@ -283,6 +290,10 @@ static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long n)
{
- might_sleep();
+ might_fault();
+
+ if ((long)n < 0)
+ return n;
@@ -2522,10 +2938,10 @@ diff -urNp linux-2.6.30.8/arch/s390/include/asm/uaccess.h linux-2.6.30.8/arch/s3
if (access_ok(VERIFY_READ, from, n))
n = __copy_from_user(to, from, n);
else
-diff -urNp linux-2.6.30.8/arch/s390/kernel/module.c linux-2.6.30.8/arch/s390/kernel/module.c
---- linux-2.6.30.8/arch/s390/kernel/module.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/s390/kernel/module.c 2009-07-30 09:48:09.908552392 -0400
-@@ -166,11 +166,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr,
+diff -urNp linux-2.6.31.4/arch/s390/kernel/module.c linux-2.6.31.4/arch/s390/kernel/module.c
+--- linux-2.6.31.4/arch/s390/kernel/module.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/s390/kernel/module.c 2009-10-11 15:29:40.750174954 -0400
+@@ -164,11 +164,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr,
/* Increase core size by size of got & plt and set start
offsets for got and plt. */
@@ -2542,7 +2958,7 @@ diff -urNp linux-2.6.30.8/arch/s390/kernel/module.c linux-2.6.30.8/arch/s390/ker
return 0;
}
-@@ -256,7 +256,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -254,7 +254,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
if (info->got_initialized == 0) {
Elf_Addr *gotent;
@@ -2551,7 +2967,7 @@ diff -urNp linux-2.6.30.8/arch/s390/kernel/module.c linux-2.6.30.8/arch/s390/ker
info->got_offset;
*gotent = val;
info->got_initialized = 1;
-@@ -280,7 +280,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -278,7 +278,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
else if (r_type == R_390_GOTENT ||
r_type == R_390_GOTPLTENT)
*(unsigned int *) loc =
@@ -2560,7 +2976,7 @@ diff -urNp linux-2.6.30.8/arch/s390/kernel/module.c linux-2.6.30.8/arch/s390/ker
else if (r_type == R_390_GOT64 ||
r_type == R_390_GOTPLT64)
*(unsigned long *) loc = val;
-@@ -294,7 +294,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -292,7 +292,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
case R_390_PLTOFF64: /* 16 bit offset from GOT to PLT. */
if (info->plt_initialized == 0) {
unsigned int *ip;
@@ -2569,7 +2985,7 @@ diff -urNp linux-2.6.30.8/arch/s390/kernel/module.c linux-2.6.30.8/arch/s390/ker
info->plt_offset;
#ifndef CONFIG_64BIT
ip[0] = 0x0d105810; /* basr 1,0; l 1,6(1); br 1 */
-@@ -319,7 +319,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -317,7 +317,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
val - loc + 0xffffUL < 0x1ffffeUL) ||
(r_type == R_390_PLT32DBL &&
val - loc + 0xffffffffULL < 0x1fffffffeULL)))
@@ -2578,7 +2994,7 @@ diff -urNp linux-2.6.30.8/arch/s390/kernel/module.c linux-2.6.30.8/arch/s390/ker
me->arch.plt_offset +
info->plt_offset;
val += rela->r_addend - loc;
-@@ -341,7 +341,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -339,7 +339,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
case R_390_GOTOFF32: /* 32 bit offset to GOT. */
case R_390_GOTOFF64: /* 64 bit offset to GOT. */
val = val + rela->r_addend -
@@ -2587,7 +3003,7 @@ diff -urNp linux-2.6.30.8/arch/s390/kernel/module.c linux-2.6.30.8/arch/s390/ker
if (r_type == R_390_GOTOFF16)
*(unsigned short *) loc = val;
else if (r_type == R_390_GOTOFF32)
-@@ -351,7 +351,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -349,7 +349,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
break;
case R_390_GOTPC: /* 32 bit PC relative offset to GOT. */
case R_390_GOTPCDBL: /* 32 bit PC rel. off. to GOT shifted by 1. */
@@ -2596,72 +3012,149 @@ diff -urNp linux-2.6.30.8/arch/s390/kernel/module.c linux-2.6.30.8/arch/s390/ker
rela->r_addend - loc;
if (r_type == R_390_GOTPC)
*(unsigned int *) loc = val;
-diff -urNp linux-2.6.30.8/arch/sh/include/asm/atomic.h linux-2.6.30.8/arch/sh/include/asm/atomic.h
---- linux-2.6.30.8/arch/sh/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sh/include/asm/atomic.h 2009-07-30 09:48:09.909647067 -0400
-@@ -43,6 +43,9 @@
+diff -urNp linux-2.6.31.4/arch/sh/include/asm/atomic.h linux-2.6.31.4/arch/sh/include/asm/atomic.h
+--- linux-2.6.31.4/arch/sh/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sh/include/asm/atomic.h 2009-10-11 15:29:40.750174954 -0400
+@@ -14,7 +14,9 @@
+ #define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
+
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+ #define atomic_set(v,i) ((v)->counter = (i))
++#define atomic_set_unchecked(v,i) ((v)->counter = (i))
+
+ #if defined(CONFIG_GUSA_RB)
+ #include <asm/atomic-grb.h>
+@@ -43,6 +45,9 @@
#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
#define atomic_inc(v) atomic_add(1,(v))
-+#define atomic_inc_unchecked(v) atomic_inc(v)
-+#define atomic_add_unchecked(i,v) atomic_add((i),(v))
-+#define atomic_sub_unchecked(i,v) atomic_sub((i),(v))
++#define atomic_inc_unchecked(v) atomic_inc((atomic_t *)(v))
++#define atomic_add_unchecked(i,v) atomic_add((i),(atomic_t *)(v))
++#define atomic_sub_unchecked(i,v) atomic_sub((i),(atomic_t *)(v))
#define atomic_dec(v) atomic_sub(1,(v))
- #ifndef CONFIG_GUSA_RB
-diff -urNp linux-2.6.30.8/arch/sh/include/asm/kmap_types.h linux-2.6.30.8/arch/sh/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/sh/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sh/include/asm/kmap_types.h 2009-07-30 09:48:09.909647067 -0400
-@@ -24,7 +24,8 @@ D(9) KM_IRQ0,
- D(10) KM_IRQ1,
- D(11) KM_SOFTIRQ0,
- D(12) KM_SOFTIRQ1,
--D(13) KM_TYPE_NR
-+D(13) KM_CLEARPAGE,
-+D(14) KM_TYPE_NR
- };
+ #if !defined(CONFIG_GUSA_RB) && !defined(CONFIG_CPU_SH4A)
+diff -urNp linux-2.6.31.4/arch/sparc/include/asm/atomic_32.h linux-2.6.31.4/arch/sparc/include/asm/atomic_32.h
+--- linux-2.6.31.4/arch/sparc/include/asm/atomic_32.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/include/asm/atomic_32.h 2009-10-11 15:29:40.750174954 -0400
+@@ -24,12 +24,17 @@ extern int atomic_cmpxchg(atomic_t *, in
+ #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
+ extern int atomic_add_unless(atomic_t *, int, int);
+ extern void atomic_set(atomic_t *, int);
++extern void atomic_set_unchecked(atomic_unchecked_t *, int);
- #undef D
-diff -urNp linux-2.6.30.8/arch/sparc/include/asm/atomic_32.h linux-2.6.30.8/arch/sparc/include/asm/atomic_32.h
---- linux-2.6.30.8/arch/sparc/include/asm/atomic_32.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/include/asm/atomic_32.h 2009-07-30 09:48:09.910522181 -0400
-@@ -28,8 +28,11 @@ extern void atomic_set(atomic_t *, int);
#define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
#define atomic_add(i, v) ((void)__atomic_add_return( (int)(i), (v)))
-+#define atomic_add_unchecked(i, v) atomic_add((i), (v))
++#define atomic_add_unchecked(i, v) atomic_add((i), (atomic_t *)(v))
#define atomic_sub(i, v) ((void)__atomic_add_return(-(int)(i), (v)))
-+#define atomic_sub_unchecked(i, v) atomic_sub((i), (v))
++#define atomic_sub_unchecked(i, v) atomic_sub((i), (atomic_t *)(v))
#define atomic_inc(v) ((void)__atomic_add_return( 1, (v)))
-+#define atomic_inc_unchecked(v) atomic_inc(v)
++#define atomic_inc_unchecked(v) atomic_inc((atomic_t *)(v))
#define atomic_dec(v) ((void)__atomic_add_return( -1, (v)))
#define atomic_add_return(i, v) (__atomic_add_return( (int)(i), (v)))
-diff -urNp linux-2.6.30.8/arch/sparc/include/asm/atomic_64.h linux-2.6.30.8/arch/sparc/include/asm/atomic_64.h
---- linux-2.6.30.8/arch/sparc/include/asm/atomic_64.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/include/asm/atomic_64.h 2009-07-30 09:48:09.910522181 -0400
-@@ -20,8 +20,10 @@
+diff -urNp linux-2.6.31.4/arch/sparc/include/asm/atomic_64.h linux-2.6.31.4/arch/sparc/include/asm/atomic_64.h
+--- linux-2.6.31.4/arch/sparc/include/asm/atomic_64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/include/asm/atomic_64.h 2009-10-11 15:29:40.750174954 -0400
+@@ -14,14 +14,18 @@
+ #define ATOMIC64_INIT(i) { (i) }
+
+ #define atomic_read(v) ((v)->counter)
++#define atomic_read_unchecked(v) ((v)->counter)
+ #define atomic64_read(v) ((v)->counter)
+
+ #define atomic_set(v, i) (((v)->counter) = i)
++#define atomic_set_unchecked(v, i) (((v)->counter) = i)
#define atomic64_set(v, i) (((v)->counter) = i)
extern void atomic_add(int, atomic_t *);
-+#define atomic_add_unchecked(i, v) atomic_add((i), (v))
++extern void atomic_add_unchecked(int, atomic_unchecked_t *);
extern void atomic64_add(int, atomic64_t *);
extern void atomic_sub(int, atomic_t *);
-+#define atomic_sub_unchecked(i, v) atomic_sub((i), (v))
++extern void atomic_sub_unchecked(int, atomic_unchecked_t *);
extern void atomic64_sub(int, atomic64_t *);
extern int atomic_add_ret(int, atomic_t *);
-@@ -59,6 +61,7 @@ extern int atomic64_sub_ret(int, atomic6
+@@ -59,6 +63,7 @@ extern int atomic64_sub_ret(int, atomic6
#define atomic64_dec_and_test(v) (atomic64_sub_ret(1, v) == 0)
#define atomic_inc(v) atomic_add(1, v)
-+#define atomic_inc_unchecked(v) atomic_inc(v)
++#define atomic_inc_unchecked(v) atomic_add_unchecked(1, v)
#define atomic64_inc(v) atomic64_add(1, v)
#define atomic_dec(v) atomic_sub(1, v)
-diff -urNp linux-2.6.30.8/arch/sparc/include/asm/elf_32.h linux-2.6.30.8/arch/sparc/include/asm/elf_32.h
---- linux-2.6.30.8/arch/sparc/include/asm/elf_32.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/include/asm/elf_32.h 2009-07-30 09:48:09.910522181 -0400
+@@ -72,17 +77,28 @@ extern int atomic64_sub_ret(int, atomic6
+
+ static inline int atomic_add_unless(atomic_t *v, int a, int u)
+ {
+- int c, old;
++ int c, old, new;
+ c = atomic_read(v);
+ for (;;) {
+- if (unlikely(c == (u)))
++ if (unlikely(c == u))
+ break;
+- old = atomic_cmpxchg((v), c, c + (a));
++
++ asm volatile("addcc %2, %0, %0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "tvs %%icc, 6\n"
++#endif
++
++ : "=r" (new)
++ : "0" (c), "ir" (a)
++ : "cc");
++
++ old = atomic_cmpxchg(v, c, new);
+ if (likely(old == c))
+ break;
+ c = old;
+ }
+- return c != (u);
++ return c != u;
+ }
+
+ #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
+@@ -93,17 +109,28 @@ static inline int atomic_add_unless(atom
+
+ static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
+ {
+- long c, old;
++ long c, old, new;
+ c = atomic64_read(v);
+ for (;;) {
+- if (unlikely(c == (u)))
++ if (unlikely(c == u))
+ break;
+- old = atomic64_cmpxchg((v), c, c + (a));
++
++ asm volatile("addcc %2, %0, %0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "tvs %%xcc, 6\n"
++#endif
++
++ : "=r" (new)
++ : "0" (c), "ir" (a)
++ : "cc");
++
++ old = atomic64_cmpxchg(v, c, new);
+ if (likely(old == c))
+ break;
+ c = old;
+ }
+- return c != (u);
++ return c != u;
+ }
+
+ #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
+diff -urNp linux-2.6.31.4/arch/sparc/include/asm/elf_32.h linux-2.6.31.4/arch/sparc/include/asm/elf_32.h
+--- linux-2.6.31.4/arch/sparc/include/asm/elf_32.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/include/asm/elf_32.h 2009-10-11 15:29:40.751151087 -0400
@@ -116,6 +116,13 @@ typedef struct {
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE)
@@ -2676,9 +3169,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/include/asm/elf_32.h linux-2.6.30.8/arch/sp
/* 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 -urNp linux-2.6.30.8/arch/sparc/include/asm/elf_64.h linux-2.6.30.8/arch/sparc/include/asm/elf_64.h
---- linux-2.6.30.8/arch/sparc/include/asm/elf_64.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/include/asm/elf_64.h 2009-07-30 09:48:09.910522181 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/include/asm/elf_64.h linux-2.6.31.4/arch/sparc/include/asm/elf_64.h
+--- linux-2.6.31.4/arch/sparc/include/asm/elf_64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/include/asm/elf_64.h 2009-10-11 15:29:40.751151087 -0400
@@ -163,6 +163,12 @@ typedef struct {
#define ELF_ET_DYN_BASE 0x0000010000000000UL
#define COMPAT_ELF_ET_DYN_BASE 0x0000000070000000UL
@@ -2692,20 +3185,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/include/asm/elf_64.h linux-2.6.30.8/arch/sp
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. */
-diff -urNp linux-2.6.30.8/arch/sparc/include/asm/kmap_types.h linux-2.6.30.8/arch/sparc/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/sparc/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/include/asm/kmap_types.h 2009-07-30 09:48:09.910522181 -0400
-@@ -19,6 +19,7 @@ enum km_type {
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
-+ KM_CLEARPAGE,
- KM_TYPE_NR
- };
-
-diff -urNp linux-2.6.30.8/arch/sparc/include/asm/pgtable_32.h linux-2.6.30.8/arch/sparc/include/asm/pgtable_32.h
---- linux-2.6.30.8/arch/sparc/include/asm/pgtable_32.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/include/asm/pgtable_32.h 2009-07-30 09:48:09.910522181 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/include/asm/pgtable_32.h linux-2.6.31.4/arch/sparc/include/asm/pgtable_32.h
+--- linux-2.6.31.4/arch/sparc/include/asm/pgtable_32.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/include/asm/pgtable_32.h 2009-10-11 15:29:40.752121950 -0400
@@ -43,6 +43,13 @@ BTFIXUPDEF_SIMM13(user_ptrs_per_pgd)
BTFIXUPDEF_INT(page_none)
BTFIXUPDEF_INT(page_copy)
@@ -2737,9 +3219,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/include/asm/pgtable_32.h linux-2.6.30.8/arc
extern unsigned long page_kernel;
#ifdef MODULE
-diff -urNp linux-2.6.30.8/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.30.8/arch/sparc/include/asm/pgtsrmmu.h
---- linux-2.6.30.8/arch/sparc/include/asm/pgtsrmmu.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/include/asm/pgtsrmmu.h 2009-07-30 09:48:09.911921584 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.31.4/arch/sparc/include/asm/pgtsrmmu.h
+--- linux-2.6.31.4/arch/sparc/include/asm/pgtsrmmu.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/include/asm/pgtsrmmu.h 2009-10-11 15:29:40.752121950 -0400
@@ -115,6 +115,13 @@
SRMMU_EXEC | SRMMU_REF)
#define SRMMU_PAGE_RDONLY __pgprot(SRMMU_VALID | SRMMU_CACHE | \
@@ -2754,43 +3236,121 @@ diff -urNp linux-2.6.30.8/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.30.8/arch/
#define SRMMU_PAGE_KERNEL __pgprot(SRMMU_VALID | SRMMU_CACHE | SRMMU_PRIV | \
SRMMU_DIRTY | SRMMU_REF)
-diff -urNp linux-2.6.30.8/arch/sparc/include/asm/uaccess_32.h linux-2.6.30.8/arch/sparc/include/asm/uaccess_32.h
---- linux-2.6.30.8/arch/sparc/include/asm/uaccess_32.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/include/asm/uaccess_32.h 2009-07-30 09:48:09.911921584 -0400
-@@ -246,6 +246,9 @@ extern unsigned long __copy_user(void __
+diff -urNp linux-2.6.31.4/arch/sparc/include/asm/spinlock_64.h linux-2.6.31.4/arch/sparc/include/asm/spinlock_64.h
+--- linux-2.6.31.4/arch/sparc/include/asm/spinlock_64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/include/asm/spinlock_64.h 2009-10-11 15:29:40.752121950 -0400
+@@ -99,7 +99,12 @@ static void inline __read_lock(raw_rwloc
+ __asm__ __volatile__ (
+ "1: ldsw [%2], %0\n"
+ " brlz,pn %0, 2f\n"
+-"4: add %0, 1, %1\n"
++"4: addcc %0, 1, %1\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++" tvs %%icc, 6\n"
++#endif
++
+ " cas [%2], %0, %1\n"
+ " cmp %0, %1\n"
+ " bne,pn %%icc, 1b\n"
+@@ -112,7 +117,7 @@ static void inline __read_lock(raw_rwloc
+ " .previous"
+ : "=&r" (tmp1), "=&r" (tmp2)
+ : "r" (lock)
+- : "memory");
++ : "memory", "cc");
+ }
+
+ static int inline __read_trylock(raw_rwlock_t *lock)
+@@ -123,7 +128,12 @@ static int inline __read_trylock(raw_rwl
+ "1: ldsw [%2], %0\n"
+ " brlz,a,pn %0, 2f\n"
+ " mov 0, %0\n"
+-" add %0, 1, %1\n"
++" addcc %0, 1, %1\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++" tvs %%icc, 6\n"
++#endif
++
+ " cas [%2], %0, %1\n"
+ " cmp %0, %1\n"
+ " bne,pn %%icc, 1b\n"
+@@ -142,7 +152,12 @@ static void inline __read_unlock(raw_rwl
+
+ __asm__ __volatile__(
+ "1: lduw [%2], %0\n"
+-" sub %0, 1, %1\n"
++" subcc %0, 1, %1\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++" tvs %%icc, 6\n"
++#endif
++
+ " cas [%2], %0, %1\n"
+ " cmp %0, %1\n"
+ " bne,pn %%xcc, 1b\n"
+diff -urNp linux-2.6.31.4/arch/sparc/include/asm/uaccess_32.h linux-2.6.31.4/arch/sparc/include/asm/uaccess_32.h
+--- linux-2.6.31.4/arch/sparc/include/asm/uaccess_32.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/include/asm/uaccess_32.h 2009-10-11 15:29:40.752121950 -0400
+@@ -249,27 +249,49 @@ extern unsigned long __copy_user(void __
static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
{
+- if (n && __access_ok((unsigned long) to, n))
+ if ((long)n < 0)
+ return n;
+
- if (n && __access_ok((unsigned long) to, n))
++ if (n && __access_ok((unsigned long) to, n)) {
++ if (!__builtin_constant_p(n))
++ check_object_size(from, n, true);
return __copy_user(to, (__force void __user *) from, n);
- else
-@@ -259,6 +262,9 @@ static inline unsigned long __copy_to_us
+- else
++ } else
+ return n;
+ }
+
+ static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n)
+ {
++ if ((long)n < 0)
++ return n;
++
++ if (!__builtin_constant_p(n))
++ check_object_size(from, n, true);
++
+ return __copy_user(to, (__force void __user *) from, n);
+ }
static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
{
+- if (n && __access_ok((unsigned long) from, n))
+ if ((long)n < 0)
+ return n;
+
- if (n && __access_ok((unsigned long) from, n))
++ if (n && __access_ok((unsigned long) from, n)) {
++ if (!__builtin_constant_p(n))
++ check_object_size(to, n, false);
return __copy_user((__force void __user *) to, from, n);
- else
-@@ -267,6 +273,9 @@ static inline unsigned long copy_from_us
+- else
++ } else
+ return n;
+ }
static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n)
{
+ if ((long)n < 0)
+ return n;
+
++ if (!__builtin_constant_p(n))
++ check_object_size(to, n, false);
++
return __copy_user((__force void __user *) to, from, n);
}
-diff -urNp linux-2.6.30.8/arch/sparc/include/asm/uaccess_64.h linux-2.6.30.8/arch/sparc/include/asm/uaccess_64.h
---- linux-2.6.30.8/arch/sparc/include/asm/uaccess_64.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/include/asm/uaccess_64.h 2009-07-30 11:10:48.823569054 -0400
-@@ -212,7 +212,12 @@ extern unsigned long copy_from_user_fixu
+diff -urNp linux-2.6.31.4/arch/sparc/include/asm/uaccess_64.h linux-2.6.31.4/arch/sparc/include/asm/uaccess_64.h
+--- linux-2.6.31.4/arch/sparc/include/asm/uaccess_64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/include/asm/uaccess_64.h 2009-10-11 15:29:40.753260906 -0400
+@@ -212,7 +212,15 @@ extern unsigned long copy_from_user_fixu
static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long size)
{
@@ -2800,11 +3360,14 @@ diff -urNp linux-2.6.30.8/arch/sparc/include/asm/uaccess_64.h linux-2.6.30.8/arc
+ if (unlikely(((long)size > INT_MAX) || ((long)size < 0)))
+ return size;
+
++ if (!__builtin_constant_p(size))
++ check_object_size(to, size, false);
++
+ ret = ___copy_from_user(to, from, size);
if (unlikely(ret))
ret = copy_from_user_fixup(to, from, size);
-@@ -228,7 +233,12 @@ extern unsigned long copy_to_user_fixup(
+@@ -228,7 +236,15 @@ extern unsigned long copy_to_user_fixup(
static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long size)
{
@@ -2814,13 +3377,16 @@ diff -urNp linux-2.6.30.8/arch/sparc/include/asm/uaccess_64.h linux-2.6.30.8/arc
+ if (unlikely(((long)size > INT_MAX) || ((long)size < 0)))
+ return size;
+
++ if (!__builtin_constant_p(size))
++ check_object_size(from, size, true);
++
+ ret = ___copy_to_user(to, from, size);
if (unlikely(ret))
ret = copy_to_user_fixup(to, from, size);
-diff -urNp linux-2.6.30.8/arch/sparc/kernel/Makefile linux-2.6.30.8/arch/sparc/kernel/Makefile
---- linux-2.6.30.8/arch/sparc/kernel/Makefile 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/kernel/Makefile 2009-07-30 09:48:09.911921584 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/kernel/Makefile linux-2.6.31.4/arch/sparc/kernel/Makefile
+--- linux-2.6.31.4/arch/sparc/kernel/Makefile 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/kernel/Makefile 2009-10-11 15:29:40.753260906 -0400
@@ -3,7 +3,7 @@
#
@@ -2830,9 +3396,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/kernel/Makefile linux-2.6.30.8/arch/sparc/k
extra-y := head_$(BITS).o
extra-y += init_task.o
-diff -urNp linux-2.6.30.8/arch/sparc/kernel/sys_sparc_32.c linux-2.6.30.8/arch/sparc/kernel/sys_sparc_32.c
---- linux-2.6.30.8/arch/sparc/kernel/sys_sparc_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/kernel/sys_sparc_32.c 2009-07-30 09:48:09.912653453 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/kernel/sys_sparc_32.c linux-2.6.31.4/arch/sparc/kernel/sys_sparc_32.c
+--- linux-2.6.31.4/arch/sparc/kernel/sys_sparc_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/kernel/sys_sparc_32.c 2009-10-11 15:29:40.753260906 -0400
@@ -56,7 +56,7 @@ unsigned long arch_get_unmapped_area(str
if (ARCH_SUN4C && len > 0x20000000)
return -ENOMEM;
@@ -2842,9 +3408,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/kernel/sys_sparc_32.c linux-2.6.30.8/arch/s
if (flags & MAP_SHARED)
addr = COLOUR_ALIGN(addr);
-diff -urNp linux-2.6.30.8/arch/sparc/kernel/sys_sparc_64.c linux-2.6.30.8/arch/sparc/kernel/sys_sparc_64.c
---- linux-2.6.30.8/arch/sparc/kernel/sys_sparc_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/kernel/sys_sparc_64.c 2009-08-26 16:18:36.187752551 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/kernel/sys_sparc_64.c linux-2.6.31.4/arch/sparc/kernel/sys_sparc_64.c
+--- linux-2.6.31.4/arch/sparc/kernel/sys_sparc_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/kernel/sys_sparc_64.c 2009-10-11 15:29:40.753260906 -0400
@@ -125,7 +125,7 @@ unsigned long arch_get_unmapped_area(str
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
@@ -2923,9 +3489,329 @@ diff -urNp linux-2.6.30.8/arch/sparc/kernel/sys_sparc_64.c linux-2.6.30.8/arch/s
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.30.8/arch/sparc/Makefile linux-2.6.30.8/arch/sparc/Makefile
---- linux-2.6.30.8/arch/sparc/Makefile 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/Makefile 2009-07-30 11:10:48.852135371 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/kernel/traps_64.c linux-2.6.31.4/arch/sparc/kernel/traps_64.c
+--- linux-2.6.31.4/arch/sparc/kernel/traps_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/kernel/traps_64.c 2009-10-11 15:29:40.754377338 -0400
+@@ -93,6 +93,12 @@ void bad_trap(struct pt_regs *regs, long
+
+ lvl -= 0x100;
+ if (regs->tstate & TSTATE_PRIV) {
++
++#ifdef CONFIG_PAX_REFCOUNT
++ if (lvl == 6)
++ pax_report_refcount_overflow(regs);
++#endif
++
+ sprintf(buffer, "Kernel bad sw trap %lx", lvl);
+ die_if_kernel(buffer, regs);
+ }
+@@ -111,11 +117,16 @@ void bad_trap(struct pt_regs *regs, long
+ void bad_trap_tl1(struct pt_regs *regs, long lvl)
+ {
+ char buffer[32];
+-
++
+ if (notify_die(DIE_TRAP_TL1, "bad trap tl1", regs,
+ 0, lvl, SIGTRAP) == NOTIFY_STOP)
+ return;
+
++#ifdef CONFIG_PAX_REFCOUNT
++ if (lvl == 6)
++ pax_report_refcount_overflow(regs);
++#endif
++
+ dump_tl1_traplog((struct tl1_traplog *)(regs + 1));
+
+ sprintf (buffer, "Bad trap %lx at tl>0", lvl);
+diff -urNp linux-2.6.31.4/arch/sparc/lib/atomic32.c linux-2.6.31.4/arch/sparc/lib/atomic32.c
+--- linux-2.6.31.4/arch/sparc/lib/atomic32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/lib/atomic32.c 2009-10-11 15:29:40.754377338 -0400
+@@ -80,6 +80,12 @@ void atomic_set(atomic_t *v, int i)
+ }
+ EXPORT_SYMBOL(atomic_set);
+
++void atomic_set_unchecked(atomic_unchecked_t *v, int i)
++{
++ atomic_set((atomic_t *)v, i);
++}
++EXPORT_SYMBOL(atomic_set_unchecked);
++
+ unsigned long ___set_bit(unsigned long *addr, unsigned long mask)
+ {
+ unsigned long old, flags;
+diff -urNp linux-2.6.31.4/arch/sparc/lib/atomic_64.S linux-2.6.31.4/arch/sparc/lib/atomic_64.S
+--- linux-2.6.31.4/arch/sparc/lib/atomic_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/lib/atomic_64.S 2009-10-11 15:29:40.754377338 -0400
+@@ -18,7 +18,12 @@
+ atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
+ BACKOFF_SETUP(%o2)
+ 1: lduw [%o1], %g1
+- add %g1, %o0, %g7
++ addcc %g1, %o0, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o1], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %icc, 2f
+@@ -28,12 +33,32 @@ atomic_add: /* %o0 = increment, %o1 = at
+ 2: BACKOFF_SPIN(%o2, %o3, 1b)
+ .size atomic_add, .-atomic_add
+
++ .globl atomic_add_unchecked
++ .type atomic_add_unchecked,#function
++atomic_add_unchecked: /* %o0 = increment, %o1 = atomic_ptr */
++ BACKOFF_SETUP(%o2)
++1: lduw [%o1], %g1
++ add %g1, %o0, %g7
++ cas [%o1], %g1, %g7
++ cmp %g1, %g7
++ bne,pn %icc, 2f
++ nop
++ retl
++ nop
++2: BACKOFF_SPIN(%o2, %o3, 1b)
++ .size atomic_add_unchecked, .-atomic_add_unchecked
++
+ .globl atomic_sub
+ .type atomic_sub,#function
+ atomic_sub: /* %o0 = decrement, %o1 = atomic_ptr */
+ BACKOFF_SETUP(%o2)
+ 1: lduw [%o1], %g1
+- sub %g1, %o0, %g7
++ subcc %g1, %o0, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o1], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %icc, 2f
+@@ -43,12 +68,32 @@ atomic_sub: /* %o0 = decrement, %o1 = at
+ 2: BACKOFF_SPIN(%o2, %o3, 1b)
+ .size atomic_sub, .-atomic_sub
+
++ .globl atomic_sub_unchecked
++ .type atomic_sub_unchecked,#function
++atomic_sub_unchecked: /* %o0 = decrement, %o1 = atomic_ptr */
++ BACKOFF_SETUP(%o2)
++1: lduw [%o1], %g1
++ sub %g1, %o0, %g7
++ cas [%o1], %g1, %g7
++ cmp %g1, %g7
++ bne,pn %icc, 2f
++ nop
++ retl
++ nop
++2: BACKOFF_SPIN(%o2, %o3, 1b)
++ .size atomic_sub_unchecked, .-atomic_sub_unchecked
++
+ .globl atomic_add_ret
+ .type atomic_add_ret,#function
+ atomic_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
+ BACKOFF_SETUP(%o2)
+ 1: lduw [%o1], %g1
+- add %g1, %o0, %g7
++ addcc %g1, %o0, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o1], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %icc, 2f
+@@ -64,7 +109,12 @@ atomic_add_ret: /* %o0 = increment, %o1
+ atomic_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */
+ BACKOFF_SETUP(%o2)
+ 1: lduw [%o1], %g1
+- sub %g1, %o0, %g7
++ subcc %g1, %o0, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o1], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %icc, 2f
+@@ -80,7 +130,12 @@ atomic_sub_ret: /* %o0 = decrement, %o1
+ atomic64_add: /* %o0 = increment, %o1 = atomic_ptr */
+ BACKOFF_SETUP(%o2)
+ 1: ldx [%o1], %g1
+- add %g1, %o0, %g7
++ addcc %g1, %o0, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %xcc, 6
++#endif
++
+ casx [%o1], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %xcc, 2f
+@@ -95,7 +150,12 @@ atomic64_add: /* %o0 = increment, %o1 =
+ atomic64_sub: /* %o0 = decrement, %o1 = atomic_ptr */
+ BACKOFF_SETUP(%o2)
+ 1: ldx [%o1], %g1
+- sub %g1, %o0, %g7
++ subcc %g1, %o0, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %xcc, 6
++#endif
++
+ casx [%o1], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %xcc, 2f
+@@ -110,7 +170,12 @@ atomic64_sub: /* %o0 = decrement, %o1 =
+ atomic64_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
+ BACKOFF_SETUP(%o2)
+ 1: ldx [%o1], %g1
+- add %g1, %o0, %g7
++ addcc %g1, %o0, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %xcc, 6
++#endif
++
+ casx [%o1], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %xcc, 2f
+@@ -126,7 +191,12 @@ atomic64_add_ret: /* %o0 = increment, %o
+ atomic64_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */
+ BACKOFF_SETUP(%o2)
+ 1: ldx [%o1], %g1
+- sub %g1, %o0, %g7
++ subcc %g1, %o0, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %xcc, 6
++#endif
++
+ casx [%o1], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %xcc, 2f
+diff -urNp linux-2.6.31.4/arch/sparc/lib/ksyms.c linux-2.6.31.4/arch/sparc/lib/ksyms.c
+--- linux-2.6.31.4/arch/sparc/lib/ksyms.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/lib/ksyms.c 2009-10-11 15:29:40.755534860 -0400
+@@ -144,8 +144,10 @@ EXPORT_SYMBOL(__downgrade_write);
+
+ /* Atomic counter implementation. */
+ EXPORT_SYMBOL(atomic_add);
++EXPORT_SYMBOL(atomic_add_unchecked);
+ EXPORT_SYMBOL(atomic_add_ret);
+ EXPORT_SYMBOL(atomic_sub);
++EXPORT_SYMBOL(atomic_sub_unchecked);
+ EXPORT_SYMBOL(atomic_sub_ret);
+ EXPORT_SYMBOL(atomic64_add);
+ EXPORT_SYMBOL(atomic64_add_ret);
+diff -urNp linux-2.6.31.4/arch/sparc/lib/rwsem_64.S linux-2.6.31.4/arch/sparc/lib/rwsem_64.S
+--- linux-2.6.31.4/arch/sparc/lib/rwsem_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/lib/rwsem_64.S 2009-10-11 15:29:40.756220631 -0400
+@@ -11,7 +11,12 @@
+ .globl __down_read
+ __down_read:
+ 1: lduw [%o0], %g1
+- add %g1, 1, %g7
++ addcc %g1, 1, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o0], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %icc, 1b
+@@ -33,7 +38,12 @@ __down_read:
+ .globl __down_read_trylock
+ __down_read_trylock:
+ 1: lduw [%o0], %g1
+- add %g1, 1, %g7
++ addcc %g1, 1, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cmp %g7, 0
+ bl,pn %icc, 2f
+ mov 0, %o1
+@@ -51,7 +61,12 @@ __down_write:
+ or %g1, %lo(RWSEM_ACTIVE_WRITE_BIAS), %g1
+ 1:
+ lduw [%o0], %g3
+- add %g3, %g1, %g7
++ addcc %g3, %g1, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o0], %g3, %g7
+ cmp %g3, %g7
+ bne,pn %icc, 1b
+@@ -77,7 +92,12 @@ __down_write_trylock:
+ cmp %g3, 0
+ bne,pn %icc, 2f
+ mov 0, %o1
+- add %g3, %g1, %g7
++ addcc %g3, %g1, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o0], %g3, %g7
+ cmp %g3, %g7
+ bne,pn %icc, 1b
+@@ -90,7 +110,12 @@ __down_write_trylock:
+ __up_read:
+ 1:
+ lduw [%o0], %g1
+- sub %g1, 1, %g7
++ subcc %g1, 1, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o0], %g1, %g7
+ cmp %g1, %g7
+ bne,pn %icc, 1b
+@@ -118,7 +143,12 @@ __up_write:
+ or %g1, %lo(RWSEM_ACTIVE_WRITE_BIAS), %g1
+ 1:
+ lduw [%o0], %g3
+- sub %g3, %g1, %g7
++ subcc %g3, %g1, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o0], %g3, %g7
+ cmp %g3, %g7
+ bne,pn %icc, 1b
+@@ -143,7 +173,12 @@ __downgrade_write:
+ or %g1, %lo(RWSEM_WAITING_BIAS), %g1
+ 1:
+ lduw [%o0], %g3
+- sub %g3, %g1, %g7
++ subcc %g3, %g1, %g7
++
++#ifdef CONFIG_PAX_REFCOUNT
++ tvs %icc, 6
++#endif
++
+ cas [%o0], %g3, %g7
+ cmp %g3, %g7
+ bne,pn %icc, 1b
+diff -urNp linux-2.6.31.4/arch/sparc/Makefile linux-2.6.31.4/arch/sparc/Makefile
+--- linux-2.6.31.4/arch/sparc/Makefile 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/Makefile 2009-10-11 15:29:40.756220631 -0400
@@ -81,7 +81,7 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc
# Export what is needed by arch/sparc/boot/Makefile
export VMLINUX_INIT VMLINUX_MAIN
@@ -2935,9 +3821,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/Makefile linux-2.6.30.8/arch/sparc/Makefile
VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y)
VMLINUX_MAIN += $(drivers-y) $(net-y)
-diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_32.c linux-2.6.30.8/arch/sparc/mm/fault_32.c
---- linux-2.6.30.8/arch/sparc/mm/fault_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/mm/fault_32.c 2009-09-12 16:45:57.368158675 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/mm/fault_32.c linux-2.6.31.4/arch/sparc/mm/fault_32.c
+--- linux-2.6.31.4/arch/sparc/mm/fault_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/mm/fault_32.c 2009-10-11 15:29:40.756220631 -0400
@@ -21,6 +21,9 @@
#include <linux/interrupt.h>
#include <linux/module.h>
@@ -2948,11 +3834,12 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_32.c linux-2.6.30.8/arch/sparc/mm/
#include <asm/system.h>
#include <asm/page.h>
-@@ -167,6 +170,265 @@ static unsigned long compute_si_addr(str
+@@ -167,6 +170,267 @@ static unsigned long compute_si_addr(str
return safe_compute_effective_address(regs, insn);
}
+#ifdef CONFIG_PAX_PAGEEXEC
++#ifdef CONFIG_PAX_DLRESOLVE
+void pax_emuplt_close(struct vm_area_struct *vma)
+{
+ vma->vm_mm->call_dl_resolve = 0UL;
@@ -2997,6 +3884,7 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_32.c linux-2.6.30.8/arch/sparc/mm/
+ ++current->mm->total_vm;
+ return 0;
+}
++#endif
+
+/*
+ * PaX: decide what to do with offenders (regs->pc = fault address)
@@ -3103,6 +3991,7 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_32.c linux-2.6.30.8/arch/sparc/mm/
+ if (err)
+ break;
+
++#ifdef CONFIG_PAX_DLRESOLVE
+ if (save == 0x9DE3BFA8U &&
+ (call & 0xC0000000U) == 0x40000000U &&
+ nop == 0x01000000U)
@@ -3150,17 +4039,16 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_32.c linux-2.6.30.8/arch/sparc/mm/
+ regs->npc = addr+4;
+ return 3;
+ }
++#endif
+
-+ /* PaX: newer glibc/binutils generate sethi/jmp instead of save/call */
++ /* PaX: glibc 2.4+ generates sethi/jmpl instead of save/call */
+ if ((save & 0xFFC00000U) == 0x05000000U &&
+ (call & 0xFFFFE000U) == 0x85C0A000U &&
+ nop == 0x01000000U)
+ {
-+ unsigned long addr;
-+
+ regs->u_regs[UREG_G1] = (sethi & 0x003FFFFFU) << 10;
++ regs->u_regs[UREG_G2] = addr + 4;
+ addr = (save & 0x003FFFFFU) << 10;
-+ regs->u_regs[UREG_G2] = addr;
+ addr += (((call | 0xFFFFE000U) ^ 0x00001000U) + 0x00001000U);
+ regs->pc = addr;
+ regs->npc = addr+4;
@@ -3214,7 +4102,7 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_32.c linux-2.6.30.8/arch/sparc/mm/
asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
unsigned long address)
{
-@@ -231,6 +493,24 @@ good_area:
+@@ -231,6 +495,24 @@ good_area:
if(!(vma->vm_flags & VM_WRITE))
goto bad_area;
} else {
@@ -3239,9 +4127,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_32.c linux-2.6.30.8/arch/sparc/mm/
/* Allow reads even for write-only mappings */
if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
-diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_64.c linux-2.6.30.8/arch/sparc/mm/fault_64.c
---- linux-2.6.30.8/arch/sparc/mm/fault_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/mm/fault_64.c 2009-09-26 23:11:15.962139535 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/mm/fault_64.c linux-2.6.31.4/arch/sparc/mm/fault_64.c
+--- linux-2.6.31.4/arch/sparc/mm/fault_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/mm/fault_64.c 2009-10-11 15:29:40.756220631 -0400
@@ -20,6 +20,9 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
@@ -3252,12 +4140,12 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_64.c linux-2.6.30.8/arch/sparc/mm/
#include <asm/page.h>
#include <asm/pgtable.h>
-@@ -249,6 +252,413 @@ static void noinline bogus_32bit_fault_a
+@@ -249,6 +252,416 @@ static void noinline bogus_32bit_fault_a
show_regs(regs);
}
+#ifdef CONFIG_PAX_PAGEEXEC
-+#ifdef CONFIG_PAX_EMUPLT
++#ifdef CONFIG_PAX_DLRESOLVE
+static void pax_emuplt_close(struct vm_area_struct *vma)
+{
+ vma->vm_mm->call_dl_resolve = 0UL;
@@ -3488,35 +4376,6 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_64.c linux-2.6.30.8/arch/sparc/mm/
+ }
+ } while (0);
+
-+ do { /* PaX: patched PLT emulation #7 */
-+ 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 & 0xFFF00000U) == 0x30600000U &&
-+ nop == 0x01000000U)
-+ {
-+ unsigned long addr;
-+
-+ addr = (sethi & 0x003FFFFFU) << 10;
-+ regs->u_regs[UREG_G1] = addr;
-+ addr = regs->tpc + ((((ba | 0xFFFFFFFFFFF80000UL) ^ 0x00040000UL) + 0x00040000UL) << 2);
-+
-+ if (test_thread_flag(TIF_32BIT))
-+ addr &= 0xFFFFFFFFUL;
-+
-+ regs->tpc = addr;
-+ regs->tnpc = addr+4;
-+ return 2;
-+ }
-+ } while (0);
-+
+ do { /* PaX: unpatched PLT emulation step 1 */
+ unsigned int sethi, ba, nop;
+
@@ -3548,6 +4407,7 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_64.c linux-2.6.30.8/arch/sparc/mm/
+ if (err)
+ break;
+
++#ifdef CONFIG_PAX_DLRESOLVE
+ if (save == 0x9DE3BFA8U &&
+ (call & 0xC0000000U) == 0x40000000U &&
+ nop == 0x01000000U)
@@ -3595,17 +4455,16 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_64.c linux-2.6.30.8/arch/sparc/mm/
+ regs->tnpc = addr+4;
+ return 3;
+ }
++#endif
+
-+ /* PaX: newer glibc/binutils generate sethi/jmp instead of save/call */
++ /* PaX: glibc 2.4+ generates sethi/jmpl instead of save/call */
+ if ((save & 0xFFC00000U) == 0x05000000U &&
+ (call & 0xFFFFE000U) == 0x85C0A000U &&
+ nop == 0x01000000U)
+ {
-+ unsigned long addr;
-+
+ regs->u_regs[UREG_G1] = (sethi & 0x003FFFFFU) << 10;
++ regs->u_regs[UREG_G2] = addr + 4;
+ addr = (save & 0x003FFFFFU) << 10;
-+ regs->u_regs[UREG_G2] = addr;
+ addr += (((call | 0xFFFFFFFFFFFFE000UL) ^ 0x00001000UL) + 0x00001000UL);
+
+ if (test_thread_flag(TIF_32BIT))
@@ -3618,6 +4477,7 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_64.c linux-2.6.30.8/arch/sparc/mm/
+ }
+ } while (0);
+
++#ifdef CONFIG_PAX_DLRESOLVE
+ do { /* PaX: unpatched PLT emulation step 2 */
+ unsigned int save, call, nop;
+
@@ -3644,6 +4504,37 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_64.c linux-2.6.30.8/arch/sparc/mm/
+ } while (0);
+#endif
+
++ do { /* PaX: patched PLT emulation #7, must be AFTER the unpatched PLT emulation */
++ 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 & 0xFFF00000U) == 0x30600000U &&
++ nop == 0x01000000U)
++ {
++ unsigned long addr;
++
++ addr = (sethi & 0x003FFFFFU) << 10;
++ regs->u_regs[UREG_G1] = addr;
++ addr = regs->tpc + ((((ba | 0xFFFFFFFFFFF80000UL) ^ 0x00040000UL) + 0x00040000UL) << 2);
++
++ if (test_thread_flag(TIF_32BIT))
++ addr &= 0xFFFFFFFFUL;
++
++ regs->tpc = addr;
++ regs->tnpc = addr+4;
++ return 2;
++ }
++ } while (0);
++
++#endif
++
+ return 1;
+}
+
@@ -3666,7 +4557,7 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_64.c linux-2.6.30.8/arch/sparc/mm/
asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
{
struct mm_struct *mm = current->mm;
-@@ -315,6 +725,29 @@ asmlinkage void __kprobes do_sparc64_fau
+@@ -315,6 +728,29 @@ asmlinkage void __kprobes do_sparc64_fau
if (!vma)
goto bad_area;
@@ -3696,9 +4587,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/fault_64.c linux-2.6.30.8/arch/sparc/mm/
/* 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 -urNp linux-2.6.30.8/arch/sparc/mm/init_32.c linux-2.6.30.8/arch/sparc/mm/init_32.c
---- linux-2.6.30.8/arch/sparc/mm/init_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/mm/init_32.c 2009-07-30 09:48:09.914627627 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/mm/init_32.c linux-2.6.31.4/arch/sparc/mm/init_32.c
+--- linux-2.6.31.4/arch/sparc/mm/init_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/mm/init_32.c 2009-10-11 15:29:40.757490633 -0400
@@ -316,6 +316,9 @@ extern void device_scan(void);
pgprot_t PAGE_SHARED __read_mostly;
EXPORT_SYMBOL(PAGE_SHARED);
@@ -3733,9 +4624,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/init_32.c linux-2.6.30.8/arch/sparc/mm/i
protection_map[12] = PAGE_READONLY;
protection_map[13] = PAGE_READONLY;
protection_map[14] = PAGE_SHARED;
-diff -urNp linux-2.6.30.8/arch/sparc/mm/Makefile linux-2.6.30.8/arch/sparc/mm/Makefile
---- linux-2.6.30.8/arch/sparc/mm/Makefile 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/mm/Makefile 2009-07-30 09:48:09.912653453 -0400
+diff -urNp linux-2.6.31.4/arch/sparc/mm/Makefile linux-2.6.31.4/arch/sparc/mm/Makefile
+--- linux-2.6.31.4/arch/sparc/mm/Makefile 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/mm/Makefile 2009-10-11 15:29:40.757490633 -0400
@@ -2,7 +2,7 @@
#
@@ -3745,10 +4636,10 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/Makefile linux-2.6.30.8/arch/sparc/mm/Ma
obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
obj-y += fault_$(BITS).o
-diff -urNp linux-2.6.30.8/arch/sparc/mm/srmmu.c linux-2.6.30.8/arch/sparc/mm/srmmu.c
---- linux-2.6.30.8/arch/sparc/mm/srmmu.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/sparc/mm/srmmu.c 2009-07-30 09:48:09.914627627 -0400
-@@ -2148,6 +2148,13 @@ void __init ld_mmu_srmmu(void)
+diff -urNp linux-2.6.31.4/arch/sparc/mm/srmmu.c linux-2.6.31.4/arch/sparc/mm/srmmu.c
+--- linux-2.6.31.4/arch/sparc/mm/srmmu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/sparc/mm/srmmu.c 2009-10-11 15:29:40.758208353 -0400
+@@ -2149,6 +2149,13 @@ void __init ld_mmu_srmmu(void)
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));
@@ -3762,9 +4653,9 @@ diff -urNp linux-2.6.30.8/arch/sparc/mm/srmmu.c linux-2.6.30.8/arch/sparc/mm/srm
BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
-diff -urNp linux-2.6.30.8/arch/um/include/asm/kmap_types.h linux-2.6.30.8/arch/um/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/um/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/um/include/asm/kmap_types.h 2009-07-30 09:48:09.914627627 -0400
+diff -urNp linux-2.6.31.4/arch/um/include/asm/kmap_types.h linux-2.6.31.4/arch/um/include/asm/kmap_types.h
+--- linux-2.6.31.4/arch/um/include/asm/kmap_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/um/include/asm/kmap_types.h 2009-10-11 15:29:40.758208353 -0400
@@ -23,6 +23,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
@@ -3773,9 +4664,9 @@ diff -urNp linux-2.6.30.8/arch/um/include/asm/kmap_types.h linux-2.6.30.8/arch/u
KM_TYPE_NR
};
-diff -urNp linux-2.6.30.8/arch/um/include/asm/page.h linux-2.6.30.8/arch/um/include/asm/page.h
---- linux-2.6.30.8/arch/um/include/asm/page.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/um/include/asm/page.h 2009-07-30 09:48:09.915798567 -0400
+diff -urNp linux-2.6.31.4/arch/um/include/asm/page.h linux-2.6.31.4/arch/um/include/asm/page.h
+--- linux-2.6.31.4/arch/um/include/asm/page.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/um/include/asm/page.h 2009-10-11 15:29:40.758208353 -0400
@@ -14,6 +14,9 @@
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
@@ -3786,9 +4677,9 @@ diff -urNp linux-2.6.30.8/arch/um/include/asm/page.h linux-2.6.30.8/arch/um/incl
#ifndef __ASSEMBLY__
struct page;
-diff -urNp linux-2.6.30.8/arch/um/sys-i386/syscalls.c linux-2.6.30.8/arch/um/sys-i386/syscalls.c
---- linux-2.6.30.8/arch/um/sys-i386/syscalls.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/um/sys-i386/syscalls.c 2009-07-30 09:48:09.915798567 -0400
+diff -urNp linux-2.6.31.4/arch/um/sys-i386/syscalls.c linux-2.6.31.4/arch/um/sys-i386/syscalls.c
+--- linux-2.6.31.4/arch/um/sys-i386/syscalls.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/um/sys-i386/syscalls.c 2009-10-11 15:29:40.758208353 -0400
@@ -11,6 +11,21 @@
#include "asm/uaccess.h"
#include "asm/unistd.h"
@@ -3811,9 +4702,9 @@ diff -urNp linux-2.6.30.8/arch/um/sys-i386/syscalls.c linux-2.6.30.8/arch/um/sys
/*
* Perform the select(nd, in, out, ex, tv) and mmap() system
* calls. Linux/i386 didn't use to be able to handle more than
-diff -urNp linux-2.6.30.8/arch/x86/boot/bitops.h linux-2.6.30.8/arch/x86/boot/bitops.h
---- linux-2.6.30.8/arch/x86/boot/bitops.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/bitops.h 2009-07-30 09:48:09.917626356 -0400
+diff -urNp linux-2.6.31.4/arch/x86/boot/bitops.h linux-2.6.31.4/arch/x86/boot/bitops.h
+--- linux-2.6.31.4/arch/x86/boot/bitops.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/bitops.h 2009-10-11 15:29:40.759197597 -0400
@@ -26,7 +26,7 @@ static inline int variable_test_bit(int
u8 v;
const u32 *p = (const u32 *)addr;
@@ -3832,10 +4723,10 @@ diff -urNp linux-2.6.30.8/arch/x86/boot/bitops.h linux-2.6.30.8/arch/x86/boot/bi
}
#endif /* BOOT_BITOPS_H */
-diff -urNp linux-2.6.30.8/arch/x86/boot/boot.h linux-2.6.30.8/arch/x86/boot/boot.h
---- linux-2.6.30.8/arch/x86/boot/boot.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/boot.h 2009-07-30 09:48:09.917626356 -0400
-@@ -80,7 +80,7 @@ static inline void io_delay(void)
+diff -urNp linux-2.6.31.4/arch/x86/boot/boot.h linux-2.6.31.4/arch/x86/boot/boot.h
+--- linux-2.6.31.4/arch/x86/boot/boot.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/boot.h 2009-10-11 15:29:40.759197597 -0400
+@@ -82,7 +82,7 @@ static inline void io_delay(void)
static inline u16 ds(void)
{
u16 seg;
@@ -3844,7 +4735,7 @@ diff -urNp linux-2.6.30.8/arch/x86/boot/boot.h linux-2.6.30.8/arch/x86/boot/boot
return seg;
}
-@@ -176,7 +176,7 @@ static inline void wrgs32(u32 v, addr_t
+@@ -178,7 +178,7 @@ static inline void wrgs32(u32 v, addr_t
static inline int memcmp(const void *s1, const void *s2, size_t len)
{
u8 diff;
@@ -3853,61 +4744,61 @@ diff -urNp linux-2.6.30.8/arch/x86/boot/boot.h linux-2.6.30.8/arch/x86/boot/boot
: "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
return diff;
}
-diff -urNp linux-2.6.30.8/arch/x86/boot/compressed/head_32.S linux-2.6.30.8/arch/x86/boot/compressed/head_32.S
---- linux-2.6.30.8/arch/x86/boot/compressed/head_32.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/compressed/head_32.S 2009-07-30 09:48:09.917626356 -0400
-@@ -68,7 +68,7 @@ ENTRY(startup_32)
- addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
- andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
+diff -urNp linux-2.6.31.4/arch/x86/boot/compressed/head_32.S linux-2.6.31.4/arch/x86/boot/compressed/head_32.S
+--- linux-2.6.31.4/arch/x86/boot/compressed/head_32.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/compressed/head_32.S 2009-10-11 15:29:40.759197597 -0400
+@@ -75,7 +75,7 @@ ENTRY(startup_32)
+ notl %eax
+ andl %eax, %ebx
#else
-- movl $LOAD_PHYSICAL_ADDR, %ebx
-+ movl $____LOAD_PHYSICAL_ADDR, %ebx
+- movl $LOAD_PHYSICAL_ADDR, %ebx
++ movl $____LOAD_PHYSICAL_ADDR, %ebx
#endif
- /* Replace the compressed data size with the uncompressed size */
-@@ -78,8 +78,8 @@ ENTRY(startup_32)
- /* Add 8 bytes for every 32K input block */
- shrl $12, %eax
- addl %eax, %ebx
-- /* Add 32K + 18 bytes of extra slack */
-- addl $(32768 + 18), %ebx
-+ /* Add 64K of extra slack */
-+ addl $65536, %ebx
- /* Align on a 4K boundary */
- addl $4095, %ebx
- andl $~4095, %ebx
-@@ -103,7 +103,7 @@ ENTRY(startup_32)
- addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebp
- andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebp
- #else
-- movl $LOAD_PHYSICAL_ADDR, %ebp
-+ movl $____LOAD_PHYSICAL_ADDR, %ebp
- #endif
-
- /*
-@@ -160,16 +160,15 @@ relocated:
+ /* Target address to relocate to for decompression */
+@@ -148,7 +148,7 @@ relocated:
* and where it was actually loaded.
*/
- movl %ebp, %ebx
-- subl $LOAD_PHYSICAL_ADDR, %ebx
-+ subl $____LOAD_PHYSICAL_ADDR, %ebx
- jz 2f /* Nothing to be done if loaded at compiled addr. */
+ movl %ebp, %ebx
+- subl $LOAD_PHYSICAL_ADDR, %ebx
++ subl $____LOAD_PHYSICAL_ADDR, %ebx
+ jz 2f /* Nothing to be done if loaded at compiled addr. */
/*
* Process relocations.
- */
-
- 1: subl $4, %edi
-- movl 0(%edi), %ecx
-- testl %ecx, %ecx
-- jz 2f
-+ movl (%edi), %ecx
-+ jecxz 2f
- addl %ebx, -__PAGE_OFFSET(%ebx, %ecx)
- jmp 1b
+@@ -156,8 +156,7 @@ relocated:
+
+ 1: subl $4, %edi
+ movl (%edi), %ecx
+- testl %ecx, %ecx
+- jz 2f
++ jecxz 2f
+ addl %ebx, -__PAGE_OFFSET(%ebx, %ecx)
+ jmp 1b
2:
-diff -urNp linux-2.6.30.8/arch/x86/boot/compressed/misc.c linux-2.6.30.8/arch/x86/boot/compressed/misc.c
---- linux-2.6.30.8/arch/x86/boot/compressed/misc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/compressed/misc.c 2009-07-30 09:48:09.917626356 -0400
+diff -urNp linux-2.6.31.4/arch/x86/boot/compressed/head_64.S linux-2.6.31.4/arch/x86/boot/compressed/head_64.S
+--- linux-2.6.31.4/arch/x86/boot/compressed/head_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/compressed/head_64.S 2009-10-11 15:29:40.759197597 -0400
+@@ -90,7 +90,7 @@ ENTRY(startup_32)
+ notl %eax
+ andl %eax, %ebx
+ #else
+- movl $LOAD_PHYSICAL_ADDR, %ebx
++ movl $____LOAD_PHYSICAL_ADDR, %ebx
+ #endif
+
+ /* Target address to relocate to for decompression */
+@@ -233,7 +233,7 @@ ENTRY(startup_64)
+ notq %rax
+ andq %rax, %rbp
+ #else
+- movq $LOAD_PHYSICAL_ADDR, %rbp
++ movq $____LOAD_PHYSICAL_ADDR, %rbp
+ #endif
+
+ /* Target address to relocate to for decompression */
+diff -urNp linux-2.6.31.4/arch/x86/boot/compressed/misc.c linux-2.6.31.4/arch/x86/boot/compressed/misc.c
+--- linux-2.6.31.4/arch/x86/boot/compressed/misc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/compressed/misc.c 2009-10-11 15:29:40.760169296 -0400
@@ -288,7 +288,7 @@ static void parse_elf(void *output)
case PT_LOAD:
#ifdef CONFIG_RELOCATABLE
@@ -3917,18 +4808,30 @@ diff -urNp linux-2.6.30.8/arch/x86/boot/compressed/misc.c linux-2.6.30.8/arch/x8
#else
dest = (void *)(phdr->p_paddr);
#endif
-@@ -336,7 +336,7 @@ asmlinkage void decompress_kernel(void *
- if (heap > ((-__PAGE_OFFSET-(512<<20)-1) & 0x7fffffff))
+@@ -335,7 +335,7 @@ asmlinkage void decompress_kernel(void *
error("Destination address too large");
+ #endif
#ifndef CONFIG_RELOCATABLE
-- if ((u32)output != LOAD_PHYSICAL_ADDR)
-+ if ((u32)output != ____LOAD_PHYSICAL_ADDR)
+- if ((unsigned long)output != LOAD_PHYSICAL_ADDR)
++ if ((unsigned long)output != ____LOAD_PHYSICAL_ADDR)
error("Wrong destination address");
#endif
- #endif
-diff -urNp linux-2.6.30.8/arch/x86/boot/compressed/relocs.c linux-2.6.30.8/arch/x86/boot/compressed/relocs.c
---- linux-2.6.30.8/arch/x86/boot/compressed/relocs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/compressed/relocs.c 2009-08-24 21:08:46.297666606 -0400
+
+diff -urNp linux-2.6.31.4/arch/x86/boot/compressed/mkpiggy.c linux-2.6.31.4/arch/x86/boot/compressed/mkpiggy.c
+--- linux-2.6.31.4/arch/x86/boot/compressed/mkpiggy.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/compressed/mkpiggy.c 2009-10-11 15:29:40.760169296 -0400
+@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
+
+ offs = (olen > ilen) ? olen - ilen : 0;
+ offs += olen >> 12; /* Add 8 bytes for each 32K block */
+- offs += 32*1024 + 18; /* Add 32K + 18 bytes slack */
++ offs += 64*1024; /* Add 64K bytes slack */
+ offs = (offs+4095) & ~4095; /* Round to a 4K boundary */
+
+ printf(".section \".rodata.compressed\",\"a\",@progbits\n");
+diff -urNp linux-2.6.31.4/arch/x86/boot/compressed/relocs.c linux-2.6.31.4/arch/x86/boot/compressed/relocs.c
+--- linux-2.6.31.4/arch/x86/boot/compressed/relocs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/compressed/relocs.c 2009-10-11 15:29:56.555367199 -0400
@@ -10,8 +10,11 @@
#define USE_BSD
#include <endian.h>
@@ -4090,31 +4993,29 @@ diff -urNp linux-2.6.30.8/arch/x86/boot/compressed/relocs.c linux-2.6.30.8/arch/
struct section *sec = &secs[i];
if (sec->shdr.sh_type != SHT_REL) {
-@@ -504,6 +548,23 @@ static void walk_relocs(void (*visit)(El
+@@ -504,6 +548,21 @@ static void walk_relocs(void (*visit)(El
if (sym->st_shndx == SHN_ABS) {
continue;
}
+ /* Don't relocate actual per-cpu variables, they are absolute indices, not addresses */
+ if (!strcmp(sec_name(sym->st_shndx), ".data.percpu") && strcmp(sym_name(sym_strtab, sym), "__per_cpu_load"))
+ continue;
++
+#if defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_X86_32)
+ /* Don't relocate actual code, they are relocated implicitly by the base address of KERNEL_CS */
++ if (!strcmp(sec_name(sym->st_shndx), ".module.text") && !strcmp(sym_name(sym_strtab, sym), "_etext"))
++ continue;
+ if (!strcmp(sec_name(sym->st_shndx), ".init.text"))
+ continue;
+ if (!strcmp(sec_name(sym->st_shndx), ".exit.text"))
+ continue;
-+ if (!strcmp(sec_name(sym->st_shndx), ".text.head")) {
-+ if (strcmp(sym_name(sym_strtab, sym), "__init_end") &&
-+ strcmp(sym_name(sym_strtab, sym), "KERNEL_TEXT_OFFSET"))
-+ continue;
-+ }
-+ if (!strcmp(sec_name(sym->st_shndx), ".text"))
++ if (!strcmp(sec_name(sym->st_shndx), ".text") && strcmp(sym_name(sym_strtab, sym), "__LOAD_PHYSICAL_ADDR"))
+ continue;
+#endif
if (r_type == R_386_NONE || r_type == R_386_PC32) {
/*
* NONE can be ignored and and PC relative
-@@ -541,7 +602,7 @@ static int cmp_relocs(const void *va, co
+@@ -541,7 +600,7 @@ static int cmp_relocs(const void *va, co
static void emit_relocs(int as_text)
{
@@ -4123,7 +5024,7 @@ diff -urNp linux-2.6.30.8/arch/x86/boot/compressed/relocs.c linux-2.6.30.8/arch/
/* Count how many relocations I have and allocate space for them. */
reloc_count = 0;
walk_relocs(count_reloc);
-@@ -634,6 +695,7 @@ int main(int argc, char **argv)
+@@ -634,6 +693,7 @@ int main(int argc, char **argv)
fname, strerror(errno));
}
read_ehdr(fp);
@@ -4131,9 +5032,9 @@ diff -urNp linux-2.6.30.8/arch/x86/boot/compressed/relocs.c linux-2.6.30.8/arch/
read_shdrs(fp);
read_strtabs(fp);
read_symtabs(fp);
-diff -urNp linux-2.6.30.8/arch/x86/boot/cpucheck.c linux-2.6.30.8/arch/x86/boot/cpucheck.c
---- linux-2.6.30.8/arch/x86/boot/cpucheck.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/cpucheck.c 2009-07-30 09:48:09.918715361 -0400
+diff -urNp linux-2.6.31.4/arch/x86/boot/cpucheck.c linux-2.6.31.4/arch/x86/boot/cpucheck.c
+--- linux-2.6.31.4/arch/x86/boot/cpucheck.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/cpucheck.c 2009-10-11 15:29:40.760169296 -0400
@@ -74,7 +74,7 @@ static int has_fpu(void)
u16 fcw = -1, fsw = -1;
u32 cr0;
@@ -4229,209 +5130,32 @@ diff -urNp linux-2.6.30.8/arch/x86/boot/cpucheck.c linux-2.6.30.8/arch/x86/boot/
err = check_flags();
}
-diff -urNp linux-2.6.30.8/arch/x86/boot/edd.c linux-2.6.30.8/arch/x86/boot/edd.c
---- linux-2.6.30.8/arch/x86/boot/edd.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/edd.c 2009-07-30 09:48:09.919627263 -0400
-@@ -81,7 +81,7 @@ static int get_edd_info(u8 devno, struct
- ax = 0x4100;
- bx = EDDMAGIC1;
- dx = devno;
-- asm("pushfl; stc; int $0x13; setc %%al; popfl"
-+ asm volatile("pushfl; stc; int $0x13; setc %%al; popfl"
- : "+a" (ax), "+b" (bx), "=c" (cx), "+d" (dx)
- : : "esi", "edi");
-
-@@ -100,7 +100,7 @@ static int get_edd_info(u8 devno, struct
- ei->params.length = sizeof(ei->params);
- ax = 0x4800;
- dx = devno;
-- asm("pushfl; int $0x13; popfl"
-+ asm volatile("pushfl; int $0x13; popfl"
- : "+a" (ax), "+d" (dx), "=m" (ei->params)
- : "S" (&ei->params)
- : "ebx", "ecx", "edi");
-@@ -111,7 +111,7 @@ static int get_edd_info(u8 devno, struct
- ax = 0x0800;
- dx = devno;
- di = 0;
-- asm("pushw %%es; "
-+ asm volatile("pushw %%es; "
- "movw %%di,%%es; "
- "pushfl; stc; int $0x13; setc %%al; popfl; "
- "popw %%es"
-diff -urNp linux-2.6.30.8/arch/x86/boot/main.c linux-2.6.30.8/arch/x86/boot/main.c
---- linux-2.6.30.8/arch/x86/boot/main.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/main.c 2009-07-30 09:48:09.919627263 -0400
-@@ -78,7 +78,7 @@ static void query_ist(void)
- if (cpu.level < 6)
- return;
+diff -urNp linux-2.6.31.4/arch/x86/boot/header.S linux-2.6.31.4/arch/x86/boot/header.S
+--- linux-2.6.31.4/arch/x86/boot/header.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/header.S 2009-10-11 15:29:40.761273749 -0400
+@@ -224,7 +224,7 @@ setup_data: .quad 0 # 64-bit physical
+ # single linked list of
+ # struct setup_data
-- asm("int $0x15"
-+ asm volatile("int $0x15"
- : "=a" (boot_params.ist_info.signature),
- "=b" (boot_params.ist_info.command),
- "=c" (boot_params.ist_info.event),
-diff -urNp linux-2.6.30.8/arch/x86/boot/mca.c linux-2.6.30.8/arch/x86/boot/mca.c
---- linux-2.6.30.8/arch/x86/boot/mca.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/mca.c 2009-07-30 09:48:09.919627263 -0400
-@@ -19,7 +19,7 @@ int query_mca(void)
- u8 err;
- u16 es, bx, len;
-
-- asm("pushw %%es ; "
-+ asm volatile("pushw %%es ; "
- "int $0x15 ; "
- "setc %0 ; "
- "movw %%es, %1 ; "
-diff -urNp linux-2.6.30.8/arch/x86/boot/memory.c linux-2.6.30.8/arch/x86/boot/memory.c
---- linux-2.6.30.8/arch/x86/boot/memory.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/memory.c 2009-07-30 09:48:09.919627263 -0400
-@@ -47,7 +47,7 @@ static int detect_memory_e820(void)
- so they must be either used for the error output
- or explicitly marked clobbered. Given that, assume there
- is something out there clobbering %ebp and %edi, too. */
-- asm("pushl %%ebp; int $0x15; popl %%ebp; setc %0"
-+ asm volatile("pushl %%ebp; int $0x15; popl %%ebp; setc %0"
- : "=d" (err), "+b" (next), "=a" (id), "+c" (size),
- "=D" (edi), "+m" (buf)
- : "D" (&buf), "d" (SMAP), "a" (0xe820)
-@@ -83,7 +83,7 @@ static int detect_memory_e801(void)
-
- bx = cx = dx = 0;
- ax = 0xe801;
-- asm("stc; int $0x15; setc %0"
-+ asm volatile("stc; int $0x15; setc %0"
- : "=m" (err), "+a" (ax), "+b" (bx), "+c" (cx), "+d" (dx));
+-pref_address: .quad LOAD_PHYSICAL_ADDR # preferred load addr
++pref_address: .quad ____LOAD_PHYSICAL_ADDR # preferred load addr
- if (err)
-@@ -113,7 +113,7 @@ static int detect_memory_88(void)
- u8 err;
-
- ax = 0x8800;
-- asm("stc; int $0x15; setc %0" : "=bcdm" (err), "+a" (ax));
-+ asm volatile("stc; int $0x15; setc %0" : "=bcdm" (err), "+a" (ax));
-
- boot_params.screen_info.ext_mem_k = ax;
-
-diff -urNp linux-2.6.30.8/arch/x86/boot/video.c linux-2.6.30.8/arch/x86/boot/video.c
---- linux-2.6.30.8/arch/x86/boot/video.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/video.c 2009-07-30 09:48:09.920627513 -0400
-@@ -23,7 +23,7 @@ static void store_cursor_position(void)
-
- ax = 0x0300;
- bx = 0;
-- asm(INT10
-+ asm volatile(INT10
- : "=d" (curpos), "+a" (ax), "+b" (bx)
- : : "ecx", "esi", "edi");
-
-@@ -38,7 +38,7 @@ static void store_video_mode(void)
- /* N.B.: the saving of the video page here is a bit silly,
- since we pretty much assume page 0 everywhere. */
- ax = 0x0f00;
-- asm(INT10
-+ asm volatile(INT10
- : "+a" (ax), "=b" (page)
- : : "ecx", "edx", "esi", "edi");
-
-diff -urNp linux-2.6.30.8/arch/x86/boot/video-vesa.c linux-2.6.30.8/arch/x86/boot/video-vesa.c
---- linux-2.6.30.8/arch/x86/boot/video-vesa.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/boot/video-vesa.c 2009-07-30 09:48:09.920627513 -0400
-@@ -41,7 +41,7 @@ static int vesa_probe(void)
-
- ax = 0x4f00;
- di = (size_t)&vginfo;
-- asm(INT10
-+ asm volatile(INT10
- : "+a" (ax), "+D" (di), "=m" (vginfo)
- : : "ebx", "ecx", "edx", "esi");
-
-@@ -68,7 +68,7 @@ static int vesa_probe(void)
- ax = 0x4f01;
- cx = mode;
- di = (size_t)&vminfo;
-- asm(INT10
-+ asm volatile(INT10
- : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
- : : "ebx", "edx", "esi");
-
-@@ -120,7 +120,7 @@ static int vesa_set_mode(struct mode_inf
- ax = 0x4f01;
- cx = vesa_mode;
- di = (size_t)&vminfo;
-- asm(INT10
-+ asm volatile(INT10
- : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
- : : "ebx", "edx", "esi");
-
-@@ -202,19 +202,20 @@ static void vesa_dac_set_8bits(void)
- /* Save the VESA protected mode info */
- static void vesa_store_pm_info(void)
- {
-- u16 ax, bx, di, es;
-+ u16 ax, bx, cx, di, es;
-
- ax = 0x4f0a;
-- bx = di = 0;
-- asm("pushw %%es; "INT10"; movw %%es,%0; popw %%es"
-- : "=d" (es), "+a" (ax), "+b" (bx), "+D" (di)
-- : : "ecx", "esi");
-+ bx = cx = di = 0;
-+ asm volatile("pushw %%es; "INT10"; movw %%es,%0; popw %%es"
-+ : "=d" (es), "+a" (ax), "+b" (bx), "+c" (cx), "+D" (di)
-+ : : "esi");
-
- if (ax != 0x004f)
- return;
+ #define ZO_INIT_SIZE (ZO__end - ZO_startup_32 + ZO_z_extract_offset)
+ #define VO_INIT_SIZE (VO__end - VO__text)
+diff -urNp linux-2.6.31.4/arch/x86/boot/video-vesa.c linux-2.6.31.4/arch/x86/boot/video-vesa.c
+--- linux-2.6.31.4/arch/x86/boot/video-vesa.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/boot/video-vesa.c 2009-10-11 15:29:40.761273749 -0400
+@@ -205,6 +205,7 @@ static void vesa_store_pm_info(void)
- boot_params.screen_info.vesapm_seg = es;
- boot_params.screen_info.vesapm_off = di;
-+ boot_params.screen_info.vesapm_size = cx;
+ boot_params.screen_info.vesapm_seg = oreg.es;
+ boot_params.screen_info.vesapm_off = oreg.di;
++ boot_params.screen_info.vesapm_size = oreg.cx;
}
/*
-@@ -268,7 +269,7 @@ void vesa_store_edid(void)
- /* Note: The VBE DDC spec is different from the main VESA spec;
- we genuinely have to assume all registers are destroyed here. */
-
-- asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es"
-+ asm volatile("pushw %%es; movw %2,%%es; "INT10"; popw %%es"
- : "+a" (ax), "+b" (bx), "+c" (cx), "+D" (di)
- : : "esi", "edx");
-
-@@ -283,7 +284,7 @@ void vesa_store_edid(void)
- cx = 0; /* Controller 0 */
- dx = 0; /* EDID block number */
- di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */
-- asm(INT10
-+ asm volatile(INT10
- : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info),
- "+c" (cx), "+D" (di)
- : : "esi");
-diff -urNp linux-2.6.30.8/arch/x86/boot/video-vga.c linux-2.6.30.8/arch/x86/boot/video-vga.c
---- linux-2.6.30.8/arch/x86/boot/video-vga.c 2009-07-30 20:32:40.362766121 -0400
-+++ linux-2.6.30.8/arch/x86/boot/video-vga.c 2009-07-30 20:35:05.409914191 -0400
-@@ -260,7 +260,7 @@ static int vga_probe(void)
- u8 vga_flag;
-
- ax = 0x1200;
-- asm(INT10
-+ asm volatile(INT10
- : "+a" (ax), "=b" (ega_bx)
- : "b" (0x10) /* Check EGA/VGA */
- : "ecx", "edx", "esi", "edi");
-@@ -272,7 +272,7 @@ static int vga_probe(void)
- /* If we have MDA/CGA/HGC then BL will be unchanged at 0x10 */
- if ((u8)ega_bx != 0x10) {
- /* EGA/VGA */
-- asm(INT10
-+ asm volatile(INT10
- : "=a" (vga_flag)
- : "a" (0x1a00)
- : "ebx", "ecx", "edx", "esi", "edi");
-diff -urNp linux-2.6.30.8/arch/x86/ia32/ia32_signal.c linux-2.6.30.8/arch/x86/ia32/ia32_signal.c
---- linux-2.6.30.8/arch/x86/ia32/ia32_signal.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/ia32/ia32_signal.c 2009-07-30 09:48:09.921498916 -0400
+diff -urNp linux-2.6.31.4/arch/x86/ia32/ia32_signal.c linux-2.6.31.4/arch/x86/ia32/ia32_signal.c
+--- linux-2.6.31.4/arch/x86/ia32/ia32_signal.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/ia32/ia32_signal.c 2009-10-11 15:29:40.762194225 -0400
@@ -403,7 +403,7 @@ static void __user *get_sigframe(struct
sp -= frame_size;
/* Align the stack pointer according to the i386 ABI,
@@ -4450,39 +5174,21 @@ diff -urNp linux-2.6.30.8/arch/x86/ia32/ia32_signal.c linux-2.6.30.8/arch/x86/ia
};
frame = get_sigframe(ka, regs, sizeof(*frame), &fpstate);
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/alternative.h linux-2.6.30.8/arch/x86/include/asm/alternative.h
---- linux-2.6.30.8/arch/x86/include/asm/alternative.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/alternative.h 2009-07-30 09:48:09.921498916 -0400
-@@ -96,7 +96,7 @@ const unsigned char *const *find_nop_tab
- " .byte 662b-661b\n" /* sourcelen */ \
- " .byte 664f-663f\n" /* replacementlen */ \
- ".previous\n" \
-- ".section .altinstr_replacement,\"ax\"\n" \
-+ ".section .altinstr_replacement,\"a\"\n" \
- "663:\n\t" newinstr "\n664:\n" /* replacement */ \
- ".previous" :: "i" (feature) : "memory")
-
-@@ -120,7 +120,7 @@ const unsigned char *const *find_nop_tab
- " .byte 662b-661b\n" /* sourcelen */ \
- " .byte 664f-663f\n" /* replacementlen */ \
- ".previous\n" \
-- ".section .altinstr_replacement,\"ax\"\n" \
-+ ".section .altinstr_replacement,\"a\"\n" \
- "663:\n\t" newinstr "\n664:\n" /* replacement */ \
- ".previous" :: "i" (feature), ##input)
-
-@@ -135,7 +135,7 @@ const unsigned char *const *find_nop_tab
- " .byte 662b-661b\n" /* sourcelen */ \
- " .byte 664f-663f\n" /* replacementlen */ \
- ".previous\n" \
-- ".section .altinstr_replacement,\"ax\"\n" \
-+ ".section .altinstr_replacement,\"a\"\n" \
- "663:\n\t" newinstr "\n664:\n" /* replacement */ \
- ".previous" : output : [feat] "i" (feature), ##input)
-
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/apm.h linux-2.6.30.8/arch/x86/include/asm/apm.h
---- linux-2.6.30.8/arch/x86/include/asm/apm.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/apm.h 2009-07-30 09:48:09.921498916 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/alternative.h linux-2.6.31.4/arch/x86/include/asm/alternative.h
+--- linux-2.6.31.4/arch/x86/include/asm/alternative.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/alternative.h 2009-10-11 15:29:40.762194225 -0400
+@@ -87,7 +87,7 @@ const unsigned char *const *find_nop_tab
+ " .byte 662b-661b\n" /* sourcelen */ \
+ " .byte 664f-663f\n" /* replacementlen */ \
+ ".previous\n" \
+- ".section .altinstr_replacement, \"ax\"\n" \
++ ".section .altinstr_replacement, \"a\"\n" \
+ "663:\n\t" newinstr "\n664:\n" /* replacement */ \
+ ".previous"
+
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/apm.h linux-2.6.31.4/arch/x86/include/asm/apm.h
+--- linux-2.6.31.4/arch/x86/include/asm/apm.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/apm.h 2009-10-11 15:29:40.762194225 -0400
@@ -34,7 +34,7 @@ static inline void apm_bios_call_asm(u32
__asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t"
@@ -4501,10 +5207,47 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/apm.h linux-2.6.30.8/arch/x86/inc
"setc %%bl\n\t"
"popl %%ebp\n\t"
"popl %%edi\n\t"
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x86/include/asm/atomic_32.h
---- linux-2.6.30.8/arch/x86/include/asm/atomic_32.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/atomic_32.h 2009-07-30 09:48:09.921498916 -0400
-@@ -39,7 +39,29 @@
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/atomic_32.h linux-2.6.31.4/arch/x86/include/asm/atomic_32.h
+--- linux-2.6.31.4/arch/x86/include/asm/atomic_32.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/atomic_32.h 2009-10-11 15:29:40.762194225 -0400
+@@ -25,6 +25,17 @@ static inline int atomic_read(const atom
+ }
+
+ /**
++ * atomic_read_unchecked - read atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically reads the value of @v.
++ */
++static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
++{
++ return v->counter;
++}
++
++/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+@@ -37,6 +48,18 @@ static inline void atomic_set(atomic_t *
+ }
+
+ /**
++ * atomic_set_unchecked - set atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ * @i: required value
++ *
++ * Atomically sets the value of @v to @i.
++ */
++static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i)
++{
++ v->counter = i;
++}
++
++/**
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+@@ -45,7 +68,29 @@ static inline void atomic_set(atomic_t *
*/
static inline void atomic_add(int i, atomic_t *v)
{
@@ -4525,7 +5268,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
+/**
+ * atomic_add_unchecked - add integer to atomic variable
+ * @i: integer value to add
-+ * @v: pointer of type atomic_t
++ * @v: pointer of type atomic_unchecked_t
+ *
+ * Atomically adds @i to @v.
+ */
@@ -4535,7 +5278,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
: "+m" (v->counter)
: "ir" (i));
}
-@@ -53,7 +75,29 @@ static inline void atomic_add(int i, ato
+@@ -59,7 +104,29 @@ static inline void atomic_add(int i, ato
*/
static inline void atomic_sub(int i, atomic_t *v)
{
@@ -4566,7 +5309,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
: "+m" (v->counter)
: "ir" (i));
}
-@@ -71,7 +115,16 @@ static inline int atomic_sub_and_test(in
+@@ -77,7 +144,16 @@ static inline int atomic_sub_and_test(in
{
unsigned char c;
@@ -4584,7 +5327,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
: "+m" (v->counter), "=qm" (c)
: "ir" (i) : "memory");
return c;
-@@ -85,7 +138,30 @@ static inline int atomic_sub_and_test(in
+@@ -91,7 +167,30 @@ static inline int atomic_sub_and_test(in
*/
static inline void atomic_inc(atomic_t *v)
{
@@ -4606,7 +5349,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
+
+/**
+ * atomic_inc_unchecked - increment atomic variable
-+ * @v: pointer of type atomic_t
++ * @v: pointer of type atomic_unchecked_t
+ *
+ * Atomically increments @v by 1.
+ */
@@ -4616,7 +5359,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
: "+m" (v->counter));
}
-@@ -97,7 +173,18 @@ static inline void atomic_inc(atomic_t *
+@@ -103,7 +202,18 @@ static inline void atomic_inc(atomic_t *
*/
static inline void atomic_dec(atomic_t *v)
{
@@ -4636,7 +5379,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
: "+m" (v->counter));
}
-@@ -113,7 +200,19 @@ static inline int atomic_dec_and_test(at
+@@ -119,7 +229,19 @@ static inline int atomic_dec_and_test(at
{
unsigned char c;
@@ -4657,7 +5400,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
: "+m" (v->counter), "=qm" (c)
: : "memory");
return c != 0;
-@@ -131,7 +230,19 @@ static inline int atomic_inc_and_test(at
+@@ -137,7 +259,19 @@ static inline int atomic_inc_and_test(at
{
unsigned char c;
@@ -4678,7 +5421,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
: "+m" (v->counter), "=qm" (c)
: : "memory");
return c != 0;
-@@ -150,7 +261,16 @@ static inline int atomic_add_negative(in
+@@ -156,7 +290,16 @@ static inline int atomic_add_negative(in
{
unsigned char c;
@@ -4696,7 +5439,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
: "+m" (v->counter), "=qm" (c)
: "ir" (i) : "memory");
return c;
-@@ -173,7 +293,15 @@ static inline int atomic_add_return(int
+@@ -179,7 +322,15 @@ static inline int atomic_add_return(int
#endif
/* Modern 486+ processor */
__i = i;
@@ -4713,7 +5456,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
: "+r" (i), "+m" (v->counter)
: : "memory");
return i + __i;
-@@ -214,17 +342,28 @@ static inline int atomic_sub_return(int
+@@ -227,17 +378,28 @@ static inline int atomic_xchg(atomic_t *
*/
static inline int atomic_add_unless(atomic_t *v, int a, int u)
{
@@ -4746,10 +5489,47 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_32.h linux-2.6.30.8/arch/x
}
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x86/include/asm/atomic_64.h
---- linux-2.6.30.8/arch/x86/include/asm/atomic_64.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/atomic_64.h 2009-07-30 09:48:09.922664908 -0400
-@@ -38,7 +38,29 @@
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/atomic_64.h linux-2.6.31.4/arch/x86/include/asm/atomic_64.h
+--- linux-2.6.31.4/arch/x86/include/asm/atomic_64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/atomic_64.h 2009-10-11 15:29:40.763353730 -0400
+@@ -24,6 +24,17 @@ static inline int atomic_read(const atom
+ }
+
+ /**
++ * atomic_read_unchecked - read atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically reads the value of @v.
++ */
++static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
++{
++ return v->counter;
++}
++
++/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+@@ -36,6 +47,18 @@ static inline void atomic_set(atomic_t *
+ }
+
+ /**
++ * atomic_set_unchecked - set atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ * @i: required value
++ *
++ * Atomically sets the value of @v to @i.
++ */
++static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i)
++{
++ v->counter = i;
++}
++
++/**
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+@@ -44,7 +67,29 @@ static inline void atomic_set(atomic_t *
*/
static inline void atomic_add(int i, atomic_t *v)
{
@@ -4770,7 +5550,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
+/**
+ * atomic_add_unchecked - add integer to atomic variable
+ * @i: integer value to add
-+ * @v: pointer of type atomic_t
++ * @v: pointer of type atomic_unchecked_t
+ *
+ * Atomically adds @i to @v.
+ */
@@ -4780,7 +5560,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter)
: "ir" (i), "m" (v->counter));
}
-@@ -52,7 +74,29 @@ static inline void atomic_add(int i, ato
+@@ -58,7 +103,29 @@ static inline void atomic_add(int i, ato
*/
static inline void atomic_sub(int i, atomic_t *v)
{
@@ -4801,7 +5581,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
+/**
+ * atomic_sub_unchecked - subtract the atomic variable
+ * @i: integer value to subtract
-+ * @v: pointer of type atomic_t
++ * @v: pointer of type atomic_unchecked_t
+ *
+ * Atomically subtracts @i from @v.
+ */
@@ -4811,7 +5591,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter)
: "ir" (i), "m" (v->counter));
}
-@@ -70,7 +114,16 @@ static inline int atomic_sub_and_test(in
+@@ -76,7 +143,16 @@ static inline int atomic_sub_and_test(in
{
unsigned char c;
@@ -4829,7 +5609,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter), "=qm" (c)
: "ir" (i), "m" (v->counter) : "memory");
return c;
-@@ -84,7 +137,32 @@ static inline int atomic_sub_and_test(in
+@@ -90,7 +166,32 @@ static inline int atomic_sub_and_test(in
*/
static inline void atomic_inc(atomic_t *v)
{
@@ -4853,7 +5633,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
+
+/**
+ * atomic_inc_unchecked - increment atomic variable
-+ * @v: pointer of type atomic_t
++ * @v: pointer of type atomic_unchecked_t
+ *
+ * Atomically increments @v by 1.
+ */
@@ -4863,7 +5643,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter)
: "m" (v->counter));
}
-@@ -97,7 +175,19 @@ static inline void atomic_inc(atomic_t *
+@@ -103,7 +204,19 @@ static inline void atomic_inc(atomic_t *
*/
static inline void atomic_dec(atomic_t *v)
{
@@ -4884,7 +5664,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter)
: "m" (v->counter));
}
-@@ -114,7 +204,20 @@ static inline int atomic_dec_and_test(at
+@@ -120,7 +233,20 @@ static inline int atomic_dec_and_test(at
{
unsigned char c;
@@ -4906,7 +5686,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -132,7 +235,20 @@ static inline int atomic_inc_and_test(at
+@@ -138,7 +264,20 @@ static inline int atomic_inc_and_test(at
{
unsigned char c;
@@ -4928,7 +5708,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -151,7 +267,16 @@ static inline int atomic_add_negative(in
+@@ -157,7 +296,16 @@ static inline int atomic_add_negative(in
{
unsigned char c;
@@ -4946,7 +5726,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter), "=qm" (c)
: "ir" (i), "m" (v->counter) : "memory");
return c;
-@@ -167,7 +292,15 @@ static inline int atomic_add_negative(in
+@@ -173,7 +321,15 @@ static inline int atomic_add_negative(in
static inline int atomic_add_return(int i, atomic_t *v)
{
int __i = i;
@@ -4963,7 +5743,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "+r" (i), "+m" (v->counter)
: : "memory");
return i + __i;
-@@ -212,7 +345,15 @@ static inline int atomic_sub_return(int
+@@ -224,7 +380,15 @@ static inline void atomic64_set(atomic64
*/
static inline void atomic64_add(long i, atomic64_t *v)
{
@@ -4980,7 +5760,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter)
: "er" (i), "m" (v->counter));
}
-@@ -226,7 +367,15 @@ static inline void atomic64_add(long i,
+@@ -238,7 +402,15 @@ static inline void atomic64_add(long i,
*/
static inline void atomic64_sub(long i, atomic64_t *v)
{
@@ -4997,7 +5777,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter)
: "er" (i), "m" (v->counter));
}
-@@ -244,7 +393,16 @@ static inline int atomic64_sub_and_test(
+@@ -256,7 +428,16 @@ static inline int atomic64_sub_and_test(
{
unsigned char c;
@@ -5015,7 +5795,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter), "=qm" (c)
: "er" (i), "m" (v->counter) : "memory");
return c;
-@@ -258,7 +416,19 @@ static inline int atomic64_sub_and_test(
+@@ -270,7 +451,19 @@ static inline int atomic64_sub_and_test(
*/
static inline void atomic64_inc(atomic64_t *v)
{
@@ -5036,7 +5816,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter)
: "m" (v->counter));
}
-@@ -271,7 +441,19 @@ static inline void atomic64_inc(atomic64
+@@ -283,7 +476,19 @@ static inline void atomic64_inc(atomic64
*/
static inline void atomic64_dec(atomic64_t *v)
{
@@ -5057,7 +5837,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter)
: "m" (v->counter));
}
-@@ -288,7 +470,20 @@ static inline int atomic64_dec_and_test(
+@@ -300,7 +505,20 @@ static inline int atomic64_dec_and_test(
{
unsigned char c;
@@ -5079,7 +5859,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -306,7 +501,20 @@ static inline int atomic64_inc_and_test(
+@@ -318,7 +536,20 @@ static inline int atomic64_inc_and_test(
{
unsigned char c;
@@ -5101,7 +5881,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -325,7 +533,16 @@ static inline int atomic64_add_negative(
+@@ -337,7 +568,16 @@ static inline int atomic64_add_negative(
{
unsigned char c;
@@ -5119,7 +5899,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "=m" (v->counter), "=qm" (c)
: "er" (i), "m" (v->counter) : "memory");
return c;
-@@ -341,7 +558,15 @@ static inline int atomic64_add_negative(
+@@ -353,7 +593,15 @@ static inline int atomic64_add_negative(
static inline long atomic64_add_return(long i, atomic64_t *v)
{
long __i = i;
@@ -5136,7 +5916,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
: "+r" (i), "+m" (v->counter)
: : "memory");
return i + __i;
-@@ -372,17 +597,29 @@ static inline long atomic64_sub_return(l
+@@ -398,17 +646,29 @@ static inline long atomic_xchg(atomic_t
*/
static inline int atomic_add_unless(atomic_t *v, int a, int u)
{
@@ -5170,7 +5950,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
}
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-@@ -398,17 +635,29 @@ static inline int atomic_add_unless(atom
+@@ -424,17 +684,29 @@ static inline int atomic_add_unless(atom
*/
static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
{
@@ -5204,11 +5984,11 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/atomic_64.h linux-2.6.30.8/arch/x
}
/**
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/boot.h linux-2.6.30.8/arch/x86/include/asm/boot.h
---- linux-2.6.30.8/arch/x86/include/asm/boot.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/boot.h 2009-07-30 09:48:09.922664908 -0400
-@@ -9,10 +9,15 @@
- #ifdef __KERNEL__
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/boot.h linux-2.6.31.4/arch/x86/include/asm/boot.h
+--- linux-2.6.31.4/arch/x86/include/asm/boot.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/boot.h 2009-10-11 15:29:40.763353730 -0400
+@@ -11,10 +11,15 @@
+ #include <asm/pgtable_types.h>
/* Physical address where kernel should be loaded. */
-#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
@@ -5221,12 +6001,12 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/boot.h linux-2.6.30.8/arch/x86/in
+#define LOAD_PHYSICAL_ADDR ((unsigned long)__LOAD_PHYSICAL_ADDR)
+#endif
+
- #ifdef CONFIG_KERNEL_BZIP2
- #define BOOT_HEAP_SIZE 0x400000
- #else /* !CONFIG_KERNEL_BZIP2 */
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/cache.h linux-2.6.30.8/arch/x86/include/asm/cache.h
---- linux-2.6.30.8/arch/x86/include/asm/cache.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/cache.h 2009-07-30 09:48:09.923412137 -0400
+ /* Minimum kernel alignment, as a power of two */
+ #ifdef CONFIG_X86_64
+ #define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/cache.h linux-2.6.31.4/arch/x86/include/asm/cache.h
+--- linux-2.6.31.4/arch/x86/include/asm/cache.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/cache.h 2009-10-11 15:29:40.763353730 -0400
@@ -6,6 +6,7 @@
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
@@ -5235,9 +6015,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/cache.h linux-2.6.30.8/arch/x86/i
#ifdef CONFIG_X86_VSMP
/* vSMP Internode cacheline shift */
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/checksum_32.h linux-2.6.30.8/arch/x86/include/asm/checksum_32.h
---- linux-2.6.30.8/arch/x86/include/asm/checksum_32.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/checksum_32.h 2009-07-30 09:48:09.923412137 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/checksum_32.h linux-2.6.31.4/arch/x86/include/asm/checksum_32.h
+--- linux-2.6.31.4/arch/x86/include/asm/checksum_32.h 2009-10-12 23:26:17.489391684 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/checksum_32.h 2009-10-12 23:26:38.910153076 -0400
@@ -31,6 +31,14 @@ asmlinkage __wsum csum_partial_copy_gene
int len, __wsum sum,
int *src_err_ptr, int *dst_err_ptr);
@@ -5262,7 +6042,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/checksum_32.h linux-2.6.30.8/arch
len, sum, err_ptr, NULL);
}
-@@ -177,7 +185,7 @@ static inline __wsum csum_and_copy_to_us
+@@ -178,7 +186,7 @@ static inline __wsum csum_and_copy_to_us
{
might_sleep();
if (access_ok(VERIFY_WRITE, dst, len))
@@ -5271,10 +6051,18 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/checksum_32.h linux-2.6.30.8/arch
len, sum, NULL, err_ptr);
if (len)
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/desc.h linux-2.6.30.8/arch/x86/include/asm/desc.h
---- linux-2.6.30.8/arch/x86/include/asm/desc.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/desc.h 2009-07-30 09:48:09.923412137 -0400
-@@ -16,6 +16,7 @@ static inline void fill_ldt(struct desc_
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/desc.h linux-2.6.31.4/arch/x86/include/asm/desc.h
+--- linux-2.6.31.4/arch/x86/include/asm/desc.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/desc.h 2009-10-12 23:12:54.950348398 -0400
+@@ -4,6 +4,7 @@
+ #include <asm/desc_defs.h>
+ #include <asm/ldt.h>
+ #include <asm/mmu.h>
++#include <asm/pgtable.h>
+ #include <linux/smp.h>
+
+ static inline void fill_ldt(struct desc_struct *desc,
+@@ -15,6 +16,7 @@ static inline void fill_ldt(struct desc_
desc->base1 = (info->base_addr & 0x00ff0000) >> 16;
desc->type = (info->read_exec_only ^ 1) << 1;
desc->type |= info->contents << 2;
@@ -5282,7 +6070,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/desc.h linux-2.6.30.8/arch/x86/in
desc->s = 1;
desc->dpl = 0x3;
desc->p = info->seg_not_present ^ 1;
-@@ -32,16 +33,12 @@ static inline void fill_ldt(struct desc_
+@@ -31,16 +33,12 @@ static inline void fill_ldt(struct desc_
}
extern struct desc_ptr idt_descr;
@@ -5302,41 +6090,21 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/desc.h linux-2.6.30.8/arch/x86/in
}
#ifdef CONFIG_X86_64
-@@ -116,19 +113,48 @@ static inline void paravirt_free_ldt(str
+@@ -115,19 +113,24 @@ static inline void paravirt_free_ldt(str
static inline void native_write_idt_entry(gate_desc *idt, int entry,
const gate_desc *gate)
{
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
memcpy(&idt[entry], gate, sizeof(*gate));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
static inline void native_write_ldt_entry(struct desc_struct *ldt, int entry,
const void *desc)
{
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
memcpy(&ldt[entry], desc, 8);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
static inline void native_write_gdt_entry(struct desc_struct *gdt, int entry,
@@ -5344,72 +6112,42 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/desc.h linux-2.6.30.8/arch/x86/in
{
unsigned int size;
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
switch (type) {
case DESC_TSS:
size = sizeof(tss_desc);
-@@ -140,7 +166,17 @@ static inline void native_write_gdt_entr
+@@ -139,7 +142,10 @@ static inline void native_write_gdt_entr
size = sizeof(struct desc_struct);
break;
}
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
memcpy(&gdt[entry], desc, size);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
static inline void pack_descriptor(struct desc_struct *desc, unsigned long base,
-@@ -212,7 +248,19 @@ static inline void native_set_ldt(const
+@@ -211,7 +217,9 @@ static inline void native_set_ldt(const
static inline void native_load_tr_desc(void)
{
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
static inline void native_load_gdt(const struct desc_ptr *dtr)
-@@ -247,8 +295,19 @@ static inline void native_load_tls(struc
+@@ -246,8 +254,10 @@ static inline void native_load_tls(struc
unsigned int i;
struct desc_struct *gdt = get_cpu_gdt_table(cpu);
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
for (i = 0; i < GDT_ENTRY_TLS_ENTRIES; i++)
gdt[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i];
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
#define _LDT_empty(info) \
-@@ -380,6 +439,18 @@ static inline void set_system_intr_gate_
+@@ -379,4 +389,16 @@ static inline void set_system_intr_gate_
_set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS);
}
@@ -5425,12 +6163,64 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/desc.h linux-2.6.30.8/arch/x86/in
+}
+#endif
+
- #else
- /*
- * GET_DESC_BASE reads the descriptor base of the specified segment.
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/e820.h linux-2.6.30.8/arch/x86/include/asm/e820.h
---- linux-2.6.30.8/arch/x86/include/asm/e820.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/e820.h 2009-07-30 09:48:09.924429298 -0400
+ #endif /* _ASM_X86_DESC_H */
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/device.h linux-2.6.31.4/arch/x86/include/asm/device.h
+--- linux-2.6.31.4/arch/x86/include/asm/device.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/device.h 2009-10-11 15:29:56.562357747 -0400
+@@ -6,7 +6,7 @@ struct dev_archdata {
+ void *acpi_handle;
+ #endif
+ #ifdef CONFIG_X86_64
+-struct dma_map_ops *dma_ops;
++ const struct dma_map_ops *dma_ops;
+ #endif
+ #ifdef CONFIG_DMAR
+ void *iommu; /* hook for IOMMU specific extension */
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/dma-mapping.h linux-2.6.31.4/arch/x86/include/asm/dma-mapping.h
+--- linux-2.6.31.4/arch/x86/include/asm/dma-mapping.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/dma-mapping.h 2009-10-11 15:29:56.563916619 -0400
+@@ -19,9 +19,9 @@ extern int iommu_merge;
+ extern struct device x86_dma_fallback_dev;
+ extern int panic_on_overflow;
+
+-extern struct dma_map_ops *dma_ops;
++extern const struct dma_map_ops *dma_ops;
+
+-static inline struct dma_map_ops *get_dma_ops(struct device *dev)
++static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
+ {
+ #ifdef CONFIG_X86_32
+ return dma_ops;
+@@ -38,7 +38,7 @@ static inline struct dma_map_ops *get_dm
+ /* Make sure we keep the same behaviour */
+ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+ if (ops->mapping_error)
+ return ops->mapping_error(dev, dma_addr);
+
+@@ -98,7 +98,7 @@ static inline void *
+ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
+ gfp_t gfp)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+ void *memory;
+
+ gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
+@@ -127,7 +127,7 @@ dma_alloc_coherent(struct device *dev, s
+ static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t bus)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ WARN_ON(irqs_disabled()); /* for portability */
+
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/e820.h linux-2.6.31.4/arch/x86/include/asm/e820.h
+--- linux-2.6.31.4/arch/x86/include/asm/e820.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/e820.h 2009-10-11 15:29:40.764338399 -0400
@@ -135,7 +135,7 @@ extern char *memory_setup(void);
#define ISA_END_ADDRESS 0x100000
#define is_ISA_range(s, e) ((s) >= ISA_START_ADDRESS && (e) < ISA_END_ADDRESS)
@@ -5440,9 +6230,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/e820.h linux-2.6.30.8/arch/x86/in
#define BIOS_END 0x00100000
#ifdef __KERNEL__
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/elf.h linux-2.6.30.8/arch/x86/include/asm/elf.h
---- linux-2.6.30.8/arch/x86/include/asm/elf.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/elf.h 2009-07-30 09:48:09.927602624 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/elf.h linux-2.6.31.4/arch/x86/include/asm/elf.h
+--- linux-2.6.31.4/arch/x86/include/asm/elf.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/elf.h 2009-10-11 15:29:40.764338399 -0400
@@ -263,7 +263,25 @@ extern int force_personality32;
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -5469,7 +6259,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/elf.h linux-2.6.30.8/arch/x86/inc
/* 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,
-@@ -315,8 +333,7 @@ do { \
+@@ -317,8 +335,7 @@ do { \
#define ARCH_DLINFO \
do { \
if (vdso_enabled) \
@@ -5479,7 +6269,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/elf.h linux-2.6.30.8/arch/x86/inc
} while (0)
#define AT_SYSINFO 32
-@@ -327,7 +344,7 @@ do { \
+@@ -329,7 +346,7 @@ do { \
#endif /* !CONFIG_X86_32 */
@@ -5488,7 +6278,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/elf.h linux-2.6.30.8/arch/x86/inc
#define VDSO_ENTRY \
((unsigned long)VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall))
-@@ -341,7 +358,4 @@ extern int arch_setup_additional_pages(s
+@@ -343,7 +360,4 @@ extern int arch_setup_additional_pages(s
extern int syscall32_setup_pages(struct linux_binprm *, int exstack);
#define compat_arch_setup_additional_pages syscall32_setup_pages
@@ -5496,9 +6286,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/elf.h linux-2.6.30.8/arch/x86/inc
-#define arch_randomize_brk arch_randomize_brk
-
#endif /* _ASM_X86_ELF_H */
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/futex.h linux-2.6.30.8/arch/x86/include/asm/futex.h
---- linux-2.6.30.8/arch/x86/include/asm/futex.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/futex.h 2009-07-30 09:48:09.927602624 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/futex.h linux-2.6.31.4/arch/x86/include/asm/futex.h
+--- linux-2.6.31.4/arch/x86/include/asm/futex.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/futex.h 2009-10-11 15:29:40.764338399 -0400
@@ -11,6 +11,40 @@
#include <asm/processor.h>
#include <asm/system.h>
@@ -5610,10 +6400,10 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/futex.h linux-2.6.30.8/arch/x86/i
: "memory"
);
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/i387.h linux-2.6.30.8/arch/x86/include/asm/i387.h
---- linux-2.6.30.8/arch/x86/include/asm/i387.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/i387.h 2009-07-30 09:48:09.927602624 -0400
-@@ -203,13 +203,8 @@ static inline void restore_fpu(struct ta
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/i387.h linux-2.6.31.4/arch/x86/include/asm/i387.h
+--- linux-2.6.31.4/arch/x86/include/asm/i387.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/i387.h 2009-10-11 15:29:40.764338399 -0400
+@@ -194,13 +194,8 @@ static inline int fxrstor_checking(struc
}
/* We need a safe address that is cheap to find and that is already
@@ -5629,9 +6419,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/i387.h linux-2.6.30.8/arch/x86/in
/*
* These must be called with preempt disabled
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/io_64.h linux-2.6.30.8/arch/x86/include/asm/io_64.h
---- linux-2.6.30.8/arch/x86/include/asm/io_64.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/io_64.h 2009-07-30 09:48:09.927602624 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/io_64.h linux-2.6.31.4/arch/x86/include/asm/io_64.h
+--- linux-2.6.31.4/arch/x86/include/asm/io_64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/io_64.h 2009-10-11 15:29:40.765316562 -0400
@@ -140,6 +140,17 @@ __OUTS(l)
#include <linux/vmalloc.h>
@@ -5650,36 +6440,54 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/io_64.h linux-2.6.30.8/arch/x86/i
#include <asm-generic/iomap.h>
void __memcpy_fromio(void *, unsigned long, unsigned);
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/irqflags.h linux-2.6.30.8/arch/x86/include/asm/irqflags.h
---- linux-2.6.30.8/arch/x86/include/asm/irqflags.h 2009-08-24 20:46:56.210924412 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/irqflags.h 2009-08-24 21:08:41.524545551 -0400
-@@ -147,6 +147,8 @@ static inline unsigned long __raw_local_
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/iommu.h linux-2.6.31.4/arch/x86/include/asm/iommu.h
+--- linux-2.6.31.4/arch/x86/include/asm/iommu.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/iommu.h 2009-10-11 15:29:56.563916619 -0400
+@@ -3,7 +3,7 @@
+
+ extern void pci_iommu_shutdown(void);
+ extern void no_iommu_init(void);
+-extern struct dma_map_ops nommu_dma_ops;
++extern const struct dma_map_ops nommu_dma_ops;
+ extern int force_iommu, no_iommu;
+ extern int iommu_detected;
+ extern int iommu_pass_through;
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/irqflags.h linux-2.6.31.4/arch/x86/include/asm/irqflags.h
+--- linux-2.6.31.4/arch/x86/include/asm/irqflags.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/irqflags.h 2009-10-18 10:12:57.682033309 -0400
+@@ -147,6 +147,27 @@ static inline unsigned long __raw_local_
#define INTERRUPT_RETURN iret
#define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
#define GET_CR0_INTO_EAX movl %cr0, %eax
-+#define GET_CR0_INTO_EDX movl %cr0, %edx
-+#define SET_CR0_FROM_EDX movl %edx, %cr0
++
++/* PaX: special register usage in entry_32.S, beware */
++#ifdef CONFIG_PAX_KERNEXEC
++#define PAX_RESTORE_KERNEL \
++ bt $16, %esi; \
++ jc 1f; \
++ movl %esi, %cr0; \
++1:
++
++#define PAX_CLOSE_KERNEL \
++ movl %cr0, %esi; \
++ movl %esi, %edx; \
++ bts $16, %edx; \
++ jc 1f; \
++ movl %edx, %cr0; \
++1:
++#else
++#define PAX_RESTORE_KERNEL
++#define PAX_CLOSE_KERNEL
++#endif
++
#endif
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/kmap_types.h linux-2.6.30.8/arch/x86/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/x86/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/kmap_types.h 2009-07-30 09:48:09.928623877 -0400
-@@ -21,7 +21,8 @@ D(9) KM_IRQ0,
- D(10) KM_IRQ1,
- D(11) KM_SOFTIRQ0,
- D(12) KM_SOFTIRQ1,
--D(13) KM_TYPE_NR
-+D(13) KM_CLEARPAGE,
-+D(14) KM_TYPE_NR
- };
-
- #undef D
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/kvm_host.h linux-2.6.30.8/arch/x86/include/asm/kvm_host.h
---- linux-2.6.30.8/arch/x86/include/asm/kvm_host.h 2009-09-09 17:37:32.538127379 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/kvm_host.h 2009-09-09 17:37:48.994379464 -0400
-@@ -532,7 +532,7 @@ struct kvm_x86_ops {
- int (*get_mt_mask_shift)(void);
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/kvm_host.h linux-2.6.31.4/arch/x86/include/asm/kvm_host.h
+--- linux-2.6.31.4/arch/x86/include/asm/kvm_host.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/kvm_host.h 2009-10-11 15:29:40.765316562 -0400
+@@ -528,7 +528,7 @@ struct kvm_x86_ops {
+ u64 (*get_mt_mask)(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio);
};
-extern struct kvm_x86_ops *kvm_x86_ops;
@@ -5687,9 +6495,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/kvm_host.h linux-2.6.30.8/arch/x8
int kvm_mmu_module_init(void);
void kvm_mmu_module_exit(void);
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/local.h linux-2.6.30.8/arch/x86/include/asm/local.h
---- linux-2.6.30.8/arch/x86/include/asm/local.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/local.h 2009-07-30 09:48:09.929617473 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/local.h linux-2.6.31.4/arch/x86/include/asm/local.h
+--- linux-2.6.31.4/arch/x86/include/asm/local.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/local.h 2009-10-11 15:29:40.766258235 -0400
@@ -18,26 +18,90 @@ typedef struct {
static inline void local_inc(local_t *l)
@@ -5914,9 +6722,35 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/local.h linux-2.6.30.8/arch/x86/i
: "+r" (i), "+m" (l->a.counter)
: : "memory");
return i + __i;
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/mman.h linux-2.6.30.8/arch/x86/include/asm/mman.h
---- linux-2.6.30.8/arch/x86/include/asm/mman.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/mman.h 2009-07-30 09:48:09.929617473 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/microcode.h linux-2.6.31.4/arch/x86/include/asm/microcode.h
+--- linux-2.6.31.4/arch/x86/include/asm/microcode.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/microcode.h 2009-10-11 15:29:56.563916619 -0400
+@@ -38,18 +38,18 @@ struct ucode_cpu_info {
+ extern struct ucode_cpu_info ucode_cpu_info[];
+
+ #ifdef CONFIG_MICROCODE_INTEL
+-extern struct microcode_ops * __init init_intel_microcode(void);
++extern const struct microcode_ops * __init init_intel_microcode(void);
+ #else
+-static inline struct microcode_ops * __init init_intel_microcode(void)
++static inline const struct microcode_ops * __init init_intel_microcode(void)
+ {
+ return NULL;
+ }
+ #endif /* CONFIG_MICROCODE_INTEL */
+
+ #ifdef CONFIG_MICROCODE_AMD
+-extern struct microcode_ops * __init init_amd_microcode(void);
++extern const struct microcode_ops * __init init_amd_microcode(void);
+ #else
+-static inline struct microcode_ops * __init init_amd_microcode(void)
++static inline const struct microcode_ops * __init init_amd_microcode(void)
+ {
+ return NULL;
+ }
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/mman.h linux-2.6.31.4/arch/x86/include/asm/mman.h
+--- linux-2.6.31.4/arch/x86/include/asm/mman.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/mman.h 2009-10-11 15:29:40.766258235 -0400
@@ -17,4 +17,14 @@
#define MCL_CURRENT 1 /* lock all current mappings */
#define MCL_FUTURE 2 /* lock all future mappings */
@@ -5932,9 +6766,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/mman.h linux-2.6.30.8/arch/x86/in
+#endif
+
#endif /* _ASM_X86_MMAN_H */
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/mmu_context.h linux-2.6.30.8/arch/x86/include/asm/mmu_context.h
---- linux-2.6.30.8/arch/x86/include/asm/mmu_context.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/mmu_context.h 2009-07-30 09:48:09.929617473 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/mmu_context.h linux-2.6.31.4/arch/x86/include/asm/mmu_context.h
+--- linux-2.6.31.4/arch/x86/include/asm/mmu_context.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/mmu_context.h 2009-10-11 15:29:40.767275438 -0400
@@ -34,11 +34,17 @@ static inline void switch_mm(struct mm_s
struct task_struct *tsk)
{
@@ -6000,9 +6834,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/mmu_context.h linux-2.6.30.8/arch
}
}
#endif
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/mmu.h linux-2.6.30.8/arch/x86/include/asm/mmu.h
---- linux-2.6.30.8/arch/x86/include/asm/mmu.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/mmu.h 2009-07-30 09:48:09.929617473 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/mmu.h linux-2.6.31.4/arch/x86/include/asm/mmu.h
+--- linux-2.6.31.4/arch/x86/include/asm/mmu.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/mmu.h 2009-10-11 15:29:40.767275438 -0400
@@ -9,10 +9,23 @@
* we put the segment information here.
*/
@@ -6029,9 +6863,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/mmu.h linux-2.6.30.8/arch/x86/inc
} mm_context_t;
#ifdef CONFIG_SMP
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/module.h linux-2.6.30.8/arch/x86/include/asm/module.h
---- linux-2.6.30.8/arch/x86/include/asm/module.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/module.h 2009-07-30 11:10:48.877547128 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/module.h linux-2.6.31.4/arch/x86/include/asm/module.h
+--- linux-2.6.31.4/arch/x86/include/asm/module.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/module.h 2009-10-11 15:29:40.767275438 -0400
@@ -74,7 +74,12 @@ struct mod_arch_specific {};
# else
# define MODULE_STACKSIZE ""
@@ -6046,26 +6880,13 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/module.h linux-2.6.30.8/arch/x86/
#endif
#endif /* _ASM_X86_MODULE_H */
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/page_32_types.h linux-2.6.30.8/arch/x86/include/asm/page_32_types.h
---- linux-2.6.30.8/arch/x86/include/asm/page_32_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/page_32_types.h 2009-07-30 09:48:09.930625879 -0400
-@@ -15,6 +15,23 @@
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/page_32_types.h linux-2.6.31.4/arch/x86/include/asm/page_32_types.h
+--- linux-2.6.31.4/arch/x86/include/asm/page_32_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/page_32_types.h 2009-10-11 15:29:40.768245747 -0400
+@@ -15,6 +15,10 @@
*/
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
-+#ifdef CONFIG_PAX_KERNEXEC
-+#ifndef __ASSEMBLY__
-+extern unsigned char MODULES_VADDR[];
-+extern unsigned char MODULES_END[];
-+extern unsigned char KERNEL_TEXT_OFFSET[];
-+#define ktla_ktva(addr) (addr + (unsigned long)KERNEL_TEXT_OFFSET)
-+#define ktva_ktla(addr) (addr - (unsigned long)KERNEL_TEXT_OFFSET)
-+#endif
-+#else
-+#define ktla_ktva(addr) (addr)
-+#define ktva_ktla(addr) (addr)
-+#endif
-+
+#ifdef CONFIG_PAX_PAGEEXEC
+#define CONFIG_ARCH_TRACK_EXEC_LIMIT 1
+#endif
@@ -6073,23 +6894,138 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/page_32_types.h linux-2.6.30.8/ar
#ifdef CONFIG_4KSTACKS
#define THREAD_ORDER 0
#else
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/page_64_types.h linux-2.6.30.8/arch/x86/include/asm/page_64_types.h
---- linux-2.6.30.8/arch/x86/include/asm/page_64_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/page_64_types.h 2009-07-30 09:48:09.930625879 -0400
-@@ -47,6 +47,9 @@
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/page_64_types.h linux-2.6.31.4/arch/x86/include/asm/page_64_types.h
+--- linux-2.6.31.4/arch/x86/include/asm/page_64_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/page_64_types.h 2009-10-11 15:29:40.786205701 -0400
+@@ -39,6 +39,9 @@
#define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START)
#define __START_KERNEL_map _AC(0xffffffff80000000, UL)
+#define ktla_ktva(addr) (addr)
+#define ktva_ktla(addr) (addr)
+
- /* See Documentation/x86_64/mm.txt for a description of the memory map. */
+ /* See Documentation/x86/x86_64/mm.txt for a description of the memory map. */
#define __PHYSICAL_MASK_SHIFT 46
- #define __VIRTUAL_MASK_SHIFT 48
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/paravirt.h linux-2.6.30.8/arch/x86/include/asm/paravirt.h
---- linux-2.6.30.8/arch/x86/include/asm/paravirt.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/paravirt.h 2009-07-30 09:48:09.931536832 -0400
-@@ -1688,7 +1688,7 @@ static inline unsigned long __raw_local_
+ #define __VIRTUAL_MASK_SHIFT 47
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/paravirt.h linux-2.6.31.4/arch/x86/include/asm/paravirt.h
+--- linux-2.6.31.4/arch/x86/include/asm/paravirt.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/paravirt.h 2009-10-18 10:08:40.907788965 -0400
+@@ -350,6 +350,12 @@ struct pv_mmu_ops {
+ an mfn. We can tell which is which from the index. */
+ void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
+ phys_addr_t phys, pgprot_t flags);
++
++#ifdef CONFIG_PAX_KERNEXEC
++ unsigned long (*pax_open_kernel)(void);
++ unsigned long (*pax_close_kernel)(void);
++#endif
++
+ };
+
+ struct raw_spinlock;
+@@ -528,10 +534,11 @@ int paravirt_disable_iospace(void);
+ #define EXTRA_CLOBBERS
+ #define VEXTRA_CLOBBERS
+ #else /* CONFIG_X86_64 */
++/* [re]ax isn't an arg, but the return val */
+ #define PVOP_VCALL_ARGS \
+ unsigned long __edi = __edi, __esi = __esi, \
+- __edx = __edx, __ecx = __ecx
+-#define PVOP_CALL_ARGS PVOP_VCALL_ARGS, __eax
++ __edx = __edx, __ecx = __ecx, __eax = __eax
++#define PVOP_CALL_ARGS PVOP_VCALL_ARGS
+
+ #define PVOP_CALL_ARG1(x) "D" ((unsigned long)(x))
+ #define PVOP_CALL_ARG2(x) "S" ((unsigned long)(x))
+@@ -543,6 +550,7 @@ int paravirt_disable_iospace(void);
+ "=c" (__ecx)
+ #define PVOP_CALL_CLOBBERS PVOP_VCALL_CLOBBERS, "=a" (__eax)
+
++/* void functions are still allowed [re]ax for scratch */
+ #define PVOP_VCALLEE_CLOBBERS "=a" (__eax)
+ #define PVOP_CALLEE_CLOBBERS PVOP_VCALLEE_CLOBBERS
+
+@@ -617,8 +625,8 @@ int paravirt_disable_iospace(void);
+ VEXTRA_CLOBBERS, \
+ pre, post, ##__VA_ARGS__)
+
+-#define __PVOP_VCALLEESAVE(rettype, op, pre, post, ...) \
+- ____PVOP_CALL(rettype, op.func, CLBR_RET_REG, \
++#define __PVOP_VCALLEESAVE(op, pre, post, ...) \
++ ____PVOP_VCALL(op.func, CLBR_RET_REG, \
+ PVOP_VCALLEE_CLOBBERS, , \
+ pre, post, ##__VA_ARGS__)
+
+@@ -1437,6 +1445,21 @@ static inline void __set_fixmap(unsigned
+ pv_mmu_ops.set_fixmap(idx, phys, flags);
+ }
+
++#ifdef CONFIG_PAX_KERNEXEC
++static inline unsigned long pax_open_kernel(void)
++{
++ return pv_mmu_ops.pax_open_kernel();
++}
++
++static inline unsigned long pax_close_kernel(void)
++{
++ return pv_mmu_ops.pax_close_kernel();
++}
++#else
++static inline unsigned long pax_open_kernel(void) { return 0; }
++static inline unsigned long pax_close_kernel(void) { return 0; }
++#endif
++
+ void _paravirt_nop(void);
+ u32 _paravirt_ident_32(u32);
+ u64 _paravirt_ident_64(u64);
+@@ -1565,42 +1588,22 @@ extern struct paravirt_patch_site __para
+
+ static inline unsigned long __raw_local_save_flags(void)
+ {
+- unsigned long f;
+-
+- asm volatile(paravirt_alt(PARAVIRT_CALL)
+- : "=a"(f)
+- : paravirt_type(pv_irq_ops.save_fl),
+- paravirt_clobber(CLBR_EAX)
+- : "memory", "cc");
+- return f;
++ return PVOP_CALLEE0(unsigned long, pv_irq_ops.save_fl);
+ }
+
+ static inline void raw_local_irq_restore(unsigned long f)
+ {
+- asm volatile(paravirt_alt(PARAVIRT_CALL)
+- : "=a"(f)
+- : PV_FLAGS_ARG(f),
+- paravirt_type(pv_irq_ops.restore_fl),
+- paravirt_clobber(CLBR_EAX)
+- : "memory", "cc");
++ return PVOP_VCALLEE1(pv_irq_ops.restore_fl, f);
+ }
+
+ static inline void raw_local_irq_disable(void)
+ {
+- asm volatile(paravirt_alt(PARAVIRT_CALL)
+- :
+- : paravirt_type(pv_irq_ops.irq_disable),
+- paravirt_clobber(CLBR_EAX)
+- : "memory", "eax", "cc");
++ PVOP_VCALLEE0(pv_irq_ops.irq_disable);
+ }
+
+ static inline void raw_local_irq_enable(void)
+ {
+- asm volatile(paravirt_alt(PARAVIRT_CALL)
+- :
+- : paravirt_type(pv_irq_ops.irq_enable),
+- paravirt_clobber(CLBR_EAX)
+- : "memory", "eax", "cc");
++ PVOP_VCALLEE0(pv_irq_ops.irq_enable);
+ }
+
+ static inline unsigned long __raw_local_irq_save(void)
+@@ -1688,7 +1691,7 @@ static inline unsigned long __raw_local_
#define PARA_PATCH(struct, off) ((PARAVIRT_PATCH_##struct + (off)) / 4)
#define PARA_SITE(ptype, clobbers, ops) _PVSITE(ptype, clobbers, ops, .long, 4)
@@ -6098,10 +7034,55 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/paravirt.h linux-2.6.30.8/arch/x8
#endif
#define INTERRUPT_RETURN \
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgalloc.h linux-2.6.30.8/arch/x86/include/asm/pgalloc.h
---- linux-2.6.30.8/arch/x86/include/asm/pgalloc.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/pgalloc.h 2009-09-05 22:09:36.037016937 -0400
-@@ -52,6 +52,13 @@ static inline void pmd_populate_kernel(s
+@@ -1713,6 +1716,27 @@ static inline unsigned long __raw_local_
+ jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_usergs_sysret32))
+
+ #ifdef CONFIG_X86_32
++
++#ifdef CONFIG_PAX_KERNEXEC
++#define PAX_RESTORE_KERNEL \
++ bt $16, %esi; \
++ jc 1f; \
++ push %eax; push %ecx; \
++ movl %esi, %eax; \
++ call PARA_INDIRECT(pv_cpu_ops+PV_CPU_write_cr0); \
++ pop %ecx; pop %eax; \
++1:
++
++#define PAX_CLOSE_KERNEL \
++ push %eax; push %ecx; \
++ call PARA_INDIRECT(pv_mmu_ops+PV_MMU_pax_close_kernel); \
++ movl %eax, %esi; \
++ pop %ecx; pop %eax
++#else
++#define PAX_RESTORE_KERNEL
++#define PAX_CLOSE_KERNEL
++#endif
++
+ #define GET_CR0_INTO_EAX \
+ push %ecx; push %edx; \
+ call PARA_INDIRECT(pv_cpu_ops+PV_CPU_read_cr0); \
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/pci_x86.h linux-2.6.31.4/arch/x86/include/asm/pci_x86.h
+--- linux-2.6.31.4/arch/x86/include/asm/pci_x86.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/pci_x86.h 2009-10-11 15:29:56.563916619 -0400
+@@ -95,10 +95,10 @@ struct pci_raw_ops {
+ int reg, int len, u32 val);
+ };
+
+-extern struct pci_raw_ops *raw_pci_ops;
+-extern struct pci_raw_ops *raw_pci_ext_ops;
++extern const struct pci_raw_ops *raw_pci_ops;
++extern const struct pci_raw_ops *raw_pci_ext_ops;
+
+-extern struct pci_raw_ops pci_direct_conf1;
++extern const struct pci_raw_ops pci_direct_conf1;
+ extern bool port_cf9_safe;
+
+ /* arch_initcall level */
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/pgalloc.h linux-2.6.31.4/arch/x86/include/asm/pgalloc.h
+--- linux-2.6.31.4/arch/x86/include/asm/pgalloc.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/pgalloc.h 2009-10-11 15:29:40.786205701 -0400
+@@ -58,6 +58,13 @@ static inline void pmd_populate_kernel(s
pmd_t *pmd, pte_t *pte)
{
paravirt_alloc_pte(mm, __pa(pte) >> PAGE_SHIFT);
@@ -6115,32 +7096,22 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgalloc.h linux-2.6.30.8/arch/x86
set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE));
}
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable-2level.h linux-2.6.30.8/arch/x86/include/asm/pgtable-2level.h
---- linux-2.6.30.8/arch/x86/include/asm/pgtable-2level.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/pgtable-2level.h 2009-07-30 09:48:09.931536832 -0400
-@@ -18,7 +18,19 @@ static inline void native_set_pte(pte_t
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/pgtable-2level.h linux-2.6.31.4/arch/x86/include/asm/pgtable-2level.h
+--- linux-2.6.31.4/arch/x86/include/asm/pgtable-2level.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/pgtable-2level.h 2009-10-12 23:12:55.019577525 -0400
+@@ -18,7 +18,9 @@ static inline void native_set_pte(pte_t
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
{
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
*pmdp = pmd;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_32.h linux-2.6.30.8/arch/x86/include/asm/pgtable_32.h
---- linux-2.6.30.8/arch/x86/include/asm/pgtable_32.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/pgtable_32.h 2009-09-05 22:09:36.076613109 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/pgtable_32.h linux-2.6.31.4/arch/x86/include/asm/pgtable_32.h
+--- linux-2.6.31.4/arch/x86/include/asm/pgtable_32.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/pgtable_32.h 2009-10-11 15:29:40.787291048 -0400
@@ -26,8 +26,6 @@
struct mm_struct;
struct vm_area_struct;
@@ -6160,9 +7131,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_32.h linux-2.6.30.8/arch/
+#endif
+
#if defined(CONFIG_HIGHPTE)
- #define pte_offset_map(dir, address) \
- ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) + \
-@@ -80,6 +83,9 @@ do { \
+ #define __KM_PTE \
+ (in_nmi() ? KM_NMI_PTE : \
+@@ -84,6 +87,9 @@ do { \
#endif /* !__ASSEMBLY__ */
@@ -6172,55 +7143,68 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_32.h linux-2.6.30.8/arch/
/*
* kern_addr_valid() is (1) for FLATMEM and (0) for
* SPARSEMEM and DISCONTIGMEM
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable-3level.h linux-2.6.30.8/arch/x86/include/asm/pgtable-3level.h
---- linux-2.6.30.8/arch/x86/include/asm/pgtable-3level.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/pgtable-3level.h 2009-07-30 09:48:09.931536832 -0400
-@@ -38,12 +38,36 @@ static inline void native_set_pte_atomic
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/pgtable_32_types.h linux-2.6.31.4/arch/x86/include/asm/pgtable_32_types.h
+--- linux-2.6.31.4/arch/x86/include/asm/pgtable_32_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/pgtable_32_types.h 2009-10-11 15:29:40.787291048 -0400
+@@ -8,7 +8,7 @@
+ */
+ #ifdef CONFIG_X86_PAE
+ # include <asm/pgtable-3level_types.h>
+-# define PMD_SIZE (1UL << PMD_SHIFT)
++# define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
+ # define PMD_MASK (~(PMD_SIZE - 1))
+ #else
+ # include <asm/pgtable-2level_types.h>
+@@ -46,6 +46,19 @@ extern bool __vmalloc_start_set; /* set
+ # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)
+ #endif
- static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
- {
-+
+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
++#ifndef __ASSEMBLY__
++extern unsigned char MODULES_EXEC_VADDR[];
++extern unsigned char MODULES_EXEC_END[];
+#endif
-+
- set_64bit((unsigned long long *)(pmdp), native_pmd_val(pmd));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
++#include <asm/boot.h>
++#define ktla_ktva(addr) (addr + LOAD_PHYSICAL_ADDR + PAGE_OFFSET)
++#define ktva_ktla(addr) (addr - LOAD_PHYSICAL_ADDR - PAGE_OFFSET)
++#else
++#define ktla_ktva(addr) (addr)
++#define ktva_ktla(addr) (addr)
+#endif
+
+ #define MODULES_VADDR VMALLOC_START
+ #define MODULES_END VMALLOC_END
+ #define MODULES_LEN (MODULES_VADDR - MODULES_END)
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/pgtable-3level.h linux-2.6.31.4/arch/x86/include/asm/pgtable-3level.h
+--- linux-2.6.31.4/arch/x86/include/asm/pgtable-3level.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/pgtable-3level.h 2009-10-12 23:12:55.020133311 -0400
+@@ -38,12 +38,16 @@ static inline void native_set_pte_atomic
+
+ static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
+ {
++ pax_open_kernel();
+ set_64bit((unsigned long long *)(pmdp), native_pmd_val(pmd));
++ pax_close_kernel();
}
static inline void native_set_pud(pud_t *pudp, pud_t pud)
{
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
set_64bit((unsigned long long *)(pudp), native_pud_val(pud));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
/*
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_64.h linux-2.6.30.8/arch/x86/include/asm/pgtable_64.h
---- linux-2.6.30.8/arch/x86/include/asm/pgtable_64.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/pgtable_64.h 2009-09-05 22:09:36.083864233 -0400
-@@ -16,9 +16,11 @@
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/pgtable_64.h linux-2.6.31.4/arch/x86/include/asm/pgtable_64.h
+--- linux-2.6.31.4/arch/x86/include/asm/pgtable_64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/pgtable_64.h 2009-10-12 23:12:55.021186264 -0400
+@@ -16,9 +16,12 @@
extern pud_t level3_kernel_pgt[512];
extern pud_t level3_ident_pgt[512];
+extern pud_t level3_vmalloc_pgt[512];
+extern pud_t level3_vmemmap_pgt[512];
++extern pud_t level2_vmemmap_pgt[512];
extern pmd_t level2_kernel_pgt[512];
extern pmd_t level2_fixmap_pgt[512];
-extern pmd_t level2_ident_pgt[512];
@@ -6228,30 +7212,60 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_64.h linux-2.6.30.8/arch/
extern pgd_t init_level4_pgt[];
#define swapper_pg_dir init_level4_pgt
-@@ -78,7 +80,19 @@ static inline pte_t native_ptep_get_and_
+@@ -74,7 +77,9 @@ static inline pte_t native_ptep_get_and_
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
{
++ pax_open_kernel();
+ *pmdp = pmd;
++ pax_close_kernel();
+ }
+
+ static inline void native_pmd_clear(pmd_t *pmd)
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/pgtable.h linux-2.6.31.4/arch/x86/include/asm/pgtable.h
+--- linux-2.6.31.4/arch/x86/include/asm/pgtable.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/pgtable.h 2009-10-14 17:20:19.872322390 -0400
+@@ -84,12 +84,51 @@ static inline void __init paravirt_paget
+
+ #define arch_end_context_switch(prev) do {} while(0)
+
++#define pax_open_kernel() native_pax_open_kernel()
++#define pax_close_kernel() native_pax_close_kernel()
+ #endif /* CONFIG_PARAVIRT */
+
++#define __HAVE_ARCH_PAX_OPEN_KERNEL
++#define __HAVE_ARCH_PAX_CLOSE_KERNEL
+
+#ifdef CONFIG_PAX_KERNEXEC
++static inline unsigned long native_pax_open_kernel(void)
++{
+ unsigned long cr0;
+
-+ pax_open_kernel(cr0);
-+#endif
++ preempt_disable();
++ barrier();
++ cr0 = read_cr0();
++ if (likely(cr0 & X86_CR0_WP))
++ write_cr0(cr0 & ~X86_CR0_WP);
++ return cr0;
++}
+
- *pmdp = pmd;
++static inline unsigned long native_pax_close_kernel(void)
++{
++ unsigned long cr0;
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
++ cr0 = read_cr0();
++ if (likely(!(cr0 & X86_CR0_WP)))
++ write_cr0(cr0 | X86_CR0_WP);
++ barrier();
++ preempt_enable_no_resched();
++ return cr0;
++}
++#else
++static inline unsigned long native_pax_open_kernel(void) { return 0; }
++static inline unsigned long native_pax_close_kernel(void) { return 0; }
+#endif
+
- }
-
- static inline void native_pmd_clear(pmd_t *pmd)
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable.h linux-2.6.30.8/arch/x86/include/asm/pgtable.h
---- linux-2.6.30.8/arch/x86/include/asm/pgtable.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/pgtable.h 2009-07-30 09:48:09.932929020 -0400
-@@ -87,6 +87,11 @@ static inline void __init paravirt_paget
+ /*
* The following only work if pte_present() is true.
* Undefined behaviour if not..
*/
@@ -6263,7 +7277,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable.h linux-2.6.30.8/arch/x86
static inline int pte_dirty(pte_t pte)
{
return pte_flags(pte) & _PAGE_DIRTY;
-@@ -169,9 +174,29 @@ static inline pte_t pte_wrprotect(pte_t
+@@ -172,9 +211,29 @@ static inline pte_t pte_wrprotect(pte_t
return pte_clear_flags(pte, _PAGE_RW);
}
@@ -6294,7 +7308,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable.h linux-2.6.30.8/arch/x86
}
static inline pte_t pte_mkdirty(pte_t pte)
-@@ -467,7 +492,7 @@ static inline pud_t *pud_offset(pgd_t *p
+@@ -482,7 +541,7 @@ static inline pud_t *pud_offset(pgd_t *p
static inline int pgd_bad(pgd_t pgd)
{
@@ -6303,30 +7317,20 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable.h linux-2.6.30.8/arch/x86
}
static inline int pgd_none(pgd_t pgd)
-@@ -606,7 +631,19 @@ static inline void ptep_set_wrprotect(st
+@@ -623,7 +682,9 @@ static inline void ptep_set_wrprotect(st
*/
static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count)
{
- memcpy(dst, src, count * sizeof(pgd_t));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
+ memcpy(dst, src, count * sizeof(pgd_t));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_types.h linux-2.6.30.8/arch/x86/include/asm/pgtable_types.h
---- linux-2.6.30.8/arch/x86/include/asm/pgtable_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/pgtable_types.h 2009-07-30 19:56:23.227966500 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/pgtable_types.h linux-2.6.31.4/arch/x86/include/asm/pgtable_types.h
+--- linux-2.6.31.4/arch/x86/include/asm/pgtable_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/pgtable_types.h 2009-10-11 15:29:40.788262670 -0400
@@ -16,12 +16,11 @@
#define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */
#define _PAGE_BIT_PAT 7 /* on 4KB pages */
@@ -6334,7 +7338,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_types.h linux-2.6.30.8/ar
-#define _PAGE_BIT_UNUSED1 9 /* available for programmer */
+#define _PAGE_BIT_SPECIAL 9 /* special mappings, no associated struct page */
#define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */
- #define _PAGE_BIT_UNUSED3 11
+ #define _PAGE_BIT_HIDDEN 11 /* hidden by kmemcheck */
#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
-#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1
-#define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1
@@ -6348,18 +7352,21 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_types.h linux-2.6.30.8/ar
#define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
-#define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1)
#define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP)
- #define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3)
#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
-@@ -51,7 +49,7 @@
+ #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
+@@ -55,8 +53,10 @@
+
#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
- #else
--#define _PAGE_NX (_AT(pteval_t, 0))
-+#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3)
+-#else
++#elif defined(CONFIG_KMEMCHECK)
+ #define _PAGE_NX (_AT(pteval_t, 0))
++#else
++#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN)
#endif
#define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE)
-@@ -88,6 +86,9 @@
+@@ -93,6 +93,9 @@
#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
_PAGE_ACCESSED)
@@ -6369,7 +7376,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_types.h linux-2.6.30.8/ar
#define __PAGE_KERNEL_EXEC \
(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
#define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
-@@ -98,8 +99,8 @@
+@@ -103,8 +106,8 @@
#define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC)
#define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT)
#define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD)
@@ -6380,7 +7387,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_types.h linux-2.6.30.8/ar
#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
#define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE)
#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
-@@ -158,8 +159,8 @@
+@@ -163,8 +166,8 @@
* bits are combined, this will alow user to access the high address mapped
* VDSO in the presence of CONFIG_COMPAT_VDSO
*/
@@ -6391,22 +7398,26 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/pgtable_types.h linux-2.6.30.8/ar
#define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
#endif
-@@ -272,7 +273,11 @@ static inline pteval_t pte_flags(pte_t p
+@@ -277,7 +280,15 @@ static inline pteval_t pte_flags(pte_t p
typedef struct page *pgtable_t;
extern pteval_t __supported_pte_mask;
+#ifdef CONFIG_X86_32
++#ifdef CONFIG_X86_PAE
extern int nx_enabled;
+#else
++#define nx_enabled (0)
++#endif
++#else
+#define nx_enabled (1)
+#endif
- extern void set_nx(void);
#define pgprot_writecombine pgprot_writecombine
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/processor.h linux-2.6.30.8/arch/x86/include/asm/processor.h
---- linux-2.6.30.8/arch/x86/include/asm/processor.h 2009-09-26 23:07:15.350360380 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/processor.h 2009-09-26 23:07:26.411879783 -0400
-@@ -270,7 +270,7 @@ struct tss_struct {
+ extern pgprot_t pgprot_writecombine(pgprot_t prot);
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/processor.h linux-2.6.31.4/arch/x86/include/asm/processor.h
+--- linux-2.6.31.4/arch/x86/include/asm/processor.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/processor.h 2009-10-11 15:29:40.789238393 -0400
+@@ -271,7 +271,7 @@ struct tss_struct {
} ____cacheline_aligned;
@@ -6415,7 +7426,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/processor.h linux-2.6.30.8/arch/x
/*
* Save the original ist values for checking stack pointers during debugging
-@@ -876,8 +876,17 @@ static inline void spin_lock_prefetch(co
+@@ -900,8 +900,17 @@ static inline void spin_lock_prefetch(co
*/
#define TASK_SIZE PAGE_OFFSET
#define TASK_SIZE_MAX TASK_SIZE
@@ -6434,7 +7445,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/processor.h linux-2.6.30.8/arch/x
#define INIT_THREAD { \
.sp0 = sizeof(init_stack) + (long)&init_stack, \
-@@ -895,7 +904,7 @@ static inline void spin_lock_prefetch(co
+@@ -918,7 +927,7 @@ static inline void spin_lock_prefetch(co
*/
#define INIT_TSS { \
.x86_tss = { \
@@ -6443,7 +7454,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/processor.h linux-2.6.30.8/arch/x
.ss0 = __KERNEL_DS, \
.ss1 = __KERNEL_CS, \
.io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \
-@@ -906,11 +915,7 @@ static inline void spin_lock_prefetch(co
+@@ -929,11 +938,7 @@ static inline void spin_lock_prefetch(co
extern unsigned long thread_saved_pc(struct task_struct *tsk);
#define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long))
@@ -6456,7 +7467,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/processor.h linux-2.6.30.8/arch/x
/*
* The below -8 is to reserve 8 bytes on top of the ring0 stack.
-@@ -925,7 +930,7 @@ extern unsigned long thread_saved_pc(str
+@@ -948,7 +953,7 @@ extern unsigned long thread_saved_pc(str
#define task_pt_regs(task) \
({ \
struct pt_regs *__regs__; \
@@ -6465,7 +7476,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/processor.h linux-2.6.30.8/arch/x
__regs__ - 1; \
})
-@@ -941,7 +946,7 @@ extern unsigned long thread_saved_pc(str
+@@ -964,7 +969,7 @@ extern unsigned long thread_saved_pc(str
* space during mmap's.
*/
#define IA32_PAGE_OFFSET ((current->personality & ADDR_LIMIT_3GB) ? \
@@ -6474,7 +7485,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/processor.h linux-2.6.30.8/arch/x
#define TASK_SIZE (test_thread_flag(TIF_IA32) ? \
IA32_PAGE_OFFSET : TASK_SIZE_MAX)
-@@ -978,6 +983,10 @@ extern void start_thread(struct pt_regs
+@@ -1001,6 +1006,10 @@ extern void start_thread(struct pt_regs
*/
#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
@@ -6485,9 +7496,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/processor.h linux-2.6.30.8/arch/x
#define KSTK_EIP(task) (task_pt_regs(task)->ip)
/* Get/set a process' ability to use the timestamp counter instruction */
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/ptrace.h linux-2.6.30.8/arch/x86/include/asm/ptrace.h
---- linux-2.6.30.8/arch/x86/include/asm/ptrace.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/ptrace.h 2009-07-30 09:48:09.933533479 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/ptrace.h linux-2.6.31.4/arch/x86/include/asm/ptrace.h
+--- linux-2.6.31.4/arch/x86/include/asm/ptrace.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/ptrace.h 2009-10-11 15:29:40.789238393 -0400
@@ -151,28 +151,29 @@ static inline unsigned long regs_return_
}
@@ -6524,9 +7535,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/ptrace.h linux-2.6.30.8/arch/x86/
#endif
}
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/reboot.h linux-2.6.30.8/arch/x86/include/asm/reboot.h
---- linux-2.6.30.8/arch/x86/include/asm/reboot.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/reboot.h 2009-07-30 09:48:09.933533479 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/reboot.h linux-2.6.31.4/arch/x86/include/asm/reboot.h
+--- linux-2.6.31.4/arch/x86/include/asm/reboot.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/reboot.h 2009-10-11 15:29:40.789238393 -0400
@@ -18,7 +18,7 @@ extern struct machine_ops machine_ops;
void native_machine_crash_shutdown(struct pt_regs *regs);
@@ -6536,9 +7547,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/reboot.h linux-2.6.30.8/arch/x86/
typedef void (*nmi_shootdown_cb)(int, struct die_args*);
void nmi_shootdown_cpus(nmi_shootdown_cb callback);
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/rwsem.h linux-2.6.30.8/arch/x86/include/asm/rwsem.h
---- linux-2.6.30.8/arch/x86/include/asm/rwsem.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/rwsem.h 2009-07-30 09:48:09.934667198 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/rwsem.h linux-2.6.31.4/arch/x86/include/asm/rwsem.h
+--- linux-2.6.31.4/arch/x86/include/asm/rwsem.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/rwsem.h 2009-10-11 15:29:40.790147132 -0400
@@ -106,10 +106,26 @@ static inline void __down_read(struct rw
{
asm volatile("# beginning down_read\n\t"
@@ -6771,9 +7782,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/rwsem.h linux-2.6.30.8/arch/x86/i
: "+r" (tmp), "+m" (sem->count)
: : "memory");
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/segment.h linux-2.6.30.8/arch/x86/include/asm/segment.h
---- linux-2.6.30.8/arch/x86/include/asm/segment.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/segment.h 2009-07-30 09:48:09.934667198 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/segment.h linux-2.6.31.4/arch/x86/include/asm/segment.h
+--- linux-2.6.31.4/arch/x86/include/asm/segment.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/segment.h 2009-10-11 15:29:40.790147132 -0400
@@ -88,7 +88,7 @@
#define GDT_ENTRY_ESPFIX_SS (GDT_ENTRY_KERNEL_BASE + 14)
#define __ESPFIX_SS (GDT_ENTRY_ESPFIX_SS * 8)
@@ -6805,9 +7816,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/segment.h linux-2.6.30.8/arch/x86
#else
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/spinlock.h linux-2.6.30.8/arch/x86/include/asm/spinlock.h
---- linux-2.6.30.8/arch/x86/include/asm/spinlock.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/spinlock.h 2009-07-30 09:48:09.934667198 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/spinlock.h linux-2.6.31.4/arch/x86/include/asm/spinlock.h
+--- linux-2.6.31.4/arch/x86/include/asm/spinlock.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/spinlock.h 2009-10-11 15:29:40.790147132 -0400
@@ -249,18 +249,50 @@ static inline int __raw_write_can_lock(r
static inline void __raw_read_lock(raw_rwlock_t *rw)
{
@@ -6911,9 +7922,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/spinlock.h linux-2.6.30.8/arch/x8
: "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
}
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/system.h linux-2.6.30.8/arch/x86/include/asm/system.h
---- linux-2.6.30.8/arch/x86/include/asm/system.h 2009-09-26 23:07:15.353790143 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/system.h 2009-09-26 23:07:26.432712429 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/system.h linux-2.6.31.4/arch/x86/include/asm/system.h
+--- linux-2.6.31.4/arch/x86/include/asm/system.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/system.h 2009-10-12 23:12:55.051359241 -0400
@@ -227,7 +227,7 @@ static inline unsigned long get_limit(un
{
unsigned long __limit;
@@ -6923,31 +7934,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/system.h linux-2.6.30.8/arch/x86/
}
static inline void native_clts(void)
-@@ -353,6 +353,23 @@ static inline void native_wbinvd(void)
-
- #define stts() write_cr0(read_cr0() | X86_CR0_TS)
-
-+#define pax_open_kernel(cr0) \
-+do { \
-+ typecheck(unsigned long, cr0); \
-+ preempt_disable(); \
-+ barrier(); \
-+ cr0 = read_cr0(); \
-+ write_cr0(cr0 & ~X86_CR0_WP); \
-+} while (0)
-+
-+#define pax_close_kernel(cr0) \
-+do { \
-+ typecheck(unsigned long, cr0); \
-+ write_cr0(cr0); \
-+ barrier(); \
-+ preempt_enable_no_resched(); \
-+} while (0)
-+
- #endif /* __KERNEL__ */
-
- static inline void clflush(volatile void *__p)
-@@ -367,7 +384,7 @@ void enable_hlt(void);
+@@ -367,7 +367,7 @@ void enable_hlt(void);
void cpu_idle_wait(void);
@@ -6956,9 +7943,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/system.h linux-2.6.30.8/arch/x86/
extern void free_init_pages(char *what, unsigned long begin, unsigned long end);
void default_idle(void);
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess_32.h linux-2.6.30.8/arch/x86/include/asm/uaccess_32.h
---- linux-2.6.30.8/arch/x86/include/asm/uaccess_32.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/uaccess_32.h 2009-07-30 09:48:09.936413079 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/uaccess_32.h linux-2.6.31.4/arch/x86/include/asm/uaccess_32.h
+--- linux-2.6.31.4/arch/x86/include/asm/uaccess_32.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/uaccess_32.h 2009-10-11 15:29:40.792163155 -0400
@@ -44,6 +44,9 @@ unsigned long __must_check __copy_from_u
static __always_inline unsigned long __must_check
__copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
@@ -7088,9 +8075,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess_32.h linux-2.6.30.8/arch/
long __must_check strncpy_from_user(char *dst, const char __user *src,
long count);
long __must_check __strncpy_from_user(char *dst,
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess_64.h linux-2.6.30.8/arch/x86/include/asm/uaccess_64.h
---- linux-2.6.30.8/arch/x86/include/asm/uaccess_64.h 2009-07-30 20:32:40.365617606 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/uaccess_64.h 2009-07-30 20:32:47.927601167 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/uaccess_64.h linux-2.6.31.4/arch/x86/include/asm/uaccess_64.h
+--- linux-2.6.31.4/arch/x86/include/asm/uaccess_64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/uaccess_64.h 2009-10-11 15:29:40.792163155 -0400
@@ -10,6 +10,8 @@
#include <linux/lockdep.h>
#include <asm/page.h>
@@ -7241,13 +8228,14 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess_64.h linux-2.6.30.8/arch/
copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest);
#endif /* _ASM_X86_UACCESS_64_H */
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess.h linux-2.6.30.8/arch/x86/include/asm/uaccess.h
---- linux-2.6.30.8/arch/x86/include/asm/uaccess.h 2009-07-30 20:32:40.364705510 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/uaccess.h 2009-08-09 07:48:47.926451868 -0400
-@@ -8,8 +8,10 @@
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/uaccess.h linux-2.6.31.4/arch/x86/include/asm/uaccess.h
+--- linux-2.6.31.4/arch/x86/include/asm/uaccess.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/uaccess.h 2009-10-11 15:29:40.793142234 -0400
+@@ -8,8 +8,11 @@
#include <linux/thread_info.h>
#include <linux/prefetch.h>
#include <linux/string.h>
++#include <linux/sched.h>
+#include <linux/slab.h>
#include <asm/asm.h>
#include <asm/page.h>
@@ -7255,7 +8243,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess.h linux-2.6.30.8/arch/x86
#define VERIFY_READ 0
#define VERIFY_WRITE 1
-@@ -29,7 +31,12 @@
+@@ -29,7 +32,12 @@
#define get_ds() (KERNEL_DS)
#define get_fs() (current_thread_info()->addr_limit)
@@ -7268,7 +8256,35 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess.h linux-2.6.30.8/arch/x86
#define segment_eq(a, b) ((a).seg == (b).seg)
-@@ -183,13 +190,21 @@ extern int __get_user_bad(void);
+@@ -77,7 +85,26 @@
+ * checks that the pointer is in the user space range - after calling
+ * this function, memory access functions may still return -EFAULT.
+ */
+-#define access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
++#define access_ok(type, addr, size) \
++({ \
++ bool __ret_ao = __range_not_ok(addr, size) == 0; \
++ unsigned long __addr_ao = (unsigned long)addr & PAGE_MASK; \
++ unsigned long __end_ao = (unsigned long)addr + size - 1; \
++ if (__ret_ao && unlikely((__end_ao ^ __addr_ao) & PAGE_MASK)) { \
++ for (; __addr_ao <= __end_ao; __addr_ao += PAGE_SIZE) { \
++ char __c_ao; \
++ if (size > PAGE_SIZE) \
++ cond_resched(); \
++ if (__get_user(__c_ao, (char __user *)__addr_ao))\
++ break; \
++ if (type != VERIFY_WRITE) \
++ continue; \
++ if (__put_user(__c_ao, (char __user *)__addr_ao))\
++ break; \
++ } \
++ } \
++ __ret_ao; \
++})
+
+ /*
+ * The exception table consists of pairs of addresses: the first is the
+@@ -183,13 +210,21 @@ extern int __get_user_bad(void);
asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
: "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
@@ -7293,7 +8309,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess.h linux-2.6.30.8/arch/x86
".section .fixup,\"ax\"\n" \
"4: movl %3,%0\n" \
" jmp 3b\n" \
-@@ -197,15 +212,18 @@ extern int __get_user_bad(void);
+@@ -197,15 +232,18 @@ extern int __get_user_bad(void);
_ASM_EXTABLE(1b, 4b) \
_ASM_EXTABLE(2b, 4b) \
: "=r" (err) \
@@ -7316,7 +8332,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess.h linux-2.6.30.8/arch/x86
#define __put_user_x8(x, ptr, __ret_pu) \
asm volatile("call __put_user_8" : "=a" (__ret_pu) \
-@@ -374,16 +392,18 @@ do { \
+@@ -374,16 +412,18 @@ do { \
} while (0)
#define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
@@ -7338,7 +8354,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess.h linux-2.6.30.8/arch/x86
#define __get_user_size_ex(x, ptr, size) \
do { \
-@@ -407,10 +427,12 @@ do { \
+@@ -407,10 +447,12 @@ do { \
} while (0)
#define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
@@ -7353,7 +8369,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess.h linux-2.6.30.8/arch/x86
#define __put_user_nocheck(x, ptr, size) \
({ \
-@@ -438,21 +460,26 @@ struct __large_struct { unsigned long bu
+@@ -438,21 +480,26 @@ struct __large_struct { unsigned long bu
* aliasing issues.
*/
#define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
@@ -7384,7 +8400,7 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess.h linux-2.6.30.8/arch/x86
/*
* uaccess_try and catch
-@@ -567,6 +594,7 @@ extern struct movsl_mask {
+@@ -567,6 +614,7 @@ extern struct movsl_mask {
#define ARCH_HAS_NOCACHE_UACCESS 1
@@ -7392,9 +8408,9 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/uaccess.h linux-2.6.30.8/arch/x86
#ifdef CONFIG_X86_32
# include "uaccess_32.h"
#else
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/vgtod.h linux-2.6.30.8/arch/x86/include/asm/vgtod.h
---- linux-2.6.30.8/arch/x86/include/asm/vgtod.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/vgtod.h 2009-07-30 09:48:09.936413079 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/vgtod.h linux-2.6.31.4/arch/x86/include/asm/vgtod.h
+--- linux-2.6.31.4/arch/x86/include/asm/vgtod.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/vgtod.h 2009-10-11 15:29:40.793142234 -0400
@@ -14,6 +14,7 @@ struct vsyscall_gtod_data {
int sysctl_enabled;
struct timezone sys_tz;
@@ -7403,9 +8419,20 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/vgtod.h linux-2.6.30.8/arch/x86/i
cycle_t (*vread)(void);
cycle_t cycle_last;
cycle_t mask;
-diff -urNp linux-2.6.30.8/arch/x86/include/asm/vsyscall.h linux-2.6.30.8/arch/x86/include/asm/vsyscall.h
---- linux-2.6.30.8/arch/x86/include/asm/vsyscall.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/include/asm/vsyscall.h 2009-07-30 09:48:09.937413620 -0400
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/vmi.h linux-2.6.31.4/arch/x86/include/asm/vmi.h
+--- linux-2.6.31.4/arch/x86/include/asm/vmi.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/vmi.h 2009-10-11 15:29:56.563916619 -0400
+@@ -191,6 +191,7 @@ struct vrom_header {
+ u8 reserved[96]; /* Reserved for headers */
+ char vmi_init[8]; /* VMI_Init jump point */
+ char get_reloc[8]; /* VMI_GetRelocationInfo jump point */
++ char rom_data[8048]; /* rest of the option ROM */
+ } __attribute__((packed));
+
+ struct pnp_header {
+diff -urNp linux-2.6.31.4/arch/x86/include/asm/vsyscall.h linux-2.6.31.4/arch/x86/include/asm/vsyscall.h
+--- linux-2.6.31.4/arch/x86/include/asm/vsyscall.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/include/asm/vsyscall.h 2009-10-11 15:29:40.793142234 -0400
@@ -15,9 +15,10 @@ enum vsyscall_num {
#ifdef __KERNEL__
@@ -7436,50 +8463,10 @@ diff -urNp linux-2.6.30.8/arch/x86/include/asm/vsyscall.h linux-2.6.30.8/arch/x8
#endif /* __KERNEL__ */
#endif /* _ASM_X86_VSYSCALL_H */
-diff -urNp linux-2.6.30.8/arch/x86/Kconfig linux-2.6.30.8/arch/x86/Kconfig
---- linux-2.6.30.8/arch/x86/Kconfig 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/Kconfig 2009-08-04 17:52:34.387861424 -0400
-@@ -345,6 +345,7 @@ config X86_VSMP
- select PARAVIRT
- depends on X86_64 && PCI
- depends on X86_EXTENDED_PLATFORM
-+ depends on !PAX_KERNEXEC
- ---help---
- Support for ScaleMP vSMP systems. Say 'Y' here if this kernel is
- supposed to run on these EM64T-based machines. Only choose this option
-@@ -464,6 +465,7 @@ config VMI
- bool "VMI Guest support"
- select PARAVIRT
- depends on X86_32
-+ depends on !PAX_KERNEXEC
- ---help---
- VMI provides a paravirtualized interface to the VMware ESX server
- (it could be used by other hypervisors in theory too, but is not
-@@ -474,6 +476,7 @@ config KVM_CLOCK
- bool "KVM paravirtualized clock"
- select PARAVIRT
- select PARAVIRT_CLOCK
-+ depends on !PAX_KERNEXEC
- ---help---
- Turning on this option will allow you to run a paravirtualized clock
- when running over the KVM hypervisor. Instead of relying on a PIT
-@@ -484,6 +487,7 @@ config KVM_CLOCK
- config KVM_GUEST
- bool "KVM Guest support"
- select PARAVIRT
-+ depends on !PAX_KERNEXEC
- ---help---
- This option enables various optimizations for running under the KVM
- hypervisor.
-@@ -492,6 +496,7 @@ source "arch/x86/lguest/Kconfig"
-
- config PARAVIRT
- bool "Enable paravirtualization code"
-+ depends on !PAX_KERNEXEC
- ---help---
- This changes the kernel so it can modify itself when it is run
- under a hypervisor, potentially improving performance significantly
-@@ -1058,7 +1063,7 @@ config PAGE_OFFSET
+diff -urNp linux-2.6.31.4/arch/x86/Kconfig linux-2.6.31.4/arch/x86/Kconfig
+--- linux-2.6.31.4/arch/x86/Kconfig 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/Kconfig 2009-10-11 15:29:40.794132399 -0400
+@@ -1098,7 +1098,7 @@ config PAGE_OFFSET
hex
default 0xB0000000 if VMSPLIT_3G_OPT
default 0x80000000 if VMSPLIT_2G
@@ -7488,7 +8475,7 @@ diff -urNp linux-2.6.30.8/arch/x86/Kconfig linux-2.6.30.8/arch/x86/Kconfig
default 0x40000000 if VMSPLIT_1G
default 0xC0000000
depends on X86_32
-@@ -1376,7 +1381,7 @@ config X86_PAT
+@@ -1416,7 +1416,7 @@ config X86_PAT
config EFI
bool "EFI runtime service support"
@@ -7497,28 +8484,7 @@ diff -urNp linux-2.6.30.8/arch/x86/Kconfig linux-2.6.30.8/arch/x86/Kconfig
---help---
This enables the kernel to use EFI runtime services that are
available (such as the EFI variable services).
-@@ -1466,9 +1471,7 @@ config KEXEC_JUMP
-
- config PHYSICAL_START
- hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
-- default "0x1000000" if X86_NUMAQ
-- default "0x200000" if X86_64
-- default "0x100000"
-+ default "0x1000000"
- ---help---
- This gives the physical address where the kernel is loaded.
-
-@@ -1527,8 +1530,7 @@ config RELOCATABLE
- config PHYSICAL_ALIGN
- hex
- prompt "Alignment value to which kernel should be aligned" if X86_32
-- default "0x100000" if X86_32
-- default "0x200000" if X86_64
-+ default "0x200000"
- range 0x2000 0x400000
- ---help---
- This value puts the alignment restrictions on physical address
-@@ -1560,9 +1562,10 @@ config HOTPLUG_CPU
+@@ -1602,9 +1602,10 @@ config HOTPLUG_CPU
Say N if you want to disable CPU hotplug.
config COMPAT_VDSO
@@ -7530,9 +8496,9 @@ diff -urNp linux-2.6.30.8/arch/x86/Kconfig linux-2.6.30.8/arch/x86/Kconfig
---help---
Map the 32-bit VDSO to the predictable old-style address too.
---help---
-diff -urNp linux-2.6.30.8/arch/x86/Kconfig.cpu linux-2.6.30.8/arch/x86/Kconfig.cpu
---- linux-2.6.30.8/arch/x86/Kconfig.cpu 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/Kconfig.cpu 2009-07-30 09:48:09.916592662 -0400
+diff -urNp linux-2.6.31.4/arch/x86/Kconfig.cpu linux-2.6.31.4/arch/x86/Kconfig.cpu
+--- linux-2.6.31.4/arch/x86/Kconfig.cpu 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/Kconfig.cpu 2009-10-11 15:29:40.794132399 -0400
@@ -331,7 +331,7 @@ config X86_PPRO_FENCE
config X86_F00F_BUG
@@ -7560,9 +8526,9 @@ diff -urNp linux-2.6.30.8/arch/x86/Kconfig.cpu linux-2.6.30.8/arch/x86/Kconfig.c
config X86_MINIMUM_CPU_FAMILY
int
-diff -urNp linux-2.6.30.8/arch/x86/Kconfig.debug linux-2.6.30.8/arch/x86/Kconfig.debug
---- linux-2.6.30.8/arch/x86/Kconfig.debug 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/Kconfig.debug 2009-07-30 09:48:09.916592662 -0400
+diff -urNp linux-2.6.31.4/arch/x86/Kconfig.debug linux-2.6.31.4/arch/x86/Kconfig.debug
+--- linux-2.6.31.4/arch/x86/Kconfig.debug 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/Kconfig.debug 2009-10-11 15:29:40.794132399 -0400
@@ -99,7 +99,7 @@ config X86_PTDUMP
config DEBUG_RODATA
bool "Write protect kernel read-only data structures"
@@ -7572,10 +8538,10 @@ diff -urNp linux-2.6.30.8/arch/x86/Kconfig.debug linux-2.6.30.8/arch/x86/Kconfig
---help---
Mark the kernel read-only data as write-protected in the pagetables,
in order to catch accidental (and incorrect) writes to such const
-diff -urNp linux-2.6.30.8/arch/x86/kernel/acpi/boot.c linux-2.6.30.8/arch/x86/kernel/acpi/boot.c
---- linux-2.6.30.8/arch/x86/kernel/acpi/boot.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/acpi/boot.c 2009-07-30 09:48:09.938432163 -0400
-@@ -1737,7 +1737,7 @@ static struct dmi_system_id __initdata a
+diff -urNp linux-2.6.31.4/arch/x86/kernel/acpi/boot.c linux-2.6.31.4/arch/x86/kernel/acpi/boot.c
+--- linux-2.6.31.4/arch/x86/kernel/acpi/boot.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/acpi/boot.c 2009-10-11 15:29:40.794132399 -0400
+@@ -1609,7 +1609,7 @@ static struct dmi_system_id __initdata a
DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
},
},
@@ -7584,9 +8550,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/acpi/boot.c linux-2.6.30.8/arch/x86/ke
};
/*
-diff -urNp linux-2.6.30.8/arch/x86/kernel/acpi/realmode/wakeup.S linux-2.6.30.8/arch/x86/kernel/acpi/realmode/wakeup.S
---- linux-2.6.30.8/arch/x86/kernel/acpi/realmode/wakeup.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/acpi/realmode/wakeup.S 2009-07-30 09:48:09.938432163 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/acpi/realmode/wakeup.S linux-2.6.31.4/arch/x86/kernel/acpi/realmode/wakeup.S
+--- linux-2.6.31.4/arch/x86/kernel/acpi/realmode/wakeup.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/acpi/realmode/wakeup.S 2009-10-11 15:29:40.794132399 -0400
@@ -104,7 +104,7 @@ _start:
movl %eax, %ecx
orl %edx, %ecx
@@ -7596,9 +8562,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/acpi/realmode/wakeup.S linux-2.6.30.8/
wrmsr
1:
-diff -urNp linux-2.6.30.8/arch/x86/kernel/acpi/sleep.c linux-2.6.30.8/arch/x86/kernel/acpi/sleep.c
---- linux-2.6.30.8/arch/x86/kernel/acpi/sleep.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/acpi/sleep.c 2009-07-30 09:48:09.938432163 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/acpi/sleep.c linux-2.6.31.4/arch/x86/kernel/acpi/sleep.c
+--- linux-2.6.31.4/arch/x86/kernel/acpi/sleep.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/acpi/sleep.c 2009-10-12 23:12:55.099157679 -0400
@@ -11,11 +11,12 @@
#include <linux/cpumask.h>
#include <asm/segment.h>
@@ -7613,37 +8579,20 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/acpi/sleep.c linux-2.6.30.8/arch/x86/k
unsigned long acpi_realmode_flags;
/* address in low memory of the wakeup routine. */
-@@ -37,6 +38,10 @@ int acpi_save_state_mem(void)
- {
- struct wakeup_header *header;
-
-+#if defined(CONFIG_64BIT) && defined(CONFIG_SMP) && defined(CONFIG_PAX_KERNEXEC)
-+ unsigned long cr0;
-+#endif
-+
- if (!acpi_realmode) {
- printk(KERN_ERR "Could not allocate memory during boot, "
- "S3 disabled\n");
-@@ -99,8 +104,18 @@ int acpi_save_state_mem(void)
+@@ -99,8 +100,12 @@ int acpi_save_state_mem(void)
header->trampoline_segment = setup_trampoline() >> 4;
#ifdef CONFIG_SMP
stack_start.sp = temp_stack + sizeof(temp_stack);
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
early_gdt_descr.address =
(unsigned long)get_cpu_gdt_table(smp_processor_id());
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
initial_gs = per_cpu_offset(smp_processor_id());
#endif
initial_code = (unsigned long)wakeup_long64;
-@@ -134,14 +149,8 @@ void __init acpi_reserve_bootmem(void)
+@@ -134,14 +139,8 @@ void __init acpi_reserve_bootmem(void)
return;
}
@@ -7660,9 +8609,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/acpi/sleep.c linux-2.6.30.8/arch/x86/k
}
-diff -urNp linux-2.6.30.8/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.30.8/arch/x86/kernel/acpi/wakeup_32.S
---- linux-2.6.30.8/arch/x86/kernel/acpi/wakeup_32.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/acpi/wakeup_32.S 2009-07-30 09:48:09.938432163 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.31.4/arch/x86/kernel/acpi/wakeup_32.S
+--- linux-2.6.31.4/arch/x86/kernel/acpi/wakeup_32.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/acpi/wakeup_32.S 2009-10-11 15:29:40.794132399 -0400
@@ -30,13 +30,11 @@ wakeup_pmode_return:
# and restore the stack ... but you need gdt for this to work
movl saved_context_esp, %esp
@@ -7679,9 +8628,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.30.8/arch/x
bogus_magic:
jmp bogus_magic
-diff -urNp linux-2.6.30.8/arch/x86/kernel/alternative.c linux-2.6.30.8/arch/x86/kernel/alternative.c
---- linux-2.6.30.8/arch/x86/kernel/alternative.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/alternative.c 2009-07-30 09:48:09.939725122 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/alternative.c linux-2.6.31.4/arch/x86/kernel/alternative.c
+--- linux-2.6.31.4/arch/x86/kernel/alternative.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/alternative.c 2009-10-12 23:12:55.126056683 -0400
@@ -400,7 +400,7 @@ void apply_paravirt(struct paravirt_patc
BUG_ON(p->len > MAX_PATCH_LEN);
@@ -7691,7 +8640,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/alternative.c linux-2.6.30.8/arch/x86/
used = pv_init_ops.patch(p->instrtype, p->clobbers, insnbuf,
(unsigned long)p->instr, p->len);
-@@ -485,11 +485,26 @@ void __init alternative_instructions(voi
+@@ -485,11 +485,16 @@ void __init alternative_instructions(voi
* instructions. And on the local CPU you need to be protected again NMI or MCE
* handlers seeing an inconsistent instruction while you patch.
*/
@@ -7700,27 +8649,17 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/alternative.c linux-2.6.30.8/arch/x86/
{
unsigned long flags;
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
local_irq_save(flags);
- memcpy(addr, opcode, len);
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
+ memcpy(ktla_ktva(addr), opcode, len);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
local_irq_restore(flags);
sync_core();
/* Could also do a CLFLUSH here to speed up CPU recovery; but
-@@ -512,35 +527,27 @@ void *text_poke_early(void *addr, const
+@@ -512,35 +517,21 @@ void *text_poke_early(void *addr, const
*/
void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
{
@@ -7730,17 +8669,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/alternative.c linux-2.6.30.8/arch/x86/
struct page *pages[2];
- int i;
+ size_t i;
-+
-+ if (!core_kernel_text((unsigned long)addr)
-- if (!core_kernel_text((unsigned long)addr)) {
+ if (!core_kernel_text((unsigned long)addr)) {
- pages[0] = vmalloc_to_page(addr);
- pages[1] = vmalloc_to_page(addr + PAGE_SIZE);
-+#if defined(CONFIG_X86_32) && defined(CONFIG_MODULES) && defined(CONFIG_PAX_KERNEXEC)
-+ && (vaddr < MODULES_VADDR || MODULES_END < vaddr)
-+#endif
-+
-+ ) {
+ pages[0] = vmalloc_to_page(vaddr);
+ pages[1] = vmalloc_to_page(vaddr + PAGE_SIZE);
} else {
@@ -7771,9 +8703,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/alternative.c linux-2.6.30.8/arch/x86/
+ BUG_ON(((char *)vaddr)[i] != ((char *)opcode)[i]);
return addr;
}
-diff -urNp linux-2.6.30.8/arch/x86/kernel/apm_32.c linux-2.6.30.8/arch/x86/kernel/apm_32.c
---- linux-2.6.30.8/arch/x86/kernel/apm_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/apm_32.c 2009-07-30 09:48:09.939725122 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/apm_32.c linux-2.6.31.4/arch/x86/kernel/apm_32.c
+--- linux-2.6.31.4/arch/x86/kernel/apm_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/apm_32.c 2009-10-12 23:12:55.140901679 -0400
@@ -403,7 +403,7 @@ static DECLARE_WAIT_QUEUE_HEAD(apm_waitq
static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
static struct apm_user *user_list;
@@ -7783,94 +8715,53 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/apm_32.c linux-2.6.30.8/arch/x86/kerne
static const char driver_version[] = "1.16ac"; /* no spaces */
-@@ -576,12 +576,25 @@ static long __apm_bios_call(void *_call)
- struct desc_struct *gdt;
- struct apm_bios_call *call = _call;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- cpu = get_cpu();
+@@ -580,7 +580,10 @@ static long __apm_bios_call(void *_call)
BUG_ON(cpu != 0);
gdt = get_cpu_gdt_table(cpu);
save_desc_40 = gdt[0x40 / 8];
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
gdt[0x40 / 8] = bad_bios_desc;
++ pax_close_kernel();
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
apm_irq_save(flags);
APM_DO_SAVE_SEGS;
- apm_bios_call_asm(call->func, call->ebx, call->ecx,
-@@ -589,7 +602,17 @@ static long __apm_bios_call(void *_call)
+@@ -589,7 +592,11 @@ static long __apm_bios_call(void *_call)
&call->esi);
APM_DO_RESTORE_SEGS;
apm_irq_restore(flags);
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
gdt[0x40 / 8] = save_desc_40;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
put_cpu();
return call->eax & 0xff;
-@@ -652,19 +675,42 @@ static long __apm_bios_call_simple(void
- struct desc_struct *gdt;
- struct apm_bios_call *call = _call;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- cpu = get_cpu();
+@@ -656,7 +663,10 @@ static long __apm_bios_call_simple(void
BUG_ON(cpu != 0);
gdt = get_cpu_gdt_table(cpu);
save_desc_40 = gdt[0x40 / 8];
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
gdt[0x40 / 8] = bad_bios_desc;
++ pax_close_kernel();
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
apm_irq_save(flags);
APM_DO_SAVE_SEGS;
- error = apm_bios_call_simple_asm(call->func, call->ebx, call->ecx,
+@@ -664,7 +674,11 @@ static long __apm_bios_call_simple(void
&call->eax);
APM_DO_RESTORE_SEGS;
apm_irq_restore(flags);
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
gdt[0x40 / 8] = save_desc_40;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
put_cpu();
return error;
}
-@@ -967,7 +1013,7 @@ recalc:
+@@ -967,7 +981,7 @@ recalc:
static void apm_power_off(void)
{
@@ -7879,7 +8770,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/apm_32.c linux-2.6.30.8/arch/x86/kerne
0xb8, 0x00, 0x10, /* movw $0x1000,ax */
0x8e, 0xd0, /* movw ax,ss */
0xbc, 0x00, 0xf0, /* movw $0xf000,sp */
-@@ -1925,7 +1971,10 @@ static const struct file_operations apm_
+@@ -1925,7 +1939,10 @@ static const struct file_operations apm_
static struct miscdevice apm_device = {
APM_MINOR_DEV,
"apm_bios",
@@ -7891,7 +8782,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/apm_32.c linux-2.6.30.8/arch/x86/kerne
};
-@@ -2246,7 +2295,7 @@ static struct dmi_system_id __initdata a
+@@ -2246,7 +2263,7 @@ static struct dmi_system_id __initdata a
{ DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
},
@@ -7900,73 +8791,53 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/apm_32.c linux-2.6.30.8/arch/x86/kerne
};
/*
-@@ -2264,6 +2313,10 @@ static int __init apm_init(void)
- struct desc_struct *gdt;
- int err;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- dmi_check_system(apm_dmi_table);
-
- if (apm_info.bios.version == 0 || paravirt_enabled() || machine_is_olpc()) {
-@@ -2337,9 +2390,18 @@ static int __init apm_init(void)
+@@ -2337,8 +2354,11 @@ static int __init apm_init(void)
* This is for buggy BIOS's that refer to (real mode) segment 0x40
* even though they are called in protected mode.
*/
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
set_base(bad_bios_desc, __va((unsigned long)0x40 << 4));
_set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4));
++ pax_close_kernel();
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
/*
* Set up the long jump entry point to the APM BIOS, which is called
- * from inline assembly.
-@@ -2358,6 +2420,11 @@ static int __init apm_init(void)
+@@ -2358,12 +2378,15 @@ static int __init apm_init(void)
* code to that CPU.
*/
gdt = get_cpu_gdt_table(0);
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
set_base(gdt[APM_CS >> 3],
__va((unsigned long)apm_info.bios.cseg << 4));
set_base(gdt[APM_CS_16 >> 3],
-@@ -2365,6 +2432,10 @@ static int __init apm_init(void)
+ __va((unsigned long)apm_info.bios.cseg_16 << 4));
set_base(gdt[APM_DS >> 3],
__va((unsigned long)apm_info.bios.dseg << 4));
++ pax_close_kernel();
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
proc_create("apm", 0, NULL, &apm_file_ops);
- kapmd_task = kthread_create(apm, NULL, "kapmd");
-diff -urNp linux-2.6.30.8/arch/x86/kernel/asm-offsets_32.c linux-2.6.30.8/arch/x86/kernel/asm-offsets_32.c
---- linux-2.6.30.8/arch/x86/kernel/asm-offsets_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/asm-offsets_32.c 2009-07-30 09:48:09.939725122 -0400
-@@ -115,6 +115,7 @@ void foo(void)
+diff -urNp linux-2.6.31.4/arch/x86/kernel/asm-offsets_32.c linux-2.6.31.4/arch/x86/kernel/asm-offsets_32.c
+--- linux-2.6.31.4/arch/x86/kernel/asm-offsets_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/asm-offsets_32.c 2009-10-18 10:09:07.003389630 -0400
+@@ -115,6 +115,12 @@ void foo(void)
OFFSET(PV_CPU_iret, pv_cpu_ops, iret);
OFFSET(PV_CPU_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit);
OFFSET(PV_CPU_read_cr0, pv_cpu_ops, read_cr0);
++
++#ifdef CONFIG_PAX_KERNEXEC
+ OFFSET(PV_CPU_write_cr0, pv_cpu_ops, write_cr0);
++ OFFSET(PV_MMU_pax_close_kernel, pv_mmu_ops, pax_close_kernel);
++#endif
++
#endif
#ifdef CONFIG_XEN
-diff -urNp linux-2.6.30.8/arch/x86/kernel/asm-offsets_64.c linux-2.6.30.8/arch/x86/kernel/asm-offsets_64.c
---- linux-2.6.30.8/arch/x86/kernel/asm-offsets_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/asm-offsets_64.c 2009-07-30 09:48:09.939725122 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/asm-offsets_64.c linux-2.6.31.4/arch/x86/kernel/asm-offsets_64.c
+--- linux-2.6.31.4/arch/x86/kernel/asm-offsets_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/asm-offsets_64.c 2009-10-11 15:29:40.796384874 -0400
@@ -114,6 +114,7 @@ int main(void)
ENTRY(cr8);
BLANK();
@@ -7975,12 +8846,12 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/asm-offsets_64.c linux-2.6.30.8/arch/x
DEFINE(TSS_ist, offsetof(struct tss_struct, x86_tss.ist));
BLANK();
DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
-diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/common.c linux-2.6.30.8/arch/x86/kernel/cpu/common.c
---- linux-2.6.30.8/arch/x86/kernel/cpu/common.c 2009-09-26 23:07:15.388944836 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/cpu/common.c 2009-09-26 23:07:26.494755897 -0400
-@@ -60,60 +60,6 @@ void __init setup_cpu_local_masks(void)
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/common.c linux-2.6.31.4/arch/x86/kernel/cpu/common.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/common.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/common.c 2009-10-11 15:29:40.796384874 -0400
+@@ -84,60 +84,6 @@ static const struct cpu_dev __cpuinitcon
- static const struct cpu_dev *this_cpu __cpuinitdata;
+ static const struct cpu_dev *this_cpu __cpuinitdata = &default_cpu;
-DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = {
-#ifdef CONFIG_X86_64
@@ -8029,7 +8900,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/common.c linux-2.6.30.8/arch/x86/k
- /* data */
- [GDT_ENTRY_APMBIOS_BASE+2] = { { { 0x0000ffff, 0x00409200 } } },
-
-- [GDT_ENTRY_ESPFIX_SS] = { { { 0x00000000, 0x00c09200 } } },
+- [GDT_ENTRY_ESPFIX_SS] = { { { 0x0000ffff, 0x00cf9200 } } },
- [GDT_ENTRY_PERCPU] = { { { 0x0000ffff, 0x00cf9200 } } },
- GDT_STACK_CANARY_INIT
-#endif
@@ -8039,7 +8910,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/common.c linux-2.6.30.8/arch/x86/k
static int __init x86_xsave_setup(char *s)
{
setup_clear_cpu_cap(X86_FEATURE_XSAVE);
-@@ -320,7 +266,7 @@ void switch_to_new_gdt(int cpu)
+@@ -345,7 +291,7 @@ void switch_to_new_gdt(int cpu)
{
struct desc_ptr gdt_descr;
@@ -8048,7 +8919,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/common.c linux-2.6.30.8/arch/x86/k
gdt_descr.size = GDT_SIZE - 1;
load_gdt(&gdt_descr);
/* Reload the per-cpu base */
-@@ -796,6 +742,10 @@ static void __cpuinit identify_cpu(struc
+@@ -799,6 +745,10 @@ static void __cpuinit identify_cpu(struc
/* Filter out anything that depends on CPUID levels we don't have */
filter_cpuid_features(c, true);
@@ -8059,7 +8930,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/common.c linux-2.6.30.8/arch/x86/k
/* If the model name is still unset, do table lookup. */
if (!c->x86_model_id[0]) {
const char *p;
-@@ -972,7 +922,7 @@ static __init int setup_disablecpuid(cha
+@@ -982,7 +932,7 @@ static __init int setup_disablecpuid(cha
__setup("clearcpuid=", setup_disablecpuid);
#ifdef CONFIG_X86_64
@@ -8068,7 +8939,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/common.c linux-2.6.30.8/arch/x86/k
DEFINE_PER_CPU_FIRST(union irq_stack_union,
irq_stack_union) __aligned(PAGE_SIZE);
-@@ -1082,7 +1032,7 @@ void __cpuinit cpu_init(void)
+@@ -1092,7 +1042,7 @@ void __cpuinit cpu_init(void)
int i;
cpu = stack_smp_processor_id();
@@ -8077,7 +8948,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/common.c linux-2.6.30.8/arch/x86/k
orig_ist = &per_cpu(orig_ist, cpu);
#ifdef CONFIG_NUMA
-@@ -1180,7 +1130,7 @@ void __cpuinit cpu_init(void)
+@@ -1190,7 +1140,7 @@ void __cpuinit cpu_init(void)
{
int cpu = smp_processor_id();
struct task_struct *curr = current;
@@ -8086,10 +8957,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/common.c linux-2.6.30.8/arch/x86/k
struct thread_struct *thread = &curr->thread;
if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
-diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
---- linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2009-07-30 09:48:09.941068037 -0400
-@@ -590,7 +590,7 @@ static const struct dmi_system_id sw_any
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.31.4/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2009-10-11 15:29:40.797357986 -0400
+@@ -586,7 +586,7 @@ static const struct dmi_system_id sw_any
DMI_MATCH(DMI_PRODUCT_NAME, "X6DLP"),
},
},
@@ -8098,9 +8969,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.3
};
#endif
-diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
---- linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2009-07-30 09:48:09.941727851 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c linux-2.6.31.4/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2009-10-11 15:29:40.797357986 -0400
@@ -225,7 +225,7 @@ static struct cpu_model models[] =
{ &cpu_ids[CPU_MP4HT_D0], NULL, 0, NULL },
{ &cpu_ids[CPU_MP4HT_E0], NULL, 0, NULL },
@@ -8110,10 +8981,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c linux
};
#undef _BANIAS
#undef BANIAS
-diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/intel.c linux-2.6.30.8/arch/x86/kernel/cpu/intel.c
---- linux-2.6.30.8/arch/x86/kernel/cpu/intel.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/cpu/intel.c 2009-07-30 09:48:09.941727851 -0400
-@@ -117,7 +117,7 @@ static void __cpuinit trap_init_f00f_bug
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/intel.c linux-2.6.31.4/arch/x86/kernel/cpu/intel.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/intel.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/intel.c 2009-10-11 15:29:40.797357986 -0400
+@@ -140,7 +140,7 @@ static void __cpuinit trap_init_f00f_bug
* Update the IDT descriptor and reload the IDT so that
* it uses the read-only mapped virtual address.
*/
@@ -8122,10 +8993,59 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/intel.c linux-2.6.30.8/arch/x86/ke
load_idt(&idt_descr);
}
#endif
-diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/mcheck/mce_64.c linux-2.6.30.8/arch/x86/kernel/cpu/mcheck/mce_64.c
---- linux-2.6.30.8/arch/x86/kernel/cpu/mcheck/mce_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/cpu/mcheck/mce_64.c 2009-07-30 09:48:09.941727851 -0400
-@@ -830,6 +830,7 @@ static struct miscdevice mce_log_device
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/Makefile linux-2.6.31.4/arch/x86/kernel/cpu/Makefile
+--- linux-2.6.31.4/arch/x86/kernel/cpu/Makefile 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/Makefile 2009-10-11 15:29:40.797357986 -0400
+@@ -7,10 +7,6 @@ ifdef CONFIG_FUNCTION_TRACER
+ CFLAGS_REMOVE_common.o = -pg
+ endif
+
+-# Make sure load_percpu_segment has no stackprotector
+-nostackp := $(call cc-option, -fno-stack-protector)
+-CFLAGS_common.o := $(nostackp)
+-
+ obj-y := intel_cacheinfo.o addon_cpuid_features.o
+ obj-y += proc.o capflags.o powerflags.o common.o
+ obj-y += vmware.o hypervisor.o
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.31.4/arch/x86/kernel/cpu/mcheck/mce.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/mcheck/mce.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/mcheck/mce.c 2009-10-11 15:29:40.798326845 -0400
+@@ -1370,14 +1370,14 @@ void __cpuinit mcheck_init(struct cpuinf
+ */
+
+ static DEFINE_SPINLOCK(mce_state_lock);
+-static int open_count; /* #times opened */
++static atomic_t open_count; /* #times opened */
+ static int open_exclu; /* already open exclusive? */
+
+ static int mce_open(struct inode *inode, struct file *file)
+ {
+ spin_lock(&mce_state_lock);
+
+- if (open_exclu || (open_count && (file->f_flags & O_EXCL))) {
++ if (open_exclu || (atomic_read(&open_count) && (file->f_flags & O_EXCL))) {
+ spin_unlock(&mce_state_lock);
+
+ return -EBUSY;
+@@ -1385,7 +1385,7 @@ static int mce_open(struct inode *inode,
+
+ if (file->f_flags & O_EXCL)
+ open_exclu = 1;
+- open_count++;
++ atomic_inc(&open_count);
+
+ spin_unlock(&mce_state_lock);
+
+@@ -1396,7 +1396,7 @@ static int mce_release(struct inode *ino
+ {
+ spin_lock(&mce_state_lock);
+
+- open_count--;
++ atomic_dec(&open_count);
+ open_exclu = 0;
+
+ spin_unlock(&mce_state_lock);
+@@ -1536,6 +1536,7 @@ static struct miscdevice mce_log_device
MISC_MCELOG_MINOR,
"mcelog",
&mce_chrdev_ops,
@@ -8133,13 +9053,49 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/mcheck/mce_64.c linux-2.6.30.8/arc
};
/*
-diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.30.8/arch/x86/kernel/cpu/mtrr/generic.c
---- linux-2.6.30.8/arch/x86/kernel/cpu/mtrr/generic.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/cpu/mtrr/generic.c 2009-07-30 09:48:09.942991706 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/amd.c linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/amd.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/amd.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/amd.c 2009-10-11 15:29:56.564796063 -0400
+@@ -101,7 +101,7 @@ static int amd_validate_add_page(unsigne
+ return 0;
+ }
+
+-static struct mtrr_ops amd_mtrr_ops = {
++static const struct mtrr_ops amd_mtrr_ops = {
+ .vendor = X86_VENDOR_AMD,
+ .set = amd_set_mtrr,
+ .get = amd_get_mtrr,
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/centaur.c linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/centaur.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/centaur.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/centaur.c 2009-10-11 15:29:56.564796063 -0400
+@@ -205,7 +205,7 @@ static int centaur_validate_add_page(uns
+ return 0;
+ }
+
+-static struct mtrr_ops centaur_mtrr_ops = {
++static const struct mtrr_ops centaur_mtrr_ops = {
+ .vendor = X86_VENDOR_CENTAUR,
+ // .init = centaur_mcr_init,
+ .set = centaur_set_mcr,
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/cyrix.c linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/cyrix.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/cyrix.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/cyrix.c 2009-10-11 15:29:56.564796063 -0400
+@@ -254,7 +254,7 @@ static void cyrix_set_all(void)
+ post_set();
+ }
+
+-static struct mtrr_ops cyrix_mtrr_ops = {
++static const struct mtrr_ops cyrix_mtrr_ops = {
+ .vendor = X86_VENDOR_CYRIX,
+ // .init = cyrix_arr_init,
+ .set_all = cyrix_set_all,
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/generic.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/generic.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/generic.c 2009-10-11 15:29:56.556364216 -0400
@@ -23,14 +23,14 @@ static struct fixed_range_block fixed_ra
- { MTRRfix64K_00000_MSR, 1 }, /* one 64k MTRR */
- { MTRRfix16K_80000_MSR, 2 }, /* two 16k MTRRs */
- { MTRRfix4K_C0000_MSR, 8 }, /* eight 4k MTRRs */
+ { MSR_MTRRfix64K_00000, 1 }, /* one 64k MTRR */
+ { MSR_MTRRfix16K_80000, 2 }, /* two 16k MTRRs */
+ { MSR_MTRRfix4K_C0000, 8 }, /* eight 4k MTRRs */
- {}
+ { 0, 0 }
};
@@ -8153,10 +9109,65 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.30.8/arch
EXPORT_SYMBOL_GPL(mtrr_state);
/**
-diff -urNp linux-2.6.30.8/arch/x86/kernel/crash.c linux-2.6.30.8/arch/x86/kernel/crash.c
---- linux-2.6.30.8/arch/x86/kernel/crash.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/crash.c 2009-07-30 09:48:09.942991706 -0400
-@@ -41,7 +41,7 @@ static void kdump_nmi_callback(int cpu,
+@@ -718,7 +718,7 @@ int positive_have_wrcomb(void)
+
+ /* generic structure...
+ */
+-struct mtrr_ops generic_mtrr_ops = {
++const struct mtrr_ops generic_mtrr_ops = {
+ .use_intel_if = 1,
+ .set_all = generic_set_all,
+ .get = generic_get_mtrr,
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/main.c linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/main.c
+--- linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/main.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/main.c 2009-10-11 15:29:56.564796063 -0400
+@@ -54,14 +54,14 @@ static DEFINE_MUTEX(mtrr_mutex);
+
+ u64 size_or_mask, size_and_mask;
+
+-static struct mtrr_ops * mtrr_ops[X86_VENDOR_NUM] = {};
++static const struct mtrr_ops * mtrr_ops[X86_VENDOR_NUM] __read_only;
+
+-struct mtrr_ops * mtrr_if = NULL;
++const struct mtrr_ops * mtrr_if = NULL;
+
+ static void set_mtrr(unsigned int reg, unsigned long base,
+ unsigned long size, mtrr_type type);
+
+-void set_mtrr_ops(struct mtrr_ops * ops)
++void set_mtrr_ops(const struct mtrr_ops * ops)
+ {
+ if (ops->vendor && ops->vendor < X86_VENDOR_NUM)
+ mtrr_ops[ops->vendor] = ops;
+diff -urNp linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/mtrr.h linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/mtrr.h
+--- linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/mtrr.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/cpu/mtrr/mtrr.h 2009-10-11 15:29:56.564796063 -0400
+@@ -33,7 +33,7 @@ extern int generic_get_free_region(unsig
+ extern int generic_validate_add_page(unsigned long base, unsigned long size,
+ unsigned int type);
+
+-extern struct mtrr_ops generic_mtrr_ops;
++extern const struct mtrr_ops generic_mtrr_ops;
+
+ extern int positive_have_wrcomb(void);
+
+@@ -54,10 +54,10 @@ void fill_mtrr_var_range(unsigned int in
+ u32 base_lo, u32 base_hi, u32 mask_lo, u32 mask_hi);
+ void get_mtrr_state(void);
+
+-extern void set_mtrr_ops(struct mtrr_ops * ops);
++extern void set_mtrr_ops(const struct mtrr_ops * ops);
+
+ extern u64 size_or_mask, size_and_mask;
+-extern struct mtrr_ops * mtrr_if;
++extern const struct mtrr_ops * mtrr_if;
+
+ #define is_cpu(vnd) (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd)
+ #define use_intel() (mtrr_if && mtrr_if->use_intel_if == 1)
+diff -urNp linux-2.6.31.4/arch/x86/kernel/crash.c linux-2.6.31.4/arch/x86/kernel/crash.c
+--- linux-2.6.31.4/arch/x86/kernel/crash.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/crash.c 2009-10-11 15:29:40.799154910 -0400
+@@ -42,7 +42,7 @@ static void kdump_nmi_callback(int cpu,
regs = args->regs;
#ifdef CONFIG_X86_32
@@ -8165,9 +9176,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/crash.c linux-2.6.30.8/arch/x86/kernel
crash_fixup_ss_esp(&fixed_regs, regs);
regs = &fixed_regs;
}
-diff -urNp linux-2.6.30.8/arch/x86/kernel/doublefault_32.c linux-2.6.30.8/arch/x86/kernel/doublefault_32.c
---- linux-2.6.30.8/arch/x86/kernel/doublefault_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/doublefault_32.c 2009-07-30 09:48:09.942991706 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/doublefault_32.c linux-2.6.31.4/arch/x86/kernel/doublefault_32.c
+--- linux-2.6.31.4/arch/x86/kernel/doublefault_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/doublefault_32.c 2009-10-11 15:29:40.799154910 -0400
@@ -11,7 +11,7 @@
#define DOUBLEFAULT_STACKSIZE (1024)
@@ -8199,10 +9210,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/doublefault_32.c linux-2.6.30.8/arch/x
.fs = __KERNEL_PERCPU,
.__cr3 = __pa_nodebug(swapper_pg_dir),
-diff -urNp linux-2.6.30.8/arch/x86/kernel/dumpstack_32.c linux-2.6.30.8/arch/x86/kernel/dumpstack_32.c
---- linux-2.6.30.8/arch/x86/kernel/dumpstack_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/dumpstack_32.c 2009-07-30 09:48:09.943696998 -0400
-@@ -107,11 +107,12 @@ void show_registers(struct pt_regs *regs
+diff -urNp linux-2.6.31.4/arch/x86/kernel/dumpstack_32.c linux-2.6.31.4/arch/x86/kernel/dumpstack_32.c
+--- linux-2.6.31.4/arch/x86/kernel/dumpstack_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/dumpstack_32.c 2009-10-11 15:29:40.799154910 -0400
+@@ -113,11 +113,12 @@ void show_registers(struct pt_regs *regs
* When in-kernel, we also print out the stack and code at the
* time of the fault..
*/
@@ -8216,7 +9227,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/dumpstack_32.c linux-2.6.30.8/arch/x86
printk(KERN_EMERG "Stack:\n");
show_stack_log_lvl(NULL, regs, &regs->sp,
-@@ -119,10 +120,10 @@ void show_registers(struct pt_regs *regs
+@@ -125,10 +126,10 @@ void show_registers(struct pt_regs *regs
printk(KERN_EMERG "Code: ");
@@ -8229,7 +9240,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/dumpstack_32.c linux-2.6.30.8/arch/x86
code_len = code_len - code_prologue + 1;
}
for (i = 0; i < code_len; i++, ip++) {
-@@ -131,7 +132,7 @@ void show_registers(struct pt_regs *regs
+@@ -137,7 +138,7 @@ void show_registers(struct pt_regs *regs
printk(" Bad EIP value.");
break;
}
@@ -8238,7 +9249,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/dumpstack_32.c linux-2.6.30.8/arch/x86
printk("<%02x> ", c);
else
printk("%02x ", c);
-@@ -144,6 +145,7 @@ int is_valid_bugaddr(unsigned long ip)
+@@ -150,6 +151,7 @@ int is_valid_bugaddr(unsigned long ip)
{
unsigned short ud2;
@@ -8246,10 +9257,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/dumpstack_32.c linux-2.6.30.8/arch/x86
if (ip < PAGE_OFFSET)
return 0;
if (probe_kernel_address((unsigned short *)ip, ud2))
-diff -urNp linux-2.6.30.8/arch/x86/kernel/dumpstack.c linux-2.6.30.8/arch/x86/kernel/dumpstack.c
---- linux-2.6.30.8/arch/x86/kernel/dumpstack.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/dumpstack.c 2009-07-30 09:48:09.942991706 -0400
-@@ -180,7 +180,7 @@ void dump_stack(void)
+diff -urNp linux-2.6.31.4/arch/x86/kernel/dumpstack.c linux-2.6.31.4/arch/x86/kernel/dumpstack.c
+--- linux-2.6.31.4/arch/x86/kernel/dumpstack.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/dumpstack.c 2009-10-11 15:29:40.799154910 -0400
+@@ -181,7 +181,7 @@ void dump_stack(void)
#endif
printk("Pid: %d, comm: %.20s %s %s %.*s\n",
@@ -8258,7 +9269,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/dumpstack.c linux-2.6.30.8/arch/x86/ke
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);
-@@ -241,7 +241,7 @@ void __kprobes oops_end(unsigned long fl
+@@ -242,7 +242,7 @@ void __kprobes oops_end(unsigned long fl
panic("Fatal exception in interrupt");
if (panic_on_oops)
panic("Fatal exception");
@@ -8267,7 +9278,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/dumpstack.c linux-2.6.30.8/arch/x86/ke
}
int __kprobes __die(const char *str, struct pt_regs *regs, long err)
-@@ -295,7 +295,7 @@ void die(const char *str, struct pt_regs
+@@ -296,7 +296,7 @@ void die(const char *str, struct pt_regs
unsigned long flags = oops_begin();
int sig = SIGSEGV;
@@ -8276,10 +9287,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/dumpstack.c linux-2.6.30.8/arch/x86/ke
report_bug(regs->ip, regs);
if (__die(str, regs, err))
-diff -urNp linux-2.6.30.8/arch/x86/kernel/e820.c linux-2.6.30.8/arch/x86/kernel/e820.c
---- linux-2.6.30.8/arch/x86/kernel/e820.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/e820.c 2009-07-30 09:48:09.943696998 -0400
-@@ -739,7 +739,10 @@ struct early_res {
+diff -urNp linux-2.6.31.4/arch/x86/kernel/e820.c linux-2.6.31.4/arch/x86/kernel/e820.c
+--- linux-2.6.31.4/arch/x86/kernel/e820.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/e820.c 2009-10-11 15:29:40.800410493 -0400
+@@ -733,7 +733,10 @@ struct early_res {
};
static struct early_res early_res[MAX_EARLY_RES] __initdata = {
{ 0, PAGE_SIZE, "BIOS data page" }, /* BIOS data page */
@@ -8291,9 +9302,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/e820.c linux-2.6.30.8/arch/x86/kernel/
};
static int __init find_overlapped_early(u64 start, u64 end)
-diff -urNp linux-2.6.30.8/arch/x86/kernel/efi_32.c linux-2.6.30.8/arch/x86/kernel/efi_32.c
---- linux-2.6.30.8/arch/x86/kernel/efi_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/efi_32.c 2009-07-30 09:48:09.943696998 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/efi_32.c linux-2.6.31.4/arch/x86/kernel/efi_32.c
+--- linux-2.6.31.4/arch/x86/kernel/efi_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/efi_32.c 2009-10-11 15:29:40.800410493 -0400
@@ -38,70 +38,38 @@
*/
@@ -8374,9 +9385,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/efi_32.c linux-2.6.30.8/arch/x86/kerne
/*
* After the lock is released, the original page table is restored.
-diff -urNp linux-2.6.30.8/arch/x86/kernel/efi_stub_32.S linux-2.6.30.8/arch/x86/kernel/efi_stub_32.S
---- linux-2.6.30.8/arch/x86/kernel/efi_stub_32.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/efi_stub_32.S 2009-07-30 09:48:09.944948217 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/efi_stub_32.S linux-2.6.31.4/arch/x86/kernel/efi_stub_32.S
+--- linux-2.6.31.4/arch/x86/kernel/efi_stub_32.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/efi_stub_32.S 2009-10-11 15:29:40.801422965 -0400
@@ -6,6 +6,7 @@
*/
@@ -8475,10 +9486,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/efi_stub_32.S linux-2.6.30.8/arch/x86/
saved_return_addr:
.long 0
efi_rt_function_ptr:
-diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/kernel/entry_32.S
---- linux-2.6.30.8/arch/x86/kernel/entry_32.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/entry_32.S 2009-08-12 21:15:21.098460043 -0400
-@@ -192,7 +192,7 @@
+diff -urNp linux-2.6.31.4/arch/x86/kernel/entry_32.S linux-2.6.31.4/arch/x86/kernel/entry_32.S
+--- linux-2.6.31.4/arch/x86/kernel/entry_32.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/entry_32.S 2009-10-18 10:09:07.029411525 -0400
+@@ -191,7 +191,7 @@
#endif /* CONFIG_X86_32_LAZY_GS */
@@ -8487,7 +9498,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
cld
PUSH_GS
pushl %fs
-@@ -225,7 +225,7 @@
+@@ -224,7 +224,7 @@
pushl %ebx
CFI_ADJUST_CFA_OFFSET 4
CFI_REL_OFFSET ebx, 0
@@ -8496,20 +9507,14 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
movl %edx, %ds
movl %edx, %es
movl $(__KERNEL_PERCPU), %edx
-@@ -233,6 +233,21 @@
+@@ -232,6 +232,15 @@
SET_KERNEL_GS %edx
.endm
+.macro SAVE_ALL
-+#ifdef CONFIG_PAX_KERNEXEC
-+ __SAVE_ALL __KERNEL_DS
-+ GET_CR0_INTO_EDX;
-+ movl %edx, %esi;
-+ orl $X86_CR0_WP, %edx;
-+ xorl %edx, %esi;
-+ SET_CR0_FROM_EDX
-+#elif defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_MEMORY_UDEREF)
++#if defined(CONFIG_PAX_KERNEXEC) || defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC) || defined(CONFIG_PAX_MEMORY_UDEREF)
+ __SAVE_ALL __KERNEL_DS
++ PAX_CLOSE_KERNEL
+#else
+ __SAVE_ALL __USER_DS
+#endif
@@ -8518,29 +9523,15 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
.macro RESTORE_INT_REGS
popl %ebx
CFI_ADJUST_CFA_OFFSET -4
-@@ -330,6 +345,11 @@ ENTRY(ret_from_fork)
- CFI_ADJUST_CFA_OFFSET 4
- popfl
- CFI_ADJUST_CFA_OFFSET -4
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ xorl %esi, %esi
-+#endif
-+
- jmp syscall_exit
- CFI_ENDPROC
- END(ret_from_fork)
-@@ -353,7 +373,17 @@ check_userspace:
+@@ -352,7 +361,15 @@ check_userspace:
movb PT_CS(%esp), %al
andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax
cmpl $USER_RPL, %eax
+
+#ifdef CONFIG_PAX_KERNEXEC
+ jae resume_userspace
-+
-+ GET_CR0_INTO_EDX
-+ xorl %esi, %edx
-+ SET_CR0_FROM_EDX
++
++ PAX_RESTORE_KERNEL
+ jmp resume_kernel
+#else
jb resume_kernel # not returning to v8086 or userspace
@@ -8548,7 +9539,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
ENTRY(resume_userspace)
LOCKDEP_SYS_EXIT
-@@ -415,10 +445,9 @@ sysenter_past_esp:
+@@ -414,10 +431,9 @@ sysenter_past_esp:
/*CFI_REL_OFFSET cs, 0*/
/*
* Push current_thread_info()->sysenter_return to the stack.
@@ -8561,7 +9552,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
CFI_ADJUST_CFA_OFFSET 4
CFI_REL_OFFSET eip, 0
-@@ -431,9 +460,19 @@ sysenter_past_esp:
+@@ -430,9 +446,19 @@ sysenter_past_esp:
* Load the potential sixth argument from user stack.
* Careful about security.
*/
@@ -8581,7 +9572,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
movl %ebp,PT_EBP(%esp)
.section __ex_table,"a"
.align 4
-@@ -456,12 +495,23 @@ sysenter_do_call:
+@@ -455,12 +481,23 @@ sysenter_do_call:
testl $_TIF_ALLWORK_MASK, %ecx
jne sysexit_audit
sysenter_exit:
@@ -8605,7 +9596,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
PTGS_TO_GS
ENABLE_INTERRUPTS_SYSEXIT
-@@ -505,11 +555,17 @@ sysexit_audit:
+@@ -504,11 +541,17 @@ sysexit_audit:
CFI_ENDPROC
.pushsection .fixup,"ax"
@@ -8625,7 +9616,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
.popsection
PTGS_TO_GS_EX
ENDPROC(ia32_sysenter_target)
-@@ -539,6 +595,10 @@ syscall_exit:
+@@ -538,6 +581,10 @@ syscall_exit:
testl $_TIF_ALLWORK_MASK, %ecx # current->work
jne syscall_exit_work
@@ -8634,9 +9625,24 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
+#endif
+
restore_all:
- movl PT_EFLAGS(%esp), %eax # mix EFLAGS, SS and CS
- # Warning: PT_OLDSS(%esp) contains the wrong/random values if we
-@@ -631,25 +691,19 @@ work_resched:
+ TRACE_IRQS_IRET
+ restore_all_notrace:
+@@ -602,7 +649,13 @@ ldt_ss:
+ mov PT_OLDESP(%esp), %eax /* load userspace esp */
+ mov %dx, %ax /* eax: new kernel esp */
+ sub %eax, %edx /* offset (low word is 0) */
+- PER_CPU(gdt_page, %ebx)
++#ifdef CONFIG_SMP
++ movl PER_CPU_VAR(cpu_number), %ebx
++ shll $PAGE_SHIFT_asm, %ebx
++ addl $cpu_gdt_table, %ebx
++#else
++ movl $cpu_gdt_table, %ebx
++#endif
+ shr $16, %edx
+ mov %dl, GDT_ENTRY_ESPFIX_SS * 8 + 4(%ebx) /* bits 16..23 */
+ mov %dh, GDT_ENTRY_ESPFIX_SS * 8 + 7(%ebx) /* bits 24..31 */
+@@ -642,25 +695,19 @@ work_resched:
work_notifysig: # deal with pending signals and
# notify-resume requests
@@ -8665,7 +9671,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
#endif
xorl %edx, %edx
call do_notify_resume
-@@ -684,6 +738,10 @@ END(syscall_exit_work)
+@@ -695,6 +742,10 @@ END(syscall_exit_work)
RING0_INT_FRAME # can't unwind into user space anyway
syscall_fault:
@@ -8676,10 +9682,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
GET_THREAD_INFO(%ebp)
movl $-EFAULT,PT_EAX(%esp)
jmp resume_userspace
-@@ -717,7 +775,13 @@ PTREGSCALL(vm86old)
-
- .macro FIXUP_ESPFIX_STACK
- /* since we are on a wrong stack, we cant make it a C code :( */
+@@ -735,7 +786,13 @@ PTREGSCALL(vm86old)
+ * normal stack and adjusts ESP with the matching offset.
+ */
+ /* fixup the stack */
- PER_CPU(gdt_page, %ebx)
+#ifdef CONFIG_SMP
+ movl PER_CPU_VAR(cpu_number), %ebx
@@ -8688,10 +9694,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
+#else
+ movl $cpu_gdt_table, %ebx
+#endif
- GET_DESC_BASE(GDT_ENTRY_ESPFIX_SS, %ebx, %eax, %ax, %al, %ah)
- addl %esp, %eax
- pushl $__KERNEL_DS
-@@ -1176,7 +1240,6 @@ return_to_handler:
+ mov GDT_ENTRY_ESPFIX_SS * 8 + 4(%ebx), %al /* bits 16..23 */
+ mov GDT_ENTRY_ESPFIX_SS * 8 + 7(%ebx), %ah /* bits 24..31 */
+ shl $16, %eax
+@@ -1198,7 +1255,6 @@ return_to_handler:
ret
#endif
@@ -8699,18 +9705,12 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
#include "syscall_table_32.S"
syscall_table_size=(.-sys_call_table)
-@@ -1228,12 +1291,21 @@ error_code:
+@@ -1250,12 +1306,15 @@ error_code:
movl %ecx, %fs
UNWIND_ESPFIX_STACK
GS_TO_REG %ecx
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ GET_CR0_INTO_EDX
-+ movl %edx, %esi
-+ orl $X86_CR0_WP, %edx
-+ xorl %edx, %esi
-+ SET_CR0_FROM_EDX
-+#endif
++ PAX_CLOSE_KERNEL
+
movl PT_GS(%esp), %edi # get the function address
movl PT_ORIG_EAX(%esp), %edx # get the error code
@@ -8722,38 +9722,30 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_32.S linux-2.6.30.8/arch/x86/ker
movl %ecx, %ds
movl %ecx, %es
TRACE_IRQS_OFF
-@@ -1329,6 +1401,13 @@ nmi_stack_correct:
+@@ -1351,6 +1410,9 @@ nmi_stack_correct:
xorl %edx,%edx # zero error code
movl %esp,%eax # pt_regs pointer
call do_nmi
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ GET_CR0_INTO_EDX
-+ xorl %esi, %edx
-+ SET_CR0_FROM_EDX
-+#endif
++ PAX_RESTORE_KERNEL
+
- jmp restore_nocheck_notrace
+ jmp restore_all_notrace
CFI_ENDPROC
-@@ -1369,6 +1448,13 @@ nmi_espfix_stack:
+@@ -1391,6 +1453,9 @@ nmi_espfix_stack:
FIXUP_ESPFIX_STACK # %eax == %esp
xorl %edx,%edx # zero error code
call do_nmi
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ GET_CR0_INTO_EDX
-+ xorl %esi, %edx
-+ SET_CR0_FROM_EDX
-+#endif
++ PAX_RESTORE_KERNEL
+
RESTORE_REGS
lss 12+4(%esp), %esp # back to espfix stack
CFI_ADJUST_CFA_OFFSET -24
-diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_64.S linux-2.6.30.8/arch/x86/kernel/entry_64.S
---- linux-2.6.30.8/arch/x86/kernel/entry_64.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/entry_64.S 2009-08-12 21:15:21.099483377 -0400
-@@ -1073,7 +1073,12 @@ ENTRY(\sym)
+diff -urNp linux-2.6.31.4/arch/x86/kernel/entry_64.S linux-2.6.31.4/arch/x86/kernel/entry_64.S
+--- linux-2.6.31.4/arch/x86/kernel/entry_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/entry_64.S 2009-10-11 15:29:40.802326520 -0400
+@@ -1074,7 +1074,12 @@ ENTRY(\sym)
TRACE_IRQS_OFF
movq %rsp,%rdi /* pt_regs pointer */
xorl %esi,%esi /* no error code */
@@ -8767,9 +9759,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/entry_64.S linux-2.6.30.8/arch/x86/ker
subq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%rbp)
call \do_sym
addq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%rbp)
-diff -urNp linux-2.6.30.8/arch/x86/kernel/ftrace.c linux-2.6.30.8/arch/x86/kernel/ftrace.c
---- linux-2.6.30.8/arch/x86/kernel/ftrace.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/ftrace.c 2009-07-30 09:48:09.945662533 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/ftrace.c linux-2.6.31.4/arch/x86/kernel/ftrace.c
+--- linux-2.6.31.4/arch/x86/kernel/ftrace.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/ftrace.c 2009-10-11 15:29:40.802326520 -0400
@@ -284,9 +284,9 @@ int ftrace_update_ftrace_func(ftrace_fun
unsigned char old[MCOUNT_INSN_SIZE], *new;
int ret;
@@ -8782,9 +9774,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/ftrace.c linux-2.6.30.8/arch/x86/kerne
return ret;
}
-diff -urNp linux-2.6.30.8/arch/x86/kernel/head32.c linux-2.6.30.8/arch/x86/kernel/head32.c
---- linux-2.6.30.8/arch/x86/kernel/head32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/head32.c 2009-07-30 09:48:09.946846946 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/head32.c linux-2.6.31.4/arch/x86/kernel/head32.c
+--- linux-2.6.31.4/arch/x86/kernel/head32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/head32.c 2009-10-11 15:29:40.803198518 -0400
@@ -13,12 +13,13 @@
#include <asm/e820.h>
#include <asm/bios_ebda.h>
@@ -8800,10 +9792,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head32.c linux-2.6.30.8/arch/x86/kerne
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
-diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kernel/head_32.S
---- linux-2.6.30.8/arch/x86/kernel/head_32.S 2009-09-26 23:07:15.401011409 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/head_32.S 2009-09-26 23:07:52.470809980 -0400
-@@ -20,6 +20,7 @@
+diff -urNp linux-2.6.31.4/arch/x86/kernel/head_32.S linux-2.6.31.4/arch/x86/kernel/head_32.S
+--- linux-2.6.31.4/arch/x86/kernel/head_32.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/head_32.S 2009-10-18 10:15:00.924043933 -0400
+@@ -19,10 +19,17 @@
#include <asm/setup.h>
#include <asm/processor-flags.h>
#include <asm/percpu.h>
@@ -8811,7 +9803,17 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
/* Physical address */
#define pa(X) ((X) - __PAGE_OFFSET)
-@@ -53,11 +54,7 @@
+
++#ifdef CONFIG_PAX_KERNEXEC
++#define ta(X) (X)
++#else
++#define ta(X) ((X) - __PAGE_OFFSET)
++#endif
++
+ /*
+ * References to members of the new_cpu_data structure.
+ */
+@@ -52,11 +59,7 @@
* and small than max_low_pfn, otherwise will waste some page table entries
*/
@@ -8824,7 +9826,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
/* Enough space to fit pagetables for the low memory linear map */
MAPPING_BEYOND_END = \
-@@ -74,6 +71,15 @@ INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_P
+@@ -73,6 +76,12 @@ INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_P
RESERVE_BRK(pagetables, INIT_MAP_SIZE)
/*
@@ -8833,27 +9835,25 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
+ENTRY(stext)
+ENTRY(_stext)
+
-+.section .text.startup,"ax",@progbits
-+ ljmp $(__BOOT_CS),$phys_startup_32
-+
+/*
* 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
-@@ -81,6 +87,12 @@ RESERVE_BRK(pagetables, INIT_MAP_SIZE)
+@@ -80,6 +89,13 @@ RESERVE_BRK(pagetables, INIT_MAP_SIZE)
* can.
*/
.section .text.head,"ax",@progbits
+
+#ifdef CONFIG_PAX_KERNEXEC
++ jmp startup_32
+/* PaX: fill first page in .text with int3 to catch NULL derefs in kernel mode */
-+.fill 4096,1,0xcc
++.fill PAGE_SIZE-5,1,0xcc
+#endif
+
ENTRY(startup_32)
/* test KEEP_SEGMENTS flag to see if the bootloader is asking
us to not reload segments */
-@@ -98,6 +110,48 @@ ENTRY(startup_32)
+@@ -97,6 +113,52 @@ ENTRY(startup_32)
movl %eax,%gs
2:
@@ -8865,7 +9865,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
+ movb %al,__KERNEL_PERCPU + 4(%edi)
+ movb %ah,__KERNEL_PERCPU + 7(%edi)
+ movl $__per_cpu_end - 1,%eax
-+ subl $__per_cpu_load,%eax
++ subl $__per_cpu_start,%eax
+ movw %ax,__KERNEL_PERCPU + 0(%edi)
+#endif
+
@@ -8880,15 +9880,19 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
+
+#ifdef CONFIG_PAX_KERNEXEC
+ movl $pa(boot_gdt),%edi
-+ movl $KERNEL_TEXT_OFFSET,%eax
++ movl $__LOAD_PHYSICAL_ADDR,%eax
+ movw %ax,__BOOT_CS + 2(%edi)
+ rorl $16,%eax
+ movb %al,__BOOT_CS + 4(%edi)
+ movb %ah,__BOOT_CS + 7(%edi)
+ rorl $16,%eax
+
++ ljmp $(__BOOT_CS),$1f
++1:
++
+ movl $NR_CPUS,%ecx
+ movl $pa(cpu_gdt_table),%edi
++ addl $__PAGE_OFFSET,%eax
+1:
+ movw %ax,__KERNEL_CS + 2(%edi)
+ rorl $16,%eax
@@ -8902,7 +9906,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
/*
* Clear BSS first so that there are no surprises...
*/
-@@ -141,9 +195,7 @@ ENTRY(startup_32)
+@@ -140,9 +202,7 @@ ENTRY(startup_32)
cmpl $num_subarch_entries, %eax
jae bad_subarch
@@ -8913,20 +9917,20 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
bad_subarch:
WEAK(lguest_entry)
-@@ -155,9 +207,9 @@ WEAK(xen_entry)
+@@ -154,9 +214,9 @@ WEAK(xen_entry)
__INITDATA
subarch_entries:
- .long default_entry /* normal x86/PC */
- .long lguest_entry /* lguest hypervisor */
- .long xen_entry /* Xen hypervisor */
-+ .long pa(default_entry) /* normal x86/PC */
-+ .long pa(lguest_entry) /* lguest hypervisor */
-+ .long pa(xen_entry) /* Xen hypervisor */
++ .long ta(default_entry) /* normal x86/PC */
++ .long ta(lguest_entry) /* lguest hypervisor */
++ .long ta(xen_entry) /* Xen hypervisor */
num_subarch_entries = (. - subarch_entries) / 4
.previous
#endif /* CONFIG_PARAVIRT */
-@@ -218,8 +270,11 @@ default_entry:
+@@ -217,8 +277,11 @@ default_entry:
movl %eax, pa(max_pfn_mapped)
/* Do early initialization of the fixmap area */
@@ -8940,7 +9944,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
#else /* Not PAE */
page_pde_offset = (__PAGE_OFFSET >> 20);
-@@ -249,8 +304,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
+@@ -248,8 +311,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
movl %eax, pa(max_pfn_mapped)
/* Do early initialization of the fixmap area */
@@ -8954,7 +9958,15 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
#endif
jmp 3f
/*
-@@ -314,13 +372,16 @@ ENTRY(startup_32_smp)
+@@ -296,6 +362,7 @@ ENTRY(startup_32_smp)
+ orl %edx,%eax
+ movl %eax,%cr4
+
++#ifdef CONFIG_X86_PAE
+ btl $5, %eax # check if PAE is enabled
+ jnc 6f
+
+@@ -311,13 +378,16 @@ ENTRY(startup_32_smp)
jnc 6f
/* Setup EFER (Extended Feature Enable Register) */
@@ -8968,11 +9980,11 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
+ btsl $_PAGE_BIT_NX-32,pa(__supported_pte_mask+4)
+ movl $1,pa(nx_enabled)
-+
++#endif
6:
/*
-@@ -346,9 +407,7 @@ ENTRY(startup_32_smp)
+@@ -343,9 +413,7 @@ ENTRY(startup_32_smp)
#ifdef CONFIG_SMP
cmpb $0, ready
@@ -8983,7 +9995,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
#endif /* CONFIG_SMP */
/*
-@@ -426,7 +485,7 @@ is386: movl $2,%ecx # set MP
+@@ -423,7 +491,7 @@ is386: movl $2,%ecx # set MP
1: movl $(__KERNEL_DS),%eax # reload all the segment registers
movl %eax,%ss # after changing gdt.
@@ -8992,7 +10004,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
movl %eax,%ds
movl %eax,%es
-@@ -440,8 +499,11 @@ is386: movl $2,%ecx # set MP
+@@ -437,8 +505,11 @@ is386: movl $2,%ecx # set MP
*/
cmpb $0,ready
jne 1f
@@ -9005,7 +10017,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
movw %cx, 8 * GDT_ENTRY_STACK_CANARY + 2(%eax)
shrl $16, %ecx
movb %cl, 8 * GDT_ENTRY_STACK_CANARY + 4(%eax)
-@@ -459,10 +521,6 @@ is386: movl $2,%ecx # set MP
+@@ -456,10 +527,6 @@ is386: movl $2,%ecx # set MP
#ifdef CONFIG_SMP
movb ready, %cl
movb $1, ready
@@ -9016,7 +10028,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
#endif /* CONFIG_SMP */
jmp *(initial_code)
-@@ -548,22 +606,22 @@ early_page_fault:
+@@ -545,22 +612,22 @@ early_page_fault:
jmp early_fault
early_fault:
@@ -9044,7 +10056,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
hlt_loop:
hlt
jmp hlt_loop
-@@ -571,8 +629,11 @@ hlt_loop:
+@@ -568,8 +635,11 @@ hlt_loop:
/* This is the default interrupt "handler" :-) */
ALIGN
ignore_int:
@@ -9057,7 +10069,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
pushl %eax
pushl %ecx
pushl %edx
-@@ -581,9 +642,6 @@ ignore_int:
+@@ -578,9 +648,6 @@ ignore_int:
movl $(__KERNEL_DS),%eax
movl %eax,%ds
movl %eax,%es
@@ -9067,17 +10079,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
pushl 16(%esp)
pushl 24(%esp)
pushl 32(%esp)
-@@ -607,37 +665,40 @@ ignore_int:
- ENTRY(initial_code)
- .long i386_start_kernel
-
--.section .text
--/*
-- * Real beginning of normal "text" segment
-- */
--ENTRY(stext)
--ENTRY(_stext)
--
+@@ -607,27 +674,37 @@ ENTRY(initial_code)
/*
* BSS section
*/
@@ -9120,7 +10122,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
ENTRY(swapper_pg_dir)
.long pa(swapper_pg_pmd+PGD_IDENT_ATTR),0 /* low identity map */
# if KPMDS == 3
-@@ -660,11 +721,12 @@ ENTRY(swapper_pg_dir)
+@@ -650,11 +727,12 @@ ENTRY(swapper_pg_dir)
.data
ENTRY(stack_start)
@@ -9134,7 +10136,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
early_recursion_flag:
.long 0
-@@ -700,7 +762,7 @@ fault_msg:
+@@ -690,7 +768,7 @@ fault_msg:
.word 0 # 32 bit align gdt_desc.address
boot_gdt_descr:
.word __BOOT_DS+7
@@ -9143,7 +10145,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
.word 0 # 32-bit align idt_desc.address
idt_descr:
-@@ -711,7 +773,7 @@ idt_descr:
+@@ -701,7 +779,7 @@ idt_descr:
.word 0 # 32 bit align gdt_desc.address
ENTRY(early_gdt_descr)
.word GDT_ENTRIES*8-1
@@ -9152,7 +10154,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
/*
* The boot_gdt must mirror the equivalent in setup.S and is
-@@ -720,5 +782,59 @@ ENTRY(early_gdt_descr)
+@@ -710,5 +788,59 @@ ENTRY(early_gdt_descr)
.align L1_CACHE_BYTES
ENTRY(boot_gdt)
.fill GDT_ENTRY_BOOT_CS,8,0
@@ -9214,10 +10216,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_32.S linux-2.6.30.8/arch/x86/kern
+ /* Be sure this is zeroed to avoid false validations in Xen */
+ .fill PAGE_SIZE_asm - GDT_SIZE,1,0
+ .endr
-diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kernel/head_64.S
---- linux-2.6.30.8/arch/x86/kernel/head_64.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/head_64.S 2009-09-05 22:09:36.168173047 -0400
-@@ -39,6 +39,10 @@ L4_PAGE_OFFSET = pgd_index(__PAGE_OFFSET
+diff -urNp linux-2.6.31.4/arch/x86/kernel/head_64.S linux-2.6.31.4/arch/x86/kernel/head_64.S
+--- linux-2.6.31.4/arch/x86/kernel/head_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/head_64.S 2009-10-11 15:29:40.803198518 -0400
+@@ -38,6 +38,10 @@ L4_PAGE_OFFSET = pgd_index(__PAGE_OFFSET
L3_PAGE_OFFSET = pud_index(__PAGE_OFFSET)
L4_START_KERNEL = pgd_index(__START_KERNEL_map)
L3_START_KERNEL = pud_index(__START_KERNEL_map)
@@ -9228,7 +10230,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kern
.text
.section .text.head
-@@ -86,35 +90,22 @@ startup_64:
+@@ -85,35 +89,22 @@ startup_64:
*/
addq %rbp, init_level4_pgt + 0(%rip)
addq %rbp, init_level4_pgt + (L4_PAGE_OFFSET*8)(%rip)
@@ -9274,7 +10276,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kern
/*
* Fixup the kernel text+data virtual addresses. Note that
-@@ -188,6 +179,10 @@ ENTRY(secondary_startup_64)
+@@ -187,6 +178,10 @@ ENTRY(secondary_startup_64)
btl $20,%edi /* No Execute supported? */
jnc 1f
btsl $_EFER_NX, %eax
@@ -9285,7 +10287,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kern
1: wrmsr /* Make changes effective */
/* Setup cr0 */
-@@ -263,16 +258,16 @@ ENTRY(secondary_startup_64)
+@@ -262,16 +257,16 @@ ENTRY(secondary_startup_64)
.quad x86_64_start_kernel
ENTRY(initial_gs)
.quad INIT_PER_CPU_VAR(irq_stack_union)
@@ -9304,7 +10306,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kern
#ifdef CONFIG_EARLY_PRINTK
.globl early_idt_handlers
early_idt_handlers:
-@@ -317,18 +312,23 @@ ENTRY(early_idt_handler)
+@@ -316,18 +311,23 @@ ENTRY(early_idt_handler)
#endif /* EARLY_PRINTK */
1: hlt
jmp 1b
@@ -9329,7 +10331,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kern
#define NEXT_PAGE(name) \
.balign PAGE_SIZE; \
ENTRY(name)
-@@ -351,13 +351,27 @@ NEXT_PAGE(init_level4_pgt)
+@@ -350,13 +350,31 @@ NEXT_PAGE(init_level4_pgt)
.quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
.org init_level4_pgt + L4_PAGE_OFFSET*8, 0
.quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
@@ -9343,11 +10345,14 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kern
NEXT_PAGE(level3_ident_pgt)
.quad level2_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
-- .fill 511,8,0
++#ifdef CONFIG_XEN
+ .fill 511,8,0
++#else
+ .quad level2_ident_pgt + PAGE_SIZE - __START_KERNEL_map + _KERNPG_TABLE
+ .quad level2_ident_pgt + 2*PAGE_SIZE - __START_KERNEL_map + _KERNPG_TABLE
+ .quad level2_ident_pgt + 3*PAGE_SIZE - __START_KERNEL_map + _KERNPG_TABLE
+ .fill 508,8,0
++#endif
+
+NEXT_PAGE(level3_vmalloc_pgt)
+ .fill 512,8,0
@@ -9358,7 +10363,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kern
NEXT_PAGE(level3_kernel_pgt)
.fill L3_START_KERNEL,8,0
-@@ -365,20 +379,23 @@ NEXT_PAGE(level3_kernel_pgt)
+@@ -364,20 +382,23 @@ NEXT_PAGE(level3_kernel_pgt)
.quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE
.quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
@@ -9390,7 +10395,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kern
NEXT_PAGE(level2_kernel_pgt)
/*
-@@ -391,33 +408,49 @@ NEXT_PAGE(level2_kernel_pgt)
+@@ -390,33 +411,49 @@ NEXT_PAGE(level2_kernel_pgt)
* If you want to increase this then increase MODULES_VADDR
* too.)
*/
@@ -9450,9 +10455,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/head_64.S linux-2.6.30.8/arch/x86/kern
.section .bss.page_aligned, "aw", @nobits
.align PAGE_SIZE
-diff -urNp linux-2.6.30.8/arch/x86/kernel/i386_ksyms_32.c linux-2.6.30.8/arch/x86/kernel/i386_ksyms_32.c
---- linux-2.6.30.8/arch/x86/kernel/i386_ksyms_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/i386_ksyms_32.c 2009-07-30 09:48:09.948476455 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/i386_ksyms_32.c linux-2.6.31.4/arch/x86/kernel/i386_ksyms_32.c
+--- linux-2.6.31.4/arch/x86/kernel/i386_ksyms_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/i386_ksyms_32.c 2009-10-11 15:29:40.804350684 -0400
@@ -10,8 +10,12 @@
EXPORT_SYMBOL(mcount);
#endif
@@ -9472,12 +10477,12 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/i386_ksyms_32.c linux-2.6.30.8/arch/x8
EXPORT_SYMBOL(empty_zero_page);
+
+#ifdef CONFIG_PAX_KERNEXEC
-+EXPORT_SYMBOL(KERNEL_TEXT_OFFSET);
++EXPORT_SYMBOL(__LOAD_PHYSICAL_ADDR);
+#endif
-diff -urNp linux-2.6.30.8/arch/x86/kernel/init_task.c linux-2.6.30.8/arch/x86/kernel/init_task.c
---- linux-2.6.30.8/arch/x86/kernel/init_task.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/init_task.c 2009-07-30 09:48:09.948476455 -0400
-@@ -40,5 +40,5 @@ EXPORT_SYMBOL(init_task);
+diff -urNp linux-2.6.31.4/arch/x86/kernel/init_task.c linux-2.6.31.4/arch/x86/kernel/init_task.c
+--- linux-2.6.31.4/arch/x86/kernel/init_task.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/init_task.c 2009-10-11 15:29:40.804350684 -0400
+@@ -39,5 +39,5 @@ EXPORT_SYMBOL(init_task);
* section. Since TSS's are completely CPU-local, we want them
* on exact cacheline boundaries, to eliminate cacheline ping-pong.
*/
@@ -9485,9 +10490,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/init_task.c linux-2.6.30.8/arch/x86/ke
-
+struct tss_struct init_tss[NR_CPUS] ____cacheline_internodealigned_in_smp = { [0 ... NR_CPUS-1] = INIT_TSS };
+EXPORT_SYMBOL(init_tss);
-diff -urNp linux-2.6.30.8/arch/x86/kernel/ioport.c linux-2.6.30.8/arch/x86/kernel/ioport.c
---- linux-2.6.30.8/arch/x86/kernel/ioport.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/ioport.c 2009-07-30 11:10:48.918448854 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/ioport.c linux-2.6.31.4/arch/x86/kernel/ioport.c
+--- linux-2.6.31.4/arch/x86/kernel/ioport.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/ioport.c 2009-10-11 15:29:40.804350684 -0400
@@ -6,6 +6,7 @@
#include <linux/sched.h>
#include <linux/kernel.h>
@@ -9532,9 +10537,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/ioport.c linux-2.6.30.8/arch/x86/kerne
}
regs->flags = (regs->flags & ~X86_EFLAGS_IOPL) | (level << 12);
-diff -urNp linux-2.6.30.8/arch/x86/kernel/irq_32.c linux-2.6.30.8/arch/x86/kernel/irq_32.c
---- linux-2.6.30.8/arch/x86/kernel/irq_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/irq_32.c 2009-07-30 09:48:09.948476455 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/irq_32.c linux-2.6.31.4/arch/x86/kernel/irq_32.c
+--- linux-2.6.31.4/arch/x86/kernel/irq_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/irq_32.c 2009-10-11 15:29:40.805176137 -0400
@@ -94,7 +94,7 @@ execute_on_irq_stack(int overflow, struc
return 0;
@@ -9553,54 +10558,44 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/irq_32.c linux-2.6.30.8/arch/x86/kerne
call_on_stack(__do_softirq, isp);
/*
-diff -urNp linux-2.6.30.8/arch/x86/kernel/kprobes.c linux-2.6.30.8/arch/x86/kernel/kprobes.c
---- linux-2.6.30.8/arch/x86/kernel/kprobes.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/kprobes.c 2009-07-30 09:48:09.948476455 -0400
-@@ -166,9 +166,24 @@ static void __kprobes set_jmp_op(void *f
+diff -urNp linux-2.6.31.4/arch/x86/kernel/kgdb.c linux-2.6.31.4/arch/x86/kernel/kgdb.c
+--- linux-2.6.31.4/arch/x86/kernel/kgdb.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/kgdb.c 2009-10-11 15:29:56.565890778 -0400
+@@ -573,7 +573,7 @@ unsigned long kgdb_arch_pc(int exception
+ return instruction_pointer(regs);
+ }
+
+-struct kgdb_arch arch_kgdb_ops = {
++const struct kgdb_arch arch_kgdb_ops = {
+ /* Breakpoint instruction: */
+ .gdb_bpt_instr = { 0xcc },
+ .flags = KGDB_HW_BREAKPOINT,
+diff -urNp linux-2.6.31.4/arch/x86/kernel/kprobes.c linux-2.6.31.4/arch/x86/kernel/kprobes.c
+--- linux-2.6.31.4/arch/x86/kernel/kprobes.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/kprobes.c 2009-10-12 23:12:55.189930027 -0400
+@@ -166,9 +166,13 @@ static void __kprobes set_jmp_op(void *f
char op;
s32 raddr;
} __attribute__((packed)) * jop;
- jop = (struct __arch_jmp_op *)from;
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
+ jop = (struct __arch_jmp_op *)(ktla_ktva(from));
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
jop->raddr = (s32)((long)(to) - ((long)(from) + 5));
jop->op = RELATIVEJUMP_INSTRUCTION;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
/*
-@@ -345,16 +360,29 @@ static void __kprobes fix_riprel(struct
+@@ -345,16 +349,18 @@ static void __kprobes fix_riprel(struct
static void __kprobes arch_copy_kprobe(struct kprobe *p)
{
- memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
+ memcpy(p->ainsn.insn, ktla_ktva(p->addr), MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
fix_riprel(p);
@@ -9615,7 +10610,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/kprobes.c linux-2.6.30.8/arch/x86/kern
}
int __kprobes arch_prepare_kprobe(struct kprobe *p)
-@@ -432,7 +460,7 @@ static void __kprobes prepare_singlestep
+@@ -432,7 +438,7 @@ static void __kprobes prepare_singlestep
if (p->opcode == BREAKPOINT_INSTRUCTION)
regs->ip = (unsigned long)p->addr;
else
@@ -9624,7 +10619,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/kprobes.c linux-2.6.30.8/arch/x86/kern
}
void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
-@@ -453,7 +481,7 @@ static void __kprobes setup_singlestep(s
+@@ -453,7 +459,7 @@ static void __kprobes setup_singlestep(s
if (p->ainsn.boostable == 1 && !p->post_handler) {
/* Boost up -- we can execute copied instructions directly */
reset_current_kprobe();
@@ -9633,7 +10628,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/kprobes.c linux-2.6.30.8/arch/x86/kern
preempt_enable_no_resched();
return;
}
-@@ -523,7 +551,7 @@ static int __kprobes kprobe_handler(stru
+@@ -523,7 +529,7 @@ static int __kprobes kprobe_handler(stru
struct kprobe_ctlblk *kcb;
addr = (kprobe_opcode_t *)(regs->ip - sizeof(kprobe_opcode_t));
@@ -9642,7 +10637,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/kprobes.c linux-2.6.30.8/arch/x86/kern
/*
* The breakpoint instruction was removed right
* after we hit it. Another cpu has removed
-@@ -775,7 +803,7 @@ static void __kprobes resume_execution(s
+@@ -775,7 +781,7 @@ static void __kprobes resume_execution(s
struct pt_regs *regs, struct kprobe_ctlblk *kcb)
{
unsigned long *tos = stack_addr(regs);
@@ -9651,7 +10646,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/kprobes.c linux-2.6.30.8/arch/x86/kern
unsigned long orig_ip = (unsigned long)p->addr;
kprobe_opcode_t *insn = p->ainsn.insn;
-@@ -958,7 +986,7 @@ int __kprobes kprobe_exceptions_notify(s
+@@ -958,7 +964,7 @@ int __kprobes kprobe_exceptions_notify(s
struct die_args *args = data;
int ret = NOTIFY_DONE;
@@ -9660,9 +10655,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/kprobes.c linux-2.6.30.8/arch/x86/kern
return ret;
switch (val) {
-diff -urNp linux-2.6.30.8/arch/x86/kernel/ldt.c linux-2.6.30.8/arch/x86/kernel/ldt.c
---- linux-2.6.30.8/arch/x86/kernel/ldt.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/ldt.c 2009-07-30 09:48:09.950015875 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/ldt.c linux-2.6.31.4/arch/x86/kernel/ldt.c
+--- linux-2.6.31.4/arch/x86/kernel/ldt.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/ldt.c 2009-10-11 15:29:40.805176137 -0400
@@ -66,13 +66,13 @@ static int alloc_ldt(mm_context_t *pc, i
if (reload) {
#ifdef CONFIG_SMP
@@ -9727,9 +10722,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/ldt.c linux-2.6.30.8/arch/x86/kernel/l
fill_ldt(&ldt, &ldt_info);
if (oldmode)
ldt.avl = 0;
-diff -urNp linux-2.6.30.8/arch/x86/kernel/machine_kexec_32.c linux-2.6.30.8/arch/x86/kernel/machine_kexec_32.c
---- linux-2.6.30.8/arch/x86/kernel/machine_kexec_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/machine_kexec_32.c 2009-07-30 09:48:09.950015875 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/machine_kexec_32.c linux-2.6.31.4/arch/x86/kernel/machine_kexec_32.c
+--- linux-2.6.31.4/arch/x86/kernel/machine_kexec_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/machine_kexec_32.c 2009-10-11 15:29:40.805176137 -0400
@@ -26,7 +26,7 @@
#include <asm/system.h>
#include <asm/cacheflush.h>
@@ -9757,33 +10752,88 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/machine_kexec_32.c linux-2.6.30.8/arch
relocate_kernel_ptr = control_page;
page_list[PA_CONTROL_PAGE] = __pa(control_page);
-diff -urNp linux-2.6.30.8/arch/x86/kernel/module_32.c linux-2.6.30.8/arch/x86/kernel/module_32.c
---- linux-2.6.30.8/arch/x86/kernel/module_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/module_32.c 2009-08-01 15:35:35.138919235 -0400
-@@ -23,6 +23,9 @@
- #include <linux/kernel.h>
- #include <linux/bug.h>
+diff -urNp linux-2.6.31.4/arch/x86/kernel/microcode_amd.c linux-2.6.31.4/arch/x86/kernel/microcode_amd.c
+--- linux-2.6.31.4/arch/x86/kernel/microcode_amd.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/microcode_amd.c 2009-10-11 15:29:56.565890778 -0400
+@@ -340,7 +340,7 @@ static void microcode_fini_cpu_amd(int c
+ uci->mc = NULL;
+ }
-+#include <asm/desc.h>
-+#include <asm/pgtable.h>
-+
- #if 0
- #define DEBUGP printk
- #else
-@@ -33,9 +36,31 @@ void *module_alloc(unsigned long size)
+-static struct microcode_ops microcode_amd_ops = {
++static const struct microcode_ops microcode_amd_ops = {
+ .request_microcode_user = request_microcode_user,
+ .request_microcode_fw = request_microcode_fw,
+ .collect_cpu_info = collect_cpu_info_amd,
+@@ -348,7 +348,7 @@ static struct microcode_ops microcode_am
+ .microcode_fini_cpu = microcode_fini_cpu_amd,
+ };
+
+-struct microcode_ops * __init init_amd_microcode(void)
++const struct microcode_ops * __init init_amd_microcode(void)
{
- if (size == 0)
- return NULL;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL);
-+#else
- return vmalloc_exec(size);
-+#endif
-+
+ return &microcode_amd_ops;
+ }
+diff -urNp linux-2.6.31.4/arch/x86/kernel/microcode_core.c linux-2.6.31.4/arch/x86/kernel/microcode_core.c
+--- linux-2.6.31.4/arch/x86/kernel/microcode_core.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/microcode_core.c 2009-10-11 15:29:56.565890778 -0400
+@@ -90,7 +90,7 @@ MODULE_LICENSE("GPL");
+
+ #define MICROCODE_VERSION "2.00"
+
+-static struct microcode_ops *microcode_ops;
++static const struct microcode_ops *microcode_ops;
+
+ /*
+ * Synchronization.
+diff -urNp linux-2.6.31.4/arch/x86/kernel/microcode_intel.c linux-2.6.31.4/arch/x86/kernel/microcode_intel.c
+--- linux-2.6.31.4/arch/x86/kernel/microcode_intel.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/microcode_intel.c 2009-10-11 15:29:56.566751102 -0400
+@@ -460,7 +460,7 @@ static void microcode_fini_cpu(int cpu)
+ uci->mc = NULL;
+ }
+
+-static struct microcode_ops microcode_intel_ops = {
++static const struct microcode_ops microcode_intel_ops = {
+ .request_microcode_user = request_microcode_user,
+ .request_microcode_fw = request_microcode_fw,
+ .collect_cpu_info = collect_cpu_info,
+@@ -468,7 +468,7 @@ static struct microcode_ops microcode_in
+ .microcode_fini_cpu = microcode_fini_cpu,
+ };
+
+-struct microcode_ops * __init init_intel_microcode(void)
++const struct microcode_ops * __init init_intel_microcode(void)
+ {
+ return &microcode_intel_ops;
}
+diff -urNp linux-2.6.31.4/arch/x86/kernel/module.c linux-2.6.31.4/arch/x86/kernel/module.c
+--- linux-2.6.31.4/arch/x86/kernel/module.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/module.c 2009-10-18 10:09:07.037806226 -0400
+@@ -34,7 +34,7 @@
+ #define DEBUGP(fmt...)
+ #endif
+
+-void *module_alloc(unsigned long size)
++static void *__module_alloc(unsigned long size, pgprot_t prot)
+ {
+ struct vm_struct *area;
+@@ -48,9 +48,90 @@ void *module_alloc(unsigned long size)
+ if (!area)
+ return NULL;
+
+- return __vmalloc_area(area, GFP_KERNEL | __GFP_HIGHMEM,
+- PAGE_KERNEL_EXEC);
++ return __vmalloc_area(area, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, prot);
++}
++
+#ifdef CONFIG_PAX_KERNEXEC
++#ifdef CONFIG_X86_32
++void *module_alloc(unsigned long size)
++{
++ return __module_alloc(size, PAGE_KERNEL);
++}
++
+void *module_alloc_exec(unsigned long size)
+{
+ struct vm_struct *area;
@@ -9791,22 +10841,14 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/module_32.c linux-2.6.30.8/arch/x86/ke
+ if (size == 0)
+ return NULL;
+
-+ area = __get_vm_area(size, VM_ALLOC, (unsigned long)&MODULES_VADDR, (unsigned long)&MODULES_END);
++ area = __get_vm_area(size, VM_ALLOC, (unsigned long)&MODULES_EXEC_VADDR, (unsigned long)&MODULES_EXEC_END);
+ if (area)
+ return area->addr;
+
+ return NULL;
+}
+EXPORT_SYMBOL(module_alloc_exec);
-+#endif
-
- /* Free memory returned from module_alloc */
- void module_free(struct module *mod, void *module_region)
-@@ -45,6 +70,46 @@ void module_free(struct module *mod, voi
- table entries. */
- }
-
-+#ifdef CONFIG_PAX_KERNEXEC
++
+void module_free_exec(struct module *mod, void *module_region)
+{
+ struct vm_struct **p, *tmp;
@@ -9826,11 +10868,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/module_32.c linux-2.6.30.8/arch/x86/ke
+ break;
+
+ if (tmp) {
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
++ pax_open_kernel();
+ memset(tmp->addr, 0xCC, tmp->size);
-+ pax_close_kernel(cr0);
++ pax_close_kernel();
+
+ *p = tmp->next;
+ kfree(tmp);
@@ -9844,21 +10884,39 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/module_32.c linux-2.6.30.8/arch/x86/ke
+ }
+}
+EXPORT_SYMBOL(module_free_exec);
-+#endif
++#else
++void *module_alloc(unsigned long size)
++{
++ return __module_alloc(size, PAGE_KERNEL);
++}
++
++void module_free_exec(struct module *mod, void *module_region)
++{
++ module_free(mod, module_region);
+ }
++EXPORT_SYMBOL(module_free_exec);
+
- /* We don't need anything special. */
- int module_frob_arch_sections(Elf_Ehdr *hdr,
- Elf_Shdr *sechdrs,
-@@ -63,14 +128,20 @@ int apply_relocate(Elf32_Shdr *sechdrs,
++void *module_alloc_exec(unsigned long size)
++{
++ return __module_alloc(size, PAGE_KERNEL_RX);
++}
++EXPORT_SYMBOL(module_alloc_exec);
++#endif
++#else
++void *module_alloc(unsigned long size)
++{
++ return __module_alloc(size, PAGE_KERNEL_EXEC);
++}
++#endif
+
+ /* Free memory returned from module_alloc */
+ void module_free(struct module *mod, void *module_region)
+@@ -77,14 +158,16 @@ int apply_relocate(Elf32_Shdr *sechdrs,
unsigned int i;
Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr;
Elf32_Sym *sym;
- uint32_t *location;
+ uint32_t *plocation, location;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
DEBUGP("Applying relocate section %u to %u\n", relsec,
sechdrs[relsec].sh_info);
@@ -9873,164 +10931,58 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/module_32.c linux-2.6.30.8/arch/x86/ke
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
-@@ -78,12 +149,32 @@ int apply_relocate(Elf32_Shdr *sechdrs,
-
+@@ -93,11 +176,15 @@ int apply_relocate(Elf32_Shdr *sechdrs,
switch (ELF32_R_TYPE(rel[i].r_info)) {
case R_386_32:
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
/* We add the value into the location given */
- *location += sym->st_value;
++ pax_open_kernel();
+ *plocation += sym->st_value;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
break;
case R_386_PC32:
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
/* Add the value, subtract its postition */
- *location += sym->st_value - (uint32_t)location;
++ pax_open_kernel();
+ *plocation += sym->st_value - location;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
break;
default:
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
-diff -urNp linux-2.6.30.8/arch/x86/kernel/module_64.c linux-2.6.30.8/arch/x86/kernel/module_64.c
---- linux-2.6.30.8/arch/x86/kernel/module_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/module_64.c 2009-08-01 15:35:35.161871747 -0400
-@@ -40,7 +40,7 @@ void module_free(struct module *mod, voi
- table entries. */
- }
-
--void *module_alloc(unsigned long size)
-+static void *__module_alloc(unsigned long size, pgprot_t prot)
- {
- struct vm_struct *area;
-
-@@ -54,8 +54,33 @@ void *module_alloc(unsigned long size)
- if (!area)
- return NULL;
-
-- return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC);
-+ return __vmalloc_area(area, GFP_KERNEL | __GFP_ZERO, prot);
-+}
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+void *module_alloc(unsigned long size)
-+{
-+ return __module_alloc(size, PAGE_KERNEL);
-+}
-+
-+void module_free_exec(struct module *mod, void *module_region)
-+{
-+ module_free(mod, module_region);
-+}
-+EXPORT_SYMBOL(module_free_exec);
-+
-+void *module_alloc_exec(unsigned long size)
-+{
-+ return __module_alloc(size, PAGE_KERNEL_RX);
-+EXPORT_SYMBOL(module_alloc_exec);
- }
-+#else
-+void *module_alloc(unsigned long size)
-+{
-+ return __module_alloc(size, PAGE_KERNEL_EXEC);
-+}
-+#endif
-+
- #endif
-
- /* We don't need anything special. */
-@@ -79,6 +104,10 @@ int apply_relocate_add(Elf64_Shdr *sechd
- void *loc;
- u64 val;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- DEBUGP("Applying relocate section %u to %u\n", relsec,
- sechdrs[relsec].sh_info);
- for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
-@@ -101,21 +130,61 @@ int apply_relocate_add(Elf64_Shdr *sechd
+@@ -153,21 +240,30 @@ int apply_relocate_add(Elf64_Shdr *sechd
case R_X86_64_NONE:
break;
case R_X86_64_64:
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
*(u64 *)loc = val;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
break;
case R_X86_64_32:
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
*(u32 *)loc = val;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
if (val != *(u32 *)loc)
goto overflow;
break;
case R_X86_64_32S:
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
*(s32 *)loc = val;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
if ((s64)val != *(s32 *)loc)
goto overflow;
break;
case R_X86_64_PC32:
val -= (u64)loc;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
*(u32 *)loc = val;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
#if 0
if ((s64)val != *(s32 *)loc)
goto overflow;
-diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt.c linux-2.6.30.8/arch/x86/kernel/paravirt.c
---- linux-2.6.30.8/arch/x86/kernel/paravirt.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/paravirt.c 2009-07-30 09:48:09.950702241 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/paravirt.c linux-2.6.31.4/arch/x86/kernel/paravirt.c
+--- linux-2.6.31.4/arch/x86/kernel/paravirt.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/paravirt.c 2009-10-12 23:12:55.191160939 -0400
@@ -54,7 +54,7 @@ u64 _paravirt_ident_64(u64 x)
return x;
}
@@ -10040,6 +10992,34 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt.c linux-2.6.30.8/arch/x86/ker
{
printk(KERN_INFO "Booting paravirtualized kernel on %s\n",
pv_info.name);
+@@ -125,9 +125,9 @@ unsigned paravirt_patch_jmp(void *insnbu
+
+ /* Neat trick to map patch type back to the call within the
+ * corresponding structure. */
+-static void *get_call_destination(u8 type)
++static const void *get_call_destination(u8 type)
+ {
+- struct paravirt_patch_template tmpl = {
++ const struct paravirt_patch_template tmpl = {
+ .pv_init_ops = pv_init_ops,
+ .pv_time_ops = pv_time_ops,
+ .pv_cpu_ops = pv_cpu_ops,
+@@ -138,13 +138,13 @@ static void *get_call_destination(u8 typ
+ .pv_lock_ops = pv_lock_ops,
+ #endif
+ };
+- return *((void **)&tmpl + type);
++ return *((const void **)&tmpl + type);
+ }
+
+ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
+ unsigned long addr, unsigned len)
+ {
+- void *opfunc = get_call_destination(type);
++ const void *opfunc = get_call_destination(type);
+ unsigned ret;
+
+ if (opfunc == NULL)
@@ -183,7 +183,7 @@ unsigned paravirt_patch_insns(void *insn
if (insn_len > len || start == NULL)
insn_len = len;
@@ -10049,7 +11029,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt.c linux-2.6.30.8/arch/x86/ker
return insn_len;
}
-@@ -313,21 +313,21 @@ void arch_flush_lazy_cpu_mode(void)
+@@ -311,21 +311,21 @@ void arch_flush_lazy_mmu_mode(void)
preempt_enable();
}
@@ -10074,7 +11054,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt.c linux-2.6.30.8/arch/x86/ker
.time_init = hpet_time_init,
.get_wallclock = native_get_wallclock,
.set_wallclock = native_set_wallclock,
-@@ -335,7 +335,7 @@ struct pv_time_ops pv_time_ops = {
+@@ -333,7 +333,7 @@ struct pv_time_ops pv_time_ops = {
.get_tsc_khz = native_calibrate_tsc,
};
@@ -10083,7 +11063,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt.c linux-2.6.30.8/arch/x86/ker
.init_IRQ = native_init_IRQ,
.save_fl = __PV_IS_CALLEE_SAVE(native_save_fl),
.restore_fl = __PV_IS_CALLEE_SAVE(native_restore_fl),
-@@ -348,7 +348,7 @@ struct pv_irq_ops pv_irq_ops = {
+@@ -346,7 +346,7 @@ struct pv_irq_ops pv_irq_ops = {
#endif
};
@@ -10092,8 +11072,8 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt.c linux-2.6.30.8/arch/x86/ker
.cpuid = native_cpuid,
.get_debugreg = native_get_debugreg,
.set_debugreg = native_set_debugreg,
-@@ -410,7 +410,7 @@ struct pv_cpu_ops pv_cpu_ops = {
- },
+@@ -406,7 +406,7 @@ struct pv_cpu_ops pv_cpu_ops = {
+ .end_context_switch = paravirt_nop,
};
-struct pv_apic_ops pv_apic_ops = {
@@ -10101,7 +11081,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt.c linux-2.6.30.8/arch/x86/ker
#ifdef CONFIG_X86_LOCAL_APIC
.setup_boot_clock = setup_boot_APIC_clock,
.setup_secondary_clock = setup_secondary_APIC_clock,
-@@ -426,7 +426,7 @@ struct pv_apic_ops pv_apic_ops = {
+@@ -422,7 +422,7 @@ struct pv_apic_ops pv_apic_ops = {
#define PTE_IDENT __PV_IS_CALLEE_SAVE(_paravirt_ident_64)
#endif
@@ -10110,9 +11090,22 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt.c linux-2.6.30.8/arch/x86/ker
#ifndef CONFIG_X86_64
.pagetable_setup_start = native_pagetable_setup_start,
.pagetable_setup_done = native_pagetable_setup_done,
-diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt-spinlocks.c linux-2.6.30.8/arch/x86/kernel/paravirt-spinlocks.c
---- linux-2.6.30.8/arch/x86/kernel/paravirt-spinlocks.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/paravirt-spinlocks.c 2009-07-30 09:48:09.950702241 -0400
+@@ -500,6 +500,12 @@ struct pv_mmu_ops pv_mmu_ops = {
+ },
+
+ .set_fixmap = native_set_fixmap,
++
++#ifdef CONFIG_PAX_KERNEXEC
++ .pax_open_kernel = native_pax_open_kernel,
++ .pax_close_kernel = native_pax_close_kernel,
++#endif
++
+ };
+
+ EXPORT_SYMBOL_GPL(pv_time_ops);
+diff -urNp linux-2.6.31.4/arch/x86/kernel/paravirt-spinlocks.c linux-2.6.31.4/arch/x86/kernel/paravirt-spinlocks.c
+--- linux-2.6.31.4/arch/x86/kernel/paravirt-spinlocks.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/paravirt-spinlocks.c 2009-10-11 15:29:40.806332268 -0400
@@ -13,7 +13,7 @@ default_spin_lock_flags(raw_spinlock_t *
__raw_spin_lock(lock);
}
@@ -10122,10 +11115,43 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/paravirt-spinlocks.c linux-2.6.30.8/ar
#ifdef CONFIG_SMP
.spin_is_locked = __ticket_spin_is_locked,
.spin_is_contended = __ticket_spin_is_contended,
-diff -urNp linux-2.6.30.8/arch/x86/kernel/process_32.c linux-2.6.30.8/arch/x86/kernel/process_32.c
---- linux-2.6.30.8/arch/x86/kernel/process_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/process_32.c 2009-07-30 09:48:09.951950745 -0400
-@@ -73,6 +73,7 @@ EXPORT_PER_CPU_SYMBOL(current_task);
+diff -urNp linux-2.6.31.4/arch/x86/kernel/pci-dma.c linux-2.6.31.4/arch/x86/kernel/pci-dma.c
+--- linux-2.6.31.4/arch/x86/kernel/pci-dma.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/pci-dma.c 2009-10-11 15:29:56.566751102 -0400
+@@ -13,7 +13,7 @@
+
+ static int forbid_dac __read_mostly;
+
+-struct dma_map_ops *dma_ops;
++const struct dma_map_ops *dma_ops;
+ EXPORT_SYMBOL(dma_ops);
+
+ static int iommu_sac_force __read_mostly;
+@@ -234,7 +234,7 @@ early_param("iommu", iommu_setup);
+
+ int dma_supported(struct device *dev, u64 mask)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ #ifdef CONFIG_PCI
+ if (mask > 0xffffffff && forbid_dac > 0) {
+diff -urNp linux-2.6.31.4/arch/x86/kernel/pci-nommu.c linux-2.6.31.4/arch/x86/kernel/pci-nommu.c
+--- linux-2.6.31.4/arch/x86/kernel/pci-nommu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/pci-nommu.c 2009-10-11 15:29:56.566751102 -0400
+@@ -79,7 +79,7 @@ static void nommu_free_coherent(struct d
+ free_pages((unsigned long)vaddr, get_order(size));
+ }
+
+-struct dma_map_ops nommu_dma_ops = {
++const struct dma_map_ops nommu_dma_ops = {
+ .alloc_coherent = dma_generic_alloc_coherent,
+ .free_coherent = nommu_free_coherent,
+ .map_sg = nommu_map_sg,
+diff -urNp linux-2.6.31.4/arch/x86/kernel/process_32.c linux-2.6.31.4/arch/x86/kernel/process_32.c
+--- linux-2.6.31.4/arch/x86/kernel/process_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/process_32.c 2009-10-11 15:29:40.807144183 -0400
+@@ -70,6 +70,7 @@ EXPORT_PER_CPU_SYMBOL(current_task);
unsigned long thread_saved_pc(struct task_struct *tsk)
{
return ((unsigned long *)tsk->thread.sp)[3];
@@ -10133,7 +11159,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_32.c linux-2.6.30.8/arch/x86/k
}
#ifndef CONFIG_SMP
-@@ -135,7 +136,7 @@ void __show_regs(struct pt_regs *regs, i
+@@ -132,7 +133,7 @@ void __show_regs(struct pt_regs *regs, i
unsigned short ss, gs;
const char *board;
@@ -10142,7 +11168,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_32.c linux-2.6.30.8/arch/x86/k
sp = regs->sp;
ss = regs->ss & 0xffff;
gs = get_user_gs(regs);
-@@ -216,8 +217,8 @@ int kernel_thread(int (*fn)(void *), voi
+@@ -213,8 +214,8 @@ int kernel_thread(int (*fn)(void *), voi
regs.bx = (unsigned long) fn;
regs.dx = (unsigned long) arg;
@@ -10153,7 +11179,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_32.c linux-2.6.30.8/arch/x86/k
regs.fs = __KERNEL_PERCPU;
regs.gs = __KERNEL_STACK_CANARY;
regs.orig_ax = -1;
-@@ -253,7 +254,7 @@ int copy_thread(unsigned long clone_flag
+@@ -250,7 +251,7 @@ int copy_thread(unsigned long clone_flag
struct task_struct *tsk;
int err;
@@ -10162,7 +11188,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_32.c linux-2.6.30.8/arch/x86/k
*childregs = *regs;
childregs->ax = 0;
childregs->sp = sp;
-@@ -282,6 +283,7 @@ int copy_thread(unsigned long clone_flag
+@@ -279,6 +280,7 @@ int copy_thread(unsigned long clone_flag
* Set a new TLS for the child thread?
*/
if (clone_flags & CLONE_SETTLS)
@@ -10170,7 +11196,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_32.c linux-2.6.30.8/arch/x86/k
err = do_set_thread_area(p, -1,
(struct user_desc __user *)childregs->si, 0);
-@@ -351,7 +353,7 @@ __switch_to(struct task_struct *prev_p,
+@@ -349,7 +351,7 @@ __switch_to(struct task_struct *prev_p,
struct thread_struct *prev = &prev_p->thread,
*next = &next_p->thread;
int cpu = smp_processor_id();
@@ -10179,7 +11205,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_32.c linux-2.6.30.8/arch/x86/k
/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
-@@ -379,6 +381,11 @@ __switch_to(struct task_struct *prev_p,
+@@ -377,6 +379,11 @@ __switch_to(struct task_struct *prev_p,
*/
lazy_save_gs(prev->gs);
@@ -10191,25 +11217,16 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_32.c linux-2.6.30.8/arch/x86/k
/*
* Load the per-thread Thread-Local Storage descriptor.
*/
-@@ -497,15 +504,27 @@ unsigned long get_wchan(struct task_stru
+@@ -495,3 +502,27 @@ unsigned long get_wchan(struct task_stru
return 0;
}
--unsigned long arch_align_stack(unsigned long sp)
+#ifdef CONFIG_PAX_RANDKSTACK
+asmlinkage void pax_randomize_kstack(void)
- {
-- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
-- sp -= get_random_int() % 8192;
-- return sp & ~0xf;
--}
++{
+ struct thread_struct *thread = &current->thread;
+ unsigned long time;
-
--unsigned long arch_randomize_brk(struct mm_struct *mm)
--{
-- unsigned long range_end = mm->brk + 0x02000000;
-- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
++
+ if (!randomize_va_space)
+ return;
+
@@ -10226,12 +11243,12 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_32.c linux-2.6.30.8/arch/x86/k
+
+ thread->sp0 ^= time;
+ load_sp0(init_tss + smp_processor_id(), thread);
- }
++}
+#endif
-diff -urNp linux-2.6.30.8/arch/x86/kernel/process_64.c linux-2.6.30.8/arch/x86/kernel/process_64.c
---- linux-2.6.30.8/arch/x86/kernel/process_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/process_64.c 2009-07-30 09:48:09.951950745 -0400
-@@ -97,7 +97,7 @@ static void __exit_idle(void)
+diff -urNp linux-2.6.31.4/arch/x86/kernel/process_64.c linux-2.6.31.4/arch/x86/kernel/process_64.c
+--- linux-2.6.31.4/arch/x86/kernel/process_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/process_64.c 2009-10-11 15:29:40.807144183 -0400
+@@ -94,7 +94,7 @@ static void __exit_idle(void)
void exit_idle(void)
{
/* idle loop has pid 0 */
@@ -10240,7 +11257,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_64.c linux-2.6.30.8/arch/x86/k
return;
__exit_idle();
}
-@@ -176,7 +176,7 @@ void __show_regs(struct pt_regs *regs, i
+@@ -173,7 +173,7 @@ void __show_regs(struct pt_regs *regs, i
if (!board)
board = "";
printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s\n",
@@ -10249,7 +11266,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_64.c linux-2.6.30.8/arch/x86/k
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version, board);
-@@ -386,7 +386,7 @@ __switch_to(struct task_struct *prev_p,
+@@ -384,7 +384,7 @@ __switch_to(struct task_struct *prev_p,
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
@@ -10258,7 +11275,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_64.c linux-2.6.30.8/arch/x86/k
unsigned fsindex, gsindex;
/* we're going to use this soon, after a few expensive things */
-@@ -545,12 +545,11 @@ unsigned long get_wchan(struct task_stru
+@@ -543,12 +543,11 @@ unsigned long get_wchan(struct task_stru
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
stack = (unsigned long)task_stack_page(p);
@@ -10273,27 +11290,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process_64.c linux-2.6.30.8/arch/x86/k
return 0;
ip = *(u64 *)(fp+8);
if (!in_sched_functions(ip))
-@@ -659,16 +658,3 @@ long sys_arch_prctl(int code, unsigned l
- {
- return do_arch_prctl(current, code, addr);
- }
--
--unsigned long arch_align_stack(unsigned long sp)
--{
-- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
-- sp -= get_random_int() % 8192;
-- return sp & ~0xf;
--}
--
--unsigned long arch_randomize_brk(struct mm_struct *mm)
--{
-- unsigned long range_end = mm->brk + 0x02000000;
-- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
--}
-diff -urNp linux-2.6.30.8/arch/x86/kernel/process.c linux-2.6.30.8/arch/x86/kernel/process.c
---- linux-2.6.30.8/arch/x86/kernel/process.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/process.c 2009-08-05 19:08:00.495411211 -0400
-@@ -71,7 +71,7 @@ void exit_thread(void)
+diff -urNp linux-2.6.31.4/arch/x86/kernel/process.c linux-2.6.31.4/arch/x86/kernel/process.c
+--- linux-2.6.31.4/arch/x86/kernel/process.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/process.c 2009-10-11 15:29:40.847340009 -0400
+@@ -76,7 +76,7 @@ void exit_thread(void)
unsigned long *bp = t->io_bitmap_ptr;
if (bp) {
@@ -10302,7 +11302,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process.c linux-2.6.30.8/arch/x86/kern
t->io_bitmap_ptr = NULL;
clear_thread_flag(TIF_IO_BITMAP);
-@@ -105,6 +105,9 @@ void flush_thread(void)
+@@ -108,6 +108,9 @@ void flush_thread(void)
clear_tsk_thread_flag(tsk, TIF_DEBUG);
@@ -10312,10 +11312,28 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/process.c linux-2.6.30.8/arch/x86/kern
tsk->thread.debugreg0 = 0;
tsk->thread.debugreg1 = 0;
tsk->thread.debugreg2 = 0;
-diff -urNp linux-2.6.30.8/arch/x86/kernel/ptrace.c linux-2.6.30.8/arch/x86/kernel/ptrace.c
---- linux-2.6.30.8/arch/x86/kernel/ptrace.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/ptrace.c 2009-07-30 09:48:09.952643339 -0400
-@@ -1374,7 +1374,7 @@ void send_sigtrap(struct task_struct *ts
+@@ -611,17 +614,3 @@ static int __init idle_setup(char *str)
+ return 0;
+ }
+ early_param("idle", idle_setup);
+-
+-unsigned long arch_align_stack(unsigned long sp)
+-{
+- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
+- sp -= get_random_int() % 8192;
+- return sp & ~0xf;
+-}
+-
+-unsigned long arch_randomize_brk(struct mm_struct *mm)
+-{
+- unsigned long range_end = mm->brk + 0x02000000;
+- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
+-}
+-
+diff -urNp linux-2.6.31.4/arch/x86/kernel/ptrace.c linux-2.6.31.4/arch/x86/kernel/ptrace.c
+--- linux-2.6.31.4/arch/x86/kernel/ptrace.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/ptrace.c 2009-10-11 15:29:40.847340009 -0400
+@@ -1454,7 +1454,7 @@ void send_sigtrap(struct task_struct *ts
info.si_code = si_code;
/* User-mode ip? */
@@ -10324,9 +11342,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/ptrace.c linux-2.6.30.8/arch/x86/kerne
/* Send us the fake SIGTRAP */
force_sig_info(SIGTRAP, &info, tsk);
-diff -urNp linux-2.6.30.8/arch/x86/kernel/reboot.c linux-2.6.30.8/arch/x86/kernel/reboot.c
---- linux-2.6.30.8/arch/x86/kernel/reboot.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/reboot.c 2009-07-30 09:48:09.952643339 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/reboot.c linux-2.6.31.4/arch/x86/kernel/reboot.c
+--- linux-2.6.31.4/arch/x86/kernel/reboot.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/reboot.c 2009-10-11 15:29:40.848286998 -0400
@@ -31,7 +31,7 @@ void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
@@ -10336,8 +11354,8 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/reboot.c linux-2.6.30.8/arch/x86/kerne
enum reboot_type reboot_type = BOOT_KBD;
int reboot_force;
-@@ -249,7 +249,7 @@ static struct dmi_system_id __initdata r
- DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"),
+@@ -257,7 +257,7 @@ static struct dmi_system_id __initdata r
+ DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"),
},
},
- { }
@@ -10345,7 +11363,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/reboot.c linux-2.6.30.8/arch/x86/kerne
};
static int __init reboot_init(void)
-@@ -265,12 +265,12 @@ core_initcall(reboot_init);
+@@ -273,12 +273,12 @@ core_initcall(reboot_init);
controller to pulse the CPU reset line, which is more thorough, but
doesn't work with at least one type of 486 motherboard. It is easy
to stop this code working; hence the copious comments. */
@@ -10363,7 +11381,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/reboot.c linux-2.6.30.8/arch/x86/kerne
};
static const struct desc_ptr
-@@ -319,7 +319,7 @@ static const unsigned char jump_to_bios
+@@ -327,7 +327,7 @@ static const unsigned char jump_to_bios
* specified by the code and length parameters.
* We assume that length will aways be less that 100!
*/
@@ -10372,7 +11390,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/reboot.c linux-2.6.30.8/arch/x86/kerne
{
local_irq_disable();
-@@ -339,8 +339,8 @@ void machine_real_restart(const unsigned
+@@ -347,8 +347,8 @@ void machine_real_restart(const unsigned
/* Remap the kernel at virtual address zero, as well as offset zero
from the kernel segment. This assumes the kernel segment starts at
virtual address PAGE_OFFSET. */
@@ -10383,7 +11401,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/reboot.c linux-2.6.30.8/arch/x86/kerne
/*
* Use `swapper_pg_dir' as our page directory.
-@@ -352,16 +352,15 @@ void machine_real_restart(const unsigned
+@@ -360,16 +360,15 @@ void machine_real_restart(const unsigned
boot)". This seems like a fairly standard thing that gets set by
REBOOT.COM programs, and the previous reset routine did this
too. */
@@ -10403,10 +11421,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/reboot.c linux-2.6.30.8/arch/x86/kerne
/* Set up the IDT for real mode. */
load_idt(&real_mode_idt);
-diff -urNp linux-2.6.30.8/arch/x86/kernel/setup.c linux-2.6.30.8/arch/x86/kernel/setup.c
---- linux-2.6.30.8/arch/x86/kernel/setup.c 2009-07-30 20:32:40.383618032 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/setup.c 2009-07-30 20:32:47.940599318 -0400
-@@ -740,14 +740,14 @@ void __init setup_arch(char **cmdline_p)
+diff -urNp linux-2.6.31.4/arch/x86/kernel/setup.c linux-2.6.31.4/arch/x86/kernel/setup.c
+--- linux-2.6.31.4/arch/x86/kernel/setup.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/setup.c 2009-10-11 15:29:40.848286998 -0400
+@@ -768,14 +768,14 @@ void __init setup_arch(char **cmdline_p)
if (!boot_params.hdr.root_flags)
root_mountflags &= ~MS_RDONLY;
@@ -10422,13 +11440,13 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/setup.c linux-2.6.30.8/arch/x86/kernel
- data_resource.start = virt_to_phys(_etext);
+ code_resource.start = virt_to_phys(ktla_ktva(_text));
+ code_resource.end = virt_to_phys(ktla_ktva(_etext))-1;
-+ data_resource.start = virt_to_phys(_data);
++ data_resource.start = virt_to_phys(_sdata);
data_resource.end = virt_to_phys(_edata)-1;
bss_resource.start = virt_to_phys(&__bss_start);
bss_resource.end = virt_to_phys(&__bss_stop)-1;
-diff -urNp linux-2.6.30.8/arch/x86/kernel/setup_percpu.c linux-2.6.30.8/arch/x86/kernel/setup_percpu.c
---- linux-2.6.30.8/arch/x86/kernel/setup_percpu.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/setup_percpu.c 2009-08-05 19:08:00.518752374 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/setup_percpu.c linux-2.6.31.4/arch/x86/kernel/setup_percpu.c
+--- linux-2.6.31.4/arch/x86/kernel/setup_percpu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/setup_percpu.c 2009-10-11 15:29:40.848286998 -0400
@@ -25,19 +25,17 @@
# define DBG(x...)
#endif
@@ -10452,7 +11470,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/setup_percpu.c linux-2.6.30.8/arch/x86
[0 ... NR_CPUS-1] = BOOT_PERCPU_OFFSET,
};
EXPORT_SYMBOL(__per_cpu_offset);
-@@ -336,13 +334,15 @@ out_free_ar:
+@@ -429,13 +427,15 @@ early_param("percpu_alloc", percpu_alloc
static inline void setup_percpu_segment(int cpu)
{
#ifdef CONFIG_X86_32
@@ -10475,7 +11493,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/setup_percpu.c linux-2.6.30.8/arch/x86
#endif
}
-@@ -381,6 +381,11 @@ void __init setup_per_cpu_areas(void)
+@@ -486,6 +486,11 @@ void __init setup_per_cpu_areas(void)
/* alrighty, percpu areas up and running */
delta = (unsigned long)pcpu_base_addr - (unsigned long)__per_cpu_start;
for_each_possible_cpu(cpu) {
@@ -10487,7 +11505,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/setup_percpu.c linux-2.6.30.8/arch/x86
per_cpu_offset(cpu) = delta + cpu * pcpu_unit_size;
per_cpu(this_cpu_off, cpu) = per_cpu_offset(cpu);
per_cpu(cpu_number, cpu) = cpu;
-@@ -408,6 +413,12 @@ void __init setup_per_cpu_areas(void)
+@@ -513,6 +518,12 @@ void __init setup_per_cpu_areas(void)
early_per_cpu_map(x86_cpu_to_node_map, cpu);
#endif
#endif
@@ -10500,10 +11518,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/setup_percpu.c linux-2.6.30.8/arch/x86
/*
* Up to this point, the boot CPU has been using .data.init
* area. Reload any changed state for the boot CPU.
-diff -urNp linux-2.6.30.8/arch/x86/kernel/signal.c linux-2.6.30.8/arch/x86/kernel/signal.c
---- linux-2.6.30.8/arch/x86/kernel/signal.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/signal.c 2009-07-30 09:48:09.958625901 -0400
-@@ -198,7 +198,7 @@ static unsigned long align_sigframe(unsi
+diff -urNp linux-2.6.31.4/arch/x86/kernel/signal.c linux-2.6.31.4/arch/x86/kernel/signal.c
+--- linux-2.6.31.4/arch/x86/kernel/signal.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/signal.c 2009-10-11 15:29:40.849219730 -0400
+@@ -197,7 +197,7 @@ static unsigned long align_sigframe(unsi
* Align the stack pointer according to the i386 ABI,
* i.e. so that on function entry ((sp + 4) & 15) == 0.
*/
@@ -10512,7 +11530,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/signal.c linux-2.6.30.8/arch/x86/kerne
#else /* !CONFIG_X86_32 */
sp = round_down(sp, 16) - 8;
#endif
-@@ -308,9 +308,9 @@ __setup_frame(int sig, struct k_sigactio
+@@ -307,9 +307,9 @@ __setup_frame(int sig, struct k_sigactio
}
if (current->mm->context.vdso)
@@ -10524,7 +11542,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/signal.c linux-2.6.30.8/arch/x86/kerne
if (ka->sa.sa_flags & SA_RESTORER)
restorer = ka->sa.sa_restorer;
-@@ -378,7 +378,7 @@ static int __setup_rt_frame(int sig, str
+@@ -377,7 +377,7 @@ static int __setup_rt_frame(int sig, str
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
/* Set up to return from userspace. */
@@ -10533,7 +11551,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/signal.c linux-2.6.30.8/arch/x86/kerne
if (ka->sa.sa_flags & SA_RESTORER)
restorer = ka->sa.sa_restorer;
put_user_ex(restorer, &frame->pretcode);
-@@ -790,7 +790,7 @@ static void do_signal(struct pt_regs *re
+@@ -789,7 +789,7 @@ static void do_signal(struct pt_regs *re
* X86_32: vm86 regs switched out by assembly code before reaching
* here, so testing against kernel CS suffices.
*/
@@ -10542,41 +11560,24 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/signal.c linux-2.6.30.8/arch/x86/kerne
return;
if (current_thread_info()->status & TS_RESTORE_SIGMASK)
-diff -urNp linux-2.6.30.8/arch/x86/kernel/smpboot.c linux-2.6.30.8/arch/x86/kernel/smpboot.c
---- linux-2.6.30.8/arch/x86/kernel/smpboot.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/smpboot.c 2009-07-30 09:48:09.958625901 -0400
-@@ -685,6 +685,10 @@ static int __cpuinit do_boot_cpu(int api
- .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done),
- };
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- INIT_WORK(&c_idle.work, do_fork_idle);
-
- alternatives_smp_switch(1);
-@@ -727,7 +731,17 @@ do_rest:
+diff -urNp linux-2.6.31.4/arch/x86/kernel/smpboot.c linux-2.6.31.4/arch/x86/kernel/smpboot.c
+--- linux-2.6.31.4/arch/x86/kernel/smpboot.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/smpboot.c 2009-10-12 23:12:55.236461764 -0400
+@@ -727,7 +727,11 @@ do_rest:
(unsigned long)task_stack_page(c_idle.idle) -
KERNEL_STACK_OFFSET + THREAD_SIZE;
#endif
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
initial_code = (unsigned long)start_secondary;
stack_start.sp = (void *) c_idle.idle->thread.sp;
-diff -urNp linux-2.6.30.8/arch/x86/kernel/step.c linux-2.6.30.8/arch/x86/kernel/step.c
---- linux-2.6.30.8/arch/x86/kernel/step.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/step.c 2009-07-30 09:48:09.958625901 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/step.c linux-2.6.31.4/arch/x86/kernel/step.c
+--- linux-2.6.31.4/arch/x86/kernel/step.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/step.c 2009-10-11 15:29:40.849219730 -0400
@@ -23,22 +23,20 @@ unsigned long convert_ip_to_linear(struc
* and APM bios ones we just ignore here.
*/
@@ -10626,17 +11627,17 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/step.c linux-2.6.30.8/arch/x86/kernel/
/* 32-bit mode: register increment */
return 0;
/* 64-bit mode: REX prefix */
-diff -urNp linux-2.6.30.8/arch/x86/kernel/syscall_table_32.S linux-2.6.30.8/arch/x86/kernel/syscall_table_32.S
---- linux-2.6.30.8/arch/x86/kernel/syscall_table_32.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/syscall_table_32.S 2009-07-30 09:48:09.959782846 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/syscall_table_32.S linux-2.6.31.4/arch/x86/kernel/syscall_table_32.S
+--- linux-2.6.31.4/arch/x86/kernel/syscall_table_32.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/syscall_table_32.S 2009-10-11 15:29:40.849219730 -0400
@@ -1,3 +1,4 @@
+.section .rodata,"a",@progbits
ENTRY(sys_call_table)
.long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
.long sys_exit
-diff -urNp linux-2.6.30.8/arch/x86/kernel/sys_i386_32.c linux-2.6.30.8/arch/x86/kernel/sys_i386_32.c
---- linux-2.6.30.8/arch/x86/kernel/sys_i386_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/sys_i386_32.c 2009-07-30 09:48:09.958625901 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/sys_i386_32.c linux-2.6.31.4/arch/x86/kernel/sys_i386_32.c
+--- linux-2.6.31.4/arch/x86/kernel/sys_i386_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/sys_i386_32.c 2009-10-11 15:29:40.850288534 -0400
@@ -24,6 +24,21 @@
#include <asm/syscalls.h>
@@ -10865,9 +11866,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/sys_i386_32.c linux-2.6.30.8/arch/x86/
struct sel_arg_struct {
unsigned long n;
-diff -urNp linux-2.6.30.8/arch/x86/kernel/sys_x86_64.c linux-2.6.30.8/arch/x86/kernel/sys_x86_64.c
---- linux-2.6.30.8/arch/x86/kernel/sys_x86_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/sys_x86_64.c 2009-07-30 09:48:09.959782846 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/sys_x86_64.c linux-2.6.31.4/arch/x86/kernel/sys_x86_64.c
+--- linux-2.6.31.4/arch/x86/kernel/sys_x86_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/sys_x86_64.c 2009-10-11 15:29:40.850288534 -0400
@@ -47,8 +47,8 @@ out:
return error;
}
@@ -10949,9 +11950,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/sys_x86_64.c linux-2.6.30.8/arch/x86/k
mm->cached_hole_size = ~0UL;
return addr;
-diff -urNp linux-2.6.30.8/arch/x86/kernel/time_32.c linux-2.6.30.8/arch/x86/kernel/time_32.c
---- linux-2.6.30.8/arch/x86/kernel/time_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/time_32.c 2009-07-30 09:48:09.959782846 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/time_32.c linux-2.6.31.4/arch/x86/kernel/time_32.c
+--- linux-2.6.31.4/arch/x86/kernel/time_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/time_32.c 2009-10-11 15:29:40.850288534 -0400
@@ -47,22 +47,32 @@ unsigned long profile_pc(struct pt_regs
unsigned long pc = instruction_pointer(regs);
@@ -10987,9 +11988,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/time_32.c linux-2.6.30.8/arch/x86/kern
return pc;
}
EXPORT_SYMBOL(profile_pc);
-diff -urNp linux-2.6.30.8/arch/x86/kernel/time_64.c linux-2.6.30.8/arch/x86/kernel/time_64.c
---- linux-2.6.30.8/arch/x86/kernel/time_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/time_64.c 2009-07-30 09:48:09.960740129 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/time_64.c linux-2.6.31.4/arch/x86/kernel/time_64.c
+--- linux-2.6.31.4/arch/x86/kernel/time_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/time_64.c 2009-10-11 15:29:40.850288534 -0400
@@ -25,8 +25,6 @@
#include <asm/time.h>
#include <asm/timer.h>
@@ -11008,9 +12009,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/time_64.c linux-2.6.30.8/arch/x86/kern
#ifdef CONFIG_FRAME_POINTER
return *(unsigned long *)(regs->bp + sizeof(long));
#else
-diff -urNp linux-2.6.30.8/arch/x86/kernel/tls.c linux-2.6.30.8/arch/x86/kernel/tls.c
---- linux-2.6.30.8/arch/x86/kernel/tls.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/tls.c 2009-07-30 09:48:09.960740129 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/tls.c linux-2.6.31.4/arch/x86/kernel/tls.c
+--- linux-2.6.31.4/arch/x86/kernel/tls.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/tls.c 2009-10-11 15:29:40.851265721 -0400
@@ -85,6 +85,11 @@ int do_set_thread_area(struct task_struc
if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
return -EINVAL;
@@ -11023,9 +12024,34 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/tls.c linux-2.6.30.8/arch/x86/kernel/t
set_tls_desc(p, idx, &info, 1);
return 0;
-diff -urNp linux-2.6.30.8/arch/x86/kernel/traps.c linux-2.6.30.8/arch/x86/kernel/traps.c
---- linux-2.6.30.8/arch/x86/kernel/traps.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/traps.c 2009-07-30 09:48:09.961532028 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/trampoline_32.S linux-2.6.31.4/arch/x86/kernel/trampoline_32.S
+--- linux-2.6.31.4/arch/x86/kernel/trampoline_32.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/trampoline_32.S 2009-10-11 15:29:56.566751102 -0400
+@@ -31,6 +31,12 @@
+ #include <asm/segment.h>
+ #include <asm/page_types.h>
+
++#ifdef CONFIG_PAX_KERNEXEC
++#define ta(X) (X)
++#else
++#define ta(X) ((X) - __PAGE_OFFSET)
++#endif
++
+ /* We can free up trampoline after bootup if cpu hotplug is not supported. */
+ #ifndef CONFIG_HOTPLUG_CPU
+ .section ".cpuinit.data","aw",@progbits
+@@ -64,7 +70,7 @@ r_base = .
+ 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, $ta(startup_32_smp)
+
+ # 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 -urNp linux-2.6.31.4/arch/x86/kernel/traps.c linux-2.6.31.4/arch/x86/kernel/traps.c
+--- linux-2.6.31.4/arch/x86/kernel/traps.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/traps.c 2009-10-11 15:29:40.851265721 -0400
@@ -70,14 +70,6 @@ asmlinkage int system_call(void);
/* Do we ignore FPU interrupts ? */
@@ -11137,7 +12163,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/traps.c linux-2.6.30.8/arch/x86/kernel
die("general protection fault", regs, error_code);
}
-@@ -554,7 +575,7 @@ dotraplinkage void __kprobes do_debug(st
+@@ -561,7 +582,7 @@ dotraplinkage void __kprobes do_debug(st
}
#ifdef CONFIG_X86_32
@@ -11146,7 +12172,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/traps.c linux-2.6.30.8/arch/x86/kernel
goto debug_vm86;
#endif
-@@ -566,7 +587,7 @@ dotraplinkage void __kprobes do_debug(st
+@@ -573,7 +594,7 @@ dotraplinkage void __kprobes do_debug(st
* kernel space (but re-enable TF when returning to user mode).
*/
if (condition & DR_STEP) {
@@ -11155,7 +12181,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/traps.c linux-2.6.30.8/arch/x86/kernel
goto clear_TF_reenable;
}
-@@ -753,7 +774,7 @@ do_simd_coprocessor_error(struct pt_regs
+@@ -760,7 +781,7 @@ do_simd_coprocessor_error(struct pt_regs
* Handle strange cache flush from user space exception
* in all other cases. This is undocumented behaviour.
*/
@@ -11164,7 +12190,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/traps.c linux-2.6.30.8/arch/x86/kernel
handle_vm86_fault((struct kernel_vm86_regs *)regs, error_code);
return;
}
-@@ -782,19 +803,14 @@ do_spurious_interrupt_bug(struct pt_regs
+@@ -789,19 +810,14 @@ do_spurious_interrupt_bug(struct pt_regs
#ifdef CONFIG_X86_32
unsigned long patch_espfix_desc(unsigned long uesp, unsigned long kesp)
{
@@ -11187,10 +12213,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/traps.c linux-2.6.30.8/arch/x86/kernel
return new_kesp;
}
-diff -urNp linux-2.6.30.8/arch/x86/kernel/tsc.c linux-2.6.30.8/arch/x86/kernel/tsc.c
---- linux-2.6.30.8/arch/x86/kernel/tsc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/tsc.c 2009-07-30 09:48:09.961532028 -0400
-@@ -772,7 +772,7 @@ static struct dmi_system_id __initdata b
+diff -urNp linux-2.6.31.4/arch/x86/kernel/tsc.c linux-2.6.31.4/arch/x86/kernel/tsc.c
+--- linux-2.6.31.4/arch/x86/kernel/tsc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/tsc.c 2009-10-11 15:29:40.852236167 -0400
+@@ -790,7 +790,7 @@ static struct dmi_system_id __initdata b
DMI_MATCH(DMI_BOARD_NAME, "2635FA0"),
},
},
@@ -11199,9 +12225,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/tsc.c linux-2.6.30.8/arch/x86/kernel/t
};
static void __init check_system_tsc_reliable(void)
-diff -urNp linux-2.6.30.8/arch/x86/kernel/vm86_32.c linux-2.6.30.8/arch/x86/kernel/vm86_32.c
---- linux-2.6.30.8/arch/x86/kernel/vm86_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/vm86_32.c 2009-07-30 09:48:09.961532028 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/vm86_32.c linux-2.6.31.4/arch/x86/kernel/vm86_32.c
+--- linux-2.6.31.4/arch/x86/kernel/vm86_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/vm86_32.c 2009-10-11 15:29:40.852236167 -0400
@@ -148,7 +148,7 @@ struct pt_regs *save_v86_state(struct ke
do_exit(SIGSEGV);
}
@@ -11220,54 +12246,61 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/vm86_32.c linux-2.6.30.8/arch/x86/kern
tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0;
if (cpu_has_sep)
tsk->thread.sysenter_cs = 0;
-diff -urNp linux-2.6.30.8/arch/x86/kernel/vmi_32.c linux-2.6.30.8/arch/x86/kernel/vmi_32.c
---- linux-2.6.30.8/arch/x86/kernel/vmi_32.c 2009-08-24 20:46:56.225563774 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/vmi_32.c 2009-08-12 21:15:21.104308164 -0400
-@@ -102,18 +102,43 @@ static unsigned patch_internal(int call,
+diff -urNp linux-2.6.31.4/arch/x86/kernel/vmi_32.c linux-2.6.31.4/arch/x86/kernel/vmi_32.c
+--- linux-2.6.31.4/arch/x86/kernel/vmi_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/vmi_32.c 2009-10-18 10:15:00.936767037 -0400
+@@ -44,12 +44,17 @@ typedef u32 __attribute__((regparm(1)))
+ typedef u64 __attribute__((regparm(2))) (VROMLONGFUNC)(int);
+
+ #define call_vrom_func(rom,func) \
+- (((VROMFUNC *)(rom->func))())
++ (((VROMFUNC *)(ktva_ktla(rom.func)))())
+
+ #define call_vrom_long_func(rom,func,arg) \
+- (((VROMLONGFUNC *)(rom->func)) (arg))
++({\
++ u64 __reloc = ((VROMLONGFUNC *)(ktva_ktla(rom.func))) (arg);\
++ struct vmi_relocation_info *const __rel = (struct vmi_relocation_info *)&__reloc;\
++ __rel->eip = (unsigned char *)ktva_ktla((unsigned long)__rel->eip);\
++ __reloc;\
++})
+
+-static struct vrom_header *vmi_rom;
++static struct vrom_header vmi_rom __attribute((__section__(".vmi.rom"), __aligned__(PAGE_SIZE)));
+ static int disable_pge;
+ static int disable_pse;
+ static int disable_sep;
+@@ -76,10 +81,10 @@ static struct {
+ void (*set_initial_ap_state)(int, int);
+ void (*halt)(void);
+ void (*set_lazy_mode)(int mode);
+-} vmi_ops;
++} vmi_ops __read_only;
+
+ /* Cached VMI operations */
+-struct vmi_timer_ops vmi_timer_ops;
++struct vmi_timer_ops vmi_timer_ops __read_only;
+
+ /*
+ * VMI patching routines.
+@@ -94,7 +99,7 @@ struct vmi_timer_ops vmi_timer_ops;
+ static inline void patch_offset(void *insnbuf,
+ unsigned long ip, unsigned long dest)
+ {
+- *(unsigned long *)(insnbuf+1) = dest-ip-5;
++ *(unsigned long *)(insnbuf+1) = dest-ip-5;
+ }
+
+ static unsigned patch_internal(int call, unsigned len, void *insnbuf,
+@@ -102,6 +107,7 @@ static unsigned patch_internal(int call,
{
u64 reloc;
struct vmi_relocation_info *const rel = (struct vmi_relocation_info *)&reloc;
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
reloc = call_vrom_long_func(vmi_rom, get_reloc, call);
switch(rel->type) {
case VMI_RELOCATION_CALL_REL:
- BUG_ON(len < 5);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
- *(char *)insnbuf = MNEM_CALL;
- patch_offset(insnbuf, ip, (unsigned long)rel->eip);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
- return 5;
-
- case VMI_RELOCATION_JUMP_REL:
- BUG_ON(len < 5);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
- *(char *)insnbuf = MNEM_JMP;
- patch_offset(insnbuf, ip, (unsigned long)rel->eip);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
- return 5;
-
- case VMI_RELOCATION_NOP:
-@@ -404,13 +429,13 @@ static void vmi_set_pud(pud_t *pudp, pud
+@@ -404,13 +410,13 @@ static void vmi_set_pud(pud_t *pudp, pud
static void vmi_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
{
@@ -11283,7 +12316,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/vmi_32.c linux-2.6.30.8/arch/x86/kerne
vmi_ops.set_pte(pte, (pte_t *)pmd, VMI_PAGE_PD);
}
#endif
-@@ -438,8 +463,8 @@ vmi_startup_ipi_hook(int phys_apicid, un
+@@ -438,8 +444,8 @@ vmi_startup_ipi_hook(int phys_apicid, un
ap.ss = __KERNEL_DS;
ap.esp = (unsigned long) start_esp;
@@ -11294,467 +12327,392 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/vmi_32.c linux-2.6.30.8/arch/x86/kerne
ap.fs = __KERNEL_PERCPU;
ap.gs = __KERNEL_STACK_CANARY;
-@@ -634,12 +659,20 @@ static inline int __init activate_vmi(vo
- u64 reloc;
- const struct vmi_relocation_info *rel = (struct vmi_relocation_info *)&reloc;
+@@ -486,6 +492,18 @@ static void vmi_leave_lazy_mmu(void)
+ paravirt_leave_lazy_mmu();
+ }
+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
++static unsigned long vmi_pax_open_kernel(void)
++{
++ return 0;
++}
++
++static unsigned long vmi_pax_close_kernel(void)
++{
++ return 0;
++}
+#endif
+
- if (call_vrom_func(vmi_rom, vmi_init) != 0) {
- printk(KERN_ERR "VMI ROM failed to initialize!");
+ static inline int __init check_vmi_rom(struct vrom_header *rom)
+ {
+ struct pci_header *pci;
+@@ -498,6 +516,10 @@ static inline int __init check_vmi_rom(s
+ return 0;
+ if (rom->vrom_signature != VMI_SIGNATURE)
return 0;
++ if (rom->rom_length * 512 > sizeof(*rom)) {
++ printk(KERN_WARNING "PAX: VMI: ROM size too big: %x\n", rom->rom_length * 512);
++ return 0;
++ }
+ if (rom->api_version_maj != VMI_API_REV_MAJOR ||
+ rom->api_version_min+1 < VMI_API_REV_MINOR+1) {
+ printk(KERN_WARNING "VMI: Found mismatched rom version %d.%d\n",
+@@ -562,7 +584,7 @@ static inline int __init probe_vmi_rom(v
+ struct vrom_header *romstart;
+ romstart = (struct vrom_header *)isa_bus_to_virt(base);
+ if (check_vmi_rom(romstart)) {
+- vmi_rom = romstart;
++ vmi_rom = *romstart;
+ return 1;
+ }
}
- savesegment(cs, kernel_cs);
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
- pv_info.paravirt_enabled = 1;
- pv_info.kernel_rpl = kernel_cs & SEGMENT_RPL_MASK;
- pv_info.name = "vmi";
-@@ -830,6 +863,10 @@ static inline int __init activate_vmi(vo
+@@ -836,6 +858,11 @@ static inline int __init activate_vmi(vo
para_fill(pv_irq_ops.safe_halt, Halt);
+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
++ pv_mmu_ops.pax_open_kernel = vmi_pax_open_kernel;
++ pv_mmu_ops.pax_close_kernel = vmi_pax_close_kernel;
+#endif
+
/*
* Alternative instruction rewriting doesn't happen soon enough
* to convert VMI_IRET to a call instead of a jump; so we have
-diff -urNp linux-2.6.30.8/arch/x86/kernel/vmlinux_32.lds.S linux-2.6.30.8/arch/x86/kernel/vmlinux_32.lds.S
---- linux-2.6.30.8/arch/x86/kernel/vmlinux_32.lds.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/vmlinux_32.lds.S 2009-08-27 21:11:25.322527521 -0400
-@@ -15,6 +15,20 @@
+@@ -853,16 +880,16 @@ static inline int __init activate_vmi(vo
+
+ void __init vmi_init(void)
+ {
+- if (!vmi_rom)
++ if (!vmi_rom.rom_signature)
+ probe_vmi_rom();
+ else
+- check_vmi_rom(vmi_rom);
++ check_vmi_rom(&vmi_rom);
+
+ /* In case probing for or validating the ROM failed, basil */
+- if (!vmi_rom)
++ if (!vmi_rom.rom_signature)
+ return;
+
+- reserve_top_address(-vmi_rom->virtual_top);
++ reserve_top_address(-vmi_rom.virtual_top);
+
+ #ifdef CONFIG_X86_IO_APIC
+ /* This is virtual hardware; timer routing is wired correctly */
+@@ -874,7 +901,7 @@ void __init vmi_activate(void)
+ {
+ unsigned long flags;
+
+- if (!vmi_rom)
++ if (!vmi_rom.rom_signature)
+ return;
+
+ local_irq_save(flags);
+diff -urNp linux-2.6.31.4/arch/x86/kernel/vmlinux.lds.S linux-2.6.31.4/arch/x86/kernel/vmlinux.lds.S
+--- linux-2.6.31.4/arch/x86/kernel/vmlinux.lds.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/vmlinux.lds.S 2009-10-13 19:00:18.392269554 -0400
+@@ -26,6 +26,22 @@
#include <asm/page_types.h>
#include <asm/cache.h>
#include <asm/boot.h>
+#include <asm/segment.h>
+
-+#ifdef CONFIG_X86_PAE
++#undef PMD_SIZE
++#undef PMD_SHIFT
++#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
+#define PMD_SHIFT 21
+#else
+#define PMD_SHIFT 22
+#endif
+#define PMD_SIZE (1 << PMD_SHIFT)
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+#define __KERNEL_TEXT_OFFSET (__PAGE_OFFSET + (((____LOAD_PHYSICAL_ADDR + 2*(PMD_SIZE - 1)) - 1) & ~(PMD_SIZE - 1)))
++#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)
++#define __KERNEL_TEXT_OFFSET (LOAD_OFFSET + ____LOAD_PHYSICAL_ADDR)
+#else
+#define __KERNEL_TEXT_OFFSET 0
+#endif
- OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
- OUTPUT_ARCH(i386)
-@@ -22,82 +36,23 @@ ENTRY(phys_startup_32)
- jiffies = jiffies_64;
+ #undef i386 /* in case the preprocessor is a 32bit one */
- PHDRS {
-- text PT_LOAD FLAGS(5); /* R_E */
-- data PT_LOAD FLAGS(7); /* RWE */
-- note PT_NOTE FLAGS(0); /* ___ */
-+ initdata PT_LOAD FLAGS(6); /* RW_ */
-+ percpu PT_LOAD FLAGS(6); /* RW_ */
-+ inittext PT_LOAD FLAGS(5); /* R_E */
-+ text PT_LOAD FLAGS(5); /* R_E */
-+ rodata PT_LOAD FLAGS(4); /* R__ */
-+ data PT_LOAD FLAGS(6); /* RW_ */
-+ note PT_NOTE FLAGS(0); /* ___ */
- }
- SECTIONS
- {
-- . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
-- phys_startup_32 = startup_32 - LOAD_OFFSET;
-+ . = LOAD_OFFSET + ____LOAD_PHYSICAL_ADDR;
-
-- .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) {
-- _text = .; /* Text and read-only data */
-- *(.text.head)
-- } :text = 0x9090
--
-- /* read-only */
-- .text : AT(ADDR(.text) - LOAD_OFFSET) {
-- . = ALIGN(PAGE_SIZE); /* not really needed, already page aligned */
-- *(.text.page_aligned)
-- TEXT_TEXT
-- SCHED_TEXT
-- LOCK_TEXT
-- KPROBES_TEXT
-- IRQENTRY_TEXT
-- *(.fixup)
-- *(.gnu.warning)
-- _etext = .; /* End of text section */
-- } :text = 0x9090
--
-- NOTES :text :note
--
-- . = ALIGN(16); /* Exception table */
-- __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
-- __start___ex_table = .;
-- *(__ex_table)
-- __stop___ex_table = .;
-- } :text = 0x9090
--
-- RODATA
--
-- /* writeable */
-- . = ALIGN(PAGE_SIZE);
-- .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
-- DATA_DATA
-- CONSTRUCTORS
-- } :data
--
-- . = ALIGN(PAGE_SIZE);
-- .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
-- __nosave_begin = .;
-- *(.data.nosave)
-- . = ALIGN(PAGE_SIZE);
-- __nosave_end = .;
-- }
--
-- . = ALIGN(PAGE_SIZE);
-- .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
-- *(.data.page_aligned)
-- *(.data.idt)
-- }
--
-- . = ALIGN(32);
-- .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
-- *(.data.cacheline_aligned)
-- }
--
-- /* rarely changed data like cpu maps */
-- . = ALIGN(32);
-- .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
-- *(.data.read_mostly)
-- _edata = .; /* End of data section */
-- }
--
-- . = ALIGN(THREAD_SIZE); /* init_task */
-- .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
-- *(.data.init_task)
-- }
-+ .text.startup : AT(ADDR(.text.startup) - LOAD_OFFSET) {
-+ __LOAD_PHYSICAL_ADDR = . - LOAD_OFFSET;
-+ phys_startup_32 = startup_32 - LOAD_OFFSET + __KERNEL_TEXT_OFFSET;
-+ *(.text.startup)
-+ } :initdata
-
- /* might get freed after init */
- . = ALIGN(PAGE_SIZE);
-@@ -115,14 +70,8 @@ SECTIONS
- . = ALIGN(PAGE_SIZE);
-
- /* will be freed after init */
-- . = ALIGN(PAGE_SIZE); /* Init code and data */
-- .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
-- __init_begin = .;
-- _sinittext = .;
-- INIT_TEXT
-- _einittext = .;
-- }
- .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
-+ __init_begin = .;
- INIT_DATA
- }
- . = ALIGN(16);
-@@ -162,11 +111,6 @@ SECTIONS
- *(.parainstructions)
- __parainstructions_end = .;
- }
-- /* .exit.text is discard at runtime, not link time, to deal with references
-- from .altinstructions and .eh_frame */
-- .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
-- EXIT_TEXT
-- }
- .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
- EXIT_DATA
- }
-@@ -178,12 +122,130 @@ SECTIONS
- __initramfs_end = .;
- }
- #endif
-- PERCPU(PAGE_SIZE)
- . = ALIGN(PAGE_SIZE);
-+ PERCPU_VADDR(0, :percpu)
-+ . = ALIGN(PAGE_SIZE);
-+ /* freed after init ends here */
-+
-+ . = ALIGN(PAGE_SIZE); /* Init code and data */
-+ .init.text (. - __KERNEL_TEXT_OFFSET) : AT(ADDR(.init.text) - LOAD_OFFSET + __KERNEL_TEXT_OFFSET) {
-+ _sinittext = .;
-+ INIT_TEXT
-+ _einittext = .;
-+ } :inittext
-+
-+ /* .exit.text is discard at runtime, not link time, to deal with references
-+ from .altinstructions and .eh_frame */
-+ .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET + __KERNEL_TEXT_OFFSET) {
-+ EXIT_TEXT
-+ }
-+
-+ .filler : AT(ADDR(.filler) - LOAD_OFFSET + __KERNEL_TEXT_OFFSET) {
-+ BYTE(0)
-+ . = ALIGN(2*PMD_SIZE) - 1;
-+ }
-+
- /* freed after init ends here */
-
-+ .text.head : AT(ADDR(.text.head) - LOAD_OFFSET + __KERNEL_TEXT_OFFSET) {
-+ __init_end = . + __KERNEL_TEXT_OFFSET;
-+ KERNEL_TEXT_OFFSET = . + __KERNEL_TEXT_OFFSET;
-+ _text = .; /* Text and read-only data */
-+ *(.text.head)
-+ } :text = 0x9090
-+
-+ /* read-only */
-+ .text : AT(ADDR(.text) - LOAD_OFFSET + __KERNEL_TEXT_OFFSET) {
-+ . = ALIGN(PAGE_SIZE); /* not really needed, already page aligned */
-+ *(.text.page_aligned)
-+ TEXT_TEXT
-+ SCHED_TEXT
-+ LOCK_TEXT
-+ KPROBES_TEXT
-+ IRQENTRY_TEXT
-+ *(.fixup)
-+ *(.gnu.warning)
-+ _etext = .; /* End of text section */
-+ } :text = 0x9090
-+
-+ . += __KERNEL_TEXT_OFFSET;
-+
-+ . = ALIGN(4096);
-+ NOTES :rodata :note
-+
-+ . = ALIGN(16); /* Exception table */
-+ __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
-+ __start___ex_table = .;
-+ *(__ex_table)
-+ __stop___ex_table = .;
-+ } :rodata
-+
-+ RO_DATA(PAGE_SIZE)
-+
-+ . = ALIGN(PAGE_SIZE);
-+ .rodata.page_aligned : AT(ADDR(.rodata.page_aligned) - LOAD_OFFSET) {
-+ *(.idt)
-+ . = ALIGN(PAGE_SIZE);
-+ *(.empty_zero_page)
-+ *(.swapper_pg_pmd)
-+ *(.swapper_pg_dir)
-+
-+#if defined(CONFIG_PAX_KERNEXEC) && !defined(CONFIG_MODULES)
-+ . = ALIGN(PMD_SIZE);
-+#endif
-+
-+ }
-+
-+#if defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_MODULES)
-+ . = ALIGN(PAGE_SIZE);
-+ .module.text : AT(ADDR(.module.text) - LOAD_OFFSET) {
-+ MODULES_VADDR = .;
-+ BYTE(0)
-+ . += (8 * 1024 * 1024);
-+ . = ALIGN(PMD_SIZE);
-+ MODULES_END = . - 1;
-+ }
-+#endif
-+
-+ /* writeable */
-+ . = ALIGN(PAGE_SIZE);
-+ .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
-+ _data = .;
-+ DATA_DATA
-+ CONSTRUCTORS
-+ } :data
-+
-+ . = ALIGN(PAGE_SIZE);
-+ .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
-+ __nosave_begin = .;
-+ *(.data.nosave)
-+ . = ALIGN(PAGE_SIZE);
-+ __nosave_end = .;
-+ }
-+
-+ . = ALIGN(PAGE_SIZE);
-+ .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
-+ *(.data.page_aligned)
-+ }
-+
-+ . = ALIGN(32);
-+ .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
-+ *(.data.cacheline_aligned)
-+ }
-+
-+ /* rarely changed data like cpu maps */
-+ . = ALIGN(32);
-+ .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
-+ *(.data.read_mostly)
-+ _edata = .; /* End of data section */
-+ }
-+
-+ . = ALIGN(THREAD_SIZE); /* init_task */
-+ .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
-+ *(.data.init_task)
-+ }
-+
- .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
-- __init_end = .;
- __bss_start = .; /* BSS */
- *(.bss.page_aligned)
- *(.bss)
-diff -urNp linux-2.6.30.8/arch/x86/kernel/vmlinux_64.lds.S linux-2.6.30.8/arch/x86/kernel/vmlinux_64.lds.S
---- linux-2.6.30.8/arch/x86/kernel/vmlinux_64.lds.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/vmlinux_64.lds.S 2009-08-01 08:46:06.438873305 -0400
-@@ -13,11 +13,11 @@
- OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
+@@ -34,46 +50,53 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONF
+ #ifdef CONFIG_X86_32
+ OUTPUT_ARCH(i386)
+ ENTRY(phys_startup_32)
+-jiffies = jiffies_64;
+ #else
OUTPUT_ARCH(i386:x86-64)
ENTRY(phys_startup_64)
-jiffies_64 = jiffies;
+ #endif
+
+jiffies = jiffies_64;
++
PHDRS {
- text PT_LOAD FLAGS(5); /* R_E */
-- data PT_LOAD FLAGS(7); /* RWE */
-- user PT_LOAD FLAGS(7); /* RWE */
-+ data PT_LOAD FLAGS(6); /* RW_ */
-+ user PT_LOAD FLAGS(5); /* R_E */
- data.init PT_LOAD FLAGS(7); /* RWE */
+ text PT_LOAD FLAGS(5); /* R_E */
+- data PT_LOAD FLAGS(7); /* RWE */
++ rodata PT_LOAD FLAGS(4); /* R__ */
++ module PT_LOAD FLAGS(5); /* R_E */
++ data PT_LOAD FLAGS(6); /* RW_ */
+ #ifdef CONFIG_X86_64
+- user PT_LOAD FLAGS(7); /* RWE */
++ user PT_LOAD FLAGS(5); /* R_E */
++#endif
++ init.begin PT_LOAD FLAGS(6); /* RW_ */
#ifdef CONFIG_SMP
- percpu PT_LOAD FLAGS(7); /* RWE */
-@@ -54,14 +54,18 @@ SECTIONS
- __stop___ex_table = .;
- } :text = 0x9090
+- percpu PT_LOAD FLAGS(7); /* RWE */
++ percpu PT_LOAD FLAGS(6); /* RW_ */
+ #endif
++ text.init PT_LOAD FLAGS(5); /* R_E */
++ text.exit PT_LOAD FLAGS(5); /* R_E */
+ init PT_LOAD FLAGS(7); /* RWE */
+-#endif
+ note PT_NOTE FLAGS(0); /* ___ */
+ }
-- RODATA
-+ RO_DATA(PAGE_SIZE)
+ SECTIONS
+ {
+ #ifdef CONFIG_X86_32
+- . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
+- phys_startup_32 = startup_32 - LOAD_OFFSET;
++ . = LOAD_OFFSET + ____LOAD_PHYSICAL_ADDR;
+ #else
+- . = __START_KERNEL;
+- phys_startup_64 = startup_64 - LOAD_OFFSET;
++ . = __START_KERNEL;
+ #endif
-+#ifdef CONFIG_PAX_KERNEXEC
-+ . = ALIGN(2*1024*1024); /* Align data segment to PMD size boundary */
+ /* Text and read-only data */
+
+- /* bootstrapping code */
+- .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) {
++ .text (. - __KERNEL_TEXT_OFFSET): AT(ADDR(.text) - LOAD_OFFSET + __KERNEL_TEXT_OFFSET) {
++ /* bootstrapping code */
++#ifdef CONFIG_X86_32
++ phys_startup_32 = startup_32 - LOAD_OFFSET + __KERNEL_TEXT_OFFSET;
+#else
- . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */
++ phys_startup_64 = startup_64 - LOAD_OFFSET + __KERNEL_TEXT_OFFSET;
+#endif
- /* Data */
- .data : AT(ADDR(.data) - LOAD_OFFSET) {
-+ _data = .;
- DATA_DATA
- CONSTRUCTORS
-- _edata = .; /* End of data section */
- } :data
++ __LOAD_PHYSICAL_ADDR = . - LOAD_OFFSET + __KERNEL_TEXT_OFFSET;
+ _text = .;
+ *(.text.head)
+- } :text = 0x9090
+- /* The rest of the text */
+- .text : AT(ADDR(.text) - LOAD_OFFSET) {
++ /* The rest of the text */
+ #ifdef CONFIG_X86_32
+ /* not really needed, already page aligned */
+ . = ALIGN(PAGE_SIZE);
+@@ -88,11 +111,12 @@ SECTIONS
+ IRQENTRY_TEXT
+ *(.fixup)
+ *(.gnu.warning)
+- /* End of text section */
+- _etext = .;
+ } :text = 0x9090
+
+- NOTES :text :note
++ . += __KERNEL_TEXT_OFFSET;
++
++ . = ALIGN(PAGE_SIZE);
++ NOTES :rodata :note
-@@ -75,9 +79,28 @@ SECTIONS
- *(.data.read_mostly)
- }
+ /* Exception table */
+ . = ALIGN(16);
+@@ -100,22 +124,57 @@ SECTIONS
+ __start___ex_table = .;
+ *(__ex_table)
+ __stop___ex_table = .;
+- } :text = 0x9090
++ } :rodata
-+ .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
-+ . = ALIGN(THREAD_SIZE); /* init_task */
-+ *(.data.init_task)
-+ }
+ RO_DATA(PAGE_SIZE)
+
++#ifdef CONFIG_X86_32
++ . = ALIGN(PAGE_SIZE);
++ .rodata.page_aligned : AT(ADDR(.rodata.page_aligned) - LOAD_OFFSET) {
++ *(.idt)
++ . = ALIGN(PAGE_SIZE);
++ *(.empty_zero_page)
++ *(.swapper_pg_pmd)
++ *(.swapper_pg_dir)
++ }
++#endif
+
-+ .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
+ . = ALIGN(PAGE_SIZE);
-+ *(.data.page_aligned)
-+ }
++ .vmi.rom : AT(ADDR(.vmi.rom) - LOAD_OFFSET) {
++ *(.vmi.rom)
++ } :module
+
-+ .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
+ . = ALIGN(PAGE_SIZE);
-+ __nosave_begin = .;
-+ *(.data.nosave)
++ .module.text : AT(ADDR(.module.text) - LOAD_OFFSET) {
++
++#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_MODULES)
++ MODULES_EXEC_VADDR = .;
++ BYTE(0)
++ . += (8 * 1024 * 1024);
++ . = ALIGN(PMD_SIZE);
++ MODULES_EXEC_END = . - 1;
++#endif
++
++ /* End of text section */
++ _etext = . - __KERNEL_TEXT_OFFSET;
++ } :module
++
+ /* Data */
+ .data : AT(ADDR(.data) - LOAD_OFFSET) {
++
++#ifdef CONFIG_PAX_KERNEXEC
++ . = ALIGN(PMD_SIZE);
++#else
+ . = ALIGN(PAGE_SIZE);
-+ __nosave_end = .;
-+ _edata = .; /* End of data section */
-+ }
-+
- #define VSYSCALL_ADDR (-10*1024*1024)
--#define VSYSCALL_PHYS_ADDR ((LOADADDR(.data.read_mostly) + SIZEOF(.data.read_mostly) + 4095) & ~(4095))
--#define VSYSCALL_VIRT_ADDR ((ADDR(.data.read_mostly) + SIZEOF(.data.read_mostly) + 4095) & ~(4095))
-+#define VSYSCALL_PHYS_ADDR ((LOADADDR(.data_nosave) + SIZEOF(.data_nosave) + 4095) & ~(4095))
-+#define VSYSCALL_VIRT_ADDR ((ADDR(.data_nosave) + SIZEOF(.data_nosave) + 4095) & ~(4095))
-
- #define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR)
- #define VLOAD(x) (ADDR(x) - VLOAD_OFFSET)
-@@ -108,10 +131,6 @@ SECTIONS
- .vgetcpu_mode : AT(VLOAD(.vgetcpu_mode)) { *(.vgetcpu_mode) }
- vgetcpu_mode = VVIRT(.vgetcpu_mode);
-
-- . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
-- .jiffies : AT(VLOAD(.jiffies)) { *(.jiffies) }
-- jiffies = VVIRT(.jiffies);
--
- .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3))
- { *(.vsyscall_3) }
++#endif
++
+ /* Start of data section */
+ _sdata = .;
+
+ /* init_task */
+ INIT_TASK_DATA(THREAD_SIZE)
-@@ -125,16 +144,6 @@ SECTIONS
- #undef VVIRT_OFFSET
- #undef VVIRT
+-#ifdef CONFIG_X86_32
+- /* 32 bit has nosave before _edata */
+ NOSAVE_DATA
+-#endif
+
+ PAGE_ALIGNED_DATA(PAGE_SIZE)
+ *(.data.idt)
+@@ -182,12 +241,6 @@ SECTIONS
+ }
+ vgetcpu_mode = VVIRT(.vgetcpu_mode);
-- .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
-- . = ALIGN(THREAD_SIZE); /* init_task */
-- *(.data.init_task)
-- }:data.init
+- . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
+- .jiffies : AT(VLOAD(.jiffies)) {
+- *(.jiffies)
+- }
+- jiffies = VVIRT(.jiffies);
-
-- .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
+ .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) {
+ *(.vsyscall_3)
+ }
+@@ -205,12 +258,19 @@ SECTIONS
+ #endif /* CONFIG_X86_64 */
+
+ /* Init code and data - will be freed after init */
- . = ALIGN(PAGE_SIZE);
-- *(.data.page_aligned)
-- }
+ .init.begin : AT(ADDR(.init.begin) - LOAD_OFFSET) {
++ BYTE(0)
++
++#ifdef CONFIG_PAX_KERNEXEC
++ . = ALIGN(PMD_SIZE);
++#else
++ . = ALIGN(PAGE_SIZE);
++#endif
++
+ __init_begin = .; /* paired with __init_end */
+- }
++ } :init.begin
+
+-#if defined(CONFIG_X86_64) && defined(CONFIG_SMP)
++#ifdef CONFIG_SMP
+ /*
+ * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
+ * output PHDR, so the next output section - .init.text - should
+@@ -219,18 +279,26 @@ SECTIONS
+ PERCPU_VADDR(0, :percpu)
+ #endif
+
+- .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
++ init_begin = .;
++ .init.text (. - __KERNEL_TEXT_OFFSET): AT(init_begin - LOAD_OFFSET) {
+ _sinittext = .;
+ INIT_TEXT
+ _einittext = .;
+- }
+-#ifdef CONFIG_X86_64
+- :init
+-#endif
++ } :text.init
++
++ /*
++ * .exit.text is discard at runtime, not link time, to deal with
++ * references from .altinstructions and .eh_frame
++ */
++ .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
++ EXIT_TEXT
++ . = ALIGN(16);
++ } :text.exit
++ . = init_begin + SIZEOF(.init.text) + SIZEOF(.exit.text);
+
+ .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
+ INIT_DATA
+- }
++ } :init
+
+ . = ALIGN(16);
+ .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
+@@ -276,14 +344,6 @@ SECTIONS
+ *(.altinstr_replacement)
+ }
+
+- /*
+- * .exit.text is discard at runtime, not link time, to deal with
+- * references from .altinstructions and .eh_frame
+- */
+- .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
+- EXIT_TEXT
+- }
-
- .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
- /* might get freed after init */
- . = ALIGN(PAGE_SIZE);
-@@ -144,7 +153,7 @@ SECTIONS
- __smp_locks_end = .;
- . = ALIGN(PAGE_SIZE);
- __smp_alt_end = .;
-- }
-+ }:data.init
+ .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
+ EXIT_DATA
+ }
+@@ -297,7 +357,7 @@ SECTIONS
+ }
+ #endif
- . = ALIGN(PAGE_SIZE); /* Init code and data */
- __init_begin = .; /* paired with __init_end */
-@@ -233,27 +242,20 @@ SECTIONS
- . = ALIGN(PAGE_SIZE);
- __init_end = .;
+-#if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP)
++#ifndef CONFIG_SMP
+ PERCPU(PAGE_SIZE)
+ #endif
-- .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
-- . = ALIGN(PAGE_SIZE);
-- __nosave_begin = .;
-- *(.data.nosave)
-- . = ALIGN(PAGE_SIZE);
-- __nosave_end = .;
-- } :data.init2 /* use another section data.init2, see PERCPU_VADDR() above */
+@@ -320,12 +380,6 @@ SECTIONS
+ . = ALIGN(PAGE_SIZE);
+ }
+
+-#ifdef CONFIG_X86_64
+- .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
+- NOSAVE_DATA
+- }
+-#endif
-
- .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
+ /* BSS */
. = ALIGN(PAGE_SIZE);
- __bss_start = .; /* BSS */
- *(.bss.page_aligned)
- *(.bss)
- __bss_stop = .;
-- }
-+ } :data.init2
-
- .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
- . = ALIGN(PAGE_SIZE);
- __brk_base = . ;
- . += 64 * 1024 ; /* 64k alignment slop space */
- *(.brk_reservation) /* areas brk users have reserved */
-+ . = ALIGN(2*1024*1024);
- __brk_limit = . ;
- }
+ .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
+@@ -341,6 +395,7 @@ SECTIONS
+ __brk_base = .;
+ . += 64 * 1024; /* 64k alignment slop space */
+ *(.brk_reservation) /* areas brk users have reserved */
++ . = ALIGN(PMD_SIZE);
+ __brk_limit = .;
+ }
-@@ -276,7 +278,6 @@ SECTIONS
- * for the boot processor.
- */
+@@ -369,13 +424,12 @@ SECTIONS
+ * for the boot processor.
+ */
#define INIT_PER_CPU(x) init_per_cpu__##x = per_cpu__##x + __per_cpu_load
-INIT_PER_CPU(gdt_page);
INIT_PER_CPU(irq_stack_union);
/*
-diff -urNp linux-2.6.30.8/arch/x86/kernel/vsyscall_64.c linux-2.6.30.8/arch/x86/kernel/vsyscall_64.c
---- linux-2.6.30.8/arch/x86/kernel/vsyscall_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/vsyscall_64.c 2009-07-30 09:48:09.963690654 -0400
+ * Build-time check on the image size:
+ */
+-. = ASSERT((_end - _text <= KERNEL_IMAGE_SIZE),
++. = ASSERT((_end - _text - __KERNEL_TEXT_OFFSET <= KERNEL_IMAGE_SIZE),
+ "kernel image bigger than KERNEL_IMAGE_SIZE");
+
+ #ifdef CONFIG_SMP
+diff -urNp linux-2.6.31.4/arch/x86/kernel/vsyscall_64.c linux-2.6.31.4/arch/x86/kernel/vsyscall_64.c
+--- linux-2.6.31.4/arch/x86/kernel/vsyscall_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/vsyscall_64.c 2009-10-11 15:29:40.853208575 -0400
@@ -79,6 +79,7 @@ void update_vsyscall(struct timespec *wa
write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags);
@@ -11788,9 +12746,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/vsyscall_64.c linux-2.6.30.8/arch/x86/
};
#endif
-diff -urNp linux-2.6.30.8/arch/x86/kernel/x8664_ksyms_64.c linux-2.6.30.8/arch/x86/kernel/x8664_ksyms_64.c
---- linux-2.6.30.8/arch/x86/kernel/x8664_ksyms_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/kernel/x8664_ksyms_64.c 2009-07-30 09:48:09.963690654 -0400
+diff -urNp linux-2.6.31.4/arch/x86/kernel/x8664_ksyms_64.c linux-2.6.31.4/arch/x86/kernel/x8664_ksyms_64.c
+--- linux-2.6.31.4/arch/x86/kernel/x8664_ksyms_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/kernel/x8664_ksyms_64.c 2009-10-11 15:29:40.853208575 -0400
@@ -30,8 +30,6 @@ EXPORT_SYMBOL(__put_user_8);
EXPORT_SYMBOL(copy_user_generic);
@@ -11800,30 +12758,24 @@ diff -urNp linux-2.6.30.8/arch/x86/kernel/x8664_ksyms_64.c linux-2.6.30.8/arch/x
EXPORT_SYMBOL(__copy_from_user_inatomic);
EXPORT_SYMBOL(copy_page);
-diff -urNp linux-2.6.30.8/arch/x86/kvm/svm.c linux-2.6.30.8/arch/x86/kvm/svm.c
---- linux-2.6.30.8/arch/x86/kvm/svm.c 2009-09-09 17:37:32.659510414 -0400
-+++ linux-2.6.30.8/arch/x86/kvm/svm.c 2009-09-09 17:37:49.750113159 -0400
-@@ -2247,7 +2247,19 @@ static void reload_tss(struct kvm_vcpu *
+diff -urNp linux-2.6.31.4/arch/x86/kvm/svm.c linux-2.6.31.4/arch/x86/kvm/svm.c
+--- linux-2.6.31.4/arch/x86/kvm/svm.c 2009-10-12 23:26:17.568876652 -0400
++++ linux-2.6.31.4/arch/x86/kvm/svm.c 2009-10-12 23:26:38.911688164 -0400
+@@ -2300,9 +2300,12 @@ static int handle_exit(struct kvm_run *k
+ static void reload_tss(struct kvm_vcpu *vcpu)
+ {
int cpu = raw_smp_processor_id();
-
+-
struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu);
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
svm_data->tss_desc->type = 9; /* available 32/64-bit TSS */
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
load_TR_desc();
}
-@@ -2643,7 +2655,7 @@ static int svm_get_mt_mask_shift(void)
+@@ -2686,7 +2689,7 @@ static u64 svm_get_mt_mask(struct kvm_vc
return 0;
}
@@ -11832,34 +12784,36 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/svm.c linux-2.6.30.8/arch/x86/kvm/svm.c
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
.hardware_setup = svm_hardware_setup,
-diff -urNp linux-2.6.30.8/arch/x86/kvm/vmx.c linux-2.6.30.8/arch/x86/kvm/vmx.c
---- linux-2.6.30.8/arch/x86/kvm/vmx.c 2009-09-09 17:37:32.662249874 -0400
-+++ linux-2.6.30.8/arch/x86/kvm/vmx.c 2009-09-09 17:37:50.180132423 -0400
-@@ -506,9 +506,23 @@ static void reload_tss(void)
- struct descriptor_table gdt;
- struct desc_struct *descs;
+diff -urNp linux-2.6.31.4/arch/x86/kvm/vmx.c linux-2.6.31.4/arch/x86/kvm/vmx.c
+--- linux-2.6.31.4/arch/x86/kvm/vmx.c 2009-10-12 23:26:17.612585756 -0400
++++ linux-2.6.31.4/arch/x86/kvm/vmx.c 2009-10-12 23:26:38.912396218 -0400
+@@ -521,7 +521,11 @@ static void reload_tss(void)
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
kvm_get_gdt(&gdt);
descs = (void *)gdt.base;
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
descs[GDT_ENTRY_TSS].type = 9; /* available TSS */
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
load_TR_desc();
}
-@@ -2214,7 +2228,7 @@ static int vmx_vcpu_setup(struct vcpu_vm
+@@ -1336,8 +1340,11 @@ static __init int hardware_setup(void)
+ if (!cpu_has_vmx_flexpriority())
+ flexpriority_enabled = 0;
+
+- if (!cpu_has_vmx_tpr_shadow())
+- kvm_x86_ops->update_cr8_intercept = NULL;
++ if (!cpu_has_vmx_tpr_shadow()) {
++ pax_open_kernel();
++ *(void **)&kvm_x86_ops->update_cr8_intercept = NULL;
++ pax_close_kernel();
++ }
+
+ return alloc_kvm_area();
+ }
+@@ -2239,7 +2246,7 @@ static int vmx_vcpu_setup(struct vcpu_vm
vmcs_writel(HOST_IDTR_BASE, dt.base); /* 22.2.4 */
asm("mov $.Lkvm_vmx_return, %0" : "=r"(kvm_vmx_return));
@@ -11868,7 +12822,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/vmx.c linux-2.6.30.8/arch/x86/kvm/vmx.c
vmcs_write32(VM_EXIT_MSR_STORE_COUNT, 0);
vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, 0);
vmcs_write32(VM_ENTRY_MSR_LOAD_COUNT, 0);
-@@ -3516,6 +3530,12 @@ static void vmx_vcpu_run(struct kvm_vcpu
+@@ -3493,6 +3500,12 @@ static void vmx_vcpu_run(struct kvm_vcpu
"jmp .Lkvm_vmx_return \n\t"
".Llaunched: " __ex(ASM_VMX_VMRESUME) "\n\t"
".Lkvm_vmx_return: "
@@ -11881,7 +12835,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/vmx.c linux-2.6.30.8/arch/x86/kvm/vmx.c
/* Save guest registers, load host registers, keep flags */
"xchg %0, (%%"R"sp) \n\t"
"mov %%"R"ax, %c[rax](%0) \n\t"
-@@ -3562,6 +3582,11 @@ static void vmx_vcpu_run(struct kvm_vcpu
+@@ -3539,6 +3552,11 @@ static void vmx_vcpu_run(struct kvm_vcpu
[r15]"i"(offsetof(struct vcpu_vmx, vcpu.arch.regs[VCPU_REGS_R15])),
#endif
[cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2))
@@ -11893,17 +12847,17 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/vmx.c linux-2.6.30.8/arch/x86/kvm/vmx.c
: "cc", "memory"
, R"bx", R"di", R"si"
#ifdef CONFIG_X86_64
-@@ -3580,7 +3605,7 @@ static void vmx_vcpu_run(struct kvm_vcpu
-
- vmx_update_window_states(vcpu);
+@@ -3555,7 +3573,7 @@ static void vmx_vcpu_run(struct kvm_vcpu
+ if (vmx->rmode.irq.pending)
+ fixup_rmode_irq(vmx);
- asm("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS));
+ asm("mov %0, %%ds; mov %0, %%es" : : "r"(__KERNEL_DS));
vmx->launched = 1;
- intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
-@@ -3716,7 +3741,7 @@ static int vmx_get_mt_mask_shift(void)
- return VMX_EPT_MT_EPTE_SHIFT;
+ vmx_complete_interrupts(vmx);
+@@ -3698,7 +3716,7 @@ static u64 vmx_get_mt_mask(struct kvm_vc
+ return ret;
}
-static struct kvm_x86_ops vmx_x86_ops = {
@@ -11911,10 +12865,10 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/vmx.c linux-2.6.30.8/arch/x86/kvm/vmx.c
.cpu_has_kvm_support = cpu_has_kvm_support,
.disabled_by_bios = vmx_disabled_by_bios,
.hardware_setup = hardware_setup,
-diff -urNp linux-2.6.30.8/arch/x86/kvm/x86.c linux-2.6.30.8/arch/x86/kvm/x86.c
---- linux-2.6.30.8/arch/x86/kvm/x86.c 2009-09-09 17:37:32.667116417 -0400
-+++ linux-2.6.30.8/arch/x86/kvm/x86.c 2009-09-09 17:37:50.199443574 -0400
-@@ -73,44 +73,44 @@ static int kvm_dev_ioctl_get_supported_c
+diff -urNp linux-2.6.31.4/arch/x86/kvm/x86.c linux-2.6.31.4/arch/x86/kvm/x86.c
+--- linux-2.6.31.4/arch/x86/kvm/x86.c 2009-10-12 23:26:17.620234568 -0400
++++ linux-2.6.31.4/arch/x86/kvm/x86.c 2009-10-12 23:26:38.912396218 -0400
+@@ -73,42 +73,42 @@ static int kvm_dev_ioctl_get_supported_c
struct kvm_cpuid_entry2 *kvm_find_cpuid_entry(struct kvm_vcpu *vcpu,
u32 function, u32 index);
@@ -11937,7 +12891,6 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/x86.c linux-2.6.30.8/arch/x86/kvm/x86.c
- { "halt_wakeup", VCPU_STAT(halt_wakeup) },
- { "hypercalls", VCPU_STAT(hypercalls) },
- { "request_irq", VCPU_STAT(request_irq_exits) },
-- { "request_nmi", VCPU_STAT(request_nmi_exits) },
- { "irq_exits", VCPU_STAT(irq_exits) },
- { "host_state_reload", VCPU_STAT(host_state_reload) },
- { "efer_reload", VCPU_STAT(efer_reload) },
@@ -11954,7 +12907,6 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/x86.c linux-2.6.30.8/arch/x86/kvm/x86.c
- { "mmu_recycled", VM_STAT(mmu_recycled) },
- { "mmu_cache_miss", VM_STAT(mmu_cache_miss) },
- { "mmu_unsync", VM_STAT(mmu_unsync) },
-- { "mmu_unsync_global", VM_STAT(mmu_unsync_global) },
- { "remote_tlb_flush", VM_STAT(remote_tlb_flush) },
- { "largepages", VM_STAT(lpages) },
+ { "pf_fixed", VCPU_STAT(pf_fixed), NULL },
@@ -11971,7 +12923,6 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/x86.c linux-2.6.30.8/arch/x86/kvm/x86.c
+ { "halt_wakeup", VCPU_STAT(halt_wakeup), NULL },
+ { "hypercalls", VCPU_STAT(hypercalls), NULL },
+ { "request_irq", VCPU_STAT(request_irq_exits), NULL },
-+ { "request_nmi", VCPU_STAT(request_nmi_exits), NULL },
+ { "irq_exits", VCPU_STAT(irq_exits), NULL },
+ { "host_state_reload", VCPU_STAT(host_state_reload), NULL },
+ { "efer_reload", VCPU_STAT(efer_reload), NULL },
@@ -11988,13 +12939,12 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/x86.c linux-2.6.30.8/arch/x86/kvm/x86.c
+ { "mmu_recycled", VM_STAT(mmu_recycled), NULL },
+ { "mmu_cache_miss", VM_STAT(mmu_cache_miss), NULL },
+ { "mmu_unsync", VM_STAT(mmu_unsync), NULL },
-+ { "mmu_unsync_global", VM_STAT(mmu_unsync_global), NULL },
+ { "remote_tlb_flush", VM_STAT(remote_tlb_flush), NULL },
+ { "largepages", VM_STAT(lpages), NULL },
{ NULL }
};
-@@ -1462,7 +1462,7 @@ static int kvm_vcpu_ioctl_set_lapic(stru
+@@ -1491,7 +1491,7 @@ static int kvm_vcpu_ioctl_set_lapic(stru
static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
struct kvm_interrupt *irq)
{
@@ -12003,7 +12953,7 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/x86.c linux-2.6.30.8/arch/x86/kvm/x86.c
return -EINVAL;
if (irqchip_in_kernel(vcpu->kvm))
return -ENXIO;
-@@ -2784,10 +2784,10 @@ static struct notifier_block kvmclock_cp
+@@ -2816,10 +2816,10 @@ static struct notifier_block kvmclock_cp
.notifier_call = kvmclock_cpufreq_notifier
};
@@ -12016,20 +12966,9 @@ diff -urNp linux-2.6.30.8/arch/x86/kvm/x86.c linux-2.6.30.8/arch/x86/kvm/x86.c
if (kvm_x86_ops) {
printk(KERN_ERR "kvm: already loaded the other module\n");
-diff -urNp linux-2.6.30.8/arch/x86/lguest/Kconfig linux-2.6.30.8/arch/x86/lguest/Kconfig
---- linux-2.6.30.8/arch/x86/lguest/Kconfig 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lguest/Kconfig 2009-08-02 09:47:36.165378342 -0400
-@@ -3,6 +3,7 @@ config LGUEST_GUEST
- select PARAVIRT
- depends on X86_32
- depends on !X86_PAE
-+ depends on !PAX_KERNEXEC
- select VIRTIO
- select VIRTIO_RING
- select VIRTIO_CONSOLE
-diff -urNp linux-2.6.30.8/arch/x86/lib/checksum_32.S linux-2.6.30.8/arch/x86/lib/checksum_32.S
---- linux-2.6.30.8/arch/x86/lib/checksum_32.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/checksum_32.S 2009-07-30 09:48:09.967600435 -0400
+diff -urNp linux-2.6.31.4/arch/x86/lib/checksum_32.S linux-2.6.31.4/arch/x86/lib/checksum_32.S
+--- linux-2.6.31.4/arch/x86/lib/checksum_32.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/checksum_32.S 2009-10-11 15:29:40.961121537 -0400
@@ -28,7 +28,8 @@
#include <linux/linkage.h>
#include <asm/dwarf2.h>
@@ -12275,10 +13214,10 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/checksum_32.S linux-2.6.30.8/arch/x86/lib
#undef ROUND
#undef ROUND1
-diff -urNp linux-2.6.30.8/arch/x86/lib/clear_page_64.S linux-2.6.30.8/arch/x86/lib/clear_page_64.S
---- linux-2.6.30.8/arch/x86/lib/clear_page_64.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/clear_page_64.S 2009-07-30 09:48:09.967600435 -0400
-@@ -44,7 +44,7 @@ ENDPROC(clear_page)
+diff -urNp linux-2.6.31.4/arch/x86/lib/clear_page_64.S linux-2.6.31.4/arch/x86/lib/clear_page_64.S
+--- linux-2.6.31.4/arch/x86/lib/clear_page_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/clear_page_64.S 2009-10-11 15:29:40.961121537 -0400
+@@ -43,7 +43,7 @@ ENDPROC(clear_page)
#include <asm/cpufeature.h>
@@ -12287,9 +13226,9 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/clear_page_64.S linux-2.6.30.8/arch/x86/l
1: .byte 0xeb /* jmp <disp8> */
.byte (clear_page_c - clear_page) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.30.8/arch/x86/lib/copy_page_64.S linux-2.6.30.8/arch/x86/lib/copy_page_64.S
---- linux-2.6.30.8/arch/x86/lib/copy_page_64.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/copy_page_64.S 2009-07-30 09:48:09.967600435 -0400
+diff -urNp linux-2.6.31.4/arch/x86/lib/copy_page_64.S linux-2.6.31.4/arch/x86/lib/copy_page_64.S
+--- linux-2.6.31.4/arch/x86/lib/copy_page_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/copy_page_64.S 2009-10-11 15:29:40.962275196 -0400
@@ -104,7 +104,7 @@ ENDPROC(copy_page)
#include <asm/cpufeature.h>
@@ -12299,9 +13238,9 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/copy_page_64.S linux-2.6.30.8/arch/x86/li
1: .byte 0xeb /* jmp <disp8> */
.byte (copy_page_c - copy_page) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.30.8/arch/x86/lib/copy_user_64.S linux-2.6.30.8/arch/x86/lib/copy_user_64.S
---- linux-2.6.30.8/arch/x86/lib/copy_user_64.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/copy_user_64.S 2009-07-30 09:48:09.967600435 -0400
+diff -urNp linux-2.6.31.4/arch/x86/lib/copy_user_64.S linux-2.6.31.4/arch/x86/lib/copy_user_64.S
+--- linux-2.6.31.4/arch/x86/lib/copy_user_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/copy_user_64.S 2009-10-11 15:29:40.962275196 -0400
@@ -21,7 +21,7 @@
.byte 0xe9 /* 32bit jump */
.long \orig-1f /* by default jump to orig */
@@ -12311,7 +13250,7 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/copy_user_64.S linux-2.6.30.8/arch/x86/li
2: .byte 0xe9 /* near jump with 32bit immediate */
.long \alt-1b /* offset */ /* or alternatively to alt */
.previous
-@@ -64,31 +64,6 @@
+@@ -64,32 +64,6 @@
#endif
.endm
@@ -12326,6 +13265,7 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/copy_user_64.S linux-2.6.30.8/arch/x86/li
- jae bad_to_user
- ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string
- CFI_ENDPROC
+-ENDPROC(copy_to_user)
-
-/* Standard copy_from_user with segment limit checking */
-ENTRY(copy_from_user)
@@ -12343,7 +13283,7 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/copy_user_64.S linux-2.6.30.8/arch/x86/li
ENTRY(copy_user_generic)
CFI_STARTPROC
ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string
-@@ -106,6 +81,8 @@ ENDPROC(__copy_from_user_inatomic)
+@@ -107,6 +81,8 @@ ENDPROC(__copy_from_user_inatomic)
ENTRY(bad_from_user)
bad_from_user:
CFI_STARTPROC
@@ -12352,9 +13292,9 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/copy_user_64.S linux-2.6.30.8/arch/x86/li
movl %edx,%ecx
xorl %eax,%eax
rep
-diff -urNp linux-2.6.30.8/arch/x86/lib/getuser.S linux-2.6.30.8/arch/x86/lib/getuser.S
---- linux-2.6.30.8/arch/x86/lib/getuser.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/getuser.S 2009-07-30 09:48:09.967600435 -0400
+diff -urNp linux-2.6.31.4/arch/x86/lib/getuser.S linux-2.6.31.4/arch/x86/lib/getuser.S
+--- linux-2.6.31.4/arch/x86/lib/getuser.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/getuser.S 2009-10-11 15:29:40.962275196 -0400
@@ -33,6 +33,7 @@
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
@@ -12436,9 +13376,9 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/getuser.S linux-2.6.30.8/arch/x86/lib/get
xor %edx,%edx
mov $(-EFAULT),%_ASM_AX
ret
-diff -urNp linux-2.6.30.8/arch/x86/lib/memcpy_64.S linux-2.6.30.8/arch/x86/lib/memcpy_64.S
---- linux-2.6.30.8/arch/x86/lib/memcpy_64.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/memcpy_64.S 2009-07-30 09:48:09.968548540 -0400
+diff -urNp linux-2.6.31.4/arch/x86/lib/memcpy_64.S linux-2.6.31.4/arch/x86/lib/memcpy_64.S
+--- linux-2.6.31.4/arch/x86/lib/memcpy_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/memcpy_64.S 2009-10-11 15:29:40.962275196 -0400
@@ -128,7 +128,7 @@ ENDPROC(__memcpy)
* It is also a lot simpler. Use this when possible:
*/
@@ -12448,9 +13388,9 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/memcpy_64.S linux-2.6.30.8/arch/x86/lib/m
1: .byte 0xeb /* jmp <disp8> */
.byte (memcpy_c - memcpy) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.30.8/arch/x86/lib/memset_64.S linux-2.6.30.8/arch/x86/lib/memset_64.S
---- linux-2.6.30.8/arch/x86/lib/memset_64.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/memset_64.S 2009-07-30 09:48:09.968548540 -0400
+diff -urNp linux-2.6.31.4/arch/x86/lib/memset_64.S linux-2.6.31.4/arch/x86/lib/memset_64.S
+--- linux-2.6.31.4/arch/x86/lib/memset_64.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/memset_64.S 2009-10-11 15:29:40.963145709 -0400
@@ -118,7 +118,7 @@ ENDPROC(__memset)
#include <asm/cpufeature.h>
@@ -12460,9 +13400,9 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/memset_64.S linux-2.6.30.8/arch/x86/lib/m
1: .byte 0xeb /* jmp <disp8> */
.byte (memset_c - memset) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.30.8/arch/x86/lib/mmx_32.c linux-2.6.30.8/arch/x86/lib/mmx_32.c
---- linux-2.6.30.8/arch/x86/lib/mmx_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/mmx_32.c 2009-07-30 09:48:09.968548540 -0400
+diff -urNp linux-2.6.31.4/arch/x86/lib/mmx_32.c linux-2.6.31.4/arch/x86/lib/mmx_32.c
+--- linux-2.6.31.4/arch/x86/lib/mmx_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/mmx_32.c 2009-10-11 15:29:40.963145709 -0400
@@ -29,6 +29,7 @@ void *_mmx_memcpy(void *to, const void *
{
void *p;
@@ -12778,9 +13718,9 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/mmx_32.c linux-2.6.30.8/arch/x86/lib/mmx_
from += 64;
to += 64;
-diff -urNp linux-2.6.30.8/arch/x86/lib/putuser.S linux-2.6.30.8/arch/x86/lib/putuser.S
---- linux-2.6.30.8/arch/x86/lib/putuser.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/putuser.S 2009-07-30 09:48:09.969494268 -0400
+diff -urNp linux-2.6.31.4/arch/x86/lib/putuser.S linux-2.6.31.4/arch/x86/lib/putuser.S
+--- linux-2.6.31.4/arch/x86/lib/putuser.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/putuser.S 2009-10-11 15:29:40.963145709 -0400
@@ -15,6 +15,7 @@
#include <asm/thread_info.h>
#include <asm/errno.h>
@@ -12884,9 +13824,9 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/putuser.S linux-2.6.30.8/arch/x86/lib/put
movl $-EFAULT,%eax
EXIT
END(bad_put_user)
-diff -urNp linux-2.6.30.8/arch/x86/lib/usercopy_32.c linux-2.6.30.8/arch/x86/lib/usercopy_32.c
---- linux-2.6.30.8/arch/x86/lib/usercopy_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/lib/usercopy_32.c 2009-07-30 09:48:09.969494268 -0400
+diff -urNp linux-2.6.31.4/arch/x86/lib/usercopy_32.c linux-2.6.31.4/arch/x86/lib/usercopy_32.c
+--- linux-2.6.31.4/arch/x86/lib/usercopy_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/lib/usercopy_32.c 2009-10-11 15:29:56.559427908 -0400
@@ -36,31 +36,38 @@ static inline int __movsl_is_ok(unsigned
* Copy a null terminated string from userspace.
*/
@@ -13067,16 +14007,97 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/usercopy_32.c linux-2.6.30.8/arch/x86/lib
:"cc");
return res & mask;
}
-@@ -227,10 +240,121 @@ EXPORT_SYMBOL(strnlen_user);
+@@ -227,10 +240,11 @@ EXPORT_SYMBOL(strnlen_user);
#ifdef CONFIG_X86_INTEL_USERCOPY
static unsigned long
-__copy_user_intel(void __user *to, const void *from, unsigned long size)
+__generic_copy_to_user_intel(void __user *to, const void *from, unsigned long size)
+ {
+ int d0, d1;
+ __asm__ __volatile__(
++ " movw %w6, %%es\n"
+ " .align 2,0x90\n"
+ "1: movl 32(%4), %%eax\n"
+ " cmpl $67, %0\n"
+@@ -239,36 +253,36 @@ __copy_user_intel(void __user *to, const
+ " .align 2,0x90\n"
+ "3: movl 0(%4), %%eax\n"
+ "4: movl 4(%4), %%edx\n"
+- "5: movl %%eax, 0(%3)\n"
+- "6: movl %%edx, 4(%3)\n"
++ "5: movl %%eax, %%es:0(%3)\n"
++ "6: movl %%edx, %%es:4(%3)\n"
+ "7: movl 8(%4), %%eax\n"
+ "8: movl 12(%4),%%edx\n"
+- "9: movl %%eax, 8(%3)\n"
+- "10: movl %%edx, 12(%3)\n"
++ "9: movl %%eax, %%es:8(%3)\n"
++ "10: movl %%edx, %%es:12(%3)\n"
+ "11: movl 16(%4), %%eax\n"
+ "12: movl 20(%4), %%edx\n"
+- "13: movl %%eax, 16(%3)\n"
+- "14: movl %%edx, 20(%3)\n"
++ "13: movl %%eax, %%es:16(%3)\n"
++ "14: movl %%edx, %%es:20(%3)\n"
+ "15: movl 24(%4), %%eax\n"
+ "16: movl 28(%4), %%edx\n"
+- "17: movl %%eax, 24(%3)\n"
+- "18: movl %%edx, 28(%3)\n"
++ "17: movl %%eax, %%es:24(%3)\n"
++ "18: movl %%edx, %%es:28(%3)\n"
+ "19: movl 32(%4), %%eax\n"
+ "20: movl 36(%4), %%edx\n"
+- "21: movl %%eax, 32(%3)\n"
+- "22: movl %%edx, 36(%3)\n"
++ "21: movl %%eax, %%es:32(%3)\n"
++ "22: movl %%edx, %%es:36(%3)\n"
+ "23: movl 40(%4), %%eax\n"
+ "24: movl 44(%4), %%edx\n"
+- "25: movl %%eax, 40(%3)\n"
+- "26: movl %%edx, 44(%3)\n"
++ "25: movl %%eax, %%es:40(%3)\n"
++ "26: movl %%edx, %%es:44(%3)\n"
+ "27: movl 48(%4), %%eax\n"
+ "28: movl 52(%4), %%edx\n"
+- "29: movl %%eax, 48(%3)\n"
+- "30: movl %%edx, 52(%3)\n"
++ "29: movl %%eax, %%es:48(%3)\n"
++ "30: movl %%edx, %%es:52(%3)\n"
+ "31: movl 56(%4), %%eax\n"
+ "32: movl 60(%4), %%edx\n"
+- "33: movl %%eax, 56(%3)\n"
+- "34: movl %%edx, 60(%3)\n"
++ "33: movl %%eax, %%es:56(%3)\n"
++ "34: movl %%edx, %%es:60(%3)\n"
+ " addl $-64, %0\n"
+ " addl $64, %4\n"
+ " addl $64, %3\n"
+@@ -282,6 +296,8 @@ __copy_user_intel(void __user *to, const
+ "36: movl %%eax, %0\n"
+ "37: rep; movsb\n"
+ "100:\n"
++ " pushl %%ss\n"
++ " popl %%es\n"
+ ".section .fixup,\"ax\"\n"
+ "101: lea 0(%%eax,%0,4),%0\n"
+ " jmp 100b\n"
+@@ -328,7 +344,117 @@ __copy_user_intel(void __user *to, const
+ " .long 99b,101b\n"
+ ".previous"
+ : "=&c"(size), "=&D" (d0), "=&S" (d1)
+- : "1"(to), "2"(from), "0"(size)
++ : "1"(to), "2"(from), "0"(size), "r"(__USER_DS)
++ : "eax", "edx", "memory");
++ return size;
++}
++
++static unsigned long
++__generic_copy_from_user_intel(void *to, const void __user *from, unsigned long size)
+{
+ int d0, d1;
+ __asm__ __volatile__(
-+ " movw %w6, %%es\n"
++ " movw %w6, %%ds\n"
+ " .align 2,0x90\n"
+ "1: movl 32(%4), %%eax\n"
+ " cmpl $67, %0\n"
@@ -13129,7 +14150,7 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/usercopy_32.c linux-2.6.30.8/arch/x86/lib
+ "37: rep; movsb\n"
+ "100:\n"
+ " pushl %%ss\n"
-+ " popl %%es\n"
++ " popl %%ds\n"
+ ".section .fixup,\"ax\"\n"
+ "101: lea 0(%%eax,%0,4),%0\n"
+ " jmp 100b\n"
@@ -13177,87 +14198,6 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/usercopy_32.c linux-2.6.30.8/arch/x86/lib
+ ".previous"
+ : "=&c"(size), "=&D" (d0), "=&S" (d1)
+ : "1"(to), "2"(from), "0"(size), "r"(__USER_DS)
-+ : "eax", "edx", "memory");
-+ return size;
-+}
-+
-+static unsigned long
-+__generic_copy_from_user_intel(void *to, const void __user *from, unsigned long size)
- {
- int d0, d1;
- __asm__ __volatile__(
-+ " movw %w6, %%ds\n"
- " .align 2,0x90\n"
- "1: movl 32(%4), %%eax\n"
- " cmpl $67, %0\n"
-@@ -239,36 +363,36 @@ __copy_user_intel(void __user *to, const
- " .align 2,0x90\n"
- "3: movl 0(%4), %%eax\n"
- "4: movl 4(%4), %%edx\n"
-- "5: movl %%eax, 0(%3)\n"
-- "6: movl %%edx, 4(%3)\n"
-+ "5: movl %%eax, %%es:0(%3)\n"
-+ "6: movl %%edx, %%es:4(%3)\n"
- "7: movl 8(%4), %%eax\n"
- "8: movl 12(%4),%%edx\n"
-- "9: movl %%eax, 8(%3)\n"
-- "10: movl %%edx, 12(%3)\n"
-+ "9: movl %%eax, %%es:8(%3)\n"
-+ "10: movl %%edx, %%es:12(%3)\n"
- "11: movl 16(%4), %%eax\n"
- "12: movl 20(%4), %%edx\n"
-- "13: movl %%eax, 16(%3)\n"
-- "14: movl %%edx, 20(%3)\n"
-+ "13: movl %%eax, %%es:16(%3)\n"
-+ "14: movl %%edx, %%es:20(%3)\n"
- "15: movl 24(%4), %%eax\n"
- "16: movl 28(%4), %%edx\n"
-- "17: movl %%eax, 24(%3)\n"
-- "18: movl %%edx, 28(%3)\n"
-+ "17: movl %%eax, %%es:24(%3)\n"
-+ "18: movl %%edx, %%es:28(%3)\n"
- "19: movl 32(%4), %%eax\n"
- "20: movl 36(%4), %%edx\n"
-- "21: movl %%eax, 32(%3)\n"
-- "22: movl %%edx, 36(%3)\n"
-+ "21: movl %%eax, %%es:32(%3)\n"
-+ "22: movl %%edx, %%es:36(%3)\n"
- "23: movl 40(%4), %%eax\n"
- "24: movl 44(%4), %%edx\n"
-- "25: movl %%eax, 40(%3)\n"
-- "26: movl %%edx, 44(%3)\n"
-+ "25: movl %%eax, %%es:40(%3)\n"
-+ "26: movl %%edx, %%es:44(%3)\n"
- "27: movl 48(%4), %%eax\n"
- "28: movl 52(%4), %%edx\n"
-- "29: movl %%eax, 48(%3)\n"
-- "30: movl %%edx, 52(%3)\n"
-+ "29: movl %%eax, %%es:48(%3)\n"
-+ "30: movl %%edx, %%es:52(%3)\n"
- "31: movl 56(%4), %%eax\n"
- "32: movl 60(%4), %%edx\n"
-- "33: movl %%eax, 56(%3)\n"
-- "34: movl %%edx, 60(%3)\n"
-+ "33: movl %%eax, %%es:56(%3)\n"
-+ "34: movl %%edx, %%es:60(%3)\n"
- " addl $-64, %0\n"
- " addl $64, %4\n"
- " addl $64, %3\n"
-@@ -282,6 +406,8 @@ __copy_user_intel(void __user *to, const
- "36: movl %%eax, %0\n"
- "37: rep; movsb\n"
- "100:\n"
-+ " pushl %%ss\n"
-+ " popl %%ds\n"
- ".section .fixup,\"ax\"\n"
- "101: lea 0(%%eax,%0,4),%0\n"
- " jmp 100b\n"
-@@ -328,7 +454,7 @@ __copy_user_intel(void __user *to, const
- " .long 99b,101b\n"
- ".previous"
- : "=&c"(size), "=&D" (d0), "=&S" (d1)
-- : "1"(to), "2"(from), "0"(size)
-+ : "1"(to), "2"(from), "0"(size), "r"(__USER_DS)
: "eax", "edx", "memory");
return size;
}
@@ -13769,7 +14709,7 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/usercopy_32.c linux-2.6.30.8/arch/x86/lib
#endif
return n;
}
-@@ -827,59 +1017,37 @@ unsigned long __copy_from_user_ll_nocach
+@@ -827,59 +1017,40 @@ unsigned long __copy_from_user_ll_nocach
if (n > 64 && cpu_has_xmm2)
n = __copy_user_intel_nocache(to, from, n);
else
@@ -13808,6 +14748,9 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/usercopy_32.c linux-2.6.30.8/arch/x86/lib
+ struct desc_struct d;
+
+ current_thread_info()->addr_limit = x;
++ if (unlikely(paravirt_enabled()))
++ return;
++
+ if (likely(limit))
+ limit = (limit - 1UL) >> PAGE_SHIFT;
+ pack_descriptor(&d, 0UL, limit, 0xF3, 0xC);
@@ -13841,7 +14784,7 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/usercopy_32.c linux-2.6.30.8/arch/x86/lib
- memset(to, 0, n);
- return n;
+ __set_fs(x, get_cpu());
-+ put_cpu_no_resched();
++ put_cpu();
}
-EXPORT_SYMBOL(copy_from_user);
+#else
@@ -13852,10 +14795,10 @@ diff -urNp linux-2.6.30.8/arch/x86/lib/usercopy_32.c linux-2.6.30.8/arch/x86/lib
+#endif
+
+EXPORT_SYMBOL(set_fs);
-diff -urNp linux-2.6.30.8/arch/x86/Makefile linux-2.6.30.8/arch/x86/Makefile
---- linux-2.6.30.8/arch/x86/Makefile 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/Makefile 2009-07-30 09:48:09.917626356 -0400
-@@ -198,3 +198,12 @@ define archhelp
+diff -urNp linux-2.6.31.4/arch/x86/Makefile linux-2.6.31.4/arch/x86/Makefile
+--- linux-2.6.31.4/arch/x86/Makefile 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/Makefile 2009-10-11 15:29:40.964527359 -0400
+@@ -188,3 +188,12 @@ define archhelp
echo ' FDARGS="..." arguments for the booted kernel'
echo ' FDINITRD=file initrd for the booted kernel'
endef
@@ -13868,14 +14811,15 @@ diff -urNp linux-2.6.30.8/arch/x86/Makefile linux-2.6.30.8/arch/x86/Makefile
+
+archprepare:
+ $(if $(LDFLAGS_BUILD_ID),,$(error $(OLD_LD)))
-diff -urNp linux-2.6.30.8/arch/x86/mm/extable.c linux-2.6.30.8/arch/x86/mm/extable.c
---- linux-2.6.30.8/arch/x86/mm/extable.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/extable.c 2009-07-30 09:48:09.970452952 -0400
-@@ -1,14 +1,62 @@
+diff -urNp linux-2.6.31.4/arch/x86/mm/extable.c linux-2.6.31.4/arch/x86/mm/extable.c
+--- linux-2.6.31.4/arch/x86/mm/extable.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/extable.c 2009-10-13 19:00:18.392269554 -0400
+@@ -1,14 +1,71 @@
#include <linux/module.h>
#include <linux/spinlock.h>
+#include <linux/sort.h>
#include <asm/uaccess.h>
++#include <asm/pgtable.h>
+/*
+ * The exception table needs to be sorted so that the binary
@@ -13899,23 +14843,12 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/extable.c linux-2.6.30.8/arch/x86/mm/extab
+{
+ struct exception_table_entry t, *x = a, *y = b;
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
+ t = *x;
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
+ *x = *y;
+ *y = t;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
+}
+
+void sort_extable(struct exception_table_entry *start,
@@ -13924,6 +14857,25 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/extable.c linux-2.6.30.8/arch/x86/mm/extab
+ sort(start, finish - start, sizeof(struct exception_table_entry),
+ cmp_ex, swap_ex);
+}
++
++#ifdef CONFIG_MODULES
++/*
++ * If the exception table is sorted, any referring to the module init
++ * will be at the beginning or the end.
++ */
++void trim_init_extable(struct module *m)
++{
++ /*trim the beginning*/
++ while (m->num_exentries && within_module_init(m->extable[0].insn, m)) {
++ m->extable++;
++ m->num_exentries--;
++ }
++ /*trim the end*/
++ while (m->num_exentries &&
++ within_module_init(m->extable[m->num_exentries-1].insn, m))
++ m->num_exentries--;
++}
++#endif /* CONFIG_MODULES */
int fixup_exception(struct pt_regs *regs)
{
@@ -13935,27 +14887,25 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/extable.c linux-2.6.30.8/arch/x86/mm/extab
extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
extern u32 pnp_bios_is_utter_crap;
pnp_bios_is_utter_crap = 1;
-diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
---- linux-2.6.30.8/arch/x86/mm/fault.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/fault.c 2009-08-05 19:15:53.629625442 -0400
-@@ -27,6 +27,8 @@
- #include <linux/tty.h>
- #include <linux/smp.h>
- #include <linux/mm.h>
+diff -urNp linux-2.6.31.4/arch/x86/mm/fault.c linux-2.6.31.4/arch/x86/mm/fault.c
+--- linux-2.6.31.4/arch/x86/mm/fault.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/fault.c 2009-10-11 15:41:02.289144032 -0400
+@@ -11,10 +11,14 @@
+ #include <linux/kprobes.h> /* __kprobes, ... */
+ #include <linux/mmiotrace.h> /* kmmio_handler, ... */
+ #include <linux/perf_counter.h> /* perf_swcounter_event */
+#include <linux/unistd.h>
+#include <linux/compiler.h>
- #include <asm-generic/sections.h>
-
-@@ -37,6 +39,7 @@
- #include <asm/proto.h>
- #include <asm/traps.h>
- #include <asm/desc.h>
+ #include <asm/traps.h> /* dotraplinkage, ... */
+ #include <asm/pgalloc.h> /* pgd_*(), ... */
+ #include <asm/kmemcheck.h> /* kmemcheck_*(), ... */
+#include <asm/vsyscall.h>
++#include <asm/tlbflush.h>
/*
* Page fault error code bits:
-@@ -73,7 +76,7 @@ static inline int notify_page_fault(stru
+@@ -51,7 +55,7 @@ static inline int notify_page_fault(stru
int ret = 0;
/* kprobe_running() needs smp_processor_id() */
@@ -13964,7 +14914,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
preempt_disable();
if (kprobe_running() && kprobe_fault_handler(regs, 14))
ret = 1;
-@@ -193,6 +196,30 @@ force_sig_info_fault(int si_signo, int s
+@@ -171,6 +175,30 @@ force_sig_info_fault(int si_signo, int s
force_sig_info(si_signo, &info, tsk);
}
@@ -13995,7 +14945,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
DEFINE_SPINLOCK(pgd_lock);
LIST_HEAD(pgd_list);
-@@ -571,7 +598,7 @@ static int is_errata93(struct pt_regs *r
+@@ -543,7 +571,7 @@ static int is_errata93(struct pt_regs *r
static int is_errata100(struct pt_regs *regs, unsigned long address)
{
#ifdef CONFIG_X86_64
@@ -14004,7 +14954,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
return 1;
#endif
return 0;
-@@ -598,7 +625,7 @@ static int is_f00f_bug(struct pt_regs *r
+@@ -570,7 +598,7 @@ static int is_f00f_bug(struct pt_regs *r
}
static const char nx_warning[] = KERN_CRIT
@@ -14013,7 +14963,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
static void
show_fault_oops(struct pt_regs *regs, unsigned long error_code,
-@@ -607,15 +634,31 @@ show_fault_oops(struct pt_regs *regs, un
+@@ -579,15 +607,27 @@ show_fault_oops(struct pt_regs *regs, un
if (!oops_may_print())
return;
@@ -14029,11 +14979,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
}
+#ifdef CONFIG_PAX_KERNEXEC
-+#ifdef CONFIG_MODULES
-+ if (init_mm.start_code <= address && address < (unsigned long)MODULES_END)
-+#else
+ if (init_mm.start_code <= address && address < init_mm.end_code)
-+#endif
+ {
+ if (current->signal->curr_ip)
+ printk(KERN_ERR "PAX: From %u.%u.%u.%u: %s:%d, uid/euid: %u/%u, attempted to modify kernel code\n",
@@ -14047,7 +14993,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
printk(KERN_ALERT "BUG: unable to handle kernel ");
if (address < PAGE_SIZE)
printk(KERN_CONT "NULL pointer dereference");
-@@ -740,6 +783,68 @@ __bad_area_nosemaphore(struct pt_regs *r
+@@ -712,6 +752,68 @@ __bad_area_nosemaphore(struct pt_regs *r
unsigned long address, int si_code)
{
struct task_struct *tsk = current;
@@ -14116,7 +15062,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
/* User mode accesses just cause a SIGSEGV */
if (error_code & PF_USER) {
-@@ -874,6 +979,106 @@ static int spurious_fault_check(unsigned
+@@ -846,6 +948,106 @@ static int spurious_fault_check(unsigned
return 1;
}
@@ -14223,7 +15169,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
/*
* Handle a spurious fault caused by a stale TLB entry.
*
-@@ -940,6 +1145,9 @@ int show_unhandled_signals = 1;
+@@ -912,6 +1114,9 @@ int show_unhandled_signals = 1;
static inline int
access_error(unsigned long error_code, int write, struct vm_area_struct *vma)
{
@@ -14233,7 +15179,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
if (write) {
/* write, present and write, not present: */
if (unlikely(!(vma->vm_flags & VM_WRITE)))
-@@ -973,19 +1181,18 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -945,17 +1150,16 @@ do_page_fault(struct pt_regs *regs, unsi
{
struct vm_area_struct *vma;
struct task_struct *tsk;
@@ -14248,15 +15194,13 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
tsk = current;
mm = tsk->mm;
- prefetchw(&mm->mmap_sem);
-
- /* Get the faulting address: */
- address = read_cr2();
-
- if (unlikely(kmmio_fault(regs, address)))
- return;
-
-@@ -1033,7 +1240,7 @@ do_page_fault(struct pt_regs *regs, unsi
+ /*
+ * Detect and handle instructions that would cause a page fault for
+ * both a tracked kernel page and a userspace page.
+@@ -1015,7 +1219,7 @@ do_page_fault(struct pt_regs *regs, unsi
* User-mode registers count as a user access even for any
* potential system fault or CPU buglet:
*/
@@ -14265,7 +15209,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
local_irq_enable();
error_code |= PF_USER;
} else {
-@@ -1085,6 +1292,11 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -1069,6 +1273,11 @@ do_page_fault(struct pt_regs *regs, unsi
might_sleep();
}
@@ -14277,7 +15221,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
vma = find_vma(mm, address);
if (unlikely(!vma)) {
bad_area(regs, error_code, address);
-@@ -1096,18 +1308,24 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -1080,18 +1289,24 @@ do_page_fault(struct pt_regs *regs, unsi
bad_area(regs, error_code, address);
return;
}
@@ -14313,7 +15257,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
if (unlikely(expand_stack(vma, address))) {
bad_area(regs, error_code, address);
return;
-@@ -1146,3 +1364,174 @@ good_area:
+@@ -1135,3 +1350,174 @@ good_area:
up_read(&mm->mmap_sem);
}
@@ -14488,73 +15432,37 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/fault.c linux-2.6.30.8/arch/x86/mm/fault.c
+ printk("\n");
+}
+#endif
-diff -urNp linux-2.6.30.8/arch/x86/mm/highmem_32.c linux-2.6.30.8/arch/x86/mm/highmem_32.c
---- linux-2.6.30.8/arch/x86/mm/highmem_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/highmem_32.c 2009-07-30 09:48:09.970452952 -0400
-@@ -32,6 +32,10 @@ void *kmap_atomic_prot(struct page *page
- enum fixed_addresses idx;
- unsigned long vaddr;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
- pagefault_disable();
-
-@@ -43,7 +47,17 @@ void *kmap_atomic_prot(struct page *page
+diff -urNp linux-2.6.31.4/arch/x86/mm/highmem_32.c linux-2.6.31.4/arch/x86/mm/highmem_32.c
+--- linux-2.6.31.4/arch/x86/mm/highmem_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/highmem_32.c 2009-10-12 23:12:55.284949502 -0400
+@@ -43,7 +43,10 @@ void *kmap_atomic_prot(struct page *page
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
BUG_ON(!pte_none(*(kmap_pte-idx)));
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
set_pte(kmap_pte-idx, mk_pte(page, prot));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
- arch_flush_lazy_mmu_mode();
++ pax_close_kernel();
return (void *)vaddr;
-@@ -59,15 +73,29 @@ void kunmap_atomic(void *kvaddr, enum km
- unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
- enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- /*
- * Force other mappings to Oops if they'll try to access this pte
- * without first remap it. Keeping stale mappings around is a bad idea
+ }
+@@ -64,9 +67,11 @@ void kunmap_atomic(void *kvaddr, enum km
* also, in case the page changes cacheability attributes or becomes
* a protected page in a hypervisor.
*/
- if (vaddr == __fix_to_virt(FIX_KMAP_BEGIN+idx))
+ if (vaddr == __fix_to_virt(FIX_KMAP_BEGIN+idx)) {
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
kpte_clear_flush(kmap_pte-idx, vaddr);
- else {
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
+ } else {
#ifdef CONFIG_DEBUG_HIGHMEM
BUG_ON(vaddr < PAGE_OFFSET);
BUG_ON(vaddr >= (unsigned long)high_memory);
-diff -urNp linux-2.6.30.8/arch/x86/mm/hugetlbpage.c linux-2.6.30.8/arch/x86/mm/hugetlbpage.c
---- linux-2.6.30.8/arch/x86/mm/hugetlbpage.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/hugetlbpage.c 2009-07-30 09:48:09.971412512 -0400
+diff -urNp linux-2.6.31.4/arch/x86/mm/hugetlbpage.c linux-2.6.31.4/arch/x86/mm/hugetlbpage.c
+--- linux-2.6.31.4/arch/x86/mm/hugetlbpage.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/hugetlbpage.c 2009-10-11 15:29:40.965222374 -0400
@@ -267,13 +267,18 @@ static unsigned long hugetlb_get_unmappe
struct hstate *h = hstate_file(file);
struct mm_struct *mm = current->mm;
@@ -14689,18 +15597,10 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/hugetlbpage.c linux-2.6.30.8/arch/x86/mm/h
(!vma || addr + len <= vma->vm_start))
return addr;
}
-diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_32.c
---- linux-2.6.30.8/arch/x86/mm/init_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/init_32.c 2009-07-30 09:48:09.972413251 -0400
-@@ -50,6 +50,7 @@
- #include <asm/setup.h>
- #include <asm/cacheflush.h>
- #include <asm/init.h>
-+#include <asm/desc.h>
-
- unsigned long max_low_pfn_mapped;
- unsigned long max_pfn_mapped;
-@@ -75,36 +76,6 @@ static __init void *alloc_low_page(void)
+diff -urNp linux-2.6.31.4/arch/x86/mm/init_32.c linux-2.6.31.4/arch/x86/mm/init_32.c
+--- linux-2.6.31.4/arch/x86/mm/init_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/init_32.c 2009-10-18 10:09:07.063636365 -0400
+@@ -72,36 +72,6 @@ static __init void *alloc_low_page(void)
}
/*
@@ -14737,7 +15637,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
* Create a page table and place a pointer to it in a middle page
* directory entry:
*/
-@@ -124,13 +95,28 @@ static pte_t * __init one_page_table_ini
+@@ -121,13 +91,28 @@ static pte_t * __init one_page_table_ini
page_table = (pte_t *)alloc_low_page();
paravirt_alloc_pte(&init_mm, __pa(page_table) >> PAGE_SHIFT);
@@ -14766,7 +15666,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
pmd_t * __init populate_extra_pmd(unsigned long vaddr)
{
int pgd_idx = pgd_index(vaddr);
-@@ -204,6 +190,7 @@ page_table_range_init(unsigned long star
+@@ -201,6 +186,7 @@ page_table_range_init(unsigned long star
int pgd_idx, pmd_idx;
unsigned long vaddr;
pgd_t *pgd;
@@ -14774,7 +15674,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
pmd_t *pmd;
pte_t *pte = NULL;
-@@ -213,8 +200,13 @@ page_table_range_init(unsigned long star
+@@ -210,8 +196,13 @@ page_table_range_init(unsigned long star
pgd = pgd_base + pgd_idx;
for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_idx++) {
@@ -14790,7 +15690,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
pmd++, pmd_idx++) {
pte = page_table_kmap_check(one_page_table_init(pmd),
-@@ -226,11 +218,23 @@ page_table_range_init(unsigned long star
+@@ -223,11 +214,20 @@ page_table_range_init(unsigned long star
}
}
@@ -14800,25 +15700,22 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
- if (addr >= PAGE_OFFSET && addr <= (unsigned long)__init_end)
- return 1;
- return 0;
-+ unsigned long etext;
-+
-+#if defined(CONFIG_MODULES) && defined(CONFIG_PAX_KERNEXEC)
-+ etext = ktva_ktla((unsigned long)&MODULES_END);
-+#else
-+ etext = (unsigned long)&_etext;
-+#endif
-+
-+ if ((start > ktla_ktva(etext) ||
++ if ((start > ktla_ktva((unsigned long)_etext) ||
+ end <= ktla_ktva((unsigned long)_stext)) &&
+ (start > ktla_ktva((unsigned long)_einittext) ||
+ end <= ktla_ktva((unsigned long)_sinittext)) &&
++
++#ifdef CONFIG_ACPI_SLEEP
++ (start > (unsigned long)__va(acpi_wakeup_address) + 0x4000 || end <= (unsigned long)__va(acpi_wakeup_address)) &&
++#endif
++
+ (start > (unsigned long)__va(0xfffff) || end <= (unsigned long)__va(0xc0000)))
+ return 0;
+ return 1;
}
/*
-@@ -246,9 +250,10 @@ kernel_physical_mapping_init(unsigned lo
+@@ -243,9 +243,10 @@ kernel_physical_mapping_init(unsigned lo
int use_pse = page_size_mask == (1<<PG_LEVEL_2M);
unsigned long start_pfn, end_pfn;
pgd_t *pgd_base = swapper_pg_dir;
@@ -14830,7 +15727,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
pmd_t *pmd;
pte_t *pte;
unsigned pages_2m, pages_4k;
-@@ -281,8 +286,13 @@ repeat:
+@@ -278,8 +279,13 @@ repeat:
pfn = start_pfn;
pgd_idx = pgd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET);
pgd = pgd_base + pgd_idx;
@@ -14846,7 +15743,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
if (pfn >= end_pfn)
continue;
-@@ -294,14 +304,13 @@ repeat:
+@@ -291,14 +297,13 @@ repeat:
#endif
for (; pmd_idx < PTRS_PER_PMD && pfn < end_pfn;
pmd++, pmd_idx++) {
@@ -14862,7 +15759,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
pgprot_t prot = PAGE_KERNEL_LARGE;
/*
* first pass will use the same initial
-@@ -311,11 +320,7 @@ repeat:
+@@ -308,11 +313,7 @@ repeat:
__pgprot(PTE_IDENT_ATTR |
_PAGE_PSE);
@@ -14875,7 +15772,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
prot = PAGE_KERNEL_LARGE_EXEC;
pages_2m++;
-@@ -332,7 +337,7 @@ repeat:
+@@ -329,7 +330,7 @@ repeat:
pte_ofs = pte_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET);
pte += pte_ofs;
for (; pte_ofs < PTRS_PER_PTE && pfn < end_pfn;
@@ -14884,7 +15781,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
pgprot_t prot = PAGE_KERNEL;
/*
* first pass will use the same initial
-@@ -340,7 +345,7 @@ repeat:
+@@ -337,7 +338,7 @@ repeat:
*/
pgprot_t init_prot = __pgprot(PTE_IDENT_ATTR);
@@ -14893,7 +15790,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
prot = PAGE_KERNEL_EXEC;
pages_4k++;
-@@ -492,7 +497,7 @@ void __init native_pagetable_setup_start
+@@ -489,7 +490,7 @@ void __init native_pagetable_setup_start
pud = pud_offset(pgd, va);
pmd = pmd_offset(pud, va);
@@ -14902,7 +15799,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
break;
pte = pte_offset_kernel(pmd, va);
-@@ -544,9 +549,7 @@ void __init early_ioremap_page_table_ran
+@@ -541,9 +542,7 @@ void __init early_ioremap_page_table_ran
static void __init pagetable_init(void)
{
@@ -14913,7 +15810,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
}
#ifdef CONFIG_ACPI_SLEEP
-@@ -554,12 +557,12 @@ static void __init pagetable_init(void)
+@@ -551,12 +550,12 @@ static void __init pagetable_init(void)
* ACPI suspend needs this for resume, because things like the intel-agp
* driver might have split up a kernel 4MB mapping.
*/
@@ -14928,127 +15825,52 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_32.c linux-2.6.30.8/arch/x86/mm/init_
}
#else /* !CONFIG_ACPI_SLEEP */
static inline void save_pg_dir(void)
-@@ -589,13 +592,11 @@ void zap_low_mappings(void)
-
- int nx_enabled;
+@@ -588,7 +587,7 @@ void zap_low_mappings(bool early)
+ flush_tlb_all();
+ }
-pteval_t __supported_pte_mask __read_mostly = ~(_PAGE_NX | _PAGE_GLOBAL | _PAGE_IOMAP);
+pteval_t __supported_pte_mask __read_only = ~(_PAGE_NX | _PAGE_GLOBAL | _PAGE_IOMAP);
EXPORT_SYMBOL_GPL(__supported_pte_mask);
- #ifdef CONFIG_X86_PAE
-
--static int disable_nx __initdata;
--
- /*
- * noexec = on|off
- *
-@@ -604,40 +605,33 @@ static int disable_nx __initdata;
- * on Enable
- * off Disable
- */
-+#if !defined(CONFIG_PAX_PAGEEXEC)
- static int __init noexec_setup(char *str)
- {
- if (!str || !strcmp(str, "on")) {
-- if (cpu_has_nx) {
-- __supported_pte_mask |= _PAGE_NX;
-- disable_nx = 0;
-- }
-+ if (cpu_has_nx)
-+ nx_enabled = 1;
- } else {
-- if (!strcmp(str, "off")) {
-- disable_nx = 1;
-- __supported_pte_mask &= ~_PAGE_NX;
-- } else {
-+ if (!strcmp(str, "off"))
-+ nx_enabled = 0;
-+ else
- return -EINVAL;
-- }
- }
-
- return 0;
- }
- early_param("noexec", noexec_setup);
-+#endif
-
- void __init set_nx(void)
- {
-- unsigned int v[4], l, h;
-+ if (!nx_enabled && cpu_has_nx) {
-+ unsigned l, h;
-
-- if (cpu_has_pae && (cpuid_eax(0x80000000) > 0x80000001)) {
-- cpuid(0x80000001, &v[0], &v[1], &v[2], &v[3]);
--
-- if ((v[3] & (1 << 20)) && !disable_nx) {
-- rdmsr(MSR_EFER, l, h);
-- l |= EFER_NX;
-- wrmsr(MSR_EFER, l, h);
-- nx_enabled = 1;
-- __supported_pte_mask |= _PAGE_NX;
-- }
-+ __supported_pte_mask &= ~_PAGE_NX;
-+ rdmsr(MSR_EFER, l, h);
-+ l &= ~EFER_NX;
-+ wrmsr(MSR_EFER, l, h);
- }
- }
- #endif
-@@ -934,7 +928,7 @@ void __init mem_init(void)
+ /* user-defined highmem size */
+@@ -883,7 +882,7 @@ void __init mem_init(void)
set_highmem_pages_init();
codesize = (unsigned long) &_etext - (unsigned long) &_text;
- datasize = (unsigned long) &_edata - (unsigned long) &_etext;
-+ datasize = (unsigned long) &_edata - (unsigned long) &_data;
++ datasize = (unsigned long) &_edata - (unsigned long) &_sdata;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
-@@ -980,10 +974,10 @@ void __init mem_init(void)
+@@ -929,10 +928,10 @@ void __init mem_init(void)
((unsigned long)&__init_end -
(unsigned long)&__init_begin) >> 10,
- (unsigned long)&_etext, (unsigned long)&_edata,
- ((unsigned long)&_edata - (unsigned long)&_etext) >> 10,
-+ (unsigned long)&_data, (unsigned long)&_edata,
-+ ((unsigned long)&_edata - (unsigned long)&_data) >> 10,
++ (unsigned long)&_sdata, (unsigned long)&_edata,
++ ((unsigned long)&_edata - (unsigned long)&_sdata) >> 10,
- (unsigned long)&_text, (unsigned long)&_etext,
+ ktla_ktva((unsigned long)&_text), ktla_ktva((unsigned long)&_etext),
((unsigned long)&_etext - (unsigned long)&_text) >> 10);
/*
-diff -urNp linux-2.6.30.8/arch/x86/mm/init_64.c linux-2.6.30.8/arch/x86/mm/init_64.c
---- linux-2.6.30.8/arch/x86/mm/init_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/init_64.c 2009-07-30 09:48:09.972413251 -0400
-@@ -202,12 +202,24 @@ void set_pte_vaddr_pud(pud_t *pud_page,
- pmd_t *pmd;
- pte_t *pte;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- pud = pud_page + pud_index(vaddr);
+diff -urNp linux-2.6.31.4/arch/x86/mm/init_64.c linux-2.6.31.4/arch/x86/mm/init_64.c
+--- linux-2.6.31.4/arch/x86/mm/init_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/init_64.c 2009-10-12 23:12:55.286158560 -0400
+@@ -163,7 +163,9 @@ void set_pte_vaddr_pud(pud_t *pud_page,
pmd = fill_pmd(pud, vaddr);
pte = fill_pte(pmd, vaddr);
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
set_pte(pte, new_pte);
++ pax_close_kernel();
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
/*
* It's enough to flush this one mapping.
- * (PGE mappings get flushed as well)
-@@ -265,14 +277,12 @@ static void __init __init_extra_mapping(
+@@ -222,14 +224,12 @@ static void __init __init_extra_mapping(
pgd = pgd_offset_k((unsigned long)__va(phys));
if (pgd_none(*pgd)) {
pud = (pud_t *) spp_getpage();
@@ -15065,7 +15887,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_64.c linux-2.6.30.8/arch/x86/mm/init_
}
pmd = pmd_offset(pud, phys);
BUG_ON(!pmd_none(*pmd));
-@@ -882,8 +892,8 @@ int kern_addr_valid(unsigned long addr)
+@@ -848,8 +848,8 @@ int kern_addr_valid(unsigned long addr)
static struct vm_area_struct gate_vma = {
.vm_start = VSYSCALL_START,
.vm_end = VSYSCALL_START + (VSYSCALL_MAPPED_PAGES * PAGE_SIZE),
@@ -15076,7 +15898,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_64.c linux-2.6.30.8/arch/x86/mm/init_
};
struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
-@@ -917,7 +927,7 @@ int in_gate_area_no_task(unsigned long a
+@@ -883,7 +883,7 @@ int in_gate_area_no_task(unsigned long a
const char *arch_vma_name(struct vm_area_struct *vma)
{
@@ -15085,10 +15907,75 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init_64.c linux-2.6.30.8/arch/x86/mm/init_
return "[vdso]";
if (vma == &gate_vma)
return "[vsyscall]";
-diff -urNp linux-2.6.30.8/arch/x86/mm/init.c linux-2.6.30.8/arch/x86/mm/init.c
---- linux-2.6.30.8/arch/x86/mm/init.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/init.c 2009-07-30 09:48:09.971412512 -0400
-@@ -348,7 +348,13 @@ unsigned long __init_refok init_memory_m
+diff -urNp linux-2.6.31.4/arch/x86/mm/init.c linux-2.6.31.4/arch/x86/mm/init.c
+--- linux-2.6.31.4/arch/x86/mm/init.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/init.c 2009-10-12 23:12:55.284949502 -0400
+@@ -28,11 +28,10 @@ int direct_gbpages
+ #endif
+ ;
+
++#if defined(CONFIG_X86_32) && defined(CONFIG_X86_PAE)
+ int nx_enabled;
+
+-#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
+-static int disable_nx __cpuinitdata;
+-
++#ifndef CONFIG_PAX_PAGEEXEC
+ /*
+ * noexec = on|off
+ *
+@@ -46,32 +45,26 @@ static int __init noexec_setup(char *str
+ if (!str)
+ return -EINVAL;
+ if (!strncmp(str, "on", 2)) {
+- __supported_pte_mask |= _PAGE_NX;
+- disable_nx = 0;
++ nx_enabled = 1;
+ } else if (!strncmp(str, "off", 3)) {
+- disable_nx = 1;
+- __supported_pte_mask &= ~_PAGE_NX;
++ nx_enabled = 0;
+ }
+ return 0;
+ }
+ early_param("noexec", noexec_setup);
+ #endif
++#endif
+
+ #ifdef CONFIG_X86_PAE
+ static void __init set_nx(void)
+ {
+- unsigned int v[4], l, h;
++ if (!nx_enabled && cpu_has_nx) {
++ unsigned l, h;
+
+- if (cpu_has_pae && (cpuid_eax(0x80000000) > 0x80000001)) {
+- cpuid(0x80000001, &v[0], &v[1], &v[2], &v[3]);
+-
+- if ((v[3] & (1 << 20)) && !disable_nx) {
+- rdmsr(MSR_EFER, l, h);
+- l |= EFER_NX;
+- wrmsr(MSR_EFER, l, h);
+- nx_enabled = 1;
+- __supported_pte_mask |= _PAGE_NX;
+- }
++ __supported_pte_mask &= ~_PAGE_NX;
++ rdmsr(MSR_EFER, l, h);
++ l &= ~EFER_NX;
++ wrmsr(MSR_EFER, l, h);
+ }
+ }
+ #else
+@@ -86,7 +79,7 @@ void __cpuinit check_efer(void)
+ unsigned long efer;
+
+ rdmsrl(MSR_EFER, efer);
+- if (!(efer & EFER_NX) || disable_nx)
++ if (!(efer & EFER_NX) || !nx_enabled)
+ __supported_pte_mask &= ~_PAGE_NX;
+ }
+ #endif
+@@ -394,7 +387,13 @@ unsigned long __init_refok init_memory_m
*/
int devmem_is_allowed(unsigned long pagenr)
{
@@ -15103,7 +15990,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init.c linux-2.6.30.8/arch/x86/mm/init.c
return 1;
if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
return 0;
-@@ -396,6 +402,75 @@ void free_init_pages(char *what, unsigne
+@@ -442,6 +441,73 @@ void free_init_pages(char *what, unsigne
void free_initmem(void)
{
@@ -15119,25 +16006,23 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init.c linux-2.6.30.8/arch/x86/mm/init.c
+ struct desc_struct d;
+ int cpu;
+
-+#ifdef CONFIG_MODULES
-+ limit = ktva_ktla((unsigned long)&MODULES_END);
-+#else
-+ limit = (unsigned long)&_etext;
-+#endif
++ limit = paravirt_enabled() ? ktva_ktla(0xffffffff) : (unsigned long)&_etext;
+ limit = (limit - 1UL) >> PAGE_SHIFT;
+
++ memset(__LOAD_PHYSICAL_ADDR + PAGE_OFFSET, POISON_FREE_INITMEM, PAGE_SIZE);
+ for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ pack_descriptor(&d, get_desc_base(&get_cpu_gdt_table(cpu)[GDT_ENTRY_KERNEL_CS]), limit, 0x9B, 0xC);
+ write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEL_CS, &d, DESCTYPE_S);
+ }
+
+ /* PaX: make KERNEL_CS read-only */
-+ for (addr = ktla_ktva((unsigned long)&_text); addr < (unsigned long)&_data; addr += PMD_SIZE) {
-+ pgd = pgd_offset_k(addr);
-+ pud = pud_offset(pgd, addr);
-+ pmd = pmd_offset(pud, addr);
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
-+ }
++ if (!paravirt_enabled())
++ for (addr = ktla_ktva((unsigned long)&_text); addr < (unsigned long)&_sdata; addr += PMD_SIZE) {
++ pgd = pgd_offset_k(addr);
++ pud = pud_offset(pgd, addr);
++ pmd = pmd_offset(pud, addr);
++ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
++ }
+#ifdef CONFIG_X86_PAE
+ for (addr = (unsigned long)&__init_begin; addr < (unsigned long)&__init_end; addr += PMD_SIZE) {
+ pgd = pgd_offset_k(addr);
@@ -15154,7 +16039,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init.c linux-2.6.30.8/arch/x86/mm/init.c
+ pgd = pgd_offset_k(addr);
+ pud = pud_offset(pgd, addr);
+ pmd = pmd_offset(pud, addr);
-+ if ((unsigned long)_text <= addr && addr < (unsigned long)_data)
++ if ((unsigned long)_text <= addr && addr < (unsigned long)_sdata)
+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
+ else
+ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
@@ -15166,7 +16051,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init.c linux-2.6.30.8/arch/x86/mm/init.c
+ pgd = pgd_offset_k(addr);
+ pud = pud_offset(pgd, addr);
+ pmd = pmd_offset(pud, addr);
-+ if ((unsigned long)__va(__pa(_text)) <= addr && addr < (unsigned long)__va(__pa(_data)))
++ if ((unsigned long)__va(__pa(_text)) <= addr && addr < (unsigned long)__va(__pa(_sdata)))
+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
+ else
+ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
@@ -15179,39 +16064,24 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/init.c linux-2.6.30.8/arch/x86/mm/init.c
free_init_pages("unused kernel memory",
(unsigned long)(&__init_begin),
(unsigned long)(&__init_end));
-diff -urNp linux-2.6.30.8/arch/x86/mm/iomap_32.c linux-2.6.30.8/arch/x86/mm/iomap_32.c
---- linux-2.6.30.8/arch/x86/mm/iomap_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/iomap_32.c 2009-07-30 09:48:09.973477350 -0400
-@@ -37,12 +37,26 @@ void *kmap_atomic_prot_pfn(unsigned long
- enum fixed_addresses idx;
- unsigned long vaddr;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- pagefault_disable();
-
+diff -urNp linux-2.6.31.4/arch/x86/mm/iomap_32.c linux-2.6.31.4/arch/x86/mm/iomap_32.c
+--- linux-2.6.31.4/arch/x86/mm/iomap_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/iomap_32.c 2009-10-12 23:12:55.287156226 -0400
+@@ -42,7 +42,11 @@ void *kmap_atomic_prot_pfn(unsigned long
debug_kmap_atomic(type);
idx = type + KM_TYPE_NR * smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
set_pte(kmap_pte - idx, pfn_pte(pfn, prot));
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
arch_flush_lazy_mmu_mode();
return (void *)vaddr;
-diff -urNp linux-2.6.30.8/arch/x86/mm/ioremap.c linux-2.6.30.8/arch/x86/mm/ioremap.c
---- linux-2.6.30.8/arch/x86/mm/ioremap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/ioremap.c 2009-09-05 22:09:36.204542208 -0400
+diff -urNp linux-2.6.31.4/arch/x86/mm/ioremap.c linux-2.6.31.4/arch/x86/mm/ioremap.c
+--- linux-2.6.31.4/arch/x86/mm/ioremap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/ioremap.c 2009-10-11 15:29:41.151107138 -0400
@@ -111,8 +111,8 @@ int page_is_ram(unsigned long pagenr)
* Second special case: Some BIOSen report the PC BIOS
* area (640->1Mb) as ram even though it is not.
@@ -15263,19 +16133,19 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/ioremap.c linux-2.6.30.8/arch/x86/mm/iorem
/*
* The boot-ioremap range spans multiple pmds, for which
-diff -urNp linux-2.6.30.8/arch/x86/mm/mmap.c linux-2.6.30.8/arch/x86/mm/mmap.c
---- linux-2.6.30.8/arch/x86/mm/mmap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/mmap.c 2009-07-30 09:48:09.973477350 -0400
-@@ -36,7 +36,7 @@
- * Leave an at least ~128 MB hole.
+diff -urNp linux-2.6.31.4/arch/x86/mm/mmap.c linux-2.6.31.4/arch/x86/mm/mmap.c
+--- linux-2.6.31.4/arch/x86/mm/mmap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/mmap.c 2009-10-11 15:29:41.151107138 -0400
+@@ -49,7 +49,7 @@ static unsigned int stack_maxrandom_size
+ * Leave an at least ~128 MB hole with possible stack randomization.
*/
- #define MIN_GAP (128*1024*1024)
+ #define MIN_GAP (128*1024*1024UL + stack_maxrandom_size())
-#define MAX_GAP (TASK_SIZE/6*5)
+#define MAX_GAP (pax_task_size/6*5)
/*
* True on X86_32 or when emulating IA32 on X86_64
-@@ -81,27 +81,40 @@ static unsigned long mmap_rnd(void)
+@@ -94,27 +94,40 @@ static unsigned long mmap_rnd(void)
return rnd << PAGE_SHIFT;
}
@@ -15321,7 +16191,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/mmap.c linux-2.6.30.8/arch/x86/mm/mmap.c
return TASK_UNMAPPED_BASE + mmap_rnd();
}
-@@ -112,11 +125,23 @@ static unsigned long mmap_legacy_base(vo
+@@ -125,11 +138,23 @@ static unsigned long mmap_legacy_base(vo
void arch_pick_mmap_layout(struct mm_struct *mm)
{
if (mmap_is_legacy()) {
@@ -15347,9 +16217,9 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/mmap.c linux-2.6.30.8/arch/x86/mm/mmap.c
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.30.8/arch/x86/mm/numa_32.c linux-2.6.30.8/arch/x86/mm/numa_32.c
---- linux-2.6.30.8/arch/x86/mm/numa_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/numa_32.c 2009-07-30 09:48:09.974436034 -0400
+diff -urNp linux-2.6.31.4/arch/x86/mm/numa_32.c linux-2.6.31.4/arch/x86/mm/numa_32.c
+--- linux-2.6.31.4/arch/x86/mm/numa_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/numa_32.c 2009-10-11 15:29:41.151107138 -0400
@@ -98,7 +98,6 @@ unsigned long node_memmap_size_bytes(int
}
#endif
@@ -15358,18 +16228,10 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/numa_32.c linux-2.6.30.8/arch/x86/mm/numa_
extern unsigned long highend_pfn, highstart_pfn;
#define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE)
-diff -urNp linux-2.6.30.8/arch/x86/mm/pageattr.c linux-2.6.30.8/arch/x86/mm/pageattr.c
---- linux-2.6.30.8/arch/x86/mm/pageattr.c 2009-09-26 23:07:15.439264843 -0400
-+++ linux-2.6.30.8/arch/x86/mm/pageattr.c 2009-09-26 23:07:26.531376457 -0400
-@@ -21,6 +21,7 @@
- #include <asm/pgalloc.h>
- #include <asm/proto.h>
- #include <asm/pat.h>
-+#include <asm/desc.h>
-
- /*
- * The current flushing context - we pass it instead of 5 arguments:
-@@ -265,9 +266,10 @@ static inline pgprot_t static_protection
+diff -urNp linux-2.6.31.4/arch/x86/mm/pageattr.c linux-2.6.31.4/arch/x86/mm/pageattr.c
+--- linux-2.6.31.4/arch/x86/mm/pageattr.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/pageattr.c 2009-10-18 10:09:07.072973187 -0400
+@@ -267,9 +267,10 @@ static inline pgprot_t static_protection
* Does not cover __inittext since that is gone later on. On
* 64bit we do not enforce !NX on the low mapping
*/
@@ -15381,7 +16243,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/pageattr.c linux-2.6.30.8/arch/x86/mm/page
/*
* The .rodata section needs to be read-only. Using the pfn
* catches all aliases.
-@@ -275,6 +277,7 @@ static inline pgprot_t static_protection
+@@ -277,6 +278,7 @@ static inline pgprot_t static_protection
if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT,
__pa((unsigned long)__end_rodata) >> PAGE_SHIFT))
pgprot_val(forbidden) |= _PAGE_RW;
@@ -15389,30 +16251,20 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/pageattr.c linux-2.6.30.8/arch/x86/mm/page
prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
-@@ -327,8 +330,20 @@ EXPORT_SYMBOL_GPL(lookup_address);
- */
+@@ -330,7 +332,10 @@ EXPORT_SYMBOL_GPL(lookup_address);
static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
{
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+#endif
-+
/* change init_mm */
++ pax_open_kernel();
set_pte_atomic(kpte, pte);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
#ifdef CONFIG_X86_32
if (!SHARED_KERNEL_PMD) {
struct page *page;
-diff -urNp linux-2.6.30.8/arch/x86/mm/pageattr-test.c linux-2.6.30.8/arch/x86/mm/pageattr-test.c
---- linux-2.6.30.8/arch/x86/mm/pageattr-test.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/pageattr-test.c 2009-07-30 09:48:09.974436034 -0400
+diff -urNp linux-2.6.31.4/arch/x86/mm/pageattr-test.c linux-2.6.31.4/arch/x86/mm/pageattr-test.c
+--- linux-2.6.31.4/arch/x86/mm/pageattr-test.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/pageattr-test.c 2009-10-11 15:29:41.152322234 -0400
@@ -36,7 +36,7 @@ enum {
static int pte_testbit(pte_t pte)
@@ -15422,9 +16274,9 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/pageattr-test.c linux-2.6.30.8/arch/x86/mm
}
struct split_state {
-diff -urNp linux-2.6.30.8/arch/x86/mm/pat.c linux-2.6.30.8/arch/x86/mm/pat.c
---- linux-2.6.30.8/arch/x86/mm/pat.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/pat.c 2009-07-30 09:48:09.975412278 -0400
+diff -urNp linux-2.6.31.4/arch/x86/mm/pat.c linux-2.6.31.4/arch/x86/mm/pat.c
+--- linux-2.6.31.4/arch/x86/mm/pat.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/pat.c 2009-10-11 15:29:41.152322234 -0400
@@ -213,7 +213,7 @@ chk_conflict(struct memtype *new, struct
conflict:
@@ -15452,7 +16304,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/pat.c linux-2.6.30.8/arch/x86/mm/pat.c
cattr_name(flags),
base, (unsigned long long)(base + size));
return -EINVAL;
-@@ -627,7 +627,7 @@ static int reserve_pfn_range(u64 paddr,
+@@ -628,7 +628,7 @@ static int reserve_pfn_range(u64 paddr,
free_memtype(paddr, paddr + size);
printk(KERN_ERR "%s:%d map pfn expected mapping type %s"
" for %Lx-%Lx, got %s\n",
@@ -15461,7 +16313,7 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/pat.c linux-2.6.30.8/arch/x86/mm/pat.c
cattr_name(want_flags),
(unsigned long long)paddr,
(unsigned long long)(paddr + size),
-@@ -826,7 +826,7 @@ static int memtype_seq_show(struct seq_f
+@@ -827,7 +827,7 @@ static int memtype_seq_show(struct seq_f
return 0;
}
@@ -15470,44 +16322,26 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/pat.c linux-2.6.30.8/arch/x86/mm/pat.c
.start = memtype_seq_start,
.next = memtype_seq_next,
.stop = memtype_seq_stop,
-diff -urNp linux-2.6.30.8/arch/x86/mm/pgtable_32.c linux-2.6.30.8/arch/x86/mm/pgtable_32.c
---- linux-2.6.30.8/arch/x86/mm/pgtable_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/mm/pgtable_32.c 2009-07-30 09:48:09.975412278 -0400
-@@ -33,6 +33,10 @@ void set_pte_vaddr(unsigned long vaddr,
- pmd_t *pmd;
- pte_t *pte;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- pgd = swapper_pg_dir + pgd_index(vaddr);
- if (pgd_none(*pgd)) {
- BUG();
-@@ -49,11 +53,20 @@ void set_pte_vaddr(unsigned long vaddr,
+diff -urNp linux-2.6.31.4/arch/x86/mm/pgtable_32.c linux-2.6.31.4/arch/x86/mm/pgtable_32.c
+--- linux-2.6.31.4/arch/x86/mm/pgtable_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/pgtable_32.c 2009-10-12 23:12:55.288178434 -0400
+@@ -49,10 +49,13 @@ void set_pte_vaddr(unsigned long vaddr,
return;
}
pte = pte_offset_kernel(pmd, vaddr);
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
if (pte_val(pteval))
set_pte_at(&init_mm, vaddr, pte, pteval);
else
pte_clear(&init_mm, vaddr, pte);
++ pax_close_kernel();
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
/*
* It's enough to flush this one mapping.
- * (PGE mappings get flushed as well)
-diff -urNp linux-2.6.30.8/arch/x86/mm/tlb.c linux-2.6.30.8/arch/x86/mm/tlb.c
---- linux-2.6.30.8/arch/x86/mm/tlb.c 2009-09-09 17:37:32.711109397 -0400
-+++ linux-2.6.30.8/arch/x86/mm/tlb.c 2009-09-09 17:37:50.225398241 -0400
+diff -urNp linux-2.6.31.4/arch/x86/mm/tlb.c linux-2.6.31.4/arch/x86/mm/tlb.c
+--- linux-2.6.31.4/arch/x86/mm/tlb.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/mm/tlb.c 2009-10-11 15:29:41.153221557 -0400
@@ -12,7 +12,7 @@
#include <asm/uv/uv.h>
@@ -15517,9 +16351,9 @@ diff -urNp linux-2.6.30.8/arch/x86/mm/tlb.c linux-2.6.30.8/arch/x86/mm/tlb.c
/*
* Smarter SMP flushing macros.
-diff -urNp linux-2.6.30.8/arch/x86/oprofile/backtrace.c linux-2.6.30.8/arch/x86/oprofile/backtrace.c
---- linux-2.6.30.8/arch/x86/oprofile/backtrace.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/oprofile/backtrace.c 2009-07-30 09:48:09.975412278 -0400
+diff -urNp linux-2.6.31.4/arch/x86/oprofile/backtrace.c linux-2.6.31.4/arch/x86/oprofile/backtrace.c
+--- linux-2.6.31.4/arch/x86/oprofile/backtrace.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/oprofile/backtrace.c 2009-10-11 15:29:41.153221557 -0400
@@ -37,7 +37,7 @@ static void backtrace_address(void *data
unsigned int *depth = data;
@@ -15538,9 +16372,9 @@ diff -urNp linux-2.6.30.8/arch/x86/oprofile/backtrace.c linux-2.6.30.8/arch/x86/
unsigned long stack = kernel_stack_pointer(regs);
if (depth)
dump_trace(NULL, regs, (unsigned long *)stack, 0,
-diff -urNp linux-2.6.30.8/arch/x86/oprofile/op_model_p4.c linux-2.6.30.8/arch/x86/oprofile/op_model_p4.c
---- linux-2.6.30.8/arch/x86/oprofile/op_model_p4.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/oprofile/op_model_p4.c 2009-07-30 09:48:09.976413155 -0400
+diff -urNp linux-2.6.31.4/arch/x86/oprofile/op_model_p4.c linux-2.6.31.4/arch/x86/oprofile/op_model_p4.c
+--- linux-2.6.31.4/arch/x86/oprofile/op_model_p4.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/oprofile/op_model_p4.c 2009-10-11 15:29:41.153221557 -0400
@@ -48,7 +48,7 @@ static inline void setup_num_counters(vo
#endif
}
@@ -15550,9 +16384,20 @@ diff -urNp linux-2.6.30.8/arch/x86/oprofile/op_model_p4.c linux-2.6.30.8/arch/x8
{
#ifdef CONFIG_SMP
return smp_num_siblings == 2 ? 2 : 1;
-diff -urNp linux-2.6.30.8/arch/x86/pci/common.c linux-2.6.30.8/arch/x86/pci/common.c
---- linux-2.6.30.8/arch/x86/pci/common.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/pci/common.c 2009-07-30 09:48:09.976413155 -0400
+diff -urNp linux-2.6.31.4/arch/x86/pci/common.c linux-2.6.31.4/arch/x86/pci/common.c
+--- linux-2.6.31.4/arch/x86/pci/common.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/common.c 2009-10-11 15:29:56.560399027 -0400
+@@ -31,8 +31,8 @@ int noioapicreroute = 1;
+ int pcibios_last_bus = -1;
+ unsigned long pirq_table_addr;
+ struct pci_bus *pci_root_bus;
+-struct pci_raw_ops *raw_pci_ops;
+-struct pci_raw_ops *raw_pci_ext_ops;
++const struct pci_raw_ops *raw_pci_ops;
++const struct pci_raw_ops *raw_pci_ext_ops;
+
+ int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
+ int reg, int len, u32 *val)
@@ -370,7 +370,7 @@ static const struct dmi_system_id __devi
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"),
},
@@ -15562,9 +16407,39 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/common.c linux-2.6.30.8/arch/x86/pci/comm
};
void __init dmi_check_pciprobe(void)
-diff -urNp linux-2.6.30.8/arch/x86/pci/fixup.c linux-2.6.30.8/arch/x86/pci/fixup.c
---- linux-2.6.30.8/arch/x86/pci/fixup.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/pci/fixup.c 2009-07-30 09:48:09.976413155 -0400
+diff -urNp linux-2.6.31.4/arch/x86/pci/direct.c linux-2.6.31.4/arch/x86/pci/direct.c
+--- linux-2.6.31.4/arch/x86/pci/direct.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/direct.c 2009-10-11 15:29:56.566751102 -0400
+@@ -79,7 +79,7 @@ static int pci_conf1_write(unsigned int
+
+ #undef PCI_CONF1_ADDRESS
+
+-struct pci_raw_ops pci_direct_conf1 = {
++const struct pci_raw_ops pci_direct_conf1 = {
+ .read = pci_conf1_read,
+ .write = pci_conf1_write,
+ };
+@@ -173,7 +173,7 @@ static int pci_conf2_write(unsigned int
+
+ #undef PCI_CONF2_ADDRESS
+
+-struct pci_raw_ops pci_direct_conf2 = {
++const struct pci_raw_ops pci_direct_conf2 = {
+ .read = pci_conf2_read,
+ .write = pci_conf2_write,
+ };
+@@ -189,7 +189,7 @@ struct pci_raw_ops pci_direct_conf2 = {
+ * This should be close to trivial, but it isn't, because there are buggy
+ * chipsets (yes, you guessed it, by Intel and Compaq) that have no class ID.
+ */
+-static int __init pci_sanity_check(struct pci_raw_ops *o)
++static int __init pci_sanity_check(const struct pci_raw_ops *o)
+ {
+ u32 x = 0;
+ int devfn;
+diff -urNp linux-2.6.31.4/arch/x86/pci/fixup.c linux-2.6.31.4/arch/x86/pci/fixup.c
+--- linux-2.6.31.4/arch/x86/pci/fixup.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/fixup.c 2009-10-11 15:29:41.154278402 -0400
@@ -364,7 +364,7 @@ static const struct dmi_system_id __devi
DMI_MATCH(DMI_PRODUCT_NAME, "MS-6702E"),
},
@@ -15583,10 +16458,10 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/fixup.c linux-2.6.30.8/arch/x86/pci/fixup
};
static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev)
-diff -urNp linux-2.6.30.8/arch/x86/pci/i386.c linux-2.6.30.8/arch/x86/pci/i386.c
---- linux-2.6.30.8/arch/x86/pci/i386.c 2009-07-30 20:32:40.384629006 -0400
-+++ linux-2.6.30.8/arch/x86/pci/i386.c 2009-07-30 20:32:47.941604516 -0400
-@@ -269,7 +269,7 @@ void pcibios_set_master(struct pci_dev *
+diff -urNp linux-2.6.31.4/arch/x86/pci/i386.c linux-2.6.31.4/arch/x86/pci/i386.c
+--- linux-2.6.31.4/arch/x86/pci/i386.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/i386.c 2009-10-11 15:29:41.154278402 -0400
+@@ -266,7 +266,7 @@ void pcibios_set_master(struct pci_dev *
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}
@@ -15595,9 +16470,9 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/i386.c linux-2.6.30.8/arch/x86/pci/i386.c
.access = generic_access_phys,
};
-diff -urNp linux-2.6.30.8/arch/x86/pci/irq.c linux-2.6.30.8/arch/x86/pci/irq.c
---- linux-2.6.30.8/arch/x86/pci/irq.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/pci/irq.c 2009-07-30 09:48:09.976413155 -0400
+diff -urNp linux-2.6.31.4/arch/x86/pci/irq.c linux-2.6.31.4/arch/x86/pci/irq.c
+--- linux-2.6.31.4/arch/x86/pci/irq.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/irq.c 2009-10-11 15:29:41.154278402 -0400
@@ -543,7 +543,7 @@ static __init int intel_router_probe(str
static struct pci_device_id __initdata pirq_440gx[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0) },
@@ -15607,7 +16482,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/irq.c linux-2.6.30.8/arch/x86/pci/irq.c
};
/* 440GX has a proprietary PIRQ router -- don't use it */
-@@ -1145,7 +1145,7 @@ static struct dmi_system_id __initdata p
+@@ -1107,7 +1107,7 @@ static struct dmi_system_id __initdata p
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
},
},
@@ -15616,10 +16491,58 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/irq.c linux-2.6.30.8/arch/x86/pci/irq.c
};
int __init pcibios_irq_init(void)
-diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbios.c
---- linux-2.6.30.8/arch/x86/pci/pcbios.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/pci/pcbios.c 2009-07-30 09:48:09.976413155 -0400
-@@ -56,50 +56,120 @@ union bios32 {
+diff -urNp linux-2.6.31.4/arch/x86/pci/mmconfig_32.c linux-2.6.31.4/arch/x86/pci/mmconfig_32.c
+--- linux-2.6.31.4/arch/x86/pci/mmconfig_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/mmconfig_32.c 2009-10-11 15:29:56.567716338 -0400
+@@ -125,7 +125,7 @@ static int pci_mmcfg_write(unsigned int
+ return 0;
+ }
+
+-static struct pci_raw_ops pci_mmcfg = {
++static const struct pci_raw_ops pci_mmcfg = {
+ .read = pci_mmcfg_read,
+ .write = pci_mmcfg_write,
+ };
+diff -urNp linux-2.6.31.4/arch/x86/pci/mmconfig_64.c linux-2.6.31.4/arch/x86/pci/mmconfig_64.c
+--- linux-2.6.31.4/arch/x86/pci/mmconfig_64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/mmconfig_64.c 2009-10-11 15:29:56.567716338 -0400
+@@ -104,7 +104,7 @@ static int pci_mmcfg_write(unsigned int
+ return 0;
+ }
+
+-static struct pci_raw_ops pci_mmcfg = {
++static const struct pci_raw_ops pci_mmcfg = {
+ .read = pci_mmcfg_read,
+ .write = pci_mmcfg_write,
+ };
+diff -urNp linux-2.6.31.4/arch/x86/pci/numaq_32.c linux-2.6.31.4/arch/x86/pci/numaq_32.c
+--- linux-2.6.31.4/arch/x86/pci/numaq_32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/numaq_32.c 2009-10-11 15:29:56.567716338 -0400
+@@ -112,7 +112,7 @@ static int pci_conf1_mq_write(unsigned i
+
+ #undef PCI_CONF1_MQ_ADDRESS
+
+-static struct pci_raw_ops pci_direct_conf1_mq = {
++static const struct pci_raw_ops pci_direct_conf1_mq = {
+ .read = pci_conf1_mq_read,
+ .write = pci_conf1_mq_write
+ };
+diff -urNp linux-2.6.31.4/arch/x86/pci/olpc.c linux-2.6.31.4/arch/x86/pci/olpc.c
+--- linux-2.6.31.4/arch/x86/pci/olpc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/olpc.c 2009-10-11 15:29:56.567716338 -0400
+@@ -297,7 +297,7 @@ static int pci_olpc_write(unsigned int s
+ return 0;
+ }
+
+-static struct pci_raw_ops pci_olpc_conf = {
++static const struct pci_raw_ops pci_olpc_conf = {
+ .read = pci_olpc_read,
+ .write = pci_olpc_write,
+ };
+diff -urNp linux-2.6.31.4/arch/x86/pci/pcbios.c linux-2.6.31.4/arch/x86/pci/pcbios.c
+--- linux-2.6.31.4/arch/x86/pci/pcbios.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/pci/pcbios.c 2009-10-12 23:12:55.295312661 -0400
+@@ -56,50 +56,93 @@ union bios32 {
static struct {
unsigned long address;
unsigned short segment;
@@ -15639,29 +16562,17 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
unsigned long entry; /* %edx */
unsigned long flags;
+ struct desc_struct d, *gdt;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
local_irq_save(flags);
- __asm__("lcall *(%%edi); cld"
+
+ gdt = get_cpu_gdt_table(smp_processor_id());
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
+ pack_descriptor(&d, 0UL, 0xFFFFFUL, 0x9B, 0xC);
+ write_gdt_entry(gdt, GDT_ENTRY_PCIBIOS_CS, &d, DESCTYPE_S);
+ pack_descriptor(&d, 0UL, 0xFFFFFUL, 0x93, 0xC);
+ write_gdt_entry(gdt, GDT_ENTRY_PCIBIOS_DS, &d, DESCTYPE_S);
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
+ __asm__("movw %w7, %%ds; lcall *(%%edi); push %%ss; pop %%ds; cld"
: "=a" (return_code),
"=b" (address),
@@ -15674,18 +16585,12 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
+ "r"(__PCIBIOS_DS)
+ : "memory");
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
+ gdt[GDT_ENTRY_PCIBIOS_CS].a = 0;
+ gdt[GDT_ENTRY_PCIBIOS_CS].b = 0;
+ gdt[GDT_ENTRY_PCIBIOS_DS].a = 0;
+ gdt[GDT_ENTRY_PCIBIOS_DS].b = 0;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
local_irq_restore(flags);
@@ -15715,10 +16620,6 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
+ flags |= 8;
+ }
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
+ for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ gdt = get_cpu_gdt_table(cpu);
+ pack_descriptor(&d, address, length, 0x9b, flags);
@@ -15726,11 +16627,6 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
+ pack_descriptor(&d, address, length, 0x93, flags);
+ write_gdt_entry(gdt, GDT_ENTRY_PCIBIOS_DS, &d, DESCTYPE_S);
+ }
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
+ return entry;
+ }
+ case 0x80: /* Not present */
@@ -15754,7 +16650,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
static int __devinit check_pcibios(void)
{
-@@ -108,11 +178,13 @@ static int __devinit check_pcibios(void)
+@@ -108,11 +151,13 @@ static int __devinit check_pcibios(void)
unsigned long flags, pcibios_entry;
if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
@@ -15771,7 +16667,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -121,7 +193,8 @@ static int __devinit check_pcibios(void)
+@@ -121,7 +166,8 @@ static int __devinit check_pcibios(void)
"=b" (ebx),
"=c" (ecx)
: "1" (PCIBIOS_PCI_BIOS_PRESENT),
@@ -15781,7 +16677,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
: "memory");
local_irq_restore(flags);
-@@ -165,7 +238,10 @@ static int pci_bios_read(unsigned int se
+@@ -165,7 +211,10 @@ static int pci_bios_read(unsigned int se
switch (len) {
case 1:
@@ -15793,7 +16689,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -174,7 +250,8 @@ static int pci_bios_read(unsigned int se
+@@ -174,7 +223,8 @@ static int pci_bios_read(unsigned int se
: "1" (PCIBIOS_READ_CONFIG_BYTE),
"b" (bx),
"D" ((long)reg),
@@ -15803,7 +16699,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
/*
* Zero-extend the result beyond 8 bits, do not trust the
* BIOS having done it:
-@@ -182,7 +259,10 @@ static int pci_bios_read(unsigned int se
+@@ -182,7 +232,10 @@ static int pci_bios_read(unsigned int se
*value &= 0xff;
break;
case 2:
@@ -15815,7 +16711,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -191,7 +271,8 @@ static int pci_bios_read(unsigned int se
+@@ -191,7 +244,8 @@ static int pci_bios_read(unsigned int se
: "1" (PCIBIOS_READ_CONFIG_WORD),
"b" (bx),
"D" ((long)reg),
@@ -15825,7 +16721,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
/*
* Zero-extend the result beyond 16 bits, do not trust the
* BIOS having done it:
-@@ -199,7 +280,10 @@ static int pci_bios_read(unsigned int se
+@@ -199,7 +253,10 @@ static int pci_bios_read(unsigned int se
*value &= 0xffff;
break;
case 4:
@@ -15837,7 +16733,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -208,7 +292,8 @@ static int pci_bios_read(unsigned int se
+@@ -208,7 +265,8 @@ static int pci_bios_read(unsigned int se
: "1" (PCIBIOS_READ_CONFIG_DWORD),
"b" (bx),
"D" ((long)reg),
@@ -15847,7 +16743,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
break;
}
-@@ -231,7 +316,10 @@ static int pci_bios_write(unsigned int s
+@@ -231,7 +289,10 @@ static int pci_bios_write(unsigned int s
switch (len) {
case 1:
@@ -15859,7 +16755,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -240,10 +328,14 @@ static int pci_bios_write(unsigned int s
+@@ -240,10 +301,14 @@ static int pci_bios_write(unsigned int s
"c" (value),
"b" (bx),
"D" ((long)reg),
@@ -15876,7 +16772,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -252,10 +344,14 @@ static int pci_bios_write(unsigned int s
+@@ -252,10 +317,14 @@ static int pci_bios_write(unsigned int s
"c" (value),
"b" (bx),
"D" ((long)reg),
@@ -15893,7 +16789,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -264,7 +360,8 @@ static int pci_bios_write(unsigned int s
+@@ -264,7 +333,8 @@ static int pci_bios_write(unsigned int s
"c" (value),
"b" (bx),
"D" ((long)reg),
@@ -15903,7 +16799,25 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
break;
}
-@@ -368,10 +465,13 @@ struct irq_routing_table * pcibios_get_i
+@@ -278,7 +348,7 @@ static int pci_bios_write(unsigned int s
+ * Function table for BIOS32 access
+ */
+
+-static struct pci_raw_ops pci_bios_access = {
++static const struct pci_raw_ops pci_bios_access = {
+ .read = pci_bios_read,
+ .write = pci_bios_write
+ };
+@@ -287,7 +357,7 @@ static struct pci_raw_ops pci_bios_acces
+ * Try to find PCI BIOS.
+ */
+
+-static struct pci_raw_ops * __devinit pci_find_bios(void)
++static const struct pci_raw_ops * __devinit pci_find_bios(void)
+ {
+ union bios32 *check;
+ unsigned char sum;
+@@ -368,10 +438,13 @@ struct irq_routing_table * pcibios_get_i
DBG("PCI: Fetching IRQ routing table... ");
__asm__("push %%es\n\t"
@@ -15918,7 +16832,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -382,7 +482,8 @@ struct irq_routing_table * pcibios_get_i
+@@ -382,7 +455,8 @@ struct irq_routing_table * pcibios_get_i
"1" (0),
"D" ((long) &opt),
"S" (&pci_indirect),
@@ -15928,7 +16842,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
: "memory");
DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map);
if (ret & 0xff00)
-@@ -406,7 +507,10 @@ int pcibios_set_irq_routing(struct pci_d
+@@ -406,7 +480,10 @@ int pcibios_set_irq_routing(struct pci_d
{
int ret;
@@ -15940,7 +16854,7 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -414,7 +518,8 @@ int pcibios_set_irq_routing(struct pci_d
+@@ -414,7 +491,8 @@ int pcibios_set_irq_routing(struct pci_d
: "0" (PCIBIOS_SET_PCI_HW_INT),
"b" ((dev->bus->number << 8) | dev->devfn),
"c" ((irq << 8) | (pin + 10)),
@@ -15950,10 +16864,10 @@ diff -urNp linux-2.6.30.8/arch/x86/pci/pcbios.c linux-2.6.30.8/arch/x86/pci/pcbi
return !(ret & 0xff00);
}
EXPORT_SYMBOL(pcibios_set_irq_routing);
-diff -urNp linux-2.6.30.8/arch/x86/power/cpu_32.c linux-2.6.30.8/arch/x86/power/cpu_32.c
---- linux-2.6.30.8/arch/x86/power/cpu_32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/power/cpu_32.c 2009-07-30 09:48:09.976413155 -0400
-@@ -68,7 +68,7 @@ static void do_fpu_end(void)
+diff -urNp linux-2.6.31.4/arch/x86/power/cpu.c linux-2.6.31.4/arch/x86/power/cpu.c
+--- linux-2.6.31.4/arch/x86/power/cpu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/power/cpu.c 2009-10-12 23:12:55.296056556 -0400
+@@ -126,7 +126,7 @@ static void do_fpu_end(void)
static void fix_processor_context(void)
{
int cpu = smp_processor_id();
@@ -15962,54 +16876,31 @@ diff -urNp linux-2.6.30.8/arch/x86/power/cpu_32.c linux-2.6.30.8/arch/x86/power/
set_tss_desc(cpu, t); /*
* This just modifies memory; should not be
-diff -urNp linux-2.6.30.8/arch/x86/power/cpu_64.c linux-2.6.30.8/arch/x86/power/cpu_64.c
---- linux-2.6.30.8/arch/x86/power/cpu_64.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/power/cpu_64.c 2009-07-30 09:48:09.978339754 -0400
-@@ -144,7 +144,11 @@ void restore_processor_state(void)
- static void fix_processor_context(void)
- {
- int cpu = smp_processor_id();
-- struct tss_struct *t = &per_cpu(init_tss, cpu);
-+ struct tss_struct *t = init_tss + cpu;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-
- /*
- * This just modifies memory; should not be necessary. But... This
-@@ -153,8 +157,16 @@ static void fix_processor_context(void)
- */
- set_tss_desc(cpu, t);
+@@ -136,7 +136,9 @@ static void fix_processor_context(void)
+ */
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
+ #ifdef CONFIG_X86_64
++ pax_open_kernel();
get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS].type = 9;
++ pax_close_kernel();
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
- syscall_init(); /* This sets MSR_*STAR and related */
- load_TR_desc(); /* This does ltr */
- load_LDT(&current->active_mm->context); /* This does lldt */
-diff -urNp linux-2.6.30.8/arch/x86/vdso/Makefile linux-2.6.30.8/arch/x86/vdso/Makefile
---- linux-2.6.30.8/arch/x86/vdso/Makefile 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/vdso/Makefile 2009-07-30 09:48:09.978339754 -0400
+ syscall_init(); /* This sets MSR_*STAR and related */
+ #endif
+diff -urNp linux-2.6.31.4/arch/x86/vdso/Makefile linux-2.6.31.4/arch/x86/vdso/Makefile
+--- linux-2.6.31.4/arch/x86/vdso/Makefile 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/vdso/Makefile 2009-10-11 15:29:41.155221953 -0400
@@ -122,7 +122,7 @@ quiet_cmd_vdso = VDSO $@
$(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
-Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
-VDSO_LDFLAGS = -fPIC -shared $(call ld-option, -Wl$(comma)--hash-style=sysv)
+VDSO_LDFLAGS = -fPIC -shared --no-undefined $(call ld-option, -Wl$(comma)--hash-style=sysv)
+ GCOV_PROFILE := n
#
- # Install the unstripped copy of vdso*.so listed in $(vdso-install-y).
-diff -urNp linux-2.6.30.8/arch/x86/vdso/vclock_gettime.c linux-2.6.30.8/arch/x86/vdso/vclock_gettime.c
---- linux-2.6.30.8/arch/x86/vdso/vclock_gettime.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/vdso/vclock_gettime.c 2009-08-05 19:15:53.673598242 -0400
+diff -urNp linux-2.6.31.4/arch/x86/vdso/vclock_gettime.c linux-2.6.31.4/arch/x86/vdso/vclock_gettime.c
+--- linux-2.6.31.4/arch/x86/vdso/vclock_gettime.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/vdso/vclock_gettime.c 2009-10-11 15:29:41.156287758 -0400
@@ -22,24 +22,48 @@
#include <asm/hpet.h>
#include <asm/unistd.h>
@@ -16108,10 +16999,18 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vclock_gettime.c linux-2.6.30.8/arch/x86
}
int gettimeofday(struct timeval *, struct timezone *)
__attribute__((weak, alias("__vdso_gettimeofday")));
-diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c
---- linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c 2009-07-30 09:48:09.979439324 -0400
-@@ -226,7 +226,7 @@ static inline void map_compat_vdso(int m
+diff -urNp linux-2.6.31.4/arch/x86/vdso/vdso32-setup.c linux-2.6.31.4/arch/x86/vdso/vdso32-setup.c
+--- linux-2.6.31.4/arch/x86/vdso/vdso32-setup.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/vdso/vdso32-setup.c 2009-10-11 15:29:41.156287758 -0400
+@@ -25,6 +25,7 @@
+ #include <asm/tlbflush.h>
+ #include <asm/vdso.h>
+ #include <asm/proto.h>
++#include <asm/mman.h>
+
+ enum {
+ VDSO_DISABLED = 0,
+@@ -226,7 +227,7 @@ static inline void map_compat_vdso(int m
void enable_sep_cpu(void)
{
int cpu = get_cpu();
@@ -16120,7 +17019,7 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c linux-2.6.30.8/arch/x86/v
if (!boot_cpu_has(X86_FEATURE_SEP)) {
put_cpu();
-@@ -249,7 +249,7 @@ static int __init gate_vma_init(void)
+@@ -249,7 +250,7 @@ static int __init gate_vma_init(void)
gate_vma.vm_start = FIXADDR_USER_START;
gate_vma.vm_end = FIXADDR_USER_END;
gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
@@ -16129,7 +17028,7 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c linux-2.6.30.8/arch/x86/v
/*
* Make sure the vDSO gets into every core dump.
* Dumping its contents makes post-mortem fully interpretable later
-@@ -331,7 +331,7 @@ int arch_setup_additional_pages(struct l
+@@ -331,14 +332,14 @@ int arch_setup_additional_pages(struct l
if (compat)
addr = VDSO_HIGH_BASE;
else {
@@ -16138,16 +17037,24 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c linux-2.6.30.8/arch/x86/v
if (IS_ERR_VALUE(addr)) {
ret = addr;
goto up_fail;
-@@ -358,7 +358,7 @@ int arch_setup_additional_pages(struct l
- goto up_fail;
+ }
}
- current->mm->context.vdso = (void *)addr;
+ current->mm->context.vdso = addr;
- current_thread_info()->sysenter_return =
- VDSO32_SYMBOL(addr, SYSENTER_RETURN);
-@@ -384,7 +384,7 @@ static ctl_table abi_table2[] = {
+ if (compat_uses_vma || !compat) {
+ /*
+@@ -365,7 +366,7 @@ int arch_setup_additional_pages(struct l
+
+ up_fail:
+ if (ret)
+- current->mm->context.vdso = NULL;
++ current->mm->context.vdso = 0;
+
+ up_write(&mm->mmap_sem);
+
+@@ -388,7 +389,7 @@ static ctl_table abi_table2[] = {
.mode = 0644,
.proc_handler = proc_dointvec
},
@@ -16156,7 +17063,7 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c linux-2.6.30.8/arch/x86/v
};
static ctl_table abi_root_table2[] = {
-@@ -394,7 +394,7 @@ static ctl_table abi_root_table2[] = {
+@@ -398,7 +399,7 @@ static ctl_table abi_root_table2[] = {
.mode = 0555,
.child = abi_table2
},
@@ -16165,7 +17072,7 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c linux-2.6.30.8/arch/x86/v
};
static __init int ia32_binfmt_init(void)
-@@ -409,8 +409,14 @@ __initcall(ia32_binfmt_init);
+@@ -413,8 +414,14 @@ __initcall(ia32_binfmt_init);
const char *arch_vma_name(struct vm_area_struct *vma)
{
@@ -16181,7 +17088,7 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c linux-2.6.30.8/arch/x86/v
return NULL;
}
-@@ -419,7 +425,7 @@ struct vm_area_struct *get_gate_vma(stru
+@@ -423,7 +430,7 @@ struct vm_area_struct *get_gate_vma(stru
struct mm_struct *mm = tsk->mm;
/* Check to see if this task was created in compat vdso mode */
@@ -16190,9 +17097,9 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso32-setup.c linux-2.6.30.8/arch/x86/v
return &gate_vma;
return NULL;
}
-diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso.lds.S linux-2.6.30.8/arch/x86/vdso/vdso.lds.S
---- linux-2.6.30.8/arch/x86/vdso/vdso.lds.S 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/vdso/vdso.lds.S 2009-07-30 09:48:09.978662746 -0400
+diff -urNp linux-2.6.31.4/arch/x86/vdso/vdso.lds.S linux-2.6.31.4/arch/x86/vdso/vdso.lds.S
+--- linux-2.6.31.4/arch/x86/vdso/vdso.lds.S 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/vdso/vdso.lds.S 2009-10-11 15:29:41.156287758 -0400
@@ -35,3 +35,9 @@ VDSO64_PRELINK = VDSO_PRELINK;
#define VEXTERN(x) VDSO64_ ## x = vdso_ ## x;
#include "vextern.h"
@@ -16203,9 +17110,9 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vdso.lds.S linux-2.6.30.8/arch/x86/vdso/
+VEXTERN(fallback_time)
+VEXTERN(getcpu)
+#undef VEXTERN
-diff -urNp linux-2.6.30.8/arch/x86/vdso/vextern.h linux-2.6.30.8/arch/x86/vdso/vextern.h
---- linux-2.6.30.8/arch/x86/vdso/vextern.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/vdso/vextern.h 2009-07-30 09:48:09.979439324 -0400
+diff -urNp linux-2.6.31.4/arch/x86/vdso/vextern.h linux-2.6.31.4/arch/x86/vdso/vextern.h
+--- linux-2.6.31.4/arch/x86/vdso/vextern.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/vdso/vextern.h 2009-10-11 15:29:41.156287758 -0400
@@ -11,6 +11,5 @@
put into vextern.h and be referenced as a pointer with vdso prefix.
The main kernel later fills in the values. */
@@ -16213,18 +17120,10 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vextern.h linux-2.6.30.8/arch/x86/vdso/v
-VEXTERN(jiffies)
VEXTERN(vgetcpu_mode)
VEXTERN(vsyscall_gtod_data)
-diff -urNp linux-2.6.30.8/arch/x86/vdso/vma.c linux-2.6.30.8/arch/x86/vdso/vma.c
---- linux-2.6.30.8/arch/x86/vdso/vma.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/vdso/vma.c 2009-07-30 09:48:09.979439324 -0400
-@@ -8,6 +8,7 @@
- #include <linux/sched.h>
- #include <linux/init.h>
- #include <linux/random.h>
-+#include <linux/elf.h>
- #include <asm/vsyscall.h>
- #include <asm/vgtod.h>
- #include <asm/proto.h>
-@@ -56,7 +57,7 @@ static int __init init_vdso_vars(void)
+diff -urNp linux-2.6.31.4/arch/x86/vdso/vma.c linux-2.6.31.4/arch/x86/vdso/vma.c
+--- linux-2.6.31.4/arch/x86/vdso/vma.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/vdso/vma.c 2009-10-11 15:29:41.157225306 -0400
+@@ -57,7 +57,7 @@ static int __init init_vdso_vars(void)
if (!vbase)
goto oom;
@@ -16233,7 +17132,7 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vma.c linux-2.6.30.8/arch/x86/vdso/vma.c
printk("VDSO: I'm broken; not ELF\n");
vdso_enabled = 0;
}
-@@ -65,6 +66,7 @@ static int __init init_vdso_vars(void)
+@@ -66,6 +66,7 @@ static int __init init_vdso_vars(void)
*(typeof(__ ## x) **) var_ref(VDSO64_SYMBOL(vbase, x), #x) = &__ ## x;
#include "vextern.h"
#undef VEXTERN
@@ -16241,13 +17140,25 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vma.c linux-2.6.30.8/arch/x86/vdso/vma.c
return 0;
oom:
-@@ -123,15 +125,8 @@ int arch_setup_additional_pages(struct l
- if (ret)
+@@ -116,7 +117,7 @@ int arch_setup_additional_pages(struct l
goto up_fail;
+ }
- current->mm->context.vdso = (void *)addr;
+ current->mm->context.vdso = addr;
- up_fail:
+
+ ret = install_special_mapping(mm, addr, vdso_size,
+ VM_READ|VM_EXEC|
+@@ -124,7 +125,7 @@ int arch_setup_additional_pages(struct l
+ VM_ALWAYSDUMP,
+ vdso_pages);
+ if (ret) {
+- current->mm->context.vdso = NULL;
++ current->mm->context.vdso = 0;
+ goto up_fail;
+ }
+
+@@ -132,10 +133,3 @@ up_fail:
up_write(&mm->mmap_sem);
return ret;
}
@@ -16258,9 +17169,9 @@ diff -urNp linux-2.6.30.8/arch/x86/vdso/vma.c linux-2.6.30.8/arch/x86/vdso/vma.c
- return 0;
-}
-__setup("vdso=", vdso_setup);
-diff -urNp linux-2.6.30.8/arch/x86/xen/debugfs.c linux-2.6.30.8/arch/x86/xen/debugfs.c
---- linux-2.6.30.8/arch/x86/xen/debugfs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/xen/debugfs.c 2009-07-30 09:48:09.979439324 -0400
+diff -urNp linux-2.6.31.4/arch/x86/xen/debugfs.c linux-2.6.31.4/arch/x86/xen/debugfs.c
+--- linux-2.6.31.4/arch/x86/xen/debugfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/xen/debugfs.c 2009-10-11 15:29:41.157225306 -0400
@@ -100,7 +100,7 @@ static int xen_array_release(struct inod
return 0;
}
@@ -16270,10 +17181,10 @@ diff -urNp linux-2.6.30.8/arch/x86/xen/debugfs.c linux-2.6.30.8/arch/x86/xen/deb
.owner = THIS_MODULE,
.open = u32_array_open,
.release= xen_array_release,
-diff -urNp linux-2.6.30.8/arch/x86/xen/enlighten.c linux-2.6.30.8/arch/x86/xen/enlighten.c
---- linux-2.6.30.8/arch/x86/xen/enlighten.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/xen/enlighten.c 2009-08-04 17:23:47.808223131 -0400
-@@ -67,8 +67,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
+diff -urNp linux-2.6.31.4/arch/x86/xen/enlighten.c linux-2.6.31.4/arch/x86/xen/enlighten.c
+--- linux-2.6.31.4/arch/x86/xen/enlighten.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/xen/enlighten.c 2009-10-11 15:29:41.157225306 -0400
+@@ -70,8 +70,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
struct shared_info xen_dummy_shared_info;
@@ -16282,7 +17193,7 @@ diff -urNp linux-2.6.30.8/arch/x86/xen/enlighten.c linux-2.6.30.8/arch/x86/xen/e
/*
* Point at some empty memory to start with. We map the real shared_info
* page as soon as fixmap is up and running.
-@@ -454,7 +452,7 @@ static void xen_write_idt_entry(gate_des
+@@ -539,7 +537,7 @@ static void xen_write_idt_entry(gate_des
preempt_disable();
@@ -16291,34 +17202,24 @@ diff -urNp linux-2.6.30.8/arch/x86/xen/enlighten.c linux-2.6.30.8/arch/x86/xen/e
end = start + __get_cpu_var(idt_desc).size + 1;
xen_mc_flush();
-@@ -962,12 +960,6 @@ asmlinkage void __init xen_start_kernel(
- */
- load_percpu_segment(0);
- #endif
+@@ -1117,13 +1115,6 @@ asmlinkage void __init xen_start_kernel(
+
+ machine_ops = xen_machine_ops;
+
- /*
- * The only reliable way to retain the initial address of the
- * percpu gdt_page is to remember it here, so we can go and
- * mark it RW later, when the initial percpu area is freed.
- */
- xen_initial_gdt = &per_cpu(gdt_page, 0);
-
+-
xen_smp_init();
-diff -urNp linux-2.6.30.8/arch/x86/xen/Kconfig linux-2.6.30.8/arch/x86/xen/Kconfig
---- linux-2.6.30.8/arch/x86/xen/Kconfig 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/xen/Kconfig 2009-08-02 09:47:15.079210101 -0400
-@@ -8,6 +8,7 @@ config XEN
- select PARAVIRT_CLOCK
- depends on X86_64 || (X86_32 && X86_PAE && !X86_VISWS)
- depends on X86_CMPXCHG && X86_TSC
-+ depends on !PAX_KERNEXEC
- help
- This is the Linux Xen port. Enabling this will allow the
- kernel to boot in a paravirtualized environment under the
-diff -urNp linux-2.6.30.8/arch/x86/xen/mmu.c linux-2.6.30.8/arch/x86/xen/mmu.c
---- linux-2.6.30.8/arch/x86/xen/mmu.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/xen/mmu.c 2009-09-05 22:09:36.227714282 -0400
-@@ -1716,6 +1716,8 @@ __init pgd_t *xen_setup_kernel_pagetable
+ pgd = (pgd_t *)xen_start_info->pt_base;
+diff -urNp linux-2.6.31.4/arch/x86/xen/mmu.c linux-2.6.31.4/arch/x86/xen/mmu.c
+--- linux-2.6.31.4/arch/x86/xen/mmu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/xen/mmu.c 2009-10-11 15:29:41.158173548 -0400
+@@ -1707,6 +1707,8 @@ __init pgd_t *xen_setup_kernel_pagetable
convert_pfn_mfn(init_level4_pgt);
convert_pfn_mfn(level3_ident_pgt);
convert_pfn_mfn(level3_kernel_pgt);
@@ -16327,18 +17228,20 @@ diff -urNp linux-2.6.30.8/arch/x86/xen/mmu.c linux-2.6.30.8/arch/x86/xen/mmu.c
l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd);
l2 = m2v(l3[pud_index(__START_KERNEL_map)].pud);
-@@ -1734,6 +1736,8 @@ __init pgd_t *xen_setup_kernel_pagetable
+@@ -1725,7 +1727,10 @@ __init pgd_t *xen_setup_kernel_pagetable
set_page_prot(init_level4_pgt, PAGE_KERNEL_RO);
set_page_prot(level3_ident_pgt, PAGE_KERNEL_RO);
set_page_prot(level3_kernel_pgt, PAGE_KERNEL_RO);
+ set_page_prot(level3_vmalloc_pgt, PAGE_KERNEL_RO);
+ set_page_prot(level3_vmemmap_pgt, PAGE_KERNEL_RO);
set_page_prot(level3_user_vsyscall, PAGE_KERNEL_RO);
++ set_page_prot(level2_vmemmap_pgt, PAGE_KERNEL_RO);
set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO);
set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO);
-diff -urNp linux-2.6.30.8/arch/x86/xen/smp.c linux-2.6.30.8/arch/x86/xen/smp.c
---- linux-2.6.30.8/arch/x86/xen/smp.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/xen/smp.c 2009-07-30 09:48:09.981489035 -0400
+
+diff -urNp linux-2.6.31.4/arch/x86/xen/smp.c linux-2.6.31.4/arch/x86/xen/smp.c
+--- linux-2.6.31.4/arch/x86/xen/smp.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/xen/smp.c 2009-10-11 15:29:41.158173548 -0400
@@ -167,11 +167,6 @@ static void __init xen_smp_prepare_boot_
{
BUG_ON(smp_processor_id() != 0);
@@ -16362,9 +17265,9 @@ diff -urNp linux-2.6.30.8/arch/x86/xen/smp.c linux-2.6.30.8/arch/x86/xen/smp.c
ctxt->user_regs.ss = __KERNEL_DS;
#ifdef CONFIG_X86_32
ctxt->user_regs.fs = __KERNEL_PERCPU;
-diff -urNp linux-2.6.30.8/arch/x86/xen/xen-ops.h linux-2.6.30.8/arch/x86/xen/xen-ops.h
---- linux-2.6.30.8/arch/x86/xen/xen-ops.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/x86/xen/xen-ops.h 2009-08-04 17:23:47.809460830 -0400
+diff -urNp linux-2.6.31.4/arch/x86/xen/xen-ops.h linux-2.6.31.4/arch/x86/xen/xen-ops.h
+--- linux-2.6.31.4/arch/x86/xen/xen-ops.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/x86/xen/xen-ops.h 2009-10-11 15:29:41.158173548 -0400
@@ -10,8 +10,6 @@
extern const char xen_hypervisor_callback[];
extern const char xen_failsafe_callback[];
@@ -16374,33 +17277,75 @@ diff -urNp linux-2.6.30.8/arch/x86/xen/xen-ops.h linux-2.6.30.8/arch/x86/xen/xen
struct trap_info;
void xen_copy_trap_info(struct trap_info *traps);
-diff -urNp linux-2.6.30.8/arch/xtensa/include/asm/atomic.h linux-2.6.30.8/arch/xtensa/include/asm/atomic.h
---- linux-2.6.30.8/arch/xtensa/include/asm/atomic.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/xtensa/include/asm/atomic.h 2009-07-30 09:48:09.981489035 -0400
-@@ -165,6 +165,9 @@ static inline int atomic_sub_return(int
+diff -urNp linux-2.6.31.4/arch/xtensa/include/asm/atomic.h linux-2.6.31.4/arch/xtensa/include/asm/atomic.h
+--- linux-2.6.31.4/arch/xtensa/include/asm/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/arch/xtensa/include/asm/atomic.h 2009-10-11 15:29:41.158173548 -0400
+@@ -49,6 +49,14 @@
+ #define atomic_read(v) ((v)->counter)
+
+ /**
++ * atomic_read_unchecked - read atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically reads the value of @v.
++ */
++#define atomic_read_unchecked(v) ((v)->counter)
++
++/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+@@ -58,6 +66,15 @@
+ #define atomic_set(v,i) ((v)->counter = (i))
+
+ /**
++ * atomic_set_unchecked - set atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ * @i: required value
++ *
++ * Atomically sets the value of @v to @i.
++ */
++#define atomic_set_unchecked(v,i) ((v)->counter = (i))
++
++/**
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+@@ -81,6 +98,11 @@ static inline void atomic_add(int i, ato
+ );
+ }
+
++static inline void atomic_add_unchecked(int i, atomic_unchecked_t * v)
++{
++ atomic_add(i, (atomic_t *)v);
++}
++
+ /**
+ * atomic_sub - subtract the atomic variable
+ * @i: integer value to subtract
+@@ -105,6 +127,11 @@ static inline void atomic_sub(int i, ato
+ );
+ }
+
++static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_sub(i, (atomic_t *)v);
++}
++
+ /*
+ * We use atomic_{add|sub}_return to define other functions.
+ */
+@@ -165,6 +192,7 @@ static inline int atomic_sub_return(int
* Atomically increments @v by 1.
*/
#define atomic_inc(v) atomic_add(1,(v))
-+#define atomic_inc_unchecked(v) atomic_inc(v)
-+#define atomic_add_unchecked(i, v) atomic_add((i), (v))
-+#define atomic_sub_unchecked(i, v) atomic_sub((i), (v))
++#define atomic_inc_unchecked(v) atomic_add_unchecked(1,(v))
/**
* atomic_inc - increment atomic variable
-diff -urNp linux-2.6.30.8/arch/xtensa/include/asm/kmap_types.h linux-2.6.30.8/arch/xtensa/include/asm/kmap_types.h
---- linux-2.6.30.8/arch/xtensa/include/asm/kmap_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/arch/xtensa/include/asm/kmap_types.h 2009-07-30 09:48:09.981489035 -0400
-@@ -25,6 +25,7 @@ enum km_type {
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
-+ KM_CLEARPAGE,
- KM_TYPE_NR
- };
-
-diff -urNp linux-2.6.30.8/crypto/lrw.c linux-2.6.30.8/crypto/lrw.c
---- linux-2.6.30.8/crypto/lrw.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/crypto/lrw.c 2009-07-30 09:48:09.982442014 -0400
+diff -urNp linux-2.6.31.4/crypto/lrw.c linux-2.6.31.4/crypto/lrw.c
+--- linux-2.6.31.4/crypto/lrw.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/crypto/lrw.c 2009-10-11 15:29:41.340125789 -0400
@@ -60,7 +60,7 @@ static int setkey(struct crypto_tfm *par
struct priv *ctx = crypto_tfm_ctx(parent);
struct crypto_cipher *child = ctx->child;
@@ -16410,9 +17355,9 @@ diff -urNp linux-2.6.30.8/crypto/lrw.c linux-2.6.30.8/crypto/lrw.c
int bsize = crypto_cipher_blocksize(child);
crypto_cipher_clear_flags(child, CRYPTO_TFM_REQ_MASK);
-diff -urNp linux-2.6.30.8/Documentation/dontdiff linux-2.6.30.8/Documentation/dontdiff
---- linux-2.6.30.8/Documentation/dontdiff 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/Documentation/dontdiff 2009-08-04 17:23:49.932547446 -0400
+diff -urNp linux-2.6.31.4/Documentation/dontdiff linux-2.6.31.4/Documentation/dontdiff
+--- linux-2.6.31.4/Documentation/dontdiff 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/Documentation/dontdiff 2009-10-11 15:29:41.340125789 -0400
@@ -3,6 +3,7 @@
*.bin
*.cpio
@@ -16421,7 +17366,7 @@ diff -urNp linux-2.6.30.8/Documentation/dontdiff linux-2.6.30.8/Documentation/do
*.dsp
*.dvi
*.elf
-@@ -49,6 +50,10 @@
+@@ -49,11 +50,16 @@
53c700_d.h
CVS
ChangeSet
@@ -16432,15 +17377,23 @@ diff -urNp linux-2.6.30.8/Documentation/dontdiff linux-2.6.30.8/Documentation/do
Image
Kerntypes
Module.markers
-@@ -76,6 +81,7 @@ btfixupprep
+ Module.symvers
+ PENDING
++PERF*
+ SCCS
+ System.map*
+ TAGS
+@@ -76,7 +82,9 @@ btfixupprep
build
bvmlinux
bzImage*
+capflags.c
classlist.h*
++common-cmds.h
comp*.log
compile.h*
-@@ -103,9 +109,11 @@ gen_crc32table
+ conf
+@@ -103,13 +111,14 @@ gen_crc32table
gen_init_cpio
genksyms
*_gray256.c
@@ -16452,7 +17405,27 @@ diff -urNp linux-2.6.30.8/Documentation/dontdiff linux-2.6.30.8/Documentation/do
initramfs_data.cpio.gz
initramfs_list
kallsyms
-@@ -164,6 +172,7 @@ setup
+-kconfig
+ keywords.c
+ ksym.c*
+ ksym.h*
+@@ -133,6 +142,7 @@ mkboot
+ mkbugboot
+ mkcpustr
+ mkdep
++mkpiggy
+ mkprep
+ mktables
+ mktree
+@@ -149,6 +159,7 @@ patches*
+ pca200e.bin
+ pca200e_ecd.bin2
+ piggy.gz
++piggy.S
+ piggyback
+ pnmtologo
+ ppc_defs.h*
+@@ -164,6 +175,7 @@ setup
setup.bin
setup.elf
sImage
@@ -16460,7 +17433,7 @@ diff -urNp linux-2.6.30.8/Documentation/dontdiff linux-2.6.30.8/Documentation/do
sm_tbl*
split-include
syscalltab.h
-@@ -187,12 +196,16 @@ version.h*
+@@ -187,14 +199,20 @@ version.h*
vmlinux
vmlinux-*
vmlinux.aout
@@ -16468,6 +17441,7 @@ diff -urNp linux-2.6.30.8/Documentation/dontdiff linux-2.6.30.8/Documentation/do
+vmlinux.bin.bz2
vmlinux.lds
+vmlinux.relocs
++voffset.h
vsyscall.lds
vsyscall_32.lds
wanxlfw.inc
@@ -16477,10 +17451,13 @@ diff -urNp linux-2.6.30.8/Documentation/dontdiff linux-2.6.30.8/Documentation/do
wakeup.bin
wakeup.elf
wakeup.lds
-diff -urNp linux-2.6.30.8/Documentation/kernel-parameters.txt linux-2.6.30.8/Documentation/kernel-parameters.txt
---- linux-2.6.30.8/Documentation/kernel-parameters.txt 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/Documentation/kernel-parameters.txt 2009-09-05 22:09:36.342979816 -0400
-@@ -1707,6 +1707,12 @@ and is between 256 and 4096 characters.
+ zImage*
+ zconf.hash.c
++zoffset.h
+diff -urNp linux-2.6.31.4/Documentation/kernel-parameters.txt linux-2.6.31.4/Documentation/kernel-parameters.txt
+--- linux-2.6.31.4/Documentation/kernel-parameters.txt 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/Documentation/kernel-parameters.txt 2009-10-11 15:29:41.387334245 -0400
+@@ -1776,6 +1776,12 @@ and is between 256 and 4096 characters.
the specified number of seconds. This is to be used if
your oopses keep scrolling off the screen.
@@ -16493,9 +17470,9 @@ diff -urNp linux-2.6.30.8/Documentation/kernel-parameters.txt linux-2.6.30.8/Doc
pcbit= [HW,ISDN]
pcd. [PARIDE]
-diff -urNp linux-2.6.30.8/drivers/acpi/blacklist.c linux-2.6.30.8/drivers/acpi/blacklist.c
---- linux-2.6.30.8/drivers/acpi/blacklist.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/acpi/blacklist.c 2009-07-30 09:48:09.982442014 -0400
+diff -urNp linux-2.6.31.4/drivers/acpi/blacklist.c linux-2.6.31.4/drivers/acpi/blacklist.c
+--- linux-2.6.31.4/drivers/acpi/blacklist.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/acpi/blacklist.c 2009-10-11 15:29:41.411312253 -0400
@@ -71,7 +71,7 @@ static struct acpi_blacklist_item acpi_b
{"IBM ", "TP600E ", 0x00000105, ACPI_SIG_DSDT, less_than_or_equal,
"Incorrect _ADR", 1},
@@ -16505,10 +17482,10 @@ diff -urNp linux-2.6.30.8/drivers/acpi/blacklist.c linux-2.6.30.8/drivers/acpi/b
};
#if CONFIG_ACPI_BLACKLIST_YEAR
-diff -urNp linux-2.6.30.8/drivers/acpi/osl.c linux-2.6.30.8/drivers/acpi/osl.c
---- linux-2.6.30.8/drivers/acpi/osl.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/acpi/osl.c 2009-07-30 09:48:09.986535027 -0400
-@@ -492,6 +492,8 @@ acpi_os_read_memory(acpi_physical_addres
+diff -urNp linux-2.6.31.4/drivers/acpi/osl.c linux-2.6.31.4/drivers/acpi/osl.c
+--- linux-2.6.31.4/drivers/acpi/osl.c 2009-10-12 23:26:17.640437961 -0400
++++ linux-2.6.31.4/drivers/acpi/osl.c 2009-10-12 23:26:38.913624626 -0400
+@@ -521,6 +521,8 @@ acpi_os_read_memory(acpi_physical_addres
void __iomem *virt_addr;
virt_addr = ioremap(phys_addr, width);
@@ -16517,7 +17494,7 @@ diff -urNp linux-2.6.30.8/drivers/acpi/osl.c linux-2.6.30.8/drivers/acpi/osl.c
if (!value)
value = &dummy;
-@@ -520,6 +522,8 @@ acpi_os_write_memory(acpi_physical_addre
+@@ -549,6 +551,8 @@ acpi_os_write_memory(acpi_physical_addre
void __iomem *virt_addr;
virt_addr = ioremap(phys_addr, width);
@@ -16526,10 +17503,10 @@ diff -urNp linux-2.6.30.8/drivers/acpi/osl.c linux-2.6.30.8/drivers/acpi/osl.c
switch (width) {
case 8:
-diff -urNp linux-2.6.30.8/drivers/acpi/processor_core.c linux-2.6.30.8/drivers/acpi/processor_core.c
---- linux-2.6.30.8/drivers/acpi/processor_core.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/acpi/processor_core.c 2009-07-30 09:48:09.986535027 -0400
-@@ -703,7 +703,7 @@ static int __cpuinit acpi_processor_star
+diff -urNp linux-2.6.31.4/drivers/acpi/processor_core.c linux-2.6.31.4/drivers/acpi/processor_core.c
+--- linux-2.6.31.4/drivers/acpi/processor_core.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/acpi/processor_core.c 2009-10-11 15:29:41.419134023 -0400
+@@ -712,7 +712,7 @@ static int __cpuinit acpi_processor_star
return 0;
}
@@ -16538,9 +17515,9 @@ diff -urNp linux-2.6.30.8/drivers/acpi/processor_core.c linux-2.6.30.8/drivers/a
/*
* Buggy BIOS check
-diff -urNp linux-2.6.30.8/drivers/acpi/processor_idle.c linux-2.6.30.8/drivers/acpi/processor_idle.c
---- linux-2.6.30.8/drivers/acpi/processor_idle.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/acpi/processor_idle.c 2009-07-30 09:48:09.987663767 -0400
+diff -urNp linux-2.6.31.4/drivers/acpi/processor_idle.c linux-2.6.31.4/drivers/acpi/processor_idle.c
+--- linux-2.6.31.4/drivers/acpi/processor_idle.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/acpi/processor_idle.c 2009-10-11 15:29:41.433629076 -0400
@@ -108,7 +108,7 @@ static struct dmi_system_id __cpuinitdat
DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
@@ -16550,10 +17527,49 @@ diff -urNp linux-2.6.30.8/drivers/acpi/processor_idle.c linux-2.6.30.8/drivers/a
};
-diff -urNp linux-2.6.30.8/drivers/acpi/video.c linux-2.6.30.8/drivers/acpi/video.c
---- linux-2.6.30.8/drivers/acpi/video.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/acpi/video.c 2009-07-30 12:06:52.099841502 -0400
-@@ -282,7 +282,7 @@ static int acpi_video_device_brightness_
+diff -urNp linux-2.6.31.4/drivers/acpi/sleep.c linux-2.6.31.4/drivers/acpi/sleep.c
+--- linux-2.6.31.4/drivers/acpi/sleep.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/acpi/sleep.c 2009-10-11 15:29:56.583380078 -0400
+@@ -297,7 +297,7 @@ static int acpi_suspend_state_valid(susp
+ }
+ }
+
+-static struct platform_suspend_ops acpi_suspend_ops = {
++static const struct platform_suspend_ops acpi_suspend_ops = {
+ .valid = acpi_suspend_state_valid,
+ .begin = acpi_suspend_begin,
+ .prepare_late = acpi_pm_prepare,
+@@ -325,7 +325,7 @@ static int acpi_suspend_begin_old(suspen
+ * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
+ * been requested.
+ */
+-static struct platform_suspend_ops acpi_suspend_ops_old = {
++static const struct platform_suspend_ops acpi_suspend_ops_old = {
+ .valid = acpi_suspend_state_valid,
+ .begin = acpi_suspend_begin_old,
+ .prepare_late = acpi_pm_disable_gpes,
+@@ -512,7 +512,7 @@ static void acpi_pm_enable_gpes(void)
+ acpi_enable_all_runtime_gpes();
+ }
+
+-static struct platform_hibernation_ops acpi_hibernation_ops = {
++static const struct platform_hibernation_ops acpi_hibernation_ops = {
+ .begin = acpi_hibernation_begin,
+ .end = acpi_pm_end,
+ .pre_snapshot = acpi_hibernation_pre_snapshot,
+@@ -565,7 +565,7 @@ static int acpi_hibernation_pre_snapshot
+ * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
+ * been requested.
+ */
+-static struct platform_hibernation_ops acpi_hibernation_ops_old = {
++static const struct platform_hibernation_ops acpi_hibernation_ops_old = {
+ .begin = acpi_hibernation_begin_old,
+ .end = acpi_pm_end,
+ .pre_snapshot = acpi_hibernation_pre_snapshot_old,
+diff -urNp linux-2.6.31.4/drivers/acpi/video.c linux-2.6.31.4/drivers/acpi/video.c
+--- linux-2.6.31.4/drivers/acpi/video.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/acpi/video.c 2009-10-11 15:29:41.441500388 -0400
+@@ -283,7 +283,7 @@ static int acpi_video_device_brightness_
struct file *file);
static ssize_t acpi_video_device_write_brightness(struct file *file,
const char __user *buffer, size_t count, loff_t *data);
@@ -16562,10 +17578,10 @@ diff -urNp linux-2.6.30.8/drivers/acpi/video.c linux-2.6.30.8/drivers/acpi/video
.owner = THIS_MODULE,
.open = acpi_video_device_brightness_open_fs,
.read = seq_read,
-diff -urNp linux-2.6.30.8/drivers/ata/ahci.c linux-2.6.30.8/drivers/ata/ahci.c
---- linux-2.6.30.8/drivers/ata/ahci.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/ata/ahci.c 2009-07-30 09:48:09.987663767 -0400
-@@ -622,7 +622,7 @@ static const struct pci_device_id ahci_p
+diff -urNp linux-2.6.31.4/drivers/ata/ahci.c linux-2.6.31.4/drivers/ata/ahci.c
+--- linux-2.6.31.4/drivers/ata/ahci.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ata/ahci.c 2009-10-11 15:29:41.446364925 -0400
+@@ -629,7 +629,7 @@ static const struct pci_device_id ahci_p
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },
@@ -16574,10 +17590,10 @@ diff -urNp linux-2.6.30.8/drivers/ata/ahci.c linux-2.6.30.8/drivers/ata/ahci.c
};
-diff -urNp linux-2.6.30.8/drivers/ata/ata_piix.c linux-2.6.30.8/drivers/ata/ata_piix.c
---- linux-2.6.30.8/drivers/ata/ata_piix.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/ata/ata_piix.c 2009-07-30 09:48:09.988577262 -0400
-@@ -293,7 +293,7 @@ static const struct pci_device_id piix_p
+diff -urNp linux-2.6.31.4/drivers/ata/ata_piix.c linux-2.6.31.4/drivers/ata/ata_piix.c
+--- linux-2.6.31.4/drivers/ata/ata_piix.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ata/ata_piix.c 2009-10-11 15:29:41.452812112 -0400
+@@ -291,7 +291,7 @@ static const struct pci_device_id piix_p
{ 0x8086, 0x3b2d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b2e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
@@ -16586,7 +17602,7 @@ diff -urNp linux-2.6.30.8/drivers/ata/ata_piix.c linux-2.6.30.8/drivers/ata/ata_
};
static struct pci_driver piix_pci_driver = {
-@@ -607,7 +607,7 @@ static const struct ich_laptop ich_lapto
+@@ -608,7 +608,7 @@ static const struct ich_laptop ich_lapto
{ 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */
{ 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */
/* end marker */
@@ -16595,7 +17611,7 @@ diff -urNp linux-2.6.30.8/drivers/ata/ata_piix.c linux-2.6.30.8/drivers/ata/ata_
};
/**
-@@ -1073,7 +1073,7 @@ static int piix_broken_suspend(void)
+@@ -1086,7 +1086,7 @@ static int piix_broken_suspend(void)
},
},
@@ -16604,9 +17620,9 @@ diff -urNp linux-2.6.30.8/drivers/ata/ata_piix.c linux-2.6.30.8/drivers/ata/ata_
};
static const char *oemstrs[] = {
"Tecra M3,",
-diff -urNp linux-2.6.30.8/drivers/ata/libata-core.c linux-2.6.30.8/drivers/ata/libata-core.c
---- linux-2.6.30.8/drivers/ata/libata-core.c 2009-09-26 23:07:15.504660661 -0400
-+++ linux-2.6.30.8/drivers/ata/libata-core.c 2009-09-26 23:07:26.578141628 -0400
+diff -urNp linux-2.6.31.4/drivers/ata/libata-core.c linux-2.6.31.4/drivers/ata/libata-core.c
+--- linux-2.6.31.4/drivers/ata/libata-core.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ata/libata-core.c 2009-10-11 15:29:41.477768140 -0400
@@ -896,7 +896,7 @@ static const struct ata_xfer_ent {
{ ATA_SHIFT_PIO, ATA_NR_PIO_MODES, XFER_PIO_0 },
{ ATA_SHIFT_MWDMA, ATA_NR_MWDMA_MODES, XFER_MW_DMA_0 },
@@ -16616,7 +17632,7 @@ diff -urNp linux-2.6.30.8/drivers/ata/libata-core.c linux-2.6.30.8/drivers/ata/l
};
/**
-@@ -3135,7 +3135,7 @@ static const struct ata_timing ata_timin
+@@ -3141,7 +3141,7 @@ static const struct ata_timing ata_timin
{ XFER_UDMA_5, 0, 0, 0, 0, 0, 0, 0, 0, 20 },
{ XFER_UDMA_6, 0, 0, 0, 0, 0, 0, 0, 0, 15 },
@@ -16625,8 +17641,8 @@ diff -urNp linux-2.6.30.8/drivers/ata/libata-core.c linux-2.6.30.8/drivers/ata/l
};
#define ENOUGH(v, unit) (((v)-1)/(unit)+1)
-@@ -4302,7 +4302,7 @@ static const struct ata_blacklist_entry
- { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, },
+@@ -4339,7 +4339,7 @@ static const struct ata_blacklist_entry
+ { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER },
/* End Marker */
- { }
@@ -16634,9 +17650,9 @@ diff -urNp linux-2.6.30.8/drivers/ata/libata-core.c linux-2.6.30.8/drivers/ata/l
};
static int strn_pattern_cmp(const char *patt, const char *name, int wildchar)
-diff -urNp linux-2.6.30.8/drivers/atm/adummy.c linux-2.6.30.8/drivers/atm/adummy.c
---- linux-2.6.30.8/drivers/atm/adummy.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/adummy.c 2009-07-30 09:48:09.989999430 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/adummy.c linux-2.6.31.4/drivers/atm/adummy.c
+--- linux-2.6.31.4/drivers/atm/adummy.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/adummy.c 2009-10-11 15:29:41.481622008 -0400
@@ -77,7 +77,7 @@ adummy_send(struct atm_vcc *vcc, struct
vcc->pop(vcc, skb);
else
@@ -16646,9 +17662,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/adummy.c linux-2.6.30.8/drivers/atm/adummy
return 0;
}
-diff -urNp linux-2.6.30.8/drivers/atm/ambassador.c linux-2.6.30.8/drivers/atm/ambassador.c
---- linux-2.6.30.8/drivers/atm/ambassador.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/ambassador.c 2009-07-30 09:48:09.990535817 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/ambassador.c linux-2.6.31.4/drivers/atm/ambassador.c
+--- linux-2.6.31.4/drivers/atm/ambassador.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/ambassador.c 2009-10-11 15:29:41.491363630 -0400
@@ -453,7 +453,7 @@ static void tx_complete (amb_dev * dev,
PRINTD (DBG_FLOW|DBG_TX, "tx_complete %p %p", dev, tx);
@@ -16685,9 +17701,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/ambassador.c linux-2.6.30.8/drivers/atm/am
return -ENOMEM; // ?
}
-diff -urNp linux-2.6.30.8/drivers/atm/atmtcp.c linux-2.6.30.8/drivers/atm/atmtcp.c
---- linux-2.6.30.8/drivers/atm/atmtcp.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/atmtcp.c 2009-07-30 09:48:09.991629377 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/atmtcp.c linux-2.6.31.4/drivers/atm/atmtcp.c
+--- linux-2.6.31.4/drivers/atm/atmtcp.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/atmtcp.c 2009-10-11 15:29:41.492368987 -0400
@@ -206,7 +206,7 @@ static int atmtcp_v_send(struct atm_vcc
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
@@ -16737,9 +17753,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/atmtcp.c linux-2.6.30.8/drivers/atm/atmtcp
done:
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
-diff -urNp linux-2.6.30.8/drivers/atm/eni.c linux-2.6.30.8/drivers/atm/eni.c
---- linux-2.6.30.8/drivers/atm/eni.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/eni.c 2009-07-30 09:48:09.991629377 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/eni.c linux-2.6.31.4/drivers/atm/eni.c
+--- linux-2.6.31.4/drivers/atm/eni.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/eni.c 2009-10-11 15:29:41.500507070 -0400
@@ -525,7 +525,7 @@ static int rx_aal0(struct atm_vcc *vcc)
DPRINTK(DEV_LABEL "(itf %d): trashing empty cell\n",
vcc->dev->number);
@@ -16785,9 +17801,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/eni.c linux-2.6.30.8/drivers/atm/eni.c
wake_up(&eni_dev->tx_wait);
dma_complete++;
}
-diff -urNp linux-2.6.30.8/drivers/atm/firestream.c linux-2.6.30.8/drivers/atm/firestream.c
---- linux-2.6.30.8/drivers/atm/firestream.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/firestream.c 2009-07-30 09:48:09.992530374 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/firestream.c linux-2.6.31.4/drivers/atm/firestream.c
+--- linux-2.6.31.4/drivers/atm/firestream.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/firestream.c 2009-10-11 15:29:41.514469585 -0400
@@ -748,7 +748,7 @@ static void process_txdone_queue (struct
}
}
@@ -16821,9 +17837,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/firestream.c linux-2.6.30.8/drivers/atm/fi
break;
default: /* Hmm. Haven't written the code to handle the others yet... -- REW */
printk (KERN_WARNING "Don't know what to do with RX status %x: %s.\n",
-diff -urNp linux-2.6.30.8/drivers/atm/fore200e.c linux-2.6.30.8/drivers/atm/fore200e.c
---- linux-2.6.30.8/drivers/atm/fore200e.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/fore200e.c 2009-07-30 09:48:09.993922247 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/fore200e.c linux-2.6.31.4/drivers/atm/fore200e.c
+--- linux-2.6.31.4/drivers/atm/fore200e.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/fore200e.c 2009-10-11 15:29:41.867364251 -0400
@@ -931,9 +931,9 @@ fore200e_tx_irq(struct fore200e* fore200
#endif
/* check error condition */
@@ -16880,9 +17896,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/fore200e.c linux-2.6.30.8/drivers/atm/fore
fore200e->tx_sat++;
DPRINTK(2, "tx queue of device %s is saturated, PDU dropped - heartbeat is %08x\n",
-diff -urNp linux-2.6.30.8/drivers/atm/he.c linux-2.6.30.8/drivers/atm/he.c
---- linux-2.6.30.8/drivers/atm/he.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/he.c 2009-07-30 09:48:09.994421569 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/he.c linux-2.6.31.4/drivers/atm/he.c
+--- linux-2.6.31.4/drivers/atm/he.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/he.c 2009-10-11 15:29:41.926362979 -0400
@@ -1728,7 +1728,7 @@ he_service_rbrq(struct he_dev *he_dev, i
if (RBRQ_HBUF_ERR(he_dev->rbrq_head)) {
@@ -16964,9 +17980,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/he.c linux-2.6.30.8/drivers/atm/he.c
return 0;
}
-diff -urNp linux-2.6.30.8/drivers/atm/horizon.c linux-2.6.30.8/drivers/atm/horizon.c
---- linux-2.6.30.8/drivers/atm/horizon.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/horizon.c 2009-07-30 09:48:09.994421569 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/horizon.c linux-2.6.31.4/drivers/atm/horizon.c
+--- linux-2.6.31.4/drivers/atm/horizon.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/horizon.c 2009-10-11 15:29:41.963561255 -0400
@@ -1033,7 +1033,7 @@ static void rx_schedule (hrz_dev * dev,
{
struct atm_vcc * vcc = ATM_SKB(skb)->vcc;
@@ -16985,9 +18001,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/horizon.c linux-2.6.30.8/drivers/atm/horiz
// free the skb
hrz_kfree_skb (skb);
-diff -urNp linux-2.6.30.8/drivers/atm/idt77252.c linux-2.6.30.8/drivers/atm/idt77252.c
---- linux-2.6.30.8/drivers/atm/idt77252.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/idt77252.c 2009-07-30 09:48:09.995868107 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/idt77252.c linux-2.6.31.4/drivers/atm/idt77252.c
+--- linux-2.6.31.4/drivers/atm/idt77252.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/idt77252.c 2009-10-11 15:29:41.967398057 -0400
@@ -810,7 +810,7 @@ drain_scq(struct idt77252_dev *card, str
else
dev_kfree_skb(skb);
@@ -17142,9 +18158,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/idt77252.c linux-2.6.30.8/drivers/atm/idt7
return -ENOMEM;
}
atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-diff -urNp linux-2.6.30.8/drivers/atm/iphase.c linux-2.6.30.8/drivers/atm/iphase.c
---- linux-2.6.30.8/drivers/atm/iphase.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/iphase.c 2009-07-30 09:48:09.996522301 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/iphase.c linux-2.6.31.4/drivers/atm/iphase.c
+--- linux-2.6.31.4/drivers/atm/iphase.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/iphase.c 2009-10-11 15:29:41.977650727 -0400
@@ -1123,7 +1123,7 @@ static int rx_pkt(struct atm_dev *dev)
status = (u_short) (buf_desc_ptr->desc_mode);
if (status & (RX_CER | RX_PTE | RX_OFL))
@@ -17190,6 +18206,31 @@ diff -urNp linux-2.6.30.8/drivers/atm/iphase.c linux-2.6.30.8/drivers/atm/iphase
iadev->rx_pkt_cnt++;
}
INCR_DLE:
+@@ -2806,15 +2806,15 @@ static int ia_ioctl(struct atm_dev *dev,
+ {
+ struct k_sonet_stats *stats;
+ stats = &PRIV(_ia_dev[board])->sonet_stats;
+- printk("section_bip: %d\n", atomic_read(&stats->section_bip));
+- printk("line_bip : %d\n", atomic_read(&stats->line_bip));
+- printk("path_bip : %d\n", atomic_read(&stats->path_bip));
+- printk("line_febe : %d\n", atomic_read(&stats->line_febe));
+- printk("path_febe : %d\n", atomic_read(&stats->path_febe));
+- printk("corr_hcs : %d\n", atomic_read(&stats->corr_hcs));
+- printk("uncorr_hcs : %d\n", atomic_read(&stats->uncorr_hcs));
+- printk("tx_cells : %d\n", atomic_read(&stats->tx_cells));
+- printk("rx_cells : %d\n", atomic_read(&stats->rx_cells));
++ printk("section_bip: %d\n", atomic_read_unchecked(&stats->section_bip));
++ printk("line_bip : %d\n", atomic_read_unchecked(&stats->line_bip));
++ printk("path_bip : %d\n", atomic_read_unchecked(&stats->path_bip));
++ printk("line_febe : %d\n", atomic_read_unchecked(&stats->line_febe));
++ printk("path_febe : %d\n", atomic_read_unchecked(&stats->path_febe));
++ printk("corr_hcs : %d\n", atomic_read_unchecked(&stats->corr_hcs));
++ printk("uncorr_hcs : %d\n", atomic_read_unchecked(&stats->uncorr_hcs));
++ printk("tx_cells : %d\n", atomic_read_unchecked(&stats->tx_cells));
++ printk("rx_cells : %d\n", atomic_read_unchecked(&stats->rx_cells));
+ }
+ ia_cmds.status = 0;
+ break;
@@ -2919,7 +2919,7 @@ static int ia_pkt_tx (struct atm_vcc *vc
if ((desc == 0) || (desc > iadev->num_tx_desc))
{
@@ -17199,7 +18240,7 @@ diff -urNp linux-2.6.30.8/drivers/atm/iphase.c linux-2.6.30.8/drivers/atm/iphase
if (vcc->pop)
vcc->pop(vcc, skb);
else
-@@ -3024,7 +3024,7 @@ static int ia_pkt_tx (struct atm_vcc *vc
+@@ -3024,14 +3024,14 @@ static int ia_pkt_tx (struct atm_vcc *vc
ATM_DESC(skb) = vcc->vci;
skb_queue_tail(&iadev->tx_dma_q, skb);
@@ -17208,9 +18249,17 @@ diff -urNp linux-2.6.30.8/drivers/atm/iphase.c linux-2.6.30.8/drivers/atm/iphase
iadev->tx_pkt_cnt++;
/* Increment transaction counter */
writel(2, iadev->dma+IPHASE5575_TX_COUNTER);
-diff -urNp linux-2.6.30.8/drivers/atm/lanai.c linux-2.6.30.8/drivers/atm/lanai.c
---- linux-2.6.30.8/drivers/atm/lanai.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/lanai.c 2009-07-30 09:48:09.997872955 -0400
+
+ #if 0
+ /* add flow control logic */
+- if (atomic_read(&vcc->stats->tx) % 20 == 0) {
++ if (atomic_read_unchecked(&vcc->stats->tx) % 20 == 0) {
+ if (iavcc->vc_desc_cnt > 10) {
+ vcc->tx_quota = vcc->tx_quota * 3 / 4;
+ printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
+diff -urNp linux-2.6.31.4/drivers/atm/lanai.c linux-2.6.31.4/drivers/atm/lanai.c
+--- linux-2.6.31.4/drivers/atm/lanai.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/lanai.c 2009-10-11 15:29:41.990418719 -0400
@@ -1305,7 +1305,7 @@ static void lanai_send_one_aal5(struct l
vcc_tx_add_aal5_trailer(lvcc, skb->len, 0, 0);
lanai_endtx(lanai, lvcc);
@@ -17265,9 +18314,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/lanai.c linux-2.6.30.8/drivers/atm/lanai.c
lvcc->stats.x.aal5.service_rxcrc++;
lvcc->rx.buf.ptr = &lvcc->rx.buf.start[SERVICE_GET_END(s) * 4];
cardvcc_write(lvcc, SERVICE_GET_END(s), vcc_rxreadptr);
-diff -urNp linux-2.6.30.8/drivers/atm/nicstar.c linux-2.6.30.8/drivers/atm/nicstar.c
---- linux-2.6.30.8/drivers/atm/nicstar.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/nicstar.c 2009-07-30 09:48:09.998576713 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/nicstar.c linux-2.6.31.4/drivers/atm/nicstar.c
+--- linux-2.6.31.4/drivers/atm/nicstar.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/nicstar.c 2009-10-11 15:29:42.023423181 -0400
@@ -1723,7 +1723,7 @@ static int ns_send(struct atm_vcc *vcc,
if ((vc = (vc_map *) vcc->dev_data) == NULL)
{
@@ -17470,9 +18519,9 @@ diff -urNp linux-2.6.30.8/drivers/atm/nicstar.c linux-2.6.30.8/drivers/atm/nicst
}
}
-diff -urNp linux-2.6.30.8/drivers/atm/solos-pci.c linux-2.6.30.8/drivers/atm/solos-pci.c
---- linux-2.6.30.8/drivers/atm/solos-pci.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/solos-pci.c 2009-07-30 09:48:09.998576713 -0400
+diff -urNp linux-2.6.31.4/drivers/atm/solos-pci.c linux-2.6.31.4/drivers/atm/solos-pci.c
+--- linux-2.6.31.4/drivers/atm/solos-pci.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/solos-pci.c 2009-10-11 15:29:42.035623502 -0400
@@ -663,7 +663,7 @@ void solos_bh(unsigned long card_arg)
}
atm_charge(vcc, skb->truesize);
@@ -17491,21 +18540,23 @@ diff -urNp linux-2.6.30.8/drivers/atm/solos-pci.c linux-2.6.30.8/drivers/atm/sol
solos_pop(vcc, oldskb);
} else
dev_kfree_skb_irq(oldskb);
-diff -urNp linux-2.6.30.8/drivers/atm/suni.c linux-2.6.30.8/drivers/atm/suni.c
---- linux-2.6.30.8/drivers/atm/suni.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/suni.c 2009-07-30 09:48:09.998576713 -0400
-@@ -49,7 +49,7 @@ static DEFINE_SPINLOCK(sunis_lock);
+diff -urNp linux-2.6.31.4/drivers/atm/suni.c linux-2.6.31.4/drivers/atm/suni.c
+--- linux-2.6.31.4/drivers/atm/suni.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/suni.c 2009-10-11 15:29:42.050476713 -0400
+@@ -49,8 +49,8 @@ static DEFINE_SPINLOCK(sunis_lock);
#define ADD_LIMITED(s,v) \
- atomic_add((v),&stats->s); \
+- if (atomic_read(&stats->s) < 0) atomic_set(&stats->s,INT_MAX);
+ atomic_add_unchecked((v),&stats->s); \
- if (atomic_read(&stats->s) < 0) atomic_set(&stats->s,INT_MAX);
++ if (atomic_read_unchecked(&stats->s) < 0) atomic_set_unchecked(&stats->s,INT_MAX);
-diff -urNp linux-2.6.30.8/drivers/atm/uPD98402.c linux-2.6.30.8/drivers/atm/uPD98402.c
---- linux-2.6.30.8/drivers/atm/uPD98402.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/uPD98402.c 2009-07-30 09:48:09.999830275 -0400
+ static void suni_hz(unsigned long from_timer)
+diff -urNp linux-2.6.31.4/drivers/atm/uPD98402.c linux-2.6.31.4/drivers/atm/uPD98402.c
+--- linux-2.6.31.4/drivers/atm/uPD98402.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/uPD98402.c 2009-10-11 15:29:42.051465371 -0400
@@ -41,7 +41,7 @@ static int fetch_stats(struct atm_dev *d
struct sonet_stats tmp;
int error = 0;
@@ -17515,15 +18566,19 @@ diff -urNp linux-2.6.30.8/drivers/atm/uPD98402.c linux-2.6.30.8/drivers/atm/uPD9
sonet_copy_stats(&PRIV(dev)->sonet_stats,&tmp);
if (arg) error = copy_to_user(arg,&tmp,sizeof(tmp));
if (zero && !error) {
-@@ -160,7 +160,7 @@ static int uPD98402_ioctl(struct atm_dev
+@@ -160,9 +160,9 @@ static int uPD98402_ioctl(struct atm_dev
#define ADD_LIMITED(s,v) \
- { atomic_add(GET(v),&PRIV(dev)->sonet_stats.s); \
+- if (atomic_read(&PRIV(dev)->sonet_stats.s) < 0) \
+- atomic_set(&PRIV(dev)->sonet_stats.s,INT_MAX); }
+ { atomic_add_unchecked(GET(v),&PRIV(dev)->sonet_stats.s); \
- if (atomic_read(&PRIV(dev)->sonet_stats.s) < 0) \
- atomic_set(&PRIV(dev)->sonet_stats.s,INT_MAX); }
++ if (atomic_read_unchecked(&PRIV(dev)->sonet_stats.s) < 0) \
++ atomic_set_unchecked(&PRIV(dev)->sonet_stats.s,INT_MAX); }
+
+ static void stat_event(struct atm_dev *dev)
@@ -193,7 +193,7 @@ static void uPD98402_int(struct atm_dev
if (reason & uPD98402_INT_PFM) stat_event(dev);
if (reason & uPD98402_INT_PCO) {
@@ -17533,9 +18588,22 @@ diff -urNp linux-2.6.30.8/drivers/atm/uPD98402.c linux-2.6.30.8/drivers/atm/uPD9
&PRIV(dev)->sonet_stats.uncorr_hcs);
}
if ((reason & uPD98402_INT_RFO) &&
-diff -urNp linux-2.6.30.8/drivers/atm/zatm.c linux-2.6.30.8/drivers/atm/zatm.c
---- linux-2.6.30.8/drivers/atm/zatm.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/atm/zatm.c 2009-07-30 09:48:09.999830275 -0400
+@@ -221,9 +221,9 @@ static int uPD98402_start(struct atm_dev
+ PUT(~(uPD98402_INT_PFM | uPD98402_INT_ALM | uPD98402_INT_RFO |
+ uPD98402_INT_LOS),PIMR); /* enable them */
+ (void) fetch_stats(dev,NULL,1); /* clear kernel counters */
+- atomic_set(&PRIV(dev)->sonet_stats.corr_hcs,-1);
+- atomic_set(&PRIV(dev)->sonet_stats.tx_cells,-1);
+- atomic_set(&PRIV(dev)->sonet_stats.rx_cells,-1);
++ atomic_set_unchecked(&PRIV(dev)->sonet_stats.corr_hcs,-1);
++ atomic_set_unchecked(&PRIV(dev)->sonet_stats.tx_cells,-1);
++ atomic_set_unchecked(&PRIV(dev)->sonet_stats.rx_cells,-1);
+ return 0;
+ }
+
+diff -urNp linux-2.6.31.4/drivers/atm/zatm.c linux-2.6.31.4/drivers/atm/zatm.c
+--- linux-2.6.31.4/drivers/atm/zatm.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/atm/zatm.c 2009-10-11 15:29:42.067535381 -0400
@@ -458,7 +458,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy
}
if (!size) {
@@ -17563,10 +18631,10 @@ diff -urNp linux-2.6.30.8/drivers/atm/zatm.c linux-2.6.30.8/drivers/atm/zatm.c
wake_up(&zatm_vcc->tx_wait);
}
-diff -urNp linux-2.6.30.8/drivers/block/cciss.c linux-2.6.30.8/drivers/block/cciss.c
---- linux-2.6.30.8/drivers/block/cciss.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/block/cciss.c 2009-07-30 09:48:10.000592968 -0400
-@@ -351,7 +351,7 @@ static void cciss_seq_stop(struct seq_fi
+diff -urNp linux-2.6.31.4/drivers/block/cciss.c linux-2.6.31.4/drivers/block/cciss.c
+--- linux-2.6.31.4/drivers/block/cciss.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/block/cciss.c 2009-10-11 15:29:42.079531064 -0400
+@@ -363,7 +363,7 @@ static void cciss_seq_stop(struct seq_fi
h->busy_configuring = 0;
}
@@ -17575,7 +18643,7 @@ diff -urNp linux-2.6.30.8/drivers/block/cciss.c linux-2.6.30.8/drivers/block/cci
.start = cciss_seq_start,
.show = cciss_seq_show,
.next = cciss_seq_next,
-@@ -414,7 +414,7 @@ out:
+@@ -426,7 +426,7 @@ out:
return err;
}
@@ -17584,9 +18652,21 @@ diff -urNp linux-2.6.30.8/drivers/block/cciss.c linux-2.6.30.8/drivers/block/cci
.owner = THIS_MODULE,
.open = cciss_seq_open,
.read = seq_read,
-diff -urNp linux-2.6.30.8/drivers/char/agp/alpha-agp.c linux-2.6.30.8/drivers/char/agp/alpha-agp.c
---- linux-2.6.30.8/drivers/char/agp/alpha-agp.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/agp/alpha-agp.c 2009-07-30 09:48:10.000592968 -0400
+diff -urNp linux-2.6.31.4/drivers/char/agp/agp.h linux-2.6.31.4/drivers/char/agp/agp.h
+--- linux-2.6.31.4/drivers/char/agp/agp.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/agp/agp.h 2009-10-11 15:29:42.086608730 -0400
+@@ -126,7 +126,7 @@ struct agp_bridge_driver {
+ struct agp_bridge_data {
+ const struct agp_version *version;
+ const struct agp_bridge_driver *driver;
+- struct vm_operations_struct *vm_ops;
++ const struct vm_operations_struct *vm_ops;
+ void *previous_size;
+ void *current_size;
+ void *dev_private_data;
+diff -urNp linux-2.6.31.4/drivers/char/agp/alpha-agp.c linux-2.6.31.4/drivers/char/agp/alpha-agp.c
+--- linux-2.6.31.4/drivers/char/agp/alpha-agp.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/agp/alpha-agp.c 2009-10-11 15:29:42.093367493 -0400
@@ -40,7 +40,7 @@ static struct aper_size_info_fixed alpha
{ 0, 0, 0 }, /* filled in by alpha_core_agp_setup */
};
@@ -17596,9 +18676,9 @@ diff -urNp linux-2.6.30.8/drivers/char/agp/alpha-agp.c linux-2.6.30.8/drivers/ch
.fault = alpha_core_agp_vm_fault,
};
-diff -urNp linux-2.6.30.8/drivers/char/agp/frontend.c linux-2.6.30.8/drivers/char/agp/frontend.c
---- linux-2.6.30.8/drivers/char/agp/frontend.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/agp/frontend.c 2009-07-30 09:48:10.001783459 -0400
+diff -urNp linux-2.6.31.4/drivers/char/agp/frontend.c linux-2.6.31.4/drivers/char/agp/frontend.c
+--- linux-2.6.31.4/drivers/char/agp/frontend.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/agp/frontend.c 2009-10-11 15:29:42.095364198 -0400
@@ -824,7 +824,7 @@ static int agpioc_reserve_wrap(struct ag
if (copy_from_user(&reserve, arg, sizeof(struct agp_region)))
return -EFAULT;
@@ -17608,21 +18688,21 @@ diff -urNp linux-2.6.30.8/drivers/char/agp/frontend.c linux-2.6.30.8/drivers/cha
return -EFAULT;
client = agp_find_client_by_pid(reserve.pid);
-diff -urNp linux-2.6.30.8/drivers/char/agp/intel-agp.c linux-2.6.30.8/drivers/char/agp/intel-agp.c
---- linux-2.6.30.8/drivers/char/agp/intel-agp.c 2009-09-26 23:07:15.572375574 -0400
-+++ linux-2.6.30.8/drivers/char/agp/intel-agp.c 2009-09-26 23:07:26.697782298 -0400
-@@ -2378,7 +2378,7 @@ static struct pci_device_id agp_intel_pc
- ID(PCI_DEVICE_ID_INTEL_Q45_HB),
- ID(PCI_DEVICE_ID_INTEL_G45_HB),
- ID(PCI_DEVICE_ID_INTEL_G41_HB),
+diff -urNp linux-2.6.31.4/drivers/char/agp/intel-agp.c linux-2.6.31.4/drivers/char/agp/intel-agp.c
+--- linux-2.6.31.4/drivers/char/agp/intel-agp.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/agp/intel-agp.c 2009-10-11 15:29:42.119540059 -0400
+@@ -2411,7 +2411,7 @@ static struct pci_device_id agp_intel_pc
+ ID(PCI_DEVICE_ID_INTEL_IGDNG_D_HB),
+ ID(PCI_DEVICE_ID_INTEL_IGDNG_M_HB),
+ ID(PCI_DEVICE_ID_INTEL_IGDNG_MA_HB),
- { }
+ { 0, 0, 0, 0, 0, 0, 0 }
};
MODULE_DEVICE_TABLE(pci, agp_intel_pci_table);
-diff -urNp linux-2.6.30.8/drivers/char/apm-emulation.c linux-2.6.30.8/drivers/char/apm-emulation.c
---- linux-2.6.30.8/drivers/char/apm-emulation.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/apm-emulation.c 2009-07-30 09:48:10.002661044 -0400
+diff -urNp linux-2.6.31.4/drivers/char/apm-emulation.c linux-2.6.31.4/drivers/char/apm-emulation.c
+--- linux-2.6.31.4/drivers/char/apm-emulation.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/apm-emulation.c 2009-10-11 15:29:42.142760585 -0400
@@ -393,7 +393,7 @@ static int apm_open(struct inode * inode
return as ? 0 : -ENOMEM;
}
@@ -17632,9 +18712,9 @@ diff -urNp linux-2.6.30.8/drivers/char/apm-emulation.c linux-2.6.30.8/drivers/ch
.owner = THIS_MODULE,
.read = apm_read,
.poll = apm_poll,
-diff -urNp linux-2.6.30.8/drivers/char/bfin-otp.c linux-2.6.30.8/drivers/char/bfin-otp.c
---- linux-2.6.30.8/drivers/char/bfin-otp.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/bfin-otp.c 2009-07-30 09:48:10.003480690 -0400
+diff -urNp linux-2.6.31.4/drivers/char/bfin-otp.c linux-2.6.31.4/drivers/char/bfin-otp.c
+--- linux-2.6.31.4/drivers/char/bfin-otp.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/bfin-otp.c 2009-10-11 15:29:42.149403708 -0400
@@ -133,7 +133,7 @@ static ssize_t bfin_otp_write(struct fil
# define bfin_otp_write NULL
#endif
@@ -17644,9 +18724,9 @@ diff -urNp linux-2.6.30.8/drivers/char/bfin-otp.c linux-2.6.30.8/drivers/char/bf
.owner = THIS_MODULE,
.read = bfin_otp_read,
.write = bfin_otp_write,
-diff -urNp linux-2.6.30.8/drivers/char/hpet.c linux-2.6.30.8/drivers/char/hpet.c
---- linux-2.6.30.8/drivers/char/hpet.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/hpet.c 2009-07-30 09:48:10.003480690 -0400
+diff -urNp linux-2.6.31.4/drivers/char/hpet.c linux-2.6.31.4/drivers/char/hpet.c
+--- linux-2.6.31.4/drivers/char/hpet.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hpet.c 2009-10-11 15:29:42.154363785 -0400
@@ -995,7 +995,7 @@ static struct acpi_driver hpet_acpi_driv
},
};
@@ -17656,9 +18736,246 @@ diff -urNp linux-2.6.30.8/drivers/char/hpet.c linux-2.6.30.8/drivers/char/hpet.c
static int __init hpet_init(void)
{
-diff -urNp linux-2.6.30.8/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.30.8/drivers/char/ipmi/ipmi_msghandler.c
---- linux-2.6.30.8/drivers/char/ipmi/ipmi_msghandler.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/ipmi/ipmi_msghandler.c 2009-07-30 09:48:10.004509700 -0400
+diff -urNp linux-2.6.31.4/drivers/char/hvc_beat.c linux-2.6.31.4/drivers/char/hvc_beat.c
+--- linux-2.6.31.4/drivers/char/hvc_beat.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvc_beat.c 2009-10-11 15:29:56.593454350 -0400
+@@ -84,7 +84,7 @@ static int hvc_beat_put_chars(uint32_t v
+ return cnt;
+ }
+
+-static struct hv_ops hvc_beat_get_put_ops = {
++static const struct hv_ops hvc_beat_get_put_ops = {
+ .get_chars = hvc_beat_get_chars,
+ .put_chars = hvc_beat_put_chars,
+ };
+diff -urNp linux-2.6.31.4/drivers/char/hvc_console.c linux-2.6.31.4/drivers/char/hvc_console.c
+--- linux-2.6.31.4/drivers/char/hvc_console.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvc_console.c 2009-10-11 15:29:56.597362442 -0400
+@@ -125,7 +125,7 @@ static struct hvc_struct *hvc_get_by_ind
+ * console interfaces but can still be used as a tty device. This has to be
+ * static because kmalloc will not work during early console init.
+ */
+-static struct hv_ops *cons_ops[MAX_NR_HVC_CONSOLES];
++static const struct hv_ops *cons_ops[MAX_NR_HVC_CONSOLES];
+ static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] =
+ {[0 ... MAX_NR_HVC_CONSOLES - 1] = -1};
+
+@@ -247,7 +247,7 @@ static void destroy_hvc_struct(struct kr
+ * vty adapters do NOT get an hvc_instantiate() callback since they
+ * appear after early console init.
+ */
+-int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops)
++int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops)
+ {
+ struct hvc_struct *hp;
+
+@@ -751,7 +751,7 @@ static const struct tty_operations hvc_o
+ };
+
+ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
+- struct hv_ops *ops, int outbuf_size)
++ const struct hv_ops *ops, int outbuf_size)
+ {
+ struct hvc_struct *hp;
+ int i;
+diff -urNp linux-2.6.31.4/drivers/char/hvc_console.h linux-2.6.31.4/drivers/char/hvc_console.h
+--- linux-2.6.31.4/drivers/char/hvc_console.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvc_console.h 2009-10-11 15:29:56.622361882 -0400
+@@ -54,7 +54,7 @@ struct hvc_struct {
+ int outbuf_size;
+ int n_outbuf;
+ uint32_t vtermno;
+- struct hv_ops *ops;
++ const struct hv_ops *ops;
+ int irq_requested;
+ int data;
+ struct winsize ws;
+@@ -75,11 +75,11 @@ struct hv_ops {
+ };
+
+ /* Register a vterm and a slot index for use as a console (console_init) */
+-extern int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops);
++extern int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops);
+
+ /* register a vterm for hvc tty operation (module_init or hotplug add) */
+ extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int data,
+- struct hv_ops *ops, int outbuf_size);
++ const struct hv_ops *ops, int outbuf_size);
+ /* remove a vterm from hvc tty operation (module_exit or hotplug remove) */
+ extern int hvc_remove(struct hvc_struct *hp);
+
+diff -urNp linux-2.6.31.4/drivers/char/hvc_iseries.c linux-2.6.31.4/drivers/char/hvc_iseries.c
+--- linux-2.6.31.4/drivers/char/hvc_iseries.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvc_iseries.c 2009-10-11 15:29:56.623360664 -0400
+@@ -197,7 +197,7 @@ done:
+ return sent;
+ }
+
+-static struct hv_ops hvc_get_put_ops = {
++static const struct hv_ops hvc_get_put_ops = {
+ .get_chars = get_chars,
+ .put_chars = put_chars,
+ .notifier_add = notifier_add_irq,
+diff -urNp linux-2.6.31.4/drivers/char/hvc_iucv.c linux-2.6.31.4/drivers/char/hvc_iucv.c
+--- linux-2.6.31.4/drivers/char/hvc_iucv.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvc_iucv.c 2009-10-11 15:29:56.623360664 -0400
+@@ -920,7 +920,7 @@ static int hvc_iucv_pm_restore_thaw(stru
+
+
+ /* HVC operations */
+-static struct hv_ops hvc_iucv_ops = {
++static const struct hv_ops hvc_iucv_ops = {
+ .get_chars = hvc_iucv_get_chars,
+ .put_chars = hvc_iucv_put_chars,
+ .notifier_add = hvc_iucv_notifier_add,
+diff -urNp linux-2.6.31.4/drivers/char/hvc_rtas.c linux-2.6.31.4/drivers/char/hvc_rtas.c
+--- linux-2.6.31.4/drivers/char/hvc_rtas.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvc_rtas.c 2009-10-11 15:29:56.634628091 -0400
+@@ -71,7 +71,7 @@ static int hvc_rtas_read_console(uint32_
+ return i;
+ }
+
+-static struct hv_ops hvc_rtas_get_put_ops = {
++static const struct hv_ops hvc_rtas_get_put_ops = {
+ .get_chars = hvc_rtas_read_console,
+ .put_chars = hvc_rtas_write_console,
+ };
+diff -urNp linux-2.6.31.4/drivers/char/hvcs.c linux-2.6.31.4/drivers/char/hvcs.c
+--- linux-2.6.31.4/drivers/char/hvcs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvcs.c 2009-10-11 15:29:42.186621563 -0400
+@@ -269,7 +269,7 @@ struct hvcs_struct {
+ unsigned int index;
+
+ struct tty_struct *tty;
+- int open_count;
++ atomic_t open_count;
+
+ /*
+ * Used to tell the driver kernel_thread what operations need to take
+@@ -419,7 +419,7 @@ static ssize_t hvcs_vterm_state_store(st
+
+ spin_lock_irqsave(&hvcsd->lock, flags);
+
+- if (hvcsd->open_count > 0) {
++ if (atomic_read(&hvcsd->open_count) > 0) {
+ spin_unlock_irqrestore(&hvcsd->lock, flags);
+ printk(KERN_INFO "HVCS: vterm state unchanged. "
+ "The hvcs device node is still in use.\n");
+@@ -1135,7 +1135,7 @@ static int hvcs_open(struct tty_struct *
+ if ((retval = hvcs_partner_connect(hvcsd)))
+ goto error_release;
+
+- hvcsd->open_count = 1;
++ atomic_set(&hvcsd->open_count, 1);
+ hvcsd->tty = tty;
+ tty->driver_data = hvcsd;
+
+@@ -1169,7 +1169,7 @@ fast_open:
+
+ spin_lock_irqsave(&hvcsd->lock, flags);
+ kref_get(&hvcsd->kref);
+- hvcsd->open_count++;
++ atomic_inc(&hvcsd->open_count);
+ hvcsd->todo_mask |= HVCS_SCHED_READ;
+ spin_unlock_irqrestore(&hvcsd->lock, flags);
+
+@@ -1213,7 +1213,7 @@ static void hvcs_close(struct tty_struct
+ hvcsd = tty->driver_data;
+
+ spin_lock_irqsave(&hvcsd->lock, flags);
+- if (--hvcsd->open_count == 0) {
++ if (atomic_dec_and_test(&hvcsd->open_count)) {
+
+ vio_disable_interrupts(hvcsd->vdev);
+
+@@ -1239,10 +1239,10 @@ static void hvcs_close(struct tty_struct
+ free_irq(irq, hvcsd);
+ kref_put(&hvcsd->kref, destroy_hvcs_struct);
+ return;
+- } else if (hvcsd->open_count < 0) {
++ } else if (atomic_read(&hvcsd->open_count) < 0) {
+ printk(KERN_ERR "HVCS: vty-server@%X open_count: %d"
+ " is missmanaged.\n",
+- hvcsd->vdev->unit_address, hvcsd->open_count);
++ hvcsd->vdev->unit_address, atomic_read(&hvcsd->open_count));
+ }
+
+ spin_unlock_irqrestore(&hvcsd->lock, flags);
+@@ -1258,7 +1258,7 @@ static void hvcs_hangup(struct tty_struc
+
+ spin_lock_irqsave(&hvcsd->lock, flags);
+ /* Preserve this so that we know how many kref refs to put */
+- temp_open_count = hvcsd->open_count;
++ temp_open_count = atomic_read(&hvcsd->open_count);
+
+ /*
+ * Don't kref put inside the spinlock because the destruction
+@@ -1273,7 +1273,7 @@ static void hvcs_hangup(struct tty_struc
+ hvcsd->tty->driver_data = NULL;
+ hvcsd->tty = NULL;
+
+- hvcsd->open_count = 0;
++ atomic_set(&hvcsd->open_count, 0);
+
+ /* This will drop any buffered data on the floor which is OK in a hangup
+ * scenario. */
+@@ -1344,7 +1344,7 @@ static int hvcs_write(struct tty_struct
+ * the middle of a write operation? This is a crummy place to do this
+ * but we want to keep it all in the spinlock.
+ */
+- if (hvcsd->open_count <= 0) {
++ if (atomic_read(&hvcsd->open_count) <= 0) {
+ spin_unlock_irqrestore(&hvcsd->lock, flags);
+ return -ENODEV;
+ }
+@@ -1418,7 +1418,7 @@ static int hvcs_write_room(struct tty_st
+ {
+ struct hvcs_struct *hvcsd = tty->driver_data;
+
+- if (!hvcsd || hvcsd->open_count <= 0)
++ if (!hvcsd || atomic_read(&hvcsd->open_count) <= 0)
+ return 0;
+
+ return HVCS_BUFF_LEN - hvcsd->chars_in_buffer;
+diff -urNp linux-2.6.31.4/drivers/char/hvc_udbg.c linux-2.6.31.4/drivers/char/hvc_udbg.c
+--- linux-2.6.31.4/drivers/char/hvc_udbg.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvc_udbg.c 2009-10-11 15:29:56.634628091 -0400
+@@ -58,7 +58,7 @@ static int hvc_udbg_get(uint32_t vtermno
+ return i;
+ }
+
+-static struct hv_ops hvc_udbg_ops = {
++static const struct hv_ops hvc_udbg_ops = {
+ .get_chars = hvc_udbg_get,
+ .put_chars = hvc_udbg_put,
+ };
+diff -urNp linux-2.6.31.4/drivers/char/hvc_vio.c linux-2.6.31.4/drivers/char/hvc_vio.c
+--- linux-2.6.31.4/drivers/char/hvc_vio.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvc_vio.c 2009-10-11 15:29:56.635522130 -0400
+@@ -77,7 +77,7 @@ static int filtered_get_chars(uint32_t v
+ return got;
+ }
+
+-static struct hv_ops hvc_get_put_ops = {
++static const struct hv_ops hvc_get_put_ops = {
+ .get_chars = filtered_get_chars,
+ .put_chars = hvc_put_chars,
+ .notifier_add = notifier_add_irq,
+diff -urNp linux-2.6.31.4/drivers/char/hvc_xen.c linux-2.6.31.4/drivers/char/hvc_xen.c
+--- linux-2.6.31.4/drivers/char/hvc_xen.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/hvc_xen.c 2009-10-11 15:29:56.636398446 -0400
+@@ -97,7 +97,7 @@ static int read_console(uint32_t vtermno
+ return recv;
+ }
+
+-static struct hv_ops hvc_ops = {
++static const struct hv_ops hvc_ops = {
+ .get_chars = read_console,
+ .put_chars = write_console,
+ .notifier_add = notifier_add_irq,
+diff -urNp linux-2.6.31.4/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.31.4/drivers/char/ipmi/ipmi_msghandler.c
+--- linux-2.6.31.4/drivers/char/ipmi/ipmi_msghandler.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/ipmi/ipmi_msghandler.c 2009-10-11 15:29:42.205391419 -0400
@@ -413,7 +413,7 @@ struct ipmi_smi {
struct proc_dir_entry *proc_dir;
char proc_dir_name[10];
@@ -17668,18 +18985,30 @@ diff -urNp linux-2.6.30.8/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.30.8/dri
/*
* run_to_completion duplicate of smb_info, smi_info
-@@ -446,7 +446,7 @@ static DEFINE_MUTEX(smi_watchers_mutex);
+@@ -446,9 +446,9 @@ static DEFINE_MUTEX(smi_watchers_mutex);
#define ipmi_inc_stat(intf, stat) \
- atomic_inc(&(intf)->stats[IPMI_STAT_ ## stat])
+ atomic_inc_unchecked(&(intf)->stats[IPMI_STAT_ ## stat])
#define ipmi_get_stat(intf, stat) \
- ((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
+- ((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
++ ((unsigned int) atomic_read_unchecked(&(intf)->stats[IPMI_STAT_ ## stat]))
+
+ static int is_lan_addr(struct ipmi_addr *addr)
+ {
+@@ -2807,7 +2807,7 @@ int ipmi_register_smi(struct ipmi_smi_ha
+ INIT_LIST_HEAD(&intf->cmd_rcvrs);
+ init_waitqueue_head(&intf->waitq);
+ for (i = 0; i < IPMI_NUM_STATS; i++)
+- atomic_set(&intf->stats[i], 0);
++ atomic_set_unchecked(&intf->stats[i], 0);
-diff -urNp linux-2.6.30.8/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.30.8/drivers/char/ipmi/ipmi_si_intf.c
---- linux-2.6.30.8/drivers/char/ipmi/ipmi_si_intf.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/ipmi/ipmi_si_intf.c 2009-07-30 09:48:10.005414644 -0400
+ intf->proc_dir = NULL;
+
+diff -urNp linux-2.6.31.4/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.31.4/drivers/char/ipmi/ipmi_si_intf.c
+--- linux-2.6.31.4/drivers/char/ipmi/ipmi_si_intf.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/ipmi/ipmi_si_intf.c 2009-10-11 15:29:42.219429460 -0400
@@ -277,7 +277,7 @@ struct smi_info {
unsigned char slave_addr;
@@ -17689,18 +19018,30 @@ diff -urNp linux-2.6.30.8/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.30.8/driver
struct task_struct *thread;
-@@ -285,7 +285,7 @@ struct smi_info {
+@@ -285,9 +285,9 @@ struct smi_info {
};
#define smi_inc_stat(smi, stat) \
- atomic_inc(&(smi)->stats[SI_STAT_ ## stat])
+ atomic_inc_unchecked(&(smi)->stats[SI_STAT_ ## stat])
#define smi_get_stat(smi, stat) \
- ((unsigned int) atomic_read(&(smi)->stats[SI_STAT_ ## stat]))
-
-diff -urNp linux-2.6.30.8/drivers/char/keyboard.c linux-2.6.30.8/drivers/char/keyboard.c
---- linux-2.6.30.8/drivers/char/keyboard.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/keyboard.c 2009-07-30 11:10:48.982870250 -0400
+- ((unsigned int) atomic_read(&(smi)->stats[SI_STAT_ ## stat]))
++ ((unsigned int) atomic_read_unchecked(&(smi)->stats[SI_STAT_ ## stat]))
+
+ #define SI_MAX_PARMS 4
+
+@@ -2926,7 +2926,7 @@ static int try_smi_init(struct smi_info
+ atomic_set(&new_smi->req_events, 0);
+ new_smi->run_to_completion = 0;
+ for (i = 0; i < SI_NUM_STATS; i++)
+- atomic_set(&new_smi->stats[i], 0);
++ atomic_set_unchecked(&new_smi->stats[i], 0);
+
+ new_smi->interrupt_disabled = 0;
+ atomic_set(&new_smi->stop_operation, 0);
+diff -urNp linux-2.6.31.4/drivers/char/keyboard.c linux-2.6.31.4/drivers/char/keyboard.c
+--- linux-2.6.31.4/drivers/char/keyboard.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/keyboard.c 2009-10-11 15:29:42.233580689 -0400
@@ -635,6 +635,16 @@ static void k_spec(struct vc_data *vc, u
kbd->kbdmode == VC_MEDIUMRAW) &&
value != KVAL(K_SAK))
@@ -17718,7 +19059,7 @@ diff -urNp linux-2.6.30.8/drivers/char/keyboard.c linux-2.6.30.8/drivers/char/ke
fn_handler[value](vc);
}
-@@ -1388,7 +1398,7 @@ static const struct input_device_id kbd_
+@@ -1386,7 +1396,7 @@ static const struct input_device_id kbd_
.evbit = { BIT_MASK(EV_SND) },
},
@@ -17727,9 +19068,9 @@ diff -urNp linux-2.6.30.8/drivers/char/keyboard.c linux-2.6.30.8/drivers/char/ke
};
MODULE_DEVICE_TABLE(input, kbd_ids);
-diff -urNp linux-2.6.30.8/drivers/char/mem.c linux-2.6.30.8/drivers/char/mem.c
---- linux-2.6.30.8/drivers/char/mem.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/mem.c 2009-07-30 12:07:09.578070399 -0400
+diff -urNp linux-2.6.31.4/drivers/char/mem.c linux-2.6.31.4/drivers/char/mem.c
+--- linux-2.6.31.4/drivers/char/mem.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/mem.c 2009-10-11 15:29:42.244455659 -0400
@@ -18,6 +18,7 @@
#include <linux/raw.h>
#include <linux/tty.h>
@@ -17794,7 +19135,7 @@ diff -urNp linux-2.6.30.8/drivers/char/mem.c linux-2.6.30.8/drivers/char/mem.c
if (p < (unsigned long) high_memory) {
wrote = count;
-@@ -764,6 +784,16 @@ static loff_t memory_lseek(struct file *
+@@ -763,6 +783,16 @@ static loff_t memory_lseek(struct file *
static int open_port(struct inode * inode, struct file * filp)
{
@@ -17811,7 +19152,7 @@ diff -urNp linux-2.6.30.8/drivers/char/mem.c linux-2.6.30.8/drivers/char/mem.c
return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
}
-@@ -771,7 +801,6 @@ static int open_port(struct inode * inod
+@@ -770,7 +800,6 @@ static int open_port(struct inode * inod
#define full_lseek null_lseek
#define write_zero write_null
#define read_full read_zero
@@ -17819,31 +19160,19 @@ diff -urNp linux-2.6.30.8/drivers/char/mem.c linux-2.6.30.8/drivers/char/mem.c
#define open_kmem open_mem
#define open_oldmem open_mem
-@@ -911,6 +940,11 @@ static int memory_open(struct inode * in
- filp->f_op = &oldmem_fops;
- break;
- #endif
-+#if defined(CONFIG_GRKERNSEC) && !defined(CONFIG_GRKERNSEC_NO_RBAC)
-+ case 13:
-+ filp->f_op = &grsec_fops;
-+ break;
-+#endif
- default:
- unlock_kernel();
- return -ENXIO;
-@@ -947,6 +981,9 @@ static const struct {
+@@ -888,6 +917,9 @@ static const struct {
#ifdef CONFIG_CRASH_DUMP
- {12,"oldmem", S_IRUSR | S_IWUSR | S_IRGRP, &oldmem_fops},
+ {12,"oldmem", S_IRUSR | S_IWUSR | S_IRGRP, &oldmem_fops, NULL},
#endif
+#if defined(CONFIG_GRKERNSEC) && !defined(CONFIG_GRKERNSEC_NO_RBAC)
+ {13,"grsec", S_IRUSR | S_IWUGO, &grsec_fops},
+#endif
};
- static struct class *mem_class;
-diff -urNp linux-2.6.30.8/drivers/char/misc.c linux-2.6.30.8/drivers/char/misc.c
---- linux-2.6.30.8/drivers/char/misc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/misc.c 2009-07-30 09:48:10.006662764 -0400
+ static int memory_open(struct inode *inode, struct file *filp)
+diff -urNp linux-2.6.31.4/drivers/char/misc.c linux-2.6.31.4/drivers/char/misc.c
+--- linux-2.6.31.4/drivers/char/misc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/misc.c 2009-10-11 15:29:42.245366641 -0400
@@ -91,7 +91,7 @@ static int misc_seq_show(struct seq_file
}
@@ -17853,9 +19182,9 @@ diff -urNp linux-2.6.30.8/drivers/char/misc.c linux-2.6.30.8/drivers/char/misc.c
.start = misc_seq_start,
.next = misc_seq_next,
.stop = misc_seq_stop,
-diff -urNp linux-2.6.30.8/drivers/char/mspec.c linux-2.6.30.8/drivers/char/mspec.c
---- linux-2.6.30.8/drivers/char/mspec.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/mspec.c 2009-07-30 09:48:10.006662764 -0400
+diff -urNp linux-2.6.31.4/drivers/char/mspec.c linux-2.6.31.4/drivers/char/mspec.c
+--- linux-2.6.31.4/drivers/char/mspec.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/mspec.c 2009-10-11 15:29:42.256536393 -0400
@@ -239,7 +239,7 @@ mspec_fault(struct vm_area_struct *vma,
return VM_FAULT_NOPAGE;
}
@@ -17865,9 +19194,9 @@ diff -urNp linux-2.6.30.8/drivers/char/mspec.c linux-2.6.30.8/drivers/char/mspec
.open = mspec_open,
.close = mspec_close,
.fault = mspec_fault,
-diff -urNp linux-2.6.30.8/drivers/char/nvram.c linux-2.6.30.8/drivers/char/nvram.c
---- linux-2.6.30.8/drivers/char/nvram.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/nvram.c 2009-07-30 09:48:10.006662764 -0400
+diff -urNp linux-2.6.31.4/drivers/char/nvram.c linux-2.6.31.4/drivers/char/nvram.c
+--- linux-2.6.31.4/drivers/char/nvram.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/nvram.c 2009-10-11 15:29:42.263368352 -0400
@@ -429,7 +429,10 @@ static const struct file_operations nvra
static struct miscdevice nvram_dev = {
NVRAM_MINOR,
@@ -17880,9 +19209,126 @@ diff -urNp linux-2.6.30.8/drivers/char/nvram.c linux-2.6.30.8/drivers/char/nvram
};
static int __init nvram_init(void)
-diff -urNp linux-2.6.30.8/drivers/char/random.c linux-2.6.30.8/drivers/char/random.c
---- linux-2.6.30.8/drivers/char/random.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/random.c 2009-07-30 11:10:48.992521357 -0400
+diff -urNp linux-2.6.31.4/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.31.4/drivers/char/pcmcia/ipwireless/tty.c
+--- linux-2.6.31.4/drivers/char/pcmcia/ipwireless/tty.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/pcmcia/ipwireless/tty.c 2009-10-11 15:29:42.263368352 -0400
+@@ -51,7 +51,7 @@ struct ipw_tty {
+ int tty_type;
+ struct ipw_network *network;
+ struct tty_struct *linux_tty;
+- int open_count;
++ atomic_t open_count;
+ unsigned int control_lines;
+ struct mutex ipw_tty_mutex;
+ int tx_bytes_queued;
+@@ -127,10 +127,10 @@ static int ipw_open(struct tty_struct *l
+ mutex_unlock(&tty->ipw_tty_mutex);
+ return -ENODEV;
+ }
+- if (tty->open_count == 0)
++ if (atomic_read(&tty->open_count) == 0)
+ tty->tx_bytes_queued = 0;
+
+- tty->open_count++;
++ atomic_inc(&tty->open_count);
+
+ tty->linux_tty = linux_tty;
+ linux_tty->driver_data = tty;
+@@ -146,9 +146,7 @@ static int ipw_open(struct tty_struct *l
+
+ static void do_ipw_close(struct ipw_tty *tty)
+ {
+- tty->open_count--;
+-
+- if (tty->open_count == 0) {
++ if (atomic_dec_return(&tty->open_count) == 0) {
+ struct tty_struct *linux_tty = tty->linux_tty;
+
+ if (linux_tty != NULL) {
+@@ -169,7 +167,7 @@ static void ipw_hangup(struct tty_struct
+ return;
+
+ mutex_lock(&tty->ipw_tty_mutex);
+- if (tty->open_count == 0) {
++ if (atomic_read(&tty->open_count) == 0) {
+ mutex_unlock(&tty->ipw_tty_mutex);
+ return;
+ }
+@@ -198,7 +196,7 @@ void ipwireless_tty_received(struct ipw_
+ return;
+ }
+
+- if (!tty->open_count) {
++ if (!atomic_read(&tty->open_count)) {
+ mutex_unlock(&tty->ipw_tty_mutex);
+ return;
+ }
+@@ -240,7 +238,7 @@ static int ipw_write(struct tty_struct *
+ return -ENODEV;
+
+ mutex_lock(&tty->ipw_tty_mutex);
+- if (!tty->open_count) {
++ if (!atomic_read(&tty->open_count)) {
+ mutex_unlock(&tty->ipw_tty_mutex);
+ return -EINVAL;
+ }
+@@ -280,7 +278,7 @@ static int ipw_write_room(struct tty_str
+ if (!tty)
+ return -ENODEV;
+
+- if (!tty->open_count)
++ if (!atomic_read(&tty->open_count))
+ return -EINVAL;
+
+ room = IPWIRELESS_TX_QUEUE_SIZE - tty->tx_bytes_queued;
+@@ -322,7 +320,7 @@ static int ipw_chars_in_buffer(struct tt
+ if (!tty)
+ return 0;
+
+- if (!tty->open_count)
++ if (!atomic_read(&tty->open_count))
+ return 0;
+
+ return tty->tx_bytes_queued;
+@@ -403,7 +401,7 @@ static int ipw_tiocmget(struct tty_struc
+ if (!tty)
+ return -ENODEV;
+
+- if (!tty->open_count)
++ if (!atomic_read(&tty->open_count))
+ return -EINVAL;
+
+ return get_control_lines(tty);
+@@ -419,7 +417,7 @@ ipw_tiocmset(struct tty_struct *linux_tt
+ if (!tty)
+ return -ENODEV;
+
+- if (!tty->open_count)
++ if (!atomic_read(&tty->open_count))
+ return -EINVAL;
+
+ return set_control_lines(tty, set, clear);
+@@ -433,7 +431,7 @@ static int ipw_ioctl(struct tty_struct *
+ if (!tty)
+ return -ENODEV;
+
+- if (!tty->open_count)
++ if (!atomic_read(&tty->open_count))
+ return -EINVAL;
+
+ /* FIXME: Exactly how is the tty object locked here .. */
+@@ -591,7 +589,7 @@ void ipwireless_tty_free(struct ipw_tty
+ against a parallel ioctl etc */
+ mutex_lock(&ttyj->ipw_tty_mutex);
+ }
+- while (ttyj->open_count)
++ while (atomic_read(&ttyj->open_count))
+ do_ipw_close(ttyj);
+ ipwireless_disassociate_network_ttys(network,
+ ttyj->channel_idx);
+diff -urNp linux-2.6.31.4/drivers/char/random.c linux-2.6.31.4/drivers/char/random.c
+--- linux-2.6.31.4/drivers/char/random.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/random.c 2009-10-11 15:29:42.274496328 -0400
@@ -253,8 +253,13 @@
/*
* Configuration information
@@ -17924,10 +19370,71 @@ diff -urNp linux-2.6.30.8/drivers/char/random.c linux-2.6.30.8/drivers/char/rand
static int max_write_thresh = INPUT_POOL_WORDS * 32;
static char sysctl_bootid[16];
-diff -urNp linux-2.6.30.8/drivers/char/tpm/tpm_bios.c linux-2.6.30.8/drivers/char/tpm/tpm_bios.c
---- linux-2.6.30.8/drivers/char/tpm/tpm_bios.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/tpm/tpm_bios.c 2009-07-30 09:48:10.007651841 -0400
-@@ -343,14 +343,14 @@ static int tpm_ascii_bios_measurements_s
+diff -urNp linux-2.6.31.4/drivers/char/sonypi.c linux-2.6.31.4/drivers/char/sonypi.c
+--- linux-2.6.31.4/drivers/char/sonypi.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/sonypi.c 2009-10-11 15:29:42.283364069 -0400
+@@ -490,7 +490,7 @@ static struct sonypi_device {
+ spinlock_t fifo_lock;
+ wait_queue_head_t fifo_proc_list;
+ struct fasync_struct *fifo_async;
+- int open_count;
++ atomic_t open_count;
+ int model;
+ struct input_dev *input_jog_dev;
+ struct input_dev *input_key_dev;
+@@ -894,7 +894,7 @@ static int sonypi_misc_fasync(int fd, st
+ static int sonypi_misc_release(struct inode *inode, struct file *file)
+ {
+ mutex_lock(&sonypi_device.lock);
+- sonypi_device.open_count--;
++ atomic_dec(&sonypi_device.open_count);
+ mutex_unlock(&sonypi_device.lock);
+ return 0;
+ }
+@@ -904,9 +904,9 @@ static int sonypi_misc_open(struct inode
+ lock_kernel();
+ mutex_lock(&sonypi_device.lock);
+ /* Flush input queue on first open */
+- if (!sonypi_device.open_count)
++ if (!atomic_read(&sonypi_device.open_count))
+ kfifo_reset(sonypi_device.fifo);
+- sonypi_device.open_count++;
++ atomic_inc(&sonypi_device.open_count);
+ mutex_unlock(&sonypi_device.lock);
+ unlock_kernel();
+ return 0;
+diff -urNp linux-2.6.31.4/drivers/char/tpm/tpm_bios.c linux-2.6.31.4/drivers/char/tpm/tpm_bios.c
+--- linux-2.6.31.4/drivers/char/tpm/tpm_bios.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/tpm/tpm_bios.c 2009-10-18 10:15:00.940967436 -0400
+@@ -172,7 +172,7 @@ static void *tpm_bios_measurements_start
+ event = addr;
+
+ if ((event->event_type == 0 && event->event_size == 0) ||
+- ((addr + sizeof(struct tcpa_event) + event->event_size) >= limit))
++ (event->event_size >= limit - addr - sizeof(struct tcpa_event)))
+ return NULL;
+
+ return addr;
+@@ -197,7 +197,7 @@ static void *tpm_bios_measurements_next(
+ return NULL;
+
+ if ((event->event_type == 0 && event->event_size == 0) ||
+- ((v + sizeof(struct tcpa_event) + event->event_size) >= limit))
++ (event->event_size >= limit - v - sizeof(struct tcpa_event)))
+ return NULL;
+
+ (*pos)++;
+@@ -290,7 +290,8 @@ static int tpm_binary_bios_measurements_
+ int i;
+
+ for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++)
+- seq_putc(m, data[i]);
++ if (!seq_putc(m, data[i]))
++ return -EFAULT;
+
+ return 0;
+ }
+@@ -343,14 +344,14 @@ static int tpm_ascii_bios_measurements_s
return 0;
}
@@ -17944,10 +19451,31 @@ diff -urNp linux-2.6.30.8/drivers/char/tpm/tpm_bios.c linux-2.6.30.8/drivers/cha
.start = tpm_bios_measurements_start,
.next = tpm_bios_measurements_next,
.stop = tpm_bios_measurements_stop,
-diff -urNp linux-2.6.30.8/drivers/char/tty_ldisc.c linux-2.6.30.8/drivers/char/tty_ldisc.c
---- linux-2.6.30.8/drivers/char/tty_ldisc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/tty_ldisc.c 2009-07-30 09:48:10.008436205 -0400
-@@ -73,7 +73,7 @@ int tty_register_ldisc(int disc, struct
+@@ -409,6 +410,11 @@ static int read_log(struct tpm_bios_log
+ log->bios_event_log_end = log->bios_event_log + len;
+
+ virt = acpi_os_map_memory(start, len);
++ if (!virt) {
++ kfree(log->bios_event_log);
++ log->bios_event_log = NULL;
++ return -EFAULT;
++ }
+
+ memcpy(log->bios_event_log, virt, len);
+
+diff -urNp linux-2.6.31.4/drivers/char/tty_ldisc.c linux-2.6.31.4/drivers/char/tty_ldisc.c
+--- linux-2.6.31.4/drivers/char/tty_ldisc.c 2009-10-12 23:26:17.710631970 -0400
++++ linux-2.6.31.4/drivers/char/tty_ldisc.c 2009-10-12 23:26:38.914481208 -0400
+@@ -73,7 +73,7 @@ static void put_ldisc(struct tty_ldisc *
+ if (atomic_dec_and_lock(&ld->users, &tty_ldisc_lock)) {
+ struct tty_ldisc_ops *ldo = ld->ops;
+
+- ldo->refcount--;
++ atomic_dec(&ldo->refcount);
+ module_put(ldo->owner);
+ spin_unlock_irqrestore(&tty_ldisc_lock, flags);
+
+@@ -107,7 +107,7 @@ int tty_register_ldisc(int disc, struct
spin_lock_irqsave(&tty_ldisc_lock, flags);
tty_ldiscs[disc] = new_ldisc;
new_ldisc->num = disc;
@@ -17956,7 +19484,7 @@ diff -urNp linux-2.6.30.8/drivers/char/tty_ldisc.c linux-2.6.30.8/drivers/char/t
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
return ret;
-@@ -101,7 +101,7 @@ int tty_unregister_ldisc(int disc)
+@@ -135,7 +135,7 @@ int tty_unregister_ldisc(int disc)
return -EINVAL;
spin_lock_irqsave(&tty_ldisc_lock, flags);
@@ -17965,112 +19493,19 @@ diff -urNp linux-2.6.30.8/drivers/char/tty_ldisc.c linux-2.6.30.8/drivers/char/t
ret = -EBUSY;
else
tty_ldiscs[disc] = NULL;
-@@ -138,7 +138,7 @@ static int tty_ldisc_try_get(int disc, s
+@@ -175,7 +175,7 @@ static struct tty_ldisc *tty_ldisc_try_g
err = -EAGAIN;
else {
/* lock it */
- ldops->refcount++;
+ atomic_inc(&ldops->refcount);
ld->ops = ldops;
+ atomic_set(&ld->users, 1);
err = 0;
- }
-@@ -195,8 +195,8 @@ static void tty_ldisc_put(struct tty_ldi
-
- spin_lock_irqsave(&tty_ldisc_lock, flags);
- ld = tty_ldiscs[disc];
-- BUG_ON(ld->refcount == 0);
-- ld->refcount--;
-+ BUG_ON(atomic_read(&ld->refcount) == 0);
-+ atomic_dec(&ld->refcount);
- module_put(ld->owner);
- spin_unlock_irqrestore(&tty_ldisc_lock, flags);
- }
-@@ -263,7 +263,7 @@ const struct file_operations tty_ldiscs_
-
- static void tty_ldisc_assign(struct tty_struct *tty, struct tty_ldisc *ld)
- {
-- ld->refcount = 0;
-+ atomic_set(&ld->refcount, 0);
- tty->ldisc = *ld;
- }
-
-@@ -288,7 +288,7 @@ static int tty_ldisc_try(struct tty_stru
- spin_lock_irqsave(&tty_ldisc_lock, flags);
- ld = &tty->ldisc;
- if (test_bit(TTY_LDISC, &tty->flags)) {
-- ld->refcount++;
-+ atomic_inc(&ld->refcount);
- ret = 1;
- }
- spin_unlock_irqrestore(&tty_ldisc_lock, flags);
-@@ -315,7 +315,7 @@ struct tty_ldisc *tty_ldisc_ref_wait(str
- {
- /* wait_event is a macro */
- wait_event(tty_ldisc_wait, tty_ldisc_try(tty));
-- WARN_ON(tty->ldisc.refcount == 0);
-+ WARN_ON(atomic_read(&tty->ldisc.refcount) == 0);
- return &tty->ldisc;
- }
-
-@@ -358,11 +358,9 @@ void tty_ldisc_deref(struct tty_ldisc *l
- BUG_ON(ld == NULL);
-
- spin_lock_irqsave(&tty_ldisc_lock, flags);
-- if (ld->refcount == 0)
-+ if (!atomic_add_unless(&ld->refcount, -1, 0))
- printk(KERN_ERR "tty_ldisc_deref: no references.\n");
-- else
-- ld->refcount--;
-- if (ld->refcount == 0)
-+ if (atomic_read(&ld->refcount) == 0)
- wake_up(&tty_ldisc_wait);
- spin_unlock_irqrestore(&tty_ldisc_lock, flags);
- }
-@@ -506,8 +504,8 @@ restart:
- clear_bit(TTY_LDISC, &o_tty->flags);
-
- spin_lock_irqsave(&tty_ldisc_lock, flags);
-- if (tty->ldisc.refcount || (o_tty && o_tty->ldisc.refcount)) {
-- if (tty->ldisc.refcount) {
-+ if (atomic_read(&tty->ldisc.refcount) || (o_tty && atomic_read(&o_tty->ldisc.refcount))) {
-+ if (atomic_read(&tty->ldisc.refcount)) {
- /* Free the new ldisc we grabbed. Must drop the lock
- first. */
- spin_unlock_irqrestore(&tty_ldisc_lock, flags);
-@@ -519,14 +517,14 @@ restart:
- * and retries if we made tty_ldisc_wait() smarter.
- * That is up for discussion.
- */
-- if (wait_event_interruptible(tty_ldisc_wait, tty->ldisc.refcount == 0) < 0)
-+ if (wait_event_interruptible(tty_ldisc_wait, atomic_read(&tty->ldisc.refcount) == 0) < 0)
- return -ERESTARTSYS;
- goto restart;
- }
-- if (o_tty && o_tty->ldisc.refcount) {
-+ if (o_tty && atomic_read(&o_tty->ldisc.refcount)) {
- spin_unlock_irqrestore(&tty_ldisc_lock, flags);
- tty_ldisc_put(o_tty->ldisc.ops);
-- if (wait_event_interruptible(tty_ldisc_wait, o_tty->ldisc.refcount == 0) < 0)
-+ if (wait_event_interruptible(tty_ldisc_wait, atomic_read(&o_tty->ldisc.refcount) == 0) < 0)
- return -ERESTARTSYS;
- goto restart;
- }
-@@ -669,9 +667,9 @@ void tty_ldisc_release(struct tty_struct
- * side is zero.
- */
- spin_lock_irqsave(&tty_ldisc_lock, flags);
-- while (tty->ldisc.refcount) {
-+ while (atomic_read(&tty->ldisc.refcount)) {
- spin_unlock_irqrestore(&tty_ldisc_lock, flags);
-- wait_event(tty_ldisc_wait, tty->ldisc.refcount == 0);
-+ wait_event(tty_ldisc_wait, atomic_read(&tty->ldisc.refcount) == 0);
- spin_lock_irqsave(&tty_ldisc_lock, flags);
- }
- spin_unlock_irqrestore(&tty_ldisc_lock, flags);
-diff -urNp linux-2.6.30.8/drivers/char/vt_ioctl.c linux-2.6.30.8/drivers/char/vt_ioctl.c
---- linux-2.6.30.8/drivers/char/vt_ioctl.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/vt_ioctl.c 2009-07-30 11:10:49.002716445 -0400
-@@ -96,6 +96,12 @@ do_kdsk_ioctl(int cmd, struct kbentry __
+diff -urNp linux-2.6.31.4/drivers/char/vt_ioctl.c linux-2.6.31.4/drivers/char/vt_ioctl.c
+--- linux-2.6.31.4/drivers/char/vt_ioctl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/vt_ioctl.c 2009-10-11 15:29:42.320396774 -0400
+@@ -97,6 +97,12 @@ do_kdsk_ioctl(int cmd, struct kbentry __
case KDSKBENT:
if (!perm)
return -EPERM;
@@ -18083,7 +19518,7 @@ diff -urNp linux-2.6.30.8/drivers/char/vt_ioctl.c linux-2.6.30.8/drivers/char/vt
if (!i && v == K_NOSUCHMAP) {
/* deallocate map */
key_map = key_maps[s];
-@@ -236,6 +242,13 @@ do_kdgkb_ioctl(int cmd, struct kbsentry
+@@ -237,6 +243,13 @@ do_kdgkb_ioctl(int cmd, struct kbsentry
goto reterr;
}
@@ -18097,9 +19532,9 @@ diff -urNp linux-2.6.30.8/drivers/char/vt_ioctl.c linux-2.6.30.8/drivers/char/vt
q = func_table[i];
first_free = funcbufptr + (funcbufsize - funcbufleft);
for (j = i+1; j < MAX_NR_FUNC && !func_table[j]; j++)
-diff -urNp linux-2.6.30.8/drivers/char/xilinx_hwicap/xilinx_hwicap.c linux-2.6.30.8/drivers/char/xilinx_hwicap/xilinx_hwicap.c
---- linux-2.6.30.8/drivers/char/xilinx_hwicap/xilinx_hwicap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/char/xilinx_hwicap/xilinx_hwicap.c 2009-07-30 09:48:10.008436205 -0400
+diff -urNp linux-2.6.31.4/drivers/char/xilinx_hwicap/xilinx_hwicap.c linux-2.6.31.4/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+--- linux-2.6.31.4/drivers/char/xilinx_hwicap/xilinx_hwicap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/char/xilinx_hwicap/xilinx_hwicap.c 2009-10-11 15:29:42.328499471 -0400
@@ -559,7 +559,7 @@ static int hwicap_release(struct inode *
return status;
}
@@ -18109,10 +19544,10 @@ diff -urNp linux-2.6.30.8/drivers/char/xilinx_hwicap/xilinx_hwicap.c linux-2.6.3
.owner = THIS_MODULE,
.write = hwicap_write,
.read = hwicap_read,
-diff -urNp linux-2.6.30.8/drivers/edac/edac_core.h linux-2.6.30.8/drivers/edac/edac_core.h
---- linux-2.6.30.8/drivers/edac/edac_core.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/edac/edac_core.h 2009-07-30 09:48:10.008436205 -0400
-@@ -98,11 +98,11 @@ extern int edac_debug_level;
+diff -urNp linux-2.6.31.4/drivers/edac/edac_core.h linux-2.6.31.4/drivers/edac/edac_core.h
+--- linux-2.6.31.4/drivers/edac/edac_core.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/edac/edac_core.h 2009-10-11 15:29:42.625694104 -0400
+@@ -99,11 +99,11 @@ extern int edac_debug_level;
#else /* !CONFIG_EDAC_DEBUG */
@@ -18129,9 +19564,9 @@ diff -urNp linux-2.6.30.8/drivers/edac/edac_core.h linux-2.6.30.8/drivers/edac/e
#endif /* !CONFIG_EDAC_DEBUG */
-diff -urNp linux-2.6.30.8/drivers/firmware/dmi_scan.c linux-2.6.30.8/drivers/firmware/dmi_scan.c
---- linux-2.6.30.8/drivers/firmware/dmi_scan.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/firmware/dmi_scan.c 2009-07-30 09:48:10.009412825 -0400
+diff -urNp linux-2.6.31.4/drivers/firmware/dmi_scan.c linux-2.6.31.4/drivers/firmware/dmi_scan.c
+--- linux-2.6.31.4/drivers/firmware/dmi_scan.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/firmware/dmi_scan.c 2009-10-11 15:29:42.633362379 -0400
@@ -391,11 +391,6 @@ void __init dmi_scan_machine(void)
}
}
@@ -18144,9 +19579,9 @@ diff -urNp linux-2.6.30.8/drivers/firmware/dmi_scan.c linux-2.6.30.8/drivers/fir
p = dmi_ioremap(0xF0000, 0x10000);
if (p == NULL)
goto error;
-diff -urNp linux-2.6.30.8/drivers/gpio/gpiolib.c linux-2.6.30.8/drivers/gpio/gpiolib.c
---- linux-2.6.30.8/drivers/gpio/gpiolib.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/gpio/gpiolib.c 2009-07-30 09:48:10.009412825 -0400
+diff -urNp linux-2.6.31.4/drivers/gpio/gpiolib.c linux-2.6.31.4/drivers/gpio/gpiolib.c
+--- linux-2.6.31.4/drivers/gpio/gpiolib.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpio/gpiolib.c 2009-10-11 15:29:42.645381456 -0400
@@ -1244,7 +1244,7 @@ static int gpiolib_open(struct inode *in
return single_open(file, gpiolib_show, NULL);
}
@@ -18156,10 +19591,10 @@ diff -urNp linux-2.6.30.8/drivers/gpio/gpiolib.c linux-2.6.30.8/drivers/gpio/gpi
.open = gpiolib_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.30.8/drivers/gpu/drm/drm_drv.c linux-2.6.30.8/drivers/gpu/drm/drm_drv.c
---- linux-2.6.30.8/drivers/gpu/drm/drm_drv.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/gpu/drm/drm_drv.c 2009-07-30 09:48:10.010417819 -0400
-@@ -425,7 +425,7 @@ int drm_ioctl(struct inode *inode, struc
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/drm_drv.c linux-2.6.31.4/drivers/gpu/drm/drm_drv.c
+--- linux-2.6.31.4/drivers/gpu/drm/drm_drv.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/drm_drv.c 2009-10-11 15:29:42.654462132 -0400
+@@ -417,7 +417,7 @@ int drm_ioctl(struct inode *inode, struc
char *kdata = NULL;
atomic_inc(&dev->ioctl_count);
@@ -18168,9 +19603,18 @@ diff -urNp linux-2.6.30.8/drivers/gpu/drm/drm_drv.c linux-2.6.30.8/drivers/gpu/d
++file_priv->ioctl_count;
DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
-diff -urNp linux-2.6.30.8/drivers/gpu/drm/drm_fops.c linux-2.6.30.8/drivers/gpu/drm/drm_fops.c
---- linux-2.6.30.8/drivers/gpu/drm/drm_fops.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/gpu/drm/drm_fops.c 2009-07-30 09:48:10.010417819 -0400
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/drm_fops.c linux-2.6.31.4/drivers/gpu/drm/drm_fops.c
+--- linux-2.6.31.4/drivers/gpu/drm/drm_fops.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/drm_fops.c 2009-10-11 15:29:42.659366095 -0400
+@@ -66,7 +66,7 @@ static int drm_setup(struct drm_device *
+ }
+
+ for (i = 0; i < ARRAY_SIZE(dev->counts); i++)
+- atomic_set(&dev->counts[i], 0);
++ atomic_set_unchecked(&dev->counts[i], 0);
+
+ dev->sigdata.lock = NULL;
+
@@ -130,9 +130,9 @@ int drm_open(struct inode *inode, struct
retcode = drm_open_helper(inode, filp, dev);
@@ -18213,9 +19657,21 @@ diff -urNp linux-2.6.30.8/drivers/gpu/drm/drm_fops.c linux-2.6.30.8/drivers/gpu/
if (atomic_read(&dev->ioctl_count)) {
DRM_ERROR("Device busy: %d\n",
atomic_read(&dev->ioctl_count));
-diff -urNp linux-2.6.30.8/drivers/gpu/drm/drm_lock.c linux-2.6.30.8/drivers/gpu/drm/drm_lock.c
---- linux-2.6.30.8/drivers/gpu/drm/drm_lock.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/gpu/drm/drm_lock.c 2009-07-30 09:48:10.010417819 -0400
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/drm_ioctl.c linux-2.6.31.4/drivers/gpu/drm/drm_ioctl.c
+--- linux-2.6.31.4/drivers/gpu/drm/drm_ioctl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/drm_ioctl.c 2009-10-11 15:29:42.670600481 -0400
+@@ -283,7 +283,7 @@ int drm_getstats(struct drm_device *dev,
+ stats->data[i].value =
+ (file_priv->master->lock.hw_lock ? file_priv->master->lock.hw_lock->lock : 0);
+ else
+- stats->data[i].value = atomic_read(&dev->counts[i]);
++ stats->data[i].value = atomic_read_unchecked(&dev->counts[i]);
+ stats->data[i].type = dev->types[i];
+ }
+
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/drm_lock.c linux-2.6.31.4/drivers/gpu/drm/drm_lock.c
+--- linux-2.6.31.4/drivers/gpu/drm/drm_lock.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/drm_lock.c 2009-10-11 15:29:42.671364495 -0400
@@ -87,7 +87,7 @@ int drm_lock(struct drm_device *dev, voi
if (drm_lock_take(&master->lock, lock->context)) {
master->lock.file_priv = file_priv;
@@ -18234,9 +19690,9 @@ diff -urNp linux-2.6.30.8/drivers/gpu/drm/drm_lock.c linux-2.6.30.8/drivers/gpu/
/* kernel_context_switch isn't used by any of the x86 drm
* modules but is required by the Sparc driver.
-diff -urNp linux-2.6.30.8/drivers/gpu/drm/drm_vm.c linux-2.6.30.8/drivers/gpu/drm/drm_vm.c
---- linux-2.6.30.8/drivers/gpu/drm/drm_vm.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/gpu/drm/drm_vm.c 2009-07-30 09:48:10.011410038 -0400
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/drm_vm.c linux-2.6.31.4/drivers/gpu/drm/drm_vm.c
+--- linux-2.6.31.4/drivers/gpu/drm/drm_vm.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/drm_vm.c 2009-10-11 15:29:42.681494190 -0400
@@ -369,28 +369,28 @@ static int drm_vm_sg_fault(struct vm_are
}
@@ -18270,10 +19726,10 @@ diff -urNp linux-2.6.30.8/drivers/gpu/drm/drm_vm.c linux-2.6.30.8/drivers/gpu/dr
.fault = drm_vm_sg_fault,
.open = drm_vm_open,
.close = drm_vm_close,
-diff -urNp linux-2.6.30.8/drivers/gpu/drm/i810/i810_dma.c linux-2.6.30.8/drivers/gpu/drm/i810/i810_dma.c
---- linux-2.6.30.8/drivers/gpu/drm/i810/i810_dma.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/gpu/drm/i810/i810_dma.c 2009-07-30 09:48:10.011410038 -0400
-@@ -954,8 +954,8 @@ static int i810_dma_vertex(struct drm_de
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/i810/i810_dma.c linux-2.6.31.4/drivers/gpu/drm/i810/i810_dma.c
+--- linux-2.6.31.4/drivers/gpu/drm/i810/i810_dma.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/i810/i810_dma.c 2009-10-11 15:29:42.692564293 -0400
+@@ -952,8 +952,8 @@ static int i810_dma_vertex(struct drm_de
dma->buflist[vertex->idx],
vertex->discard, vertex->used);
@@ -18284,7 +19740,7 @@ diff -urNp linux-2.6.30.8/drivers/gpu/drm/i810/i810_dma.c linux-2.6.30.8/drivers
sarea_priv->last_enqueue = dev_priv->counter - 1;
sarea_priv->last_dispatch = (int)hw_status[5];
-@@ -1117,8 +1117,8 @@ static int i810_dma_mc(struct drm_device
+@@ -1115,8 +1115,8 @@ static int i810_dma_mc(struct drm_device
i810_dma_dispatch_mc(dev, dma->buflist[mc->idx], mc->used,
mc->last_render);
@@ -18295,10 +19751,10 @@ diff -urNp linux-2.6.30.8/drivers/gpu/drm/i810/i810_dma.c linux-2.6.30.8/drivers
sarea_priv->last_enqueue = dev_priv->counter - 1;
sarea_priv->last_dispatch = (int)hw_status[5];
-diff -urNp linux-2.6.30.8/drivers/gpu/drm/i915/i915_drv.c linux-2.6.30.8/drivers/gpu/drm/i915/i915_drv.c
---- linux-2.6.30.8/drivers/gpu/drm/i915/i915_drv.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/gpu/drm/i915/i915_drv.c 2009-07-30 12:07:09.579971370 -0400
-@@ -149,7 +149,7 @@ i915_pci_resume(struct pci_dev *pdev)
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/i915/i915_drv.c linux-2.6.31.4/drivers/gpu/drm/i915/i915_drv.c
+--- linux-2.6.31.4/drivers/gpu/drm/i915/i915_drv.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/i915/i915_drv.c 2009-10-11 15:29:42.693483643 -0400
+@@ -152,7 +152,7 @@ i915_pci_resume(struct pci_dev *pdev)
return i915_resume(dev);
}
@@ -18307,9 +19763,194 @@ diff -urNp linux-2.6.30.8/drivers/gpu/drm/i915/i915_drv.c linux-2.6.30.8/drivers
.fault = i915_gem_fault,
.open = drm_gem_vm_open,
.close = drm_gem_vm_close,
-diff -urNp linux-2.6.30.8/drivers/hwmon/fschmd.c linux-2.6.30.8/drivers/hwmon/fschmd.c
---- linux-2.6.30.8/drivers/hwmon/fschmd.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/hwmon/fschmd.c 2009-07-30 09:48:10.011410038 -0400
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_atombios.c linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_atombios.c
+--- linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_atombios.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_atombios.c 2009-10-11 15:29:42.704778896 -0400
+@@ -425,13 +425,13 @@ bool radeon_get_atom_connector_info_from
+ return true;
+ }
+
+-struct bios_connector {
++static struct bios_connector {
+ bool valid;
+ uint8_t line_mux;
+ uint16_t devices;
+ int connector_type;
+ struct radeon_i2c_bus_rec ddc_bus;
+-};
++} bios_connectors[ATOM_MAX_SUPPORTED_DEVICE];;
+
+ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
+ drm_device
+@@ -447,7 +447,6 @@ bool radeon_get_atom_connector_info_from
+ uint8_t dac;
+ union atom_supported_devices *supported_devices;
+ int i, j;
+- struct bios_connector bios_connectors[ATOM_MAX_SUPPORTED_DEVICE];
+
+ atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset);
+
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_state.c linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_state.c
+--- linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_state.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_state.c 2009-10-11 15:29:42.719362199 -0400
+@@ -3007,7 +3007,7 @@ static int radeon_cp_getparam(struct drm
+ {
+ drm_radeon_private_t *dev_priv = dev->dev_private;
+ drm_radeon_getparam_t *param = data;
+- int value;
++ int value = 0;
+
+ DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
+
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_ttm.c
+--- linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_ttm.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/radeon/radeon_ttm.c 2009-10-11 15:29:42.732437297 -0400
+@@ -500,27 +500,10 @@ void radeon_ttm_fini(struct radeon_devic
+ DRM_INFO("radeon: ttm finalized\n");
+ }
+
+-static struct vm_operations_struct radeon_ttm_vm_ops;
+-static struct vm_operations_struct *ttm_vm_ops = NULL;
+-
+-static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+-{
+- struct ttm_buffer_object *bo;
+- int r;
+-
+- bo = (struct ttm_buffer_object *)vma->vm_private_data;
+- if (bo == NULL) {
+- return VM_FAULT_NOPAGE;
+- }
+- r = ttm_vm_ops->fault(vma, vmf);
+- return r;
+-}
+-
+ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
+ {
+ struct drm_file *file_priv;
+ struct radeon_device *rdev;
+- int r;
+
+ if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) {
+ return drm_mmap(filp, vma);
+@@ -528,20 +511,9 @@ int radeon_mmap(struct file *filp, struc
+
+ file_priv = (struct drm_file *)filp->private_data;
+ rdev = file_priv->minor->dev->dev_private;
+- if (rdev == NULL) {
++ if (!rdev)
+ return -EINVAL;
+- }
+- r = ttm_bo_mmap(filp, vma, &rdev->mman.bdev);
+- if (unlikely(r != 0)) {
+- return r;
+- }
+- if (unlikely(ttm_vm_ops == NULL)) {
+- ttm_vm_ops = vma->vm_ops;
+- radeon_ttm_vm_ops = *ttm_vm_ops;
+- radeon_ttm_vm_ops.fault = &radeon_ttm_fault;
+- }
+- vma->vm_ops = &radeon_ttm_vm_ops;
+- return 0;
++ return ttm_bo_mmap(filp, vma, &rdev->mman.bdev);
+ }
+
+
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/ttm/ttm_bo_vm.c linux-2.6.31.4/drivers/gpu/drm/ttm/ttm_bo_vm.c
+--- linux-2.6.31.4/drivers/gpu/drm/ttm/ttm_bo_vm.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/ttm/ttm_bo_vm.c 2009-10-11 15:29:42.735410455 -0400
+@@ -73,7 +73,7 @@ static int ttm_bo_vm_fault(struct vm_are
+ {
+ struct ttm_buffer_object *bo = (struct ttm_buffer_object *)
+ vma->vm_private_data;
+- struct ttm_bo_device *bdev = bo->bdev;
++ struct ttm_bo_device *bdev;
+ unsigned long bus_base;
+ unsigned long bus_offset;
+ unsigned long bus_size;
+@@ -88,6 +88,10 @@ static int ttm_bo_vm_fault(struct vm_are
+ unsigned long address = (unsigned long)vmf->virtual_address;
+ int retval = VM_FAULT_NOPAGE;
+
++ if (!bo)
++ return VM_FAULT_NOPAGE;
++ bdev = bo->bdev;
++
+ /*
+ * Work around locking order reversal in fault / nopfn
+ * between mmap_sem and bo_reserve: Perform a trylock operation
+@@ -228,7 +232,7 @@ static void ttm_bo_vm_close(struct vm_ar
+ vma->vm_private_data = NULL;
+ }
+
+-static struct vm_operations_struct ttm_bo_vm_ops = {
++static const struct vm_operations_struct ttm_bo_vm_ops = {
+ .fault = ttm_bo_vm_fault,
+ .open = ttm_bo_vm_open,
+ .close = ttm_bo_vm_close
+diff -urNp linux-2.6.31.4/drivers/gpu/drm/ttm/ttm_global.c linux-2.6.31.4/drivers/gpu/drm/ttm/ttm_global.c
+--- linux-2.6.31.4/drivers/gpu/drm/ttm/ttm_global.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/gpu/drm/ttm/ttm_global.c 2009-10-18 10:09:07.093644495 -0400
+@@ -36,7 +36,7 @@
+ struct ttm_global_item {
+ struct mutex mutex;
+ void *object;
+- int refcount;
++ atomic_t refcount;
+ };
+
+ static struct ttm_global_item glob[TTM_GLOBAL_NUM];
+@@ -49,7 +49,7 @@ void ttm_global_init(void)
+ struct ttm_global_item *item = &glob[i];
+ mutex_init(&item->mutex);
+ item->object = NULL;
+- item->refcount = 0;
++ atomic_set(&item->refcount, 0);
+ }
+ }
+
+@@ -59,7 +59,7 @@ void ttm_global_release(void)
+ for (i = 0; i < TTM_GLOBAL_NUM; ++i) {
+ struct ttm_global_item *item = &glob[i];
+ BUG_ON(item->object != NULL);
+- BUG_ON(item->refcount != 0);
++ BUG_ON(atomic_read(&item->refcount) != 0);
+ }
+ }
+
+@@ -70,7 +70,7 @@ int ttm_global_item_ref(struct ttm_globa
+ void *object;
+
+ mutex_lock(&item->mutex);
+- if (item->refcount == 0) {
++ if (atomic_read(&item->refcount) == 0) {
+ item->object = kmalloc(ref->size, GFP_KERNEL);
+ if (unlikely(item->object == NULL)) {
+ ret = -ENOMEM;
+@@ -82,7 +82,7 @@ int ttm_global_item_ref(struct ttm_globa
+ if (unlikely(ret != 0))
+ goto out_err;
+
+- ++item->refcount;
++ atomic_inc(&item->refcount);
+ }
+ ref->object = item->object;
+ object = item->object;
+@@ -101,9 +101,9 @@ void ttm_global_item_unref(struct ttm_gl
+ struct ttm_global_item *item = &glob[ref->global_type];
+
+ mutex_lock(&item->mutex);
+- BUG_ON(item->refcount == 0);
++ BUG_ON(atomic_read(&item->refcount) == 0);
+ BUG_ON(ref->object != item->object);
+- if (--item->refcount == 0) {
++ if (atomic_dec_and_test(&item->refcount)) {
+ ref->release(ref);
+ kfree(item->object);
+ item->object = NULL;
+diff -urNp linux-2.6.31.4/drivers/hwmon/fschmd.c linux-2.6.31.4/drivers/hwmon/fschmd.c
+--- linux-2.6.31.4/drivers/hwmon/fschmd.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/hwmon/fschmd.c 2009-10-11 15:29:42.745523075 -0400
@@ -915,7 +915,7 @@ static int watchdog_ioctl(struct inode *
return ret;
}
@@ -18319,9 +19960,9 @@ diff -urNp linux-2.6.30.8/drivers/hwmon/fschmd.c linux-2.6.30.8/drivers/hwmon/fs
.owner = THIS_MODULE,
.llseek = no_llseek,
.open = watchdog_open,
-diff -urNp linux-2.6.30.8/drivers/hwmon/fscpos.c linux-2.6.30.8/drivers/hwmon/fscpos.c
---- linux-2.6.30.8/drivers/hwmon/fscpos.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/hwmon/fscpos.c 2009-07-30 09:48:10.015465337 -0400
+diff -urNp linux-2.6.31.4/drivers/hwmon/fscpos.c linux-2.6.31.4/drivers/hwmon/fscpos.c
+--- linux-2.6.31.4/drivers/hwmon/fscpos.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/hwmon/fscpos.c 2009-10-11 15:29:42.748578517 -0400
@@ -240,7 +240,6 @@ static ssize_t set_pwm(struct i2c_client
unsigned long v = simple_strtoul(buf, NULL, 10);
@@ -18330,9 +19971,9 @@ diff -urNp linux-2.6.30.8/drivers/hwmon/fscpos.c linux-2.6.30.8/drivers/hwmon/fs
if (v > 255) v = 255;
mutex_lock(&data->update_lock);
-diff -urNp linux-2.6.30.8/drivers/hwmon/k8temp.c linux-2.6.30.8/drivers/hwmon/k8temp.c
---- linux-2.6.30.8/drivers/hwmon/k8temp.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/hwmon/k8temp.c 2009-07-30 09:48:10.016410845 -0400
+diff -urNp linux-2.6.31.4/drivers/hwmon/k8temp.c linux-2.6.31.4/drivers/hwmon/k8temp.c
+--- linux-2.6.31.4/drivers/hwmon/k8temp.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/hwmon/k8temp.c 2009-10-11 15:29:42.757370825 -0400
@@ -138,7 +138,7 @@ static DEVICE_ATTR(name, S_IRUGO, show_n
static struct pci_device_id k8temp_ids[] = {
@@ -18342,9 +19983,9 @@ diff -urNp linux-2.6.30.8/drivers/hwmon/k8temp.c linux-2.6.30.8/drivers/hwmon/k8
};
MODULE_DEVICE_TABLE(pci, k8temp_ids);
-diff -urNp linux-2.6.30.8/drivers/hwmon/sis5595.c linux-2.6.30.8/drivers/hwmon/sis5595.c
---- linux-2.6.30.8/drivers/hwmon/sis5595.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/hwmon/sis5595.c 2009-07-30 09:48:10.016410845 -0400
+diff -urNp linux-2.6.31.4/drivers/hwmon/sis5595.c linux-2.6.31.4/drivers/hwmon/sis5595.c
+--- linux-2.6.31.4/drivers/hwmon/sis5595.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/hwmon/sis5595.c 2009-10-11 15:29:42.762403207 -0400
@@ -699,7 +699,7 @@ static struct sis5595_data *sis5595_upda
static struct pci_device_id sis5595_pci_ids[] = {
@@ -18354,9 +19995,9 @@ diff -urNp linux-2.6.30.8/drivers/hwmon/sis5595.c linux-2.6.30.8/drivers/hwmon/s
};
MODULE_DEVICE_TABLE(pci, sis5595_pci_ids);
-diff -urNp linux-2.6.30.8/drivers/hwmon/via686a.c linux-2.6.30.8/drivers/hwmon/via686a.c
---- linux-2.6.30.8/drivers/hwmon/via686a.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/hwmon/via686a.c 2009-07-30 09:48:10.016410845 -0400
+diff -urNp linux-2.6.31.4/drivers/hwmon/via686a.c linux-2.6.31.4/drivers/hwmon/via686a.c
+--- linux-2.6.31.4/drivers/hwmon/via686a.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/hwmon/via686a.c 2009-10-11 15:29:42.762403207 -0400
@@ -769,7 +769,7 @@ static struct via686a_data *via686a_upda
static struct pci_device_id via686a_pci_ids[] = {
@@ -18366,9 +20007,9 @@ diff -urNp linux-2.6.30.8/drivers/hwmon/via686a.c linux-2.6.30.8/drivers/hwmon/v
};
MODULE_DEVICE_TABLE(pci, via686a_pci_ids);
-diff -urNp linux-2.6.30.8/drivers/hwmon/vt8231.c linux-2.6.30.8/drivers/hwmon/vt8231.c
---- linux-2.6.30.8/drivers/hwmon/vt8231.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/hwmon/vt8231.c 2009-07-30 09:48:10.017409539 -0400
+diff -urNp linux-2.6.31.4/drivers/hwmon/vt8231.c linux-2.6.31.4/drivers/hwmon/vt8231.c
+--- linux-2.6.31.4/drivers/hwmon/vt8231.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/hwmon/vt8231.c 2009-10-11 15:29:42.768746394 -0400
@@ -699,7 +699,7 @@ static struct platform_driver vt8231_dri
static struct pci_device_id vt8231_pci_ids[] = {
@@ -18378,9 +20019,9 @@ diff -urNp linux-2.6.30.8/drivers/hwmon/vt8231.c linux-2.6.30.8/drivers/hwmon/vt
};
MODULE_DEVICE_TABLE(pci, vt8231_pci_ids);
-diff -urNp linux-2.6.30.8/drivers/hwmon/w83791d.c linux-2.6.30.8/drivers/hwmon/w83791d.c
---- linux-2.6.30.8/drivers/hwmon/w83791d.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/hwmon/w83791d.c 2009-07-30 09:48:10.017409539 -0400
+diff -urNp linux-2.6.31.4/drivers/hwmon/w83791d.c linux-2.6.31.4/drivers/hwmon/w83791d.c
+--- linux-2.6.31.4/drivers/hwmon/w83791d.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/hwmon/w83791d.c 2009-10-11 15:29:42.777507659 -0400
@@ -330,8 +330,8 @@ static int w83791d_detect(struct i2c_cli
struct i2c_board_info *info);
static int w83791d_remove(struct i2c_client *client);
@@ -18392,9 +20033,9 @@ diff -urNp linux-2.6.30.8/drivers/hwmon/w83791d.c linux-2.6.30.8/drivers/hwmon/w
static struct w83791d_data *w83791d_update_device(struct device *dev);
#ifdef DEBUG
-diff -urNp linux-2.6.30.8/drivers/i2c/busses/i2c-i801.c linux-2.6.30.8/drivers/i2c/busses/i2c-i801.c
---- linux-2.6.30.8/drivers/i2c/busses/i2c-i801.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/i2c/busses/i2c-i801.c 2009-07-30 09:48:10.018424106 -0400
+diff -urNp linux-2.6.31.4/drivers/i2c/busses/i2c-i801.c linux-2.6.31.4/drivers/i2c/busses/i2c-i801.c
+--- linux-2.6.31.4/drivers/i2c/busses/i2c-i801.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/i2c/busses/i2c-i801.c 2009-10-11 15:29:42.780369338 -0400
@@ -578,7 +578,7 @@ static struct pci_device_id i801_ids[] =
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_4) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_5) },
@@ -18404,9 +20045,9 @@ diff -urNp linux-2.6.30.8/drivers/i2c/busses/i2c-i801.c linux-2.6.30.8/drivers/i
};
MODULE_DEVICE_TABLE (pci, i801_ids);
-diff -urNp linux-2.6.30.8/drivers/i2c/busses/i2c-piix4.c linux-2.6.30.8/drivers/i2c/busses/i2c-piix4.c
---- linux-2.6.30.8/drivers/i2c/busses/i2c-piix4.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/i2c/busses/i2c-piix4.c 2009-07-30 09:48:10.018424106 -0400
+diff -urNp linux-2.6.31.4/drivers/i2c/busses/i2c-piix4.c linux-2.6.31.4/drivers/i2c/busses/i2c-piix4.c
+--- linux-2.6.31.4/drivers/i2c/busses/i2c-piix4.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/i2c/busses/i2c-piix4.c 2009-10-11 15:29:42.781378383 -0400
@@ -123,7 +123,7 @@ static struct dmi_system_id __devinitdat
.ident = "IBM",
.matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
@@ -18425,9 +20066,9 @@ diff -urNp linux-2.6.30.8/drivers/i2c/busses/i2c-piix4.c linux-2.6.30.8/drivers/
};
MODULE_DEVICE_TABLE (pci, piix4_ids);
-diff -urNp linux-2.6.30.8/drivers/i2c/busses/i2c-sis630.c linux-2.6.30.8/drivers/i2c/busses/i2c-sis630.c
---- linux-2.6.30.8/drivers/i2c/busses/i2c-sis630.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/i2c/busses/i2c-sis630.c 2009-07-30 09:48:10.018424106 -0400
+diff -urNp linux-2.6.31.4/drivers/i2c/busses/i2c-sis630.c linux-2.6.31.4/drivers/i2c/busses/i2c-sis630.c
+--- linux-2.6.31.4/drivers/i2c/busses/i2c-sis630.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/i2c/busses/i2c-sis630.c 2009-10-11 15:29:42.785835708 -0400
@@ -471,7 +471,7 @@ static struct i2c_adapter sis630_adapter
static struct pci_device_id sis630_ids[] __devinitdata = {
{ PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) },
@@ -18437,9 +20078,9 @@ diff -urNp linux-2.6.30.8/drivers/i2c/busses/i2c-sis630.c linux-2.6.30.8/drivers
};
MODULE_DEVICE_TABLE (pci, sis630_ids);
-diff -urNp linux-2.6.30.8/drivers/i2c/busses/i2c-sis96x.c linux-2.6.30.8/drivers/i2c/busses/i2c-sis96x.c
---- linux-2.6.30.8/drivers/i2c/busses/i2c-sis96x.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/i2c/busses/i2c-sis96x.c 2009-07-30 09:48:10.018424106 -0400
+diff -urNp linux-2.6.31.4/drivers/i2c/busses/i2c-sis96x.c linux-2.6.31.4/drivers/i2c/busses/i2c-sis96x.c
+--- linux-2.6.31.4/drivers/i2c/busses/i2c-sis96x.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/i2c/busses/i2c-sis96x.c 2009-10-11 15:29:42.794625318 -0400
@@ -247,7 +247,7 @@ static struct i2c_adapter sis96x_adapter
static struct pci_device_id sis96x_ids[] = {
@@ -18449,9 +20090,9 @@ diff -urNp linux-2.6.30.8/drivers/i2c/busses/i2c-sis96x.c linux-2.6.30.8/drivers
};
MODULE_DEVICE_TABLE (pci, sis96x_ids);
-diff -urNp linux-2.6.30.8/drivers/ieee1394/dma.c linux-2.6.30.8/drivers/ieee1394/dma.c
---- linux-2.6.30.8/drivers/ieee1394/dma.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/ieee1394/dma.c 2009-07-30 09:48:10.018424106 -0400
+diff -urNp linux-2.6.31.4/drivers/ieee1394/dma.c linux-2.6.31.4/drivers/ieee1394/dma.c
+--- linux-2.6.31.4/drivers/ieee1394/dma.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ieee1394/dma.c 2009-10-11 15:29:42.799401768 -0400
@@ -247,7 +247,7 @@ static int dma_region_pagefault(struct v
return 0;
}
@@ -18461,9 +20102,9 @@ diff -urNp linux-2.6.30.8/drivers/ieee1394/dma.c linux-2.6.30.8/drivers/ieee1394
.fault = dma_region_pagefault,
};
-diff -urNp linux-2.6.30.8/drivers/ieee1394/dv1394.c linux-2.6.30.8/drivers/ieee1394/dv1394.c
---- linux-2.6.30.8/drivers/ieee1394/dv1394.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/ieee1394/dv1394.c 2009-07-30 09:48:10.020336753 -0400
+diff -urNp linux-2.6.31.4/drivers/ieee1394/dv1394.c linux-2.6.31.4/drivers/ieee1394/dv1394.c
+--- linux-2.6.31.4/drivers/ieee1394/dv1394.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ieee1394/dv1394.c 2009-10-11 15:29:42.819369280 -0400
@@ -739,7 +739,7 @@ static void frame_prepare(struct video_c
based upon DIF section and sequence
*/
@@ -18473,7 +20114,7 @@ diff -urNp linux-2.6.30.8/drivers/ieee1394/dv1394.c linux-2.6.30.8/drivers/ieee1
frame_put_packet (struct frame *f, struct packet *p)
{
int section_type = p->data[0] >> 5; /* section type is in bits 5 - 7 */
-@@ -2177,7 +2177,7 @@ static const struct ieee1394_device_id d
+@@ -2178,7 +2178,7 @@ static const struct ieee1394_device_id d
.specifier_id = AVC_UNIT_SPEC_ID_ENTRY & 0xffffff,
.version = AVC_SW_VERSION_ENTRY & 0xffffff
},
@@ -18482,9 +20123,9 @@ diff -urNp linux-2.6.30.8/drivers/ieee1394/dv1394.c linux-2.6.30.8/drivers/ieee1
};
MODULE_DEVICE_TABLE(ieee1394, dv1394_id_table);
-diff -urNp linux-2.6.30.8/drivers/ieee1394/eth1394.c linux-2.6.30.8/drivers/ieee1394/eth1394.c
---- linux-2.6.30.8/drivers/ieee1394/eth1394.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/ieee1394/eth1394.c 2009-07-30 09:48:10.020336753 -0400
+diff -urNp linux-2.6.31.4/drivers/ieee1394/eth1394.c linux-2.6.31.4/drivers/ieee1394/eth1394.c
+--- linux-2.6.31.4/drivers/ieee1394/eth1394.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ieee1394/eth1394.c 2009-10-11 15:29:42.830758573 -0400
@@ -445,7 +445,7 @@ static const struct ieee1394_device_id e
.specifier_id = ETHER1394_GASP_SPECIFIER_ID,
.version = ETHER1394_GASP_VERSION,
@@ -18494,9 +20135,9 @@ diff -urNp linux-2.6.30.8/drivers/ieee1394/eth1394.c linux-2.6.30.8/drivers/ieee
};
MODULE_DEVICE_TABLE(ieee1394, eth1394_id_table);
-diff -urNp linux-2.6.30.8/drivers/ieee1394/hosts.c linux-2.6.30.8/drivers/ieee1394/hosts.c
---- linux-2.6.30.8/drivers/ieee1394/hosts.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/ieee1394/hosts.c 2009-07-30 09:48:10.020336753 -0400
+diff -urNp linux-2.6.31.4/drivers/ieee1394/hosts.c linux-2.6.31.4/drivers/ieee1394/hosts.c
+--- linux-2.6.31.4/drivers/ieee1394/hosts.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ieee1394/hosts.c 2009-10-11 15:29:42.841361962 -0400
@@ -78,6 +78,7 @@ static int dummy_isoctl(struct hpsb_iso
}
@@ -18505,9 +20146,9 @@ diff -urNp linux-2.6.30.8/drivers/ieee1394/hosts.c linux-2.6.30.8/drivers/ieee13
.transmit_packet = dummy_transmit_packet,
.devctl = dummy_devctl,
.isoctl = dummy_isoctl
-diff -urNp linux-2.6.30.8/drivers/ieee1394/ohci1394.c linux-2.6.30.8/drivers/ieee1394/ohci1394.c
---- linux-2.6.30.8/drivers/ieee1394/ohci1394.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/ieee1394/ohci1394.c 2009-07-30 09:48:10.020862787 -0400
+diff -urNp linux-2.6.31.4/drivers/ieee1394/ohci1394.c linux-2.6.31.4/drivers/ieee1394/ohci1394.c
+--- linux-2.6.31.4/drivers/ieee1394/ohci1394.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ieee1394/ohci1394.c 2009-10-11 15:29:42.853706440 -0400
@@ -147,9 +147,9 @@ printk(level "%s: " fmt "\n" , OHCI1394_
printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args)
@@ -18529,9 +20170,9 @@ diff -urNp linux-2.6.30.8/drivers/ieee1394/ohci1394.c linux-2.6.30.8/drivers/iee
};
MODULE_DEVICE_TABLE(pci, ohci1394_pci_tbl);
-diff -urNp linux-2.6.30.8/drivers/ieee1394/raw1394.c linux-2.6.30.8/drivers/ieee1394/raw1394.c
---- linux-2.6.30.8/drivers/ieee1394/raw1394.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/ieee1394/raw1394.c 2009-07-30 09:48:10.022270946 -0400
+diff -urNp linux-2.6.31.4/drivers/ieee1394/raw1394.c linux-2.6.31.4/drivers/ieee1394/raw1394.c
+--- linux-2.6.31.4/drivers/ieee1394/raw1394.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ieee1394/raw1394.c 2009-10-11 15:29:42.863360246 -0400
@@ -2999,7 +2999,7 @@ static const struct ieee1394_device_id r
.match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION,
.specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff,
@@ -18541,9 +20182,9 @@ diff -urNp linux-2.6.30.8/drivers/ieee1394/raw1394.c linux-2.6.30.8/drivers/ieee
};
MODULE_DEVICE_TABLE(ieee1394, raw1394_id_table);
-diff -urNp linux-2.6.30.8/drivers/ieee1394/sbp2.c linux-2.6.30.8/drivers/ieee1394/sbp2.c
---- linux-2.6.30.8/drivers/ieee1394/sbp2.c 2009-08-24 20:46:56.513806791 -0400
-+++ linux-2.6.30.8/drivers/ieee1394/sbp2.c 2009-08-24 20:48:45.927790146 -0400
+diff -urNp linux-2.6.31.4/drivers/ieee1394/sbp2.c linux-2.6.31.4/drivers/ieee1394/sbp2.c
+--- linux-2.6.31.4/drivers/ieee1394/sbp2.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ieee1394/sbp2.c 2009-10-11 15:29:42.871883380 -0400
@@ -290,7 +290,7 @@ static const struct ieee1394_device_id s
.match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION,
.specifier_id = SBP2_UNIT_SPEC_ID_ENTRY & 0xffffff,
@@ -18562,9 +20203,9 @@ diff -urNp linux-2.6.30.8/drivers/ieee1394/sbp2.c linux-2.6.30.8/drivers/ieee139
{
int ret;
-diff -urNp linux-2.6.30.8/drivers/ieee1394/video1394.c linux-2.6.30.8/drivers/ieee1394/video1394.c
---- linux-2.6.30.8/drivers/ieee1394/video1394.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/ieee1394/video1394.c 2009-07-30 09:48:10.022535006 -0400
+diff -urNp linux-2.6.31.4/drivers/ieee1394/video1394.c linux-2.6.31.4/drivers/ieee1394/video1394.c
+--- linux-2.6.31.4/drivers/ieee1394/video1394.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/ieee1394/video1394.c 2009-10-11 15:29:42.888363714 -0400
@@ -1310,7 +1310,7 @@ static const struct ieee1394_device_id v
.specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff,
.version = (CAMERA_SW_VERSION_ENTRY + 2) & 0xffffff
@@ -18574,9 +20215,9 @@ diff -urNp linux-2.6.30.8/drivers/ieee1394/video1394.c linux-2.6.30.8/drivers/ie
};
MODULE_DEVICE_TABLE(ieee1394, video1394_id_table);
-diff -urNp linux-2.6.30.8/drivers/infiniband/hw/ehca/ehca_uverbs.c linux-2.6.30.8/drivers/infiniband/hw/ehca/ehca_uverbs.c
---- linux-2.6.30.8/drivers/infiniband/hw/ehca/ehca_uverbs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/infiniband/hw/ehca/ehca_uverbs.c 2009-07-30 09:48:10.023536535 -0400
+diff -urNp linux-2.6.31.4/drivers/infiniband/hw/ehca/ehca_uverbs.c linux-2.6.31.4/drivers/infiniband/hw/ehca/ehca_uverbs.c
+--- linux-2.6.31.4/drivers/infiniband/hw/ehca/ehca_uverbs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/infiniband/hw/ehca/ehca_uverbs.c 2009-10-11 15:29:43.239368467 -0400
@@ -95,7 +95,7 @@ static void ehca_mm_close(struct vm_area
vma->vm_start, vma->vm_end, *count);
}
@@ -18586,9 +20227,9 @@ diff -urNp linux-2.6.30.8/drivers/infiniband/hw/ehca/ehca_uverbs.c linux-2.6.30.
.open = ehca_mm_open,
.close = ehca_mm_close,
};
-diff -urNp linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_file_ops.c linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_file_ops.c
---- linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_file_ops.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_file_ops.c 2009-07-30 09:48:10.023536535 -0400
+diff -urNp linux-2.6.31.4/drivers/infiniband/hw/ipath/ipath_file_ops.c linux-2.6.31.4/drivers/infiniband/hw/ipath/ipath_file_ops.c
+--- linux-2.6.31.4/drivers/infiniband/hw/ipath/ipath_file_ops.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/infiniband/hw/ipath/ipath_file_ops.c 2009-10-11 15:29:43.736367245 -0400
@@ -1151,7 +1151,7 @@ static int ipath_file_vma_fault(struct v
return 0;
}
@@ -18598,9 +20239,9 @@ diff -urNp linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_file_ops.c linux-2.6
.fault = ipath_file_vma_fault,
};
-diff -urNp linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_mmap.c linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_mmap.c
---- linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_mmap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_mmap.c 2009-07-30 09:48:10.024683962 -0400
+diff -urNp linux-2.6.31.4/drivers/infiniband/hw/ipath/ipath_mmap.c linux-2.6.31.4/drivers/infiniband/hw/ipath/ipath_mmap.c
+--- linux-2.6.31.4/drivers/infiniband/hw/ipath/ipath_mmap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/infiniband/hw/ipath/ipath_mmap.c 2009-10-11 15:29:43.746784518 -0400
@@ -74,7 +74,7 @@ static void ipath_vma_close(struct vm_ar
kref_put(&ip->ref, ipath_release_mmap_info);
}
@@ -18610,10 +20251,10 @@ diff -urNp linux-2.6.30.8/drivers/infiniband/hw/ipath/ipath_mmap.c linux-2.6.30.
.open = ipath_vma_open,
.close = ipath_vma_close,
};
-diff -urNp linux-2.6.30.8/drivers/input/keyboard/atkbd.c linux-2.6.30.8/drivers/input/keyboard/atkbd.c
---- linux-2.6.30.8/drivers/input/keyboard/atkbd.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/input/keyboard/atkbd.c 2009-07-30 09:48:10.024683962 -0400
-@@ -1166,7 +1166,7 @@ static struct serio_device_id atkbd_seri
+diff -urNp linux-2.6.31.4/drivers/input/keyboard/atkbd.c linux-2.6.31.4/drivers/input/keyboard/atkbd.c
+--- linux-2.6.31.4/drivers/input/keyboard/atkbd.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/input/keyboard/atkbd.c 2009-10-11 15:29:43.759359284 -0400
+@@ -1188,7 +1188,7 @@ static struct serio_device_id atkbd_seri
.id = SERIO_ANY,
.extra = SERIO_ANY,
},
@@ -18622,9 +20263,9 @@ diff -urNp linux-2.6.30.8/drivers/input/keyboard/atkbd.c linux-2.6.30.8/drivers/
};
MODULE_DEVICE_TABLE(serio, atkbd_serio_ids);
-diff -urNp linux-2.6.30.8/drivers/input/mouse/lifebook.c linux-2.6.30.8/drivers/input/mouse/lifebook.c
---- linux-2.6.30.8/drivers/input/mouse/lifebook.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/input/mouse/lifebook.c 2009-07-30 09:48:10.025535593 -0400
+diff -urNp linux-2.6.31.4/drivers/input/mouse/lifebook.c linux-2.6.31.4/drivers/input/mouse/lifebook.c
+--- linux-2.6.31.4/drivers/input/mouse/lifebook.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/input/mouse/lifebook.c 2009-10-11 15:29:43.762393832 -0400
@@ -116,7 +116,7 @@ static const struct dmi_system_id lifebo
DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"),
},
@@ -18634,10 +20275,10 @@ diff -urNp linux-2.6.30.8/drivers/input/mouse/lifebook.c linux-2.6.30.8/drivers/
};
static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse)
-diff -urNp linux-2.6.30.8/drivers/input/mouse/psmouse-base.c linux-2.6.30.8/drivers/input/mouse/psmouse-base.c
---- linux-2.6.30.8/drivers/input/mouse/psmouse-base.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/input/mouse/psmouse-base.c 2009-07-30 09:48:10.025535593 -0400
-@@ -1378,7 +1378,7 @@ static struct serio_device_id psmouse_se
+diff -urNp linux-2.6.31.4/drivers/input/mouse/psmouse-base.c linux-2.6.31.4/drivers/input/mouse/psmouse-base.c
+--- linux-2.6.31.4/drivers/input/mouse/psmouse-base.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/input/mouse/psmouse-base.c 2009-10-11 15:29:43.764379597 -0400
+@@ -1380,7 +1380,7 @@ static struct serio_device_id psmouse_se
.id = SERIO_ANY,
.extra = SERIO_ANY,
},
@@ -18646,10 +20287,10 @@ diff -urNp linux-2.6.30.8/drivers/input/mouse/psmouse-base.c linux-2.6.30.8/driv
};
MODULE_DEVICE_TABLE(serio, psmouse_serio_ids);
-diff -urNp linux-2.6.30.8/drivers/input/mouse/synaptics.c linux-2.6.30.8/drivers/input/mouse/synaptics.c
---- linux-2.6.30.8/drivers/input/mouse/synaptics.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/input/mouse/synaptics.c 2009-07-30 09:48:10.026633372 -0400
-@@ -412,7 +412,7 @@ static void synaptics_process_packet(str
+diff -urNp linux-2.6.31.4/drivers/input/mouse/synaptics.c linux-2.6.31.4/drivers/input/mouse/synaptics.c
+--- linux-2.6.31.4/drivers/input/mouse/synaptics.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/input/mouse/synaptics.c 2009-10-11 15:29:43.766811888 -0400
+@@ -437,7 +437,7 @@ static void synaptics_process_packet(str
break;
case 2:
if (SYN_MODEL_PEN(priv->model_id))
@@ -18658,7 +20299,7 @@ diff -urNp linux-2.6.30.8/drivers/input/mouse/synaptics.c linux-2.6.30.8/drivers
break;
case 4 ... 15:
if (SYN_CAP_PALMDETECT(priv->capabilities))
-@@ -625,7 +625,7 @@ static const struct dmi_system_id toshib
+@@ -653,7 +653,7 @@ static const struct dmi_system_id toshib
DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"),
},
},
@@ -18667,10 +20308,10 @@ diff -urNp linux-2.6.30.8/drivers/input/mouse/synaptics.c linux-2.6.30.8/drivers
};
#endif
-diff -urNp linux-2.6.30.8/drivers/input/mousedev.c linux-2.6.30.8/drivers/input/mousedev.c
---- linux-2.6.30.8/drivers/input/mousedev.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/input/mousedev.c 2009-07-30 09:48:10.026633372 -0400
-@@ -1059,7 +1059,7 @@ static struct input_handler mousedev_han
+diff -urNp linux-2.6.31.4/drivers/input/mousedev.c linux-2.6.31.4/drivers/input/mousedev.c
+--- linux-2.6.31.4/drivers/input/mousedev.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/input/mousedev.c 2009-10-11 15:29:43.773490984 -0400
+@@ -1056,7 +1056,7 @@ static struct input_handler mousedev_han
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
static struct miscdevice psaux_mouse = {
@@ -18679,10 +20320,10 @@ diff -urNp linux-2.6.30.8/drivers/input/mousedev.c linux-2.6.30.8/drivers/input/
};
static int psaux_registered;
#endif
-diff -urNp linux-2.6.30.8/drivers/input/serio/i8042-x86ia64io.h linux-2.6.30.8/drivers/input/serio/i8042-x86ia64io.h
---- linux-2.6.30.8/drivers/input/serio/i8042-x86ia64io.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/input/serio/i8042-x86ia64io.h 2009-07-30 09:48:10.027427071 -0400
-@@ -159,7 +159,7 @@ static struct dmi_system_id __initdata i
+diff -urNp linux-2.6.31.4/drivers/input/serio/i8042-x86ia64io.h linux-2.6.31.4/drivers/input/serio/i8042-x86ia64io.h
+--- linux-2.6.31.4/drivers/input/serio/i8042-x86ia64io.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/input/serio/i8042-x86ia64io.h 2009-10-11 15:29:43.781361754 -0400
+@@ -167,7 +167,7 @@ static struct dmi_system_id __initdata i
DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"),
},
},
@@ -18691,8 +20332,8 @@ diff -urNp linux-2.6.30.8/drivers/input/serio/i8042-x86ia64io.h linux-2.6.30.8/d
};
/*
-@@ -374,7 +374,7 @@ static struct dmi_system_id __initdata i
- DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"),
+@@ -390,7 +390,7 @@ static struct dmi_system_id __initdata i
+ DMI_MATCH(DMI_PRODUCT_VERSION, "0100"),
},
},
- { }
@@ -18700,8 +20341,8 @@ diff -urNp linux-2.6.30.8/drivers/input/serio/i8042-x86ia64io.h linux-2.6.30.8/d
};
static struct dmi_system_id __initdata i8042_dmi_reset_table[] = {
-@@ -392,7 +392,7 @@ static struct dmi_system_id __initdata i
- DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."),
+@@ -436,7 +436,7 @@ static struct dmi_system_id __initdata i
+ DMI_MATCH(DMI_PRODUCT_NAME, "N10"),
},
},
- { }
@@ -18709,7 +20350,7 @@ diff -urNp linux-2.6.30.8/drivers/input/serio/i8042-x86ia64io.h linux-2.6.30.8/d
};
#ifdef CONFIG_PNP
-@@ -411,7 +411,7 @@ static struct dmi_system_id __initdata i
+@@ -455,7 +455,7 @@ static struct dmi_system_id __initdata i
DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
},
},
@@ -18718,7 +20359,7 @@ diff -urNp linux-2.6.30.8/drivers/input/serio/i8042-x86ia64io.h linux-2.6.30.8/d
};
#endif
-@@ -478,7 +478,7 @@ static struct dmi_system_id __initdata i
+@@ -522,7 +522,7 @@ static struct dmi_system_id __initdata i
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"),
},
},
@@ -18727,9 +20368,9 @@ diff -urNp linux-2.6.30.8/drivers/input/serio/i8042-x86ia64io.h linux-2.6.30.8/d
};
#endif /* CONFIG_X86 */
-diff -urNp linux-2.6.30.8/drivers/input/serio/serio_raw.c linux-2.6.30.8/drivers/input/serio/serio_raw.c
---- linux-2.6.30.8/drivers/input/serio/serio_raw.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/input/serio/serio_raw.c 2009-07-30 09:48:10.027427071 -0400
+diff -urNp linux-2.6.31.4/drivers/input/serio/serio_raw.c linux-2.6.31.4/drivers/input/serio/serio_raw.c
+--- linux-2.6.31.4/drivers/input/serio/serio_raw.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/input/serio/serio_raw.c 2009-10-11 15:29:43.794417509 -0400
@@ -376,7 +376,7 @@ static struct serio_device_id serio_raw_
.id = SERIO_ANY,
.extra = SERIO_ANY,
@@ -18739,9 +20380,9 @@ diff -urNp linux-2.6.30.8/drivers/input/serio/serio_raw.c linux-2.6.30.8/drivers
};
MODULE_DEVICE_TABLE(serio, serio_raw_serio_ids);
-diff -urNp linux-2.6.30.8/drivers/isdn/capi/kcapi_proc.c linux-2.6.30.8/drivers/isdn/capi/kcapi_proc.c
---- linux-2.6.30.8/drivers/isdn/capi/kcapi_proc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/isdn/capi/kcapi_proc.c 2009-07-30 09:48:10.027427071 -0400
+diff -urNp linux-2.6.31.4/drivers/isdn/capi/kcapi_proc.c linux-2.6.31.4/drivers/isdn/capi/kcapi_proc.c
+--- linux-2.6.31.4/drivers/isdn/capi/kcapi_proc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/isdn/capi/kcapi_proc.c 2009-10-11 15:29:43.801430505 -0400
@@ -89,14 +89,14 @@ static int contrstats_show(struct seq_fi
return 0;
}
@@ -18785,25 +20426,127 @@ diff -urNp linux-2.6.30.8/drivers/isdn/capi/kcapi_proc.c linux-2.6.30.8/drivers/
.start = capi_driver_start,
.next = capi_driver_next,
.stop = capi_driver_stop,
-diff -urNp linux-2.6.30.8/drivers/isdn/mISDN/timerdev.c linux-2.6.30.8/drivers/isdn/mISDN/timerdev.c
---- linux-2.6.30.8/drivers/isdn/mISDN/timerdev.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/isdn/mISDN/timerdev.c 2009-07-30 09:48:10.028469662 -0400
-@@ -259,7 +259,7 @@ mISDN_ioctl(struct inode *inode, struct
- return ret;
- }
+diff -urNp linux-2.6.31.4/drivers/isdn/gigaset/common.c linux-2.6.31.4/drivers/isdn/gigaset/common.c
+--- linux-2.6.31.4/drivers/isdn/gigaset/common.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/isdn/gigaset/common.c 2009-10-11 15:29:43.802363565 -0400
+@@ -665,7 +665,7 @@ struct cardstate *gigaset_initcs(struct
+ cs->commands_pending = 0;
+ cs->cur_at_seq = 0;
+ cs->gotfwver = -1;
+- cs->open_count = 0;
++ atomic_set(&cs->open_count, 0);
+ cs->dev = NULL;
+ cs->tty = NULL;
+ cs->tty_dev = NULL;
+diff -urNp linux-2.6.31.4/drivers/isdn/gigaset/gigaset.h linux-2.6.31.4/drivers/isdn/gigaset/gigaset.h
+--- linux-2.6.31.4/drivers/isdn/gigaset/gigaset.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/isdn/gigaset/gigaset.h 2009-10-11 15:29:43.808430205 -0400
+@@ -446,7 +446,7 @@ struct cardstate {
+ spinlock_t cmdlock;
+ unsigned curlen, cmdbytes;
+
+- unsigned open_count;
++ atomic_t open_count;
+ struct tty_struct *tty;
+ struct tasklet_struct if_wake_tasklet;
+ unsigned control_state;
+diff -urNp linux-2.6.31.4/drivers/isdn/gigaset/interface.c linux-2.6.31.4/drivers/isdn/gigaset/interface.c
+--- linux-2.6.31.4/drivers/isdn/gigaset/interface.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/isdn/gigaset/interface.c 2009-10-11 15:29:43.809413897 -0400
+@@ -165,9 +165,7 @@ static int if_open(struct tty_struct *tt
+ return -ERESTARTSYS; // FIXME -EINTR?
+ tty->driver_data = cs;
+
+- ++cs->open_count;
+-
+- if (cs->open_count == 1) {
++ if (atomic_inc_return(&cs->open_count) == 1) {
+ spin_lock_irqsave(&cs->lock, flags);
+ cs->tty = tty;
+ spin_unlock_irqrestore(&cs->lock, flags);
+@@ -195,10 +193,10 @@ static void if_close(struct tty_struct *
+
+ if (!cs->connected)
+ gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
+- else if (!cs->open_count)
++ else if (!atomic_read(&cs->open_count))
+ dev_warn(cs->dev, "%s: device not opened\n", __func__);
+ else {
+- if (!--cs->open_count) {
++ if (!atomic_dec_return(&cs->open_count)) {
+ spin_lock_irqsave(&cs->lock, flags);
+ cs->tty = NULL;
+ spin_unlock_irqrestore(&cs->lock, flags);
+@@ -233,7 +231,7 @@ static int if_ioctl(struct tty_struct *t
+ if (!cs->connected) {
+ gig_dbg(DEBUG_IF, "not connected");
+ retval = -ENODEV;
+- } else if (!cs->open_count)
++ } else if (!atomic_read(&cs->open_count))
+ dev_warn(cs->dev, "%s: device not opened\n", __func__);
+ else {
+ retval = 0;
+@@ -361,7 +359,7 @@ static int if_write(struct tty_struct *t
+ if (!cs->connected) {
+ gig_dbg(DEBUG_IF, "not connected");
+ retval = -ENODEV;
+- } else if (!cs->open_count)
++ } else if (!atomic_read(&cs->open_count))
+ dev_warn(cs->dev, "%s: device not opened\n", __func__);
+ else if (cs->mstate != MS_LOCKED) {
+ dev_warn(cs->dev, "can't write to unlocked device\n");
+@@ -395,7 +393,7 @@ static int if_write_room(struct tty_stru
+ if (!cs->connected) {
+ gig_dbg(DEBUG_IF, "not connected");
+ retval = -ENODEV;
+- } else if (!cs->open_count)
++ } else if (!atomic_read(&cs->open_count))
+ dev_warn(cs->dev, "%s: device not opened\n", __func__);
+ else if (cs->mstate != MS_LOCKED) {
+ dev_warn(cs->dev, "can't write to unlocked device\n");
+@@ -425,7 +423,7 @@ static int if_chars_in_buffer(struct tty
+
+ if (!cs->connected)
+ gig_dbg(DEBUG_IF, "not connected");
+- else if (!cs->open_count)
++ else if (!atomic_read(&cs->open_count))
+ dev_warn(cs->dev, "%s: device not opened\n", __func__);
+ else if (cs->mstate != MS_LOCKED)
+ dev_warn(cs->dev, "can't write to unlocked device\n");
+@@ -453,7 +451,7 @@ static void if_throttle(struct tty_struc
+
+ if (!cs->connected)
+ gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
+- else if (!cs->open_count)
++ else if (!atomic_read(&cs->open_count))
+ dev_warn(cs->dev, "%s: device not opened\n", __func__);
+ else {
+ //FIXME
+@@ -478,7 +476,7 @@ static void if_unthrottle(struct tty_str
+
+ if (!cs->connected)
+ gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
+- else if (!cs->open_count)
++ else if (!atomic_read(&cs->open_count))
+ dev_warn(cs->dev, "%s: device not opened\n", __func__);
+ else {
+ //FIXME
+@@ -510,7 +508,7 @@ static void if_set_termios(struct tty_st
+ goto out;
+ }
--static struct file_operations mISDN_fops = {
-+static const struct file_operations mISDN_fops = {
- .read = mISDN_read,
- .poll = mISDN_poll,
- .ioctl = mISDN_ioctl,
-diff -urNp linux-2.6.30.8/drivers/lguest/core.c linux-2.6.30.8/drivers/lguest/core.c
---- linux-2.6.30.8/drivers/lguest/core.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/lguest/core.c 2009-07-30 09:48:10.028469662 -0400
-@@ -80,9 +80,17 @@ static __init int map_switcher(void)
- * (SWITCHER_ADDR). We might not get it in theory, but in practice
+- if (!cs->open_count) {
++ if (!atomic_read(&cs->open_count)) {
+ dev_warn(cs->dev, "%s: device not opened\n", __func__);
+ goto out;
+ }
+diff -urNp linux-2.6.31.4/drivers/lguest/core.c linux-2.6.31.4/drivers/lguest/core.c
+--- linux-2.6.31.4/drivers/lguest/core.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/lguest/core.c 2009-10-11 15:29:43.853764885 -0400
+@@ -92,9 +92,17 @@ static __init int map_switcher(void)
* it's worked so far. The end address needs +1 because __get_vm_area
- * allocates an extra guard page, so we need space for that. */
+ * allocates an extra guard page, so we need space for that.
+ */
+
+#if defined(CONFIG_MODULES) && defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)
+ switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
@@ -18818,21 +20561,33 @@ diff -urNp linux-2.6.30.8/drivers/lguest/core.c linux-2.6.30.8/drivers/lguest/co
if (!switcher_vma) {
err = -ENOMEM;
printk("lguest: could not map switcher pages high\n");
-diff -urNp linux-2.6.30.8/drivers/lguest/lguest_user.c linux-2.6.30.8/drivers/lguest/lguest_user.c
---- linux-2.6.30.8/drivers/lguest/lguest_user.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/lguest/lguest_user.c 2009-07-30 09:48:10.028469662 -0400
-@@ -329,7 +329,7 @@ static int close(struct inode *inode, st
- * We begin our understanding with the Host kernel interface which the Launcher
+diff -urNp linux-2.6.31.4/drivers/lguest/lguest_user.c linux-2.6.31.4/drivers/lguest/lguest_user.c
+--- linux-2.6.31.4/drivers/lguest/lguest_user.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/lguest/lguest_user.c 2009-10-11 15:29:43.854371333 -0400
+@@ -508,7 +508,7 @@ static int close(struct inode *inode, st
* uses: reading and writing a character device called /dev/lguest. All the
- * work happens in the read(), write() and close() routines: */
+ * work happens in the read(), write() and close() routines:
+ */
-static struct file_operations lguest_fops = {
+static const struct file_operations lguest_fops = {
.owner = THIS_MODULE,
.release = close,
.write = write,
-diff -urNp linux-2.6.30.8/drivers/md/bitmap.c linux-2.6.30.8/drivers/md/bitmap.c
---- linux-2.6.30.8/drivers/md/bitmap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/md/bitmap.c 2009-07-30 09:48:10.029590223 -0400
+diff -urNp linux-2.6.31.4/drivers/macintosh/via-pmu.c linux-2.6.31.4/drivers/macintosh/via-pmu.c
+--- linux-2.6.31.4/drivers/macintosh/via-pmu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/macintosh/via-pmu.c 2009-10-11 15:29:56.646498264 -0400
+@@ -2226,7 +2226,7 @@ static int pmu_sleep_valid(suspend_state
+ && (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) >= 0);
+ }
+
+-static struct platform_suspend_ops pmu_pm_ops = {
++static const struct platform_suspend_ops pmu_pm_ops = {
+ .enter = powerbook_sleep,
+ .valid = pmu_sleep_valid,
+ };
+diff -urNp linux-2.6.31.4/drivers/md/bitmap.c linux-2.6.31.4/drivers/md/bitmap.c
+--- linux-2.6.31.4/drivers/md/bitmap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/md/bitmap.c 2009-10-11 15:29:43.863370113 -0400
@@ -58,7 +58,7 @@
# if DEBUG > 0
# define PRINTK(x...) printk(KERN_DEBUG x)
@@ -18842,10 +20597,22 @@ diff -urNp linux-2.6.30.8/drivers/md/bitmap.c linux-2.6.30.8/drivers/md/bitmap.c
# endif
#endif
-diff -urNp linux-2.6.30.8/drivers/md/md.c linux-2.6.30.8/drivers/md/md.c
---- linux-2.6.30.8/drivers/md/md.c 2009-08-24 20:46:56.532765623 -0400
-+++ linux-2.6.30.8/drivers/md/md.c 2009-08-24 20:48:45.929619407 -0400
-@@ -5986,7 +5986,7 @@ static int md_seq_show(struct seq_file *
+diff -urNp linux-2.6.31.4/drivers/md/dm-table.c linux-2.6.31.4/drivers/md/dm-table.c
+--- linux-2.6.31.4/drivers/md/dm-table.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/md/dm-table.c 2009-10-11 15:29:43.865390866 -0400
+@@ -359,7 +359,7 @@ static int device_area_is_invalid(struct
+ if (!dev_size)
+ return 0;
+
+- if ((start >= dev_size) || (start + len > dev_size)) {
++ if ((start >= dev_size) || (len > dev_size - start)) {
+ DMWARN("%s: %s too small for target: "
+ "start=%llu, len=%llu, dev_size=%llu",
+ dm_device_name(ti->table->md), bdevname(bdev, b),
+diff -urNp linux-2.6.31.4/drivers/md/md.c linux-2.6.31.4/drivers/md/md.c
+--- linux-2.6.31.4/drivers/md/md.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/md/md.c 2009-10-11 15:29:43.885458981 -0400
+@@ -5963,7 +5963,7 @@ static int md_seq_show(struct seq_file *
chunk_kb ? "KB" : "B");
if (bitmap->file) {
seq_printf(seq, ", file: ");
@@ -18854,10 +20621,19 @@ diff -urNp linux-2.6.30.8/drivers/md/md.c linux-2.6.30.8/drivers/md/md.c
}
seq_printf(seq, "\n");
-diff -urNp linux-2.6.30.8/drivers/md/md.h linux-2.6.30.8/drivers/md/md.h
---- linux-2.6.30.8/drivers/md/md.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/md/md.h 2009-07-30 09:48:10.031075937 -0400
-@@ -299,7 +299,7 @@ static inline void rdev_dec_pending(mdk_
+@@ -6057,7 +6057,7 @@ static int is_mddev_idle(mddev_t *mddev,
+ struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
+ curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
+ (int)part_stat_read(&disk->part0, sectors[1]) -
+- atomic_read(&disk->sync_io);
++ atomic_read_unchecked(&disk->sync_io);
+ /* sync IO will cause sync_io to increase before the disk_stats
+ * as sync_io is counted when a request starts, and
+ * disk_stats is counted when it completes.
+diff -urNp linux-2.6.31.4/drivers/md/md.h linux-2.6.31.4/drivers/md/md.h
+--- linux-2.6.31.4/drivers/md/md.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/md/md.h 2009-10-11 15:29:43.898365423 -0400
+@@ -303,7 +303,7 @@ static inline void rdev_dec_pending(mdk_
static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors)
{
@@ -18866,10 +20642,10 @@ diff -urNp linux-2.6.30.8/drivers/md/md.h linux-2.6.30.8/drivers/md/md.h
}
struct mdk_personality
-diff -urNp linux-2.6.30.8/drivers/media/dvb/dvb-core/dmxdev.c linux-2.6.30.8/drivers/media/dvb/dvb-core/dmxdev.c
---- linux-2.6.30.8/drivers/media/dvb/dvb-core/dmxdev.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/dvb/dvb-core/dmxdev.c 2009-07-30 12:06:52.108842402 -0400
-@@ -1092,7 +1092,7 @@ static unsigned int dvb_dvr_poll(struct
+diff -urNp linux-2.6.31.4/drivers/media/dvb/dvb-core/dmxdev.c linux-2.6.31.4/drivers/media/dvb/dvb-core/dmxdev.c
+--- linux-2.6.31.4/drivers/media/dvb/dvb-core/dmxdev.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/dvb/dvb-core/dmxdev.c 2009-10-11 15:29:43.905368587 -0400
+@@ -1086,7 +1086,7 @@ static unsigned int dvb_dvr_poll(struct
return mask;
}
@@ -18878,9 +20654,9 @@ diff -urNp linux-2.6.30.8/drivers/media/dvb/dvb-core/dmxdev.c linux-2.6.30.8/dri
.owner = THIS_MODULE,
.read = dvb_dvr_read,
.write = dvb_dvr_write,
-diff -urNp linux-2.6.30.8/drivers/media/dvb/firewire/firedtv-ci.c linux-2.6.30.8/drivers/media/dvb/firewire/firedtv-ci.c
---- linux-2.6.30.8/drivers/media/dvb/firewire/firedtv-ci.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/dvb/firewire/firedtv-ci.c 2009-07-30 12:06:52.110732547 -0400
+diff -urNp linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-ci.c linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-ci.c
+--- linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-ci.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-ci.c 2009-10-11 15:29:43.922548672 -0400
@@ -215,7 +215,7 @@ static unsigned int fdtv_ca_io_poll(stru
return POLLIN;
}
@@ -18890,9 +20666,9 @@ diff -urNp linux-2.6.30.8/drivers/media/dvb/firewire/firedtv-ci.c linux-2.6.30.8
.owner = THIS_MODULE,
.ioctl = dvb_generic_ioctl,
.open = dvb_generic_open,
-diff -urNp linux-2.6.30.8/drivers/media/video/cafe_ccic.c linux-2.6.30.8/drivers/media/video/cafe_ccic.c
---- linux-2.6.30.8/drivers/media/video/cafe_ccic.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/cafe_ccic.c 2009-07-30 09:48:10.031530096 -0400
+diff -urNp linux-2.6.31.4/drivers/media/video/cafe_ccic.c linux-2.6.31.4/drivers/media/video/cafe_ccic.c
+--- linux-2.6.31.4/drivers/media/video/cafe_ccic.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/cafe_ccic.c 2009-10-11 15:29:43.937411870 -0400
@@ -1326,7 +1326,7 @@ static void cafe_v4l_vm_close(struct vm_
mutex_unlock(&sbuf->cam->s_mutex);
}
@@ -18902,9 +20678,9 @@ diff -urNp linux-2.6.30.8/drivers/media/video/cafe_ccic.c linux-2.6.30.8/drivers
.open = cafe_v4l_vm_open,
.close = cafe_v4l_vm_close
};
-diff -urNp linux-2.6.30.8/drivers/media/video/et61x251/et61x251_core.c linux-2.6.30.8/drivers/media/video/et61x251/et61x251_core.c
---- linux-2.6.30.8/drivers/media/video/et61x251/et61x251_core.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/et61x251/et61x251_core.c 2009-07-30 09:48:10.031530096 -0400
+diff -urNp linux-2.6.31.4/drivers/media/video/et61x251/et61x251_core.c linux-2.6.31.4/drivers/media/video/et61x251/et61x251_core.c
+--- linux-2.6.31.4/drivers/media/video/et61x251/et61x251_core.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/et61x251/et61x251_core.c 2009-10-11 15:29:43.961415511 -0400
@@ -1494,7 +1494,7 @@ static void et61x251_vm_close(struct vm_
}
@@ -18914,9 +20690,9 @@ diff -urNp linux-2.6.30.8/drivers/media/video/et61x251/et61x251_core.c linux-2.6
.open = et61x251_vm_open,
.close = et61x251_vm_close,
};
-diff -urNp linux-2.6.30.8/drivers/media/video/gspca/gspca.c linux-2.6.30.8/drivers/media/video/gspca/gspca.c
---- linux-2.6.30.8/drivers/media/video/gspca/gspca.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/gspca/gspca.c 2009-07-30 09:48:10.032627590 -0400
+diff -urNp linux-2.6.31.4/drivers/media/video/gspca/gspca.c linux-2.6.31.4/drivers/media/video/gspca/gspca.c
+--- linux-2.6.31.4/drivers/media/video/gspca/gspca.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/gspca/gspca.c 2009-10-11 15:29:43.966364172 -0400
@@ -99,7 +99,7 @@ static void gspca_vm_close(struct vm_are
frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED;
}
@@ -18926,9 +20702,9 @@ diff -urNp linux-2.6.30.8/drivers/media/video/gspca/gspca.c linux-2.6.30.8/drive
.open = gspca_vm_open,
.close = gspca_vm_close,
};
-diff -urNp linux-2.6.30.8/drivers/media/video/meye.c linux-2.6.30.8/drivers/media/video/meye.c
---- linux-2.6.30.8/drivers/media/video/meye.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/meye.c 2009-07-30 09:48:10.032627590 -0400
+diff -urNp linux-2.6.31.4/drivers/media/video/meye.c linux-2.6.31.4/drivers/media/video/meye.c
+--- linux-2.6.31.4/drivers/media/video/meye.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/meye.c 2009-10-11 15:29:43.975790828 -0400
@@ -1589,7 +1589,7 @@ static void meye_vm_close(struct vm_area
meye.vma_use_count[idx]--;
}
@@ -18938,9 +20714,9 @@ diff -urNp linux-2.6.30.8/drivers/media/video/meye.c linux-2.6.30.8/drivers/medi
.open = meye_vm_open,
.close = meye_vm_close,
};
-diff -urNp linux-2.6.30.8/drivers/media/video/sn9c102/sn9c102_core.c linux-2.6.30.8/drivers/media/video/sn9c102/sn9c102_core.c
---- linux-2.6.30.8/drivers/media/video/sn9c102/sn9c102_core.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/sn9c102/sn9c102_core.c 2009-07-30 09:48:10.033630131 -0400
+diff -urNp linux-2.6.31.4/drivers/media/video/sn9c102/sn9c102_core.c linux-2.6.31.4/drivers/media/video/sn9c102/sn9c102_core.c
+--- linux-2.6.31.4/drivers/media/video/sn9c102/sn9c102_core.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/sn9c102/sn9c102_core.c 2009-10-11 15:29:43.998358880 -0400
@@ -2075,7 +2075,7 @@ static void sn9c102_vm_close(struct vm_a
}
@@ -18950,10 +20726,10 @@ diff -urNp linux-2.6.30.8/drivers/media/video/sn9c102/sn9c102_core.c linux-2.6.3
.open = sn9c102_vm_open,
.close = sn9c102_vm_close,
};
-diff -urNp linux-2.6.30.8/drivers/media/video/stk-webcam.c linux-2.6.30.8/drivers/media/video/stk-webcam.c
---- linux-2.6.30.8/drivers/media/video/stk-webcam.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/stk-webcam.c 2009-07-30 09:48:10.033630131 -0400
-@@ -789,7 +789,7 @@ static void stk_v4l_vm_close(struct vm_a
+diff -urNp linux-2.6.31.4/drivers/media/video/stk-webcam.c linux-2.6.31.4/drivers/media/video/stk-webcam.c
+--- linux-2.6.31.4/drivers/media/video/stk-webcam.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/stk-webcam.c 2009-10-11 15:29:44.000678395 -0400
+@@ -790,7 +790,7 @@ static void stk_v4l_vm_close(struct vm_a
if (sbuf->mapcount == 0)
sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED;
}
@@ -18962,9 +20738,9 @@ diff -urNp linux-2.6.30.8/drivers/media/video/stk-webcam.c linux-2.6.30.8/driver
.open = stk_v4l_vm_open,
.close = stk_v4l_vm_close
};
-diff -urNp linux-2.6.30.8/drivers/media/video/usbvideo/konicawc.c linux-2.6.30.8/drivers/media/video/usbvideo/konicawc.c
---- linux-2.6.30.8/drivers/media/video/usbvideo/konicawc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/usbvideo/konicawc.c 2009-08-09 07:48:48.178565450 -0400
+diff -urNp linux-2.6.31.4/drivers/media/video/usbvideo/konicawc.c linux-2.6.31.4/drivers/media/video/usbvideo/konicawc.c
+--- linux-2.6.31.4/drivers/media/video/usbvideo/konicawc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/usbvideo/konicawc.c 2009-10-11 15:29:44.011445121 -0400
@@ -225,7 +225,7 @@ static void konicawc_register_input(stru
int error;
@@ -18974,9 +20750,9 @@ diff -urNp linux-2.6.30.8/drivers/media/video/usbvideo/konicawc.c linux-2.6.30.8
cam->input = input_dev = input_allocate_device();
if (!input_dev) {
-diff -urNp linux-2.6.30.8/drivers/media/video/usbvideo/quickcam_messenger.c linux-2.6.30.8/drivers/media/video/usbvideo/quickcam_messenger.c
---- linux-2.6.30.8/drivers/media/video/usbvideo/quickcam_messenger.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/usbvideo/quickcam_messenger.c 2009-08-09 07:48:48.199403940 -0400
+diff -urNp linux-2.6.31.4/drivers/media/video/usbvideo/quickcam_messenger.c linux-2.6.31.4/drivers/media/video/usbvideo/quickcam_messenger.c
+--- linux-2.6.31.4/drivers/media/video/usbvideo/quickcam_messenger.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/usbvideo/quickcam_messenger.c 2009-10-11 15:29:44.021731416 -0400
@@ -89,7 +89,7 @@ static void qcm_register_input(struct qc
int error;
@@ -18986,10 +20762,10 @@ diff -urNp linux-2.6.30.8/drivers/media/video/usbvideo/quickcam_messenger.c linu
cam->input = input_dev = input_allocate_device();
if (!input_dev) {
-diff -urNp linux-2.6.30.8/drivers/media/video/uvc/uvc_v4l2.c linux-2.6.30.8/drivers/media/video/uvc/uvc_v4l2.c
---- linux-2.6.30.8/drivers/media/video/uvc/uvc_v4l2.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/uvc/uvc_v4l2.c 2009-07-30 09:48:10.034661447 -0400
-@@ -1036,7 +1036,7 @@ static void uvc_vm_close(struct vm_area_
+diff -urNp linux-2.6.31.4/drivers/media/video/uvc/uvc_v4l2.c linux-2.6.31.4/drivers/media/video/uvc/uvc_v4l2.c
+--- linux-2.6.31.4/drivers/media/video/uvc/uvc_v4l2.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/uvc/uvc_v4l2.c 2009-10-11 15:29:44.025363899 -0400
+@@ -1063,7 +1063,7 @@ static void uvc_vm_close(struct vm_area_
buffer->vma_use_count--;
}
@@ -18998,10 +20774,10 @@ diff -urNp linux-2.6.30.8/drivers/media/video/uvc/uvc_v4l2.c linux-2.6.30.8/driv
.open = uvc_vm_open,
.close = uvc_vm_close,
};
-diff -urNp linux-2.6.30.8/drivers/media/video/videobuf-dma-contig.c linux-2.6.30.8/drivers/media/video/videobuf-dma-contig.c
---- linux-2.6.30.8/drivers/media/video/videobuf-dma-contig.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/videobuf-dma-contig.c 2009-07-30 09:48:10.034661447 -0400
-@@ -103,7 +103,7 @@ static void videobuf_vm_close(struct vm_
+diff -urNp linux-2.6.31.4/drivers/media/video/videobuf-dma-contig.c linux-2.6.31.4/drivers/media/video/videobuf-dma-contig.c
+--- linux-2.6.31.4/drivers/media/video/videobuf-dma-contig.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/videobuf-dma-contig.c 2009-10-11 15:29:44.029502192 -0400
+@@ -105,7 +105,7 @@ static void videobuf_vm_close(struct vm_
}
}
@@ -19010,9 +20786,9 @@ diff -urNp linux-2.6.30.8/drivers/media/video/videobuf-dma-contig.c linux-2.6.30
.open = videobuf_vm_open,
.close = videobuf_vm_close,
};
-diff -urNp linux-2.6.30.8/drivers/media/video/vino.c linux-2.6.30.8/drivers/media/video/vino.c
---- linux-2.6.30.8/drivers/media/video/vino.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/vino.c 2009-07-30 09:48:10.035537043 -0400
+diff -urNp linux-2.6.31.4/drivers/media/video/vino.c linux-2.6.31.4/drivers/media/video/vino.c
+--- linux-2.6.31.4/drivers/media/video/vino.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/vino.c 2009-10-11 15:29:44.052363861 -0400
@@ -3858,7 +3858,7 @@ static void vino_vm_close(struct vm_area
dprintk("vino_vm_close(): count = %d\n", fb->map_count);
}
@@ -19022,9 +20798,9 @@ diff -urNp linux-2.6.30.8/drivers/media/video/vino.c linux-2.6.30.8/drivers/medi
.open = vino_vm_open,
.close = vino_vm_close,
};
-diff -urNp linux-2.6.30.8/drivers/media/video/zc0301/zc0301_core.c linux-2.6.30.8/drivers/media/video/zc0301/zc0301_core.c
---- linux-2.6.30.8/drivers/media/video/zc0301/zc0301_core.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/zc0301/zc0301_core.c 2009-07-30 09:48:10.036598829 -0400
+diff -urNp linux-2.6.31.4/drivers/media/video/zc0301/zc0301_core.c linux-2.6.31.4/drivers/media/video/zc0301/zc0301_core.c
+--- linux-2.6.31.4/drivers/media/video/zc0301/zc0301_core.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/zc0301/zc0301_core.c 2009-10-11 15:29:44.068437873 -0400
@@ -933,7 +933,7 @@ static void zc0301_vm_close(struct vm_ar
}
@@ -19034,10 +20810,10 @@ diff -urNp linux-2.6.30.8/drivers/media/video/zc0301/zc0301_core.c linux-2.6.30.
.open = zc0301_vm_open,
.close = zc0301_vm_close,
};
-diff -urNp linux-2.6.30.8/drivers/media/video/zoran/zoran_driver.c linux-2.6.30.8/drivers/media/video/zoran/zoran_driver.c
---- linux-2.6.30.8/drivers/media/video/zoran/zoran_driver.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/media/video/zoran/zoran_driver.c 2009-07-30 12:07:09.597971485 -0400
-@@ -3177,7 +3177,7 @@ zoran_vm_close (struct vm_area_struct *v
+diff -urNp linux-2.6.31.4/drivers/media/video/zoran/zoran_driver.c linux-2.6.31.4/drivers/media/video/zoran/zoran_driver.c
+--- linux-2.6.31.4/drivers/media/video/zoran/zoran_driver.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/media/video/zoran/zoran_driver.c 2009-10-11 15:29:44.077359107 -0400
+@@ -3172,7 +3172,7 @@ zoran_vm_close (struct vm_area_struct *v
mutex_unlock(&zr->resource_lock);
}
@@ -19046,9 +20822,9 @@ diff -urNp linux-2.6.30.8/drivers/media/video/zoran/zoran_driver.c linux-2.6.30.
.open = zoran_vm_open,
.close = zoran_vm_close,
};
-diff -urNp linux-2.6.30.8/drivers/message/i2o/i2o_proc.c linux-2.6.30.8/drivers/message/i2o/i2o_proc.c
---- linux-2.6.30.8/drivers/message/i2o/i2o_proc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/message/i2o/i2o_proc.c 2009-08-09 07:48:48.246416282 -0400
+diff -urNp linux-2.6.31.4/drivers/message/i2o/i2o_proc.c linux-2.6.31.4/drivers/message/i2o/i2o_proc.c
+--- linux-2.6.31.4/drivers/message/i2o/i2o_proc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/message/i2o/i2o_proc.c 2009-10-11 15:29:44.103477731 -0400
@@ -259,13 +259,6 @@ static char *scsi_devices[] = {
"Array Controller Device"
};
@@ -19135,9 +20911,9 @@ diff -urNp linux-2.6.30.8/drivers/message/i2o/i2o_proc.c linux-2.6.30.8/drivers/
return 0;
}
-diff -urNp linux-2.6.30.8/drivers/misc/ibmasm/ibmasmfs.c linux-2.6.30.8/drivers/misc/ibmasm/ibmasmfs.c
---- linux-2.6.30.8/drivers/misc/ibmasm/ibmasmfs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/misc/ibmasm/ibmasmfs.c 2009-07-30 09:48:10.036598829 -0400
+diff -urNp linux-2.6.31.4/drivers/misc/ibmasm/ibmasmfs.c linux-2.6.31.4/drivers/misc/ibmasm/ibmasmfs.c
+--- linux-2.6.31.4/drivers/misc/ibmasm/ibmasmfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/misc/ibmasm/ibmasmfs.c 2009-10-11 15:29:44.144639162 -0400
@@ -97,7 +97,7 @@ static int ibmasmfs_get_super(struct fil
return get_sb_single(fst, flags, data, ibmasmfs_fill_super, mnt);
}
@@ -19147,9 +20923,30 @@ diff -urNp linux-2.6.30.8/drivers/misc/ibmasm/ibmasmfs.c linux-2.6.30.8/drivers/
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
};
-diff -urNp linux-2.6.30.8/drivers/misc/phantom.c linux-2.6.30.8/drivers/misc/phantom.c
---- linux-2.6.30.8/drivers/misc/phantom.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/misc/phantom.c 2009-07-30 09:48:10.037448258 -0400
+diff -urNp linux-2.6.31.4/drivers/misc/kgdbts.c linux-2.6.31.4/drivers/misc/kgdbts.c
+--- linux-2.6.31.4/drivers/misc/kgdbts.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/misc/kgdbts.c 2009-10-11 15:29:56.651812655 -0400
+@@ -118,7 +118,7 @@
+ } while (0)
+ #define MAX_CONFIG_LEN 40
+
+-static struct kgdb_io kgdbts_io_ops;
++static const struct kgdb_io kgdbts_io_ops;
+ static char get_buf[BUFMAX];
+ static int get_buf_cnt;
+ static char put_buf[BUFMAX];
+@@ -1102,7 +1102,7 @@ static void kgdbts_post_exp_handler(void
+ module_put(THIS_MODULE);
+ }
+
+-static struct kgdb_io kgdbts_io_ops = {
++static const struct kgdb_io kgdbts_io_ops = {
+ .name = "kgdbts",
+ .read_char = kgdbts_get_char,
+ .write_char = kgdbts_put_char,
+diff -urNp linux-2.6.31.4/drivers/misc/phantom.c linux-2.6.31.4/drivers/misc/phantom.c
+--- linux-2.6.31.4/drivers/misc/phantom.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/misc/phantom.c 2009-10-11 15:29:44.151696755 -0400
@@ -271,7 +271,7 @@ static unsigned int phantom_poll(struct
return mask;
}
@@ -19159,9 +20956,9 @@ diff -urNp linux-2.6.30.8/drivers/misc/phantom.c linux-2.6.30.8/drivers/misc/pha
.open = phantom_open,
.release = phantom_release,
.unlocked_ioctl = phantom_ioctl,
-diff -urNp linux-2.6.30.8/drivers/misc/sgi-gru/grufile.c linux-2.6.30.8/drivers/misc/sgi-gru/grufile.c
---- linux-2.6.30.8/drivers/misc/sgi-gru/grufile.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/misc/sgi-gru/grufile.c 2009-07-30 17:46:03.273720317 -0400
+diff -urNp linux-2.6.31.4/drivers/misc/sgi-gru/grufile.c linux-2.6.31.4/drivers/misc/sgi-gru/grufile.c
+--- linux-2.6.31.4/drivers/misc/sgi-gru/grufile.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/misc/sgi-gru/grufile.c 2009-10-11 15:29:44.181375113 -0400
@@ -53,7 +53,7 @@ struct gru_stats_s gru_stats;
/* Guaranteed user available resources on each node */
static int max_user_cbrs, max_user_dsr_bytes;
@@ -19171,7 +20968,7 @@ diff -urNp linux-2.6.30.8/drivers/misc/sgi-gru/grufile.c linux-2.6.30.8/drivers/
static struct miscdevice gru_miscdev;
-@@ -460,7 +460,7 @@ static void __exit gru_exit(void)
+@@ -426,7 +426,7 @@ static void __exit gru_exit(void)
gru_proc_exit();
}
@@ -19180,7 +20977,7 @@ diff -urNp linux-2.6.30.8/drivers/misc/sgi-gru/grufile.c linux-2.6.30.8/drivers/
.owner = THIS_MODULE,
.unlocked_ioctl = gru_file_unlocked_ioctl,
.mmap = gru_file_mmap,
-@@ -472,7 +472,7 @@ static struct miscdevice gru_miscdev = {
+@@ -438,7 +438,7 @@ static struct miscdevice gru_miscdev = {
.fops = &gru_fops,
};
@@ -19189,10 +20986,10 @@ diff -urNp linux-2.6.30.8/drivers/misc/sgi-gru/grufile.c linux-2.6.30.8/drivers/
.close = gru_vma_close,
.fault = gru_fault,
};
-diff -urNp linux-2.6.30.8/drivers/misc/sgi-gru/grutables.h linux-2.6.30.8/drivers/misc/sgi-gru/grutables.h
---- linux-2.6.30.8/drivers/misc/sgi-gru/grutables.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/misc/sgi-gru/grutables.h 2009-07-30 17:46:28.013592240 -0400
-@@ -589,7 +589,7 @@ static inline void unlock_tgh_handle(str
+diff -urNp linux-2.6.31.4/drivers/misc/sgi-gru/grutables.h linux-2.6.31.4/drivers/misc/sgi-gru/grutables.h
+--- linux-2.6.31.4/drivers/misc/sgi-gru/grutables.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/misc/sgi-gru/grutables.h 2009-10-11 15:29:44.191716193 -0400
+@@ -624,7 +624,7 @@ static inline int is_kernel_context(stru
*/
struct gru_unload_context_req;
@@ -19201,9 +20998,9 @@ diff -urNp linux-2.6.30.8/drivers/misc/sgi-gru/grutables.h linux-2.6.30.8/driver
extern struct device *grudev;
extern struct gru_vma_data *gru_alloc_vma_data(struct vm_area_struct *vma,
-diff -urNp linux-2.6.30.8/drivers/mmc/core/debugfs.c linux-2.6.30.8/drivers/mmc/core/debugfs.c
---- linux-2.6.30.8/drivers/mmc/core/debugfs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/mmc/core/debugfs.c 2009-07-30 12:06:52.113899680 -0400
+diff -urNp linux-2.6.31.4/drivers/mmc/core/debugfs.c linux-2.6.31.4/drivers/mmc/core/debugfs.c
+--- linux-2.6.31.4/drivers/mmc/core/debugfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/mmc/core/debugfs.c 2009-10-11 15:29:44.204796497 -0400
@@ -240,7 +240,7 @@ static int mmc_ext_csd_release(struct in
return 0;
}
@@ -19213,9 +21010,9 @@ diff -urNp linux-2.6.30.8/drivers/mmc/core/debugfs.c linux-2.6.30.8/drivers/mmc/
.open = mmc_ext_csd_open,
.read = mmc_ext_csd_read,
.release = mmc_ext_csd_release,
-diff -urNp linux-2.6.30.8/drivers/mtd/devices/doc2000.c linux-2.6.30.8/drivers/mtd/devices/doc2000.c
---- linux-2.6.30.8/drivers/mtd/devices/doc2000.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/mtd/devices/doc2000.c 2009-07-30 09:48:10.037448258 -0400
+diff -urNp linux-2.6.31.4/drivers/mtd/devices/doc2000.c linux-2.6.31.4/drivers/mtd/devices/doc2000.c
+--- linux-2.6.31.4/drivers/mtd/devices/doc2000.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/mtd/devices/doc2000.c 2009-10-11 15:29:44.224823634 -0400
@@ -776,7 +776,7 @@ static int doc_write(struct mtd_info *mt
/* The ECC will not be calculated correctly if less than 512 is written */
@@ -19225,9 +21022,9 @@ diff -urNp linux-2.6.30.8/drivers/mtd/devices/doc2000.c linux-2.6.30.8/drivers/m
printk(KERN_WARNING
"ECC needs a full sector write (adr: %lx size %lx)\n",
(long) to, (long) len);
-diff -urNp linux-2.6.30.8/drivers/mtd/devices/doc2001.c linux-2.6.30.8/drivers/mtd/devices/doc2001.c
---- linux-2.6.30.8/drivers/mtd/devices/doc2001.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/mtd/devices/doc2001.c 2009-07-30 11:10:49.040301758 -0400
+diff -urNp linux-2.6.31.4/drivers/mtd/devices/doc2001.c linux-2.6.31.4/drivers/mtd/devices/doc2001.c
+--- linux-2.6.31.4/drivers/mtd/devices/doc2001.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/mtd/devices/doc2001.c 2009-10-11 15:29:44.231733020 -0400
@@ -395,6 +395,8 @@ static int doc_read (struct mtd_info *mt
/* Don't allow read past end of device */
if (from >= this->totlen)
@@ -19237,10 +21034,10 @@ diff -urNp linux-2.6.30.8/drivers/mtd/devices/doc2001.c linux-2.6.30.8/drivers/m
/* Don't allow a single read to cross a 512-byte block boundary */
if (from + len > ((from | 0x1ff) + 1))
-diff -urNp linux-2.6.30.8/drivers/mtd/ubi/build.c linux-2.6.30.8/drivers/mtd/ubi/build.c
---- linux-2.6.30.8/drivers/mtd/ubi/build.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/mtd/ubi/build.c 2009-07-30 09:48:10.038828720 -0400
-@@ -1112,7 +1112,7 @@ static int __init bytes_str_to_int(const
+diff -urNp linux-2.6.31.4/drivers/mtd/ubi/build.c linux-2.6.31.4/drivers/mtd/ubi/build.c
+--- linux-2.6.31.4/drivers/mtd/ubi/build.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/mtd/ubi/build.c 2009-10-11 15:29:44.251713063 -0400
+@@ -1257,7 +1257,7 @@ static int __init bytes_str_to_int(const
unsigned long result;
result = simple_strtoul(str, &endp, 0);
@@ -19249,9 +21046,9 @@ diff -urNp linux-2.6.30.8/drivers/mtd/ubi/build.c linux-2.6.30.8/drivers/mtd/ubi
printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n",
str);
return -EINVAL;
-diff -urNp linux-2.6.30.8/drivers/net/irda/vlsi_ir.c linux-2.6.30.8/drivers/net/irda/vlsi_ir.c
---- linux-2.6.30.8/drivers/net/irda/vlsi_ir.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/net/irda/vlsi_ir.c 2009-07-30 09:48:10.038828720 -0400
+diff -urNp linux-2.6.31.4/drivers/net/irda/vlsi_ir.c linux-2.6.31.4/drivers/net/irda/vlsi_ir.c
+--- linux-2.6.31.4/drivers/net/irda/vlsi_ir.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/net/irda/vlsi_ir.c 2009-10-11 15:29:44.258384983 -0400
@@ -906,13 +906,12 @@ static int vlsi_hard_start_xmit(struct s
/* no race - tx-ring already empty */
vlsi_set_baud(idev, iobase);
@@ -19268,9 +21065,9 @@ diff -urNp linux-2.6.30.8/drivers/net/irda/vlsi_ir.c linux-2.6.30.8/drivers/net/
spin_unlock_irqrestore(&idev->lock, flags);
dev_kfree_skb_any(skb);
return 0;
-diff -urNp linux-2.6.30.8/drivers/net/pcnet32.c linux-2.6.30.8/drivers/net/pcnet32.c
---- linux-2.6.30.8/drivers/net/pcnet32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/net/pcnet32.c 2009-07-30 09:48:10.039525961 -0400
+diff -urNp linux-2.6.31.4/drivers/net/pcnet32.c linux-2.6.31.4/drivers/net/pcnet32.c
+--- linux-2.6.31.4/drivers/net/pcnet32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/net/pcnet32.c 2009-10-11 15:29:44.290520192 -0400
@@ -78,7 +78,7 @@ static int cards_found;
/*
* VLB I/O addresses
@@ -19280,9 +21077,9 @@ diff -urNp linux-2.6.30.8/drivers/net/pcnet32.c linux-2.6.30.8/drivers/net/pcnet
{ 0x300, 0x320, 0x340, 0x360, 0 };
static int pcnet32_debug = 0;
-diff -urNp linux-2.6.30.8/drivers/net/tg3.h linux-2.6.30.8/drivers/net/tg3.h
---- linux-2.6.30.8/drivers/net/tg3.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/net/tg3.h 2009-07-30 09:48:10.040563677 -0400
+diff -urNp linux-2.6.31.4/drivers/net/tg3.h linux-2.6.31.4/drivers/net/tg3.h
+--- linux-2.6.31.4/drivers/net/tg3.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/net/tg3.h 2009-10-11 15:29:44.293671047 -0400
@@ -89,6 +89,7 @@
#define CHIPREV_ID_5750_A0 0x4000
#define CHIPREV_ID_5750_A1 0x4001
@@ -19291,9 +21088,90 @@ diff -urNp linux-2.6.30.8/drivers/net/tg3.h linux-2.6.30.8/drivers/net/tg3.h
#define CHIPREV_ID_5750_C2 0x4202
#define CHIPREV_ID_5752_A0_HW 0x5000
#define CHIPREV_ID_5752_A0 0x6000
-diff -urNp linux-2.6.30.8/drivers/oprofile/buffer_sync.c linux-2.6.30.8/drivers/oprofile/buffer_sync.c
---- linux-2.6.30.8/drivers/oprofile/buffer_sync.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/oprofile/buffer_sync.c 2009-07-30 09:48:10.040563677 -0400
+diff -urNp linux-2.6.31.4/drivers/net/usb/hso.c linux-2.6.31.4/drivers/net/usb/hso.c
+--- linux-2.6.31.4/drivers/net/usb/hso.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/net/usb/hso.c 2009-10-11 15:29:44.585641846 -0400
+@@ -258,7 +258,7 @@ struct hso_serial {
+
+ /* from usb_serial_port */
+ struct tty_struct *tty;
+- int open_count;
++ atomic_t open_count;
+ spinlock_t serial_lock;
+
+ int (*write_data) (struct hso_serial *serial);
+@@ -1179,7 +1179,7 @@ static void put_rxbuf_data_and_resubmit_
+ struct urb *urb;
+
+ urb = serial->rx_urb[0];
+- if (serial->open_count > 0) {
++ if (atomic_read(&serial->open_count) > 0) {
+ count = put_rxbuf_data(urb, serial);
+ if (count == -1)
+ return;
+@@ -1215,7 +1215,7 @@ static void hso_std_serial_read_bulk_cal
+ DUMP1(urb->transfer_buffer, urb->actual_length);
+
+ /* Anyone listening? */
+- if (serial->open_count == 0)
++ if (atomic_read(&serial->open_count) == 0)
+ return;
+
+ if (status == 0) {
+@@ -1310,8 +1310,7 @@ static int hso_serial_open(struct tty_st
+ spin_unlock_irq(&serial->serial_lock);
+
+ /* check for port already opened, if not set the termios */
+- serial->open_count++;
+- if (serial->open_count == 1) {
++ if (atomic_inc_return(&serial->open_count) == 1) {
+ tty->low_latency = 1;
+ serial->rx_state = RX_IDLE;
+ /* Force default termio settings */
+@@ -1324,7 +1323,7 @@ static int hso_serial_open(struct tty_st
+ result = hso_start_serial_device(serial->parent, GFP_KERNEL);
+ if (result) {
+ hso_stop_serial_device(serial->parent);
+- serial->open_count--;
++ atomic_dec(&serial->open_count);
+ kref_put(&serial->parent->ref, hso_serial_ref_free);
+ }
+ } else {
+@@ -1361,10 +1360,10 @@ static void hso_serial_close(struct tty_
+
+ /* reset the rts and dtr */
+ /* do the actual close */
+- serial->open_count--;
++ atomic_dec(&serial->open_count);
+ kref_put(&serial->parent->ref, hso_serial_ref_free);
+- if (serial->open_count <= 0) {
+- serial->open_count = 0;
++ if (atomic_read(&serial->open_count) <= 0) {
++ atomic_set(&serial->open_count, 0);
+ spin_lock_irq(&serial->serial_lock);
+ if (serial->tty == tty) {
+ serial->tty->driver_data = NULL;
+@@ -1444,7 +1443,7 @@ static void hso_serial_set_termios(struc
+
+ /* the actual setup */
+ spin_lock_irqsave(&serial->serial_lock, flags);
+- if (serial->open_count)
++ if (atomic_read(&serial->open_count))
+ _hso_serial_set_termios(tty, old);
+ else
+ tty->termios = old;
+@@ -3087,7 +3086,7 @@ static int hso_resume(struct usb_interfa
+ /* Start all serial ports */
+ for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) {
+ if (serial_table[i] && (serial_table[i]->interface == iface)) {
+- if (dev2ser(serial_table[i])->open_count) {
++ if (atomic_read(&dev2ser(serial_table[i])->open_count)) {
+ result =
+ hso_start_serial_device(serial_table[i], GFP_NOIO);
+ hso_kick_transmit(dev2ser(serial_table[i]));
+diff -urNp linux-2.6.31.4/drivers/oprofile/buffer_sync.c linux-2.6.31.4/drivers/oprofile/buffer_sync.c
+--- linux-2.6.31.4/drivers/oprofile/buffer_sync.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/oprofile/buffer_sync.c 2009-10-11 15:29:44.618380075 -0400
@@ -341,7 +341,7 @@ static void add_data(struct op_entry *en
if (cookie == NO_COOKIE)
offset = pc;
@@ -19329,9 +21207,9 @@ diff -urNp linux-2.6.30.8/drivers/oprofile/buffer_sync.c linux-2.6.30.8/drivers/
}
}
release_mm(mm);
-diff -urNp linux-2.6.30.8/drivers/oprofile/event_buffer.c linux-2.6.30.8/drivers/oprofile/event_buffer.c
---- linux-2.6.30.8/drivers/oprofile/event_buffer.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/oprofile/event_buffer.c 2009-07-30 09:48:10.040563677 -0400
+diff -urNp linux-2.6.31.4/drivers/oprofile/event_buffer.c linux-2.6.31.4/drivers/oprofile/event_buffer.c
+--- linux-2.6.31.4/drivers/oprofile/event_buffer.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/oprofile/event_buffer.c 2009-10-11 15:29:44.618380075 -0400
@@ -42,7 +42,7 @@ static atomic_t buffer_ready = ATOMIC_IN
void add_event_entry(unsigned long value)
{
@@ -19341,9 +21219,9 @@ diff -urNp linux-2.6.30.8/drivers/oprofile/event_buffer.c linux-2.6.30.8/drivers
return;
}
-diff -urNp linux-2.6.30.8/drivers/oprofile/oprofilefs.c linux-2.6.30.8/drivers/oprofile/oprofilefs.c
---- linux-2.6.30.8/drivers/oprofile/oprofilefs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/oprofile/oprofilefs.c 2009-07-30 09:48:10.043540480 -0400
+diff -urNp linux-2.6.31.4/drivers/oprofile/oprofilefs.c linux-2.6.31.4/drivers/oprofile/oprofilefs.c
+--- linux-2.6.31.4/drivers/oprofile/oprofilefs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/oprofile/oprofilefs.c 2009-10-11 15:29:44.628632352 -0400
@@ -35,7 +35,7 @@ static struct inode *oprofilefs_get_inod
}
@@ -19362,9 +21240,27 @@ diff -urNp linux-2.6.30.8/drivers/oprofile/oprofilefs.c linux-2.6.30.8/drivers/o
{
struct dentry *d = __oprofilefs_create_file(sb, root, name,
&atomic_ro_fops, 0444);
-diff -urNp linux-2.6.30.8/drivers/oprofile/oprofile_stats.h linux-2.6.30.8/drivers/oprofile/oprofile_stats.h
---- linux-2.6.30.8/drivers/oprofile/oprofile_stats.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/oprofile/oprofile_stats.h 2009-07-30 09:48:10.043540480 -0400
+diff -urNp linux-2.6.31.4/drivers/oprofile/oprofile_stats.c linux-2.6.31.4/drivers/oprofile/oprofile_stats.c
+--- linux-2.6.31.4/drivers/oprofile/oprofile_stats.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/oprofile/oprofile_stats.c 2009-10-11 15:29:44.630372065 -0400
+@@ -30,10 +30,10 @@ void oprofile_reset_stats(void)
+ cpu_buf->sample_invalid_eip = 0;
+ }
+
+- atomic_set(&oprofile_stats.sample_lost_no_mm, 0);
+- atomic_set(&oprofile_stats.sample_lost_no_mapping, 0);
+- atomic_set(&oprofile_stats.event_lost_overflow, 0);
+- atomic_set(&oprofile_stats.bt_lost_no_mapping, 0);
++ atomic_set_unchecked(&oprofile_stats.sample_lost_no_mm, 0);
++ atomic_set_unchecked(&oprofile_stats.sample_lost_no_mapping, 0);
++ atomic_set_unchecked(&oprofile_stats.event_lost_overflow, 0);
++ atomic_set_unchecked(&oprofile_stats.bt_lost_no_mapping, 0);
+ }
+
+
+diff -urNp linux-2.6.31.4/drivers/oprofile/oprofile_stats.h linux-2.6.31.4/drivers/oprofile/oprofile_stats.h
+--- linux-2.6.31.4/drivers/oprofile/oprofile_stats.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/oprofile/oprofile_stats.h 2009-10-11 15:29:44.630372065 -0400
@@ -13,10 +13,10 @@
#include <asm/atomic.h>
@@ -19380,22 +21276,10 @@ diff -urNp linux-2.6.30.8/drivers/oprofile/oprofile_stats.h linux-2.6.30.8/drive
};
extern struct oprofile_stat_struct oprofile_stats;
-diff -urNp linux-2.6.30.8/drivers/pci/hotplug/cpqphp.h linux-2.6.30.8/drivers/pci/hotplug/cpqphp.h
---- linux-2.6.30.8/drivers/pci/hotplug/cpqphp.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pci/hotplug/cpqphp.h 2009-07-30 09:48:10.043540480 -0400
-@@ -449,7 +449,7 @@ extern u8 cpqhp_disk_irq;
-
- /* inline functions */
-
--static inline char *slot_name(struct slot *slot)
-+static inline const char *slot_name(struct slot *slot)
- {
- return hotplug_slot_name(slot->hotplug_slot);
- }
-diff -urNp linux-2.6.30.8/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.30.8/drivers/pci/hotplug/cpqphp_nvram.c
---- linux-2.6.30.8/drivers/pci/hotplug/cpqphp_nvram.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pci/hotplug/cpqphp_nvram.c 2009-07-30 09:48:10.043540480 -0400
-@@ -425,9 +425,13 @@ static u32 store_HRT (void __iomem *rom_
+diff -urNp linux-2.6.31.4/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.31.4/drivers/pci/hotplug/cpqphp_nvram.c
+--- linux-2.6.31.4/drivers/pci/hotplug/cpqphp_nvram.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/pci/hotplug/cpqphp_nvram.c 2009-10-11 15:29:44.665386313 -0400
+@@ -428,9 +428,13 @@ static u32 store_HRT (void __iomem *rom_
void compaq_nvram_init (void __iomem *rom_start)
{
@@ -19409,21 +21293,9 @@ diff -urNp linux-2.6.30.8/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.30.8/driv
dbg("int15 entry = %p\n", compaq_int15_entry_point);
/* initialize our int15 lock */
-diff -urNp linux-2.6.30.8/drivers/pci/pcie/aer/aerdrv_core.c linux-2.6.30.8/drivers/pci/pcie/aer/aerdrv_core.c
---- linux-2.6.30.8/drivers/pci/pcie/aer/aerdrv_core.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pci/pcie/aer/aerdrv_core.c 2009-07-30 09:48:10.044753152 -0400
-@@ -670,7 +670,7 @@ static void aer_isr_one_error(struct pci
- struct aer_err_source *e_src)
- {
- struct device *s_device;
-- struct aer_err_info e_info = {0, 0, 0,};
-+ struct aer_err_info e_info = {0, 0, 0, {0, 0, 0, 0}};
- int i;
- u16 id;
-
-diff -urNp linux-2.6.30.8/drivers/pci/pcie/portdrv_pci.c linux-2.6.30.8/drivers/pci/pcie/portdrv_pci.c
---- linux-2.6.30.8/drivers/pci/pcie/portdrv_pci.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pci/pcie/portdrv_pci.c 2009-07-30 09:48:10.044753152 -0400
+diff -urNp linux-2.6.31.4/drivers/pci/pcie/portdrv_pci.c linux-2.6.31.4/drivers/pci/pcie/portdrv_pci.c
+--- linux-2.6.31.4/drivers/pci/pcie/portdrv_pci.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/pci/pcie/portdrv_pci.c 2009-10-11 15:29:44.668667899 -0400
@@ -249,7 +249,7 @@ static void pcie_portdrv_err_resume(stru
static const struct pci_device_id port_pci_ids[] = { {
/* handle any PCI-Express port */
@@ -19433,9 +21305,9 @@ diff -urNp linux-2.6.30.8/drivers/pci/pcie/portdrv_pci.c linux-2.6.30.8/drivers/
};
MODULE_DEVICE_TABLE(pci, port_pci_ids);
-diff -urNp linux-2.6.30.8/drivers/pci/proc.c linux-2.6.30.8/drivers/pci/proc.c
---- linux-2.6.30.8/drivers/pci/proc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pci/proc.c 2009-07-30 11:10:49.067392504 -0400
+diff -urNp linux-2.6.31.4/drivers/pci/proc.c linux-2.6.31.4/drivers/pci/proc.c
+--- linux-2.6.31.4/drivers/pci/proc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/pci/proc.c 2009-10-11 15:29:44.679387313 -0400
@@ -480,7 +480,16 @@ static const struct file_operations proc
static int __init pci_proc_init(void)
{
@@ -19453,9 +21325,9 @@ diff -urNp linux-2.6.30.8/drivers/pci/proc.c linux-2.6.30.8/drivers/pci/proc.c
proc_create("devices", 0, proc_bus_pci_dir,
&proc_bus_pci_dev_operations);
proc_initialized = 1;
-diff -urNp linux-2.6.30.8/drivers/pcmcia/ti113x.h linux-2.6.30.8/drivers/pcmcia/ti113x.h
---- linux-2.6.30.8/drivers/pcmcia/ti113x.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pcmcia/ti113x.h 2009-07-30 09:48:10.044753152 -0400
+diff -urNp linux-2.6.31.4/drivers/pcmcia/ti113x.h linux-2.6.31.4/drivers/pcmcia/ti113x.h
+--- linux-2.6.31.4/drivers/pcmcia/ti113x.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/pcmcia/ti113x.h 2009-10-11 15:29:44.692586872 -0400
@@ -903,7 +903,7 @@ static struct pci_device_id ene_tune_tbl
DEVID(PCI_VENDOR_ID_MOTOROLA, 0x3410, 0xECC0, PCI_ANY_ID,
ENE_TEST_C9_TLTENABLE | ENE_TEST_C9_PFENABLE, ENE_TEST_C9_TLTENABLE),
@@ -19465,10 +21337,10 @@ diff -urNp linux-2.6.30.8/drivers/pcmcia/ti113x.h linux-2.6.30.8/drivers/pcmcia/
};
static void ene_tune_bridge(struct pcmcia_socket *sock, struct pci_bus *bus)
-diff -urNp linux-2.6.30.8/drivers/pcmcia/yenta_socket.c linux-2.6.30.8/drivers/pcmcia/yenta_socket.c
---- linux-2.6.30.8/drivers/pcmcia/yenta_socket.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pcmcia/yenta_socket.c 2009-07-30 09:48:10.045642944 -0400
-@@ -1366,7 +1366,7 @@ static struct pci_device_id yenta_table
+diff -urNp linux-2.6.31.4/drivers/pcmcia/yenta_socket.c linux-2.6.31.4/drivers/pcmcia/yenta_socket.c
+--- linux-2.6.31.4/drivers/pcmcia/yenta_socket.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/pcmcia/yenta_socket.c 2009-10-11 15:29:44.706664278 -0400
+@@ -1377,7 +1377,7 @@ static struct pci_device_id yenta_table
/* match any cardbus bridge */
CB_ID(PCI_ANY_ID, PCI_ANY_ID, DEFAULT),
@@ -19477,9 +21349,9 @@ diff -urNp linux-2.6.30.8/drivers/pcmcia/yenta_socket.c linux-2.6.30.8/drivers/p
};
MODULE_DEVICE_TABLE(pci, yenta_table);
-diff -urNp linux-2.6.30.8/drivers/pnp/pnpbios/bioscalls.c linux-2.6.30.8/drivers/pnp/pnpbios/bioscalls.c
---- linux-2.6.30.8/drivers/pnp/pnpbios/bioscalls.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pnp/pnpbios/bioscalls.c 2009-07-30 09:48:10.045642944 -0400
+diff -urNp linux-2.6.31.4/drivers/pnp/pnpbios/bioscalls.c linux-2.6.31.4/drivers/pnp/pnpbios/bioscalls.c
+--- linux-2.6.31.4/drivers/pnp/pnpbios/bioscalls.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/pnp/pnpbios/bioscalls.c 2009-10-12 23:12:55.434226670 -0400
@@ -60,7 +60,7 @@ set_base(gdt[(selname) >> 3], (u32)(addr
set_limit(gdt[(selname) >> 3], size); \
} while(0)
@@ -19489,53 +21361,29 @@ diff -urNp linux-2.6.30.8/drivers/pnp/pnpbios/bioscalls.c linux-2.6.30.8/drivers
/*
* At some point we want to use this stack frame pointer to unwind
-@@ -87,6 +87,10 @@ static inline u16 call_pnp_bios(u16 func
- struct desc_struct save_desc_40;
- int cpu;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- /*
- * PnP BIOSes are generally not terribly re-entrant.
- * Also, don't rely on them to save everything correctly.
-@@ -96,8 +100,17 @@ static inline u16 call_pnp_bios(u16 func
+@@ -96,7 +96,10 @@ static inline u16 call_pnp_bios(u16 func
cpu = get_cpu();
save_desc_40 = get_cpu_gdt_table(cpu)[0x40 / 8];
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
get_cpu_gdt_table(cpu)[0x40 / 8] = bad_bios_desc;
++ pax_close_kernel();
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
/* On some boxes IRQ's during PnP BIOS calls are deadly. */
spin_lock_irqsave(&pnp_bios_lock, flags);
-
-@@ -134,7 +147,16 @@ static inline u16 call_pnp_bios(u16 func
+@@ -134,7 +137,10 @@ static inline u16 call_pnp_bios(u16 func
:"memory");
spin_unlock_irqrestore(&pnp_bios_lock, flags);
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
get_cpu_gdt_table(cpu)[0x40 / 8] = save_desc_40;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
++ pax_close_kernel();
+
put_cpu();
/* If we get here and this is set then the PnP BIOS faulted on us. */
-@@ -468,16 +490,24 @@ int pnp_bios_read_escd(char *data, u32 n
+@@ -468,7 +474,7 @@ int pnp_bios_read_escd(char *data, u32 n
return status;
}
@@ -19544,17 +21392,11 @@ diff -urNp linux-2.6.30.8/drivers/pnp/pnpbios/bioscalls.c linux-2.6.30.8/drivers
{
int i;
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- spin_lock_init(&pnp_bios_lock);
+@@ -476,8 +482,10 @@ void pnpbios_calls_init(union pnp_bios_i
pnp_bios_callpoint.offset = header->fields.pm16offset;
pnp_bios_callpoint.segment = PNP_CS16;
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
++ pax_open_kernel();
+
bad_bios_desc.a = 0;
- bad_bios_desc.b = 0x00409200;
@@ -19562,19 +21404,16 @@ diff -urNp linux-2.6.30.8/drivers/pnp/pnpbios/bioscalls.c linux-2.6.30.8/drivers
set_base(bad_bios_desc, __va((unsigned long)0x40 << 4));
_set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4));
-@@ -491,4 +521,9 @@ void pnpbios_calls_init(union pnp_bios_i
+@@ -491,4 +499,6 @@ void pnpbios_calls_init(union pnp_bios_i
set_base(gdt[GDT_ENTRY_PNPBIOS_DS],
__va(header->fields.pm16dseg));
}
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
}
-diff -urNp linux-2.6.30.8/drivers/pnp/quirks.c linux-2.6.30.8/drivers/pnp/quirks.c
---- linux-2.6.30.8/drivers/pnp/quirks.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pnp/quirks.c 2009-07-30 09:48:10.045642944 -0400
+diff -urNp linux-2.6.31.4/drivers/pnp/quirks.c linux-2.6.31.4/drivers/pnp/quirks.c
+--- linux-2.6.31.4/drivers/pnp/quirks.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/pnp/quirks.c 2009-10-11 15:29:44.731654476 -0400
@@ -327,7 +327,7 @@ static struct pnp_fixup pnp_fixups[] = {
/* PnP resources that might overlap PCI BARs */
{"PNP0c01", quirk_system_pci_resources},
@@ -19584,9 +21423,9 @@ diff -urNp linux-2.6.30.8/drivers/pnp/quirks.c linux-2.6.30.8/drivers/pnp/quirks
};
void pnp_fixup_device(struct pnp_dev *dev)
-diff -urNp linux-2.6.30.8/drivers/pnp/resource.c linux-2.6.30.8/drivers/pnp/resource.c
---- linux-2.6.30.8/drivers/pnp/resource.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/pnp/resource.c 2009-07-30 09:48:10.045642944 -0400
+diff -urNp linux-2.6.31.4/drivers/pnp/resource.c linux-2.6.31.4/drivers/pnp/resource.c
+--- linux-2.6.31.4/drivers/pnp/resource.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/pnp/resource.c 2009-10-11 15:29:44.732423827 -0400
@@ -355,7 +355,7 @@ int pnp_check_irq(struct pnp_dev *dev, s
return 1;
@@ -19605,10 +21444,10 @@ diff -urNp linux-2.6.30.8/drivers/pnp/resource.c linux-2.6.30.8/drivers/pnp/reso
return 0;
/* check if the resource is reserved */
-diff -urNp linux-2.6.30.8/drivers/s390/cio/qdio_debug.c linux-2.6.30.8/drivers/s390/cio/qdio_debug.c
---- linux-2.6.30.8/drivers/s390/cio/qdio_debug.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/s390/cio/qdio_debug.c 2009-07-30 09:48:10.046735063 -0400
-@@ -145,7 +145,7 @@ static void remove_debugfs_entry(struct
+diff -urNp linux-2.6.31.4/drivers/s390/cio/qdio_debug.c linux-2.6.31.4/drivers/s390/cio/qdio_debug.c
+--- linux-2.6.31.4/drivers/s390/cio/qdio_debug.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/s390/cio/qdio_debug.c 2009-10-11 15:29:44.779362855 -0400
+@@ -144,7 +144,7 @@ static void remove_debugfs_entry(struct
}
}
@@ -19617,10 +21456,10 @@ diff -urNp linux-2.6.30.8/drivers/s390/cio/qdio_debug.c linux-2.6.30.8/drivers/s
.owner = THIS_MODULE,
.open = qstat_seq_open,
.read = seq_read,
-diff -urNp linux-2.6.30.8/drivers/s390/cio/qdio_perf.c linux-2.6.30.8/drivers/s390/cio/qdio_perf.c
---- linux-2.6.30.8/drivers/s390/cio/qdio_perf.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/s390/cio/qdio_perf.c 2009-07-30 09:48:10.046735063 -0400
-@@ -96,7 +96,7 @@ static int qdio_perf_seq_open(struct ino
+diff -urNp linux-2.6.31.4/drivers/s390/cio/qdio_perf.c linux-2.6.31.4/drivers/s390/cio/qdio_perf.c
+--- linux-2.6.31.4/drivers/s390/cio/qdio_perf.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/s390/cio/qdio_perf.c 2009-10-11 15:29:44.793374565 -0400
+@@ -84,7 +84,7 @@ static int qdio_perf_seq_open(struct ino
return single_open(filp, qdio_perf_proc_show, NULL);
}
@@ -19629,10 +21468,10 @@ diff -urNp linux-2.6.30.8/drivers/s390/cio/qdio_perf.c linux-2.6.30.8/drivers/s3
.owner = THIS_MODULE,
.open = qdio_perf_seq_open,
.read = seq_read,
-diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c
---- linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c 2009-07-30 09:48:10.047458850 -0400
-@@ -84,12 +84,12 @@ struct fc_exch_mgr {
+diff -urNp linux-2.6.31.4/drivers/scsi/libfc/fc_exch.c linux-2.6.31.4/drivers/scsi/libfc/fc_exch.c
+--- linux-2.6.31.4/drivers/scsi/libfc/fc_exch.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/scsi/libfc/fc_exch.c 2009-10-11 15:29:44.802463958 -0400
+@@ -73,12 +73,12 @@ struct fc_exch_mgr {
* all together if not used XXX
*/
struct {
@@ -19651,7 +21490,7 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
} stats;
struct fc_exch **exches; /* for exch pointers indexed by xid */
};
-@@ -534,7 +534,7 @@ struct fc_exch *fc_exch_alloc(struct fc_
+@@ -523,7 +523,7 @@ struct fc_exch *fc_exch_alloc(struct fc_
/* allocate memory for exchange */
ep = mempool_alloc(mp->ep_pool, GFP_ATOMIC);
if (!ep) {
@@ -19660,7 +21499,7 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
goto out;
}
memset(ep, 0, sizeof(*ep));
-@@ -579,7 +579,7 @@ out:
+@@ -568,7 +568,7 @@ out:
return ep;
err:
spin_unlock_bh(&mp->em_lock);
@@ -19669,7 +21508,7 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
mempool_free(ep, mp->ep_pool);
return NULL;
}
-@@ -682,7 +682,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -671,7 +671,7 @@ static enum fc_pf_rjt_reason fc_seq_look
xid = ntohs(fh->fh_ox_id); /* we originated exch */
ep = fc_exch_find(mp, xid);
if (!ep) {
@@ -19678,7 +21517,7 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
reject = FC_RJT_OX_ID;
goto out;
}
-@@ -712,7 +712,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -701,7 +701,7 @@ static enum fc_pf_rjt_reason fc_seq_look
ep = fc_exch_find(mp, xid);
if ((f_ctl & FC_FC_FIRST_SEQ) && fc_sof_is_init(fr_sof(fp))) {
if (ep) {
@@ -19687,7 +21526,7 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
reject = FC_RJT_RX_ID;
goto rel;
}
-@@ -723,7 +723,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -712,7 +712,7 @@ static enum fc_pf_rjt_reason fc_seq_look
}
xid = ep->xid; /* get our XID */
} else if (!ep) {
@@ -19696,7 +21535,7 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
reject = FC_RJT_RX_ID; /* XID not found */
goto out;
}
-@@ -744,7 +744,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -733,7 +733,7 @@ static enum fc_pf_rjt_reason fc_seq_look
} else {
sp = &ep->seq;
if (sp->id != fh->fh_seq_id) {
@@ -19705,7 +21544,7 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
reject = FC_RJT_SEQ_ID; /* sequence/exch should exist */
goto rel;
}
-@@ -1156,18 +1156,18 @@ static void fc_exch_recv_seq_resp(struct
+@@ -1145,22 +1145,22 @@ static void fc_exch_recv_seq_resp(struct
ep = fc_exch_find(mp, ntohs(fh->fh_ox_id));
if (!ep) {
@@ -19713,6 +21552,11 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
+ atomic_inc_unchecked(&mp->stats.xid_not_found);
goto out;
}
+ if (ep->esb_stat & ESB_ST_COMPLETE) {
+- atomic_inc(&mp->stats.xid_not_found);
++ atomic_inc_unchecked(&mp->stats.xid_not_found);
+ goto out;
+ }
if (ep->rxid == FC_XID_UNKNOWN)
ep->rxid = ntohs(fh->fh_rx_id);
if (ep->sid != 0 && ep->sid != ntoh24(fh->fh_d_id)) {
@@ -19727,7 +21571,7 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
goto rel;
}
sof = fr_sof(fp);
-@@ -1178,7 +1178,7 @@ static void fc_exch_recv_seq_resp(struct
+@@ -1171,7 +1171,7 @@ static void fc_exch_recv_seq_resp(struct
} else {
sp = &ep->seq;
if (sp->id != fh->fh_seq_id) {
@@ -19736,22 +21580,22 @@ diff -urNp linux-2.6.30.8/drivers/scsi/libfc/fc_exch.c linux-2.6.30.8/drivers/sc
goto rel;
}
}
-@@ -1237,10 +1237,10 @@ static void fc_exch_recv_resp(struct fc_
+@@ -1230,10 +1230,10 @@ static void fc_exch_recv_resp(struct fc_
sp = fc_seq_lookup_orig(mp, fp); /* doesn't hold sequence */
if (!sp) {
- atomic_inc(&mp->stats.xid_not_found);
+ atomic_inc_unchecked(&mp->stats.xid_not_found);
- FC_DEBUG_EXCH("seq lookup failed\n");
+ FC_EM_DBG(mp, "seq lookup failed\n");
} else {
- atomic_inc(&mp->stats.non_bls_resp);
+ atomic_inc_unchecked(&mp->stats.non_bls_resp);
- FC_DEBUG_EXCH("non-BLS response to sequence");
+ FC_EM_DBG(mp, "non-BLS response to sequence");
}
fc_frame_free(fp);
-diff -urNp linux-2.6.30.8/drivers/scsi/scsi_logging.h linux-2.6.30.8/drivers/scsi/scsi_logging.h
---- linux-2.6.30.8/drivers/scsi/scsi_logging.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/scsi/scsi_logging.h 2009-07-30 09:48:10.047458850 -0400
+diff -urNp linux-2.6.31.4/drivers/scsi/scsi_logging.h linux-2.6.31.4/drivers/scsi/scsi_logging.h
+--- linux-2.6.31.4/drivers/scsi/scsi_logging.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/scsi/scsi_logging.h 2009-10-11 15:29:44.834685764 -0400
@@ -51,7 +51,7 @@ do { \
} while (0); \
} while (0)
@@ -19761,10 +21605,10 @@ diff -urNp linux-2.6.30.8/drivers/scsi/scsi_logging.h linux-2.6.30.8/drivers/scs
#endif /* CONFIG_SCSI_LOGGING */
/*
-diff -urNp linux-2.6.30.8/drivers/scsi/sg.c linux-2.6.30.8/drivers/scsi/sg.c
---- linux-2.6.30.8/drivers/scsi/sg.c 2009-09-26 23:07:15.896238574 -0400
-+++ linux-2.6.30.8/drivers/scsi/sg.c 2009-09-26 23:07:26.992701622 -0400
-@@ -1186,7 +1186,7 @@ sg_vma_fault(struct vm_area_struct *vma,
+diff -urNp linux-2.6.31.4/drivers/scsi/sg.c linux-2.6.31.4/drivers/scsi/sg.c
+--- linux-2.6.31.4/drivers/scsi/sg.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/scsi/sg.c 2009-10-11 15:29:44.847362696 -0400
+@@ -1185,7 +1185,7 @@ sg_vma_fault(struct vm_area_struct *vma,
return VM_FAULT_SIGBUS;
}
@@ -19773,7 +21617,7 @@ diff -urNp linux-2.6.30.8/drivers/scsi/sg.c linux-2.6.30.8/drivers/scsi/sg.c
.fault = sg_vma_fault,
};
-@@ -1318,7 +1318,7 @@ static void sg_rq_end_io(struct request
+@@ -1317,7 +1317,7 @@ static void sg_rq_end_io(struct request
}
}
@@ -19901,10 +21745,10 @@ diff -urNp linux-2.6.30.8/drivers/scsi/sg.c linux-2.6.30.8/drivers/scsi/sg.c
proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops);
}
return 0;
-diff -urNp linux-2.6.30.8/drivers/serial/8250_pci.c linux-2.6.30.8/drivers/serial/8250_pci.c
---- linux-2.6.30.8/drivers/serial/8250_pci.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/serial/8250_pci.c 2009-07-30 09:48:10.048531085 -0400
-@@ -3572,7 +3572,7 @@ static struct pci_device_id serial_pci_t
+diff -urNp linux-2.6.31.4/drivers/serial/8250_pci.c linux-2.6.31.4/drivers/serial/8250_pci.c
+--- linux-2.6.31.4/drivers/serial/8250_pci.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/serial/8250_pci.c 2009-10-11 15:29:44.853791605 -0400
+@@ -3580,7 +3580,7 @@ static struct pci_device_id serial_pci_t
PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
0xffff00, pbn_default },
@@ -19913,10 +21757,31 @@ diff -urNp linux-2.6.30.8/drivers/serial/8250_pci.c linux-2.6.30.8/drivers/seria
};
static struct pci_driver serial_pci_driver = {
-diff -urNp linux-2.6.30.8/drivers/spi/spidev.c linux-2.6.30.8/drivers/spi/spidev.c
---- linux-2.6.30.8/drivers/spi/spidev.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/spi/spidev.c 2009-07-30 09:48:10.049614710 -0400
-@@ -532,7 +532,7 @@ static int spidev_release(struct inode *
+diff -urNp linux-2.6.31.4/drivers/serial/kgdboc.c linux-2.6.31.4/drivers/serial/kgdboc.c
+--- linux-2.6.31.4/drivers/serial/kgdboc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/serial/kgdboc.c 2009-10-11 15:29:56.663363593 -0400
+@@ -18,7 +18,7 @@
+
+ #define MAX_CONFIG_LEN 40
+
+-static struct kgdb_io kgdboc_io_ops;
++static const struct kgdb_io kgdboc_io_ops;
+
+ /* -1 = init not run yet, 0 = unconfigured, 1 = configured. */
+ static int configured = -1;
+@@ -154,7 +154,7 @@ static void kgdboc_post_exp_handler(void
+ module_put(THIS_MODULE);
+ }
+
+-static struct kgdb_io kgdboc_io_ops = {
++static const struct kgdb_io kgdboc_io_ops = {
+ .name = "kgdboc",
+ .read_char = kgdboc_get_char,
+ .write_char = kgdboc_put_char,
+diff -urNp linux-2.6.31.4/drivers/spi/spidev.c linux-2.6.31.4/drivers/spi/spidev.c
+--- linux-2.6.31.4/drivers/spi/spidev.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/spi/spidev.c 2009-10-11 15:29:44.868369274 -0400
+@@ -537,7 +537,7 @@ static int spidev_release(struct inode *
return status;
}
@@ -19925,10 +21790,10 @@ diff -urNp linux-2.6.30.8/drivers/spi/spidev.c linux-2.6.30.8/drivers/spi/spidev
.owner = THIS_MODULE,
/* REVISIT switch to aio primitives, so that userspace
* gets more complete API coverage. It'll simplify things
-diff -urNp linux-2.6.30.8/drivers/staging/android/binder.c linux-2.6.30.8/drivers/staging/android/binder.c
---- linux-2.6.30.8/drivers/staging/android/binder.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/android/binder.c 2009-07-30 12:07:09.614975906 -0400
-@@ -2699,7 +2699,7 @@ static void binder_vma_close(struct vm_a
+diff -urNp linux-2.6.31.4/drivers/staging/android/binder.c linux-2.6.31.4/drivers/staging/android/binder.c
+--- linux-2.6.31.4/drivers/staging/android/binder.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/staging/android/binder.c 2009-10-11 15:29:44.887447321 -0400
+@@ -2717,7 +2717,7 @@ static void binder_vma_close(struct vm_a
binder_defer_work(proc, BINDER_DEFERRED_PUT_FILES);
}
@@ -19937,43 +21802,10 @@ diff -urNp linux-2.6.30.8/drivers/staging/android/binder.c linux-2.6.30.8/driver
.open = binder_vma_open,
.close = binder_vma_close,
};
-@@ -3579,7 +3579,7 @@ static int binder_read_proc_transaction_
- return len < count ? len : count;
- }
-
--static struct file_operations binder_fops = {
-+static const struct file_operations binder_fops = {
- .owner = THIS_MODULE,
- .poll = binder_poll,
- .unlocked_ioctl = binder_ioctl,
-diff -urNp linux-2.6.30.8/drivers/staging/android/logger.c linux-2.6.30.8/drivers/staging/android/logger.c
---- linux-2.6.30.8/drivers/staging/android/logger.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/android/logger.c 2009-07-30 09:48:10.050638667 -0400
-@@ -519,7 +519,7 @@ static long logger_ioctl(struct file *fi
- return ret;
- }
-
--static struct file_operations logger_fops = {
-+static const struct file_operations logger_fops = {
- .owner = THIS_MODULE,
- .read = logger_read,
- .aio_write = logger_aio_write,
-diff -urNp linux-2.6.30.8/drivers/staging/android/ram_console.c linux-2.6.30.8/drivers/staging/android/ram_console.c
---- linux-2.6.30.8/drivers/staging/android/ram_console.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/android/ram_console.c 2009-07-30 09:48:10.050638667 -0400
-@@ -365,7 +365,7 @@ static ssize_t ram_console_read_old(stru
- return count;
- }
-
--static struct file_operations ram_console_file_ops = {
-+static const struct file_operations ram_console_file_ops = {
- .owner = THIS_MODULE,
- .read = ram_console_read_old,
- };
-diff -urNp linux-2.6.30.8/drivers/staging/b3dfg/b3dfg.c linux-2.6.30.8/drivers/staging/b3dfg/b3dfg.c
---- linux-2.6.30.8/drivers/staging/b3dfg/b3dfg.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/b3dfg/b3dfg.c 2009-07-30 12:07:09.622002360 -0400
-@@ -455,7 +455,7 @@ static int b3dfg_vma_fault(struct vm_are
+diff -urNp linux-2.6.31.4/drivers/staging/b3dfg/b3dfg.c linux-2.6.31.4/drivers/staging/b3dfg/b3dfg.c
+--- linux-2.6.31.4/drivers/staging/b3dfg/b3dfg.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/staging/b3dfg/b3dfg.c 2009-10-11 15:29:44.902687498 -0400
+@@ -454,7 +454,7 @@ static int b3dfg_vma_fault(struct vm_are
return VM_FAULT_NOPAGE;
}
@@ -19982,7 +21814,7 @@ diff -urNp linux-2.6.30.8/drivers/staging/b3dfg/b3dfg.c linux-2.6.30.8/drivers/s
.fault = b3dfg_vma_fault,
};
-@@ -855,7 +855,7 @@ static int b3dfg_mmap(struct file *filp,
+@@ -854,7 +854,7 @@ static int b3dfg_mmap(struct file *filp,
return r;
}
@@ -19991,10 +21823,10 @@ diff -urNp linux-2.6.30.8/drivers/staging/b3dfg/b3dfg.c linux-2.6.30.8/drivers/s
.owner = THIS_MODULE,
.open = b3dfg_open,
.release = b3dfg_release,
-diff -urNp linux-2.6.30.8/drivers/staging/comedi/comedi_fops.c linux-2.6.30.8/drivers/staging/comedi/comedi_fops.c
---- linux-2.6.30.8/drivers/staging/comedi/comedi_fops.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/comedi/comedi_fops.c 2009-07-30 09:48:10.051586138 -0400
-@@ -1395,7 +1395,7 @@ void comedi_unmap(struct vm_area_struct
+diff -urNp linux-2.6.31.4/drivers/staging/comedi/comedi_fops.c linux-2.6.31.4/drivers/staging/comedi/comedi_fops.c
+--- linux-2.6.31.4/drivers/staging/comedi/comedi_fops.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/staging/comedi/comedi_fops.c 2009-10-11 15:29:44.918372391 -0400
+@@ -1370,7 +1370,7 @@ void comedi_unmap(struct vm_area_struct
mutex_unlock(&dev->mutex);
}
@@ -20003,9 +21835,21 @@ diff -urNp linux-2.6.30.8/drivers/staging/comedi/comedi_fops.c linux-2.6.30.8/dr
.close = comedi_unmap,
};
-diff -urNp linux-2.6.30.8/drivers/staging/epl/EplApiLinuxKernel.c linux-2.6.30.8/drivers/staging/epl/EplApiLinuxKernel.c
---- linux-2.6.30.8/drivers/staging/epl/EplApiLinuxKernel.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/epl/EplApiLinuxKernel.c 2009-07-30 09:48:10.051586138 -0400
+diff -urNp linux-2.6.31.4/drivers/staging/cpc-usb/cpc-usb_drv.c linux-2.6.31.4/drivers/staging/cpc-usb/cpc-usb_drv.c
+--- linux-2.6.31.4/drivers/staging/cpc-usb/cpc-usb_drv.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/staging/cpc-usb/cpc-usb_drv.c 2009-10-11 15:29:44.926382787 -0400
+@@ -104,7 +104,7 @@ static void cpcusb_read_interrupt_callba
+
+ static int cpcusb_setup_intrep(CPC_USB_T *card);
+
+-static struct file_operations cpcusb_fops = {
++static const struct file_operations cpcusb_fops = {
+ /*
+ * The owner field is part of the module-locking
+ * mechanism. The idea is that the kernel knows
+diff -urNp linux-2.6.31.4/drivers/staging/epl/EplApiLinuxKernel.c linux-2.6.31.4/drivers/staging/epl/EplApiLinuxKernel.c
+--- linux-2.6.31.4/drivers/staging/epl/EplApiLinuxKernel.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/staging/epl/EplApiLinuxKernel.c 2009-10-11 15:29:44.932396952 -0400
@@ -203,7 +203,7 @@ static int EplLinIoctl(struct inode *pDe
module_init(EplLinInit);
module_exit(EplLinExit);
@@ -20015,9 +21859,9 @@ diff -urNp linux-2.6.30.8/drivers/staging/epl/EplApiLinuxKernel.c linux-2.6.30.8
.owner = THIS_MODULE,
.open = EplLinOpen,
.release = EplLinRelease,
-diff -urNp linux-2.6.30.8/drivers/staging/go7007/go7007-v4l2.c linux-2.6.30.8/drivers/staging/go7007/go7007-v4l2.c
---- linux-2.6.30.8/drivers/staging/go7007/go7007-v4l2.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/go7007/go7007-v4l2.c 2009-07-30 09:48:10.052768252 -0400
+diff -urNp linux-2.6.31.4/drivers/staging/go7007/go7007-v4l2.c linux-2.6.31.4/drivers/staging/go7007/go7007-v4l2.c
+--- linux-2.6.31.4/drivers/staging/go7007/go7007-v4l2.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/staging/go7007/go7007-v4l2.c 2009-10-11 15:29:44.936423433 -0400
@@ -1717,7 +1717,7 @@ static int go7007_vm_fault(struct vm_are
return 0;
}
@@ -20027,21 +21871,9 @@ diff -urNp linux-2.6.30.8/drivers/staging/go7007/go7007-v4l2.c linux-2.6.30.8/dr
.open = go7007_vm_open,
.close = go7007_vm_close,
.fault = go7007_vm_fault,
-diff -urNp linux-2.6.30.8/drivers/staging/meilhaus/memain.c linux-2.6.30.8/drivers/staging/meilhaus/memain.c
---- linux-2.6.30.8/drivers/staging/meilhaus/memain.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/meilhaus/memain.c 2009-07-30 09:48:10.052768252 -0400
-@@ -108,7 +108,7 @@ static struct cdev *cdevp;
- /* File operations provided by the module
- */
-
--static struct file_operations me_file_operations = {
-+static const struct file_operations me_file_operations = {
- .owner = THIS_MODULE,
- .ioctl = me_ioctl,
- .open = me_open,
-diff -urNp linux-2.6.30.8/drivers/staging/panel/panel.c linux-2.6.30.8/drivers/staging/panel/panel.c
---- linux-2.6.30.8/drivers/staging/panel/panel.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/panel/panel.c 2009-07-30 09:48:10.053870849 -0400
+diff -urNp linux-2.6.31.4/drivers/staging/panel/panel.c linux-2.6.31.4/drivers/staging/panel/panel.c
+--- linux-2.6.31.4/drivers/staging/panel/panel.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/staging/panel/panel.c 2009-10-11 15:29:44.938697042 -0400
@@ -1263,7 +1263,7 @@ static int lcd_release(struct inode *ino
return 0;
}
@@ -20060,9 +21892,9 @@ diff -urNp linux-2.6.30.8/drivers/staging/panel/panel.c linux-2.6.30.8/drivers/s
.read = keypad_read, /* read */
.open = keypad_open, /* open */
.release = keypad_release, /* close */
-diff -urNp linux-2.6.30.8/drivers/staging/poch/poch.c linux-2.6.30.8/drivers/staging/poch/poch.c
---- linux-2.6.30.8/drivers/staging/poch/poch.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/poch/poch.c 2009-07-30 09:48:10.053870849 -0400
+diff -urNp linux-2.6.31.4/drivers/staging/poch/poch.c linux-2.6.31.4/drivers/staging/poch/poch.c
+--- linux-2.6.31.4/drivers/staging/poch/poch.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/staging/poch/poch.c 2009-10-11 15:29:44.945395463 -0400
@@ -1056,7 +1056,7 @@ static int poch_ioctl(struct inode *inod
return 0;
}
@@ -20072,21 +21904,30 @@ diff -urNp linux-2.6.30.8/drivers/staging/poch/poch.c linux-2.6.30.8/drivers/sta
.owner = THIS_MODULE,
.open = poch_open,
.release = poch_release,
-diff -urNp linux-2.6.30.8/drivers/staging/rspiusb/rspiusb.c linux-2.6.30.8/drivers/staging/rspiusb/rspiusb.c
---- linux-2.6.30.8/drivers/staging/rspiusb/rspiusb.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/staging/rspiusb/rspiusb.c 2009-07-30 09:48:10.053870849 -0400
-@@ -708,7 +708,7 @@ static int MapUserBuffer(struct ioctl_st
+diff -urNp linux-2.6.31.4/drivers/staging/rtl8192su/ieee80211/proc.c linux-2.6.31.4/drivers/staging/rtl8192su/ieee80211/proc.c
+--- linux-2.6.31.4/drivers/staging/rtl8192su/ieee80211/proc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/staging/rtl8192su/ieee80211/proc.c 2009-10-11 15:29:44.949388458 -0400
+@@ -87,7 +87,7 @@ static int c_show(struct seq_file *m, vo
return 0;
}
--static struct file_operations piusb_fops = {
-+static const struct file_operations piusb_fops = {
- .owner = THIS_MODULE,
- .ioctl = piusb_ioctl,
- .open = piusb_open,
-diff -urNp linux-2.6.30.8/drivers/uio/uio.c linux-2.6.30.8/drivers/uio/uio.c
---- linux-2.6.30.8/drivers/uio/uio.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/uio/uio.c 2009-07-30 09:48:10.053870849 -0400
+-static struct seq_operations crypto_seq_ops = {
++static const struct seq_operations crypto_seq_ops = {
+ .start = c_start,
+ .next = c_next,
+ .stop = c_stop,
+@@ -99,7 +99,7 @@ static int crypto_info_open(struct inode
+ return seq_open(file, &crypto_seq_ops);
+ }
+
+-static struct file_operations proc_crypto_ops = {
++static const struct file_operations proc_crypto_ops = {
+ .open = crypto_info_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+diff -urNp linux-2.6.31.4/drivers/uio/uio.c linux-2.6.31.4/drivers/uio/uio.c
+--- linux-2.6.31.4/drivers/uio/uio.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/uio/uio.c 2009-10-11 15:29:44.963503921 -0400
@@ -658,7 +658,7 @@ static int uio_vma_fault(struct vm_area_
return 0;
}
@@ -20096,9 +21937,9 @@ diff -urNp linux-2.6.30.8/drivers/uio/uio.c linux-2.6.30.8/drivers/uio/uio.c
.open = uio_vma_open,
.close = uio_vma_close,
.fault = uio_vma_fault,
-diff -urNp linux-2.6.30.8/drivers/usb/atm/usbatm.c linux-2.6.30.8/drivers/usb/atm/usbatm.c
---- linux-2.6.30.8/drivers/usb/atm/usbatm.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/atm/usbatm.c 2009-07-30 09:48:10.055402995 -0400
+diff -urNp linux-2.6.31.4/drivers/usb/atm/usbatm.c linux-2.6.31.4/drivers/usb/atm/usbatm.c
+--- linux-2.6.31.4/drivers/usb/atm/usbatm.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/atm/usbatm.c 2009-10-11 15:29:44.970413386 -0400
@@ -333,7 +333,7 @@ static void usbatm_extract_one_cell(stru
if (printk_ratelimit())
atm_warn(instance, "%s: OAM not supported (vpi %d, vci %d)!\n",
@@ -20161,10 +22002,27 @@ diff -urNp linux-2.6.30.8/drivers/usb/atm/usbatm.c linux-2.6.30.8/drivers/usb/at
skb = skb_dequeue(&instance->sndqueue);
}
-diff -urNp linux-2.6.30.8/drivers/usb/class/cdc-acm.c linux-2.6.30.8/drivers/usb/class/cdc-acm.c
---- linux-2.6.30.8/drivers/usb/class/cdc-acm.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/class/cdc-acm.c 2009-07-30 09:48:10.055402995 -0400
-@@ -1403,7 +1403,7 @@ static struct usb_device_id acm_ids[] =
+@@ -775,11 +775,11 @@ static int usbatm_atm_proc_read(struct a
+ if (!left--)
+ return sprintf(page,
+ "AAL5: tx %d ( %d err ), rx %d ( %d err, %d drop )\n",
+- atomic_read(&atm_dev->stats.aal5.tx),
+- atomic_read(&atm_dev->stats.aal5.tx_err),
+- atomic_read(&atm_dev->stats.aal5.rx),
+- atomic_read(&atm_dev->stats.aal5.rx_err),
+- atomic_read(&atm_dev->stats.aal5.rx_drop));
++ atomic_read_unchecked(&atm_dev->stats.aal5.tx),
++ atomic_read_unchecked(&atm_dev->stats.aal5.tx_err),
++ atomic_read_unchecked(&atm_dev->stats.aal5.rx),
++ atomic_read_unchecked(&atm_dev->stats.aal5.rx_err),
++ atomic_read_unchecked(&atm_dev->stats.aal5.rx_drop));
+
+ if (!left--) {
+ if (instance->disconnected)
+diff -urNp linux-2.6.31.4/drivers/usb/class/cdc-acm.c linux-2.6.31.4/drivers/usb/class/cdc-acm.c
+--- linux-2.6.31.4/drivers/usb/class/cdc-acm.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/class/cdc-acm.c 2009-10-11 15:29:44.979712371 -0400
+@@ -1528,7 +1528,7 @@ static struct usb_device_id acm_ids[] =
USB_CDC_ACM_PROTO_AT_CDMA) },
/* NOTE: COMM/ACM/0xff is likely MSFT RNDIS ... NOT a modem!! */
@@ -20172,10 +22030,10 @@ diff -urNp linux-2.6.30.8/drivers/usb/class/cdc-acm.c linux-2.6.30.8/drivers/usb
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
- MODULE_DEVICE_TABLE (usb, acm_ids);
-diff -urNp linux-2.6.30.8/drivers/usb/class/usblp.c linux-2.6.30.8/drivers/usb/class/usblp.c
---- linux-2.6.30.8/drivers/usb/class/usblp.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/class/usblp.c 2009-07-30 09:48:10.055402995 -0400
+ MODULE_DEVICE_TABLE(usb, acm_ids);
+diff -urNp linux-2.6.31.4/drivers/usb/class/usblp.c linux-2.6.31.4/drivers/usb/class/usblp.c
+--- linux-2.6.31.4/drivers/usb/class/usblp.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/class/usblp.c 2009-10-11 15:29:44.980654948 -0400
@@ -228,7 +228,7 @@ static const struct quirk_printer_struct
{ 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <kernel@zut.de> */
{ 0x04f9, 0x000d, USBLP_QUIRK_BIDIR }, /* Brother Industries, Ltd HL-1440 Laser Printer */
@@ -20185,7 +22043,7 @@ diff -urNp linux-2.6.30.8/drivers/usb/class/usblp.c linux-2.6.30.8/drivers/usb/c
};
static int usblp_wwait(struct usblp *usblp, int nonblock);
-@@ -1406,7 +1406,7 @@ static struct usb_device_id usblp_ids []
+@@ -1412,7 +1412,7 @@ static struct usb_device_id usblp_ids []
{ USB_INTERFACE_INFO(7, 1, 2) },
{ USB_INTERFACE_INFO(7, 1, 3) },
{ USB_DEVICE(0x04b8, 0x0202) }, /* Seiko Epson Receipt Printer M129C */
@@ -20194,10 +22052,10 @@ diff -urNp linux-2.6.30.8/drivers/usb/class/usblp.c linux-2.6.30.8/drivers/usb/c
};
MODULE_DEVICE_TABLE (usb, usblp_ids);
-diff -urNp linux-2.6.30.8/drivers/usb/class/usbtmc.c linux-2.6.30.8/drivers/usb/class/usbtmc.c
---- linux-2.6.30.8/drivers/usb/class/usbtmc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/class/usbtmc.c 2009-07-30 09:48:10.055402995 -0400
-@@ -954,7 +954,7 @@ static long usbtmc_ioctl(struct file *fi
+diff -urNp linux-2.6.31.4/drivers/usb/class/usbtmc.c linux-2.6.31.4/drivers/usb/class/usbtmc.c
+--- linux-2.6.31.4/drivers/usb/class/usbtmc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/class/usbtmc.c 2009-10-11 15:29:44.981454623 -0400
+@@ -970,7 +970,7 @@ static long usbtmc_ioctl(struct file *fi
return retval;
}
@@ -20206,10 +22064,52 @@ diff -urNp linux-2.6.30.8/drivers/usb/class/usbtmc.c linux-2.6.30.8/drivers/usb/
.owner = THIS_MODULE,
.read = usbtmc_read,
.write = usbtmc_write,
-diff -urNp linux-2.6.30.8/drivers/usb/core/hub.c linux-2.6.30.8/drivers/usb/core/hub.c
---- linux-2.6.30.8/drivers/usb/core/hub.c 2009-09-09 17:37:33.390278254 -0400
-+++ linux-2.6.30.8/drivers/usb/core/hub.c 2009-09-09 17:37:55.806192559 -0400
-@@ -3206,7 +3206,7 @@ static struct usb_device_id hub_id_table
+diff -urNp linux-2.6.31.4/drivers/usb/core/hcd.c linux-2.6.31.4/drivers/usb/core/hcd.c
+--- linux-2.6.31.4/drivers/usb/core/hcd.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/core/hcd.c 2009-10-11 15:29:56.673684935 -0400
+@@ -2199,7 +2199,7 @@ EXPORT_SYMBOL_GPL(usb_hcd_platform_shutd
+
+ #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
+
+-struct usb_mon_operations *mon_ops;
++const struct usb_mon_operations *mon_ops;
+
+ /*
+ * The registration is unlocked.
+@@ -2209,7 +2209,7 @@ struct usb_mon_operations *mon_ops;
+ * symbols from usbcore, usbcore gets referenced and cannot be unloaded first.
+ */
+
+-int usb_mon_register (struct usb_mon_operations *ops)
++int usb_mon_register (const struct usb_mon_operations *ops)
+ {
+
+ if (mon_ops)
+diff -urNp linux-2.6.31.4/drivers/usb/core/hcd.h linux-2.6.31.4/drivers/usb/core/hcd.h
+--- linux-2.6.31.4/drivers/usb/core/hcd.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/core/hcd.h 2009-10-11 15:29:56.689386276 -0400
+@@ -487,7 +487,7 @@ struct usb_mon_operations {
+ /* void (*urb_unlink)(struct usb_bus *bus, struct urb *urb); */
+ };
+
+-extern struct usb_mon_operations *mon_ops;
++extern const struct usb_mon_operations *mon_ops;
+
+ static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb)
+ {
+@@ -509,7 +509,7 @@ static inline void usbmon_urb_complete(s
+ (*mon_ops->urb_complete)(bus, urb, status);
+ }
+
+-int usb_mon_register(struct usb_mon_operations *ops);
++int usb_mon_register(const struct usb_mon_operations *ops);
+ void usb_mon_deregister(void);
+
+ #else
+diff -urNp linux-2.6.31.4/drivers/usb/core/hub.c linux-2.6.31.4/drivers/usb/core/hub.c
+--- linux-2.6.31.4/drivers/usb/core/hub.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/core/hub.c 2009-10-11 15:29:44.995739688 -0400
+@@ -3284,7 +3284,7 @@ static struct usb_device_id hub_id_table
.bDeviceClass = USB_CLASS_HUB},
{ .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,
.bInterfaceClass = USB_CLASS_HUB},
@@ -20218,10 +22118,10 @@ diff -urNp linux-2.6.30.8/drivers/usb/core/hub.c linux-2.6.30.8/drivers/usb/core
};
MODULE_DEVICE_TABLE (usb, hub_id_table);
-diff -urNp linux-2.6.30.8/drivers/usb/core/inode.c linux-2.6.30.8/drivers/usb/core/inode.c
---- linux-2.6.30.8/drivers/usb/core/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/core/inode.c 2009-07-30 09:48:10.057446184 -0400
-@@ -47,7 +47,7 @@
+diff -urNp linux-2.6.31.4/drivers/usb/core/inode.c linux-2.6.31.4/drivers/usb/core/inode.c
+--- linux-2.6.31.4/drivers/usb/core/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/core/inode.c 2009-10-11 15:29:45.002655566 -0400
+@@ -48,7 +48,7 @@
#define USBFS_DEFAULT_BUSMODE (S_IXUGO | S_IRUGO)
#define USBFS_DEFAULT_LISTMODE S_IRUGO
@@ -20230,7 +22130,7 @@ diff -urNp linux-2.6.30.8/drivers/usb/core/inode.c linux-2.6.30.8/drivers/usb/co
static const struct file_operations default_file_operations;
static struct vfsmount *usbfs_mount;
static int usbfs_mount_count; /* = 0 */
-@@ -444,7 +444,7 @@ static const struct file_operations defa
+@@ -449,7 +449,7 @@ static const struct file_operations defa
.llseek = default_file_lseek,
};
@@ -20239,13 +22139,13 @@ diff -urNp linux-2.6.30.8/drivers/usb/core/inode.c linux-2.6.30.8/drivers/usb/co
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
.remount_fs = remount,
-diff -urNp linux-2.6.30.8/drivers/usb/core/message.c linux-2.6.30.8/drivers/usb/core/message.c
---- linux-2.6.30.8/drivers/usb/core/message.c 2009-07-30 20:32:40.522633558 -0400
-+++ linux-2.6.30.8/drivers/usb/core/message.c 2009-07-30 20:32:47.970590702 -0400
-@@ -890,8 +890,8 @@ char *usb_cache_string(struct usb_device
- buf = kmalloc(256, GFP_KERNEL);
+diff -urNp linux-2.6.31.4/drivers/usb/core/message.c linux-2.6.31.4/drivers/usb/core/message.c
+--- linux-2.6.31.4/drivers/usb/core/message.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/core/message.c 2009-10-11 15:29:45.010363758 -0400
+@@ -926,8 +926,8 @@ char *usb_cache_string(struct usb_device
+ buf = kmalloc(MAX_USB_STRING_SIZE, GFP_KERNEL);
if (buf) {
- len = usb_string(udev, index, buf, 256);
+ len = usb_string(udev, index, buf, MAX_USB_STRING_SIZE);
- if (len > 0) {
- smallbuf = kmalloc(++len, GFP_KERNEL);
+ if (len++ > 0) {
@@ -20253,10 +22153,10 @@ diff -urNp linux-2.6.30.8/drivers/usb/core/message.c linux-2.6.30.8/drivers/usb/
if (!smallbuf)
return buf;
memcpy(smallbuf, buf, len);
-diff -urNp linux-2.6.30.8/drivers/usb/gadget/inode.c linux-2.6.30.8/drivers/usb/gadget/inode.c
---- linux-2.6.30.8/drivers/usb/gadget/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/gadget/inode.c 2009-07-30 09:48:10.057446184 -0400
-@@ -2035,7 +2035,7 @@ gadgetfs_create_file (struct super_block
+diff -urNp linux-2.6.31.4/drivers/usb/gadget/inode.c linux-2.6.31.4/drivers/usb/gadget/inode.c
+--- linux-2.6.31.4/drivers/usb/gadget/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/gadget/inode.c 2009-10-11 15:29:45.016380486 -0400
+@@ -2033,7 +2033,7 @@ gadgetfs_create_file (struct super_block
return inode;
}
@@ -20265,9 +22165,9 @@ diff -urNp linux-2.6.30.8/drivers/usb/gadget/inode.c linux-2.6.30.8/drivers/usb/
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
};
-diff -urNp linux-2.6.30.8/drivers/usb/gadget/printer.c linux-2.6.30.8/drivers/usb/gadget/printer.c
---- linux-2.6.30.8/drivers/usb/gadget/printer.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/gadget/printer.c 2009-07-30 09:48:10.059376894 -0400
+diff -urNp linux-2.6.31.4/drivers/usb/gadget/printer.c linux-2.6.31.4/drivers/usb/gadget/printer.c
+--- linux-2.6.31.4/drivers/usb/gadget/printer.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/gadget/printer.c 2009-10-11 15:29:45.025526302 -0400
@@ -875,7 +875,7 @@ printer_ioctl(struct file *fd, unsigned
}
@@ -20277,10 +22177,10 @@ diff -urNp linux-2.6.30.8/drivers/usb/gadget/printer.c linux-2.6.30.8/drivers/us
.owner = THIS_MODULE,
.open = printer_open,
.read = printer_read,
-diff -urNp linux-2.6.30.8/drivers/usb/host/ehci-pci.c linux-2.6.30.8/drivers/usb/host/ehci-pci.c
---- linux-2.6.30.8/drivers/usb/host/ehci-pci.c 2009-09-09 17:37:33.469165727 -0400
-+++ linux-2.6.30.8/drivers/usb/host/ehci-pci.c 2009-09-09 17:37:56.216932904 -0400
-@@ -420,7 +420,7 @@ static const struct pci_device_id pci_id
+diff -urNp linux-2.6.31.4/drivers/usb/host/ehci-pci.c linux-2.6.31.4/drivers/usb/host/ehci-pci.c
+--- linux-2.6.31.4/drivers/usb/host/ehci-pci.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/host/ehci-pci.c 2009-10-11 15:29:45.029362905 -0400
+@@ -416,7 +416,7 @@ static const struct pci_device_id pci_id
PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_EHCI, ~0),
.driver_data = (unsigned long) &ehci_pci_hc_driver,
},
@@ -20289,9 +22189,9 @@ diff -urNp linux-2.6.30.8/drivers/usb/host/ehci-pci.c linux-2.6.30.8/drivers/usb
};
MODULE_DEVICE_TABLE(pci, pci_ids);
-diff -urNp linux-2.6.30.8/drivers/usb/host/uhci-hcd.c linux-2.6.30.8/drivers/usb/host/uhci-hcd.c
---- linux-2.6.30.8/drivers/usb/host/uhci-hcd.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/host/uhci-hcd.c 2009-07-30 09:48:10.059941908 -0400
+diff -urNp linux-2.6.31.4/drivers/usb/host/uhci-hcd.c linux-2.6.31.4/drivers/usb/host/uhci-hcd.c
+--- linux-2.6.31.4/drivers/usb/host/uhci-hcd.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/host/uhci-hcd.c 2009-10-11 15:29:45.037812496 -0400
@@ -927,7 +927,7 @@ static const struct pci_device_id uhci_p
/* handle any USB UHCI controller */
PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_UHCI, ~0),
@@ -20301,9 +22201,9 @@ diff -urNp linux-2.6.30.8/drivers/usb/host/uhci-hcd.c linux-2.6.30.8/drivers/usb
};
MODULE_DEVICE_TABLE(pci, uhci_pci_ids);
-diff -urNp linux-2.6.30.8/drivers/usb/host/whci/debug.c linux-2.6.30.8/drivers/usb/host/whci/debug.c
---- linux-2.6.30.8/drivers/usb/host/whci/debug.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/host/whci/debug.c 2009-07-30 09:48:10.059941908 -0400
+diff -urNp linux-2.6.31.4/drivers/usb/host/whci/debug.c linux-2.6.31.4/drivers/usb/host/whci/debug.c
+--- linux-2.6.31.4/drivers/usb/host/whci/debug.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/host/whci/debug.c 2009-10-11 15:29:45.040742060 -0400
@@ -134,7 +134,7 @@ static int pzl_open(struct inode *inode,
return single_open(file, pzl_print, inode->i_private);
}
@@ -20331,9 +22231,9 @@ diff -urNp linux-2.6.30.8/drivers/usb/host/whci/debug.c linux-2.6.30.8/drivers/u
.open = pzl_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.30.8/drivers/usb/mon/mon_bin.c linux-2.6.30.8/drivers/usb/mon/mon_bin.c
---- linux-2.6.30.8/drivers/usb/mon/mon_bin.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/mon/mon_bin.c 2009-07-30 09:48:10.059941908 -0400
+diff -urNp linux-2.6.31.4/drivers/usb/mon/mon_bin.c linux-2.6.31.4/drivers/usb/mon/mon_bin.c
+--- linux-2.6.31.4/drivers/usb/mon/mon_bin.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/mon/mon_bin.c 2009-10-11 15:29:45.304368643 -0400
@@ -1184,7 +1184,7 @@ static int mon_bin_vma_fault(struct vm_a
return 0;
}
@@ -20343,9 +22243,21 @@ diff -urNp linux-2.6.30.8/drivers/usb/mon/mon_bin.c linux-2.6.30.8/drivers/usb/m
.open = mon_bin_vma_open,
.close = mon_bin_vma_close,
.fault = mon_bin_vma_fault,
-diff -urNp linux-2.6.30.8/drivers/usb/storage/debug.h linux-2.6.30.8/drivers/usb/storage/debug.h
---- linux-2.6.30.8/drivers/usb/storage/debug.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/storage/debug.h 2009-07-30 09:48:10.059941908 -0400
+diff -urNp linux-2.6.31.4/drivers/usb/mon/mon_main.c linux-2.6.31.4/drivers/usb/mon/mon_main.c
+--- linux-2.6.31.4/drivers/usb/mon/mon_main.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/mon/mon_main.c 2009-10-11 15:29:56.693810138 -0400
+@@ -238,7 +238,7 @@ static struct notifier_block mon_nb = {
+ /*
+ * Ops
+ */
+-static struct usb_mon_operations mon_ops_0 = {
++static const struct usb_mon_operations mon_ops_0 = {
+ .urb_submit = mon_submit,
+ .urb_submit_error = mon_submit_error,
+ .urb_complete = mon_complete,
+diff -urNp linux-2.6.31.4/drivers/usb/storage/debug.h linux-2.6.31.4/drivers/usb/storage/debug.h
+--- linux-2.6.31.4/drivers/usb/storage/debug.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/storage/debug.h 2009-10-11 15:29:45.306363940 -0400
@@ -54,9 +54,9 @@ void usb_stor_show_sense( unsigned char
#define US_DEBUGPX(x...) printk( x )
#define US_DEBUG(x) x
@@ -20359,9 +22271,9 @@ diff -urNp linux-2.6.30.8/drivers/usb/storage/debug.h linux-2.6.30.8/drivers/usb
#endif
#endif
-diff -urNp linux-2.6.30.8/drivers/usb/storage/usb.c linux-2.6.30.8/drivers/usb/storage/usb.c
---- linux-2.6.30.8/drivers/usb/storage/usb.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/storage/usb.c 2009-07-30 09:48:10.061383402 -0400
+diff -urNp linux-2.6.31.4/drivers/usb/storage/usb.c linux-2.6.31.4/drivers/usb/storage/usb.c
+--- linux-2.6.31.4/drivers/usb/storage/usb.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/storage/usb.c 2009-10-11 15:29:45.317510534 -0400
@@ -118,7 +118,7 @@ MODULE_PARM_DESC(quirks, "supplemental l
static struct us_unusual_dev us_unusual_dev_list[] = {
@@ -20371,9 +22283,9 @@ diff -urNp linux-2.6.30.8/drivers/usb/storage/usb.c linux-2.6.30.8/drivers/usb/s
};
#undef UNUSUAL_DEV
-diff -urNp linux-2.6.30.8/drivers/usb/storage/usual-tables.c linux-2.6.30.8/drivers/usb/storage/usual-tables.c
---- linux-2.6.30.8/drivers/usb/storage/usual-tables.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/usb/storage/usual-tables.c 2009-07-30 09:48:10.061383402 -0400
+diff -urNp linux-2.6.31.4/drivers/usb/storage/usual-tables.c linux-2.6.31.4/drivers/usb/storage/usual-tables.c
+--- linux-2.6.31.4/drivers/usb/storage/usual-tables.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/usb/storage/usual-tables.c 2009-10-11 15:29:45.318365840 -0400
@@ -48,7 +48,7 @@
struct usb_device_id usb_storage_usb_ids[] = {
@@ -20383,9 +22295,9 @@ diff -urNp linux-2.6.30.8/drivers/usb/storage/usual-tables.c linux-2.6.30.8/driv
};
EXPORT_SYMBOL_GPL(usb_storage_usb_ids);
-diff -urNp linux-2.6.30.8/drivers/uwb/uwb-debug.c linux-2.6.30.8/drivers/uwb/uwb-debug.c
---- linux-2.6.30.8/drivers/uwb/uwb-debug.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/uwb/uwb-debug.c 2009-07-30 09:48:10.061383402 -0400
+diff -urNp linux-2.6.31.4/drivers/uwb/uwb-debug.c linux-2.6.31.4/drivers/uwb/uwb-debug.c
+--- linux-2.6.31.4/drivers/uwb/uwb-debug.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/uwb/uwb-debug.c 2009-10-11 15:29:45.387368066 -0400
@@ -205,7 +205,7 @@ static ssize_t command_write(struct file
return ret < 0 ? ret : len;
}
@@ -20413,9 +22325,9 @@ diff -urNp linux-2.6.30.8/drivers/uwb/uwb-debug.c linux-2.6.30.8/drivers/uwb/uwb
.open = drp_avail_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.30.8/drivers/uwb/wlp/messages.c linux-2.6.30.8/drivers/uwb/wlp/messages.c
---- linux-2.6.30.8/drivers/uwb/wlp/messages.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/uwb/wlp/messages.c 2009-07-30 09:48:10.062348453 -0400
+diff -urNp linux-2.6.31.4/drivers/uwb/wlp/messages.c linux-2.6.31.4/drivers/uwb/wlp/messages.c
+--- linux-2.6.31.4/drivers/uwb/wlp/messages.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/uwb/wlp/messages.c 2009-10-11 15:29:45.414457006 -0400
@@ -903,7 +903,7 @@ int wlp_parse_f0(struct wlp *wlp, struct
size_t len = skb->len;
size_t used;
@@ -20425,9 +22337,9 @@ diff -urNp linux-2.6.30.8/drivers/uwb/wlp/messages.c linux-2.6.30.8/drivers/uwb/
enum wlp_assc_error assc_err;
char enonce_buf[WLP_WSS_NONCE_STRSIZE];
char rnonce_buf[WLP_WSS_NONCE_STRSIZE];
-diff -urNp linux-2.6.30.8/drivers/video/fb_defio.c linux-2.6.30.8/drivers/video/fb_defio.c
---- linux-2.6.30.8/drivers/video/fb_defio.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/video/fb_defio.c 2009-07-30 09:48:10.062348453 -0400
+diff -urNp linux-2.6.31.4/drivers/video/fb_defio.c linux-2.6.31.4/drivers/video/fb_defio.c
+--- linux-2.6.31.4/drivers/video/fb_defio.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/video/fb_defio.c 2009-10-11 15:29:45.427377745 -0400
@@ -125,7 +125,7 @@ page_already_added:
return 0;
}
@@ -20437,10 +22349,10 @@ diff -urNp linux-2.6.30.8/drivers/video/fb_defio.c linux-2.6.30.8/drivers/video/
.fault = fb_deferred_io_fault,
.page_mkwrite = fb_deferred_io_mkwrite,
};
-diff -urNp linux-2.6.30.8/drivers/video/fbmem.c linux-2.6.30.8/drivers/video/fbmem.c
---- linux-2.6.30.8/drivers/video/fbmem.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/video/fbmem.c 2009-07-30 09:48:10.062348453 -0400
-@@ -404,7 +404,7 @@ static void fb_do_show_logo(struct fb_in
+diff -urNp linux-2.6.31.4/drivers/video/fbmem.c linux-2.6.31.4/drivers/video/fbmem.c
+--- linux-2.6.31.4/drivers/video/fbmem.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/video/fbmem.c 2009-10-11 15:29:45.441375226 -0400
+@@ -403,7 +403,7 @@ static void fb_do_show_logo(struct fb_in
image->dx += image->width + 8;
}
} else if (rotate == FB_ROTATE_UD) {
@@ -20449,7 +22361,7 @@ diff -urNp linux-2.6.30.8/drivers/video/fbmem.c linux-2.6.30.8/drivers/video/fbm
info->fbops->fb_imageblit(info, image);
image->dx -= image->width + 8;
}
-@@ -416,7 +416,7 @@ static void fb_do_show_logo(struct fb_in
+@@ -415,7 +415,7 @@ static void fb_do_show_logo(struct fb_in
image->dy += image->height + 8;
}
} else if (rotate == FB_ROTATE_CCW) {
@@ -20458,7 +22370,7 @@ diff -urNp linux-2.6.30.8/drivers/video/fbmem.c linux-2.6.30.8/drivers/video/fbm
info->fbops->fb_imageblit(info, image);
image->dy -= image->height + 8;
}
-@@ -1109,7 +1109,7 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1108,7 +1108,7 @@ static long do_fb_ioctl(struct fb_info *
return -EFAULT;
if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
return -EINVAL;
@@ -20467,9 +22379,9 @@ diff -urNp linux-2.6.30.8/drivers/video/fbmem.c linux-2.6.30.8/drivers/video/fbm
return -EINVAL;
if (!registered_fb[con2fb.framebuffer])
request_module("fb%d", con2fb.framebuffer);
-diff -urNp linux-2.6.30.8/drivers/video/fbmon.c linux-2.6.30.8/drivers/video/fbmon.c
---- linux-2.6.30.8/drivers/video/fbmon.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/video/fbmon.c 2009-07-30 09:48:10.063350135 -0400
+diff -urNp linux-2.6.31.4/drivers/video/fbmon.c linux-2.6.31.4/drivers/video/fbmon.c
+--- linux-2.6.31.4/drivers/video/fbmon.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/video/fbmon.c 2009-10-11 15:29:45.445414957 -0400
@@ -45,7 +45,7 @@
#ifdef DEBUG
#define DPRINTK(fmt, args...) printk(fmt,## args)
@@ -20479,9 +22391,9 @@ diff -urNp linux-2.6.30.8/drivers/video/fbmon.c linux-2.6.30.8/drivers/video/fbm
#endif
#define FBMON_FIX_HEADER 1
-diff -urNp linux-2.6.30.8/drivers/video/i810/i810_accel.c linux-2.6.30.8/drivers/video/i810/i810_accel.c
---- linux-2.6.30.8/drivers/video/i810/i810_accel.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/video/i810/i810_accel.c 2009-07-30 09:48:10.063350135 -0400
+diff -urNp linux-2.6.31.4/drivers/video/i810/i810_accel.c linux-2.6.31.4/drivers/video/i810/i810_accel.c
+--- linux-2.6.31.4/drivers/video/i810/i810_accel.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/video/i810/i810_accel.c 2009-10-11 15:29:45.451361963 -0400
@@ -73,6 +73,7 @@ static inline int wait_for_space(struct
}
}
@@ -20490,9 +22402,9 @@ diff -urNp linux-2.6.30.8/drivers/video/i810/i810_accel.c linux-2.6.30.8/drivers
i810_report_error(mmio);
par->dev_flags |= LOCKUP;
info->pixmap.scan_align = 1;
-diff -urNp linux-2.6.30.8/drivers/video/i810/i810_main.c linux-2.6.30.8/drivers/video/i810/i810_main.c
---- linux-2.6.30.8/drivers/video/i810/i810_main.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/video/i810/i810_main.c 2009-07-30 09:48:10.064300485 -0400
+diff -urNp linux-2.6.31.4/drivers/video/i810/i810_main.c linux-2.6.31.4/drivers/video/i810/i810_main.c
+--- linux-2.6.31.4/drivers/video/i810/i810_main.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/video/i810/i810_main.c 2009-10-11 15:29:45.453358345 -0400
@@ -120,7 +120,7 @@ static struct pci_device_id i810fb_pci_t
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_CGC,
@@ -20502,10 +22414,10 @@ diff -urNp linux-2.6.30.8/drivers/video/i810/i810_main.c linux-2.6.30.8/drivers/
};
static struct pci_driver i810fb_driver = {
-diff -urNp linux-2.6.30.8/drivers/video/modedb.c linux-2.6.30.8/drivers/video/modedb.c
---- linux-2.6.30.8/drivers/video/modedb.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/video/modedb.c 2009-07-30 09:48:10.064300485 -0400
-@@ -38,232 +38,232 @@ static const struct fb_videomode modedb[
+diff -urNp linux-2.6.31.4/drivers/video/modedb.c linux-2.6.31.4/drivers/video/modedb.c
+--- linux-2.6.31.4/drivers/video/modedb.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/video/modedb.c 2009-10-11 15:29:45.464567681 -0400
+@@ -38,240 +38,240 @@ static const struct fb_videomode modedb[
{
/* 640x400 @ 70 Hz, 31.5 kHz hsync */
NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2,
@@ -20792,12 +22704,22 @@ diff -urNp linux-2.6.30.8/drivers/video/modedb.c linux-2.6.30.8/drivers/video/mo
NULL, 60, 1280, 800, 12048, 200, 64, 24, 1, 136, 3,
- 0, FB_VMODE_NONINTERLACED
+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
+ }, {
+ /* 720x576i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
+ NULL, 50, 720, 576, 74074, 64, 16, 39, 5, 64, 5,
+- 0, FB_VMODE_INTERLACED
++ 0, FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN
+ }, {
+ /* 800x520i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
+ NULL, 50, 800, 520, 58823, 144, 64, 72, 28, 80, 5,
+- 0, FB_VMODE_INTERLACED
++ 0, FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN
},
};
-diff -urNp linux-2.6.30.8/drivers/video/omap/dispc.c linux-2.6.30.8/drivers/video/omap/dispc.c
---- linux-2.6.30.8/drivers/video/omap/dispc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/video/omap/dispc.c 2009-07-30 09:48:10.065250322 -0400
+diff -urNp linux-2.6.31.4/drivers/video/omap/dispc.c linux-2.6.31.4/drivers/video/omap/dispc.c
+--- linux-2.6.31.4/drivers/video/omap/dispc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/video/omap/dispc.c 2009-10-11 15:29:45.486541086 -0400
@@ -1013,7 +1013,7 @@ static void mmap_user_close(struct vm_ar
atomic_dec(&dispc.map_count[plane]);
}
@@ -20807,9 +22729,9 @@ diff -urNp linux-2.6.30.8/drivers/video/omap/dispc.c linux-2.6.30.8/drivers/vide
.open = mmap_user_open,
.close = mmap_user_close,
};
-diff -urNp linux-2.6.30.8/drivers/video/uvesafb.c linux-2.6.30.8/drivers/video/uvesafb.c
---- linux-2.6.30.8/drivers/video/uvesafb.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/video/uvesafb.c 2009-07-30 09:48:10.065250322 -0400
+diff -urNp linux-2.6.31.4/drivers/video/uvesafb.c linux-2.6.31.4/drivers/video/uvesafb.c
+--- linux-2.6.31.4/drivers/video/uvesafb.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/video/uvesafb.c 2009-10-12 23:12:55.481147603 -0400
@@ -18,6 +18,7 @@
#include <linux/fb.h>
#include <linux/io.h>
@@ -20827,15 +22749,13 @@ diff -urNp linux-2.6.30.8/drivers/video/uvesafb.c linux-2.6.30.8/drivers/video/u
}
/*
-@@ -566,10 +567,34 @@ static int __devinit uvesafb_vbe_getpmi(
+@@ -566,10 +567,32 @@ static int __devinit uvesafb_vbe_getpmi(
if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) {
par->pmi_setpal = par->ypan = 0;
} else {
+
+#ifdef CONFIG_PAX_KERNEXEC
+#ifdef CONFIG_MODULES
-+ unsigned long cr0;
-+
+ par->pmi_code = module_alloc_exec((u16)task->t.regs.ecx);
+#endif
+ if (!par->pmi_code) {
@@ -20848,9 +22768,9 @@ diff -urNp linux-2.6.30.8/drivers/video/uvesafb.c linux-2.6.30.8/drivers/video/u
+ task->t.regs.edi);
+
+#if defined(CONFIG_MODULES) && defined(CONFIG_PAX_KERNEXEC)
-+ pax_open_kernel(cr0);
++ pax_open_kernel();
+ memcpy(par->pmi_code, par->pmi_base, (u16)task->t.regs.ecx);
-+ pax_close_kernel(cr0);
++ pax_close_kernel();
+
+ par->pmi_start = ktva_ktla(par->pmi_code + par->pmi_base[1]);
+ par->pmi_pal = ktva_ktla(par->pmi_code + par->pmi_base[2]);
@@ -20862,7 +22782,7 @@ diff -urNp linux-2.6.30.8/drivers/video/uvesafb.c linux-2.6.30.8/drivers/video/u
printk(KERN_INFO "uvesafb: protected mode interface info at "
"%04x:%04x\n",
(u16)task->t.regs.es, (u16)task->t.regs.edi);
-@@ -1825,6 +1850,11 @@ out:
+@@ -1825,6 +1848,11 @@ out:
if (par->vbe_modes)
kfree(par->vbe_modes);
@@ -20874,7 +22794,7 @@ diff -urNp linux-2.6.30.8/drivers/video/uvesafb.c linux-2.6.30.8/drivers/video/u
framebuffer_release(info);
return err;
}
-@@ -1851,6 +1881,12 @@ static int uvesafb_remove(struct platfor
+@@ -1851,6 +1879,12 @@ static int uvesafb_remove(struct platfor
kfree(par->vbe_state_orig);
if (par->vbe_state_saved)
kfree(par->vbe_state_saved);
@@ -20887,9 +22807,9 @@ diff -urNp linux-2.6.30.8/drivers/video/uvesafb.c linux-2.6.30.8/drivers/video/u
}
framebuffer_release(info);
-diff -urNp linux-2.6.30.8/drivers/video/vesafb.c linux-2.6.30.8/drivers/video/vesafb.c
---- linux-2.6.30.8/drivers/video/vesafb.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/drivers/video/vesafb.c 2009-07-30 09:48:10.066262821 -0400
+diff -urNp linux-2.6.31.4/drivers/video/vesafb.c linux-2.6.31.4/drivers/video/vesafb.c
+--- linux-2.6.31.4/drivers/video/vesafb.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/drivers/video/vesafb.c 2009-10-12 23:12:55.482123466 -0400
@@ -9,6 +9,7 @@
*/
@@ -20909,7 +22829,7 @@ diff -urNp linux-2.6.30.8/drivers/video/vesafb.c linux-2.6.30.8/drivers/video/ve
static int depth __read_mostly;
static int vga_compat __read_mostly;
/* --------------------------------------------------------------------- */
-@@ -224,6 +225,7 @@ static int __init vesafb_probe(struct pl
+@@ -233,6 +234,7 @@ static int __init vesafb_probe(struct pl
unsigned int size_vmode;
unsigned int size_remap;
unsigned int size_total;
@@ -20917,7 +22837,7 @@ diff -urNp linux-2.6.30.8/drivers/video/vesafb.c linux-2.6.30.8/drivers/video/ve
if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB)
return -ENODEV;
-@@ -266,10 +268,6 @@ static int __init vesafb_probe(struct pl
+@@ -275,10 +277,6 @@ static int __init vesafb_probe(struct pl
size_remap = size_total;
vesafb_fix.smem_len = size_remap;
@@ -20928,7 +22848,7 @@ diff -urNp linux-2.6.30.8/drivers/video/vesafb.c linux-2.6.30.8/drivers/video/ve
if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) {
printk(KERN_WARNING
"vesafb: cannot reserve video memory at 0x%lx\n",
-@@ -302,9 +300,21 @@ static int __init vesafb_probe(struct pl
+@@ -315,9 +313,21 @@ static int __init vesafb_probe(struct pl
printk(KERN_INFO "vesafb: mode is %dx%dx%d, linelength=%d, pages=%d\n",
vesafb_defined.xres, vesafb_defined.yres, vesafb_defined.bits_per_pixel, vesafb_fix.line_length, screen_info.pages);
@@ -20952,7 +22872,7 @@ diff -urNp linux-2.6.30.8/drivers/video/vesafb.c linux-2.6.30.8/drivers/video/ve
}
if (screen_info.vesapm_seg < 0xc000)
-@@ -312,9 +322,29 @@ static int __init vesafb_probe(struct pl
+@@ -325,9 +335,25 @@ static int __init vesafb_probe(struct pl
if (ypan || pmi_setpal) {
unsigned short *pmi_base;
@@ -20960,14 +22880,10 @@ diff -urNp linux-2.6.30.8/drivers/video/vesafb.c linux-2.6.30.8/drivers/video/ve
- pmi_start = (void*)((char*)pmi_base + pmi_base[1]);
- pmi_pal = (void*)((char*)pmi_base + pmi_base[2]);
+
-+#if defined(CONFIG_MODULES) && defined(CONFIG_PAX_KERNEXEC)
-+ unsigned long cr0;
-+#endif
-+
+ pmi_base = (unsigned short*)phys_to_virt(((unsigned long)screen_info.vesapm_seg << 4) + screen_info.vesapm_off);
+
+#if defined(CONFIG_MODULES) && defined(CONFIG_PAX_KERNEXEC)
-+ pax_open_kernel(cr0);
++ pax_open_kernel();
+ memcpy(pmi_code, pmi_base, screen_info.vesapm_size);
+#else
+ pmi_code = pmi_base;
@@ -20979,13 +22895,13 @@ diff -urNp linux-2.6.30.8/drivers/video/vesafb.c linux-2.6.30.8/drivers/video/ve
+#if defined(CONFIG_MODULES) && defined(CONFIG_PAX_KERNEXEC)
+ pmi_start = ktva_ktla(pmi_start);
+ pmi_pal = ktva_ktla(pmi_pal);
-+ pax_close_kernel(cr0);
++ pax_close_kernel();
+#endif
+
printk(KERN_INFO "vesafb: pmi: set display start = %p, set palette = %p\n",pmi_start,pmi_pal);
if (pmi_base[3]) {
printk(KERN_INFO "vesafb: pmi: ports = ");
-@@ -456,6 +486,11 @@ static int __init vesafb_probe(struct pl
+@@ -469,6 +495,11 @@ static int __init vesafb_probe(struct pl
info->node, info->fix.id);
return 0;
err:
@@ -20997,10 +22913,10 @@ diff -urNp linux-2.6.30.8/drivers/video/vesafb.c linux-2.6.30.8/drivers/video/ve
if (info->screen_base)
iounmap(info->screen_base);
framebuffer_release(info);
-diff -urNp linux-2.6.30.8/fs/9p/vfs_inode.c linux-2.6.30.8/fs/9p/vfs_inode.c
---- linux-2.6.30.8/fs/9p/vfs_inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/9p/vfs_inode.c 2009-07-30 09:48:10.066262821 -0400
-@@ -1021,7 +1021,7 @@ static void *v9fs_vfs_follow_link(struct
+diff -urNp linux-2.6.31.4/fs/9p/vfs_inode.c linux-2.6.31.4/fs/9p/vfs_inode.c
+--- linux-2.6.31.4/fs/9p/vfs_inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/9p/vfs_inode.c 2009-10-11 15:29:45.532356583 -0400
+@@ -1025,7 +1025,7 @@ static void *v9fs_vfs_follow_link(struct
static void
v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
{
@@ -21009,9 +22925,9 @@ diff -urNp linux-2.6.30.8/fs/9p/vfs_inode.c linux-2.6.30.8/fs/9p/vfs_inode.c
P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name,
IS_ERR(s) ? "<error>" : s);
-diff -urNp linux-2.6.30.8/fs/afs/proc.c linux-2.6.30.8/fs/afs/proc.c
---- linux-2.6.30.8/fs/afs/proc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/afs/proc.c 2009-07-30 09:48:10.066262821 -0400
+diff -urNp linux-2.6.31.4/fs/afs/proc.c linux-2.6.31.4/fs/afs/proc.c
+--- linux-2.6.31.4/fs/afs/proc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/afs/proc.c 2009-10-11 15:29:45.543685527 -0400
@@ -28,7 +28,7 @@ static int afs_proc_cells_show(struct se
static ssize_t afs_proc_cells_write(struct file *file, const char __user *buf,
size_t size, loff_t *_pos);
@@ -21048,9 +22964,9 @@ diff -urNp linux-2.6.30.8/fs/afs/proc.c linux-2.6.30.8/fs/afs/proc.c
.start = afs_proc_cell_servers_start,
.next = afs_proc_cell_servers_next,
.stop = afs_proc_cell_servers_stop,
-diff -urNp linux-2.6.30.8/fs/aio.c linux-2.6.30.8/fs/aio.c
---- linux-2.6.30.8/fs/aio.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/aio.c 2009-07-30 09:48:10.067233652 -0400
+diff -urNp linux-2.6.31.4/fs/aio.c linux-2.6.31.4/fs/aio.c
+--- linux-2.6.31.4/fs/aio.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/aio.c 2009-10-11 15:29:45.549515544 -0400
@@ -114,7 +114,7 @@ static int aio_setup_ring(struct kioctx
size += sizeof(struct io_event) * nr_events;
nr_pages = (size + PAGE_SIZE-1) >> PAGE_SHIFT;
@@ -21060,9 +22976,9 @@ diff -urNp linux-2.6.30.8/fs/aio.c linux-2.6.30.8/fs/aio.c
return -EINVAL;
nr_events = (PAGE_SIZE * nr_pages - sizeof(struct aio_ring)) / sizeof(struct io_event);
-diff -urNp linux-2.6.30.8/fs/autofs/root.c linux-2.6.30.8/fs/autofs/root.c
---- linux-2.6.30.8/fs/autofs/root.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/autofs/root.c 2009-07-30 09:48:10.067811135 -0400
+diff -urNp linux-2.6.31.4/fs/autofs/root.c linux-2.6.31.4/fs/autofs/root.c
+--- linux-2.6.31.4/fs/autofs/root.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/autofs/root.c 2009-10-11 15:29:45.558428420 -0400
@@ -299,7 +299,8 @@ static int autofs_root_symlink(struct in
set_bit(n,sbi->symlink_bitmap);
sl = &sbi->symlink[n];
@@ -21073,9 +22989,9 @@ diff -urNp linux-2.6.30.8/fs/autofs/root.c linux-2.6.30.8/fs/autofs/root.c
if (!sl->data) {
clear_bit(n,sbi->symlink_bitmap);
unlock_kernel();
-diff -urNp linux-2.6.30.8/fs/autofs4/symlink.c linux-2.6.30.8/fs/autofs4/symlink.c
---- linux-2.6.30.8/fs/autofs4/symlink.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/autofs4/symlink.c 2009-07-30 09:48:10.067811135 -0400
+diff -urNp linux-2.6.31.4/fs/autofs4/symlink.c linux-2.6.31.4/fs/autofs4/symlink.c
+--- linux-2.6.31.4/fs/autofs4/symlink.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/autofs4/symlink.c 2009-10-11 15:29:45.563698041 -0400
@@ -15,7 +15,7 @@
static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
{
@@ -21085,9 +23001,9 @@ diff -urNp linux-2.6.30.8/fs/autofs4/symlink.c linux-2.6.30.8/fs/autofs4/symlink
return NULL;
}
-diff -urNp linux-2.6.30.8/fs/befs/linuxvfs.c linux-2.6.30.8/fs/befs/linuxvfs.c
---- linux-2.6.30.8/fs/befs/linuxvfs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/befs/linuxvfs.c 2009-07-30 09:48:10.067811135 -0400
+diff -urNp linux-2.6.31.4/fs/befs/linuxvfs.c linux-2.6.31.4/fs/befs/linuxvfs.c
+--- linux-2.6.31.4/fs/befs/linuxvfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/befs/linuxvfs.c 2009-10-11 15:29:45.569537314 -0400
@@ -493,7 +493,7 @@ static void befs_put_link(struct dentry
{
befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
@@ -21097,9 +23013,9 @@ diff -urNp linux-2.6.30.8/fs/befs/linuxvfs.c linux-2.6.30.8/fs/befs/linuxvfs.c
if (!IS_ERR(link))
kfree(link);
}
-diff -urNp linux-2.6.30.8/fs/binfmt_aout.c linux-2.6.30.8/fs/binfmt_aout.c
---- linux-2.6.30.8/fs/binfmt_aout.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/binfmt_aout.c 2009-07-30 11:10:49.111321779 -0400
+diff -urNp linux-2.6.31.4/fs/binfmt_aout.c linux-2.6.31.4/fs/binfmt_aout.c
+--- linux-2.6.31.4/fs/binfmt_aout.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/binfmt_aout.c 2009-10-11 15:29:45.580422857 -0400
@@ -16,6 +16,7 @@
#include <linux/string.h>
#include <linux/fs.h>
@@ -21167,21 +23083,10 @@ diff -urNp linux-2.6.30.8/fs/binfmt_aout.c linux-2.6.30.8/fs/binfmt_aout.c
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset + ex.a_text);
up_write(&current->mm->mmap_sem);
-diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
---- linux-2.6.30.8/fs/binfmt_elf.c 2009-09-26 23:07:15.938752576 -0400
-+++ linux-2.6.30.8/fs/binfmt_elf.c 2009-09-26 23:07:27.021933435 -0400
-@@ -35,6 +35,10 @@
- #include <asm/param.h>
- #include <asm/page.h>
-
-+#ifdef CONFIG_PAX_SEGMEXEC
-+#include <asm/desc.h>
-+#endif
-+
- static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs);
- static int load_elf_library(struct file *);
- static unsigned long elf_map(struct file *, unsigned long, struct elf_phdr *,
-@@ -50,6 +54,10 @@ static int elf_core_dump(long signr, str
+diff -urNp linux-2.6.31.4/fs/binfmt_elf.c linux-2.6.31.4/fs/binfmt_elf.c
+--- linux-2.6.31.4/fs/binfmt_elf.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/binfmt_elf.c 2009-10-18 10:09:07.073630739 -0400
+@@ -50,6 +50,10 @@ static int elf_core_dump(long signr, str
#define elf_core_dump NULL
#endif
@@ -21192,7 +23097,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
#if ELF_EXEC_PAGESIZE > PAGE_SIZE
#define ELF_MIN_ALIGN ELF_EXEC_PAGESIZE
#else
-@@ -69,6 +77,11 @@ static struct linux_binfmt elf_format =
+@@ -69,6 +73,11 @@ static struct linux_binfmt elf_format =
.load_binary = load_elf_binary,
.load_shlib = load_elf_library,
.core_dump = elf_core_dump,
@@ -21204,7 +23109,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
.min_coredump = ELF_EXEC_PAGESIZE,
.hasvdso = 1
};
-@@ -77,6 +90,8 @@ static struct linux_binfmt elf_format =
+@@ -77,6 +86,8 @@ static struct linux_binfmt elf_format =
static int set_brk(unsigned long start, unsigned long end)
{
@@ -21213,7 +23118,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
start = ELF_PAGEALIGN(start);
end = ELF_PAGEALIGN(end);
if (end > start) {
-@@ -87,7 +102,7 @@ static int set_brk(unsigned long start,
+@@ -87,7 +98,7 @@ static int set_brk(unsigned long start,
if (BAD_ADDR(addr))
return addr;
}
@@ -21222,7 +23127,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
return 0;
}
-@@ -148,7 +163,7 @@ create_elf_tables(struct linux_binprm *b
+@@ -148,7 +159,7 @@ create_elf_tables(struct linux_binprm *b
elf_addr_t __user *u_rand_bytes;
const char *k_platform = ELF_PLATFORM;
const char *k_base_platform = ELF_BASE_PLATFORM;
@@ -21231,7 +23136,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
int items;
elf_addr_t *elf_info;
int ei_index = 0;
-@@ -195,6 +210,10 @@ create_elf_tables(struct linux_binprm *b
+@@ -195,6 +206,10 @@ create_elf_tables(struct linux_binprm *b
* Generate 16 random bytes for userspace PRNG seeding.
*/
get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes));
@@ -21242,7 +23147,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
u_rand_bytes = (elf_addr_t __user *)
STACK_ALLOC(p, sizeof(k_rand_bytes));
if (__copy_to_user(u_rand_bytes, k_rand_bytes, sizeof(k_rand_bytes)))
-@@ -385,10 +404,10 @@ static unsigned long load_elf_interp(str
+@@ -385,10 +400,10 @@ static unsigned long load_elf_interp(str
{
struct elf_phdr *elf_phdata;
struct elf_phdr *eppnt;
@@ -21255,7 +23160,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
unsigned long total_size;
int retval, i, size;
-@@ -434,6 +453,11 @@ static unsigned long load_elf_interp(str
+@@ -434,6 +449,11 @@ static unsigned long load_elf_interp(str
goto out_close;
}
@@ -21267,7 +23172,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
eppnt = elf_phdata;
for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
if (eppnt->p_type == PT_LOAD) {
-@@ -477,8 +501,8 @@ static unsigned long load_elf_interp(str
+@@ -477,8 +497,8 @@ static unsigned long load_elf_interp(str
k = load_addr + eppnt->p_vaddr;
if (BAD_ADDR(k) ||
eppnt->p_filesz > eppnt->p_memsz ||
@@ -21278,7 +23183,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
error = -ENOMEM;
goto out_close;
}
-@@ -532,6 +556,177 @@ out:
+@@ -532,6 +552,177 @@ out:
return error;
}
@@ -21456,7 +23361,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
/*
* These are the functions used to load ELF style executables and shared
* libraries. There is no binary dependent code anywhere else.
-@@ -548,6 +743,11 @@ static unsigned long randomize_stack_top
+@@ -548,6 +739,11 @@ static unsigned long randomize_stack_top
{
unsigned int random_variable = 0;
@@ -21468,7 +23373,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
if ((current->flags & PF_RANDOMIZE) &&
!(current->personality & ADDR_NO_RANDOMIZE)) {
random_variable = get_random_int() & STACK_RND_MASK;
-@@ -566,7 +766,7 @@ static int load_elf_binary(struct linux_
+@@ -566,7 +762,7 @@ static int load_elf_binary(struct linux_
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
@@ -21477,7 +23382,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retval, i;
-@@ -576,11 +776,11 @@ static int load_elf_binary(struct linux_
+@@ -576,11 +772,11 @@ static int load_elf_binary(struct linux_
unsigned long start_code, end_code, start_data, end_data;
unsigned long reloc_func_desc = 0;
int executable_stack = EXSTACK_DEFAULT;
@@ -21490,7 +23395,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
-@@ -742,11 +942,80 @@ static int load_elf_binary(struct linux_
+@@ -742,11 +938,80 @@ static int load_elf_binary(struct linux_
/* OK, This is the point of no return */
current->flags &= ~PF_FORKNOEXEC;
@@ -21547,7 +23452,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
+#if defined(CONFIG_ARCH_TRACK_EXEC_LIMIT) || defined(CONFIG_PAX_SEGMEXEC)
+ if (current->mm->pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) {
+ set_user_cs(current->mm->context.user_cs_base, current->mm->context.user_cs_limit, get_cpu());
-+ put_cpu_no_resched();
++ put_cpu();
+ }
+#endif
+
@@ -21572,7 +23477,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
if (elf_read_implies_exec(loc->elf_ex, executable_stack))
current->personality |= READ_IMPLIES_EXEC;
-@@ -827,6 +1096,20 @@ static int load_elf_binary(struct linux_
+@@ -827,6 +1092,20 @@ static int load_elf_binary(struct linux_
#else
load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
#endif
@@ -21593,7 +23498,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
}
error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
-@@ -859,9 +1142,9 @@ static int load_elf_binary(struct linux_
+@@ -859,9 +1138,9 @@ static int load_elf_binary(struct linux_
* allowed task size. Note that p_filesz must always be
* <= p_memsz so it is only necessary to check p_memsz.
*/
@@ -21606,7 +23511,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
/* set_brk can never work. Avoid overflows. */
send_sig(SIGKILL, current, 0);
retval = -EINVAL;
-@@ -889,6 +1172,11 @@ static int load_elf_binary(struct linux_
+@@ -889,6 +1168,11 @@ static int load_elf_binary(struct linux_
start_data += load_bias;
end_data += load_bias;
@@ -21618,7 +23523,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
/* 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
-@@ -900,9 +1188,11 @@ static int load_elf_binary(struct linux_
+@@ -900,9 +1184,11 @@ static int load_elf_binary(struct linux_
goto out_free_dentry;
}
if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
@@ -21633,7 +23538,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
}
if (elf_interpreter) {
-@@ -1135,8 +1425,10 @@ static int dump_seek(struct file *file,
+@@ -1135,8 +1421,10 @@ static int dump_seek(struct file *file,
unsigned long n = off;
if (n > PAGE_SIZE)
n = PAGE_SIZE;
@@ -21645,7 +23550,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
off -= n;
}
free_page((unsigned long)buf);
-@@ -1148,7 +1440,7 @@ static int dump_seek(struct file *file,
+@@ -1148,7 +1436,7 @@ static int dump_seek(struct file *file,
* Decide what to dump of a segment, part, all or none.
*/
static unsigned long vma_dump_size(struct vm_area_struct *vma,
@@ -21654,7 +23559,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
{
#define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
-@@ -1182,7 +1474,7 @@ static unsigned long vma_dump_size(struc
+@@ -1182,7 +1470,7 @@ static unsigned long vma_dump_size(struc
if (vma->vm_file == NULL)
return 0;
@@ -21663,7 +23568,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
goto whole;
/*
-@@ -1278,8 +1570,11 @@ static int writenote(struct memelfnote *
+@@ -1278,8 +1566,11 @@ static int writenote(struct memelfnote *
#undef DUMP_WRITE
#define DUMP_WRITE(addr, nr) \
@@ -21676,7 +23581,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
#define DUMP_SEEK(off) \
if (!dump_seek(file, (off))) \
goto end_coredump;
-@@ -1984,7 +2279,7 @@ static int elf_core_dump(long signr, str
+@@ -1991,7 +2282,7 @@ static int elf_core_dump(long signr, str
phdr.p_offset = offset;
phdr.p_vaddr = vma->vm_start;
phdr.p_paddr = 0;
@@ -21685,7 +23590,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
phdr.p_memsz = vma->vm_end - vma->vm_start;
offset += phdr.p_filesz;
phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
-@@ -2016,7 +2311,7 @@ static int elf_core_dump(long signr, str
+@@ -2023,7 +2314,7 @@ static int elf_core_dump(long signr, str
unsigned long addr;
unsigned long end;
@@ -21694,7 +23599,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
struct page *page;
-@@ -2036,6 +2331,7 @@ static int elf_core_dump(long signr, str
+@@ -2043,6 +2334,7 @@ static int elf_core_dump(long signr, str
flush_cache_page(tmp_vma, addr,
page_to_pfn(page));
kaddr = kmap(page);
@@ -21702,7 +23607,7 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
if ((size += PAGE_SIZE) > limit ||
!dump_write(file, kaddr,
PAGE_SIZE)) {
-@@ -2066,6 +2362,99 @@ out:
+@@ -2073,6 +2365,97 @@ out:
#endif /* USE_ELF_CORE_DUMP */
@@ -21762,16 +23667,16 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
+ if (sizeof(elf_p) != kernel_read(vma->vm_file, elf_h.e_phoff + i*sizeof(elf_p), (char *)&elf_p, sizeof(elf_p)))
+ return;
+ switch (elf_p.p_type) {
-+ case PT_DYNAMIC: {
-+ elf_addr_t dyn_offset = 0UL;
-+ elf_dyn dyn;
-+
++ case PT_DYNAMIC:
+ if (!is_textrel_rw && !is_textrel_rx)
+ continue;
-+ dyn_offset = elf_p.p_offset;
+ i = 0UL;
-+ do {
-+ if (sizeof(dyn) != kernel_read(vma->vm_file, dyn_offset + i*sizeof(dyn), (char *)&dyn, sizeof(dyn)))
++ while ((i+1) * sizeof(elf_dyn) <= elf_p.p_filesz) {
++ elf_dyn dyn;
++
++ if (sizeof(dyn) != kernel_read(vma->vm_file, elf_p.p_offset + i*sizeof(dyn), (char *)&dyn, sizeof(dyn)))
++ return;
++ if (dyn.d_tag == DT_NULL)
+ return;
+ if (dyn.d_tag == DT_TEXTREL || (dyn.d_tag == DT_FLAGS && (dyn.d_un.d_val & DF_TEXTREL))) {
+ gr_log_textrel(vma);
@@ -21783,16 +23688,14 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
+ return;
+ }
+ i++;
-+ } while (dyn.d_tag != DT_NULL);
++ }
+ return;
-+ }
+
+ case PT_GNU_RELRO:
+ if (!is_relro)
+ continue;
-+ if ((elf_p.p_offset >> PAGE_SHIFT) == vma->vm_pgoff && ELF_PAGEALIGN(elf_p.p_memsz) == vma->vm_end - vma->vm_start) {
++ if ((elf_p.p_offset >> PAGE_SHIFT) == vma->vm_pgoff && ELF_PAGEALIGN(elf_p.p_memsz) == vma->vm_end - vma->vm_start)
+ vma->vm_flags &= ~VM_MAYWRITE;
-+ }
+ return;
+ }
+ }
@@ -21802,9 +23705,9 @@ diff -urNp linux-2.6.30.8/fs/binfmt_elf.c linux-2.6.30.8/fs/binfmt_elf.c
static int __init init_elf_binfmt(void)
{
return register_binfmt(&elf_format);
-diff -urNp linux-2.6.30.8/fs/binfmt_flat.c linux-2.6.30.8/fs/binfmt_flat.c
---- linux-2.6.30.8/fs/binfmt_flat.c 2009-08-24 20:46:56.905678820 -0400
-+++ linux-2.6.30.8/fs/binfmt_flat.c 2009-08-24 20:48:46.001799653 -0400
+diff -urNp linux-2.6.31.4/fs/binfmt_flat.c linux-2.6.31.4/fs/binfmt_flat.c
+--- linux-2.6.31.4/fs/binfmt_flat.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/binfmt_flat.c 2009-10-11 15:29:45.598364649 -0400
@@ -565,7 +565,9 @@ static int load_flat_file(struct linux_b
realdatastart = (unsigned long) -ENOMEM;
printk("Unable to allocate RAM for process data, errno %d\n",
@@ -21837,9 +23740,9 @@ diff -urNp linux-2.6.30.8/fs/binfmt_flat.c linux-2.6.30.8/fs/binfmt_flat.c
ret = result;
goto err;
}
-diff -urNp linux-2.6.30.8/fs/binfmt_misc.c linux-2.6.30.8/fs/binfmt_misc.c
---- linux-2.6.30.8/fs/binfmt_misc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/binfmt_misc.c 2009-07-30 09:48:10.070138647 -0400
+diff -urNp linux-2.6.31.4/fs/binfmt_misc.c linux-2.6.31.4/fs/binfmt_misc.c
+--- linux-2.6.31.4/fs/binfmt_misc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/binfmt_misc.c 2009-10-11 15:29:45.605695875 -0400
@@ -693,7 +693,7 @@ static int bm_fill_super(struct super_bl
static struct tree_descr bm_files[] = {
[2] = {"status", &bm_status_operations, S_IWUSR|S_IRUGO},
@@ -21849,22 +23752,10 @@ diff -urNp linux-2.6.30.8/fs/binfmt_misc.c linux-2.6.30.8/fs/binfmt_misc.c
};
int err = simple_fill_super(sb, 0x42494e4d, bm_files);
if (!err)
-diff -urNp linux-2.6.30.8/fs/bio.c linux-2.6.30.8/fs/bio.c
---- linux-2.6.30.8/fs/bio.c 2009-07-30 20:32:40.527789063 -0400
-+++ linux-2.6.30.8/fs/bio.c 2009-07-30 20:32:47.975645587 -0400
-@@ -720,7 +720,7 @@ static int __bio_copy_iov(struct bio *bi
-
- while (bv_len && iov_idx < iov_count) {
- unsigned int bytes;
-- char *iov_addr;
-+ char __user *iov_addr;
-
- bytes = min_t(unsigned int,
- iov[iov_idx].iov_len - iov_off, bv_len);
-diff -urNp linux-2.6.30.8/fs/btrfs/ctree.h linux-2.6.30.8/fs/btrfs/ctree.h
---- linux-2.6.30.8/fs/btrfs/ctree.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/btrfs/ctree.h 2009-07-30 09:48:10.071936994 -0400
-@@ -2174,7 +2174,7 @@ int btrfs_sync_file(struct file *file, s
+diff -urNp linux-2.6.31.4/fs/btrfs/ctree.h linux-2.6.31.4/fs/btrfs/ctree.h
+--- linux-2.6.31.4/fs/btrfs/ctree.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/btrfs/ctree.h 2009-10-11 15:29:45.621803084 -0400
+@@ -2286,7 +2286,7 @@ int btrfs_sync_file(struct file *file, s
int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end,
int skip_pinned);
int btrfs_check_file(struct btrfs_root *root, struct inode *inode);
@@ -21873,10 +23764,10 @@ diff -urNp linux-2.6.30.8/fs/btrfs/ctree.h linux-2.6.30.8/fs/btrfs/ctree.h
int btrfs_drop_extents(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct inode *inode,
u64 start, u64 end, u64 locked_end,
-diff -urNp linux-2.6.30.8/fs/btrfs/disk-io.c linux-2.6.30.8/fs/btrfs/disk-io.c
---- linux-2.6.30.8/fs/btrfs/disk-io.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/btrfs/disk-io.c 2009-07-30 12:07:28.366973168 -0400
-@@ -771,7 +771,7 @@ static void btree_invalidatepage(struct
+diff -urNp linux-2.6.31.4/fs/btrfs/disk-io.c linux-2.6.31.4/fs/btrfs/disk-io.c
+--- linux-2.6.31.4/fs/btrfs/disk-io.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/btrfs/disk-io.c 2009-10-11 15:29:45.648458307 -0400
+@@ -772,7 +772,7 @@ static void btree_invalidatepage(struct
}
}
@@ -21885,10 +23776,10 @@ diff -urNp linux-2.6.30.8/fs/btrfs/disk-io.c linux-2.6.30.8/fs/btrfs/disk-io.c
.readpage = btree_readpage,
.writepage = btree_writepage,
.writepages = btree_writepages,
-diff -urNp linux-2.6.30.8/fs/btrfs/file.c linux-2.6.30.8/fs/btrfs/file.c
---- linux-2.6.30.8/fs/btrfs/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/btrfs/file.c 2009-07-30 09:48:10.073009918 -0400
-@@ -1231,7 +1231,7 @@ out:
+diff -urNp linux-2.6.31.4/fs/btrfs/file.c linux-2.6.31.4/fs/btrfs/file.c
+--- linux-2.6.31.4/fs/btrfs/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/btrfs/file.c 2009-10-11 15:29:45.664391015 -0400
+@@ -1203,7 +1203,7 @@ out:
return ret > 0 ? EIO : ret;
}
@@ -21897,7 +23788,7 @@ diff -urNp linux-2.6.30.8/fs/btrfs/file.c linux-2.6.30.8/fs/btrfs/file.c
.fault = filemap_fault,
.page_mkwrite = btrfs_page_mkwrite,
};
-@@ -1243,7 +1243,7 @@ static int btrfs_file_mmap(struct file *
+@@ -1215,7 +1215,7 @@ static int btrfs_file_mmap(struct file *
return 0;
}
@@ -21906,10 +23797,10 @@ diff -urNp linux-2.6.30.8/fs/btrfs/file.c linux-2.6.30.8/fs/btrfs/file.c
.llseek = generic_file_llseek,
.read = do_sync_read,
.aio_read = generic_file_aio_read,
-diff -urNp linux-2.6.30.8/fs/btrfs/inode.c linux-2.6.30.8/fs/btrfs/inode.c
---- linux-2.6.30.8/fs/btrfs/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/btrfs/inode.c 2009-07-30 09:48:10.073009918 -0400
-@@ -57,14 +57,14 @@ struct btrfs_iget_args {
+diff -urNp linux-2.6.31.4/fs/btrfs/inode.c linux-2.6.31.4/fs/btrfs/inode.c
+--- linux-2.6.31.4/fs/btrfs/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/btrfs/inode.c 2009-10-11 15:29:45.690664950 -0400
+@@ -55,14 +55,14 @@ struct btrfs_iget_args {
struct btrfs_root *root;
};
@@ -21932,7 +23823,7 @@ diff -urNp linux-2.6.30.8/fs/btrfs/inode.c linux-2.6.30.8/fs/btrfs/inode.c
static struct extent_io_ops btrfs_extent_io_ops;
static struct kmem_cache *btrfs_inode_cachep;
-@@ -5187,7 +5187,7 @@ static int btrfs_permission(struct inode
+@@ -5201,7 +5201,7 @@ static int btrfs_permission(struct inode
return generic_permission(inode, mask, btrfs_check_acl);
}
@@ -21941,7 +23832,7 @@ diff -urNp linux-2.6.30.8/fs/btrfs/inode.c linux-2.6.30.8/fs/btrfs/inode.c
.getattr = btrfs_getattr,
.lookup = btrfs_lookup,
.create = btrfs_create,
-@@ -5205,11 +5205,11 @@ static struct inode_operations btrfs_dir
+@@ -5219,11 +5219,11 @@ static struct inode_operations btrfs_dir
.removexattr = btrfs_removexattr,
.permission = btrfs_permission,
};
@@ -21955,7 +23846,7 @@ diff -urNp linux-2.6.30.8/fs/btrfs/inode.c linux-2.6.30.8/fs/btrfs/inode.c
.llseek = generic_file_llseek,
.read = generic_read_dir,
.readdir = btrfs_real_readdir,
-@@ -5245,7 +5245,7 @@ static struct extent_io_ops btrfs_extent
+@@ -5259,7 +5259,7 @@ static struct extent_io_ops btrfs_extent
*
* For now we're avoiding this by dropping bmap.
*/
@@ -21964,7 +23855,7 @@ diff -urNp linux-2.6.30.8/fs/btrfs/inode.c linux-2.6.30.8/fs/btrfs/inode.c
.readpage = btrfs_readpage,
.writepage = btrfs_writepage,
.writepages = btrfs_writepages,
-@@ -5257,14 +5257,14 @@ static struct address_space_operations b
+@@ -5271,14 +5271,14 @@ static struct address_space_operations b
.set_page_dirty = btrfs_set_page_dirty,
};
@@ -21981,7 +23872,7 @@ diff -urNp linux-2.6.30.8/fs/btrfs/inode.c linux-2.6.30.8/fs/btrfs/inode.c
.truncate = btrfs_truncate,
.getattr = btrfs_getattr,
.setattr = btrfs_setattr,
-@@ -5276,7 +5276,7 @@ static struct inode_operations btrfs_fil
+@@ -5290,7 +5290,7 @@ static struct inode_operations btrfs_fil
.fallocate = btrfs_fallocate,
.fiemap = btrfs_fiemap,
};
@@ -21990,7 +23881,7 @@ diff -urNp linux-2.6.30.8/fs/btrfs/inode.c linux-2.6.30.8/fs/btrfs/inode.c
.getattr = btrfs_getattr,
.setattr = btrfs_setattr,
.permission = btrfs_permission,
-@@ -5285,7 +5285,7 @@ static struct inode_operations btrfs_spe
+@@ -5299,7 +5299,7 @@ static struct inode_operations btrfs_spe
.listxattr = btrfs_listxattr,
.removexattr = btrfs_removexattr,
};
@@ -21999,13 +23890,13 @@ diff -urNp linux-2.6.30.8/fs/btrfs/inode.c linux-2.6.30.8/fs/btrfs/inode.c
.readlink = generic_readlink,
.follow_link = page_follow_link_light,
.put_link = page_put_link,
-diff -urNp linux-2.6.30.8/fs/btrfs/super.c linux-2.6.30.8/fs/btrfs/super.c
---- linux-2.6.30.8/fs/btrfs/super.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/btrfs/super.c 2009-07-30 09:48:10.074085184 -0400
-@@ -53,7 +53,7 @@
+diff -urNp linux-2.6.31.4/fs/btrfs/super.c linux-2.6.31.4/fs/btrfs/super.c
+--- linux-2.6.31.4/fs/btrfs/super.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/btrfs/super.c 2009-10-11 15:29:45.696364370 -0400
+@@ -51,7 +51,7 @@
+ #include "export.h"
#include "compression.h"
-
-static struct super_operations btrfs_super_ops;
+static const struct super_operations btrfs_super_ops;
@@ -22019,10 +23910,10 @@ diff -urNp linux-2.6.30.8/fs/btrfs/super.c linux-2.6.30.8/fs/btrfs/super.c
+static const struct super_operations btrfs_super_ops = {
.delete_inode = btrfs_delete_inode,
.put_super = btrfs_put_super,
- .write_super = btrfs_write_super,
-diff -urNp linux-2.6.30.8/fs/buffer.c linux-2.6.30.8/fs/buffer.c
---- linux-2.6.30.8/fs/buffer.c 2009-09-09 17:37:33.575211611 -0400
-+++ linux-2.6.30.8/fs/buffer.c 2009-09-09 17:37:57.191039981 -0400
+ .sync_fs = btrfs_sync_fs,
+diff -urNp linux-2.6.31.4/fs/buffer.c linux-2.6.31.4/fs/buffer.c
+--- linux-2.6.31.4/fs/buffer.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/buffer.c 2009-10-11 15:29:45.719430669 -0400
@@ -25,6 +25,7 @@
#include <linux/percpu.h>
#include <linux/slab.h>
@@ -22039,9 +23930,9 @@ diff -urNp linux-2.6.30.8/fs/buffer.c linux-2.6.30.8/fs/buffer.c
if (limit != RLIM_INFINITY && size > (loff_t)limit) {
send_sig(SIGXFSZ, current, 0);
goto out;
-diff -urNp linux-2.6.30.8/fs/cifs/cifs_dfs_ref.c linux-2.6.30.8/fs/cifs/cifs_dfs_ref.c
---- linux-2.6.30.8/fs/cifs/cifs_dfs_ref.c 2009-08-24 20:46:56.928128690 -0400
-+++ linux-2.6.30.8/fs/cifs/cifs_dfs_ref.c 2009-08-24 20:48:46.001799653 -0400
+diff -urNp linux-2.6.31.4/fs/cifs/cifs_dfs_ref.c linux-2.6.31.4/fs/cifs/cifs_dfs_ref.c
+--- linux-2.6.31.4/fs/cifs/cifs_dfs_ref.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/cifs/cifs_dfs_ref.c 2009-10-11 15:29:45.730416734 -0400
@@ -385,7 +385,7 @@ out_err:
goto out;
}
@@ -22051,10 +23942,10 @@ diff -urNp linux-2.6.30.8/fs/cifs/cifs_dfs_ref.c linux-2.6.30.8/fs/cifs/cifs_dfs
.follow_link = cifs_dfs_follow_mountpoint,
};
-diff -urNp linux-2.6.30.8/fs/cifs/cifsfs.h linux-2.6.30.8/fs/cifs/cifsfs.h
---- linux-2.6.30.8/fs/cifs/cifsfs.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/cifs/cifsfs.h 2009-07-30 09:48:10.075044089 -0400
-@@ -54,7 +54,7 @@ extern int cifs_setattr(struct dentry *,
+diff -urNp linux-2.6.31.4/fs/cifs/cifsfs.h linux-2.6.31.4/fs/cifs/cifsfs.h
+--- linux-2.6.31.4/fs/cifs/cifsfs.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/cifs/cifsfs.h 2009-10-11 15:29:45.732494587 -0400
+@@ -67,7 +67,7 @@ extern int cifs_setattr(struct dentry *,
extern const struct inode_operations cifs_file_inode_ops;
extern const struct inode_operations cifs_symlink_inode_ops;
@@ -22063,9 +23954,9 @@ diff -urNp linux-2.6.30.8/fs/cifs/cifsfs.h linux-2.6.30.8/fs/cifs/cifsfs.h
/* Functions related to files and directories */
-diff -urNp linux-2.6.30.8/fs/cifs/cifs_uniupr.h linux-2.6.30.8/fs/cifs/cifs_uniupr.h
---- linux-2.6.30.8/fs/cifs/cifs_uniupr.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/cifs/cifs_uniupr.h 2009-07-30 09:48:10.074085184 -0400
+diff -urNp linux-2.6.31.4/fs/cifs/cifs_uniupr.h linux-2.6.31.4/fs/cifs/cifs_uniupr.h
+--- linux-2.6.31.4/fs/cifs/cifs_uniupr.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/cifs/cifs_uniupr.h 2009-10-11 15:29:45.744362988 -0400
@@ -132,7 +132,7 @@ const struct UniCaseRange CifsUniUpperRa
{0x0490, 0x04cc, UniCaseRangeU0490},
{0x1e00, 0x1ffc, UniCaseRangeU1e00},
@@ -22075,10 +23966,10 @@ diff -urNp linux-2.6.30.8/fs/cifs/cifs_uniupr.h linux-2.6.30.8/fs/cifs/cifs_uniu
};
#endif
-diff -urNp linux-2.6.30.8/fs/cifs/link.c linux-2.6.30.8/fs/cifs/link.c
---- linux-2.6.30.8/fs/cifs/link.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/cifs/link.c 2009-07-30 09:48:10.075668043 -0400
-@@ -214,7 +214,7 @@ cifs_symlink(struct inode *inode, struct
+diff -urNp linux-2.6.31.4/fs/cifs/link.c linux-2.6.31.4/fs/cifs/link.c
+--- linux-2.6.31.4/fs/cifs/link.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/cifs/link.c 2009-10-11 15:29:45.964573068 -0400
+@@ -215,7 +215,7 @@ cifs_symlink(struct inode *inode, struct
void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie)
{
@@ -22087,10 +23978,26 @@ diff -urNp linux-2.6.30.8/fs/cifs/link.c linux-2.6.30.8/fs/cifs/link.c
if (!IS_ERR(p))
kfree(p);
}
-diff -urNp linux-2.6.30.8/fs/compat.c linux-2.6.30.8/fs/compat.c
---- linux-2.6.30.8/fs/compat.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/compat.c 2009-07-30 11:10:49.133453691 -0400
-@@ -1420,14 +1420,12 @@ static int compat_copy_strings(int argc,
+diff -urNp linux-2.6.31.4/fs/compat_binfmt_elf.c linux-2.6.31.4/fs/compat_binfmt_elf.c
+--- linux-2.6.31.4/fs/compat_binfmt_elf.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/compat_binfmt_elf.c 2009-10-11 15:29:45.975961679 -0400
+@@ -29,10 +29,12 @@
+ #undef elfhdr
+ #undef elf_phdr
+ #undef elf_note
++#undef elf_dyn
+ #undef elf_addr_t
+ #define elfhdr elf32_hdr
+ #define elf_phdr elf32_phdr
+ #define elf_note elf32_note
++#define elf_dyn Elf32_Dyn
+ #define elf_addr_t Elf32_Addr
+
+ /*
+diff -urNp linux-2.6.31.4/fs/compat.c linux-2.6.31.4/fs/compat.c
+--- linux-2.6.31.4/fs/compat.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/compat.c 2009-10-11 15:29:45.981403405 -0400
+@@ -1417,14 +1417,12 @@ static int compat_copy_strings(int argc,
if (!kmapped_page || kpos != (pos & PAGE_MASK)) {
struct page *page;
@@ -22105,7 +24012,7 @@ diff -urNp linux-2.6.30.8/fs/compat.c linux-2.6.30.8/fs/compat.c
ret = get_user_pages(current, bprm->mm, pos,
1, 1, 1, &page, NULL);
if (ret <= 0) {
-@@ -1473,6 +1471,11 @@ int compat_do_execve(char * filename,
+@@ -1470,6 +1468,11 @@ int compat_do_execve(char * filename,
compat_uptr_t __user *envp,
struct pt_regs * regs)
{
@@ -22117,7 +24024,7 @@ diff -urNp linux-2.6.30.8/fs/compat.c linux-2.6.30.8/fs/compat.c
struct linux_binprm *bprm;
struct file *file;
struct files_struct *displaced;
-@@ -1514,6 +1517,14 @@ int compat_do_execve(char * filename,
+@@ -1506,6 +1509,14 @@ int compat_do_execve(char * filename,
bprm->filename = filename;
bprm->interp = filename;
@@ -22132,7 +24039,7 @@ diff -urNp linux-2.6.30.8/fs/compat.c linux-2.6.30.8/fs/compat.c
retval = bprm_mm_init(bprm);
if (retval)
goto out_file;
-@@ -1543,9 +1554,40 @@ int compat_do_execve(char * filename,
+@@ -1535,9 +1546,40 @@ int compat_do_execve(char * filename,
if (retval < 0)
goto out;
@@ -22174,7 +24081,7 @@ diff -urNp linux-2.6.30.8/fs/compat.c linux-2.6.30.8/fs/compat.c
/* execve succeeded */
current->fs->in_exec = 0;
-@@ -1557,6 +1599,14 @@ int compat_do_execve(char * filename,
+@@ -1548,6 +1590,14 @@ int compat_do_execve(char * filename,
put_files_struct(displaced);
return retval;
@@ -22189,10 +24096,10 @@ diff -urNp linux-2.6.30.8/fs/compat.c linux-2.6.30.8/fs/compat.c
out:
if (bprm->mm)
mmput(bprm->mm);
-diff -urNp linux-2.6.30.8/fs/compat_ioctl.c linux-2.6.30.8/fs/compat_ioctl.c
---- linux-2.6.30.8/fs/compat_ioctl.c 2009-08-24 20:46:56.957052553 -0400
-+++ linux-2.6.30.8/fs/compat_ioctl.c 2009-08-24 20:48:46.003635610 -0400
-@@ -1837,15 +1837,15 @@ struct ioctl_trans {
+diff -urNp linux-2.6.31.4/fs/compat_ioctl.c linux-2.6.31.4/fs/compat_ioctl.c
+--- linux-2.6.31.4/fs/compat_ioctl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/compat_ioctl.c 2009-10-11 15:29:45.993396114 -0400
+@@ -1827,15 +1827,15 @@ struct ioctl_trans {
};
#define HANDLE_IOCTL(cmd,handler) \
@@ -22211,9 +24118,9 @@ diff -urNp linux-2.6.30.8/fs/compat_ioctl.c linux-2.6.30.8/fs/compat_ioctl.c
/* ioctl should not be warned about even if it's not implemented.
Valid reasons to use this:
-diff -urNp linux-2.6.30.8/fs/debugfs/inode.c linux-2.6.30.8/fs/debugfs/inode.c
---- linux-2.6.30.8/fs/debugfs/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/debugfs/inode.c 2009-07-30 09:48:10.080909461 -0400
+diff -urNp linux-2.6.31.4/fs/debugfs/inode.c linux-2.6.31.4/fs/debugfs/inode.c
+--- linux-2.6.31.4/fs/debugfs/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/debugfs/inode.c 2009-10-11 15:29:45.999847453 -0400
@@ -118,7 +118,7 @@ static inline int debugfs_positive(struc
static int debug_fill_super(struct super_block *sb, void *data, int silent)
@@ -22223,9 +24130,9 @@ diff -urNp linux-2.6.30.8/fs/debugfs/inode.c linux-2.6.30.8/fs/debugfs/inode.c
return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files);
}
-diff -urNp linux-2.6.30.8/fs/dlm/debug_fs.c linux-2.6.30.8/fs/dlm/debug_fs.c
---- linux-2.6.30.8/fs/dlm/debug_fs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/dlm/debug_fs.c 2009-07-30 09:48:10.080909461 -0400
+diff -urNp linux-2.6.31.4/fs/dlm/debug_fs.c linux-2.6.31.4/fs/dlm/debug_fs.c
+--- linux-2.6.31.4/fs/dlm/debug_fs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/dlm/debug_fs.c 2009-10-11 15:29:46.019447720 -0400
@@ -386,9 +386,9 @@ static int table_seq_show(struct seq_fil
return rv;
}
@@ -22264,9 +24171,9 @@ diff -urNp linux-2.6.30.8/fs/dlm/debug_fs.c linux-2.6.30.8/fs/dlm/debug_fs.c
.start = table_seq_start,
.next = table_seq_next,
.stop = table_seq_stop,
-diff -urNp linux-2.6.30.8/fs/ecryptfs/ecryptfs_kernel.h linux-2.6.30.8/fs/ecryptfs/ecryptfs_kernel.h
---- linux-2.6.30.8/fs/ecryptfs/ecryptfs_kernel.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ecryptfs/ecryptfs_kernel.h 2009-07-30 12:43:20.416601232 -0400
+diff -urNp linux-2.6.31.4/fs/ecryptfs/ecryptfs_kernel.h linux-2.6.31.4/fs/ecryptfs/ecryptfs_kernel.h
+--- linux-2.6.31.4/fs/ecryptfs/ecryptfs_kernel.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ecryptfs/ecryptfs_kernel.h 2009-10-11 15:29:46.026525717 -0400
@@ -582,7 +582,7 @@ extern const struct inode_operations ecr
extern const struct inode_operations ecryptfs_symlink_iops;
extern const struct super_operations ecryptfs_sops;
@@ -22276,9 +24183,9 @@ diff -urNp linux-2.6.30.8/fs/ecryptfs/ecryptfs_kernel.h linux-2.6.30.8/fs/ecrypt
extern int ecryptfs_verbosity;
extern unsigned int ecryptfs_message_buf_len;
extern signed long ecryptfs_message_wait_timeout;
-diff -urNp linux-2.6.30.8/fs/ecryptfs/mmap.c linux-2.6.30.8/fs/ecryptfs/mmap.c
---- linux-2.6.30.8/fs/ecryptfs/mmap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ecryptfs/mmap.c 2009-07-30 09:48:10.080909461 -0400
+diff -urNp linux-2.6.31.4/fs/ecryptfs/mmap.c linux-2.6.31.4/fs/ecryptfs/mmap.c
+--- linux-2.6.31.4/fs/ecryptfs/mmap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ecryptfs/mmap.c 2009-10-11 15:29:46.028545725 -0400
@@ -545,7 +545,7 @@ static sector_t ecryptfs_bmap(struct add
return rc;
}
@@ -22288,10 +24195,10 @@ diff -urNp linux-2.6.30.8/fs/ecryptfs/mmap.c linux-2.6.30.8/fs/ecryptfs/mmap.c
.writepage = ecryptfs_writepage,
.readpage = ecryptfs_readpage,
.write_begin = ecryptfs_write_begin,
-diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
---- linux-2.6.30.8/fs/exec.c 2009-09-09 17:37:33.586310250 -0400
-+++ linux-2.6.30.8/fs/exec.c 2009-09-09 17:37:57.440087224 -0400
-@@ -54,12 +54,24 @@
+diff -urNp linux-2.6.31.4/fs/exec.c linux-2.6.31.4/fs/exec.c
+--- linux-2.6.31.4/fs/exec.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/exec.c 2009-10-11 15:29:46.039456806 -0400
+@@ -55,12 +55,24 @@
#include <linux/kmod.h>
#include <linux/fsnotify.h>
#include <linux/fs_struct.h>
@@ -22316,7 +24223,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
int core_uses_pid;
char core_pattern[CORENAME_MAX_SIZE] = "core";
int suid_dumpable = 0;
-@@ -112,7 +124,7 @@ SYSCALL_DEFINE1(uselib, const char __use
+@@ -113,7 +125,7 @@ SYSCALL_DEFINE1(uselib, const char __use
goto out;
file = do_filp_open(AT_FDCWD, tmp,
@@ -22325,7 +24232,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
MAY_READ | MAY_EXEC | MAY_OPEN);
putname(tmp);
error = PTR_ERR(file);
-@@ -160,18 +172,10 @@ static struct page *get_arg_page(struct
+@@ -161,18 +173,10 @@ static struct page *get_arg_page(struct
int write)
{
struct page *page;
@@ -22347,7 +24254,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
return NULL;
if (write) {
-@@ -243,6 +247,11 @@ static int __bprm_mm_init(struct linux_b
+@@ -244,6 +248,11 @@ static int __bprm_mm_init(struct linux_b
vma->vm_end = STACK_TOP_MAX;
vma->vm_start = vma->vm_end - PAGE_SIZE;
vma->vm_flags = VM_STACK_FLAGS;
@@ -22359,7 +24266,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
err = insert_vm_struct(mm, vma);
if (err)
-@@ -251,6 +260,12 @@ static int __bprm_mm_init(struct linux_b
+@@ -252,6 +261,12 @@ static int __bprm_mm_init(struct linux_b
mm->stack_vm = mm->total_vm = 1;
up_write(&mm->mmap_sem);
bprm->p = vma->vm_end - sizeof(void *);
@@ -22372,7 +24279,17 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
return 0;
err:
up_write(&mm->mmap_sem);
-@@ -511,6 +526,10 @@ static int shift_arg_pages(struct vm_are
+@@ -503,7 +518,8 @@ static int shift_arg_pages(struct vm_are
+ unsigned long new_end = old_end - shift;
+ struct mmu_gather *tlb;
+
+- BUG_ON(new_start > new_end);
++ if (new_start >= new_end || new_start < mmap_min_addr)
++ return -EFAULT;
+
+ /*
+ * ensure there are no vmas between where we want to go
+@@ -512,6 +528,10 @@ static int shift_arg_pages(struct vm_are
if (vma != find_vma(mm, new_start))
return -EFAULT;
@@ -22383,7 +24300,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
/*
* cover the whole range: [new_start, old_end)
*/
-@@ -599,6 +618,14 @@ int setup_arg_pages(struct linux_binprm
+@@ -600,6 +620,14 @@ int setup_arg_pages(struct linux_binprm
bprm->exec -= stack_shift;
down_write(&mm->mmap_sem);
@@ -22398,7 +24315,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
vm_flags = VM_STACK_FLAGS;
/*
-@@ -612,21 +639,24 @@ int setup_arg_pages(struct linux_binprm
+@@ -613,21 +641,24 @@ int setup_arg_pages(struct linux_binprm
vm_flags &= ~VM_EXEC;
vm_flags |= mm->def_flags;
@@ -22432,7 +24349,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
#ifdef CONFIG_STACK_GROWSUP
stack_base = vma->vm_end + EXTRA_STACK_VM_PAGES * PAGE_SIZE;
#else
-@@ -638,7 +668,7 @@ int setup_arg_pages(struct linux_binprm
+@@ -639,7 +670,7 @@ int setup_arg_pages(struct linux_binprm
out_unlock:
up_write(&mm->mmap_sem);
@@ -22441,7 +24358,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
}
EXPORT_SYMBOL(setup_arg_pages);
-@@ -650,7 +680,7 @@ struct file *open_exec(const char *name)
+@@ -651,7 +682,7 @@ struct file *open_exec(const char *name)
int err;
file = do_filp_open(AT_FDCWD, name,
@@ -22450,7 +24367,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
MAY_EXEC | MAY_OPEN);
if (IS_ERR(file))
goto out;
-@@ -1046,7 +1076,7 @@ int check_unsafe_exec(struct linux_binpr
+@@ -1085,7 +1116,7 @@ int check_unsafe_exec(struct linux_binpr
}
rcu_read_unlock();
@@ -22459,7 +24376,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
bprm->unsafe |= LSM_UNSAFE_SHARE;
} else {
res = -EAGAIN;
-@@ -1253,6 +1283,11 @@ int do_execve(char * filename,
+@@ -1284,6 +1315,11 @@ int do_execve(char * filename,
char __user *__user *envp,
struct pt_regs * regs)
{
@@ -22471,7 +24388,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
struct linux_binprm *bprm;
struct file *file;
struct files_struct *displaced;
-@@ -1294,6 +1329,18 @@ int do_execve(char * filename,
+@@ -1320,6 +1356,18 @@ int do_execve(char * filename,
bprm->filename = filename;
bprm->interp = filename;
@@ -22490,7 +24407,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
retval = bprm_mm_init(bprm);
if (retval)
goto out_file;
-@@ -1323,10 +1370,41 @@ int do_execve(char * filename,
+@@ -1349,10 +1397,41 @@ int do_execve(char * filename,
if (retval < 0)
goto out;
@@ -22533,7 +24450,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
/* execve succeeded */
current->fs->in_exec = 0;
-@@ -1338,6 +1416,14 @@ int do_execve(char * filename,
+@@ -1363,6 +1442,14 @@ int do_execve(char * filename,
put_files_struct(displaced);
return retval;
@@ -22548,7 +24465,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
out:
if (bprm->mm)
mmput (bprm->mm);
-@@ -1506,6 +1592,164 @@ out:
+@@ -1528,6 +1615,164 @@ out:
return ispipe;
}
@@ -22686,7 +24603,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
+ printk(KERN_ERR "PAX: refcount overflow detected in: %s:%d, uid/euid: %u/%u\n",
+ current->comm, task_pid_nr(current), current_uid(), current_euid());
+ print_symbol(KERN_ERR "PAX: refcount overflow occured at: %s\n", instruction_pointer(regs));
-+ show_registers(regs);
++ show_regs(regs);
+ force_sig_specific(SIGKILL, current);
+}
+#endif
@@ -22713,7 +24630,7 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
static int zap_process(struct task_struct *start)
{
struct task_struct *t;
-@@ -1765,6 +2009,10 @@ void do_coredump(long signr, int exit_co
+@@ -1787,6 +2032,10 @@ void do_coredump(long signr, int exit_co
*/
clear_thread_flag(TIF_SIGPENDING);
@@ -22724,9 +24641,9 @@ diff -urNp linux-2.6.30.8/fs/exec.c linux-2.6.30.8/fs/exec.c
/*
* lock_kernel() because format_corename() is controlled by sysctl, which
* uses lock_kernel()
-diff -urNp linux-2.6.30.8/fs/ext2/balloc.c linux-2.6.30.8/fs/ext2/balloc.c
---- linux-2.6.30.8/fs/ext2/balloc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ext2/balloc.c 2009-07-30 11:10:49.161377797 -0400
+diff -urNp linux-2.6.31.4/fs/ext2/balloc.c linux-2.6.31.4/fs/ext2/balloc.c
+--- linux-2.6.31.4/fs/ext2/balloc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ext2/balloc.c 2009-10-11 15:29:46.053402474 -0400
@@ -1192,7 +1192,7 @@ static int ext2_has_free_blocks(struct e
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
@@ -22736,9 +24653,9 @@ diff -urNp linux-2.6.30.8/fs/ext2/balloc.c linux-2.6.30.8/fs/ext2/balloc.c
sbi->s_resuid != current_fsuid() &&
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
return 0;
-diff -urNp linux-2.6.30.8/fs/ext3/balloc.c linux-2.6.30.8/fs/ext3/balloc.c
---- linux-2.6.30.8/fs/ext3/balloc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ext3/balloc.c 2009-07-30 11:10:49.178426808 -0400
+diff -urNp linux-2.6.31.4/fs/ext3/balloc.c linux-2.6.31.4/fs/ext3/balloc.c
+--- linux-2.6.31.4/fs/ext3/balloc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ext3/balloc.c 2009-10-11 15:29:46.067471738 -0400
@@ -1421,7 +1421,7 @@ static int ext3_has_free_blocks(struct e
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
@@ -22748,9 +24665,9 @@ diff -urNp linux-2.6.30.8/fs/ext3/balloc.c linux-2.6.30.8/fs/ext3/balloc.c
sbi->s_resuid != current_fsuid() &&
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
return 0;
-diff -urNp linux-2.6.30.8/fs/ext3/namei.c linux-2.6.30.8/fs/ext3/namei.c
---- linux-2.6.30.8/fs/ext3/namei.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ext3/namei.c 2009-07-30 09:48:10.082882469 -0400
+diff -urNp linux-2.6.31.4/fs/ext3/namei.c linux-2.6.31.4/fs/ext3/namei.c
+--- linux-2.6.31.4/fs/ext3/namei.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ext3/namei.c 2009-10-11 15:29:46.077388519 -0400
@@ -1168,7 +1168,7 @@ static struct ext3_dir_entry_2 *do_split
char *data1 = (*bh)->b_data, *data2;
unsigned split, move, size;
@@ -22760,9 +24677,9 @@ diff -urNp linux-2.6.30.8/fs/ext3/namei.c linux-2.6.30.8/fs/ext3/namei.c
bh2 = ext3_append (handle, dir, &newblock, &err);
if (!(bh2)) {
-diff -urNp linux-2.6.30.8/fs/ext3/xattr.c linux-2.6.30.8/fs/ext3/xattr.c
---- linux-2.6.30.8/fs/ext3/xattr.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ext3/xattr.c 2009-07-30 09:48:10.082882469 -0400
+diff -urNp linux-2.6.31.4/fs/ext3/xattr.c linux-2.6.31.4/fs/ext3/xattr.c
+--- linux-2.6.31.4/fs/ext3/xattr.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ext3/xattr.c 2009-10-11 15:29:46.078447283 -0400
@@ -89,8 +89,8 @@
printk("\n"); \
} while (0)
@@ -22774,9 +24691,9 @@ diff -urNp linux-2.6.30.8/fs/ext3/xattr.c linux-2.6.30.8/fs/ext3/xattr.c
#endif
static void ext3_xattr_cache_insert(struct buffer_head *);
-diff -urNp linux-2.6.30.8/fs/ext4/balloc.c linux-2.6.30.8/fs/ext4/balloc.c
---- linux-2.6.30.8/fs/ext4/balloc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ext4/balloc.c 2009-07-30 11:10:49.209900020 -0400
+diff -urNp linux-2.6.31.4/fs/ext4/balloc.c linux-2.6.31.4/fs/ext4/balloc.c
+--- linux-2.6.31.4/fs/ext4/balloc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ext4/balloc.c 2009-10-11 15:29:46.088513626 -0400
@@ -573,7 +573,7 @@ int ext4_has_free_blocks(struct ext4_sb_
/* Hm, nope. Are (enough) root reserved blocks available? */
if (sbi->s_resuid == current_fsuid() ||
@@ -22786,10 +24703,10 @@ diff -urNp linux-2.6.30.8/fs/ext4/balloc.c linux-2.6.30.8/fs/ext4/balloc.c
if (free_blocks >= (nblocks + dirty_blocks))
return 1;
}
-diff -urNp linux-2.6.30.8/fs/ext4/file.c linux-2.6.30.8/fs/ext4/file.c
---- linux-2.6.30.8/fs/ext4/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ext4/file.c 2009-07-30 09:48:10.082882469 -0400
-@@ -128,7 +128,7 @@ force_commit:
+diff -urNp linux-2.6.31.4/fs/ext4/file.c linux-2.6.31.4/fs/ext4/file.c
+--- linux-2.6.31.4/fs/ext4/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ext4/file.c 2009-10-11 15:29:46.089370324 -0400
+@@ -130,7 +130,7 @@ force_commit:
return ret;
}
@@ -22798,10 +24715,10 @@ diff -urNp linux-2.6.30.8/fs/ext4/file.c linux-2.6.30.8/fs/ext4/file.c
.fault = filemap_fault,
.page_mkwrite = ext4_page_mkwrite,
};
-diff -urNp linux-2.6.30.8/fs/ext4/mballoc.c linux-2.6.30.8/fs/ext4/mballoc.c
---- linux-2.6.30.8/fs/ext4/mballoc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ext4/mballoc.c 2009-07-30 09:48:10.083824497 -0400
-@@ -2221,7 +2221,7 @@ static void ext4_mb_seq_history_stop(str
+diff -urNp linux-2.6.31.4/fs/ext4/mballoc.c linux-2.6.31.4/fs/ext4/mballoc.c
+--- linux-2.6.31.4/fs/ext4/mballoc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ext4/mballoc.c 2009-10-11 15:29:46.116449374 -0400
+@@ -2205,7 +2205,7 @@ static void ext4_mb_seq_history_stop(str
{
}
@@ -22810,7 +24727,7 @@ diff -urNp linux-2.6.30.8/fs/ext4/mballoc.c linux-2.6.30.8/fs/ext4/mballoc.c
.start = ext4_mb_seq_history_start,
.next = ext4_mb_seq_history_next,
.stop = ext4_mb_seq_history_stop,
-@@ -2303,7 +2303,7 @@ static ssize_t ext4_mb_seq_history_write
+@@ -2287,7 +2287,7 @@ static ssize_t ext4_mb_seq_history_write
return count;
}
@@ -22819,7 +24736,7 @@ diff -urNp linux-2.6.30.8/fs/ext4/mballoc.c linux-2.6.30.8/fs/ext4/mballoc.c
.owner = THIS_MODULE,
.open = ext4_mb_seq_history_open,
.read = seq_read,
-@@ -2385,7 +2385,7 @@ static void ext4_mb_seq_groups_stop(stru
+@@ -2366,7 +2366,7 @@ static void ext4_mb_seq_groups_stop(stru
{
}
@@ -22828,7 +24745,7 @@ diff -urNp linux-2.6.30.8/fs/ext4/mballoc.c linux-2.6.30.8/fs/ext4/mballoc.c
.start = ext4_mb_seq_groups_start,
.next = ext4_mb_seq_groups_next,
.stop = ext4_mb_seq_groups_stop,
-@@ -2406,7 +2406,7 @@ static int ext4_mb_seq_groups_open(struc
+@@ -2387,7 +2387,7 @@ static int ext4_mb_seq_groups_open(struc
}
@@ -22837,9 +24754,9 @@ diff -urNp linux-2.6.30.8/fs/ext4/mballoc.c linux-2.6.30.8/fs/ext4/mballoc.c
.owner = THIS_MODULE,
.open = ext4_mb_seq_groups_open,
.read = seq_read,
-diff -urNp linux-2.6.30.8/fs/ext4/namei.c linux-2.6.30.8/fs/ext4/namei.c
---- linux-2.6.30.8/fs/ext4/namei.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ext4/namei.c 2009-07-30 09:48:10.084769862 -0400
+diff -urNp linux-2.6.31.4/fs/ext4/namei.c linux-2.6.31.4/fs/ext4/namei.c
+--- linux-2.6.31.4/fs/ext4/namei.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ext4/namei.c 2009-10-11 15:29:46.127367595 -0400
@@ -1203,7 +1203,7 @@ static struct ext4_dir_entry_2 *do_split
char *data1 = (*bh)->b_data, *data2;
unsigned split, move, size;
@@ -22849,10 +24766,10 @@ diff -urNp linux-2.6.30.8/fs/ext4/namei.c linux-2.6.30.8/fs/ext4/namei.c
bh2 = ext4_append (handle, dir, &newblock, &err);
if (!(bh2)) {
-diff -urNp linux-2.6.30.8/fs/fcntl.c linux-2.6.30.8/fs/fcntl.c
---- linux-2.6.30.8/fs/fcntl.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/fcntl.c 2009-07-30 11:10:49.218051199 -0400
-@@ -269,6 +269,7 @@ static long do_fcntl(int fd, unsigned in
+diff -urNp linux-2.6.31.4/fs/fcntl.c linux-2.6.31.4/fs/fcntl.c
+--- linux-2.6.31.4/fs/fcntl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/fcntl.c 2009-10-11 15:29:46.134368122 -0400
+@@ -271,6 +271,7 @@ static long do_fcntl(int fd, unsigned in
switch (cmd) {
case F_DUPFD:
case F_DUPFD_CLOEXEC:
@@ -22860,7 +24777,7 @@ diff -urNp linux-2.6.30.8/fs/fcntl.c linux-2.6.30.8/fs/fcntl.c
if (arg >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
break;
err = alloc_fd(arg, cmd == F_DUPFD_CLOEXEC ? O_CLOEXEC : 0);
-@@ -419,7 +420,8 @@ static inline int sigio_perm(struct task
+@@ -421,7 +422,8 @@ static inline int sigio_perm(struct task
ret = ((fown->euid == 0 ||
fown->euid == cred->suid || fown->euid == cred->uid ||
fown->uid == cred->suid || fown->uid == cred->uid) &&
@@ -22870,9 +24787,9 @@ diff -urNp linux-2.6.30.8/fs/fcntl.c linux-2.6.30.8/fs/fcntl.c
rcu_read_unlock();
return ret;
}
-diff -urNp linux-2.6.30.8/fs/file.c linux-2.6.30.8/fs/file.c
---- linux-2.6.30.8/fs/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/file.c 2009-07-30 11:10:49.226664348 -0400
+diff -urNp linux-2.6.31.4/fs/file.c linux-2.6.31.4/fs/file.c
+--- linux-2.6.31.4/fs/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/file.c 2009-10-11 15:29:46.138384545 -0400
@@ -13,6 +13,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
@@ -22890,9 +24807,9 @@ diff -urNp linux-2.6.30.8/fs/file.c linux-2.6.30.8/fs/file.c
if (nr >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
return -EMFILE;
-diff -urNp linux-2.6.30.8/fs/fs_struct.c linux-2.6.30.8/fs/fs_struct.c
---- linux-2.6.30.8/fs/fs_struct.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/fs_struct.c 2009-07-30 09:48:10.084769862 -0400
+diff -urNp linux-2.6.31.4/fs/fs_struct.c linux-2.6.31.4/fs/fs_struct.c
+--- linux-2.6.31.4/fs/fs_struct.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/fs_struct.c 2009-10-11 15:29:46.139364465 -0400
@@ -89,7 +89,7 @@ void exit_fs(struct task_struct *tsk)
task_lock(tsk);
write_lock(&fs->lock);
@@ -22944,9 +24861,9 @@ diff -urNp linux-2.6.30.8/fs/fs_struct.c linux-2.6.30.8/fs/fs_struct.c
write_unlock(&fs->lock);
task_unlock(current);
-diff -urNp linux-2.6.30.8/fs/fuse/control.c linux-2.6.30.8/fs/fuse/control.c
---- linux-2.6.30.8/fs/fuse/control.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/fuse/control.c 2009-07-30 09:48:10.084769862 -0400
+diff -urNp linux-2.6.31.4/fs/fuse/control.c linux-2.6.31.4/fs/fuse/control.c
+--- linux-2.6.31.4/fs/fuse/control.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/fuse/control.c 2009-10-11 15:29:46.148651030 -0400
@@ -161,7 +161,7 @@ void fuse_ctl_remove_conn(struct fuse_co
static int fuse_ctl_fill_super(struct super_block *sb, void *data, int silent)
@@ -22956,10 +24873,56 @@ diff -urNp linux-2.6.30.8/fs/fuse/control.c linux-2.6.30.8/fs/fuse/control.c
struct fuse_conn *fc;
int err;
-diff -urNp linux-2.6.30.8/fs/fuse/dir.c linux-2.6.30.8/fs/fuse/dir.c
---- linux-2.6.30.8/fs/fuse/dir.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/fuse/dir.c 2009-07-30 09:48:10.085789827 -0400
-@@ -1082,7 +1082,7 @@ static char *read_link(struct dentry *de
+diff -urNp linux-2.6.31.4/fs/fuse/dev.c linux-2.6.31.4/fs/fuse/dev.c
+--- linux-2.6.31.4/fs/fuse/dev.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/fuse/dev.c 2009-10-11 15:29:46.246749083 -0400
+@@ -885,7 +885,7 @@ static int fuse_notify_inval_entry(struc
+ {
+ struct fuse_notify_inval_entry_out outarg;
+ int err = -EINVAL;
+- char buf[FUSE_NAME_MAX+1];
++ char *buf = NULL;
+ struct qstr name;
+
+ if (size < sizeof(outarg))
+@@ -899,6 +899,11 @@ static int fuse_notify_inval_entry(struc
+ if (outarg.namelen > FUSE_NAME_MAX)
+ goto err;
+
++ err = -ENOMEM;
++ buf = kmalloc(FUSE_NAME_MAX+1, GFP_KERNEL);
++ if (!buf)
++ goto err;
++
+ name.name = buf;
+ name.len = outarg.namelen;
+ err = fuse_copy_one(cs, buf, outarg.namelen + 1);
+@@ -910,17 +915,15 @@ static int fuse_notify_inval_entry(struc
+
+ down_read(&fc->killsb);
+ err = -ENOENT;
+- if (!fc->sb)
+- goto err_unlock;
+-
+- err = fuse_reverse_inval_entry(fc->sb, outarg.parent, &name);
+-
+-err_unlock:
++ if (fc->sb)
++ err = fuse_reverse_inval_entry(fc->sb, outarg.parent, &name);
+ up_read(&fc->killsb);
++ kfree(buf);
+ return err;
+
+ err:
+ fuse_copy_finish(cs);
++ kfree(buf);
+ return err;
+ }
+
+diff -urNp linux-2.6.31.4/fs/fuse/dir.c linux-2.6.31.4/fs/fuse/dir.c
+--- linux-2.6.31.4/fs/fuse/dir.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/fuse/dir.c 2009-10-11 15:29:46.247657356 -0400
+@@ -1122,7 +1122,7 @@ static char *read_link(struct dentry *de
return link;
}
@@ -22968,10 +24931,10 @@ diff -urNp linux-2.6.30.8/fs/fuse/dir.c linux-2.6.30.8/fs/fuse/dir.c
{
if (!IS_ERR(link))
free_page((unsigned long) link);
-diff -urNp linux-2.6.30.8/fs/fuse/file.c linux-2.6.30.8/fs/fuse/file.c
---- linux-2.6.30.8/fs/fuse/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/fuse/file.c 2009-07-30 09:48:10.085789827 -0400
-@@ -1265,7 +1265,7 @@ static int fuse_page_mkwrite(struct vm_a
+diff -urNp linux-2.6.31.4/fs/fuse/file.c linux-2.6.31.4/fs/fuse/file.c
+--- linux-2.6.31.4/fs/fuse/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/fuse/file.c 2009-10-11 15:29:46.248575745 -0400
+@@ -1313,7 +1313,7 @@ static int fuse_page_mkwrite(struct vm_a
return 0;
}
@@ -22980,10 +24943,10 @@ diff -urNp linux-2.6.30.8/fs/fuse/file.c linux-2.6.30.8/fs/fuse/file.c
.close = fuse_vma_close,
.fault = filemap_fault,
.page_mkwrite = fuse_page_mkwrite,
-diff -urNp linux-2.6.30.8/fs/gfs2/ops_file.c linux-2.6.30.8/fs/gfs2/ops_file.c
---- linux-2.6.30.8/fs/gfs2/ops_file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/gfs2/ops_file.c 2009-07-30 09:48:10.086770196 -0400
-@@ -420,7 +420,7 @@ out:
+diff -urNp linux-2.6.31.4/fs/gfs2/file.c linux-2.6.31.4/fs/gfs2/file.c
+--- linux-2.6.31.4/fs/gfs2/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/gfs2/file.c 2009-10-11 15:29:46.261361653 -0400
+@@ -419,7 +419,7 @@ out:
return ret;
}
@@ -22992,9 +24955,9 @@ diff -urNp linux-2.6.30.8/fs/gfs2/ops_file.c linux-2.6.30.8/fs/gfs2/ops_file.c
.fault = filemap_fault,
.page_mkwrite = gfs2_page_mkwrite,
};
-diff -urNp linux-2.6.30.8/fs/hfs/inode.c linux-2.6.30.8/fs/hfs/inode.c
---- linux-2.6.30.8/fs/hfs/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/hfs/inode.c 2009-07-30 09:48:10.086770196 -0400
+diff -urNp linux-2.6.31.4/fs/hfs/inode.c linux-2.6.31.4/fs/hfs/inode.c
+--- linux-2.6.31.4/fs/hfs/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/hfs/inode.c 2009-10-11 15:29:46.271712684 -0400
@@ -423,7 +423,7 @@ int hfs_write_inode(struct inode *inode,
if (S_ISDIR(main_inode->i_mode)) {
@@ -23013,9 +24976,9 @@ diff -urNp linux-2.6.30.8/fs/hfs/inode.c linux-2.6.30.8/fs/hfs/inode.c
hfs_bnode_read(fd.bnode, &rec, fd.entryoffset,
sizeof(struct hfs_cat_file));
if (rec.type != HFS_CDR_FIL ||
-diff -urNp linux-2.6.30.8/fs/hfsplus/inode.c linux-2.6.30.8/fs/hfsplus/inode.c
---- linux-2.6.30.8/fs/hfsplus/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/hfsplus/inode.c 2009-07-30 09:48:10.086770196 -0400
+diff -urNp linux-2.6.31.4/fs/hfsplus/inode.c linux-2.6.31.4/fs/hfsplus/inode.c
+--- linux-2.6.31.4/fs/hfsplus/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/hfsplus/inode.c 2009-10-11 15:29:46.283361764 -0400
@@ -406,7 +406,7 @@ int hfsplus_cat_read_inode(struct inode
struct hfsplus_cat_folder *folder = &entry.folder;
@@ -23052,10 +25015,10 @@ diff -urNp linux-2.6.30.8/fs/hfsplus/inode.c linux-2.6.30.8/fs/hfsplus/inode.c
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
sizeof(struct hfsplus_cat_file));
hfsplus_inode_write_fork(inode, &file->data_fork);
-diff -urNp linux-2.6.30.8/fs/jbd2/journal.c linux-2.6.30.8/fs/jbd2/journal.c
---- linux-2.6.30.8/fs/jbd2/journal.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/jbd2/journal.c 2009-07-30 09:48:10.087743830 -0400
-@@ -762,7 +762,7 @@ static void jbd2_seq_history_stop(struct
+diff -urNp linux-2.6.31.4/fs/jbd2/journal.c linux-2.6.31.4/fs/jbd2/journal.c
+--- linux-2.6.31.4/fs/jbd2/journal.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/jbd2/journal.c 2009-10-11 15:29:46.294394496 -0400
+@@ -768,7 +768,7 @@ static void jbd2_seq_history_stop(struct
{
}
@@ -23064,7 +25027,7 @@ diff -urNp linux-2.6.30.8/fs/jbd2/journal.c linux-2.6.30.8/fs/jbd2/journal.c
.start = jbd2_seq_history_start,
.next = jbd2_seq_history_next,
.stop = jbd2_seq_history_stop,
-@@ -812,7 +812,7 @@ static int jbd2_seq_history_release(stru
+@@ -818,7 +818,7 @@ static int jbd2_seq_history_release(stru
return seq_release(inode, file);
}
@@ -23073,7 +25036,7 @@ diff -urNp linux-2.6.30.8/fs/jbd2/journal.c linux-2.6.30.8/fs/jbd2/journal.c
.owner = THIS_MODULE,
.open = jbd2_seq_history_open,
.read = seq_read,
-@@ -866,7 +866,7 @@ static void jbd2_seq_info_stop(struct se
+@@ -872,7 +872,7 @@ static void jbd2_seq_info_stop(struct se
{
}
@@ -23082,7 +25045,7 @@ diff -urNp linux-2.6.30.8/fs/jbd2/journal.c linux-2.6.30.8/fs/jbd2/journal.c
.start = jbd2_seq_info_start,
.next = jbd2_seq_info_next,
.stop = jbd2_seq_info_stop,
-@@ -914,7 +914,7 @@ static int jbd2_seq_info_release(struct
+@@ -920,7 +920,7 @@ static int jbd2_seq_info_release(struct
return seq_release(inode, file);
}
@@ -23091,9 +25054,9 @@ diff -urNp linux-2.6.30.8/fs/jbd2/journal.c linux-2.6.30.8/fs/jbd2/journal.c
.owner = THIS_MODULE,
.open = jbd2_seq_info_open,
.read = seq_read,
-diff -urNp linux-2.6.30.8/fs/jffs2/debug.h linux-2.6.30.8/fs/jffs2/debug.h
---- linux-2.6.30.8/fs/jffs2/debug.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/jffs2/debug.h 2009-07-30 09:48:10.087743830 -0400
+diff -urNp linux-2.6.31.4/fs/jffs2/debug.h linux-2.6.31.4/fs/jffs2/debug.h
+--- linux-2.6.31.4/fs/jffs2/debug.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/jffs2/debug.h 2009-10-11 15:29:46.309686498 -0400
@@ -52,13 +52,13 @@
#if CONFIG_JFFS2_FS_DEBUG > 0
#define D1(x) x
@@ -23195,10 +25158,10 @@ diff -urNp linux-2.6.30.8/fs/jffs2/debug.h linux-2.6.30.8/fs/jffs2/debug.h
#endif
/* "Sanity" checks */
-diff -urNp linux-2.6.30.8/fs/jffs2/erase.c linux-2.6.30.8/fs/jffs2/erase.c
---- linux-2.6.30.8/fs/jffs2/erase.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/jffs2/erase.c 2009-07-30 09:48:10.087743830 -0400
-@@ -432,7 +432,8 @@ static void jffs2_mark_erased_block(stru
+diff -urNp linux-2.6.31.4/fs/jffs2/erase.c linux-2.6.31.4/fs/jffs2/erase.c
+--- linux-2.6.31.4/fs/jffs2/erase.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/jffs2/erase.c 2009-10-11 15:29:46.314378203 -0400
+@@ -434,7 +434,8 @@ static void jffs2_mark_erased_block(stru
struct jffs2_unknown_node marker = {
.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK),
.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
@@ -23208,9 +25171,9 @@ diff -urNp linux-2.6.30.8/fs/jffs2/erase.c linux-2.6.30.8/fs/jffs2/erase.c
};
jffs2_prealloc_raw_node_refs(c, jeb, 1);
-diff -urNp linux-2.6.30.8/fs/jffs2/summary.h linux-2.6.30.8/fs/jffs2/summary.h
---- linux-2.6.30.8/fs/jffs2/summary.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/jffs2/summary.h 2009-07-30 09:48:10.088709552 -0400
+diff -urNp linux-2.6.31.4/fs/jffs2/summary.h linux-2.6.31.4/fs/jffs2/summary.h
+--- linux-2.6.31.4/fs/jffs2/summary.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/jffs2/summary.h 2009-10-11 15:29:46.317385502 -0400
@@ -194,18 +194,18 @@ int jffs2_sum_scan_sumnode(struct jffs2_
#define jffs2_sum_active() (0)
@@ -23239,9 +25202,9 @@ diff -urNp linux-2.6.30.8/fs/jffs2/summary.h linux-2.6.30.8/fs/jffs2/summary.h
#define jffs2_sum_scan_sumnode(a,b,c,d,e) (0)
#endif /* CONFIG_JFFS2_SUMMARY */
-diff -urNp linux-2.6.30.8/fs/jffs2/wbuf.c linux-2.6.30.8/fs/jffs2/wbuf.c
---- linux-2.6.30.8/fs/jffs2/wbuf.c 2009-09-15 18:48:57.023270426 -0400
-+++ linux-2.6.30.8/fs/jffs2/wbuf.c 2009-09-15 18:49:04.106640333 -0400
+diff -urNp linux-2.6.31.4/fs/jffs2/wbuf.c linux-2.6.31.4/fs/jffs2/wbuf.c
+--- linux-2.6.31.4/fs/jffs2/wbuf.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/jffs2/wbuf.c 2009-10-11 15:29:46.318374009 -0400
@@ -1012,7 +1012,8 @@ static const struct jffs2_unknown_node o
{
.magic = constant_cpu_to_je16(JFFS2_MAGIC_BITMASK),
@@ -23252,10 +25215,22 @@ diff -urNp linux-2.6.30.8/fs/jffs2/wbuf.c linux-2.6.30.8/fs/jffs2/wbuf.c
};
/*
-diff -urNp linux-2.6.30.8/fs/locks.c linux-2.6.30.8/fs/locks.c
---- linux-2.6.30.8/fs/locks.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/locks.c 2009-07-30 09:48:10.089659107 -0400
-@@ -2006,16 +2006,16 @@ void locks_remove_flock(struct file *fil
+diff -urNp linux-2.6.31.4/fs/lockd/svc.c linux-2.6.31.4/fs/lockd/svc.c
+--- linux-2.6.31.4/fs/lockd/svc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/lockd/svc.c 2009-10-11 15:29:56.700390259 -0400
+@@ -43,7 +43,7 @@
+
+ static struct svc_program nlmsvc_program;
+
+-struct nlmsvc_binding * nlmsvc_ops;
++const struct nlmsvc_binding * nlmsvc_ops;
+ EXPORT_SYMBOL_GPL(nlmsvc_ops);
+
+ static DEFINE_MUTEX(nlmsvc_mutex);
+diff -urNp linux-2.6.31.4/fs/locks.c linux-2.6.31.4/fs/locks.c
+--- linux-2.6.31.4/fs/locks.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/locks.c 2009-10-11 15:29:46.340361540 -0400
+@@ -2007,16 +2007,16 @@ void locks_remove_flock(struct file *fil
return;
if (filp->f_op && filp->f_op->flock) {
@@ -23276,10 +25251,10 @@ diff -urNp linux-2.6.30.8/fs/locks.c linux-2.6.30.8/fs/locks.c
}
lock_kernel();
-diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
---- linux-2.6.30.8/fs/namei.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/namei.c 2009-07-30 11:33:24.872476011 -0400
-@@ -624,7 +624,7 @@ static __always_inline int __do_follow_l
+diff -urNp linux-2.6.31.4/fs/namei.c linux-2.6.31.4/fs/namei.c
+--- linux-2.6.31.4/fs/namei.c 2009-10-12 23:26:17.993604726 -0400
++++ linux-2.6.31.4/fs/namei.c 2009-10-12 23:26:38.966399894 -0400
+@@ -631,7 +631,7 @@ static __always_inline int __do_follow_l
cookie = dentry->d_inode->i_op->follow_link(dentry, nd);
error = PTR_ERR(cookie);
if (!IS_ERR(cookie)) {
@@ -23288,7 +25263,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = 0;
if (s)
error = __vfs_follow_link(nd, s);
-@@ -655,6 +655,13 @@ static inline int do_follow_link(struct
+@@ -662,6 +662,13 @@ static inline int do_follow_link(struct
err = security_inode_follow_link(path->dentry, nd);
if (err)
goto loop;
@@ -23302,7 +25277,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
current->link_count++;
current->total_link_count++;
nd->depth++;
-@@ -1000,11 +1007,18 @@ return_reval:
+@@ -1005,11 +1012,18 @@ return_reval:
break;
}
return_base:
@@ -23321,7 +25296,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
path_put(&nd->path);
return_err:
return err;
-@@ -1580,12 +1594,19 @@ static int __open_namei_create(struct na
+@@ -1610,12 +1624,19 @@ static int __open_namei_create(struct na
int error;
struct dentry *dir = nd->path.dentry;
@@ -23341,7 +25316,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
out_unlock:
mutex_unlock(&dir->d_inode->i_mutex);
dput(nd->path.dentry);
-@@ -1668,6 +1689,17 @@ struct file *do_filp_open(int dfd, const
+@@ -1698,6 +1719,17 @@ struct file *do_filp_open(int dfd, const
&nd, flag);
if (error)
return ERR_PTR(error);
@@ -23359,7 +25334,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
goto ok;
}
-@@ -1740,6 +1772,20 @@ do_last:
+@@ -1784,6 +1816,20 @@ do_last:
/*
* It already exists.
*/
@@ -23380,7 +25355,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
mutex_unlock(&dir->d_inode->i_mutex);
audit_inode(pathname, path.dentry);
-@@ -1825,6 +1871,13 @@ do_link:
+@@ -1876,6 +1922,13 @@ do_link:
error = security_inode_follow_link(path.dentry, &nd);
if (error)
goto exit_dput;
@@ -23394,7 +25369,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = __do_follow_link(&path, &nd);
if (error) {
/* Does someone understand code flow here? Or it is only
-@@ -1997,6 +2050,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
+@@ -2050,6 +2103,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
error = may_mknod(mode);
if (error)
goto out_dput;
@@ -23412,7 +25387,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
-@@ -2017,6 +2081,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
+@@ -2070,6 +2134,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
}
out_drop_write:
mnt_drop_write(nd.path.mnt);
@@ -23422,7 +25397,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
out_dput:
dput(dentry);
out_unlock:
-@@ -2070,6 +2137,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
+@@ -2123,6 +2190,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
if (IS_ERR(dentry))
goto out_unlock;
@@ -23434,7 +25409,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
if (!IS_POSIXACL(nd.path.dentry->d_inode))
mode &= ~current_umask();
error = mnt_want_write(nd.path.mnt);
-@@ -2081,6 +2153,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
+@@ -2134,6 +2206,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
error = vfs_mkdir(nd.path.dentry->d_inode, dentry, mode);
out_drop_write:
mnt_drop_write(nd.path.mnt);
@@ -23445,7 +25420,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
out_dput:
dput(dentry);
out_unlock:
-@@ -2162,6 +2238,8 @@ static long do_rmdir(int dfd, const char
+@@ -2215,6 +2291,8 @@ static long do_rmdir(int dfd, const char
char * name;
struct dentry *dentry;
struct nameidata nd;
@@ -23454,7 +25429,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = user_path_parent(dfd, pathname, &nd, &name);
if (error)
-@@ -2186,6 +2264,19 @@ static long do_rmdir(int dfd, const char
+@@ -2239,6 +2317,19 @@ static long do_rmdir(int dfd, const char
error = PTR_ERR(dentry);
if (IS_ERR(dentry))
goto exit2;
@@ -23474,7 +25449,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit3;
-@@ -2193,6 +2284,8 @@ static long do_rmdir(int dfd, const char
+@@ -2246,6 +2337,8 @@ static long do_rmdir(int dfd, const char
if (error)
goto exit4;
error = vfs_rmdir(nd.path.dentry->d_inode, dentry);
@@ -23483,7 +25458,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
exit4:
mnt_drop_write(nd.path.mnt);
exit3:
-@@ -2254,6 +2347,8 @@ static long do_unlinkat(int dfd, const c
+@@ -2307,6 +2400,8 @@ static long do_unlinkat(int dfd, const c
struct dentry *dentry;
struct nameidata nd;
struct inode *inode = NULL;
@@ -23492,7 +25467,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = user_path_parent(dfd, pathname, &nd, &name);
if (error)
-@@ -2273,8 +2368,19 @@ static long do_unlinkat(int dfd, const c
+@@ -2326,8 +2421,19 @@ static long do_unlinkat(int dfd, const c
if (nd.last.name[nd.last.len])
goto slashes;
inode = dentry->d_inode;
@@ -23513,7 +25488,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit2;
-@@ -2282,6 +2388,8 @@ static long do_unlinkat(int dfd, const c
+@@ -2335,6 +2441,8 @@ static long do_unlinkat(int dfd, const c
if (error)
goto exit3;
error = vfs_unlink(nd.path.dentry->d_inode, dentry);
@@ -23522,7 +25497,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
exit3:
mnt_drop_write(nd.path.mnt);
exit2:
-@@ -2360,6 +2468,11 @@ SYSCALL_DEFINE3(symlinkat, const char __
+@@ -2413,6 +2521,11 @@ SYSCALL_DEFINE3(symlinkat, const char __
if (IS_ERR(dentry))
goto out_unlock;
@@ -23534,7 +25509,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
-@@ -2367,6 +2480,8 @@ SYSCALL_DEFINE3(symlinkat, const char __
+@@ -2420,6 +2533,8 @@ SYSCALL_DEFINE3(symlinkat, const char __
if (error)
goto out_drop_write;
error = vfs_symlink(nd.path.dentry->d_inode, dentry, from);
@@ -23543,7 +25518,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
out_drop_write:
mnt_drop_write(nd.path.mnt);
out_dput:
-@@ -2460,6 +2575,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
+@@ -2513,6 +2628,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
error = PTR_ERR(new_dentry);
if (IS_ERR(new_dentry))
goto out_unlock;
@@ -23564,7 +25539,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
-@@ -2467,6 +2596,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
+@@ -2520,6 +2649,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
if (error)
goto out_drop_write;
error = vfs_link(old_path.dentry, nd.path.dentry->d_inode, new_dentry);
@@ -23573,7 +25548,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
out_drop_write:
mnt_drop_write(nd.path.mnt);
out_dput:
-@@ -2700,6 +2831,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -2753,6 +2884,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
if (new_dentry == trap)
goto exit5;
@@ -23586,7 +25561,7 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
error = mnt_want_write(oldnd.path.mnt);
if (error)
goto exit5;
-@@ -2709,6 +2846,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -2762,6 +2899,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
goto exit6;
error = vfs_rename(old_dir->d_inode, old_dentry,
new_dir->d_inode, new_dentry);
@@ -23596,19 +25571,20 @@ diff -urNp linux-2.6.30.8/fs/namei.c linux-2.6.30.8/fs/namei.c
exit6:
mnt_drop_write(oldnd.path.mnt);
exit5:
-diff -urNp linux-2.6.30.8/fs/namespace.c linux-2.6.30.8/fs/namespace.c
---- linux-2.6.30.8/fs/namespace.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/namespace.c 2009-09-04 10:32:49.170674908 -0400
-@@ -1110,6 +1110,8 @@ static int do_umount(struct vfsmount *mn
- lock_kernel();
+diff -urNp linux-2.6.31.4/fs/namespace.c linux-2.6.31.4/fs/namespace.c
+--- linux-2.6.31.4/fs/namespace.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/namespace.c 2009-10-11 15:29:46.363482610 -0400
+@@ -1083,6 +1083,9 @@ static int do_umount(struct vfsmount *mn
+ if (!(sb->s_flags & MS_RDONLY))
retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
- unlock_kernel();
-+
-+ gr_log_remount(mnt->mnt_devname, retval);
- }
up_write(&sb->s_umount);
++
++ gr_log_remount(mnt->mnt_devname, retval);
++
return retval;
-@@ -1133,6 +1135,9 @@ static int do_umount(struct vfsmount *mn
+ }
+
+@@ -1104,6 +1107,9 @@ static int do_umount(struct vfsmount *mn
security_sb_umount_busy(mnt);
up_write(&namespace_sem);
release_mounts(&umount_list);
@@ -23618,7 +25594,7 @@ diff -urNp linux-2.6.30.8/fs/namespace.c linux-2.6.30.8/fs/namespace.c
return retval;
}
-@@ -1967,6 +1972,11 @@ long do_mount(char *dev_name, char *dir_
+@@ -1940,6 +1946,11 @@ long do_mount(char *dev_name, char *dir_
if (retval)
goto dput_out;
@@ -23630,7 +25606,7 @@ diff -urNp linux-2.6.30.8/fs/namespace.c linux-2.6.30.8/fs/namespace.c
if (flags & MS_REMOUNT)
retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
data_page);
-@@ -1981,6 +1991,9 @@ long do_mount(char *dev_name, char *dir_
+@@ -1954,6 +1965,9 @@ long do_mount(char *dev_name, char *dir_
dev_name, data_page);
dput_out:
path_put(&path);
@@ -23640,7 +25616,7 @@ diff -urNp linux-2.6.30.8/fs/namespace.c linux-2.6.30.8/fs/namespace.c
return retval;
}
-@@ -2159,6 +2172,12 @@ SYSCALL_DEFINE2(pivot_root, const char _
+@@ -2158,6 +2172,12 @@ SYSCALL_DEFINE2(pivot_root, const char _
goto out1;
}
@@ -23653,10 +25629,10 @@ diff -urNp linux-2.6.30.8/fs/namespace.c linux-2.6.30.8/fs/namespace.c
read_lock(&current->fs->lock);
root = current->fs->root;
path_get(&current->fs->root);
-diff -urNp linux-2.6.30.8/fs/nfs/client.c linux-2.6.30.8/fs/nfs/client.c
---- linux-2.6.30.8/fs/nfs/client.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nfs/client.c 2009-07-30 09:48:10.090670547 -0400
-@@ -1404,7 +1404,7 @@ static void *nfs_server_list_next(struct
+diff -urNp linux-2.6.31.4/fs/nfs/client.c linux-2.6.31.4/fs/nfs/client.c
+--- linux-2.6.31.4/fs/nfs/client.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nfs/client.c 2009-10-11 15:29:46.370357763 -0400
+@@ -1533,7 +1533,7 @@ static void *nfs_server_list_next(struct
static void nfs_server_list_stop(struct seq_file *p, void *v);
static int nfs_server_list_show(struct seq_file *m, void *v);
@@ -23665,7 +25641,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/client.c linux-2.6.30.8/fs/nfs/client.c
.start = nfs_server_list_start,
.next = nfs_server_list_next,
.stop = nfs_server_list_stop,
-@@ -1425,7 +1425,7 @@ static void *nfs_volume_list_next(struct
+@@ -1554,7 +1554,7 @@ static void *nfs_volume_list_next(struct
static void nfs_volume_list_stop(struct seq_file *p, void *v);
static int nfs_volume_list_show(struct seq_file *m, void *v);
@@ -23674,10 +25650,10 @@ diff -urNp linux-2.6.30.8/fs/nfs/client.c linux-2.6.30.8/fs/nfs/client.c
.start = nfs_volume_list_start,
.next = nfs_volume_list_next,
.stop = nfs_volume_list_stop,
-diff -urNp linux-2.6.30.8/fs/nfs/file.c linux-2.6.30.8/fs/nfs/file.c
---- linux-2.6.30.8/fs/nfs/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nfs/file.c 2009-07-30 09:48:10.090670547 -0400
-@@ -57,7 +57,7 @@ static int nfs_lock(struct file *filp, i
+diff -urNp linux-2.6.31.4/fs/nfs/file.c linux-2.6.31.4/fs/nfs/file.c
+--- linux-2.6.31.4/fs/nfs/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nfs/file.c 2009-10-11 15:29:46.373639093 -0400
+@@ -59,7 +59,7 @@ static int nfs_lock(struct file *filp, i
static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl);
static int nfs_setlease(struct file *file, long arg, struct file_lock **fl);
@@ -23686,7 +25662,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/file.c linux-2.6.30.8/fs/nfs/file.c
const struct file_operations nfs_file_operations = {
.llseek = nfs_file_llseek,
-@@ -523,7 +523,7 @@ out_unlock:
+@@ -526,7 +526,7 @@ out_unlock:
return VM_FAULT_SIGBUS;
}
@@ -23695,10 +25671,10 @@ diff -urNp linux-2.6.30.8/fs/nfs/file.c linux-2.6.30.8/fs/nfs/file.c
.fault = filemap_fault,
.page_mkwrite = nfs_vm_page_mkwrite,
};
-diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
---- linux-2.6.30.8/fs/nfs/nfs4proc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nfs/nfs4proc.c 2009-07-30 09:48:10.091839047 -0400
-@@ -755,7 +755,7 @@ static int _nfs4_do_open_reclaim(struct
+diff -urNp linux-2.6.31.4/fs/nfs/nfs4proc.c linux-2.6.31.4/fs/nfs/nfs4proc.c
+--- linux-2.6.31.4/fs/nfs/nfs4proc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nfs/nfs4proc.c 2009-10-11 15:29:46.388402494 -0400
+@@ -1123,7 +1123,7 @@ static int _nfs4_do_open_reclaim(struct
static int nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(state->inode);
@@ -23707,7 +25683,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = _nfs4_do_open_reclaim(ctx, state);
-@@ -797,7 +797,7 @@ static int _nfs4_open_delegation_recall(
+@@ -1165,7 +1165,7 @@ static int _nfs4_open_delegation_recall(
int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state *state, const nfs4_stateid *stateid)
{
@@ -23716,7 +25692,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
struct nfs_server *server = NFS_SERVER(state->inode);
int err;
do {
-@@ -1091,7 +1091,7 @@ static int _nfs4_open_expired(struct nfs
+@@ -1481,7 +1481,7 @@ static int _nfs4_open_expired(struct nfs
static inline int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(state->inode);
@@ -23725,7 +25701,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
-@@ -1189,7 +1189,7 @@ out_err:
+@@ -1579,7 +1579,7 @@ out_err:
static struct nfs4_state *nfs4_do_open(struct inode *dir, struct path *path, fmode_t fmode, int flags, struct iattr *sattr, struct rpc_cred *cred)
{
@@ -23734,7 +25710,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
struct nfs4_state *res;
int status;
-@@ -1280,7 +1280,7 @@ static int nfs4_do_setattr(struct inode
+@@ -1670,7 +1670,7 @@ static int nfs4_do_setattr(struct inode
struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(inode);
@@ -23743,7 +25719,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(server,
-@@ -1611,7 +1611,7 @@ static int _nfs4_server_capabilities(str
+@@ -2014,7 +2014,7 @@ static int _nfs4_server_capabilities(str
int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
{
@@ -23752,7 +25728,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(server,
-@@ -1644,7 +1644,7 @@ static int _nfs4_lookup_root(struct nfs_
+@@ -2048,7 +2048,7 @@ static int _nfs4_lookup_root(struct nfs_
static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{
@@ -23761,7 +25737,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(server,
-@@ -1733,7 +1733,7 @@ static int _nfs4_proc_getattr(struct nfs
+@@ -2137,7 +2137,7 @@ static int _nfs4_proc_getattr(struct nfs
static int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{
@@ -23770,7 +25746,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(server,
-@@ -1821,7 +1821,7 @@ static int nfs4_proc_lookupfh(struct nfs
+@@ -2225,7 +2225,7 @@ static int nfs4_proc_lookupfh(struct nfs
struct qstr *name, struct nfs_fh *fhandle,
struct nfs_fattr *fattr)
{
@@ -23779,7 +25755,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = _nfs4_proc_lookupfh(server, dirfh, name, fhandle, fattr);
-@@ -1850,7 +1850,7 @@ static int _nfs4_proc_lookup(struct inod
+@@ -2254,7 +2254,7 @@ static int _nfs4_proc_lookup(struct inod
static int nfs4_proc_lookup(struct inode *dir, struct qstr *name, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{
@@ -23788,7 +25764,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -1914,7 +1914,7 @@ static int _nfs4_proc_access(struct inod
+@@ -2318,7 +2318,7 @@ static int _nfs4_proc_access(struct inod
static int nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry)
{
@@ -23797,7 +25773,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(inode),
-@@ -1969,7 +1969,7 @@ static int _nfs4_proc_readlink(struct in
+@@ -2374,7 +2374,7 @@ static int _nfs4_proc_readlink(struct in
static int nfs4_proc_readlink(struct inode *inode, struct page *page,
unsigned int pgbase, unsigned int pglen)
{
@@ -23806,7 +25782,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(inode),
-@@ -2067,7 +2067,7 @@ static int _nfs4_proc_remove(struct inod
+@@ -2472,7 +2472,7 @@ static int _nfs4_proc_remove(struct inod
static int nfs4_proc_remove(struct inode *dir, struct qstr *name)
{
@@ -23815,7 +25791,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -2139,7 +2139,7 @@ static int _nfs4_proc_rename(struct inod
+@@ -2546,7 +2546,7 @@ static int _nfs4_proc_rename(struct inod
static int nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name,
struct inode *new_dir, struct qstr *new_name)
{
@@ -23824,7 +25800,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(old_dir),
-@@ -2186,7 +2186,7 @@ static int _nfs4_proc_link(struct inode
+@@ -2593,7 +2593,7 @@ static int _nfs4_proc_link(struct inode
static int nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
{
@@ -23833,7 +25809,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(inode),
-@@ -2277,7 +2277,7 @@ out:
+@@ -2685,7 +2685,7 @@ out:
static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
struct page *page, unsigned int len, struct iattr *sattr)
{
@@ -23842,7 +25818,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -2308,7 +2308,7 @@ out:
+@@ -2716,7 +2716,7 @@ out:
static int nfs4_proc_mkdir(struct inode *dir, struct dentry *dentry,
struct iattr *sattr)
{
@@ -23851,7 +25827,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -2357,7 +2357,7 @@ static int _nfs4_proc_readdir(struct den
+@@ -2765,7 +2765,7 @@ static int _nfs4_proc_readdir(struct den
static int nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
u64 cookie, struct page *page, unsigned int count, int plus)
{
@@ -23860,7 +25836,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dentry->d_inode),
-@@ -2405,7 +2405,7 @@ out:
+@@ -2813,7 +2813,7 @@ out:
static int nfs4_proc_mknod(struct inode *dir, struct dentry *dentry,
struct iattr *sattr, dev_t rdev)
{
@@ -23869,7 +25845,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -2434,7 +2434,7 @@ static int _nfs4_proc_statfs(struct nfs_
+@@ -2845,7 +2845,7 @@ static int _nfs4_proc_statfs(struct nfs_
static int nfs4_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsstat *fsstat)
{
@@ -23878,7 +25854,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(server,
-@@ -2462,7 +2462,7 @@ static int _nfs4_do_fsinfo(struct nfs_se
+@@ -2876,7 +2876,7 @@ static int _nfs4_do_fsinfo(struct nfs_se
static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo)
{
@@ -23887,7 +25863,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
-@@ -2505,7 +2505,7 @@ static int _nfs4_proc_pathconf(struct nf
+@@ -2922,7 +2922,7 @@ static int _nfs4_proc_pathconf(struct nf
static int nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_pathconf *pathconf)
{
@@ -23896,7 +25872,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
-@@ -2789,7 +2789,7 @@ out_free:
+@@ -3224,7 +3224,7 @@ out_free:
static ssize_t nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen)
{
@@ -23905,7 +25881,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
ssize_t ret;
do {
ret = __nfs4_get_acl_uncached(inode, buf, buflen);
-@@ -2846,7 +2846,7 @@ static int __nfs4_proc_set_acl(struct in
+@@ -3280,7 +3280,7 @@ static int __nfs4_proc_set_acl(struct in
static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen)
{
@@ -23914,7 +25890,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(inode),
-@@ -3069,7 +3069,7 @@ out:
+@@ -3545,7 +3545,7 @@ out:
int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid, int issync)
{
struct nfs_server *server = NFS_SERVER(inode);
@@ -23923,7 +25899,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
err = _nfs4_proc_delegreturn(inode, cred, stateid, issync);
-@@ -3142,7 +3142,7 @@ out:
+@@ -3618,7 +3618,7 @@ out:
static int nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{
@@ -23932,7 +25908,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
-@@ -3499,7 +3499,7 @@ static int _nfs4_do_setlk(struct nfs4_st
+@@ -3992,7 +3992,7 @@ static int _nfs4_do_setlk(struct nfs4_st
static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request)
{
struct nfs_server *server = NFS_SERVER(state->inode);
@@ -23941,7 +25917,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
-@@ -3517,7 +3517,7 @@ static int nfs4_lock_reclaim(struct nfs4
+@@ -4010,7 +4010,7 @@ static int nfs4_lock_reclaim(struct nfs4
static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request)
{
struct nfs_server *server = NFS_SERVER(state->inode);
@@ -23950,7 +25926,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
err = nfs4_set_lock_state(state, request);
-@@ -3572,7 +3572,7 @@ out:
+@@ -4065,7 +4065,7 @@ out:
static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{
@@ -23959,7 +25935,7 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
do {
-@@ -3622,7 +3622,7 @@ nfs4_proc_lock(struct file *filp, int cm
+@@ -4125,7 +4125,7 @@ nfs4_proc_lock(struct file *filp, int cm
int nfs4_lock_delegation_recall(struct nfs4_state *state, struct file_lock *fl)
{
struct nfs_server *server = NFS_SERVER(state->inode);
@@ -23968,19 +25944,10 @@ diff -urNp linux-2.6.30.8/fs/nfs/nfs4proc.c linux-2.6.30.8/fs/nfs/nfs4proc.c
int err;
err = nfs4_set_lock_state(state, fl);
-diff -urNp linux-2.6.30.8/fs/nfsd/export.c linux-2.6.30.8/fs/nfsd/export.c
---- linux-2.6.30.8/fs/nfsd/export.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nfsd/export.c 2009-07-30 09:48:10.092682326 -0400
-@@ -472,7 +472,7 @@ static int secinfo_parse(char **mesg, ch
- * probably discover the problem when someone fails to
- * authenticate.
- */
-- if (f->pseudoflavor < 0)
-+ if ((s32)f->pseudoflavor < 0)
- return -EINVAL;
- err = get_int(mesg, &f->flags);
- if (err)
-@@ -1524,7 +1524,7 @@ static int e_show(struct seq_file *m, vo
+diff -urNp linux-2.6.31.4/fs/nfsd/export.c linux-2.6.31.4/fs/nfsd/export.c
+--- linux-2.6.31.4/fs/nfsd/export.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nfsd/export.c 2009-10-11 15:29:46.400621399 -0400
+@@ -1505,7 +1505,7 @@ static int e_show(struct seq_file *m, vo
return svc_export_show(m, &svc_export_cache, cp);
}
@@ -23989,10 +25956,22 @@ diff -urNp linux-2.6.30.8/fs/nfsd/export.c linux-2.6.30.8/fs/nfsd/export.c
.start = e_start,
.next = e_next,
.stop = e_stop,
-diff -urNp linux-2.6.30.8/fs/nfsd/nfsctl.c linux-2.6.30.8/fs/nfsd/nfsctl.c
---- linux-2.6.30.8/fs/nfsd/nfsctl.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nfsd/nfsctl.c 2009-07-30 12:06:52.128724203 -0400
-@@ -175,7 +175,7 @@ static const struct file_operations expo
+diff -urNp linux-2.6.31.4/fs/nfsd/lockd.c linux-2.6.31.4/fs/nfsd/lockd.c
+--- linux-2.6.31.4/fs/nfsd/lockd.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nfsd/lockd.c 2009-10-11 15:29:56.706369233 -0400
+@@ -67,7 +67,7 @@ nlm_fclose(struct file *filp)
+ fput(filp);
+ }
+
+-static struct nlmsvc_binding nfsd_nlm_ops = {
++static const struct nlmsvc_binding nfsd_nlm_ops = {
+ .fopen = nlm_fopen, /* open file for locking */
+ .fclose = nlm_fclose, /* close file */
+ };
+diff -urNp linux-2.6.31.4/fs/nfsd/nfsctl.c linux-2.6.31.4/fs/nfsd/nfsctl.c
+--- linux-2.6.31.4/fs/nfsd/nfsctl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nfsd/nfsctl.c 2009-10-11 15:29:46.410389784 -0400
+@@ -174,7 +174,7 @@ static const struct file_operations expo
extern int nfsd_pool_stats_open(struct inode *inode, struct file *file);
@@ -24001,10 +25980,22 @@ diff -urNp linux-2.6.30.8/fs/nfsd/nfsctl.c linux-2.6.30.8/fs/nfsd/nfsctl.c
.open = nfsd_pool_stats_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.30.8/fs/nilfs2/dir.c linux-2.6.30.8/fs/nilfs2/dir.c
---- linux-2.6.30.8/fs/nilfs2/dir.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nilfs2/dir.c 2009-07-30 12:06:52.132720832 -0400
-@@ -698,7 +698,7 @@ not_empty:
+diff -urNp linux-2.6.31.4/fs/nilfs2/btnode.c linux-2.6.31.4/fs/nilfs2/btnode.c
+--- linux-2.6.31.4/fs/nilfs2/btnode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nilfs2/btnode.c 2009-10-11 15:29:46.423362967 -0400
+@@ -47,7 +47,7 @@ void nilfs_btnode_cache_init_once(struct
+ INIT_LIST_HEAD(&btnc->i_mmap_nonlinear);
+ }
+
+-static struct address_space_operations def_btnode_aops = {
++static const struct address_space_operations def_btnode_aops = {
+ .sync_page = block_sync_page,
+ };
+
+diff -urNp linux-2.6.31.4/fs/nilfs2/dir.c linux-2.6.31.4/fs/nilfs2/dir.c
+--- linux-2.6.31.4/fs/nilfs2/dir.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nilfs2/dir.c 2009-10-11 15:29:46.433846626 -0400
+@@ -697,7 +697,7 @@ not_empty:
return 0;
}
@@ -24013,9 +26004,9 @@ diff -urNp linux-2.6.30.8/fs/nilfs2/dir.c linux-2.6.30.8/fs/nilfs2/dir.c
.llseek = generic_file_llseek,
.read = generic_read_dir,
.readdir = nilfs_readdir,
-diff -urNp linux-2.6.30.8/fs/nilfs2/file.c linux-2.6.30.8/fs/nilfs2/file.c
---- linux-2.6.30.8/fs/nilfs2/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nilfs2/file.c 2009-07-30 12:07:09.623977752 -0400
+diff -urNp linux-2.6.31.4/fs/nilfs2/file.c linux-2.6.31.4/fs/nilfs2/file.c
+--- linux-2.6.31.4/fs/nilfs2/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nilfs2/file.c 2009-10-11 15:29:46.434558499 -0400
@@ -117,7 +117,7 @@ static int nilfs_page_mkwrite(struct vm_
return 0;
}
@@ -24043,22 +26034,22 @@ diff -urNp linux-2.6.30.8/fs/nilfs2/file.c linux-2.6.30.8/fs/nilfs2/file.c
.truncate = nilfs_truncate,
.setattr = nilfs_setattr,
.permission = nilfs_permission,
-diff -urNp linux-2.6.30.8/fs/nilfs2/gcinode.c linux-2.6.30.8/fs/nilfs2/gcinode.c
---- linux-2.6.30.8/fs/nilfs2/gcinode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nilfs2/gcinode.c 2009-07-30 12:07:28.369023156 -0400
+diff -urNp linux-2.6.31.4/fs/nilfs2/gcinode.c linux-2.6.31.4/fs/nilfs2/gcinode.c
+--- linux-2.6.31.4/fs/nilfs2/gcinode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nilfs2/gcinode.c 2009-10-11 15:29:46.450368609 -0400
@@ -52,7 +52,7 @@
#include "dat.h"
#include "ifile.h"
--static struct address_space_operations def_gcinode_aops = {};
-+static const struct address_space_operations def_gcinode_aops = {};
- /* XXX need def_gcinode_iops/fops? */
+-static struct address_space_operations def_gcinode_aops = {
++static const struct address_space_operations def_gcinode_aops = {
+ .sync_page = block_sync_page,
+ };
- /*
-diff -urNp linux-2.6.30.8/fs/nilfs2/inode.c linux-2.6.30.8/fs/nilfs2/inode.c
---- linux-2.6.30.8/fs/nilfs2/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nilfs2/inode.c 2009-07-30 12:07:28.374397645 -0400
-@@ -237,7 +237,7 @@ nilfs_direct_IO(int rw, struct kiocb *io
+diff -urNp linux-2.6.31.4/fs/nilfs2/inode.c linux-2.6.31.4/fs/nilfs2/inode.c
+--- linux-2.6.31.4/fs/nilfs2/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nilfs2/inode.c 2009-10-11 15:29:46.457815912 -0400
+@@ -238,7 +238,7 @@ nilfs_direct_IO(int rw, struct kiocb *io
return size;
}
@@ -24066,22 +26057,22 @@ diff -urNp linux-2.6.30.8/fs/nilfs2/inode.c linux-2.6.30.8/fs/nilfs2/inode.c
+const struct address_space_operations nilfs_aops = {
.writepage = nilfs_writepage,
.readpage = nilfs_readpage,
- /* .sync_page = nilfs_sync_page, */
-diff -urNp linux-2.6.30.8/fs/nilfs2/mdt.c linux-2.6.30.8/fs/nilfs2/mdt.c
---- linux-2.6.30.8/fs/nilfs2/mdt.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nilfs2/mdt.c 2009-07-30 12:07:28.379284534 -0400
-@@ -428,7 +428,7 @@ nilfs_mdt_write_page(struct page *page,
+ .sync_page = block_sync_page,
+diff -urNp linux-2.6.31.4/fs/nilfs2/mdt.c linux-2.6.31.4/fs/nilfs2/mdt.c
+--- linux-2.6.31.4/fs/nilfs2/mdt.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nilfs2/mdt.c 2009-10-11 15:29:46.469367503 -0400
+@@ -430,7 +430,7 @@ nilfs_mdt_write_page(struct page *page,
}
-static struct address_space_operations def_mdt_aops = {
+static const struct address_space_operations def_mdt_aops = {
.writepage = nilfs_mdt_write_page,
+ .sync_page = block_sync_page,
};
-
-diff -urNp linux-2.6.30.8/fs/nilfs2/namei.c linux-2.6.30.8/fs/nilfs2/namei.c
---- linux-2.6.30.8/fs/nilfs2/namei.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nilfs2/namei.c 2009-07-30 12:07:02.764163011 -0400
+diff -urNp linux-2.6.31.4/fs/nilfs2/namei.c linux-2.6.31.4/fs/nilfs2/namei.c
+--- linux-2.6.31.4/fs/nilfs2/namei.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nilfs2/namei.c 2009-10-11 15:29:46.470397708 -0400
@@ -448,7 +448,7 @@ out:
return err;
}
@@ -24106,10 +26097,10 @@ diff -urNp linux-2.6.30.8/fs/nilfs2/namei.c linux-2.6.30.8/fs/nilfs2/namei.c
.readlink = generic_readlink,
.follow_link = page_follow_link_light,
.put_link = page_put_link,
-diff -urNp linux-2.6.30.8/fs/nilfs2/nilfs.h linux-2.6.30.8/fs/nilfs2/nilfs.h
---- linux-2.6.30.8/fs/nilfs2/nilfs.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nilfs2/nilfs.h 2009-07-30 12:47:17.035918280 -0400
-@@ -297,13 +297,13 @@ void nilfs_clear_gcdat_inode(struct the_
+diff -urNp linux-2.6.31.4/fs/nilfs2/nilfs.h linux-2.6.31.4/fs/nilfs2/nilfs.h
+--- linux-2.6.31.4/fs/nilfs2/nilfs.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nilfs2/nilfs.h 2009-10-11 15:29:46.471364793 -0400
+@@ -294,13 +294,13 @@ void nilfs_clear_gcdat_inode(struct the_
/*
* Inodes and files operations
*/
@@ -24130,10 +26121,10 @@ diff -urNp linux-2.6.30.8/fs/nilfs2/nilfs.h linux-2.6.30.8/fs/nilfs2/nilfs.h
/*
* filesystem type
-diff -urNp linux-2.6.30.8/fs/nilfs2/super.c linux-2.6.30.8/fs/nilfs2/super.c
---- linux-2.6.30.8/fs/nilfs2/super.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nilfs2/super.c 2009-07-30 12:07:21.041339808 -0400
-@@ -520,7 +520,7 @@ static int nilfs_statfs(struct dentry *d
+diff -urNp linux-2.6.31.4/fs/nilfs2/super.c linux-2.6.31.4/fs/nilfs2/super.c
+--- linux-2.6.31.4/fs/nilfs2/super.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nilfs2/super.c 2009-10-11 15:29:46.478795604 -0400
+@@ -529,7 +529,7 @@ static int nilfs_statfs(struct dentry *d
return 0;
}
@@ -24142,10 +26133,10 @@ diff -urNp linux-2.6.30.8/fs/nilfs2/super.c linux-2.6.30.8/fs/nilfs2/super.c
.alloc_inode = nilfs_alloc_inode,
.destroy_inode = nilfs_destroy_inode,
.dirty_inode = nilfs_dirty_inode,
-diff -urNp linux-2.6.30.8/fs/nls/nls_base.c linux-2.6.30.8/fs/nls/nls_base.c
---- linux-2.6.30.8/fs/nls/nls_base.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/nls/nls_base.c 2009-07-30 09:48:10.092682326 -0400
-@@ -40,7 +40,7 @@ static const struct utf8_table utf8_tabl
+diff -urNp linux-2.6.31.4/fs/nls/nls_base.c linux-2.6.31.4/fs/nls/nls_base.c
+--- linux-2.6.31.4/fs/nls/nls_base.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/nls/nls_base.c 2009-10-11 15:29:46.502448936 -0400
+@@ -41,7 +41,7 @@ static const struct utf8_table utf8_tabl
{0xF8, 0xF0, 3*6, 0x1FFFFF, 0x10000, /* 4 byte sequence */},
{0xFC, 0xF8, 4*6, 0x3FFFFFF, 0x200000, /* 5 byte sequence */},
{0xFE, 0xFC, 5*6, 0x7FFFFFFF, 0x4000000, /* 6 byte sequence */},
@@ -24153,22 +26144,22 @@ diff -urNp linux-2.6.30.8/fs/nls/nls_base.c linux-2.6.30.8/fs/nls/nls_base.c
+ {0, 0, 0, 0, 0, /* end of table */}
};
- int
-diff -urNp linux-2.6.30.8/fs/ntfs/file.c linux-2.6.30.8/fs/ntfs/file.c
---- linux-2.6.30.8/fs/ntfs/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ntfs/file.c 2009-07-30 09:48:10.092682326 -0400
+ #define UNICODE_MAX 0x0010ffff
+diff -urNp linux-2.6.31.4/fs/ntfs/file.c linux-2.6.31.4/fs/ntfs/file.c
+--- linux-2.6.31.4/fs/ntfs/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ntfs/file.c 2009-10-11 15:29:56.561366939 -0400
@@ -2291,6 +2291,6 @@ const struct inode_operations ntfs_file_
#endif /* NTFS_RW */
};
-const struct file_operations ntfs_empty_file_ops = {};
-+const struct file_operations ntfs_empty_file_ops;
++const struct file_operations ntfs_empty_file_ops __read_only;
-const struct inode_operations ntfs_empty_inode_ops = {};
-+const struct inode_operations ntfs_empty_inode_ops;
-diff -urNp linux-2.6.30.8/fs/ocfs2/cluster/heartbeat.c linux-2.6.30.8/fs/ocfs2/cluster/heartbeat.c
---- linux-2.6.30.8/fs/ocfs2/cluster/heartbeat.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ocfs2/cluster/heartbeat.c 2009-07-30 12:06:52.144842473 -0400
++const struct inode_operations ntfs_empty_inode_ops __read_only;
+diff -urNp linux-2.6.31.4/fs/ocfs2/cluster/heartbeat.c linux-2.6.31.4/fs/ocfs2/cluster/heartbeat.c
+--- linux-2.6.31.4/fs/ocfs2/cluster/heartbeat.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ocfs2/cluster/heartbeat.c 2009-10-11 15:29:46.572499422 -0400
@@ -966,7 +966,7 @@ static ssize_t o2hb_debug_read(struct fi
}
#endif /* CONFIG_DEBUG_FS */
@@ -24178,9 +26169,9 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/cluster/heartbeat.c linux-2.6.30.8/fs/ocfs2/c
.open = o2hb_debug_open,
.release = o2hb_debug_release,
.read = o2hb_debug_read,
-diff -urNp linux-2.6.30.8/fs/ocfs2/cluster/netdebug.c linux-2.6.30.8/fs/ocfs2/cluster/netdebug.c
---- linux-2.6.30.8/fs/ocfs2/cluster/netdebug.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ocfs2/cluster/netdebug.c 2009-07-30 09:48:10.092682326 -0400
+diff -urNp linux-2.6.31.4/fs/ocfs2/cluster/netdebug.c linux-2.6.31.4/fs/ocfs2/cluster/netdebug.c
+--- linux-2.6.31.4/fs/ocfs2/cluster/netdebug.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ocfs2/cluster/netdebug.c 2009-10-11 15:29:46.735364635 -0400
@@ -163,7 +163,7 @@ static void nst_seq_stop(struct seq_file
{
}
@@ -24217,9 +26208,9 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/cluster/netdebug.c linux-2.6.30.8/fs/ocfs2/cl
.open = sc_fop_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.30.8/fs/ocfs2/dlm/dlmdebug.c linux-2.6.30.8/fs/ocfs2/dlm/dlmdebug.c
---- linux-2.6.30.8/fs/ocfs2/dlm/dlmdebug.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ocfs2/dlm/dlmdebug.c 2009-07-30 09:48:10.092682326 -0400
+diff -urNp linux-2.6.31.4/fs/ocfs2/dlm/dlmdebug.c linux-2.6.31.4/fs/ocfs2/dlm/dlmdebug.c
+--- linux-2.6.31.4/fs/ocfs2/dlm/dlmdebug.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ocfs2/dlm/dlmdebug.c 2009-10-11 15:29:46.741462797 -0400
@@ -479,7 +479,7 @@ bail:
return -ENOMEM;
}
@@ -24265,9 +26256,9 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/dlm/dlmdebug.c linux-2.6.30.8/fs/ocfs2/dlm/dl
.open = debug_state_open,
.release = debug_buffer_release,
.read = debug_buffer_read,
-diff -urNp linux-2.6.30.8/fs/ocfs2/localalloc.c linux-2.6.30.8/fs/ocfs2/localalloc.c
---- linux-2.6.30.8/fs/ocfs2/localalloc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ocfs2/localalloc.c 2009-07-30 09:48:10.094563975 -0400
+diff -urNp linux-2.6.31.4/fs/ocfs2/localalloc.c linux-2.6.31.4/fs/ocfs2/localalloc.c
+--- linux-2.6.31.4/fs/ocfs2/localalloc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ocfs2/localalloc.c 2009-10-11 15:29:46.742423150 -0400
@@ -1186,7 +1186,7 @@ static int ocfs2_local_alloc_slide_windo
goto bail;
}
@@ -24277,9 +26268,9 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/localalloc.c linux-2.6.30.8/fs/ocfs2/localall
status = 0;
bail:
-diff -urNp linux-2.6.30.8/fs/ocfs2/mmap.c linux-2.6.30.8/fs/ocfs2/mmap.c
---- linux-2.6.30.8/fs/ocfs2/mmap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ocfs2/mmap.c 2009-07-30 09:48:10.094563975 -0400
+diff -urNp linux-2.6.31.4/fs/ocfs2/mmap.c linux-2.6.31.4/fs/ocfs2/mmap.c
+--- linux-2.6.31.4/fs/ocfs2/mmap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ocfs2/mmap.c 2009-10-11 15:29:46.743393548 -0400
@@ -202,7 +202,7 @@ out:
return ret;
}
@@ -24289,10 +26280,10 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/mmap.c linux-2.6.30.8/fs/ocfs2/mmap.c
.fault = ocfs2_fault,
.page_mkwrite = ocfs2_page_mkwrite,
};
-diff -urNp linux-2.6.30.8/fs/ocfs2/ocfs2.h linux-2.6.30.8/fs/ocfs2/ocfs2.h
---- linux-2.6.30.8/fs/ocfs2/ocfs2.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ocfs2/ocfs2.h 2009-07-30 09:48:10.094563975 -0400
-@@ -168,11 +168,11 @@ enum ocfs2_vol_state
+diff -urNp linux-2.6.31.4/fs/ocfs2/ocfs2.h linux-2.6.31.4/fs/ocfs2/ocfs2.h
+--- linux-2.6.31.4/fs/ocfs2/ocfs2.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ocfs2/ocfs2.h 2009-10-11 15:29:46.746821045 -0400
+@@ -191,11 +191,11 @@ enum ocfs2_vol_state
struct ocfs2_alloc_stats
{
@@ -24309,9 +26300,9 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/ocfs2.h linux-2.6.30.8/fs/ocfs2/ocfs2.h
};
enum ocfs2_local_alloc_state
-diff -urNp linux-2.6.30.8/fs/ocfs2/suballoc.c linux-2.6.30.8/fs/ocfs2/suballoc.c
---- linux-2.6.30.8/fs/ocfs2/suballoc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ocfs2/suballoc.c 2009-07-30 09:48:10.094563975 -0400
+diff -urNp linux-2.6.31.4/fs/ocfs2/suballoc.c linux-2.6.31.4/fs/ocfs2/suballoc.c
+--- linux-2.6.31.4/fs/ocfs2/suballoc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ocfs2/suballoc.c 2009-10-11 15:29:46.761364329 -0400
@@ -620,7 +620,7 @@ static int ocfs2_reserve_suballoc_bits(s
mlog_errno(status);
goto bail;
@@ -24321,7 +26312,7 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/suballoc.c linux-2.6.30.8/fs/ocfs2/suballoc.c
/* You should never ask for this much metadata */
BUG_ON(bits_wanted >
-@@ -1641,7 +1641,7 @@ int ocfs2_claim_metadata(struct ocfs2_su
+@@ -1650,7 +1650,7 @@ int ocfs2_claim_metadata(struct ocfs2_su
mlog_errno(status);
goto bail;
}
@@ -24330,7 +26321,7 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/suballoc.c linux-2.6.30.8/fs/ocfs2/suballoc.c
*blkno_start = bg_blkno + (u64) *suballoc_bit_start;
ac->ac_bits_given += (*num_bits);
-@@ -1715,7 +1715,7 @@ int ocfs2_claim_new_inode(struct ocfs2_s
+@@ -1724,7 +1724,7 @@ int ocfs2_claim_new_inode(struct ocfs2_s
mlog_errno(status);
goto bail;
}
@@ -24339,7 +26330,7 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/suballoc.c linux-2.6.30.8/fs/ocfs2/suballoc.c
BUG_ON(num_bits != 1);
-@@ -1817,7 +1817,7 @@ int __ocfs2_claim_clusters(struct ocfs2_
+@@ -1826,7 +1826,7 @@ int __ocfs2_claim_clusters(struct ocfs2_
cluster_start,
num_clusters);
if (!status)
@@ -24348,7 +26339,7 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/suballoc.c linux-2.6.30.8/fs/ocfs2/suballoc.c
} else {
if (min_clusters > (osb->bitmap_cpg - 1)) {
/* The only paths asking for contiguousness
-@@ -1845,7 +1845,7 @@ int __ocfs2_claim_clusters(struct ocfs2_
+@@ -1854,7 +1854,7 @@ int __ocfs2_claim_clusters(struct ocfs2_
ocfs2_desc_bitmap_to_cluster_off(ac->ac_inode,
bg_blkno,
bg_bit_off);
@@ -24357,10 +26348,27 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/suballoc.c linux-2.6.30.8/fs/ocfs2/suballoc.c
}
}
if (status < 0) {
-diff -urNp linux-2.6.30.8/fs/ocfs2/super.c linux-2.6.30.8/fs/ocfs2/super.c
---- linux-2.6.30.8/fs/ocfs2/super.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ocfs2/super.c 2009-07-30 12:06:52.187885986 -0400
-@@ -362,7 +362,7 @@ static ssize_t ocfs2_debug_read(struct f
+diff -urNp linux-2.6.31.4/fs/ocfs2/super.c linux-2.6.31.4/fs/ocfs2/super.c
+--- linux-2.6.31.4/fs/ocfs2/super.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ocfs2/super.c 2009-10-11 15:29:46.780422864 -0400
+@@ -284,11 +284,11 @@ static int ocfs2_osb_dump(struct ocfs2_s
+ "%10s => GlobalAllocs: %d LocalAllocs: %d "
+ "SubAllocs: %d LAWinMoves: %d SAExtends: %d\n",
+ "Stats",
+- atomic_read(&osb->alloc_stats.bitmap_data),
+- atomic_read(&osb->alloc_stats.local_data),
+- atomic_read(&osb->alloc_stats.bg_allocs),
+- atomic_read(&osb->alloc_stats.moves),
+- atomic_read(&osb->alloc_stats.bg_extends));
++ atomic_read_unchecked(&osb->alloc_stats.bitmap_data),
++ atomic_read_unchecked(&osb->alloc_stats.local_data),
++ atomic_read_unchecked(&osb->alloc_stats.bg_allocs),
++ atomic_read_unchecked(&osb->alloc_stats.moves),
++ atomic_read_unchecked(&osb->alloc_stats.bg_extends));
+
+ out += snprintf(buf + out, len - out,
+ "%10s => State: %u Descriptor: %llu Size: %u bits "
+@@ -373,7 +373,7 @@ static ssize_t ocfs2_debug_read(struct f
}
#endif /* CONFIG_DEBUG_FS */
@@ -24369,9 +26377,26 @@ diff -urNp linux-2.6.30.8/fs/ocfs2/super.c linux-2.6.30.8/fs/ocfs2/super.c
.open = ocfs2_osb_debug_open,
.release = ocfs2_debug_release,
.read = ocfs2_debug_read,
-diff -urNp linux-2.6.30.8/fs/omfs/dir.c linux-2.6.30.8/fs/omfs/dir.c
---- linux-2.6.30.8/fs/omfs/dir.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/omfs/dir.c 2009-07-30 09:48:10.094563975 -0400
+@@ -1991,11 +1991,11 @@ static int ocfs2_initialize_super(struct
+ spin_lock_init(&osb->osb_xattr_lock);
+ ocfs2_init_inode_steal_slot(osb);
+
+- atomic_set(&osb->alloc_stats.moves, 0);
+- atomic_set(&osb->alloc_stats.local_data, 0);
+- atomic_set(&osb->alloc_stats.bitmap_data, 0);
+- atomic_set(&osb->alloc_stats.bg_allocs, 0);
+- atomic_set(&osb->alloc_stats.bg_extends, 0);
++ atomic_set_unchecked(&osb->alloc_stats.moves, 0);
++ atomic_set_unchecked(&osb->alloc_stats.local_data, 0);
++ atomic_set_unchecked(&osb->alloc_stats.bitmap_data, 0);
++ atomic_set_unchecked(&osb->alloc_stats.bg_allocs, 0);
++ atomic_set_unchecked(&osb->alloc_stats.bg_extends, 0);
+
+ /* Copy the blockcheck stats from the superblock probe */
+ osb->osb_ecc_stats = *stats;
+diff -urNp linux-2.6.31.4/fs/omfs/dir.c linux-2.6.31.4/fs/omfs/dir.c
+--- linux-2.6.31.4/fs/omfs/dir.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/omfs/dir.c 2009-10-11 15:29:46.789595505 -0400
@@ -489,7 +489,7 @@ out:
return ret;
}
@@ -24390,10 +26415,10 @@ diff -urNp linux-2.6.30.8/fs/omfs/dir.c linux-2.6.30.8/fs/omfs/dir.c
.read = generic_read_dir,
.readdir = omfs_readdir,
.llseek = generic_file_llseek,
-diff -urNp linux-2.6.30.8/fs/omfs/file.c linux-2.6.30.8/fs/omfs/file.c
---- linux-2.6.30.8/fs/omfs/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/omfs/file.c 2009-07-30 09:48:10.094563975 -0400
-@@ -337,7 +337,7 @@ static sector_t omfs_bmap(struct address
+diff -urNp linux-2.6.31.4/fs/omfs/file.c linux-2.6.31.4/fs/omfs/file.c
+--- linux-2.6.31.4/fs/omfs/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/omfs/file.c 2009-10-11 15:29:46.790755470 -0400
+@@ -322,7 +322,7 @@ static sector_t omfs_bmap(struct address
return generic_block_bmap(mapping, block, omfs_get_block);
}
@@ -24402,7 +26427,7 @@ diff -urNp linux-2.6.30.8/fs/omfs/file.c linux-2.6.30.8/fs/omfs/file.c
.llseek = generic_file_llseek,
.read = do_sync_read,
.write = do_sync_write,
-@@ -348,11 +348,11 @@ struct file_operations omfs_file_operati
+@@ -333,11 +333,11 @@ struct file_operations omfs_file_operati
.splice_read = generic_file_splice_read,
};
@@ -24416,9 +26441,9 @@ diff -urNp linux-2.6.30.8/fs/omfs/file.c linux-2.6.30.8/fs/omfs/file.c
.readpage = omfs_readpage,
.readpages = omfs_readpages,
.writepage = omfs_writepage,
-diff -urNp linux-2.6.30.8/fs/omfs/inode.c linux-2.6.30.8/fs/omfs/inode.c
---- linux-2.6.30.8/fs/omfs/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/omfs/inode.c 2009-07-30 09:48:10.096509014 -0400
+diff -urNp linux-2.6.31.4/fs/omfs/inode.c linux-2.6.31.4/fs/omfs/inode.c
+--- linux-2.6.31.4/fs/omfs/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/omfs/inode.c 2009-10-11 15:29:46.792134006 -0400
@@ -278,7 +278,7 @@ static int omfs_statfs(struct dentry *de
return 0;
}
@@ -24428,9 +26453,9 @@ diff -urNp linux-2.6.30.8/fs/omfs/inode.c linux-2.6.30.8/fs/omfs/inode.c
.write_inode = omfs_write_inode,
.delete_inode = omfs_delete_inode,
.put_super = omfs_put_super,
-diff -urNp linux-2.6.30.8/fs/omfs/omfs.h linux-2.6.30.8/fs/omfs/omfs.h
---- linux-2.6.30.8/fs/omfs/omfs.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/omfs/omfs.h 2009-07-30 09:48:10.096509014 -0400
+diff -urNp linux-2.6.31.4/fs/omfs/omfs.h linux-2.6.31.4/fs/omfs/omfs.h
+--- linux-2.6.31.4/fs/omfs/omfs.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/omfs/omfs.h 2009-10-11 15:29:46.792134006 -0400
@@ -44,16 +44,16 @@ extern int omfs_allocate_range(struct su
extern int omfs_clear_range(struct super_block *sb, u64 block, int count);
@@ -24453,9 +26478,9 @@ diff -urNp linux-2.6.30.8/fs/omfs/omfs.h linux-2.6.30.8/fs/omfs/omfs.h
extern void omfs_make_empty_table(struct buffer_head *bh, int offset);
extern int omfs_shrink_inode(struct inode *inode);
-diff -urNp linux-2.6.30.8/fs/open.c linux-2.6.30.8/fs/open.c
---- linux-2.6.30.8/fs/open.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/open.c 2009-07-30 11:10:49.258897345 -0400
+diff -urNp linux-2.6.31.4/fs/open.c linux-2.6.31.4/fs/open.c
+--- linux-2.6.31.4/fs/open.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/open.c 2009-10-11 15:29:46.806390834 -0400
@@ -206,6 +206,9 @@ int do_truncate(struct dentry *dentry, l
if (length < 0)
return -EINVAL;
@@ -24519,7 +26544,7 @@ diff -urNp linux-2.6.30.8/fs/open.c linux-2.6.30.8/fs/open.c
dput_and_out:
path_put(&path);
@@ -615,13 +641,28 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd
- err = mnt_want_write(file->f_path.mnt);
+ err = mnt_want_write_file(file);
if (err)
goto out_putf;
+
@@ -24629,10 +26654,10 @@ diff -urNp linux-2.6.30.8/fs/open.c linux-2.6.30.8/fs/open.c
mnt_drop_write(file->f_path.mnt);
out_fput:
fput(file);
-diff -urNp linux-2.6.30.8/fs/pipe.c linux-2.6.30.8/fs/pipe.c
---- linux-2.6.30.8/fs/pipe.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/pipe.c 2009-07-30 11:10:49.268433019 -0400
-@@ -872,7 +872,7 @@ void free_pipe_info(struct inode *inode)
+diff -urNp linux-2.6.31.4/fs/pipe.c linux-2.6.31.4/fs/pipe.c
+--- linux-2.6.31.4/fs/pipe.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/pipe.c 2009-10-11 15:29:46.817447071 -0400
+@@ -886,7 +886,7 @@ void free_pipe_info(struct inode *inode)
inode->i_pipe = NULL;
}
@@ -24641,9 +26666,9 @@ diff -urNp linux-2.6.30.8/fs/pipe.c linux-2.6.30.8/fs/pipe.c
static int pipefs_delete_dentry(struct dentry *dentry)
{
/*
-diff -urNp linux-2.6.30.8/fs/proc/array.c linux-2.6.30.8/fs/proc/array.c
---- linux-2.6.30.8/fs/proc/array.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/array.c 2009-07-30 11:10:49.279288424 -0400
+diff -urNp linux-2.6.31.4/fs/proc/array.c linux-2.6.31.4/fs/proc/array.c
+--- linux-2.6.31.4/fs/proc/array.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/array.c 2009-10-11 15:29:46.828369273 -0400
@@ -321,6 +321,21 @@ static inline void task_context_switch_c
p->nivcsw);
}
@@ -24734,9 +26759,9 @@ diff -urNp linux-2.6.30.8/fs/proc/array.c linux-2.6.30.8/fs/proc/array.c
+ return sprintf(buffer, "%u.%u.%u.%u\n", NIPQUAD(task->signal->curr_ip));
+}
+#endif
-diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
---- linux-2.6.30.8/fs/proc/base.c 2009-08-24 20:46:57.008561390 -0400
-+++ linux-2.6.30.8/fs/proc/base.c 2009-08-24 20:48:46.006698448 -0400
+diff -urNp linux-2.6.31.4/fs/proc/base.c linux-2.6.31.4/fs/proc/base.c
+--- linux-2.6.31.4/fs/proc/base.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/base.c 2009-10-11 15:29:46.841367255 -0400
@@ -213,6 +213,9 @@ static int check_mem_permission(struct t
if (task == current)
return 0;
@@ -24946,7 +26971,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
ret = 0;
i = filp->f_pos;
switch (i) {
-@@ -2395,6 +2473,9 @@ static struct dentry *proc_base_lookup(s
+@@ -2401,6 +2479,9 @@ static struct dentry *proc_base_lookup(s
if (p > last)
goto out;
@@ -24956,7 +26981,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
error = proc_base_instantiate(dir, dentry, task, p);
out:
-@@ -2481,7 +2562,7 @@ static const struct pid_entry tgid_base_
+@@ -2487,7 +2568,7 @@ static const struct pid_entry tgid_base_
#ifdef CONFIG_SCHED_DEBUG
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
@@ -24965,7 +26990,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
INF("syscall", S_IRUSR, proc_pid_syscall),
#endif
INF("cmdline", S_IRUGO, proc_pid_cmdline),
-@@ -2509,7 +2590,7 @@ static const struct pid_entry tgid_base_
+@@ -2515,7 +2596,7 @@ static const struct pid_entry tgid_base_
#ifdef CONFIG_KALLSYMS
INF("wchan", S_IRUGO, proc_pid_wchan),
#endif
@@ -24974,7 +26999,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
ONE("stack", S_IRUSR, proc_pid_stack),
#endif
#ifdef CONFIG_SCHEDSTATS
-@@ -2539,6 +2620,9 @@ static const struct pid_entry tgid_base_
+@@ -2545,6 +2626,9 @@ static const struct pid_entry tgid_base_
#ifdef CONFIG_TASK_IO_ACCOUNTING
INF("io", S_IRUGO, proc_tgid_io_accounting),
#endif
@@ -24984,7 +27009,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
};
static int proc_tgid_base_readdir(struct file * filp,
-@@ -2668,7 +2752,14 @@ static struct dentry *proc_pid_instantia
+@@ -2674,7 +2758,14 @@ static struct dentry *proc_pid_instantia
if (!inode)
goto out;
@@ -24999,7 +27024,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
inode->i_op = &proc_tgid_base_inode_operations;
inode->i_fop = &proc_tgid_base_operations;
inode->i_flags|=S_IMMUTABLE;
-@@ -2710,7 +2801,11 @@ struct dentry *proc_pid_lookup(struct in
+@@ -2716,7 +2807,11 @@ struct dentry *proc_pid_lookup(struct in
if (!task)
goto out;
@@ -25011,7 +27036,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
put_task_struct(task);
out:
return result;
-@@ -2775,6 +2870,10 @@ int proc_pid_readdir(struct file * filp,
+@@ -2781,6 +2876,10 @@ int proc_pid_readdir(struct file * filp,
{
unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY;
struct task_struct *reaper = get_proc_task(filp->f_path.dentry->d_inode);
@@ -25022,7 +27047,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
struct tgid_iter iter;
struct pid_namespace *ns;
-@@ -2793,6 +2892,20 @@ int proc_pid_readdir(struct file * filp,
+@@ -2799,6 +2898,20 @@ int proc_pid_readdir(struct file * filp,
for (iter = next_tgid(ns, iter);
iter.task;
iter.tgid += 1, iter = next_tgid(ns, iter)) {
@@ -25043,7 +27068,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
filp->f_pos = iter.tgid + TGID_OFFSET;
if (proc_pid_fill_cache(filp, dirent, filldir, iter) < 0) {
put_task_struct(iter.task);
-@@ -2820,7 +2933,7 @@ static const struct pid_entry tid_base_s
+@@ -2826,7 +2939,7 @@ static const struct pid_entry tid_base_s
#ifdef CONFIG_SCHED_DEBUG
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
@@ -25052,7 +27077,7 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
INF("syscall", S_IRUSR, proc_pid_syscall),
#endif
INF("cmdline", S_IRUGO, proc_pid_cmdline),
-@@ -2847,7 +2960,7 @@ static const struct pid_entry tid_base_s
+@@ -2853,7 +2966,7 @@ static const struct pid_entry tid_base_s
#ifdef CONFIG_KALLSYMS
INF("wchan", S_IRUGO, proc_pid_wchan),
#endif
@@ -25061,9 +27086,9 @@ diff -urNp linux-2.6.30.8/fs/proc/base.c linux-2.6.30.8/fs/proc/base.c
ONE("stack", S_IRUSR, proc_pid_stack),
#endif
#ifdef CONFIG_SCHEDSTATS
-diff -urNp linux-2.6.30.8/fs/proc/cmdline.c linux-2.6.30.8/fs/proc/cmdline.c
---- linux-2.6.30.8/fs/proc/cmdline.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/cmdline.c 2009-07-30 11:10:49.303499047 -0400
+diff -urNp linux-2.6.31.4/fs/proc/cmdline.c linux-2.6.31.4/fs/proc/cmdline.c
+--- linux-2.6.31.4/fs/proc/cmdline.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/cmdline.c 2009-10-11 15:29:46.842364196 -0400
@@ -23,7 +23,11 @@ static const struct file_operations cmdl
static int __init proc_cmdline_init(void)
@@ -25076,9 +27101,9 @@ diff -urNp linux-2.6.30.8/fs/proc/cmdline.c linux-2.6.30.8/fs/proc/cmdline.c
return 0;
}
module_init(proc_cmdline_init);
-diff -urNp linux-2.6.30.8/fs/proc/devices.c linux-2.6.30.8/fs/proc/devices.c
---- linux-2.6.30.8/fs/proc/devices.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/devices.c 2009-07-30 11:10:49.304300221 -0400
+diff -urNp linux-2.6.31.4/fs/proc/devices.c linux-2.6.31.4/fs/proc/devices.c
+--- linux-2.6.31.4/fs/proc/devices.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/devices.c 2009-10-11 15:29:46.843365305 -0400
@@ -64,7 +64,11 @@ static const struct file_operations proc
static int __init proc_devices_init(void)
@@ -25091,9 +27116,9 @@ diff -urNp linux-2.6.30.8/fs/proc/devices.c linux-2.6.30.8/fs/proc/devices.c
return 0;
}
module_init(proc_devices_init);
-diff -urNp linux-2.6.30.8/fs/proc/inode.c linux-2.6.30.8/fs/proc/inode.c
---- linux-2.6.30.8/fs/proc/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/inode.c 2009-07-30 11:10:49.304300221 -0400
+diff -urNp linux-2.6.31.4/fs/proc/inode.c linux-2.6.31.4/fs/proc/inode.c
+--- linux-2.6.31.4/fs/proc/inode.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/inode.c 2009-10-11 15:29:46.844357952 -0400
@@ -457,7 +457,11 @@ struct inode *proc_get_inode(struct supe
if (de->mode) {
inode->i_mode = de->mode;
@@ -25106,9 +27131,9 @@ diff -urNp linux-2.6.30.8/fs/proc/inode.c linux-2.6.30.8/fs/proc/inode.c
}
if (de->size)
inode->i_size = de->size;
-diff -urNp linux-2.6.30.8/fs/proc/internal.h linux-2.6.30.8/fs/proc/internal.h
---- linux-2.6.30.8/fs/proc/internal.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/internal.h 2009-07-30 11:10:49.305386482 -0400
+diff -urNp linux-2.6.31.4/fs/proc/internal.h linux-2.6.31.4/fs/proc/internal.h
+--- linux-2.6.31.4/fs/proc/internal.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/internal.h 2009-10-11 15:29:46.844357952 -0400
@@ -51,6 +51,9 @@ extern int proc_pid_status(struct seq_fi
struct pid *pid, struct task_struct *task);
extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
@@ -25119,9 +27144,9 @@ diff -urNp linux-2.6.30.8/fs/proc/internal.h linux-2.6.30.8/fs/proc/internal.h
extern loff_t mem_lseek(struct file *file, loff_t offset, int orig);
extern const struct file_operations proc_maps_operations;
-diff -urNp linux-2.6.30.8/fs/proc/Kconfig linux-2.6.30.8/fs/proc/Kconfig
---- linux-2.6.30.8/fs/proc/Kconfig 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/Kconfig 2009-07-30 11:10:49.305386482 -0400
+diff -urNp linux-2.6.31.4/fs/proc/Kconfig linux-2.6.31.4/fs/proc/Kconfig
+--- linux-2.6.31.4/fs/proc/Kconfig 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/Kconfig 2009-10-11 15:29:46.845374772 -0400
@@ -30,12 +30,12 @@ config PROC_FS
config PROC_KCORE
@@ -25149,10 +27174,10 @@ diff -urNp linux-2.6.30.8/fs/proc/Kconfig linux-2.6.30.8/fs/proc/Kconfig
bool "Enable /proc page monitoring" if EMBEDDED
help
Various /proc files exist to monitor process memory utilization:
-diff -urNp linux-2.6.30.8/fs/proc/kcore.c linux-2.6.30.8/fs/proc/kcore.c
---- linux-2.6.30.8/fs/proc/kcore.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/kcore.c 2009-08-25 20:03:45.984691508 -0400
-@@ -404,10 +404,12 @@ read_kcore(struct file *file, char __use
+diff -urNp linux-2.6.31.4/fs/proc/kcore.c linux-2.6.31.4/fs/proc/kcore.c
+--- linux-2.6.31.4/fs/proc/kcore.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/kcore.c 2009-10-11 15:29:46.845374772 -0400
+@@ -410,10 +410,12 @@ read_kcore(struct file *file, char __use
static int __init proc_kcore_init(void)
{
@@ -25165,9 +27190,9 @@ diff -urNp linux-2.6.30.8/fs/proc/kcore.c linux-2.6.30.8/fs/proc/kcore.c
return 0;
}
module_init(proc_kcore_init);
-diff -urNp linux-2.6.30.8/fs/proc/nommu.c linux-2.6.30.8/fs/proc/nommu.c
---- linux-2.6.30.8/fs/proc/nommu.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/nommu.c 2009-07-30 09:48:10.096509014 -0400
+diff -urNp linux-2.6.31.4/fs/proc/nommu.c linux-2.6.31.4/fs/proc/nommu.c
+--- linux-2.6.31.4/fs/proc/nommu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/nommu.c 2009-10-11 15:29:46.846364828 -0400
@@ -67,7 +67,7 @@ static int nommu_region_show(struct seq_
if (len < 1)
len = 1;
@@ -25186,9 +27211,9 @@ diff -urNp linux-2.6.30.8/fs/proc/nommu.c linux-2.6.30.8/fs/proc/nommu.c
.start = nommu_region_list_start,
.next = nommu_region_list_next,
.stop = nommu_region_list_stop,
-diff -urNp linux-2.6.30.8/fs/proc/proc_net.c linux-2.6.30.8/fs/proc/proc_net.c
---- linux-2.6.30.8/fs/proc/proc_net.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/proc_net.c 2009-07-30 11:10:49.306366172 -0400
+diff -urNp linux-2.6.31.4/fs/proc/proc_net.c linux-2.6.31.4/fs/proc/proc_net.c
+--- linux-2.6.31.4/fs/proc/proc_net.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/proc_net.c 2009-10-11 15:29:46.860595458 -0400
@@ -104,6 +104,17 @@ static struct net *get_proc_task_net(str
struct task_struct *task;
struct nsproxy *ns;
@@ -25207,9 +27232,9 @@ diff -urNp linux-2.6.30.8/fs/proc/proc_net.c linux-2.6.30.8/fs/proc/proc_net.c
rcu_read_lock();
task = pid_task(proc_pid(dir), PIDTYPE_PID);
-diff -urNp linux-2.6.30.8/fs/proc/proc_sysctl.c linux-2.6.30.8/fs/proc/proc_sysctl.c
---- linux-2.6.30.8/fs/proc/proc_sysctl.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/proc_sysctl.c 2009-07-30 11:10:49.307381327 -0400
+diff -urNp linux-2.6.31.4/fs/proc/proc_sysctl.c linux-2.6.31.4/fs/proc/proc_sysctl.c
+--- linux-2.6.31.4/fs/proc/proc_sysctl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/proc_sysctl.c 2009-10-11 15:29:46.861570763 -0400
@@ -7,6 +7,8 @@
#include <linux/security.h>
#include "internal.h"
@@ -25249,22 +27274,10 @@ diff -urNp linux-2.6.30.8/fs/proc/proc_sysctl.c linux-2.6.30.8/fs/proc/proc_sysc
generic_fillattr(inode, stat);
if (table)
stat->mode = (stat->mode & S_IFMT) | table->mode;
-diff -urNp linux-2.6.30.8/fs/proc/root.c linux-2.6.30.8/fs/proc/root.c
---- linux-2.6.30.8/fs/proc/root.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/proc/root.c 2009-07-30 11:10:49.307381327 -0400
-@@ -101,6 +101,11 @@ static struct file_system_type proc_fs_t
- .kill_sb = proc_kill_sb,
- };
-
-+#ifdef CONFIG_GRKERNSEC_HIDESYM
-+static const struct file_operations __kallsyms_operations = {
-+};
-+#endif
-+
- void __init proc_root_init(void)
- {
- int err;
-@@ -134,8 +139,21 @@ void __init proc_root_init(void)
+diff -urNp linux-2.6.31.4/fs/proc/root.c linux-2.6.31.4/fs/proc/root.c
+--- linux-2.6.31.4/fs/proc/root.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/root.c 2009-10-11 15:29:46.862452434 -0400
+@@ -134,7 +134,15 @@ void __init proc_root_init(void)
#ifdef CONFIG_PROC_DEVICETREE
proc_device_tree_init();
#endif
@@ -25278,17 +27291,11 @@ diff -urNp linux-2.6.30.8/fs/proc/root.c linux-2.6.30.8/fs/proc/root.c
proc_mkdir("bus", NULL);
+#endif
proc_sys_init();
-+
-+#ifdef CONFIG_GRKERNSEC_HIDESYM
-+ /* fake kallsyms to workaround klogd bug */
-+ proc_create("kallsyms", 0444, NULL, &__kallsyms_operations);
-+#endif
}
- static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat
-diff -urNp linux-2.6.30.8/fs/proc/task_mmu.c linux-2.6.30.8/fs/proc/task_mmu.c
---- linux-2.6.30.8/fs/proc/task_mmu.c 2009-08-24 20:46:57.018882382 -0400
-+++ linux-2.6.30.8/fs/proc/task_mmu.c 2009-08-24 20:48:46.006698448 -0400
+diff -urNp linux-2.6.31.4/fs/proc/task_mmu.c linux-2.6.31.4/fs/proc/task_mmu.c
+--- linux-2.6.31.4/fs/proc/task_mmu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/task_mmu.c 2009-10-11 15:29:46.862452434 -0400
@@ -46,15 +46,26 @@ void task_mem(struct seq_file *m, struct
"VmStk:\t%8lu kB\n"
"VmExe:\t%8lu kB\n"
@@ -25409,9 +27416,9 @@ diff -urNp linux-2.6.30.8/fs/proc/task_mmu.c linux-2.6.30.8/fs/proc/task_mmu.c
mss.resident >> 10,
(unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
mss.shared_clean >> 10,
-diff -urNp linux-2.6.30.8/fs/proc/task_nommu.c linux-2.6.30.8/fs/proc/task_nommu.c
---- linux-2.6.30.8/fs/proc/task_nommu.c 2009-08-24 20:46:57.020114978 -0400
-+++ linux-2.6.30.8/fs/proc/task_nommu.c 2009-08-24 20:48:46.007735331 -0400
+diff -urNp linux-2.6.31.4/fs/proc/task_nommu.c linux-2.6.31.4/fs/proc/task_nommu.c
+--- linux-2.6.31.4/fs/proc/task_nommu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/proc/task_nommu.c 2009-10-11 15:29:46.863521624 -0400
@@ -50,7 +50,7 @@ void task_mem(struct seq_file *m, struct
else
bytes += kobjsize(mm);
@@ -25430,9 +27437,9 @@ diff -urNp linux-2.6.30.8/fs/proc/task_nommu.c linux-2.6.30.8/fs/proc/task_nommu
}
seq_putc(m, '\n');
-diff -urNp linux-2.6.30.8/fs/readdir.c linux-2.6.30.8/fs/readdir.c
---- linux-2.6.30.8/fs/readdir.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/readdir.c 2009-07-30 11:10:49.318449083 -0400
+diff -urNp linux-2.6.31.4/fs/readdir.c linux-2.6.31.4/fs/readdir.c
+--- linux-2.6.31.4/fs/readdir.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/readdir.c 2009-10-11 15:29:46.877369354 -0400
@@ -16,6 +16,7 @@
#include <linux/security.h>
#include <linux/syscalls.h>
@@ -25522,10 +27529,10 @@ diff -urNp linux-2.6.30.8/fs/readdir.c linux-2.6.30.8/fs/readdir.c
buf.count = count;
buf.error = 0;
-diff -urNp linux-2.6.30.8/fs/reiserfs/do_balan.c linux-2.6.30.8/fs/reiserfs/do_balan.c
---- linux-2.6.30.8/fs/reiserfs/do_balan.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/reiserfs/do_balan.c 2009-07-30 09:48:10.096509014 -0400
-@@ -2059,7 +2059,7 @@ void do_balance(struct tree_balance *tb,
+diff -urNp linux-2.6.31.4/fs/reiserfs/do_balan.c linux-2.6.31.4/fs/reiserfs/do_balan.c
+--- linux-2.6.31.4/fs/reiserfs/do_balan.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/reiserfs/do_balan.c 2009-10-11 15:29:46.971431008 -0400
+@@ -2058,7 +2058,7 @@ void do_balance(struct tree_balance *tb,
return;
}
@@ -25534,9 +27541,21 @@ diff -urNp linux-2.6.30.8/fs/reiserfs/do_balan.c linux-2.6.30.8/fs/reiserfs/do_b
do_balance_starts(tb);
/* balance leaf returns 0 except if combining L R and S into
-diff -urNp linux-2.6.30.8/fs/romfs/super.c linux-2.6.30.8/fs/romfs/super.c
---- linux-2.6.30.8/fs/romfs/super.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/romfs/super.c 2009-07-30 12:07:02.769214712 -0400
+diff -urNp linux-2.6.31.4/fs/reiserfs/procfs.c linux-2.6.31.4/fs/reiserfs/procfs.c
+--- linux-2.6.31.4/fs/reiserfs/procfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/reiserfs/procfs.c 2009-10-11 15:29:46.977743773 -0400
+@@ -123,7 +123,7 @@ static int show_super(struct seq_file *m
+ "SMALL_TAILS " : "NO_TAILS ",
+ replay_only(sb) ? "REPLAY_ONLY " : "",
+ convert_reiserfs(sb) ? "CONV " : "",
+- atomic_read(&r->s_generation_counter),
++ atomic_read_unchecked(&r->s_generation_counter),
+ SF(s_disk_reads), SF(s_disk_writes), SF(s_fix_nodes),
+ SF(s_do_balance), SF(s_unneeded_left_neighbor),
+ SF(s_good_search_by_key_reada), SF(s_bmaps),
+diff -urNp linux-2.6.31.4/fs/romfs/super.c linux-2.6.31.4/fs/romfs/super.c
+--- linux-2.6.31.4/fs/romfs/super.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/romfs/super.c 2009-10-11 15:29:46.985687995 -0400
@@ -284,7 +284,7 @@ static const struct file_operations romf
.readdir = romfs_readdir,
};
@@ -25546,9 +27565,9 @@ diff -urNp linux-2.6.30.8/fs/romfs/super.c linux-2.6.30.8/fs/romfs/super.c
.lookup = romfs_lookup,
};
-diff -urNp linux-2.6.30.8/fs/select.c linux-2.6.30.8/fs/select.c
---- linux-2.6.30.8/fs/select.c 2009-09-09 17:37:33.653117849 -0400
-+++ linux-2.6.30.8/fs/select.c 2009-09-09 17:37:58.095969463 -0400
+diff -urNp linux-2.6.31.4/fs/select.c linux-2.6.31.4/fs/select.c
+--- linux-2.6.31.4/fs/select.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/select.c 2009-10-11 15:29:46.996819755 -0400
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/slab.h>
@@ -25557,7 +27576,7 @@ diff -urNp linux-2.6.30.8/fs/select.c linux-2.6.30.8/fs/select.c
#include <linux/personality.h> /* for STICKY_TIMEOUTS */
#include <linux/file.h>
#include <linux/fdtable.h>
-@@ -782,6 +783,7 @@ int do_sys_poll(struct pollfd __user *uf
+@@ -814,6 +815,7 @@ int do_sys_poll(struct pollfd __user *uf
struct poll_list *walk = head;
unsigned long todo = nfds;
@@ -25565,9 +27584,9 @@ diff -urNp linux-2.6.30.8/fs/select.c linux-2.6.30.8/fs/select.c
if (nfds > current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
return -EINVAL;
-diff -urNp linux-2.6.30.8/fs/seq_file.c linux-2.6.30.8/fs/seq_file.c
---- linux-2.6.30.8/fs/seq_file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/seq_file.c 2009-07-30 11:10:49.336155631 -0400
+diff -urNp linux-2.6.31.4/fs/seq_file.c linux-2.6.31.4/fs/seq_file.c
+--- linux-2.6.31.4/fs/seq_file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/seq_file.c 2009-10-11 15:29:47.009364999 -0400
@@ -76,7 +76,8 @@ static int traverse(struct seq_file *m,
return 0;
}
@@ -25608,9 +27627,9 @@ diff -urNp linux-2.6.30.8/fs/seq_file.c linux-2.6.30.8/fs/seq_file.c
if (!m->buf)
goto Enomem;
m->count = 0;
-diff -urNp linux-2.6.30.8/fs/smbfs/symlink.c linux-2.6.30.8/fs/smbfs/symlink.c
---- linux-2.6.30.8/fs/smbfs/symlink.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/smbfs/symlink.c 2009-07-30 09:48:10.098443569 -0400
+diff -urNp linux-2.6.31.4/fs/smbfs/symlink.c linux-2.6.31.4/fs/smbfs/symlink.c
+--- linux-2.6.31.4/fs/smbfs/symlink.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/smbfs/symlink.c 2009-10-11 15:29:47.016374484 -0400
@@ -55,7 +55,7 @@ static void *smb_follow_link(struct dent
static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
@@ -25620,10 +27639,10 @@ diff -urNp linux-2.6.30.8/fs/smbfs/symlink.c linux-2.6.30.8/fs/smbfs/symlink.c
if (!IS_ERR(s))
__putname(s);
}
-diff -urNp linux-2.6.30.8/fs/squashfs/super.c linux-2.6.30.8/fs/squashfs/super.c
---- linux-2.6.30.8/fs/squashfs/super.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/squashfs/super.c 2009-07-30 09:48:10.098443569 -0400
-@@ -43,7 +43,7 @@
+diff -urNp linux-2.6.31.4/fs/squashfs/super.c linux-2.6.31.4/fs/squashfs/super.c
+--- linux-2.6.31.4/fs/squashfs/super.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/squashfs/super.c 2009-10-11 15:29:47.021720727 -0400
+@@ -44,7 +44,7 @@
#include "squashfs.h"
static struct file_system_type squashfs_fs_type;
@@ -25632,7 +27651,7 @@ diff -urNp linux-2.6.30.8/fs/squashfs/super.c linux-2.6.30.8/fs/squashfs/super.c
static int supported_squashfs_filesystem(short major, short minor, short comp)
{
-@@ -439,7 +439,7 @@ static struct file_system_type squashfs_
+@@ -444,7 +444,7 @@ static struct file_system_type squashfs_
.fs_flags = FS_REQUIRES_DEV
};
@@ -25641,9 +27660,9 @@ diff -urNp linux-2.6.30.8/fs/squashfs/super.c linux-2.6.30.8/fs/squashfs/super.c
.alloc_inode = squashfs_alloc_inode,
.destroy_inode = squashfs_destroy_inode,
.statfs = squashfs_statfs,
-diff -urNp linux-2.6.30.8/fs/sysfs/bin.c linux-2.6.30.8/fs/sysfs/bin.c
---- linux-2.6.30.8/fs/sysfs/bin.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/sysfs/bin.c 2009-07-30 12:02:44.278047822 -0400
+diff -urNp linux-2.6.31.4/fs/sysfs/bin.c linux-2.6.31.4/fs/sysfs/bin.c
+--- linux-2.6.31.4/fs/sysfs/bin.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/sysfs/bin.c 2009-10-11 15:29:47.025732324 -0400
@@ -40,7 +40,7 @@ struct bin_buffer {
struct mutex mutex;
void *buffer;
@@ -25653,7 +27672,7 @@ diff -urNp linux-2.6.30.8/fs/sysfs/bin.c linux-2.6.30.8/fs/sysfs/bin.c
struct file *file;
struct hlist_node list;
};
-@@ -330,7 +330,7 @@ static int bin_migrate(struct vm_area_st
+@@ -331,7 +331,7 @@ static int bin_migrate(struct vm_area_st
}
#endif
@@ -25662,10 +27681,10 @@ diff -urNp linux-2.6.30.8/fs/sysfs/bin.c linux-2.6.30.8/fs/sysfs/bin.c
.open = bin_vma_open,
.close = bin_vma_close,
.fault = bin_fault,
-diff -urNp linux-2.6.30.8/fs/sysfs/symlink.c linux-2.6.30.8/fs/sysfs/symlink.c
---- linux-2.6.30.8/fs/sysfs/symlink.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/sysfs/symlink.c 2009-07-30 09:48:10.098443569 -0400
-@@ -200,7 +200,7 @@ static void *sysfs_follow_link(struct de
+diff -urNp linux-2.6.31.4/fs/sysfs/symlink.c linux-2.6.31.4/fs/sysfs/symlink.c
+--- linux-2.6.31.4/fs/sysfs/symlink.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/sysfs/symlink.c 2009-10-11 15:29:47.026482828 -0400
+@@ -203,7 +203,7 @@ static void *sysfs_follow_link(struct de
static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
{
@@ -25674,9 +27693,9 @@ diff -urNp linux-2.6.30.8/fs/sysfs/symlink.c linux-2.6.30.8/fs/sysfs/symlink.c
if (!IS_ERR(page))
free_page((unsigned long)page);
}
-diff -urNp linux-2.6.30.8/fs/ubifs/file.c linux-2.6.30.8/fs/ubifs/file.c
---- linux-2.6.30.8/fs/ubifs/file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ubifs/file.c 2009-07-30 09:48:10.100960655 -0400
+diff -urNp linux-2.6.31.4/fs/ubifs/file.c linux-2.6.31.4/fs/ubifs/file.c
+--- linux-2.6.31.4/fs/ubifs/file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/ubifs/file.c 2009-10-11 15:29:47.031357207 -0400
@@ -1536,7 +1536,7 @@ out_unlock:
return err;
}
@@ -25686,9 +27705,9 @@ diff -urNp linux-2.6.30.8/fs/ubifs/file.c linux-2.6.30.8/fs/ubifs/file.c
.fault = filemap_fault,
.page_mkwrite = ubifs_vm_page_mkwrite,
};
-diff -urNp linux-2.6.30.8/fs/udf/balloc.c linux-2.6.30.8/fs/udf/balloc.c
---- linux-2.6.30.8/fs/udf/balloc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/udf/balloc.c 2009-07-30 09:48:10.100960655 -0400
+diff -urNp linux-2.6.31.4/fs/udf/balloc.c linux-2.6.31.4/fs/udf/balloc.c
+--- linux-2.6.31.4/fs/udf/balloc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/udf/balloc.c 2009-10-11 15:29:47.051362185 -0400
@@ -172,9 +172,7 @@ static void udf_bitmap_free_blocks(struc
mutex_lock(&sbi->s_alloc_mutex);
@@ -25700,24 +27719,6 @@ diff -urNp linux-2.6.30.8/fs/udf/balloc.c linux-2.6.30.8/fs/udf/balloc.c
udf_debug("%d < %d || %d + %d > %d\n",
bloc->logicalBlockNum, 0, bloc->logicalBlockNum,
count, partmap->s_partition_len);
-@@ -238,7 +236,7 @@ static int udf_bitmap_prealloc_blocks(st
-
- mutex_lock(&sbi->s_alloc_mutex);
- part_len = sbi->s_partmaps[partition].s_partition_len;
-- if (first_block < 0 || first_block >= part_len)
-+ if (first_block >= part_len)
- goto out;
-
- if (first_block + block_count > part_len)
-@@ -297,7 +295,7 @@ static int udf_bitmap_new_block(struct s
- mutex_lock(&sbi->s_alloc_mutex);
-
- repeat:
-- if (goal < 0 || goal >= sbi->s_partmaps[partition].s_partition_len)
-+ if (goal >= sbi->s_partmaps[partition].s_partition_len)
- goal = 0;
-
- nr_groups = bitmap->s_nr_groups;
@@ -436,9 +434,7 @@ static void udf_table_free_blocks(struct
mutex_lock(&sbi->s_alloc_mutex);
@@ -25729,62 +27730,9 @@ diff -urNp linux-2.6.30.8/fs/udf/balloc.c linux-2.6.30.8/fs/udf/balloc.c
udf_debug("%d < %d || %d + %d > %d\n",
bloc.logicalBlockNum, 0, bloc.logicalBlockNum, count,
partmap->s_partition_len);
-@@ -666,8 +662,7 @@ static int udf_table_prealloc_blocks(str
- int8_t etype = -1;
- struct udf_inode_info *iinfo;
-
-- if (first_block < 0 ||
-- first_block >= sbi->s_partmaps[partition].s_partition_len)
-+ if (first_block >= sbi->s_partmaps[partition].s_partition_len)
- return 0;
-
- iinfo = UDF_I(table);
-@@ -743,7 +738,7 @@ static int udf_table_new_block(struct su
- return newblock;
-
- mutex_lock(&sbi->s_alloc_mutex);
-- if (goal < 0 || goal >= sbi->s_partmaps[partition].s_partition_len)
-+ if (goal >= sbi->s_partmaps[partition].s_partition_len)
- goal = 0;
-
- /* We search for the closest matching block to goal. If we find
-diff -urNp linux-2.6.30.8/fs/ufs/inode.c linux-2.6.30.8/fs/ufs/inode.c
---- linux-2.6.30.8/fs/ufs/inode.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/ufs/inode.c 2009-07-30 09:48:10.101729491 -0400
-@@ -56,9 +56,7 @@ static int ufs_block_to_path(struct inod
-
-
- UFSD("ptrs=uspi->s_apb = %d,double_blocks=%ld \n",ptrs,double_blocks);
-- if (i_block < 0) {
-- ufs_warning(inode->i_sb, "ufs_block_to_path", "block < 0");
-- } else if (i_block < direct_blocks) {
-+ if (i_block < direct_blocks) {
- offsets[n++] = i_block;
- } else if ((i_block -= direct_blocks) < indirect_blocks) {
- offsets[n++] = UFS_IND_BLOCK;
-@@ -440,8 +438,6 @@ int ufs_getfrag_block(struct inode *inod
- lock_kernel();
-
- UFSD("ENTER, ino %lu, fragment %llu\n", inode->i_ino, (unsigned long long)fragment);
-- if (fragment < 0)
-- goto abort_negative;
- if (fragment >
- ((UFS_NDADDR + uspi->s_apb + uspi->s_2apb + uspi->s_3apb)
- << uspi->s_fpbshift))
-@@ -504,10 +500,6 @@ abort:
- unlock_kernel();
- return err;
-
--abort_negative:
-- ufs_warning(sb, "ufs_get_block", "block < 0");
-- goto abort;
--
- abort_too_big:
- ufs_warning(sb, "ufs_get_block", "block > big");
- goto abort;
-diff -urNp linux-2.6.30.8/fs/utimes.c linux-2.6.30.8/fs/utimes.c
---- linux-2.6.30.8/fs/utimes.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/utimes.c 2009-07-30 11:10:49.345424878 -0400
+diff -urNp linux-2.6.31.4/fs/utimes.c linux-2.6.31.4/fs/utimes.c
+--- linux-2.6.31.4/fs/utimes.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/utimes.c 2009-10-11 15:29:47.064417796 -0400
@@ -1,6 +1,7 @@
#include <linux/compiler.h>
#include <linux/file.h>
@@ -25806,19 +27754,19 @@ diff -urNp linux-2.6.30.8/fs/utimes.c linux-2.6.30.8/fs/utimes.c
mutex_lock(&inode->i_mutex);
error = notify_change(path->dentry, &newattrs);
mutex_unlock(&inode->i_mutex);
-diff -urNp linux-2.6.30.8/fs/xfs/linux-2.6/xfs_file.c linux-2.6.30.8/fs/xfs/linux-2.6/xfs_file.c
---- linux-2.6.30.8/fs/xfs/linux-2.6/xfs_file.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/xfs/linux-2.6/xfs_file.c 2009-07-30 09:48:10.102932228 -0400
-@@ -43,7 +43,7 @@
+diff -urNp linux-2.6.31.4/fs/xfs/linux-2.6/xfs_file.c linux-2.6.31.4/fs/xfs/linux-2.6/xfs_file.c
+--- linux-2.6.31.4/fs/xfs/linux-2.6/xfs_file.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/xfs/linux-2.6/xfs_file.c 2009-10-11 15:29:47.067624386 -0400
+@@ -42,7 +42,7 @@
+
#include <linux/dcache.h>
- #include <linux/smp_lock.h>
-static struct vm_operations_struct xfs_file_vm_ops;
+static const struct vm_operations_struct xfs_file_vm_ops;
STATIC ssize_t
xfs_file_aio_read(
-@@ -272,7 +272,7 @@ const struct file_operations xfs_dir_fil
+@@ -271,7 +271,7 @@ const struct file_operations xfs_dir_fil
.fsync = xfs_file_fsync,
};
@@ -25827,10 +27775,10 @@ diff -urNp linux-2.6.30.8/fs/xfs/linux-2.6/xfs_file.c linux-2.6.30.8/fs/xfs/linu
.fault = filemap_fault,
.page_mkwrite = xfs_vm_page_mkwrite,
};
-diff -urNp linux-2.6.30.8/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.30.8/fs/xfs/linux-2.6/xfs_iops.c
---- linux-2.6.30.8/fs/xfs/linux-2.6/xfs_iops.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/xfs/linux-2.6/xfs_iops.c 2009-07-30 09:48:10.102932228 -0400
-@@ -482,7 +482,7 @@ xfs_vn_put_link(
+diff -urNp linux-2.6.31.4/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.31.4/fs/xfs/linux-2.6/xfs_iops.c
+--- linux-2.6.31.4/fs/xfs/linux-2.6/xfs_iops.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/xfs/linux-2.6/xfs_iops.c 2009-10-11 15:29:47.070535377 -0400
+@@ -478,7 +478,7 @@ xfs_vn_put_link(
struct nameidata *nd,
void *p)
{
@@ -25839,10 +27787,10 @@ diff -urNp linux-2.6.30.8/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.30.8/fs/xfs/linu
if (!IS_ERR(s))
kfree(s);
-diff -urNp linux-2.6.30.8/fs/xfs/linux-2.6/xfs_super.c linux-2.6.30.8/fs/xfs/linux-2.6/xfs_super.c
---- linux-2.6.30.8/fs/xfs/linux-2.6/xfs_super.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/xfs/linux-2.6/xfs_super.c 2009-07-30 13:03:07.229966859 -0400
-@@ -68,7 +68,7 @@
+diff -urNp linux-2.6.31.4/fs/xfs/linux-2.6/xfs_super.c linux-2.6.31.4/fs/xfs/linux-2.6/xfs_super.c
+--- linux-2.6.31.4/fs/xfs/linux-2.6/xfs_super.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/xfs/linux-2.6/xfs_super.c 2009-10-11 15:29:47.081708416 -0400
+@@ -67,7 +67,7 @@
#include <linux/freezer.h>
#include <linux/parser.h>
@@ -25851,7 +27799,7 @@ diff -urNp linux-2.6.30.8/fs/xfs/linux-2.6/xfs_super.c linux-2.6.30.8/fs/xfs/lin
static kmem_zone_t *xfs_ioend_zone;
mempool_t *xfs_ioend_pool;
-@@ -1527,7 +1527,7 @@ xfs_fs_get_sb(
+@@ -1532,7 +1532,7 @@ xfs_fs_get_sb(
mnt);
}
@@ -25860,9 +27808,9 @@ diff -urNp linux-2.6.30.8/fs/xfs/linux-2.6/xfs_super.c linux-2.6.30.8/fs/xfs/lin
.alloc_inode = xfs_fs_alloc_inode,
.destroy_inode = xfs_fs_destroy_inode,
.write_inode = xfs_fs_write_inode,
-diff -urNp linux-2.6.30.8/fs/xfs/xfs_bmap.c linux-2.6.30.8/fs/xfs/xfs_bmap.c
---- linux-2.6.30.8/fs/xfs/xfs_bmap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/fs/xfs/xfs_bmap.c 2009-07-30 09:48:10.103749934 -0400
+diff -urNp linux-2.6.31.4/fs/xfs/xfs_bmap.c linux-2.6.31.4/fs/xfs/xfs_bmap.c
+--- linux-2.6.31.4/fs/xfs/xfs_bmap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/fs/xfs/xfs_bmap.c 2009-10-11 15:29:47.090543861 -0400
@@ -360,7 +360,7 @@ xfs_bmap_validate_ret(
int nmap,
int ret_nmap);
@@ -25872,9 +27820,9 @@ diff -urNp linux-2.6.30.8/fs/xfs/xfs_bmap.c linux-2.6.30.8/fs/xfs/xfs_bmap.c
#endif /* DEBUG */
#if defined(XFS_RW_TRACE)
-diff -urNp linux-2.6.30.8/grsecurity/gracl_alloc.c linux-2.6.30.8/grsecurity/gracl_alloc.c
---- linux-2.6.30.8/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/gracl_alloc.c 2009-07-30 11:10:49.345424878 -0400
+diff -urNp linux-2.6.31.4/grsecurity/gracl_alloc.c linux-2.6.31.4/grsecurity/gracl_alloc.c
+--- linux-2.6.31.4/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/gracl_alloc.c 2009-10-11 15:29:47.091547864 -0400
@@ -0,0 +1,105 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -25981,10 +27929,10 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl_alloc.c linux-2.6.30.8/grsecurity/gra
+ else
+ return 1;
+}
-diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
---- linux-2.6.30.8/grsecurity/gracl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/gracl.c 2009-08-24 23:36:40.120001080 -0400
-@@ -0,0 +1,3893 @@
+diff -urNp linux-2.6.31.4/grsecurity/gracl.c linux-2.6.31.4/grsecurity/gracl.c
+--- linux-2.6.31.4/grsecurity/gracl.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/gracl.c 2009-10-12 23:24:21.678213713 -0400
+@@ -0,0 +1,3910 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
@@ -26029,6 +27977,8 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+
+static struct acl_role_label *default_role;
+
++static struct acl_role_label *role_list;
++
+static u16 acl_sp_role_value;
+
+extern char *gr_shared_page[4];
@@ -26037,11 +27987,7 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+
+struct gr_arg *gr_usermode;
+
-+#ifdef CONFIG_PAX_KERNEXEC
+static unsigned int gr_status __read_only = GR_STATUS_INIT;
-+#else
-+static unsigned int gr_status = GR_STATUS_INIT;
-+#endif
+
+extern int chkpw(struct gr_arg *entry, unsigned char *salt, unsigned char *sum);
+extern void gr_clear_learn_entries(void);
@@ -26251,7 +28197,7 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ char *res;
+ struct dentry *root;
+ struct vfsmount *rootmnt;
-+ struct task_struct *reaper = current->nsproxy->pid_ns->child_reaper;
++ struct task_struct *reaper = &init_task;
+
+ /* we can't use real_root, real_root_mnt, because they belong only to the RBAC system */
+ read_lock(&reaper->fs->lock);
@@ -26598,14 +28544,21 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ unsigned int index =
+ rhash(uidgid, role->roletype & (GR_ROLE_USER | GR_ROLE_GROUP), acl_role_set.r_size);
+ struct acl_role_label **curr;
-+
-+ role->prev = NULL;
++ struct acl_role_label *tmp;
+
+ curr = &acl_role_set.r_hash[index];
-+ if (*curr != NULL)
-+ (*curr)->prev = role;
+
-+ role->next = *curr;
++ /* if role was already inserted due to domains and already has
++ a role in the same bucket as it attached, then we need to
++ combine these two buckets
++ */
++ if (role->next) {
++ tmp = role->next;
++ while (tmp->next)
++ tmp = tmp->next;
++ tmp->next = *curr;
++ } else
++ role->next = *curr;
+ *curr = role;
+
+ return;
@@ -26616,6 +28569,17 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+{
+ int i;
+
++ if (role_list == NULL) {
++ role_list = role;
++ role->prev = NULL;
++ } else {
++ role->prev = role_list;
++ role_list = role;
++ }
++
++ /* used for hash chains */
++ role->next = NULL;
++
+ if (role->roletype & GR_ROLE_DOMAIN) {
+ for (i = 0; i < role->domain_child_num; i++)
+ __insert_acl_role_label(role, role->domain_children[i]);
@@ -26742,7 +28706,7 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+static int
+init_variables(const struct gr_arg *arg)
+{
-+ struct task_struct *reaper = current->nsproxy->pid_ns->child_reaper;
++ struct task_struct *reaper = &init_task;
+ unsigned int stacksize;
+
+ subj_map_set.s_size = arg->role_db.num_subjects;
@@ -26832,7 +28796,7 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ struct acl_subject_label *s;
+ struct acl_role_label *r;
+ struct task_struct *task, *task2;
-+ unsigned int i, x;
++ unsigned int x;
+
+ gr_clear_learn_entries();
+
@@ -26855,9 +28819,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+
+ /* free all object hash tables */
+
-+ FOR_EACH_ROLE_START(r, i)
++ FOR_EACH_ROLE_START(r)
+ if (r->subj_hash == NULL)
-+ break;
++ goto next_role;
+ FOR_EACH_SUBJECT_START(r, s, x)
+ if (s->obj_hash == NULL)
+ break;
@@ -26879,7 +28843,8 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ else
+ vfree(r->subj_hash);
+ r->subj_hash = NULL;
-+ FOR_EACH_ROLE_END(r,i)
++next_role:
++ FOR_EACH_ROLE_END(r)
+
+ acl_free_all();
+
@@ -26914,6 +28879,7 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ memset(&subj_map_set, 0, sizeof (struct acl_subj_map_db));
+
+ default_role = NULL;
++ role_list = NULL;
+
+ return;
+}
@@ -27557,17 +29523,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ goto out;
+ }
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ {
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+ gr_status |= GR_READY;
-+ pax_close_kernel(cr0);
-+ }
-+#else
++ pax_open_kernel();
+ gr_status |= GR_READY;
-+#endif
++ pax_close_kernel();
+
+ out:
+ return error;
@@ -28408,9 +30366,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ struct acl_subject_label *matchps;
+ struct acl_subject_label *subj;
+ struct acl_role_label *role;
-+ unsigned int i, x;
++ unsigned int x;
+
-+ FOR_EACH_ROLE_START(role, i)
++ FOR_EACH_ROLE_START(role)
+ FOR_EACH_SUBJECT_START(role, subj, x)
+ if ((matchpo = lookup_acl_obj_label(ino, dev, subj)) != NULL)
+ matchpo->mode |= GR_DELETED;
@@ -28421,7 +30379,7 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ FOR_EACH_NESTED_SUBJECT_END(subj)
+ if ((matchps = lookup_acl_subj_label(ino, dev, role)) != NULL)
+ matchps->mode |= GR_DELETED;
-+ FOR_EACH_ROLE_END(role,i)
++ FOR_EACH_ROLE_END(role)
+
+ inodev->nentry->deleted = 1;
+
@@ -28566,9 +30524,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+{
+ struct acl_subject_label *subj;
+ struct acl_role_label *role;
-+ unsigned int i, x;
-+
-+ FOR_EACH_ROLE_START(role, i)
++ unsigned int x;
++
++ FOR_EACH_ROLE_START(role)
+ update_acl_subj_label(matchn->inode, matchn->device,
+ dentry->d_inode->i_ino,
+ dentry->d_inode->i_sb->s_dev, role);
@@ -28585,7 +30543,7 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ dentry->d_inode->i_ino,
+ dentry->d_inode->i_sb->s_dev, subj);
+ FOR_EACH_SUBJECT_END(subj,x)
-+ FOR_EACH_ROLE_END(role,i)
++ FOR_EACH_ROLE_END(role)
+
+ update_inodev_entry(matchn->inode, matchn->device,
+ dentry->d_inode->i_ino, dentry->d_inode->i_sb->s_dev);
@@ -28690,7 +30648,7 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ /* handle special roles that do not require authentication
+ and check ip */
+
-+ FOR_EACH_ROLE_START(r, i)
++ FOR_EACH_ROLE_START(r)
+ if (!strcmp(rolename, r->rolename) &&
+ (r->roletype & GR_ROLE_SPECIAL)) {
+ found = 0;
@@ -28712,7 +30670,7 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ return 1;
+ }
+ }
-+ FOR_EACH_ROLE_END(r,i)
++ FOR_EACH_ROLE_END(r)
+
+ for (i = 0; i < num_sprole_pws; i++) {
+ if (!strcmp(rolename, acl_special_roles[i]->rolename)) {
@@ -28733,13 +30691,14 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ struct acl_role_label *assigned = NULL;
+ struct task_struct *tsk;
+ struct file *filp;
-+ unsigned int i;
+
-+ FOR_EACH_ROLE_START(r, i)
++ FOR_EACH_ROLE_START(r)
+ if (!strcmp(rolename, r->rolename) &&
-+ (r->roletype & GR_ROLE_SPECIAL))
++ (r->roletype & GR_ROLE_SPECIAL)) {
+ assigned = r;
-+ FOR_EACH_ROLE_END(r,i)
++ break;
++ }
++ FOR_EACH_ROLE_END(r)
+
+ if (!assigned)
+ return;
@@ -28935,17 +30894,10 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ case GR_SHUTDOWN:
+ if ((gr_status & GR_READY)
+ && !(chkpw(gr_usermode, gr_system_salt, gr_system_sum))) {
-+#ifdef CONFIG_PAX_KERNEXEC
-+ {
-+ unsigned long cr0;
-+
-+ pax_open_kernel(cr0);
-+ gr_status &= ~GR_READY;
-+ pax_close_kernel(cr0);
-+ }
-+#else
++ pax_open_kernel();
+ gr_status &= ~GR_READY;
-+#endif
++ pax_close_kernel();
++
+ gr_log_noargs(GR_DONT_AUDIT_GOOD, GR_SHUTS_ACL_MSG);
+ free_variables();
+ memset(gr_usermode, 0, sizeof (struct gr_arg));
@@ -28976,17 +30928,11 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ error = -EAGAIN;
+ } else if (!(chkpw(gr_usermode, gr_system_salt, gr_system_sum))) {
+ lock_kernel();
-+#ifdef CONFIG_PAX_KERNEXEC
-+ {
-+ unsigned long cr0;
+
-+ pax_open_kernel(cr0);
-+ gr_status &= ~GR_READY;
-+ pax_close_kernel(cr0);
-+ }
-+#else
++ pax_open_kernel();
+ gr_status &= ~GR_READY;
-+#endif
++ pax_close_kernel();
++
+ free_variables();
+ if (!(error2 = gracl_init(gr_usermode))) {
+ unlock_kernel();
@@ -29524,8 +31470,10 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ struct task_struct *curtemp = current;
+ __u32 retmode;
+
++#ifndef CONFIG_GRKERNSEC_HARDEN_PTRACE
+ if (unlikely(!(gr_status & GR_READY)))
+ return 0;
++#endif
+
+ read_lock(&tasklist_lock);
+ read_lock(&grsec_exec_file_lock);
@@ -29537,12 +31485,21 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ tmp = tmp->parent;
+ }
+
-+ if (!filp || (tmp->pid == 0 && !(current->acl->mode & GR_RELAXPTRACE))) {
++ if (!filp || (tmp->pid == 0 && ((grsec_enable_harden_ptrace && current_uid() && !(gr_status & GR_READY)) ||
++ ((gr_status & GR_READY) && !(current->acl->mode & GR_RELAXPTRACE))))) {
+ read_unlock(&grsec_exec_file_lock);
+ read_unlock(&tasklist_lock);
+ return 1;
+ }
+
++#ifdef CONFIG_GRKERNSEC_HARDEN_PTRACE
++ if (!(gr_status & GR_READY)) {
++ read_unlock(&grsec_exec_file_lock);
++ read_unlock(&tasklist_lock);
++ return 0;
++ }
++#endif
++
+ retmode = gr_search_file(filp->f_path.dentry, GR_NOPTRACE, filp->f_path.mnt);
+ read_unlock(&grsec_exec_file_lock);
+ read_unlock(&tasklist_lock);
@@ -29565,8 +31522,10 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ struct task_struct *curtemp = current;
+ __u32 retmode;
+
++#ifndef CONFIG_GRKERNSEC_HARDEN_PTRACE
+ if (unlikely(!(gr_status & GR_READY)))
+ return 0;
++#endif
+
+ read_lock(&tasklist_lock);
+ while (tmp->pid > 0) {
@@ -29575,13 +31534,19 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+ tmp = tmp->parent;
+ }
+
-+ if (tmp->pid == 0 && !(current->acl->mode & GR_RELAXPTRACE)) {
++ if (tmp->pid == 0 && ((grsec_enable_harden_ptrace && current_uid() && !(gr_status & GR_READY)) ||
++ ((gr_status & GR_READY) && !(current->acl->mode & GR_RELAXPTRACE)))) {
+ read_unlock(&tasklist_lock);
+ gr_log_ptrace(GR_DONT_AUDIT, GR_PTRACE_ACL_MSG, task);
+ return 1;
+ }
+ read_unlock(&tasklist_lock);
+
++#ifdef CONFIG_GRKERNSEC_HARDEN_PTRACE
++ if (!(gr_status & GR_READY))
++ return 0;
++#endif
++
+ read_lock(&grsec_exec_file_lock);
+ if (unlikely(!task->exec_file)) {
+ read_unlock(&grsec_exec_file_lock);
@@ -29878,9 +31843,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl.c linux-2.6.30.8/grsecurity/gracl.c
+EXPORT_SYMBOL(gr_check_group_change);
+#endif
+
-diff -urNp linux-2.6.30.8/grsecurity/gracl_cap.c linux-2.6.30.8/grsecurity/gracl_cap.c
---- linux-2.6.30.8/grsecurity/gracl_cap.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/gracl_cap.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/gracl_cap.c linux-2.6.31.4/grsecurity/gracl_cap.c
+--- linux-2.6.31.4/grsecurity/gracl_cap.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/gracl_cap.c 2009-10-11 15:29:47.093493469 -0400
@@ -0,0 +1,131 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -30013,9 +31978,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl_cap.c linux-2.6.30.8/grsecurity/gracl
+ return 0;
+}
+
-diff -urNp linux-2.6.30.8/grsecurity/gracl_fs.c linux-2.6.30.8/grsecurity/gracl_fs.c
---- linux-2.6.30.8/grsecurity/gracl_fs.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/gracl_fs.c 2009-08-01 15:00:28.098114831 -0400
+diff -urNp linux-2.6.31.4/grsecurity/gracl_fs.c linux-2.6.31.4/grsecurity/gracl_fs.c
+--- linux-2.6.31.4/grsecurity/gracl_fs.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/gracl_fs.c 2009-10-11 15:29:47.093493469 -0400
@@ -0,0 +1,424 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -30441,9 +32406,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl_fs.c linux-2.6.30.8/grsecurity/gracl_
+
+ return 0;
+}
-diff -urNp linux-2.6.30.8/grsecurity/gracl_ip.c linux-2.6.30.8/grsecurity/gracl_ip.c
---- linux-2.6.30.8/grsecurity/gracl_ip.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/gracl_ip.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/gracl_ip.c linux-2.6.31.4/grsecurity/gracl_ip.c
+--- linux-2.6.31.4/grsecurity/gracl_ip.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/gracl_ip.c 2009-10-11 15:29:47.094442375 -0400
@@ -0,0 +1,340 @@
+#include <linux/kernel.h>
+#include <asm/uaccess.h>
@@ -30785,9 +32750,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl_ip.c linux-2.6.30.8/grsecurity/gracl_
+
+ return gr_search_connectbind(GR_CONNECT | GR_CONNECTOVERRIDE, sk, &sin, SOCK_DGRAM);
+}
-diff -urNp linux-2.6.30.8/grsecurity/gracl_learn.c linux-2.6.30.8/grsecurity/gracl_learn.c
---- linux-2.6.30.8/grsecurity/gracl_learn.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/gracl_learn.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/gracl_learn.c linux-2.6.31.4/grsecurity/gracl_learn.c
+--- linux-2.6.31.4/grsecurity/gracl_learn.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/gracl_learn.c 2009-10-11 15:29:47.251814955 -0400
@@ -0,0 +1,211 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -31000,9 +32965,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl_learn.c linux-2.6.30.8/grsecurity/gra
+ .release = close_learn,
+ .poll = poll_learn,
+};
-diff -urNp linux-2.6.30.8/grsecurity/gracl_res.c linux-2.6.30.8/grsecurity/gracl_res.c
---- linux-2.6.30.8/grsecurity/gracl_res.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/gracl_res.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/gracl_res.c linux-2.6.31.4/grsecurity/gracl_res.c
+--- linux-2.6.31.4/grsecurity/gracl_res.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/gracl_res.c 2009-10-11 15:29:47.252524620 -0400
@@ -0,0 +1,58 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -31062,9 +33027,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl_res.c linux-2.6.30.8/grsecurity/gracl
+
+ return;
+}
-diff -urNp linux-2.6.30.8/grsecurity/gracl_segv.c linux-2.6.30.8/grsecurity/gracl_segv.c
---- linux-2.6.30.8/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/gracl_segv.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/gracl_segv.c linux-2.6.31.4/grsecurity/gracl_segv.c
+--- linux-2.6.31.4/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/gracl_segv.c 2009-10-11 15:29:47.252524620 -0400
@@ -0,0 +1,307 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -31373,9 +33338,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl_segv.c linux-2.6.30.8/grsecurity/grac
+
+ return;
+}
-diff -urNp linux-2.6.30.8/grsecurity/gracl_shm.c linux-2.6.30.8/grsecurity/gracl_shm.c
---- linux-2.6.30.8/grsecurity/gracl_shm.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/gracl_shm.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/gracl_shm.c linux-2.6.31.4/grsecurity/gracl_shm.c
+--- linux-2.6.31.4/grsecurity/gracl_shm.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/gracl_shm.c 2009-10-11 15:29:47.252524620 -0400
@@ -0,0 +1,37 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -31414,9 +33379,9 @@ diff -urNp linux-2.6.30.8/grsecurity/gracl_shm.c linux-2.6.30.8/grsecurity/gracl
+
+ return 1;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_chdir.c linux-2.6.30.8/grsecurity/grsec_chdir.c
---- linux-2.6.30.8/grsecurity/grsec_chdir.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_chdir.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_chdir.c linux-2.6.31.4/grsecurity/grsec_chdir.c
+--- linux-2.6.31.4/grsecurity/grsec_chdir.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_chdir.c 2009-10-11 15:29:47.252524620 -0400
@@ -0,0 +1,19 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -31437,10 +33402,10 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_chdir.c linux-2.6.30.8/grsecurity/grs
+#endif
+ return;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_chroot.c linux-2.6.30.8/grsecurity/grsec_chroot.c
---- linux-2.6.30.8/grsecurity/grsec_chroot.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_chroot.c 2009-07-30 11:10:49.347341041 -0400
-@@ -0,0 +1,350 @@
+diff -urNp linux-2.6.31.4/grsecurity/grsec_chroot.c linux-2.6.31.4/grsecurity/grsec_chroot.c
+--- linux-2.6.31.4/grsecurity/grsec_chroot.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_chroot.c 2009-10-11 15:29:47.252524620 -0400
+@@ -0,0 +1,348 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
@@ -31549,7 +33514,7 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_chroot.c linux-2.6.30.8/grsecurity/gr
+ struct vfsmount *realrootmnt;
+ struct dentry *currentroot;
+ struct vfsmount *currentmnt;
-+ struct task_struct *reaper = current->nsproxy->pid_ns->child_reaper;
++ struct task_struct *reaper = &init_task;
+ int ret = 1;
+
+ read_lock(&reaper->fs->lock);
@@ -31726,10 +33691,8 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_chroot.c linux-2.6.30.8/grsecurity/gr
+{
+#ifdef CONFIG_GRKERNSEC_CHROOT_CAPS
+ if (grsec_enable_chroot_caps && current->pid > 1 && current->fs != NULL &&
-+ ((current->nsproxy->pid_ns->child_reaper->fs->root.dentry->d_inode->i_sb !=
-+ path->dentry->d_inode->i_sb) ||
-+ (current->nsproxy->pid_ns->child_reaper->fs->root.dentry->d_inode->i_ino !=
-+ path->dentry->d_inode->i_ino))) {
++ (init_task.fs->root.dentry != path->dentry) &&
++ (current->nsproxy->mnt_ns->root->mnt_root != path->dentry)) {
+
+ kernel_cap_t chroot_caps = GR_CHROOT_CAPS;
+ const struct cred *old = current_cred();
@@ -31791,9 +33754,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_chroot.c linux-2.6.30.8/grsecurity/gr
+#ifdef CONFIG_SECURITY
+EXPORT_SYMBOL(gr_handle_chroot_caps);
+#endif
-diff -urNp linux-2.6.30.8/grsecurity/grsec_disabled.c linux-2.6.30.8/grsecurity/grsec_disabled.c
---- linux-2.6.30.8/grsecurity/grsec_disabled.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_disabled.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_disabled.c linux-2.6.31.4/grsecurity/grsec_disabled.c
+--- linux-2.6.31.4/grsecurity/grsec_disabled.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_disabled.c 2009-10-11 15:29:47.253388942 -0400
@@ -0,0 +1,426 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -32221,9 +34184,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_disabled.c linux-2.6.30.8/grsecurity/
+EXPORT_SYMBOL(gr_check_user_change);
+EXPORT_SYMBOL(gr_check_group_change);
+#endif
-diff -urNp linux-2.6.30.8/grsecurity/grsec_exec.c linux-2.6.30.8/grsecurity/grsec_exec.c
---- linux-2.6.30.8/grsecurity/grsec_exec.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_exec.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_exec.c linux-2.6.31.4/grsecurity/grsec_exec.c
+--- linux-2.6.31.4/grsecurity/grsec_exec.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_exec.c 2009-10-11 15:29:47.253388942 -0400
@@ -0,0 +1,89 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -32314,9 +34277,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_exec.c linux-2.6.30.8/grsecurity/grse
+#endif
+ return;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_fifo.c linux-2.6.30.8/grsecurity/grsec_fifo.c
---- linux-2.6.30.8/grsecurity/grsec_fifo.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_fifo.c 2009-07-30 11:10:49.347341041 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_fifo.c linux-2.6.31.4/grsecurity/grsec_fifo.c
+--- linux-2.6.31.4/grsecurity/grsec_fifo.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_fifo.c 2009-10-11 15:29:47.253388942 -0400
@@ -0,0 +1,24 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -32342,9 +34305,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_fifo.c linux-2.6.30.8/grsecurity/grse
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_fork.c linux-2.6.30.8/grsecurity/grsec_fork.c
---- linux-2.6.30.8/grsecurity/grsec_fork.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_fork.c 2009-07-30 11:10:49.349503559 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_fork.c linux-2.6.31.4/grsecurity/grsec_fork.c
+--- linux-2.6.31.4/grsecurity/grsec_fork.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_fork.c 2009-10-11 15:29:47.253388942 -0400
@@ -0,0 +1,15 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -32361,9 +34324,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_fork.c linux-2.6.30.8/grsecurity/grse
+#endif
+ return;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_init.c linux-2.6.30.8/grsecurity/grsec_init.c
---- linux-2.6.30.8/grsecurity/grsec_init.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_init.c 2009-08-02 09:38:20.116597572 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_init.c linux-2.6.31.4/grsecurity/grsec_init.c
+--- linux-2.6.31.4/grsecurity/grsec_init.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_init.c 2009-10-11 15:29:47.253388942 -0400
@@ -0,0 +1,230 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -32376,6 +34339,7 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_init.c linux-2.6.30.8/grsecurity/grse
+
+int grsec_enable_link;
+int grsec_enable_dmesg;
++int grsec_enable_harden_ptrace;
+int grsec_enable_fifo;
+int grsec_enable_execve;
+int grsec_enable_execlog;
@@ -32386,7 +34350,6 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_init.c linux-2.6.30.8/grsecurity/grse
+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;
@@ -32497,8 +34460,8 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_init.c linux-2.6.30.8/grsecurity/grse
+#ifdef CONFIG_GRKERNSEC_AUDIT_CHDIR
+ grsec_enable_chdir = 1;
+#endif
-+#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
-+ grsec_enable_audit_ipc = 1;
++#ifdef CONFIG_GRKERNSEC_HARDEN_PTRACE
++ grsec_enable_harden_ptrace = 1;
+#endif
+#ifdef CONFIG_GRKERNSEC_AUDIT_MOUNT
+ grsec_enable_mount = 1;
@@ -32595,94 +34558,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_init.c linux-2.6.30.8/grsecurity/grse
+
+ return;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_ipc.c linux-2.6.30.8/grsecurity/grsec_ipc.c
---- linux-2.6.30.8/grsecurity/grsec_ipc.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_ipc.c 2009-07-30 11:10:49.349503559 -0400
-@@ -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))
-+ gr_log_noargs(GR_DO_AUDIT, GR_MSGQ_AUDIT_MSG);
-+#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))
-+ gr_log_int_int(GR_DO_AUDIT, GR_MSGQR_AUDIT_MSG, uid, cuid);
-+#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))
-+ gr_log_noargs(GR_DO_AUDIT, GR_SEM_AUDIT_MSG);
-+#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))
-+ gr_log_int_int(GR_DO_AUDIT, GR_SEMR_AUDIT_MSG, uid, cuid);
-+#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))
-+ gr_log_int(GR_DO_AUDIT, GR_SHM_AUDIT_MSG, size);
-+#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))
-+ gr_log_int_int(GR_DO_AUDIT, GR_SHMR_AUDIT_MSG, uid, cuid);
-+#endif
-+ return;
-+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_link.c linux-2.6.30.8/grsecurity/grsec_link.c
---- linux-2.6.30.8/grsecurity/grsec_link.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_link.c 2009-07-30 11:10:49.349503559 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_link.c linux-2.6.31.4/grsecurity/grsec_link.c
+--- linux-2.6.31.4/grsecurity/grsec_link.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_link.c 2009-10-11 15:29:47.253388942 -0400
@@ -0,0 +1,43 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -32727,10 +34605,10 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_link.c linux-2.6.30.8/grsecurity/grse
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_log.c linux-2.6.30.8/grsecurity/grsec_log.c
---- linux-2.6.30.8/grsecurity/grsec_log.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_log.c 2009-07-30 11:10:49.350327012 -0400
-@@ -0,0 +1,288 @@
+diff -urNp linux-2.6.31.4/grsecurity/grsec_log.c linux-2.6.31.4/grsecurity/grsec_log.c
+--- linux-2.6.31.4/grsecurity/grsec_log.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_log.c 2009-10-11 15:29:47.254390050 -0400
+@@ -0,0 +1,294 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/file.h>
@@ -32851,6 +34729,7 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_log.c linux-2.6.30.8/grsecurity/grsec
+ int logtype;
+ char *result = (audit == GR_DO_AUDIT) ? "successful" : "denied";
+ char *str1, *str2, *str3;
++ void *voidptr;
+ int num1, num2;
+ unsigned long ulong1, ulong2;
+ struct dentry *dentry;
@@ -32967,6 +34846,11 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_log.c linux-2.6.30.8/grsecurity/grsec
+ gr_log_middle_varargs(audit, msg, str1, gr_task_fullpath(task), task->comm, task->pid, cred->uid, cred->euid, cred->gid, cred->egid, gr_parent_task_fullpath(task), task->parent->comm, task->parent->pid, pcred->uid, pcred->euid, pcred->gid, pcred->egid);
+ break;
+ case GR_SIG:
++ str1 = va_arg(ap, char *);
++ voidptr = va_arg(ap, void *);
++ gr_log_middle_varargs(audit, msg, str1, voidptr);
++ break;
++ case GR_SIG2:
+ task = va_arg(ap, struct task_struct *);
+ cred = __task_cred(task);
+ pcred = __task_cred(task->parent);
@@ -33019,9 +34903,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_log.c linux-2.6.30.8/grsecurity/grsec
+ gr_log_end(audit);
+ END_LOCKS(audit);
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_mem.c linux-2.6.30.8/grsecurity/grsec_mem.c
---- linux-2.6.30.8/grsecurity/grsec_mem.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_mem.c 2009-08-25 20:16:56.107766046 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_mem.c linux-2.6.31.4/grsecurity/grsec_mem.c
+--- linux-2.6.31.4/grsecurity/grsec_mem.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_mem.c 2009-10-11 15:29:47.254390050 -0400
@@ -0,0 +1,79 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -33079,7 +34963,7 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_mem.c linux-2.6.30.8/grsecurity/grsec
+
+ /* allowed ranges : ISA I/O BIOS */
+ if ((start >= __pa(high_memory))
-+#ifdef CONFIG_X86
++#if defined(CONFIG_X86) || defined(CONFIG_PPC)
+ || (start >= 0x000a0000 && end <= 0x00100000)
+ || (start >= 0x00000000 && end <= 0x00001000)
+#endif
@@ -33102,9 +34986,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_mem.c linux-2.6.30.8/grsecurity/grsec
+ return;
+}
+
-diff -urNp linux-2.6.30.8/grsecurity/grsec_mount.c linux-2.6.30.8/grsecurity/grsec_mount.c
---- linux-2.6.30.8/grsecurity/grsec_mount.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_mount.c 2009-07-30 11:10:49.350327012 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_mount.c linux-2.6.31.4/grsecurity/grsec_mount.c
+--- linux-2.6.31.4/grsecurity/grsec_mount.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_mount.c 2009-10-11 15:29:47.254390050 -0400
@@ -0,0 +1,34 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -33140,26 +35024,33 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_mount.c linux-2.6.30.8/grsecurity/grs
+#endif
+ return;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_sig.c linux-2.6.30.8/grsecurity/grsec_sig.c
---- linux-2.6.30.8/grsecurity/grsec_sig.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_sig.c 2009-07-30 11:10:49.350327012 -0400
-@@ -0,0 +1,58 @@
+diff -urNp linux-2.6.31.4/grsecurity/grsec_sig.c linux-2.6.31.4/grsecurity/grsec_sig.c
+--- linux-2.6.31.4/grsecurity/grsec_sig.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_sig.c 2009-10-11 15:29:47.254390050 -0400
+@@ -0,0 +1,65 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/delay.h>
+#include <linux/grsecurity.h>
+#include <linux/grinternal.h>
+
++char *signames[] = {
++ [SIGSEGV] = "Segmentation fault",
++ [SIGILL] = "Illegal instruction",
++ [SIGABRT] = "Abort",
++ [SIGBUS] = "Invalid alignment/Bus error"
++};
++
+void
-+gr_log_signal(const int sig, const struct task_struct *t)
++gr_log_signal(const int sig, const void *addr, 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) {
-+ gr_log_int(GR_DONT_AUDIT_GOOD, GR_UNISIGLOG_MSG, sig);
++ gr_log_sig_addr(GR_DONT_AUDIT_GOOD, GR_UNISIGLOG_MSG, signames[sig], addr);
+ } else {
-+ gr_log_sig(GR_DONT_AUDIT_GOOD, GR_DUALSIGLOG_MSG, t, sig);
++ gr_log_sig_task(GR_DONT_AUDIT_GOOD, GR_DUALSIGLOG_MSG, t, sig);
+ }
+ }
+#endif
@@ -33171,7 +35062,7 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_sig.c linux-2.6.30.8/grsecurity/grsec
+{
+#ifdef CONFIG_GRKERNSEC
+ if (current->pid > 1 && gr_check_protected_task(p)) {
-+ gr_log_sig(GR_DONT_AUDIT, GR_SIG_ACL_MSG, p, sig);
++ gr_log_sig_task(GR_DONT_AUDIT, GR_SIG_ACL_MSG, p, sig);
+ return -EPERM;
+ } else if (gr_pid_is_chrooted((struct task_struct *)p)) {
+ return -EPERM;
@@ -33202,9 +35093,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_sig.c linux-2.6.30.8/grsecurity/grsec
+ return;
+}
+
-diff -urNp linux-2.6.30.8/grsecurity/grsec_sock.c linux-2.6.30.8/grsecurity/grsec_sock.c
---- linux-2.6.30.8/grsecurity/grsec_sock.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_sock.c 2009-07-30 11:10:49.350327012 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_sock.c linux-2.6.31.4/grsecurity/grsec_sock.c
+--- linux-2.6.31.4/grsecurity/grsec_sock.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_sock.c 2009-10-11 15:29:47.254390050 -0400
@@ -0,0 +1,269 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -33475,20 +35366,16 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_sock.c linux-2.6.30.8/grsecurity/grse
+ return current_cap();
+#endif
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_sysctl.c linux-2.6.30.8/grsecurity/grsec_sysctl.c
---- linux-2.6.30.8/grsecurity/grsec_sysctl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_sysctl.c 2009-07-30 11:10:49.351429069 -0400
-@@ -0,0 +1,435 @@
+diff -urNp linux-2.6.31.4/grsecurity/grsec_sysctl.c linux-2.6.31.4/grsecurity/grsec_sysctl.c
+--- linux-2.6.31.4/grsecurity/grsec_sysctl.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_sysctl.c 2009-10-11 15:29:47.255360315 -0400
+@@ -0,0 +1,403 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/sysctl.h>
+#include <linux/grsecurity.h>
+#include <linux/grinternal.h>
+
-+#ifdef CONFIG_GRKERNSEC_MODSTOP
-+int grsec_modstop;
-+#endif
-+
+int
+gr_handle_sysctl_mod(const char *dirname, const char *name, const int op)
+{
@@ -33498,17 +35385,10 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_sysctl.c linux-2.6.30.8/grsecurity/gr
+ return -EACCES;
+ }
+#endif
-+#ifdef CONFIG_GRKERNSEC_MODSTOP
-+ if (!strcmp(dirname, "grsecurity") && !strcmp(name, "disable_modules") &&
-+ grsec_modstop && (op & MAY_WRITE)) {
-+ gr_log_str(GR_DONT_AUDIT, GR_SYSCTL_MSG, name);
-+ return -EACCES;
-+ }
-+#endif
+ return 0;
+}
+
-+#if defined(CONFIG_GRKERNSEC_SYSCTL) || defined(CONFIG_GRKERNSEC_MODSTOP)
++#if defined(CONFIG_GRKERNSEC_SYSCTL)
+ctl_table grsecurity_table[] = {
+#ifdef CONFIG_GRKERNSEC_SYSCTL
+#ifdef CONFIG_GRKERNSEC_LINK
@@ -33831,16 +35711,6 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_sysctl.c linux-2.6.30.8/grsecurity/gr
+ .proc_handler = &proc_dointvec,
+ },
+#endif
-+#ifdef CONFIG_GRKERNSEC_AUDIT_IPC
-+ {
-+ .ctl_name = CTL_UNNUMBERED,
-+ .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 = CTL_UNNUMBERED,
@@ -33881,20 +35751,20 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_sysctl.c linux-2.6.30.8/grsecurity/gr
+ .proc_handler = &proc_dointvec,
+ },
+#endif
++#ifdef CONFIG_GRKERNSEC_HARDEN_PTRACE
+ {
+ .ctl_name = CTL_UNNUMBERED,
-+ .procname = "grsec_lock",
-+ .data = &grsec_lock,
++ .procname = "harden_ptrace",
++ .data = &grsec_enable_harden_ptrace,
+ .maxlen = sizeof(int),
+ .mode = 0600,
+ .proc_handler = &proc_dointvec,
+ },
+#endif
-+#ifdef CONFIG_GRKERNSEC_MODSTOP
+ {
+ .ctl_name = CTL_UNNUMBERED,
-+ .procname = "disable_modules",
-+ .data = &grsec_modstop,
++ .procname = "grsec_lock",
++ .data = &grsec_lock,
+ .maxlen = sizeof(int),
+ .mode = 0600,
+ .proc_handler = &proc_dointvec,
@@ -33903,20 +35773,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_sysctl.c linux-2.6.30.8/grsecurity/gr
+ { .ctl_name = 0 }
+};
+#endif
-+
-+int gr_check_modstop(void)
-+{
-+#ifdef CONFIG_GRKERNSEC_MODSTOP
-+ if (grsec_modstop == 1) {
-+ gr_log_noargs(GR_DONT_AUDIT, GR_STOPMOD_MSG);
-+ return 1;
-+ }
-+#endif
-+ return 0;
-+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_textrel.c linux-2.6.30.8/grsecurity/grsec_textrel.c
---- linux-2.6.30.8/grsecurity/grsec_textrel.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_textrel.c 2009-07-30 11:10:49.351429069 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_textrel.c linux-2.6.31.4/grsecurity/grsec_textrel.c
+--- linux-2.6.31.4/grsecurity/grsec_textrel.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_textrel.c 2009-10-11 15:29:47.255360315 -0400
@@ -0,0 +1,16 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -33934,9 +35793,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_textrel.c linux-2.6.30.8/grsecurity/g
+#endif
+ return;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_time.c linux-2.6.30.8/grsecurity/grsec_time.c
---- linux-2.6.30.8/grsecurity/grsec_time.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_time.c 2009-07-30 11:10:49.351429069 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_time.c linux-2.6.31.4/grsecurity/grsec_time.c
+--- linux-2.6.31.4/grsecurity/grsec_time.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_time.c 2009-10-11 15:29:47.255360315 -0400
@@ -0,0 +1,13 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -33951,9 +35810,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_time.c linux-2.6.30.8/grsecurity/grse
+#endif
+ return;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsec_tpe.c linux-2.6.30.8/grsecurity/grsec_tpe.c
---- linux-2.6.30.8/grsecurity/grsec_tpe.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsec_tpe.c 2009-07-30 11:10:49.351429069 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsec_tpe.c linux-2.6.31.4/grsecurity/grsec_tpe.c
+--- linux-2.6.31.4/grsecurity/grsec_tpe.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsec_tpe.c 2009-10-11 15:29:47.255360315 -0400
@@ -0,0 +1,38 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -33993,9 +35852,9 @@ diff -urNp linux-2.6.30.8/grsecurity/grsec_tpe.c linux-2.6.30.8/grsecurity/grsec
+#endif
+ return 1;
+}
-diff -urNp linux-2.6.30.8/grsecurity/grsum.c linux-2.6.30.8/grsecurity/grsum.c
---- linux-2.6.30.8/grsecurity/grsum.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/grsum.c 2009-07-30 11:10:49.351429069 -0400
+diff -urNp linux-2.6.31.4/grsecurity/grsum.c linux-2.6.31.4/grsecurity/grsum.c
+--- linux-2.6.31.4/grsecurity/grsum.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/grsum.c 2009-10-11 15:29:47.255360315 -0400
@@ -0,0 +1,59 @@
+#include <linux/err.h>
+#include <linux/kernel.h>
@@ -34056,10 +35915,10 @@ diff -urNp linux-2.6.30.8/grsecurity/grsum.c linux-2.6.30.8/grsecurity/grsum.c
+
+ return retval;
+}
-diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
---- linux-2.6.30.8/grsecurity/Kconfig 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/Kconfig 2009-08-26 16:13:37.905008848 -0400
-@@ -0,0 +1,915 @@
+diff -urNp linux-2.6.31.4/grsecurity/Kconfig linux-2.6.31.4/grsecurity/Kconfig
+--- linux-2.6.31.4/grsecurity/Kconfig 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/Kconfig 2009-10-11 15:29:47.256590155 -0400
+@@ -0,0 +1,908 @@
+#
+# grecurity configuration
+#
@@ -34070,8 +35929,6 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+ bool "Grsecurity"
+ select CRYPTO
+ select CRYPTO_SHA256
-+ select SECURITY
-+ select SECURITY_CAPABILITIES
+ 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
@@ -34093,7 +35950,6 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+ select GRKERNSEC_DMESG
+ select GRKERNSEC_CHROOT
+ select GRKERNSEC_CHROOT_CHDIR
-+ select GRKERNSEC_MODSTOP if (MODULES)
+
+ help
+ If you choose this option, several of the grsecurity options will
@@ -34137,12 +35993,11 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+ select GRKERNSEC_CHROOT_MKNOD
+ select GRKERNSEC_PROC
+ select GRKERNSEC_PROC_USERGROUP
-+ select GRKERNSEC_MODSTOP if (MODULES)
+ select PAX_RANDUSTACK
+ select PAX_ASLR
+ select PAX_RANDMMAP
-+ select PAX_REFCOUNT if (X86)
-+ select PAX_USERCOPY if (X86 && (SLAB || SLUB || SLOB))
++ select PAX_REFCOUNT if (X86 || SPARC64)
++ select PAX_USERCOPY if ((X86 || SPARC32 || SPARC64 || PPC32 || PPC64) && (SLAB || SLUB || SLOB))
+
+ help
+ If you say Y here, several features in addition to those included
@@ -34202,8 +36057,8 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+ select GRKERNSEC_CHROOT_CHMOD
+ select GRKERNSEC_CHROOT_NICE
+ select GRKERNSEC_AUDIT_MOUNT
-+ select GRKERNSEC_MODSTOP if (MODULES)
+ select GRKERNSEC_MODHARDEN if (MODULES)
++ select GRKERNSEC_HARDEN_PTRACE
+ select PAX
+ select PAX_RANDUSTACK
+ select PAX_ASLR
@@ -34218,14 +36073,12 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+ select PAX_RANDKSTACK if (X86_TSC && !X86_64)
+ select PAX_SEGMEXEC if (X86_32)
+ select PAX_PAGEEXEC
-+ select PAX_EMUPLT if (ALPHA || PARISC || PPC32 || SPARC32 || SPARC64)
-+ select PAX_DLRESOLVE if (SPARC32 || SPARC64)
-+ select PAX_SYSCALL if (PPC32)
++ select PAX_EMUPLT if (ALPHA || PARISC || SPARC32 || SPARC64)
+ select PAX_EMUTRAMP if (PARISC)
+ select PAX_EMUSIGRT if (PARISC)
+ select PAX_ETEXECRELOCS if (ALPHA || IA64 || PARISC)
-+ select PAX_REFCOUNT if (X86)
-+ select PAX_USERCOPY if (X86 && (SLAB || SLUB || SLOB))
++ select PAX_REFCOUNT if (X86 || SPARC64)
++ select PAX_USERCOPY if ((X86 || PPC32 || PPC64 || SPARC32 || SPARC64) && (SLAB || SLUB || SLOB))
+ help
+ If you say Y here, many of the features of grsecurity will be
+ enabled, which will protect you against many kinds of attacks
@@ -34254,6 +36107,7 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+ - Kernel symbol hiding
+ - Prevention of memory exhaustion-based exploits
+ - Hardening of module auto-loading
++ - Ptrace restrictions
+
+config GRKERNSEC_CUSTOM
+ bool "Custom"
@@ -34333,24 +36187,6 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+ enable signal logging in the auditing section so that logs are
+ generated when a process performs an illegal instruction.
+
-+config GRKERNSEC_MODSTOP
-+ bool "Runtime module disabling"
-+ depends on MODULES
-+ help
-+ If you say Y here, you will be able to disable the ability to (un)load
-+ modules at runtime. This feature is useful if you need the ability
-+ to load kernel modules at boot time, but do not want to allow an
-+ attacker to load a rootkit kernel module into the system, or to remove
-+ a loaded kernel module important to system functioning. You should
-+ enable the /dev/mem protection feature as well, since rootkits can be
-+ inserted into the kernel via other methods than kernel modules. Since
-+ an untrusted module could still be loaded by modifying init scripts and
-+ rebooting the system, it is also recommended that you enable the RBAC
-+ system. If you enable this option, a sysctl option with name
-+ "disable_modules" will be created. Setting this option to "1" disables
-+ module loading. After this option is set, no further writes to it are
-+ allowed until the system is rebooted.
-+
+config GRKERNSEC_MODHARDEN
+ bool "Harden module auto-loading"
+ depends on MODULES
@@ -34363,26 +36199,33 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+
+ If this option prevents a legitimate use of auto-loading for a
+ non-root user, the administrator can execute modprobe manually
-+ with the exact name of the module mentioned in the alert log.
-+ Alternatively, the administrator can add the module to the
-+ list of modules loaded at boot by modifying init scripts.
++ with the exact name of the module mentioned in the alert log.
++ Alternatively, the administrator can add the module to the list
++ of modules loaded at boot by modifying init scripts.
++
++ Modification of init scripts will most likely be needed on
++ Ubuntu servers with encrypted home directory support enabled,
++ as the first non-root user logging in will cause the ecb(aes),
++ ecb(aes)-all, cbc(aes), and cbc(aes)-all modules to be loaded.
+
+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:
++ to users with CAP_SYS_MODULE. For software compatibility reasons,
++ /proc/kallsyms will be restricted to the root user. The RBAC
++ system can hide that entry even from root. Note that 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 RBAC system and hiding other files such as your
+ kernel image and System.map. Alternatively, enabling this option
+ causes the permissions on /boot, /lib/modules, and the kernel
+ source directory to change at compile time to prevent
+ reading by non-root users.
-+ 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.
++ If the above conditions are met, this option will aid in providing a
++ useful protection against local kernel exploitation of overflows
++ and arbitrary read/write vulnerabilities.
+
+endmenu
+menu "Role Based Access Control Options"
@@ -34645,7 +36488,7 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+config GRKERNSEC_AUDIT_GROUP
+ bool "Single group for auditing"
+ help
-+ If you say Y here, the exec, chdir, (un)mount, and ipc logging features
++ If you say Y here, the exec, chdir, and (un)mount 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,
@@ -34698,13 +36541,6 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+ 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
@@ -34775,6 +36611,22 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+ If the sysctl option is enabled, a sysctl option with name "dmesg" is
+ created.
+
++config GRKERNSEC_HARDEN_PTRACE
++ bool "Deter ptrace-based process snooping"
++ help
++ If you say Y here, TTY sniffers and other malicious monitoring
++ programs implemented through ptrace will be defeated. If you
++ have been using the RBAC system, this option has already been
++ enabled for several years for all users, with the ability to make
++ fine-grained exceptions.
++
++ This option only affects the ability of non-root users to ptrace
++ processes that are not a descendent of the ptracing process.
++ This means that strace ./binary and gdb ./binary will still work,
++ but attaching to arbitrary processes will not. If the sysctl
++ option is enabled, a sysctl option with name "harden_ptrace" is
++ created.
++
+config GRKERNSEC_TPE
+ bool "Trusted Path Execution (TPE)"
+ help
@@ -34975,9 +36827,9 @@ diff -urNp linux-2.6.30.8/grsecurity/Kconfig linux-2.6.30.8/grsecurity/Kconfig
+endmenu
+
+endmenu
-diff -urNp linux-2.6.30.8/grsecurity/Makefile linux-2.6.30.8/grsecurity/Makefile
---- linux-2.6.30.8/grsecurity/Makefile 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/grsecurity/Makefile 2009-09-06 22:11:06.466051742 -0400
+diff -urNp linux-2.6.31.4/grsecurity/Makefile linux-2.6.31.4/grsecurity/Makefile
+--- linux-2.6.31.4/grsecurity/Makefile 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/grsecurity/Makefile 2009-10-11 15:29:47.256590155 -0400
@@ -0,0 +1,29 @@
+# grsecurity's ACL system was originally written in 2001 by Michael Dalton
+# during 2001-2009 it has been completely redesigned by Brad Spengler
@@ -34989,7 +36841,7 @@ diff -urNp linux-2.6.30.8/grsecurity/Makefile linux-2.6.30.8/grsecurity/Makefile
+
+obj-y = grsec_chdir.o grsec_chroot.o grsec_exec.o grsec_fifo.o grsec_fork.o \
+ grsec_mount.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
++ grsec_time.o grsec_tpe.o grsec_link.o grsec_textrel.o
+
+obj-$(CONFIG_GRKERNSEC) += grsec_init.o grsum.o gracl.o gracl_ip.o gracl_segv.o \
+ gracl_cap.o gracl_alloc.o gracl_shm.o grsec_mem.o gracl_fs.o \
@@ -35008,9 +36860,188 @@ diff -urNp linux-2.6.30.8/grsecurity/Makefile linux-2.6.30.8/grsecurity/Makefile
+ @-chmod -f 700 .
+ @echo ' grsec: protected kernel image paths'
+endif
-diff -urNp linux-2.6.30.8/include/asm-generic/futex.h linux-2.6.30.8/include/asm-generic/futex.h
---- linux-2.6.30.8/include/asm-generic/futex.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/asm-generic/futex.h 2009-07-30 09:48:10.105294791 -0400
+diff -urNp linux-2.6.31.4/include/asm-generic/atomic.h linux-2.6.31.4/include/asm-generic/atomic.h
+--- linux-2.6.31.4/include/asm-generic/atomic.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/asm-generic/atomic.h 2009-10-11 15:29:47.280427780 -0400
+@@ -36,6 +36,15 @@
+ #define atomic_read(v) ((v)->counter)
+
+ /**
++ * atomic_read_unchecked - read atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically reads the value of @v. Note that the guaranteed
++ * useful range of an atomic_unchecked_t is only 24 bits.
++ */
++#define atomic_read_unchecked(v) ((v)->counter)
++
++/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+@@ -45,6 +54,16 @@
+ */
+ #define atomic_set(v, i) (((v)->counter) = (i))
+
++/**
++ * atomic_set_unchecked - set atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ * @i: required value
++ *
++ * Atomically sets the value of @v to @i. Note that the guaranteed
++ * useful range of an atomic_unchecked_t is only 24 bits.
++ */
++#define atomic_set_unchecked(v, i) (((v)->counter) = (i))
++
+ #include <asm/system.h>
+
+ /**
+@@ -101,16 +120,31 @@ static inline void atomic_add(int i, ato
+ atomic_add_return(i, v);
+ }
+
++static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_add_return(i, (atomic_t *)v);
++}
++
+ static inline void atomic_sub(int i, atomic_t *v)
+ {
+ atomic_sub_return(i, v);
+ }
+
++static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
++{
++ atomic_sub_return(i, (atomic_t *)v);
++}
++
+ static inline void atomic_inc(atomic_t *v)
+ {
+ atomic_add_return(1, v);
+ }
+
++static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
++{
++ atomic_add_return(1, (atomic_t *)v);
++}
++
+ static inline void atomic_dec(atomic_t *v)
+ {
+ atomic_sub_return(1, v);
+diff -urNp linux-2.6.31.4/include/asm-generic/dma-mapping-common.h linux-2.6.31.4/include/asm-generic/dma-mapping-common.h
+--- linux-2.6.31.4/include/asm-generic/dma-mapping-common.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/asm-generic/dma-mapping-common.h 2009-10-11 15:29:56.711807864 -0400
+@@ -11,7 +11,7 @@ static inline dma_addr_t dma_map_single_
+ enum dma_data_direction dir,
+ struct dma_attrs *attrs)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+ dma_addr_t addr;
+
+ kmemcheck_mark_initialized(ptr, size);
+@@ -30,7 +30,7 @@ static inline void dma_unmap_single_attr
+ enum dma_data_direction dir,
+ struct dma_attrs *attrs)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ if (ops->unmap_page)
+@@ -42,7 +42,7 @@ static inline int dma_map_sg_attrs(struc
+ int nents, enum dma_data_direction dir,
+ struct dma_attrs *attrs)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+ int i, ents;
+ struct scatterlist *s;
+
+@@ -59,7 +59,7 @@ static inline void dma_unmap_sg_attrs(st
+ int nents, enum dma_data_direction dir,
+ struct dma_attrs *attrs)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ debug_dma_unmap_sg(dev, sg, nents, dir);
+@@ -71,7 +71,7 @@ static inline dma_addr_t dma_map_page(st
+ size_t offset, size_t size,
+ enum dma_data_direction dir)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+ dma_addr_t addr;
+
+ kmemcheck_mark_initialized(page_address(page) + offset, size);
+@@ -85,7 +85,7 @@ static inline dma_addr_t dma_map_page(st
+ static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
+ size_t size, enum dma_data_direction dir)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ if (ops->unmap_page)
+@@ -97,7 +97,7 @@ static inline void dma_sync_single_for_c
+ size_t size,
+ enum dma_data_direction dir)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ if (ops->sync_single_for_cpu)
+@@ -110,7 +110,7 @@ static inline void dma_sync_single_for_d
+ dma_addr_t addr, size_t size,
+ enum dma_data_direction dir)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ if (ops->sync_single_for_device)
+@@ -125,7 +125,7 @@ static inline void dma_sync_single_range
+ size_t size,
+ enum dma_data_direction dir)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ if (ops->sync_single_range_for_cpu) {
+@@ -143,7 +143,7 @@ static inline void dma_sync_single_range
+ size_t size,
+ enum dma_data_direction dir)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ if (ops->sync_single_range_for_device) {
+@@ -159,7 +159,7 @@ static inline void
+ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
+ int nelems, enum dma_data_direction dir)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ if (ops->sync_sg_for_cpu)
+@@ -172,7 +172,7 @@ static inline void
+ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
+ int nelems, enum dma_data_direction dir)
+ {
+- struct dma_map_ops *ops = get_dma_ops(dev);
++ const struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ if (ops->sync_sg_for_device)
+diff -urNp linux-2.6.31.4/include/asm-generic/futex.h linux-2.6.31.4/include/asm-generic/futex.h
+--- linux-2.6.31.4/include/asm-generic/futex.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/asm-generic/futex.h 2009-10-11 15:29:47.300367529 -0400
@@ -6,7 +6,7 @@
#include <asm/errno.h>
@@ -35029,10 +37060,10 @@ diff -urNp linux-2.6.30.8/include/asm-generic/futex.h linux-2.6.30.8/include/asm
{
return -ENOSYS;
}
-diff -urNp linux-2.6.30.8/include/asm-generic/int-l64.h linux-2.6.30.8/include/asm-generic/int-l64.h
---- linux-2.6.30.8/include/asm-generic/int-l64.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/asm-generic/int-l64.h 2009-07-30 09:48:10.105294791 -0400
-@@ -44,6 +44,8 @@ typedef unsigned int u32;
+diff -urNp linux-2.6.31.4/include/asm-generic/int-l64.h linux-2.6.31.4/include/asm-generic/int-l64.h
+--- linux-2.6.31.4/include/asm-generic/int-l64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/asm-generic/int-l64.h 2009-10-11 15:29:47.309396912 -0400
+@@ -46,6 +46,8 @@ typedef unsigned int u32;
typedef signed long s64;
typedef unsigned long u64;
@@ -35041,10 +37072,10 @@ diff -urNp linux-2.6.30.8/include/asm-generic/int-l64.h linux-2.6.30.8/include/a
#define S8_C(x) x
#define U8_C(x) x ## U
#define S16_C(x) x
-diff -urNp linux-2.6.30.8/include/asm-generic/int-ll64.h linux-2.6.30.8/include/asm-generic/int-ll64.h
---- linux-2.6.30.8/include/asm-generic/int-ll64.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/asm-generic/int-ll64.h 2009-07-30 09:48:10.105294791 -0400
-@@ -49,6 +49,8 @@ typedef unsigned int u32;
+diff -urNp linux-2.6.31.4/include/asm-generic/int-ll64.h linux-2.6.31.4/include/asm-generic/int-ll64.h
+--- linux-2.6.31.4/include/asm-generic/int-ll64.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/asm-generic/int-ll64.h 2009-10-11 15:29:47.309396912 -0400
+@@ -51,6 +51,8 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
@@ -35053,10 +37084,41 @@ diff -urNp linux-2.6.30.8/include/asm-generic/int-ll64.h linux-2.6.30.8/include/
#define S8_C(x) x
#define U8_C(x) x ## U
#define S16_C(x) x
-diff -urNp linux-2.6.30.8/include/asm-generic/vmlinux.lds.h linux-2.6.30.8/include/asm-generic/vmlinux.lds.h
---- linux-2.6.30.8/include/asm-generic/vmlinux.lds.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/asm-generic/vmlinux.lds.h 2009-08-09 07:48:48.045905474 -0400
-@@ -121,6 +121,7 @@
+diff -urNp linux-2.6.31.4/include/asm-generic/kmap_types.h linux-2.6.31.4/include/asm-generic/kmap_types.h
+--- linux-2.6.31.4/include/asm-generic/kmap_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/asm-generic/kmap_types.h 2009-10-11 15:29:47.321362391 -0400
+@@ -27,7 +27,8 @@ D(15) KM_UML_USERCOPY, /* UML specific,
+ D(16) KM_IRQ_PTE,
+ D(17) KM_NMI,
+ D(18) KM_NMI_PTE,
+-D(19) KM_TYPE_NR
++D(19) KM_CLEARPAGE,
++D(20) KM_TYPE_NR
+ };
+
+ #undef D
+diff -urNp linux-2.6.31.4/include/asm-generic/pgtable.h linux-2.6.31.4/include/asm-generic/pgtable.h
+--- linux-2.6.31.4/include/asm-generic/pgtable.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/asm-generic/pgtable.h 2009-10-14 17:18:22.973363290 -0400
+@@ -344,6 +344,14 @@ extern void untrack_pfn_vma(struct vm_ar
+ unsigned long size);
+ #endif
+
++#ifndef __HAVE_ARCH_PAX_OPEN_KERNEL
++static inline unsigned long pax_open_kernel(void) { return 0; }
++#endif
++
++#ifndef __HAVE_ARCH_PAX_CLOSE_KERNEL
++static inline unsigned long pax_close_kernel(void) { return 0; }
++#endif
++
+ #endif /* !__ASSEMBLY__ */
+
+ #endif /* _ASM_GENERIC_PGTABLE_H */
+diff -urNp linux-2.6.31.4/include/asm-generic/vmlinux.lds.h linux-2.6.31.4/include/asm-generic/vmlinux.lds.h
+--- linux-2.6.31.4/include/asm-generic/vmlinux.lds.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/asm-generic/vmlinux.lds.h 2009-10-11 15:29:47.322365212 -0400
+@@ -201,6 +201,7 @@
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_rodata) = .; \
*(.rodata) *(.rodata.*) \
@@ -35064,7 +37126,7 @@ diff -urNp linux-2.6.30.8/include/asm-generic/vmlinux.lds.h linux-2.6.30.8/inclu
*(__vermagic) /* Kernel version magic */ \
*(__markers_strings) /* Markers: strings */ \
*(__tracepoints_strings)/* Tracepoints: strings */ \
-@@ -468,22 +469,24 @@
+@@ -641,22 +642,24 @@
* section in the linker script will go there too. @phdr should have
* a leading colon.
*
@@ -35094,19 +37156,19 @@ diff -urNp linux-2.6.30.8/include/asm-generic/vmlinux.lds.h linux-2.6.30.8/inclu
/**
* PERCPU - define output section for percpu area, simple version
-diff -urNp linux-2.6.30.8/include/drm/drm_pciids.h linux-2.6.30.8/include/drm/drm_pciids.h
---- linux-2.6.30.8/include/drm/drm_pciids.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/drm/drm_pciids.h 2009-07-30 09:48:10.106233963 -0400
-@@ -356,7 +356,7 @@
- {0x1002, 0x9614, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
- {0x1002, 0x9615, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
- {0x1002, 0x9616, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+diff -urNp linux-2.6.31.4/include/drm/drm_pciids.h linux-2.6.31.4/include/drm/drm_pciids.h
+--- linux-2.6.31.4/include/drm/drm_pciids.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/drm/drm_pciids.h 2009-10-11 15:29:47.327392261 -0400
+@@ -375,7 +375,7 @@
+ {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+ {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+ {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
- {0, 0, 0}
+ {0, 0, 0, 0, 0, 0}
#define r128_PCI_IDS \
{0x1002, 0x4c45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -396,14 +396,14 @@
+@@ -415,14 +415,14 @@
{0x1002, 0x5446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1002, 0x544C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1002, 0x5452, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -35123,7 +37185,7 @@ diff -urNp linux-2.6.30.8/include/drm/drm_pciids.h linux-2.6.30.8/include/drm/dr
#define mach64_PCI_IDS \
{0x1002, 0x4749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -426,7 +426,7 @@
+@@ -445,7 +445,7 @@
{0x1002, 0x4c53, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1002, 0x4c4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1002, 0x4c4e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -35132,7 +37194,7 @@ diff -urNp linux-2.6.30.8/include/drm/drm_pciids.h linux-2.6.30.8/include/drm/dr
#define sisdrv_PCI_IDS \
{0x1039, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -437,7 +437,7 @@
+@@ -456,7 +456,7 @@
{0x1039, 0x7300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x18CA, 0x0040, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \
{0x18CA, 0x0042, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \
@@ -35141,7 +37203,7 @@ diff -urNp linux-2.6.30.8/include/drm/drm_pciids.h linux-2.6.30.8/include/drm/dr
#define tdfx_PCI_IDS \
{0x121a, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -446,7 +446,7 @@
+@@ -465,7 +465,7 @@
{0x121a, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x121a, 0x0009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x121a, 0x000b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -35150,7 +37212,7 @@ diff -urNp linux-2.6.30.8/include/drm/drm_pciids.h linux-2.6.30.8/include/drm/dr
#define viadrv_PCI_IDS \
{0x1106, 0x3022, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -458,14 +458,14 @@
+@@ -477,14 +477,14 @@
{0x1106, 0x3343, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1106, 0x3230, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VIA_DX9_0}, \
{0x1106, 0x3157, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VIA_PRO_GROUP_A}, \
@@ -35167,7 +37229,7 @@ diff -urNp linux-2.6.30.8/include/drm/drm_pciids.h linux-2.6.30.8/include/drm/dr
#define i830_PCI_IDS \
{0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -473,11 +473,11 @@
+@@ -492,11 +492,11 @@
{0x8086, 0x3582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x8086, 0x358e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -35181,7 +37243,7 @@ diff -urNp linux-2.6.30.8/include/drm/drm_pciids.h linux-2.6.30.8/include/drm/dr
#define savage_PCI_IDS \
{0x5333, 0x8a20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_SAVAGE3D}, \
-@@ -503,10 +503,10 @@
+@@ -522,10 +522,10 @@
{0x5333, 0x8d02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_TWISTER}, \
{0x5333, 0x8d03, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \
{0x5333, 0x8d04, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \
@@ -35194,16 +37256,16 @@ diff -urNp linux-2.6.30.8/include/drm/drm_pciids.h linux-2.6.30.8/include/drm/dr
#define i915_PCI_IDS \
{0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
-@@ -536,4 +536,4 @@
- {0x8086, 0xa001, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
- {0x8086, 0xa011, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
+@@ -557,4 +557,4 @@
{0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
+ {0x8086, 0x0042, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
+ {0x8086, 0x0046, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
- {0, 0, 0}
+ {0, 0, 0, 0, 0, 0}
-diff -urNp linux-2.6.30.8/include/drm/drmP.h linux-2.6.30.8/include/drm/drmP.h
---- linux-2.6.30.8/include/drm/drmP.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/drm/drmP.h 2009-07-30 09:48:10.106233963 -0400
-@@ -783,7 +783,7 @@ struct drm_driver {
+diff -urNp linux-2.6.31.4/include/drm/drmP.h linux-2.6.31.4/include/drm/drmP.h
+--- linux-2.6.31.4/include/drm/drmP.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/drm/drmP.h 2009-10-11 15:29:47.334563558 -0400
+@@ -787,7 +787,7 @@ struct drm_driver {
void (*gem_free_object) (struct drm_gem_object *obj);
/* Driver private ops for this object */
@@ -35212,7 +37274,7 @@ diff -urNp linux-2.6.30.8/include/drm/drmP.h linux-2.6.30.8/include/drm/drmP.h
int major;
int minor;
-@@ -886,7 +886,7 @@ struct drm_device {
+@@ -890,7 +890,7 @@ struct drm_device {
/** \name Usage Counters */
/*@{ */
@@ -35221,7 +37283,7 @@ diff -urNp linux-2.6.30.8/include/drm/drmP.h linux-2.6.30.8/include/drm/drmP.h
atomic_t ioctl_count; /**< Outstanding IOCTLs pending */
atomic_t vma_count; /**< Outstanding vma areas open */
int buf_use; /**< Buffers in use -- cannot alloc */
-@@ -897,7 +897,7 @@ struct drm_device {
+@@ -901,7 +901,7 @@ struct drm_device {
/*@{ */
unsigned long counters;
enum drm_stat_type types[15];
@@ -35230,9 +37292,21 @@ diff -urNp linux-2.6.30.8/include/drm/drmP.h linux-2.6.30.8/include/drm/drmP.h
/*@} */
struct list_head filelist;
-diff -urNp linux-2.6.30.8/include/linux/a.out.h linux-2.6.30.8/include/linux/a.out.h
---- linux-2.6.30.8/include/linux/a.out.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/a.out.h 2009-07-30 09:48:10.107682096 -0400
+diff -urNp linux-2.6.31.4/include/linux/agp_backend.h linux-2.6.31.4/include/linux/agp_backend.h
+--- linux-2.6.31.4/include/linux/agp_backend.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/agp_backend.h 2009-10-11 15:29:47.337650931 -0400
+@@ -53,7 +53,7 @@ struct agp_kern_info {
+ int current_memory;
+ bool cant_use_aperture;
+ unsigned long page_mask;
+- struct vm_operations_struct *vm_ops;
++ const struct vm_operations_struct *vm_ops;
+ };
+
+ /*
+diff -urNp linux-2.6.31.4/include/linux/a.out.h linux-2.6.31.4/include/linux/a.out.h
+--- linux-2.6.31.4/include/linux/a.out.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/a.out.h 2009-10-11 15:29:47.355716224 -0400
@@ -39,6 +39,14 @@ enum machine_type {
M_MIPS2 = 152 /* MIPS R6000/R4000 binary */
};
@@ -35248,9 +37322,9 @@ diff -urNp linux-2.6.30.8/include/linux/a.out.h linux-2.6.30.8/include/linux/a.o
#if !defined (N_MAGIC)
#define N_MAGIC(exec) ((exec).a_info & 0xffff)
#endif
-diff -urNp linux-2.6.30.8/include/linux/atmdev.h linux-2.6.30.8/include/linux/atmdev.h
---- linux-2.6.30.8/include/linux/atmdev.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/atmdev.h 2009-07-30 09:48:10.107682096 -0400
+diff -urNp linux-2.6.31.4/include/linux/atmdev.h linux-2.6.31.4/include/linux/atmdev.h
+--- linux-2.6.31.4/include/linux/atmdev.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/atmdev.h 2009-10-11 15:29:47.367432821 -0400
@@ -237,7 +237,7 @@ struct compat_atm_iobuf {
#endif
@@ -35260,9 +37334,9 @@ diff -urNp linux-2.6.30.8/include/linux/atmdev.h linux-2.6.30.8/include/linux/at
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
};
-diff -urNp linux-2.6.30.8/include/linux/binfmts.h linux-2.6.30.8/include/linux/binfmts.h
---- linux-2.6.30.8/include/linux/binfmts.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/binfmts.h 2009-07-30 09:48:10.107682096 -0400
+diff -urNp linux-2.6.31.4/include/linux/binfmts.h linux-2.6.31.4/include/linux/binfmts.h
+--- linux-2.6.31.4/include/linux/binfmts.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/binfmts.h 2009-10-11 15:29:47.379373325 -0400
@@ -78,6 +78,7 @@ struct linux_binfmt {
int (*load_binary)(struct linux_binprm *, struct pt_regs * regs);
int (*load_shlib)(struct file *);
@@ -35271,9 +37345,9 @@ diff -urNp linux-2.6.30.8/include/linux/binfmts.h linux-2.6.30.8/include/linux/b
unsigned long min_coredump; /* minimal dump size */
int hasvdso;
};
-diff -urNp linux-2.6.30.8/include/linux/cache.h linux-2.6.30.8/include/linux/cache.h
---- linux-2.6.30.8/include/linux/cache.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/cache.h 2009-07-30 09:48:10.107682096 -0400
+diff -urNp linux-2.6.31.4/include/linux/cache.h linux-2.6.31.4/include/linux/cache.h
+--- linux-2.6.31.4/include/linux/cache.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/cache.h 2009-10-11 15:29:47.392478261 -0400
@@ -16,6 +16,10 @@
#define __read_mostly
#endif
@@ -35285,9 +37359,9 @@ diff -urNp linux-2.6.30.8/include/linux/cache.h linux-2.6.30.8/include/linux/cac
#ifndef ____cacheline_aligned
#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
#endif
-diff -urNp linux-2.6.30.8/include/linux/capability.h linux-2.6.30.8/include/linux/capability.h
---- linux-2.6.30.8/include/linux/capability.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/capability.h 2009-07-30 11:10:49.423442785 -0400
+diff -urNp linux-2.6.31.4/include/linux/capability.h linux-2.6.31.4/include/linux/capability.h
+--- linux-2.6.31.4/include/linux/capability.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/capability.h 2009-10-11 15:29:47.401611590 -0400
@@ -563,6 +563,7 @@ extern const kernel_cap_t __cap_init_eff
(security_real_capable_noaudit((t), (cap)) == 0)
@@ -35296,9 +37370,9 @@ diff -urNp linux-2.6.30.8/include/linux/capability.h linux-2.6.30.8/include/linu
/* audit system wants to get cap info from files as well */
struct dentry;
-diff -urNp linux-2.6.30.8/include/linux/cgroup.h linux-2.6.30.8/include/linux/cgroup.h
---- linux-2.6.30.8/include/linux/cgroup.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/cgroup.h 2009-07-30 09:48:10.107682096 -0400
+diff -urNp linux-2.6.31.4/include/linux/cgroup.h linux-2.6.31.4/include/linux/cgroup.h
+--- linux-2.6.31.4/include/linux/cgroup.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/cgroup.h 2009-10-11 15:29:47.405492510 -0400
@@ -37,7 +37,7 @@ extern void cgroup_exit(struct task_stru
extern int cgroupstats_build(struct cgroupstats *stats,
struct dentry *dentry);
@@ -35308,9 +37382,47 @@ diff -urNp linux-2.6.30.8/include/linux/cgroup.h linux-2.6.30.8/include/linux/cg
/* Define the enumeration of all cgroup subsystems */
#define SUBSYS(_x) _x ## _subsys_id,
-diff -urNp linux-2.6.30.8/include/linux/cpumask.h linux-2.6.30.8/include/linux/cpumask.h
---- linux-2.6.30.8/include/linux/cpumask.h 2009-09-09 17:37:33.843140347 -0400
-+++ linux-2.6.30.8/include/linux/cpumask.h 2009-09-09 17:37:58.224985454 -0400
+diff -urNp linux-2.6.31.4/include/linux/compiler-gcc4.h linux-2.6.31.4/include/linux/compiler-gcc4.h
+--- linux-2.6.31.4/include/linux/compiler-gcc4.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/compiler-gcc4.h 2009-10-11 15:29:47.411368244 -0400
+@@ -36,4 +36,8 @@
+ the kernel context */
+ #define __cold __attribute__((__cold__))
+
++#define __alloc_size(...) __attribute((alloc_size(__VA_ARGS__)))
++#define __bos(ptr, arg) __builtin_object_size((ptr), (arg))
++#define __bos0(ptr) __bos((ptr), 0)
++#define __bos1(ptr) __bos((ptr), 1)
+ #endif
+diff -urNp linux-2.6.31.4/include/linux/compiler.h linux-2.6.31.4/include/linux/compiler.h
+--- linux-2.6.31.4/include/linux/compiler.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/compiler.h 2009-10-11 15:29:47.415845902 -0400
+@@ -256,6 +256,22 @@ void ftrace_likely_update(struct ftrace_
+ #define __cold
+ #endif
+
++#ifndef __alloc_size
++#define __alloc_size
++#endif
++
++#ifndef __bos
++#define __bos
++#endif
++
++#ifndef __bos0
++#define __bos0
++#endif
++
++#ifndef __bos1
++#define __bos1
++#endif
++
+ /* Simple shorthand for a section definition */
+ #ifndef __section
+ # define __section(S) __attribute__ ((__section__(#S)))
+diff -urNp linux-2.6.31.4/include/linux/cpumask.h linux-2.6.31.4/include/linux/cpumask.h
+--- linux-2.6.31.4/include/linux/cpumask.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/cpumask.h 2009-10-11 15:29:47.428461116 -0400
@@ -142,7 +142,6 @@
#include <linux/bitmap.h>
@@ -35319,9 +37431,9 @@ diff -urNp linux-2.6.30.8/include/linux/cpumask.h linux-2.6.30.8/include/linux/c
#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
-diff -urNp linux-2.6.30.8/include/linux/decompress/mm.h linux-2.6.30.8/include/linux/decompress/mm.h
---- linux-2.6.30.8/include/linux/decompress/mm.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/decompress/mm.h 2009-08-24 21:08:46.315606063 -0400
+diff -urNp linux-2.6.31.4/include/linux/decompress/mm.h linux-2.6.31.4/include/linux/decompress/mm.h
+--- linux-2.6.31.4/include/linux/decompress/mm.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/decompress/mm.h 2009-10-11 15:29:47.462648043 -0400
@@ -68,7 +68,7 @@ static void free(void *where)
* warnings when not needed (indeed large_malloc / large_free are not
* needed by inflate */
@@ -35331,9 +37443,9 @@ diff -urNp linux-2.6.30.8/include/linux/decompress/mm.h linux-2.6.30.8/include/l
#define free(a) kfree(a)
#define large_malloc(a) vmalloc(a)
-diff -urNp linux-2.6.30.8/include/linux/elf.h linux-2.6.30.8/include/linux/elf.h
---- linux-2.6.30.8/include/linux/elf.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/elf.h 2009-07-30 09:48:10.109008378 -0400
+diff -urNp linux-2.6.31.4/include/linux/elf.h linux-2.6.31.4/include/linux/elf.h
+--- linux-2.6.31.4/include/linux/elf.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/elf.h 2009-10-11 15:29:47.475692461 -0400
@@ -49,6 +49,17 @@ typedef __s64 Elf64_Sxword;
#define PT_GNU_EH_FRAME 0x6474e550
@@ -35406,9 +37518,9 @@ diff -urNp linux-2.6.30.8/include/linux/elf.h linux-2.6.30.8/include/linux/elf.h
#endif
-diff -urNp linux-2.6.30.8/include/linux/fs.h linux-2.6.30.8/include/linux/fs.h
---- linux-2.6.30.8/include/linux/fs.h 2009-09-09 17:37:33.851140018 -0400
-+++ linux-2.6.30.8/include/linux/fs.h 2009-09-09 17:37:58.242919591 -0400
+diff -urNp linux-2.6.31.4/include/linux/fs.h linux-2.6.31.4/include/linux/fs.h
+--- linux-2.6.31.4/include/linux/fs.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/fs.h 2009-10-11 15:29:47.499468747 -0400
@@ -87,6 +87,10 @@ struct inodes_stat_t {
*/
#define FMODE_NOCMTIME ((__force fmode_t)2048)
@@ -35420,7 +37532,7 @@ diff -urNp linux-2.6.30.8/include/linux/fs.h linux-2.6.30.8/include/linux/fs.h
/*
* The below are the various read and write types that we support. Some of
* them include behavioral modifiers that send information down to the
-@@ -2424,7 +2428,7 @@ static int __fops ## _open(struct inode
+@@ -2430,7 +2434,7 @@ static int __fops ## _open(struct inode
__simple_attr_check_format(__fmt, 0ull); \
return simple_attr_open(inode, file, __get, __set, __fmt); \
} \
@@ -35429,9 +37541,9 @@ diff -urNp linux-2.6.30.8/include/linux/fs.h linux-2.6.30.8/include/linux/fs.h
.owner = THIS_MODULE, \
.open = __fops ## _open, \
.release = simple_attr_release, \
-diff -urNp linux-2.6.30.8/include/linux/fs_struct.h linux-2.6.30.8/include/linux/fs_struct.h
---- linux-2.6.30.8/include/linux/fs_struct.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/fs_struct.h 2009-07-30 09:48:10.109883773 -0400
+diff -urNp linux-2.6.31.4/include/linux/fs_struct.h linux-2.6.31.4/include/linux/fs_struct.h
+--- linux-2.6.31.4/include/linux/fs_struct.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/fs_struct.h 2009-10-11 15:29:47.511362721 -0400
@@ -4,7 +4,7 @@
#include <linux/path.h>
@@ -35441,10 +37553,10 @@ diff -urNp linux-2.6.30.8/include/linux/fs_struct.h linux-2.6.30.8/include/linux
rwlock_t lock;
int umask;
int in_exec;
-diff -urNp linux-2.6.30.8/include/linux/genhd.h linux-2.6.30.8/include/linux/genhd.h
---- linux-2.6.30.8/include/linux/genhd.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/genhd.h 2009-07-30 09:48:10.109883773 -0400
-@@ -159,7 +159,7 @@ struct gendisk {
+diff -urNp linux-2.6.31.4/include/linux/genhd.h linux-2.6.31.4/include/linux/genhd.h
+--- linux-2.6.31.4/include/linux/genhd.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/genhd.h 2009-10-11 15:29:47.525436446 -0400
+@@ -161,7 +161,7 @@ struct gendisk {
struct timer_rand_state *random;
@@ -35453,10 +37565,10 @@ diff -urNp linux-2.6.30.8/include/linux/genhd.h linux-2.6.30.8/include/linux/gen
struct work_struct async_notify;
#ifdef CONFIG_BLK_DEV_INTEGRITY
struct blk_integrity *integrity;
-diff -urNp linux-2.6.30.8/include/linux/gracl.h linux-2.6.30.8/include/linux/gracl.h
---- linux-2.6.30.8/include/linux/gracl.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/include/linux/gracl.h 2009-07-30 11:10:49.440849797 -0400
-@@ -0,0 +1,318 @@
+diff -urNp linux-2.6.31.4/include/linux/gracl.h linux-2.6.31.4/include/linux/gracl.h
+--- linux-2.6.31.4/include/linux/gracl.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/include/linux/gracl.h 2009-10-11 15:29:47.525436446 -0400
+@@ -0,0 +1,309 @@
+#ifndef GR_ACL_H
+#define GR_ACL_H
+
@@ -35709,7 +37821,7 @@ diff -urNp linux-2.6.30.8/include/linux/gracl.h linux-2.6.30.8/include/linux/gra
+static __inline__ unsigned int
+rhash(const uid_t uid, const __u16 type, const unsigned int sz)
+{
-+ return (((uid << type) + (uid ^ type)) % sz);
++ return ((((uid + type) << (16 + type)) ^ uid) % sz);
+}
+
+ static __inline__ unsigned int
@@ -35727,24 +37839,15 @@ diff -urNp linux-2.6.30.8/include/linux/gracl.h linux-2.6.30.8/include/linux/gra
+static __inline__ unsigned int
+nhash(const char *name, const __u16 len, const unsigned int sz)
+{
-+ return full_name_hash(name, len) % sz;
++ return full_name_hash((const unsigned char *)name, len) % sz;
+}
+
-+#define FOR_EACH_ROLE_START(role,iter) \
-+ role = NULL; \
-+ iter = 0; \
-+ while (iter < acl_role_set.r_size) { \
-+ if (role == NULL) \
-+ role = acl_role_set.r_hash[iter]; \
-+ if (role == NULL) { \
-+ iter++; \
-+ continue; \
-+ }
++#define FOR_EACH_ROLE_START(role) \
++ role = role_list; \
++ while (role) {
+
-+#define FOR_EACH_ROLE_END(role,iter) \
-+ role = role->next; \
-+ if (role == NULL) \
-+ iter++; \
++#define FOR_EACH_ROLE_END(role) \
++ role = role->prev; \
+ }
+
+#define FOR_EACH_SUBJECT_START(role,subj,iter) \
@@ -35775,9 +37878,9 @@ diff -urNp linux-2.6.30.8/include/linux/gracl.h linux-2.6.30.8/include/linux/gra
+
+#endif
+
-diff -urNp linux-2.6.30.8/include/linux/gralloc.h linux-2.6.30.8/include/linux/gralloc.h
---- linux-2.6.30.8/include/linux/gralloc.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/include/linux/gralloc.h 2009-07-30 11:10:49.444477054 -0400
+diff -urNp linux-2.6.31.4/include/linux/gralloc.h linux-2.6.31.4/include/linux/gralloc.h
+--- linux-2.6.31.4/include/linux/gralloc.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/include/linux/gralloc.h 2009-10-11 15:29:47.525436446 -0400
@@ -0,0 +1,9 @@
+#ifndef __GRALLOC_H
+#define __GRALLOC_H
@@ -35788,9 +37891,9 @@ diff -urNp linux-2.6.30.8/include/linux/gralloc.h linux-2.6.30.8/include/linux/g
+void *acl_alloc_num(unsigned long num, unsigned long len);
+
+#endif
-diff -urNp linux-2.6.30.8/include/linux/grdefs.h linux-2.6.30.8/include/linux/grdefs.h
---- linux-2.6.30.8/include/linux/grdefs.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/include/linux/grdefs.h 2009-07-30 11:10:49.454486092 -0400
+diff -urNp linux-2.6.31.4/include/linux/grdefs.h linux-2.6.31.4/include/linux/grdefs.h
+--- linux-2.6.31.4/include/linux/grdefs.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/include/linux/grdefs.h 2009-10-11 15:29:47.526408201 -0400
@@ -0,0 +1,136 @@
+#ifndef GRDEFS_H
+#define GRDEFS_H
@@ -35928,9 +38031,9 @@ diff -urNp linux-2.6.30.8/include/linux/grdefs.h linux-2.6.30.8/include/linux/gr
+};
+
+#endif
-diff -urNp linux-2.6.30.8/include/linux/grinternal.h linux-2.6.30.8/include/linux/grinternal.h
---- linux-2.6.30.8/include/linux/grinternal.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/include/linux/grinternal.h 2009-07-30 11:10:49.454486092 -0400
+diff -urNp linux-2.6.31.4/include/linux/grinternal.h linux-2.6.31.4/include/linux/grinternal.h
+--- linux-2.6.31.4/include/linux/grinternal.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/include/linux/grinternal.h 2009-10-11 15:29:47.526408201 -0400
@@ -0,0 +1,211 @@
+#ifndef __GRINTERNAL_H
+#define __GRINTERNAL_H
@@ -35938,6 +38041,8 @@ diff -urNp linux-2.6.30.8/include/linux/grinternal.h linux-2.6.30.8/include/linu
+#ifdef CONFIG_GRKERNSEC
+
+#include <linux/fs.h>
++#include <linux/mnt_namespace.h>
++#include <linux/nsproxy.h>
+#include <linux/gracl.h>
+#include <linux/grdefs.h>
+#include <linux/grmsg.h>
@@ -35966,6 +38071,7 @@ diff -urNp linux-2.6.30.8/include/linux/grinternal.h linux-2.6.30.8/include/linu
+char *gr_to_filename3(const struct dentry *dentry,
+ const struct vfsmount *mnt);
+
++extern int grsec_enable_harden_ptrace;
+extern int grsec_enable_link;
+extern int grsec_enable_fifo;
+extern int grsec_enable_execve;
@@ -36000,7 +38106,6 @@ diff -urNp linux-2.6.30.8/include/linux/grinternal.h linux-2.6.30.8/include/linu
+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;
@@ -36032,16 +38137,12 @@ diff -urNp linux-2.6.30.8/include/linux/grinternal.h linux-2.6.30.8/include/linu
+ tsk->parent->exec_file->f_vfsmnt) : "/")
+
+#define proc_is_chrooted(tsk_a) ((tsk_a->pid > 1) && (tsk_a->fs != NULL) && \
-+ ((tsk_a->fs->root.dentry->d_inode->i_sb->s_dev != \
-+ tsk_a->nsproxy->pid_ns->child_reaper->fs->root.dentry->d_inode->i_sb->s_dev) || \
-+ (tsk_a->fs->root.dentry->d_inode->i_ino != \
-+ tsk_a->nsproxy->pid_ns->child_reaper->fs->root.dentry->d_inode->i_ino)))
++ ((init_task.fs->root.dentry != tsk_a->fs->root.dentry) && \
++ (tsk_a->nsproxy->mnt_ns->root->mnt_root != \
++ tsk_a->fs->root.dentry)))
+
+#define have_same_root(tsk_a,tsk_b) ((tsk_a->fs != NULL) && (tsk_b->fs != NULL) && \
-+ (tsk_a->fs->root.dentry->d_inode->i_sb->s_dev == \
-+ tsk_b->fs->root.dentry->d_inode->i_sb->s_dev) && \
-+ (tsk_a->fs->root.dentry->d_inode->i_ino == \
-+ tsk_b->fs->root.dentry->d_inode->i_ino))
++ (tsk_a->fs->root.dentry == tsk_b->fs->root.dentry))
+
+#define DEFAULTSECARGS(task, cred, pcred) gr_task_fullpath(task), task->comm, \
+ task->pid, cred->uid, \
@@ -36101,6 +38202,7 @@ diff -urNp linux-2.6.30.8/include/linux/grinternal.h linux-2.6.30.8/include/linu
+ GR_RESOURCE,
+ GR_CAP,
+ GR_SIG,
++ GR_SIG2,
+ GR_CRASH1,
+ GR_CRASH2,
+ GR_PSACCT
@@ -36133,7 +38235,8 @@ diff -urNp linux-2.6.30.8/include/linux/grinternal.h linux-2.6.30.8/include/linu
+#define gr_log_ptrace(audit, msg, task) gr_log_varargs(audit, msg, GR_PTRACE, task)
+#define gr_log_res_ulong2_str(audit, msg, task, ulong1, str, ulong2) gr_log_varargs(audit, msg, GR_RESOURCE, task, ulong1, str, ulong2)
+#define gr_log_cap(audit, msg, task, str) gr_log_varargs(audit, msg, GR_CAP, task, str)
-+#define gr_log_sig(audit, msg, task, num) gr_log_varargs(audit, msg, GR_SIG, task, num)
++#define gr_log_sig_addr(audit, msg, str, addr) gr_log_varargs(audit, msg, GR_SIG, str, addr)
++#define gr_log_sig_task(audit, msg, task, num) gr_log_varargs(audit, msg, GR_SIG2, task, num)
+#define gr_log_crash1(audit, msg, task, ulong) gr_log_varargs(audit, msg, GR_CRASH1, task, ulong)
+#define gr_log_crash2(audit, msg, task, ulong1) gr_log_varargs(audit, msg, GR_CRASH2, task, ulong1)
+#define gr_log_procacct(audit, msg, task, num1, num2, num3, num4, num5, num6, num7, num8, num9) gr_log_varargs(audit, msg, GR_PSACCT, task, num1, num2, num3, num4, num5, num6, num7, num8, num9)
@@ -36143,10 +38246,10 @@ diff -urNp linux-2.6.30.8/include/linux/grinternal.h linux-2.6.30.8/include/linu
+#endif
+
+#endif
-diff -urNp linux-2.6.30.8/include/linux/grmsg.h linux-2.6.30.8/include/linux/grmsg.h
---- linux-2.6.30.8/include/linux/grmsg.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/include/linux/grmsg.h 2009-08-25 21:01:03.051214236 -0400
-@@ -0,0 +1,109 @@
+diff -urNp linux-2.6.31.4/include/linux/grmsg.h linux-2.6.31.4/include/linux/grmsg.h
+--- linux-2.6.31.4/include/linux/grmsg.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/include/linux/grmsg.h 2009-10-11 15:29:47.526408201 -0400
+@@ -0,0 +1,103 @@
+#define DEFAULTSECMSG "%.256s[%.16s:%d] uid/euid:%u/%u gid/egid:%u/%u, parent %.256s[%.16s:%d] uid/euid:%u/%u gid/egid:%u/%u"
+#define GR_ACL_PROCACCT_MSG "%.256s[%.16s:%d] IP:%u.%u.%u.%u TTY:%.64s uid/euid:%u/%u gid/egid:%u/%u 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:%u/%u gid/egid:%u/%u"
+#define GR_PTRACE_ACL_MSG "denied ptrace of %.950s(%.16s:%d) by "
@@ -36222,7 +38325,7 @@ diff -urNp linux-2.6.30.8/include/linux/grmsg.h linux-2.6.30.8/include/linux/grm
+#define GR_PRIORITY_CHROOT_MSG "denied priority change of process (%.16s:%d) by "
+#define GR_FAILFORK_MSG "failed fork with errno %d by "
+#define GR_NICE_CHROOT_MSG "denied priority change by "
-+#define GR_UNISIGLOG_MSG "signal %d sent to "
++#define GR_UNISIGLOG_MSG "%.32s occurred at %p in "
+#define GR_DUALSIGLOG_MSG "signal %d sent to " DEFAULTSECMSG " by "
+#define GR_SIG_ACL_MSG "denied send of signal %d to protected task " DEFAULTSECMSG " by "
+#define GR_SYSCTL_MSG "denied modification of grsecurity sysctl value : %.32s by "
@@ -36247,19 +38350,13 @@ diff -urNp linux-2.6.30.8/include/linux/grmsg.h linux-2.6.30.8/include/linux/grm
+#define GR_MOUNT_AUDIT_MSG "mount of %.256s to %.256s by "
+#define GR_CHDIR_AUDIT_MSG "chdir to %.980s by "
+#define GR_EXEC_AUDIT_MSG "exec of %.930s (%.128s) by "
-+#define GR_MSGQ_AUDIT_MSG "message queue created by "
-+#define GR_MSGQR_AUDIT_MSG "message queue of uid:%u euid:%u removed by "
-+#define GR_SEM_AUDIT_MSG "semaphore created by "
-+#define GR_SEMR_AUDIT_MSG "semaphore of uid:%u euid:%u removed by "
-+#define GR_SHM_AUDIT_MSG "shared memory of size %d created by "
-+#define GR_SHMR_AUDIT_MSG "shared memory of uid:%u euid:%u removed by "
+#define GR_RESOURCE_MSG "denied resource overstep by requesting %lu for %.16s against limit %lu for "
+#define GR_TEXTREL_AUDIT_MSG "text relocation in %s, VMA:0x%08lx 0x%08lx by "
+#define GR_NONROOT_MODLOAD_MSG "denied kernel module auto-load of %.64s by "
-diff -urNp linux-2.6.30.8/include/linux/grsecurity.h linux-2.6.30.8/include/linux/grsecurity.h
---- linux-2.6.30.8/include/linux/grsecurity.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/include/linux/grsecurity.h 2009-08-25 20:13:57.590020717 -0400
-@@ -0,0 +1,203 @@
+diff -urNp linux-2.6.31.4/include/linux/grsecurity.h linux-2.6.31.4/include/linux/grsecurity.h
+--- linux-2.6.31.4/include/linux/grsecurity.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/include/linux/grsecurity.h 2009-10-11 15:29:47.526408201 -0400
+@@ -0,0 +1,197 @@
+#ifndef GR_SECURITY_H
+#define GR_SECURITY_H
+#include <linux/fs.h>
@@ -36326,7 +38423,7 @@ diff -urNp linux-2.6.30.8/include/linux/grsecurity.h linux-2.6.30.8/include/linu
+
+void gr_log_forkfail(const int retval);
+void gr_log_timechange(void);
-+void gr_log_signal(const int sig, const struct task_struct *t);
++void gr_log_signal(const int sig, const void *addr, const struct task_struct *t);
+void gr_log_chdir(const struct dentry *dentry,
+ const struct vfsmount *mnt);
+void gr_log_chroot_exec(const struct dentry *dentry,
@@ -36335,12 +38432,6 @@ diff -urNp linux-2.6.30.8/include/linux/grsecurity.h linux-2.6.30.8/include/linu
+void gr_log_remount(const char *devname, const int retval);
+void gr_log_unmount(const char *devname, const int retval);
+void gr_log_mount(const char *from, const char *to, const int retval);
-+void gr_log_msgget(const int ret, const int msgflg);
-+void gr_log_msgrm(const uid_t uid, const uid_t cuid);
-+void gr_log_semget(const int err, const int semflg);
-+void gr_log_semrm(const uid_t uid, const uid_t cuid);
-+void gr_log_shmget(const int err, const int shmflg, const size_t size);
-+void gr_log_shmrm(const uid_t uid, const uid_t cuid);
+void gr_log_textrel(struct vm_area_struct *vma);
+
+int gr_handle_follow_link(const struct inode *parent,
@@ -36463,10 +38554,22 @@ diff -urNp linux-2.6.30.8/include/linux/grsecurity.h linux-2.6.30.8/include/linu
+#endif
+
+#endif
-diff -urNp linux-2.6.30.8/include/linux/highmem.h linux-2.6.30.8/include/linux/highmem.h
---- linux-2.6.30.8/include/linux/highmem.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/highmem.h 2009-07-30 09:48:10.109883773 -0400
-@@ -135,6 +135,18 @@ static inline void clear_highpage(struct
+diff -urNp linux-2.6.31.4/include/linux/hdpu_features.h linux-2.6.31.4/include/linux/hdpu_features.h
+--- linux-2.6.31.4/include/linux/hdpu_features.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/hdpu_features.h 2009-10-11 15:29:47.531377505 -0400
+@@ -3,7 +3,7 @@
+ struct cpustate_t {
+ spinlock_t lock;
+ int excl;
+- int open_count;
++ atomic_t open_count;
+ unsigned char cached_val;
+ int inited;
+ unsigned long *set_addr;
+diff -urNp linux-2.6.31.4/include/linux/highmem.h linux-2.6.31.4/include/linux/highmem.h
+--- linux-2.6.31.4/include/linux/highmem.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/highmem.h 2009-10-11 15:29:47.537359623 -0400
+@@ -137,6 +137,18 @@ static inline void clear_highpage(struct
kunmap_atomic(kaddr, KM_USER0);
}
@@ -36485,10 +38588,10 @@ diff -urNp linux-2.6.30.8/include/linux/highmem.h linux-2.6.30.8/include/linux/h
static inline void zero_user_segments(struct page *page,
unsigned start1, unsigned end1,
unsigned start2, unsigned end2)
-diff -urNp linux-2.6.30.8/include/linux/hugetlb.h linux-2.6.30.8/include/linux/hugetlb.h
---- linux-2.6.30.8/include/linux/hugetlb.h 2009-09-09 17:37:33.862194060 -0400
-+++ linux-2.6.30.8/include/linux/hugetlb.h 2009-09-09 17:58:00.101105683 -0400
-@@ -139,7 +139,7 @@ static inline struct hugetlbfs_sb_info *
+diff -urNp linux-2.6.31.4/include/linux/hugetlb.h linux-2.6.31.4/include/linux/hugetlb.h
+--- linux-2.6.31.4/include/linux/hugetlb.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/hugetlb.h 2009-10-11 15:29:47.550499155 -0400
+@@ -146,7 +146,7 @@ static inline struct hugetlbfs_sb_info *
}
extern const struct file_operations hugetlbfs_file_operations;
@@ -36497,9 +38600,9 @@ diff -urNp linux-2.6.30.8/include/linux/hugetlb.h linux-2.6.30.8/include/linux/h
struct file *hugetlb_file_setup(const char *name, size_t size, int acct,
struct user_struct **user);
int hugetlb_get_quota(struct address_space *mapping, long delta);
-diff -urNp linux-2.6.30.8/include/linux/jbd2.h linux-2.6.30.8/include/linux/jbd2.h
---- linux-2.6.30.8/include/linux/jbd2.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/jbd2.h 2009-07-30 09:48:10.111182036 -0400
+diff -urNp linux-2.6.31.4/include/linux/jbd2.h linux-2.6.31.4/include/linux/jbd2.h
+--- linux-2.6.31.4/include/linux/jbd2.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/jbd2.h 2009-10-11 15:29:47.558359124 -0400
@@ -66,7 +66,7 @@ extern u8 jbd2_journal_enable_debug;
} \
} while (0)
@@ -36509,9 +38612,9 @@ diff -urNp linux-2.6.30.8/include/linux/jbd2.h linux-2.6.30.8/include/linux/jbd2
#endif
static inline void *jbd2_alloc(size_t size, gfp_t flags)
-diff -urNp linux-2.6.30.8/include/linux/jbd.h linux-2.6.30.8/include/linux/jbd.h
---- linux-2.6.30.8/include/linux/jbd.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/jbd.h 2009-07-30 09:48:10.111182036 -0400
+diff -urNp linux-2.6.31.4/include/linux/jbd.h linux-2.6.31.4/include/linux/jbd.h
+--- linux-2.6.31.4/include/linux/jbd.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/jbd.h 2009-10-11 15:29:47.583598622 -0400
@@ -66,7 +66,7 @@ extern u8 journal_enable_debug;
} \
} while (0)
@@ -36521,9 +38624,51 @@ diff -urNp linux-2.6.30.8/include/linux/jbd.h linux-2.6.30.8/include/linux/jbd.h
#endif
static inline void *jbd_alloc(size_t size, gfp_t flags)
-diff -urNp linux-2.6.30.8/include/linux/kvm_host.h linux-2.6.30.8/include/linux/kvm_host.h
---- linux-2.6.30.8/include/linux/kvm_host.h 2009-09-09 17:37:33.935462061 -0400
-+++ linux-2.6.30.8/include/linux/kvm_host.h 2009-09-09 17:37:58.251982769 -0400
+diff -urNp linux-2.6.31.4/include/linux/kallsyms.h linux-2.6.31.4/include/linux/kallsyms.h
+--- linux-2.6.31.4/include/linux/kallsyms.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/kallsyms.h 2009-10-11 15:29:47.594450124 -0400
+@@ -15,7 +15,8 @@
+
+ struct module;
+
+-#ifdef CONFIG_KALLSYMS
++#ifndef __INCLUDED_BY_HIDESYM
++#if defined(CONFIG_KALLSYMS) && !defined(CONFIG_GRKERNSEC_HIDESYM)
+ /* Lookup the address for a symbol. Returns 0 if not found. */
+ unsigned long kallsyms_lookup_name(const char *name);
+
+@@ -92,6 +93,9 @@ static inline int lookup_symbol_attrs(un
+ /* Stupid that this does nothing, but I didn't create this mess. */
+ #define __print_symbol(fmt, addr)
+ #endif /*CONFIG_KALLSYMS*/
++#else /* when included by kallsyms.c, with HIDESYM enabled */
++extern void __print_symbol(const char *fmt, unsigned long address);
++#endif
+
+ /* This macro allows us to keep printk typechecking */
+ static void __check_printsym_format(const char *fmt, ...)
+diff -urNp linux-2.6.31.4/include/linux/kgdb.h linux-2.6.31.4/include/linux/kgdb.h
+--- linux-2.6.31.4/include/linux/kgdb.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/kgdb.h 2009-10-11 15:29:56.722513976 -0400
+@@ -259,12 +259,12 @@ struct kgdb_io {
+ void (*post_exception) (void);
+ };
+
+-extern struct kgdb_arch arch_kgdb_ops;
++extern const struct kgdb_arch arch_kgdb_ops;
+
+ extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs);
+
+-extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
+-extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops);
++extern int kgdb_register_io_module(const struct kgdb_io *local_kgdb_io_ops);
++extern void kgdb_unregister_io_module(const struct kgdb_io *local_kgdb_io_ops);
+
+ extern int kgdb_hex2long(char **ptr, unsigned long *long_val);
+ extern int kgdb_mem2hex(char *mem, char *buf, int count);
+diff -urNp linux-2.6.31.4/include/linux/kvm_host.h linux-2.6.31.4/include/linux/kvm_host.h
+--- linux-2.6.31.4/include/linux/kvm_host.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/kvm_host.h 2009-10-11 15:29:47.601369207 -0400
@@ -173,7 +173,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vc
void vcpu_load(struct kvm_vcpu *vcpu);
void vcpu_put(struct kvm_vcpu *vcpu);
@@ -36542,9 +38687,9 @@ diff -urNp linux-2.6.30.8/include/linux/kvm_host.h linux-2.6.30.8/include/linux/
void kvm_arch_exit(void);
int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
-diff -urNp linux-2.6.30.8/include/linux/libata.h linux-2.6.30.8/include/linux/libata.h
---- linux-2.6.30.8/include/linux/libata.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/libata.h 2009-07-30 09:48:10.113041063 -0400
+diff -urNp linux-2.6.31.4/include/linux/libata.h linux-2.6.31.4/include/linux/libata.h
+--- linux-2.6.31.4/include/linux/libata.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/libata.h 2009-10-11 15:29:47.624759429 -0400
@@ -64,11 +64,11 @@
#ifdef ATA_VERBOSE_DEBUG
#define VPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args)
@@ -36560,18 +38705,22 @@ diff -urNp linux-2.6.30.8/include/linux/libata.h linux-2.6.30.8/include/linux/li
#endif /* ATA_DEBUG */
#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __func__, ## args)
-diff -urNp linux-2.6.30.8/include/linux/mm.h linux-2.6.30.8/include/linux/mm.h
---- linux-2.6.30.8/include/linux/mm.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/mm.h 2009-07-30 09:48:10.113041063 -0400
-@@ -39,6 +39,7 @@ extern unsigned long mmap_min_addr;
- #include <asm/page.h>
- #include <asm/pgtable.h>
- #include <asm/processor.h>
-+#include <asm/mman.h>
+diff -urNp linux-2.6.31.4/include/linux/lockd/bind.h linux-2.6.31.4/include/linux/lockd/bind.h
+--- linux-2.6.31.4/include/linux/lockd/bind.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/lockd/bind.h 2009-10-11 15:29:56.732568510 -0400
+@@ -29,7 +29,7 @@ struct nlmsvc_binding {
+ void (*fclose)(struct file *);
+ };
- #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
+-extern struct nlmsvc_binding * nlmsvc_ops;
++extern const struct nlmsvc_binding * nlmsvc_ops;
-@@ -106,6 +107,10 @@ extern unsigned int kobjsize(const void
+ /*
+ * Similar to nfs_client_initdata, but without the NFS-specific
+diff -urNp linux-2.6.31.4/include/linux/mm.h linux-2.6.31.4/include/linux/mm.h
+--- linux-2.6.31.4/include/linux/mm.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/mm.h 2009-10-11 15:29:47.999456313 -0400
+@@ -104,6 +104,10 @@ extern unsigned int kobjsize(const void
#define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */
#define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */
@@ -36582,7 +38731,7 @@ diff -urNp linux-2.6.30.8/include/linux/mm.h linux-2.6.30.8/include/linux/mm.h
#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
#endif
-@@ -888,6 +893,8 @@ struct shrinker {
+@@ -871,6 +875,8 @@ struct shrinker {
extern void register_shrinker(struct shrinker *);
extern void unregister_shrinker(struct shrinker *);
@@ -36591,7 +38740,7 @@ diff -urNp linux-2.6.30.8/include/linux/mm.h linux-2.6.30.8/include/linux/mm.h
int vma_wants_writenotify(struct vm_area_struct *vma);
extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl);
-@@ -1159,6 +1166,7 @@ out:
+@@ -1141,6 +1147,7 @@ out:
}
extern int do_munmap(struct mm_struct *, unsigned long, size_t);
@@ -36599,7 +38748,7 @@ diff -urNp linux-2.6.30.8/include/linux/mm.h linux-2.6.30.8/include/linux/mm.h
extern unsigned long do_brk(unsigned long, unsigned long);
-@@ -1212,6 +1220,10 @@ extern struct vm_area_struct * find_vma(
+@@ -1195,6 +1202,10 @@ extern struct vm_area_struct * find_vma(
extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
struct vm_area_struct **pprev);
@@ -36610,7 +38759,7 @@ diff -urNp linux-2.6.30.8/include/linux/mm.h linux-2.6.30.8/include/linux/mm.h
/* Look up the first VMA which intersects the interval start_addr..end_addr-1,
NULL if none. Assume start_addr < end_addr. */
static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
-@@ -1228,7 +1240,6 @@ static inline unsigned long vma_pages(st
+@@ -1211,7 +1222,6 @@ static inline unsigned long vma_pages(st
return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
}
@@ -36618,10 +38767,10 @@ diff -urNp linux-2.6.30.8/include/linux/mm.h linux-2.6.30.8/include/linux/mm.h
struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
unsigned long pfn, unsigned long size, pgprot_t);
-@@ -1320,5 +1331,12 @@ void vmemmap_populate_print_last(void);
- extern void *alloc_locked_buffer(size_t size);
- extern void free_locked_buffer(void *buffer, size_t size);
- extern void release_locked_buffer(void *buffer, size_t size);
+@@ -1303,5 +1313,12 @@ void vmemmap_populate_print_last(void);
+ extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim,
+ size_t size);
+ extern void refund_locked_memory(struct mm_struct *mm, size_t size);
+
+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
+extern void track_exec_limit(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long prot);
@@ -36631,10 +38780,10 @@ diff -urNp linux-2.6.30.8/include/linux/mm.h linux-2.6.30.8/include/linux/mm.h
+
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
-diff -urNp linux-2.6.30.8/include/linux/mm_types.h linux-2.6.30.8/include/linux/mm_types.h
---- linux-2.6.30.8/include/linux/mm_types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/mm_types.h 2009-07-30 09:48:10.114071629 -0400
-@@ -163,7 +163,7 @@ struct vm_area_struct {
+diff -urNp linux-2.6.31.4/include/linux/mm_types.h linux-2.6.31.4/include/linux/mm_types.h
+--- linux-2.6.31.4/include/linux/mm_types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/mm_types.h 2009-10-11 15:29:48.018417226 -0400
+@@ -171,7 +171,7 @@ struct vm_area_struct {
struct anon_vma *anon_vma; /* Serialized by page_table_lock */
/* Function pointers to deal with this struct. */
@@ -36643,7 +38792,7 @@ diff -urNp linux-2.6.30.8/include/linux/mm_types.h linux-2.6.30.8/include/linux/
/* Information about our backing store: */
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
-@@ -178,6 +178,8 @@ struct vm_area_struct {
+@@ -186,6 +186,8 @@ struct vm_area_struct {
#ifdef CONFIG_NUMA
struct mempolicy *vm_policy; /* NUMA policy for the VMA */
#endif
@@ -36652,7 +38801,7 @@ diff -urNp linux-2.6.30.8/include/linux/mm_types.h linux-2.6.30.8/include/linux/
};
struct core_thread {
-@@ -278,6 +280,24 @@ struct mm_struct {
+@@ -286,6 +288,24 @@ struct mm_struct {
#ifdef CONFIG_MMU_NOTIFIER
struct mmu_notifier_mm *mmu_notifier_mm;
#endif
@@ -36677,9 +38826,9 @@ diff -urNp linux-2.6.30.8/include/linux/mm_types.h linux-2.6.30.8/include/linux/
};
/* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
-diff -urNp linux-2.6.30.8/include/linux/mod_devicetable.h linux-2.6.30.8/include/linux/mod_devicetable.h
---- linux-2.6.30.8/include/linux/mod_devicetable.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/mod_devicetable.h 2009-08-24 21:08:46.316549262 -0400
+diff -urNp linux-2.6.31.4/include/linux/mod_devicetable.h linux-2.6.31.4/include/linux/mod_devicetable.h
+--- linux-2.6.31.4/include/linux/mod_devicetable.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/mod_devicetable.h 2009-10-11 15:29:48.025616758 -0400
@@ -12,7 +12,7 @@
typedef unsigned long kernel_ulong_t;
#endif
@@ -36698,10 +38847,10 @@ diff -urNp linux-2.6.30.8/include/linux/mod_devicetable.h linux-2.6.30.8/include
struct hid_device_id {
__u16 bus;
-diff -urNp linux-2.6.30.8/include/linux/module.h linux-2.6.30.8/include/linux/module.h
---- linux-2.6.30.8/include/linux/module.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/module.h 2009-07-30 09:48:10.114071629 -0400
-@@ -282,16 +282,16 @@ struct module
+diff -urNp linux-2.6.31.4/include/linux/module.h linux-2.6.31.4/include/linux/module.h
+--- linux-2.6.31.4/include/linux/module.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/module.h 2009-10-11 15:29:48.033419169 -0400
+@@ -283,16 +283,16 @@ struct module
int (*init)(void);
/* If this is non-NULL, vfree after init() returns */
@@ -36722,7 +38871,7 @@ diff -urNp linux-2.6.30.8/include/linux/module.h linux-2.6.30.8/include/linux/mo
/* Arch-specific module values */
struct mod_arch_specific arch;
-@@ -374,16 +374,46 @@ struct module *__module_address(unsigned
+@@ -389,16 +389,46 @@ struct module *__module_address(unsigned
bool is_module_address(unsigned long addr);
bool is_module_text_address(unsigned long addr);
@@ -36773,7 +38922,7 @@ diff -urNp linux-2.6.30.8/include/linux/module.h linux-2.6.30.8/include/linux/mo
}
/* Search for module by name: must hold module_mutex. */
-@@ -436,7 +466,11 @@ void symbol_put_addr(void *addr);
+@@ -451,7 +481,11 @@ void symbol_put_addr(void *addr);
static inline local_t *__module_ref_addr(struct module *mod, int cpu)
{
#ifdef CONFIG_SMP
@@ -36785,9 +38934,9 @@ diff -urNp linux-2.6.30.8/include/linux/module.h linux-2.6.30.8/include/linux/mo
#else
return &mod->ref;
#endif
-diff -urNp linux-2.6.30.8/include/linux/moduleloader.h linux-2.6.30.8/include/linux/moduleloader.h
---- linux-2.6.30.8/include/linux/moduleloader.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/moduleloader.h 2009-07-30 09:48:10.114071629 -0400
+diff -urNp linux-2.6.31.4/include/linux/moduleloader.h linux-2.6.31.4/include/linux/moduleloader.h
+--- linux-2.6.31.4/include/linux/moduleloader.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/moduleloader.h 2009-10-11 15:29:48.057377464 -0400
@@ -20,9 +20,21 @@ unsigned int arch_mod_section_prepend(st
sections. Returns NULL on failure. */
void *module_alloc(unsigned long size);
@@ -36810,10 +38959,21 @@ diff -urNp linux-2.6.30.8/include/linux/moduleloader.h linux-2.6.30.8/include/li
/* Apply the given relocation to the (simplified) ELF. Return -error
or 0. */
int apply_relocate(Elf_Shdr *sechdrs,
-diff -urNp linux-2.6.30.8/include/linux/namei.h linux-2.6.30.8/include/linux/namei.h
---- linux-2.6.30.8/include/linux/namei.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/namei.h 2009-07-30 09:48:10.115035001 -0400
-@@ -21,7 +21,7 @@ struct nameidata {
+diff -urNp linux-2.6.31.4/include/linux/moduleparam.h linux-2.6.31.4/include/linux/moduleparam.h
+--- linux-2.6.31.4/include/linux/moduleparam.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/moduleparam.h 2009-10-11 15:29:48.105818655 -0400
+@@ -37,7 +37,6 @@ typedef int (*param_set_fn)(const char *
+ typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
+
+ /* Flag bits for kernel_param.flags */
+-#define KPARAM_KMALLOCED 1
+ #define KPARAM_ISBOOL 2
+
+ struct kernel_param {
+diff -urNp linux-2.6.31.4/include/linux/namei.h linux-2.6.31.4/include/linux/namei.h
+--- linux-2.6.31.4/include/linux/namei.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/namei.h 2009-10-11 15:29:48.108549462 -0400
+@@ -22,7 +22,7 @@ struct nameidata {
unsigned int flags;
int last_type;
unsigned depth;
@@ -36822,7 +38982,7 @@ diff -urNp linux-2.6.30.8/include/linux/namei.h linux-2.6.30.8/include/linux/nam
/* Intent data */
union {
-@@ -83,12 +83,12 @@ extern int follow_up(struct vfsmount **,
+@@ -84,12 +84,12 @@ extern int follow_up(struct path *);
extern struct dentry *lock_rename(struct dentry *, struct dentry *);
extern void unlock_rename(struct dentry *, struct dentry *);
@@ -36837,9 +38997,9 @@ diff -urNp linux-2.6.30.8/include/linux/namei.h linux-2.6.30.8/include/linux/nam
{
return nd->saved_names[nd->depth];
}
-diff -urNp linux-2.6.30.8/include/linux/nfsd/nfsd.h linux-2.6.30.8/include/linux/nfsd/nfsd.h
---- linux-2.6.30.8/include/linux/nfsd/nfsd.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/nfsd/nfsd.h 2009-07-30 09:48:10.115035001 -0400
+diff -urNp linux-2.6.31.4/include/linux/nfsd/nfsd.h linux-2.6.31.4/include/linux/nfsd/nfsd.h
+--- linux-2.6.31.4/include/linux/nfsd/nfsd.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/nfsd/nfsd.h 2009-10-11 15:29:48.398689865 -0400
@@ -57,7 +57,7 @@ extern u32 nfsd_supported_minorversion
extern struct mutex nfsd_mutex;
extern struct svc_serv *nfsd_serv;
@@ -36849,10 +39009,10 @@ diff -urNp linux-2.6.30.8/include/linux/nfsd/nfsd.h linux-2.6.30.8/include/linux
/*
* Function prototypes.
-diff -urNp linux-2.6.30.8/include/linux/nodemask.h linux-2.6.30.8/include/linux/nodemask.h
---- linux-2.6.30.8/include/linux/nodemask.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/nodemask.h 2009-07-30 09:48:10.115035001 -0400
-@@ -442,11 +442,11 @@ static inline int num_node_state(enum no
+diff -urNp linux-2.6.31.4/include/linux/nodemask.h linux-2.6.31.4/include/linux/nodemask.h
+--- linux-2.6.31.4/include/linux/nodemask.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/nodemask.h 2009-10-11 15:29:48.399434098 -0400
+@@ -464,11 +464,11 @@ static inline int num_node_state(enum no
#define any_online_node(mask) \
({ \
@@ -36868,9 +39028,9 @@ diff -urNp linux-2.6.30.8/include/linux/nodemask.h linux-2.6.30.8/include/linux/
})
#define num_online_nodes() num_node_state(N_ONLINE)
-diff -urNp linux-2.6.30.8/include/linux/oprofile.h linux-2.6.30.8/include/linux/oprofile.h
---- linux-2.6.30.8/include/linux/oprofile.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/oprofile.h 2009-07-30 09:48:10.116076362 -0400
+diff -urNp linux-2.6.31.4/include/linux/oprofile.h linux-2.6.31.4/include/linux/oprofile.h
+--- linux-2.6.31.4/include/linux/oprofile.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/oprofile.h 2009-10-11 15:29:48.408367704 -0400
@@ -128,7 +128,7 @@ int oprofilefs_create_ro_ulong(struct su
/** Create a file for read-only access to an atomic_t. */
@@ -36880,9 +39040,9 @@ diff -urNp linux-2.6.30.8/include/linux/oprofile.h linux-2.6.30.8/include/linux/
/** create a directory */
struct dentry * oprofilefs_mkdir(struct super_block * sb, struct dentry * root,
-diff -urNp linux-2.6.30.8/include/linux/poison.h linux-2.6.30.8/include/linux/poison.h
---- linux-2.6.30.8/include/linux/poison.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/poison.h 2009-07-30 09:48:10.116076362 -0400
+diff -urNp linux-2.6.31.4/include/linux/poison.h linux-2.6.31.4/include/linux/poison.h
+--- linux-2.6.31.4/include/linux/poison.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/poison.h 2009-10-11 15:29:48.420678259 -0400
@@ -7,8 +7,8 @@
* under normal circumstances, used to verify that nobody uses
* non-initialized list entries.
@@ -36894,10 +39054,10 @@ diff -urNp linux-2.6.30.8/include/linux/poison.h linux-2.6.30.8/include/linux/po
/********** include/linux/timer.h **********/
/*
-diff -urNp linux-2.6.30.8/include/linux/proc_fs.h linux-2.6.30.8/include/linux/proc_fs.h
---- linux-2.6.30.8/include/linux/proc_fs.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/proc_fs.h 2009-07-30 11:10:49.495569147 -0400
-@@ -170,6 +170,19 @@ static inline struct proc_dir_entry *pro
+diff -urNp linux-2.6.31.4/include/linux/proc_fs.h linux-2.6.31.4/include/linux/proc_fs.h
+--- linux-2.6.31.4/include/linux/proc_fs.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/proc_fs.h 2009-10-11 15:29:48.430367364 -0400
+@@ -146,6 +146,19 @@ static inline struct proc_dir_entry *pro
return proc_create_data(name, mode, parent, proc_fops, NULL);
}
@@ -36917,9 +39077,9 @@ diff -urNp linux-2.6.30.8/include/linux/proc_fs.h linux-2.6.30.8/include/linux/p
static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
mode_t mode, struct proc_dir_entry *base,
read_proc_t *read_proc, void * data)
-diff -urNp linux-2.6.30.8/include/linux/random.h linux-2.6.30.8/include/linux/random.h
---- linux-2.6.30.8/include/linux/random.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/random.h 2009-07-30 09:48:10.116076362 -0400
+diff -urNp linux-2.6.31.4/include/linux/random.h linux-2.6.31.4/include/linux/random.h
+--- linux-2.6.31.4/include/linux/random.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/random.h 2009-10-11 15:29:48.499866658 -0400
@@ -74,6 +74,11 @@ unsigned long randomize_range(unsigned l
u32 random32(void);
void srandom32(u32 seed);
@@ -36932,9 +39092,21 @@ diff -urNp linux-2.6.30.8/include/linux/random.h linux-2.6.30.8/include/linux/ra
#endif /* __KERNEL___ */
#endif /* _LINUX_RANDOM_H */
-diff -urNp linux-2.6.30.8/include/linux/reiserfs_fs_sb.h linux-2.6.30.8/include/linux/reiserfs_fs_sb.h
---- linux-2.6.30.8/include/linux/reiserfs_fs_sb.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/reiserfs_fs_sb.h 2009-07-30 09:48:10.116076362 -0400
+diff -urNp linux-2.6.31.4/include/linux/reiserfs_fs.h linux-2.6.31.4/include/linux/reiserfs_fs.h
+--- linux-2.6.31.4/include/linux/reiserfs_fs.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/reiserfs_fs.h 2009-10-11 15:29:48.524394940 -0400
+@@ -1326,7 +1326,7 @@ static inline loff_t max_reiserfs_offset
+ #define REISERFS_USER_MEM 1 /* reiserfs user memory mode */
+
+ #define fs_generation(s) (REISERFS_SB(s)->s_generation_counter)
+-#define get_generation(s) atomic_read (&fs_generation(s))
++#define get_generation(s) atomic_read_unchecked (&fs_generation(s))
+ #define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen)
+ #define __fs_changed(gen,s) (gen != get_generation (s))
+ #define fs_changed(gen,s) ({cond_resched(); __fs_changed(gen, s);})
+diff -urNp linux-2.6.31.4/include/linux/reiserfs_fs_sb.h linux-2.6.31.4/include/linux/reiserfs_fs_sb.h
+--- linux-2.6.31.4/include/linux/reiserfs_fs_sb.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/reiserfs_fs_sb.h 2009-10-11 15:29:48.533445057 -0400
@@ -377,7 +377,7 @@ struct reiserfs_sb_info {
/* Comment? -Hans */
wait_queue_head_t s_wait;
@@ -36944,18 +39116,18 @@ diff -urNp linux-2.6.30.8/include/linux/reiserfs_fs_sb.h linux-2.6.30.8/include/
// tree gets re-balanced
unsigned long s_properties; /* File system properties. Currently holds
on-disk FS format */
-diff -urNp linux-2.6.30.8/include/linux/sched.h linux-2.6.30.8/include/linux/sched.h
---- linux-2.6.30.8/include/linux/sched.h 2009-07-30 20:32:40.547619620 -0400
-+++ linux-2.6.30.8/include/linux/sched.h 2009-07-30 20:32:48.019825232 -0400
-@@ -98,6 +98,7 @@ struct robust_list_head;
- struct bio;
- struct bts_tracer;
+diff -urNp linux-2.6.31.4/include/linux/sched.h linux-2.6.31.4/include/linux/sched.h
+--- linux-2.6.31.4/include/linux/sched.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/sched.h 2009-10-11 15:29:48.598405889 -0400
+@@ -99,6 +99,7 @@ struct bio;
struct fs_struct;
+ struct bts_context;
+ struct perf_counter_context;
+struct linux_binprm;
/*
* List of flags we want to share for kernel threads,
-@@ -604,6 +605,15 @@ struct signal_struct {
+@@ -629,6 +630,15 @@ struct signal_struct {
unsigned audit_tty;
struct tty_audit_buf *tty_audit_buf;
#endif
@@ -36971,7 +39143,7 @@ diff -urNp linux-2.6.30.8/include/linux/sched.h linux-2.6.30.8/include/linux/sch
};
/* Context switch must be unlocked if interrupts are to be enabled */
-@@ -1116,7 +1126,7 @@ struct sched_rt_entity {
+@@ -1165,7 +1175,7 @@ struct sched_rt_entity {
struct task_struct {
volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
@@ -36980,7 +39152,7 @@ diff -urNp linux-2.6.30.8/include/linux/sched.h linux-2.6.30.8/include/linux/sch
atomic_t usage;
unsigned int flags; /* per process flags, defined below */
unsigned int ptrace;
-@@ -1227,8 +1237,8 @@ struct task_struct {
+@@ -1269,8 +1279,8 @@ struct task_struct {
struct list_head thread_group;
struct completion *vfork_done; /* for vfork() */
@@ -36991,11 +39163,44 @@ diff -urNp linux-2.6.30.8/include/linux/sched.h linux-2.6.30.8/include/linux/sch
cputime_t utime, stime, utimescaled, stimescaled;
cputime_t gtime;
-@@ -1429,8 +1439,66 @@ struct task_struct {
- /* state flags for use by tracers */
- unsigned long trace;
+@@ -1284,15 +1294,6 @@ struct task_struct {
+ struct task_cputime cputime_expires;
+ struct list_head cpu_timers[3];
+
+-/* process credentials */
+- const struct cred *real_cred; /* objective and real subjective task
+- * credentials (COW) */
+- const struct cred *cred; /* effective (overridable) subjective task
+- * credentials (COW) */
+- struct mutex cred_guard_mutex; /* guard against foreign influences on
+- * credential calculations
+- * (notably. ptrace) */
+-
+ char comm[TASK_COMM_LEN]; /* executable name excluding path
+ - access with [gs]et_task_comm (which lock
+ it with task_lock())
+@@ -1429,6 +1430,16 @@ struct task_struct {
+ struct mutex perf_counter_mutex;
+ struct list_head perf_counter_list;
#endif
+
++/* process credentials */
++ const struct cred *real_cred; /* objective and real subjective task
++ * credentials (COW) */
++ const struct cred *cred; /* effective (overridable) subjective task
++ * credentials (COW) */
++ struct mutex cred_guard_mutex; /* guard against foreign influences on
++ * credential calculations
++ * (notably. ptrace) */
++
+ #ifdef CONFIG_NUMA
+ struct mempolicy *mempolicy; /* Protected by alloc_lock */
+ short il_next;
+@@ -1480,8 +1491,66 @@ struct task_struct {
+ /* bitmask of trace recursion */
+ unsigned long trace_recursion;
+ #endif /* CONFIG_TRACING */
++
+#ifdef CONFIG_GRKERNSEC
+ /* grsecurity */
+ struct acl_subject_label *acl;
@@ -37058,7 +39263,7 @@ diff -urNp linux-2.6.30.8/include/linux/sched.h linux-2.6.30.8/include/linux/sch
/* Future-safe accessor for struct task_struct's cpus_allowed. */
#define tsk_cpumask(tsk) (&(tsk)->cpus_allowed)
-@@ -1988,7 +2056,7 @@ extern void __cleanup_sighand(struct sig
+@@ -2046,7 +2115,7 @@ extern void __cleanup_sighand(struct sig
extern void exit_itimers(struct signal_struct *);
extern void flush_itimer_signals(void);
@@ -37067,7 +39272,7 @@ diff -urNp linux-2.6.30.8/include/linux/sched.h linux-2.6.30.8/include/linux/sch
extern void daemonize(const char *, ...);
extern int allow_signal(int);
-@@ -2098,8 +2166,8 @@ static inline void unlock_task_sighand(s
+@@ -2159,8 +2228,8 @@ static inline void unlock_task_sighand(s
#ifndef __HAVE_THREAD_FUNCTIONS
@@ -37078,7 +39283,7 @@ diff -urNp linux-2.6.30.8/include/linux/sched.h linux-2.6.30.8/include/linux/sch
static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
{
-@@ -2114,7 +2182,7 @@ static inline unsigned long *end_of_stac
+@@ -2175,7 +2244,7 @@ static inline unsigned long *end_of_stac
#endif
@@ -37087,9 +39292,9 @@ diff -urNp linux-2.6.30.8/include/linux/sched.h linux-2.6.30.8/include/linux/sch
{
void *stack = task_stack_page(current);
-diff -urNp linux-2.6.30.8/include/linux/screen_info.h linux-2.6.30.8/include/linux/screen_info.h
---- linux-2.6.30.8/include/linux/screen_info.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/screen_info.h 2009-07-30 09:48:10.117039309 -0400
+diff -urNp linux-2.6.31.4/include/linux/screen_info.h linux-2.6.31.4/include/linux/screen_info.h
+--- linux-2.6.31.4/include/linux/screen_info.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/screen_info.h 2009-10-11 15:29:48.608652872 -0400
@@ -42,7 +42,8 @@ struct screen_info {
__u16 pages; /* 0x32 */
__u16 vesa_attributes; /* 0x34 */
@@ -37100,10 +39305,10 @@ diff -urNp linux-2.6.30.8/include/linux/screen_info.h linux-2.6.30.8/include/lin
} __attribute__((packed));
#define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */
-diff -urNp linux-2.6.30.8/include/linux/security.h linux-2.6.30.8/include/linux/security.h
---- linux-2.6.30.8/include/linux/security.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/security.h 2009-07-30 11:22:42.449401037 -0400
-@@ -33,6 +33,7 @@
+diff -urNp linux-2.6.31.4/include/linux/security.h linux-2.6.31.4/include/linux/security.h
+--- linux-2.6.31.4/include/linux/security.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/security.h 2009-10-11 15:29:48.611584165 -0400
+@@ -34,6 +34,7 @@
#include <linux/key.h>
#include <linux/xfrm.h>
#include <linux/gfp.h>
@@ -37111,9 +39316,9 @@ diff -urNp linux-2.6.30.8/include/linux/security.h linux-2.6.30.8/include/linux/
#include <net/flow.h>
/* Maximum number of letters for an LSM name string */
-diff -urNp linux-2.6.30.8/include/linux/shm.h linux-2.6.30.8/include/linux/shm.h
---- linux-2.6.30.8/include/linux/shm.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/shm.h 2009-07-30 11:10:49.530519651 -0400
+diff -urNp linux-2.6.31.4/include/linux/shm.h linux-2.6.31.4/include/linux/shm.h
+--- linux-2.6.31.4/include/linux/shm.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/shm.h 2009-10-11 15:29:48.675417353 -0400
@@ -95,6 +95,10 @@ struct shmid_kernel /* private to the ke
pid_t shm_cprid;
pid_t shm_lprid;
@@ -37125,15 +39330,27 @@ diff -urNp linux-2.6.30.8/include/linux/shm.h linux-2.6.30.8/include/linux/shm.h
};
/* shm_mode upper byte flags */
-diff -urNp linux-2.6.30.8/include/linux/slab.h linux-2.6.30.8/include/linux/slab.h
---- linux-2.6.30.8/include/linux/slab.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/slab.h 2009-07-30 09:48:10.117976173 -0400
-@@ -73,10 +73,9 @@
+diff -urNp linux-2.6.31.4/include/linux/slab.h linux-2.6.31.4/include/linux/slab.h
+--- linux-2.6.31.4/include/linux/slab.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/slab.h 2009-10-11 15:37:26.493201327 -0400
+@@ -11,6 +11,7 @@
+
+ #include <linux/gfp.h>
+ #include <linux/types.h>
++#include <linux/err.h>
+
+ /*
+ * Flags to pass to kmem_cache_create().
+@@ -82,10 +83,13 @@
* ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.
* Both make kfree a no-op.
*/
-#define ZERO_SIZE_PTR ((void *)16)
-+#define ZERO_SIZE_PTR ((void *)-1024L)
++#define ZERO_SIZE_PTR \
++({ \
++ BUILD_BUG_ON(!(MAX_ERRNO & ~PAGE_MASK));\
++ (void *)(-MAX_ERRNO-1L); \
++})
-#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \
- (unsigned long)ZERO_SIZE_PTR)
@@ -37141,7 +39358,7 @@ diff -urNp linux-2.6.30.8/include/linux/slab.h linux-2.6.30.8/include/linux/slab
/*
* struct kmem_cache related prototypes
-@@ -129,6 +128,7 @@ void * __must_check krealloc(const void
+@@ -138,6 +142,7 @@ void * __must_check krealloc(const void
void kfree(const void *);
void kzfree(const void *);
size_t ksize(const void *);
@@ -37149,9 +39366,9 @@ diff -urNp linux-2.6.30.8/include/linux/slab.h linux-2.6.30.8/include/linux/slab
/*
* Allocator specific definitions. These are mainly used to establish optimized
-@@ -317,4 +317,37 @@ static inline void *kzalloc_node(size_t
- return kmalloc_node(size, flags | __GFP_ZERO, node);
- }
+@@ -328,4 +333,37 @@ static inline void *kzalloc_node(size_t
+
+ void __init kmem_cache_init_late(void);
+#define kmalloc(x, y) \
+({ \
@@ -37187,10 +39404,10 @@ diff -urNp linux-2.6.30.8/include/linux/slab.h linux-2.6.30.8/include/linux/slab
+})
+
#endif /* _LINUX_SLAB_H */
-diff -urNp linux-2.6.30.8/include/linux/slub_def.h linux-2.6.30.8/include/linux/slub_def.h
---- linux-2.6.30.8/include/linux/slub_def.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/slub_def.h 2009-07-30 09:48:10.117976173 -0400
-@@ -85,7 +85,7 @@ struct kmem_cache {
+diff -urNp linux-2.6.31.4/include/linux/slub_def.h linux-2.6.31.4/include/linux/slub_def.h
+--- linux-2.6.31.4/include/linux/slub_def.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/slub_def.h 2009-10-11 15:29:48.736579940 -0400
+@@ -86,7 +86,7 @@ struct kmem_cache {
struct kmem_cache_order_objects max;
struct kmem_cache_order_objects min;
gfp_t allocflags; /* gfp flags to use on each alloc */
@@ -37199,9 +39416,9 @@ diff -urNp linux-2.6.30.8/include/linux/slub_def.h linux-2.6.30.8/include/linux/
void (*ctor)(void *);
int inuse; /* Offset to metadata */
int align; /* Alignment */
-diff -urNp linux-2.6.30.8/include/linux/sonet.h linux-2.6.30.8/include/linux/sonet.h
---- linux-2.6.30.8/include/linux/sonet.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/sonet.h 2009-07-30 09:48:10.118663996 -0400
+diff -urNp linux-2.6.31.4/include/linux/sonet.h linux-2.6.31.4/include/linux/sonet.h
+--- linux-2.6.31.4/include/linux/sonet.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/sonet.h 2009-10-11 15:29:48.745375886 -0400
@@ -61,7 +61,7 @@ struct sonet_stats {
#include <asm/atomic.h>
@@ -37211,9 +39428,39 @@ diff -urNp linux-2.6.30.8/include/linux/sonet.h linux-2.6.30.8/include/linux/son
__SONET_ITEMS
#undef __HANDLE_ITEM
};
-diff -urNp linux-2.6.30.8/include/linux/sysctl.h linux-2.6.30.8/include/linux/sysctl.h
---- linux-2.6.30.8/include/linux/sysctl.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/sysctl.h 2009-07-30 09:48:10.118663996 -0400
+diff -urNp linux-2.6.31.4/include/linux/suspend.h linux-2.6.31.4/include/linux/suspend.h
+--- linux-2.6.31.4/include/linux/suspend.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/suspend.h 2009-10-11 15:29:56.741456884 -0400
+@@ -120,7 +120,7 @@ struct platform_suspend_ops {
+ * suspend_set_ops - set platform dependent suspend operations
+ * @ops: The new suspend operations to set.
+ */
+-extern void suspend_set_ops(struct platform_suspend_ops *ops);
++extern void suspend_set_ops(const struct platform_suspend_ops *ops);
+ extern int suspend_valid_only_mem(suspend_state_t state);
+
+ /**
+@@ -243,7 +243,7 @@ extern void swsusp_set_page_free(struct
+ extern void swsusp_unset_page_free(struct page *);
+ extern unsigned long get_safe_page(gfp_t gfp_mask);
+
+-extern void hibernation_set_ops(struct platform_hibernation_ops *ops);
++extern void hibernation_set_ops(const struct platform_hibernation_ops *ops);
+ extern int hibernate(void);
+ extern bool system_entering_hibernation(void);
+ #else /* CONFIG_HIBERNATION */
+@@ -251,7 +251,7 @@ static inline int swsusp_page_is_forbidd
+ static inline void swsusp_set_page_free(struct page *p) {}
+ static inline void swsusp_unset_page_free(struct page *p) {}
+
+-static inline void hibernation_set_ops(struct platform_hibernation_ops *ops) {}
++static inline void hibernation_set_ops(const struct platform_hibernation_ops *ops) {}
+ static inline int hibernate(void) { return -ENOSYS; }
+ static inline bool system_entering_hibernation(void) { return false; }
+ #endif /* CONFIG_HIBERNATION */
+diff -urNp linux-2.6.31.4/include/linux/sysctl.h linux-2.6.31.4/include/linux/sysctl.h
+--- linux-2.6.31.4/include/linux/sysctl.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/sysctl.h 2009-10-11 15:29:48.771740224 -0400
@@ -165,7 +165,11 @@ enum
KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
};
@@ -37227,22 +39474,22 @@ diff -urNp linux-2.6.30.8/include/linux/sysctl.h linux-2.6.30.8/include/linux/sy
/* CTL_VM names: */
enum
-diff -urNp linux-2.6.30.8/include/linux/thread_info.h linux-2.6.30.8/include/linux/thread_info.h
---- linux-2.6.30.8/include/linux/thread_info.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/thread_info.h 2009-07-30 09:48:10.118663996 -0400
+diff -urNp linux-2.6.31.4/include/linux/thread_info.h linux-2.6.31.4/include/linux/thread_info.h
+--- linux-2.6.31.4/include/linux/thread_info.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/thread_info.h 2009-10-11 15:29:48.775651508 -0400
@@ -23,7 +23,7 @@ struct restart_block {
};
- /* For futex_wait */
+ /* For futex_wait and futex_wait_requeue_pi */
struct {
- u32 *uaddr;
+ u32 __user *uaddr;
u32 val;
u32 flags;
u32 bitset;
-diff -urNp linux-2.6.30.8/include/linux/tty_ldisc.h linux-2.6.30.8/include/linux/tty_ldisc.h
---- linux-2.6.30.8/include/linux/tty_ldisc.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/tty_ldisc.h 2009-07-30 09:48:10.118663996 -0400
-@@ -139,12 +139,12 @@ struct tty_ldisc_ops {
+diff -urNp linux-2.6.31.4/include/linux/tty_ldisc.h linux-2.6.31.4/include/linux/tty_ldisc.h
+--- linux-2.6.31.4/include/linux/tty_ldisc.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/tty_ldisc.h 2009-10-11 15:29:48.789829466 -0400
+@@ -139,7 +139,7 @@ struct tty_ldisc_ops {
struct module *owner;
@@ -37251,15 +39498,9 @@ diff -urNp linux-2.6.30.8/include/linux/tty_ldisc.h linux-2.6.30.8/include/linux
};
struct tty_ldisc {
- struct tty_ldisc_ops *ops;
-- int refcount;
-+ atomic_t refcount;
- };
-
- #define TTY_LDISC_MAGIC 0x5403
-diff -urNp linux-2.6.30.8/include/linux/types.h linux-2.6.30.8/include/linux/types.h
---- linux-2.6.30.8/include/linux/types.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/types.h 2009-07-30 09:48:10.118663996 -0400
+diff -urNp linux-2.6.31.4/include/linux/types.h linux-2.6.31.4/include/linux/types.h
+--- linux-2.6.31.4/include/linux/types.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/types.h 2009-10-11 15:29:48.857683639 -0400
@@ -191,10 +191,26 @@ typedef struct {
volatile int counter;
} atomic_t;
@@ -37287,9 +39528,9 @@ diff -urNp linux-2.6.30.8/include/linux/types.h linux-2.6.30.8/include/linux/typ
#endif
struct ustat {
-diff -urNp linux-2.6.30.8/include/linux/uaccess.h linux-2.6.30.8/include/linux/uaccess.h
---- linux-2.6.30.8/include/linux/uaccess.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/uaccess.h 2009-07-30 09:48:10.118663996 -0400
+diff -urNp linux-2.6.31.4/include/linux/uaccess.h linux-2.6.31.4/include/linux/uaccess.h
+--- linux-2.6.31.4/include/linux/uaccess.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/uaccess.h 2009-10-11 15:29:56.562357747 -0400
@@ -76,11 +76,11 @@ static inline unsigned long __copy_from_
long ret; \
mm_segment_t old_fs = get_fs(); \
@@ -37304,9 +39545,26 @@ diff -urNp linux-2.6.30.8/include/linux/uaccess.h linux-2.6.30.8/include/linux/u
ret; \
})
-diff -urNp linux-2.6.30.8/include/linux/vmalloc.h linux-2.6.30.8/include/linux/vmalloc.h
---- linux-2.6.30.8/include/linux/vmalloc.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/linux/vmalloc.h 2009-07-30 09:48:10.119975963 -0400
+@@ -93,7 +93,7 @@ static inline unsigned long __copy_from_
+ * Safely read from address @src to the buffer at @dst. If a kernel fault
+ * happens, handle that and return -EFAULT.
+ */
+-extern long probe_kernel_read(void *dst, void *src, size_t size);
++extern long probe_kernel_read(void *dst, const void *src, size_t size);
+
+ /*
+ * probe_kernel_write(): safely attempt to write to a location
+@@ -104,6 +104,6 @@ extern long probe_kernel_read(void *dst,
+ * Safely write to address @dst from the buffer at @src. If a kernel fault
+ * happens, handle that and return -EFAULT.
+ */
+-extern long probe_kernel_write(void *dst, void *src, size_t size);
++extern long probe_kernel_write(void *dst, const void *src, size_t size);
+
+ #endif /* __LINUX_UACCESS_H__ */
+diff -urNp linux-2.6.31.4/include/linux/vmalloc.h linux-2.6.31.4/include/linux/vmalloc.h
+--- linux-2.6.31.4/include/linux/vmalloc.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/linux/vmalloc.h 2009-10-11 15:29:48.907361583 -0400
@@ -13,6 +13,11 @@ struct vm_area_struct; /* vma defining
#define VM_MAP 0x00000004 /* vmap()ed pages */
#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
@@ -37401,9 +39659,23 @@ diff -urNp linux-2.6.30.8/include/linux/vmalloc.h linux-2.6.30.8/include/linux/v
+})
+
#endif /* _LINUX_VMALLOC_H */
-diff -urNp linux-2.6.30.8/include/net/sctp/sctp.h linux-2.6.30.8/include/net/sctp/sctp.h
---- linux-2.6.30.8/include/net/sctp/sctp.h 2009-08-24 20:46:57.160033044 -0400
-+++ linux-2.6.30.8/include/net/sctp/sctp.h 2009-08-24 20:48:46.011774381 -0400
+diff -urNp linux-2.6.31.4/include/net/irda/ircomm_tty.h linux-2.6.31.4/include/net/irda/ircomm_tty.h
+--- linux-2.6.31.4/include/net/irda/ircomm_tty.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/net/irda/ircomm_tty.h 2009-10-11 15:29:48.929362537 -0400
+@@ -105,8 +105,8 @@ struct ircomm_tty_cb {
+ unsigned short close_delay;
+ unsigned short closing_wait; /* time to wait before closing */
+
+- int open_count;
+- int blocked_open; /* # of blocked opens */
++ atomic_t open_count;
++ atomic_t blocked_open; /* # of blocked opens */
+
+ /* Protect concurent access to :
+ * o self->open_count
+diff -urNp linux-2.6.31.4/include/net/sctp/sctp.h linux-2.6.31.4/include/net/sctp/sctp.h
+--- linux-2.6.31.4/include/net/sctp/sctp.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/net/sctp/sctp.h 2009-10-11 15:29:48.934361963 -0400
@@ -305,8 +305,8 @@ extern int sctp_debug_flag;
#else /* SCTP_DEBUG */
@@ -37415,10 +39687,22 @@ diff -urNp linux-2.6.30.8/include/net/sctp/sctp.h linux-2.6.30.8/include/net/sct
#define SCTP_ENABLE_DEBUG
#define SCTP_DISABLE_DEBUG
#define SCTP_ASSERT(expr, str, func)
-diff -urNp linux-2.6.30.8/include/sound/core.h linux-2.6.30.8/include/sound/core.h
---- linux-2.6.30.8/include/sound/core.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/sound/core.h 2009-07-30 09:48:10.119975963 -0400
-@@ -439,7 +439,7 @@ static inline int __snd_bug_on(int cond)
+diff -urNp linux-2.6.31.4/include/sound/ac97_codec.h linux-2.6.31.4/include/sound/ac97_codec.h
+--- linux-2.6.31.4/include/sound/ac97_codec.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/sound/ac97_codec.h 2009-10-11 15:29:56.764361720 -0400
+@@ -474,7 +474,7 @@ struct snd_ac97_template {
+
+ struct snd_ac97 {
+ /* -- lowlevel (hardware) driver specific -- */
+- struct snd_ac97_build_ops * build_ops;
++ const struct snd_ac97_build_ops * build_ops;
+ void *private_data;
+ void (*private_free) (struct snd_ac97 *ac97);
+ /* --- */
+diff -urNp linux-2.6.31.4/include/sound/core.h linux-2.6.31.4/include/sound/core.h
+--- linux-2.6.31.4/include/sound/core.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/sound/core.h 2009-10-11 15:29:48.942356386 -0400
+@@ -430,7 +430,7 @@ static inline int __snd_bug_on(int cond)
*/
#define snd_printdd(format, args...) snd_printk(format, ##args)
#else
@@ -37427,9 +39711,9 @@ diff -urNp linux-2.6.30.8/include/sound/core.h linux-2.6.30.8/include/sound/core
#endif
-diff -urNp linux-2.6.30.8/include/video/uvesafb.h linux-2.6.30.8/include/video/uvesafb.h
---- linux-2.6.30.8/include/video/uvesafb.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/include/video/uvesafb.h 2009-07-30 09:48:10.120938150 -0400
+diff -urNp linux-2.6.31.4/include/video/uvesafb.h linux-2.6.31.4/include/video/uvesafb.h
+--- linux-2.6.31.4/include/video/uvesafb.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/include/video/uvesafb.h 2009-10-11 15:29:48.950363536 -0400
@@ -177,6 +177,7 @@ struct uvesafb_par {
u8 ypan; /* 0 - nothing, 1 - ypan, 2 - ywrap */
u8 pmi_setpal; /* PMI for palette changes */
@@ -37438,9 +39722,9 @@ diff -urNp linux-2.6.30.8/include/video/uvesafb.h linux-2.6.30.8/include/video/u
void *pmi_start;
void *pmi_pal;
u8 *vbe_state_orig; /*
-diff -urNp linux-2.6.30.8/init/do_mounts.c linux-2.6.30.8/init/do_mounts.c
---- linux-2.6.30.8/init/do_mounts.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/init/do_mounts.c 2009-07-30 09:48:10.121806882 -0400
+diff -urNp linux-2.6.31.4/init/do_mounts.c linux-2.6.31.4/init/do_mounts.c
+--- linux-2.6.31.4/init/do_mounts.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/init/do_mounts.c 2009-10-11 15:29:48.958755031 -0400
@@ -216,11 +216,11 @@ static void __init get_fs_names(char *pa
static int __init do_mount_root(char *name, char *fs, int flags, void *data)
@@ -37455,7 +39739,7 @@ diff -urNp linux-2.6.30.8/init/do_mounts.c linux-2.6.30.8/init/do_mounts.c
ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
current->fs->pwd.mnt->mnt_sb->s_type->name,
-@@ -310,18 +310,18 @@ void __init change_floppy(char *fmt, ...
+@@ -311,18 +311,18 @@ void __init change_floppy(char *fmt, ...
va_start(args, fmt);
vsprintf(buf, fmt, args);
va_end(args);
@@ -37477,7 +39761,7 @@ diff -urNp linux-2.6.30.8/init/do_mounts.c linux-2.6.30.8/init/do_mounts.c
termios.c_lflag |= ICANON;
sys_ioctl(fd, TCSETSF, (long)&termios);
sys_close(fd);
-@@ -414,7 +414,7 @@ void __init prepare_namespace(void)
+@@ -415,7 +415,7 @@ void __init prepare_namespace(void)
mount_root();
out:
@@ -37487,9 +39771,9 @@ diff -urNp linux-2.6.30.8/init/do_mounts.c linux-2.6.30.8/init/do_mounts.c
+ sys_chroot((char __user *)".");
}
-diff -urNp linux-2.6.30.8/init/do_mounts.h linux-2.6.30.8/init/do_mounts.h
---- linux-2.6.30.8/init/do_mounts.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/init/do_mounts.h 2009-07-30 09:48:10.121806882 -0400
+diff -urNp linux-2.6.31.4/init/do_mounts.h linux-2.6.31.4/init/do_mounts.h
+--- linux-2.6.31.4/init/do_mounts.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/init/do_mounts.h 2009-10-11 15:29:48.959591163 -0400
@@ -15,15 +15,15 @@ extern int root_mountflags;
static inline int create_dev(char *name, dev_t dev)
@@ -37509,9 +39793,9 @@ diff -urNp linux-2.6.30.8/init/do_mounts.h linux-2.6.30.8/init/do_mounts.h
return 0;
if (!S_ISBLK(stat.st_mode))
return 0;
-diff -urNp linux-2.6.30.8/init/do_mounts_initrd.c linux-2.6.30.8/init/do_mounts_initrd.c
---- linux-2.6.30.8/init/do_mounts_initrd.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/init/do_mounts_initrd.c 2009-07-30 09:48:10.121806882 -0400
+diff -urNp linux-2.6.31.4/init/do_mounts_initrd.c linux-2.6.31.4/init/do_mounts_initrd.c
+--- linux-2.6.31.4/init/do_mounts_initrd.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/init/do_mounts_initrd.c 2009-10-11 15:29:48.959591163 -0400
@@ -32,7 +32,7 @@ static int __init do_linuxrc(void * shel
sys_close(old_fd);sys_close(root_fd);
sys_close(0);sys_close(1);sys_close(2);
@@ -37595,9 +39879,9 @@ diff -urNp linux-2.6.30.8/init/do_mounts_initrd.c linux-2.6.30.8/init/do_mounts_
+ sys_unlink((const char __user *)"/initrd.image");
return 0;
}
-diff -urNp linux-2.6.30.8/init/do_mounts_md.c linux-2.6.30.8/init/do_mounts_md.c
---- linux-2.6.30.8/init/do_mounts_md.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/init/do_mounts_md.c 2009-07-30 09:48:10.121806882 -0400
+diff -urNp linux-2.6.31.4/init/do_mounts_md.c linux-2.6.31.4/init/do_mounts_md.c
+--- linux-2.6.31.4/init/do_mounts_md.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/init/do_mounts_md.c 2009-10-11 15:29:48.960385585 -0400
@@ -170,7 +170,7 @@ static void __init md_setup_drive(void)
partitioned ? "_d" : "", minor,
md_setup_args[ent].device_names);
@@ -37625,9 +39909,9 @@ diff -urNp linux-2.6.30.8/init/do_mounts_md.c linux-2.6.30.8/init/do_mounts_md.c
if (fd >= 0) {
sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
sys_close(fd);
-diff -urNp linux-2.6.30.8/init/initramfs.c linux-2.6.30.8/init/initramfs.c
---- linux-2.6.30.8/init/initramfs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/init/initramfs.c 2009-07-30 09:48:10.121806882 -0400
+diff -urNp linux-2.6.31.4/init/initramfs.c linux-2.6.31.4/init/initramfs.c
+--- linux-2.6.31.4/init/initramfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/init/initramfs.c 2009-10-11 15:29:48.961462731 -0400
@@ -271,7 +271,7 @@ static int __init maybe_link(void)
if (nlink >= 2) {
char *old = find_link(major, minor, ino, mode, collected);
@@ -37713,18 +39997,10 @@ diff -urNp linux-2.6.30.8/init/initramfs.c linux-2.6.30.8/init/initramfs.c
do_utime(collected, mtime);
state = SkipIt;
next_state = Reset;
-diff -urNp linux-2.6.30.8/init/Kconfig linux-2.6.30.8/init/Kconfig
---- linux-2.6.30.8/init/Kconfig 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/init/Kconfig 2009-07-30 11:10:49.547309962 -0400
-@@ -780,6 +780,7 @@ config SYSCTL_SYSCALL
- config KALLSYMS
- bool "Load all symbols for debugging/ksymoops" 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
-@@ -963,7 +964,7 @@ config SLUB_DEBUG
+diff -urNp linux-2.6.31.4/init/Kconfig linux-2.6.31.4/init/Kconfig
+--- linux-2.6.31.4/init/Kconfig 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/init/Kconfig 2009-10-11 15:29:48.961462731 -0400
+@@ -1014,7 +1014,7 @@ config STRIP_ASM_SYMS
config COMPAT_BRK
bool "Disable heap randomization"
@@ -37733,7 +40009,7 @@ diff -urNp linux-2.6.30.8/init/Kconfig linux-2.6.30.8/init/Kconfig
help
Randomizing heap placement makes heap exploits harder, but it
also breaks ancient binaries (including anything libc5 based).
-@@ -1050,9 +1051,9 @@ config HAVE_GENERIC_DMA_COHERENT
+@@ -1101,9 +1101,9 @@ config HAVE_GENERIC_DMA_COHERENT
config SLABINFO
bool
@@ -37745,10 +40021,10 @@ diff -urNp linux-2.6.30.8/init/Kconfig linux-2.6.30.8/init/Kconfig
config RT_MUTEXES
boolean
-diff -urNp linux-2.6.30.8/init/main.c linux-2.6.30.8/init/main.c
---- linux-2.6.30.8/init/main.c 2009-09-09 17:37:33.936211678 -0400
-+++ linux-2.6.30.8/init/main.c 2009-09-09 18:43:41.982254179 -0400
-@@ -98,6 +98,7 @@ static inline void mark_rodata_ro(void)
+diff -urNp linux-2.6.31.4/init/main.c linux-2.6.31.4/init/main.c
+--- linux-2.6.31.4/init/main.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/init/main.c 2009-10-11 15:29:48.962478131 -0400
+@@ -96,6 +96,7 @@ static inline void mark_rodata_ro(void)
#ifdef CONFIG_TC
extern void tc_init(void);
#endif
@@ -37756,7 +40032,7 @@ diff -urNp linux-2.6.30.8/init/main.c linux-2.6.30.8/init/main.c
enum system_states system_state __read_mostly;
EXPORT_SYMBOL(system_state);
-@@ -184,6 +185,35 @@ static int __init set_reset_devices(char
+@@ -182,6 +183,35 @@ static int __init set_reset_devices(char
__setup("reset_devices", set_reset_devices);
@@ -37792,7 +40068,7 @@ diff -urNp linux-2.6.30.8/init/main.c linux-2.6.30.8/init/main.c
static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
static const char *panic_later, *panic_param;
-@@ -377,7 +407,7 @@ static void __init setup_nr_cpu_ids(void
+@@ -375,7 +405,7 @@ static void __init setup_nr_cpu_ids(void
}
#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
@@ -37801,7 +40077,7 @@ diff -urNp linux-2.6.30.8/init/main.c linux-2.6.30.8/init/main.c
EXPORT_SYMBOL(__per_cpu_offset);
-@@ -710,6 +740,7 @@ int do_one_initcall(initcall_t fn)
+@@ -741,6 +771,7 @@ int do_one_initcall(initcall_t fn)
{
int count = preempt_count();
ktime_t calltime, delta, rettime;
@@ -37809,7 +40085,7 @@ diff -urNp linux-2.6.30.8/init/main.c linux-2.6.30.8/init/main.c
if (initcall_debug) {
call.caller = task_pid_nr(current);
-@@ -737,15 +768,15 @@ int do_one_initcall(initcall_t fn)
+@@ -768,15 +799,15 @@ int do_one_initcall(initcall_t fn)
sprintf(msgbuf, "error code %d ", ret.result);
if (preempt_count() != count) {
@@ -37829,7 +40105,7 @@ diff -urNp linux-2.6.30.8/init/main.c linux-2.6.30.8/init/main.c
}
return ret.result;
-@@ -886,6 +917,8 @@ static int __init kernel_init(void * unu
+@@ -923,6 +954,8 @@ static int __init kernel_init(void * unu
prepare_namespace();
}
@@ -37838,9 +40114,9 @@ diff -urNp linux-2.6.30.8/init/main.c linux-2.6.30.8/init/main.c
/*
* Ok, we have completed the initial bootup, and
* we're essentially up and running. Get rid of the
-diff -urNp linux-2.6.30.8/init/noinitramfs.c linux-2.6.30.8/init/noinitramfs.c
---- linux-2.6.30.8/init/noinitramfs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/init/noinitramfs.c 2009-07-30 09:48:10.122895747 -0400
+diff -urNp linux-2.6.31.4/init/noinitramfs.c linux-2.6.31.4/init/noinitramfs.c
+--- linux-2.6.31.4/init/noinitramfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/init/noinitramfs.c 2009-10-11 15:29:48.963371490 -0400
@@ -29,7 +29,7 @@ static int __init default_rootfs(void)
{
int err;
@@ -37859,9 +40135,9 @@ diff -urNp linux-2.6.30.8/init/noinitramfs.c linux-2.6.30.8/init/noinitramfs.c
if (err < 0)
goto out;
-diff -urNp linux-2.6.30.8/ipc/ipc_sysctl.c linux-2.6.30.8/ipc/ipc_sysctl.c
---- linux-2.6.30.8/ipc/ipc_sysctl.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/ipc/ipc_sysctl.c 2009-07-30 09:48:10.122895747 -0400
+diff -urNp linux-2.6.31.4/ipc/ipc_sysctl.c linux-2.6.31.4/ipc/ipc_sysctl.c
+--- linux-2.6.31.4/ipc/ipc_sysctl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/ipc/ipc_sysctl.c 2009-10-11 15:29:48.963371490 -0400
@@ -267,7 +267,7 @@ static struct ctl_table ipc_kern_table[]
.extra1 = &zero,
.extra2 = &one,
@@ -37880,10 +40156,10 @@ diff -urNp linux-2.6.30.8/ipc/ipc_sysctl.c linux-2.6.30.8/ipc/ipc_sysctl.c
};
static int __init ipc_sysctl_init(void)
-diff -urNp linux-2.6.30.8/ipc/mqueue.c linux-2.6.30.8/ipc/mqueue.c
---- linux-2.6.30.8/ipc/mqueue.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/ipc/mqueue.c 2009-07-30 11:10:49.559299006 -0400
-@@ -76,7 +76,7 @@ struct mqueue_inode_info {
+diff -urNp linux-2.6.31.4/ipc/mqueue.c linux-2.6.31.4/ipc/mqueue.c
+--- linux-2.6.31.4/ipc/mqueue.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/ipc/mqueue.c 2009-10-11 15:29:48.963371490 -0400
+@@ -77,7 +77,7 @@ struct mqueue_inode_info {
static const struct inode_operations mqueue_dir_inode_operations;
static const struct file_operations mqueue_file_operations;
@@ -37892,7 +40168,7 @@ diff -urNp linux-2.6.30.8/ipc/mqueue.c linux-2.6.30.8/ipc/mqueue.c
static void remove_notification(struct mqueue_inode_info *info);
static struct kmem_cache *mqueue_inode_cachep;
-@@ -149,6 +149,7 @@ static struct inode *mqueue_get_inode(st
+@@ -150,6 +150,7 @@ static struct inode *mqueue_get_inode(st
mq_bytes = (mq_msg_tblsz +
(info->attr.mq_maxmsg * info->attr.mq_msgsize));
@@ -37900,7 +40176,7 @@ diff -urNp linux-2.6.30.8/ipc/mqueue.c linux-2.6.30.8/ipc/mqueue.c
spin_lock(&mq_lock);
if (u->mq_bytes + mq_bytes < u->mq_bytes ||
u->mq_bytes + mq_bytes >
-@@ -1222,7 +1223,7 @@ static const struct file_operations mque
+@@ -1224,7 +1225,7 @@ static const struct file_operations mque
.read = mqueue_read_file,
};
@@ -37909,73 +40185,9 @@ diff -urNp linux-2.6.30.8/ipc/mqueue.c linux-2.6.30.8/ipc/mqueue.c
.alloc_inode = mqueue_alloc_inode,
.destroy_inode = mqueue_destroy_inode,
.statfs = simple_statfs,
-diff -urNp linux-2.6.30.8/ipc/msg.c linux-2.6.30.8/ipc/msg.c
---- linux-2.6.30.8/ipc/msg.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/ipc/msg.c 2009-07-30 11:10:49.568315799 -0400
-@@ -314,6 +314,7 @@ SYSCALL_DEFINE2(msgget, key_t, key, int,
- struct ipc_namespace *ns;
- struct ipc_ops msg_ops;
- struct ipc_params msg_params;
-+ long err;
-
- ns = current->nsproxy->ipc_ns;
-
-@@ -324,7 +325,11 @@ SYSCALL_DEFINE2(msgget, key_t, key, int,
- msg_params.key = key;
- msg_params.flg = msgflg;
-
-- return ipcget(ns, &msg_ids(ns), &msg_ops, &msg_params);
-+ err = ipcget(ns, &msg_ids(ns), &msg_ops, &msg_params);
-+
-+ gr_log_msgget(err, msgflg);
-+
-+ return err;
- }
-
- static inline unsigned long
-@@ -434,6 +439,7 @@ static int msgctl_down(struct ipc_namesp
-
- switch (cmd) {
- case IPC_RMID:
-+ gr_log_msgrm(ipcp->uid, ipcp->cuid);
- freeque(ns, ipcp);
- goto out_up;
- case IPC_SET:
-diff -urNp linux-2.6.30.8/ipc/sem.c linux-2.6.30.8/ipc/sem.c
---- linux-2.6.30.8/ipc/sem.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/ipc/sem.c 2009-07-30 11:10:49.579322291 -0400
-@@ -313,6 +313,7 @@ SYSCALL_DEFINE3(semget, key_t, key, int,
- struct ipc_namespace *ns;
- struct ipc_ops sem_ops;
- struct ipc_params sem_params;
-+ long err;
-
- ns = current->nsproxy->ipc_ns;
-
-@@ -327,7 +328,11 @@ SYSCALL_DEFINE3(semget, key_t, key, int,
- sem_params.flg = semflg;
- sem_params.u.nsems = nsems;
-
-- return ipcget(ns, &sem_ids(ns), &sem_ops, &sem_params);
-+ err = ipcget(ns, &sem_ids(ns), &sem_ops, &sem_params);
-+
-+ gr_log_semget(err, semflg);
-+
-+ return err;
- }
-
- /*
-@@ -870,6 +875,7 @@ static int semctl_down(struct ipc_namesp
-
- switch(cmd){
- case IPC_RMID:
-+ gr_log_semrm(ipcp->uid, ipcp->cuid);
- freeary(ns, ipcp);
- goto out_up;
- case IPC_SET:
-diff -urNp linux-2.6.30.8/ipc/shm.c linux-2.6.30.8/ipc/shm.c
---- linux-2.6.30.8/ipc/shm.c 2009-09-26 23:07:16.047223424 -0400
-+++ linux-2.6.30.8/ipc/shm.c 2009-09-26 23:07:27.048449609 -0400
+diff -urNp linux-2.6.31.4/ipc/shm.c linux-2.6.31.4/ipc/shm.c
+--- linux-2.6.31.4/ipc/shm.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/ipc/shm.c 2009-10-11 15:29:48.964420843 -0400
@@ -55,7 +55,7 @@ struct shm_file_data {
#define shm_file_data(file) (*((struct shm_file_data **)&(file)->private_data))
@@ -38000,16 +40212,7 @@ diff -urNp linux-2.6.30.8/ipc/shm.c linux-2.6.30.8/ipc/shm.c
void shm_init_ns(struct ipc_namespace *ns)
{
ns->shm_ctlmax = SHMMAX;
-@@ -88,6 +96,8 @@ static void do_shm_rmid(struct ipc_names
- struct shmid_kernel *shp;
- shp = container_of(ipcp, struct shmid_kernel, shm_perm);
-
-+ gr_log_shmrm(shp->shm_perm.uid, shp->shm_perm.cuid);
-+
- if (shp->shm_nattch){
- shp->shm_perm.mode |= SHM_DEST;
- /* Do not find it any more */
-@@ -312,7 +322,7 @@ static const struct file_operations shm_
+@@ -312,7 +320,7 @@ static const struct file_operations shm_
.get_unmapped_area = shm_get_unmapped_area,
};
@@ -38018,7 +40221,7 @@ diff -urNp linux-2.6.30.8/ipc/shm.c linux-2.6.30.8/ipc/shm.c
.open = shm_open, /* callback for a new vm-area open */
.close = shm_close, /* callback for when the vm-area is released */
.fault = shm_fault,
-@@ -396,6 +406,14 @@ static int newseg(struct ipc_namespace *
+@@ -395,6 +403,14 @@ static int newseg(struct ipc_namespace *
shp->shm_lprid = 0;
shp->shm_atim = shp->shm_dtim = 0;
shp->shm_ctim = get_seconds();
@@ -38033,28 +40236,7 @@ diff -urNp linux-2.6.30.8/ipc/shm.c linux-2.6.30.8/ipc/shm.c
shp->shm_segsz = size;
shp->shm_nattch = 0;
shp->shm_file = file;
-@@ -451,6 +469,7 @@ SYSCALL_DEFINE3(shmget, key_t, key, size
- struct ipc_namespace *ns;
- struct ipc_ops shm_ops;
- struct ipc_params shm_params;
-+ long err;
-
- ns = current->nsproxy->ipc_ns;
-
-@@ -462,7 +481,11 @@ SYSCALL_DEFINE3(shmget, key_t, key, size
- shm_params.flg = shmflg;
- shm_params.u.size = size;
-
-- return ipcget(ns, &shm_ids(ns), &shm_ops, &shm_params);
-+ err = ipcget(ns, &shm_ids(ns), &shm_ops, &shm_params);
-+
-+ gr_log_shmget(err, shmflg, size);
-+
-+ return err;
- }
-
- static inline unsigned long copy_shmid_to_user(void __user *buf, struct shmid64_ds *in, int version)
-@@ -879,9 +902,21 @@ long do_shmat(int shmid, char __user *sh
+@@ -878,9 +894,21 @@ long do_shmat(int shmid, char __user *sh
if (err)
goto out_unlock;
@@ -38076,9 +40258,9 @@ diff -urNp linux-2.6.30.8/ipc/shm.c linux-2.6.30.8/ipc/shm.c
size = i_size_read(path.dentry->d_inode);
shm_unlock(shp);
-diff -urNp linux-2.6.30.8/ipc/util.c linux-2.6.30.8/ipc/util.c
---- linux-2.6.30.8/ipc/util.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/ipc/util.c 2009-07-30 09:48:10.123853712 -0400
+diff -urNp linux-2.6.31.4/ipc/util.c linux-2.6.31.4/ipc/util.c
+--- linux-2.6.31.4/ipc/util.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/ipc/util.c 2009-10-11 15:29:48.964420843 -0400
@@ -942,7 +942,7 @@ static int sysvipc_proc_show(struct seq_
return iface->show(s, it);
}
@@ -38088,9 +40270,9 @@ diff -urNp linux-2.6.30.8/ipc/util.c linux-2.6.30.8/ipc/util.c
.start = sysvipc_proc_start,
.stop = sysvipc_proc_stop,
.next = sysvipc_proc_next,
-diff -urNp linux-2.6.30.8/kernel/acct.c linux-2.6.30.8/kernel/acct.c
---- linux-2.6.30.8/kernel/acct.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/acct.c 2009-07-30 09:48:10.124859675 -0400
+diff -urNp linux-2.6.31.4/kernel/acct.c linux-2.6.31.4/kernel/acct.c
+--- linux-2.6.31.4/kernel/acct.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/acct.c 2009-10-11 15:29:48.964420843 -0400
@@ -574,7 +574,7 @@ static void do_acct_process(struct bsd_a
*/
flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
@@ -38100,9 +40282,9 @@ diff -urNp linux-2.6.30.8/kernel/acct.c linux-2.6.30.8/kernel/acct.c
sizeof(acct_t), &file->f_pos);
current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim;
set_fs(fs);
-diff -urNp linux-2.6.30.8/kernel/capability.c linux-2.6.30.8/kernel/capability.c
---- linux-2.6.30.8/kernel/capability.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/capability.c 2009-07-30 11:10:49.599076288 -0400
+diff -urNp linux-2.6.31.4/kernel/capability.c linux-2.6.31.4/kernel/capability.c
+--- linux-2.6.31.4/kernel/capability.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/capability.c 2009-10-11 15:29:48.964420843 -0400
@@ -306,10 +306,21 @@ int capable(int cap)
BUG();
}
@@ -38126,10 +40308,10 @@ diff -urNp linux-2.6.30.8/kernel/capability.c linux-2.6.30.8/kernel/capability.c
+
EXPORT_SYMBOL(capable);
+EXPORT_SYMBOL(capable_nolog);
-diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
---- linux-2.6.30.8/kernel/cgroup.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/cgroup.c 2009-07-30 09:48:10.125699437 -0400
-@@ -594,8 +594,8 @@ void cgroup_unlock(void)
+diff -urNp linux-2.6.31.4/kernel/cgroup.c linux-2.6.31.4/kernel/cgroup.c
+--- linux-2.6.31.4/kernel/cgroup.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/cgroup.c 2009-10-11 15:29:48.965596731 -0400
+@@ -596,8 +596,8 @@ void cgroup_unlock(void)
static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode);
static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry);
static int cgroup_populate_dir(struct cgroup *cgrp);
@@ -38140,7 +40322,7 @@ diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
static struct backing_dev_info cgroup_backing_dev_info = {
.capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
-@@ -930,7 +930,7 @@ static int cgroup_remount(struct super_b
+@@ -960,7 +960,7 @@ static int cgroup_remount(struct super_b
return ret;
}
@@ -38149,7 +40331,7 @@ diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
.show_options = cgroup_show_options,
-@@ -1612,7 +1612,7 @@ static int cgroup_seqfile_release(struct
+@@ -1643,7 +1643,7 @@ static int cgroup_seqfile_release(struct
return single_release(inode, file);
}
@@ -38158,7 +40340,7 @@ diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
.read = seq_read,
.write = cgroup_file_write,
.llseek = seq_lseek,
-@@ -1671,7 +1671,7 @@ static int cgroup_rename(struct inode *o
+@@ -1702,7 +1702,7 @@ static int cgroup_rename(struct inode *o
return simple_rename(old_dir, old_dentry, new_dir, new_dentry);
}
@@ -38167,7 +40349,7 @@ diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
.read = cgroup_file_read,
.write = cgroup_file_write,
.llseek = generic_file_llseek,
-@@ -1679,7 +1679,7 @@ static struct file_operations cgroup_fil
+@@ -1710,7 +1710,7 @@ static struct file_operations cgroup_fil
.release = cgroup_file_release,
};
@@ -38176,7 +40358,7 @@ diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
.lookup = simple_lookup,
.mkdir = cgroup_mkdir,
.rmdir = cgroup_rmdir,
-@@ -2262,7 +2262,7 @@ static int cgroup_tasks_show(struct seq_
+@@ -2313,7 +2313,7 @@ static int cgroup_tasks_show(struct seq_
return seq_printf(s, "%d\n", *(int *)v);
}
@@ -38185,7 +40367,7 @@ diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
.start = cgroup_tasks_start,
.stop = cgroup_tasks_stop,
.next = cgroup_tasks_next,
-@@ -2292,7 +2292,7 @@ static int cgroup_tasks_release(struct i
+@@ -2350,7 +2350,7 @@ static int cgroup_tasks_release(struct i
return seq_release(inode, file);
}
@@ -38194,7 +40376,7 @@ diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
.read = seq_read,
.llseek = seq_lseek,
.write = cgroup_file_write,
-@@ -2930,7 +2930,7 @@ static int cgroup_open(struct inode *ino
+@@ -3016,7 +3016,7 @@ static int cgroup_open(struct inode *ino
return single_open(file, proc_cgroup_show, pid);
}
@@ -38203,7 +40385,7 @@ diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
.open = cgroup_open,
.read = seq_read,
.llseek = seq_lseek,
-@@ -2959,7 +2959,7 @@ static int cgroupstats_open(struct inode
+@@ -3045,7 +3045,7 @@ static int cgroupstats_open(struct inode
return single_open(file, proc_cgroupstats_show, NULL);
}
@@ -38212,9 +40394,9 @@ diff -urNp linux-2.6.30.8/kernel/cgroup.c linux-2.6.30.8/kernel/cgroup.c
.open = cgroupstats_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.30.8/kernel/configs.c linux-2.6.30.8/kernel/configs.c
---- linux-2.6.30.8/kernel/configs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/configs.c 2009-08-24 23:20:17.835578377 -0400
+diff -urNp linux-2.6.31.4/kernel/configs.c linux-2.6.31.4/kernel/configs.c
+--- linux-2.6.31.4/kernel/configs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/configs.c 2009-10-11 15:29:48.966364272 -0400
@@ -73,8 +73,19 @@ static int __init ikconfig_init(void)
struct proc_dir_entry *entry;
@@ -38235,9 +40417,9 @@ diff -urNp linux-2.6.30.8/kernel/configs.c linux-2.6.30.8/kernel/configs.c
if (!entry)
return -ENOMEM;
-diff -urNp linux-2.6.30.8/kernel/cpu.c linux-2.6.30.8/kernel/cpu.c
---- linux-2.6.30.8/kernel/cpu.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/cpu.c 2009-07-30 09:48:10.125699437 -0400
+diff -urNp linux-2.6.31.4/kernel/cpu.c linux-2.6.31.4/kernel/cpu.c
+--- linux-2.6.31.4/kernel/cpu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/cpu.c 2009-10-11 15:29:48.966364272 -0400
@@ -19,7 +19,7 @@
/* Serializes the updates to cpu_online_mask, cpu_present_mask */
static DEFINE_MUTEX(cpu_add_remove_lock);
@@ -38247,9 +40429,9 @@ diff -urNp linux-2.6.30.8/kernel/cpu.c linux-2.6.30.8/kernel/cpu.c
/* If set, cpu_up and cpu_down will return -EBUSY and do nothing.
* Should always be manipulated under cpu_add_remove_lock
-diff -urNp linux-2.6.30.8/kernel/cred.c linux-2.6.30.8/kernel/cred.c
---- linux-2.6.30.8/kernel/cred.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/cred.c 2009-07-30 11:10:49.610408907 -0400
+diff -urNp linux-2.6.31.4/kernel/cred.c linux-2.6.31.4/kernel/cred.c
+--- linux-2.6.31.4/kernel/cred.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/cred.c 2009-10-11 15:29:48.966364272 -0400
@@ -366,6 +366,8 @@ int commit_creds(struct cred *new)
get_cred(new); /* we will require a ref for the subj creds too */
@@ -38259,12 +40441,12 @@ diff -urNp linux-2.6.30.8/kernel/cred.c linux-2.6.30.8/kernel/cred.c
/* dumpability changes */
if (old->euid != new->euid ||
old->egid != new->egid ||
-diff -urNp linux-2.6.30.8/kernel/exit.c linux-2.6.30.8/kernel/exit.c
---- linux-2.6.30.8/kernel/exit.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/exit.c 2009-07-30 11:10:49.617311944 -0400
-@@ -60,6 +60,10 @@ DEFINE_TRACE(sched_process_free);
- DEFINE_TRACE(sched_process_exit);
- DEFINE_TRACE(sched_process_wait);
+diff -urNp linux-2.6.31.4/kernel/exit.c linux-2.6.31.4/kernel/exit.c
+--- linux-2.6.31.4/kernel/exit.c 2009-10-12 23:26:18.119754005 -0400
++++ linux-2.6.31.4/kernel/exit.c 2009-10-12 23:26:38.978149596 -0400
+@@ -56,6 +56,10 @@
+ #include <asm/mmu_context.h>
+ #include "cred-internals.h"
+#ifdef CONFIG_GRKERNSEC
+extern rwlock_t grsec_exec_file_lock;
@@ -38273,7 +40455,7 @@ diff -urNp linux-2.6.30.8/kernel/exit.c linux-2.6.30.8/kernel/exit.c
static void exit_mm(struct task_struct * tsk);
static void __unhash_process(struct task_struct *p)
-@@ -168,6 +172,8 @@ void release_task(struct task_struct * p
+@@ -167,6 +171,8 @@ void release_task(struct task_struct * p
struct task_struct *leader;
int zap_leader;
repeat:
@@ -38305,7 +40487,7 @@ diff -urNp linux-2.6.30.8/kernel/exit.c linux-2.6.30.8/kernel/exit.c
/* Set the exit signal to SIGCHLD so we signal init on exit */
current->exit_signal = SIGCHLD;
-@@ -427,6 +444,17 @@ void daemonize(const char *name, ...)
+@@ -426,6 +443,17 @@ void daemonize(const char *name, ...)
vsnprintf(current->comm, sizeof(current->comm), name, args);
va_end(args);
@@ -38323,7 +40505,7 @@ diff -urNp linux-2.6.30.8/kernel/exit.c linux-2.6.30.8/kernel/exit.c
/*
* 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
-@@ -954,6 +982,9 @@ NORET_TYPE void do_exit(long code)
+@@ -953,6 +981,9 @@ NORET_TYPE void do_exit(long code)
tsk->exit_code = code;
taskstats_exit(tsk, group_dead);
@@ -38333,19 +40515,19 @@ diff -urNp linux-2.6.30.8/kernel/exit.c linux-2.6.30.8/kernel/exit.c
exit_mm(tsk);
if (group_dead)
-@@ -1158,7 +1189,7 @@ static int wait_task_zombie(struct task_
+@@ -1169,7 +1200,7 @@ static int wait_task_zombie(struct wait_
- if (unlikely(options & WNOWAIT)) {
+ if (unlikely(wo->wo_flags & WNOWAIT)) {
int exit_code = p->exit_code;
- int why, status;
+ int why;
get_task_struct(p);
read_unlock(&tasklist_lock);
-diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
---- linux-2.6.30.8/kernel/fork.c 2009-09-09 17:37:33.938204382 -0400
-+++ linux-2.6.30.8/kernel/fork.c 2009-09-09 17:37:58.254141270 -0400
-@@ -245,7 +245,7 @@ static struct task_struct *dup_task_stru
+diff -urNp linux-2.6.31.4/kernel/fork.c linux-2.6.31.4/kernel/fork.c
+--- linux-2.6.31.4/kernel/fork.c 2009-10-12 23:26:18.120395868 -0400
++++ linux-2.6.31.4/kernel/fork.c 2009-10-12 23:28:40.273368388 -0400
+@@ -244,7 +244,7 @@ static struct task_struct *dup_task_stru
*stackend = STACK_END_MAGIC; /* for overflow detection */
#ifdef CONFIG_CC_STACKPROTECTOR
@@ -38354,7 +40536,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
#endif
/* One for us, one for whoever does the "release_task()" (usually parent) */
-@@ -282,8 +282,8 @@ static int dup_mmap(struct mm_struct *mm
+@@ -281,8 +281,8 @@ static int dup_mmap(struct mm_struct *mm
mm->locked_vm = 0;
mm->mmap = NULL;
mm->mmap_cache = NULL;
@@ -38365,7 +40547,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
mm->map_count = 0;
cpumask_clear(mm_cpumask(mm));
mm->mm_rb = RB_ROOT;
-@@ -320,6 +320,7 @@ static int dup_mmap(struct mm_struct *mm
+@@ -319,6 +319,7 @@ static int dup_mmap(struct mm_struct *mm
tmp->vm_flags &= ~VM_LOCKED;
tmp->vm_mm = mm;
tmp->vm_next = NULL;
@@ -38373,7 +40555,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
anon_vma_link(tmp);
file = tmp->vm_file;
if (file) {
-@@ -367,6 +368,31 @@ static int dup_mmap(struct mm_struct *mm
+@@ -366,6 +367,31 @@ static int dup_mmap(struct mm_struct *mm
if (retval)
goto out;
}
@@ -38405,19 +40587,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
/* a new mm has just been created */
arch_dup_mmap(oldmm, mm);
retval = 0;
-@@ -547,9 +573,11 @@ void mm_release(struct task_struct *tsk,
- #ifdef CONFIG_FUTEX
- if (unlikely(tsk->robust_list))
- exit_robust_list(tsk);
-+ tsk->robust_list = NULL;
- #ifdef CONFIG_COMPAT
- if (unlikely(tsk->compat_robust_list))
- compat_exit_robust_list(tsk);
-+ tsk->compat_robust_list = NULL;
- #endif
- #endif
-
-@@ -568,6 +596,7 @@ void mm_release(struct task_struct *tsk,
+@@ -573,6 +599,7 @@ void mm_release(struct task_struct *tsk,
* the value intact in a core dump, and to save the unnecessary
* trouble otherwise. Userland only wants this done for a sys_exit.
*/
@@ -38425,7 +40595,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
if (tsk->clear_child_tid) {
if (!(tsk->flags & PF_SIGNALED) &&
atomic_read(&mm->mm_users) > 1) {
-@@ -577,7 +606,7 @@ void mm_release(struct task_struct *tsk,
+@@ -582,7 +609,7 @@ void mm_release(struct task_struct *tsk,
*/
put_user(0, tsk->clear_child_tid);
sys_futex(tsk->clear_child_tid, FUTEX_WAKE,
@@ -38434,7 +40604,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
}
tsk->clear_child_tid = NULL;
}
-@@ -695,7 +724,7 @@ static int copy_fs(unsigned long clone_f
+@@ -700,7 +727,7 @@ static int copy_fs(unsigned long clone_f
write_unlock(&fs->lock);
return -EAGAIN;
}
@@ -38443,7 +40613,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
write_unlock(&fs->lock);
return 0;
}
-@@ -976,6 +1005,9 @@ static struct task_struct *copy_process(
+@@ -983,6 +1010,9 @@ static struct task_struct *copy_process(
DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
#endif
retval = -EAGAIN;
@@ -38453,8 +40623,8 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
if (atomic_read(&p->real_cred->user->processes) >=
p->signal->rlim[RLIMIT_NPROC].rlim_cur) {
if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) &&
-@@ -1131,6 +1163,8 @@ static struct task_struct *copy_process(
- goto bad_fork_free_graph;
+@@ -1139,6 +1169,8 @@ static struct task_struct *copy_process(
+ goto bad_fork_free_pid;
}
+ gr_copy_label(p);
@@ -38462,7 +40632,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL;
/*
* Clear TID on mm_release()?
-@@ -1300,6 +1334,8 @@ bad_fork_cleanup_count:
+@@ -1308,6 +1340,8 @@ bad_fork_cleanup_count:
bad_fork_free:
free_task(p);
fork_out:
@@ -38471,7 +40641,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
return ERR_PTR(retval);
}
-@@ -1393,6 +1429,8 @@ long do_fork(unsigned long clone_flags,
+@@ -1401,6 +1435,8 @@ long do_fork(unsigned long clone_flags,
if (clone_flags & CLONE_PARENT_SETTID)
put_user(nr, parent_tidptr);
@@ -38480,7 +40650,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
if (clone_flags & CLONE_VFORK) {
p->vfork_done = &vfork;
init_completion(&vfork);
-@@ -1525,7 +1563,7 @@ static int unshare_fs(unsigned long unsh
+@@ -1533,7 +1569,7 @@ static int unshare_fs(unsigned long unsh
return 0;
/* don't need lock here; in the worst case we'll do useless copy */
@@ -38489,7 +40659,7 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
return 0;
*new_fsp = copy_fs_struct(fs);
-@@ -1648,7 +1686,7 @@ SYSCALL_DEFINE1(unshare, unsigned long,
+@@ -1656,7 +1692,7 @@ SYSCALL_DEFINE1(unshare, unsigned long,
fs = current->fs;
write_lock(&fs->lock);
current->fs = new_fs;
@@ -38498,10 +40668,10 @@ diff -urNp linux-2.6.30.8/kernel/fork.c linux-2.6.30.8/kernel/fork.c
new_fs = NULL;
else
new_fs = fs;
-diff -urNp linux-2.6.30.8/kernel/futex.c linux-2.6.30.8/kernel/futex.c
---- linux-2.6.30.8/kernel/futex.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/futex.c 2009-07-30 09:48:10.127681569 -0400
-@@ -212,6 +212,11 @@ get_futex_key(u32 __user *uaddr, int fsh
+diff -urNp linux-2.6.31.4/kernel/futex.c linux-2.6.31.4/kernel/futex.c
+--- linux-2.6.31.4/kernel/futex.c 2009-10-12 23:26:18.130015056 -0400
++++ linux-2.6.31.4/kernel/futex.c 2009-10-12 23:26:38.979417555 -0400
+@@ -218,6 +218,11 @@ get_futex_key(u32 __user *uaddr, int fsh
struct page *page;
int err;
@@ -38513,7 +40683,7 @@ diff -urNp linux-2.6.30.8/kernel/futex.c linux-2.6.30.8/kernel/futex.c
/*
* The futex address must be "naturally" aligned.
*/
-@@ -1285,7 +1290,7 @@ retry_private:
+@@ -1788,7 +1793,7 @@ static int futex_wait(u32 __user *uaddr,
restart = &current_thread_info()->restart_block;
restart->fn = futex_wait_restart;
@@ -38522,7 +40692,7 @@ diff -urNp linux-2.6.30.8/kernel/futex.c linux-2.6.30.8/kernel/futex.c
restart->futex.val = val;
restart->futex.time = abs_time->tv64;
restart->futex.bitset = bitset;
-@@ -1809,7 +1814,7 @@ retry:
+@@ -2402,7 +2407,7 @@ retry:
*/
static inline int fetch_robust_entry(struct robust_list __user **entry,
struct robust_list __user * __user *head,
@@ -38531,29 +40701,64 @@ diff -urNp linux-2.6.30.8/kernel/futex.c linux-2.6.30.8/kernel/futex.c
{
unsigned long uentry;
-diff -urNp linux-2.6.30.8/kernel/kallsyms.c linux-2.6.30.8/kernel/kallsyms.c
---- linux-2.6.30.8/kernel/kallsyms.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/kallsyms.c 2009-07-30 11:10:49.619428708 -0400
-@@ -62,6 +62,18 @@ static inline int is_kernel_text(unsigne
+diff -urNp linux-2.6.31.4/kernel/gcov/base.c linux-2.6.31.4/kernel/gcov/base.c
+--- linux-2.6.31.4/kernel/gcov/base.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/gcov/base.c 2009-10-11 15:29:48.968525491 -0400
+@@ -102,11 +102,6 @@ void gcov_enable_events(void)
+ }
- static inline int is_kernel(unsigned long addr)
+ #ifdef CONFIG_MODULES
+-static inline int within(void *addr, void *start, unsigned long size)
+-{
+- return ((addr >= start) && (addr < start + size));
+-}
+-
+ /* Update list and generate events when modules are unloaded. */
+ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
+ void *data)
+@@ -121,7 +116,7 @@ static int gcov_module_notifier(struct n
+ prev = NULL;
+ /* Remove entries located in module from linked list. */
+ for (info = gcov_info_head; info; info = info->next) {
+- if (within(info, mod->module_core, mod->core_size)) {
++ if (within_module_core_rw((unsigned long)info, mod)) {
+ if (prev)
+ prev->next = info->next;
+ else
+diff -urNp linux-2.6.31.4/kernel/kallsyms.c linux-2.6.31.4/kernel/kallsyms.c
+--- linux-2.6.31.4/kernel/kallsyms.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/kallsyms.c 2009-10-11 15:29:56.562357747 -0400
+@@ -11,6 +11,9 @@
+ * Changed the compression method from stem compression to "table lookup"
+ * compression (see scripts/kallsyms.c for a more complete description)
+ */
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++#define __INCLUDED_BY_HIDESYM 1
++#endif
+ #include <linux/kallsyms.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
+@@ -51,6 +54,9 @@ extern const unsigned long kallsyms_mark
+
+ static inline int is_kernel_inittext(unsigned long addr)
{
-+
-+#if defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_MODULES)
-+ if ((unsigned long)MODULES_VADDR <= ktla_ktva(addr) &&
-+ ktla_ktva(addr) < (unsigned long)MODULES_END)
++ if (system_state != SYSTEM_BOOTING)
+ return 0;
-+#endif
+
-+#ifdef CONFIG_X86_32
+ if (addr >= (unsigned long)_sinittext
+ && addr <= (unsigned long)_einittext)
+ return 1;
+@@ -66,6 +72,9 @@ static inline int is_kernel_text(unsigne
+
+ static inline int is_kernel(unsigned long addr)
+ {
+ if (is_kernel_inittext(addr))
+ return 1;
-+#endif
+
if (addr >= (unsigned long)_stext && addr <= (unsigned long)_end)
return 1;
return in_gate_area_no_task(addr);
-@@ -391,7 +403,6 @@ static unsigned long get_ksymbol_core(st
+@@ -412,7 +421,6 @@ static unsigned long get_ksymbol_core(st
static void reset_iter(struct kallsym_iter *iter, loff_t new_pos)
{
@@ -38561,7 +40766,7 @@ diff -urNp linux-2.6.30.8/kernel/kallsyms.c linux-2.6.30.8/kernel/kallsyms.c
iter->nameoff = get_symbol_offset(new_pos);
iter->pos = new_pos;
}
-@@ -475,7 +486,7 @@ static int kallsyms_open(struct inode *i
+@@ -500,7 +508,7 @@ static int kallsyms_open(struct inode *i
struct kallsym_iter *iter;
int ret;
@@ -38570,12 +40775,12 @@ diff -urNp linux-2.6.30.8/kernel/kallsyms.c linux-2.6.30.8/kernel/kallsyms.c
if (!iter)
return -ENOMEM;
reset_iter(iter, 0);
-@@ -497,7 +508,15 @@ static const struct file_operations kall
+@@ -522,7 +530,15 @@ static const struct file_operations kall
static int __init kallsyms_init(void)
{
-+#ifdef CONFIG_GRKERNSEC_PROC_ADD
-+#ifdef CONFIG_GRKERNSEC_PROC_USER
++#if defined(CONFIG_GRKERNSEC_PROC_ADD) || defined(CONFIG_GRKERNSEC_HIDESYM)
++#if defined(CONFIG_GRKERNSEC_PROC_USER) || defined(CONFIG_GRKERNSEC_HIDESYM)
+ proc_create("kallsyms", S_IFREG | S_IRUSR, NULL, &kallsyms_operations);
+#elif defined(CONFIG_GRKERNSEC_PROC_USERGROUP)
+ proc_create("kallsyms", S_IFREG | S_IRUSR | S_IRGRP, NULL, &kallsyms_operations);
@@ -38585,11 +40790,41 @@ diff -urNp linux-2.6.30.8/kernel/kallsyms.c linux-2.6.30.8/kernel/kallsyms.c
+#endif
return 0;
}
- __initcall(kallsyms_init);
-diff -urNp linux-2.6.30.8/kernel/kmod.c linux-2.6.30.8/kernel/kmod.c
---- linux-2.6.30.8/kernel/kmod.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/kmod.c 2009-08-25 20:49:05.728618505 -0400
-@@ -85,6 +85,18 @@ int __request_module(bool wait, const ch
+ device_initcall(kallsyms_init);
+diff -urNp linux-2.6.31.4/kernel/kgdb.c linux-2.6.31.4/kernel/kgdb.c
+--- linux-2.6.31.4/kernel/kgdb.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/kgdb.c 2009-10-11 15:29:56.764361720 -0400
+@@ -86,7 +86,7 @@ static int kgdb_io_module_registered;
+ /* Guard for recursive entry */
+ static int exception_level;
+
+-static struct kgdb_io *kgdb_io_ops;
++static const struct kgdb_io *kgdb_io_ops;
+ static DEFINE_SPINLOCK(kgdb_registration_lock);
+
+ /* kgdb console driver is loaded */
+@@ -1637,7 +1637,7 @@ static void kgdb_initial_breakpoint(void
+ *
+ * Register it with the KGDB core.
+ */
+-int kgdb_register_io_module(struct kgdb_io *new_kgdb_io_ops)
++int kgdb_register_io_module(const struct kgdb_io *new_kgdb_io_ops)
+ {
+ int err;
+
+@@ -1682,7 +1682,7 @@ EXPORT_SYMBOL_GPL(kgdb_register_io_modul
+ *
+ * Unregister it with the KGDB core.
+ */
+-void kgdb_unregister_io_module(struct kgdb_io *old_kgdb_io_ops)
++void kgdb_unregister_io_module(const struct kgdb_io *old_kgdb_io_ops)
+ {
+ BUG_ON(kgdb_connected);
+
+diff -urNp linux-2.6.31.4/kernel/kmod.c linux-2.6.31.4/kernel/kmod.c
+--- linux-2.6.31.4/kernel/kmod.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/kmod.c 2009-10-11 15:29:48.969387954 -0400
+@@ -84,6 +84,18 @@ int __request_module(bool wait, const ch
if (ret >= MODULE_NAME_LEN)
return -ENAMETOOLONG;
@@ -38608,9 +40843,9 @@ diff -urNp linux-2.6.30.8/kernel/kmod.c linux-2.6.30.8/kernel/kmod.c
/* If modprobe needs a service that is in a module, we get a recursive
* loop. Limit the number of running kmod threads to max_threads/2 or
* MAX_KMOD_CONCURRENT, whichever is the smaller. A cleaner method
-diff -urNp linux-2.6.30.8/kernel/kprobes.c linux-2.6.30.8/kernel/kprobes.c
---- linux-2.6.30.8/kernel/kprobes.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/kprobes.c 2009-07-30 09:48:10.128762672 -0400
+diff -urNp linux-2.6.31.4/kernel/kprobes.c linux-2.6.31.4/kernel/kprobes.c
+--- linux-2.6.31.4/kernel/kprobes.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/kprobes.c 2009-10-11 15:29:48.969387954 -0400
@@ -184,7 +184,7 @@ static kprobe_opcode_t __kprobes *__get_
* kernel image and loaded module images reside. This is required
* so x86_64 can correctly handle the %rip-relative fixups.
@@ -38629,7 +40864,7 @@ diff -urNp linux-2.6.30.8/kernel/kprobes.c linux-2.6.30.8/kernel/kprobes.c
kfree(kip);
}
return 1;
-@@ -1333,7 +1333,7 @@ static int __kprobes show_kprobe_addr(st
+@@ -1329,7 +1329,7 @@ static int __kprobes show_kprobe_addr(st
return 0;
}
@@ -38638,7 +40873,7 @@ diff -urNp linux-2.6.30.8/kernel/kprobes.c linux-2.6.30.8/kernel/kprobes.c
.start = kprobe_seq_start,
.next = kprobe_seq_next,
.stop = kprobe_seq_stop,
-@@ -1345,7 +1345,7 @@ static int __kprobes kprobes_open(struct
+@@ -1341,7 +1341,7 @@ static int __kprobes kprobes_open(struct
return seq_open(filp, &kprobes_seq_ops);
}
@@ -38647,7 +40882,7 @@ diff -urNp linux-2.6.30.8/kernel/kprobes.c linux-2.6.30.8/kernel/kprobes.c
.open = kprobes_open,
.read = seq_read,
.llseek = seq_lseek,
-@@ -1527,7 +1527,7 @@ static ssize_t write_enabled_file_bool(s
+@@ -1523,7 +1523,7 @@ static ssize_t write_enabled_file_bool(s
return count;
}
@@ -38656,38 +40891,33 @@ diff -urNp linux-2.6.30.8/kernel/kprobes.c linux-2.6.30.8/kernel/kprobes.c
.read = read_enabled_file_bool,
.write = write_enabled_file_bool,
};
-diff -urNp linux-2.6.30.8/kernel/lockdep.c linux-2.6.30.8/kernel/lockdep.c
---- linux-2.6.30.8/kernel/lockdep.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/lockdep.c 2009-07-30 09:48:10.130698443 -0400
-@@ -628,6 +628,10 @@ static int static_obj(void *obj)
+diff -urNp linux-2.6.31.4/kernel/lockdep.c linux-2.6.31.4/kernel/lockdep.c
+--- linux-2.6.31.4/kernel/lockdep.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/lockdep.c 2009-10-18 10:09:07.074626502 -0400
+@@ -630,6 +630,10 @@ static int static_obj(void *obj)
int i;
#endif
+#ifdef CONFIG_PAX_KERNEXEC
-+ start = (unsigned long )&_data;
++ start = (unsigned long )&_sdata;
+#endif
+
/*
* static variable?
*/
-@@ -639,9 +643,12 @@ static int static_obj(void *obj)
- * percpu var?
+@@ -642,8 +646,7 @@ static int static_obj(void *obj)
*/
for_each_possible_cpu(i) {
-+#ifdef CONFIG_X86_32
-+ start = per_cpu_offset(i);
-+#else
start = (unsigned long) &__per_cpu_start + per_cpu_offset(i);
- end = (unsigned long) &__per_cpu_start + PERCPU_ENOUGH_ROOM
- + per_cpu_offset(i);
-+#endif
+ end = start + PERCPU_ENOUGH_ROOM;
if ((addr >= start) && (addr < end))
return 1;
-diff -urNp linux-2.6.30.8/kernel/lockdep_proc.c linux-2.6.30.8/kernel/lockdep_proc.c
---- linux-2.6.30.8/kernel/lockdep_proc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/lockdep_proc.c 2009-07-30 09:48:10.130698443 -0400
+diff -urNp linux-2.6.31.4/kernel/lockdep_proc.c linux-2.6.31.4/kernel/lockdep_proc.c
+--- linux-2.6.31.4/kernel/lockdep_proc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/lockdep_proc.c 2009-10-11 15:29:48.970376150 -0400
@@ -670,7 +670,7 @@ static int ls_show(struct seq_file *m, v
return 0;
}
@@ -38697,34 +40927,20 @@ diff -urNp linux-2.6.30.8/kernel/lockdep_proc.c linux-2.6.30.8/kernel/lockdep_pr
.start = ls_start,
.next = ls_next,
.stop = ls_stop,
-diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
---- linux-2.6.30.8/kernel/module.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/module.c 2009-09-04 10:14:21.379509177 -0400
-@@ -46,6 +46,11 @@
- #include <linux/rculist.h>
- #include <asm/uaccess.h>
- #include <asm/cacheflush.h>
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+#include <asm/desc.h>
-+#endif
-+
- #include <linux/license.h>
- #include <asm/sections.h>
- #include <linux/tracepoint.h>
-@@ -78,7 +83,10 @@ static DECLARE_WAIT_QUEUE_HEAD(module_wq
+diff -urNp linux-2.6.31.4/kernel/module.c linux-2.6.31.4/kernel/module.c
+--- linux-2.6.31.4/kernel/module.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/module.c 2009-10-18 10:09:07.075622427 -0400
+@@ -83,7 +83,8 @@ static DECLARE_WAIT_QUEUE_HEAD(module_wq
static BLOCKING_NOTIFIER_HEAD(module_notify_list);
/* Bounds of module allocation, for speeding __module_address */
-static unsigned long module_addr_min = -1UL, module_addr_max = 0;
+static unsigned long module_addr_min_rw = -1UL, module_addr_max_rw = 0;
+static unsigned long module_addr_min_rx = -1UL, module_addr_max_rx = 0;
-+
-+extern int gr_check_modstop(void);
int register_module_notifier(struct notifier_block * nb)
{
-@@ -234,7 +242,7 @@ bool each_symbol(bool (*fn)(const struct
+@@ -239,7 +240,7 @@ bool each_symbol(bool (*fn)(const struct
return true;
list_for_each_entry_rcu(mod, &modules, list) {
@@ -38733,7 +40949,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
{ mod->syms, mod->syms + mod->num_syms, mod->crcs,
NOT_GPL_ONLY, false },
{ mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
-@@ -256,7 +264,7 @@ bool each_symbol(bool (*fn)(const struct
+@@ -261,7 +262,7 @@ bool each_symbol(bool (*fn)(const struct
#endif
};
@@ -38742,16 +40958,16 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
return true;
}
return false;
-@@ -430,7 +438,7 @@ static void *percpu_modalloc(unsigned lo
- unsigned int i;
+@@ -436,7 +437,7 @@ static void *percpu_modalloc(unsigned lo
void *ptr;
+ int cpu;
- if (align > PAGE_SIZE) {
+ if (align-1 >= PAGE_SIZE) {
printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n",
name, align, PAGE_SIZE);
align = PAGE_SIZE;
-@@ -533,7 +541,11 @@ static void percpu_modcopy(void *pcpudes
+@@ -549,7 +550,11 @@ static void percpu_modcopy(void *pcpudes
int cpu;
for_each_possible_cpu(cpu)
@@ -38763,23 +40979,9 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
}
#else /* ... !CONFIG_SMP */
-@@ -777,6 +789,9 @@ SYSCALL_DEFINE2(delete_module, const cha
- char name[MODULE_NAME_LEN];
- int ret, forced = 0;
-
-+ if (gr_check_modstop())
-+ return -EPERM;
-+
- if (!capable(CAP_SYS_MODULE))
- return -EPERM;
-
-@@ -1490,10 +1505,11 @@ static void free_module(struct module *m
+@@ -1513,7 +1518,8 @@ static void free_module(struct module *m
destroy_params(mod->kp, mod->num_kp);
- /* release any pointers to mcount in this module */
-- ftrace_release(mod->module_core, mod->core_size);
-+ ftrace_release(mod->module_core_rx, mod->core_size_rx);
-
/* This may be NULL, but that's OK */
- module_free(mod, mod->module_init);
+ module_free(mod, mod->module_init_rw);
@@ -38787,7 +40989,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
kfree(mod->args);
if (mod->percpu)
percpu_modfree(mod->percpu);
-@@ -1502,10 +1518,12 @@ static void free_module(struct module *m
+@@ -1522,10 +1528,12 @@ static void free_module(struct module *m
percpu_modfree(mod->refptr);
#endif
/* Free lock-classes: */
@@ -38802,54 +41004,27 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
}
void *__symbol_get(const char *symbol)
-@@ -1573,6 +1591,10 @@ static int simplify_symbols(Elf_Shdr *se
- int ret = 0;
- const struct kernel_symbol *ksym;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- for (i = 1; i < n; i++) {
- switch (sym[i].st_shndx) {
- case SHN_COMMON:
-@@ -1595,7 +1617,17 @@ static int simplify_symbols(Elf_Shdr *se
+@@ -1615,7 +1623,9 @@ static int simplify_symbols(Elf_Shdr *se
strtab + sym[i].st_name, mod);
/* Ok if resolved. */
if (ksym) {
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
sym[i].st_value = ksym->value;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
break;
}
-@@ -1614,7 +1646,17 @@ static int simplify_symbols(Elf_Shdr *se
+@@ -1634,7 +1644,9 @@ static int simplify_symbols(Elf_Shdr *se
secbase = (unsigned long)mod->percpu;
else
secbase = sechdrs[sym[i].st_shndx].sh_addr;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
sym[i].st_value += secbase;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
break;
}
}
-@@ -1675,11 +1717,12 @@ static void layout_sections(struct modul
+@@ -1695,11 +1707,12 @@ static void layout_sections(struct modul
|| s->sh_entsize != ~0UL
|| strstarts(secstrings + s->sh_name, ".init"))
continue;
@@ -38865,7 +41040,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
}
DEBUGP("Init section allocation order:\n");
-@@ -1692,12 +1735,13 @@ static void layout_sections(struct modul
+@@ -1712,12 +1725,13 @@ static void layout_sections(struct modul
|| s->sh_entsize != ~0UL
|| !strstarts(secstrings + s->sh_name, ".init"))
continue;
@@ -38883,16 +41058,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
}
}
-@@ -1836,14 +1880,31 @@ static void add_kallsyms(struct module *
- {
- unsigned int i;
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- mod->symtab = (void *)sechdrs[symindex].sh_addr;
- mod->num_symtab = sechdrs[symindex].sh_size / sizeof(Elf_Sym);
+@@ -1861,9 +1875,14 @@ static void add_kallsyms(struct module *
mod->strtab = (void *)sechdrs[strindex].sh_addr;
/* Set types up while we still have access to sections. */
@@ -38902,23 +41068,15 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
+
+ for (i = 0; i < mod->num_symtab; i++) {
+ char type = elf_type(&mod->symtab[i], sechdrs, secstrings, mod);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
+ mod->symtab[i].st_info = type;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
+ }
+
}
#else
static inline void add_kallsyms(struct module *mod,
-@@ -1864,16 +1925,30 @@ static void dynamic_debug_setup(struct _
+@@ -1884,16 +1903,30 @@ static void dynamic_debug_setup(struct _
#endif
}
@@ -38954,24 +41112,38 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
}
return ret;
}
-@@ -1899,6 +1974,10 @@ static noinline struct module *load_modu
- unsigned long *mseg;
- mm_segment_t old_fs;
+@@ -1905,8 +1938,8 @@ static void kmemleak_load_module(struct
+ unsigned int i;
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-+
- DEBUGP("load_module: umod=%p, len=%lu, uargs=%p\n",
- umod, len, uargs);
- if (len < sizeof(*hdr))
-@@ -2049,22 +2128,57 @@ static noinline struct module *load_modu
+ /* only scan the sections containing data */
+- kmemleak_scan_area(mod->module_core, (unsigned long)mod -
+- (unsigned long)mod->module_core,
++ kmemleak_scan_area(mod->module_core_rw, (unsigned long)mod -
++ (unsigned long)mod->module_core_rw,
+ sizeof(struct module), GFP_KERNEL);
+
+ for (i = 1; i < hdr->e_shnum; i++) {
+@@ -1916,8 +1949,8 @@ static void kmemleak_load_module(struct
+ && strncmp(secstrings + sechdrs[i].sh_name, ".bss", 4) != 0)
+ continue;
+
+- kmemleak_scan_area(mod->module_core, sechdrs[i].sh_addr -
+- (unsigned long)mod->module_core,
++ kmemleak_scan_area(mod->module_core_rw, sechdrs[i].sh_addr -
++ (unsigned long)mod->module_core_rw,
+ sechdrs[i].sh_size, GFP_KERNEL);
+ }
+ }
+@@ -2097,7 +2130,7 @@ static noinline struct module *load_modu
layout_sections(mod, hdr, sechdrs, secstrings);
/* Do the allocs. */
- ptr = module_alloc_update_bounds(mod->core_size);
+ ptr = module_alloc_update_bounds_rw(mod->core_size_rw);
- if (!ptr) {
+ /*
+ * The pointer to this block is stored in the module structure
+ * which is inside the block. Just mark it as not being a
+@@ -2108,23 +2141,47 @@ static noinline struct module *load_modu
err = -ENOMEM;
goto free_percpu;
}
@@ -38981,8 +41153,16 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
+ mod->module_core_rw = ptr;
- ptr = module_alloc_update_bounds(mod->init_size);
-- if (!ptr && mod->init_size) {
+ ptr = module_alloc_update_bounds_rw(mod->init_size_rw);
+ /*
+ * The pointer to this block is stored in the module structure
+ * which is inside the block. This block doesn't need to be
+ * scanned as it contains data and code that will be freed
+ * after the module is initialized.
+ */
+- kmemleak_ignore(ptr);
+- if (!ptr && mod->init_size) {
++ kmemleak_not_leak(ptr);
+ if (!ptr && mod->init_size_rw) {
err = -ENOMEM;
- goto free_core;
@@ -38992,46 +41172,34 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
- mod->module_init = ptr;
+ memset(ptr, 0, mod->init_size_rw);
+ mod->module_init_rw = ptr;
-
++
+ ptr = module_alloc_update_bounds_rx(mod->core_size_rx);
++ kmemleak_not_leak(ptr);
+ if (!ptr) {
+ err = -ENOMEM;
+ goto free_init_rw;
+ }
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
+ memset(ptr, 0, mod->core_size_rx);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
+ mod->module_core_rx = ptr;
+
+ ptr = module_alloc_update_bounds_rx(mod->init_size_rx);
++ kmemleak_not_leak(ptr);
+ if (!ptr && mod->init_size_rx) {
+ err = -ENOMEM;
+ goto free_core_rx;
+ }
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
+ memset(ptr, 0, mod->init_size_rx);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
+ mod->module_init_rx = ptr;
+
/* Transfer each section which specifies SHF_ALLOC */
DEBUGP("final section addresses:\n");
- for (i = 0; i < hdr->e_shnum; i++) {
-@@ -2073,17 +2187,41 @@ static noinline struct module *load_modu
+@@ -2134,17 +2191,41 @@ static noinline struct module *load_modu
if (!(sechdrs[i].sh_flags & SHF_ALLOC))
continue;
@@ -39061,9 +41229,9 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
- sechdrs[i].sh_size);
+#ifdef CONFIG_PAX_KERNEXEC
+ if (!(sechdrs[i].sh_flags & SHF_WRITE) && (sechdrs[i].sh_flags & SHF_ALLOC)) {
-+ pax_open_kernel(cr0);
++ pax_open_kernel();
+ memcpy(dest, (void *)sechdrs[i].sh_addr, sechdrs[i].sh_size);
-+ pax_close_kernel(cr0);
++ pax_close_kernel();
+ } else
+#endif
+
@@ -39082,7 +41250,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
DEBUGP("\t0x%lx %s\n", sechdrs[i].sh_addr, secstrings + sechdrs[i].sh_name);
}
/* Module has been moved. */
-@@ -2094,7 +2232,7 @@ static noinline struct module *load_modu
+@@ -2156,7 +2237,7 @@ static noinline struct module *load_modu
mod->name);
if (!mod->refptr) {
err = -ENOMEM;
@@ -39091,7 +41259,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
}
#endif
/* Now we've moved module, initialize linked lists, etc. */
-@@ -2191,8 +2329,8 @@ static noinline struct module *load_modu
+@@ -2269,8 +2350,8 @@ static noinline struct module *load_modu
/* Now do relocations. */
for (i = 1; i < hdr->e_shnum; i++) {
@@ -39101,7 +41269,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
/* Not a valid relocation section? */
if (info >= hdr->e_shnum)
-@@ -2255,12 +2393,12 @@ static noinline struct module *load_modu
+@@ -2328,12 +2409,12 @@ static noinline struct module *load_modu
* Do it before processing of module parameters, so the module
* can provide parameter accessor functions of its own.
*/
@@ -39120,12 +41288,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
set_fs(old_fs);
-@@ -2302,16 +2440,20 @@ static noinline struct module *load_modu
- cleanup:
- kobject_del(&mod->mkobj.kobj);
- kobject_put(&mod->mkobj.kobj);
-- ftrace_release(mod->module_core, mod->core_size);
-+ ftrace_release(mod->module_core_rx, mod->core_size_rx);
+@@ -2378,12 +2459,16 @@ static noinline struct module *load_modu
free_unload:
module_unload_free(mod);
#if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP)
@@ -39146,20 +41309,10 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
/* mod will be freed with core. Don't access it beyond this line! */
free_percpu:
if (percpu)
-@@ -2335,6 +2477,9 @@ SYSCALL_DEFINE3(init_module, void __user
- struct module *mod;
- int ret = 0;
-
-+ if (gr_check_modstop())
-+ return -EPERM;
-+
- /* Must have permission */
- if (!capable(CAP_SYS_MODULE))
- return -EPERM;
-@@ -2394,20 +2539,17 @@ SYSCALL_DEFINE3(init_module, void __user
- mutex_lock(&module_mutex);
+@@ -2479,10 +2564,12 @@ SYSCALL_DEFINE3(init_module, void __user
/* Drop initial reference. */
module_put(mod);
+ trim_init_extable(mod);
- module_free(mod, mod->module_init);
- mod->module_init = NULL;
- mod->init_size = 0;
@@ -39173,17 +41326,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
mutex_unlock(&module_mutex);
return 0;
- }
-
--static inline int within(unsigned long addr, void *start, unsigned long size)
--{
-- return ((void *)addr >= start && (void *)addr < start + size);
--}
--
- #ifdef CONFIG_KALLSYMS
- /*
- * This ignores the intensely annoying "mapping symbols" found
-@@ -2428,10 +2570,16 @@ static const char *get_ksymbol(struct mo
+@@ -2513,10 +2600,16 @@ static const char *get_ksymbol(struct mo
unsigned long nextval;
/* At worse, next value is at end of module */
@@ -39203,7 +41346,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
/* Scan for closest preceeding symbol, and next symbol. (ELF
starts real symbols at 1). */
-@@ -2677,7 +2825,7 @@ static int m_show(struct seq_file *m, vo
+@@ -2762,7 +2855,7 @@ static int m_show(struct seq_file *m, vo
char buf[8];
seq_printf(m, "%s %u",
@@ -39212,7 +41355,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
print_unload_info(m, mod);
/* Informative for users. */
-@@ -2686,7 +2834,7 @@ static int m_show(struct seq_file *m, vo
+@@ -2771,7 +2864,7 @@ static int m_show(struct seq_file *m, vo
mod->state == MODULE_STATE_COMING ? "Loading":
"Live");
/* Used by oprofile and other similar tools. */
@@ -39221,7 +41364,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
/* Taints info */
if (mod->taints)
-@@ -2722,7 +2870,17 @@ static const struct file_operations proc
+@@ -2807,7 +2900,17 @@ static const struct file_operations proc
static int __init proc_modules_init(void)
{
@@ -39239,7 +41382,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
return 0;
}
module_init(proc_modules_init);
-@@ -2781,12 +2939,12 @@ struct module *__module_address(unsigned
+@@ -2866,12 +2969,12 @@ struct module *__module_address(unsigned
{
struct module *mod;
@@ -39255,7 +41398,7 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
return mod;
return NULL;
}
-@@ -2820,11 +2978,20 @@ bool is_module_text_address(unsigned lon
+@@ -2905,11 +3008,20 @@ bool is_module_text_address(unsigned lon
*/
struct module *__module_text_address(unsigned long addr)
{
@@ -39279,22 +41422,10 @@ diff -urNp linux-2.6.30.8/kernel/module.c linux-2.6.30.8/kernel/module.c
mod = NULL;
}
return mod;
-diff -urNp linux-2.6.30.8/kernel/mutex.c linux-2.6.30.8/kernel/mutex.c
---- linux-2.6.30.8/kernel/mutex.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/mutex.c 2009-07-30 09:48:10.131672113 -0400
-@@ -89,7 +89,7 @@ __mutex_lock_slowpath(atomic_t *lock_cou
- *
- * This function is similar to (but not equivalent to) down().
- */
--void inline __sched mutex_lock(struct mutex *lock)
-+inline void __sched mutex_lock(struct mutex *lock)
- {
- might_sleep();
- /*
-diff -urNp linux-2.6.30.8/kernel/panic.c linux-2.6.30.8/kernel/panic.c
---- linux-2.6.30.8/kernel/panic.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/panic.c 2009-07-30 09:48:10.131672113 -0400
-@@ -390,7 +390,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
+diff -urNp linux-2.6.31.4/kernel/panic.c linux-2.6.31.4/kernel/panic.c
+--- linux-2.6.31.4/kernel/panic.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/panic.c 2009-10-11 15:29:48.972417406 -0400
+@@ -391,7 +391,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
*/
void __stack_chk_fail(void)
{
@@ -39304,45 +41435,47 @@ diff -urNp linux-2.6.30.8/kernel/panic.c linux-2.6.30.8/kernel/panic.c
__builtin_return_address(0));
}
EXPORT_SYMBOL(__stack_chk_fail);
-diff -urNp linux-2.6.30.8/kernel/params.c linux-2.6.30.8/kernel/params.c
---- linux-2.6.30.8/kernel/params.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/params.c 2009-08-24 21:08:46.316549262 -0400
-@@ -24,9 +24,6 @@
- #include <linux/err.h>
- #include <linux/slab.h>
-
--/* We abuse the high bits of "perm" to record whether we kmalloc'ed. */
--#define KPARAM_KMALLOCED 0x80000000
--
- #if 0
- #define DEBUGP printk
- #else
-@@ -220,13 +217,9 @@ int param_set_charp(const char *val, str
+diff -urNp linux-2.6.31.4/kernel/params.c linux-2.6.31.4/kernel/params.c
+--- linux-2.6.31.4/kernel/params.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/params.c 2009-10-11 15:29:48.972417406 -0400
+@@ -217,13 +217,9 @@ int param_set_charp(const char *val, str
return -ENOSPC;
}
-- if (kp->perm & KPARAM_KMALLOCED)
+- if (kp->flags & KPARAM_KMALLOCED)
- kfree(*(char **)kp->arg);
-
/* This is a hack. We can't need to strdup in early boot, and we
* don't need to; this mangled commandline is preserved. */
if (slab_is_available()) {
-- kp->perm |= KPARAM_KMALLOCED;
+- kp->flags |= KPARAM_KMALLOCED;
*(char **)kp->arg = kstrdup(val, GFP_KERNEL);
if (!kp->arg)
return -ENOMEM;
-@@ -591,7 +584,7 @@ void destroy_params(const struct kernel_
+@@ -607,7 +603,7 @@ void destroy_params(const struct kernel_
unsigned int i;
for (i = 0; i < num; i++)
-- if (params[i].perm & KPARAM_KMALLOCED)
+- if (params[i].flags & KPARAM_KMALLOCED)
+ if (params[i].set == param_set_charp)
kfree(*(char **)params[i].arg);
}
-diff -urNp linux-2.6.30.8/kernel/pid.c linux-2.6.30.8/kernel/pid.c
---- linux-2.6.30.8/kernel/pid.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/pid.c 2009-07-30 11:10:49.635626798 -0400
+diff -urNp linux-2.6.31.4/kernel/perf_counter.c linux-2.6.31.4/kernel/perf_counter.c
+--- linux-2.6.31.4/kernel/perf_counter.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/perf_counter.c 2009-10-11 15:29:48.973405232 -0400
+@@ -2231,7 +2231,7 @@ static void perf_mmap_close(struct vm_ar
+ }
+ }
+
+-static struct vm_operations_struct perf_mmap_vmops = {
++static const struct vm_operations_struct perf_mmap_vmops = {
+ .open = perf_mmap_open,
+ .close = perf_mmap_close,
+ .fault = perf_mmap_fault,
+diff -urNp linux-2.6.31.4/kernel/pid.c linux-2.6.31.4/kernel/pid.c
+--- linux-2.6.31.4/kernel/pid.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/pid.c 2009-10-11 15:29:48.973405232 -0400
@@ -33,6 +33,7 @@
#include <linux/rculist.h>
#include <linux/bootmem.h>
@@ -39360,14 +41493,14 @@ diff -urNp linux-2.6.30.8/kernel/pid.c linux-2.6.30.8/kernel/pid.c
int pid_max_min = RESERVED_PIDS + 1;
int pid_max_max = PID_MAX_LIMIT;
-@@ -381,7 +382,14 @@ EXPORT_SYMBOL(pid_task);
- struct task_struct *find_task_by_pid_type_ns(int type, int nr,
- struct pid_namespace *ns)
+@@ -380,7 +381,14 @@ EXPORT_SYMBOL(pid_task);
+ */
+ struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
{
-- return pid_task(find_pid_ns(nr, ns), type);
+- return pid_task(find_pid_ns(nr, ns), PIDTYPE_PID);
+ struct task_struct *task;
-+
-+ task = pid_task(find_pid_ns(nr, ns), type);
++
++ task = pid_task(find_pid_ns(nr, ns), PIDTYPE_PID);
+
+ if (gr_pid_is_chrooted(task))
+ return NULL;
@@ -39375,10 +41508,10 @@ diff -urNp linux-2.6.30.8/kernel/pid.c linux-2.6.30.8/kernel/pid.c
+ return task;
}
- EXPORT_SYMBOL(find_task_by_pid_type_ns);
-diff -urNp linux-2.6.30.8/kernel/posix-cpu-timers.c linux-2.6.30.8/kernel/posix-cpu-timers.c
---- linux-2.6.30.8/kernel/posix-cpu-timers.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/posix-cpu-timers.c 2009-07-30 11:10:49.652340336 -0400
+ struct task_struct *find_task_by_vpid(pid_t vnr)
+diff -urNp linux-2.6.31.4/kernel/posix-cpu-timers.c linux-2.6.31.4/kernel/posix-cpu-timers.c
+--- linux-2.6.31.4/kernel/posix-cpu-timers.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/posix-cpu-timers.c 2009-10-11 15:29:48.974396171 -0400
@@ -6,6 +6,7 @@
#include <linux/posix-timers.h>
#include <linux/errno.h>
@@ -39387,7 +41520,7 @@ diff -urNp linux-2.6.30.8/kernel/posix-cpu-timers.c linux-2.6.30.8/kernel/posix-
#include <asm/uaccess.h>
#include <linux/kernel_stat.h>
-@@ -1040,6 +1041,7 @@ static void check_thread_timers(struct t
+@@ -1041,6 +1042,7 @@ static void check_thread_timers(struct t
__group_send_sig_info(SIGKILL, SEND_SIG_PRIV, tsk);
return;
}
@@ -39395,7 +41528,7 @@ diff -urNp linux-2.6.30.8/kernel/posix-cpu-timers.c linux-2.6.30.8/kernel/posix-
if (tsk->rt.timeout > DIV_ROUND_UP(*soft, USEC_PER_SEC/HZ)) {
/*
* At the soft limit, send a SIGXCPU every second.
-@@ -1195,6 +1197,7 @@ static void check_process_timers(struct
+@@ -1196,6 +1198,7 @@ static void check_process_timers(struct
__group_send_sig_info(SIGKILL, SEND_SIG_PRIV, tsk);
return;
}
@@ -39403,11 +41536,31 @@ diff -urNp linux-2.6.30.8/kernel/posix-cpu-timers.c linux-2.6.30.8/kernel/posix-
if (psecs >= sig->rlim[RLIMIT_CPU].rlim_cur) {
/*
* At the soft limit, send a SIGXCPU every second.
-diff -urNp linux-2.6.30.8/kernel/power/poweroff.c linux-2.6.30.8/kernel/power/poweroff.c
---- linux-2.6.30.8/kernel/power/poweroff.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/power/poweroff.c 2009-07-30 09:48:10.132674489 -0400
+diff -urNp linux-2.6.31.4/kernel/power/hibernate.c linux-2.6.31.4/kernel/power/hibernate.c
+--- linux-2.6.31.4/kernel/power/hibernate.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/power/hibernate.c 2009-10-11 15:29:56.764361720 -0400
+@@ -48,14 +48,14 @@ enum {
+
+ static int hibernation_mode = HIBERNATION_SHUTDOWN;
+
+-static struct platform_hibernation_ops *hibernation_ops;
++static const struct platform_hibernation_ops *hibernation_ops;
+
+ /**
+ * hibernation_set_ops - set the global hibernate operations
+ * @ops: the hibernation operations to use in subsequent hibernation transitions
+ */
+
+-void hibernation_set_ops(struct platform_hibernation_ops *ops)
++void hibernation_set_ops(const struct platform_hibernation_ops *ops)
+ {
+ if (ops && !(ops->begin && ops->end && ops->pre_snapshot
+ && ops->prepare && ops->finish && ops->enter && ops->pre_restore
+diff -urNp linux-2.6.31.4/kernel/power/poweroff.c linux-2.6.31.4/kernel/power/poweroff.c
+--- linux-2.6.31.4/kernel/power/poweroff.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/power/poweroff.c 2009-10-11 15:29:48.974396171 -0400
@@ -37,7 +37,7 @@ static struct sysrq_key_op sysrq_powerof
- .enable_mask = SYSRQ_ENABLE_BOOT,
+ .enable_mask = SYSRQ_ENABLE_BOOT,
};
-static int pm_sysrq_init(void)
@@ -39415,9 +41568,9 @@ diff -urNp linux-2.6.30.8/kernel/power/poweroff.c linux-2.6.30.8/kernel/power/po
{
register_sysrq_key('o', &sysrq_poweroff_op);
return 0;
-diff -urNp linux-2.6.30.8/kernel/power/process.c linux-2.6.30.8/kernel/power/process.c
---- linux-2.6.30.8/kernel/power/process.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/power/process.c 2009-09-05 22:09:36.402694954 -0400
+diff -urNp linux-2.6.31.4/kernel/power/process.c linux-2.6.31.4/kernel/power/process.c
+--- linux-2.6.31.4/kernel/power/process.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/power/process.c 2009-10-11 15:29:48.974396171 -0400
@@ -36,12 +36,15 @@ static int try_to_freeze_tasks(bool sig_
struct timeval start, end;
u64 elapsed_csecs64;
@@ -39457,9 +41610,28 @@ diff -urNp linux-2.6.30.8/kernel/power/process.c linux-2.6.30.8/kernel/power/pro
do_gettimeofday(&end);
elapsed_csecs64 = timeval_to_ns(&end) - timeval_to_ns(&start);
-diff -urNp linux-2.6.30.8/kernel/printk.c linux-2.6.30.8/kernel/printk.c
---- linux-2.6.30.8/kernel/printk.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/printk.c 2009-07-30 11:10:49.653305213 -0400
+diff -urNp linux-2.6.31.4/kernel/power/suspend.c linux-2.6.31.4/kernel/power/suspend.c
+--- linux-2.6.31.4/kernel/power/suspend.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/power/suspend.c 2009-10-11 15:29:56.765433917 -0400
+@@ -23,13 +23,13 @@ const char *const pm_states[PM_SUSPEND_M
+ [PM_SUSPEND_MEM] = "mem",
+ };
+
+-static struct platform_suspend_ops *suspend_ops;
++static const struct platform_suspend_ops *suspend_ops;
+
+ /**
+ * suspend_set_ops - Set the global suspend method table.
+ * @ops: Pointer to ops structure.
+ */
+-void suspend_set_ops(struct platform_suspend_ops *ops)
++void suspend_set_ops(const struct platform_suspend_ops *ops)
+ {
+ mutex_lock(&pm_mutex);
+ suspend_ops = ops;
+diff -urNp linux-2.6.31.4/kernel/printk.c linux-2.6.31.4/kernel/printk.c
+--- linux-2.6.31.4/kernel/printk.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/printk.c 2009-10-11 15:29:48.974396171 -0400
@@ -272,6 +272,11 @@ int do_syslog(int type, char __user *buf
char c;
int error = 0;
@@ -39472,10 +41644,10 @@ diff -urNp linux-2.6.30.8/kernel/printk.c linux-2.6.30.8/kernel/printk.c
error = security_syslog(type);
if (error)
return error;
-diff -urNp linux-2.6.30.8/kernel/ptrace.c linux-2.6.30.8/kernel/ptrace.c
---- linux-2.6.30.8/kernel/ptrace.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/ptrace.c 2009-07-30 11:10:49.654304318 -0400
-@@ -151,7 +151,7 @@ int __ptrace_may_access(struct task_stru
+diff -urNp linux-2.6.31.4/kernel/ptrace.c linux-2.6.31.4/kernel/ptrace.c
+--- linux-2.6.31.4/kernel/ptrace.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/ptrace.c 2009-10-11 15:29:48.975367037 -0400
+@@ -141,7 +141,7 @@ int __ptrace_may_access(struct task_stru
cred->gid != tcred->egid ||
cred->gid != tcred->sgid ||
cred->gid != tcred->gid) &&
@@ -39484,7 +41656,7 @@ diff -urNp linux-2.6.30.8/kernel/ptrace.c linux-2.6.30.8/kernel/ptrace.c
rcu_read_unlock();
return -EPERM;
}
-@@ -159,7 +159,7 @@ int __ptrace_may_access(struct task_stru
+@@ -149,7 +149,7 @@ int __ptrace_may_access(struct task_stru
smp_rmb();
if (task->mm)
dumpable = get_dumpable(task->mm);
@@ -39493,30 +41665,30 @@ diff -urNp linux-2.6.30.8/kernel/ptrace.c linux-2.6.30.8/kernel/ptrace.c
return -EPERM;
return security_ptrace_may_access(task, mode);
-@@ -223,7 +223,7 @@ repeat:
+@@ -199,7 +199,7 @@ int ptrace_attach(struct task_struct *ta
+ goto unlock_tasklist;
- /* Go */
- task->ptrace |= PT_PTRACED;
+ task->ptrace = PT_PTRACED;
- if (capable(CAP_SYS_PTRACE))
+ if (capable_nolog(CAP_SYS_PTRACE))
task->ptrace |= PT_PTRACE_CAP;
__ptrace_link(task, current);
-@@ -687,6 +687,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l
- if (ret < 0)
- goto out_put_task_struct;
+@@ -618,6 +618,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l
+ goto out;
+ }
+ if (gr_handle_ptrace(child, request)) {
+ ret = -EPERM;
+ goto out_put_task_struct;
+ }
+
- ret = arch_ptrace(child, request, addr, data);
-
- out_put_task_struct:
-diff -urNp linux-2.6.30.8/kernel/rcupreempt_trace.c linux-2.6.30.8/kernel/rcupreempt_trace.c
---- linux-2.6.30.8/kernel/rcupreempt_trace.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/rcupreempt_trace.c 2009-07-30 09:48:10.132674489 -0400
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ /*
+diff -urNp linux-2.6.31.4/kernel/rcupreempt_trace.c linux-2.6.31.4/kernel/rcupreempt_trace.c
+--- linux-2.6.31.4/kernel/rcupreempt_trace.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/rcupreempt_trace.c 2009-10-11 15:29:48.975367037 -0400
@@ -261,17 +261,17 @@ static ssize_t rcuctrs_read(struct file
return bcount;
}
@@ -39538,9 +41710,9 @@ diff -urNp linux-2.6.30.8/kernel/rcupreempt_trace.c linux-2.6.30.8/kernel/rcupre
.owner = THIS_MODULE,
.read = rcuctrs_read,
};
-diff -urNp linux-2.6.30.8/kernel/rcutree_trace.c linux-2.6.30.8/kernel/rcutree_trace.c
---- linux-2.6.30.8/kernel/rcutree_trace.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/rcutree_trace.c 2009-07-30 09:48:10.132674489 -0400
+diff -urNp linux-2.6.31.4/kernel/rcutree_trace.c linux-2.6.31.4/kernel/rcutree_trace.c
+--- linux-2.6.31.4/kernel/rcutree_trace.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/rcutree_trace.c 2009-10-11 15:29:48.975367037 -0400
@@ -88,7 +88,7 @@ static int rcudata_open(struct inode *in
return single_open(file, show_rcudata, NULL);
}
@@ -39577,9 +41749,18 @@ diff -urNp linux-2.6.30.8/kernel/rcutree_trace.c linux-2.6.30.8/kernel/rcutree_t
.owner = THIS_MODULE,
.open = rcugp_open,
.read = seq_read,
-diff -urNp linux-2.6.30.8/kernel/relay.c linux-2.6.30.8/kernel/relay.c
---- linux-2.6.30.8/kernel/relay.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/relay.c 2009-07-30 09:48:10.133766067 -0400
+@@ -255,7 +255,7 @@ static int rcu_pending_open(struct inode
+ return single_open(file, show_rcu_pending, NULL);
+ }
+
+-static struct file_operations rcu_pending_fops = {
++static const struct file_operations rcu_pending_fops = {
+ .owner = THIS_MODULE,
+ .open = rcu_pending_open,
+ .read = seq_read,
+diff -urNp linux-2.6.31.4/kernel/relay.c linux-2.6.31.4/kernel/relay.c
+--- linux-2.6.31.4/kernel/relay.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/relay.c 2009-10-11 15:29:48.975367037 -0400
@@ -60,7 +60,7 @@ static int relay_buf_fault(struct vm_are
/*
* vm_ops for relay file mappings.
@@ -39598,9 +41779,9 @@ diff -urNp linux-2.6.30.8/kernel/relay.c linux-2.6.30.8/kernel/relay.c
return ret;
if (read_start + ret == nonpad_end)
-diff -urNp linux-2.6.30.8/kernel/resource.c linux-2.6.30.8/kernel/resource.c
---- linux-2.6.30.8/kernel/resource.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/resource.c 2009-07-30 11:10:49.657454572 -0400
+diff -urNp linux-2.6.31.4/kernel/resource.c linux-2.6.31.4/kernel/resource.c
+--- linux-2.6.31.4/kernel/resource.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/resource.c 2009-10-11 15:29:48.976638585 -0400
@@ -132,8 +132,18 @@ static const struct file_operations proc
static int __init ioresources_init(void)
@@ -39620,10 +41801,10 @@ diff -urNp linux-2.6.30.8/kernel/resource.c linux-2.6.30.8/kernel/resource.c
return 0;
}
__initcall(ioresources_init);
-diff -urNp linux-2.6.30.8/kernel/sched.c linux-2.6.30.8/kernel/sched.c
---- linux-2.6.30.8/kernel/sched.c 2009-07-30 20:32:40.551917543 -0400
-+++ linux-2.6.30.8/kernel/sched.c 2009-07-30 20:32:48.093586870 -0400
-@@ -819,7 +819,7 @@ static int sched_feat_open(struct inode
+diff -urNp linux-2.6.31.4/kernel/sched.c linux-2.6.31.4/kernel/sched.c
+--- linux-2.6.31.4/kernel/sched.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/sched.c 2009-10-11 15:29:48.977812736 -0400
+@@ -820,7 +820,7 @@ static int sched_feat_open(struct inode
return single_open(filp, sched_feat_show, NULL);
}
@@ -39632,7 +41813,7 @@ diff -urNp linux-2.6.30.8/kernel/sched.c linux-2.6.30.8/kernel/sched.c
.open = sched_feat_open,
.write = sched_feat_write,
.read = seq_read,
-@@ -5663,6 +5663,8 @@ int can_nice(const struct task_struct *p
+@@ -5978,6 +5978,8 @@ int can_nice(const struct task_struct *p
/* convert nice value [19,-20] to rlimit style value [1,40] */
int nice_rlim = 20 - nice;
@@ -39641,7 +41822,7 @@ diff -urNp linux-2.6.30.8/kernel/sched.c linux-2.6.30.8/kernel/sched.c
return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur ||
capable(CAP_SYS_NICE));
}
-@@ -5696,7 +5698,8 @@ SYSCALL_DEFINE1(nice, int, increment)
+@@ -6011,7 +6013,8 @@ SYSCALL_DEFINE1(nice, int, increment)
if (nice > 19)
nice = 19;
@@ -39651,7 +41832,7 @@ diff -urNp linux-2.6.30.8/kernel/sched.c linux-2.6.30.8/kernel/sched.c
return -EPERM;
retval = security_task_setnice(current, nice);
-@@ -5838,6 +5841,8 @@ recheck:
+@@ -6153,6 +6156,8 @@ recheck:
if (rt_policy(policy)) {
unsigned long rlim_rtprio;
@@ -39660,7 +41841,7 @@ diff -urNp linux-2.6.30.8/kernel/sched.c linux-2.6.30.8/kernel/sched.c
if (!lock_task_sighand(p, &flags))
return -ESRCH;
rlim_rtprio = p->signal->rlim[RLIMIT_RTPRIO].rlim_cur;
-@@ -6980,7 +6985,7 @@ static struct ctl_table sd_ctl_dir[] = {
+@@ -7300,7 +7305,7 @@ static struct ctl_table sd_ctl_dir[] = {
.procname = "sched_domain",
.mode = 0555,
},
@@ -39669,7 +41850,7 @@ diff -urNp linux-2.6.30.8/kernel/sched.c linux-2.6.30.8/kernel/sched.c
};
static struct ctl_table sd_ctl_root[] = {
-@@ -6990,7 +6995,7 @@ static struct ctl_table sd_ctl_root[] =
+@@ -7310,7 +7315,7 @@ static struct ctl_table sd_ctl_root[] =
.mode = 0555,
.child = sd_ctl_dir,
},
@@ -39678,10 +41859,10 @@ diff -urNp linux-2.6.30.8/kernel/sched.c linux-2.6.30.8/kernel/sched.c
};
static struct ctl_table *sd_alloc_ctl_entry(int n)
-diff -urNp linux-2.6.30.8/kernel/signal.c linux-2.6.30.8/kernel/signal.c
---- linux-2.6.30.8/kernel/signal.c 2009-09-09 17:37:33.984181501 -0400
-+++ linux-2.6.30.8/kernel/signal.c 2009-09-09 17:37:58.255128998 -0400
-@@ -209,6 +209,9 @@ static struct sigqueue *__sigqueue_alloc
+diff -urNp linux-2.6.31.4/kernel/signal.c linux-2.6.31.4/kernel/signal.c
+--- linux-2.6.31.4/kernel/signal.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/signal.c 2009-10-11 15:29:48.979375591 -0400
+@@ -207,6 +207,9 @@ static struct sigqueue *__sigqueue_alloc
*/
user = get_uid(__task_cred(t)->user);
atomic_inc(&user->sigpending);
@@ -39691,7 +41872,7 @@ diff -urNp linux-2.6.30.8/kernel/signal.c linux-2.6.30.8/kernel/signal.c
if (override_rlimit ||
atomic_read(&user->sigpending) <=
t->signal->rlim[RLIMIT_SIGPENDING].rlim_cur)
-@@ -622,6 +625,9 @@ static int check_kill_permission(int sig
+@@ -625,6 +628,9 @@ static int check_kill_permission(int sig
}
}
@@ -39701,7 +41882,7 @@ diff -urNp linux-2.6.30.8/kernel/signal.c linux-2.6.30.8/kernel/signal.c
return security_task_kill(t, info, sig, 0);
}
-@@ -931,8 +937,8 @@ static void print_fatal_signal(struct pt
+@@ -939,8 +945,8 @@ static void print_fatal_signal(struct pt
for (i = 0; i < 16; i++) {
unsigned char insn;
@@ -39712,7 +41893,7 @@ diff -urNp linux-2.6.30.8/kernel/signal.c linux-2.6.30.8/kernel/signal.c
}
}
#endif
-@@ -957,7 +963,7 @@ __group_send_sig_info(int sig, struct si
+@@ -965,7 +971,7 @@ __group_send_sig_info(int sig, struct si
return send_signal(sig, info, p, 1);
}
@@ -39721,29 +41902,29 @@ diff -urNp linux-2.6.30.8/kernel/signal.c linux-2.6.30.8/kernel/signal.c
specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
{
return send_signal(sig, info, t, 0);
-@@ -997,6 +1003,9 @@ force_sig_info(int sig, struct siginfo *
+@@ -1005,6 +1011,9 @@ force_sig_info(int sig, struct siginfo *
ret = specific_send_sig_info(sig, info, t);
spin_unlock_irqrestore(&t->sighand->siglock, flags);
-+ gr_log_signal(sig, t);
++ gr_log_signal(sig, !is_si_special(info) ? info->si_addr : NULL, t);
+ gr_handle_crash(t, sig);
+
return ret;
}
-@@ -1071,6 +1080,8 @@ int group_send_sig_info(int sig, struct
+@@ -1079,6 +1088,8 @@ int group_send_sig_info(int sig, struct
ret = __group_send_sig_info(sig, info, p);
unlock_task_sighand(p, &flags);
}
+ if (!ret)
-+ gr_log_signal(sig, p);
++ gr_log_signal(sig, !is_si_special(info) ? info->si_addr : NULL, p);
}
return ret;
-diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
---- linux-2.6.30.8/kernel/sys.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/sys.c 2009-07-30 11:10:49.695716903 -0400
-@@ -132,6 +132,12 @@ static int set_one_prio(struct task_stru
+diff -urNp linux-2.6.31.4/kernel/sys.c linux-2.6.31.4/kernel/sys.c
+--- linux-2.6.31.4/kernel/sys.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/sys.c 2009-10-11 15:29:48.979375591 -0400
+@@ -133,6 +133,12 @@ static int set_one_prio(struct task_stru
error = -EACCES;
goto out;
}
@@ -39756,7 +41937,7 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
no_nice = security_task_setnice(p, niceval);
if (no_nice) {
error = no_nice;
-@@ -508,6 +514,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, g
+@@ -509,6 +515,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, g
goto error;
}
@@ -39766,7 +41947,7 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
if (rgid != (gid_t) -1 ||
(egid != (gid_t) -1 && egid != old->gid))
new->sgid = new->egid;
-@@ -541,6 +550,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid)
+@@ -542,6 +551,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid)
goto error;
retval = -EPERM;
@@ -39777,7 +41958,7 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
if (capable(CAP_SETGID))
new->gid = new->egid = new->sgid = new->fsgid = gid;
else if (gid == old->gid || gid == old->sgid)
-@@ -631,6 +644,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, u
+@@ -632,6 +645,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, u
goto error;
}
@@ -39787,7 +41968,7 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
if (new->uid != old->uid) {
retval = set_user(new);
if (retval < 0)
-@@ -679,6 +695,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid)
+@@ -680,6 +696,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid)
goto error;
retval = -EPERM;
@@ -39800,7 +41981,7 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
if (capable(CAP_SETUID)) {
new->suid = new->uid = uid;
if (uid != old->uid) {
-@@ -736,6 +758,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid,
+@@ -737,6 +759,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid,
goto error;
}
@@ -39810,7 +41991,7 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
if (ruid != (uid_t) -1) {
new->uid = ruid;
if (ruid != old->uid) {
-@@ -804,6 +829,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid,
+@@ -805,6 +830,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid,
goto error;
}
@@ -39820,7 +42001,7 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
if (rgid != (gid_t) -1)
new->gid = rgid;
if (egid != (gid_t) -1)
-@@ -853,6 +881,9 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
+@@ -854,6 +882,9 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
if (security_task_setuid(uid, (uid_t)-1, (uid_t)-1, LSM_SETID_FS) < 0)
goto error;
@@ -39830,7 +42011,7 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
if (uid == old->uid || uid == old->euid ||
uid == old->suid || uid == old->fsuid ||
capable(CAP_SETUID)) {
-@@ -893,6 +924,9 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid)
+@@ -894,6 +925,9 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid)
if (gid == old->gid || gid == old->egid ||
gid == old->sgid || gid == old->fsgid ||
capable(CAP_SETGID)) {
@@ -39840,7 +42021,7 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
if (gid != old_fsgid) {
new->fsgid = gid;
goto change_okay;
-@@ -1725,7 +1759,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
+@@ -1443,7 +1477,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
error = get_dumpable(me->mm);
break;
case PR_SET_DUMPABLE:
@@ -39849,10 +42030,10 @@ diff -urNp linux-2.6.30.8/kernel/sys.c linux-2.6.30.8/kernel/sys.c
error = -EINVAL;
break;
}
-diff -urNp linux-2.6.30.8/kernel/sysctl.c linux-2.6.30.8/kernel/sysctl.c
---- linux-2.6.30.8/kernel/sysctl.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/sysctl.c 2009-08-04 17:52:34.402065998 -0400
-@@ -62,6 +62,13 @@
+diff -urNp linux-2.6.31.4/kernel/sysctl.c linux-2.6.31.4/kernel/sysctl.c
+--- linux-2.6.31.4/kernel/sysctl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/sysctl.c 2009-10-11 15:29:48.980397226 -0400
+@@ -65,6 +65,13 @@
static int deprecated_sysctl_warning(struct __sysctl_args *args);
#if defined(CONFIG_SYSCTL)
@@ -39866,7 +42047,7 @@ diff -urNp linux-2.6.30.8/kernel/sysctl.c linux-2.6.30.8/kernel/sysctl.c
/* External variables not in a header file. */
extern int C_A_D;
-@@ -159,6 +166,7 @@ static int proc_do_cad_pid(struct ctl_ta
+@@ -163,6 +170,7 @@ static int proc_do_cad_pid(struct ctl_ta
static int proc_taint(struct ctl_table *table, int write, struct file *filp,
void __user *buffer, size_t *lenp, loff_t *ppos);
#endif
@@ -39874,7 +42055,7 @@ diff -urNp linux-2.6.30.8/kernel/sysctl.c linux-2.6.30.8/kernel/sysctl.c
static struct ctl_table root_table[];
static struct ctl_table_root sysctl_table_root;
-@@ -191,6 +199,21 @@ extern struct ctl_table epoll_table[];
+@@ -195,6 +203,21 @@ extern struct ctl_table epoll_table[];
int sysctl_legacy_va_layout;
#endif
@@ -39896,7 +42077,7 @@ diff -urNp linux-2.6.30.8/kernel/sysctl.c linux-2.6.30.8/kernel/sysctl.c
extern int prove_locking;
extern int lock_stat;
-@@ -242,6 +265,24 @@ static int max_wakeup_granularity_ns = N
+@@ -246,6 +269,24 @@ static int max_wakeup_granularity_ns = N
#endif
static struct ctl_table kern_table[] = {
@@ -39921,7 +42102,7 @@ diff -urNp linux-2.6.30.8/kernel/sysctl.c linux-2.6.30.8/kernel/sysctl.c
#ifdef CONFIG_SCHED_DEBUG
{
.ctl_name = CTL_UNNUMBERED,
-@@ -1657,6 +1698,8 @@ static int do_sysctl_strategy(struct ctl
+@@ -1734,6 +1775,8 @@ static int do_sysctl_strategy(struct ctl
return 0;
}
@@ -39930,7 +42111,7 @@ diff -urNp linux-2.6.30.8/kernel/sysctl.c linux-2.6.30.8/kernel/sysctl.c
static int parse_table(int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen,
-@@ -1675,7 +1718,7 @@ repeat:
+@@ -1752,7 +1795,7 @@ repeat:
if (n == table->ctl_name) {
int error;
if (table->child) {
@@ -39939,7 +42120,7 @@ diff -urNp linux-2.6.30.8/kernel/sysctl.c linux-2.6.30.8/kernel/sysctl.c
return -EPERM;
name++;
nlen--;
-@@ -1760,6 +1803,33 @@ int sysctl_perm(struct ctl_table_root *r
+@@ -1837,6 +1880,33 @@ int sysctl_perm(struct ctl_table_root *r
int error;
int mode;
@@ -39973,9 +42154,9 @@ diff -urNp linux-2.6.30.8/kernel/sysctl.c linux-2.6.30.8/kernel/sysctl.c
error = security_sysctl(table, op & (MAY_READ | MAY_WRITE | MAY_EXEC));
if (error)
return error;
-diff -urNp linux-2.6.30.8/kernel/taskstats.c linux-2.6.30.8/kernel/taskstats.c
---- linux-2.6.30.8/kernel/taskstats.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/taskstats.c 2009-07-30 11:10:49.711410081 -0400
+diff -urNp linux-2.6.31.4/kernel/taskstats.c linux-2.6.31.4/kernel/taskstats.c
+--- linux-2.6.31.4/kernel/taskstats.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/taskstats.c 2009-10-11 15:29:48.980397226 -0400
@@ -26,9 +26,12 @@
#include <linux/cgroup.h>
#include <linux/fs.h>
@@ -39999,9 +42180,9 @@ diff -urNp linux-2.6.30.8/kernel/taskstats.c linux-2.6.30.8/kernel/taskstats.c
if (!alloc_cpumask_var(&mask, GFP_KERNEL))
return -ENOMEM;
-diff -urNp linux-2.6.30.8/kernel/time/tick-broadcast.c linux-2.6.30.8/kernel/time/tick-broadcast.c
---- linux-2.6.30.8/kernel/time/tick-broadcast.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/time/tick-broadcast.c 2009-07-30 09:48:10.137714626 -0400
+diff -urNp linux-2.6.31.4/kernel/time/tick-broadcast.c linux-2.6.31.4/kernel/time/tick-broadcast.c
+--- linux-2.6.31.4/kernel/time/tick-broadcast.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/time/tick-broadcast.c 2009-10-11 15:29:48.981572864 -0400
@@ -116,7 +116,7 @@ int tick_device_uses_broadcast(struct cl
* then clear the broadcast bit.
*/
@@ -40011,9 +42192,9 @@ diff -urNp linux-2.6.30.8/kernel/time/tick-broadcast.c linux-2.6.30.8/kernel/tim
cpumask_clear_cpu(cpu, tick_get_broadcast_mask());
tick_broadcast_clear_oneshot(cpu);
-diff -urNp linux-2.6.30.8/kernel/time/timer_list.c linux-2.6.30.8/kernel/time/timer_list.c
---- linux-2.6.30.8/kernel/time/timer_list.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/time/timer_list.c 2009-07-30 09:48:10.137714626 -0400
+diff -urNp linux-2.6.31.4/kernel/time/timer_list.c linux-2.6.31.4/kernel/time/timer_list.c
+--- linux-2.6.31.4/kernel/time/timer_list.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/time/timer_list.c 2009-10-11 15:29:48.981572864 -0400
@@ -275,7 +275,7 @@ static int timer_list_open(struct inode
return single_open(filp, timer_list_show, NULL);
}
@@ -40023,9 +42204,9 @@ diff -urNp linux-2.6.30.8/kernel/time/timer_list.c linux-2.6.30.8/kernel/time/ti
.open = timer_list_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.30.8/kernel/time/timer_stats.c linux-2.6.30.8/kernel/time/timer_stats.c
---- linux-2.6.30.8/kernel/time/timer_stats.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/time/timer_stats.c 2009-07-30 09:48:10.138707979 -0400
+diff -urNp linux-2.6.31.4/kernel/time/timer_stats.c linux-2.6.31.4/kernel/time/timer_stats.c
+--- linux-2.6.31.4/kernel/time/timer_stats.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/time/timer_stats.c 2009-10-11 15:29:48.981572864 -0400
@@ -395,7 +395,7 @@ static int tstats_open(struct inode *ino
return single_open(filp, tstats_show, NULL);
}
@@ -40035,9 +42216,9 @@ diff -urNp linux-2.6.30.8/kernel/time/timer_stats.c linux-2.6.30.8/kernel/time/t
.open = tstats_open,
.read = seq_read,
.write = tstats_write,
-diff -urNp linux-2.6.30.8/kernel/time.c linux-2.6.30.8/kernel/time.c
---- linux-2.6.30.8/kernel/time.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/time.c 2009-07-30 11:10:49.712371224 -0400
+diff -urNp linux-2.6.31.4/kernel/time.c linux-2.6.31.4/kernel/time.c
+--- linux-2.6.31.4/kernel/time.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/time.c 2009-10-11 15:29:48.982400503 -0400
@@ -94,6 +94,9 @@ SYSCALL_DEFINE1(stime, time_t __user *,
return err;
@@ -40075,10 +42256,10 @@ diff -urNp linux-2.6.30.8/kernel/time.c linux-2.6.30.8/kernel/time.c
{
#if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
return (USEC_PER_SEC / HZ) * j;
-diff -urNp linux-2.6.30.8/kernel/trace/ftrace.c linux-2.6.30.8/kernel/trace/ftrace.c
---- linux-2.6.30.8/kernel/trace/ftrace.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/trace/ftrace.c 2009-07-30 09:48:10.139681175 -0400
-@@ -1001,7 +1001,7 @@ static int t_show(struct seq_file *m, vo
+diff -urNp linux-2.6.31.4/kernel/trace/ftrace.c linux-2.6.31.4/kernel/trace/ftrace.c
+--- linux-2.6.31.4/kernel/trace/ftrace.c 2009-10-12 23:26:18.155165783 -0400
++++ linux-2.6.31.4/kernel/trace/ftrace.c 2009-10-12 23:26:38.979417555 -0400
+@@ -1562,7 +1562,7 @@ static int t_show(struct seq_file *m, vo
return 0;
}
@@ -40087,7 +42268,7 @@ diff -urNp linux-2.6.30.8/kernel/trace/ftrace.c linux-2.6.30.8/kernel/trace/ftra
.start = t_start,
.next = t_next,
.stop = t_stop,
-@@ -1956,7 +1956,7 @@ static int g_show(struct seq_file *m, vo
+@@ -2560,7 +2560,7 @@ static int g_show(struct seq_file *m, vo
return 0;
}
@@ -40096,18 +42277,18 @@ diff -urNp linux-2.6.30.8/kernel/trace/ftrace.c linux-2.6.30.8/kernel/trace/ftra
.start = g_start,
.next = g_next,
.stop = g_stop,
-diff -urNp linux-2.6.30.8/kernel/trace/Kconfig linux-2.6.30.8/kernel/trace/Kconfig
---- linux-2.6.30.8/kernel/trace/Kconfig 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/trace/Kconfig 2009-07-30 11:13:44.980492661 -0400
-@@ -78,6 +78,7 @@ menu "Tracers"
+diff -urNp linux-2.6.31.4/kernel/trace/Kconfig linux-2.6.31.4/kernel/trace/Kconfig
+--- linux-2.6.31.4/kernel/trace/Kconfig 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/trace/Kconfig 2009-10-11 15:29:48.983493274 -0400
+@@ -111,6 +111,7 @@ if FTRACE
config FUNCTION_TRACER
bool "Kernel Function Tracer"
depends on HAVE_FUNCTION_TRACER
+ depends on !PAX_KERNEXEC
select FRAME_POINTER
select KALLSYMS
- select TRACING
-@@ -271,6 +272,7 @@ config POWER_TRACER
+ select GENERIC_TRACER
+@@ -326,6 +327,7 @@ config POWER_TRACER
config STACK_TRACER
bool "Trace max stack"
depends on HAVE_FUNCTION_TRACER
@@ -40115,10 +42296,10 @@ diff -urNp linux-2.6.30.8/kernel/trace/Kconfig linux-2.6.30.8/kernel/trace/Kconf
select FUNCTION_TRACER
select STACKTRACE
select KALLSYMS
-diff -urNp linux-2.6.30.8/kernel/trace/trace.c linux-2.6.30.8/kernel/trace/trace.c
---- linux-2.6.30.8/kernel/trace/trace.c 2009-08-24 20:46:57.210733757 -0400
-+++ linux-2.6.30.8/kernel/trace/trace.c 2009-08-24 20:48:46.015681488 -0400
-@@ -1836,7 +1836,7 @@ static int s_show(struct seq_file *m, vo
+diff -urNp linux-2.6.31.4/kernel/trace/trace.c linux-2.6.31.4/kernel/trace/trace.c
+--- linux-2.6.31.4/kernel/trace/trace.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/trace/trace.c 2009-10-11 15:29:48.983493274 -0400
+@@ -1885,7 +1885,7 @@ static int s_show(struct seq_file *m, vo
return 0;
}
@@ -40127,7 +42308,7 @@ diff -urNp linux-2.6.30.8/kernel/trace/trace.c linux-2.6.30.8/kernel/trace/trace
.start = s_start,
.next = s_next,
.stop = s_stop,
-@@ -2050,7 +2050,7 @@ static int t_show(struct seq_file *m, vo
+@@ -2097,7 +2097,7 @@ static int t_show(struct seq_file *m, vo
return 0;
}
@@ -40136,10 +42317,10 @@ diff -urNp linux-2.6.30.8/kernel/trace/trace.c linux-2.6.30.8/kernel/trace/trace
.start = t_start,
.next = t_next,
.stop = t_stop,
-diff -urNp linux-2.6.30.8/kernel/trace/trace_output.c linux-2.6.30.8/kernel/trace/trace_output.c
---- linux-2.6.30.8/kernel/trace/trace_output.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/trace/trace_output.c 2009-07-30 09:48:10.140750846 -0400
-@@ -188,7 +188,7 @@ int trace_seq_path(struct trace_seq *s,
+diff -urNp linux-2.6.31.4/kernel/trace/trace_output.c linux-2.6.31.4/kernel/trace/trace_output.c
+--- linux-2.6.31.4/kernel/trace/trace_output.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/trace/trace_output.c 2009-10-11 15:29:48.984551170 -0400
+@@ -234,7 +234,7 @@ int trace_seq_path(struct trace_seq *s,
return 0;
p = d_path(path, s->buffer + s->len, PAGE_SIZE - s->len);
if (!IS_ERR(p)) {
@@ -40148,9 +42329,9 @@ diff -urNp linux-2.6.30.8/kernel/trace/trace_output.c linux-2.6.30.8/kernel/trac
if (p) {
s->len = p - s->buffer;
return 1;
-diff -urNp linux-2.6.30.8/kernel/utsname_sysctl.c linux-2.6.30.8/kernel/utsname_sysctl.c
---- linux-2.6.30.8/kernel/utsname_sysctl.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/kernel/utsname_sysctl.c 2009-07-30 09:48:10.140750846 -0400
+diff -urNp linux-2.6.31.4/kernel/utsname_sysctl.c linux-2.6.31.4/kernel/utsname_sysctl.c
+--- linux-2.6.31.4/kernel/utsname_sysctl.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/kernel/utsname_sysctl.c 2009-10-11 15:29:48.984551170 -0400
@@ -123,7 +123,7 @@ static struct ctl_table uts_kern_table[]
.proc_handler = proc_do_uts_string,
.strategy = sysctl_uts_string,
@@ -40169,9 +42350,9 @@ diff -urNp linux-2.6.30.8/kernel/utsname_sysctl.c linux-2.6.30.8/kernel/utsname_
};
static int __init utsname_sysctl_init(void)
-diff -urNp linux-2.6.30.8/lib/inflate.c linux-2.6.30.8/lib/inflate.c
---- linux-2.6.30.8/lib/inflate.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/lib/inflate.c 2009-08-24 21:08:46.316549262 -0400
+diff -urNp linux-2.6.31.4/lib/inflate.c linux-2.6.31.4/lib/inflate.c
+--- linux-2.6.31.4/lib/inflate.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/lib/inflate.c 2009-10-11 15:29:48.985524572 -0400
@@ -266,7 +266,7 @@ static void free(void *where)
malloc_ptr = free_mem_ptr;
}
@@ -40181,10 +42362,10 @@ diff -urNp linux-2.6.30.8/lib/inflate.c linux-2.6.30.8/lib/inflate.c
#define free(a) kfree(a)
#endif
-diff -urNp linux-2.6.30.8/lib/Kconfig.debug linux-2.6.30.8/lib/Kconfig.debug
---- linux-2.6.30.8/lib/Kconfig.debug 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/lib/Kconfig.debug 2009-07-30 11:10:49.747708160 -0400
-@@ -821,7 +821,7 @@ config LATENCYTOP
+diff -urNp linux-2.6.31.4/lib/Kconfig.debug linux-2.6.31.4/lib/Kconfig.debug
+--- linux-2.6.31.4/lib/Kconfig.debug 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/lib/Kconfig.debug 2009-10-11 15:29:48.985524572 -0400
+@@ -866,7 +866,7 @@ config LATENCYTOP
select STACKTRACE
select SCHEDSTATS
select SCHED_DEBUG
@@ -40193,9 +42374,9 @@ diff -urNp linux-2.6.30.8/lib/Kconfig.debug linux-2.6.30.8/lib/Kconfig.debug
help
Enable this option if you want to use the LatencyTOP tool
to find out which userspace is blocking on what kernel operations.
-diff -urNp linux-2.6.30.8/lib/parser.c linux-2.6.30.8/lib/parser.c
---- linux-2.6.30.8/lib/parser.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/lib/parser.c 2009-07-30 09:48:10.140750846 -0400
+diff -urNp linux-2.6.31.4/lib/parser.c linux-2.6.31.4/lib/parser.c
+--- linux-2.6.31.4/lib/parser.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/lib/parser.c 2009-10-11 15:29:48.985524572 -0400
@@ -126,7 +126,7 @@ static int match_number(substring_t *s,
char *buf;
int ret;
@@ -40205,9 +42386,9 @@ diff -urNp linux-2.6.30.8/lib/parser.c linux-2.6.30.8/lib/parser.c
if (!buf)
return -ENOMEM;
memcpy(buf, s->from, s->to - s->from);
-diff -urNp linux-2.6.30.8/lib/radix-tree.c linux-2.6.30.8/lib/radix-tree.c
---- linux-2.6.30.8/lib/radix-tree.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/lib/radix-tree.c 2009-07-30 09:48:10.140750846 -0400
+diff -urNp linux-2.6.31.4/lib/radix-tree.c linux-2.6.31.4/lib/radix-tree.c
+--- linux-2.6.31.4/lib/radix-tree.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/lib/radix-tree.c 2009-10-11 15:29:48.986515047 -0400
@@ -81,7 +81,7 @@ struct radix_tree_preload {
int nr;
struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH];
@@ -40217,9 +42398,9 @@ diff -urNp linux-2.6.30.8/lib/radix-tree.c linux-2.6.30.8/lib/radix-tree.c
static inline gfp_t root_gfp_mask(struct radix_tree_root *root)
{
-diff -urNp linux-2.6.30.8/lib/random32.c linux-2.6.30.8/lib/random32.c
---- linux-2.6.30.8/lib/random32.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/lib/random32.c 2009-07-30 09:48:10.141806319 -0400
+diff -urNp linux-2.6.31.4/lib/random32.c linux-2.6.31.4/lib/random32.c
+--- linux-2.6.31.4/lib/random32.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/lib/random32.c 2009-10-11 15:29:48.986515047 -0400
@@ -61,7 +61,7 @@ static u32 __random32(struct rnd_state *
*/
static inline u32 __seed(u32 x, u32 m)
@@ -40229,15 +42410,15 @@ diff -urNp linux-2.6.30.8/lib/random32.c linux-2.6.30.8/lib/random32.c
}
/**
-diff -urNp linux-2.6.30.8/localversion-grsec linux-2.6.30.8/localversion-grsec
---- linux-2.6.30.8/localversion-grsec 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.30.8/localversion-grsec 2009-07-30 11:10:49.747708160 -0400
+diff -urNp linux-2.6.31.4/localversion-grsec linux-2.6.31.4/localversion-grsec
+--- linux-2.6.31.4/localversion-grsec 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.31.4/localversion-grsec 2009-10-11 15:29:48.986515047 -0400
@@ -0,0 +1 @@
+-grsec
-diff -urNp linux-2.6.30.8/Makefile linux-2.6.30.8/Makefile
---- linux-2.6.30.8/Makefile 2009-09-26 23:07:15.059955867 -0400
-+++ linux-2.6.30.8/Makefile 2009-09-26 23:07:26.145373216 -0400
-@@ -231,8 +231,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
+diff -urNp linux-2.6.31.4/Makefile linux-2.6.31.4/Makefile
+--- linux-2.6.31.4/Makefile 2009-10-12 23:26:17.420700952 -0400
++++ linux-2.6.31.4/Makefile 2009-10-12 23:26:25.101420025 -0400
+@@ -221,8 +221,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
HOSTCC = gcc
HOSTCXX = g++
@@ -40248,7 +42429,7 @@ diff -urNp linux-2.6.30.8/Makefile linux-2.6.30.8/Makefile
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
-@@ -647,7 +647,7 @@ export mod_strip_cmd
+@@ -639,7 +639,7 @@ export mod_strip_cmd
ifeq ($(KBUILD_EXTMOD),)
@@ -40257,10 +42438,10 @@ diff -urNp linux-2.6.30.8/Makefile linux-2.6.30.8/Makefile
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-diff -urNp linux-2.6.30.8/mm/filemap.c linux-2.6.30.8/mm/filemap.c
---- linux-2.6.30.8/mm/filemap.c 2009-07-30 20:32:40.553577478 -0400
-+++ linux-2.6.30.8/mm/filemap.c 2009-07-30 20:32:48.096612667 -0400
-@@ -1625,7 +1625,7 @@ page_not_uptodate:
+diff -urNp linux-2.6.31.4/mm/filemap.c linux-2.6.31.4/mm/filemap.c
+--- linux-2.6.31.4/mm/filemap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/filemap.c 2009-10-11 15:29:49.446423019 -0400
+@@ -1648,7 +1648,7 @@ page_not_uptodate:
}
EXPORT_SYMBOL(filemap_fault);
@@ -40269,7 +42450,7 @@ diff -urNp linux-2.6.30.8/mm/filemap.c linux-2.6.30.8/mm/filemap.c
.fault = filemap_fault,
};
-@@ -1636,7 +1636,7 @@ int generic_file_mmap(struct file * file
+@@ -1659,7 +1659,7 @@ int generic_file_mmap(struct file * file
struct address_space *mapping = file->f_mapping;
if (!mapping->a_ops->readpage)
@@ -40278,7 +42459,7 @@ diff -urNp linux-2.6.30.8/mm/filemap.c linux-2.6.30.8/mm/filemap.c
file_accessed(file);
vma->vm_ops = &generic_file_vm_ops;
vma->vm_flags |= VM_CAN_NONLINEAR;
-@@ -1996,6 +1996,7 @@ inline int generic_write_checks(struct f
+@@ -2019,6 +2019,7 @@ inline int generic_write_checks(struct f
*pos = i_size_read(inode);
if (limit != RLIM_INFINITY) {
@@ -40286,9 +42467,9 @@ diff -urNp linux-2.6.30.8/mm/filemap.c linux-2.6.30.8/mm/filemap.c
if (*pos >= limit) {
send_sig(SIGXFSZ, current, 0);
return -EFBIG;
-diff -urNp linux-2.6.30.8/mm/filemap_xip.c linux-2.6.30.8/mm/filemap_xip.c
---- linux-2.6.30.8/mm/filemap_xip.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/filemap_xip.c 2009-07-30 09:48:10.142775471 -0400
+diff -urNp linux-2.6.31.4/mm/filemap_xip.c linux-2.6.31.4/mm/filemap_xip.c
+--- linux-2.6.31.4/mm/filemap_xip.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/filemap_xip.c 2009-10-11 15:29:49.459837195 -0400
@@ -296,7 +296,7 @@ out:
}
}
@@ -40298,9 +42479,9 @@ diff -urNp linux-2.6.30.8/mm/filemap_xip.c linux-2.6.30.8/mm/filemap_xip.c
.fault = xip_file_fault,
};
-diff -urNp linux-2.6.30.8/mm/fremap.c linux-2.6.30.8/mm/fremap.c
---- linux-2.6.30.8/mm/fremap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/fremap.c 2009-07-30 09:48:10.142775471 -0400
+diff -urNp linux-2.6.31.4/mm/fremap.c linux-2.6.31.4/mm/fremap.c
+--- linux-2.6.31.4/mm/fremap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/fremap.c 2009-10-11 15:29:49.468438199 -0400
@@ -153,6 +153,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsign
retry:
vma = find_vma(mm, start);
@@ -40313,67 +42494,38 @@ diff -urNp linux-2.6.30.8/mm/fremap.c linux-2.6.30.8/mm/fremap.c
/*
* Make sure the vma is shared, that it supports prefaulting,
* and that the remapped range is valid and fully within
-diff -urNp linux-2.6.30.8/mm/highmem.c linux-2.6.30.8/mm/highmem.c
---- linux-2.6.30.8/mm/highmem.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/highmem.c 2009-08-02 11:24:41.617453261 -0400
-@@ -95,6 +95,9 @@ static void flush_all_zero_pkmaps(void)
-
- for (i = 0; i < LAST_PKMAP; i++) {
- struct page *page;
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-
- /*
- * zero means we don't have anything to do,
-@@ -117,9 +120,18 @@ static void flush_all_zero_pkmaps(void)
+diff -urNp linux-2.6.31.4/mm/highmem.c linux-2.6.31.4/mm/highmem.c
+--- linux-2.6.31.4/mm/highmem.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/highmem.c 2009-10-12 23:18:44.754293330 -0400
+@@ -116,9 +116,10 @@ static void flush_all_zero_pkmaps(void)
* So no dangers, even with speculative execution.
*/
page = pte_page(pkmap_page_table[i]);
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
pte_clear(&init_mm, (unsigned long)page_address(page),
&pkmap_page_table[i]);
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
+-
++ pax_close_kernel();
set_page_address(page, NULL);
need_flush = 1;
}
-@@ -141,6 +153,9 @@ static inline unsigned long map_new_virt
- {
- unsigned long vaddr;
- int count;
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
-
- start:
- count = LAST_PKMAP;
-@@ -178,8 +193,14 @@ start:
+@@ -177,9 +178,11 @@ start:
}
}
vaddr = PKMAP_ADDR(last_pkmap_nr);
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
++
++ pax_open_kernel();
set_pte_at(&init_mm, vaddr,
&(pkmap_page_table[last_pkmap_nr]), mk_pte(page, kmap_prot));
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-
+-
++ pax_close_kernel();
pkmap_count[last_pkmap_nr] = 1;
set_page_address(page, (void *)vaddr);
-diff -urNp linux-2.6.30.8/mm/hugetlb.c linux-2.6.30.8/mm/hugetlb.c
---- linux-2.6.30.8/mm/hugetlb.c 2009-08-24 20:46:57.238828654 -0400
-+++ linux-2.6.30.8/mm/hugetlb.c 2009-08-24 20:48:46.016621681 -0400
-@@ -1661,7 +1661,7 @@ static int hugetlb_vm_op_fault(struct vm
+
+diff -urNp linux-2.6.31.4/mm/hugetlb.c linux-2.6.31.4/mm/hugetlb.c
+--- linux-2.6.31.4/mm/hugetlb.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/hugetlb.c 2009-10-11 15:29:49.498808742 -0400
+@@ -1689,7 +1689,7 @@ static int hugetlb_vm_op_fault(struct vm
return 0;
}
@@ -40382,7 +42534,7 @@ diff -urNp linux-2.6.30.8/mm/hugetlb.c linux-2.6.30.8/mm/hugetlb.c
.fault = hugetlb_vm_op_fault,
.open = hugetlb_vm_op_open,
.close = hugetlb_vm_op_close,
-@@ -1864,6 +1864,26 @@ static int unmap_ref_private(struct mm_s
+@@ -1892,6 +1892,26 @@ static int unmap_ref_private(struct mm_s
return 1;
}
@@ -40409,7 +42561,7 @@ diff -urNp linux-2.6.30.8/mm/hugetlb.c linux-2.6.30.8/mm/hugetlb.c
static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, pte_t *ptep, pte_t pte,
struct page *pagecache_page)
-@@ -1935,6 +1955,11 @@ retry_avoidcopy:
+@@ -1963,6 +1983,11 @@ retry_avoidcopy:
huge_ptep_clear_flush(vma, address, ptep);
set_huge_pte_at(mm, address, ptep,
make_huge_pte(vma, new_page, 1));
@@ -40421,7 +42573,7 @@ diff -urNp linux-2.6.30.8/mm/hugetlb.c linux-2.6.30.8/mm/hugetlb.c
/* Make the old page be freed below */
new_page = old_page;
}
-@@ -2044,6 +2069,10 @@ retry:
+@@ -2072,6 +2097,10 @@ retry:
&& (vma->vm_flags & VM_SHARED)));
set_huge_pte_at(mm, address, ptep, new_pte);
@@ -40429,10 +42581,10 @@ diff -urNp linux-2.6.30.8/mm/hugetlb.c linux-2.6.30.8/mm/hugetlb.c
+ pax_mirror_huge_pte(vma, address, page);
+#endif
+
- if (write_access && !(vma->vm_flags & VM_SHARED)) {
+ if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) {
/* Optimization, do the COW without a second fault */
ret = hugetlb_cow(mm, vma, address, ptep, new_pte, page);
-@@ -2072,6 +2101,28 @@ int hugetlb_fault(struct mm_struct *mm,
+@@ -2100,6 +2129,28 @@ int hugetlb_fault(struct mm_struct *mm,
static DEFINE_MUTEX(hugetlb_instantiation_mutex);
struct hstate *h = hstate_vma(vma);
@@ -40461,9 +42613,42 @@ diff -urNp linux-2.6.30.8/mm/hugetlb.c linux-2.6.30.8/mm/hugetlb.c
ptep = huge_pte_alloc(mm, address, huge_page_size(h));
if (!ptep)
return VM_FAULT_OOM;
-diff -urNp linux-2.6.30.8/mm/madvise.c linux-2.6.30.8/mm/madvise.c
---- linux-2.6.30.8/mm/madvise.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/madvise.c 2009-07-30 09:48:10.143720396 -0400
+diff -urNp linux-2.6.31.4/mm/Kconfig linux-2.6.31.4/mm/Kconfig
+--- linux-2.6.31.4/mm/Kconfig 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/Kconfig 2009-10-11 15:29:49.499680557 -0400
+@@ -216,7 +216,7 @@ config MMU_NOTIFIER
+
+ config DEFAULT_MMAP_MIN_ADDR
+ int "Low address space to protect from user allocation"
+- default 4096
++ default 65536
+ help
+ This is the portion of low virtual memory which should be protected
+ from userspace allocation. Keeping a user from writing to low pages
+diff -urNp linux-2.6.31.4/mm/maccess.c linux-2.6.31.4/mm/maccess.c
+--- linux-2.6.31.4/mm/maccess.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/maccess.c 2009-10-11 15:29:56.775737985 -0400
+@@ -14,7 +14,7 @@
+ * Safely read from address @src to the buffer at @dst. If a kernel fault
+ * happens, handle that and return -EFAULT.
+ */
+-long probe_kernel_read(void *dst, void *src, size_t size)
++long probe_kernel_read(void *dst, const void *src, size_t size)
+ {
+ long ret;
+ mm_segment_t old_fs = get_fs();
+@@ -39,7 +39,7 @@ EXPORT_SYMBOL_GPL(probe_kernel_read);
+ * Safely write to address @dst from the buffer at @src. If a kernel fault
+ * happens, handle that and return -EFAULT.
+ */
+-long notrace __weak probe_kernel_write(void *dst, void *src, size_t size)
++long notrace __weak probe_kernel_write(void *dst, const void *src, size_t size)
+ {
+ long ret;
+ mm_segment_t old_fs = get_fs();
+diff -urNp linux-2.6.31.4/mm/madvise.c linux-2.6.31.4/mm/madvise.c
+--- linux-2.6.31.4/mm/madvise.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/madvise.c 2009-10-11 15:29:49.500524968 -0400
@@ -43,6 +43,10 @@ static long madvise_behavior(struct vm_a
pgoff_t pgoff;
int new_flags = vma->vm_flags;
@@ -40489,7 +42674,7 @@ diff -urNp linux-2.6.30.8/mm/madvise.c linux-2.6.30.8/mm/madvise.c
vma->vm_flags = new_flags;
out:
-@@ -236,6 +247,17 @@ madvise_vma(struct vm_area_struct *vma,
+@@ -235,6 +246,17 @@ madvise_vma(struct vm_area_struct *vma,
case MADV_DONTNEED:
error = madvise_dontneed(vma, prev, start, end);
@@ -40507,7 +42692,7 @@ diff -urNp linux-2.6.30.8/mm/madvise.c linux-2.6.30.8/mm/madvise.c
break;
default:
-@@ -308,6 +330,16 @@ SYSCALL_DEFINE3(madvise, unsigned long,
+@@ -328,6 +350,16 @@ SYSCALL_DEFINE3(madvise, unsigned long,
if (end < start)
goto out;
@@ -40524,9 +42709,9 @@ diff -urNp linux-2.6.30.8/mm/madvise.c linux-2.6.30.8/mm/madvise.c
error = 0;
if (end == start)
goto out;
-diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
---- linux-2.6.30.8/mm/memory.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/memory.c 2009-07-30 11:10:49.792655285 -0400
+diff -urNp linux-2.6.31.4/mm/memory.c linux-2.6.31.4/mm/memory.c
+--- linux-2.6.31.4/mm/memory.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/memory.c 2009-10-11 15:29:49.509549777 -0400
@@ -47,6 +47,7 @@
#include <linux/pagemap.h>
#include <linux/rmap.h>
@@ -40535,12 +42720,12 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
#include <linux/delayacct.h>
#include <linux/init.h>
#include <linux/writeback.h>
-@@ -1227,11 +1228,11 @@ int __get_user_pages(struct task_struct
+@@ -1228,11 +1229,11 @@ int __get_user_pages(struct task_struct
vm_flags &= force ? (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
i = 0;
- do {
-+ while (len) {
++ while (nr_pages) {
struct vm_area_struct *vma;
unsigned int foll_flags;
@@ -40549,7 +42734,7 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
if (!vma && in_gate_area(tsk, start)) {
unsigned long pg = start & PAGE_MASK;
struct vm_area_struct *gate_vma = get_gate_vma(tsk);
-@@ -1273,7 +1274,7 @@ int __get_user_pages(struct task_struct
+@@ -1274,7 +1275,7 @@ int __get_user_pages(struct task_struct
continue;
}
@@ -40558,16 +42743,16 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
(vma->vm_flags & (VM_IO | VM_PFNMAP)) ||
(!ignore && !(vm_flags & vma->vm_flags)))
return i ? : -EFAULT;
-@@ -1356,7 +1357,7 @@ int __get_user_pages(struct task_struct
+@@ -1360,7 +1361,7 @@ int __get_user_pages(struct task_struct
start += PAGE_SIZE;
- len--;
- } while (len && start < vma->vm_end);
-- } while (len);
+ nr_pages--;
+ } while (nr_pages && start < vma->vm_end);
+- } while (nr_pages);
+ }
return i;
}
-@@ -1874,6 +1875,186 @@ static inline void cow_user_page(struct
+@@ -1926,6 +1927,186 @@ static inline void cow_user_page(struct
copy_user_highpage(dst, src, va, vma);
}
@@ -40754,7 +42939,7 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
/*
* 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
-@@ -2046,6 +2227,12 @@ gotten:
+@@ -2098,6 +2279,12 @@ gotten:
*/
page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
if (likely(pte_same(*page_table, orig_pte))) {
@@ -40767,7 +42952,7 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
if (old_page) {
if (!PageAnon(old_page)) {
dec_mm_counter(mm, file_rss);
-@@ -2092,6 +2279,10 @@ gotten:
+@@ -2144,6 +2331,10 @@ gotten:
page_remove_rmap(old_page);
}
@@ -40778,7 +42963,7 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
/* Free the old page.. */
new_page = old_page;
ret |= VM_FAULT_WRITE;
-@@ -2373,6 +2564,7 @@ int vmtruncate(struct inode * inode, lof
+@@ -2425,6 +2616,7 @@ int vmtruncate(struct inode * inode, lof
unsigned long limit;
limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
@@ -40786,19 +42971,19 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
if (limit != RLIM_INFINITY && offset > limit)
goto out_sig;
if (offset > inode->i_sb->s_maxbytes)
-@@ -2535,6 +2727,11 @@ static int do_swap_page(struct mm_struct
+@@ -2587,6 +2779,11 @@ static int do_swap_page(struct mm_struct
swap_free(entry);
if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
try_to_free_swap(page);
+
+#ifdef CONFIG_PAX_SEGMEXEC
-+ if (write_access || !pax_find_mirror_vma(vma))
++ if ((flags & FAULT_FLAG_WRITE) || !pax_find_mirror_vma(vma))
+#endif
+
unlock_page(page);
- if (write_access) {
-@@ -2546,6 +2743,11 @@ static int do_swap_page(struct mm_struct
+ if (flags & FAULT_FLAG_WRITE) {
+@@ -2598,6 +2795,11 @@ static int do_swap_page(struct mm_struct
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, pte);
@@ -40810,7 +42995,7 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
unlock:
pte_unmap_unlock(page_table, ptl);
out:
-@@ -2591,12 +2793,23 @@ static int do_anonymous_page(struct mm_s
+@@ -2644,12 +2846,23 @@ static int do_anonymous_page(struct mm_s
page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
if (!pte_none(*page_table))
goto release;
@@ -40834,7 +43019,7 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
unlock:
pte_unmap_unlock(page_table, ptl);
return 0;
-@@ -2733,6 +2946,12 @@ static int __do_fault(struct mm_struct *
+@@ -2786,6 +2999,12 @@ static int __do_fault(struct mm_struct *
*/
/* Only go through if we didn't race with anybody else... */
if (likely(pte_same(*page_table, orig_pte))) {
@@ -40847,7 +43032,7 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
flush_icache_page(vma, page);
entry = mk_pte(page, vma->vm_page_prot);
if (flags & FAULT_FLAG_WRITE)
-@@ -2752,6 +2971,14 @@ static int __do_fault(struct mm_struct *
+@@ -2805,6 +3024,14 @@ static int __do_fault(struct mm_struct *
/* no need to invalidate: a not-present page won't be cached */
update_mmu_cache(vma, address, entry);
@@ -40862,8 +43047,8 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
} else {
if (charged)
mem_cgroup_uncharge_page(page);
-@@ -2900,6 +3127,12 @@ static inline int handle_pte_fault(struc
- if (write_access)
+@@ -2952,6 +3179,12 @@ static inline int handle_pte_fault(struc
+ if (flags & FAULT_FLAG_WRITE)
flush_tlb_page(vma, address);
}
+
@@ -40875,7 +43060,7 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
unlock:
pte_unmap_unlock(pte, ptl);
return 0;
-@@ -2916,6 +3149,10 @@ int handle_mm_fault(struct mm_struct *mm
+@@ -2968,6 +3201,10 @@ int handle_mm_fault(struct mm_struct *mm
pmd_t *pmd;
pte_t *pte;
@@ -40886,9 +43071,9 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
__set_current_state(TASK_RUNNING);
count_vm_event(PGFAULT);
-@@ -2923,6 +3160,34 @@ int handle_mm_fault(struct mm_struct *mm
+@@ -2975,6 +3212,34 @@ int handle_mm_fault(struct mm_struct *mm
if (unlikely(is_vm_hugetlb_page(vma)))
- return hugetlb_fault(mm, vma, address, write_access);
+ return hugetlb_fault(mm, vma, address, flags);
+#ifdef CONFIG_PAX_SEGMEXEC
+ vma_m = pax_find_mirror_vma(vma);
@@ -40921,7 +43106,7 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
pgd = pgd_offset(mm, address);
pud = pud_alloc(mm, pgd, address);
if (!pud)
-@@ -3020,7 +3285,7 @@ static int __init gate_vma_init(void)
+@@ -3072,7 +3337,7 @@ static int __init gate_vma_init(void)
gate_vma.vm_start = FIXADDR_USER_START;
gate_vma.vm_end = FIXADDR_USER_END;
gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
@@ -40930,10 +43115,10 @@ diff -urNp linux-2.6.30.8/mm/memory.c linux-2.6.30.8/mm/memory.c
/*
* Make sure the vDSO gets into every core dump.
* Dumping its contents makes post-mortem fully interpretable later
-diff -urNp linux-2.6.30.8/mm/mempolicy.c linux-2.6.30.8/mm/mempolicy.c
---- linux-2.6.30.8/mm/mempolicy.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/mempolicy.c 2009-08-28 19:17:19.665274493 -0400
-@@ -551,6 +551,10 @@ static int mbind_range(struct vm_area_st
+diff -urNp linux-2.6.31.4/mm/mempolicy.c linux-2.6.31.4/mm/mempolicy.c
+--- linux-2.6.31.4/mm/mempolicy.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/mempolicy.c 2009-10-11 15:29:49.521380502 -0400
+@@ -573,6 +573,10 @@ static int mbind_range(struct vm_area_st
struct vm_area_struct *next;
int err;
@@ -40944,7 +43129,7 @@ diff -urNp linux-2.6.30.8/mm/mempolicy.c linux-2.6.30.8/mm/mempolicy.c
err = 0;
for (; vma && vma->vm_start < end; vma = next) {
next = vma->vm_next;
-@@ -562,6 +566,16 @@ static int mbind_range(struct vm_area_st
+@@ -584,6 +588,16 @@ static int mbind_range(struct vm_area_st
err = policy_vma(vma, new);
if (err)
break;
@@ -40961,7 +43146,7 @@ diff -urNp linux-2.6.30.8/mm/mempolicy.c linux-2.6.30.8/mm/mempolicy.c
}
return err;
}
-@@ -954,6 +968,17 @@ static long do_mbind(unsigned long start
+@@ -1002,6 +1016,17 @@ static long do_mbind(unsigned long start
if (end < start)
return -EINVAL;
@@ -40979,7 +43164,7 @@ diff -urNp linux-2.6.30.8/mm/mempolicy.c linux-2.6.30.8/mm/mempolicy.c
if (end == start)
return 0;
-@@ -1142,6 +1167,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
+@@ -1206,6 +1231,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
if (!mm)
return -EINVAL;
@@ -40994,7 +43179,7 @@ diff -urNp linux-2.6.30.8/mm/mempolicy.c linux-2.6.30.8/mm/mempolicy.c
/*
* Check if this process has the right to modify the specified
* process. The right exists if the process has administrative
-@@ -1151,8 +1184,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
+@@ -1215,8 +1248,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
rcu_read_lock();
tcred = __task_cred(task);
if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
@@ -41004,7 +43189,7 @@ diff -urNp linux-2.6.30.8/mm/mempolicy.c linux-2.6.30.8/mm/mempolicy.c
rcu_read_unlock();
err = -EPERM;
goto out;
-@@ -2290,7 +2322,7 @@ int show_numa_map(struct seq_file *m, vo
+@@ -2385,7 +2417,7 @@ int show_numa_map(struct seq_file *m, vo
if (file) {
seq_printf(m, " file=");
@@ -41013,10 +43198,10 @@ diff -urNp linux-2.6.30.8/mm/mempolicy.c linux-2.6.30.8/mm/mempolicy.c
} else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
seq_printf(m, " heap");
} else if (vma->vm_start <= mm->start_stack &&
-diff -urNp linux-2.6.30.8/mm/migrate.c linux-2.6.30.8/mm/migrate.c
---- linux-2.6.30.8/mm/migrate.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/migrate.c 2009-08-28 19:16:52.585127596 -0400
-@@ -1085,6 +1085,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
+diff -urNp linux-2.6.31.4/mm/migrate.c linux-2.6.31.4/mm/migrate.c
+--- linux-2.6.31.4/mm/migrate.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/migrate.c 2009-10-11 15:29:49.532363246 -0400
+@@ -1087,6 +1087,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
if (!mm)
return -EINVAL;
@@ -41031,7 +43216,7 @@ diff -urNp linux-2.6.30.8/mm/migrate.c linux-2.6.30.8/mm/migrate.c
/*
* Check if this process has the right to modify the specified
* process. The right exists if the process has administrative
-@@ -1094,8 +1102,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
+@@ -1096,8 +1104,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
rcu_read_lock();
tcred = __task_cred(task);
if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
@@ -41041,9 +43226,9 @@ diff -urNp linux-2.6.30.8/mm/migrate.c linux-2.6.30.8/mm/migrate.c
rcu_read_unlock();
err = -EPERM;
goto out;
-diff -urNp linux-2.6.30.8/mm/mlock.c linux-2.6.30.8/mm/mlock.c
---- linux-2.6.30.8/mm/mlock.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/mlock.c 2009-07-30 11:10:49.799565380 -0400
+diff -urNp linux-2.6.31.4/mm/mlock.c linux-2.6.31.4/mm/mlock.c
+--- linux-2.6.31.4/mm/mlock.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/mlock.c 2009-10-11 15:29:49.541486136 -0400
@@ -13,6 +13,7 @@
#include <linux/pagemap.h>
#include <linux/mempolicy.h>
@@ -41052,7 +43237,7 @@ diff -urNp linux-2.6.30.8/mm/mlock.c linux-2.6.30.8/mm/mlock.c
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/rmap.h>
-@@ -453,6 +454,17 @@ static int do_mlock(unsigned long start,
+@@ -412,6 +413,17 @@ static int do_mlock(unsigned long start,
return -EINVAL;
if (end == start)
return 0;
@@ -41070,7 +43255,7 @@ diff -urNp linux-2.6.30.8/mm/mlock.c linux-2.6.30.8/mm/mlock.c
vma = find_vma_prev(current->mm, start, &prev);
if (!vma || vma->vm_start > start)
return -ENOMEM;
-@@ -512,6 +524,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, st
+@@ -471,6 +483,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, st
lock_limit >>= PAGE_SHIFT;
/* check against resource limits */
@@ -41078,7 +43263,7 @@ diff -urNp linux-2.6.30.8/mm/mlock.c linux-2.6.30.8/mm/mlock.c
if ((locked <= lock_limit) || capable(CAP_IPC_LOCK))
error = do_mlock(start, len, 1);
up_write(&current->mm->mmap_sem);
-@@ -533,10 +546,10 @@ SYSCALL_DEFINE2(munlock, unsigned long,
+@@ -492,10 +505,10 @@ SYSCALL_DEFINE2(munlock, unsigned long,
static int do_mlockall(int flags)
{
struct vm_area_struct * vma, * prev = NULL;
@@ -41091,7 +43276,7 @@ diff -urNp linux-2.6.30.8/mm/mlock.c linux-2.6.30.8/mm/mlock.c
current->mm->def_flags = def_flags;
if (flags == MCL_FUTURE)
goto out;
-@@ -544,6 +557,12 @@ static int do_mlockall(int flags)
+@@ -503,6 +516,12 @@ static int do_mlockall(int flags)
for (vma = current->mm->mmap; vma ; vma = prev->vm_next) {
unsigned int newflags;
@@ -41104,7 +43289,7 @@ diff -urNp linux-2.6.30.8/mm/mlock.c linux-2.6.30.8/mm/mlock.c
newflags = vma->vm_flags | VM_LOCKED;
if (!(flags & MCL_CURRENT))
newflags &= ~VM_LOCKED;
-@@ -575,6 +594,7 @@ SYSCALL_DEFINE1(mlockall, int, flags)
+@@ -534,6 +553,7 @@ SYSCALL_DEFINE1(mlockall, int, flags)
lock_limit >>= PAGE_SHIFT;
ret = -ENOMEM;
@@ -41112,10 +43297,10 @@ diff -urNp linux-2.6.30.8/mm/mlock.c linux-2.6.30.8/mm/mlock.c
if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) ||
capable(CAP_IPC_LOCK))
ret = do_mlockall(flags);
-diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
---- linux-2.6.30.8/mm/mmap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/mmap.c 2009-07-30 11:10:49.813589536 -0400
-@@ -44,6 +44,16 @@
+diff -urNp linux-2.6.31.4/mm/mmap.c linux-2.6.31.4/mm/mmap.c
+--- linux-2.6.31.4/mm/mmap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/mmap.c 2009-10-11 15:29:49.553490783 -0400
+@@ -45,6 +45,16 @@
#define arch_rebalance_pgtables(addr, len) (addr)
#endif
@@ -41132,7 +43317,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
static void unmap_region(struct mm_struct *mm,
struct vm_area_struct *vma, struct vm_area_struct *prev,
unsigned long start, unsigned long end);
-@@ -69,16 +79,25 @@ static void unmap_region(struct mm_struc
+@@ -70,16 +80,25 @@ static void unmap_region(struct mm_struc
* x: (no) no x: (no) yes x: (no) yes x: (yes) yes
*
*/
@@ -41160,7 +43345,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
}
EXPORT_SYMBOL(vm_get_page_prot);
-@@ -233,6 +252,7 @@ static struct vm_area_struct *remove_vma
+@@ -231,6 +250,7 @@ static struct vm_area_struct *remove_vma
struct vm_area_struct *next = vma->vm_next;
might_sleep();
@@ -41168,7 +43353,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file) {
-@@ -269,6 +289,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
+@@ -267,6 +287,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
* not page aligned -Ram Gupta
*/
rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur;
@@ -41176,7 +43361,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
if (rlim < RLIM_INFINITY && (brk - mm->start_brk) +
(mm->end_data - mm->start_data) > rlim)
goto out;
-@@ -698,6 +719,12 @@ static int
+@@ -696,6 +717,12 @@ static int
can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
{
@@ -41189,7 +43374,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
if (is_mergeable_vma(vma, file, vm_flags) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma)) {
if (vma->vm_pgoff == vm_pgoff)
-@@ -717,6 +744,12 @@ static int
+@@ -715,6 +742,12 @@ static int
can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
{
@@ -41202,7 +43387,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
if (is_mergeable_vma(vma, file, vm_flags) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma)) {
pgoff_t vm_pglen;
-@@ -759,12 +792,19 @@ can_vma_merge_after(struct vm_area_struc
+@@ -757,12 +790,19 @@ can_vma_merge_after(struct vm_area_struc
struct vm_area_struct *vma_merge(struct mm_struct *mm,
struct vm_area_struct *prev, unsigned long addr,
unsigned long end, unsigned long vm_flags,
@@ -41223,7 +43408,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
/*
* We later require that vma->vm_flags == vm_flags,
* so this tests vma->vm_flags & VM_SPECIAL, too.
-@@ -780,6 +820,15 @@ struct vm_area_struct *vma_merge(struct
+@@ -778,6 +818,15 @@ struct vm_area_struct *vma_merge(struct
if (next && next->vm_end == end) /* cases 6, 7, 8 */
next = next->vm_next;
@@ -41239,7 +43424,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
/*
* Can it merge with the predecessor?
*/
-@@ -799,9 +848,24 @@ struct vm_area_struct *vma_merge(struct
+@@ -797,9 +846,24 @@ struct vm_area_struct *vma_merge(struct
/* cases 1, 6 */
vma_adjust(prev, prev->vm_start,
next->vm_end, prev->vm_pgoff, NULL);
@@ -41265,7 +43450,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
return prev;
}
-@@ -812,12 +876,27 @@ struct vm_area_struct *vma_merge(struct
+@@ -810,12 +874,27 @@ struct vm_area_struct *vma_merge(struct
mpol_equal(policy, vma_policy(next)) &&
can_vma_merge_before(next, vm_flags,
anon_vma, file, pgoff+pglen)) {
@@ -41295,7 +43480,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
return area;
}
-@@ -892,14 +971,11 @@ none:
+@@ -890,14 +969,11 @@ none:
void vm_stat_account(struct mm_struct *mm, unsigned long flags,
struct file *file, long pages)
{
@@ -41311,7 +43496,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
mm->stack_vm += pages;
if (flags & (VM_RESERVED|VM_IO))
mm->reserved_vm += pages;
-@@ -926,7 +1002,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -924,7 +1000,7 @@ unsigned long do_mmap_pgoff(struct file
* (the exception is when the underlying filesystem is noexec
* mounted, in which case we dont add PROT_EXEC.)
*/
@@ -41320,7 +43505,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
prot |= PROT_EXEC;
-@@ -936,15 +1012,15 @@ unsigned long do_mmap_pgoff(struct file
+@@ -934,15 +1010,15 @@ unsigned long do_mmap_pgoff(struct file
if (!(flags & MAP_FIXED))
addr = round_hint_to_min(addr);
@@ -41340,7 +43525,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
/* offset overflow? */
if ((pgoff + (len >> PAGE_SHIFT)) < pgoff)
return -EOVERFLOW;
-@@ -956,7 +1032,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -954,7 +1030,7 @@ unsigned long do_mmap_pgoff(struct file
/* Obtain the address to map to. we verify (or select) it and ensure
* that it represents a valid section of the address space.
*/
@@ -41349,7 +43534,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
if (addr & ~PAGE_MASK)
return addr;
-@@ -967,6 +1043,26 @@ unsigned long do_mmap_pgoff(struct file
+@@ -965,6 +1041,26 @@ unsigned long do_mmap_pgoff(struct file
vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
@@ -41376,7 +43561,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
if (flags & MAP_LOCKED) {
if (!can_do_mlock())
return -EPERM;
-@@ -980,6 +1076,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -978,6 +1074,7 @@ unsigned long do_mmap_pgoff(struct file
locked += mm->locked_vm;
lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur;
lock_limit >>= PAGE_SHIFT;
@@ -41384,7 +43569,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
if (locked > lock_limit && !capable(CAP_IPC_LOCK))
return -EAGAIN;
}
-@@ -1053,6 +1150,9 @@ unsigned long do_mmap_pgoff(struct file
+@@ -1051,6 +1148,9 @@ unsigned long do_mmap_pgoff(struct file
if (error)
return error;
@@ -41394,7 +43579,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
return mmap_region(file, addr, len, flags, vm_flags, pgoff);
}
EXPORT_SYMBOL(do_mmap_pgoff);
-@@ -1065,10 +1165,10 @@ EXPORT_SYMBOL(do_mmap_pgoff);
+@@ -1063,10 +1163,10 @@ EXPORT_SYMBOL(do_mmap_pgoff);
*/
int vma_wants_writenotify(struct vm_area_struct *vma)
{
@@ -41407,7 +43592,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
return 0;
/* The backer wishes to know when pages are first written to? */
-@@ -1117,14 +1217,24 @@ unsigned long mmap_region(struct file *f
+@@ -1115,14 +1215,24 @@ unsigned long mmap_region(struct file *f
unsigned long charged = 0;
struct inode *inode = file ? file->f_path.dentry->d_inode : NULL;
@@ -41434,7 +43619,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
}
/* Check against address space limit. */
-@@ -1173,6 +1283,16 @@ munmap_back:
+@@ -1171,6 +1281,16 @@ munmap_back:
goto unacct_error;
}
@@ -41451,7 +43636,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
vma->vm_mm = mm;
vma->vm_start = addr;
vma->vm_end = addr + len;
-@@ -1195,6 +1315,19 @@ munmap_back:
+@@ -1193,6 +1313,19 @@ munmap_back:
error = file->f_op->mmap(file, vma);
if (error)
goto unmap_and_free_vma;
@@ -41471,7 +43656,7 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
if (vm_flags & VM_EXECUTABLE)
added_exe_file_vma(mm);
} else if (vm_flags & VM_SHARED) {
-@@ -1218,12 +1351,18 @@ munmap_back:
+@@ -1216,6 +1349,11 @@ munmap_back:
vma_link(mm, vma, prev, rb_link, rb_parent);
file = vma->vm_file;
@@ -41483,7 +43668,8 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
/* Once vma denies write, undo our temporary denial count */
if (correct_wcount)
atomic_inc(&inode->i_writecount);
- out:
+@@ -1224,6 +1362,7 @@ out:
+
mm->total_vm += len >> PAGE_SHIFT;
vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
+ track_exec_limit(mm, addr, addr + len, vm_flags);
@@ -42249,13 +44435,13 @@ diff -urNp linux-2.6.30.8/mm/mmap.c linux-2.6.30.8/mm/mmap.c
vma->vm_flags = vm_flags | mm->def_flags | VM_DONTEXPAND;
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
-diff -urNp linux-2.6.30.8/mm/mprotect.c linux-2.6.30.8/mm/mprotect.c
---- linux-2.6.30.8/mm/mprotect.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/mprotect.c 2009-07-30 11:10:49.815552001 -0400
-@@ -23,10 +23,16 @@
- #include <linux/swapops.h>
+diff -urNp linux-2.6.31.4/mm/mprotect.c linux-2.6.31.4/mm/mprotect.c
+--- linux-2.6.31.4/mm/mprotect.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/mprotect.c 2009-10-11 15:29:49.559452903 -0400
+@@ -24,10 +24,16 @@
#include <linux/mmu_notifier.h>
#include <linux/migrate.h>
+ #include <linux/perf_counter.h>
+
+#ifdef CONFIG_PAX_MPROTECT
+#include <linux/elf.h>
@@ -42269,7 +44455,7 @@ diff -urNp linux-2.6.30.8/mm/mprotect.c linux-2.6.30.8/mm/mprotect.c
#ifndef pgprot_modify
static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
-@@ -131,6 +137,48 @@ static void change_protection(struct vm_
+@@ -132,6 +138,48 @@ static void change_protection(struct vm_
flush_tlb_range(vma, start, end);
}
@@ -42318,7 +44504,7 @@ diff -urNp linux-2.6.30.8/mm/mprotect.c linux-2.6.30.8/mm/mprotect.c
int
mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
unsigned long start, unsigned long end, unsigned long newflags)
-@@ -143,6 +191,14 @@ mprotect_fixup(struct vm_area_struct *vm
+@@ -144,6 +192,14 @@ mprotect_fixup(struct vm_area_struct *vm
int error;
int dirty_accountable = 0;
@@ -42333,7 +44519,7 @@ diff -urNp linux-2.6.30.8/mm/mprotect.c linux-2.6.30.8/mm/mprotect.c
if (newflags == oldflags) {
*pprev = vma;
return 0;
-@@ -164,6 +220,38 @@ mprotect_fixup(struct vm_area_struct *vm
+@@ -165,6 +221,38 @@ mprotect_fixup(struct vm_area_struct *vm
}
}
@@ -42372,7 +44558,7 @@ diff -urNp linux-2.6.30.8/mm/mprotect.c linux-2.6.30.8/mm/mprotect.c
/*
* First try to merge with previous and/or next vma.
*/
-@@ -195,8 +283,14 @@ success:
+@@ -196,8 +284,14 @@ success:
* held in write mode.
*/
vma->vm_flags = newflags;
@@ -42388,7 +44574,7 @@ diff -urNp linux-2.6.30.8/mm/mprotect.c linux-2.6.30.8/mm/mprotect.c
if (vma_wants_writenotify(vma)) {
vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
-@@ -237,6 +331,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -238,6 +332,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
end = start + len;
if (end <= start)
return -ENOMEM;
@@ -42406,7 +44592,7 @@ diff -urNp linux-2.6.30.8/mm/mprotect.c linux-2.6.30.8/mm/mprotect.c
if (!arch_validate_prot(prot))
return -EINVAL;
-@@ -244,7 +349,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -245,7 +350,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
@@ -42415,7 +44601,7 @@ diff -urNp linux-2.6.30.8/mm/mprotect.c linux-2.6.30.8/mm/mprotect.c
prot |= PROT_EXEC;
vm_flags = calc_vm_prot_bits(prot);
-@@ -276,6 +381,16 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -277,6 +382,16 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
if (start > vma->vm_start)
prev = vma;
@@ -42432,19 +44618,19 @@ diff -urNp linux-2.6.30.8/mm/mprotect.c linux-2.6.30.8/mm/mprotect.c
for (nstart = start ; ; ) {
unsigned long newflags;
-@@ -299,6 +414,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
- error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
+@@ -301,6 +416,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
if (error)
goto out;
+ perf_counter_mmap(vma);
+
+ track_exec_limit(current->mm, nstart, tmp, vm_flags);
+
nstart = tmp;
if (nstart < prev->vm_end)
-diff -urNp linux-2.6.30.8/mm/mremap.c linux-2.6.30.8/mm/mremap.c
---- linux-2.6.30.8/mm/mremap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/mremap.c 2009-07-30 09:48:10.147955205 -0400
+diff -urNp linux-2.6.31.4/mm/mremap.c linux-2.6.31.4/mm/mremap.c
+--- linux-2.6.31.4/mm/mremap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/mremap.c 2009-10-11 15:29:49.559452903 -0400
@@ -113,6 +113,12 @@ static void move_ptes(struct vm_area_str
continue;
pte = ptep_clear_flush(vma, old_addr, old_pte);
@@ -42556,10 +44742,10 @@ diff -urNp linux-2.6.30.8/mm/mremap.c linux-2.6.30.8/mm/mremap.c
}
out:
if (ret & ~PAGE_MASK)
-diff -urNp linux-2.6.30.8/mm/nommu.c linux-2.6.30.8/mm/nommu.c
---- linux-2.6.30.8/mm/nommu.c 2009-07-30 20:32:40.555603021 -0400
-+++ linux-2.6.30.8/mm/nommu.c 2009-07-30 20:32:48.097607328 -0400
-@@ -82,7 +82,7 @@ static struct kmem_cache *vm_region_jar;
+diff -urNp linux-2.6.31.4/mm/nommu.c linux-2.6.31.4/mm/nommu.c
+--- linux-2.6.31.4/mm/nommu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/nommu.c 2009-10-11 15:29:49.560387946 -0400
+@@ -79,7 +79,7 @@ static struct kmem_cache *vm_region_jar;
struct rb_root nommu_region_tree = RB_ROOT;
DECLARE_RWSEM(nommu_region_sem);
@@ -42568,7 +44754,7 @@ diff -urNp linux-2.6.30.8/mm/nommu.c linux-2.6.30.8/mm/nommu.c
};
/*
-@@ -764,15 +764,6 @@ struct vm_area_struct *find_vma(struct m
+@@ -780,15 +780,6 @@ struct vm_area_struct *find_vma(struct m
EXPORT_SYMBOL(find_vma);
/*
@@ -42584,21 +44770,21 @@ diff -urNp linux-2.6.30.8/mm/nommu.c linux-2.6.30.8/mm/nommu.c
* expand a stack to a given address
* - not supported under NOMMU conditions
*/
-diff -urNp linux-2.6.30.8/mm/page_alloc.c linux-2.6.30.8/mm/page_alloc.c
---- linux-2.6.30.8/mm/page_alloc.c 2009-09-09 17:37:33.986248960 -0400
-+++ linux-2.6.30.8/mm/page_alloc.c 2009-09-09 17:37:58.257078403 -0400
-@@ -549,6 +549,10 @@ static void __free_pages_ok(struct page
- int i;
+diff -urNp linux-2.6.31.4/mm/page_alloc.c linux-2.6.31.4/mm/page_alloc.c
+--- linux-2.6.31.4/mm/page_alloc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/page_alloc.c 2009-10-11 15:29:49.573358875 -0400
+@@ -559,6 +559,10 @@ static void __free_pages_ok(struct page
int bad = 0;
+ int wasMlocked = TestClearPageMlocked(page);
+#ifdef CONFIG_PAX_MEMORY_SANITIZE
+ unsigned long index = 1UL << order;
+#endif
+
+ kmemcheck_free_shadow(page, order);
+
for (i = 0 ; i < (1 << order) ; ++i)
- bad += free_pages_check(page + i);
- if (bad)
-@@ -559,6 +563,12 @@ static void __free_pages_ok(struct page
+@@ -571,6 +575,12 @@ static void __free_pages_ok(struct page
debug_check_no_obj_freed(page_address(page),
PAGE_SIZE << order);
}
@@ -42611,7 +44797,7 @@ diff -urNp linux-2.6.30.8/mm/page_alloc.c linux-2.6.30.8/mm/page_alloc.c
arch_free_page(page, order);
kernel_map_pages(page, 1 << order, 0);
-@@ -647,8 +657,10 @@ static int prep_new_page(struct page *pa
+@@ -662,8 +672,10 @@ static int prep_new_page(struct page *pa
arch_alloc_page(page, order);
kernel_map_pages(page, 1 << order, 1);
@@ -42622,7 +44808,7 @@ diff -urNp linux-2.6.30.8/mm/page_alloc.c linux-2.6.30.8/mm/page_alloc.c
if (order && (gfp_flags & __GFP_COMP))
prep_compound_page(page, order);
-@@ -1009,6 +1021,11 @@ static void free_hot_cold_page(struct pa
+@@ -1039,6 +1051,11 @@ static void free_hot_cold_page(struct pa
debug_check_no_locks_freed(page_address(page), PAGE_SIZE);
debug_check_no_obj_freed(page_address(page), PAGE_SIZE);
}
@@ -42634,10 +44820,10 @@ diff -urNp linux-2.6.30.8/mm/page_alloc.c linux-2.6.30.8/mm/page_alloc.c
arch_free_page(page, 0);
kernel_map_pages(page, 1, 0);
-diff -urNp linux-2.6.30.8/mm/percpu.c linux-2.6.30.8/mm/percpu.c
---- linux-2.6.30.8/mm/percpu.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/percpu.c 2009-07-30 09:48:10.149665939 -0400
-@@ -107,7 +107,7 @@ static int pcpu_nr_slots __read_mostly;
+diff -urNp linux-2.6.31.4/mm/percpu.c linux-2.6.31.4/mm/percpu.c
+--- linux-2.6.31.4/mm/percpu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/percpu.c 2009-10-11 15:29:49.574364071 -0400
+@@ -105,7 +105,7 @@ static int pcpu_nr_slots __read_mostly;
static size_t pcpu_chunk_struct_size __read_mostly;
/* the address of the first chunk which starts with the kernel static area */
@@ -42645,10 +44831,10 @@ diff -urNp linux-2.6.30.8/mm/percpu.c linux-2.6.30.8/mm/percpu.c
+void *pcpu_base_addr __read_only;
EXPORT_SYMBOL_GPL(pcpu_base_addr);
- /* optional reserved chunk, only accessible for reserved allocations */
-diff -urNp linux-2.6.30.8/mm/rmap.c linux-2.6.30.8/mm/rmap.c
---- linux-2.6.30.8/mm/rmap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/rmap.c 2009-07-30 09:48:10.149665939 -0400
+ /*
+diff -urNp linux-2.6.31.4/mm/rmap.c linux-2.6.31.4/mm/rmap.c
+--- linux-2.6.31.4/mm/rmap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/rmap.c 2009-10-11 15:29:49.582516976 -0400
@@ -103,6 +103,10 @@ int anon_vma_prepare(struct vm_area_stru
struct mm_struct *mm = vma->vm_mm;
struct anon_vma *allocated;
@@ -42676,9 +44862,9 @@ diff -urNp linux-2.6.30.8/mm/rmap.c linux-2.6.30.8/mm/rmap.c
vma->anon_vma = anon_vma;
list_add_tail(&vma->anon_vma_node, &anon_vma->head);
allocated = NULL;
-diff -urNp linux-2.6.30.8/mm/shmem.c linux-2.6.30.8/mm/shmem.c
---- linux-2.6.30.8/mm/shmem.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/shmem.c 2009-07-30 11:10:49.822549311 -0400
+diff -urNp linux-2.6.31.4/mm/shmem.c linux-2.6.31.4/mm/shmem.c
+--- linux-2.6.31.4/mm/shmem.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/shmem.c 2009-10-11 15:29:49.618358944 -0400
@@ -31,7 +31,7 @@
#include <linux/swap.h>
#include <linux/ima.h>
@@ -42697,7 +44883,7 @@ diff -urNp linux-2.6.30.8/mm/shmem.c linux-2.6.30.8/mm/shmem.c
static struct backing_dev_info shmem_backing_dev_info __read_mostly = {
.ra_pages = 0, /* No readahead */
-@@ -2501,7 +2501,7 @@ static const struct super_operations shm
+@@ -2497,7 +2497,7 @@ static const struct super_operations shm
.put_super = shmem_put_super,
};
@@ -42706,10 +44892,10 @@ diff -urNp linux-2.6.30.8/mm/shmem.c linux-2.6.30.8/mm/shmem.c
.fault = shmem_fault,
#ifdef CONFIG_NUMA
.set_policy = shmem_set_policy,
-diff -urNp linux-2.6.30.8/mm/slab.c linux-2.6.30.8/mm/slab.c
---- linux-2.6.30.8/mm/slab.c 2009-07-30 20:32:40.559581250 -0400
-+++ linux-2.6.30.8/mm/slab.c 2009-07-30 20:32:48.099850445 -0400
-@@ -306,7 +306,7 @@ struct kmem_list3 {
+diff -urNp linux-2.6.31.4/mm/slab.c linux-2.6.31.4/mm/slab.c
+--- linux-2.6.31.4/mm/slab.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/slab.c 2009-10-11 15:29:49.628084636 -0400
+@@ -308,7 +308,7 @@ struct kmem_list3 {
* Need this for bootstrapping a per node allocator.
*/
#define NUM_INIT_LISTS (3 * MAX_NUMNODES)
@@ -42718,7 +44904,7 @@ diff -urNp linux-2.6.30.8/mm/slab.c linux-2.6.30.8/mm/slab.c
#define CACHE_CACHE 0
#define SIZE_AC MAX_NUMNODES
#define SIZE_L3 (2 * MAX_NUMNODES)
-@@ -637,7 +637,7 @@ static inline void *index_to_obj(struct
+@@ -558,7 +558,7 @@ static inline void *index_to_obj(struct
* reciprocal_divide(offset, cache->reciprocal_buffer_size)
*/
static inline unsigned int obj_to_index(const struct kmem_cache *cache,
@@ -42727,7 +44913,7 @@ diff -urNp linux-2.6.30.8/mm/slab.c linux-2.6.30.8/mm/slab.c
{
u32 offset = (obj - slab->s_mem);
return reciprocal_divide(offset, cache->reciprocal_buffer_size);
-@@ -663,14 +663,14 @@ struct cache_names {
+@@ -584,14 +584,14 @@ struct cache_names {
static struct cache_names __initdata cache_names[] = {
#define CACHE(x) { .name = "size-" #x, .name_dma = "size-" #x "(DMA)" },
#include <linux/kmalloc_sizes.h>
@@ -42745,7 +44931,7 @@ diff -urNp linux-2.6.30.8/mm/slab.c linux-2.6.30.8/mm/slab.c
/* internal cache of cache description objs */
static struct kmem_cache cache_cache = {
-@@ -4486,15 +4486,64 @@ static const struct file_operations proc
+@@ -4473,15 +4473,64 @@ static const struct file_operations proc
static int __init slab_proc_init(void)
{
@@ -42810,9 +44996,9 @@ diff -urNp linux-2.6.30.8/mm/slab.c linux-2.6.30.8/mm/slab.c
/**
* ksize - get the actual amount of memory allocated for a given object
* @objp: Pointer to the object
-diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
---- linux-2.6.30.8/mm/slob.c 2009-07-30 20:32:40.560667928 -0400
-+++ linux-2.6.30.8/mm/slob.c 2009-07-30 20:32:48.100694054 -0400
+diff -urNp linux-2.6.31.4/mm/slob.c linux-2.6.31.4/mm/slob.c
+--- linux-2.6.31.4/mm/slob.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/slob.c 2009-10-11 15:29:49.637362751 -0400
@@ -29,7 +29,7 @@
* If kmalloc is asked for objects of PAGE_SIZE or larger, it calls
* alloc_pages() directly, allocating compound pages so the page order
@@ -42830,7 +45016,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/swap.h> /* struct reclaim_state */
-@@ -99,7 +100,8 @@ struct slob_page {
+@@ -100,7 +101,8 @@ struct slob_page {
unsigned long flags; /* mandatory */
atomic_t _count; /* mandatory */
slobidx_t units; /* free units left in page */
@@ -42840,16 +45026,25 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
slob_t *free; /* first free slob_t in page */
struct list_head list; /* linked list of free pages */
};
-@@ -132,7 +134,7 @@ static LIST_HEAD(free_slob_large);
+@@ -133,7 +135,7 @@ static LIST_HEAD(free_slob_large);
*/
static inline int is_slob_page(struct slob_page *sp)
{
-- return PageSlobPage((struct page *)sp);
-+ return PageSlobPage((struct page *)sp) && !sp->size;
+- return PageSlab((struct page *)sp);
++ return PageSlab((struct page *)sp) && !sp->size;
}
static inline void set_slob_page(struct slob_page *sp)
-@@ -207,7 +209,7 @@ static void set_slob(slob_t *s, slobidx_
+@@ -148,7 +150,7 @@ static inline void clear_slob_page(struc
+
+ static inline struct slob_page *slob_page(const void *addr)
+ {
+- return (struct slob_page *)virt_to_page(addr);
++ return (struct slob_page *)virt_to_head_page(addr);
+ }
+
+ /*
+@@ -208,7 +210,7 @@ static void set_slob(slob_t *s, slobidx_
/*
* Return the size of a slob block.
*/
@@ -42858,7 +45053,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
{
if (s->units > 0)
return s->units;
-@@ -217,7 +219,7 @@ static slobidx_t slob_units(slob_t *s)
+@@ -218,7 +220,7 @@ static slobidx_t slob_units(slob_t *s)
/*
* Return the next free slob block pointer after this one.
*/
@@ -42867,7 +45062,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
{
slob_t *base = (slob_t *)((unsigned long)s & PAGE_MASK);
slobidx_t next;
-@@ -232,7 +234,7 @@ static slob_t *slob_next(slob_t *s)
+@@ -233,7 +235,7 @@ static slob_t *slob_next(slob_t *s)
/*
* Returns true if s is the last free block in its page.
*/
@@ -42876,7 +45071,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
{
return !((unsigned long)slob_next(s) & ~PAGE_MASK);
}
-@@ -251,6 +253,7 @@ static void *slob_new_pages(gfp_t gfp, i
+@@ -252,6 +254,7 @@ static void *slob_new_pages(gfp_t gfp, i
if (!page)
return NULL;
@@ -42884,7 +45079,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
return page_address(page);
}
-@@ -367,11 +370,11 @@ static void *slob_alloc(size_t size, gfp
+@@ -368,11 +371,11 @@ static void *slob_alloc(size_t size, gfp
if (!b)
return NULL;
sp = slob_page(b);
@@ -42897,7 +45092,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
INIT_LIST_HEAD(&sp->list);
set_slob(b, SLOB_UNITS(PAGE_SIZE), b + SLOB_UNITS(PAGE_SIZE));
set_slob_page_free(sp, slob_list);
-@@ -474,10 +477,9 @@ out:
+@@ -475,10 +478,9 @@ out:
#define ARCH_SLAB_MINALIGN __alignof__(unsigned long)
#endif
@@ -42910,7 +45105,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
void *ret;
lockdep_trace_alloc(gfp);
-@@ -490,7 +492,10 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -491,7 +493,10 @@ void *__kmalloc_node(size_t size, gfp_t
if (!m)
return NULL;
@@ -42922,7 +45117,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
ret = (void *)m + align;
trace_kmalloc_node(_RET_IP_, ret,
-@@ -500,9 +505,9 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -501,9 +506,9 @@ void *__kmalloc_node(size_t size, gfp_t
ret = slob_new_pages(gfp | __GFP_COMP, get_order(size), node);
if (ret) {
@@ -42930,13 +45125,13 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
- page = virt_to_page(ret);
- page->private = size;
+ struct slob_page *sp;
-+ sp = (struct slob_page *)virt_to_head_page(ret);
++ sp = slob_page(ret);
+ sp->size = size;
}
trace_kmalloc_node(_RET_IP_, ret,
-@@ -511,6 +516,13 @@ void *__kmalloc_node(size_t size, gfp_t
-
+@@ -513,6 +518,13 @@ void *__kmalloc_node(size_t size, gfp_t
+ kmemleak_alloc(ret, size, 1, gfp);
return ret;
}
+
@@ -42949,7 +45144,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
EXPORT_SYMBOL(__kmalloc_node);
void kfree(const void *block)
-@@ -525,13 +537,86 @@ void kfree(const void *block)
+@@ -528,13 +540,86 @@ void kfree(const void *block)
sp = slob_page(block);
if (is_slob_page(sp)) {
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
@@ -42984,7 +45179,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
+ if (!virt_addr_valid(ptr))
+ return;
+
-+ sp = (struct slob_page *)virt_to_head_page(ptr);
++ sp = slob_page(ptr);
+ /* XXX: can get a little tighter with this stack check */
+ if (!PageSlobPage((struct page*)sp) && object_is_on_stack(ptr) &&
+ (n > ((unsigned long)task_stack_page(current) + THREAD_SIZE -
@@ -43039,7 +45234,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
/* can't use ksize for kmem_cache_alloc memory, only kmalloc */
size_t ksize(const void *block)
{
-@@ -544,10 +629,10 @@ size_t ksize(const void *block)
+@@ -547,10 +632,10 @@ size_t ksize(const void *block)
sp = slob_page(block);
if (is_slob_page(sp)) {
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
@@ -43053,7 +45248,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
}
EXPORT_SYMBOL(ksize);
-@@ -600,17 +685,25 @@ void *kmem_cache_alloc_node(struct kmem_
+@@ -605,17 +690,25 @@ void *kmem_cache_alloc_node(struct kmem_
{
void *b;
@@ -43069,7 +45264,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
+ struct slob_page *sp;
+
b = slob_new_pages(flags, get_order(c->size), node);
-+ sp = (struct slob_page *)virt_to_head_page(b);
++ sp = slob_page(b);
+ sp->size = c->size;
trace_kmem_cache_alloc_node(_RET_IP_, b, c->size,
PAGE_SIZE << get_order(c->size),
@@ -43079,14 +45274,14 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
if (c->ctor)
c->ctor(b);
-@@ -621,10 +714,16 @@ EXPORT_SYMBOL(kmem_cache_alloc_node);
+@@ -627,10 +720,16 @@ EXPORT_SYMBOL(kmem_cache_alloc_node);
static void __kmem_cache_free(void *b, int size)
{
- if (size < PAGE_SIZE)
-+ struct slob_page *sp = (struct slob_page *)virt_to_head_page(b);
++ struct slob_page *sp = slob_page(b);
+
-+ if (slob_page(sp))
++ if (is_slob_page(sp))
slob_free(b, size);
- else
+ else {
@@ -43098,7 +45293,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
}
static void kmem_rcu_free(struct rcu_head *head)
-@@ -637,14 +736,23 @@ static void kmem_rcu_free(struct rcu_hea
+@@ -643,15 +742,24 @@ static void kmem_rcu_free(struct rcu_hea
void kmem_cache_free(struct kmem_cache *c, void *b)
{
@@ -43111,6 +45306,7 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
+ }
+#endif
+
+ kmemleak_free_recursive(b, c->flags);
if (unlikely(c->flags & SLAB_DESTROY_BY_RCU)) {
struct slob_rcu *slob_rcu;
- slob_rcu = b + (c->size - sizeof(struct slob_rcu));
@@ -43125,10 +45321,10 @@ diff -urNp linux-2.6.30.8/mm/slob.c linux-2.6.30.8/mm/slob.c
}
trace_kmem_cache_free(_RET_IP_, b);
-diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
---- linux-2.6.30.8/mm/slub.c 2009-09-15 18:48:57.071415685 -0400
-+++ linux-2.6.30.8/mm/slub.c 2009-09-15 18:49:04.203239669 -0400
-@@ -1811,7 +1811,7 @@ static int slub_min_objects;
+diff -urNp linux-2.6.31.4/mm/slub.c linux-2.6.31.4/mm/slub.c
+--- linux-2.6.31.4/mm/slub.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/slub.c 2009-10-11 15:29:49.647370469 -0400
+@@ -1915,7 +1915,7 @@ static int slub_min_objects;
* Merge control. If this is set then no merging of slab caches will occur.
* (Could be removed. This was introduced to pacify the merge skeptics.)
*/
@@ -43137,7 +45333,7 @@ diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
/*
* Calculate the order of allocation given an slab object size.
-@@ -2354,7 +2354,7 @@ static int kmem_cache_open(struct kmem_c
+@@ -2458,7 +2458,7 @@ static int kmem_cache_open(struct kmem_c
* list to avoid pounding the page allocator excessively.
*/
set_min_partial(s, ilog2(s->size));
@@ -43146,7 +45342,7 @@ diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
#ifdef CONFIG_NUMA
s->remote_node_defrag_ratio = 1000;
#endif
-@@ -2491,8 +2491,7 @@ static inline int kmem_cache_close(struc
+@@ -2595,8 +2595,7 @@ static inline int kmem_cache_close(struc
void kmem_cache_destroy(struct kmem_cache *s)
{
down_write(&slub_lock);
@@ -43156,7 +45352,7 @@ diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
list_del(&s->list);
up_write(&slub_lock);
if (kmem_cache_close(s)) {
-@@ -2754,6 +2753,48 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -2875,6 +2874,48 @@ void *__kmalloc_node(size_t size, gfp_t
EXPORT_SYMBOL(__kmalloc_node);
#endif
@@ -43205,16 +45401,16 @@ diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
size_t ksize(const void *object)
{
struct page *page;
-@@ -3024,7 +3065,7 @@ void __init kmem_cache_init(void)
+@@ -3146,7 +3187,7 @@ void __init kmem_cache_init(void)
*/
create_kmalloc_cache(&kmalloc_caches[0], "kmem_cache_node",
- sizeof(struct kmem_cache_node), GFP_KERNEL);
+ sizeof(struct kmem_cache_node), GFP_NOWAIT);
- kmalloc_caches[0].refcount = -1;
+ atomic_set(&kmalloc_caches[0].refcount, -1);
caches++;
hotplug_memory_notifier(slab_memory_callback, SLAB_CALLBACK_PRI);
-@@ -3114,7 +3155,7 @@ static int slab_unmergeable(struct kmem_
+@@ -3240,7 +3281,7 @@ static int slab_unmergeable(struct kmem_
/*
* We may have set a slab to be unmergeable during bootstrap.
*/
@@ -43223,7 +45419,7 @@ diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
return 1;
return 0;
-@@ -3171,7 +3212,7 @@ struct kmem_cache *kmem_cache_create(con
+@@ -3297,7 +3338,7 @@ struct kmem_cache *kmem_cache_create(con
if (s) {
int cpu;
@@ -43232,7 +45428,7 @@ diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
/*
* Adjust the object sizes so that we clear
* the complete object on kzalloc.
-@@ -3190,7 +3231,7 @@ struct kmem_cache *kmem_cache_create(con
+@@ -3316,7 +3357,7 @@ struct kmem_cache *kmem_cache_create(con
if (sysfs_slab_alias(s, name)) {
down_write(&slub_lock);
@@ -43241,7 +45437,7 @@ diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
up_write(&slub_lock);
goto err;
}
-@@ -3938,7 +3979,7 @@ SLAB_ATTR_RO(ctor);
+@@ -4045,7 +4086,7 @@ SLAB_ATTR_RO(ctor);
static ssize_t aliases_show(struct kmem_cache *s, char *buf)
{
@@ -43250,7 +45446,7 @@ diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
}
SLAB_ATTR_RO(aliases);
-@@ -4617,7 +4658,9 @@ static const struct file_operations proc
+@@ -4726,7 +4767,9 @@ static const struct file_operations proc
static int __init slab_proc_init(void)
{
@@ -43260,10 +45456,10 @@ diff -urNp linux-2.6.30.8/mm/slub.c linux-2.6.30.8/mm/slub.c
return 0;
}
module_init(slab_proc_init);
-diff -urNp linux-2.6.30.8/mm/util.c linux-2.6.30.8/mm/util.c
---- linux-2.6.30.8/mm/util.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/util.c 2009-07-30 09:48:10.152770641 -0400
-@@ -218,6 +218,12 @@ EXPORT_SYMBOL(strndup_user);
+diff -urNp linux-2.6.31.4/mm/util.c linux-2.6.31.4/mm/util.c
+--- linux-2.6.31.4/mm/util.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/util.c 2009-10-11 15:29:49.653579667 -0400
+@@ -224,6 +224,12 @@ EXPORT_SYMBOL(strndup_user);
void arch_pick_mmap_layout(struct mm_struct *mm)
{
mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -43276,30 +45472,23 @@ diff -urNp linux-2.6.30.8/mm/util.c linux-2.6.30.8/mm/util.c
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
}
-diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
---- linux-2.6.30.8/mm/vmalloc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/mm/vmalloc.c 2009-07-30 09:48:10.153729053 -0400
-@@ -91,6 +91,11 @@ static int vmap_pte_range(pmd_t *pmd, un
+diff -urNp linux-2.6.31.4/mm/vmalloc.c linux-2.6.31.4/mm/vmalloc.c
+--- linux-2.6.31.4/mm/vmalloc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/mm/vmalloc.c 2009-10-12 23:13:00.624202177 -0400
+@@ -91,6 +91,7 @@ static int vmap_pte_range(pmd_t *pmd, un
unsigned long end, pgprot_t prot, struct page **pages, int *nr)
{
pte_t *pte;
+ int ret = -ENOMEM;
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ unsigned long cr0;
-+#endif
/*
* nr is a running index into the array which helps higher level
-@@ -100,17 +105,33 @@ static int vmap_pte_range(pmd_t *pmd, un
+@@ -100,17 +101,26 @@ static int vmap_pte_range(pmd_t *pmd, un
pte = pte_alloc_kernel(pmd, addr);
if (!pte)
return -ENOMEM;
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_open_kernel(cr0);
-+#endif
-+
++ pax_open_kernel();
do {
struct page *page = pages[*nr];
@@ -43321,16 +45510,12 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
- return 0;
+ ret = 0;
+out:
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+ pax_close_kernel(cr0);
-+#endif
-+
++ pax_close_kernel();
+ return ret;
}
static int vmap_pmd_range(pud_t *pud, unsigned long addr,
-@@ -1132,6 +1153,16 @@ static struct vm_struct *__get_vm_area_n
+@@ -1132,6 +1142,16 @@ static struct vm_struct *__get_vm_area_n
unsigned long align = 1;
BUG_ON(in_interrupt());
@@ -43339,15 +45524,15 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
+ if (flags & VM_KERNEXEC) {
+ if (start != VMALLOC_START || end != VMALLOC_END)
+ return NULL;
-+ start = (unsigned long)MODULES_VADDR;
-+ end = (unsigned long)MODULES_END;
++ start = (unsigned long)&MODULES_EXEC_VADDR;
++ end = (unsigned long)&MODULES_EXEC_END;
+ }
+#endif
+
if (flags & VM_IOREMAP) {
int bit = fls(size);
-@@ -1368,6 +1399,11 @@ void *vmap(struct page **pages, unsigned
+@@ -1371,6 +1391,11 @@ void *vmap(struct page **pages, unsigned
if (count > num_physpages)
return NULL;
@@ -43359,7 +45544,7 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
area = get_vm_area_caller((count << PAGE_SHIFT), flags,
__builtin_return_address(0));
if (!area)
-@@ -1464,6 +1500,13 @@ static void *__vmalloc_node(unsigned lon
+@@ -1478,6 +1503,13 @@ static void *__vmalloc_node(unsigned lon
if (!size || (size >> PAGE_SHIFT) > num_physpages)
return NULL;
@@ -43373,15 +45558,15 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
area = __get_vm_area_node(size, VM_ALLOC, VMALLOC_START, VMALLOC_END,
node, gfp_mask, caller);
-@@ -1473,6 +1516,7 @@ static void *__vmalloc_node(unsigned lon
- return __vmalloc_area_node(area, gfp_mask, prot, node, caller);
+@@ -1496,6 +1528,7 @@ static void *__vmalloc_node(unsigned lon
+ return addr;
}
+#undef __vmalloc
void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
{
return __vmalloc_node(size, gfp_mask, prot, -1,
-@@ -1489,6 +1533,7 @@ EXPORT_SYMBOL(__vmalloc);
+@@ -1512,6 +1545,7 @@ EXPORT_SYMBOL(__vmalloc);
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/
@@ -43389,7 +45574,7 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
void *vmalloc(unsigned long size)
{
return __vmalloc_node(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL,
-@@ -1503,6 +1548,7 @@ EXPORT_SYMBOL(vmalloc);
+@@ -1526,6 +1560,7 @@ EXPORT_SYMBOL(vmalloc);
* The resulting memory area is zeroed so it can be mapped to userspace
* without leaking data.
*/
@@ -43397,7 +45582,7 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
void *vmalloc_user(unsigned long size)
{
struct vm_struct *area;
-@@ -1529,6 +1575,7 @@ EXPORT_SYMBOL(vmalloc_user);
+@@ -1552,6 +1587,7 @@ EXPORT_SYMBOL(vmalloc_user);
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/
@@ -43405,7 +45590,7 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
void *vmalloc_node(unsigned long size, int node)
{
return __vmalloc_node(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL,
-@@ -1551,10 +1598,10 @@ EXPORT_SYMBOL(vmalloc_node);
+@@ -1574,10 +1610,10 @@ EXPORT_SYMBOL(vmalloc_node);
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/
@@ -43418,7 +45603,7 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
-1, __builtin_return_address(0));
}
-@@ -1573,6 +1620,7 @@ void *vmalloc_exec(unsigned long size)
+@@ -1596,6 +1632,7 @@ void *vmalloc_exec(unsigned long size)
* Allocate enough 32bit PA addressable pages to cover @size from the
* page level allocator and map them into contiguous kernel virtual space.
*/
@@ -43426,7 +45611,7 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
void *vmalloc_32(unsigned long size)
{
return __vmalloc_node(size, GFP_VMALLOC32, PAGE_KERNEL,
-@@ -1587,6 +1635,7 @@ EXPORT_SYMBOL(vmalloc_32);
+@@ -1610,6 +1647,7 @@ EXPORT_SYMBOL(vmalloc_32);
* The resulting memory area is 32bit addressable and zeroed so it can be
* mapped to userspace without leaking data.
*/
@@ -43434,9 +45619,9 @@ diff -urNp linux-2.6.30.8/mm/vmalloc.c linux-2.6.30.8/mm/vmalloc.c
void *vmalloc_32_user(unsigned long size)
{
struct vm_struct *area;
-diff -urNp linux-2.6.30.8/net/atm/atm_misc.c linux-2.6.30.8/net/atm/atm_misc.c
---- linux-2.6.30.8/net/atm/atm_misc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/atm/atm_misc.c 2009-07-30 09:48:10.153729053 -0400
+diff -urNp linux-2.6.31.4/net/atm/atm_misc.c linux-2.6.31.4/net/atm/atm_misc.c
+--- linux-2.6.31.4/net/atm/atm_misc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/atm/atm_misc.c 2009-10-11 15:29:49.681362371 -0400
@@ -19,7 +19,7 @@ int atm_charge(struct atm_vcc *vcc,int t
if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf)
return 1;
@@ -43455,6 +45640,15 @@ diff -urNp linux-2.6.30.8/net/atm/atm_misc.c linux-2.6.30.8/net/atm/atm_misc.c
return NULL;
}
+@@ -88,7 +88,7 @@ int atm_pcr_goal(const struct atm_trafpr
+
+ void sonet_copy_stats(struct k_sonet_stats *from,struct sonet_stats *to)
+ {
+-#define __HANDLE_ITEM(i) to->i = atomic_read(&from->i)
++#define __HANDLE_ITEM(i) to->i = atomic_read_unchecked(&from->i)
+ __SONET_ITEMS
+ #undef __HANDLE_ITEM
+ }
@@ -96,7 +96,7 @@ void sonet_copy_stats(struct k_sonet_sta
void sonet_subtract_stats(struct k_sonet_stats *from,struct sonet_stats *to)
@@ -43464,9 +45658,34 @@ diff -urNp linux-2.6.30.8/net/atm/atm_misc.c linux-2.6.30.8/net/atm/atm_misc.c
__SONET_ITEMS
#undef __HANDLE_ITEM
}
-diff -urNp linux-2.6.30.8/net/atm/resources.c linux-2.6.30.8/net/atm/resources.c
---- linux-2.6.30.8/net/atm/resources.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/atm/resources.c 2009-07-30 09:48:10.153729053 -0400
+diff -urNp linux-2.6.31.4/net/atm/proc.c linux-2.6.31.4/net/atm/proc.c
+--- linux-2.6.31.4/net/atm/proc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/atm/proc.c 2009-10-11 15:29:49.693625675 -0400
+@@ -43,9 +43,9 @@ static void add_stats(struct seq_file *s
+ const struct k_atm_aal_stats *stats)
+ {
+ seq_printf(seq, "%s ( %d %d %d %d %d )", aal,
+- atomic_read(&stats->tx),atomic_read(&stats->tx_err),
+- atomic_read(&stats->rx),atomic_read(&stats->rx_err),
+- atomic_read(&stats->rx_drop));
++ atomic_read_unchecked(&stats->tx),atomic_read_unchecked(&stats->tx_err),
++ atomic_read_unchecked(&stats->rx),atomic_read_unchecked(&stats->rx_err),
++ atomic_read_unchecked(&stats->rx_drop));
+ }
+
+ static void atm_dev_info(struct seq_file *seq, const struct atm_dev *dev)
+diff -urNp linux-2.6.31.4/net/atm/resources.c linux-2.6.31.4/net/atm/resources.c
+--- linux-2.6.31.4/net/atm/resources.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/atm/resources.c 2009-10-11 15:29:49.694611006 -0400
+@@ -161,7 +161,7 @@ void atm_dev_deregister(struct atm_dev *
+ static void copy_aal_stats(struct k_atm_aal_stats *from,
+ struct atm_aal_stats *to)
+ {
+-#define __HANDLE_ITEM(i) to->i = atomic_read(&from->i)
++#define __HANDLE_ITEM(i) to->i = atomic_read_unchecked(&from->i)
+ __AAL_STAT_ITEMS
+ #undef __HANDLE_ITEM
+ }
@@ -170,7 +170,7 @@ static void copy_aal_stats(struct k_atm_
static void subtract_aal_stats(struct k_atm_aal_stats *from,
struct atm_aal_stats *to)
@@ -43476,9 +45695,9 @@ diff -urNp linux-2.6.30.8/net/atm/resources.c linux-2.6.30.8/net/atm/resources.c
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
}
-diff -urNp linux-2.6.30.8/net/bridge/br_stp_if.c linux-2.6.30.8/net/bridge/br_stp_if.c
---- linux-2.6.30.8/net/bridge/br_stp_if.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/bridge/br_stp_if.c 2009-07-30 09:48:10.153729053 -0400
+diff -urNp linux-2.6.31.4/net/bridge/br_stp_if.c linux-2.6.31.4/net/bridge/br_stp_if.c
+--- linux-2.6.31.4/net/bridge/br_stp_if.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/bridge/br_stp_if.c 2009-10-11 15:29:49.706364227 -0400
@@ -146,7 +146,7 @@ static void br_stp_stop(struct net_bridg
char *envp[] = { NULL };
@@ -43488,9 +45707,9 @@ diff -urNp linux-2.6.30.8/net/bridge/br_stp_if.c linux-2.6.30.8/net/bridge/br_st
printk(KERN_INFO "%s: userspace STP stopped, return code %d\n",
br->dev->name, r);
-diff -urNp linux-2.6.30.8/net/core/flow.c linux-2.6.30.8/net/core/flow.c
---- linux-2.6.30.8/net/core/flow.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/core/flow.c 2009-07-30 09:48:10.154837046 -0400
+diff -urNp linux-2.6.31.4/net/core/flow.c linux-2.6.31.4/net/core/flow.c
+--- linux-2.6.31.4/net/core/flow.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/core/flow.c 2009-10-11 15:29:49.715599171 -0400
@@ -39,7 +39,7 @@ atomic_t flow_cache_genid = ATOMIC_INIT(
static u32 flow_hash_shift;
@@ -43518,9 +45737,9 @@ diff -urNp linux-2.6.30.8/net/core/flow.c linux-2.6.30.8/net/core/flow.c
#define flow_flush_tasklet(cpu) (&per_cpu(flow_flush_tasklets, cpu))
-diff -urNp linux-2.6.30.8/net/dccp/ccids/ccid3.c linux-2.6.30.8/net/dccp/ccids/ccid3.c
---- linux-2.6.30.8/net/dccp/ccids/ccid3.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/dccp/ccids/ccid3.c 2009-07-30 09:48:10.154837046 -0400
+diff -urNp linux-2.6.31.4/net/dccp/ccids/ccid3.c linux-2.6.31.4/net/dccp/ccids/ccid3.c
+--- linux-2.6.31.4/net/dccp/ccids/ccid3.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/dccp/ccids/ccid3.c 2009-10-11 15:29:49.721369398 -0400
@@ -43,7 +43,7 @@
static int ccid3_debug;
#define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a)
@@ -43530,9 +45749,9 @@ diff -urNp linux-2.6.30.8/net/dccp/ccids/ccid3.c linux-2.6.30.8/net/dccp/ccids/c
#endif
/*
-diff -urNp linux-2.6.30.8/net/dccp/dccp.h linux-2.6.30.8/net/dccp/dccp.h
---- linux-2.6.30.8/net/dccp/dccp.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/dccp/dccp.h 2009-07-30 09:48:10.154837046 -0400
+diff -urNp linux-2.6.31.4/net/dccp/dccp.h linux-2.6.31.4/net/dccp/dccp.h
+--- linux-2.6.31.4/net/dccp/dccp.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/dccp/dccp.h 2009-10-11 15:29:49.728786661 -0400
@@ -44,9 +44,9 @@ extern int dccp_debug;
#define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a)
#define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a)
@@ -43546,9 +45765,9 @@ diff -urNp linux-2.6.30.8/net/dccp/dccp.h linux-2.6.30.8/net/dccp/dccp.h
#endif
extern struct inet_hashinfo dccp_hashinfo;
-diff -urNp linux-2.6.30.8/net/ipv4/inet_hashtables.c linux-2.6.30.8/net/ipv4/inet_hashtables.c
---- linux-2.6.30.8/net/ipv4/inet_hashtables.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv4/inet_hashtables.c 2009-07-30 11:10:49.904544447 -0400
+diff -urNp linux-2.6.31.4/net/ipv4/inet_hashtables.c linux-2.6.31.4/net/ipv4/inet_hashtables.c
+--- linux-2.6.31.4/net/ipv4/inet_hashtables.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/ipv4/inet_hashtables.c 2009-10-11 15:29:49.742362588 -0400
@@ -18,11 +18,14 @@
#include <linux/sched.h>
#include <linux/slab.h>
@@ -43573,9 +45792,9 @@ diff -urNp linux-2.6.30.8/net/ipv4/inet_hashtables.c linux-2.6.30.8/net/ipv4/ine
if (tw) {
inet_twsk_deschedule(tw, death_row);
inet_twsk_put(tw);
-diff -urNp linux-2.6.30.8/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.30.8/net/ipv4/netfilter/nf_nat_snmp_basic.c
---- linux-2.6.30.8/net/ipv4/netfilter/nf_nat_snmp_basic.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv4/netfilter/nf_nat_snmp_basic.c 2009-07-30 09:48:10.155784268 -0400
+diff -urNp linux-2.6.31.4/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.31.4/net/ipv4/netfilter/nf_nat_snmp_basic.c
+--- linux-2.6.31.4/net/ipv4/netfilter/nf_nat_snmp_basic.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/ipv4/netfilter/nf_nat_snmp_basic.c 2009-10-11 15:29:49.754672404 -0400
@@ -397,7 +397,7 @@ static unsigned char asn1_octets_decode(
*len = 0;
@@ -43585,10 +45804,10 @@ diff -urNp linux-2.6.30.8/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.30.8/
if (*octets == NULL) {
if (net_ratelimit())
printk("OOM in bsalg (%d)\n", __LINE__);
-diff -urNp linux-2.6.30.8/net/ipv4/tcp_ipv4.c linux-2.6.30.8/net/ipv4/tcp_ipv4.c
---- linux-2.6.30.8/net/ipv4/tcp_ipv4.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv4/tcp_ipv4.c 2009-07-30 11:10:49.916766621 -0400
-@@ -1503,6 +1503,9 @@ int tcp_v4_do_rcv(struct sock *sk, struc
+diff -urNp linux-2.6.31.4/net/ipv4/tcp_ipv4.c linux-2.6.31.4/net/ipv4/tcp_ipv4.c
+--- linux-2.6.31.4/net/ipv4/tcp_ipv4.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/ipv4/tcp_ipv4.c 2009-10-11 15:29:49.781362821 -0400
+@@ -1504,6 +1504,9 @@ int tcp_v4_do_rcv(struct sock *sk, struc
return 0;
reset:
@@ -43598,7 +45817,7 @@ diff -urNp linux-2.6.30.8/net/ipv4/tcp_ipv4.c linux-2.6.30.8/net/ipv4/tcp_ipv4.c
tcp_v4_send_reset(rsk, skb);
discard:
kfree_skb(skb);
-@@ -1611,6 +1614,9 @@ no_tcp_socket:
+@@ -1612,6 +1615,9 @@ no_tcp_socket:
bad_packet:
TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
} else {
@@ -43608,10 +45827,10 @@ diff -urNp linux-2.6.30.8/net/ipv4/tcp_ipv4.c linux-2.6.30.8/net/ipv4/tcp_ipv4.c
tcp_v4_send_reset(NULL, skb);
}
-diff -urNp linux-2.6.30.8/net/ipv4/tcp_minisocks.c linux-2.6.30.8/net/ipv4/tcp_minisocks.c
---- linux-2.6.30.8/net/ipv4/tcp_minisocks.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv4/tcp_minisocks.c 2009-07-30 11:10:49.922670152 -0400
-@@ -694,8 +694,11 @@ listen_overflow:
+diff -urNp linux-2.6.31.4/net/ipv4/tcp_minisocks.c linux-2.6.31.4/net/ipv4/tcp_minisocks.c
+--- linux-2.6.31.4/net/ipv4/tcp_minisocks.c 2009-10-12 23:26:18.276226548 -0400
++++ linux-2.6.31.4/net/ipv4/tcp_minisocks.c 2009-10-12 23:26:38.983529432 -0400
+@@ -695,8 +695,11 @@ listen_overflow:
embryonic_reset:
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_EMBRYONICRSTS);
@@ -43623,9 +45842,9 @@ diff -urNp linux-2.6.30.8/net/ipv4/tcp_minisocks.c linux-2.6.30.8/net/ipv4/tcp_m
inet_csk_reqsk_queue_drop(sk, req, prev);
return NULL;
-diff -urNp linux-2.6.30.8/net/ipv4/udp.c linux-2.6.30.8/net/ipv4/udp.c
---- linux-2.6.30.8/net/ipv4/udp.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv4/udp.c 2009-07-30 11:10:49.923319110 -0400
+diff -urNp linux-2.6.31.4/net/ipv4/udp.c linux-2.6.31.4/net/ipv4/udp.c
+--- linux-2.6.31.4/net/ipv4/udp.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/ipv4/udp.c 2009-10-11 15:29:49.797526454 -0400
@@ -86,6 +86,7 @@
#include <linux/types.h>
#include <linux/fcntl.h>
@@ -43663,7 +45882,7 @@ diff -urNp linux-2.6.30.8/net/ipv4/udp.c linux-2.6.30.8/net/ipv4/udp.c
daddr = inet->daddr;
dport = inet->dport;
/* Open fast path for connected socket.
-@@ -902,6 +915,10 @@ try_again:
+@@ -903,6 +916,10 @@ try_again:
if (!skb)
goto out;
@@ -43674,7 +45893,7 @@ diff -urNp linux-2.6.30.8/net/ipv4/udp.c linux-2.6.30.8/net/ipv4/udp.c
ulen = skb->len - sizeof(struct udphdr);
copied = len;
if (copied > ulen)
-@@ -1292,6 +1309,9 @@ int __udp4_lib_rcv(struct sk_buff *skb,
+@@ -1293,6 +1310,9 @@ int __udp4_lib_rcv(struct sk_buff *skb,
goto csum_error;
UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
@@ -43684,9 +45903,9 @@ diff -urNp linux-2.6.30.8/net/ipv4/udp.c linux-2.6.30.8/net/ipv4/udp.c
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
/*
-diff -urNp linux-2.6.30.8/net/ipv6/exthdrs.c linux-2.6.30.8/net/ipv6/exthdrs.c
---- linux-2.6.30.8/net/ipv6/exthdrs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv6/exthdrs.c 2009-07-30 09:48:10.155784268 -0400
+diff -urNp linux-2.6.31.4/net/ipv6/exthdrs.c linux-2.6.31.4/net/ipv6/exthdrs.c
+--- linux-2.6.31.4/net/ipv6/exthdrs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/ipv6/exthdrs.c 2009-10-11 15:29:49.804368392 -0400
@@ -630,7 +630,7 @@ static struct tlvtype_proc tlvprochopopt
.type = IPV6_TLV_JUMBO,
.func = ipv6_hop_jumbo,
@@ -43696,9 +45915,9 @@ diff -urNp linux-2.6.30.8/net/ipv6/exthdrs.c linux-2.6.30.8/net/ipv6/exthdrs.c
};
int ipv6_parse_hopopts(struct sk_buff *skb)
-diff -urNp linux-2.6.30.8/net/ipv6/ip6mr.c linux-2.6.30.8/net/ipv6/ip6mr.c
---- linux-2.6.30.8/net/ipv6/ip6mr.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv6/ip6mr.c 2009-07-30 09:48:10.156679415 -0400
+diff -urNp linux-2.6.31.4/net/ipv6/ip6mr.c linux-2.6.31.4/net/ipv6/ip6mr.c
+--- linux-2.6.31.4/net/ipv6/ip6mr.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/ipv6/ip6mr.c 2009-10-11 15:29:49.807404369 -0400
@@ -204,7 +204,7 @@ static int ip6mr_vif_seq_show(struct seq
return 0;
}
@@ -43735,9 +45954,9 @@ diff -urNp linux-2.6.30.8/net/ipv6/ip6mr.c linux-2.6.30.8/net/ipv6/ip6mr.c
.owner = THIS_MODULE,
.open = ipmr_mfc_open,
.read = seq_read,
-diff -urNp linux-2.6.30.8/net/ipv6/raw.c linux-2.6.30.8/net/ipv6/raw.c
---- linux-2.6.30.8/net/ipv6/raw.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv6/raw.c 2009-07-30 09:48:10.156679415 -0400
+diff -urNp linux-2.6.31.4/net/ipv6/raw.c linux-2.6.31.4/net/ipv6/raw.c
+--- linux-2.6.31.4/net/ipv6/raw.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/ipv6/raw.c 2009-10-11 15:29:49.808386900 -0400
@@ -600,7 +600,7 @@ out:
return err;
}
@@ -43747,10 +45966,10 @@ diff -urNp linux-2.6.30.8/net/ipv6/raw.c linux-2.6.30.8/net/ipv6/raw.c
struct flowi *fl, struct rt6_info *rt,
unsigned int flags)
{
-diff -urNp linux-2.6.30.8/net/ipv6/tcp_ipv6.c linux-2.6.30.8/net/ipv6/tcp_ipv6.c
---- linux-2.6.30.8/net/ipv6/tcp_ipv6.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv6/tcp_ipv6.c 2009-07-30 11:10:49.952595469 -0400
-@@ -1575,6 +1575,9 @@ static int tcp_v6_do_rcv(struct sock *sk
+diff -urNp linux-2.6.31.4/net/ipv6/tcp_ipv6.c linux-2.6.31.4/net/ipv6/tcp_ipv6.c
+--- linux-2.6.31.4/net/ipv6/tcp_ipv6.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/ipv6/tcp_ipv6.c 2009-10-11 15:29:49.811375867 -0400
+@@ -1577,6 +1577,9 @@ static int tcp_v6_do_rcv(struct sock *sk
return 0;
reset:
@@ -43760,7 +45979,7 @@ diff -urNp linux-2.6.30.8/net/ipv6/tcp_ipv6.c linux-2.6.30.8/net/ipv6/tcp_ipv6.c
tcp_v6_send_reset(sk, skb);
discard:
if (opt_skb)
-@@ -1697,6 +1700,9 @@ no_tcp_socket:
+@@ -1699,6 +1702,9 @@ no_tcp_socket:
bad_packet:
TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
} else {
@@ -43770,10 +45989,10 @@ diff -urNp linux-2.6.30.8/net/ipv6/tcp_ipv6.c linux-2.6.30.8/net/ipv6/tcp_ipv6.c
tcp_v6_send_reset(NULL, skb);
}
-diff -urNp linux-2.6.30.8/net/ipv6/udp.c linux-2.6.30.8/net/ipv6/udp.c
---- linux-2.6.30.8/net/ipv6/udp.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/ipv6/udp.c 2009-07-30 11:10:49.959325956 -0400
-@@ -590,6 +590,9 @@ int __udp6_lib_rcv(struct sk_buff *skb,
+diff -urNp linux-2.6.31.4/net/ipv6/udp.c linux-2.6.31.4/net/ipv6/udp.c
+--- linux-2.6.31.4/net/ipv6/udp.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/ipv6/udp.c 2009-10-11 15:29:49.811375867 -0400
+@@ -589,6 +589,9 @@ int __udp6_lib_rcv(struct sk_buff *skb,
UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS,
proto == IPPROTO_UDPLITE);
@@ -43783,9 +46002,134 @@ diff -urNp linux-2.6.30.8/net/ipv6/udp.c linux-2.6.30.8/net/ipv6/udp.c
icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev);
kfree_skb(skb);
-diff -urNp linux-2.6.30.8/net/key/af_key.c linux-2.6.30.8/net/key/af_key.c
---- linux-2.6.30.8/net/key/af_key.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/key/af_key.c 2009-07-30 09:48:10.157841054 -0400
+diff -urNp linux-2.6.31.4/net/irda/ircomm/ircomm_tty.c linux-2.6.31.4/net/irda/ircomm/ircomm_tty.c
+--- linux-2.6.31.4/net/irda/ircomm/ircomm_tty.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/irda/ircomm/ircomm_tty.c 2009-10-11 15:29:49.816450122 -0400
+@@ -280,16 +280,16 @@ static int ircomm_tty_block_til_ready(st
+ add_wait_queue(&self->open_wait, &wait);
+
+ IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n",
+- __FILE__,__LINE__, tty->driver->name, self->open_count );
++ __FILE__,__LINE__, tty->driver->name, atomic_read(&self->open_count) );
+
+ /* As far as I can see, we protect open_count - Jean II */
+ spin_lock_irqsave(&self->spinlock, flags);
+ if (!tty_hung_up_p(filp)) {
+ extra_count = 1;
+- self->open_count--;
++ atomic_dec(&self->open_count);
+ }
+ spin_unlock_irqrestore(&self->spinlock, flags);
+- self->blocked_open++;
++ atomic_inc(&self->blocked_open);
+
+ while (1) {
+ if (tty->termios->c_cflag & CBAUD) {
+@@ -329,7 +329,7 @@ static int ircomm_tty_block_til_ready(st
+ }
+
+ IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n",
+- __FILE__,__LINE__, tty->driver->name, self->open_count );
++ __FILE__,__LINE__, tty->driver->name, atomic_read(&self->open_count) );
+
+ schedule();
+ }
+@@ -340,13 +340,13 @@ static int ircomm_tty_block_til_ready(st
+ if (extra_count) {
+ /* ++ is not atomic, so this should be protected - Jean II */
+ spin_lock_irqsave(&self->spinlock, flags);
+- self->open_count++;
++ atomic_inc(&self->open_count);
+ spin_unlock_irqrestore(&self->spinlock, flags);
+ }
+- self->blocked_open--;
++ atomic_dec(&self->blocked_open);
+
+ IRDA_DEBUG(1, "%s(%d):block_til_ready after blocking on %s open_count=%d\n",
+- __FILE__,__LINE__, tty->driver->name, self->open_count);
++ __FILE__,__LINE__, tty->driver->name, atomic_read(&self->open_count));
+
+ if (!retval)
+ self->flags |= ASYNC_NORMAL_ACTIVE;
+@@ -415,14 +415,14 @@ static int ircomm_tty_open(struct tty_st
+ }
+ /* ++ is not atomic, so this should be protected - Jean II */
+ spin_lock_irqsave(&self->spinlock, flags);
+- self->open_count++;
++ atomic_inc(&self->open_count);
+
+ tty->driver_data = self;
+ self->tty = tty;
+ spin_unlock_irqrestore(&self->spinlock, flags);
+
+ IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __func__ , tty->driver->name,
+- self->line, self->open_count);
++ self->line, atomic_read(&self->open_count));
+
+ /* Not really used by us, but lets do it anyway */
+ self->tty->low_latency = (self->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+@@ -511,7 +511,7 @@ static void ircomm_tty_close(struct tty_
+ return;
+ }
+
+- if ((tty->count == 1) && (self->open_count != 1)) {
++ if ((tty->count == 1) && (atomic_read(&self->open_count) != 1)) {
+ /*
+ * Uh, oh. tty->count is 1, which means that the tty
+ * structure will be freed. state->count should always
+@@ -521,16 +521,16 @@ static void ircomm_tty_close(struct tty_
+ */
+ IRDA_DEBUG(0, "%s(), bad serial port count; "
+ "tty->count is 1, state->count is %d\n", __func__ ,
+- self->open_count);
+- self->open_count = 1;
++ atomic_read(&self->open_count));
++ atomic_set(&self->open_count, 1);
+ }
+
+- if (--self->open_count < 0) {
++ if (atomic_dec_return(&self->open_count) < 0) {
+ IRDA_ERROR("%s(), bad serial port count for ttys%d: %d\n",
+- __func__, self->line, self->open_count);
+- self->open_count = 0;
++ __func__, self->line, atomic_read(&self->open_count));
++ atomic_set(&self->open_count, 0);
+ }
+- if (self->open_count) {
++ if (atomic_read(&self->open_count)) {
+ spin_unlock_irqrestore(&self->spinlock, flags);
+
+ IRDA_DEBUG(0, "%s(), open count > 0\n", __func__ );
+@@ -562,7 +562,7 @@ static void ircomm_tty_close(struct tty_
+ tty->closing = 0;
+ self->tty = NULL;
+
+- if (self->blocked_open) {
++ if (atomic_read(&self->blocked_open)) {
+ if (self->close_delay)
+ schedule_timeout_interruptible(self->close_delay);
+ wake_up_interruptible(&self->open_wait);
+@@ -1017,7 +1017,7 @@ static void ircomm_tty_hangup(struct tty
+ spin_lock_irqsave(&self->spinlock, flags);
+ self->flags &= ~ASYNC_NORMAL_ACTIVE;
+ self->tty = NULL;
+- self->open_count = 0;
++ atomic_set(&self->open_count, 0);
+ spin_unlock_irqrestore(&self->spinlock, flags);
+
+ wake_up_interruptible(&self->open_wait);
+@@ -1369,7 +1369,7 @@ static void ircomm_tty_line_info(struct
+ seq_putc(m, '\n');
+
+ seq_printf(m, "Role: %s\n", self->client ? "client" : "server");
+- seq_printf(m, "Open count: %d\n", self->open_count);
++ seq_printf(m, "Open count: %d\n", atomic_read(&self->open_count));
+ seq_printf(m, "Max data size: %d\n", self->max_data_size);
+ seq_printf(m, "Max header size: %d\n", self->max_header_size);
+
+diff -urNp linux-2.6.31.4/net/key/af_key.c linux-2.6.31.4/net/key/af_key.c
+--- linux-2.6.31.4/net/key/af_key.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/key/af_key.c 2009-10-11 15:29:49.832755760 -0400
@@ -3705,7 +3705,7 @@ static void pfkey_seq_stop(struct seq_fi
read_unlock(&pfkey_table_lock);
}
@@ -43804,10 +46148,10 @@ diff -urNp linux-2.6.30.8/net/key/af_key.c linux-2.6.30.8/net/key/af_key.c
.open = pfkey_seq_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.30.8/net/mac80211/ieee80211_i.h linux-2.6.30.8/net/mac80211/ieee80211_i.h
---- linux-2.6.30.8/net/mac80211/ieee80211_i.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/mac80211/ieee80211_i.h 2009-07-30 09:48:10.157841054 -0400
-@@ -599,7 +599,7 @@ struct ieee80211_local {
+diff -urNp linux-2.6.31.4/net/mac80211/ieee80211_i.h linux-2.6.31.4/net/mac80211/ieee80211_i.h
+--- linux-2.6.31.4/net/mac80211/ieee80211_i.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/mac80211/ieee80211_i.h 2009-10-11 15:29:49.995365046 -0400
+@@ -609,7 +609,7 @@ struct ieee80211_local {
spinlock_t queue_stop_reason_lock;
struct net_device *mdev; /* wmaster# - "master" 802.11 device */
@@ -43816,28 +46160,28 @@ diff -urNp linux-2.6.30.8/net/mac80211/ieee80211_i.h linux-2.6.30.8/net/mac80211
int monitors, cooked_mntrs;
/* number of interfaces with corresponding FIF_ flags */
int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss;
-diff -urNp linux-2.6.30.8/net/mac80211/iface.c linux-2.6.30.8/net/mac80211/iface.c
---- linux-2.6.30.8/net/mac80211/iface.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/mac80211/iface.c 2009-07-30 09:48:10.157841054 -0400
-@@ -163,7 +163,7 @@ static int ieee80211_open(struct net_dev
+diff -urNp linux-2.6.31.4/net/mac80211/iface.c linux-2.6.31.4/net/mac80211/iface.c
+--- linux-2.6.31.4/net/mac80211/iface.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/mac80211/iface.c 2009-10-11 15:29:49.998543934 -0400
+@@ -164,7 +164,7 @@ static int ieee80211_open(struct net_dev
break;
}
- if (local->open_count == 0) {
+ if (atomic_read(&local->open_count) == 0) {
- res = 0;
- if (local->ops->start)
- res = local->ops->start(local_to_hw(local));
-@@ -199,7 +199,7 @@ static int ieee80211_open(struct net_dev
+ res = drv_start(local);
+ if (res)
+ goto err_del_bss;
+@@ -198,7 +198,7 @@ static int ieee80211_open(struct net_dev
* Validate the MAC address for this device.
*/
if (!is_valid_ether_addr(dev->dev_addr)) {
-- if (!local->open_count && local->ops->stop)
-+ if (!atomic_read(&local->open_count) && local->ops->stop)
- local->ops->stop(local_to_hw(local));
+- if (!local->open_count)
++ if (!atomic_read(&local->open_count))
+ drv_stop(local);
return -EADDRNOTAVAIL;
}
-@@ -286,7 +286,7 @@ static int ieee80211_open(struct net_dev
+@@ -281,7 +281,7 @@ static int ieee80211_open(struct net_dev
}
}
@@ -43846,25 +46190,25 @@ diff -urNp linux-2.6.30.8/net/mac80211/iface.c linux-2.6.30.8/net/mac80211/iface
res = dev_open(local->mdev);
WARN_ON(res);
if (res)
-@@ -306,7 +306,7 @@ static int ieee80211_open(struct net_dev
- if (sdata->flags & IEEE80211_SDATA_PROMISC)
- atomic_inc(&local->iff_promiscs);
+@@ -303,7 +303,7 @@ static int ieee80211_open(struct net_dev
+
+ hw_reconf_flags |= __ieee80211_recalc_idle(local);
- local->open_count++;
+ atomic_inc(&local->open_count);
if (hw_reconf_flags) {
ieee80211_hw_config(local, hw_reconf_flags);
/*
-@@ -334,7 +334,7 @@ static int ieee80211_open(struct net_dev
+@@ -331,7 +331,7 @@ static int ieee80211_open(struct net_dev
err_del_interface:
- local->ops->remove_interface(local_to_hw(local), &conf);
+ drv_remove_interface(local, &conf);
err_stop:
-- if (!local->open_count && local->ops->stop)
-+ if (!atomic_read(&local->open_count) && local->ops->stop)
- local->ops->stop(local_to_hw(local));
+- if (!local->open_count)
++ if (!atomic_read(&local->open_count))
+ drv_stop(local);
err_del_bss:
sdata->bss = NULL;
-@@ -432,7 +432,7 @@ static int ieee80211_stop(struct net_dev
+@@ -429,7 +429,7 @@ static int ieee80211_stop(struct net_dev
WARN_ON(!list_empty(&sdata->u.ap.vlans));
}
@@ -43875,49 +46219,40 @@ diff -urNp linux-2.6.30.8/net/mac80211/iface.c linux-2.6.30.8/net/mac80211/iface
case NL80211_IFTYPE_AP_VLAN:
@@ -554,7 +554,7 @@ static int ieee80211_stop(struct net_dev
- sdata->bss = NULL;
+ ieee80211_recalc_ps(local, -1);
- if (local->open_count == 0) {
+ if (atomic_read(&local->open_count) == 0) {
if (netif_running(local->mdev))
dev_close(local->mdev);
-diff -urNp linux-2.6.30.8/net/mac80211/main.c linux-2.6.30.8/net/mac80211/main.c
---- linux-2.6.30.8/net/mac80211/main.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/mac80211/main.c 2009-07-30 09:48:10.158959820 -0400
-@@ -266,7 +266,7 @@ int ieee80211_hw_config(struct ieee80211
+diff -urNp linux-2.6.31.4/net/mac80211/main.c linux-2.6.31.4/net/mac80211/main.c
+--- linux-2.6.31.4/net/mac80211/main.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/mac80211/main.c 2009-10-11 15:29:49.999554879 -0400
+@@ -193,7 +193,7 @@ int ieee80211_hw_config(struct ieee80211
local->hw.conf.power_level = power;
}
- if (changed && local->open_count) {
+ if (changed && atomic_read(&local->open_count)) {
- ret = local->ops->config(local_to_hw(local), changed);
+ ret = drv_config(local, changed);
/*
* Goal:
-diff -urNp linux-2.6.30.8/net/mac80211/pm.c linux-2.6.30.8/net/mac80211/pm.c
---- linux-2.6.30.8/net/mac80211/pm.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/mac80211/pm.c 2009-07-30 09:48:10.158959820 -0400
-@@ -65,7 +65,7 @@ int __ieee80211_suspend(struct ieee80211
- flush_workqueue(local->hw.workqueue);
+diff -urNp linux-2.6.31.4/net/mac80211/pm.c linux-2.6.31.4/net/mac80211/pm.c
+--- linux-2.6.31.4/net/mac80211/pm.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/mac80211/pm.c 2009-10-11 15:29:50.010421891 -0400
+@@ -103,7 +103,7 @@ int __ieee80211_suspend(struct ieee80211
+ }
- /* stop hardware */
+ /* stop hardware - this must stop RX */
- if (local->open_count) {
+ if (atomic_read(&local->open_count)) {
ieee80211_led_radio(local, false);
- local->ops->stop(hw);
+ drv_stop(local);
}
-@@ -82,7 +82,7 @@ int __ieee80211_resume(struct ieee80211_
- int res;
-
- /* restart hardware */
-- if (local->open_count) {
-+ if (atomic_read(&local->open_count)) {
- res = local->ops->start(hw);
-
- ieee80211_led_radio(local, hw->conf.radio_enabled);
-diff -urNp linux-2.6.30.8/net/mac80211/rate.c linux-2.6.30.8/net/mac80211/rate.c
---- linux-2.6.30.8/net/mac80211/rate.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/mac80211/rate.c 2009-07-30 09:48:10.158959820 -0400
+diff -urNp linux-2.6.31.4/net/mac80211/rate.c linux-2.6.31.4/net/mac80211/rate.c
+--- linux-2.6.31.4/net/mac80211/rate.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/mac80211/rate.c 2009-10-11 15:29:50.010421891 -0400
@@ -258,7 +258,7 @@ int ieee80211_init_rate_ctrl_alg(struct
struct rate_control_ref *ref, *old;
@@ -43927,9 +46262,9 @@ diff -urNp linux-2.6.30.8/net/mac80211/rate.c linux-2.6.30.8/net/mac80211/rate.c
return -EBUSY;
ref = rate_control_alloc(name, local);
-diff -urNp linux-2.6.30.8/net/mac80211/rc80211_minstrel_debugfs.c linux-2.6.30.8/net/mac80211/rc80211_minstrel_debugfs.c
---- linux-2.6.30.8/net/mac80211/rc80211_minstrel_debugfs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/mac80211/rc80211_minstrel_debugfs.c 2009-07-30 09:48:10.158959820 -0400
+diff -urNp linux-2.6.31.4/net/mac80211/rc80211_minstrel_debugfs.c linux-2.6.31.4/net/mac80211/rc80211_minstrel_debugfs.c
+--- linux-2.6.31.4/net/mac80211/rc80211_minstrel_debugfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/mac80211/rc80211_minstrel_debugfs.c 2009-10-11 15:29:50.202379108 -0400
@@ -139,7 +139,7 @@ minstrel_stats_release(struct inode *ino
return 0;
}
@@ -43939,9 +46274,9 @@ diff -urNp linux-2.6.30.8/net/mac80211/rc80211_minstrel_debugfs.c linux-2.6.30.8
.owner = THIS_MODULE,
.open = minstrel_stats_open,
.read = minstrel_stats_read,
-diff -urNp linux-2.6.30.8/net/mac80211/rc80211_pid_debugfs.c linux-2.6.30.8/net/mac80211/rc80211_pid_debugfs.c
---- linux-2.6.30.8/net/mac80211/rc80211_pid_debugfs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/mac80211/rc80211_pid_debugfs.c 2009-07-30 09:48:10.158959820 -0400
+diff -urNp linux-2.6.31.4/net/mac80211/rc80211_pid_debugfs.c linux-2.6.31.4/net/mac80211/rc80211_pid_debugfs.c
+--- linux-2.6.31.4/net/mac80211/rc80211_pid_debugfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/mac80211/rc80211_pid_debugfs.c 2009-10-11 15:29:50.203405749 -0400
@@ -198,7 +198,7 @@ static ssize_t rate_control_pid_events_r
#undef RC_PID_PRINT_BUF_SIZE
@@ -43951,10 +46286,22 @@ diff -urNp linux-2.6.30.8/net/mac80211/rc80211_pid_debugfs.c linux-2.6.30.8/net/
.owner = THIS_MODULE,
.read = rate_control_pid_events_read,
.poll = rate_control_pid_events_poll,
-diff -urNp linux-2.6.30.8/net/packet/af_packet.c linux-2.6.30.8/net/packet/af_packet.c
---- linux-2.6.30.8/net/packet/af_packet.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/packet/af_packet.c 2009-07-30 09:48:10.160018712 -0400
-@@ -1740,7 +1740,7 @@ static void packet_mm_close(struct vm_ar
+diff -urNp linux-2.6.31.4/net/mac80211/util.c linux-2.6.31.4/net/mac80211/util.c
+--- linux-2.6.31.4/net/mac80211/util.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/mac80211/util.c 2009-10-11 15:29:50.204376135 -0400
+@@ -991,7 +991,7 @@ int ieee80211_reconfig(struct ieee80211_
+ local->suspended = false;
+
+ /* restart hardware */
+- if (local->open_count) {
++ if (atomic_read(&local->open_count)) {
+ res = drv_start(local);
+
+ ieee80211_led_radio(local, true);
+diff -urNp linux-2.6.31.4/net/packet/af_packet.c linux-2.6.31.4/net/packet/af_packet.c
+--- linux-2.6.31.4/net/packet/af_packet.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/packet/af_packet.c 2009-10-11 15:29:50.208404960 -0400
+@@ -2086,7 +2086,7 @@ static void packet_mm_close(struct vm_ar
atomic_dec(&pkt_sk(sk)->mapped);
}
@@ -43963,10 +46310,10 @@ diff -urNp linux-2.6.30.8/net/packet/af_packet.c linux-2.6.30.8/net/packet/af_pa
.open = packet_mm_open,
.close =packet_mm_close,
};
-diff -urNp linux-2.6.30.8/net/sctp/socket.c linux-2.6.30.8/net/sctp/socket.c
---- linux-2.6.30.8/net/sctp/socket.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/sctp/socket.c 2009-07-30 09:48:10.161030758 -0400
-@@ -1434,7 +1434,7 @@ SCTP_STATIC int sctp_sendmsg(struct kioc
+diff -urNp linux-2.6.31.4/net/sctp/socket.c linux-2.6.31.4/net/sctp/socket.c
+--- linux-2.6.31.4/net/sctp/socket.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/sctp/socket.c 2009-10-11 15:29:50.242359580 -0400
+@@ -1471,7 +1471,7 @@ SCTP_STATIC int sctp_sendmsg(struct kioc
struct sctp_sndrcvinfo *sinfo;
struct sctp_initmsg *sinit;
sctp_assoc_t associd = 0;
@@ -43975,7 +46322,7 @@ diff -urNp linux-2.6.30.8/net/sctp/socket.c linux-2.6.30.8/net/sctp/socket.c
int err;
sctp_scope_t scope;
long timeo;
-@@ -5750,7 +5750,6 @@ pp_found:
+@@ -5790,7 +5790,6 @@ pp_found:
*/
int reuse = sk->sk_reuse;
struct sock *sk2;
@@ -43983,9 +46330,9 @@ diff -urNp linux-2.6.30.8/net/sctp/socket.c linux-2.6.30.8/net/sctp/socket.c
SCTP_DEBUG_PRINTK("sctp_get_port() found a possible match\n");
if (pp->fastreuse && sk->sk_reuse &&
-diff -urNp linux-2.6.30.8/net/socket.c linux-2.6.30.8/net/socket.c
---- linux-2.6.30.8/net/socket.c 2009-08-24 20:46:57.364625202 -0400
-+++ linux-2.6.30.8/net/socket.c 2009-08-13 20:40:32.961482335 -0400
+diff -urNp linux-2.6.31.4/net/socket.c linux-2.6.31.4/net/socket.c
+--- linux-2.6.31.4/net/socket.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/socket.c 2009-10-11 15:29:50.266400000 -0400
@@ -86,6 +86,7 @@
#include <linux/audit.h>
#include <linux/wireless.h>
@@ -44149,9 +46496,9 @@ diff -urNp linux-2.6.30.8/net/socket.c linux-2.6.30.8/net/socket.c
err =
security_socket_connect(sock, (struct sockaddr *)&address, addrlen);
if (err)
-diff -urNp linux-2.6.30.8/net/sunrpc/rpc_pipe.c linux-2.6.30.8/net/sunrpc/rpc_pipe.c
---- linux-2.6.30.8/net/sunrpc/rpc_pipe.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/sunrpc/rpc_pipe.c 2009-07-30 12:07:21.048974939 -0400
+diff -urNp linux-2.6.31.4/net/sunrpc/rpc_pipe.c linux-2.6.31.4/net/sunrpc/rpc_pipe.c
+--- linux-2.6.31.4/net/sunrpc/rpc_pipe.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/sunrpc/rpc_pipe.c 2009-10-11 15:29:50.275728603 -0400
@@ -858,7 +858,7 @@ EXPORT_SYMBOL_GPL(rpc_unlink);
/*
* populate the filesystem
@@ -44161,9 +46508,9 @@ diff -urNp linux-2.6.30.8/net/sunrpc/rpc_pipe.c linux-2.6.30.8/net/sunrpc/rpc_pi
.alloc_inode = rpc_alloc_inode,
.destroy_inode = rpc_destroy_inode,
.statfs = simple_statfs,
-diff -urNp linux-2.6.30.8/net/unix/af_unix.c linux-2.6.30.8/net/unix/af_unix.c
---- linux-2.6.30.8/net/unix/af_unix.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/unix/af_unix.c 2009-07-30 11:10:49.995552784 -0400
+diff -urNp linux-2.6.31.4/net/unix/af_unix.c linux-2.6.31.4/net/unix/af_unix.c
+--- linux-2.6.31.4/net/unix/af_unix.c 2009-10-12 23:26:18.321029026 -0400
++++ linux-2.6.31.4/net/unix/af_unix.c 2009-10-12 23:26:38.984513863 -0400
@@ -734,6 +734,12 @@ static struct sock *unix_find_other(stru
err = -ECONNREFUSED;
if (!S_ISSOCK(inode->i_mode))
@@ -44221,9 +46568,9 @@ diff -urNp linux-2.6.30.8/net/unix/af_unix.c linux-2.6.30.8/net/unix/af_unix.c
list = &unix_socket_table[addr->hash];
} else {
list = &unix_socket_table[dentry->d_inode->i_ino & (UNIX_HASH_SIZE-1)];
-diff -urNp linux-2.6.30.8/net/xfrm/xfrm_proc.c linux-2.6.30.8/net/xfrm/xfrm_proc.c
---- linux-2.6.30.8/net/xfrm/xfrm_proc.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/net/xfrm/xfrm_proc.c 2009-07-30 09:48:10.161962049 -0400
+diff -urNp linux-2.6.31.4/net/xfrm/xfrm_proc.c linux-2.6.31.4/net/xfrm/xfrm_proc.c
+--- linux-2.6.31.4/net/xfrm/xfrm_proc.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/net/xfrm/xfrm_proc.c 2009-10-11 15:29:50.290424347 -0400
@@ -60,7 +60,7 @@ static int xfrm_statistics_seq_open(stru
return single_open_net(inode, file, xfrm_statistics_seq_show);
}
@@ -44233,9 +46580,9 @@ diff -urNp linux-2.6.30.8/net/xfrm/xfrm_proc.c linux-2.6.30.8/net/xfrm/xfrm_proc
.owner = THIS_MODULE,
.open = xfrm_statistics_seq_open,
.read = seq_read,
-diff -urNp linux-2.6.30.8/samples/markers/marker-example.c linux-2.6.30.8/samples/markers/marker-example.c
---- linux-2.6.30.8/samples/markers/marker-example.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/samples/markers/marker-example.c 2009-07-30 09:48:10.161962049 -0400
+diff -urNp linux-2.6.31.4/samples/markers/marker-example.c linux-2.6.31.4/samples/markers/marker-example.c
+--- linux-2.6.31.4/samples/markers/marker-example.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/samples/markers/marker-example.c 2009-10-11 15:29:50.317572591 -0400
@@ -26,7 +26,7 @@ static int my_open(struct inode *inode,
return -EPERM;
}
@@ -44245,9 +46592,9 @@ diff -urNp linux-2.6.30.8/samples/markers/marker-example.c linux-2.6.30.8/sample
.open = my_open,
};
-diff -urNp linux-2.6.30.8/samples/tracepoints/tracepoint-sample.c linux-2.6.30.8/samples/tracepoints/tracepoint-sample.c
---- linux-2.6.30.8/samples/tracepoints/tracepoint-sample.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/samples/tracepoints/tracepoint-sample.c 2009-07-30 09:48:10.161962049 -0400
+diff -urNp linux-2.6.31.4/samples/tracepoints/tracepoint-sample.c linux-2.6.31.4/samples/tracepoints/tracepoint-sample.c
+--- linux-2.6.31.4/samples/tracepoints/tracepoint-sample.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/samples/tracepoints/tracepoint-sample.c 2009-10-11 15:29:50.318633778 -0400
@@ -28,7 +28,7 @@ static int my_open(struct inode *inode,
return -EPERM;
}
@@ -44257,9 +46604,9 @@ diff -urNp linux-2.6.30.8/samples/tracepoints/tracepoint-sample.c linux-2.6.30.8
.open = my_open,
};
-diff -urNp linux-2.6.30.8/scripts/basic/fixdep.c linux-2.6.30.8/scripts/basic/fixdep.c
---- linux-2.6.30.8/scripts/basic/fixdep.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/scripts/basic/fixdep.c 2009-08-24 21:08:46.327782400 -0400
+diff -urNp linux-2.6.31.4/scripts/basic/fixdep.c linux-2.6.31.4/scripts/basic/fixdep.c
+--- linux-2.6.31.4/scripts/basic/fixdep.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/basic/fixdep.c 2009-10-11 15:29:50.322528140 -0400
@@ -224,9 +224,9 @@ void use_config(char *m, int slen)
void parse_config_file(char *map, size_t len)
@@ -44272,18 +46619,72 @@ diff -urNp linux-2.6.30.8/scripts/basic/fixdep.c linux-2.6.30.8/scripts/basic/fi
char *p, *q;
for (; m < end; m++) {
-@@ -374,7 +374,7 @@ void traps(void)
+@@ -373,7 +373,7 @@ void print_deps(void)
+ void traps(void)
{
static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
+- int *p = (int *)test;
++ unsigned int *p = (unsigned int *)test;
-- if (*(int *)test != INT_CONF) {
-+ if (*(unsigned int *)test != INT_CONF) {
+ if (*p != INT_CONF) {
fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
- *(int *)test);
- exit(2);
-diff -urNp linux-2.6.30.8/scripts/mod/file2alias.c linux-2.6.30.8/scripts/mod/file2alias.c
---- linux-2.6.30.8/scripts/mod/file2alias.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/scripts/mod/file2alias.c 2009-08-24 21:08:46.327782400 -0400
+diff -urNp linux-2.6.31.4/scripts/kallsyms.c linux-2.6.31.4/scripts/kallsyms.c
+--- linux-2.6.31.4/scripts/kallsyms.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/kallsyms.c 2009-10-11 15:29:50.351373957 -0400
+@@ -43,10 +43,10 @@ struct text_range {
+
+ static unsigned long long _text;
+ static struct text_range text_ranges[] = {
+- { "_stext", "_etext" },
+- { "_sinittext", "_einittext" },
+- { "_stext_l1", "_etext_l1" }, /* Blackfin on-chip L1 inst SRAM */
+- { "_stext_l2", "_etext_l2" }, /* Blackfin on-chip L2 SRAM */
++ { "_stext", "_etext", 0, 0 },
++ { "_sinittext", "_einittext", 0, 0 },
++ { "_stext_l1", "_etext_l1", 0, 0 }, /* Blackfin on-chip L1 inst SRAM */
++ { "_stext_l2", "_etext_l2", 0, 0 }, /* Blackfin on-chip L2 SRAM */
+ };
+ #define text_range_text (&text_ranges[0])
+ #define text_range_inittext (&text_ranges[1])
+diff -urNp linux-2.6.31.4/scripts/kconfig/lkc.h linux-2.6.31.4/scripts/kconfig/lkc.h
+--- linux-2.6.31.4/scripts/kconfig/lkc.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/kconfig/lkc.h 2009-10-11 15:29:50.352381683 -0400
+@@ -97,7 +97,7 @@ void menu_add_expr(enum prop_type type,
+ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
+ void menu_add_option(int token, char *arg);
+ void menu_finalize(struct menu *parent);
+-void menu_set_type(int type);
++void menu_set_type(unsigned int type);
+
+ /* util.c */
+ struct file *file_lookup(const char *name);
+diff -urNp linux-2.6.31.4/scripts/kconfig/mconf.c linux-2.6.31.4/scripts/kconfig/mconf.c
+--- linux-2.6.31.4/scripts/kconfig/mconf.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/kconfig/mconf.c 2009-10-11 15:29:50.369364284 -0400
+@@ -361,7 +361,7 @@ static char filename[PATH_MAX+1];
+ static void set_config_filename(const char *config_filename)
+ {
+ static char menu_backtitle[PATH_MAX+128];
+- int size;
++ unsigned int size;
+ struct symbol *sym;
+
+ sym = sym_lookup("KERNELVERSION", 0);
+diff -urNp linux-2.6.31.4/scripts/kconfig/menu.c linux-2.6.31.4/scripts/kconfig/menu.c
+--- linux-2.6.31.4/scripts/kconfig/menu.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/kconfig/menu.c 2009-10-11 15:29:50.370363562 -0400
+@@ -104,7 +104,7 @@ void menu_add_dep(struct expr *dep)
+ current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep));
+ }
+
+-void menu_set_type(int type)
++void menu_set_type(unsigned int type)
+ {
+ struct symbol *sym = current_entry->sym;
+
+diff -urNp linux-2.6.31.4/scripts/mod/file2alias.c linux-2.6.31.4/scripts/mod/file2alias.c
+--- linux-2.6.31.4/scripts/mod/file2alias.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/mod/file2alias.c 2009-10-11 15:29:50.382598456 -0400
@@ -72,7 +72,7 @@ static void device_id_check(const char *
unsigned long size, unsigned long id_size,
void *symval)
@@ -44338,10 +46739,10 @@ diff -urNp linux-2.6.30.8/scripts/mod/file2alias.c linux-2.6.30.8/scripts/mod/fi
sprintf(alias, "dmi*");
-diff -urNp linux-2.6.30.8/scripts/mod/modpost.c linux-2.6.30.8/scripts/mod/modpost.c
---- linux-2.6.30.8/scripts/mod/modpost.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/scripts/mod/modpost.c 2009-09-05 22:09:36.295627872 -0400
-@@ -831,6 +831,7 @@ enum mismatch {
+diff -urNp linux-2.6.31.4/scripts/mod/modpost.c linux-2.6.31.4/scripts/mod/modpost.c
+--- linux-2.6.31.4/scripts/mod/modpost.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/mod/modpost.c 2009-10-11 15:29:50.400495594 -0400
+@@ -835,6 +835,7 @@ enum mismatch {
INIT_TO_EXIT,
EXIT_TO_INIT,
EXPORT_TO_INIT_EXIT,
@@ -44349,7 +46750,7 @@ diff -urNp linux-2.6.30.8/scripts/mod/modpost.c linux-2.6.30.8/scripts/mod/modpo
};
struct sectioncheck {
-@@ -892,6 +893,12 @@ const struct sectioncheck sectioncheck[]
+@@ -920,6 +921,12 @@ const struct sectioncheck sectioncheck[]
.fromsec = { "__ksymtab*", NULL },
.tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
.mismatch = EXPORT_TO_INIT_EXIT
@@ -44362,7 +46763,7 @@ diff -urNp linux-2.6.30.8/scripts/mod/modpost.c linux-2.6.30.8/scripts/mod/modpo
}
};
-@@ -996,10 +1003,10 @@ static Elf_Sym *find_elf_symbol(struct e
+@@ -1024,10 +1031,10 @@ static Elf_Sym *find_elf_symbol(struct e
continue;
if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
continue;
@@ -44375,7 +46776,7 @@ diff -urNp linux-2.6.30.8/scripts/mod/modpost.c linux-2.6.30.8/scripts/mod/modpo
if (d < 0)
d = addr - sym->st_value;
if (d < distance) {
-@@ -1240,6 +1247,14 @@ static void report_sec_mismatch(const ch
+@@ -1268,6 +1275,14 @@ static void report_sec_mismatch(const ch
"Fix this by removing the %sannotation of %s "
"or drop the export.\n",
tosym, sec2annotation(tosec), sec2annotation(tosec), tosym);
@@ -44390,7 +46791,7 @@ diff -urNp linux-2.6.30.8/scripts/mod/modpost.c linux-2.6.30.8/scripts/mod/modpo
case NO_MISMATCH:
/* To get warnings on missing members */
break;
-@@ -1623,7 +1638,7 @@ void __attribute__((format(printf, 2, 3)
+@@ -1651,7 +1666,7 @@ void __attribute__((format(printf, 2, 3)
va_end(ap);
}
@@ -44399,7 +46800,7 @@ diff -urNp linux-2.6.30.8/scripts/mod/modpost.c linux-2.6.30.8/scripts/mod/modpo
{
if (buf->size - buf->pos < len) {
buf->size += len + SZ;
-@@ -1835,7 +1850,7 @@ static void write_if_changed(struct buff
+@@ -1863,7 +1878,7 @@ static void write_if_changed(struct buff
if (fstat(fileno(file), &st) < 0)
goto close_write;
@@ -44408,9 +46809,9 @@ diff -urNp linux-2.6.30.8/scripts/mod/modpost.c linux-2.6.30.8/scripts/mod/modpo
goto close_write;
tmp = NOFAIL(malloc(b->pos));
-diff -urNp linux-2.6.30.8/scripts/mod/modpost.h linux-2.6.30.8/scripts/mod/modpost.h
---- linux-2.6.30.8/scripts/mod/modpost.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/scripts/mod/modpost.h 2009-08-24 21:08:46.328573906 -0400
+diff -urNp linux-2.6.31.4/scripts/mod/modpost.h linux-2.6.31.4/scripts/mod/modpost.h
+--- linux-2.6.31.4/scripts/mod/modpost.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/mod/modpost.h 2009-10-11 15:29:50.410430555 -0400
@@ -92,15 +92,15 @@ void *do_nofail(void *ptr, const char *e
struct buffer {
@@ -44430,9 +46831,9 @@ diff -urNp linux-2.6.30.8/scripts/mod/modpost.h linux-2.6.30.8/scripts/mod/modpo
struct module {
struct module *next;
-diff -urNp linux-2.6.30.8/scripts/mod/sumversion.c linux-2.6.30.8/scripts/mod/sumversion.c
---- linux-2.6.30.8/scripts/mod/sumversion.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/scripts/mod/sumversion.c 2009-08-24 21:08:46.328573906 -0400
+diff -urNp linux-2.6.31.4/scripts/mod/sumversion.c linux-2.6.31.4/scripts/mod/sumversion.c
+--- linux-2.6.31.4/scripts/mod/sumversion.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/mod/sumversion.c 2009-10-11 15:29:50.411393009 -0400
@@ -457,7 +457,7 @@ static void write_version(const char *fi
goto out;
}
@@ -44442,9 +46843,9 @@ diff -urNp linux-2.6.30.8/scripts/mod/sumversion.c linux-2.6.30.8/scripts/mod/su
warn("writing sum in %s failed: %s\n",
filename, strerror(errno));
goto out;
-diff -urNp linux-2.6.30.8/scripts/pnmtologo.c linux-2.6.30.8/scripts/pnmtologo.c
---- linux-2.6.30.8/scripts/pnmtologo.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/scripts/pnmtologo.c 2009-07-30 09:48:10.162851614 -0400
+diff -urNp linux-2.6.31.4/scripts/pnmtologo.c linux-2.6.31.4/scripts/pnmtologo.c
+--- linux-2.6.31.4/scripts/pnmtologo.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/scripts/pnmtologo.c 2009-10-11 15:29:50.421425530 -0400
@@ -237,14 +237,14 @@ static void write_header(void)
fprintf(out, " * Linux logo %s\n", logoname);
fputs(" */\n\n", out);
@@ -44457,11 +46858,11 @@ diff -urNp linux-2.6.30.8/scripts/pnmtologo.c linux-2.6.30.8/scripts/pnmtologo.c
static void write_footer(void)
{
fputs("\n};\n\n", out);
-- fprintf(out, "struct linux_logo %s __initdata = {\n", logoname);
-+ fprintf(out, "struct linux_logo %s = {\n", logoname);
- fprintf(out, " .type\t= %s,\n", logo_types[logo_type]);
- fprintf(out, " .width\t= %d,\n", logo_width);
- fprintf(out, " .height\t= %d,\n", logo_height);
+- fprintf(out, "const struct linux_logo %s __initconst = {\n", logoname);
++ fprintf(out, "const struct linux_logo %s = {\n", logoname);
+ fprintf(out, "\t.type\t\t= %s,\n", logo_types[logo_type]);
+ fprintf(out, "\t.width\t\t= %d,\n", logo_width);
+ fprintf(out, "\t.height\t\t= %d,\n", logo_height);
@@ -374,7 +374,7 @@ static void write_logo_clut224(void)
fputs("\n};\n\n", out);
@@ -44471,17 +46872,24 @@ diff -urNp linux-2.6.30.8/scripts/pnmtologo.c linux-2.6.30.8/scripts/pnmtologo.c
logoname);
write_hex_cnt = 0;
for (i = 0; i < logo_clutsize; i++) {
-diff -urNp linux-2.6.30.8/security/commoncap.c linux-2.6.30.8/security/commoncap.c
---- linux-2.6.30.8/security/commoncap.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/security/commoncap.c 2009-09-02 19:10:12.366389421 -0400
-@@ -27,10 +27,13 @@
+diff -urNp linux-2.6.31.4/security/commoncap.c linux-2.6.31.4/security/commoncap.c
+--- linux-2.6.31.4/security/commoncap.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/security/commoncap.c 2009-10-11 15:29:50.450436585 -0400
+@@ -27,7 +27,7 @@
#include <linux/sched.h>
#include <linux/prctl.h>
#include <linux/securebits.h>
+-
+#include <net/sock.h>
-+
-+extern kernel_cap_t gr_cap_rtnetlink(struct sock *sk);
+ /*
+ * If a non-root user executes a setuid-root binary in
+ * !secure(SECURE_NOROOT) mode, then we raise capabilities.
+@@ -50,9 +50,11 @@ static void warn_setuid_and_fcaps_mixed(
+ }
+ }
++extern kernel_cap_t gr_cap_rtnetlink(struct sock *sk);
++
int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
{
- NETLINK_CB(skb).eff_cap = current_cap();
@@ -44489,10 +46897,10 @@ diff -urNp linux-2.6.30.8/security/commoncap.c linux-2.6.30.8/security/commoncap
return 0;
}
-diff -urNp linux-2.6.30.8/security/integrity/ima/ima_fs.c linux-2.6.30.8/security/integrity/ima/ima_fs.c
---- linux-2.6.30.8/security/integrity/ima/ima_fs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/security/integrity/ima/ima_fs.c 2009-07-30 12:06:52.190847656 -0400
-@@ -42,7 +42,7 @@ static ssize_t ima_show_htable_violation
+diff -urNp linux-2.6.31.4/security/integrity/ima/ima_fs.c linux-2.6.31.4/security/integrity/ima/ima_fs.c
+--- linux-2.6.31.4/security/integrity/ima/ima_fs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/security/integrity/ima/ima_fs.c 2009-10-11 15:29:50.462411243 -0400
+@@ -43,7 +43,7 @@ static ssize_t ima_show_htable_violation
return ima_show_htable_value(buf, count, ppos, &ima_htable.violations);
}
@@ -44501,7 +46909,7 @@ diff -urNp linux-2.6.30.8/security/integrity/ima/ima_fs.c linux-2.6.30.8/securit
.read = ima_show_htable_violations
};
-@@ -54,7 +54,7 @@ static ssize_t ima_show_measurements_cou
+@@ -55,7 +55,7 @@ static ssize_t ima_show_measurements_cou
}
@@ -44510,7 +46918,7 @@ diff -urNp linux-2.6.30.8/security/integrity/ima/ima_fs.c linux-2.6.30.8/securit
.read = ima_show_measurements_count
};
-@@ -145,7 +145,7 @@ static int ima_measurements_show(struct
+@@ -146,7 +146,7 @@ static int ima_measurements_show(struct
return 0;
}
@@ -44519,7 +46927,7 @@ diff -urNp linux-2.6.30.8/security/integrity/ima/ima_fs.c linux-2.6.30.8/securit
.start = ima_measurements_start,
.next = ima_measurements_next,
.stop = ima_measurements_stop,
-@@ -157,7 +157,7 @@ static int ima_measurements_open(struct
+@@ -158,7 +158,7 @@ static int ima_measurements_open(struct
return seq_open(file, &ima_measurments_seqops);
}
@@ -44528,7 +46936,7 @@ diff -urNp linux-2.6.30.8/security/integrity/ima/ima_fs.c linux-2.6.30.8/securit
.open = ima_measurements_open,
.read = seq_read,
.llseek = seq_lseek,
-@@ -220,7 +220,7 @@ static int ima_ascii_measurements_show(s
+@@ -221,7 +221,7 @@ static int ima_ascii_measurements_show(s
return 0;
}
@@ -44537,7 +46945,7 @@ diff -urNp linux-2.6.30.8/security/integrity/ima/ima_fs.c linux-2.6.30.8/securit
.start = ima_measurements_start,
.next = ima_measurements_next,
.stop = ima_measurements_stop,
-@@ -232,7 +232,7 @@ static int ima_ascii_measurements_open(s
+@@ -233,7 +233,7 @@ static int ima_ascii_measurements_open(s
return seq_open(file, &ima_ascii_measurements_seqops);
}
@@ -44546,7 +46954,7 @@ diff -urNp linux-2.6.30.8/security/integrity/ima/ima_fs.c linux-2.6.30.8/securit
.open = ima_ascii_measurements_open,
.read = seq_read,
.llseek = seq_lseek,
-@@ -309,7 +309,7 @@ static int ima_release_policy(struct ino
+@@ -313,7 +313,7 @@ static int ima_release_policy(struct ino
return 0;
}
@@ -44555,10 +46963,10 @@ diff -urNp linux-2.6.30.8/security/integrity/ima/ima_fs.c linux-2.6.30.8/securit
.open = ima_open_policy,
.write = ima_write_policy,
.release = ima_release_policy
-diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
---- linux-2.6.30.8/security/Kconfig 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/security/Kconfig 2009-07-30 11:10:50.021298651 -0400
-@@ -4,6 +4,467 @@
+diff -urNp linux-2.6.31.4/security/Kconfig linux-2.6.31.4/security/Kconfig
+--- linux-2.6.31.4/security/Kconfig 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/security/Kconfig 2009-10-11 15:29:50.470476900 -0400
+@@ -4,6 +4,465 @@
menu "Security options"
@@ -44698,8 +47106,8 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+
+ Note that several architectures require various emulations due to
+ badly designed userland ABIs, this will cause a performance impact
-+ but will disappear as soon as userland is fixed (e.g., ppc users
-+ can make use of the secure-plt feature found in binutils).
++ but will disappear as soon as userland is fixed. For example, ppc
++ userland MUST have been built with secure-plt by a recent toolchain.
+
+config PAX_SEGMEXEC
+ bool "Segmentation based non-executable pages"
@@ -44711,8 +47119,8 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+ 3 GB.
+
+config PAX_EMUTRAMP
-+ bool "Emulate trampolines" if (PAX_PAGEEXEC || PAX_SEGMEXEC) && (PARISC || PPC32 || X86)
-+ default y if PARISC || PPC32
++ bool "Emulate trampolines" if (PAX_PAGEEXEC || PAX_SEGMEXEC) && (PARISC || X86)
++ default y if PARISC
+ help
+ There are some programs and libraries that for one reason or
+ another attempt to execute special small code snippets from
@@ -44727,8 +47135,8 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+ 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.
++ On parisc 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
@@ -44746,7 +47154,7 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+
+config PAX_EMUSIGRT
+ bool "Automatically emulate sigreturn trampolines"
-+ depends on PAX_EMUTRAMP && (PARISC || PPC32)
++ depends on PAX_EMUTRAMP && PARISC
+ default y
+ help
+ Enabling this option will have the kernel automatically detect
@@ -44759,8 +47167,8 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+ 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.
++ On parisc 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
@@ -44769,7 +47177,7 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+
+config PAX_MPROTECT
+ bool "Restrict mprotect()"
-+ depends on (PAX_PAGEEXEC || PAX_SEGMEXEC) && !PPC64
++ depends on (PAX_PAGEEXEC || PAX_SEGMEXEC)
+ help
+ Enabling this option will prevent programs from
+ - changing the executable status of memory pages that were
@@ -44785,7 +47193,7 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+
+config PAX_NOELFRELOCS
+ bool "Disallow ELF text relocations"
-+ depends on PAX_MPROTECT && !PAX_ETEXECRELOCS && (IA64 || X86)
++ depends on PAX_MPROTECT && !PAX_ETEXECRELOCS && (IA64 || PPC || X86)
+ help
+ Non-executable pages and mprotect() restrictions are effective
+ in preventing the introduction of new executable code into an
@@ -44821,7 +47229,7 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+
+config PAX_EMUPLT
+ bool "Automatically emulate ELF PLT"
-+ depends on PAX_MPROTECT && (ALPHA || PARISC || PPC32 || SPARC32 || SPARC64)
++ depends on PAX_MPROTECT && (ALPHA || PARISC || SPARC32 || SPARC64)
+ default y
+ help
+ Enabling this option will have the kernel automatically detect
@@ -44829,8 +47237,7 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+ 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 (if secure-plt is not used throughout in userland), sparc
-+ and sparc64, otherwise your system would not even boot.
++ 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
@@ -44838,14 +47245,13 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+ not need to be writable.
+
+config PAX_DLRESOLVE
-+ bool
++ bool 'Emulate old glibc resolver stub'
+ depends on PAX_EMUPLT && (SPARC32 || SPARC64)
-+ default y
-+
-+config PAX_SYSCALL
-+ bool
-+ depends on PAX_PAGEEXEC && PPC32
-+ default y
++ default n
++ help
++ This option is needed if userland has an old glibc (before 2.4)
++ that puts a 'save' instruction into the runtime generated resolver
++ stub that needs special emulation.
+
+config PAX_KERNEXEC
+ bool "Enforce non-executable kernel pages"
@@ -44983,7 +47389,7 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+
+config PAX_REFCOUNT
+ bool "Prevent various kernel object reference counter overflows"
-+ depends on GRKERNSEC && X86
++ depends on GRKERNSEC && (X86 || SPARC64)
+ help
+ By saying Y here the kernel will detect and prevent overflowing
+ various (but not all) kinds of object reference counters. Such
@@ -45002,7 +47408,7 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
+
+config PAX_USERCOPY
+ bool "Bounds check heap object copies between kernel and userland"
-+ depends on X86
++ depends on X86 || PPC32 || PPC64 || SPARC32 || SPARC64
+ depends on GRKERNSEC && (SLAB || SLUB || SLOB)
+ help
+ By saying Y here the kernel will enforce the size of heap objects
@@ -45026,10 +47432,29 @@ diff -urNp linux-2.6.30.8/security/Kconfig linux-2.6.30.8/security/Kconfig
config KEYS
bool "Enable access key retention support"
help
-diff -urNp linux-2.6.30.8/security/smack/smackfs.c linux-2.6.30.8/security/smack/smackfs.c
---- linux-2.6.30.8/security/smack/smackfs.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/security/smack/smackfs.c 2009-07-30 09:48:10.163665437 -0400
-@@ -186,7 +186,7 @@ static void load_seq_stop(struct seq_fil
+diff -urNp linux-2.6.31.4/security/min_addr.c linux-2.6.31.4/security/min_addr.c
+--- linux-2.6.31.4/security/min_addr.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/security/min_addr.c 2009-10-11 15:29:50.480533250 -0400
+@@ -14,6 +14,7 @@ unsigned long dac_mmap_min_addr = CONFIG
+ */
+ static void update_mmap_min_addr(void)
+ {
++#ifndef SPARC
+ #ifdef CONFIG_LSM_MMAP_MIN_ADDR
+ if (dac_mmap_min_addr > CONFIG_LSM_MMAP_MIN_ADDR)
+ mmap_min_addr = dac_mmap_min_addr;
+@@ -22,6 +23,7 @@ static void update_mmap_min_addr(void)
+ #else
+ mmap_min_addr = dac_mmap_min_addr;
+ #endif
++#endif
+ }
+
+ /*
+diff -urNp linux-2.6.31.4/security/smack/smackfs.c linux-2.6.31.4/security/smack/smackfs.c
+--- linux-2.6.31.4/security/smack/smackfs.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/security/smack/smackfs.c 2009-10-11 15:29:50.489384946 -0400
+@@ -187,7 +187,7 @@ static void load_seq_stop(struct seq_fil
/* No-op */
}
@@ -45038,7 +47463,7 @@ diff -urNp linux-2.6.30.8/security/smack/smackfs.c linux-2.6.30.8/security/smack
.start = load_seq_start,
.next = load_seq_next,
.show = load_seq_show,
-@@ -502,7 +502,7 @@ static void cipso_seq_stop(struct seq_fi
+@@ -503,7 +503,7 @@ static void cipso_seq_stop(struct seq_fi
/* No-op */
}
@@ -45047,7 +47472,7 @@ diff -urNp linux-2.6.30.8/security/smack/smackfs.c linux-2.6.30.8/security/smack
.start = cipso_seq_start,
.stop = cipso_seq_stop,
.next = cipso_seq_next,
-@@ -696,7 +696,7 @@ static void netlbladdr_seq_stop(struct s
+@@ -697,7 +697,7 @@ static void netlbladdr_seq_stop(struct s
/* No-op */
}
@@ -45056,10 +47481,41 @@ diff -urNp linux-2.6.30.8/security/smack/smackfs.c linux-2.6.30.8/security/smack
.start = netlbladdr_seq_start,
.stop = netlbladdr_seq_stop,
.next = netlbladdr_seq_next,
-diff -urNp linux-2.6.30.8/sound/core/oss/pcm_oss.c linux-2.6.30.8/sound/core/oss/pcm_oss.c
---- linux-2.6.30.8/sound/core/oss/pcm_oss.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/sound/core/oss/pcm_oss.c 2009-07-30 09:48:10.164791187 -0400
-@@ -2944,8 +2944,8 @@ static void snd_pcm_oss_proc_done(struct
+diff -urNp linux-2.6.31.4/sound/aoa/codecs/onyx.c linux-2.6.31.4/sound/aoa/codecs/onyx.c
+--- linux-2.6.31.4/sound/aoa/codecs/onyx.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/aoa/codecs/onyx.c 2009-10-11 15:29:50.500776222 -0400
+@@ -53,7 +53,7 @@ struct onyx {
+ spdif_locked:1,
+ analog_locked:1,
+ original_mute:2;
+- int open_count;
++ atomic_t open_count;
+ struct codec_info *codec_info;
+
+ /* mutex serializes concurrent access to the device
+@@ -752,7 +752,7 @@ static int onyx_open(struct codec_info_i
+ struct onyx *onyx = cii->codec_data;
+
+ mutex_lock(&onyx->mutex);
+- onyx->open_count++;
++ atomic_inc(&onyx->open_count);
+ mutex_unlock(&onyx->mutex);
+
+ return 0;
+@@ -764,8 +764,7 @@ static int onyx_close(struct codec_info_
+ struct onyx *onyx = cii->codec_data;
+
+ mutex_lock(&onyx->mutex);
+- onyx->open_count--;
+- if (!onyx->open_count)
++ if (atomic_dec_and_test(&onyx->open_count))
+ onyx->spdif_locked = onyx->analog_locked = 0;
+ mutex_unlock(&onyx->mutex);
+
+diff -urNp linux-2.6.31.4/sound/core/oss/pcm_oss.c linux-2.6.31.4/sound/core/oss/pcm_oss.c
+--- linux-2.6.31.4/sound/core/oss/pcm_oss.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/core/oss/pcm_oss.c 2009-10-11 15:29:50.512486357 -0400
+@@ -2943,8 +2943,8 @@ static void snd_pcm_oss_proc_done(struct
}
}
#else /* !CONFIG_SND_VERBOSE_PROCFS */
@@ -45070,9 +47526,9 @@ diff -urNp linux-2.6.30.8/sound/core/oss/pcm_oss.c linux-2.6.30.8/sound/core/oss
#endif /* CONFIG_SND_VERBOSE_PROCFS */
/*
-diff -urNp linux-2.6.30.8/sound/core/seq/seq_lock.h linux-2.6.30.8/sound/core/seq/seq_lock.h
---- linux-2.6.30.8/sound/core/seq/seq_lock.h 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/sound/core/seq/seq_lock.h 2009-07-30 09:48:10.164791187 -0400
+diff -urNp linux-2.6.31.4/sound/core/seq/seq_lock.h linux-2.6.31.4/sound/core/seq/seq_lock.h
+--- linux-2.6.31.4/sound/core/seq/seq_lock.h 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/core/seq/seq_lock.h 2009-10-11 15:29:50.532447704 -0400
@@ -23,10 +23,10 @@ void snd_use_lock_sync_helper(snd_use_lo
#else /* SMP || CONFIG_SND_DEBUG */
@@ -45088,9 +47544,84 @@ diff -urNp linux-2.6.30.8/sound/core/seq/seq_lock.h linux-2.6.30.8/sound/core/se
#endif /* SMP || CONFIG_SND_DEBUG */
-diff -urNp linux-2.6.30.8/sound/pci/ac97/ac97_patch.c linux-2.6.30.8/sound/pci/ac97/ac97_patch.c
---- linux-2.6.30.8/sound/pci/ac97/ac97_patch.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/sound/pci/ac97/ac97_patch.c 2009-07-30 09:48:10.165681860 -0400
+diff -urNp linux-2.6.31.4/sound/drivers/mts64.c linux-2.6.31.4/sound/drivers/mts64.c
+--- linux-2.6.31.4/sound/drivers/mts64.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/drivers/mts64.c 2009-10-11 15:29:50.541689084 -0400
+@@ -65,7 +65,7 @@ struct mts64 {
+ struct pardevice *pardev;
+ int pardev_claimed;
+
+- int open_count;
++ atomic_t open_count;
+ int current_midi_output_port;
+ int current_midi_input_port;
+ u8 mode[MTS64_NUM_INPUT_PORTS];
+@@ -695,7 +695,7 @@ static int snd_mts64_rawmidi_open(struct
+ {
+ struct mts64 *mts = substream->rmidi->private_data;
+
+- if (mts->open_count == 0) {
++ if (atomic_read(&mts->open_count) == 0) {
+ /* We don't need a spinlock here, because this is just called
+ if the device has not been opened before.
+ So there aren't any IRQs from the device */
+@@ -703,7 +703,7 @@ static int snd_mts64_rawmidi_open(struct
+
+ msleep(50);
+ }
+- ++(mts->open_count);
++ atomic_inc(&mts->open_count);
+
+ return 0;
+ }
+@@ -713,8 +713,7 @@ static int snd_mts64_rawmidi_close(struc
+ struct mts64 *mts = substream->rmidi->private_data;
+ unsigned long flags;
+
+- --(mts->open_count);
+- if (mts->open_count == 0) {
++ if (atomic_dec_return(&mts->open_count) == 0) {
+ /* We need the spinlock_irqsave here because we can still
+ have IRQs at this point */
+ spin_lock_irqsave(&mts->lock, flags);
+@@ -723,8 +722,8 @@ static int snd_mts64_rawmidi_close(struc
+
+ msleep(500);
+
+- } else if (mts->open_count < 0)
+- mts->open_count = 0;
++ } else if (atomic_read(&mts->open_count) < 0)
++ atomic_set(&mts->open_count, 0);
+
+ return 0;
+ }
+diff -urNp linux-2.6.31.4/sound/drivers/portman2x4.c linux-2.6.31.4/sound/drivers/portman2x4.c
+--- linux-2.6.31.4/sound/drivers/portman2x4.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/drivers/portman2x4.c 2009-10-11 15:29:50.544711989 -0400
+@@ -83,7 +83,7 @@ struct portman {
+ struct pardevice *pardev;
+ int pardev_claimed;
+
+- int open_count;
++ atomic_t open_count;
+ int mode[PORTMAN_NUM_INPUT_PORTS];
+ struct snd_rawmidi_substream *midi_input[PORTMAN_NUM_INPUT_PORTS];
+ };
+diff -urNp linux-2.6.31.4/sound/pci/ac97/ac97_codec.c linux-2.6.31.4/sound/pci/ac97/ac97_codec.c
+--- linux-2.6.31.4/sound/pci/ac97/ac97_codec.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/pci/ac97/ac97_codec.c 2009-10-11 15:29:56.788410938 -0400
+@@ -1952,7 +1952,7 @@ static int snd_ac97_dev_disconnect(struc
+ }
+
+ /* build_ops to do nothing */
+-static struct snd_ac97_build_ops null_build_ops;
++static const struct snd_ac97_build_ops null_build_ops __read_only;
+
+ #ifdef CONFIG_SND_AC97_POWER_SAVE
+ static void do_update_power(struct work_struct *work)
+diff -urNp linux-2.6.31.4/sound/pci/ac97/ac97_patch.c linux-2.6.31.4/sound/pci/ac97/ac97_patch.c
+--- linux-2.6.31.4/sound/pci/ac97/ac97_patch.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/pci/ac97/ac97_patch.c 2009-10-11 15:29:50.580365938 -0400
@@ -1501,7 +1501,7 @@ static const struct snd_ac97_res_table a
{ AC97_VIDEO, 0x9f1f },
{ AC97_AUX, 0x9f1f },
@@ -45109,25 +47640,25 @@ diff -urNp linux-2.6.30.8/sound/pci/ac97/ac97_patch.c linux-2.6.30.8/sound/pci/a
};
static int patch_lm4550(struct snd_ac97 *ac97)
-diff -urNp linux-2.6.30.8/sound/pci/ens1370.c linux-2.6.30.8/sound/pci/ens1370.c
---- linux-2.6.30.8/sound/pci/ens1370.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/sound/pci/ens1370.c 2009-07-30 09:48:10.165681860 -0400
+diff -urNp linux-2.6.31.4/sound/pci/ens1370.c linux-2.6.31.4/sound/pci/ens1370.c
+--- linux-2.6.31.4/sound/pci/ens1370.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/pci/ens1370.c 2009-10-11 15:29:50.594395653 -0400
@@ -452,7 +452,7 @@ static struct pci_device_id snd_audiopci
- { 0x1274, 0x5880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1373 - CT5880 */
- { 0x1102, 0x8938, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Ectiva EV1938 */
+ { PCI_VDEVICE(ENSONIQ, 0x5880), 0, }, /* ES1373 - CT5880 */
+ { PCI_VDEVICE(ECTIVA, 0x8938), 0, }, /* Ectiva EV1938 */
#endif
- { 0, }
+ { 0, 0, 0, 0, 0, 0, 0 }
};
MODULE_DEVICE_TABLE(pci, snd_audiopci_ids);
-diff -urNp linux-2.6.30.8/sound/pci/intel8x0.c linux-2.6.30.8/sound/pci/intel8x0.c
---- linux-2.6.30.8/sound/pci/intel8x0.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/sound/pci/intel8x0.c 2009-07-30 09:48:10.166748224 -0400
+diff -urNp linux-2.6.31.4/sound/pci/intel8x0.c linux-2.6.31.4/sound/pci/intel8x0.c
+--- linux-2.6.31.4/sound/pci/intel8x0.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/pci/intel8x0.c 2009-10-11 15:29:50.763369936 -0400
@@ -444,7 +444,7 @@ static struct pci_device_id snd_intel8x0
- { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */
- { 0x1022, 0x7445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */
- { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */
+ { PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */
+ { PCI_VDEVICE(AMD, 0x7445), DEVICE_INTEL }, /* AMD768 */
+ { PCI_VDEVICE(AL, 0x5455), DEVICE_ALI }, /* Ali5455 */
- { 0, }
+ { 0, 0, 0, 0, 0, 0, 0 }
};
@@ -45142,12 +47673,12 @@ diff -urNp linux-2.6.30.8/sound/pci/intel8x0.c linux-2.6.30.8/sound/pci/intel8x0
};
static int __devinit snd_intel8x0_mixer(struct intel8x0 *chip, int ac97_clock,
-diff -urNp linux-2.6.30.8/sound/pci/intel8x0m.c linux-2.6.30.8/sound/pci/intel8x0m.c
---- linux-2.6.30.8/sound/pci/intel8x0m.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/sound/pci/intel8x0m.c 2009-07-30 09:48:10.167822693 -0400
+diff -urNp linux-2.6.31.4/sound/pci/intel8x0m.c linux-2.6.31.4/sound/pci/intel8x0m.c
+--- linux-2.6.31.4/sound/pci/intel8x0m.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/pci/intel8x0m.c 2009-10-11 15:29:50.783366924 -0400
@@ -239,7 +239,7 @@ static struct pci_device_id snd_intel8x0
- { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */
- { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */
+ { PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */
+ { PCI_VDEVICE(AL, 0x5455), DEVICE_ALI }, /* Ali5455 */
#endif
- { 0, }
+ { 0, 0, 0, 0, 0, 0, 0 }
@@ -45163,9 +47694,9 @@ diff -urNp linux-2.6.30.8/sound/pci/intel8x0m.c linux-2.6.30.8/sound/pci/intel8x
};
static int __devinit snd_intel8x0m_probe(struct pci_dev *pci,
-diff -urNp linux-2.6.30.8/sound/usb/usx2y/us122l.c linux-2.6.30.8/sound/usb/usx2y/us122l.c
---- linux-2.6.30.8/sound/usb/usx2y/us122l.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/sound/usb/usx2y/us122l.c 2009-07-30 09:48:10.167822693 -0400
+diff -urNp linux-2.6.31.4/sound/usb/usx2y/us122l.c linux-2.6.31.4/sound/usb/usx2y/us122l.c
+--- linux-2.6.31.4/sound/usb/usx2y/us122l.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/usb/usx2y/us122l.c 2009-10-11 15:29:50.795481787 -0400
@@ -154,7 +154,7 @@ static void usb_stream_hwdep_vm_close(st
snd_printdd(KERN_DEBUG "%i\n", atomic_read(&us122l->mmap_count));
}
@@ -45175,9 +47706,9 @@ diff -urNp linux-2.6.30.8/sound/usb/usx2y/us122l.c linux-2.6.30.8/sound/usb/usx2
.open = usb_stream_hwdep_vm_open,
.fault = usb_stream_hwdep_vm_fault,
.close = usb_stream_hwdep_vm_close,
-diff -urNp linux-2.6.30.8/sound/usb/usx2y/usX2Yhwdep.c linux-2.6.30.8/sound/usb/usx2y/usX2Yhwdep.c
---- linux-2.6.30.8/sound/usb/usx2y/usX2Yhwdep.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/sound/usb/usx2y/usX2Yhwdep.c 2009-07-30 09:48:10.167822693 -0400
+diff -urNp linux-2.6.31.4/sound/usb/usx2y/usX2Yhwdep.c linux-2.6.31.4/sound/usb/usx2y/usX2Yhwdep.c
+--- linux-2.6.31.4/sound/usb/usx2y/usX2Yhwdep.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/usb/usx2y/usX2Yhwdep.c 2009-10-11 15:29:50.796372753 -0400
@@ -53,7 +53,7 @@ static int snd_us428ctls_vm_fault(struct
return 0;
}
@@ -45187,9 +47718,9 @@ diff -urNp linux-2.6.30.8/sound/usb/usx2y/usX2Yhwdep.c linux-2.6.30.8/sound/usb/
.fault = snd_us428ctls_vm_fault,
};
-diff -urNp linux-2.6.30.8/sound/usb/usx2y/usx2yhwdeppcm.c linux-2.6.30.8/sound/usb/usx2y/usx2yhwdeppcm.c
---- linux-2.6.30.8/sound/usb/usx2y/usx2yhwdeppcm.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/sound/usb/usx2y/usx2yhwdeppcm.c 2009-07-30 09:48:10.168781015 -0400
+diff -urNp linux-2.6.31.4/sound/usb/usx2y/usx2yhwdeppcm.c linux-2.6.31.4/sound/usb/usx2y/usx2yhwdeppcm.c
+--- linux-2.6.31.4/sound/usb/usx2y/usx2yhwdeppcm.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/sound/usb/usx2y/usx2yhwdeppcm.c 2009-10-11 15:29:50.796372753 -0400
@@ -697,7 +697,7 @@ static int snd_usX2Y_hwdep_pcm_vm_fault(
}
@@ -45199,9 +47730,9 @@ diff -urNp linux-2.6.30.8/sound/usb/usx2y/usx2yhwdeppcm.c linux-2.6.30.8/sound/u
.open = snd_usX2Y_hwdep_pcm_vm_open,
.close = snd_usX2Y_hwdep_pcm_vm_close,
.fault = snd_usX2Y_hwdep_pcm_vm_fault,
-diff -urNp linux-2.6.30.8/usr/gen_init_cpio.c linux-2.6.30.8/usr/gen_init_cpio.c
---- linux-2.6.30.8/usr/gen_init_cpio.c 2009-07-24 17:47:51.000000000 -0400
-+++ linux-2.6.30.8/usr/gen_init_cpio.c 2009-08-24 21:08:46.298955816 -0400
+diff -urNp linux-2.6.31.4/usr/gen_init_cpio.c linux-2.6.31.4/usr/gen_init_cpio.c
+--- linux-2.6.31.4/usr/gen_init_cpio.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/usr/gen_init_cpio.c 2009-10-11 15:29:50.802401343 -0400
@@ -299,7 +299,7 @@ static int cpio_mkfile(const char *name,
int retval;
int rc = -1;
@@ -45224,10 +47755,10 @@ diff -urNp linux-2.6.30.8/usr/gen_init_cpio.c linux-2.6.30.8/usr/gen_init_cpio.c
} else
break;
}
-diff -urNp linux-2.6.30.8/virt/kvm/kvm_main.c linux-2.6.30.8/virt/kvm/kvm_main.c
---- linux-2.6.30.8/virt/kvm/kvm_main.c 2009-09-09 17:37:34.140373414 -0400
-+++ linux-2.6.30.8/virt/kvm/kvm_main.c 2009-09-09 17:37:58.613058851 -0400
-@@ -2065,6 +2065,9 @@ static struct miscdevice kvm_dev = {
+diff -urNp linux-2.6.31.4/virt/kvm/kvm_main.c linux-2.6.31.4/virt/kvm/kvm_main.c
+--- linux-2.6.31.4/virt/kvm/kvm_main.c 2009-10-05 13:12:06.000000000 -0400
++++ linux-2.6.31.4/virt/kvm/kvm_main.c 2009-10-11 15:29:50.826401354 -0400
+@@ -2353,6 +2353,9 @@ static struct miscdevice kvm_dev = {
KVM_MINOR,
"kvm",
&kvm_chardev_ops,
@@ -45237,7 +47768,7 @@ diff -urNp linux-2.6.30.8/virt/kvm/kvm_main.c linux-2.6.30.8/virt/kvm/kvm_main.c
};
static void hardware_enable(void *junk)
-@@ -2224,7 +2227,7 @@ static int vcpu_stat_get(void *_offset,
+@@ -2512,7 +2515,7 @@ static int vcpu_stat_get(void *_offset,
DEFINE_SIMPLE_ATTRIBUTE(vcpu_stat_fops, vcpu_stat_get, NULL, "%llu\n");
@@ -45246,7 +47777,7 @@ diff -urNp linux-2.6.30.8/virt/kvm/kvm_main.c linux-2.6.30.8/virt/kvm/kvm_main.c
[KVM_STAT_VCPU] = &vcpu_stat_fops,
[KVM_STAT_VM] = &vm_stat_fops,
};
-@@ -2296,7 +2299,7 @@ static void kvm_sched_out(struct preempt
+@@ -2584,7 +2587,7 @@ static void kvm_sched_out(struct preempt
kvm_arch_vcpu_put(vcpu);
}
diff --git a/main/linux-grsec/kernelconfig.x86 b/main/linux-grsec/kernelconfig.x86
new file mode 100644
index 000000000..f8ea0320c
--- /dev/null
+++ b/main/linux-grsec/kernelconfig.x86
@@ -0,0 +1,4481 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.31.4
+# Thu Oct 15 14:17:51 2009
+#
+# CONFIG_64BIT is not set
+CONFIG_X86_32=y
+# CONFIG_X86_64 is not set
+CONFIG_X86=y
+CONFIG_OUTPUT_FORMAT="elf32-i386"
+CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_FAST_CMPXCHG_LOCAL=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+# CONFIG_GENERIC_TIME_VSYSCALL is not set
+CONFIG_ARCH_HAS_CPU_RELAX=y
+CONFIG_ARCH_HAS_DEFAULT_IDLE=y
+CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
+CONFIG_HAVE_SETUP_PER_CPU_AREA=y
+CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y
+# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_ZONE_DMA32 is not set
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+# CONFIG_AUDIT_ARCH is not set
+CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_USE_GENERIC_SMP_HELPERS=y
+CONFIG_X86_32_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_X86_32_LAZY_GS=y
+CONFIG_KTIME_SCALAR=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_BZIP2=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_BZIP2 is not set
+# CONFIG_KERNEL_LZMA is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=m
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_PCSPKR_PLATFORM=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_COUNTERS=y
+
+#
+# Performance Counters
+#
+CONFIG_PERF_COUNTERS=y
+# CONFIG_EVENT_PROFILE is not set
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+# CONFIG_SLUB_DEBUG is not set
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+CONFIG_TRACEPOINTS=y
+CONFIG_MARKERS=y
+CONFIG_OPROFILE=m
+# CONFIG_OPROFILE_IBS is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_DMA_ATTRS=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_GCOV_KERNEL is not set
+CONFIG_SLOW_WORK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_STOP_MACHINE=y
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+CONFIG_BLK_DEV_BSG=y
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_PREEMPT_NOTIFIERS=y
+CONFIG_FREEZER=y
+
+#
+# Processor type and features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_SMP=y
+# CONFIG_SPARSE_IRQ is not set
+CONFIG_X86_MPPARSE=y
+# CONFIG_X86_BIGSMP is not set
+CONFIG_X86_EXTENDED_PLATFORM=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_RDC321X is not set
+# CONFIG_X86_32_NON_STANDARD is not set
+CONFIG_SCHED_OMIT_FRAME_POINTER=y
+CONFIG_PARAVIRT_GUEST=y
+CONFIG_VMI=y
+CONFIG_KVM_CLOCK=y
+CONFIG_KVM_GUEST=y
+CONFIG_LGUEST_GUEST=y
+CONFIG_PARAVIRT=y
+# CONFIG_PARAVIRT_SPINLOCKS is not set
+CONFIG_PARAVIRT_CLOCK=y
+# CONFIG_MEMTEST is not set
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+CONFIG_M586=y
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+# CONFIG_M686 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_MEFFICEON is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
+# CONFIG_MPSC is not set
+# CONFIG_MCORE2 is not set
+# CONFIG_GENERIC_CPU is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_CPU=y
+CONFIG_X86_L1_CACHE_BYTES=64
+CONFIG_X86_INTERNODE_CACHE_BYTES=64
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_L1_CACHE_SHIFT=5
+CONFIG_X86_XADD=y
+# CONFIG_X86_PPRO_FENCE is not set
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_ALIGNMENT_16=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_MINIMUM_CPU_FAMILY=4
+# CONFIG_PROCESSOR_SELECT is not set
+CONFIG_CPU_SUP_INTEL=y
+CONFIG_CPU_SUP_CYRIX_32=y
+CONFIG_CPU_SUP_AMD=y
+CONFIG_CPU_SUP_CENTAUR=y
+CONFIG_CPU_SUP_TRANSMETA_32=y
+CONFIG_CPU_SUP_UMC_32=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_DMI=y
+# CONFIG_IOMMU_HELPER is not set
+# CONFIG_IOMMU_API is not set
+CONFIG_NR_CPUS=8
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_MC=y
+# CONFIG_PREEMPT_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
+# CONFIG_PREEMPT is not set
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set
+# CONFIG_X86_MCE is not set
+# CONFIG_X86_ANCIENT_MCE is not set
+CONFIG_VM86=y
+CONFIG_TOSHIBA=m
+CONFIG_I8K=m
+CONFIG_X86_REBOOTFIXUPS=y
+CONFIG_MICROCODE=m
+CONFIG_MICROCODE_INTEL=y
+CONFIG_MICROCODE_AMD=y
+CONFIG_MICROCODE_OLD_INTERFACE=y
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+CONFIG_X86_CPU_DEBUG=m
+# CONFIG_NOHIGHMEM is not set
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_3G_OPT is not set
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_2G_OPT is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_HIGHMEM=y
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_SPARSEMEM_STATIC=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+# CONFIG_HIGHPTE is not set
+# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
+CONFIG_X86_RESERVE_LOW_64K=y
+CONFIG_MATH_EMULATION=y
+CONFIG_MTRR=y
+CONFIG_MTRR_SANITIZER=y
+CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
+CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
+CONFIG_X86_PAT=y
+# CONFIG_SECCOMP is not set
+# CONFIG_CC_STACKPROTECTOR is not set
+# CONFIG_HZ_100 is not set
+# CONFIG_HZ_250 is not set
+CONFIG_HZ_300=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=300
+CONFIG_SCHED_HRTICK=y
+# CONFIG_KEXEC is not set
+# CONFIG_CRASH_DUMP is not set
+CONFIG_PHYSICAL_START=0x100000
+# CONFIG_RELOCATABLE is not set
+CONFIG_PHYSICAL_ALIGN=0x100000
+CONFIG_HOTPLUG_CPU=y
+# CONFIG_CMDLINE_BOOL is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+
+#
+# Power management and ACPI options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_HIBERNATION is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_SLEEP=y
+CONFIG_ACPI_PROCFS=y
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_SYSFS_POWER=y
+CONFIG_ACPI_PROC_EVENT=y
+CONFIG_ACPI_AC=m
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_VIDEO=m
+CONFIG_ACPI_FAN=m
+CONFIG_ACPI_DOCK=y
+CONFIG_ACPI_PROCESSOR=m
+CONFIG_ACPI_HOTPLUG_CPU=y
+CONFIG_ACPI_THERMAL=m
+# CONFIG_ACPI_CUSTOM_DSDT is not set
+CONFIG_ACPI_BLACKLIST_YEAR=2000
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_PCI_SLOT=m
+CONFIG_X86_PM_TIMER=y
+CONFIG_ACPI_CONTAINER=m
+CONFIG_ACPI_SBS=m
+# CONFIG_APM is not set
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=m
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=m
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE 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_GOV_CONSERVATIVE=m
+
+#
+# CPUFreq processor drivers
+#
+CONFIG_X86_ACPI_CPUFREQ=m
+CONFIG_X86_POWERNOW_K6=m
+CONFIG_X86_POWERNOW_K7=m
+CONFIG_X86_POWERNOW_K7_ACPI=y
+CONFIG_X86_POWERNOW_K8=m
+CONFIG_X86_GX_SUSPMOD=m
+CONFIG_X86_SPEEDSTEP_CENTRINO=m
+CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
+CONFIG_X86_SPEEDSTEP_ICH=m
+CONFIG_X86_SPEEDSTEP_SMI=m
+CONFIG_X86_P4_CLOCKMOD=m
+CONFIG_X86_CPUFREQ_NFORCE2=m
+CONFIG_X86_LONGRUN=m
+CONFIG_X86_LONGHAUL=m
+CONFIG_X86_E_POWERSAVER=m
+
+#
+# shared options
+#
+CONFIG_X86_SPEEDSTEP_LIB=m
+CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI=y
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+# CONFIG_PCI_GODIRECT is not set
+# CONFIG_PCI_GOOLPC is not set
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_HOTPLUG_PCI_PCIE=m
+# CONFIG_PCIEAER is not set
+CONFIG_PCIEASPM=y
+# CONFIG_PCIEASPM_DEBUG is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+# CONFIG_PCI_MSI is not set
+CONFIG_PCI_LEGACY=y
+CONFIG_PCI_STUB=m
+CONFIG_HT_IRQ=y
+# CONFIG_PCI_IOV is not set
+CONFIG_ISA_DMA_API=y
+CONFIG_ISA=y
+# CONFIG_EISA is not set
+# CONFIG_MCA is not set
+CONFIG_SCx200=m
+CONFIG_SCx200HR_TIMER=m
+# CONFIG_OLPC is not set
+CONFIG_K8_NB=y
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=m
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+CONFIG_CARDBUS=y
+
+#
+# PC-card bridges
+#
+CONFIG_YENTA=m
+CONFIG_YENTA_O2=y
+CONFIG_YENTA_RICOH=y
+CONFIG_YENTA_TI=y
+CONFIG_YENTA_ENE_TUNE=y
+CONFIG_YENTA_TOSHIBA=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_I82365=m
+CONFIG_TCIC=m
+CONFIG_PCMCIA_PROBE=y
+CONFIG_PCCARD_NONSTATIC=m
+CONFIG_HOTPLUG_PCI=m
+CONFIG_HOTPLUG_PCI_FAKE=m
+CONFIG_HOTPLUG_PCI_COMPAQ=m
+# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
+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_SHPC=m
+
+#
+# Executable file formats / Emulations
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+CONFIG_HAVE_ATOMIC_IOMAP=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+CONFIG_XFRM_SUB_POLICY=y
+CONFIG_XFRM_MIGRATE=y
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
+CONFIG_NET_KEY=m
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=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 is not set
+CONFIG_IP_PIMSM_V2=y
+CONFIG_ARPD=y
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+CONFIG_INET_LRO=y
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+CONFIG_TCP_CONG_HSTCP=m
+CONFIG_TCP_CONG_HYBLA=m
+CONFIG_TCP_CONG_VEGAS=m
+CONFIG_TCP_CONG_SCALABLE=m
+CONFIG_TCP_CONG_LP=m
+CONFIG_TCP_CONG_VENO=m
+CONFIG_TCP_CONG_YEAH=m
+CONFIG_TCP_CONG_ILLINOIS=m
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
+CONFIG_DEFAULT_TCP_CONG="cubic"
+CONFIG_TCP_MD5SIG=y
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_IPV6_ROUTER_PREF=y
+CONFIG_IPV6_ROUTE_INFO=y
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_MIP6=m
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
+CONFIG_IPV6_TUNNEL=m
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+CONFIG_IPV6_PIMSM_V2=y
+CONFIG_NETLABEL=y
+CONFIG_NETWORK_SECMARK=y
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_SECMARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_DCCP=m
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+CONFIG_NF_CT_PROTO_UDPLITE=m
+CONFIG_NF_CONNTRACK_AMANDA=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_TPROXY=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_HL=m
+CONFIG_NETFILTER_XT_TARGET_LED=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_RATEEST=m
+CONFIG_NETFILTER_XT_TARGET_TPROXY=m
+CONFIG_NETFILTER_XT_TARGET_TRACE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
+CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_HL=m
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_OWNER=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_RATEEST=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_SOCKET=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_TIME=m
+CONFIG_NETFILTER_XT_MATCH_U32=m
+CONFIG_NETFILTER_XT_MATCH_OSF=m
+CONFIG_IP_VS=m
+CONFIG_IP_VS_IPV6=y
+# 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_AH_ESP=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
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_DEFRAG_IPV4=m
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_DCCP=m
+CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_PROTO_UDPLITE=m
+CONFIG_NF_NAT_PROTO_SCTP=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_SECURITY=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+CONFIG_IP6_NF_QUEUE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_TARGET_HL=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_RAW=m
+CONFIG_IP6_NF_SECURITY=m
+
+#
+# DECnet: Netfilter Configuration
+#
+CONFIG_DECNET_NF_GRABULATOR=m
+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_IP6=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_BRIDGE_EBT_ULOG=m
+CONFIG_BRIDGE_EBT_NFLOG=m
+CONFIG_IP_DCCP=m
+CONFIG_INET_DCCP_DIAG=m
+
+#
+# DCCP CCIDs Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP_CCID2_DEBUG is not set
+CONFIG_IP_DCCP_CCID3=y
+# CONFIG_IP_DCCP_CCID3_DEBUG is not set
+CONFIG_IP_DCCP_CCID3_RTO=100
+CONFIG_IP_DCCP_TFRC_LIB=y
+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=y
+# CONFIG_SCTP_HMAC_MD5 is not set
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
+CONFIG_TIPC=m
+# CONFIG_TIPC_ADVANCED is not set
+# CONFIG_TIPC_DEBUG is not set
+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 is not set
+CONFIG_STP=m
+CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
+CONFIG_VLAN_8021Q=m
+# CONFIG_VLAN_8021Q_GVRP is not set
+CONFIG_DECNET=m
+CONFIG_DECNET_ROUTER=y
+CONFIG_LLC=m
+CONFIG_LLC2=m
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=m
+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_X25=m
+CONFIG_LAPB=m
+CONFIG_ECONET=m
+CONFIG_ECONET_AUNUDP=y
+CONFIG_ECONET_NATIVE=y
+CONFIG_WAN_ROUTER=m
+CONFIG_PHONET=m
+CONFIG_IEEE802154=m
+CONFIG_NET_SCHED=y
+
+#
+# Queueing/Scheduling
+#
+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_MULTIQ=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_DRR=m
+CONFIG_NET_SCH_INGRESS=m
+
+#
+# Classification
+#
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+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_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_FLOW=m
+CONFIG_NET_EMATCH=y
+CONFIG_NET_EMATCH_STACK=32
+CONFIG_NET_EMATCH_CMP=m
+CONFIG_NET_EMATCH_NBYTE=m
+CONFIG_NET_EMATCH_U32=m
+CONFIG_NET_EMATCH_META=m
+CONFIG_NET_EMATCH_TEXT=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_POLICE=m
+CONFIG_NET_ACT_GACT=m
+CONFIG_GACT_PROB=y
+CONFIG_NET_ACT_MIRRED=m
+CONFIG_NET_ACT_IPT=m
+CONFIG_NET_ACT_NAT=m
+CONFIG_NET_ACT_PEDIT=m
+CONFIG_NET_ACT_SIMP=m
+CONFIG_NET_ACT_SKBEDIT=m
+# CONFIG_NET_CLS_IND is not set
+CONFIG_NET_SCH_FIFO=y
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+# CONFIG_NET_DROP_MONITOR is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_CAN=m
+CONFIG_CAN_RAW=m
+CONFIG_CAN_BCM=m
+
+#
+# CAN Device Drivers
+#
+CONFIG_CAN_VCAN=m
+CONFIG_CAN_DEV=m
+# CONFIG_CAN_CALC_BITTIMING is not set
+CONFIG_CAN_SJA1000=m
+CONFIG_CAN_SJA1000_PLATFORM=m
+CONFIG_CAN_EMS_PCI=m
+CONFIG_CAN_KVASER_PCI=m
+# CONFIG_CAN_DEBUG_DEVICES 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=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_TOIM3232_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
+CONFIG_KINGSUN_DONGLE=m
+CONFIG_KSDAZZLE_DONGLE=m
+CONFIG_KS959_DONGLE=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_MCS_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_CMTP=m
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIBTSDIO=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_LL=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=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_AF_RXRPC=m
+# CONFIG_AF_RXRPC_DEBUG is not set
+CONFIG_RXKAD=m
+CONFIG_FIB_RULES=y
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=m
+# CONFIG_CFG80211_REG_DEBUG is not set
+# CONFIG_CFG80211_DEBUGFS is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=m
+CONFIG_LIB80211_CRYPT_WEP=m
+CONFIG_LIB80211_CRYPT_CCMP=m
+CONFIG_LIB80211_CRYPT_TKIP=m
+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_MAC80211=m
+CONFIG_MAC80211_DEFAULT_PS=y
+CONFIG_MAC80211_DEFAULT_PS_VALUE=1
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_PID=y
+CONFIG_MAC80211_RC_MINSTREL=y
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT="pid"
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+CONFIG_WIMAX=m
+CONFIG_WIMAX_DEBUG_LEVEL=8
+CONFIG_RFKILL=m
+CONFIG_RFKILL_LEDS=y
+# CONFIG_RFKILL_INPUT is not set
+CONFIG_NET_9P=m
+CONFIG_NET_9P_VIRTIO=m
+CONFIG_NET_9P_RDMA=m
+# CONFIG_NET_9P_DEBUG is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=m
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=m
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_TESTS=m
+CONFIG_MTD_REDBOOT_PARTS=m
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
+# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
+# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
+CONFIG_MTD_AR7_PARTS=m
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_HAVE_MTD_OTP=y
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+CONFIG_MTD_BLOCK_RO=m
+CONFIG_FTL=m
+CONFIG_NFTL=m
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=m
+CONFIG_RFD_FTL=m
+CONFIG_SSFDC=m
+CONFIG_MTD_OOPS=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_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_COMPAT is not set
+CONFIG_MTD_SC520CDP=m
+CONFIG_MTD_NETSC520=m
+CONFIG_MTD_TS5500=m
+CONFIG_MTD_SBC_GXX=m
+CONFIG_MTD_SCx200_DOCFLASH=m
+CONFIG_MTD_AMD76XROM=m
+CONFIG_MTD_ICHXROM=m
+CONFIG_MTD_ESB2ROM=m
+CONFIG_MTD_CK804XROM=m
+CONFIG_MTD_SCB2_FLASH=m
+CONFIG_MTD_NETtel=m
+CONFIG_MTD_L440GX=m
+CONFIG_MTD_PCI=m
+CONFIG_MTD_INTEL_VR_NOR=m
+CONFIG_MTD_PLATRAM=m
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_PMC551=m
+CONFIG_MTD_PMC551_BUGFIX=y
+# CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_DATAFLASH=m
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+# CONFIG_MTD_DATAFLASH_OTP is not set
+CONFIG_MTD_M25P80=m
+CONFIG_M25PXX_USE_FAST_READ=y
+CONFIG_MTD_SLRAM=m
+CONFIG_MTD_PHRAM=m
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+CONFIG_MTD_BLOCK2MTD=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=y
+CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
+# CONFIG_MTD_DOCPROBE_HIGH is not set
+# CONFIG_MTD_DOCPROBE_55AA is not set
+CONFIG_MTD_NAND=m
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+CONFIG_MTD_NAND_ECC_SMC=y
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+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 is not set
+CONFIG_MTD_NAND_CAFE=m
+CONFIG_MTD_NAND_CS553X=m
+CONFIG_MTD_NAND_NANDSIM=m
+CONFIG_MTD_NAND_PLATFORM=m
+CONFIG_MTD_ALAUDA=m
+CONFIG_MTD_ONENAND=m
+# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
+CONFIG_MTD_ONENAND_OTP=y
+CONFIG_MTD_ONENAND_2X_PROGRAM=y
+CONFIG_MTD_ONENAND_SIM=m
+
+#
+# LPDDR flash memory drivers
+#
+CONFIG_MTD_LPDDR=m
+CONFIG_MTD_QINFO_PROBE=m
+
+#
+# UBI - Unsorted block images
+#
+CONFIG_MTD_UBI=m
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+# CONFIG_MTD_UBI_GLUEBI is not set
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_DEBUG is not set
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_SERIAL=m
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_SUPERIO is not set
+CONFIG_PARPORT_PC_PCMCIA=m
+# CONFIG_PARPORT_GSC is not set
+CONFIG_PARPORT_AX88796=m
+# CONFIG_PARPORT_1284 is not set
+CONFIG_PARPORT_NOT_PC=y
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG_MESSAGES is not set
+
+#
+# Protocols
+#
+CONFIG_ISAPNP=y
+CONFIG_PNPBIOS=y
+# CONFIG_PNPBIOS_PROC_FS is not set
+CONFIG_PNPACPI=y
+CONFIG_BLK_DEV=y
+CONFIG_BLK_DEV_FD=m
+CONFIG_BLK_DEV_XD=m
+# CONFIG_PARIDE is not set
+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_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_OSD=m
+CONFIG_BLK_DEV_SX8=m
+CONFIG_BLK_DEV_UB=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_XIP is not set
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+CONFIG_ATA_OVER_ETH=m
+CONFIG_VIRTIO_BLK=m
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+CONFIG_IBM_ASM=m
+CONFIG_PHANTOM=m
+CONFIG_SGI_IOC4=m
+CONFIG_TIFM_CORE=m
+CONFIG_TIFM_7XX1=m
+CONFIG_ICS932S401=m
+CONFIG_ENCLOSURE_SERVICES=m
+CONFIG_HP_ILO=m
+CONFIG_DELL_LAPTOP=m
+CONFIG_ISL29003=m
+CONFIG_C2PORT=m
+CONFIG_C2PORT_DURAMAR_2150=m
+
+#
+# EEPROM support
+#
+CONFIG_EEPROM_AT24=m
+CONFIG_EEPROM_AT25=m
+CONFIG_EEPROM_LEGACY=m
+CONFIG_EEPROM_MAX6875=m
+CONFIG_EEPROM_93CX6=m
+CONFIG_CB710_CORE=m
+# CONFIG_CB710_DEBUG is not set
+CONFIG_CB710_DEBUG_ASSUMPTIONS=y
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=m
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+CONFIG_SCSI_TGT=m
+CONFIG_SCSI_NETLINK=y
+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
+CONFIG_SCSI_ENCLOSURE=m
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+CONFIG_SCSI_FC_TGT_ATTRS=y
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_SAS_ATTRS=m
+CONFIG_SCSI_SAS_LIBSAS=m
+CONFIG_SCSI_SAS_ATA=y
+CONFIG_SCSI_SAS_HOST_SMP=y
+# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
+CONFIG_SCSI_SRP_ATTRS=m
+CONFIG_SCSI_SRP_TGT_ATTRS=y
+CONFIG_SCSI_LOWLEVEL=y
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
+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_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=y
+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_DEBUG_ENABLE=y
+CONFIG_AIC79XX_DEBUG_MASK=0
+CONFIG_AIC79XX_REG_PRETTY_PRINT=y
+CONFIG_SCSI_AIC94XX=m
+# CONFIG_AIC94XX_DEBUG is not set
+CONFIG_SCSI_MVSAS=m
+CONFIG_SCSI_MVSAS_DEBUG=y
+CONFIG_SCSI_DPT_I2O=m
+CONFIG_SCSI_ADVANSYS=m
+CONFIG_SCSI_IN2000=m
+CONFIG_SCSI_ARCMSR=m
+CONFIG_MEGARAID_NEWGEN=y
+CONFIG_MEGARAID_MM=m
+CONFIG_MEGARAID_MAILBOX=m
+CONFIG_MEGARAID_LEGACY=m
+CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+# CONFIG_SCSI_MPT2SAS_LOGGING is not set
+CONFIG_SCSI_HPTIOP=m
+CONFIG_SCSI_BUSLOGIC=m
+CONFIG_SCSI_FLASHPOINT=y
+CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
+CONFIG_FCOE=m
+CONFIG_FCOE_FNIC=m
+CONFIG_SCSI_DMX3191D=m
+CONFIG_SCSI_DTC3280=m
+CONFIG_SCSI_EATA=m
+# CONFIG_SCSI_EATA_TAGGED_QUEUE is not set
+# CONFIG_SCSI_EATA_LINKED_COMMANDS is not set
+CONFIG_SCSI_EATA_MAX_TAGS=16
+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_STEX=m
+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_MMIO=y
+CONFIG_SCSI_IPR=m
+CONFIG_SCSI_IPR_TRACE=y
+# CONFIG_SCSI_IPR_DUMP is not set
+CONFIG_SCSI_PAS16=m
+CONFIG_SCSI_QLOGIC_FAS=m
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA_FC=m
+CONFIG_SCSI_QLA_ISCSI=m
+CONFIG_SCSI_LPFC=m
+# CONFIG_SCSI_LPFC_DEBUG_FS is not set
+CONFIG_SCSI_SYM53C416=m
+CONFIG_SCSI_DC395x=m
+CONFIG_SCSI_DC390T=m
+CONFIG_SCSI_T128=m
+CONFIG_SCSI_U14_34F=m
+# CONFIG_SCSI_U14_34F_TAGGED_QUEUE is not set
+# CONFIG_SCSI_U14_34F_LINKED_COMMANDS is not set
+CONFIG_SCSI_U14_34F_MAX_TAGS=8
+CONFIG_SCSI_ULTRASTOR=m
+CONFIG_SCSI_NSP32=m
+CONFIG_SCSI_DEBUG=m
+CONFIG_SCSI_SRP=m
+CONFIG_SCSI_LOWLEVEL_PCMCIA=y
+CONFIG_PCMCIA_AHA152X=m
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_NINJA_SCSI=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+CONFIG_SCSI_DH=m
+CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_HP_SW=m
+CONFIG_SCSI_DH_EMC=m
+CONFIG_SCSI_DH_ALUA=m
+CONFIG_SCSI_OSD_INITIATOR=m
+CONFIG_SCSI_OSD_ULD=m
+CONFIG_SCSI_OSD_DPRINT_SENSE=1
+# CONFIG_SCSI_OSD_DEBUG is not set
+CONFIG_ATA=m
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_ATA_ACPI=y
+CONFIG_SATA_PMP=y
+CONFIG_SATA_AHCI=m
+CONFIG_SATA_SIL24=m
+CONFIG_ATA_SFF=y
+CONFIG_SATA_SVW=m
+CONFIG_ATA_PIIX=m
+CONFIG_SATA_MV=m
+CONFIG_SATA_NV=m
+CONFIG_PDC_ADMA=m
+CONFIG_SATA_QSTOR=m
+CONFIG_SATA_PROMISE=m
+CONFIG_SATA_SX4=m
+CONFIG_SATA_SIL=m
+CONFIG_SATA_SIS=m
+CONFIG_SATA_ULI=m
+CONFIG_SATA_VIA=m
+CONFIG_SATA_VITESSE=m
+CONFIG_SATA_INIC162X=m
+CONFIG_PATA_ACPI=m
+CONFIG_PATA_ALI=m
+CONFIG_PATA_AMD=m
+CONFIG_PATA_ARTOP=m
+CONFIG_PATA_ATIIXP=m
+CONFIG_PATA_CMD640_PCI=m
+CONFIG_PATA_CMD64X=m
+CONFIG_PATA_CS5520=m
+CONFIG_PATA_CS5530=m
+CONFIG_PATA_CS5535=m
+CONFIG_PATA_CS5536=m
+CONFIG_PATA_CYPRESS=m
+CONFIG_PATA_EFAR=m
+CONFIG_ATA_GENERIC=m
+CONFIG_PATA_HPT366=m
+CONFIG_PATA_HPT37X=m
+CONFIG_PATA_HPT3X2N=m
+CONFIG_PATA_HPT3X3=m
+CONFIG_PATA_HPT3X3_DMA=y
+CONFIG_PATA_ISAPNP=m
+CONFIG_PATA_IT821X=m
+CONFIG_PATA_IT8213=m
+CONFIG_PATA_JMICRON=m
+CONFIG_PATA_LEGACY=m
+CONFIG_PATA_TRIFLEX=m
+CONFIG_PATA_MARVELL=m
+CONFIG_PATA_MPIIX=m
+CONFIG_PATA_OLDPIIX=m
+CONFIG_PATA_NETCELL=m
+CONFIG_PATA_NINJA32=m
+CONFIG_PATA_NS87410=m
+CONFIG_PATA_NS87415=m
+CONFIG_PATA_OPTI=m
+CONFIG_PATA_OPTIDMA=m
+CONFIG_PATA_PCMCIA=m
+CONFIG_PATA_PDC_OLD=m
+CONFIG_PATA_QDI=m
+CONFIG_PATA_RADISYS=m
+CONFIG_PATA_RZ1000=m
+CONFIG_PATA_SC1200=m
+CONFIG_PATA_SERVERWORKS=m
+CONFIG_PATA_PDC2027X=m
+CONFIG_PATA_SIL680=m
+CONFIG_PATA_SIS=m
+CONFIG_PATA_VIA=m
+CONFIG_PATA_WINBOND=m
+CONFIG_PATA_WINBOND_VLB=m
+CONFIG_PATA_PLATFORM=m
+CONFIG_PATA_SCH=m
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+# CONFIG_MD_AUTODETECT is not set
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID6_PQ=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_LOG_USERSPACE=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_QL=m
+CONFIG_DM_MULTIPATH_ST=m
+CONFIG_DM_DELAY=m
+# CONFIG_DM_UEVENT is not set
+CONFIG_FUSION=y
+CONFIG_FUSION_SPI=m
+CONFIG_FUSION_FC=m
+CONFIG_FUSION_SAS=m
+CONFIG_FUSION_MAX_SGE=128
+CONFIG_FUSION_CTL=m
+# CONFIG_FUSION_LOGGING is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# You can enable one or both FireWire driver stacks.
+#
+
+#
+# See the help texts for more information.
+#
+CONFIG_FIREWIRE=m
+CONFIG_FIREWIRE_OHCI=m
+CONFIG_FIREWIRE_OHCI_DEBUG=y
+CONFIG_FIREWIRE_SBP2=m
+CONFIG_FIREWIRE_NET=m
+CONFIG_IEEE1394=m
+CONFIG_IEEE1394_OHCI1394=m
+CONFIG_IEEE1394_PCILYNX=m
+CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_RAWIO=m
+CONFIG_IEEE1394_VIDEO1394=m
+CONFIG_IEEE1394_DV1394=m
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_I2O=m
+CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
+CONFIG_I2O_EXT_ADAPTEC=y
+CONFIG_I2O_CONFIG=m
+CONFIG_I2O_CONFIG_OLD_IOCTL=y
+CONFIG_I2O_BUS=m
+CONFIG_I2O_BLOCK=m
+CONFIG_I2O_SCSI=m
+CONFIG_I2O_PROC=m
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_NETDEVICES=y
+CONFIG_IFB=m
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_MACVLAN=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_VETH=m
+CONFIG_NET_SB1000=m
+CONFIG_ARCNET=m
+CONFIG_ARCNET_1201=m
+CONFIG_ARCNET_1051=m
+CONFIG_ARCNET_RAW=m
+CONFIG_ARCNET_CAP=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_PHYLIB=m
+
+#
+# MII PHY device drivers
+#
+CONFIG_MARVELL_PHY=m
+CONFIG_DAVICOM_PHY=m
+CONFIG_QSEMI_PHY=m
+CONFIG_LXT_PHY=m
+CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
+CONFIG_BROADCOM_PHY=m
+CONFIG_ICPLUS_PHY=m
+CONFIG_REALTEK_PHY=m
+CONFIG_NATIONAL_PHY=m
+CONFIG_STE10XP=m
+CONFIG_LSI_ET1011C_PHY=m
+CONFIG_MDIO_BITBANG=m
+CONFIG_MDIO_GPIO=m
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
+CONFIG_CASSINI=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_EL1=m
+CONFIG_EL2=m
+CONFIG_ELPLUS=m
+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_SMC9194=m
+CONFIG_ENC28J60=m
+# CONFIG_ENC28J60_WRITEVERIFY is not set
+CONFIG_ETHOC=m
+CONFIG_NET_VENDOR_RACAL=y
+CONFIG_NI52=m
+CONFIG_NI65=m
+CONFIG_DNET=m
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_DE2104X_DSL=0
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+# CONFIG_TULIP_NAPI is not set
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_ULI526X=m
+CONFIG_PCMCIA_XIRCOM=m
+CONFIG_AT1700=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_HPLAN_PLUS=m
+CONFIG_HPLAN=m
+CONFIG_LP486E=m
+CONFIG_ETH16I=m
+CONFIG_NE2000=m
+CONFIG_ZNET=m
+CONFIG_SEEQ8005=m
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_AMD8111_ETH=m
+CONFIG_ADAPTEC_STARFIRE=m
+CONFIG_AC3200=m
+CONFIG_APRICOT=m
+CONFIG_B44=m
+CONFIG_B44_PCI_AUTOSELECT=y
+CONFIG_B44_PCICORE_AUTOSELECT=y
+CONFIG_B44_PCI=y
+CONFIG_FORCEDETH=m
+# CONFIG_FORCEDETH_NAPI is not set
+CONFIG_CS89x0=m
+CONFIG_E100=m
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+CONFIG_8139TOO_PIO=y
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+# CONFIG_8139TOO_8129 is not set
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_R6040=m
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SMSC9420=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_TLAN=m
+CONFIG_KS8842=m
+CONFIG_KS8851=m
+CONFIG_VIA_RHINE=m
+# CONFIG_VIA_RHINE_MMIO is not set
+CONFIG_SC92031=m
+CONFIG_NET_POCKET=y
+CONFIG_ATP=m
+CONFIG_DE600=m
+CONFIG_DE620=m
+CONFIG_ATL2=m
+CONFIG_NETDEV_1000=y
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000E=m
+CONFIG_IP1000=m
+CONFIG_IGB=m
+CONFIG_IGB_DCA=y
+CONFIG_IGBVF=m
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_VLAN=y
+CONFIG_SIS190=m
+CONFIG_SKGE=m
+# CONFIG_SKGE_DEBUG is not set
+CONFIG_SKY2=m
+# CONFIG_SKY2_DEBUG is not set
+CONFIG_VIA_VELOCITY=m
+CONFIG_TIGON3=m
+CONFIG_BNX2=m
+CONFIG_CNIC=m
+CONFIG_QLA3XXX=m
+CONFIG_ATL1=m
+CONFIG_ATL1E=m
+CONFIG_ATL1C=m
+CONFIG_JME=m
+CONFIG_NETDEV_10000=y
+CONFIG_MDIO=m
+CONFIG_CHELSIO_T1=m
+CONFIG_CHELSIO_T1_1G=y
+CONFIG_CHELSIO_T3_DEPENDS=y
+CONFIG_CHELSIO_T3=m
+CONFIG_ENIC=m
+CONFIG_IXGBE=m
+CONFIG_IXGBE_DCA=y
+CONFIG_IXGB=m
+CONFIG_S2IO=m
+CONFIG_VXGE=m
+# CONFIG_VXGE_DEBUG_TRACE_ALL is not set
+CONFIG_MYRI10GE=m
+CONFIG_MYRI10GE_DCA=y
+CONFIG_NETXEN_NIC=m
+CONFIG_NIU=m
+CONFIG_MLX4_EN=m
+CONFIG_MLX4_CORE=m
+CONFIG_MLX4_DEBUG=y
+CONFIG_TEHUTI=m
+CONFIG_BNX2X=m
+CONFIG_QLGE=m
+CONFIG_SFC=m
+CONFIG_SFC_MTD=y
+CONFIG_BE2NET=m
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+CONFIG_WLAN_PRE80211=y
+CONFIG_STRIP=m
+CONFIG_ARLAN=m
+CONFIG_WAVELAN=m
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+CONFIG_WLAN_80211=y
+CONFIG_PCMCIA_RAYCS=m
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+CONFIG_LIBERTAS_CS=m
+CONFIG_LIBERTAS_SDIO=m
+CONFIG_LIBERTAS_SPI=m
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_LIBERTAS_THINFIRM=m
+CONFIG_LIBERTAS_THINFIRM_USB=m
+CONFIG_AIRO=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_AT76C50X_USB=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_PRISM54=m
+CONFIG_USB_ZD1201=m
+CONFIG_USB_NET_RNDIS_WLAN=m
+CONFIG_RTL8180=m
+CONFIG_RTL8187=m
+CONFIG_RTL8187_LEDS=y
+CONFIG_ADM8211=m
+CONFIG_MAC80211_HWSIM=m
+CONFIG_MWL8K=m
+CONFIG_P54_COMMON=m
+CONFIG_P54_USB=m
+CONFIG_P54_PCI=m
+CONFIG_P54_SPI=m
+CONFIG_P54_LEDS=y
+CONFIG_ATH_COMMON=m
+CONFIG_ATH5K=m
+# CONFIG_ATH5K_DEBUG is not set
+CONFIG_ATH9K=m
+# CONFIG_ATH9K_DEBUG is not set
+CONFIG_AR9170_USB=m
+CONFIG_AR9170_LEDS=y
+CONFIG_IPW2100=m
+CONFIG_IPW2100_MONITOR=y
+# CONFIG_IPW2100_DEBUG is not set
+CONFIG_IPW2200=m
+CONFIG_IPW2200_MONITOR=y
+CONFIG_IPW2200_RADIOTAP=y
+CONFIG_IPW2200_PROMISCUOUS=y
+CONFIG_IPW2200_QOS=y
+# CONFIG_IPW2200_DEBUG is not set
+CONFIG_LIBIPW=m
+# CONFIG_LIBIPW_DEBUG is not set
+CONFIG_IWLWIFI=m
+# CONFIG_IWLWIFI_LEDS is not set
+# CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT is not set
+# CONFIG_IWLWIFI_DEBUG is not set
+CONFIG_IWLAGN=m
+CONFIG_IWL4965=y
+CONFIG_IWL5000=y
+CONFIG_IWL3945=m
+# CONFIG_IWL3945_SPECTRUM_MEASUREMENT is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+CONFIG_HOSTAP_PLX=m
+CONFIG_HOSTAP_PCI=m
+CONFIG_HOSTAP_CS=m
+CONFIG_B43=m
+CONFIG_B43_PCI_AUTOSELECT=y
+CONFIG_B43_PCICORE_AUTOSELECT=y
+CONFIG_B43_PCMCIA=y
+CONFIG_B43_PIO=y
+CONFIG_B43_LEDS=y
+CONFIG_B43_HWRNG=y
+# CONFIG_B43_DEBUG is not set
+CONFIG_B43LEGACY=m
+CONFIG_B43LEGACY_PCI_AUTOSELECT=y
+CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
+CONFIG_B43LEGACY_LEDS=y
+CONFIG_B43LEGACY_HWRNG=y
+CONFIG_B43LEGACY_DEBUG=y
+CONFIG_B43LEGACY_DMA=y
+CONFIG_B43LEGACY_PIO=y
+CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
+# CONFIG_B43LEGACY_DMA_MODE is not set
+# CONFIG_B43LEGACY_PIO_MODE is not set
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
+CONFIG_RT2X00=m
+CONFIG_RT2400PCI=m
+CONFIG_RT2500PCI=m
+CONFIG_RT61PCI=m
+CONFIG_RT2500USB=m
+CONFIG_RT73USB=m
+CONFIG_RT2800USB=m
+CONFIG_RT2X00_LIB_PCI=m
+CONFIG_RT2X00_LIB_USB=m
+CONFIG_RT2X00_LIB=m
+CONFIG_RT2X00_LIB_HT=y
+CONFIG_RT2X00_LIB_FIRMWARE=y
+CONFIG_RT2X00_LIB_CRYPTO=y
+CONFIG_RT2X00_LIB_RFKILL=y
+CONFIG_RT2X00_LIB_LEDS=y
+# CONFIG_RT2X00_DEBUG is not set
+CONFIG_HERMES=m
+CONFIG_HERMES_CACHE_FW_ON_INIT=y
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_NORTEL_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+CONFIG_WL12XX=m
+CONFIG_IWM=m
+# CONFIG_IWM_DEBUG is not set
+
+#
+# WiMAX Wireless Broadband devices
+#
+CONFIG_WIMAX_I2400M=m
+CONFIG_WIMAX_I2400M_USB=m
+CONFIG_WIMAX_I2400M_SDIO=m
+CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_CDC_EEM=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_SMSC95XX=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_NET_CDC_SUBSET=m
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_KC2190=y
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_USB_HSO=m
+CONFIG_USB_NET_INT51X1=m
+CONFIG_USB_CDC_PHONET=m
+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_WAN=y
+CONFIG_HOSTESS_SV11=m
+CONFIG_COSA=m
+CONFIG_LANMEDIA=m
+CONFIG_SEALEVEL_4021=m
+CONFIG_HDLC=m
+CONFIG_HDLC_RAW=m
+CONFIG_HDLC_RAW_ETH=m
+CONFIG_HDLC_CISCO=m
+CONFIG_HDLC_FR=m
+CONFIG_HDLC_PPP=m
+CONFIG_HDLC_X25=m
+CONFIG_PCI200SYN=m
+CONFIG_WANXL=m
+# CONFIG_WANXL_BUILD_FIRMWARE is not set
+CONFIG_PC300TOO=m
+CONFIG_N2=m
+CONFIG_C101=m
+CONFIG_FARSYNC=m
+CONFIG_DSCC4=m
+CONFIG_DSCC4_PCISYNC=y
+CONFIG_DSCC4_PCI_RST=y
+CONFIG_DLCI=m
+CONFIG_DLCI_MAX=8
+CONFIG_SDLA=m
+CONFIG_WAN_ROUTER_DRIVERS=m
+CONFIG_CYCLADES_SYNC=m
+CONFIG_CYCLOMX_X25=y
+CONFIG_LAPBETHER=m
+CONFIG_X25_ASY=m
+CONFIG_SBNI=m
+CONFIG_SBNI_MULTILINE=y
+CONFIG_ATM_DRIVERS=y
+CONFIG_ATM_DUMMY=m
+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_NICSTAR=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=m
+CONFIG_ATM_FORE200E_USE_TASKLET=y
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_HE=m
+CONFIG_ATM_HE_USE_SUNI=y
+CONFIG_ATM_SOLOS=m
+CONFIG_IEEE802154_DRIVERS=m
+CONFIG_IEEE802154_FAKEHARD=m
+CONFIG_FDDI=y
+CONFIG_DEFXX=m
+# CONFIG_DEFXX_MMIO 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_PPPOL2TP=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLHC=m
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+# CONFIG_NET_FC is not set
+CONFIG_NETCONSOLE=m
+CONFIG_NETCONSOLE_DYNAMIC=y
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
+CONFIG_VIRTIO_NET=m
+CONFIG_ISDN=y
+CONFIG_MISDN=m
+CONFIG_MISDN_DSP=m
+CONFIG_MISDN_L1OIP=m
+
+#
+# mISDN hardware drivers
+#
+CONFIG_MISDN_HFCPCI=m
+CONFIG_MISDN_HFCMULTI=m
+CONFIG_MISDN_HFCUSB=m
+# CONFIG_ISDN_I4L is not set
+CONFIG_ISDN_CAPI=m
+# CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set
+# CONFIG_CAPI_TRACE is not set
+CONFIG_ISDN_CAPI_MIDDLEWARE=y
+CONFIG_ISDN_CAPI_CAPI20=m
+CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
+CONFIG_ISDN_CAPI_CAPIFS=m
+
+#
+# CAPI hardware drivers
+#
+CONFIG_CAPI_AVM=y
+CONFIG_ISDN_DRV_AVMB1_B1ISA=m
+CONFIG_ISDN_DRV_AVMB1_B1PCI=m
+CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
+CONFIG_ISDN_DRV_AVMB1_T1ISA=m
+CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
+CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
+CONFIG_ISDN_DRV_AVMB1_T1PCI=m
+CONFIG_ISDN_DRV_AVMB1_C4=m
+CONFIG_CAPI_EICON=y
+CONFIG_ISDN_DIVAS=m
+CONFIG_ISDN_DIVAS_BRIPCI=y
+CONFIG_ISDN_DIVAS_PRIPCI=y
+CONFIG_ISDN_DIVAS_DIVACAPI=m
+CONFIG_ISDN_DIVAS_USERIDI=m
+CONFIG_ISDN_DIVAS_MAINT=m
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=m
+CONFIG_INPUT_POLLDEV=m
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_EVDEV=m
+CONFIG_INPUT_EVBUG=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_LKKBD=m
+CONFIG_KEYBOARD_GPIO=m
+CONFIG_KEYBOARD_MATRIX=m
+CONFIG_KEYBOARD_LM8323=m
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_KEYBOARD_STOWAWAY=m
+CONFIG_KEYBOARD_SUNKBD=m
+CONFIG_KEYBOARD_XTKBD=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_APPLETOUCH=m
+CONFIG_MOUSE_BCM5974=m
+CONFIG_MOUSE_INPORT=m
+# CONFIG_MOUSE_ATIXL is not set
+CONFIG_MOUSE_LOGIBM=m
+CONFIG_MOUSE_PC110PAD=m
+CONFIG_MOUSE_VSXXXAA=m
+CONFIG_MOUSE_GPIO=m
+CONFIG_MOUSE_SYNAPTICS_I2C=m
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=m
+CONFIG_TOUCHSCREEN_AD7877=m
+CONFIG_TOUCHSCREEN_AD7879_I2C=m
+CONFIG_TOUCHSCREEN_AD7879=m
+CONFIG_TOUCHSCREEN_EETI=m
+CONFIG_TOUCHSCREEN_FUJITSU=m
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_TOUCHSCREEN_ELO=m
+CONFIG_TOUCHSCREEN_WACOM_W8001=m
+CONFIG_TOUCHSCREEN_MTOUCH=m
+CONFIG_TOUCHSCREEN_INEXIO=m
+CONFIG_TOUCHSCREEN_MK712=m
+CONFIG_TOUCHSCREEN_HTCPEN=m
+CONFIG_TOUCHSCREEN_PENMOUNT=m
+CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
+CONFIG_TOUCHSCREEN_TOUCHWIN=m
+CONFIG_TOUCHSCREEN_UCB1400=m
+CONFIG_TOUCHSCREEN_WM97XX=m
+CONFIG_TOUCHSCREEN_WM9705=y
+CONFIG_TOUCHSCREEN_WM9712=y
+CONFIG_TOUCHSCREEN_WM9713=y
+CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
+CONFIG_TOUCHSCREEN_USB_EGALAX=y
+CONFIG_TOUCHSCREEN_USB_PANJIT=y
+CONFIG_TOUCHSCREEN_USB_3M=y
+CONFIG_TOUCHSCREEN_USB_ITM=y
+CONFIG_TOUCHSCREEN_USB_ETURBO=y
+CONFIG_TOUCHSCREEN_USB_GUNZE=y
+CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
+CONFIG_TOUCHSCREEN_USB_IRTOUCH=y
+CONFIG_TOUCHSCREEN_USB_IDEALTEK=y
+CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
+CONFIG_TOUCHSCREEN_USB_GOTOP=y
+CONFIG_TOUCHSCREEN_TOUCHIT213=m
+CONFIG_TOUCHSCREEN_TSC2007=m
+CONFIG_TOUCHSCREEN_W90X900=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_APANEL=m
+CONFIG_INPUT_WISTRON_BTNS=m
+CONFIG_INPUT_ATLAS_BTNS=m
+CONFIG_INPUT_ATI_REMOTE=m
+CONFIG_INPUT_ATI_REMOTE2=m
+CONFIG_INPUT_KEYSPAN_REMOTE=m
+CONFIG_INPUT_POWERMATE=m
+CONFIG_INPUT_YEALINK=m
+CONFIG_INPUT_CM109=m
+CONFIG_INPUT_UINPUT=m
+CONFIG_INPUT_PCF50633_PMU=m
+CONFIG_INPUT_GPIO_ROTARY_ENCODER=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_SERIO_CT82C710=m
+CONFIG_SERIO_PARKBD=m
+CONFIG_SERIO_PCIPS2=m
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_RAW=m
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_DEVKMEM 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_MOXA_INTELLIO=m
+CONFIG_MOXA_SMARTIO=m
+CONFIG_ISI=m
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_SYNCLINK_GT=m
+CONFIG_N_HDLC=m
+CONFIG_RISCOM8=m
+CONFIG_SPECIALIX=m
+CONFIG_SX=m
+CONFIG_RIO=m
+CONFIG_RIO_OLDPCI=y
+CONFIG_STALDRV=y
+CONFIG_STALLION=m
+CONFIG_ISTALLION=m
+CONFIG_NOZOMI=m
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=16
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_FOURPORT=m
+CONFIG_SERIAL_8250_ACCENT=m
+CONFIG_SERIAL_8250_BOCA=m
+CONFIG_SERIAL_8250_EXAR_ST16C554=m
+CONFIG_SERIAL_8250_HUB6=m
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_MAX3100=m
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_JSM=m
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+CONFIG_PPDEV=m
+CONFIG_HVC_DRIVER=y
+CONFIG_VIRTIO_CONSOLE=y
+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
+CONFIG_HW_RANDOM=m
+CONFIG_HW_RANDOM_TIMERIOMEM=m
+CONFIG_HW_RANDOM_INTEL=m
+CONFIG_HW_RANDOM_AMD=m
+CONFIG_HW_RANDOM_GEODE=m
+CONFIG_HW_RANDOM_VIA=m
+CONFIG_HW_RANDOM_VIRTIO=m
+CONFIG_NVRAM=m
+CONFIG_DTLK=m
+CONFIG_R3964=m
+CONFIG_APPLICOM=m
+CONFIG_SONYPI=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_SYNCLINK_CS=m
+CONFIG_CARDMAN_4000=m
+CONFIG_CARDMAN_4040=m
+CONFIG_IPWIRELESS=m
+CONFIG_MWAVE=m
+CONFIG_SCx200_GPIO=m
+CONFIG_PC8736x_GPIO=m
+CONFIG_NSC_GPIO=m
+CONFIG_CS5535_GPIO=m
+CONFIG_RAW_DRIVER=m
+CONFIG_MAX_RAW_DEVS=256
+CONFIG_HPET=y
+CONFIG_HPET_MMAP=y
+CONFIG_HANGCHECK_TIMER=m
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+CONFIG_TCG_INFINEON=m
+CONFIG_TELCLOCK=m
+CONFIG_DEVPORT=y
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# PC SMBus host controller drivers
+#
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI1563=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD756_S4882=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_ISCH=m
+CONFIG_I2C_PIIX4=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_NFORCE2_S4985=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_GPIO=m
+CONFIG_I2C_OCORES=m
+CONFIG_I2C_SIMTEC=m
+
+#
+# External I2C/SMBus adapter drivers
+#
+CONFIG_I2C_PARPORT=m
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_TAOS_EVM=m
+CONFIG_I2C_TINY_USB=m
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
+CONFIG_I2C_VOODOO3=m
+
+#
+# Other I2C/SMBus bus drivers
+#
+CONFIG_I2C_PCA_ISA=m
+CONFIG_I2C_PCA_PLATFORM=m
+CONFIG_I2C_STUB=m
+CONFIG_SCx200_I2C=m
+CONFIG_SCx200_I2C_SCL=12
+CONFIG_SCx200_I2C_SDA=13
+CONFIG_SCx200_ACB=m
+
+#
+# Miscellaneous I2C Chip support
+#
+CONFIG_DS1682=m
+CONFIG_SENSORS_TSL2550=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
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=m
+CONFIG_SPI_BUTTERFLY=m
+CONFIG_SPI_GPIO=m
+CONFIG_SPI_LM70_LLP=m
+
+#
+# SPI Protocol Masters
+#
+CONFIG_SPI_SPIDEV=m
+CONFIG_SPI_TLE62X0=m
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+CONFIG_GPIO_MAX732X=m
+CONFIG_GPIO_PCA953X=m
+CONFIG_GPIO_PCF857X=m
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+CONFIG_GPIO_MAX7301=m
+CONFIG_GPIO_MCP23S08=m
+CONFIG_W1=m
+CONFIG_W1_CON=y
+
+#
+# 1-wire Bus Masters
+#
+CONFIG_W1_MASTER_MATROX=m
+CONFIG_W1_MASTER_DS2490=m
+CONFIG_W1_MASTER_DS2482=m
+CONFIG_W1_MASTER_GPIO=m
+
+#
+# 1-wire Slaves
+#
+CONFIG_W1_SLAVE_THERM=m
+CONFIG_W1_SLAVE_SMEM=m
+CONFIG_W1_SLAVE_DS2431=m
+CONFIG_W1_SLAVE_DS2433=m
+# CONFIG_W1_SLAVE_DS2433_CRC is not set
+CONFIG_W1_SLAVE_DS2760=m
+CONFIG_W1_SLAVE_BQ27000=m
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=m
+CONFIG_WM8350_POWER=m
+CONFIG_BATTERY_DS2760=m
+CONFIG_BATTERY_DS2782=m
+CONFIG_BATTERY_BQ27x00=m
+CONFIG_BATTERY_MAX17040=m
+CONFIG_CHARGER_PCF50633=m
+CONFIG_HWMON=m
+CONFIG_HWMON_VID=m
+CONFIG_SENSORS_ABITUGURU=m
+CONFIG_SENSORS_ABITUGURU3=m
+CONFIG_SENSORS_AD7414=m
+CONFIG_SENSORS_AD7418=m
+CONFIG_SENSORS_ADCXX=m
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+CONFIG_SENSORS_ADM1026=m
+CONFIG_SENSORS_ADM1029=m
+CONFIG_SENSORS_ADM1031=m
+CONFIG_SENSORS_ADM9240=m
+CONFIG_SENSORS_ADT7462=m
+CONFIG_SENSORS_ADT7470=m
+CONFIG_SENSORS_ADT7473=m
+CONFIG_SENSORS_ADT7475=m
+CONFIG_SENSORS_K8TEMP=m
+CONFIG_SENSORS_ASB100=m
+CONFIG_SENSORS_ATK0110=m
+CONFIG_SENSORS_ATXP1=m
+CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_I5K_AMB=m
+CONFIG_SENSORS_F71805F=m
+CONFIG_SENSORS_F71882FG=m
+CONFIG_SENSORS_F75375S=m
+CONFIG_SENSORS_FSCHER=m
+CONFIG_SENSORS_FSCPOS=m
+CONFIG_SENSORS_FSCHMD=m
+CONFIG_SENSORS_G760A=m
+CONFIG_SENSORS_GL518SM=m
+CONFIG_SENSORS_GL520SM=m
+CONFIG_SENSORS_CORETEMP=m
+CONFIG_SENSORS_IBMAEM=m
+CONFIG_SENSORS_IBMPEX=m
+CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_LM63=m
+CONFIG_SENSORS_LM70=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_LM87=m
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_LM92=m
+CONFIG_SENSORS_LM93=m
+CONFIG_SENSORS_LTC4215=m
+CONFIG_SENSORS_LTC4245=m
+CONFIG_SENSORS_LM95241=m
+CONFIG_SENSORS_MAX1111=m
+CONFIG_SENSORS_MAX1619=m
+CONFIG_SENSORS_MAX6650=m
+CONFIG_SENSORS_PC87360=m
+CONFIG_SENSORS_PC87427=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_SHT15=m
+CONFIG_SENSORS_SIS5595=m
+CONFIG_SENSORS_DME1737=m
+CONFIG_SENSORS_SMSC47M1=m
+CONFIG_SENSORS_SMSC47M192=m
+CONFIG_SENSORS_SMSC47B397=m
+CONFIG_SENSORS_ADS7828=m
+CONFIG_SENSORS_THMC50=m
+CONFIG_SENSORS_TMP401=m
+CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_VT1211=m
+CONFIG_SENSORS_VT8231=m
+CONFIG_SENSORS_W83781D=m
+CONFIG_SENSORS_W83791D=m
+CONFIG_SENSORS_W83792D=m
+CONFIG_SENSORS_W83793=m
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83L786NG=m
+CONFIG_SENSORS_W83627HF=m
+CONFIG_SENSORS_W83627EHF=m
+CONFIG_SENSORS_HDAPS=m
+CONFIG_SENSORS_LIS3LV02D=m
+CONFIG_SENSORS_APPLESMC=m
+# CONFIG_HWMON_DEBUG_CHIP is not set
+CONFIG_THERMAL=y
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+CONFIG_WM8350_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_IBMASR=m
+CONFIG_WAFER_WDT=m
+CONFIG_I6300ESB_WDT=m
+CONFIG_ITCO_WDT=m
+CONFIG_ITCO_VENDOR_SUPPORT=y
+CONFIG_IT8712F_WDT=m
+CONFIG_IT87_WDT=m
+CONFIG_HP_WATCHDOG=m
+CONFIG_SC1200_WDT=m
+CONFIG_SCx200_WDT=m
+CONFIG_PC87413_WDT=m
+CONFIG_60XX_WDT=m
+CONFIG_SBC8360_WDT=m
+CONFIG_SBC7240_WDT=m
+CONFIG_CPU5_WDT=m
+CONFIG_SMSC_SCH311X_WDT=m
+CONFIG_SMSC37B787_WDT=m
+CONFIG_W83627HF_WDT=m
+CONFIG_W83697HF_WDT=m
+CONFIG_W83697UG_WDT=m
+CONFIG_W83877F_WDT=m
+CONFIG_W83977F_WDT=m
+CONFIG_MACHZ_WDT=m
+CONFIG_SBC_EPX_C3_WATCHDOG=m
+
+#
+# ISA-based Watchdog Cards
+#
+CONFIG_PCWATCHDOG=m
+CONFIG_MIXCOMWD=m
+CONFIG_WDT=m
+
+#
+# PCI-based Watchdog Cards
+#
+CONFIG_PCIPCWATCHDOG=m
+CONFIG_WDTPCI=m
+
+#
+# USB-based Watchdog Cards
+#
+CONFIG_USBPCWATCHDOG=m
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB=m
+CONFIG_SSB_SPROM=y
+CONFIG_SSB_BLOCKIO=y
+CONFIG_SSB_PCIHOST_POSSIBLE=y
+CONFIG_SSB_PCIHOST=y
+CONFIG_SSB_B43_PCI_BRIDGE=y
+CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
+CONFIG_SSB_PCMCIAHOST=y
+# CONFIG_SSB_SILENT is not set
+# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
+CONFIG_SSB_DRIVER_PCICORE=y
+
+#
+# Multifunction device drivers
+#
+CONFIG_MFD_CORE=m
+CONFIG_MFD_SM501=m
+# CONFIG_MFD_SM501_GPIO is not set
+CONFIG_HTC_PASIC3=m
+CONFIG_UCB1400_CORE=m
+CONFIG_TPS65010=m
+# CONFIG_MFD_TMIO is not set
+CONFIG_MFD_WM8400=m
+CONFIG_MFD_WM8350=m
+CONFIG_MFD_WM8350_I2C=m
+CONFIG_MFD_PCF50633=m
+CONFIG_PCF50633_ADC=m
+CONFIG_PCF50633_GPIO=m
+CONFIG_AB3100_CORE=m
+# CONFIG_EZX_PCAP is not set
+CONFIG_REGULATOR=y
+# CONFIG_REGULATOR_DEBUG is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+CONFIG_REGULATOR_VIRTUAL_CONSUMER=m
+CONFIG_REGULATOR_USERSPACE_CONSUMER=m
+CONFIG_REGULATOR_BQ24022=m
+CONFIG_REGULATOR_MAX1586=m
+CONFIG_REGULATOR_WM8350=m
+CONFIG_REGULATOR_WM8400=m
+CONFIG_REGULATOR_PCF50633=m
+CONFIG_REGULATOR_LP3971=m
+CONFIG_MEDIA_SUPPORT=m
+
+#
+# Multimedia core support
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L2_COMMON=m
+# CONFIG_VIDEO_ALLOW_V4L1 is not set
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_DVB_CORE=m
+CONFIG_VIDEO_MEDIA=m
+
+#
+# Multimedia drivers
+#
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=m
+# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
+CONFIG_MEDIA_TUNER_SIMPLE=m
+CONFIG_MEDIA_TUNER_TDA8290=m
+CONFIG_MEDIA_TUNER_TDA827X=m
+CONFIG_MEDIA_TUNER_TDA18271=m
+CONFIG_MEDIA_TUNER_TDA9887=m
+CONFIG_MEDIA_TUNER_TEA5761=m
+CONFIG_MEDIA_TUNER_TEA5767=m
+CONFIG_MEDIA_TUNER_MT20XX=m
+CONFIG_MEDIA_TUNER_MT2060=m
+CONFIG_MEDIA_TUNER_MT2266=m
+CONFIG_MEDIA_TUNER_MT2131=m
+CONFIG_MEDIA_TUNER_QT1010=m
+CONFIG_MEDIA_TUNER_XC2028=m
+CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_MEDIA_TUNER_MXL5005S=m
+CONFIG_MEDIA_TUNER_MXL5007T=m
+CONFIG_MEDIA_TUNER_MC44S803=m
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEOBUF_DMA_SG=m
+CONFIG_VIDEOBUF_VMALLOC=m
+CONFIG_VIDEOBUF_DVB=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR=m
+CONFIG_VIDEO_TVEEPROM=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
+CONFIG_VIDEO_IR_I2C=m
+
+#
+# Encoders/decoders and other helper chips
+#
+
+#
+# Audio decoders
+#
+CONFIG_VIDEO_TVAUDIO=m
+CONFIG_VIDEO_TDA7432=m
+CONFIG_VIDEO_TDA9840=m
+CONFIG_VIDEO_TDA9875=m
+CONFIG_VIDEO_TEA6415C=m
+CONFIG_VIDEO_TEA6420=m
+CONFIG_VIDEO_MSP3400=m
+CONFIG_VIDEO_CS5345=m
+CONFIG_VIDEO_CS53L32A=m
+CONFIG_VIDEO_M52790=m
+CONFIG_VIDEO_TLV320AIC23B=m
+CONFIG_VIDEO_WM8775=m
+CONFIG_VIDEO_WM8739=m
+CONFIG_VIDEO_VP27SMPX=m
+
+#
+# RDS decoders
+#
+CONFIG_VIDEO_SAA6588=m
+
+#
+# Video decoders
+#
+CONFIG_VIDEO_BT819=m
+CONFIG_VIDEO_BT856=m
+CONFIG_VIDEO_BT866=m
+CONFIG_VIDEO_KS0127=m
+CONFIG_VIDEO_OV7670=m
+CONFIG_VIDEO_MT9V011=m
+CONFIG_VIDEO_TCM825X=m
+CONFIG_VIDEO_SAA7110=m
+CONFIG_VIDEO_SAA711X=m
+CONFIG_VIDEO_SAA717X=m
+CONFIG_VIDEO_TVP514X=m
+CONFIG_VIDEO_TVP5150=m
+CONFIG_VIDEO_VPX3220=m
+
+#
+# Video and audio decoders
+#
+CONFIG_VIDEO_CX25840=m
+
+#
+# MPEG video encoders
+#
+CONFIG_VIDEO_CX2341X=m
+
+#
+# Video encoders
+#
+CONFIG_VIDEO_SAA7127=m
+CONFIG_VIDEO_SAA7185=m
+CONFIG_VIDEO_ADV7170=m
+CONFIG_VIDEO_ADV7175=m
+CONFIG_VIDEO_THS7303=m
+CONFIG_VIDEO_ADV7343=m
+
+#
+# Video improvement chips
+#
+CONFIG_VIDEO_UPD64031A=m
+CONFIG_VIDEO_UPD64083=m
+CONFIG_VIDEO_VIVI=m
+CONFIG_VIDEO_BT848=m
+CONFIG_VIDEO_BT848_DVB=y
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+CONFIG_VIDEO_ZORAN=m
+CONFIG_VIDEO_ZORAN_DC30=m
+CONFIG_VIDEO_ZORAN_ZR36060=m
+CONFIG_VIDEO_ZORAN_BUZ=m
+CONFIG_VIDEO_ZORAN_DC10=m
+CONFIG_VIDEO_ZORAN_LML33=m
+CONFIG_VIDEO_ZORAN_LML33R10=m
+CONFIG_VIDEO_ZORAN_AVS6EYES=m
+CONFIG_VIDEO_SAA7134=m
+CONFIG_VIDEO_SAA7134_ALSA=m
+CONFIG_VIDEO_SAA7134_DVB=m
+CONFIG_VIDEO_HEXIUM_ORION=m
+CONFIG_VIDEO_HEXIUM_GEMINI=m
+CONFIG_VIDEO_CX88=m
+CONFIG_VIDEO_CX88_ALSA=m
+CONFIG_VIDEO_CX88_BLACKBIRD=m
+CONFIG_VIDEO_CX88_DVB=m
+CONFIG_VIDEO_CX88_MPEG=m
+CONFIG_VIDEO_CX88_VP3054=m
+CONFIG_VIDEO_CX23885=m
+CONFIG_VIDEO_AU0828=m
+CONFIG_VIDEO_IVTV=m
+CONFIG_VIDEO_FB_IVTV=m
+CONFIG_VIDEO_CX18=m
+CONFIG_VIDEO_CAFE_CCIC=m
+CONFIG_SOC_CAMERA=m
+CONFIG_SOC_CAMERA_MT9M001=m
+CONFIG_SOC_CAMERA_MT9M111=m
+CONFIG_SOC_CAMERA_MT9T031=m
+CONFIG_SOC_CAMERA_MT9V022=m
+CONFIG_SOC_CAMERA_TW9910=m
+CONFIG_SOC_CAMERA_PLATFORM=m
+CONFIG_SOC_CAMERA_OV772X=m
+CONFIG_V4L_USB_DRIVERS=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
+CONFIG_USB_GSPCA=m
+CONFIG_USB_M5602=m
+CONFIG_USB_STV06XX=m
+CONFIG_USB_GSPCA_CONEX=m
+CONFIG_USB_GSPCA_ETOMS=m
+CONFIG_USB_GSPCA_FINEPIX=m
+CONFIG_USB_GSPCA_MARS=m
+CONFIG_USB_GSPCA_MR97310A=m
+CONFIG_USB_GSPCA_OV519=m
+CONFIG_USB_GSPCA_OV534=m
+CONFIG_USB_GSPCA_PAC207=m
+CONFIG_USB_GSPCA_PAC7311=m
+CONFIG_USB_GSPCA_SN9C20X=m
+CONFIG_USB_GSPCA_SN9C20X_EVDEV=y
+CONFIG_USB_GSPCA_SONIXB=m
+CONFIG_USB_GSPCA_SONIXJ=m
+CONFIG_USB_GSPCA_SPCA500=m
+CONFIG_USB_GSPCA_SPCA501=m
+CONFIG_USB_GSPCA_SPCA505=m
+CONFIG_USB_GSPCA_SPCA506=m
+CONFIG_USB_GSPCA_SPCA508=m
+CONFIG_USB_GSPCA_SPCA561=m
+CONFIG_USB_GSPCA_SQ905=m
+CONFIG_USB_GSPCA_SQ905C=m
+CONFIG_USB_GSPCA_STK014=m
+CONFIG_USB_GSPCA_SUNPLUS=m
+CONFIG_USB_GSPCA_T613=m
+CONFIG_USB_GSPCA_TV8532=m
+CONFIG_USB_GSPCA_VC032X=m
+CONFIG_USB_GSPCA_ZC3XX=m
+CONFIG_VIDEO_PVRUSB2=m
+CONFIG_VIDEO_PVRUSB2_SYSFS=y
+CONFIG_VIDEO_PVRUSB2_DVB=y
+# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
+CONFIG_VIDEO_HDPVR=m
+CONFIG_VIDEO_EM28XX=m
+CONFIG_VIDEO_EM28XX_ALSA=m
+CONFIG_VIDEO_EM28XX_DVB=m
+CONFIG_VIDEO_CX231XX=m
+CONFIG_VIDEO_CX231XX_ALSA=m
+CONFIG_VIDEO_CX231XX_DVB=m
+CONFIG_VIDEO_USBVISION=m
+CONFIG_USB_ET61X251=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_ZC0301=m
+CONFIG_USB_PWC_INPUT_EVDEV=y
+CONFIG_USB_ZR364XX=m
+CONFIG_USB_STKWEBCAM=m
+CONFIG_USB_S2255=m
+CONFIG_RADIO_ADAPTERS=y
+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_SF16FMR2=m
+CONFIG_RADIO_TERRATEC=m
+CONFIG_RADIO_TRUST=m
+CONFIG_RADIO_TYPHOON=m
+CONFIG_RADIO_TYPHOON_PROC_FS=y
+CONFIG_RADIO_ZOLTRIX=m
+CONFIG_USB_DSBR=m
+CONFIG_USB_SI470X=m
+CONFIG_USB_MR800=m
+CONFIG_RADIO_TEA5764=m
+# CONFIG_DVB_DYNAMIC_MINORS is not set
+CONFIG_DVB_CAPTURE_DRIVERS=y
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_TTPCI_EEPROM=m
+CONFIG_DVB_AV7110=m
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET_CORE=m
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_USB=m
+# CONFIG_DVB_USB_DEBUG is not set
+CONFIG_DVB_USB_A800=m
+CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
+CONFIG_DVB_USB_DIBUSB_MC=m
+CONFIG_DVB_USB_DIB0700=m
+CONFIG_DVB_USB_UMT_010=m
+CONFIG_DVB_USB_CXUSB=m
+CONFIG_DVB_USB_M920X=m
+CONFIG_DVB_USB_GL861=m
+CONFIG_DVB_USB_AU6610=m
+CONFIG_DVB_USB_DIGITV=m
+CONFIG_DVB_USB_VP7045=m
+CONFIG_DVB_USB_VP702X=m
+CONFIG_DVB_USB_GP8PSK=m
+CONFIG_DVB_USB_NOVA_T_USB2=m
+CONFIG_DVB_USB_TTUSB2=m
+CONFIG_DVB_USB_DTT200U=m
+CONFIG_DVB_USB_OPERA1=m
+CONFIG_DVB_USB_AF9005=m
+CONFIG_DVB_USB_AF9005_REMOTE=m
+CONFIG_DVB_USB_DW2102=m
+CONFIG_DVB_USB_CINERGY_T2=m
+CONFIG_DVB_USB_ANYSEE=m
+CONFIG_DVB_USB_DTV5100=m
+CONFIG_DVB_USB_AF9015=m
+CONFIG_DVB_USB_CE6230=m
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_FLEXCOP=m
+CONFIG_DVB_B2C2_FLEXCOP_PCI=m
+CONFIG_DVB_B2C2_FLEXCOP_USB=m
+# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
+
+#
+# Supported Pluto2 Adapters
+#
+CONFIG_DVB_PLUTO2=m
+
+#
+# Supported SDMC DM1105 Adapters
+#
+CONFIG_DVB_DM1105=m
+
+#
+# Supported FireWire (IEEE 1394) Adapters
+#
+CONFIG_DVB_FIREDTV=m
+CONFIG_DVB_FIREDTV_IEEE1394=y
+CONFIG_DVB_FIREDTV_INPUT=y
+
+#
+# Supported DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+CONFIG_DVB_STB0899=m
+CONFIG_DVB_STB6100=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_ZL10036=m
+CONFIG_DVB_S5H1420=m
+CONFIG_DVB_STV0288=m
+CONFIG_DVB_STB6000=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_STV6110=m
+CONFIG_DVB_STV0900=m
+CONFIG_DVB_TDA8083=m
+CONFIG_DVB_TDA10086=m
+CONFIG_DVB_TDA8261=m
+CONFIG_DVB_VES1X93=m
+CONFIG_DVB_TUNER_ITD1000=m
+CONFIG_DVB_TUNER_CX24113=m
+CONFIG_DVB_TDA826X=m
+CONFIG_DVB_TUA6100=m
+CONFIG_DVB_CX24116=m
+CONFIG_DVB_SI21XX=m
+CONFIG_DVB_SP8870=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_CX22700=m
+CONFIG_DVB_CX22702=m
+CONFIG_DVB_L64781=m
+CONFIG_DVB_TDA1004X=m
+CONFIG_DVB_NXT6000=m
+CONFIG_DVB_MT352=m
+CONFIG_DVB_ZL10353=m
+CONFIG_DVB_DIB3000MB=m
+CONFIG_DVB_DIB3000MC=m
+CONFIG_DVB_DIB7000M=m
+CONFIG_DVB_DIB7000P=m
+CONFIG_DVB_TDA10048=m
+CONFIG_DVB_AF9013=m
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_TDA10021=m
+CONFIG_DVB_TDA10023=m
+CONFIG_DVB_STV0297=m
+CONFIG_DVB_NXT200X=m
+CONFIG_DVB_OR51211=m
+CONFIG_DVB_OR51132=m
+CONFIG_DVB_BCM3510=m
+CONFIG_DVB_LGDT330X=m
+CONFIG_DVB_LGDT3305=m
+CONFIG_DVB_S5H1409=m
+CONFIG_DVB_AU8522=m
+CONFIG_DVB_S5H1411=m
+CONFIG_DVB_PLL=m
+CONFIG_DVB_TUNER_DIB0070=m
+CONFIG_DVB_LNBP21=m
+CONFIG_DVB_ISL6405=m
+CONFIG_DVB_ISL6421=m
+CONFIG_DVB_LGS8GL5=m
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+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_NVIDIA=m
+CONFIG_AGP_SIS=m
+CONFIG_AGP_SWORKS=m
+CONFIG_AGP_VIA=m
+CONFIG_AGP_EFFICEON=m
+CONFIG_DRM=m
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_I810=m
+CONFIG_DRM_I830=m
+CONFIG_DRM_I915=m
+# CONFIG_DRM_I915_KMS is not set
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+CONFIG_DRM_VIA=m
+CONFIG_DRM_SAVAGE=m
+CONFIG_VGASTATE=m
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=m
+# CONFIG_FIRMWARE_EDID is not set
+CONFIG_FB_DDC=m
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=m
+CONFIG_FB_CFB_COPYAREA=m
+CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+CONFIG_FB_SYS_FILLRECT=m
+CONFIG_FB_SYS_COPYAREA=m
+CONFIG_FB_SYS_IMAGEBLIT=m
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+CONFIG_FB_SYS_FOPS=m
+CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_HECUBA=m
+CONFIG_FB_SVGALIB=m
+# CONFIG_FB_MACMODES is not set
+CONFIG_FB_BACKLIGHT=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+
+#
+# Frame buffer hardware drivers
+#
+CONFIG_FB_CIRRUS=m
+CONFIG_FB_PM2=m
+CONFIG_FB_PM2_FIFO_DISCONNECT=y
+CONFIG_FB_CYBER2000=m
+CONFIG_FB_ARC=m
+CONFIG_FB_VGA16=m
+CONFIG_FB_UVESA=m
+CONFIG_FB_N411=m
+CONFIG_FB_HGA=m
+# CONFIG_FB_HGA_ACCEL is not set
+CONFIG_FB_S1D13XXX=m
+CONFIG_FB_NVIDIA=m
+CONFIG_FB_NVIDIA_I2C=y
+# CONFIG_FB_NVIDIA_DEBUG is not set
+CONFIG_FB_NVIDIA_BACKLIGHT=y
+CONFIG_FB_RIVA=m
+CONFIG_FB_RIVA_I2C=y
+# CONFIG_FB_RIVA_DEBUG is not set
+CONFIG_FB_RIVA_BACKLIGHT=y
+CONFIG_FB_I810=m
+CONFIG_FB_I810_GTF=y
+CONFIG_FB_I810_I2C=y
+CONFIG_FB_LE80578=m
+CONFIG_FB_CARILLO_RANCH=m
+CONFIG_FB_INTEL=m
+# CONFIG_FB_INTEL_DEBUG is not set
+CONFIG_FB_INTEL_I2C=y
+CONFIG_FB_MATROX=m
+CONFIG_FB_MATROX_MILLENIUM=y
+CONFIG_FB_MATROX_MYSTIQUE=y
+CONFIG_FB_MATROX_G=y
+CONFIG_FB_MATROX_I2C=m
+CONFIG_FB_MATROX_MAVEN=m
+CONFIG_FB_MATROX_MULTIHEAD=y
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+CONFIG_FB_RADEON_BACKLIGHT=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=m
+CONFIG_FB_ATY128_BACKLIGHT=y
+CONFIG_FB_ATY=m
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GENERIC_LCD=y
+CONFIG_FB_ATY_GX=y
+CONFIG_FB_ATY_BACKLIGHT=y
+CONFIG_FB_S3=m
+CONFIG_FB_SAVAGE=m
+CONFIG_FB_SAVAGE_I2C=y
+CONFIG_FB_SAVAGE_ACCEL=y
+CONFIG_FB_SIS=m
+CONFIG_FB_SIS_300=y
+CONFIG_FB_SIS_315=y
+CONFIG_FB_VIA=m
+CONFIG_FB_NEOMAGIC=m
+CONFIG_FB_KYRO=m
+CONFIG_FB_3DFX=m
+CONFIG_FB_3DFX_ACCEL=y
+CONFIG_FB_3DFX_I2C=y
+CONFIG_FB_VOODOO1=m
+CONFIG_FB_VT8623=m
+CONFIG_FB_TRIDENT=m
+CONFIG_FB_ARK=m
+CONFIG_FB_PM3=m
+CONFIG_FB_CARMINE=m
+CONFIG_FB_CARMINE_DRAM_EVAL=y
+# CONFIG_CARMINE_DRAM_CUSTOM is not set
+CONFIG_FB_GEODE=y
+CONFIG_FB_GEODE_LX=m
+CONFIG_FB_GEODE_GX=m
+CONFIG_FB_GEODE_GX1=m
+CONFIG_FB_TMIO=m
+CONFIG_FB_TMIO_ACCELL=y
+CONFIG_FB_SM501=m
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_FB_METRONOME=m
+CONFIG_FB_MB862XX=m
+# CONFIG_FB_MB862XX_PCI_GDC is not set
+CONFIG_FB_BROADSHEET=m
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_LCD_LTV350QV=m
+CONFIG_LCD_ILI9320=m
+CONFIG_LCD_TDO24M=m
+CONFIG_LCD_VGG2432A4=m
+CONFIG_LCD_PLATFORM=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_GENERIC=m
+CONFIG_BACKLIGHT_PROGEAR=m
+CONFIG_BACKLIGHT_CARILLO_RANCH=m
+CONFIG_BACKLIGHT_MBP_NVIDIA=m
+CONFIG_BACKLIGHT_SAHARA=m
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=m
+
+#
+# Display hardware drivers
+#
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+CONFIG_MDA_CONSOLE=m
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=m
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_LOGO is not set
+CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_JACK=y
+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_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_HRTIMER=m
+CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
+CONFIG_SND_DYNAMIC_MINORS=y
+# CONFIG_SND_SUPPORT_OLD_API is not set
+# CONFIG_SND_VERBOSE_PROCFS is not set
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+CONFIG_SND_VMASTER=y
+CONFIG_SND_RAWMIDI_SEQ=m
+CONFIG_SND_OPL3_LIB_SEQ=m
+CONFIG_SND_OPL4_LIB_SEQ=m
+CONFIG_SND_SBAWE_SEQ=m
+CONFIG_SND_EMU10K1_SEQ=m
+CONFIG_SND_MPU401_UART=m
+CONFIG_SND_OPL3_LIB=m
+CONFIG_SND_OPL4_LIB=m
+CONFIG_SND_VX_LIB=m
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_DRIVERS=y
+CONFIG_SND_PCSP=m
+CONFIG_SND_DUMMY=m
+CONFIG_SND_VIRMIDI=m
+CONFIG_SND_MTPAV=m
+CONFIG_SND_MTS64=m
+CONFIG_SND_SERIAL_U16550=m
+CONFIG_SND_MPU401=m
+CONFIG_SND_PORTMAN2X4=m
+CONFIG_SND_AC97_POWER_SAVE=y
+CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0
+CONFIG_SND_WSS_LIB=m
+CONFIG_SND_SB_COMMON=m
+CONFIG_SND_SB8_DSP=m
+CONFIG_SND_SB16_DSP=m
+CONFIG_SND_ISA=y
+CONFIG_SND_ADLIB=m
+CONFIG_SND_AD1816A=m
+CONFIG_SND_AD1848=m
+CONFIG_SND_ALS100=m
+CONFIG_SND_AZT2320=m
+CONFIG_SND_CMI8330=m
+CONFIG_SND_CS4231=m
+CONFIG_SND_CS4236=m
+CONFIG_SND_DT019X=m
+CONFIG_SND_ES968=m
+CONFIG_SND_ES1688=m
+CONFIG_SND_ES18XX=m
+CONFIG_SND_SC6000=m
+CONFIG_SND_GUSCLASSIC=m
+CONFIG_SND_GUSEXTREME=m
+CONFIG_SND_GUSMAX=m
+CONFIG_SND_INTERWAVE=m
+CONFIG_SND_INTERWAVE_STB=m
+CONFIG_SND_OPL3SA2=m
+CONFIG_SND_OPTI92X_AD1848=m
+CONFIG_SND_OPTI92X_CS4231=m
+CONFIG_SND_OPTI93X=m
+CONFIG_SND_MIRO=m
+CONFIG_SND_SB8=m
+CONFIG_SND_SB16=m
+CONFIG_SND_SBAWE=m
+CONFIG_SND_SB16_CSP=y
+CONFIG_SND_SGALAXY=m
+CONFIG_SND_SSCAPE=m
+CONFIG_SND_WAVEFRONT=m
+CONFIG_SND_MSND_PINNACLE=m
+CONFIG_SND_MSND_CLASSIC=m
+CONFIG_SND_PCI=y
+CONFIG_SND_AD1889=m
+CONFIG_SND_ALS300=m
+CONFIG_SND_ALS4000=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_AW2=m
+CONFIG_SND_AZT3328=m
+CONFIG_SND_BT87X=m
+# CONFIG_SND_BT87X_OVERCLOCK is not set
+CONFIG_SND_CA0106=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_OXYGEN_LIB=m
+CONFIG_SND_OXYGEN=m
+CONFIG_SND_CS4281=m
+CONFIG_SND_CS46XX=m
+CONFIG_SND_CS46XX_NEW_DSP=y
+CONFIG_SND_CS5530=m
+CONFIG_SND_CS5535AUDIO=m
+CONFIG_SND_CTXFI=m
+CONFIG_SND_DARLA20=m
+CONFIG_SND_GINA20=m
+CONFIG_SND_LAYLA20=m
+CONFIG_SND_DARLA24=m
+CONFIG_SND_GINA24=m
+CONFIG_SND_LAYLA24=m
+CONFIG_SND_MONA=m
+CONFIG_SND_MIA=m
+CONFIG_SND_ECHO3G=m
+CONFIG_SND_INDIGO=m
+CONFIG_SND_INDIGOIO=m
+CONFIG_SND_INDIGODJ=m
+CONFIG_SND_INDIGOIOX=m
+CONFIG_SND_INDIGODJX=m
+CONFIG_SND_EMU10K1=m
+CONFIG_SND_EMU10K1X=m
+CONFIG_SND_ENS1370=m
+CONFIG_SND_ENS1371=m
+CONFIG_SND_ES1938=m
+CONFIG_SND_ES1968=m
+CONFIG_SND_FM801=m
+# CONFIG_SND_FM801_TEA575X_BOOL is not set
+CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_INPUT_JACK=y
+CONFIG_SND_HDA_CODEC_REALTEK=y
+CONFIG_SND_HDA_CODEC_ANALOG=y
+CONFIG_SND_HDA_CODEC_SIGMATEL=y
+CONFIG_SND_HDA_CODEC_VIA=y
+CONFIG_SND_HDA_CODEC_ATIHDMI=y
+CONFIG_SND_HDA_CODEC_NVHDMI=y
+CONFIG_SND_HDA_CODEC_INTELHDMI=y
+CONFIG_SND_HDA_ELD=y
+CONFIG_SND_HDA_CODEC_CONEXANT=y
+CONFIG_SND_HDA_CODEC_CA0110=y
+CONFIG_SND_HDA_CODEC_CMEDIA=y
+CONFIG_SND_HDA_CODEC_SI3054=y
+CONFIG_SND_HDA_GENERIC=y
+# CONFIG_SND_HDA_POWER_SAVE is not set
+CONFIG_SND_HDSP=m
+CONFIG_SND_HDSPM=m
+CONFIG_SND_HIFIER=m
+CONFIG_SND_ICE1712=m
+CONFIG_SND_ICE1724=m
+CONFIG_SND_INTEL8X0=m
+CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_LX6464ES=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_PCXHR=m
+CONFIG_SND_RIPTIDE=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
+CONFIG_SND_SIS7019=m
+CONFIG_SND_SONICVIBES=m
+CONFIG_SND_TRIDENT=m
+CONFIG_SND_VIA82XX=m
+CONFIG_SND_VIA82XX_MODEM=m
+CONFIG_SND_VIRTUOSO=m
+CONFIG_SND_VX222=m
+CONFIG_SND_YMFPCI=m
+CONFIG_SND_SPI=y
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_USB_USX2Y=m
+CONFIG_SND_USB_CAIAQ=m
+# CONFIG_SND_USB_CAIAQ_INPUT is not set
+CONFIG_SND_USB_US122L=m
+CONFIG_SND_PCMCIA=y
+CONFIG_SND_VXPOCKET=m
+CONFIG_SND_PDAUDIOCF=m
+CONFIG_SND_SOC=m
+CONFIG_SND_SOC_I2C_AND_SPI=m
+CONFIG_SND_SOC_ALL_CODECS=m
+CONFIG_SND_SOC_AD73311=m
+CONFIG_SND_SOC_AK4104=m
+CONFIG_SND_SOC_AK4535=m
+CONFIG_SND_SOC_CS4270=m
+CONFIG_SND_SOC_L3=m
+CONFIG_SND_SOC_PCM3008=m
+CONFIG_SND_SOC_SPDIF=m
+CONFIG_SND_SOC_SSM2602=m
+CONFIG_SND_SOC_TLV320AIC23=m
+CONFIG_SND_SOC_TLV320AIC26=m
+CONFIG_SND_SOC_TLV320AIC3X=m
+CONFIG_SND_SOC_UDA134X=m
+CONFIG_SND_SOC_UDA1380=m
+CONFIG_SND_SOC_WM8350=m
+CONFIG_SND_SOC_WM8400=m
+CONFIG_SND_SOC_WM8510=m
+CONFIG_SND_SOC_WM8580=m
+CONFIG_SND_SOC_WM8728=m
+CONFIG_SND_SOC_WM8731=m
+CONFIG_SND_SOC_WM8750=m
+CONFIG_SND_SOC_WM8753=m
+CONFIG_SND_SOC_WM8900=m
+CONFIG_SND_SOC_WM8903=m
+CONFIG_SND_SOC_WM8940=m
+CONFIG_SND_SOC_WM8960=m
+CONFIG_SND_SOC_WM8971=m
+CONFIG_SND_SOC_WM8988=m
+CONFIG_SND_SOC_WM8990=m
+CONFIG_SND_SOC_WM9081=m
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+CONFIG_HIDRAW=y
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+
+#
+# Special HID drivers
+#
+# CONFIG_HID_A4TECH is not set
+# CONFIG_HID_APPLE is not set
+# CONFIG_HID_BELKIN is not set
+# CONFIG_HID_CHERRY is not set
+# CONFIG_HID_CHICONY is not set
+# CONFIG_HID_CYPRESS is not set
+# CONFIG_HID_DRAGONRISE is not set
+# CONFIG_HID_EZKEY is not set
+# CONFIG_HID_KYE is not set
+# CONFIG_HID_GYRATION is not set
+# CONFIG_HID_KENSINGTON is not set
+# CONFIG_HID_LOGITECH is not set
+# CONFIG_HID_MICROSOFT is not set
+# CONFIG_HID_MONTEREY is not set
+# CONFIG_HID_NTRIG is not set
+# CONFIG_HID_PANTHERLORD is not set
+# CONFIG_HID_PETALYNX is not set
+# CONFIG_HID_SAMSUNG is not set
+# CONFIG_HID_SONY is not set
+# CONFIG_HID_SUNPLUS is not set
+# CONFIG_HID_GREENASIA is not set
+# CONFIG_HID_SMARTJOYPLUS is not set
+# CONFIG_HID_TOPSEED is not set
+# CONFIG_HID_THRUSTMASTER is not set
+# CONFIG_HID_WACOM is not set
+# CONFIG_HID_ZEROPLUS is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=m
+CONFIG_USB_WUSB=m
+CONFIG_USB_WUSB_CBAF=m
+# CONFIG_USB_WUSB_CBAF_DEBUG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_C67X00_HCD=m
+CONFIG_USB_XHCI_HCD=m
+# CONFIG_USB_XHCI_HCD_DEBUGGING is not set
+CONFIG_USB_EHCI_HCD=m
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_OXU210HP_HCD=m
+CONFIG_USB_ISP116X_HCD=m
+CONFIG_USB_ISP1760_HCD=m
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_OHCI_HCD_SSB=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=m
+CONFIG_USB_U132_HCD=m
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+CONFIG_USB_R8A66597_HCD=m
+CONFIG_USB_WHCI_HCD=m
+CONFIG_USB_HWA_HCD=m
+
+#
+# Enable Host or Gadget support to see Inventra options
+#
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_WDM=m
+CONFIG_USB_TMC=m
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
+#
+
+#
+# also be needed; see USB_STORAGE Help for more info
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=m
+CONFIG_USB_STORAGE_FREECOM=m
+CONFIG_USB_STORAGE_ISD200=m
+CONFIG_USB_STORAGE_USBAT=m
+CONFIG_USB_STORAGE_SDDR09=m
+CONFIG_USB_STORAGE_SDDR55=m
+CONFIG_USB_STORAGE_JUMPSHOT=m
+CONFIG_USB_STORAGE_ALAUDA=m
+CONFIG_USB_STORAGE_ONETOUCH=m
+CONFIG_USB_STORAGE_KARMA=m
+CONFIG_USB_STORAGE_CYPRESS_ATACB=m
+CONFIG_USB_LIBUSUAL=y
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+CONFIG_USB_SERIAL=m
+CONFIG_USB_EZUSB=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_AIRCABLE=m
+CONFIG_USB_SERIAL_ARK3116=m
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_CH341=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_CP210X=m
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_FUNSOFT=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_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_IUU=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_MOTOROLA=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_OTI6858=m
+CONFIG_USB_SERIAL_QUALCOMM=m
+CONFIG_USB_SERIAL_SPCP8X5=m
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_SIEMENS_MPI=m
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+CONFIG_USB_SERIAL_SYMBOL=m
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_SERIAL_OPTICON=m
+CONFIG_USB_SERIAL_DEBUG=m
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+CONFIG_USB_ADUTUX=m
+CONFIG_USB_SEVSEG=m
+CONFIG_USB_RIO500=m
+# CONFIG_USB_LEGOTOWER is not set
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+CONFIG_USB_CYPRESS_CY7C63=m
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_IDMOUSE=m
+CONFIG_USB_FTDI_ELAN=m
+# CONFIG_USB_APPLEDISPLAY is not set
+CONFIG_USB_SISUSBVGA=m
+CONFIG_USB_SISUSBVGA_CON=y
+CONFIG_USB_LD=m
+# CONFIG_USB_TRANCEVIBRATOR is not set
+CONFIG_USB_IOWARRIOR=m
+CONFIG_USB_TEST=m
+CONFIG_USB_ISIGHTFW=m
+# CONFIG_USB_VST is not set
+CONFIG_USB_ATM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_CXACRU=m
+CONFIG_USB_UEAGLEATM=m
+CONFIG_USB_XUSBATM=m
+# CONFIG_USB_GADGET is not set
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+CONFIG_USB_GPIO_VBUS=m
+CONFIG_NOP_USB_XCEIV=m
+CONFIG_UWB=m
+CONFIG_UWB_HWA=m
+CONFIG_UWB_WHCI=m
+CONFIG_UWB_WLP=m
+CONFIG_UWB_I1480U=m
+CONFIG_UWB_I1480U_WLP=m
+CONFIG_MMC=m
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK_BOUNCE=y
+CONFIG_SDIO_UART=m
+CONFIG_MMC_TEST=m
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_SDHCI=m
+CONFIG_MMC_SDHCI_PCI=m
+CONFIG_MMC_RICOH_MMC=m
+CONFIG_MMC_SDHCI_PLTFM=m
+CONFIG_MMC_WBSD=m
+CONFIG_MMC_TIFM_SD=m
+CONFIG_MMC_SDRICOH_CS=m
+CONFIG_MMC_CB710=m
+CONFIG_MMC_VIA_SDMMC=m
+CONFIG_MEMSTICK=m
+# CONFIG_MEMSTICK_DEBUG is not set
+
+#
+# MemoryStick drivers
+#
+# CONFIG_MEMSTICK_UNSAFE_RESUME is not set
+CONFIG_MSPRO_BLOCK=m
+
+#
+# MemoryStick Host Controller Drivers
+#
+CONFIG_MEMSTICK_TIFM_MS=m
+CONFIG_MEMSTICK_JMICRON_38X=m
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+CONFIG_LEDS_NET48XX=m
+CONFIG_LEDS_WRAP=m
+CONFIG_LEDS_ALIX2=m
+CONFIG_LEDS_PCA9532=m
+CONFIG_LEDS_GPIO=m
+CONFIG_LEDS_GPIO_PLATFORM=y
+CONFIG_LEDS_LP3944=m
+CONFIG_LEDS_CLEVO_MAIL=m
+CONFIG_LEDS_PCA955X=m
+CONFIG_LEDS_WM8350=m
+CONFIG_LEDS_DAC124S085=m
+CONFIG_LEDS_BD2802=m
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+CONFIG_LEDS_TRIGGER_BACKLIGHT=m
+CONFIG_LEDS_TRIGGER_GPIO=m
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
+CONFIG_ACCESSIBILITY=y
+# CONFIG_A11Y_BRAILLE_CONSOLE is not set
+CONFIG_INFINIBAND=m
+CONFIG_INFINIBAND_USER_MAD=m
+CONFIG_INFINIBAND_USER_ACCESS=m
+CONFIG_INFINIBAND_USER_MEM=y
+CONFIG_INFINIBAND_ADDR_TRANS=y
+CONFIG_INFINIBAND_MTHCA=m
+# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
+CONFIG_INFINIBAND_AMSO1100=m
+# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
+CONFIG_INFINIBAND_CXGB3=m
+# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
+CONFIG_MLX4_INFINIBAND=m
+CONFIG_INFINIBAND_NES=m
+# CONFIG_INFINIBAND_NES_DEBUG is not set
+CONFIG_INFINIBAND_IPOIB=m
+# CONFIG_INFINIBAND_IPOIB_CM is not set
+# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
+CONFIG_INFINIBAND_SRP=m
+CONFIG_INFINIBAND_ISER=m
+# CONFIG_EDAC is not set
+CONFIG_RTC_LIB=m
+CONFIG_RTC_CLASS=m
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+CONFIG_RTC_INTF_DEV_UIE_EMUL=y
+CONFIG_RTC_DRV_TEST=m
+
+#
+# I2C RTC drivers
+#
+CONFIG_RTC_DRV_DS1307=m
+CONFIG_RTC_DRV_DS1374=m
+CONFIG_RTC_DRV_DS1672=m
+CONFIG_RTC_DRV_MAX6900=m
+CONFIG_RTC_DRV_RS5C372=m
+CONFIG_RTC_DRV_ISL1208=m
+CONFIG_RTC_DRV_X1205=m
+CONFIG_RTC_DRV_PCF8563=m
+CONFIG_RTC_DRV_PCF8583=m
+CONFIG_RTC_DRV_M41T80=m
+CONFIG_RTC_DRV_M41T80_WDT=y
+CONFIG_RTC_DRV_S35390A=m
+CONFIG_RTC_DRV_FM3130=m
+CONFIG_RTC_DRV_RX8581=m
+CONFIG_RTC_DRV_RX8025=m
+
+#
+# SPI RTC drivers
+#
+CONFIG_RTC_DRV_M41T94=m
+CONFIG_RTC_DRV_DS1305=m
+CONFIG_RTC_DRV_DS1390=m
+CONFIG_RTC_DRV_MAX6902=m
+CONFIG_RTC_DRV_R9701=m
+CONFIG_RTC_DRV_RS5C348=m
+CONFIG_RTC_DRV_DS3234=m
+
+#
+# Platform RTC drivers
+#
+CONFIG_RTC_DRV_CMOS=m
+CONFIG_RTC_DRV_DS1286=m
+CONFIG_RTC_DRV_DS1511=m
+CONFIG_RTC_DRV_DS1553=m
+CONFIG_RTC_DRV_DS1742=m
+CONFIG_RTC_DRV_STK17TA8=m
+CONFIG_RTC_DRV_M48T86=m
+CONFIG_RTC_DRV_M48T35=m
+CONFIG_RTC_DRV_M48T59=m
+CONFIG_RTC_DRV_BQ4802=m
+CONFIG_RTC_DRV_V3020=m
+CONFIG_RTC_DRV_WM8350=m
+CONFIG_RTC_DRV_PCF50633=m
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_DMADEVICES=y
+
+#
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DMA_ENGINE=y
+
+#
+# DMA Clients
+#
+CONFIG_NET_DMA=y
+# CONFIG_ASYNC_TX_DMA is not set
+CONFIG_DMATEST=m
+CONFIG_DCA=m
+CONFIG_AUXDISPLAY=y
+CONFIG_KS0108=m
+CONFIG_KS0108_PORT=0x378
+CONFIG_KS0108_DELAY=2
+CONFIG_CFAG12864B=m
+CONFIG_CFAG12864B_RATE=20
+CONFIG_UIO=m
+CONFIG_UIO_CIF=m
+CONFIG_UIO_PDRV=m
+CONFIG_UIO_PDRV_GENIRQ=m
+CONFIG_UIO_SMX=m
+CONFIG_UIO_AEC=m
+CONFIG_UIO_SERCOS3=m
+
+#
+# TI VLYNQ
+#
+# CONFIG_STAGING is not set
+CONFIG_X86_PLATFORM_DEVICES=y
+CONFIG_ACER_WMI=m
+CONFIG_ASUS_LAPTOP=m
+CONFIG_DELL_WMI=m
+CONFIG_FUJITSU_LAPTOP=m
+# CONFIG_FUJITSU_LAPTOP_DEBUG is not set
+CONFIG_TC1100_WMI=m
+CONFIG_HP_WMI=m
+CONFIG_MSI_LAPTOP=m
+CONFIG_PANASONIC_LAPTOP=m
+CONFIG_COMPAL_LAPTOP=m
+CONFIG_SONY_LAPTOP=m
+# CONFIG_SONYPI_COMPAT is not set
+CONFIG_THINKPAD_ACPI=m
+# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
+# CONFIG_THINKPAD_ACPI_DEBUG is not set
+# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set
+CONFIG_THINKPAD_ACPI_VIDEO=y
+CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
+CONFIG_INTEL_MENLOW=m
+CONFIG_EEEPC_LAPTOP=m
+CONFIG_ACPI_WMI=m
+CONFIG_ACPI_ASUS=m
+CONFIG_ACPI_TOSHIBA=m
+
+#
+# Firmware Drivers
+#
+CONFIG_EDD=m
+# CONFIG_EDD_OFF is not set
+CONFIG_FIRMWARE_MEMMAP=y
+CONFIG_DELL_RBU=m
+CONFIG_DCDBAS=m
+CONFIG_DMIID=y
+# CONFIG_ISCSI_IBFT_FIND 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_EXT2_FS_XIP=y
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_EXT4_FS=m
+# CONFIG_EXT4DEV_COMPAT is not set
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_FS_XIP=y
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=m
+# CONFIG_JBD2_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+CONFIG_REISERFS_PROC_INFO=y
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+# CONFIG_REISERFS_FS_SECURITY is not set
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+CONFIG_JFS_SECURITY=y
+# CONFIG_JFS_DEBUG is not set
+CONFIG_JFS_STATISTICS=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_XFS_RT=y
+# CONFIG_XFS_DEBUG is not set
+CONFIG_GFS2_FS=m
+CONFIG_GFS2_FS_LOCKING_DLM=y
+CONFIG_OCFS2_FS=m
+CONFIG_OCFS2_FS_O2CB=m
+CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
+CONFIG_OCFS2_FS_STATS=y
+CONFIG_OCFS2_DEBUG_MASKLOG=y
+# CONFIG_OCFS2_DEBUG_FS is not set
+CONFIG_OCFS2_FS_POSIX_ACL=y
+CONFIG_BTRFS_FS=m
+CONFIG_BTRFS_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+CONFIG_FSNOTIFY=y
+# CONFIG_DNOTIFY is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+CONFIG_QUOTA_NETLINK_INTERFACE=y
+# CONFIG_PRINT_QUOTA_WARNING is not set
+CONFIG_QUOTA_TREE=m
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+CONFIG_CUSE=m
+
+#
+# Caches
+#
+CONFIG_FSCACHE=m
+CONFIG_FSCACHE_STATS=y
+CONFIG_FSCACHE_HISTOGRAM=y
+# CONFIG_FSCACHE_DEBUG is not set
+CONFIG_CACHEFILES=m
+# CONFIG_CACHEFILES_DEBUG is not set
+# CONFIG_CACHEFILES_HISTOGRAM is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+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_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLBFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=m
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+CONFIG_ECRYPT_FS=m
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+CONFIG_EFS_FS=m
+CONFIG_JFFS2_FS=m
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+CONFIG_JFFS2_FS_XATTR=y
+CONFIG_JFFS2_FS_POSIX_ACL=y
+CONFIG_JFFS2_FS_SECURITY=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=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_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_UBIFS_FS=m
+# CONFIG_UBIFS_FS_XATTR is not set
+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+CONFIG_MINIX_FS=m
+CONFIG_OMFS_FS=m
+CONFIG_HPFS_FS=m
+# CONFIG_QNX4FS_FS is not set
+CONFIG_ROMFS_FS=m
+CONFIG_ROMFS_BACKED_BY_BLOCK=y
+# CONFIG_ROMFS_BACKED_BY_MTD is not set
+# CONFIG_ROMFS_BACKED_BY_BOTH is not set
+CONFIG_ROMFS_ON_BLOCK=y
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
+CONFIG_EXOFS_FS=m
+# CONFIG_EXOFS_DEBUG is not set
+CONFIG_NILFS2_FS=m
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_V4_1 is not set
+# CONFIG_NFS_FSCACHE is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_SUNRPC_XPRT_RDMA=m
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_UPCALL is not set
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
+# CONFIG_CIFS_DEBUG2 is not set
+CONFIG_CIFS_DFS_UPCALL=y
+CONFIG_CIFS_EXPERIMENTAL=y
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=m
+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_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
+CONFIG_DLM=m
+# CONFIG_DLM_DEBUG is not set
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+# CONFIG_ENABLE_MUST_CHECK is not set
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_STACKTRACE=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+CONFIG_ARCH_WANT_FRAME_POINTERS=y
+CONFIG_FRAME_POINTER=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_USER_STACKTRACE_SUPPORT=y
+CONFIG_NOP_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
+CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_HAVE_FTRACE_SYSCALLS=y
+CONFIG_RING_BUFFER=y
+CONFIG_EVENT_TRACING=y
+CONFIG_CONTEXT_SWITCH_TRACER=y
+CONFIG_TRACING=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
+# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set
+# CONFIG_DYNAMIC_DEBUG is not set
+# CONFIG_DMA_API_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_ARCH_KMEMCHECK=y
+CONFIG_STRICT_DEVMEM=y
+# CONFIG_X86_VERBOSE_BOOTUP is not set
+# CONFIG_EARLY_PRINTK is not set
+# CONFIG_4KSTACKS is not set
+# CONFIG_DOUBLEFAULT is not set
+# CONFIG_IOMMU_STRESS is not set
+CONFIG_HAVE_MMIOTRACE_SUPPORT=y
+CONFIG_IO_DELAY_TYPE_0X80=0
+CONFIG_IO_DELAY_TYPE_0XED=1
+CONFIG_IO_DELAY_TYPE_UDELAY=2
+CONFIG_IO_DELAY_TYPE_NONE=3
+CONFIG_IO_DELAY_0X80=y
+# CONFIG_IO_DELAY_0XED is not set
+# CONFIG_IO_DELAY_UDELAY is not set
+# CONFIG_IO_DELAY_NONE is not set
+CONFIG_DEFAULT_IO_DELAY_TYPE=0
+# CONFIG_OPTIMIZE_INLINING is not set
+
+#
+# Security options
+#
+
+#
+# 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=y
+# CONFIG_GRKERNSEC_IO is not set
+CONFIG_GRKERNSEC_PROC_MEMMAP=y
+# CONFIG_GRKERNSEC_BRUTE is not set
+# CONFIG_GRKERNSEC_MODHARDEN is not set
+# CONFIG_GRKERNSEC_HIDESYM is not set
+
+#
+# Role Based Access Control Options
+#
+# CONFIG_GRKERNSEC_NO_RBAC is not set
+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=y
+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_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 is not set
+CONFIG_GRKERNSEC_HARDEN_PTRACE=y
+# CONFIG_GRKERNSEC_TPE is not set
+
+#
+# Network Protections
+#
+CONFIG_GRKERNSEC_RANDNET=y
+# CONFIG_GRKERNSEC_BLACKHOLE is not set
+# CONFIG_GRKERNSEC_SOCKET is not set
+
+#
+# Sysctl support
+#
+CONFIG_GRKERNSEC_SYSCTL=y
+CONFIG_GRKERNSEC_SYSCTL_ON=y
+
+#
+# Logging Options
+#
+CONFIG_GRKERNSEC_FLOODTIME=10
+CONFIG_GRKERNSEC_FLOODBURST=4
+
+#
+# PaX
+#
+CONFIG_PAX=y
+
+#
+# PaX Control
+#
+CONFIG_PAX_SOFTMODE=y
+# CONFIG_PAX_EI_PAX is not set
+CONFIG_PAX_PT_PAX_FLAGS=y
+# CONFIG_PAX_NO_ACL_FLAGS is not set
+CONFIG_PAX_HAVE_ACL_FLAGS=y
+# CONFIG_PAX_HOOK_ACL_FLAGS is not set
+
+#
+# Non-executable pages
+#
+CONFIG_PAX_NOEXEC=y
+# CONFIG_PAX_PAGEEXEC is not set
+CONFIG_PAX_SEGMEXEC=y
+# CONFIG_PAX_EMUTRAMP is not set
+CONFIG_PAX_MPROTECT=y
+CONFIG_PAX_NOELFRELOCS=y
+CONFIG_PAX_KERNEXEC=y
+
+#
+# Address Space Layout Randomization
+#
+CONFIG_PAX_ASLR=y
+CONFIG_PAX_RANDUSTACK=y
+CONFIG_PAX_RANDMMAP=y
+
+#
+# Miscellaneous hardening features
+#
+# CONFIG_PAX_MEMORY_SANITIZE is not set
+CONFIG_PAX_MEMORY_UDEREF=y
+CONFIG_PAX_REFCOUNT=y
+# CONFIG_PAX_USERCOPY is not set
+CONFIG_KEYS=y
+# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
+CONFIG_SECURITY=y
+CONFIG_SECURITYFS=y
+# CONFIG_SECURITY_NETWORK is not set
+# CONFIG_SECURITY_PATH is not set
+CONFIG_SECURITY_FILE_CAPABILITIES=y
+# CONFIG_SECURITY_TOMOYO is not set
+# CONFIG_IMA is not set
+CONFIG_XOR_BLOCKS=m
+CONFIG_ASYNC_CORE=m
+CONFIG_ASYNC_MEMCPY=m
+CONFIG_ASYNC_XOR=m
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_FIPS=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_WORKQUEUE=y
+CONFIG_CRYPTO_CRYPTD=m
+CONFIG_CRYPTO_AUTHENC=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Authenticated Encryption with Associated Data
+#
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XTS=m
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_XCBC=m
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CRC32C_INTEL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_AES_586=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SALSA20_586=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_TWOFISH_586=m
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_ZLIB=m
+CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_DEV_PADLOCK=m
+CONFIG_CRYPTO_DEV_PADLOCK_AES=m
+CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
+CONFIG_CRYPTO_DEV_GEODE=m
+CONFIG_CRYPTO_DEV_HIFN_795X=m
+CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
+CONFIG_HAVE_KVM=y
+CONFIG_HAVE_KVM_IRQCHIP=y
+CONFIG_VIRTUALIZATION=y
+CONFIG_KVM=m
+CONFIG_KVM_INTEL=m
+CONFIG_KVM_AMD=m
+# CONFIG_KVM_TRACE is not set
+CONFIG_LGUEST=m
+CONFIG_VIRTIO=y
+CONFIG_VIRTIO_RING=y
+CONFIG_VIRTIO_PCI=m
+CONFIG_VIRTIO_BALLOON=m
+CONFIG_BINARY_PRINTF=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=m
+CONFIG_GENERIC_FIND_FIRST_BIT=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_T10DIF=m
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=m
+CONFIG_CRC7=m
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_REED_SOLOMON=m
+CONFIG_REED_SOLOMON_DEC16=y
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_CHECK_SIGNATURE=y
+CONFIG_NLATTR=y