aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-03-15 09:37:52 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-15 09:37:52 +0000
commit08eb37dacf10fa9340a3592fb38f2588b4932f41 (patch)
tree2eae60b20c5451d59e063d127d0b455923504e10 /main
parent60e5c5953bd3d7d3599bd99a49234a39ac2b7d13 (diff)
downloadaports-08eb37dacf10fa9340a3592fb38f2588b4932f41.tar.bz2
aports-08eb37dacf10fa9340a3592fb38f2588b4932f41.tar.xz
main/linux-grsec: upgrade to 3.2.11 and enable HID_APPLE
Diffstat (limited to 'main')
-rw-r--r--main/linux-grsec/APKBUILD12
-rw-r--r--main/linux-grsec/grsecurity-2.9-3.2.11-201203141956.patch (renamed from main/linux-grsec/grsecurity-2.9-3.2.9-201203112136.patch)681
-rw-r--r--main/linux-grsec/kernelconfig.x864
-rw-r--r--main/linux-grsec/kernelconfig.x86_644
4 files changed, 515 insertions, 186 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 13a6bed57a..6af77c90f0 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -2,7 +2,7 @@
_flavor=grsec
pkgname=linux-${_flavor}
-pkgver=3.2.9
+pkgver=3.2.11
_kernver=3.2
pkgrel=0
pkgdesc="Linux kernel with grsecurity"
@@ -14,7 +14,7 @@ _config=${config:-kernelconfig.${CARCH}}
install=
source="http://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$_kernver.tar.bz2
http://ftp.kernel.org/pub/linux/kernel/v3.0/patch-$pkgver.bz2
- grsecurity-2.9-3.2.9-201203112136.patch
+ grsecurity-2.9-3.2.11-201203141956.patch
0004-arp-flush-arp-cache-on-device-change.patch
@@ -141,11 +141,11 @@ dev() {
}
md5sums="7ceb61f87c097fc17509844b71268935 linux-3.2.tar.bz2
-4610f3e62a5446422d1e81a90ab3cd06 patch-3.2.9.bz2
-349de864a65ad6714e20bf8a14dd8756 grsecurity-2.9-3.2.9-201203112136.patch
+a4c2531ee383dfd429e105816b4d2ccc patch-3.2.11.bz2
+b7d1619cad370ec520c9184cba785df0 grsecurity-2.9-3.2.11-201203141956.patch
776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
f3eda7112ef074a4121ec6de943c63ee x86-centaur-enable-cx8-for-via-eden-too.patch
0e57daa3b43acadd82ae66fa9e3f7da1 inetpeer-invalidate-the-inetpeer-tree-along-with-the-routing-cache.patch
06061e5de624849e082c3c8dbe37c908 route-remove-redirect-genid.patch
-a4e7d46b18ca1495a1605c8520d74ee3 kernelconfig.x86
-147306257d376f27799e9e72a303c80c kernelconfig.x86_64"
+5dd06dffb7f90828e0dc00d884321845 kernelconfig.x86
+fcdfcf0701a053957653a5e26fd33783 kernelconfig.x86_64"
diff --git a/main/linux-grsec/grsecurity-2.9-3.2.9-201203112136.patch b/main/linux-grsec/grsecurity-2.9-3.2.11-201203141956.patch
index f67d967925..ba37ae48fb 100644
--- a/main/linux-grsec/grsecurity-2.9-3.2.9-201203112136.patch
+++ b/main/linux-grsec/grsecurity-2.9-3.2.11-201203141956.patch
@@ -1,5 +1,5 @@
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
-index dfa6fc6..0aa3907 100644
+index dfa6fc6..6af9546 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -5,6 +5,7 @@
@@ -63,7 +63,11 @@ index dfa6fc6..0aa3907 100644
conmakehash
consolemap_deftbl.c*
cpustr.h
-@@ -119,6 +129,7 @@ dslm
+@@ -116,9 +126,11 @@ devlist.h*
+ dnotify_test
+ docproc
+ dslm
++dtc-lexer.lex.c
elf2ecoff
elfconfig.h*
evergreen_reg_safe.h
@@ -71,7 +75,7 @@ index dfa6fc6..0aa3907 100644
fixdep
flask.h
fore200e_mkfirm
-@@ -126,12 +137,15 @@ fore200e_pca_fw.c*
+@@ -126,12 +138,15 @@ fore200e_pca_fw.c*
gconf
gconf.glade.h
gen-devlist
@@ -87,7 +91,7 @@ index dfa6fc6..0aa3907 100644
hpet_example
hugepage-mmap
hugepage-shm
-@@ -146,7 +160,7 @@ int32.c
+@@ -146,7 +161,7 @@ int32.c
int4.c
int8.c
kallsyms
@@ -96,7 +100,7 @@ index dfa6fc6..0aa3907 100644
keywords.c
ksym.c*
ksym.h*
-@@ -154,7 +168,7 @@ kxgettext
+@@ -154,7 +169,7 @@ kxgettext
lkc_defs.h
lex.c
lex.*.c
@@ -105,7 +109,7 @@ index dfa6fc6..0aa3907 100644
logo_*.c
logo_*_clut224.c
logo_*_mono.c
-@@ -166,14 +180,15 @@ machtypes.h
+@@ -166,14 +181,15 @@ machtypes.h
map
map_hugetlb
maui_boot.h
@@ -122,7 +126,7 @@ index dfa6fc6..0aa3907 100644
mkprep
mkregtable
mktables
-@@ -209,6 +224,7 @@ r300_reg_safe.h
+@@ -209,6 +225,7 @@ r300_reg_safe.h
r420_reg_safe.h
r600_reg_safe.h
recordmcount
@@ -130,7 +134,7 @@ index dfa6fc6..0aa3907 100644
relocs
rlim_names.h
rn50_reg_safe.h
-@@ -219,6 +235,7 @@ setup
+@@ -219,6 +236,7 @@ setup
setup.bin
setup.elf
sImage
@@ -138,7 +142,7 @@ index dfa6fc6..0aa3907 100644
sm_tbl*
split-include
syscalltab.h
-@@ -229,6 +246,7 @@ tftpboot.img
+@@ -229,6 +247,7 @@ tftpboot.img
timeconst.h
times.h*
trix_boot.h
@@ -146,7 +150,7 @@ index dfa6fc6..0aa3907 100644
utsrelease.h*
vdso-syms.lds
vdso.lds
-@@ -246,7 +264,9 @@ vmlinux
+@@ -246,7 +265,9 @@ vmlinux
vmlinux-*
vmlinux.aout
vmlinux.bin.all
@@ -156,7 +160,7 @@ index dfa6fc6..0aa3907 100644
vmlinuz
voffset.h
vsyscall.lds
-@@ -254,9 +274,11 @@ vsyscall_32.lds
+@@ -254,9 +275,11 @@ vsyscall_32.lds
wanxlfw.inc
uImage
unifdef
@@ -187,7 +191,7 @@ index 81c287f..d456d02 100644
pcd. [PARIDE]
diff --git a/Makefile b/Makefile
-index 5f1739b..abd56ea 100644
+index 4b76371..53aa79c 100644
--- a/Makefile
+++ b/Makefile
@@ -245,8 +245,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -674,7 +678,7 @@ index fadd5f8..904e73a 100644
/* Allow reads even for write-only mappings */
if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
-index 86976d0..35bff41 100644
+index 86976d0..683de93 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -15,6 +15,10 @@
@@ -688,29 +692,44 @@ index 86976d0..35bff41 100644
#define ATOMIC_INIT(i) { (i) }
#ifdef __KERNEL__
-@@ -27,6 +31,9 @@
+@@ -25,7 +29,15 @@
+ * atomic_set() is the clrex or dummy strex done on every exception return.
+ */
#define atomic_read(v) (*(volatile int *)&(v)->counter)
++static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
++{
++ return v->counter;
++}
#define atomic_set(v,i) (((v)->counter) = (i))
++static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i)
++{
++ v->counter = i;
++}
-+#define atomic_read_unchecked(v) (*(volatile int *)&(v)->counter)
-+#define atomic_set_unchecked(v,i) (((v)->counter) = (i))
-+
#if __LINUX_ARM_ARCH__ >= 6
- /*
-@@ -42,6 +49,28 @@ static inline void atomic_add(int i, atomic_t *v)
+@@ -40,6 +52,35 @@ static inline void atomic_add(int i, atomic_t *v)
+ int result;
+
__asm__ __volatile__("@ atomic_add\n"
- "1: ldrex %0, [%3]\n"
- " add %0, %0, %4\n"
++"1: ldrex %1, [%3]\n"
++" adds %0, %1, %4\n"
+
+#ifdef CONFIG_PAX_REFCOUNT
-+ "bvc 2f\n"
-+ "\tbkpt 0xf103\n2:\n"
++" bvc 3f\n"
++"2: bkpt 0xf103\n"
++"3:\n"
+#endif
+
+" strex %1, %0, [%3]\n"
+" teq %1, #0\n"
+" bne 1b"
++
++#ifdef CONFIG_PAX_REFCOUNT
++"\n4:\n"
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter), "Ir" (i)
+ : "cc");
@@ -722,24 +741,32 @@ index 86976d0..35bff41 100644
+ int result;
+
+ __asm__ __volatile__("@ atomic_add_unchecked\n"
-+"1: ldrex %0, [%3]\n"
-+" add %0, %0, %4\n"
- " strex %1, %0, [%3]\n"
- " teq %1, #0\n"
- " bne 1b"
-@@ -60,6 +89,34 @@ static inline int atomic_add_return(int i, atomic_t *v)
- __asm__ __volatile__("@ atomic_add_return\n"
"1: ldrex %0, [%3]\n"
" add %0, %0, %4\n"
+ " strex %1, %0, [%3]\n"
+@@ -58,6 +99,42 @@ static inline int atomic_add_return(int i, atomic_t *v)
+ smp_mb();
+
+ __asm__ __volatile__("@ atomic_add_return\n"
++"1: ldrex %1, [%3]\n"
++" adds %0, %1, %4\n"
+
+#ifdef CONFIG_PAX_REFCOUNT
-+ "bvc 2f\n"
-+ "\tbkpt 0xf103\n2:\n"
++" bvc 3f\n"
++" mov %0, %1\n"
++"2: bkpt 0xf103\n"
++"3:\n"
+#endif
+
+" strex %1, %0, [%3]\n"
+" teq %1, #0\n"
+" bne 1b"
++
++#ifdef CONFIG_PAX_REFCOUNT
++"\n4:\n"
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter), "Ir" (i)
+ : "cc");
@@ -757,24 +784,31 @@ index 86976d0..35bff41 100644
+ smp_mb();
+
+ __asm__ __volatile__("@ atomic_add_return_unchecked\n"
-+"1: ldrex %0, [%3]\n"
-+" add %0, %0, %4\n"
+ "1: ldrex %0, [%3]\n"
+ " add %0, %0, %4\n"
" strex %1, %0, [%3]\n"
- " teq %1, #0\n"
- " bne 1b"
-@@ -80,6 +137,28 @@ static inline void atomic_sub(int i, atomic_t *v)
+@@ -78,6 +155,35 @@ static inline void atomic_sub(int i, atomic_t *v)
+ int result;
+
__asm__ __volatile__("@ atomic_sub\n"
- "1: ldrex %0, [%3]\n"
- " sub %0, %0, %4\n"
++"1: ldrex %1, [%3]\n"
++" subs %0, %1, %4\n"
+
+#ifdef CONFIG_PAX_REFCOUNT
-+ "bvc 2f\n"
-+ "\tbkpt 0xf103\n2:\n"
++" bvc 3f\n"
++"2: bkpt 0xf103\n"
++"3:\n"
+#endif
+
+" strex %1, %0, [%3]\n"
+" teq %1, #0\n"
+" bne 1b"
++
++#ifdef CONFIG_PAX_REFCOUNT
++"\n4:\n"
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter), "Ir" (i)
+ : "cc");
@@ -786,12 +820,38 @@ index 86976d0..35bff41 100644
+ int result;
+
+ __asm__ __volatile__("@ atomic_sub_unchecked\n"
-+"1: ldrex %0, [%3]\n"
-+" sub %0, %0, %4\n"
+ "1: ldrex %0, [%3]\n"
+ " sub %0, %0, %4\n"
+ " strex %1, %0, [%3]\n"
+@@ -96,11 +202,25 @@ static inline int atomic_sub_return(int i, atomic_t *v)
+ smp_mb();
+
+ __asm__ __volatile__("@ atomic_sub_return\n"
+-"1: ldrex %0, [%3]\n"
+-" sub %0, %0, %4\n"
++"1: ldrex %1, [%3]\n"
++" sub %0, %1, %4\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++" bvc 3f\n"
++" mov %0, %1\n"
++"2: bkpt 0xf103\n"
++"3:\n"
++#endif
++
" strex %1, %0, [%3]\n"
" teq %1, #0\n"
" bne 1b"
-@@ -132,6 +211,28 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
++
++#ifdef CONFIG_PAX_REFCOUNT
++"\n4:\n"
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter), "Ir" (i)
+ : "cc");
+@@ -132,6 +252,28 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
return oldval;
}
@@ -820,31 +880,46 @@ index 86976d0..35bff41 100644
static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
{
unsigned long tmp, tmp2;
-@@ -207,6 +308,7 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
+@@ -207,6 +349,10 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
#endif /* __LINUX_ARM_ARCH__ */
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
-+#define atomic_xchg_unchecked(v, new) (xchg_unchecked(&((v)->counter), new))
++static inline int atomic_xchg_unchecked(atomic_unchecked_t *v, int new)
++{
++ return xchg(&v->counter, new);
++}
static inline int __atomic_add_unless(atomic_t *v, int a, int u)
{
-@@ -219,11 +321,15 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
+@@ -219,11 +365,27 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
}
#define atomic_inc(v) atomic_add(1, v)
-+#define atomic_inc_unchecked(v) atomic_add_unchecked(1, v)
++static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
++{
++ atomic_add_unchecked(1, v);
++}
#define atomic_dec(v) atomic_sub(1, v)
-+#define atomic_dec_unchecked(v) atomic_sub_unchecked(1, v)
++static inline void atomic_dec_unchecked(atomic_unchecked_t *v)
++{
++ atomic_sub_unchecked(1, v);
++}
#define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0)
-+#define atomic_inc_and_test_unchecked(v) (atomic_add_return_unchecked(1, v) == 0)
++static inline int atomic_inc_and_test_unchecked(atomic_unchecked_t *v)
++{
++ return atomic_add_return_unchecked(1, v) == 0;
++}
#define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0)
#define atomic_inc_return(v) (atomic_add_return(1, v))
-+#define atomic_inc_return_unchecked(v) (atomic_add_return_unchecked(1, v))
++static inline int atomic_inc_return_unchecked(atomic_unchecked_t *v)
++{
++ return atomic_add_return_unchecked(1, v);
++}
#define atomic_dec_return(v) (atomic_sub_return(1, v))
#define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
-@@ -239,6 +345,14 @@ typedef struct {
+@@ -239,6 +401,14 @@ typedef struct {
u64 __aligned(8) counter;
} atomic64_t;
@@ -859,7 +934,7 @@ index 86976d0..35bff41 100644
#define ATOMIC64_INIT(i) { (i) }
static inline u64 atomic64_read(atomic64_t *v)
-@@ -254,6 +368,19 @@ static inline u64 atomic64_read(atomic64_t *v)
+@@ -254,6 +424,19 @@ static inline u64 atomic64_read(atomic64_t *v)
return result;
}
@@ -879,7 +954,7 @@ index 86976d0..35bff41 100644
static inline void atomic64_set(atomic64_t *v, u64 i)
{
u64 tmp;
-@@ -268,6 +395,20 @@ static inline void atomic64_set(atomic64_t *v, u64 i)
+@@ -268,6 +451,20 @@ static inline void atomic64_set(atomic64_t *v, u64 i)
: "cc");
}
@@ -900,19 +975,27 @@ index 86976d0..35bff41 100644
static inline void atomic64_add(u64 i, atomic64_t *v)
{
u64 result;
-@@ -277,6 +418,29 @@ static inline void atomic64_add(u64 i, atomic64_t *v)
+@@ -276,6 +473,36 @@ static inline void atomic64_add(u64 i, atomic64_t *v)
+ __asm__ __volatile__("@ atomic64_add\n"
"1: ldrexd %0, %H0, [%3]\n"
" adds %0, %0, %4\n"
- " adc %H0, %H0, %H4\n"
++" adcs %H0, %H0, %H4\n"
+
+#ifdef CONFIG_PAX_REFCOUNT
-+ "bvc 2f\n"
-+ "\tbkpt 0xf103\n2:\n"
++" bvc 3f\n"
++"2: bkpt 0xf103\n"
++"3:\n"
+#endif
+
+" strexd %1, %0, %H0, [%3]\n"
+" teq %1, #0\n"
+" bne 1b"
++
++#ifdef CONFIG_PAX_REFCOUNT
++"\n4:\n"
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter), "r" (i)
+ : "cc");
@@ -926,23 +1009,41 @@ index 86976d0..35bff41 100644
+ __asm__ __volatile__("@ atomic64_add_unchecked\n"
+"1: ldrexd %0, %H0, [%3]\n"
+" adds %0, %0, %4\n"
-+" adc %H0, %H0, %H4\n"
+ " adc %H0, %H0, %H4\n"
" strexd %1, %0, %H0, [%3]\n"
" teq %1, #0\n"
- " bne 1b"
-@@ -296,6 +460,35 @@ static inline u64 atomic64_add_return(u64 i, atomic64_t *v)
- "1: ldrexd %0, %H0, [%3]\n"
- " adds %0, %0, %4\n"
- " adc %H0, %H0, %H4\n"
+@@ -287,12 +514,49 @@ static inline void atomic64_add(u64 i, atomic64_t *v)
+
+ static inline u64 atomic64_add_return(u64 i, atomic64_t *v)
+ {
+- u64 result;
+- unsigned long tmp;
++ u64 result, tmp;
+
+ smp_mb();
+
+ __asm__ __volatile__("@ atomic64_add_return\n"
++"1: ldrexd %1, %H1, [%3]\n"
++" adds %0, %1, %4\n"
++" adcs %H0, %H1, %H4\n"
+
+#ifdef CONFIG_PAX_REFCOUNT
-+ "bvc 2f\n"
-+ "\tbkpt 0xf103\n2:\n"
++" bvc 3f\n"
++" mov %0, %1\n"
++" mov %H0, %H1\n"
++"2: bkpt 0xf103\n"
++"3:\n"
+#endif
+
+" strexd %1, %0, %H0, [%3]\n"
+" teq %1, #0\n"
+" bne 1b"
++
++#ifdef CONFIG_PAX_REFCOUNT
++"\n4:\n"
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter), "r" (i)
+ : "cc");
@@ -960,25 +1061,30 @@ index 86976d0..35bff41 100644
+ smp_mb();
+
+ __asm__ __volatile__("@ atomic64_add_return_unchecked\n"
-+"1: ldrexd %0, %H0, [%3]\n"
-+" adds %0, %0, %4\n"
-+" adc %H0, %H0, %H4\n"
- " strexd %1, %0, %H0, [%3]\n"
- " teq %1, #0\n"
- " bne 1b"
-@@ -317,6 +510,29 @@ static inline void atomic64_sub(u64 i, atomic64_t *v)
+ "1: ldrexd %0, %H0, [%3]\n"
+ " adds %0, %0, %4\n"
+ " adc %H0, %H0, %H4\n"
+@@ -316,6 +580,36 @@ static inline void atomic64_sub(u64 i, atomic64_t *v)
+ __asm__ __volatile__("@ atomic64_sub\n"
"1: ldrexd %0, %H0, [%3]\n"
" subs %0, %0, %4\n"
- " sbc %H0, %H0, %H4\n"
++" sbcs %H0, %H0, %H4\n"
+
+#ifdef CONFIG_PAX_REFCOUNT
-+ "bvc 2f\n"
-+ "\tbkpt 0xf103\n2:\n"
++" bvc 3f\n"
++"2: bkpt 0xf103\n"
++"3:\n"
+#endif
+
+" strexd %1, %0, %H0, [%3]\n"
+" teq %1, #0\n"
+" bne 1b"
++
++#ifdef CONFIG_PAX_REFCOUNT
++"\n4:\n"
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter), "r" (i)
+ : "cc");
@@ -992,11 +1098,48 @@ index 86976d0..35bff41 100644
+ __asm__ __volatile__("@ atomic64_sub_unchecked\n"
+"1: ldrexd %0, %H0, [%3]\n"
+" subs %0, %0, %4\n"
-+" sbc %H0, %H0, %H4\n"
+ " sbc %H0, %H0, %H4\n"
+ " strexd %1, %0, %H0, [%3]\n"
+ " teq %1, #0\n"
+@@ -327,18 +621,32 @@ static inline void atomic64_sub(u64 i, atomic64_t *v)
+
+ static inline u64 atomic64_sub_return(u64 i, atomic64_t *v)
+ {
+- u64 result;
+- unsigned long tmp;
++ u64 result, tmp;
+
+ smp_mb();
+
+ __asm__ __volatile__("@ atomic64_sub_return\n"
+-"1: ldrexd %0, %H0, [%3]\n"
+-" subs %0, %0, %4\n"
+-" sbc %H0, %H0, %H4\n"
++"1: ldrexd %1, %H1, [%3]\n"
++" subs %0, %1, %4\n"
++" sbc %H0, %H1, %H4\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++" bvc 3f\n"
++" mov %0, %1\n"
++" mov %H0, %H1\n"
++"2: bkpt 0xf103\n"
++"3:\n"
++#endif
++
" strexd %1, %0, %H0, [%3]\n"
" teq %1, #0\n"
" bne 1b"
-@@ -372,6 +588,30 @@ static inline u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old, u64 new)
++
++#ifdef CONFIG_PAX_REFCOUNT
++"\n4:\n"
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter), "r" (i)
+ : "cc");
+@@ -372,6 +680,30 @@ static inline u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old, u64 new)
return oldval;
}
@@ -1027,7 +1170,77 @@ index 86976d0..35bff41 100644
static inline u64 atomic64_xchg(atomic64_t *ptr, u64 new)
{
u64 result;
-@@ -451,10 +691,13 @@ static inline int atomic64_add_unless(atomic64_t *v, u64 a, u64 u)
+@@ -395,21 +727,34 @@ static inline u64 atomic64_xchg(atomic64_t *ptr, u64 new)
+
+ static inline u64 atomic64_dec_if_positive(atomic64_t *v)
+ {
+- u64 result;
+- unsigned long tmp;
++ u64 result, tmp;
+
+ smp_mb();
+
+ __asm__ __volatile__("@ atomic64_dec_if_positive\n"
+-"1: ldrexd %0, %H0, [%3]\n"
+-" subs %0, %0, #1\n"
+-" sbc %H0, %H0, #0\n"
++"1: ldrexd %1, %H1, [%3]\n"
++" subs %0, %1, #1\n"
++" sbc %H0, %H1, #0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++" bvc 3f\n"
++" mov %0, %1\n"
++" mov %H0, %H1\n"
++"2: bkpt 0xf103\n"
++"3:\n"
++#endif
++
+ " teq %H0, #0\n"
+-" bmi 2f\n"
++" bmi 4f\n"
+ " strexd %1, %0, %H0, [%3]\n"
+ " teq %1, #0\n"
+ " bne 1b\n"
+-"2:"
++"4:\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter)
+ : "cc");
+@@ -432,13 +777,25 @@ static inline int atomic64_add_unless(atomic64_t *v, u64 a, u64 u)
+ " teq %0, %5\n"
+ " teqeq %H0, %H5\n"
+ " moveq %1, #0\n"
+-" beq 2f\n"
++" beq 4f\n"
+ " adds %0, %0, %6\n"
+ " adc %H0, %H0, %H6\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++" bvc 3f\n"
++"2: bkpt 0xf103\n"
++"3:\n"
++#endif
++
+ " strexd %2, %0, %H0, [%4]\n"
+ " teq %2, #0\n"
+ " bne 1b\n"
+-"2:"
++"4:\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ _ASM_EXTABLE(2b, 4b)
++#endif
++
+ : "=&r" (val), "+r" (ret), "=&r" (tmp), "+Qo" (v->counter)
+ : "r" (&v->counter), "r" (u), "r" (a)
+ : "cc");
+@@ -451,10 +808,13 @@ static inline int atomic64_add_unless(atomic64_t *v, u64 a, u64 u)
#define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0)
#define atomic64_inc(v) atomic64_add(1LL, (v))
@@ -1140,7 +1353,7 @@ index ca94653..6ac0d56 100644
#ifdef MULTI_USER
extern struct cpu_user_fns cpu_user;
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
-index 984014b..92345b9 100644
+index 984014b..a6d914f 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -90,6 +90,8 @@ void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int,
@@ -1161,6 +1374,20 @@ index 984014b..92345b9 100644
#define UDBG_UNDEFINED (1 << 0)
#define UDBG_SYSCALL (1 << 1)
+@@ -526,6 +528,13 @@ static inline unsigned long long __cmpxchg64_mb(volatile void *ptr,
+
+ #endif /* __LINUX_ARM_ARCH__ >= 6 */
+
++#define _ASM_EXTABLE(from, to) \
++" .pushsection __ex_table,\"a\"\n"\
++" .align 3\n" \
++" .long " #from ", " #to"\n" \
++" .popsection"
++
++
+ #endif /* __ASSEMBLY__ */
+
+ #define arch_align_stack(x) (x)
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index b293616..96310e5 100644
--- a/arch/arm/include/asm/uaccess.h
@@ -1466,6 +1693,19 @@ index 025f742..8432b08 100644
{
/*
* This test is stubbed out of the main function above to keep
+diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
+index e9d5f4a..f099699 100644
+--- a/arch/arm/mach-omap2/board-n8x0.c
++++ b/arch/arm/mach-omap2/board-n8x0.c
+@@ -593,7 +593,7 @@ static int n8x0_menelaus_late_init(struct device *dev)
+ }
+ #endif
+
+-static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {
++static struct menelaus_platform_data n8x0_menelaus_platform_data __initconst = {
+ .late_init = n8x0_menelaus_late_init,
+ };
+
diff --git a/arch/arm/mach-ux500/mbox-db5500.c b/arch/arm/mach-ux500/mbox-db5500.c
index 2b2d51c..0127490 100644
--- a/arch/arm/mach-ux500/mbox-db5500.c
@@ -1480,7 +1720,7 @@ index 2b2d51c..0127490 100644
static int mbox_show(struct seq_file *s, void *data)
{
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
-index aa33949..b242a2f 100644
+index aa33949..d366075 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -183,6 +183,13 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr,
@@ -1531,6 +1771,27 @@ index aa33949..b242a2f 100644
/*
* First Level Translation Fault Handler
*
+@@ -628,6 +662,20 @@ do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs)
+ const struct fsr_info *inf = ifsr_info + fsr_fs(ifsr);
+ struct siginfo info;
+
++#ifdef CONFIG_PAX_REFCOUNT
++ if (fsr_fs(ifsr) == 2) {
++ unsigned int bkpt;
++
++ if (!probe_kernel_address((unsigned int *)addr, bkpt) && bkpt == 0xe12f1073) {
++ current->thread.error_code = ifsr;
++ current->thread.trap_no = 0;
++ pax_report_refcount_overflow(regs);
++ fixup_exception(regs);
++ return;
++ }
++ }
++#endif
++
+ if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
+ return;
+
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
index 44b628e..623ee2a 100644
--- a/arch/arm/mm/mmap.c
@@ -4133,10 +4394,10 @@ index dfcb343..eda788a 100644
if (r_type == R_390_GOTPC)
*(unsigned int *) loc = val;
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
-index 9451b21..ed8956f 100644
+index 53088e2..9f44a36 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
-@@ -321,39 +321,3 @@ unsigned long get_wchan(struct task_struct *p)
+@@ -320,39 +320,3 @@ unsigned long get_wchan(struct task_struct *p)
}
return 0;
}
@@ -4177,7 +4438,7 @@ index 9451b21..ed8956f 100644
- return ret;
-}
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
-index f09c748..cf9ec1d 100644
+index a0155c0..34cc491 100644
--- a/arch/s390/mm/mmap.c
+++ b/arch/s390/mm/mmap.c
@@ -92,10 +92,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
@@ -19486,10 +19747,10 @@ index 9299410..ade2f9b 100644
spin_unlock(&vcpu->kvm->mmu_lock);
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
-index e32243e..a6e6172 100644
+index 94a4672..5c6b853 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
-@@ -3400,7 +3400,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
+@@ -3405,7 +3405,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
int cpu = raw_smp_processor_id();
struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
@@ -19501,7 +19762,7 @@ index e32243e..a6e6172 100644
load_TR_desc();
}
-@@ -3778,6 +3782,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -3783,6 +3787,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
#endif
#endif
@@ -26207,7 +26468,7 @@ index 1366a89..e17f54b 100644
struct list_head *cpu_list, local_list;
diff --git a/block/bsg.c b/block/bsg.c
-index 702f131..37808bf 100644
+index c0ab25c..9d49f8f 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -176,16 +176,24 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
@@ -29578,7 +29839,7 @@ index d47a53b..61154c2 100644
INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
INIT_WORK(&dev_priv->error_work, i915_error_work_func);
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
-index daa5743..c0757a9 100644
+index 9ec9755..6d1cf2d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2230,7 +2230,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
@@ -32256,7 +32517,7 @@ index 4daf9e5..b8d1d0f 100644
.device = PCI_ANY_ID,
.subvendor = PCI_ANY_ID,
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
-index 31c2dc2..a2de7a6 100644
+index 1ce84ed..0fdd40a 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1589,7 +1589,7 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
@@ -32400,10 +32661,10 @@ index 8e91321..fd17aef 100644
"start=%llu, len=%llu, dev_size=%llu",
dm_device_name(ti->table->md), bdevname(bdev, b),
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
-index 59c4f04..4c7b661 100644
+index 237571a..fb6d19b 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
-@@ -431,7 +431,7 @@ static int init_pmd(struct dm_pool_metadata *pmd,
+@@ -432,7 +432,7 @@ static int init_pmd(struct dm_pool_metadata *pmd,
pmd->info.tm = tm;
pmd->info.levels = 2;
@@ -32412,7 +32673,7 @@ index 59c4f04..4c7b661 100644
pmd->info.value_type.size = sizeof(__le64);
pmd->info.value_type.inc = data_block_inc;
pmd->info.value_type.dec = data_block_dec;
-@@ -450,7 +450,7 @@ static int init_pmd(struct dm_pool_metadata *pmd,
+@@ -451,7 +451,7 @@ static int init_pmd(struct dm_pool_metadata *pmd,
pmd->bl_info.tm = tm;
pmd->bl_info.levels = 1;
@@ -32955,6 +33216,35 @@ index 68d1240..46b32eb 100644
{0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
{0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
{0, }
+diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
+index ee0d0b3..7db1a4f 100644
+--- a/drivers/media/video/omap/omap_vout.c
++++ b/drivers/media/video/omap/omap_vout.c
+@@ -64,7 +64,12 @@ enum omap_vout_channels {
+ OMAP_VIDEO2,
+ };
+
+-static struct videobuf_queue_ops video_vbq_ops;
++static struct videobuf_queue_ops video_vbq_ops = {
++ .buf_setup = omap_vout_buffer_setup,
++ .buf_prepare = omap_vout_buffer_prepare,
++ .buf_release = omap_vout_buffer_release,
++ .buf_queue = omap_vout_buffer_queue,
++};
+ /* Variables configurable through module params*/
+ static u32 video1_numbuffers = 3;
+ static u32 video2_numbuffers = 3;
+@@ -1016,10 +1021,6 @@ static int omap_vout_open(struct file *file)
+ vout->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
+
+ q = &vout->vbq;
+- video_vbq_ops.buf_setup = omap_vout_buffer_setup;
+- video_vbq_ops.buf_prepare = omap_vout_buffer_prepare;
+- video_vbq_ops.buf_release = omap_vout_buffer_release;
+- video_vbq_ops.buf_queue = omap_vout_buffer_queue;
+ spin_lock_init(&vout->vbq_lock);
+
+ videobuf_queue_dma_contig_init(q, &video_vbq_ops, q->dev,
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index 305e6aa..0143317 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -33785,6 +34075,32 @@ index bf266a0..e024af7 100644
}
void be_parse_stats(struct be_adapter *adapter)
+diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
+index fb5579a..debdffa 100644
+--- a/drivers/net/ethernet/faraday/ftgmac100.c
++++ b/drivers/net/ethernet/faraday/ftgmac100.c
+@@ -30,6 +30,8 @@
+ #include <linux/netdevice.h>
+ #include <linux/phy.h>
+ #include <linux/platform_device.h>
++#include <linux/interrupt.h>
++#include <linux/irqreturn.h>
+ #include <net/ip.h>
+
+ #include "ftgmac100.h"
+diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
+index a127cb2..0d043cd 100644
+--- a/drivers/net/ethernet/faraday/ftmac100.c
++++ b/drivers/net/ethernet/faraday/ftmac100.c
+@@ -30,6 +30,8 @@
+ #include <linux/module.h>
+ #include <linux/netdevice.h>
+ #include <linux/platform_device.h>
++#include <linux/interrupt.h>
++#include <linux/irqreturn.h>
+
+ #include "ftmac100.h"
+
diff --git a/drivers/net/ethernet/fealnx.c b/drivers/net/ethernet/fealnx.c
index 61d2bdd..7f1154a 100644
--- a/drivers/net/ethernet/fealnx.c
@@ -34160,6 +34476,21 @@ index 1b4658c..a30dabb 100644
struct sis190_private *tp = netdev_priv(dev);
struct pci_dev *isa_bridge;
u8 reg, tmp8;
+diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
+index 41e6b33..8e89b0f 100644
+--- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
++++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
+@@ -139,8 +139,8 @@ void dwmac_mmc_ctrl(void __iomem *ioaddr, unsigned int mode)
+
+ writel(value, ioaddr + MMC_CNTRL);
+
+- pr_debug("stmmac: MMC ctrl register (offset 0x%x): 0x%08x\n",
+- MMC_CNTRL, value);
++// pr_debug("stmmac: MMC ctrl register (offset 0x%x): 0x%08x\n",
++// MMC_CNTRL, value);
+ }
+
+ /* To mask all all interrupts.*/
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index edfa15d..002bfa9 100644
--- a/drivers/net/ppp/ppp_generic.c
@@ -34591,7 +34922,7 @@ index f5ae3c6..7936af3 100644
static u16 ar9003_calc_ptr_chksum(struct ar9003_txc *ads)
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
-index f389b3c..7359e18 100644
+index 1bd8edf..10c6d30 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -605,7 +605,7 @@ struct ath_hw_private_ops {
@@ -40759,7 +41090,7 @@ index 79e2ca7..5828ad1 100644
A.out (Assembler.OUTput) is a set of formats for libraries and
executables used in the earliest versions of UNIX. Linux used
diff --git a/fs/aio.c b/fs/aio.c
-index 969beb0..09fab51 100644
+index 67e4b90..fbb09dc 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -119,7 +119,7 @@ static int aio_setup_ring(struct kioctx *ctx)
@@ -40771,7 +41102,7 @@ index 969beb0..09fab51 100644
return -EINVAL;
nr_events = (PAGE_SIZE * nr_pages - sizeof(struct aio_ring)) / sizeof(struct io_event);
-@@ -1461,22 +1461,27 @@ static ssize_t aio_fsync(struct kiocb *iocb)
+@@ -1463,22 +1463,27 @@ static ssize_t aio_fsync(struct kiocb *iocb)
static ssize_t aio_setup_vectored_rw(int type, struct kiocb *kiocb, bool compat)
{
ssize_t ret;
@@ -40814,7 +41145,7 @@ index 7ee7ba4..0c61a60 100644
goto out_sig;
if (offset > inode->i_sb->s_maxbytes)
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
-index e1fbdee..cd5ea56 100644
+index 6861f61..a25f010 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -60,7 +60,7 @@ static int autofs4_write(struct file *file, const void *addr, int bytes)
@@ -40944,7 +41275,7 @@ index a6395bd..f1e376a 100644
(unsigned long) create_aout_tables((char __user *) bprm->p, bprm);
#ifdef __alpha__
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
-index 21ac5ee..dbf63ee 100644
+index 6ff96c6..dbf63ee 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -32,6 +32,7 @@
@@ -41635,15 +41966,6 @@ index 21ac5ee..dbf63ee 100644
fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
}
-@@ -1421,7 +1886,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
- for (i = 1; i < view->n; ++i) {
- const struct user_regset *regset = &view->regsets[i];
- do_thread_regset_writeback(t->task, regset);
-- if (regset->core_note_type &&
-+ if (regset->core_note_type && regset->get &&
- (!regset->active || regset->active(t->task, regset))) {
- int ret;
- size_t size = regset->n * regset->size;
@@ -1862,14 +2327,14 @@ static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum,
}
@@ -58832,6 +59154,18 @@ index 0232ccb..13d9165 100644
};
#undef KMAP_D
+diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h
+index 9ceb03b..2efbcbd 100644
+--- a/include/asm-generic/local.h
++++ b/include/asm-generic/local.h
+@@ -39,6 +39,7 @@ typedef struct
+ #define local_add_return(i, l) atomic_long_add_return((i), (&(l)->a))
+ #define local_sub_return(i, l) atomic_long_sub_return((i), (&(l)->a))
+ #define local_inc_return(l) atomic_long_inc_return(&(l)->a)
++#define local_dec_return(l) atomic_long_dec_return(&(l)->a)
+
+ #define local_cmpxchg(l, o, n) atomic_long_cmpxchg((&(l)->a), (o), (n))
+ #define local_xchg(l, n) atomic_long_xchg((&(l)->a), (n))
diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h
index 725612b..9cc513a 100644
--- a/include/asm-generic/pgtable-nopmd.h
@@ -61438,6 +61772,18 @@ index 7939f63..ec6df57 100644
= { .max = ARRAY_SIZE(array), .num = nump, \
.ops = &param_ops_##type, \
.elemsize = sizeof(array[0]), .elem = array }; \
+diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h
+index a9e6ba4..0f9e29b 100644
+--- a/include/linux/mtd/map.h
++++ b/include/linux/mtd/map.h
+@@ -25,6 +25,7 @@
+ #include <linux/types.h>
+ #include <linux/list.h>
+ #include <linux/string.h>
++#include <linux/kernel.h>
+ #include <linux/bug.h>
+
+
diff --git a/include/linux/namei.h b/include/linux/namei.h
index ffc0213..2c1f2cb 100644
--- a/include/linux/namei.h
@@ -61754,30 +62100,6 @@ index e0879a7..a12f962 100644
#include <asm/emergency-restart.h>
#endif
-diff --git a/include/linux/regset.h b/include/linux/regset.h
-index 8abee65..5150fd1 100644
---- a/include/linux/regset.h
-+++ b/include/linux/regset.h
-@@ -335,6 +335,9 @@ static inline int copy_regset_to_user(struct task_struct *target,
- {
- const struct user_regset *regset = &view->regsets[setno];
-
-+ if (!regset->get)
-+ return -EOPNOTSUPP;
-+
- if (!access_ok(VERIFY_WRITE, data, size))
- return -EIO;
-
-@@ -358,6 +361,9 @@ static inline int copy_regset_from_user(struct task_struct *target,
- {
- const struct user_regset *regset = &view->regsets[setno];
-
-+ if (!regset->set)
-+ return -EOPNOTSUPP;
-+
- if (!access_ok(VERIFY_READ, data, size))
- return -EIO;
-
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 96d465f..b084e05 100644
--- a/include/linux/reiserfs_fs.h
@@ -65514,7 +65836,7 @@ index a4bea97..7a1ae9a 100644
/*
* If ret is 0, either ____call_usermodehelper failed and the
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
-index faa39d1..d7ad37e 100644
+index bc90b87..43c7d8c 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -185,7 +185,7 @@ static kprobe_opcode_t __kprobes *__get_insn_slot(struct kprobe_insn_cache *c)
@@ -65535,7 +65857,7 @@ index faa39d1..d7ad37e 100644
kfree(kip);
}
return 1;
-@@ -1953,7 +1953,7 @@ static int __init init_kprobes(void)
+@@ -1955,7 +1955,7 @@ static int __init init_kprobes(void)
{
int i, err = 0;
unsigned long offset = 0, size = 0;
@@ -65544,7 +65866,7 @@ index faa39d1..d7ad37e 100644
const char *symbol_name;
void *addr;
struct kprobe_blackpoint *kb;
-@@ -2079,7 +2079,7 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v)
+@@ -2081,7 +2081,7 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v)
const char *sym = NULL;
unsigned int i = *(loff_t *) v;
unsigned long offset = 0;
@@ -66965,6 +67287,28 @@ index 78ab24a..332c915 100644
goto out_put_task_struct;
}
+diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
+index 636af6d..8af70ab 100644
+--- a/kernel/rcutiny.c
++++ b/kernel/rcutiny.c
+@@ -46,7 +46,7 @@
+ struct rcu_ctrlblk;
+ static void invoke_rcu_callbacks(void);
+ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp);
+-static void rcu_process_callbacks(struct softirq_action *unused);
++static void rcu_process_callbacks(void);
+ static void __call_rcu(struct rcu_head *head,
+ void (*func)(struct rcu_head *rcu),
+ struct rcu_ctrlblk *rcp);
+@@ -186,7 +186,7 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
+ RCU_TRACE(trace_rcu_batch_end(rcp->name, cb_count));
+ }
+
+-static void rcu_process_callbacks(struct softirq_action *unused)
++static void rcu_process_callbacks(void)
+ {
+ __rcu_process_callbacks(&rcu_sched_ctrlblk);
+ __rcu_process_callbacks(&rcu_bh_ctrlblk);
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 764825c..3aa6ac4 100644
--- a/kernel/rcutorture.c
@@ -69088,10 +69432,10 @@ index 57d82c6..e9e0552 100644
set_page_address(page, (void *)vaddr);
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
-index 33141f5..e56bef9 100644
+index 8f005e9..1cb1036 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
-@@ -703,7 +703,7 @@ out:
+@@ -704,7 +704,7 @@ out:
* run pte_offset_map on the pmd, if an huge pmd could
* materialize from under us from a different thread.
*/
@@ -71858,7 +72202,7 @@ index 7fa41b4..6087460 100644
return count;
}
diff --git a/mm/nommu.c b/mm/nommu.c
-index ee7e57e..cae4e40 100644
+index f59e170..34e2a2b 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -62,7 +62,6 @@ int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
@@ -71869,7 +72213,7 @@ index ee7e57e..cae4e40 100644
atomic_long_t mmap_pages_allocated;
-@@ -829,15 +828,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
+@@ -827,15 +826,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
EXPORT_SYMBOL(find_vma);
/*
@@ -71885,7 +72229,7 @@ index ee7e57e..cae4e40 100644
* expand a stack to a given address
* - not supported under NOMMU conditions
*/
-@@ -1557,6 +1547,7 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -1555,6 +1545,7 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
/* most fields are the same, copy all, and then fixup */
*new = *vma;
@@ -73615,7 +73959,7 @@ index a5f4e57..910ee6d 100644
/* Okay, we found ICMPv6 header */
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
-index 5864cc4..121f3a3 100644
+index 5864cc4..121f3a30 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1513,7 +1513,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
@@ -75497,7 +75841,7 @@ index 9ee7164..56c5061 100644
suspend:
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
-index 5a5a776..9600b11 100644
+index 7d84b87..6a69cd9 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -401,7 +401,7 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
@@ -78900,10 +79244,10 @@ index 09d4648..cf234c7 100644
list_add(&s->list, &cs4297a_devs);
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
-index 5644711..a2aebc1 100644
+index 71f6744..d8aeae7 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
-@@ -611,7 +611,7 @@ struct hda_bus_ops {
+@@ -614,7 +614,7 @@ struct hda_bus_ops {
/* notify power-up/down from codec to controller */
void (*pm_notify)(struct hda_bus *bus);
#endif
@@ -78912,7 +79256,7 @@ index 5644711..a2aebc1 100644
/* template to pass to the bus constructor */
struct hda_bus_template {
-@@ -713,6 +713,7 @@ struct hda_codec_ops {
+@@ -716,6 +716,7 @@ struct hda_codec_ops {
#endif
void (*reboot_notify)(struct hda_codec *codec);
};
@@ -78920,7 +79264,7 @@ index 5644711..a2aebc1 100644
/* record for amp information cache */
struct hda_cache_head {
-@@ -743,7 +744,7 @@ struct hda_pcm_ops {
+@@ -746,7 +747,7 @@ struct hda_pcm_ops {
struct snd_pcm_substream *substream);
int (*cleanup)(struct hda_pcm_stream *info, struct hda_codec *codec,
struct snd_pcm_substream *substream);
@@ -78929,7 +79273,7 @@ index 5644711..a2aebc1 100644
/* PCM information for each substream */
struct hda_pcm_stream {
-@@ -801,7 +802,7 @@ struct hda_codec {
+@@ -804,7 +805,7 @@ struct hda_codec {
const char *modelname; /* model name for preset */
/* set by patch */
@@ -80314,10 +80658,10 @@ index 0000000..008f159
+}
diff --git a/tools/gcc/stackleak_plugin.c b/tools/gcc/stackleak_plugin.c
new file mode 100644
-index 0000000..ea79948
+index 0000000..4e82b16
--- /dev/null
+++ b/tools/gcc/stackleak_plugin.c
-@@ -0,0 +1,326 @@
+@@ -0,0 +1,311 @@
+/*
+ * Copyright 2011 by the PaX Team <pageexec@freemail.hu>
+ * Licensed under the GPL v2
@@ -80364,12 +80708,10 @@ index 0000000..ea79948
+static int track_frame_size = -1;
+static const char track_function[] = "pax_track_stack";
+static const char check_function[] = "pax_check_alloca";
-+static tree pax_check_alloca_decl;
-+static tree pax_track_stack_decl;
+static bool init_locals;
+
+static struct plugin_info stackleak_plugin_info = {
-+ .version = "201203021600",
++ .version = "201203140940",
+ .help = "track-lowest-sp=nn\ttrack sp in functions whose frame size is at least nn bytes\n"
+// "initialize-locals\t\tforcibly initialize all stack frames\n"
+};
@@ -80422,20 +80764,29 @@ index 0000000..ea79948
+static void stackleak_check_alloca(gimple_stmt_iterator *gsi)
+{
+ gimple check_alloca;
-+ tree alloca_size;
++ tree fntype, fndecl, alloca_size;
++
++ fntype = build_function_type_list(void_type_node, long_unsigned_type_node, NULL_TREE);
++ fndecl = build_fn_decl(check_function, fntype);
++ DECL_ASSEMBLER_NAME(fndecl); // for LTO
+
+ // insert call to void pax_check_alloca(unsigned long size)
+ alloca_size = gimple_call_arg(gsi_stmt(*gsi), 0);
-+ check_alloca = gimple_build_call(pax_check_alloca_decl, 1, alloca_size);
++ check_alloca = gimple_build_call(fndecl, 1, alloca_size);
+ gsi_insert_before(gsi, check_alloca, GSI_SAME_STMT);
+}
+
+static void stackleak_add_instrumentation(gimple_stmt_iterator *gsi)
+{
+ gimple track_stack;
++ tree fntype, fndecl;
++
++ fntype = build_function_type_list(void_type_node, NULL_TREE);
++ fndecl = build_fn_decl(track_function, fntype);
++ DECL_ASSEMBLER_NAME(fndecl); // for LTO
+
+ // insert call to void pax_track_stack(void)
-+ track_stack = gimple_build_call(pax_track_stack_decl, 0);
++ track_stack = gimple_build_call(fndecl, 0);
+ gsi_insert_after(gsi, track_stack, GSI_CONTINUE_LINKING);
+}
+
@@ -80568,27 +80919,6 @@ index 0000000..ea79948
+ return 0;
+}
+
-+static void stackleak_start_unit(void *gcc_data, void *user_data)
-+{
-+ tree fntype;
-+
-+ // declare void pax_check_alloca(unsigned long size)
-+ fntype = build_function_type_list(void_type_node, long_unsigned_type_node, NULL_TREE);
-+ pax_check_alloca_decl = build_fn_decl(check_function, fntype);
-+ DECL_ASSEMBLER_NAME(pax_check_alloca_decl); // for LTO
-+ TREE_PUBLIC(pax_check_alloca_decl) = 1;
-+ DECL_EXTERNAL(pax_check_alloca_decl) = 1;
-+ DECL_ARTIFICIAL(pax_check_alloca_decl) = 1;
-+
-+ // declare void pax_track_stack(void)
-+ fntype = build_function_type_list(void_type_node, NULL_TREE);
-+ pax_track_stack_decl = build_fn_decl(track_function, fntype);
-+ DECL_ASSEMBLER_NAME(pax_track_stack_decl); // for LTO
-+ TREE_PUBLIC(pax_track_stack_decl) = 1;
-+ DECL_EXTERNAL(pax_track_stack_decl) = 1;
-+ DECL_ARTIFICIAL(pax_track_stack_decl) = 1;
-+}
-+
+int plugin_init(struct plugin_name_args *plugin_info, struct plugin_gcc_version *version)
+{
+ const char * const plugin_name = plugin_info->base_name;
@@ -80638,7 +80968,6 @@ index 0000000..ea79948
+ error(G_("unkown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
+ }
+
-+ register_callback(plugin_name, PLUGIN_START_UNIT, &stackleak_start_unit, NULL);
+ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &stackleak_tree_instrument_pass_info);
+ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &stackleak_final_pass_info);
+
diff --git a/main/linux-grsec/kernelconfig.x86 b/main/linux-grsec/kernelconfig.x86
index a4f26183ae..4b2af2441d 100644
--- a/main/linux-grsec/kernelconfig.x86
+++ b/main/linux-grsec/kernelconfig.x86
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/i386 3.2.7 Kernel Configuration
+# Linux/i386 3.2.11 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
@@ -4091,7 +4091,7 @@ CONFIG_USB_MOUSE=m
#
# CONFIG_HID_A4TECH is not set
# CONFIG_HID_ACRUX is not set
-# CONFIG_HID_APPLE is not set
+CONFIG_HID_APPLE=m
# CONFIG_HID_BELKIN is not set
# CONFIG_HID_CHERRY is not set
# CONFIG_HID_CHICONY is not set
diff --git a/main/linux-grsec/kernelconfig.x86_64 b/main/linux-grsec/kernelconfig.x86_64
index 463a41e851..164d8ce484 100644
--- a/main/linux-grsec/kernelconfig.x86_64
+++ b/main/linux-grsec/kernelconfig.x86_64
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86_64 3.2.7 Kernel Configuration
+# Linux/x86_64 3.2.11 Kernel Configuration
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
@@ -4045,7 +4045,7 @@ CONFIG_USB_MOUSE=m
#
# CONFIG_HID_A4TECH is not set
# CONFIG_HID_ACRUX is not set
-# CONFIG_HID_APPLE is not set
+CONFIG_HID_APPLE=m
# CONFIG_HID_BELKIN is not set
# CONFIG_HID_CHERRY is not set
# CONFIG_HID_CHICONY is not set