Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-patchset:master commit in: 3.1.1/, 2.6.32/
Date: Sat, 19 Nov 2011 12:31:19
Message-Id: 357bf67d253758c99b4e8c8d65e25e8673fdd10a.blueness@gentoo
1 commit: 357bf67d253758c99b4e8c8d65e25e8673fdd10a
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 19 12:30:51 2011 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 19 12:30:51 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-patchset.git;a=commit;h=357bf67d
7
8 Grsec/PaX: 2.2.2-{2.6.32.48,3.1.1}-201111181902
9
10 ---
11 2.6.32/0000_README | 2 +-
12 ..._grsecurity-2.2.2-2.6.32.48-201111181902.patch} | 2401 +++++++++++++++++---
13 3.1.1/0000_README | 2 +-
14 ...4420_grsecurity-2.2.2-3.1.1-201111181902.patch} | 152 ++-
15 4 files changed, 2223 insertions(+), 334 deletions(-)
16
17 diff --git a/2.6.32/0000_README b/2.6.32/0000_README
18 index 09a7a03..f5436c2 100644
19 --- a/2.6.32/0000_README
20 +++ b/2.6.32/0000_README
21 @@ -3,7 +3,7 @@ README
22
23 Individual Patch Descriptions:
24 -----------------------------------------------------------------------------
25 -Patch: 4420_grsecurity-2.2.2-2.6.32.48-201111161802.patch
26 +Patch: 4420_grsecurity-2.2.2-2.6.32.48-201111181902.patch
27 From: http://www.grsecurity.net
28 Desc: hardened-sources base patch from upstream grsecurity
29
30
31 diff --git a/2.6.32/4420_grsecurity-2.2.2-2.6.32.48-201111161802.patch b/2.6.32/4420_grsecurity-2.2.2-2.6.32.48-201111181902.patch
32 similarity index 97%
33 rename from 2.6.32/4420_grsecurity-2.2.2-2.6.32.48-201111161802.patch
34 rename to 2.6.32/4420_grsecurity-2.2.2-2.6.32.48-201111181902.patch
35 index 8c18994..5c9ddc8 100644
36 --- a/2.6.32/4420_grsecurity-2.2.2-2.6.32.48-201111161802.patch
37 +++ b/2.6.32/4420_grsecurity-2.2.2-2.6.32.48-201111181902.patch
38 @@ -84,7 +84,7 @@ diff -urNp linux-2.6.32.48/arch/alpha/kernel/osf_sys.c linux-2.6.32.48/arch/alph
39
40 diff -urNp linux-2.6.32.48/arch/alpha/mm/fault.c linux-2.6.32.48/arch/alpha/mm/fault.c
41 --- linux-2.6.32.48/arch/alpha/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
42 -+++ linux-2.6.32.48/arch/alpha/mm/fault.c 2011-11-15 19:59:42.000000000 -0500
43 ++++ linux-2.6.32.48/arch/alpha/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
44 @@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *
45 __reload_thread(pcb);
46 }
47 @@ -192,7 +192,7 @@ diff -urNp linux-2.6.32.48/arch/alpha/mm/fault.c linux-2.6.32.48/arch/alpha/mm/f
48 + return 1;
49 +}
50 +
51 -+void pax_report_insns(void *pc, void *sp)
52 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
53 +{
54 + unsigned long i;
55 +
56 @@ -594,7 +594,7 @@ diff -urNp linux-2.6.32.48/arch/arm/mach-sa1100/pm.c linux-2.6.32.48/arch/arm/ma
57 };
58 diff -urNp linux-2.6.32.48/arch/arm/mm/fault.c linux-2.6.32.48/arch/arm/mm/fault.c
59 --- linux-2.6.32.48/arch/arm/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
60 -+++ linux-2.6.32.48/arch/arm/mm/fault.c 2011-11-15 19:59:42.000000000 -0500
61 ++++ linux-2.6.32.48/arch/arm/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
62 @@ -166,6 +166,13 @@ __do_user_fault(struct task_struct *tsk,
63 }
64 #endif
65 @@ -614,7 +614,7 @@ diff -urNp linux-2.6.32.48/arch/arm/mm/fault.c linux-2.6.32.48/arch/arm/mm/fault
66 #endif /* CONFIG_MMU */
67
68 +#ifdef CONFIG_PAX_PAGEEXEC
69 -+void pax_report_insns(void *pc, void *sp)
70 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
71 +{
72 + long i;
73 +
74 @@ -753,13 +753,13 @@ diff -urNp linux-2.6.32.48/arch/avr32/mach-at32ap/pm.c linux-2.6.32.48/arch/avr3
75 };
76 diff -urNp linux-2.6.32.48/arch/avr32/mm/fault.c linux-2.6.32.48/arch/avr32/mm/fault.c
77 --- linux-2.6.32.48/arch/avr32/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
78 -+++ linux-2.6.32.48/arch/avr32/mm/fault.c 2011-11-15 19:59:42.000000000 -0500
79 ++++ linux-2.6.32.48/arch/avr32/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
80 @@ -41,6 +41,23 @@ static inline int notify_page_fault(stru
81
82 int exception_trace = 1;
83
84 +#ifdef CONFIG_PAX_PAGEEXEC
85 -+void pax_report_insns(void *pc, void *sp)
86 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
87 +{
88 + unsigned long i;
89 +
90 @@ -1325,13 +1325,13 @@ diff -urNp linux-2.6.32.48/arch/ia64/kernel/vmlinux.lds.S linux-2.6.32.48/arch/i
91 */
92 diff -urNp linux-2.6.32.48/arch/ia64/mm/fault.c linux-2.6.32.48/arch/ia64/mm/fault.c
93 --- linux-2.6.32.48/arch/ia64/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
94 -+++ linux-2.6.32.48/arch/ia64/mm/fault.c 2011-11-15 19:59:42.000000000 -0500
95 ++++ linux-2.6.32.48/arch/ia64/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
96 @@ -72,6 +72,23 @@ mapped_kernel_page_is_present (unsigned
97 return pte_present(pte);
98 }
99
100 +#ifdef CONFIG_PAX_PAGEEXEC
101 -+void pax_report_insns(void *pc, void *sp)
102 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
103 +{
104 + unsigned long i;
105 +
106 @@ -1657,13 +1657,13 @@ diff -urNp linux-2.6.32.48/arch/mips/Makefile linux-2.6.32.48/arch/mips/Makefile
107 vmlinux-32 = vmlinux
108 diff -urNp linux-2.6.32.48/arch/mips/mm/fault.c linux-2.6.32.48/arch/mips/mm/fault.c
109 --- linux-2.6.32.48/arch/mips/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
110 -+++ linux-2.6.32.48/arch/mips/mm/fault.c 2011-11-15 19:59:42.000000000 -0500
111 ++++ linux-2.6.32.48/arch/mips/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
112 @@ -26,6 +26,23 @@
113 #include <asm/ptrace.h>
114 #include <asm/highmem.h> /* For VMALLOC_END */
115
116 +#ifdef CONFIG_PAX_PAGEEXEC
117 -+void pax_report_insns(void *pc, void *sp)
118 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
119 +{
120 + unsigned long i;
121 +
122 @@ -1869,7 +1869,7 @@ diff -urNp linux-2.6.32.48/arch/parisc/kernel/traps.c linux-2.6.32.48/arch/paris
123
124 diff -urNp linux-2.6.32.48/arch/parisc/mm/fault.c linux-2.6.32.48/arch/parisc/mm/fault.c
125 --- linux-2.6.32.48/arch/parisc/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
126 -+++ linux-2.6.32.48/arch/parisc/mm/fault.c 2011-11-15 19:59:42.000000000 -0500
127 ++++ linux-2.6.32.48/arch/parisc/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
128 @@ -15,6 +15,7 @@
129 #include <linux/sched.h>
130 #include <linux/interrupt.h>
131 @@ -1985,7 +1985,7 @@ diff -urNp linux-2.6.32.48/arch/parisc/mm/fault.c linux-2.6.32.48/arch/parisc/mm
132 + return 1;
133 +}
134 +
135 -+void pax_report_insns(void *pc, void *sp)
136 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
137 +{
138 + unsigned long i;
139 +
140 @@ -2982,7 +2982,7 @@ diff -urNp linux-2.6.32.48/arch/powerpc/Makefile linux-2.6.32.48/arch/powerpc/Ma
141 ifeq ($(CONFIG_PPC64),y)
142 diff -urNp linux-2.6.32.48/arch/powerpc/mm/fault.c linux-2.6.32.48/arch/powerpc/mm/fault.c
143 --- linux-2.6.32.48/arch/powerpc/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
144 -+++ linux-2.6.32.48/arch/powerpc/mm/fault.c 2011-11-15 19:59:42.000000000 -0500
145 ++++ linux-2.6.32.48/arch/powerpc/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
146 @@ -30,6 +30,10 @@
147 #include <linux/kprobes.h>
148 #include <linux/kdebug.h>
149 @@ -3017,7 +3017,7 @@ diff -urNp linux-2.6.32.48/arch/powerpc/mm/fault.c linux-2.6.32.48/arch/powerpc/
150 + return 1;
151 +}
152 +
153 -+void pax_report_insns(void *pc, void *sp)
154 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
155 +{
156 + unsigned long i;
157 +
158 @@ -5201,7 +5201,7 @@ diff -urNp linux-2.6.32.48/arch/sparc/Makefile linux-2.6.32.48/arch/sparc/Makefi
159
160 diff -urNp linux-2.6.32.48/arch/sparc/mm/fault_32.c linux-2.6.32.48/arch/sparc/mm/fault_32.c
161 --- linux-2.6.32.48/arch/sparc/mm/fault_32.c 2011-11-08 19:02:43.000000000 -0500
162 -+++ linux-2.6.32.48/arch/sparc/mm/fault_32.c 2011-11-15 19:59:42.000000000 -0500
163 ++++ linux-2.6.32.48/arch/sparc/mm/fault_32.c 2011-11-18 18:01:52.000000000 -0500
164 @@ -21,6 +21,9 @@
165 #include <linux/interrupt.h>
166 #include <linux/module.h>
167 @@ -5461,7 +5461,7 @@ diff -urNp linux-2.6.32.48/arch/sparc/mm/fault_32.c linux-2.6.32.48/arch/sparc/m
168 + return 1;
169 +}
170 +
171 -+void pax_report_insns(void *pc, void *sp)
172 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
173 +{
174 + unsigned long i;
175 +
176 @@ -5507,7 +5507,7 @@ diff -urNp linux-2.6.32.48/arch/sparc/mm/fault_32.c linux-2.6.32.48/arch/sparc/m
177 goto bad_area;
178 diff -urNp linux-2.6.32.48/arch/sparc/mm/fault_64.c linux-2.6.32.48/arch/sparc/mm/fault_64.c
179 --- linux-2.6.32.48/arch/sparc/mm/fault_64.c 2011-11-08 19:02:43.000000000 -0500
180 -+++ linux-2.6.32.48/arch/sparc/mm/fault_64.c 2011-11-15 19:59:42.000000000 -0500
181 ++++ linux-2.6.32.48/arch/sparc/mm/fault_64.c 2011-11-18 18:01:52.000000000 -0500
182 @@ -20,6 +20,9 @@
183 #include <linux/kprobes.h>
184 #include <linux/kdebug.h>
185 @@ -5965,7 +5965,7 @@ diff -urNp linux-2.6.32.48/arch/sparc/mm/fault_64.c linux-2.6.32.48/arch/sparc/m
186 + return 1;
187 +}
188 +
189 -+void pax_report_insns(void *pc, void *sp)
190 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
191 +{
192 + unsigned long i;
193 +
194 @@ -6192,6 +6192,32 @@ diff -urNp linux-2.6.32.48/arch/um/kernel/process.c linux-2.6.32.48/arch/um/kern
195 unsigned long get_wchan(struct task_struct *p)
196 {
197 unsigned long stack_page, sp, ip;
198 +diff -urNp linux-2.6.32.48/arch/um/Makefile linux-2.6.32.48/arch/um/Makefile
199 +--- linux-2.6.32.48/arch/um/Makefile 2011-11-08 19:02:43.000000000 -0500
200 ++++ linux-2.6.32.48/arch/um/Makefile 2011-11-18 18:01:52.000000000 -0500
201 +@@ -49,6 +49,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINE
202 + $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
203 + $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64
204 +
205 ++ifdef CONSTIFY_PLUGIN
206 ++USER_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
207 ++endif
208 ++
209 + include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
210 +
211 + #This will adjust *FLAGS accordingly to the platform.
212 +diff -urNp linux-2.6.32.48/arch/um/sys-i386/shared/sysdep/system.h linux-2.6.32.48/arch/um/sys-i386/shared/sysdep/system.h
213 +--- linux-2.6.32.48/arch/um/sys-i386/shared/sysdep/system.h 2011-11-08 19:02:43.000000000 -0500
214 ++++ linux-2.6.32.48/arch/um/sys-i386/shared/sysdep/system.h 2011-11-18 18:01:52.000000000 -0500
215 +@@ -17,7 +17,7 @@
216 + # define AT_VECTOR_SIZE_ARCH 1
217 + #endif
218 +
219 +-extern unsigned long arch_align_stack(unsigned long sp);
220 ++#define arch_align_stack(x) ((x) & ~0xfUL)
221 +
222 + void default_idle(void);
223 +
224 diff -urNp linux-2.6.32.48/arch/um/sys-i386/syscalls.c linux-2.6.32.48/arch/um/sys-i386/syscalls.c
225 --- linux-2.6.32.48/arch/um/sys-i386/syscalls.c 2011-11-08 19:02:43.000000000 -0500
226 +++ linux-2.6.32.48/arch/um/sys-i386/syscalls.c 2011-11-15 19:59:42.000000000 -0500
227 @@ -6217,6 +6243,18 @@ diff -urNp linux-2.6.32.48/arch/um/sys-i386/syscalls.c linux-2.6.32.48/arch/um/s
228 /*
229 * Perform the select(nd, in, out, ex, tv) and mmap() system
230 * calls. Linux/i386 didn't use to be able to handle more than
231 +diff -urNp linux-2.6.32.48/arch/um/sys-x86_64/shared/sysdep/system.h linux-2.6.32.48/arch/um/sys-x86_64/shared/sysdep/system.h
232 +--- linux-2.6.32.48/arch/um/sys-x86_64/shared/sysdep/system.h 2011-11-08 19:02:43.000000000 -0500
233 ++++ linux-2.6.32.48/arch/um/sys-x86_64/shared/sysdep/system.h 2011-11-18 18:01:52.000000000 -0500
234 +@@ -17,7 +17,7 @@
235 + # define AT_VECTOR_SIZE_ARCH 1
236 + #endif
237 +
238 +-extern unsigned long arch_align_stack(unsigned long sp);
239 ++#define arch_align_stack(x) ((x) & ~0xfUL)
240 +
241 + void default_idle(void);
242 +
243 diff -urNp linux-2.6.32.48/arch/x86/boot/bitops.h linux-2.6.32.48/arch/x86/boot/bitops.h
244 --- linux-2.6.32.48/arch/x86/boot/bitops.h 2011-11-08 19:02:43.000000000 -0500
245 +++ linux-2.6.32.48/arch/x86/boot/bitops.h 2011-11-15 19:59:42.000000000 -0500
246 @@ -6831,16 +6869,18 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32_aout.c linux-2.6.32.48/arch/x86/ia
247 return has_dumped;
248 diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia32/ia32entry.S
249 --- linux-2.6.32.48/arch/x86/ia32/ia32entry.S 2011-11-08 19:02:43.000000000 -0500
250 -+++ linux-2.6.32.48/arch/x86/ia32/ia32entry.S 2011-11-15 19:59:42.000000000 -0500
251 -@@ -13,6 +13,7 @@
252 ++++ linux-2.6.32.48/arch/x86/ia32/ia32entry.S 2011-11-18 18:01:52.000000000 -0500
253 +@@ -13,7 +13,9 @@
254 #include <asm/thread_info.h>
255 #include <asm/segment.h>
256 #include <asm/irqflags.h>
257 +#include <asm/pgtable.h>
258 #include <linux/linkage.h>
259 ++#include <asm/alternative-asm.h>
260
261 /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
262 -@@ -93,6 +94,29 @@ ENTRY(native_irq_enable_sysexit)
263 + #include <linux/elf-em.h>
264 +@@ -93,6 +95,29 @@ ENTRY(native_irq_enable_sysexit)
265 ENDPROC(native_irq_enable_sysexit)
266 #endif
267
268 @@ -6870,7 +6910,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
269 /*
270 * 32bit SYSENTER instruction entry.
271 *
272 -@@ -119,7 +143,7 @@ ENTRY(ia32_sysenter_target)
273 +@@ -119,7 +144,7 @@ ENTRY(ia32_sysenter_target)
274 CFI_REGISTER rsp,rbp
275 SWAPGS_UNSAFE_STACK
276 movq PER_CPU_VAR(kernel_stack), %rsp
277 @@ -6879,7 +6919,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
278 /*
279 * No need to follow this irqs on/off section: the syscall
280 * disabled irqs, here we enable it straight after entry:
281 -@@ -135,7 +159,8 @@ ENTRY(ia32_sysenter_target)
282 +@@ -135,7 +160,8 @@ ENTRY(ia32_sysenter_target)
283 pushfq
284 CFI_ADJUST_CFA_OFFSET 8
285 /*CFI_REL_OFFSET rflags,0*/
286 @@ -6889,7 +6929,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
287 CFI_REGISTER rip,r10
288 pushq $__USER32_CS
289 CFI_ADJUST_CFA_OFFSET 8
290 -@@ -150,6 +175,12 @@ ENTRY(ia32_sysenter_target)
291 +@@ -150,6 +176,12 @@ ENTRY(ia32_sysenter_target)
292 SAVE_ARGS 0,0,1
293 /* no need to do an access_ok check here because rbp has been
294 32bit zero extended */
295 @@ -6902,7 +6942,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
296 1: movl (%rbp),%ebp
297 .section __ex_table,"a"
298 .quad 1b,ia32_badarg
299 -@@ -172,6 +203,8 @@ sysenter_dispatch:
300 +@@ -172,6 +204,8 @@ sysenter_dispatch:
301 testl $_TIF_ALLWORK_MASK,TI_flags(%r10)
302 jnz sysexit_audit
303 sysexit_from_sys_call:
304 @@ -6911,7 +6951,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
305 andl $~TS_COMPAT,TI_status(%r10)
306 /* clear IF, that popfq doesn't enable interrupts early */
307 andl $~0x200,EFLAGS-R11(%rsp)
308 -@@ -200,6 +233,9 @@ sysexit_from_sys_call:
309 +@@ -200,6 +234,9 @@ sysexit_from_sys_call:
310 movl %eax,%esi /* 2nd arg: syscall number */
311 movl $AUDIT_ARCH_I386,%edi /* 1st arg: audit arch */
312 call audit_syscall_entry
313 @@ -6921,7 +6961,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
314 movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall number */
315 cmpq $(IA32_NR_syscalls-1),%rax
316 ja ia32_badsys
317 -@@ -252,6 +288,9 @@ sysenter_tracesys:
318 +@@ -252,6 +289,9 @@ sysenter_tracesys:
319 movq $-ENOSYS,RAX(%rsp)/* ptrace can change this for a bad syscall */
320 movq %rsp,%rdi /* &pt_regs -> arg1 */
321 call syscall_trace_enter
322 @@ -6931,7 +6971,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
323 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
324 RESTORE_REST
325 cmpq $(IA32_NR_syscalls-1),%rax
326 -@@ -283,19 +322,24 @@ ENDPROC(ia32_sysenter_target)
327 +@@ -283,19 +323,24 @@ ENDPROC(ia32_sysenter_target)
328 ENTRY(ia32_cstar_target)
329 CFI_STARTPROC32 simple
330 CFI_SIGNAL_FRAME
331 @@ -6958,7 +6998,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
332 movl %eax,%eax /* zero extension */
333 movq %rax,ORIG_RAX-ARGOFFSET(%rsp)
334 movq %rcx,RIP-ARGOFFSET(%rsp)
335 -@@ -311,6 +355,12 @@ ENTRY(ia32_cstar_target)
336 +@@ -311,6 +356,12 @@ ENTRY(ia32_cstar_target)
337 /* no need to do an access_ok check here because r8 has been
338 32bit zero extended */
339 /* hardware stack frame is complete now */
340 @@ -6971,7 +7011,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
341 1: movl (%r8),%r9d
342 .section __ex_table,"a"
343 .quad 1b,ia32_badarg
344 -@@ -333,6 +383,8 @@ cstar_dispatch:
345 +@@ -333,6 +384,8 @@ cstar_dispatch:
346 testl $_TIF_ALLWORK_MASK,TI_flags(%r10)
347 jnz sysretl_audit
348 sysretl_from_sys_call:
349 @@ -6980,7 +7020,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
350 andl $~TS_COMPAT,TI_status(%r10)
351 RESTORE_ARGS 1,-ARG_SKIP,1,1,1
352 movl RIP-ARGOFFSET(%rsp),%ecx
353 -@@ -370,6 +422,9 @@ cstar_tracesys:
354 +@@ -370,6 +423,9 @@ cstar_tracesys:
355 movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
356 movq %rsp,%rdi /* &pt_regs -> arg1 */
357 call syscall_trace_enter
358 @@ -6990,7 +7030,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
359 LOAD_ARGS32 ARGOFFSET, 1 /* reload args from stack in case ptrace changed it */
360 RESTORE_REST
361 xchgl %ebp,%r9d
362 -@@ -415,6 +470,7 @@ ENTRY(ia32_syscall)
363 +@@ -415,6 +471,7 @@ ENTRY(ia32_syscall)
364 CFI_REL_OFFSET rip,RIP-RIP
365 PARAVIRT_ADJUST_EXCEPTION_FRAME
366 SWAPGS
367 @@ -6998,7 +7038,7 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
368 /*
369 * No need to follow this irqs on/off section: the syscall
370 * disabled irqs and here we enable it straight after entry:
371 -@@ -448,6 +504,9 @@ ia32_tracesys:
372 +@@ -448,6 +505,9 @@ ia32_tracesys:
373 movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
374 movq %rsp,%rdi /* &pt_regs -> arg1 */
375 call syscall_trace_enter
376 @@ -7008,6 +7048,14 @@ diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32entry.S linux-2.6.32.48/arch/x86/ia
377 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
378 RESTORE_REST
379 cmpq $(IA32_NR_syscalls-1),%rax
380 +@@ -462,6 +522,7 @@ ia32_badsys:
381 +
382 + quiet_ni_syscall:
383 + movq $-ENOSYS,%rax
384 ++ pax_force_retaddr
385 + ret
386 + CFI_ENDPROC
387 +
388 diff -urNp linux-2.6.32.48/arch/x86/ia32/ia32_signal.c linux-2.6.32.48/arch/x86/ia32/ia32_signal.c
389 --- linux-2.6.32.48/arch/x86/ia32/ia32_signal.c 2011-11-08 19:02:43.000000000 -0500
390 +++ linux-2.6.32.48/arch/x86/ia32/ia32_signal.c 2011-11-15 19:59:42.000000000 -0500
391 @@ -13045,7 +13093,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/doublefault_32.c linux-2.6.32.48/arch
392 .__cr3 = __pa_nodebug(swapper_pg_dir),
393 diff -urNp linux-2.6.32.48/arch/x86/kernel/dumpstack_32.c linux-2.6.32.48/arch/x86/kernel/dumpstack_32.c
394 --- linux-2.6.32.48/arch/x86/kernel/dumpstack_32.c 2011-11-08 19:02:43.000000000 -0500
395 -+++ linux-2.6.32.48/arch/x86/kernel/dumpstack_32.c 2011-11-15 19:59:42.000000000 -0500
396 ++++ linux-2.6.32.48/arch/x86/kernel/dumpstack_32.c 2011-11-18 18:10:09.000000000 -0500
397 @@ -53,16 +53,12 @@ void dump_trace(struct task_struct *task
398 #endif
399
400 @@ -13103,7 +13151,23 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/dumpstack_32.c linux-2.6.32.48/arch/x
401 printk("<%02x> ", c);
402 else
403 printk("%02x ", c);
404 -@@ -149,6 +146,7 @@ int is_valid_bugaddr(unsigned long ip)
405 +@@ -145,10 +142,23 @@ void show_registers(struct pt_regs *regs
406 + printk("\n");
407 + }
408 +
409 ++#ifdef CONFIG_PAX_MEMORY_STACKLEAK
410 ++void pax_check_alloca(unsigned long size)
411 ++{
412 ++ unsigned long sp = (unsigned long)&sp, stack_left;
413 ++
414 ++ /* all kernel stacks are of the same size */
415 ++ stack_left = sp & (THREAD_SIZE - 1);
416 ++ BUG_ON(stack_left < 256 || size >= stack_left - 256);
417 ++}
418 ++EXPORT_SYMBOL(pax_check_alloca);
419 ++#endif
420 ++
421 + int is_valid_bugaddr(unsigned long ip)
422 {
423 unsigned short ud2;
424
425 @@ -13113,7 +13177,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/dumpstack_32.c linux-2.6.32.48/arch/x
426 if (probe_kernel_address((unsigned short *)ip, ud2))
427 diff -urNp linux-2.6.32.48/arch/x86/kernel/dumpstack_64.c linux-2.6.32.48/arch/x86/kernel/dumpstack_64.c
428 --- linux-2.6.32.48/arch/x86/kernel/dumpstack_64.c 2011-11-08 19:02:43.000000000 -0500
429 -+++ linux-2.6.32.48/arch/x86/kernel/dumpstack_64.c 2011-11-15 19:59:43.000000000 -0500
430 ++++ linux-2.6.32.48/arch/x86/kernel/dumpstack_64.c 2011-11-18 18:01:52.000000000 -0500
431 @@ -116,8 +116,8 @@ void dump_trace(struct task_struct *task
432 unsigned long *irq_stack_end =
433 (unsigned long *)per_cpu(irq_stack_ptr, cpu);
434 @@ -13164,6 +13228,57 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/dumpstack_64.c linux-2.6.32.48/arch/x
435 put_cpu();
436 }
437 EXPORT_SYMBOL(dump_trace);
438 +@@ -304,3 +305,50 @@ int is_valid_bugaddr(unsigned long ip)
439 + return ud2 == 0x0b0f;
440 + }
441 +
442 ++
443 ++#ifdef CONFIG_PAX_MEMORY_STACKLEAK
444 ++void pax_check_alloca(unsigned long size)
445 ++{
446 ++ unsigned long sp = (unsigned long)&sp, stack_start, stack_end;
447 ++ unsigned cpu, used;
448 ++ char *id;
449 ++
450 ++ /* check the process stack first */
451 ++ stack_start = (unsigned long)task_stack_page(current);
452 ++ stack_end = stack_start + THREAD_SIZE;
453 ++ if (likely(stack_start <= sp && sp < stack_end)) {
454 ++ unsigned long stack_left = sp & (THREAD_SIZE - 1);
455 ++ BUG_ON(stack_left < 256 || size >= stack_left - 256);
456 ++ return;
457 ++ }
458 ++
459 ++ cpu = get_cpu();
460 ++
461 ++ /* check the irq stacks */
462 ++ stack_end = (unsigned long)per_cpu(irq_stack_ptr, cpu);
463 ++ stack_start = stack_end - IRQ_STACK_SIZE;
464 ++ if (stack_start <= sp && sp < stack_end) {
465 ++ unsigned long stack_left = sp & (IRQ_STACK_SIZE - 1);
466 ++ put_cpu();
467 ++ BUG_ON(stack_left < 256 || size >= stack_left - 256);
468 ++ return;
469 ++ }
470 ++
471 ++ /* check the exception stacks */
472 ++ used = 0;
473 ++ stack_end = (unsigned long)in_exception_stack(cpu, sp, &used, &id);
474 ++ stack_start = stack_end - EXCEPTION_STKSZ;
475 ++ if (stack_end && stack_start <= sp && sp < stack_end) {
476 ++ unsigned long stack_left = sp & (EXCEPTION_STKSZ - 1);
477 ++ put_cpu();
478 ++ BUG_ON(stack_left < 256 || size >= stack_left - 256);
479 ++ return;
480 ++ }
481 ++
482 ++ put_cpu();
483 ++
484 ++ /* unknown stack */
485 ++ BUG();
486 ++}
487 ++EXPORT_SYMBOL(pax_check_alloca);
488 ++#endif
489 diff -urNp linux-2.6.32.48/arch/x86/kernel/dumpstack.c linux-2.6.32.48/arch/x86/kernel/dumpstack.c
490 --- linux-2.6.32.48/arch/x86/kernel/dumpstack.c 2011-11-08 19:02:43.000000000 -0500
491 +++ linux-2.6.32.48/arch/x86/kernel/dumpstack.c 2011-11-15 19:59:43.000000000 -0500
492 @@ -13606,7 +13721,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/efi_stub_64.S linux-2.6.32.48/arch/x8
493 ENDPROC(efi_call6)
494 diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/kernel/entry_32.S
495 --- linux-2.6.32.48/arch/x86/kernel/entry_32.S 2011-11-08 19:02:43.000000000 -0500
496 -+++ linux-2.6.32.48/arch/x86/kernel/entry_32.S 2011-11-15 19:59:43.000000000 -0500
497 ++++ linux-2.6.32.48/arch/x86/kernel/entry_32.S 2011-11-18 18:01:52.000000000 -0500
498 @@ -185,13 +185,146 @@
499 /*CFI_REL_OFFSET gs, PT_GS*/
500 .endm
501 @@ -13780,6 +13895,15 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
502 .macro RESTORE_INT_REGS
503 popl %ebx
504 CFI_ADJUST_CFA_OFFSET -4
505 +@@ -331,7 +473,7 @@ ENTRY(ret_from_fork)
506 + CFI_ADJUST_CFA_OFFSET -4
507 + jmp syscall_exit
508 + CFI_ENDPROC
509 +-END(ret_from_fork)
510 ++ENDPROC(ret_from_fork)
511 +
512 + /*
513 + * Return to user mode is not as complex as all this looks,
514 @@ -352,7 +494,15 @@ check_userspace:
515 movb PT_CS(%esp), %al
516 andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax
517 @@ -13796,15 +13920,26 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
518
519 ENTRY(resume_userspace)
520 LOCKDEP_SYS_EXIT
521 -@@ -364,7 +514,7 @@ ENTRY(resume_userspace)
522 +@@ -364,8 +514,8 @@ ENTRY(resume_userspace)
523 andl $_TIF_WORK_MASK, %ecx # is there any work to be done on
524 # int/exception return?
525 jne work_pending
526 - jmp restore_all
527 +-END(ret_from_exception)
528 + jmp restore_all_pax
529 - END(ret_from_exception)
530 ++ENDPROC(ret_from_exception)
531
532 #ifdef CONFIG_PREEMPT
533 + ENTRY(resume_kernel)
534 +@@ -380,7 +530,7 @@ need_resched:
535 + jz restore_all
536 + call preempt_schedule_irq
537 + jmp need_resched
538 +-END(resume_kernel)
539 ++ENDPROC(resume_kernel)
540 + #endif
541 + CFI_ENDPROC
542 +
543 @@ -414,25 +564,36 @@ sysenter_past_esp:
544 /*CFI_REL_OFFSET cs, 0*/
545 /*
546 @@ -13947,7 +14082,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
547 pushl $__ESPFIX_SS
548 CFI_ADJUST_CFA_OFFSET 4
549 push %eax /* new kernel esp */
550 -@@ -636,31 +846,25 @@ work_resched:
551 +@@ -636,36 +846,30 @@ work_resched:
552 movl TI_flags(%ebp), %ecx
553 andl $_TIF_WORK_MASK, %ecx # is there any work to be done other
554 # than syscall tracing?
555 @@ -13983,7 +14118,13 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
556 #endif
557 xorl %edx, %edx
558 call do_notify_resume
559 -@@ -673,6 +877,9 @@ syscall_trace_entry:
560 + jmp resume_userspace_sig
561 +-END(work_pending)
562 ++ENDPROC(work_pending)
563 +
564 + # perform syscall exit tracing
565 + ALIGN
566 +@@ -673,11 +877,14 @@ syscall_trace_entry:
567 movl $-ENOSYS,PT_EAX(%esp)
568 movl %esp, %eax
569 call syscall_trace_enter
570 @@ -13993,7 +14134,19 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
571 /* What it returned is what we'll actually use. */
572 cmpl $(nr_syscalls), %eax
573 jnae syscall_call
574 -@@ -695,6 +902,10 @@ END(syscall_exit_work)
575 + jmp syscall_exit
576 +-END(syscall_trace_entry)
577 ++ENDPROC(syscall_trace_entry)
578 +
579 + # perform syscall exit tracing
580 + ALIGN
581 +@@ -690,20 +897,24 @@ syscall_exit_work:
582 + movl %esp, %eax
583 + call syscall_trace_leave
584 + jmp resume_userspace
585 +-END(syscall_exit_work)
586 ++ENDPROC(syscall_exit_work)
587 + CFI_ENDPROC
588
589 RING0_INT_FRAME # can't unwind into user space anyway
590 syscall_fault:
591 @@ -14004,6 +14157,17 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
592 GET_THREAD_INFO(%ebp)
593 movl $-EFAULT,PT_EAX(%esp)
594 jmp resume_userspace
595 +-END(syscall_fault)
596 ++ENDPROC(syscall_fault)
597 +
598 + syscall_badsys:
599 + movl $-ENOSYS,PT_EAX(%esp)
600 + jmp resume_userspace
601 +-END(syscall_badsys)
602 ++ENDPROC(syscall_badsys)
603 + CFI_ENDPROC
604 +
605 + /*
606 @@ -726,6 +937,33 @@ PTREGSCALL(rt_sigreturn)
607 PTREGSCALL(vm86)
608 PTREGSCALL(vm86old)
609 @@ -14053,6 +14217,192 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
610 mov GDT_ENTRY_ESPFIX_SS * 8 + 4(%ebx), %al /* bits 16..23 */
611 mov GDT_ENTRY_ESPFIX_SS * 8 + 7(%ebx), %ah /* bits 24..31 */
612 shl $16, %eax
613 +@@ -793,7 +1037,7 @@ vector=vector+1
614 + .endr
615 + 2: jmp common_interrupt
616 + .endr
617 +-END(irq_entries_start)
618 ++ENDPROC(irq_entries_start)
619 +
620 + .previous
621 + END(interrupt)
622 +@@ -840,7 +1084,7 @@ ENTRY(coprocessor_error)
623 + CFI_ADJUST_CFA_OFFSET 4
624 + jmp error_code
625 + CFI_ENDPROC
626 +-END(coprocessor_error)
627 ++ENDPROC(coprocessor_error)
628 +
629 + ENTRY(simd_coprocessor_error)
630 + RING0_INT_FRAME
631 +@@ -850,7 +1094,7 @@ ENTRY(simd_coprocessor_error)
632 + CFI_ADJUST_CFA_OFFSET 4
633 + jmp error_code
634 + CFI_ENDPROC
635 +-END(simd_coprocessor_error)
636 ++ENDPROC(simd_coprocessor_error)
637 +
638 + ENTRY(device_not_available)
639 + RING0_INT_FRAME
640 +@@ -860,7 +1104,7 @@ ENTRY(device_not_available)
641 + CFI_ADJUST_CFA_OFFSET 4
642 + jmp error_code
643 + CFI_ENDPROC
644 +-END(device_not_available)
645 ++ENDPROC(device_not_available)
646 +
647 + #ifdef CONFIG_PARAVIRT
648 + ENTRY(native_iret)
649 +@@ -869,12 +1113,12 @@ ENTRY(native_iret)
650 + .align 4
651 + .long native_iret, iret_exc
652 + .previous
653 +-END(native_iret)
654 ++ENDPROC(native_iret)
655 +
656 + ENTRY(native_irq_enable_sysexit)
657 + sti
658 + sysexit
659 +-END(native_irq_enable_sysexit)
660 ++ENDPROC(native_irq_enable_sysexit)
661 + #endif
662 +
663 + ENTRY(overflow)
664 +@@ -885,7 +1129,7 @@ ENTRY(overflow)
665 + CFI_ADJUST_CFA_OFFSET 4
666 + jmp error_code
667 + CFI_ENDPROC
668 +-END(overflow)
669 ++ENDPROC(overflow)
670 +
671 + ENTRY(bounds)
672 + RING0_INT_FRAME
673 +@@ -895,7 +1139,7 @@ ENTRY(bounds)
674 + CFI_ADJUST_CFA_OFFSET 4
675 + jmp error_code
676 + CFI_ENDPROC
677 +-END(bounds)
678 ++ENDPROC(bounds)
679 +
680 + ENTRY(invalid_op)
681 + RING0_INT_FRAME
682 +@@ -905,7 +1149,7 @@ ENTRY(invalid_op)
683 + CFI_ADJUST_CFA_OFFSET 4
684 + jmp error_code
685 + CFI_ENDPROC
686 +-END(invalid_op)
687 ++ENDPROC(invalid_op)
688 +
689 + ENTRY(coprocessor_segment_overrun)
690 + RING0_INT_FRAME
691 +@@ -915,7 +1159,7 @@ ENTRY(coprocessor_segment_overrun)
692 + CFI_ADJUST_CFA_OFFSET 4
693 + jmp error_code
694 + CFI_ENDPROC
695 +-END(coprocessor_segment_overrun)
696 ++ENDPROC(coprocessor_segment_overrun)
697 +
698 + ENTRY(invalid_TSS)
699 + RING0_EC_FRAME
700 +@@ -923,7 +1167,7 @@ ENTRY(invalid_TSS)
701 + CFI_ADJUST_CFA_OFFSET 4
702 + jmp error_code
703 + CFI_ENDPROC
704 +-END(invalid_TSS)
705 ++ENDPROC(invalid_TSS)
706 +
707 + ENTRY(segment_not_present)
708 + RING0_EC_FRAME
709 +@@ -931,7 +1175,7 @@ ENTRY(segment_not_present)
710 + CFI_ADJUST_CFA_OFFSET 4
711 + jmp error_code
712 + CFI_ENDPROC
713 +-END(segment_not_present)
714 ++ENDPROC(segment_not_present)
715 +
716 + ENTRY(stack_segment)
717 + RING0_EC_FRAME
718 +@@ -939,7 +1183,7 @@ ENTRY(stack_segment)
719 + CFI_ADJUST_CFA_OFFSET 4
720 + jmp error_code
721 + CFI_ENDPROC
722 +-END(stack_segment)
723 ++ENDPROC(stack_segment)
724 +
725 + ENTRY(alignment_check)
726 + RING0_EC_FRAME
727 +@@ -947,7 +1191,7 @@ ENTRY(alignment_check)
728 + CFI_ADJUST_CFA_OFFSET 4
729 + jmp error_code
730 + CFI_ENDPROC
731 +-END(alignment_check)
732 ++ENDPROC(alignment_check)
733 +
734 + ENTRY(divide_error)
735 + RING0_INT_FRAME
736 +@@ -957,7 +1201,7 @@ ENTRY(divide_error)
737 + CFI_ADJUST_CFA_OFFSET 4
738 + jmp error_code
739 + CFI_ENDPROC
740 +-END(divide_error)
741 ++ENDPROC(divide_error)
742 +
743 + #ifdef CONFIG_X86_MCE
744 + ENTRY(machine_check)
745 +@@ -968,7 +1212,7 @@ ENTRY(machine_check)
746 + CFI_ADJUST_CFA_OFFSET 4
747 + jmp error_code
748 + CFI_ENDPROC
749 +-END(machine_check)
750 ++ENDPROC(machine_check)
751 + #endif
752 +
753 + ENTRY(spurious_interrupt_bug)
754 +@@ -979,7 +1223,7 @@ ENTRY(spurious_interrupt_bug)
755 + CFI_ADJUST_CFA_OFFSET 4
756 + jmp error_code
757 + CFI_ENDPROC
758 +-END(spurious_interrupt_bug)
759 ++ENDPROC(spurious_interrupt_bug)
760 +
761 + ENTRY(kernel_thread_helper)
762 + pushl $0 # fake return address for unwinder
763 +@@ -1095,7 +1339,7 @@ ENDPROC(xen_failsafe_callback)
764 +
765 + ENTRY(mcount)
766 + ret
767 +-END(mcount)
768 ++ENDPROC(mcount)
769 +
770 + ENTRY(ftrace_caller)
771 + cmpl $0, function_trace_stop
772 +@@ -1124,7 +1368,7 @@ ftrace_graph_call:
773 + .globl ftrace_stub
774 + ftrace_stub:
775 + ret
776 +-END(ftrace_caller)
777 ++ENDPROC(ftrace_caller)
778 +
779 + #else /* ! CONFIG_DYNAMIC_FTRACE */
780 +
781 +@@ -1160,7 +1404,7 @@ trace:
782 + popl %ecx
783 + popl %eax
784 + jmp ftrace_stub
785 +-END(mcount)
786 ++ENDPROC(mcount)
787 + #endif /* CONFIG_DYNAMIC_FTRACE */
788 + #endif /* CONFIG_FUNCTION_TRACER */
789 +
790 +@@ -1181,7 +1425,7 @@ ENTRY(ftrace_graph_caller)
791 + popl %ecx
792 + popl %eax
793 + ret
794 +-END(ftrace_graph_caller)
795 ++ENDPROC(ftrace_graph_caller)
796 +
797 + .globl return_to_handler
798 + return_to_handler:
799 @@ -1198,7 +1442,6 @@ return_to_handler:
800 ret
801 #endif
802 @@ -14061,7 +14411,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
803 #include "syscall_table_32.S"
804
805 syscall_table_size=(.-sys_call_table)
806 -@@ -1255,9 +1498,12 @@ error_code:
807 +@@ -1255,15 +1498,18 @@ error_code:
808 movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart
809 REG_TO_PTGS %ecx
810 SET_KERNEL_GS %ecx
811 @@ -14075,6 +14425,22 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
812 TRACE_IRQS_OFF
813 movl %esp,%eax # pt_regs pointer
814 call *%edi
815 + jmp ret_from_exception
816 + CFI_ENDPROC
817 +-END(page_fault)
818 ++ENDPROC(page_fault)
819 +
820 + /*
821 + * Debug traps and NMI can happen at the one SYSENTER instruction
822 +@@ -1309,7 +1555,7 @@ debug_stack_correct:
823 + call do_debug
824 + jmp ret_from_exception
825 + CFI_ENDPROC
826 +-END(debug)
827 ++ENDPROC(debug)
828 +
829 + /*
830 + * NMI is doubly nasty. It can happen _while_ we're handling
831 @@ -1351,6 +1597,9 @@ nmi_stack_correct:
832 xorl %edx,%edx # zero error code
833 movl %esp,%eax # pt_regs pointer
834 @@ -14085,7 +14451,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
835 jmp restore_all_notrace
836 CFI_ENDPROC
837
838 -@@ -1391,6 +1640,9 @@ nmi_espfix_stack:
839 +@@ -1391,12 +1640,15 @@ nmi_espfix_stack:
840 FIXUP_ESPFIX_STACK # %eax == %esp
841 xorl %edx,%edx # zero error code
842 call do_nmi
843 @@ -14095,9 +14461,34 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_32.S linux-2.6.32.48/arch/x86/k
844 RESTORE_REGS
845 lss 12+4(%esp), %esp # back to espfix stack
846 CFI_ADJUST_CFA_OFFSET -24
847 + jmp irq_return
848 + CFI_ENDPROC
849 +-END(nmi)
850 ++ENDPROC(nmi)
851 +
852 + ENTRY(int3)
853 + RING0_INT_FRAME
854 +@@ -1409,7 +1661,7 @@ ENTRY(int3)
855 + call do_int3
856 + jmp ret_from_exception
857 + CFI_ENDPROC
858 +-END(int3)
859 ++ENDPROC(int3)
860 +
861 + ENTRY(general_protection)
862 + RING0_EC_FRAME
863 +@@ -1417,7 +1669,7 @@ ENTRY(general_protection)
864 + CFI_ADJUST_CFA_OFFSET 4
865 + jmp error_code
866 + CFI_ENDPROC
867 +-END(general_protection)
868 ++ENDPROC(general_protection)
869 +
870 + /*
871 + * End of kprobes section
872 diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/kernel/entry_64.S
873 --- linux-2.6.32.48/arch/x86/kernel/entry_64.S 2011-11-08 19:02:43.000000000 -0500
874 -+++ linux-2.6.32.48/arch/x86/kernel/entry_64.S 2011-11-15 19:59:43.000000000 -0500
875 ++++ linux-2.6.32.48/arch/x86/kernel/entry_64.S 2011-11-18 18:01:52.000000000 -0500
876 @@ -53,6 +53,8 @@
877 #include <asm/paravirt.h>
878 #include <asm/ftrace.h>
879 @@ -14107,22 +14498,28 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
880
881 /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
882 #include <linux/elf-em.h>
883 -@@ -64,6 +66,7 @@
884 +@@ -64,8 +66,9 @@
885 #ifdef CONFIG_FUNCTION_TRACER
886 #ifdef CONFIG_DYNAMIC_FTRACE
887 ENTRY(mcount)
888 + pax_force_retaddr
889 retq
890 - END(mcount)
891 +-END(mcount)
892 ++ENDPROC(mcount)
893
894 -@@ -88,6 +91,7 @@ GLOBAL(ftrace_graph_call)
895 + ENTRY(ftrace_caller)
896 + cmpl $0, function_trace_stop
897 +@@ -88,8 +91,9 @@ GLOBAL(ftrace_graph_call)
898 #endif
899
900 GLOBAL(ftrace_stub)
901 + pax_force_retaddr
902 retq
903 - END(ftrace_caller)
904 +-END(ftrace_caller)
905 ++ENDPROC(ftrace_caller)
906
907 + #else /* ! CONFIG_DYNAMIC_FTRACE */
908 + ENTRY(mcount)
909 @@ -108,6 +112,7 @@ ENTRY(mcount)
910 #endif
911
912 @@ -14131,7 +14528,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
913 retq
914
915 trace:
916 -@@ -117,6 +122,7 @@ trace:
917 +@@ -117,12 +122,13 @@ trace:
918 movq 8(%rbp), %rsi
919 subq $MCOUNT_INSN_SIZE, %rdi
920
921 @@ -14139,14 +14536,24 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
922 call *ftrace_trace_function
923
924 MCOUNT_RESTORE_FRAME
925 -@@ -142,6 +148,7 @@ ENTRY(ftrace_graph_caller)
926 +
927 + jmp ftrace_stub
928 +-END(mcount)
929 ++ENDPROC(mcount)
930 + #endif /* CONFIG_DYNAMIC_FTRACE */
931 + #endif /* CONFIG_FUNCTION_TRACER */
932 +
933 +@@ -142,8 +148,9 @@ ENTRY(ftrace_graph_caller)
934
935 MCOUNT_RESTORE_FRAME
936
937 + pax_force_retaddr
938 retq
939 - END(ftrace_graph_caller)
940 +-END(ftrace_graph_caller)
941 ++ENDPROC(ftrace_graph_caller)
942
943 + GLOBAL(return_to_handler)
944 + subq $24, %rsp
945 @@ -159,6 +166,7 @@ GLOBAL(return_to_handler)
946 movq 8(%rsp), %rdx
947 movq (%rsp), %rax
948 @@ -14434,23 +14841,31 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
949 je 1f
950 SWAPGS
951 /*
952 -@@ -337,6 +608,7 @@ ENTRY(save_args)
953 +@@ -337,9 +608,10 @@ ENTRY(save_args)
954 * We entered an interrupt context - irqs are off:
955 */
956 2: TRACE_IRQS_OFF
957 + pax_force_retaddr
958 ret
959 CFI_ENDPROC
960 - END(save_args)
961 -@@ -352,6 +624,7 @@ ENTRY(save_rest)
962 +-END(save_args)
963 ++ENDPROC(save_args)
964 +
965 + ENTRY(save_rest)
966 + PARTIAL_FRAME 1 REST_SKIP+8
967 +@@ -352,9 +624,10 @@ ENTRY(save_rest)
968 movq_cfi r15, R15+16
969 movq %r11, 8(%rsp) /* return address */
970 FIXUP_TOP_OF_STACK %r11, 16
971 + pax_force_retaddr
972 ret
973 CFI_ENDPROC
974 - END(save_rest)
975 -@@ -383,7 +656,8 @@ ENTRY(save_paranoid)
976 +-END(save_rest)
977 ++ENDPROC(save_rest)
978 +
979 + /* save complete stack frame */
980 + .pushsection .kprobes.text, "ax"
981 +@@ -383,9 +656,10 @@ ENTRY(save_paranoid)
982 js 1f /* negative -> in kernel */
983 SWAPGS
984 xorl %ebx,%ebx
985 @@ -14458,8 +14873,11 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
986 +1: pax_force_retaddr
987 + ret
988 CFI_ENDPROC
989 - END(save_paranoid)
990 +-END(save_paranoid)
991 ++ENDPROC(save_paranoid)
992 .popsection
993 +
994 + /*
995 @@ -409,7 +683,7 @@ ENTRY(ret_from_fork)
996
997 RESTORE_REST
998 @@ -14469,6 +14887,15 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
999 je int_ret_from_sys_call
1000
1001 testl $_TIF_IA32, TI_flags(%rcx) # 32-bit compat task needs IRET
1002 +@@ -419,7 +693,7 @@ ENTRY(ret_from_fork)
1003 + jmp ret_from_sys_call # go to the SYSRET fastpath
1004 +
1005 + CFI_ENDPROC
1006 +-END(ret_from_fork)
1007 ++ENDPROC(ret_from_fork)
1008 +
1009 + /*
1010 + * System call entry. Upto 6 arguments in registers are supported.
1011 @@ -455,7 +729,7 @@ END(ret_from_fork)
1012 ENTRY(system_call)
1013 CFI_STARTPROC simple
1014 @@ -14531,14 +14958,63 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1015 je retint_restore_args
1016 movl $_TIF_ALLWORK_MASK,%edi
1017 /* edi: mask to check */
1018 -@@ -708,6 +991,7 @@ ENTRY(ptregscall_common)
1019 +@@ -674,7 +957,7 @@ int_restore_rest:
1020 + TRACE_IRQS_OFF
1021 + jmp int_with_check
1022 + CFI_ENDPROC
1023 +-END(system_call)
1024 ++ENDPROC(system_call)
1025 +
1026 + /*
1027 + * Certain special system calls that need to save a complete full stack frame.
1028 +@@ -690,7 +973,7 @@ ENTRY(\label)
1029 + call \func
1030 + jmp ptregscall_common
1031 + CFI_ENDPROC
1032 +-END(\label)
1033 ++ENDPROC(\label)
1034 + .endm
1035 +
1036 + PTREGSCALL stub_clone, sys_clone, %r8
1037 +@@ -708,9 +991,10 @@ ENTRY(ptregscall_common)
1038 movq_cfi_restore R12+8, r12
1039 movq_cfi_restore RBP+8, rbp
1040 movq_cfi_restore RBX+8, rbx
1041 + pax_force_retaddr
1042 ret $REST_SKIP /* pop extended registers */
1043 CFI_ENDPROC
1044 - END(ptregscall_common)
1045 +-END(ptregscall_common)
1046 ++ENDPROC(ptregscall_common)
1047 +
1048 + ENTRY(stub_execve)
1049 + CFI_STARTPROC
1050 +@@ -726,7 +1010,7 @@ ENTRY(stub_execve)
1051 + RESTORE_REST
1052 + jmp int_ret_from_sys_call
1053 + CFI_ENDPROC
1054 +-END(stub_execve)
1055 ++ENDPROC(stub_execve)
1056 +
1057 + /*
1058 + * sigreturn is special because it needs to restore all registers on return.
1059 +@@ -744,7 +1028,7 @@ ENTRY(stub_rt_sigreturn)
1060 + RESTORE_REST
1061 + jmp int_ret_from_sys_call
1062 + CFI_ENDPROC
1063 +-END(stub_rt_sigreturn)
1064 ++ENDPROC(stub_rt_sigreturn)
1065 +
1066 + /*
1067 + * Build the entry stubs and pointer table with some assembler magic.
1068 +@@ -780,7 +1064,7 @@ vector=vector+1
1069 + 2: jmp common_interrupt
1070 + .endr
1071 + CFI_ENDPROC
1072 +-END(irq_entries_start)
1073 ++ENDPROC(irq_entries_start)
1074 +
1075 + .previous
1076 + END(interrupt)
1077 @@ -800,6 +1084,16 @@ END(interrupt)
1078 CFI_ADJUST_CFA_OFFSET 10*8
1079 call save_args
1080 @@ -14582,7 +15058,25 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1081 /*
1082 * The iretq could re-enable interrupts:
1083 */
1084 -@@ -1032,6 +1330,16 @@ ENTRY(\sym)
1085 +@@ -940,7 +1238,7 @@ ENTRY(retint_kernel)
1086 + #endif
1087 +
1088 + CFI_ENDPROC
1089 +-END(common_interrupt)
1090 ++ENDPROC(common_interrupt)
1091 +
1092 + /*
1093 + * APIC interrupts.
1094 +@@ -953,7 +1251,7 @@ ENTRY(\sym)
1095 + interrupt \do_sym
1096 + jmp ret_from_intr
1097 + CFI_ENDPROC
1098 +-END(\sym)
1099 ++ENDPROC(\sym)
1100 + .endm
1101 +
1102 + #ifdef CONFIG_SMP
1103 +@@ -1032,12 +1330,22 @@ ENTRY(\sym)
1104 CFI_ADJUST_CFA_OFFSET 15*8
1105 call error_entry
1106 DEFAULT_FRAME 0
1107 @@ -14599,7 +15093,14 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1108 movq %rsp,%rdi /* pt_regs pointer */
1109 xorl %esi,%esi /* no error code */
1110 call \do_sym
1111 -@@ -1049,6 +1357,16 @@ ENTRY(\sym)
1112 + jmp error_exit /* %ebx: no swapgs flag */
1113 + CFI_ENDPROC
1114 +-END(\sym)
1115 ++ENDPROC(\sym)
1116 + .endm
1117 +
1118 + .macro paranoidzeroentry sym do_sym
1119 +@@ -1049,12 +1357,22 @@ ENTRY(\sym)
1120 subq $15*8, %rsp
1121 call save_paranoid
1122 TRACE_IRQS_OFF
1123 @@ -14616,7 +15117,14 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1124 movq %rsp,%rdi /* pt_regs pointer */
1125 xorl %esi,%esi /* no error code */
1126 call \do_sym
1127 -@@ -1066,9 +1384,24 @@ ENTRY(\sym)
1128 + jmp paranoid_exit /* %ebx: no swapgs flag */
1129 + CFI_ENDPROC
1130 +-END(\sym)
1131 ++ENDPROC(\sym)
1132 + .endm
1133 +
1134 + .macro paranoidzeroentry_ist sym do_sym ist
1135 +@@ -1066,15 +1384,30 @@ ENTRY(\sym)
1136 subq $15*8, %rsp
1137 call save_paranoid
1138 TRACE_IRQS_OFF
1139 @@ -14642,7 +15150,14 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1140 subq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%rbp)
1141 call \do_sym
1142 addq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%rbp)
1143 -@@ -1085,6 +1418,16 @@ ENTRY(\sym)
1144 + jmp paranoid_exit /* %ebx: no swapgs flag */
1145 + CFI_ENDPROC
1146 +-END(\sym)
1147 ++ENDPROC(\sym)
1148 + .endm
1149 +
1150 + .macro errorentry sym do_sym
1151 +@@ -1085,13 +1418,23 @@ ENTRY(\sym)
1152 CFI_ADJUST_CFA_OFFSET 15*8
1153 call error_entry
1154 DEFAULT_FRAME 0
1155 @@ -14659,7 +15174,15 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1156 movq %rsp,%rdi /* pt_regs pointer */
1157 movq ORIG_RAX(%rsp),%rsi /* get error code */
1158 movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */
1159 -@@ -1104,6 +1447,16 @@ ENTRY(\sym)
1160 + call \do_sym
1161 + jmp error_exit /* %ebx: no swapgs flag */
1162 + CFI_ENDPROC
1163 +-END(\sym)
1164 ++ENDPROC(\sym)
1165 + .endm
1166 +
1167 + /* error code is on the stack already */
1168 +@@ -1104,13 +1447,23 @@ ENTRY(\sym)
1169 call save_paranoid
1170 DEFAULT_FRAME 0
1171 TRACE_IRQS_OFF
1172 @@ -14676,23 +15199,39 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1173 movq %rsp,%rdi /* pt_regs pointer */
1174 movq ORIG_RAX(%rsp),%rsi /* get error code */
1175 movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */
1176 -@@ -1141,6 +1494,7 @@ gs_change:
1177 + call \do_sym
1178 + jmp paranoid_exit /* %ebx: no swapgs flag */
1179 + CFI_ENDPROC
1180 +-END(\sym)
1181 ++ENDPROC(\sym)
1182 + .endm
1183 +
1184 + zeroentry divide_error do_divide_error
1185 +@@ -1141,9 +1494,10 @@ gs_change:
1186 SWAPGS
1187 popf
1188 CFI_ADJUST_CFA_OFFSET -8
1189 + pax_force_retaddr
1190 ret
1191 CFI_ENDPROC
1192 - END(native_load_gs_index)
1193 -@@ -1195,6 +1549,7 @@ ENTRY(kernel_thread)
1194 +-END(native_load_gs_index)
1195 ++ENDPROC(native_load_gs_index)
1196 +
1197 + .section __ex_table,"a"
1198 + .align 8
1199 +@@ -1195,9 +1549,10 @@ ENTRY(kernel_thread)
1200 */
1201 RESTORE_ALL
1202 UNFAKE_STACK_FRAME
1203 + pax_force_retaddr
1204 ret
1205 CFI_ENDPROC
1206 - END(kernel_thread)
1207 -@@ -1208,6 +1563,7 @@ ENTRY(child_rip)
1208 +-END(kernel_thread)
1209 ++ENDPROC(kernel_thread)
1210 +
1211 + ENTRY(child_rip)
1212 + pushq $0 # fake return address
1213 +@@ -1208,13 +1563,14 @@ ENTRY(child_rip)
1214 */
1215 movq %rdi, %rax
1216 movq %rsi, %rdi
1217 @@ -14700,22 +15239,56 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1218 call *%rax
1219 # exit
1220 mov %eax, %edi
1221 -@@ -1243,6 +1599,7 @@ ENTRY(kernel_execve)
1222 + call do_exit
1223 + ud2 # padding for call trace
1224 + CFI_ENDPROC
1225 +-END(child_rip)
1226 ++ENDPROC(child_rip)
1227 +
1228 + /*
1229 + * execve(). This function needs to use IRET, not SYSRET, to set up all state properly.
1230 +@@ -1243,9 +1599,10 @@ ENTRY(kernel_execve)
1231 je int_ret_from_sys_call
1232 RESTORE_ARGS
1233 UNFAKE_STACK_FRAME
1234 + pax_force_retaddr
1235 ret
1236 CFI_ENDPROC
1237 - END(kernel_execve)
1238 -@@ -1263,6 +1620,7 @@ ENTRY(call_softirq)
1239 +-END(kernel_execve)
1240 ++ENDPROC(kernel_execve)
1241 +
1242 + /* Call softirq on interrupt stack. Interrupts are off. */
1243 + ENTRY(call_softirq)
1244 +@@ -1263,9 +1620,10 @@ ENTRY(call_softirq)
1245 CFI_DEF_CFA_REGISTER rsp
1246 CFI_ADJUST_CFA_OFFSET -8
1247 decl PER_CPU_VAR(irq_count)
1248 + pax_force_retaddr
1249 ret
1250 CFI_ENDPROC
1251 - END(call_softirq)
1252 +-END(call_softirq)
1253 ++ENDPROC(call_softirq)
1254 +
1255 + #ifdef CONFIG_XEN
1256 + zeroentry xen_hypervisor_callback xen_do_hypervisor_callback
1257 +@@ -1303,7 +1661,7 @@ ENTRY(xen_do_hypervisor_callback) # do
1258 + decl PER_CPU_VAR(irq_count)
1259 + jmp error_exit
1260 + CFI_ENDPROC
1261 +-END(xen_do_hypervisor_callback)
1262 ++ENDPROC(xen_do_hypervisor_callback)
1263 +
1264 + /*
1265 + * Hypervisor uses this for application faults while it executes.
1266 +@@ -1362,7 +1720,7 @@ ENTRY(xen_failsafe_callback)
1267 + SAVE_ALL
1268 + jmp error_exit
1269 + CFI_ENDPROC
1270 +-END(xen_failsafe_callback)
1271 ++ENDPROC(xen_failsafe_callback)
1272 +
1273 + #endif /* CONFIG_XEN */
1274 +
1275 @@ -1405,16 +1763,31 @@ ENTRY(paranoid_exit)
1276 TRACE_IRQS_OFF
1277 testl %ebx,%ebx /* swapgs needed? */
1278 @@ -14749,6 +15322,15 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1279 jmp irq_return
1280 paranoid_userspace:
1281 GET_THREAD_INFO(%rcx)
1282 +@@ -1443,7 +1816,7 @@ paranoid_schedule:
1283 + TRACE_IRQS_OFF
1284 + jmp paranoid_userspace
1285 + CFI_ENDPROC
1286 +-END(paranoid_exit)
1287 ++ENDPROC(paranoid_exit)
1288 +
1289 + /*
1290 + * Exception entry point. This expects an error code/orig_rax on the stack.
1291 @@ -1470,12 +1843,13 @@ ENTRY(error_entry)
1292 movq_cfi r14, R14+8
1293 movq_cfi r15, R15+8
1294 @@ -14764,6 +15346,24 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1295 ret
1296 CFI_ENDPROC
1297
1298 +@@ -1497,7 +1871,7 @@ error_kernelspace:
1299 + cmpq $gs_change,RIP+8(%rsp)
1300 + je error_swapgs
1301 + jmp error_sti
1302 +-END(error_entry)
1303 ++ENDPROC(error_entry)
1304 +
1305 +
1306 + /* ebx: no swapgs flag (1: don't need swapgs, 0: need it) */
1307 +@@ -1517,7 +1891,7 @@ ENTRY(error_exit)
1308 + jnz retint_careful
1309 + jmp retint_swapgs
1310 + CFI_ENDPROC
1311 +-END(error_exit)
1312 ++ENDPROC(error_exit)
1313 +
1314 +
1315 + /* runs on exception stack */
1316 @@ -1529,6 +1903,16 @@ ENTRY(nmi)
1317 CFI_ADJUST_CFA_OFFSET 15*8
1318 call save_paranoid
1319 @@ -14811,6 +15411,23 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/entry_64.S linux-2.6.32.48/arch/x86/k
1320 jmp irq_return
1321 nmi_userspace:
1322 GET_THREAD_INFO(%rcx)
1323 +@@ -1573,14 +1973,14 @@ nmi_schedule:
1324 + jmp paranoid_exit
1325 + CFI_ENDPROC
1326 + #endif
1327 +-END(nmi)
1328 ++ENDPROC(nmi)
1329 +
1330 + ENTRY(ignore_sysret)
1331 + CFI_STARTPROC
1332 + mov $-ENOSYS,%eax
1333 + sysret
1334 + CFI_ENDPROC
1335 +-END(ignore_sysret)
1336 ++ENDPROC(ignore_sysret)
1337 +
1338 + /*
1339 + * End of kprobes section
1340 diff -urNp linux-2.6.32.48/arch/x86/kernel/ftrace.c linux-2.6.32.48/arch/x86/kernel/ftrace.c
1341 --- linux-2.6.32.48/arch/x86/kernel/ftrace.c 2011-11-08 19:02:43.000000000 -0500
1342 +++ linux-2.6.32.48/arch/x86/kernel/ftrace.c 2011-11-15 19:59:43.000000000 -0500
1343 @@ -16038,7 +16655,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/kgdb.c linux-2.6.32.48/arch/x86/kerne
1344 .flags = KGDB_HW_BREAKPOINT,
1345 diff -urNp linux-2.6.32.48/arch/x86/kernel/kprobes.c linux-2.6.32.48/arch/x86/kernel/kprobes.c
1346 --- linux-2.6.32.48/arch/x86/kernel/kprobes.c 2011-11-08 19:02:43.000000000 -0500
1347 -+++ linux-2.6.32.48/arch/x86/kernel/kprobes.c 2011-11-15 19:59:43.000000000 -0500
1348 ++++ linux-2.6.32.48/arch/x86/kernel/kprobes.c 2011-11-18 18:01:52.000000000 -0500
1349 @@ -168,9 +168,13 @@ static void __kprobes set_jmp_op(void *f
1350 char op;
1351 s32 raddr;
1352 @@ -16122,7 +16739,17 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/kprobes.c linux-2.6.32.48/arch/x86/ke
1353 /*
1354 * The breakpoint instruction was removed right
1355 * after we hit it. Another cpu has removed
1356 -@@ -777,7 +785,7 @@ static void __kprobes resume_execution(s
1357 +@@ -637,6 +645,9 @@ static void __used __kprobes kretprobe_t
1358 + /* Skip orig_ax, ip, cs */
1359 + " addq $24, %rsp\n"
1360 + " popfq\n"
1361 ++#ifdef CONFIG_PAX_KERNEXEC_PLUGIN
1362 ++ " btsq $63,(%rsp)\n"
1363 ++#endif
1364 + #else
1365 + " pushf\n"
1366 + /*
1367 +@@ -777,7 +788,7 @@ static void __kprobes resume_execution(s
1368 struct pt_regs *regs, struct kprobe_ctlblk *kcb)
1369 {
1370 unsigned long *tos = stack_addr(regs);
1371 @@ -16131,7 +16758,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kernel/kprobes.c linux-2.6.32.48/arch/x86/ke
1372 unsigned long orig_ip = (unsigned long)p->addr;
1373 kprobe_opcode_t *insn = p->ainsn.insn;
1374
1375 -@@ -960,7 +968,7 @@ int __kprobes kprobe_exceptions_notify(s
1376 +@@ -960,7 +971,7 @@ int __kprobes kprobe_exceptions_notify(s
1377 struct die_args *args = data;
1378 int ret = NOTIFY_DONE;
1379
1380 @@ -19166,7 +19793,7 @@ diff -urNp linux-2.6.32.48/arch/x86/kvm/lapic.c linux-2.6.32.48/arch/x86/kvm/lap
1381 /* 14 is the version for Xeon and Pentium 8.4.8*/
1382 diff -urNp linux-2.6.32.48/arch/x86/kvm/paging_tmpl.h linux-2.6.32.48/arch/x86/kvm/paging_tmpl.h
1383 --- linux-2.6.32.48/arch/x86/kvm/paging_tmpl.h 2011-11-08 19:02:43.000000000 -0500
1384 -+++ linux-2.6.32.48/arch/x86/kvm/paging_tmpl.h 2011-11-15 19:59:43.000000000 -0500
1385 ++++ linux-2.6.32.48/arch/x86/kvm/paging_tmpl.h 2011-11-18 18:01:55.000000000 -0500
1386 @@ -416,6 +416,8 @@ static int FNAME(page_fault)(struct kvm_
1387 int level = PT_PAGE_TABLE_LEVEL;
1388 unsigned long mmu_seq;
1389 @@ -19176,6 +19803,14 @@ diff -urNp linux-2.6.32.48/arch/x86/kvm/paging_tmpl.h linux-2.6.32.48/arch/x86/k
1390 pgprintk("%s: addr %lx err %x\n", __func__, addr, error_code);
1391 kvm_mmu_audit(vcpu, "pre page fault");
1392
1393 +@@ -461,6 +463,7 @@ static int FNAME(page_fault)(struct kvm_
1394 + kvm_mmu_free_some_pages(vcpu);
1395 + sptep = FNAME(fetch)(vcpu, addr, &walker, user_fault, write_fault,
1396 + level, &write_pt, pfn);
1397 ++ (void)sptep;
1398 + pgprintk("%s: shadow pte %p %llx ptwrite %d\n", __func__,
1399 + sptep, *sptep, write_pt);
1400 +
1401 diff -urNp linux-2.6.32.48/arch/x86/kvm/svm.c linux-2.6.32.48/arch/x86/kvm/svm.c
1402 --- linux-2.6.32.48/arch/x86/kvm/svm.c 2011-11-08 19:02:43.000000000 -0500
1403 +++ linux-2.6.32.48/arch/x86/kvm/svm.c 2011-11-15 19:59:43.000000000 -0500
1404 @@ -21687,7 +22322,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/extable.c linux-2.6.32.48/arch/x86/mm/ext
1405 pnp_bios_is_utter_crap = 1;
1406 diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault.c
1407 --- linux-2.6.32.48/arch/x86/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
1408 -+++ linux-2.6.32.48/arch/x86/mm/fault.c 2011-11-15 19:59:43.000000000 -0500
1409 ++++ linux-2.6.32.48/arch/x86/mm/fault.c 2011-11-18 18:07:11.000000000 -0500
1410 @@ -11,10 +11,19 @@
1411 #include <linux/kprobes.h> /* __kprobes, ... */
1412 #include <linux/mmiotrace.h> /* kmmio_handler, ... */
1413 @@ -21741,10 +22376,14 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1414 break;
1415
1416 instr++;
1417 -@@ -172,6 +187,30 @@ force_sig_info_fault(int si_signo, int s
1418 +@@ -172,6 +187,34 @@ force_sig_info_fault(int si_signo, int s
1419 force_sig_info(si_signo, &info, tsk);
1420 }
1421
1422 ++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
1423 ++static bool pax_is_fetch_fault(struct pt_regs *regs, unsigned long error_code, unsigned long address);
1424 ++#endif
1425 ++
1426 +#ifdef CONFIG_PAX_EMUTRAMP
1427 +static int pax_handle_fetch_fault(struct pt_regs *regs);
1428 +#endif
1429 @@ -21772,7 +22411,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1430 DEFINE_SPINLOCK(pgd_lock);
1431 LIST_HEAD(pgd_list);
1432
1433 -@@ -224,11 +263,24 @@ void vmalloc_sync_all(void)
1434 +@@ -224,11 +267,24 @@ void vmalloc_sync_all(void)
1435 address += PMD_SIZE) {
1436
1437 unsigned long flags;
1438 @@ -21798,7 +22437,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1439 break;
1440 }
1441 spin_unlock_irqrestore(&pgd_lock, flags);
1442 -@@ -258,6 +310,11 @@ static noinline int vmalloc_fault(unsign
1443 +@@ -258,6 +314,11 @@ static noinline int vmalloc_fault(unsign
1444 * an interrupt in the middle of a task switch..
1445 */
1446 pgd_paddr = read_cr3();
1447 @@ -21810,7 +22449,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1448 pmd_k = vmalloc_sync_one(__va(pgd_paddr), address);
1449 if (!pmd_k)
1450 return -1;
1451 -@@ -332,15 +389,27 @@ void vmalloc_sync_all(void)
1452 +@@ -332,15 +393,27 @@ void vmalloc_sync_all(void)
1453
1454 const pgd_t *pgd_ref = pgd_offset_k(address);
1455 unsigned long flags;
1456 @@ -21838,7 +22477,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1457 if (pgd_none(*pgd))
1458 set_pgd(pgd, *pgd_ref);
1459 else
1460 -@@ -373,7 +442,14 @@ static noinline int vmalloc_fault(unsign
1461 +@@ -373,7 +446,14 @@ static noinline int vmalloc_fault(unsign
1462 * happen within a race in page table update. In the later
1463 * case just flush:
1464 */
1465 @@ -21853,7 +22492,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1466 pgd_ref = pgd_offset_k(address);
1467 if (pgd_none(*pgd_ref))
1468 return -1;
1469 -@@ -535,7 +611,7 @@ static int is_errata93(struct pt_regs *r
1470 +@@ -535,7 +615,7 @@ static int is_errata93(struct pt_regs *r
1471 static int is_errata100(struct pt_regs *regs, unsigned long address)
1472 {
1473 #ifdef CONFIG_X86_64
1474 @@ -21862,7 +22501,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1475 return 1;
1476 #endif
1477 return 0;
1478 -@@ -562,7 +638,7 @@ static int is_f00f_bug(struct pt_regs *r
1479 +@@ -562,7 +642,7 @@ static int is_f00f_bug(struct pt_regs *r
1480 }
1481
1482 static const char nx_warning[] = KERN_CRIT
1483 @@ -21871,7 +22510,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1484
1485 static void
1486 show_fault_oops(struct pt_regs *regs, unsigned long error_code,
1487 -@@ -571,15 +647,26 @@ show_fault_oops(struct pt_regs *regs, un
1488 +@@ -571,15 +651,26 @@ show_fault_oops(struct pt_regs *regs, un
1489 if (!oops_may_print())
1490 return;
1491
1492 @@ -21900,15 +22539,13 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1493 printk(KERN_ALERT "BUG: unable to handle kernel ");
1494 if (address < PAGE_SIZE)
1495 printk(KERN_CONT "NULL pointer dereference");
1496 -@@ -704,6 +791,70 @@ __bad_area_nosemaphore(struct pt_regs *r
1497 - unsigned long address, int si_code)
1498 +@@ -705,6 +796,23 @@ __bad_area_nosemaphore(struct pt_regs *r
1499 {
1500 struct task_struct *tsk = current;
1501 -+#if defined(CONFIG_X86_64) || defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
1502 +
1503 ++#ifdef CONFIG_X86_64
1504 + struct mm_struct *mm = tsk->mm;
1505 -+#endif
1506 +
1507 -+#ifdef CONFIG_X86_64
1508 + if (mm && (error_code & PF_INSTR) && mm->context.vdso) {
1509 + if (regs->ip == (unsigned long)vgettimeofday) {
1510 + regs->ip = (unsigned long)VDSO64_SYMBOL(mm->context.vdso, fallback_gettimeofday);
1511 @@ -21923,36 +22560,15 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1512 + }
1513 +#endif
1514 +
1515 + /* User mode accesses just cause a SIGSEGV */
1516 + if (error_code & PF_USER) {
1517 + /*
1518 +@@ -722,6 +830,21 @@ __bad_area_nosemaphore(struct pt_regs *r
1519 + if (is_errata100(regs, address))
1520 + return;
1521 +
1522 +#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
1523 -+ if (mm && (error_code & PF_USER)) {
1524 -+ unsigned long ip = regs->ip;
1525 -+
1526 -+ if (v8086_mode(regs))
1527 -+ ip = ((regs->cs & 0xffff) << 4) + (ip & 0xffff);
1528 -+
1529 -+ /*
1530 -+ * It's possible to have interrupts off here:
1531 -+ */
1532 -+ local_irq_enable();
1533 -+
1534 -+#ifdef CONFIG_PAX_PAGEEXEC
1535 -+ if ((mm->pax_flags & MF_PAX_PAGEEXEC) &&
1536 -+ ((nx_enabled && (error_code & PF_INSTR)) || (!(error_code & (PF_PROT | PF_WRITE)) && ip == address))) {
1537 -+
1538 -+#ifdef CONFIG_PAX_EMUTRAMP
1539 -+ switch (pax_handle_fetch_fault(regs)) {
1540 -+ case 2:
1541 -+ return;
1542 -+ }
1543 -+#endif
1544 -+
1545 -+ pax_report_fault(regs, (void *)ip, (void *)regs->sp);
1546 -+ do_group_exit(SIGKILL);
1547 -+ }
1548 -+#endif
1549 -+
1550 -+#ifdef CONFIG_PAX_SEGMEXEC
1551 -+ if ((mm->pax_flags & MF_PAX_SEGMEXEC) && !(error_code & (PF_PROT | PF_WRITE)) && (ip + SEGMEXEC_TASK_SIZE == address)) {
1552 ++ if (pax_is_fetch_fault(regs, error_code, address)) {
1553 +
1554 +#ifdef CONFIG_PAX_EMUTRAMP
1555 + switch (pax_handle_fetch_fault(regs)) {
1556 @@ -21961,17 +22577,24 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1557 + }
1558 +#endif
1559 +
1560 -+ pax_report_fault(regs, (void *)ip, (void *)regs->sp);
1561 ++ pax_report_fault(regs, (void *)regs->ip, (void *)regs->sp);
1562 + do_group_exit(SIGKILL);
1563 + }
1564 +#endif
1565 +
1566 -+ }
1567 -+#endif
1568 + if (unlikely(show_unhandled_signals))
1569 + show_signal_msg(regs, error_code, address, tsk);
1570
1571 - /* User mode accesses just cause a SIGSEGV */
1572 - if (error_code & PF_USER) {
1573 -@@ -857,6 +1008,99 @@ static int spurious_fault_check(unsigned
1574 +@@ -818,7 +941,7 @@ do_sigbus(struct pt_regs *regs, unsigned
1575 + if (fault & VM_FAULT_HWPOISON) {
1576 + printk(KERN_ERR
1577 + "MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n",
1578 +- tsk->comm, tsk->pid, address);
1579 ++ tsk->comm, task_pid_nr(tsk), address);
1580 + code = BUS_MCEERR_AR;
1581 + }
1582 + #endif
1583 +@@ -857,6 +980,99 @@ static int spurious_fault_check(unsigned
1584 return 1;
1585 }
1586
1587 @@ -22071,7 +22694,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1588 /*
1589 * Handle a spurious fault caused by a stale TLB entry.
1590 *
1591 -@@ -923,6 +1167,9 @@ int show_unhandled_signals = 1;
1592 +@@ -923,6 +1139,9 @@ int show_unhandled_signals = 1;
1593 static inline int
1594 access_error(unsigned long error_code, int write, struct vm_area_struct *vma)
1595 {
1596 @@ -22081,7 +22704,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1597 if (write) {
1598 /* write, present and write, not present: */
1599 if (unlikely(!(vma->vm_flags & VM_WRITE)))
1600 -@@ -956,17 +1203,31 @@ do_page_fault(struct pt_regs *regs, unsi
1601 +@@ -956,17 +1175,31 @@ do_page_fault(struct pt_regs *regs, unsi
1602 {
1603 struct vm_area_struct *vma;
1604 struct task_struct *tsk;
1605 @@ -22117,7 +22740,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1606 /*
1607 * Detect and handle instructions that would cause a page fault for
1608 * both a tracked kernel page and a userspace page.
1609 -@@ -1026,7 +1287,7 @@ do_page_fault(struct pt_regs *regs, unsi
1610 +@@ -1026,7 +1259,7 @@ do_page_fault(struct pt_regs *regs, unsi
1611 * User-mode registers count as a user access even for any
1612 * potential system fault or CPU buglet:
1613 */
1614 @@ -22126,7 +22749,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1615 local_irq_enable();
1616 error_code |= PF_USER;
1617 } else {
1618 -@@ -1080,6 +1341,11 @@ do_page_fault(struct pt_regs *regs, unsi
1619 +@@ -1080,6 +1313,11 @@ do_page_fault(struct pt_regs *regs, unsi
1620 might_sleep();
1621 }
1622
1623 @@ -22138,7 +22761,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1624 vma = find_vma(mm, address);
1625 if (unlikely(!vma)) {
1626 bad_area(regs, error_code, address);
1627 -@@ -1091,18 +1357,24 @@ do_page_fault(struct pt_regs *regs, unsi
1628 +@@ -1091,18 +1329,24 @@ do_page_fault(struct pt_regs *regs, unsi
1629 bad_area(regs, error_code, address);
1630 return;
1631 }
1632 @@ -22162,23 +22785,54 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1633 + if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < task_pt_regs(tsk)->sp)) {
1634 + bad_area(regs, error_code, address);
1635 + return;
1636 - }
1637 ++ }
1638 +
1639 +#ifdef CONFIG_PAX_SEGMEXEC
1640 + if (unlikely((mm->pax_flags & MF_PAX_SEGMEXEC) && vma->vm_end - SEGMEXEC_TASK_SIZE - 1 < address - SEGMEXEC_TASK_SIZE - 1)) {
1641 + bad_area(regs, error_code, address);
1642 + return;
1643 -+ }
1644 + }
1645 +#endif
1646 +
1647 if (unlikely(expand_stack(vma, address))) {
1648 bad_area(regs, error_code, address);
1649 return;
1650 -@@ -1146,3 +1418,199 @@ good_area:
1651 +@@ -1146,3 +1390,240 @@ good_area:
1652
1653 up_read(&mm->mmap_sem);
1654 }
1655 +
1656 ++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
1657 ++static bool pax_is_fetch_fault(struct pt_regs *regs, unsigned long error_code, unsigned long address)
1658 ++{
1659 ++ struct mm_struct *mm = current->mm;
1660 ++ unsigned long ip = regs->ip;
1661 ++
1662 ++ if (v8086_mode(regs))
1663 ++ ip = ((regs->cs & 0xffff) << 4) + (ip & 0xffff);
1664 ++
1665 ++#ifdef CONFIG_PAX_PAGEEXEC
1666 ++ if (mm->pax_flags & MF_PAX_PAGEEXEC) {
1667 ++ if ((__supported_pte_mask & _PAGE_NX) && (error_code & PF_INSTR))
1668 ++ return true;
1669 ++ if (!(error_code & (PF_PROT | PF_WRITE)) && ip == address)
1670 ++ return true;
1671 ++ return false;
1672 ++ }
1673 ++#endif
1674 ++
1675 ++#ifdef CONFIG_PAX_SEGMEXEC
1676 ++ if (mm->pax_flags & MF_PAX_SEGMEXEC) {
1677 ++ if (!(error_code & (PF_PROT | PF_WRITE)) && (ip + SEGMEXEC_TASK_SIZE == address))
1678 ++ return true;
1679 ++ return false;
1680 ++ }
1681 ++#endif
1682 ++
1683 ++ return false;
1684 ++}
1685 ++#endif
1686 ++
1687 +#ifdef CONFIG_PAX_EMUTRAMP
1688 +static int pax_handle_fetch_fault_32(struct pt_regs *regs)
1689 +{
1690 @@ -22320,7 +22974,7 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1691 +#endif
1692 +
1693 +#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
1694 -+void pax_report_insns(void *pc, void *sp)
1695 ++void pax_report_insns(struct pt_regs *regs, void *pc, void *sp)
1696 +{
1697 + long i;
1698 +
1699 @@ -22337,14 +22991,24 @@ diff -urNp linux-2.6.32.48/arch/x86/mm/fault.c linux-2.6.32.48/arch/x86/mm/fault
1700 + printk(KERN_ERR "PAX: bytes at SP-%lu: ", (unsigned long)sizeof(long));
1701 + for (i = -1; i < 80 / (long)sizeof(long); i++) {
1702 + unsigned long c;
1703 -+ if (get_user(c, (unsigned long __force_user *)sp+i))
1704 ++ if (get_user(c, (unsigned long __force_user *)sp+i)) {
1705 +#ifdef CONFIG_X86_32
1706 + printk(KERN_CONT "???????? ");
1707 +#else
1708 -+ printk(KERN_CONT "???????????????? ");
1709 ++ if ((regs->cs == __USER32_CS || (regs->cs & SEGMENT_LDT)))
1710 ++ printk(KERN_CONT "???????? ???????? ");
1711 ++ else
1712 ++ printk(KERN_CONT "???????????????? ");
1713 +#endif
1714 -+ else
1715 -+ printk(KERN_CONT "%0*lx ", 2 * (int)sizeof(long), c);
1716 ++ } else {
1717 ++#ifdef CONFIG_X86_64
1718 ++ if ((regs->cs == __USER32_CS || (regs->cs & SEGMENT_LDT))) {
1719 ++ printk(KERN_CONT "%08x ", (unsigned int)c);
1720 ++ printk(KERN_CONT "%08x ", (unsigned int)(c >> 32));
1721 ++ } else
1722 ++#endif
1723 ++ printk(KERN_CONT "%0*lx ", 2 * (int)sizeof(long), c);
1724 ++ }
1725 + }
1726 + printk("\n");
1727 +}
1728 @@ -24556,7 +25220,7 @@ diff -urNp linux-2.6.32.48/arch/x86/vdso/vextern.h linux-2.6.32.48/arch/x86/vdso
1729 VEXTERN(vsyscall_gtod_data)
1730 diff -urNp linux-2.6.32.48/arch/x86/vdso/vma.c linux-2.6.32.48/arch/x86/vdso/vma.c
1731 --- linux-2.6.32.48/arch/x86/vdso/vma.c 2011-11-08 19:02:43.000000000 -0500
1732 -+++ linux-2.6.32.48/arch/x86/vdso/vma.c 2011-11-15 19:59:43.000000000 -0500
1733 ++++ linux-2.6.32.48/arch/x86/vdso/vma.c 2011-11-18 18:01:52.000000000 -0500
1734 @@ -17,8 +17,6 @@
1735 #include "vextern.h" /* Just for VMAGIC. */
1736 #undef VEXTERN
1737 @@ -24605,17 +25269,27 @@ diff -urNp linux-2.6.32.48/arch/x86/vdso/vma.c linux-2.6.32.48/arch/x86/vdso/vma
1738 }
1739 __initcall(init_vdso_vars);
1740
1741 -@@ -105,9 +98,6 @@ int arch_setup_additional_pages(struct l
1742 - unsigned long addr;
1743 +@@ -102,13 +95,15 @@ static unsigned long vdso_addr(unsigned
1744 + int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
1745 + {
1746 + struct mm_struct *mm = current->mm;
1747 +- unsigned long addr;
1748 ++ unsigned long addr = 0;
1749 int ret;
1750
1751 - if (!vdso_enabled)
1752 - return 0;
1753 -
1754 down_write(&mm->mmap_sem);
1755 ++
1756 ++#ifdef CONFIG_PAX_RANDMMAP
1757 ++ if (!(mm->pax_flags & MF_PAX_RANDMMAP))
1758 ++#endif
1759 ++
1760 addr = vdso_addr(mm->start_stack, vdso_size);
1761 addr = get_unmapped_area(NULL, addr, vdso_size, 0, 0);
1762 -@@ -116,7 +106,7 @@ int arch_setup_additional_pages(struct l
1763 + if (IS_ERR_VALUE(addr)) {
1764 +@@ -116,7 +111,7 @@ int arch_setup_additional_pages(struct l
1765 goto up_fail;
1766 }
1767
1768 @@ -24624,7 +25298,7 @@ diff -urNp linux-2.6.32.48/arch/x86/vdso/vma.c linux-2.6.32.48/arch/x86/vdso/vma
1769
1770 ret = install_special_mapping(mm, addr, vdso_size,
1771 VM_READ|VM_EXEC|
1772 -@@ -124,7 +114,7 @@ int arch_setup_additional_pages(struct l
1773 +@@ -124,7 +119,7 @@ int arch_setup_additional_pages(struct l
1774 VM_ALWAYSDUMP,
1775 vdso_pages);
1776 if (ret) {
1777 @@ -24633,7 +25307,7 @@ diff -urNp linux-2.6.32.48/arch/x86/vdso/vma.c linux-2.6.32.48/arch/x86/vdso/vma
1778 goto up_fail;
1779 }
1780
1781 -@@ -132,10 +122,3 @@ up_fail:
1782 +@@ -132,10 +127,3 @@ up_fail:
1783 up_write(&mm->mmap_sem);
1784 return ret;
1785 }
1786 @@ -25154,7 +25828,7 @@ diff -urNp linux-2.6.32.48/crypto/serpent.c linux-2.6.32.48/crypto/serpent.c
1787 for (i = 0; i < keylen; ++i)
1788 diff -urNp linux-2.6.32.48/Documentation/dontdiff linux-2.6.32.48/Documentation/dontdiff
1789 --- linux-2.6.32.48/Documentation/dontdiff 2011-11-08 19:02:43.000000000 -0500
1790 -+++ linux-2.6.32.48/Documentation/dontdiff 2011-11-15 19:59:43.000000000 -0500
1791 ++++ linux-2.6.32.48/Documentation/dontdiff 2011-11-18 18:01:52.000000000 -0500
1792 @@ -1,13 +1,16 @@
1793 *.a
1794 *.aux
1795 @@ -25212,7 +25886,16 @@ diff -urNp linux-2.6.32.48/Documentation/dontdiff linux-2.6.32.48/Documentation/
1796 comp*.log
1797 compile.h*
1798 conf
1799 -@@ -97,19 +111,21 @@ elfconfig.h*
1800 +@@ -84,6 +98,8 @@ config
1801 + config-*
1802 + config_data.h*
1803 + config_data.gz*
1804 ++config.c
1805 ++config.tmp
1806 + conmakehash
1807 + consolemap_deftbl.c*
1808 + cpustr.h
1809 +@@ -97,19 +113,22 @@ elfconfig.h*
1810 fixdep
1811 fore200e_mkfirm
1812 fore200e_pca_fw.c*
1813 @@ -25232,10 +25915,11 @@ diff -urNp linux-2.6.32.48/Documentation/dontdiff linux-2.6.32.48/Documentation/
1814 initramfs_list
1815 kallsyms
1816 -kconfig
1817 ++kern_constants.h
1818 keywords.c
1819 ksym.c*
1820 ksym.h*
1821 -@@ -133,7 +149,9 @@ mkboot
1822 +@@ -133,7 +152,9 @@ mkboot
1823 mkbugboot
1824 mkcpustr
1825 mkdep
1826 @@ -25245,7 +25929,7 @@ diff -urNp linux-2.6.32.48/Documentation/dontdiff linux-2.6.32.48/Documentation/
1827 mktables
1828 mktree
1829 modpost
1830 -@@ -149,6 +167,7 @@ patches*
1831 +@@ -149,6 +170,7 @@ patches*
1832 pca200e.bin
1833 pca200e_ecd.bin2
1834 piggy.gz
1835 @@ -25253,7 +25937,7 @@ diff -urNp linux-2.6.32.48/Documentation/dontdiff linux-2.6.32.48/Documentation/
1836 piggyback
1837 pnmtologo
1838 ppc_defs.h*
1839 -@@ -157,12 +176,15 @@ qconf
1840 +@@ -157,12 +179,15 @@ qconf
1841 raid6altivec*.c
1842 raid6int*.c
1843 raid6tables.c
1844 @@ -25269,7 +25953,15 @@ diff -urNp linux-2.6.32.48/Documentation/dontdiff linux-2.6.32.48/Documentation/
1845 sm_tbl*
1846 split-include
1847 syscalltab.h
1848 -@@ -186,14 +208,20 @@ version.h*
1849 +@@ -171,6 +196,7 @@ tftpboot.img
1850 + timeconst.h
1851 + times.h*
1852 + trix_boot.h
1853 ++user_constants.h
1854 + utsrelease.h*
1855 + vdso-syms.lds
1856 + vdso.lds
1857 +@@ -186,14 +212,20 @@ version.h*
1858 vmlinux
1859 vmlinux-*
1860 vmlinux.aout
1861 @@ -27165,7 +27857,7 @@ diff -urNp linux-2.6.32.48/drivers/atm/atmtcp.c linux-2.6.32.48/drivers/atm/atmt
1862 else dev_kfree_skb(skb);
1863 diff -urNp linux-2.6.32.48/drivers/atm/eni.c linux-2.6.32.48/drivers/atm/eni.c
1864 --- linux-2.6.32.48/drivers/atm/eni.c 2011-11-08 19:02:43.000000000 -0500
1865 -+++ linux-2.6.32.48/drivers/atm/eni.c 2011-11-15 19:59:43.000000000 -0500
1866 ++++ linux-2.6.32.48/drivers/atm/eni.c 2011-11-18 18:01:52.000000000 -0500
1867 @@ -525,7 +525,7 @@ static int rx_aal0(struct atm_vcc *vcc)
1868 DPRINTK(DEV_LABEL "(itf %d): trashing empty cell\n",
1869 vcc->dev->number);
1870 @@ -27211,6 +27903,15 @@ diff -urNp linux-2.6.32.48/drivers/atm/eni.c linux-2.6.32.48/drivers/atm/eni.c
1871 wake_up(&eni_dev->tx_wait);
1872 dma_complete++;
1873 }
1874 +@@ -1570,7 +1570,7 @@ tx_complete++;
1875 + /*--------------------------------- entries ---------------------------------*/
1876 +
1877 +
1878 +-static const char *media_name[] __devinitdata = {
1879 ++static const char *media_name[] __devinitconst = {
1880 + "MMF", "SMF", "MMF", "03?", /* 0- 3 */
1881 + "UTP", "05?", "06?", "07?", /* 4- 7 */
1882 + "TAXI","09?", "10?", "11?", /* 8-11 */
1883 diff -urNp linux-2.6.32.48/drivers/atm/firestream.c linux-2.6.32.48/drivers/atm/firestream.c
1884 --- linux-2.6.32.48/drivers/atm/firestream.c 2011-11-08 19:02:43.000000000 -0500
1885 +++ linux-2.6.32.48/drivers/atm/firestream.c 2011-11-15 19:59:43.000000000 -0500
1886 @@ -28976,6 +29677,18 @@ diff -urNp linux-2.6.32.48/drivers/char/keyboard.c linux-2.6.32.48/drivers/char/
1887 };
1888
1889 MODULE_DEVICE_TABLE(input, kbd_ids);
1890 +diff -urNp linux-2.6.32.48/drivers/char/mbcs.c linux-2.6.32.48/drivers/char/mbcs.c
1891 +--- linux-2.6.32.48/drivers/char/mbcs.c 2011-11-08 19:02:43.000000000 -0500
1892 ++++ linux-2.6.32.48/drivers/char/mbcs.c 2011-11-18 18:01:55.000000000 -0500
1893 +@@ -799,7 +799,7 @@ static int mbcs_remove(struct cx_dev *de
1894 + return 0;
1895 + }
1896 +
1897 +-static const struct cx_device_id __devinitdata mbcs_id_table[] = {
1898 ++static const struct cx_device_id __devinitconst mbcs_id_table[] = {
1899 + {
1900 + .part_num = MBCS_PART_NUM,
1901 + .mfg_num = MBCS_MFG_NUM,
1902 diff -urNp linux-2.6.32.48/drivers/char/mem.c linux-2.6.32.48/drivers/char/mem.c
1903 --- linux-2.6.32.48/drivers/char/mem.c 2011-11-08 19:02:43.000000000 -0500
1904 +++ linux-2.6.32.48/drivers/char/mem.c 2011-11-15 19:59:43.000000000 -0500
1905 @@ -29706,6 +30419,72 @@ diff -urNp linux-2.6.32.48/drivers/dma/ioat/dma.h linux-2.6.32.48/drivers/dma/io
1906 extern struct ioat_sysfs_entry ioat_version_attr;
1907 extern struct ioat_sysfs_entry ioat_cap_attr;
1908 #endif /* IOATDMA_H */
1909 +diff -urNp linux-2.6.32.48/drivers/dma/ioat/dma_v3.c linux-2.6.32.48/drivers/dma/ioat/dma_v3.c
1910 +--- linux-2.6.32.48/drivers/dma/ioat/dma_v3.c 2011-11-08 19:02:43.000000000 -0500
1911 ++++ linux-2.6.32.48/drivers/dma/ioat/dma_v3.c 2011-11-18 18:01:55.000000000 -0500
1912 +@@ -71,10 +71,10 @@
1913 + /* provide a lookup table for setting the source address in the base or
1914 + * extended descriptor of an xor or pq descriptor
1915 + */
1916 +-static const u8 xor_idx_to_desc __read_mostly = 0xd0;
1917 +-static const u8 xor_idx_to_field[] __read_mostly = { 1, 4, 5, 6, 7, 0, 1, 2 };
1918 +-static const u8 pq_idx_to_desc __read_mostly = 0xf8;
1919 +-static const u8 pq_idx_to_field[] __read_mostly = { 1, 4, 5, 0, 1, 2, 4, 5 };
1920 ++static const u8 xor_idx_to_desc = 0xd0;
1921 ++static const u8 xor_idx_to_field[] = { 1, 4, 5, 6, 7, 0, 1, 2 };
1922 ++static const u8 pq_idx_to_desc = 0xf8;
1923 ++static const u8 pq_idx_to_field[] = { 1, 4, 5, 0, 1, 2, 4, 5 };
1924 +
1925 + static dma_addr_t xor_get_src(struct ioat_raw_descriptor *descs[2], int idx)
1926 + {
1927 +diff -urNp linux-2.6.32.48/drivers/edac/amd64_edac.c linux-2.6.32.48/drivers/edac/amd64_edac.c
1928 +--- linux-2.6.32.48/drivers/edac/amd64_edac.c 2011-11-08 19:02:43.000000000 -0500
1929 ++++ linux-2.6.32.48/drivers/edac/amd64_edac.c 2011-11-18 18:01:55.000000000 -0500
1930 +@@ -3099,7 +3099,7 @@ static void __devexit amd64_remove_one_i
1931 + * PCI core identifies what devices are on a system during boot, and then
1932 + * inquiry this table to see if this driver is for a given device found.
1933 + */
1934 +-static const struct pci_device_id amd64_pci_table[] __devinitdata = {
1935 ++static const struct pci_device_id amd64_pci_table[] __devinitconst = {
1936 + {
1937 + .vendor = PCI_VENDOR_ID_AMD,
1938 + .device = PCI_DEVICE_ID_AMD_K8_NB_MEMCTL,
1939 +diff -urNp linux-2.6.32.48/drivers/edac/amd76x_edac.c linux-2.6.32.48/drivers/edac/amd76x_edac.c
1940 +--- linux-2.6.32.48/drivers/edac/amd76x_edac.c 2011-11-08 19:02:43.000000000 -0500
1941 ++++ linux-2.6.32.48/drivers/edac/amd76x_edac.c 2011-11-18 18:01:55.000000000 -0500
1942 +@@ -322,7 +322,7 @@ static void __devexit amd76x_remove_one(
1943 + edac_mc_free(mci);
1944 + }
1945 +
1946 +-static const struct pci_device_id amd76x_pci_tbl[] __devinitdata = {
1947 ++static const struct pci_device_id amd76x_pci_tbl[] __devinitconst = {
1948 + {
1949 + PCI_VEND_DEV(AMD, FE_GATE_700C), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
1950 + AMD762},
1951 +diff -urNp linux-2.6.32.48/drivers/edac/e752x_edac.c linux-2.6.32.48/drivers/edac/e752x_edac.c
1952 +--- linux-2.6.32.48/drivers/edac/e752x_edac.c 2011-11-08 19:02:43.000000000 -0500
1953 ++++ linux-2.6.32.48/drivers/edac/e752x_edac.c 2011-11-18 18:01:55.000000000 -0500
1954 +@@ -1282,7 +1282,7 @@ static void __devexit e752x_remove_one(s
1955 + edac_mc_free(mci);
1956 + }
1957 +
1958 +-static const struct pci_device_id e752x_pci_tbl[] __devinitdata = {
1959 ++static const struct pci_device_id e752x_pci_tbl[] __devinitconst = {
1960 + {
1961 + PCI_VEND_DEV(INTEL, 7520_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
1962 + E7520},
1963 +diff -urNp linux-2.6.32.48/drivers/edac/e7xxx_edac.c linux-2.6.32.48/drivers/edac/e7xxx_edac.c
1964 +--- linux-2.6.32.48/drivers/edac/e7xxx_edac.c 2011-11-08 19:02:43.000000000 -0500
1965 ++++ linux-2.6.32.48/drivers/edac/e7xxx_edac.c 2011-11-18 18:01:55.000000000 -0500
1966 +@@ -526,7 +526,7 @@ static void __devexit e7xxx_remove_one(s
1967 + edac_mc_free(mci);
1968 + }
1969 +
1970 +-static const struct pci_device_id e7xxx_pci_tbl[] __devinitdata = {
1971 ++static const struct pci_device_id e7xxx_pci_tbl[] __devinitconst = {
1972 + {
1973 + PCI_VEND_DEV(INTEL, 7205_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
1974 + E7205},
1975 diff -urNp linux-2.6.32.48/drivers/edac/edac_device_sysfs.c linux-2.6.32.48/drivers/edac/edac_device_sysfs.c
1976 --- linux-2.6.32.48/drivers/edac/edac_device_sysfs.c 2011-11-08 19:02:43.000000000 -0500
1977 +++ linux-2.6.32.48/drivers/edac/edac_device_sysfs.c 2011-11-15 19:59:43.000000000 -0500
1978 @@ -29861,6 +30640,138 @@ diff -urNp linux-2.6.32.48/drivers/edac/edac_pci_sysfs.c linux-2.6.32.48/drivers
1979 panic("EDAC: PCI Parity Error");
1980 }
1981 }
1982 +diff -urNp linux-2.6.32.48/drivers/edac/i3000_edac.c linux-2.6.32.48/drivers/edac/i3000_edac.c
1983 +--- linux-2.6.32.48/drivers/edac/i3000_edac.c 2011-11-08 19:02:43.000000000 -0500
1984 ++++ linux-2.6.32.48/drivers/edac/i3000_edac.c 2011-11-18 18:01:55.000000000 -0500
1985 +@@ -471,7 +471,7 @@ static void __devexit i3000_remove_one(s
1986 + edac_mc_free(mci);
1987 + }
1988 +
1989 +-static const struct pci_device_id i3000_pci_tbl[] __devinitdata = {
1990 ++static const struct pci_device_id i3000_pci_tbl[] __devinitconst = {
1991 + {
1992 + PCI_VEND_DEV(INTEL, 3000_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
1993 + I3000},
1994 +diff -urNp linux-2.6.32.48/drivers/edac/i3200_edac.c linux-2.6.32.48/drivers/edac/i3200_edac.c
1995 +--- linux-2.6.32.48/drivers/edac/i3200_edac.c 2011-11-08 19:02:43.000000000 -0500
1996 ++++ linux-2.6.32.48/drivers/edac/i3200_edac.c 2011-11-18 18:01:55.000000000 -0500
1997 +@@ -444,7 +444,7 @@ static void __devexit i3200_remove_one(s
1998 + edac_mc_free(mci);
1999 + }
2000 +
2001 +-static const struct pci_device_id i3200_pci_tbl[] __devinitdata = {
2002 ++static const struct pci_device_id i3200_pci_tbl[] __devinitconst = {
2003 + {
2004 + PCI_VEND_DEV(INTEL, 3200_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2005 + I3200},
2006 +diff -urNp linux-2.6.32.48/drivers/edac/i5000_edac.c linux-2.6.32.48/drivers/edac/i5000_edac.c
2007 +--- linux-2.6.32.48/drivers/edac/i5000_edac.c 2011-11-08 19:02:43.000000000 -0500
2008 ++++ linux-2.6.32.48/drivers/edac/i5000_edac.c 2011-11-18 18:01:55.000000000 -0500
2009 +@@ -1516,7 +1516,7 @@ static void __devexit i5000_remove_one(s
2010 + *
2011 + * The "E500P" device is the first device supported.
2012 + */
2013 +-static const struct pci_device_id i5000_pci_tbl[] __devinitdata = {
2014 ++static const struct pci_device_id i5000_pci_tbl[] __devinitconst = {
2015 + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000_DEV16),
2016 + .driver_data = I5000P},
2017 +
2018 +diff -urNp linux-2.6.32.48/drivers/edac/i5100_edac.c linux-2.6.32.48/drivers/edac/i5100_edac.c
2019 +--- linux-2.6.32.48/drivers/edac/i5100_edac.c 2011-11-08 19:02:43.000000000 -0500
2020 ++++ linux-2.6.32.48/drivers/edac/i5100_edac.c 2011-11-18 18:01:55.000000000 -0500
2021 +@@ -944,7 +944,7 @@ static void __devexit i5100_remove_one(s
2022 + edac_mc_free(mci);
2023 + }
2024 +
2025 +-static const struct pci_device_id i5100_pci_tbl[] __devinitdata = {
2026 ++static const struct pci_device_id i5100_pci_tbl[] __devinitconst = {
2027 + /* Device 16, Function 0, Channel 0 Memory Map, Error Flag/Mask, ... */
2028 + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5100_16) },
2029 + { 0, }
2030 +diff -urNp linux-2.6.32.48/drivers/edac/i5400_edac.c linux-2.6.32.48/drivers/edac/i5400_edac.c
2031 +--- linux-2.6.32.48/drivers/edac/i5400_edac.c 2011-11-08 19:02:43.000000000 -0500
2032 ++++ linux-2.6.32.48/drivers/edac/i5400_edac.c 2011-11-18 18:01:55.000000000 -0500
2033 +@@ -1383,7 +1383,7 @@ static void __devexit i5400_remove_one(s
2034 + *
2035 + * The "E500P" device is the first device supported.
2036 + */
2037 +-static const struct pci_device_id i5400_pci_tbl[] __devinitdata = {
2038 ++static const struct pci_device_id i5400_pci_tbl[] __devinitconst = {
2039 + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR)},
2040 + {0,} /* 0 terminated list. */
2041 + };
2042 +diff -urNp linux-2.6.32.48/drivers/edac/i82443bxgx_edac.c linux-2.6.32.48/drivers/edac/i82443bxgx_edac.c
2043 +--- linux-2.6.32.48/drivers/edac/i82443bxgx_edac.c 2011-11-08 19:02:43.000000000 -0500
2044 ++++ linux-2.6.32.48/drivers/edac/i82443bxgx_edac.c 2011-11-18 18:01:55.000000000 -0500
2045 +@@ -381,7 +381,7 @@ static void __devexit i82443bxgx_edacmc_
2046 +
2047 + EXPORT_SYMBOL_GPL(i82443bxgx_edacmc_remove_one);
2048 +
2049 +-static const struct pci_device_id i82443bxgx_pci_tbl[] __devinitdata = {
2050 ++static const struct pci_device_id i82443bxgx_pci_tbl[] __devinitconst = {
2051 + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_0)},
2052 + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_2)},
2053 + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0)},
2054 +diff -urNp linux-2.6.32.48/drivers/edac/i82860_edac.c linux-2.6.32.48/drivers/edac/i82860_edac.c
2055 +--- linux-2.6.32.48/drivers/edac/i82860_edac.c 2011-11-08 19:02:43.000000000 -0500
2056 ++++ linux-2.6.32.48/drivers/edac/i82860_edac.c 2011-11-18 18:01:55.000000000 -0500
2057 +@@ -271,7 +271,7 @@ static void __devexit i82860_remove_one(
2058 + edac_mc_free(mci);
2059 + }
2060 +
2061 +-static const struct pci_device_id i82860_pci_tbl[] __devinitdata = {
2062 ++static const struct pci_device_id i82860_pci_tbl[] __devinitconst = {
2063 + {
2064 + PCI_VEND_DEV(INTEL, 82860_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2065 + I82860},
2066 +diff -urNp linux-2.6.32.48/drivers/edac/i82875p_edac.c linux-2.6.32.48/drivers/edac/i82875p_edac.c
2067 +--- linux-2.6.32.48/drivers/edac/i82875p_edac.c 2011-11-08 19:02:43.000000000 -0500
2068 ++++ linux-2.6.32.48/drivers/edac/i82875p_edac.c 2011-11-18 18:01:55.000000000 -0500
2069 +@@ -512,7 +512,7 @@ static void __devexit i82875p_remove_one
2070 + edac_mc_free(mci);
2071 + }
2072 +
2073 +-static const struct pci_device_id i82875p_pci_tbl[] __devinitdata = {
2074 ++static const struct pci_device_id i82875p_pci_tbl[] __devinitconst = {
2075 + {
2076 + PCI_VEND_DEV(INTEL, 82875_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2077 + I82875P},
2078 +diff -urNp linux-2.6.32.48/drivers/edac/i82975x_edac.c linux-2.6.32.48/drivers/edac/i82975x_edac.c
2079 +--- linux-2.6.32.48/drivers/edac/i82975x_edac.c 2011-11-08 19:02:43.000000000 -0500
2080 ++++ linux-2.6.32.48/drivers/edac/i82975x_edac.c 2011-11-18 18:01:55.000000000 -0500
2081 +@@ -586,7 +586,7 @@ static void __devexit i82975x_remove_one
2082 + edac_mc_free(mci);
2083 + }
2084 +
2085 +-static const struct pci_device_id i82975x_pci_tbl[] __devinitdata = {
2086 ++static const struct pci_device_id i82975x_pci_tbl[] __devinitconst = {
2087 + {
2088 + PCI_VEND_DEV(INTEL, 82975_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2089 + I82975X
2090 +diff -urNp linux-2.6.32.48/drivers/edac/r82600_edac.c linux-2.6.32.48/drivers/edac/r82600_edac.c
2091 +--- linux-2.6.32.48/drivers/edac/r82600_edac.c 2011-11-08 19:02:43.000000000 -0500
2092 ++++ linux-2.6.32.48/drivers/edac/r82600_edac.c 2011-11-18 18:01:55.000000000 -0500
2093 +@@ -374,7 +374,7 @@ static void __devexit r82600_remove_one(
2094 + edac_mc_free(mci);
2095 + }
2096 +
2097 +-static const struct pci_device_id r82600_pci_tbl[] __devinitdata = {
2098 ++static const struct pci_device_id r82600_pci_tbl[] __devinitconst = {
2099 + {
2100 + PCI_DEVICE(PCI_VENDOR_ID_RADISYS, R82600_BRIDGE_ID)
2101 + },
2102 +diff -urNp linux-2.6.32.48/drivers/edac/x38_edac.c linux-2.6.32.48/drivers/edac/x38_edac.c
2103 +--- linux-2.6.32.48/drivers/edac/x38_edac.c 2011-11-08 19:02:43.000000000 -0500
2104 ++++ linux-2.6.32.48/drivers/edac/x38_edac.c 2011-11-18 18:01:55.000000000 -0500
2105 +@@ -441,7 +441,7 @@ static void __devexit x38_remove_one(str
2106 + edac_mc_free(mci);
2107 + }
2108 +
2109 +-static const struct pci_device_id x38_pci_tbl[] __devinitdata = {
2110 ++static const struct pci_device_id x38_pci_tbl[] __devinitconst = {
2111 + {
2112 + PCI_VEND_DEV(INTEL, X38_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2113 + X38},
2114 diff -urNp linux-2.6.32.48/drivers/firewire/core-card.c linux-2.6.32.48/drivers/firewire/core-card.c
2115 --- linux-2.6.32.48/drivers/firewire/core-card.c 2011-11-08 19:02:43.000000000 -0500
2116 +++ linux-2.6.32.48/drivers/firewire/core-card.c 2011-11-15 19:59:43.000000000 -0500
2117 @@ -31456,6 +32367,225 @@ diff -urNp linux-2.6.32.48/drivers/i2c/busses/i2c-nforce2-s4985.c linux-2.6.32.4
2118
2119 /* Wrapper access functions for multiplexed SMBus */
2120 static DEFINE_MUTEX(nforce2_lock);
2121 +diff -urNp linux-2.6.32.48/drivers/ide/aec62xx.c linux-2.6.32.48/drivers/ide/aec62xx.c
2122 +--- linux-2.6.32.48/drivers/ide/aec62xx.c 2011-11-08 19:02:43.000000000 -0500
2123 ++++ linux-2.6.32.48/drivers/ide/aec62xx.c 2011-11-18 18:01:55.000000000 -0500
2124 +@@ -180,7 +180,7 @@ static const struct ide_port_ops atp86x_
2125 + .cable_detect = atp86x_cable_detect,
2126 + };
2127 +
2128 +-static const struct ide_port_info aec62xx_chipsets[] __devinitdata = {
2129 ++static const struct ide_port_info aec62xx_chipsets[] __devinitconst = {
2130 + { /* 0: AEC6210 */
2131 + .name = DRV_NAME,
2132 + .init_chipset = init_chipset_aec62xx,
2133 +diff -urNp linux-2.6.32.48/drivers/ide/alim15x3.c linux-2.6.32.48/drivers/ide/alim15x3.c
2134 +--- linux-2.6.32.48/drivers/ide/alim15x3.c 2011-11-08 19:02:43.000000000 -0500
2135 ++++ linux-2.6.32.48/drivers/ide/alim15x3.c 2011-11-18 18:01:55.000000000 -0500
2136 +@@ -509,7 +509,7 @@ static const struct ide_dma_ops ali_dma_
2137 + .dma_sff_read_status = ide_dma_sff_read_status,
2138 + };
2139 +
2140 +-static const struct ide_port_info ali15x3_chipset __devinitdata = {
2141 ++static const struct ide_port_info ali15x3_chipset __devinitconst = {
2142 + .name = DRV_NAME,
2143 + .init_chipset = init_chipset_ali15x3,
2144 + .init_hwif = init_hwif_ali15x3,
2145 +diff -urNp linux-2.6.32.48/drivers/ide/amd74xx.c linux-2.6.32.48/drivers/ide/amd74xx.c
2146 +--- linux-2.6.32.48/drivers/ide/amd74xx.c 2011-11-08 19:02:43.000000000 -0500
2147 ++++ linux-2.6.32.48/drivers/ide/amd74xx.c 2011-11-18 18:01:55.000000000 -0500
2148 +@@ -221,7 +221,7 @@ static const struct ide_port_ops amd_por
2149 + .udma_mask = udma, \
2150 + }
2151 +
2152 +-static const struct ide_port_info amd74xx_chipsets[] __devinitdata = {
2153 ++static const struct ide_port_info amd74xx_chipsets[] __devinitconst = {
2154 + /* 0: AMD7401 */ DECLARE_AMD_DEV(0x00, ATA_UDMA2),
2155 + /* 1: AMD7409 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA4),
2156 + /* 2: AMD7411/7441 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5),
2157 +diff -urNp linux-2.6.32.48/drivers/ide/atiixp.c linux-2.6.32.48/drivers/ide/atiixp.c
2158 +--- linux-2.6.32.48/drivers/ide/atiixp.c 2011-11-08 19:02:43.000000000 -0500
2159 ++++ linux-2.6.32.48/drivers/ide/atiixp.c 2011-11-18 18:01:55.000000000 -0500
2160 +@@ -137,7 +137,7 @@ static const struct ide_port_ops atiixp_
2161 + .cable_detect = atiixp_cable_detect,
2162 + };
2163 +
2164 +-static const struct ide_port_info atiixp_pci_info[] __devinitdata = {
2165 ++static const struct ide_port_info atiixp_pci_info[] __devinitconst = {
2166 + { /* 0: IXP200/300/400/700 */
2167 + .name = DRV_NAME,
2168 + .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
2169 +diff -urNp linux-2.6.32.48/drivers/ide/cmd64x.c linux-2.6.32.48/drivers/ide/cmd64x.c
2170 +--- linux-2.6.32.48/drivers/ide/cmd64x.c 2011-11-08 19:02:43.000000000 -0500
2171 ++++ linux-2.6.32.48/drivers/ide/cmd64x.c 2011-11-18 18:01:55.000000000 -0500
2172 +@@ -372,7 +372,7 @@ static const struct ide_dma_ops cmd646_r
2173 + .dma_sff_read_status = ide_dma_sff_read_status,
2174 + };
2175 +
2176 +-static const struct ide_port_info cmd64x_chipsets[] __devinitdata = {
2177 ++static const struct ide_port_info cmd64x_chipsets[] __devinitconst = {
2178 + { /* 0: CMD643 */
2179 + .name = DRV_NAME,
2180 + .init_chipset = init_chipset_cmd64x,
2181 +diff -urNp linux-2.6.32.48/drivers/ide/cs5520.c linux-2.6.32.48/drivers/ide/cs5520.c
2182 +--- linux-2.6.32.48/drivers/ide/cs5520.c 2011-11-08 19:02:43.000000000 -0500
2183 ++++ linux-2.6.32.48/drivers/ide/cs5520.c 2011-11-18 18:01:55.000000000 -0500
2184 +@@ -93,7 +93,7 @@ static const struct ide_port_ops cs5520_
2185 + .set_dma_mode = cs5520_set_dma_mode,
2186 + };
2187 +
2188 +-static const struct ide_port_info cyrix_chipset __devinitdata = {
2189 ++static const struct ide_port_info cyrix_chipset __devinitconst = {
2190 + .name = DRV_NAME,
2191 + .enablebits = { { 0x60, 0x01, 0x01 }, { 0x60, 0x02, 0x02 } },
2192 + .port_ops = &cs5520_port_ops,
2193 +diff -urNp linux-2.6.32.48/drivers/ide/cs5530.c linux-2.6.32.48/drivers/ide/cs5530.c
2194 +--- linux-2.6.32.48/drivers/ide/cs5530.c 2011-11-08 19:02:43.000000000 -0500
2195 ++++ linux-2.6.32.48/drivers/ide/cs5530.c 2011-11-18 18:01:55.000000000 -0500
2196 +@@ -244,7 +244,7 @@ static const struct ide_port_ops cs5530_
2197 + .udma_filter = cs5530_udma_filter,
2198 + };
2199 +
2200 +-static const struct ide_port_info cs5530_chipset __devinitdata = {
2201 ++static const struct ide_port_info cs5530_chipset __devinitconst = {
2202 + .name = DRV_NAME,
2203 + .init_chipset = init_chipset_cs5530,
2204 + .init_hwif = init_hwif_cs5530,
2205 +diff -urNp linux-2.6.32.48/drivers/ide/cs5535.c linux-2.6.32.48/drivers/ide/cs5535.c
2206 +--- linux-2.6.32.48/drivers/ide/cs5535.c 2011-11-08 19:02:43.000000000 -0500
2207 ++++ linux-2.6.32.48/drivers/ide/cs5535.c 2011-11-18 18:01:55.000000000 -0500
2208 +@@ -170,7 +170,7 @@ static const struct ide_port_ops cs5535_
2209 + .cable_detect = cs5535_cable_detect,
2210 + };
2211 +
2212 +-static const struct ide_port_info cs5535_chipset __devinitdata = {
2213 ++static const struct ide_port_info cs5535_chipset __devinitconst = {
2214 + .name = DRV_NAME,
2215 + .port_ops = &cs5535_port_ops,
2216 + .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE,
2217 +diff -urNp linux-2.6.32.48/drivers/ide/cy82c693.c linux-2.6.32.48/drivers/ide/cy82c693.c
2218 +--- linux-2.6.32.48/drivers/ide/cy82c693.c 2011-11-08 19:02:43.000000000 -0500
2219 ++++ linux-2.6.32.48/drivers/ide/cy82c693.c 2011-11-18 18:01:55.000000000 -0500
2220 +@@ -288,7 +288,7 @@ static const struct ide_port_ops cy82c69
2221 + .set_dma_mode = cy82c693_set_dma_mode,
2222 + };
2223 +
2224 +-static const struct ide_port_info cy82c693_chipset __devinitdata = {
2225 ++static const struct ide_port_info cy82c693_chipset __devinitconst = {
2226 + .name = DRV_NAME,
2227 + .init_iops = init_iops_cy82c693,
2228 + .port_ops = &cy82c693_port_ops,
2229 +diff -urNp linux-2.6.32.48/drivers/ide/hpt366.c linux-2.6.32.48/drivers/ide/hpt366.c
2230 +--- linux-2.6.32.48/drivers/ide/hpt366.c 2011-11-08 19:02:43.000000000 -0500
2231 ++++ linux-2.6.32.48/drivers/ide/hpt366.c 2011-11-18 18:01:55.000000000 -0500
2232 +@@ -507,7 +507,7 @@ static struct hpt_timings hpt37x_timings
2233 + }
2234 + };
2235 +
2236 +-static const struct hpt_info hpt36x __devinitdata = {
2237 ++static const struct hpt_info hpt36x __devinitconst = {
2238 + .chip_name = "HPT36x",
2239 + .chip_type = HPT36x,
2240 + .udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2,
2241 +@@ -515,7 +515,7 @@ static const struct hpt_info hpt36x __de
2242 + .timings = &hpt36x_timings
2243 + };
2244 +
2245 +-static const struct hpt_info hpt370 __devinitdata = {
2246 ++static const struct hpt_info hpt370 __devinitconst = {
2247 + .chip_name = "HPT370",
2248 + .chip_type = HPT370,
2249 + .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4,
2250 +@@ -523,7 +523,7 @@ static const struct hpt_info hpt370 __de
2251 + .timings = &hpt37x_timings
2252 + };
2253 +
2254 +-static const struct hpt_info hpt370a __devinitdata = {
2255 ++static const struct hpt_info hpt370a __devinitconst = {
2256 + .chip_name = "HPT370A",
2257 + .chip_type = HPT370A,
2258 + .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4,
2259 +@@ -531,7 +531,7 @@ static const struct hpt_info hpt370a __d
2260 + .timings = &hpt37x_timings
2261 + };
2262 +
2263 +-static const struct hpt_info hpt374 __devinitdata = {
2264 ++static const struct hpt_info hpt374 __devinitconst = {
2265 + .chip_name = "HPT374",
2266 + .chip_type = HPT374,
2267 + .udma_mask = ATA_UDMA5,
2268 +@@ -539,7 +539,7 @@ static const struct hpt_info hpt374 __de
2269 + .timings = &hpt37x_timings
2270 + };
2271 +
2272 +-static const struct hpt_info hpt372 __devinitdata = {
2273 ++static const struct hpt_info hpt372 __devinitconst = {
2274 + .chip_name = "HPT372",
2275 + .chip_type = HPT372,
2276 + .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
2277 +@@ -547,7 +547,7 @@ static const struct hpt_info hpt372 __de
2278 + .timings = &hpt37x_timings
2279 + };
2280 +
2281 +-static const struct hpt_info hpt372a __devinitdata = {
2282 ++static const struct hpt_info hpt372a __devinitconst = {
2283 + .chip_name = "HPT372A",
2284 + .chip_type = HPT372A,
2285 + .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
2286 +@@ -555,7 +555,7 @@ static const struct hpt_info hpt372a __d
2287 + .timings = &hpt37x_timings
2288 + };
2289 +
2290 +-static const struct hpt_info hpt302 __devinitdata = {
2291 ++static const struct hpt_info hpt302 __devinitconst = {
2292 + .chip_name = "HPT302",
2293 + .chip_type = HPT302,
2294 + .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
2295 +@@ -563,7 +563,7 @@ static const struct hpt_info hpt302 __de
2296 + .timings = &hpt37x_timings
2297 + };
2298 +
2299 +-static const struct hpt_info hpt371 __devinitdata = {
2300 ++static const struct hpt_info hpt371 __devinitconst = {
2301 + .chip_name = "HPT371",
2302 + .chip_type = HPT371,
2303 + .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
2304 +@@ -571,7 +571,7 @@ static const struct hpt_info hpt371 __de
2305 + .timings = &hpt37x_timings
2306 + };
2307 +
2308 +-static const struct hpt_info hpt372n __devinitdata = {
2309 ++static const struct hpt_info hpt372n __devinitconst = {
2310 + .chip_name = "HPT372N",
2311 + .chip_type = HPT372N,
2312 + .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
2313 +@@ -579,7 +579,7 @@ static const struct hpt_info hpt372n __d
2314 + .timings = &hpt37x_timings
2315 + };
2316 +
2317 +-static const struct hpt_info hpt302n __devinitdata = {
2318 ++static const struct hpt_info hpt302n __devinitconst = {
2319 + .chip_name = "HPT302N",
2320 + .chip_type = HPT302N,
2321 + .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
2322 +@@ -587,7 +587,7 @@ static const struct hpt_info hpt302n __d
2323 + .timings = &hpt37x_timings
2324 + };
2325 +
2326 +-static const struct hpt_info hpt371n __devinitdata = {
2327 ++static const struct hpt_info hpt371n __devinitconst = {
2328 + .chip_name = "HPT371N",
2329 + .chip_type = HPT371N,
2330 + .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
2331 +@@ -1422,7 +1422,7 @@ static const struct ide_dma_ops hpt36x_d
2332 + .dma_sff_read_status = ide_dma_sff_read_status,
2333 + };
2334 +
2335 +-static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
2336 ++static const struct ide_port_info hpt366_chipsets[] __devinitconst = {
2337 + { /* 0: HPT36x */
2338 + .name = DRV_NAME,
2339 + .init_chipset = init_chipset_hpt366,
2340 diff -urNp linux-2.6.32.48/drivers/ide/ide-cd.c linux-2.6.32.48/drivers/ide/ide-cd.c
2341 --- linux-2.6.32.48/drivers/ide/ide-cd.c 2011-11-08 19:02:43.000000000 -0500
2342 +++ linux-2.6.32.48/drivers/ide/ide-cd.c 2011-11-15 19:59:43.000000000 -0500
2343 @@ -31480,6 +32610,174 @@ diff -urNp linux-2.6.32.48/drivers/ide/ide-floppy.c linux-2.6.32.48/drivers/ide/
2344 ide_debug_log(IDE_DBG_FUNC, "enter");
2345
2346 drive->bios_cyl = 0;
2347 +diff -urNp linux-2.6.32.48/drivers/ide/ide-pci-generic.c linux-2.6.32.48/drivers/ide/ide-pci-generic.c
2348 +--- linux-2.6.32.48/drivers/ide/ide-pci-generic.c 2011-11-08 19:02:43.000000000 -0500
2349 ++++ linux-2.6.32.48/drivers/ide/ide-pci-generic.c 2011-11-18 18:01:55.000000000 -0500
2350 +@@ -53,7 +53,7 @@ static const struct ide_port_ops netcell
2351 + .udma_mask = ATA_UDMA6, \
2352 + }
2353 +
2354 +-static const struct ide_port_info generic_chipsets[] __devinitdata = {
2355 ++static const struct ide_port_info generic_chipsets[] __devinitconst = {
2356 + /* 0: Unknown */
2357 + DECLARE_GENERIC_PCI_DEV(0),
2358 +
2359 +diff -urNp linux-2.6.32.48/drivers/ide/it8172.c linux-2.6.32.48/drivers/ide/it8172.c
2360 +--- linux-2.6.32.48/drivers/ide/it8172.c 2011-11-08 19:02:43.000000000 -0500
2361 ++++ linux-2.6.32.48/drivers/ide/it8172.c 2011-11-18 18:01:55.000000000 -0500
2362 +@@ -115,7 +115,7 @@ static const struct ide_port_ops it8172_
2363 + .set_dma_mode = it8172_set_dma_mode,
2364 + };
2365 +
2366 +-static const struct ide_port_info it8172_port_info __devinitdata = {
2367 ++static const struct ide_port_info it8172_port_info __devinitconst = {
2368 + .name = DRV_NAME,
2369 + .port_ops = &it8172_port_ops,
2370 + .enablebits = { {0x41, 0x80, 0x80}, {0x00, 0x00, 0x00} },
2371 +diff -urNp linux-2.6.32.48/drivers/ide/it8213.c linux-2.6.32.48/drivers/ide/it8213.c
2372 +--- linux-2.6.32.48/drivers/ide/it8213.c 2011-11-08 19:02:43.000000000 -0500
2373 ++++ linux-2.6.32.48/drivers/ide/it8213.c 2011-11-18 18:01:55.000000000 -0500
2374 +@@ -156,7 +156,7 @@ static const struct ide_port_ops it8213_
2375 + .cable_detect = it8213_cable_detect,
2376 + };
2377 +
2378 +-static const struct ide_port_info it8213_chipset __devinitdata = {
2379 ++static const struct ide_port_info it8213_chipset __devinitconst = {
2380 + .name = DRV_NAME,
2381 + .enablebits = { {0x41, 0x80, 0x80} },
2382 + .port_ops = &it8213_port_ops,
2383 +diff -urNp linux-2.6.32.48/drivers/ide/it821x.c linux-2.6.32.48/drivers/ide/it821x.c
2384 +--- linux-2.6.32.48/drivers/ide/it821x.c 2011-11-08 19:02:43.000000000 -0500
2385 ++++ linux-2.6.32.48/drivers/ide/it821x.c 2011-11-18 18:01:55.000000000 -0500
2386 +@@ -627,7 +627,7 @@ static const struct ide_port_ops it821x_
2387 + .cable_detect = it821x_cable_detect,
2388 + };
2389 +
2390 +-static const struct ide_port_info it821x_chipset __devinitdata = {
2391 ++static const struct ide_port_info it821x_chipset __devinitconst = {
2392 + .name = DRV_NAME,
2393 + .init_chipset = init_chipset_it821x,
2394 + .init_hwif = init_hwif_it821x,
2395 +diff -urNp linux-2.6.32.48/drivers/ide/jmicron.c linux-2.6.32.48/drivers/ide/jmicron.c
2396 +--- linux-2.6.32.48/drivers/ide/jmicron.c 2011-11-08 19:02:43.000000000 -0500
2397 ++++ linux-2.6.32.48/drivers/ide/jmicron.c 2011-11-18 18:01:55.000000000 -0500
2398 +@@ -102,7 +102,7 @@ static const struct ide_port_ops jmicron
2399 + .cable_detect = jmicron_cable_detect,
2400 + };
2401 +
2402 +-static const struct ide_port_info jmicron_chipset __devinitdata = {
2403 ++static const struct ide_port_info jmicron_chipset __devinitconst = {
2404 + .name = DRV_NAME,
2405 + .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } },
2406 + .port_ops = &jmicron_port_ops,
2407 +diff -urNp linux-2.6.32.48/drivers/ide/ns87415.c linux-2.6.32.48/drivers/ide/ns87415.c
2408 +--- linux-2.6.32.48/drivers/ide/ns87415.c 2011-11-08 19:02:43.000000000 -0500
2409 ++++ linux-2.6.32.48/drivers/ide/ns87415.c 2011-11-18 18:01:55.000000000 -0500
2410 +@@ -293,7 +293,7 @@ static const struct ide_dma_ops ns87415_
2411 + .dma_sff_read_status = superio_dma_sff_read_status,
2412 + };
2413 +
2414 +-static const struct ide_port_info ns87415_chipset __devinitdata = {
2415 ++static const struct ide_port_info ns87415_chipset __devinitconst = {
2416 + .name = DRV_NAME,
2417 + .init_hwif = init_hwif_ns87415,
2418 + .tp_ops = &ns87415_tp_ops,
2419 +diff -urNp linux-2.6.32.48/drivers/ide/opti621.c linux-2.6.32.48/drivers/ide/opti621.c
2420 +--- linux-2.6.32.48/drivers/ide/opti621.c 2011-11-08 19:02:43.000000000 -0500
2421 ++++ linux-2.6.32.48/drivers/ide/opti621.c 2011-11-18 18:01:55.000000000 -0500
2422 +@@ -202,7 +202,7 @@ static const struct ide_port_ops opti621
2423 + .set_pio_mode = opti621_set_pio_mode,
2424 + };
2425 +
2426 +-static const struct ide_port_info opti621_chipset __devinitdata = {
2427 ++static const struct ide_port_info opti621_chipset __devinitconst = {
2428 + .name = DRV_NAME,
2429 + .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} },
2430 + .port_ops = &opti621_port_ops,
2431 +diff -urNp linux-2.6.32.48/drivers/ide/pdc202xx_new.c linux-2.6.32.48/drivers/ide/pdc202xx_new.c
2432 +--- linux-2.6.32.48/drivers/ide/pdc202xx_new.c 2011-11-08 19:02:43.000000000 -0500
2433 ++++ linux-2.6.32.48/drivers/ide/pdc202xx_new.c 2011-11-18 18:01:55.000000000 -0500
2434 +@@ -465,7 +465,7 @@ static const struct ide_port_ops pdcnew_
2435 + .udma_mask = udma, \
2436 + }
2437 +
2438 +-static const struct ide_port_info pdcnew_chipsets[] __devinitdata = {
2439 ++static const struct ide_port_info pdcnew_chipsets[] __devinitconst = {
2440 + /* 0: PDC202{68,70} */ DECLARE_PDCNEW_DEV(ATA_UDMA5),
2441 + /* 1: PDC202{69,71,75,76,77} */ DECLARE_PDCNEW_DEV(ATA_UDMA6),
2442 + };
2443 +diff -urNp linux-2.6.32.48/drivers/ide/pdc202xx_old.c linux-2.6.32.48/drivers/ide/pdc202xx_old.c
2444 +--- linux-2.6.32.48/drivers/ide/pdc202xx_old.c 2011-11-08 19:02:43.000000000 -0500
2445 ++++ linux-2.6.32.48/drivers/ide/pdc202xx_old.c 2011-11-18 18:01:55.000000000 -0500
2446 +@@ -285,7 +285,7 @@ static const struct ide_dma_ops pdc2026x
2447 + .max_sectors = sectors, \
2448 + }
2449 +
2450 +-static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
2451 ++static const struct ide_port_info pdc202xx_chipsets[] __devinitconst = {
2452 + { /* 0: PDC20246 */
2453 + .name = DRV_NAME,
2454 + .init_chipset = init_chipset_pdc202xx,
2455 +diff -urNp linux-2.6.32.48/drivers/ide/piix.c linux-2.6.32.48/drivers/ide/piix.c
2456 +--- linux-2.6.32.48/drivers/ide/piix.c 2011-11-08 19:02:43.000000000 -0500
2457 ++++ linux-2.6.32.48/drivers/ide/piix.c 2011-11-18 18:01:55.000000000 -0500
2458 +@@ -344,7 +344,7 @@ static const struct ide_port_ops ich_por
2459 + .udma_mask = udma, \
2460 + }
2461 +
2462 +-static const struct ide_port_info piix_pci_info[] __devinitdata = {
2463 ++static const struct ide_port_info piix_pci_info[] __devinitconst = {
2464 + /* 0: MPIIX */
2465 + { /*
2466 + * MPIIX actually has only a single IDE channel mapped to
2467 +diff -urNp linux-2.6.32.48/drivers/ide/rz1000.c linux-2.6.32.48/drivers/ide/rz1000.c
2468 +--- linux-2.6.32.48/drivers/ide/rz1000.c 2011-11-08 19:02:43.000000000 -0500
2469 ++++ linux-2.6.32.48/drivers/ide/rz1000.c 2011-11-18 18:01:55.000000000 -0500
2470 +@@ -38,7 +38,7 @@ static int __devinit rz1000_disable_read
2471 + }
2472 + }
2473 +
2474 +-static const struct ide_port_info rz1000_chipset __devinitdata = {
2475 ++static const struct ide_port_info rz1000_chipset __devinitconst = {
2476 + .name = DRV_NAME,
2477 + .host_flags = IDE_HFLAG_NO_DMA,
2478 + };
2479 +diff -urNp linux-2.6.32.48/drivers/ide/sc1200.c linux-2.6.32.48/drivers/ide/sc1200.c
2480 +--- linux-2.6.32.48/drivers/ide/sc1200.c 2011-11-08 19:02:43.000000000 -0500
2481 ++++ linux-2.6.32.48/drivers/ide/sc1200.c 2011-11-18 18:01:55.000000000 -0500
2482 +@@ -290,7 +290,7 @@ static const struct ide_dma_ops sc1200_d
2483 + .dma_sff_read_status = ide_dma_sff_read_status,
2484 + };
2485 +
2486 +-static const struct ide_port_info sc1200_chipset __devinitdata = {
2487 ++static const struct ide_port_info sc1200_chipset __devinitconst = {
2488 + .name = DRV_NAME,
2489 + .port_ops = &sc1200_port_ops,
2490 + .dma_ops = &sc1200_dma_ops,
2491 +diff -urNp linux-2.6.32.48/drivers/ide/scc_pata.c linux-2.6.32.48/drivers/ide/scc_pata.c
2492 +--- linux-2.6.32.48/drivers/ide/scc_pata.c 2011-11-08 19:02:43.000000000 -0500
2493 ++++ linux-2.6.32.48/drivers/ide/scc_pata.c 2011-11-18 18:01:55.000000000 -0500
2494 +@@ -811,7 +811,7 @@ static const struct ide_dma_ops scc_dma_
2495 + .dma_sff_read_status = scc_dma_sff_read_status,
2496 + };
2497 +
2498 +-static const struct ide_port_info scc_chipset __devinitdata = {
2499 ++static const struct ide_port_info scc_chipset __devinitconst = {
2500 + .name = "sccIDE",
2501 + .init_iops = init_iops_scc,
2502 + .init_dma = scc_init_dma,
2503 +diff -urNp linux-2.6.32.48/drivers/ide/serverworks.c linux-2.6.32.48/drivers/ide/serverworks.c
2504 +--- linux-2.6.32.48/drivers/ide/serverworks.c 2011-11-08 19:02:43.000000000 -0500
2505 ++++ linux-2.6.32.48/drivers/ide/serverworks.c 2011-11-18 18:01:55.000000000 -0500
2506 +@@ -353,7 +353,7 @@ static const struct ide_port_ops svwks_p
2507 + .cable_detect = svwks_cable_detect,
2508 + };
2509 +
2510 +-static const struct ide_port_info serverworks_chipsets[] __devinitdata = {
2511 ++static const struct ide_port_info serverworks_chipsets[] __devinitconst = {
2512 + { /* 0: OSB4 */
2513 + .name = DRV_NAME,
2514 + .init_chipset = init_chipset_svwks,
2515 diff -urNp linux-2.6.32.48/drivers/ide/setup-pci.c linux-2.6.32.48/drivers/ide/setup-pci.c
2516 --- linux-2.6.32.48/drivers/ide/setup-pci.c 2011-11-08 19:02:43.000000000 -0500
2517 +++ linux-2.6.32.48/drivers/ide/setup-pci.c 2011-11-15 19:59:43.000000000 -0500
2518 @@ -31492,6 +32790,102 @@ diff -urNp linux-2.6.32.48/drivers/ide/setup-pci.c linux-2.6.32.48/drivers/ide/s
2519 for (i = 0; i < n_ports / 2; i++) {
2520 ret = ide_setup_pci_controller(pdev[i], d, !i);
2521 if (ret < 0)
2522 +diff -urNp linux-2.6.32.48/drivers/ide/siimage.c linux-2.6.32.48/drivers/ide/siimage.c
2523 +--- linux-2.6.32.48/drivers/ide/siimage.c 2011-11-08 19:02:43.000000000 -0500
2524 ++++ linux-2.6.32.48/drivers/ide/siimage.c 2011-11-18 18:01:55.000000000 -0500
2525 +@@ -719,7 +719,7 @@ static const struct ide_dma_ops sil_dma_
2526 + .udma_mask = ATA_UDMA6, \
2527 + }
2528 +
2529 +-static const struct ide_port_info siimage_chipsets[] __devinitdata = {
2530 ++static const struct ide_port_info siimage_chipsets[] __devinitconst = {
2531 + /* 0: SiI680 */ DECLARE_SII_DEV(&sil_pata_port_ops),
2532 + /* 1: SiI3112 */ DECLARE_SII_DEV(&sil_sata_port_ops)
2533 + };
2534 +diff -urNp linux-2.6.32.48/drivers/ide/sis5513.c linux-2.6.32.48/drivers/ide/sis5513.c
2535 +--- linux-2.6.32.48/drivers/ide/sis5513.c 2011-11-08 19:02:43.000000000 -0500
2536 ++++ linux-2.6.32.48/drivers/ide/sis5513.c 2011-11-18 18:01:55.000000000 -0500
2537 +@@ -561,7 +561,7 @@ static const struct ide_port_ops sis_ata
2538 + .cable_detect = sis_cable_detect,
2539 + };
2540 +
2541 +-static const struct ide_port_info sis5513_chipset __devinitdata = {
2542 ++static const struct ide_port_info sis5513_chipset __devinitconst = {
2543 + .name = DRV_NAME,
2544 + .init_chipset = init_chipset_sis5513,
2545 + .enablebits = { {0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04} },
2546 +diff -urNp linux-2.6.32.48/drivers/ide/sl82c105.c linux-2.6.32.48/drivers/ide/sl82c105.c
2547 +--- linux-2.6.32.48/drivers/ide/sl82c105.c 2011-11-08 19:02:43.000000000 -0500
2548 ++++ linux-2.6.32.48/drivers/ide/sl82c105.c 2011-11-18 18:01:55.000000000 -0500
2549 +@@ -319,7 +319,7 @@ static const struct ide_dma_ops sl82c105
2550 + .dma_sff_read_status = ide_dma_sff_read_status,
2551 + };
2552 +
2553 +-static const struct ide_port_info sl82c105_chipset __devinitdata = {
2554 ++static const struct ide_port_info sl82c105_chipset __devinitconst = {
2555 + .name = DRV_NAME,
2556 + .init_chipset = init_chipset_sl82c105,
2557 + .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
2558 +diff -urNp linux-2.6.32.48/drivers/ide/slc90e66.c linux-2.6.32.48/drivers/ide/slc90e66.c
2559 +--- linux-2.6.32.48/drivers/ide/slc90e66.c 2011-11-08 19:02:43.000000000 -0500
2560 ++++ linux-2.6.32.48/drivers/ide/slc90e66.c 2011-11-18 18:01:55.000000000 -0500
2561 +@@ -131,7 +131,7 @@ static const struct ide_port_ops slc90e6
2562 + .cable_detect = slc90e66_cable_detect,
2563 + };
2564 +
2565 +-static const struct ide_port_info slc90e66_chipset __devinitdata = {
2566 ++static const struct ide_port_info slc90e66_chipset __devinitconst = {
2567 + .name = DRV_NAME,
2568 + .enablebits = { {0x41, 0x80, 0x80}, {0x43, 0x80, 0x80} },
2569 + .port_ops = &slc90e66_port_ops,
2570 +diff -urNp linux-2.6.32.48/drivers/ide/tc86c001.c linux-2.6.32.48/drivers/ide/tc86c001.c
2571 +--- linux-2.6.32.48/drivers/ide/tc86c001.c 2011-11-08 19:02:43.000000000 -0500
2572 ++++ linux-2.6.32.48/drivers/ide/tc86c001.c 2011-11-18 18:01:55.000000000 -0500
2573 +@@ -190,7 +190,7 @@ static const struct ide_dma_ops tc86c001
2574 + .dma_sff_read_status = ide_dma_sff_read_status,
2575 + };
2576 +
2577 +-static const struct ide_port_info tc86c001_chipset __devinitdata = {
2578 ++static const struct ide_port_info tc86c001_chipset __devinitconst = {
2579 + .name = DRV_NAME,
2580 + .init_hwif = init_hwif_tc86c001,
2581 + .port_ops = &tc86c001_port_ops,
2582 +diff -urNp linux-2.6.32.48/drivers/ide/triflex.c linux-2.6.32.48/drivers/ide/triflex.c
2583 +--- linux-2.6.32.48/drivers/ide/triflex.c 2011-11-08 19:02:43.000000000 -0500
2584 ++++ linux-2.6.32.48/drivers/ide/triflex.c 2011-11-18 18:01:55.000000000 -0500
2585 +@@ -92,7 +92,7 @@ static const struct ide_port_ops triflex
2586 + .set_dma_mode = triflex_set_mode,
2587 + };
2588 +
2589 +-static const struct ide_port_info triflex_device __devinitdata = {
2590 ++static const struct ide_port_info triflex_device __devinitconst = {
2591 + .name = DRV_NAME,
2592 + .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
2593 + .port_ops = &triflex_port_ops,
2594 +diff -urNp linux-2.6.32.48/drivers/ide/trm290.c linux-2.6.32.48/drivers/ide/trm290.c
2595 +--- linux-2.6.32.48/drivers/ide/trm290.c 2011-11-08 19:02:43.000000000 -0500
2596 ++++ linux-2.6.32.48/drivers/ide/trm290.c 2011-11-18 18:01:55.000000000 -0500
2597 +@@ -324,7 +324,7 @@ static struct ide_dma_ops trm290_dma_ops
2598 + .dma_check = trm290_dma_check,
2599 + };
2600 +
2601 +-static const struct ide_port_info trm290_chipset __devinitdata = {
2602 ++static const struct ide_port_info trm290_chipset __devinitconst = {
2603 + .name = DRV_NAME,
2604 + .init_hwif = init_hwif_trm290,
2605 + .tp_ops = &trm290_tp_ops,
2606 +diff -urNp linux-2.6.32.48/drivers/ide/via82cxxx.c linux-2.6.32.48/drivers/ide/via82cxxx.c
2607 +--- linux-2.6.32.48/drivers/ide/via82cxxx.c 2011-11-08 19:02:43.000000000 -0500
2608 ++++ linux-2.6.32.48/drivers/ide/via82cxxx.c 2011-11-18 18:01:55.000000000 -0500
2609 +@@ -374,7 +374,7 @@ static const struct ide_port_ops via_por
2610 + .cable_detect = via82cxxx_cable_detect,
2611 + };
2612 +
2613 +-static const struct ide_port_info via82cxxx_chipset __devinitdata = {
2614 ++static const struct ide_port_info via82cxxx_chipset __devinitconst = {
2615 + .name = DRV_NAME,
2616 + .init_chipset = init_chipset_via82cxxx,
2617 + .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } },
2618 diff -urNp linux-2.6.32.48/drivers/ieee1394/dv1394.c linux-2.6.32.48/drivers/ieee1394/dv1394.c
2619 --- linux-2.6.32.48/drivers/ieee1394/dv1394.c 2011-11-08 19:02:43.000000000 -0500
2620 +++ linux-2.6.32.48/drivers/ieee1394/dv1394.c 2011-11-15 19:59:43.000000000 -0500
2621 @@ -32750,6 +34144,18 @@ diff -urNp linux-2.6.32.48/drivers/lguest/x86/switcher_32.S linux-2.6.32.48/driv
2622
2623 // Every interrupt can come to us here
2624 // But we must truly tell each apart.
2625 +diff -urNp linux-2.6.32.48/drivers/macintosh/macio_asic.c linux-2.6.32.48/drivers/macintosh/macio_asic.c
2626 +--- linux-2.6.32.48/drivers/macintosh/macio_asic.c 2011-11-08 19:02:43.000000000 -0500
2627 ++++ linux-2.6.32.48/drivers/macintosh/macio_asic.c 2011-11-18 18:01:55.000000000 -0500
2628 +@@ -701,7 +701,7 @@ static void __devexit macio_pci_remove(s
2629 + * MacIO is matched against any Apple ID, it's probe() function
2630 + * will then decide wether it applies or not
2631 + */
2632 +-static const struct pci_device_id __devinitdata pci_ids [] = { {
2633 ++static const struct pci_device_id __devinitconst pci_ids [] = { {
2634 + .vendor = PCI_VENDOR_ID_APPLE,
2635 + .device = PCI_ANY_ID,
2636 + .subvendor = PCI_ANY_ID,
2637 diff -urNp linux-2.6.32.48/drivers/macintosh/via-pmu-backlight.c linux-2.6.32.48/drivers/macintosh/via-pmu-backlight.c
2638 --- linux-2.6.32.48/drivers/macintosh/via-pmu-backlight.c 2011-11-08 19:02:43.000000000 -0500
2639 +++ linux-2.6.32.48/drivers/macintosh/via-pmu-backlight.c 2011-11-15 19:59:43.000000000 -0500
2640 @@ -33908,6 +35314,18 @@ diff -urNp linux-2.6.32.48/drivers/message/i2o/iop.c linux-2.6.32.48/drivers/mes
2641 INIT_LIST_HEAD(&c->context_list);
2642 #endif
2643
2644 +diff -urNp linux-2.6.32.48/drivers/mfd/ab3100-core.c linux-2.6.32.48/drivers/mfd/ab3100-core.c
2645 +--- linux-2.6.32.48/drivers/mfd/ab3100-core.c 2011-11-08 19:02:43.000000000 -0500
2646 ++++ linux-2.6.32.48/drivers/mfd/ab3100-core.c 2011-11-18 18:01:55.000000000 -0500
2647 +@@ -777,7 +777,7 @@ struct ab_family_id {
2648 + char *name;
2649 + };
2650 +
2651 +-static const struct ab_family_id ids[] __initdata = {
2652 ++static const struct ab_family_id ids[] __initconst = {
2653 + /* AB3100 */
2654 + {
2655 + .id = 0xc0,
2656 diff -urNp linux-2.6.32.48/drivers/mfd/wm8350-i2c.c linux-2.6.32.48/drivers/mfd/wm8350-i2c.c
2657 --- linux-2.6.32.48/drivers/mfd/wm8350-i2c.c 2011-11-08 19:02:43.000000000 -0500
2658 +++ linux-2.6.32.48/drivers/mfd/wm8350-i2c.c 2011-11-15 19:59:43.000000000 -0500
2659 @@ -34169,25 +35587,33 @@ diff -urNp linux-2.6.32.48/drivers/misc/sgi-gru/grutables.h linux-2.6.32.48/driv
2660 #ifdef CONFIG_SGI_GRU_DEBUG
2661 diff -urNp linux-2.6.32.48/drivers/misc/sgi-xp/xpc.h linux-2.6.32.48/drivers/misc/sgi-xp/xpc.h
2662 --- linux-2.6.32.48/drivers/misc/sgi-xp/xpc.h 2011-11-08 19:02:43.000000000 -0500
2663 -+++ linux-2.6.32.48/drivers/misc/sgi-xp/xpc.h 2011-11-15 19:59:43.000000000 -0500
2664 -@@ -876,7 +876,7 @@ extern struct xpc_registration xpc_regis
2665 ++++ linux-2.6.32.48/drivers/misc/sgi-xp/xpc.h 2011-11-18 18:05:51.000000000 -0500
2666 +@@ -835,6 +835,7 @@ struct xpc_arch_operations {
2667 + void (*received_payload) (struct xpc_channel *, void *);
2668 + void (*notify_senders_of_disconnect) (struct xpc_channel *);
2669 + };
2670 ++typedef struct xpc_arch_operations __no_const xpc_arch_operations_no_const;
2671 +
2672 + /* struct xpc_partition act_state values (for XPC HB) */
2673 +
2674 +@@ -876,7 +877,7 @@ extern struct xpc_registration xpc_regis
2675 /* found in xpc_main.c */
2676 extern struct device *xpc_part;
2677 extern struct device *xpc_chan;
2678 -extern struct xpc_arch_operations xpc_arch_ops;
2679 -+extern const struct xpc_arch_operations xpc_arch_ops;
2680 ++extern xpc_arch_operations_no_const xpc_arch_ops;
2681 extern int xpc_disengage_timelimit;
2682 extern int xpc_disengage_timedout;
2683 extern int xpc_activate_IRQ_rcvd;
2684 diff -urNp linux-2.6.32.48/drivers/misc/sgi-xp/xpc_main.c linux-2.6.32.48/drivers/misc/sgi-xp/xpc_main.c
2685 --- linux-2.6.32.48/drivers/misc/sgi-xp/xpc_main.c 2011-11-08 19:02:43.000000000 -0500
2686 -+++ linux-2.6.32.48/drivers/misc/sgi-xp/xpc_main.c 2011-11-15 19:59:43.000000000 -0500
2687 ++++ linux-2.6.32.48/drivers/misc/sgi-xp/xpc_main.c 2011-11-18 18:05:28.000000000 -0500
2688 @@ -169,7 +169,7 @@ static struct notifier_block xpc_die_not
2689 .notifier_call = xpc_system_die,
2690 };
2691
2692 -struct xpc_arch_operations xpc_arch_ops;
2693 -+const struct xpc_arch_operations xpc_arch_ops;
2694 ++xpc_arch_operations_no_const xpc_arch_ops;
2695
2696 /*
2697 * Timer function to enforce the timelimit on the partition disengage.
2698 @@ -34249,6 +35675,18 @@ diff -urNp linux-2.6.32.48/drivers/misc/sgi-xp/xp.h linux-2.6.32.48/drivers/misc
2699
2700 extern struct xpc_interface xpc_interface;
2701
2702 +diff -urNp linux-2.6.32.48/drivers/mmc/host/sdhci-pci.c linux-2.6.32.48/drivers/mmc/host/sdhci-pci.c
2703 +--- linux-2.6.32.48/drivers/mmc/host/sdhci-pci.c 2011-11-08 19:02:43.000000000 -0500
2704 ++++ linux-2.6.32.48/drivers/mmc/host/sdhci-pci.c 2011-11-18 18:01:55.000000000 -0500
2705 +@@ -297,7 +297,7 @@ static const struct sdhci_pci_fixes sdhc
2706 + .probe = via_probe,
2707 + };
2708 +
2709 +-static const struct pci_device_id pci_ids[] __devinitdata = {
2710 ++static const struct pci_device_id pci_ids[] __devinitconst = {
2711 + {
2712 + .vendor = PCI_VENDOR_ID_RICOH,
2713 + .device = PCI_DEVICE_ID_RICOH_R5C822,
2714 diff -urNp linux-2.6.32.48/drivers/mtd/chips/cfi_cmdset_0001.c linux-2.6.32.48/drivers/mtd/chips/cfi_cmdset_0001.c
2715 --- linux-2.6.32.48/drivers/mtd/chips/cfi_cmdset_0001.c 2011-11-08 19:02:43.000000000 -0500
2716 +++ linux-2.6.32.48/drivers/mtd/chips/cfi_cmdset_0001.c 2011-11-15 19:59:43.000000000 -0500
2717 @@ -34485,6 +35923,18 @@ diff -urNp linux-2.6.32.48/drivers/mtd/ubi/build.c linux-2.6.32.48/drivers/mtd/u
2718 }
2719
2720 /**
2721 +diff -urNp linux-2.6.32.48/drivers/net/atlx/atl2.c linux-2.6.32.48/drivers/net/atlx/atl2.c
2722 +--- linux-2.6.32.48/drivers/net/atlx/atl2.c 2011-11-08 19:02:43.000000000 -0500
2723 ++++ linux-2.6.32.48/drivers/net/atlx/atl2.c 2011-11-18 18:01:55.000000000 -0500
2724 +@@ -2845,7 +2845,7 @@ static void atl2_force_ps(struct atl2_hw
2725 + */
2726 +
2727 + #define ATL2_PARAM(X, desc) \
2728 +- static const int __devinitdata X[ATL2_MAX_NIC + 1] = ATL2_PARAM_INIT; \
2729 ++ static const int __devinitconst X[ATL2_MAX_NIC + 1] = ATL2_PARAM_INIT; \
2730 + MODULE_PARM(X, "1-" __MODULE_STRING(ATL2_MAX_NIC) "i"); \
2731 + MODULE_PARM_DESC(X, desc);
2732 + #else
2733 diff -urNp linux-2.6.32.48/drivers/net/bnx2.c linux-2.6.32.48/drivers/net/bnx2.c
2734 --- linux-2.6.32.48/drivers/net/bnx2.c 2011-11-08 19:02:43.000000000 -0500
2735 +++ linux-2.6.32.48/drivers/net/bnx2.c 2011-11-15 19:59:43.000000000 -0500
2736 @@ -34712,6 +36162,18 @@ diff -urNp linux-2.6.32.48/drivers/net/e1000e/ich8lan.c linux-2.6.32.48/drivers/
2737 .acquire_nvm = e1000_acquire_nvm_ich8lan,
2738 .read_nvm = e1000_read_nvm_ich8lan,
2739 .release_nvm = e1000_release_nvm_ich8lan,
2740 +diff -urNp linux-2.6.32.48/drivers/net/fealnx.c linux-2.6.32.48/drivers/net/fealnx.c
2741 +--- linux-2.6.32.48/drivers/net/fealnx.c 2011-11-08 19:02:43.000000000 -0500
2742 ++++ linux-2.6.32.48/drivers/net/fealnx.c 2011-11-18 18:01:55.000000000 -0500
2743 +@@ -151,7 +151,7 @@ struct chip_info {
2744 + int flags;
2745 + };
2746 +
2747 +-static const struct chip_info skel_netdrv_tbl[] __devinitdata = {
2748 ++static const struct chip_info skel_netdrv_tbl[] __devinitconst = {
2749 + { "100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
2750 + { "100/10M Ethernet PCI Adapter", HAS_CHIP_XCVR },
2751 + { "1000/100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
2752 diff -urNp linux-2.6.32.48/drivers/net/hamradio/6pack.c linux-2.6.32.48/drivers/net/hamradio/6pack.c
2753 --- linux-2.6.32.48/drivers/net/hamradio/6pack.c 2011-11-08 19:02:43.000000000 -0500
2754 +++ linux-2.6.32.48/drivers/net/hamradio/6pack.c 2011-11-15 19:59:43.000000000 -0500
2755 @@ -35633,6 +37095,30 @@ diff -urNp linux-2.6.32.48/drivers/net/pcnet32.c linux-2.6.32.48/drivers/net/pcn
2756 }
2757 } else {
2758 if (netif_msg_link(lp))
2759 +diff -urNp linux-2.6.32.48/drivers/net/sis190.c linux-2.6.32.48/drivers/net/sis190.c
2760 +--- linux-2.6.32.48/drivers/net/sis190.c 2011-11-08 19:02:43.000000000 -0500
2761 ++++ linux-2.6.32.48/drivers/net/sis190.c 2011-11-18 18:01:55.000000000 -0500
2762 +@@ -1598,7 +1598,7 @@ static int __devinit sis190_get_mac_addr
2763 + static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
2764 + struct net_device *dev)
2765 + {
2766 +- static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
2767 ++ static const u16 __devinitconst ids[] = { 0x0965, 0x0966, 0x0968 };
2768 + struct sis190_private *tp = netdev_priv(dev);
2769 + struct pci_dev *isa_bridge;
2770 + u8 reg, tmp8;
2771 +diff -urNp linux-2.6.32.48/drivers/net/sundance.c linux-2.6.32.48/drivers/net/sundance.c
2772 +--- linux-2.6.32.48/drivers/net/sundance.c 2011-11-08 19:02:43.000000000 -0500
2773 ++++ linux-2.6.32.48/drivers/net/sundance.c 2011-11-18 18:01:55.000000000 -0500
2774 +@@ -225,7 +225,7 @@ enum {
2775 + struct pci_id_info {
2776 + const char *name;
2777 + };
2778 +-static const struct pci_id_info pci_id_tbl[] __devinitdata = {
2779 ++static const struct pci_id_info pci_id_tbl[] __devinitconst = {
2780 + {"D-Link DFE-550TX FAST Ethernet Adapter"},
2781 + {"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"},
2782 + {"D-Link DFE-580TX 4 port Server Adapter"},
2783 diff -urNp linux-2.6.32.48/drivers/net/tg3.h linux-2.6.32.48/drivers/net/tg3.h
2784 --- linux-2.6.32.48/drivers/net/tg3.h 2011-11-08 19:02:43.000000000 -0500
2785 +++ linux-2.6.32.48/drivers/net/tg3.h 2011-11-15 19:59:43.000000000 -0500
2786 @@ -35750,6 +37236,30 @@ diff -urNp linux-2.6.32.48/drivers/net/tulip/de4x5.c linux-2.6.32.48/drivers/net
2787 return -EFAULT;
2788 break;
2789 }
2790 +diff -urNp linux-2.6.32.48/drivers/net/tulip/eeprom.c linux-2.6.32.48/drivers/net/tulip/eeprom.c
2791 +--- linux-2.6.32.48/drivers/net/tulip/eeprom.c 2011-11-08 19:02:43.000000000 -0500
2792 ++++ linux-2.6.32.48/drivers/net/tulip/eeprom.c 2011-11-18 18:01:55.000000000 -0500
2793 +@@ -80,7 +80,7 @@ static struct eeprom_fixup eeprom_fixups
2794 + {NULL}};
2795 +
2796 +
2797 +-static const char *block_name[] __devinitdata = {
2798 ++static const char *block_name[] __devinitconst = {
2799 + "21140 non-MII",
2800 + "21140 MII PHY",
2801 + "21142 Serial PHY",
2802 +diff -urNp linux-2.6.32.48/drivers/net/tulip/winbond-840.c linux-2.6.32.48/drivers/net/tulip/winbond-840.c
2803 +--- linux-2.6.32.48/drivers/net/tulip/winbond-840.c 2011-11-08 19:02:43.000000000 -0500
2804 ++++ linux-2.6.32.48/drivers/net/tulip/winbond-840.c 2011-11-18 18:01:55.000000000 -0500
2805 +@@ -235,7 +235,7 @@ struct pci_id_info {
2806 + int drv_flags; /* Driver use, intended as capability flags. */
2807 + };
2808 +
2809 +-static const struct pci_id_info pci_id_tbl[] __devinitdata = {
2810 ++static const struct pci_id_info pci_id_tbl[] __devinitconst = {
2811 + { /* Sometime a Level-One switch card. */
2812 + "Winbond W89c840", CanHaveMII | HasBrokenTx | FDXOnNoMII},
2813 + { "Winbond W89c840", CanHaveMII | HasBrokenTx},
2814 diff -urNp linux-2.6.32.48/drivers/net/usb/hso.c linux-2.6.32.48/drivers/net/usb/hso.c
2815 --- linux-2.6.32.48/drivers/net/usb/hso.c 2011-11-08 19:02:43.000000000 -0500
2816 +++ linux-2.6.32.48/drivers/net/usb/hso.c 2011-11-15 19:59:43.000000000 -0500
2817 @@ -37086,9 +38596,21 @@ diff -urNp linux-2.6.32.48/drivers/scsi/aacraid/commctrl.c linux-2.6.32.48/drive
2818
2819 if (dev->in_reset) {
2820 dprintk((KERN_DEBUG"aacraid: send raw srb -EBUSY\n"));
2821 +diff -urNp linux-2.6.32.48/drivers/scsi/aacraid/linit.c linux-2.6.32.48/drivers/scsi/aacraid/linit.c
2822 +--- linux-2.6.32.48/drivers/scsi/aacraid/linit.c 2011-11-08 19:02:43.000000000 -0500
2823 ++++ linux-2.6.32.48/drivers/scsi/aacraid/linit.c 2011-11-18 18:01:55.000000000 -0500
2824 +@@ -91,7 +91,7 @@ static DECLARE_PCI_DEVICE_TABLE(aac_pci_
2825 + #elif defined(__devinitconst)
2826 + static const struct pci_device_id aac_pci_tbl[] __devinitconst = {
2827 + #else
2828 +-static const struct pci_device_id aac_pci_tbl[] __devinitdata = {
2829 ++static const struct pci_device_id aac_pci_tbl[] __devinitconst = {
2830 + #endif
2831 + { 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si (Iguana/PERC2Si) */
2832 + { 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di (Opal/PERC3Di) */
2833 diff -urNp linux-2.6.32.48/drivers/scsi/aic94xx/aic94xx_init.c linux-2.6.32.48/drivers/scsi/aic94xx/aic94xx_init.c
2834 --- linux-2.6.32.48/drivers/scsi/aic94xx/aic94xx_init.c 2011-11-08 19:02:43.000000000 -0500
2835 -+++ linux-2.6.32.48/drivers/scsi/aic94xx/aic94xx_init.c 2011-11-15 19:59:43.000000000 -0500
2836 ++++ linux-2.6.32.48/drivers/scsi/aic94xx/aic94xx_init.c 2011-11-18 18:01:55.000000000 -0500
2837 @@ -485,7 +485,7 @@ static ssize_t asd_show_update_bios(stru
2838 flash_error_table[i].reason);
2839 }
2840 @@ -37098,6 +38620,15 @@ diff -urNp linux-2.6.32.48/drivers/scsi/aic94xx/aic94xx_init.c linux-2.6.32.48/d
2841 asd_show_update_bios, asd_store_update_bios);
2842
2843 static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha)
2844 +@@ -1011,7 +1011,7 @@ static struct sas_domain_function_templa
2845 + .lldd_control_phy = asd_control_phy,
2846 + };
2847 +
2848 +-static const struct pci_device_id aic94xx_pci_table[] __devinitdata = {
2849 ++static const struct pci_device_id aic94xx_pci_table[] __devinitconst = {
2850 + {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x410),0, 0, 1},
2851 + {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x412),0, 0, 1},
2852 + {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x416),0, 0, 1},
2853 diff -urNp linux-2.6.32.48/drivers/scsi/bfa/bfa_iocfc.h linux-2.6.32.48/drivers/scsi/bfa/bfa_iocfc.h
2854 --- linux-2.6.32.48/drivers/scsi/bfa/bfa_iocfc.h 2011-11-08 19:02:43.000000000 -0500
2855 +++ linux-2.6.32.48/drivers/scsi/bfa/bfa_iocfc.h 2011-11-15 19:59:43.000000000 -0500
2856 @@ -38467,6 +39998,18 @@ diff -urNp linux-2.6.32.48/drivers/staging/octeon/ethernet-rx.c linux-2.6.32.48/
2857 #endif
2858 dev_kfree_skb_irq(skb);
2859 }
2860 +diff -urNp linux-2.6.32.48/drivers/staging/otus/80211core/pub_zfi.h linux-2.6.32.48/drivers/staging/otus/80211core/pub_zfi.h
2861 +--- linux-2.6.32.48/drivers/staging/otus/80211core/pub_zfi.h 2011-11-08 19:02:43.000000000 -0500
2862 ++++ linux-2.6.32.48/drivers/staging/otus/80211core/pub_zfi.h 2011-11-18 18:01:55.000000000 -0500
2863 +@@ -531,7 +531,7 @@ struct zsCbFuncTbl
2864 + u8_t (*zfcbClassifyTxPacket)(zdev_t* dev, zbuf_t* buf);
2865 +
2866 + void (*zfcbHwWatchDogNotify)(zdev_t* dev);
2867 +-};
2868 ++} __no_const;
2869 +
2870 + extern void zfZeroMemory(u8_t* va, u16_t length);
2871 + #define ZM_INIT_CB_FUNC_TABLE(p) zfZeroMemory((u8_t *)p, sizeof(struct zsCbFuncTbl));
2872 diff -urNp linux-2.6.32.48/drivers/staging/panel/panel.c linux-2.6.32.48/drivers/staging/panel/panel.c
2873 --- linux-2.6.32.48/drivers/staging/panel/panel.c 2011-11-08 19:02:43.000000000 -0500
2874 +++ linux-2.6.32.48/drivers/staging/panel/panel.c 2011-11-15 19:59:43.000000000 -0500
2875 @@ -39082,7 +40625,16 @@ diff -urNp linux-2.6.32.48/drivers/video/atmel_lcdfb.c linux-2.6.32.48/drivers/v
2876 };
2877 diff -urNp linux-2.6.32.48/drivers/video/aty/aty128fb.c linux-2.6.32.48/drivers/video/aty/aty128fb.c
2878 --- linux-2.6.32.48/drivers/video/aty/aty128fb.c 2011-11-08 19:02:43.000000000 -0500
2879 -+++ linux-2.6.32.48/drivers/video/aty/aty128fb.c 2011-11-15 19:59:43.000000000 -0500
2880 ++++ linux-2.6.32.48/drivers/video/aty/aty128fb.c 2011-11-18 18:01:55.000000000 -0500
2881 +@@ -149,7 +149,7 @@ enum {
2882 + };
2883 +
2884 + /* Must match above enum */
2885 +-static const char *r128_family[] __devinitdata = {
2886 ++static const char *r128_family[] __devinitconst = {
2887 + "AGP",
2888 + "PCI",
2889 + "PRO AGP",
2890 @@ -1787,7 +1787,7 @@ static int aty128_bl_get_brightness(stru
2891 return bd->props.brightness;
2892 }
2893 @@ -39417,6 +40969,39 @@ diff -urNp linux-2.6.32.48/drivers/video/fbmem.c linux-2.6.32.48/drivers/video/f
2894 return -EINVAL;
2895 if (!registered_fb[con2fb.framebuffer])
2896 request_module("fb%d", con2fb.framebuffer);
2897 +diff -urNp linux-2.6.32.48/drivers/video/geode/gx1fb_core.c linux-2.6.32.48/drivers/video/geode/gx1fb_core.c
2898 +--- linux-2.6.32.48/drivers/video/geode/gx1fb_core.c 2011-11-08 19:02:43.000000000 -0500
2899 ++++ linux-2.6.32.48/drivers/video/geode/gx1fb_core.c 2011-11-18 18:01:55.000000000 -0500
2900 +@@ -30,7 +30,7 @@ static int crt_option = 1;
2901 + static char panel_option[32] = "";
2902 +
2903 + /* Modes relevant to the GX1 (taken from modedb.c) */
2904 +-static const struct fb_videomode __initdata gx1_modedb[] = {
2905 ++static const struct fb_videomode __initconst gx1_modedb[] = {
2906 + /* 640x480-60 VESA */
2907 + { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2,
2908 + 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
2909 +diff -urNp linux-2.6.32.48/drivers/video/gxt4500.c linux-2.6.32.48/drivers/video/gxt4500.c
2910 +--- linux-2.6.32.48/drivers/video/gxt4500.c 2011-11-08 19:02:43.000000000 -0500
2911 ++++ linux-2.6.32.48/drivers/video/gxt4500.c 2011-11-18 18:01:55.000000000 -0500
2912 +@@ -156,7 +156,7 @@ struct gxt4500_par {
2913 + static char *mode_option;
2914 +
2915 + /* default mode: 1280x1024 @ 60 Hz, 8 bpp */
2916 +-static const struct fb_videomode defaultmode __devinitdata = {
2917 ++static const struct fb_videomode defaultmode __devinitconst = {
2918 + .refresh = 60,
2919 + .xres = 1280,
2920 + .yres = 1024,
2921 +@@ -581,7 +581,7 @@ static int gxt4500_blank(int blank, stru
2922 + return 0;
2923 + }
2924 +
2925 +-static const struct fb_fix_screeninfo gxt4500_fix __devinitdata = {
2926 ++static const struct fb_fix_screeninfo gxt4500_fix __devinitconst = {
2927 + .id = "IBM GXT4500P",
2928 + .type = FB_TYPE_PACKED_PIXELS,
2929 + .visual = FB_VISUAL_PSEUDOCOLOR,
2930 diff -urNp linux-2.6.32.48/drivers/video/i810/i810_accel.c linux-2.6.32.48/drivers/video/i810/i810_accel.c
2931 --- linux-2.6.32.48/drivers/video/i810/i810_accel.c 2011-11-08 19:02:43.000000000 -0500
2932 +++ linux-2.6.32.48/drivers/video/i810/i810_accel.c 2011-11-15 19:59:43.000000000 -0500
2933 @@ -39428,6 +41013,18 @@ diff -urNp linux-2.6.32.48/drivers/video/i810/i810_accel.c linux-2.6.32.48/drive
2934 i810_report_error(mmio);
2935 par->dev_flags |= LOCKUP;
2936 info->pixmap.scan_align = 1;
2937 +diff -urNp linux-2.6.32.48/drivers/video/i810/i810_main.c linux-2.6.32.48/drivers/video/i810/i810_main.c
2938 +--- linux-2.6.32.48/drivers/video/i810/i810_main.c 2011-11-08 19:02:43.000000000 -0500
2939 ++++ linux-2.6.32.48/drivers/video/i810/i810_main.c 2011-11-18 18:01:55.000000000 -0500
2940 +@@ -97,7 +97,7 @@ static int i810fb_blank (int blank_
2941 + static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par);
2942 +
2943 + /* PCI */
2944 +-static const char *i810_pci_list[] __devinitdata = {
2945 ++static const char *i810_pci_list[] __devinitconst = {
2946 + "Intel(R) 810 Framebuffer Device" ,
2947 + "Intel(R) 810-DC100 Framebuffer Device" ,
2948 + "Intel(R) 810E Framebuffer Device" ,
2949 diff -urNp linux-2.6.32.48/drivers/video/logo/logo_linux_clut224.ppm linux-2.6.32.48/drivers/video/logo/logo_linux_clut224.ppm
2950 --- linux-2.6.32.48/drivers/video/logo/logo_linux_clut224.ppm 2011-11-08 19:02:43.000000000 -0500
2951 +++ linux-2.6.32.48/drivers/video/logo/logo_linux_clut224.ppm 2011-11-15 19:59:43.000000000 -0500
2952 @@ -42580,7 +44177,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_aout.c linux-2.6.32.48/fs/binfmt_aout.c
2953 up_write(&current->mm->mmap_sem);
2954 diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
2955 --- linux-2.6.32.48/fs/binfmt_elf.c 2011-11-08 19:02:43.000000000 -0500
2956 -+++ linux-2.6.32.48/fs/binfmt_elf.c 2011-11-15 19:59:43.000000000 -0500
2957 ++++ linux-2.6.32.48/fs/binfmt_elf.c 2011-11-18 18:51:56.000000000 -0500
2958 @@ -50,6 +50,10 @@ static int elf_core_dump(long signr, str
2959 #define elf_core_dump NULL
2960 #endif
2961 @@ -43014,7 +44611,15 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
2962 if (elf_read_implies_exec(loc->elf_ex, executable_stack))
2963 current->personality |= READ_IMPLIES_EXEC;
2964
2965 -@@ -804,6 +1091,20 @@ static int load_elf_binary(struct linux_
2966 +@@ -800,10 +1087,27 @@ static int load_elf_binary(struct linux_
2967 + * might try to exec. This is because the brk will
2968 + * follow the loader, and is not movable. */
2969 + #ifdef CONFIG_X86
2970 +- load_bias = 0;
2971 ++ if (current->flags & PF_RANDOMIZE)
2972 ++ load_bias = 0;
2973 ++ else
2974 ++ load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
2975 #else
2976 load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
2977 #endif
2978 @@ -43035,7 +44640,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
2979 }
2980
2981 error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
2982 -@@ -836,9 +1137,9 @@ static int load_elf_binary(struct linux_
2983 +@@ -836,9 +1140,9 @@ static int load_elf_binary(struct linux_
2984 * allowed task size. Note that p_filesz must always be
2985 * <= p_memsz so it is only necessary to check p_memsz.
2986 */
2987 @@ -43048,7 +44653,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
2988 /* set_brk can never work. Avoid overflows. */
2989 send_sig(SIGKILL, current, 0);
2990 retval = -EINVAL;
2991 -@@ -866,6 +1167,11 @@ static int load_elf_binary(struct linux_
2992 +@@ -866,6 +1170,11 @@ static int load_elf_binary(struct linux_
2993 start_data += load_bias;
2994 end_data += load_bias;
2995
2996 @@ -43060,7 +44665,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
2997 /* Calling set_brk effectively mmaps the pages that we need
2998 * for the bss and break sections. We must do this before
2999 * mapping in the interpreter, to make sure it doesn't wind
3000 -@@ -877,9 +1183,11 @@ static int load_elf_binary(struct linux_
3001 +@@ -877,9 +1186,11 @@ static int load_elf_binary(struct linux_
3002 goto out_free_dentry;
3003 }
3004 if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
3005 @@ -43075,7 +44680,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
3006 }
3007
3008 if (elf_interpreter) {
3009 -@@ -1112,8 +1420,10 @@ static int dump_seek(struct file *file,
3010 +@@ -1112,8 +1423,10 @@ static int dump_seek(struct file *file,
3011 unsigned long n = off;
3012 if (n > PAGE_SIZE)
3013 n = PAGE_SIZE;
3014 @@ -43087,7 +44692,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
3015 off -= n;
3016 }
3017 free_page((unsigned long)buf);
3018 -@@ -1125,7 +1435,7 @@ static int dump_seek(struct file *file,
3019 +@@ -1125,7 +1438,7 @@ static int dump_seek(struct file *file,
3020 * Decide what to dump of a segment, part, all or none.
3021 */
3022 static unsigned long vma_dump_size(struct vm_area_struct *vma,
3023 @@ -43096,7 +44701,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
3024 {
3025 #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
3026
3027 -@@ -1159,7 +1469,7 @@ static unsigned long vma_dump_size(struc
3028 +@@ -1159,7 +1472,7 @@ static unsigned long vma_dump_size(struc
3029 if (vma->vm_file == NULL)
3030 return 0;
3031
3032 @@ -43105,7 +44710,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
3033 goto whole;
3034
3035 /*
3036 -@@ -1255,8 +1565,11 @@ static int writenote(struct memelfnote *
3037 +@@ -1255,8 +1568,11 @@ static int writenote(struct memelfnote *
3038 #undef DUMP_WRITE
3039
3040 #define DUMP_WRITE(addr, nr) \
3041 @@ -43118,7 +44723,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
3042
3043 static void fill_elf_header(struct elfhdr *elf, int segs,
3044 u16 machine, u32 flags, u8 osabi)
3045 -@@ -1385,9 +1698,9 @@ static void fill_auxv_note(struct memelf
3046 +@@ -1385,9 +1701,9 @@ static void fill_auxv_note(struct memelf
3047 {
3048 elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
3049 int i = 0;
3050 @@ -43130,7 +44735,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
3051 fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
3052 }
3053
3054 -@@ -1973,7 +2286,7 @@ static int elf_core_dump(long signr, str
3055 +@@ -1973,7 +2289,7 @@ static int elf_core_dump(long signr, str
3056 phdr.p_offset = offset;
3057 phdr.p_vaddr = vma->vm_start;
3058 phdr.p_paddr = 0;
3059 @@ -43139,7 +44744,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
3060 phdr.p_memsz = vma->vm_end - vma->vm_start;
3061 offset += phdr.p_filesz;
3062 phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
3063 -@@ -2006,7 +2319,7 @@ static int elf_core_dump(long signr, str
3064 +@@ -2006,7 +2322,7 @@ static int elf_core_dump(long signr, str
3065 unsigned long addr;
3066 unsigned long end;
3067
3068 @@ -43148,7 +44753,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
3069
3070 for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
3071 struct page *page;
3072 -@@ -2015,6 +2328,7 @@ static int elf_core_dump(long signr, str
3073 +@@ -2015,6 +2331,7 @@ static int elf_core_dump(long signr, str
3074 page = get_dump_page(addr);
3075 if (page) {
3076 void *kaddr = kmap(page);
3077 @@ -43156,7 +44761,7 @@ diff -urNp linux-2.6.32.48/fs/binfmt_elf.c linux-2.6.32.48/fs/binfmt_elf.c
3078 stop = ((size += PAGE_SIZE) > limit) ||
3079 !dump_write(file, kaddr, PAGE_SIZE);
3080 kunmap(page);
3081 -@@ -2042,6 +2356,97 @@ out:
3082 +@@ -2042,6 +2359,97 @@ out:
3083
3084 #endif /* USE_ELF_CORE_DUMP */
3085
3086 @@ -44381,7 +45986,7 @@ diff -urNp linux-2.6.32.48/fs/ecryptfs/inode.c linux-2.6.32.48/fs/ecryptfs/inode
3087 goto out_free;
3088 diff -urNp linux-2.6.32.48/fs/exec.c linux-2.6.32.48/fs/exec.c
3089 --- linux-2.6.32.48/fs/exec.c 2011-11-08 19:02:43.000000000 -0500
3090 -+++ linux-2.6.32.48/fs/exec.c 2011-11-15 19:59:43.000000000 -0500
3091 ++++ linux-2.6.32.48/fs/exec.c 2011-11-18 18:01:52.000000000 -0500
3092 @@ -56,12 +56,24 @@
3093 #include <linux/fsnotify.h>
3094 #include <linux/fs_struct.h>
3095 @@ -44812,7 +46417,7 @@ diff -urNp linux-2.6.32.48/fs/exec.c linux-2.6.32.48/fs/exec.c
3096 + task_uid(tsk), task_euid(tsk), pc, sp);
3097 + free_page((unsigned long)buffer_exec);
3098 + free_page((unsigned long)buffer_fault);
3099 -+ pax_report_insns(pc, sp);
3100 ++ pax_report_insns(regs, pc, sp);
3101 + do_coredump(SIGKILL, SIGKILL, regs);
3102 +}
3103 +#endif
3104 @@ -46861,6 +48466,61 @@ diff -urNp linux-2.6.32.48/fs/gfs2/sys.c linux-2.6.32.48/fs/gfs2/sys.c
3105 .uevent = gfs2_uevent,
3106 };
3107
3108 +diff -urNp linux-2.6.32.48/fs/hfs/btree.c linux-2.6.32.48/fs/hfs/btree.c
3109 +--- linux-2.6.32.48/fs/hfs/btree.c 2011-11-08 19:02:43.000000000 -0500
3110 ++++ linux-2.6.32.48/fs/hfs/btree.c 2011-11-18 18:49:57.000000000 -0500
3111 +@@ -45,11 +45,27 @@ struct hfs_btree *hfs_btree_open(struct
3112 + case HFS_EXT_CNID:
3113 + hfs_inode_read_fork(tree->inode, mdb->drXTExtRec, mdb->drXTFlSize,
3114 + mdb->drXTFlSize, be32_to_cpu(mdb->drXTClpSiz));
3115 ++
3116 ++ if (HFS_I(tree->inode)->alloc_blocks >
3117 ++ HFS_I(tree->inode)->first_blocks) {
3118 ++ printk(KERN_ERR "hfs: invalid btree extent records\n");
3119 ++ unlock_new_inode(tree->inode);
3120 ++ goto free_inode;
3121 ++ }
3122 ++
3123 + tree->inode->i_mapping->a_ops = &hfs_btree_aops;
3124 + break;
3125 + case HFS_CAT_CNID:
3126 + hfs_inode_read_fork(tree->inode, mdb->drCTExtRec, mdb->drCTFlSize,
3127 + mdb->drCTFlSize, be32_to_cpu(mdb->drCTClpSiz));
3128 ++
3129 ++ if (!HFS_I(tree->inode)->first_blocks) {
3130 ++ printk(KERN_ERR "hfs: invalid btree extent records "
3131 ++ "(0 size).\n");
3132 ++ unlock_new_inode(tree->inode);
3133 ++ goto free_inode;
3134 ++ }
3135 ++
3136 + tree->inode->i_mapping->a_ops = &hfs_btree_aops;
3137 + break;
3138 + default:
3139 +@@ -58,11 +74,6 @@ struct hfs_btree *hfs_btree_open(struct
3140 + }
3141 + unlock_new_inode(tree->inode);
3142 +
3143 +- if (!HFS_I(tree->inode)->first_blocks) {
3144 +- printk(KERN_ERR "hfs: invalid btree extent records (0 size).\n");
3145 +- goto free_inode;
3146 +- }
3147 +-
3148 + mapping = tree->inode->i_mapping;
3149 + page = read_mapping_page(mapping, 0, NULL);
3150 + if (IS_ERR(page))
3151 +diff -urNp linux-2.6.32.48/fs/hfs/trans.c linux-2.6.32.48/fs/hfs/trans.c
3152 +--- linux-2.6.32.48/fs/hfs/trans.c 2011-11-08 19:02:43.000000000 -0500
3153 ++++ linux-2.6.32.48/fs/hfs/trans.c 2011-11-18 18:37:06.000000000 -0500
3154 +@@ -40,6 +40,8 @@ int hfs_mac2asc(struct super_block *sb,
3155 +
3156 + src = in->name;
3157 + srclen = in->len;
3158 ++ if (srclen > HFS_NAMELEN)
3159 ++ srclen = HFS_NAMELEN;
3160 + dst = out;
3161 + dstlen = HFS_MAX_NAMELEN;
3162 + if (nls_io) {
3163 diff -urNp linux-2.6.32.48/fs/hfsplus/catalog.c linux-2.6.32.48/fs/hfsplus/catalog.c
3164 --- linux-2.6.32.48/fs/hfsplus/catalog.c 2011-11-08 19:02:43.000000000 -0500
3165 +++ linux-2.6.32.48/fs/hfsplus/catalog.c 2011-11-15 19:59:43.000000000 -0500
3166 @@ -49311,7 +50971,7 @@ diff -urNp linux-2.6.32.48/fs/proc/proc_net.c linux-2.6.32.48/fs/proc/proc_net.c
3167 task = pid_task(proc_pid(dir), PIDTYPE_PID);
3168 diff -urNp linux-2.6.32.48/fs/proc/proc_sysctl.c linux-2.6.32.48/fs/proc/proc_sysctl.c
3169 --- linux-2.6.32.48/fs/proc/proc_sysctl.c 2011-11-08 19:02:43.000000000 -0500
3170 -+++ linux-2.6.32.48/fs/proc/proc_sysctl.c 2011-11-15 19:59:43.000000000 -0500
3171 ++++ linux-2.6.32.48/fs/proc/proc_sysctl.c 2011-11-18 18:45:06.000000000 -0500
3172 @@ -7,11 +7,13 @@
3173 #include <linux/security.h>
3174 #include "internal.h"
3175 @@ -49378,7 +51038,12 @@ diff -urNp linux-2.6.32.48/fs/proc/proc_sysctl.c linux-2.6.32.48/fs/proc/proc_sy
3176 generic_fillattr(inode, stat);
3177 if (table)
3178 stat->mode = (stat->mode & S_IFMT) | table->mode;
3179 -@@ -362,13 +379,13 @@ static const struct file_operations proc
3180 +@@ -358,17 +375,18 @@ static const struct file_operations proc
3181 + };
3182 +
3183 + static const struct file_operations proc_sys_dir_file_operations = {
3184 ++ .read = generic_read_dir,
3185 + .readdir = proc_sys_readdir,
3186 .llseek = generic_file_llseek,
3187 };
3188
3189 @@ -50524,6 +52189,30 @@ diff -urNp linux-2.6.32.48/fs/xfs/xfs_dir2_sf.c linux-2.6.32.48/fs/xfs/xfs_dir2_
3190 off & 0x7fffffff, ino, DT_UNKNOWN)) {
3191 *offset = off & 0x7fffffff;
3192 return 0;
3193 +diff -urNp linux-2.6.32.48/fs/xfs/xfs_vnodeops.c linux-2.6.32.48/fs/xfs/xfs_vnodeops.c
3194 +--- linux-2.6.32.48/fs/xfs/xfs_vnodeops.c 2011-11-08 19:02:43.000000000 -0500
3195 ++++ linux-2.6.32.48/fs/xfs/xfs_vnodeops.c 2011-11-18 18:59:38.000000000 -0500
3196 +@@ -564,13 +564,17 @@ xfs_readlink(
3197 +
3198 + xfs_ilock(ip, XFS_ILOCK_SHARED);
3199 +
3200 +- ASSERT((ip->i_d.di_mode & S_IFMT) == S_IFLNK);
3201 +- ASSERT(ip->i_d.di_size <= MAXPATHLEN);
3202 +-
3203 + pathlen = ip->i_d.di_size;
3204 + if (!pathlen)
3205 + goto out;
3206 +
3207 ++ if (pathlen > MAXPATHLEN) {
3208 ++ xfs_fs_cmn_err(CE_ALERT, mp, "%s: inode (%llu) symlink length (%d) too long",
3209 ++ __func__, (unsigned long long)ip->i_ino, pathlen);
3210 ++ ASSERT(0);
3211 ++ return XFS_ERROR(EFSCORRUPTED);
3212 ++ }
3213 ++
3214 + if (ip->i_df.if_flags & XFS_IFINLINE) {
3215 + memcpy(link, ip->i_df.if_u1.if_data, pathlen);
3216 + link[pathlen] = '\0';
3217 diff -urNp linux-2.6.32.48/grsecurity/gracl_alloc.c linux-2.6.32.48/grsecurity/gracl_alloc.c
3218 --- linux-2.6.32.48/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
3219 +++ linux-2.6.32.48/grsecurity/gracl_alloc.c 2011-11-15 19:59:43.000000000 -0500
3220 @@ -55989,8 +57678,8 @@ diff -urNp linux-2.6.32.48/grsecurity/gracl_res.c linux-2.6.32.48/grsecurity/gra
3221 +}
3222 diff -urNp linux-2.6.32.48/grsecurity/gracl_segv.c linux-2.6.32.48/grsecurity/gracl_segv.c
3223 --- linux-2.6.32.48/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500
3224 -+++ linux-2.6.32.48/grsecurity/gracl_segv.c 2011-11-15 19:59:43.000000000 -0500
3225 -@@ -0,0 +1,287 @@
3226 ++++ linux-2.6.32.48/grsecurity/gracl_segv.c 2011-11-17 20:48:17.000000000 -0500
3227 +@@ -0,0 +1,284 @@
3228 +#include <linux/kernel.h>
3229 +#include <linux/mm.h>
3230 +#include <asm/uaccess.h>
3231 @@ -56157,7 +57846,6 @@ diff -urNp linux-2.6.32.48/grsecurity/gracl_segv.c linux-2.6.32.48/grsecurity/gr
3232 +gr_handle_crash(struct task_struct *task, const int sig)
3233 +{
3234 + struct acl_subject_label *curr;
3235 -+ struct acl_subject_label *curr2;
3236 + struct task_struct *tsk, *tsk2;
3237 + const struct cred *cred;
3238 + const struct cred *cred2;
3239 @@ -56207,8 +57895,6 @@ diff -urNp linux-2.6.32.48/grsecurity/gracl_segv.c linux-2.6.32.48/grsecurity/gr
3240 + read_lock(&grsec_exec_file_lock);
3241 + do_each_thread(tsk2, tsk) {
3242 + if (likely(tsk != task)) {
3243 -+ curr2 = tsk->acl;
3244 -+
3245 + // if this thread has the same subject as the one that triggered
3246 + // RES_CRASH and it's the same binary, kill it
3247 + if (tsk->acl == task->acl && tsk->exec_file == task->exec_file)
3248 @@ -63781,15 +65467,17 @@ diff -urNp linux-2.6.32.48/include/linux/oprofile.h linux-2.6.32.48/include/linu
3249 struct dentry * oprofilefs_mkdir(struct super_block * sb, struct dentry * root,
3250 diff -urNp linux-2.6.32.48/include/linux/pagemap.h linux-2.6.32.48/include/linux/pagemap.h
3251 --- linux-2.6.32.48/include/linux/pagemap.h 2011-11-08 19:02:43.000000000 -0500
3252 -+++ linux-2.6.32.48/include/linux/pagemap.h 2011-11-15 19:59:43.000000000 -0500
3253 -@@ -425,6 +425,7 @@ static inline int fault_in_pages_readabl
3254 ++++ linux-2.6.32.48/include/linux/pagemap.h 2011-11-18 18:01:55.000000000 -0500
3255 +@@ -425,7 +425,9 @@ static inline int fault_in_pages_readabl
3256 if (((unsigned long)uaddr & PAGE_MASK) !=
3257 ((unsigned long)end & PAGE_MASK))
3258 ret = __get_user(c, end);
3259 + (void)c;
3260 }
3261 ++ (void)c;
3262 return ret;
3263 }
3264 +
3265 diff -urNp linux-2.6.32.48/include/linux/perf_event.h linux-2.6.32.48/include/linux/perf_event.h
3266 --- linux-2.6.32.48/include/linux/perf_event.h 2011-11-08 19:02:43.000000000 -0500
3267 +++ linux-2.6.32.48/include/linux/perf_event.h 2011-11-15 19:59:43.000000000 -0500
3268 @@ -64063,7 +65751,7 @@ diff -urNp linux-2.6.32.48/include/linux/rfkill.h linux-2.6.32.48/include/linux/
3269 /**
3270 diff -urNp linux-2.6.32.48/include/linux/sched.h linux-2.6.32.48/include/linux/sched.h
3271 --- linux-2.6.32.48/include/linux/sched.h 2011-11-08 19:02:43.000000000 -0500
3272 -+++ linux-2.6.32.48/include/linux/sched.h 2011-11-15 19:59:43.000000000 -0500
3273 ++++ linux-2.6.32.48/include/linux/sched.h 2011-11-18 18:01:52.000000000 -0500
3274 @@ -101,6 +101,7 @@ struct bio;
3275 struct fs_struct;
3276 struct bts_context;
3277 @@ -64255,7 +65943,7 @@ diff -urNp linux-2.6.32.48/include/linux/sched.h linux-2.6.32.48/include/linux/s
3278 +#endif
3279 +
3280 +extern void pax_report_fault(struct pt_regs *regs, void *pc, void *sp);
3281 -+extern void pax_report_insns(void *pc, void *sp);
3282 ++extern void pax_report_insns(struct pt_regs *regs, void *pc, void *sp);
3283 +extern void pax_report_refcount_overflow(struct pt_regs *regs);
3284 +extern NORET_TYPE void pax_report_usercopy(const void *ptr, unsigned long len, bool to, const char *type) ATTRIB_NORET;
3285 +
3286 @@ -64913,8 +66601,8 @@ diff -urNp linux-2.6.32.48/include/linux/unaligned/access_ok.h linux-2.6.32.48/i
3287 static inline void put_unaligned_le16(u16 val, void *p)
3288 diff -urNp linux-2.6.32.48/include/linux/vermagic.h linux-2.6.32.48/include/linux/vermagic.h
3289 --- linux-2.6.32.48/include/linux/vermagic.h 2011-11-08 19:02:43.000000000 -0500
3290 -+++ linux-2.6.32.48/include/linux/vermagic.h 2011-11-15 19:59:43.000000000 -0500
3291 -@@ -26,9 +26,28 @@
3292 ++++ linux-2.6.32.48/include/linux/vermagic.h 2011-11-18 18:09:44.000000000 -0500
3293 +@@ -26,9 +26,35 @@
3294 #define MODULE_ARCH_VERMAGIC ""
3295 #endif
3296
3297 @@ -64930,6 +66618,12 @@ diff -urNp linux-2.6.32.48/include/linux/vermagic.h linux-2.6.32.48/include/linu
3298 +#define MODULE_CONSTIFY_PLUGIN ""
3299 +#endif
3300 +
3301 ++#ifdef STACKLEAK_PLUGIN
3302 ++#define MODULE_STACKLEAK_PLUGIN "STACKLEAK_PLUGIN "
3303 ++#else
3304 ++#define MODULE_STACKLEAK_PLUGIN ""
3305 ++#endif
3306 ++
3307 +#ifdef CONFIG_GRKERNSEC
3308 +#define MODULE_GRSEC "GRSEC "
3309 +#else
3310 @@ -64942,7 +66636,8 @@ diff -urNp linux-2.6.32.48/include/linux/vermagic.h linux-2.6.32.48/include/linu
3311 MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
3312 - MODULE_ARCH_VERMAGIC
3313 + MODULE_ARCH_VERMAGIC \
3314 -+ MODULE_PAX_REFCOUNT MODULE_CONSTIFY_PLUGIN MODULE_GRSEC
3315 ++ MODULE_PAX_REFCOUNT MODULE_CONSTIFY_PLUGIN MODULE_STACKLEAK_PLUGIN \
3316 ++ MODULE_GRSEC
3317
3318 diff -urNp linux-2.6.32.48/include/linux/vmalloc.h linux-2.6.32.48/include/linux/vmalloc.h
3319 --- linux-2.6.32.48/include/linux/vmalloc.h 2011-11-08 19:02:43.000000000 -0500
3320 @@ -71117,7 +72812,7 @@ diff -urNp linux-2.6.32.48/localversion-grsec linux-2.6.32.48/localversion-grsec
3321 +-grsec
3322 diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3323 --- linux-2.6.32.48/Makefile 2011-11-08 19:02:43.000000000 -0500
3324 -+++ linux-2.6.32.48/Makefile 2011-11-15 19:59:43.000000000 -0500
3325 ++++ linux-2.6.32.48/Makefile 2011-11-18 18:07:45.000000000 -0500
3326 @@ -221,8 +221,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
3327
3328 HOSTCC = gcc
3329 @@ -71126,24 +72821,11 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3330 -HOSTCXXFLAGS = -O2
3331 +HOSTCFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks
3332 +HOSTCFLAGS += $(call cc-option, -Wno-empty-body)
3333 -+HOSTCXXFLAGS = -O2 -fno-delete-null-pointer-checks
3334 ++HOSTCXXFLAGS = -O2 -Wall -W -fno-delete-null-pointer-checks
3335
3336 # Decide whether to build built-in, modular, or both.
3337 # Normally, just do built-in.
3338 -@@ -342,10 +343,12 @@ LINUXINCLUDE := -Iinclude \
3339 - KBUILD_CPPFLAGS := -D__KERNEL__
3340 -
3341 - KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
3342 -+ -W -Wno-unused-parameter -Wno-missing-field-initializers \
3343 - -fno-strict-aliasing -fno-common \
3344 - -Werror-implicit-function-declaration \
3345 - -Wno-format-security \
3346 - -fno-delete-null-pointer-checks
3347 -+KBUILD_CFLAGS += $(call cc-option, -Wno-empty-body)
3348 - KBUILD_AFLAGS := -D__ASSEMBLY__
3349 -
3350 - # Read KERNELRELEASE from include/config/kernel.release (if it exists)
3351 -@@ -376,8 +379,8 @@ export RCS_TAR_IGNORE := --exclude SCCS
3352 +@@ -376,8 +377,8 @@ export RCS_TAR_IGNORE := --exclude SCCS
3353 # Rules shared between *config targets and build targets
3354
3355 # Basic helpers built in scripts/
3356 @@ -71154,7 +72836,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3357 $(Q)$(MAKE) $(build)=scripts/basic
3358
3359 # To avoid any implicit rule to kick in, define an empty command.
3360 -@@ -403,7 +406,7 @@ endif
3361 +@@ -403,7 +404,7 @@ endif
3362 # of make so .config is not included in this case either (for *config).
3363
3364 no-dot-config-targets := clean mrproper distclean \
3365 @@ -71163,14 +72845,15 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3366 include/linux/version.h headers_% \
3367 kernelrelease kernelversion
3368
3369 -@@ -526,6 +529,36 @@ else
3370 +@@ -526,6 +527,37 @@ else
3371 KBUILD_CFLAGS += -O2
3372 endif
3373
3374 +ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(HOSTCC)" "$(CC)"), y)
3375 +CONSTIFY_PLUGIN := -fplugin=$(objtree)/tools/gcc/constify_plugin.so -DCONSTIFY_PLUGIN
3376 +ifdef CONFIG_PAX_MEMORY_STACKLEAK
3377 -+STACKLEAK_PLUGIN := -fplugin=$(objtree)/tools/gcc/stackleak_plugin.so -fplugin-arg-stackleak_plugin-track-lowest-sp=100
3378 ++STACKLEAK_PLUGIN := -fplugin=$(objtree)/tools/gcc/stackleak_plugin.so -DSTACKLEAK_PLUGIN
3379 ++STACKLEAK_PLUGIN += -fplugin-arg-stackleak_plugin-track-lowest-sp=100
3380 +endif
3381 +ifdef CONFIG_KALLOCSTAT_PLUGIN
3382 +KALLOCSTAT_PLUGIN := -fplugin=$(objtree)/tools/gcc/kallocstat_plugin.so
3383 @@ -71200,7 +72883,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3384 include $(srctree)/arch/$(SRCARCH)/Makefile
3385
3386 ifneq ($(CONFIG_FRAME_WARN),0)
3387 -@@ -644,7 +677,7 @@ export mod_strip_cmd
3388 +@@ -644,7 +676,7 @@ export mod_strip_cmd
3389
3390
3391 ifeq ($(KBUILD_EXTMOD),)
3392 @@ -71209,7 +72892,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3393
3394 vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
3395 $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
3396 -@@ -865,6 +898,7 @@ vmlinux.o: $(modpost-init) $(vmlinux-mai
3397 +@@ -865,6 +897,7 @@ vmlinux.o: $(modpost-init) $(vmlinux-mai
3398
3399 # The actual objects are generated when descending,
3400 # make sure no implicit rule kicks in
3401 @@ -71217,7 +72900,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3402 $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
3403
3404 # Handle descending into subdirectories listed in $(vmlinux-dirs)
3405 -@@ -874,7 +908,7 @@ $(sort $(vmlinux-init) $(vmlinux-main))
3406 +@@ -874,7 +907,7 @@ $(sort $(vmlinux-init) $(vmlinux-main))
3407 # Error messages still appears in the original language
3408
3409 PHONY += $(vmlinux-dirs)
3410 @@ -71226,7 +72909,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3411 $(Q)$(MAKE) $(build)=$@
3412
3413 # Build the kernel release string
3414 -@@ -983,6 +1017,7 @@ prepare0: archprepare FORCE
3415 +@@ -983,6 +1016,7 @@ prepare0: archprepare FORCE
3416 $(Q)$(MAKE) $(build)=. missing-syscalls
3417
3418 # All the preparing..
3419 @@ -71234,7 +72917,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3420 prepare: prepare0
3421
3422 # The asm symlink changes when $(ARCH) changes.
3423 -@@ -1124,6 +1159,7 @@ all: modules
3424 +@@ -1124,6 +1158,7 @@ all: modules
3425 # using awk while concatenating to the final file.
3426
3427 PHONY += modules
3428 @@ -71242,7 +72925,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3429 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
3430 $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
3431 @$(kecho) ' Building modules, stage 2.';
3432 -@@ -1133,7 +1169,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_B
3433 +@@ -1133,7 +1168,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_B
3434
3435 # Target to prepare building external modules
3436 PHONY += modules_prepare
3437 @@ -71251,7 +72934,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3438
3439 # Target to install modules
3440 PHONY += modules_install
3441 -@@ -1198,7 +1234,7 @@ MRPROPER_FILES += .config .config.old in
3442 +@@ -1198,7 +1233,7 @@ MRPROPER_FILES += .config .config.old in
3443 include/linux/autoconf.h include/linux/version.h \
3444 include/linux/utsrelease.h \
3445 include/linux/bounds.h include/asm*/asm-offsets.h \
3446 @@ -71260,7 +72943,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3447
3448 # clean - Delete most, but leave enough to build external modules
3449 #
3450 -@@ -1242,7 +1278,7 @@ distclean: mrproper
3451 +@@ -1242,7 +1277,7 @@ distclean: mrproper
3452 @find $(srctree) $(RCS_FIND_IGNORE) \
3453 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
3454 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
3455 @@ -71269,7 +72952,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3456 -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
3457 -type f -print | xargs rm -f
3458
3459 -@@ -1289,6 +1325,7 @@ help:
3460 +@@ -1289,6 +1324,7 @@ help:
3461 @echo ' modules_prepare - Set up for building external modules'
3462 @echo ' tags/TAGS - Generate tags file for editors'
3463 @echo ' cscope - Generate cscope index'
3464 @@ -71277,7 +72960,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3465 @echo ' kernelrelease - Output the release version string'
3466 @echo ' kernelversion - Output the version stored in Makefile'
3467 @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
3468 -@@ -1390,6 +1427,7 @@ PHONY += $(module-dirs) modules
3469 +@@ -1390,6 +1426,7 @@ PHONY += $(module-dirs) modules
3470 $(module-dirs): crmodverdir $(objtree)/Module.symvers
3471 $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
3472
3473 @@ -71285,7 +72968,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3474 modules: $(module-dirs)
3475 @$(kecho) ' Building modules, stage 2.';
3476 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
3477 -@@ -1445,7 +1483,7 @@ endif # KBUILD_EXTMOD
3478 +@@ -1445,7 +1482,7 @@ endif # KBUILD_EXTMOD
3479 quiet_cmd_tags = GEN $@
3480 cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
3481
3482 @@ -71294,7 +72977,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3483 $(call cmd,tags)
3484
3485 # Scripts to check various things for consistency
3486 -@@ -1510,17 +1548,19 @@ else
3487 +@@ -1510,17 +1547,19 @@ else
3488 target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
3489 endif
3490
3491 @@ -71318,7 +73001,7 @@ diff -urNp linux-2.6.32.48/Makefile linux-2.6.32.48/Makefile
3492 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
3493 %.symtypes: %.c prepare scripts FORCE
3494 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
3495 -@@ -1530,11 +1570,13 @@ endif
3496 +@@ -1530,11 +1569,13 @@ endif
3497 $(cmd_crmodverdir)
3498 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
3499 $(build)=$(build-dir)
3500 @@ -74197,7 +75880,7 @@ diff -urNp linux-2.6.32.48/mm/shmem.c linux-2.6.32.48/mm/shmem.c
3501
3502 diff -urNp linux-2.6.32.48/mm/slab.c linux-2.6.32.48/mm/slab.c
3503 --- linux-2.6.32.48/mm/slab.c 2011-11-08 19:02:43.000000000 -0500
3504 -+++ linux-2.6.32.48/mm/slab.c 2011-11-15 19:59:43.000000000 -0500
3505 ++++ linux-2.6.32.48/mm/slab.c 2011-11-18 18:01:52.000000000 -0500
3506 @@ -174,7 +174,7 @@
3507
3508 /* Legal flag mask for kmem_cache_create(). */
3509 @@ -74291,7 +75974,7 @@ diff -urNp linux-2.6.32.48/mm/slab.c linux-2.6.32.48/mm/slab.c
3510
3511 seq_printf(m, " : cpustat %6lu %6lu %6lu %6lu",
3512 allochit, allocmiss, freehit, freemiss);
3513 -@@ -4471,15 +4471,66 @@ static const struct file_operations proc
3514 +@@ -4471,15 +4471,70 @@ static const struct file_operations proc
3515
3516 static int __init slab_proc_init(void)
3517 {
3518 @@ -74321,10 +76004,12 @@ diff -urNp linux-2.6.32.48/mm/slab.c linux-2.6.32.48/mm/slab.c
3519 + struct slab *slabp;
3520 + unsigned int objnr;
3521 + unsigned long offset;
3522 ++ const char *type;
3523 +
3524 + if (!n)
3525 + return;
3526 +
3527 ++ type = "<null>";
3528 + if (ZERO_OR_NULL_PTR(ptr))
3529 + goto report;
3530 +
3531 @@ -74333,6 +76018,7 @@ diff -urNp linux-2.6.32.48/mm/slab.c linux-2.6.32.48/mm/slab.c
3532 +
3533 + page = virt_to_head_page(ptr);
3534 +
3535 ++ type = "<process stack>";
3536 + if (!PageSlab(page)) {
3537 + if (object_is_on_stack(ptr, n) == -1)
3538 + goto report;
3539 @@ -74340,6 +76026,7 @@ diff -urNp linux-2.6.32.48/mm/slab.c linux-2.6.32.48/mm/slab.c
3540 + }
3541 +
3542 + cachep = page_get_cache(page);
3543 ++ type = cachep->name;
3544 + if (!(cachep->flags & SLAB_USERCOPY))
3545 + goto report;
3546 +
3547 @@ -74351,7 +76038,7 @@ diff -urNp linux-2.6.32.48/mm/slab.c linux-2.6.32.48/mm/slab.c
3548 + return;
3549 +
3550 +report:
3551 -+ pax_report_usercopy(ptr, n, to, cachep ? cachep->name : NULL);
3552 ++ pax_report_usercopy(ptr, n, to, type);
3553 +#endif
3554 +
3555 +}
3556 @@ -74362,7 +76049,7 @@ diff -urNp linux-2.6.32.48/mm/slab.c linux-2.6.32.48/mm/slab.c
3557 * @objp: Pointer to the object
3558 diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3559 --- linux-2.6.32.48/mm/slob.c 2011-11-08 19:02:43.000000000 -0500
3560 -+++ linux-2.6.32.48/mm/slob.c 2011-11-15 19:59:43.000000000 -0500
3561 ++++ linux-2.6.32.48/mm/slob.c 2011-11-18 18:01:52.000000000 -0500
3562 @@ -29,7 +29,7 @@
3563 * If kmalloc is asked for objects of PAGE_SIZE or larger, it calls
3564 * alloc_pages() directly, allocating compound pages so the page order
3565 @@ -74511,7 +76198,7 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3566 return ret;
3567 }
3568 EXPORT_SYMBOL(__kmalloc_node);
3569 -@@ -528,13 +542,88 @@ void kfree(const void *block)
3570 +@@ -528,13 +542,92 @@ void kfree(const void *block)
3571 sp = slob_page(block);
3572 if (is_slob_page(sp)) {
3573 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
3574 @@ -74537,16 +76224,19 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3575 + const slob_t *free;
3576 + const void *base;
3577 + unsigned long flags;
3578 ++ const char *type;
3579 +
3580 + if (!n)
3581 + return;
3582 +
3583 ++ type = "<null>";
3584 + if (ZERO_OR_NULL_PTR(ptr))
3585 + goto report;
3586 +
3587 + if (!virt_addr_valid(ptr))
3588 + return;
3589 +
3590 ++ type = "<process stack>";
3591 + sp = slob_page(ptr);
3592 + if (!PageSlab((struct page*)sp)) {
3593 + if (object_is_on_stack(ptr, n) == -1)
3594 @@ -74554,6 +76244,7 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3595 + return;
3596 + }
3597 +
3598 ++ type = "<slob>";
3599 + if (sp->size) {
3600 + base = page_address(&sp->page);
3601 + if (base <= ptr && n <= sp->size - (ptr - base))
3602 @@ -74594,7 +76285,7 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3603 +
3604 + spin_unlock_irqrestore(&slob_lock, flags);
3605 +report:
3606 -+ pax_report_usercopy(ptr, n, to, NULL);
3607 ++ pax_report_usercopy(ptr, n, to, type);
3608 +#endif
3609 +
3610 +}
3611 @@ -74603,7 +76294,7 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3612 /* can't use ksize for kmem_cache_alloc memory, only kmalloc */
3613 size_t ksize(const void *block)
3614 {
3615 -@@ -547,10 +636,10 @@ size_t ksize(const void *block)
3616 +@@ -547,10 +640,10 @@ size_t ksize(const void *block)
3617 sp = slob_page(block);
3618 if (is_slob_page(sp)) {
3619 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
3620 @@ -74617,7 +76308,7 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3621 }
3622 EXPORT_SYMBOL(ksize);
3623
3624 -@@ -566,8 +655,13 @@ struct kmem_cache *kmem_cache_create(con
3625 +@@ -566,8 +659,13 @@ struct kmem_cache *kmem_cache_create(con
3626 {
3627 struct kmem_cache *c;
3628
3629 @@ -74631,7 +76322,7 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3630
3631 if (c) {
3632 c->name = name;
3633 -@@ -605,17 +699,25 @@ void *kmem_cache_alloc_node(struct kmem_
3634 +@@ -605,17 +703,25 @@ void *kmem_cache_alloc_node(struct kmem_
3635 {
3636 void *b;
3637
3638 @@ -74657,7 +76348,7 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3639
3640 if (c->ctor)
3641 c->ctor(b);
3642 -@@ -627,10 +729,16 @@ EXPORT_SYMBOL(kmem_cache_alloc_node);
3643 +@@ -627,10 +733,16 @@ EXPORT_SYMBOL(kmem_cache_alloc_node);
3644
3645 static void __kmem_cache_free(void *b, int size)
3646 {
3647 @@ -74676,7 +76367,7 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3648 }
3649
3650 static void kmem_rcu_free(struct rcu_head *head)
3651 -@@ -643,18 +751,32 @@ static void kmem_rcu_free(struct rcu_hea
3652 +@@ -643,18 +755,32 @@ static void kmem_rcu_free(struct rcu_hea
3653
3654 void kmem_cache_free(struct kmem_cache *c, void *b)
3655 {
3656 @@ -74714,7 +76405,7 @@ diff -urNp linux-2.6.32.48/mm/slob.c linux-2.6.32.48/mm/slob.c
3657
3658 diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3659 --- linux-2.6.32.48/mm/slub.c 2011-11-08 19:02:43.000000000 -0500
3660 -+++ linux-2.6.32.48/mm/slub.c 2011-11-15 19:59:43.000000000 -0500
3661 ++++ linux-2.6.32.48/mm/slub.c 2011-11-18 18:01:52.000000000 -0500
3662 @@ -201,7 +201,7 @@ struct track {
3663
3664 enum track_item { TRACK_ALLOC, TRACK_FREE };
3665 @@ -74785,7 +76476,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3666
3667 /*
3668 * This function is called with IRQs disabled during early-boot on
3669 -@@ -2915,6 +2914,46 @@ void *__kmalloc_node(size_t size, gfp_t
3670 +@@ -2915,6 +2914,50 @@ void *__kmalloc_node(size_t size, gfp_t
3671 EXPORT_SYMBOL(__kmalloc_node);
3672 #endif
3673
3674 @@ -74796,10 +76487,12 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3675 + struct page *page;
3676 + struct kmem_cache *s = NULL;
3677 + unsigned long offset;
3678 ++ const char *type;
3679 +
3680 + if (!n)
3681 + return;
3682 +
3683 ++ type = "<null>";
3684 + if (ZERO_OR_NULL_PTR(ptr))
3685 + goto report;
3686 +
3687 @@ -74808,6 +76501,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3688 +
3689 + page = get_object_page(ptr);
3690 +
3691 ++ type = "<process stack>";
3692 + if (!page) {
3693 + if (object_is_on_stack(ptr, n) == -1)
3694 + goto report;
3695 @@ -74815,6 +76509,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3696 + }
3697 +
3698 + s = page->slab;
3699 ++ type = s->name;
3700 + if (!(s->flags & SLAB_USERCOPY))
3701 + goto report;
3702 +
3703 @@ -74823,7 +76518,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3704 + return;
3705 +
3706 +report:
3707 -+ pax_report_usercopy(ptr, n, to, s ? s->name : NULL);
3708 ++ pax_report_usercopy(ptr, n, to, type);
3709 +#endif
3710 +
3711 +}
3712 @@ -74832,7 +76527,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3713 size_t ksize(const void *object)
3714 {
3715 struct page *page;
3716 -@@ -3185,8 +3224,8 @@ void __init kmem_cache_init(void)
3717 +@@ -3185,8 +3228,8 @@ void __init kmem_cache_init(void)
3718 * kmem_cache_open for slab_state == DOWN.
3719 */
3720 create_kmalloc_cache(&kmalloc_caches[0], "kmem_cache_node",
3721 @@ -74843,7 +76538,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3722 caches++;
3723
3724 hotplug_memory_notifier(slab_memory_callback, SLAB_CALLBACK_PRI);
3725 -@@ -3198,18 +3237,18 @@ void __init kmem_cache_init(void)
3726 +@@ -3198,18 +3241,18 @@ void __init kmem_cache_init(void)
3727 /* Caches that are not of the two-to-the-power-of size */
3728 if (KMALLOC_MIN_SIZE <= 32) {
3729 create_kmalloc_cache(&kmalloc_caches[1],
3730 @@ -74865,7 +76560,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3731 caches++;
3732 }
3733
3734 -@@ -3293,7 +3332,7 @@ static int slab_unmergeable(struct kmem_
3735 +@@ -3293,7 +3336,7 @@ static int slab_unmergeable(struct kmem_
3736 /*
3737 * We may have set a slab to be unmergeable during bootstrap.
3738 */
3739 @@ -74874,7 +76569,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3740 return 1;
3741
3742 return 0;
3743 -@@ -3353,7 +3392,7 @@ struct kmem_cache *kmem_cache_create(con
3744 +@@ -3353,7 +3396,7 @@ struct kmem_cache *kmem_cache_create(con
3745 if (s) {
3746 int cpu;
3747
3748 @@ -74883,7 +76578,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3749 /*
3750 * Adjust the object sizes so that we clear
3751 * the complete object on kzalloc.
3752 -@@ -3372,7 +3411,7 @@ struct kmem_cache *kmem_cache_create(con
3753 +@@ -3372,7 +3415,7 @@ struct kmem_cache *kmem_cache_create(con
3754
3755 if (sysfs_slab_alias(s, name)) {
3756 down_write(&slub_lock);
3757 @@ -74892,7 +76587,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3758 up_write(&slub_lock);
3759 goto err;
3760 }
3761 -@@ -4101,7 +4140,7 @@ SLAB_ATTR_RO(ctor);
3762 +@@ -4101,7 +4144,7 @@ SLAB_ATTR_RO(ctor);
3763
3764 static ssize_t aliases_show(struct kmem_cache *s, char *buf)
3765 {
3766 @@ -74901,7 +76596,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3767 }
3768 SLAB_ATTR_RO(aliases);
3769
3770 -@@ -4503,7 +4542,7 @@ static void kmem_cache_release(struct ko
3771 +@@ -4503,7 +4546,7 @@ static void kmem_cache_release(struct ko
3772 kfree(s);
3773 }
3774
3775 @@ -74910,7 +76605,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3776 .show = slab_attr_show,
3777 .store = slab_attr_store,
3778 };
3779 -@@ -4522,7 +4561,7 @@ static int uevent_filter(struct kset *ks
3780 +@@ -4522,7 +4565,7 @@ static int uevent_filter(struct kset *ks
3781 return 0;
3782 }
3783
3784 @@ -74919,7 +76614,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3785 .filter = uevent_filter,
3786 };
3787
3788 -@@ -4564,6 +4603,7 @@ static char *create_unique_id(struct kme
3789 +@@ -4564,6 +4607,7 @@ static char *create_unique_id(struct kme
3790 return name;
3791 }
3792
3793 @@ -74927,7 +76622,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3794 static int sysfs_slab_add(struct kmem_cache *s)
3795 {
3796 int err;
3797 -@@ -4619,6 +4659,7 @@ static void sysfs_slab_remove(struct kme
3798 +@@ -4619,6 +4663,7 @@ static void sysfs_slab_remove(struct kme
3799 kobject_del(&s->kobj);
3800 kobject_put(&s->kobj);
3801 }
3802 @@ -74935,7 +76630,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3803
3804 /*
3805 * Need to buffer aliases during bootup until sysfs becomes
3806 -@@ -4632,6 +4673,7 @@ struct saved_alias {
3807 +@@ -4632,6 +4677,7 @@ struct saved_alias {
3808
3809 static struct saved_alias *alias_list;
3810
3811 @@ -74943,7 +76638,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3812 static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
3813 {
3814 struct saved_alias *al;
3815 -@@ -4654,6 +4696,7 @@ static int sysfs_slab_alias(struct kmem_
3816 +@@ -4654,6 +4700,7 @@ static int sysfs_slab_alias(struct kmem_
3817 alias_list = al;
3818 return 0;
3819 }
3820 @@ -74951,7 +76646,7 @@ diff -urNp linux-2.6.32.48/mm/slub.c linux-2.6.32.48/mm/slub.c
3821
3822 static int __init slab_sysfs_init(void)
3823 {
3824 -@@ -4785,7 +4828,13 @@ static const struct file_operations proc
3825 +@@ -4785,7 +4832,13 @@ static const struct file_operations proc
3826
3827 static int __init slab_proc_init(void)
3828 {
3829 @@ -80939,8 +82634,8 @@ diff -urNp linux-2.6.32.48/sound/usb/usbaudio.c linux-2.6.32.48/sound/usb/usbaud
3830 }
3831 diff -urNp linux-2.6.32.48/tools/gcc/checker_plugin.c linux-2.6.32.48/tools/gcc/checker_plugin.c
3832 --- linux-2.6.32.48/tools/gcc/checker_plugin.c 1969-12-31 19:00:00.000000000 -0500
3833 -+++ linux-2.6.32.48/tools/gcc/checker_plugin.c 2011-11-15 19:59:43.000000000 -0500
3834 -@@ -0,0 +1,169 @@
3835 ++++ linux-2.6.32.48/tools/gcc/checker_plugin.c 2011-11-18 18:01:52.000000000 -0500
3836 +@@ -0,0 +1,171 @@
3837 +/*
3838 + * Copyright 2011 by the PaX Team <pageexec@××××××××.hu>
3839 + * Licensed under the GPL v2
3840 @@ -80964,17 +82659,19 @@ diff -urNp linux-2.6.32.48/tools/gcc/checker_plugin.c linux-2.6.32.48/tools/gcc/
3841 +#include "coretypes.h"
3842 +#include "tree.h"
3843 +#include "tree-pass.h"
3844 ++#include "flags.h"
3845 +#include "intl.h"
3846 ++#include "toplev.h"
3847 ++#include "plugin.h"
3848 ++//#include "expr.h" where are you...
3849 ++#include "diagnostic.h"
3850 +#include "plugin-version.h"
3851 +#include "tm.h"
3852 -+#include "toplev.h"
3853 ++#include "function.h"
3854 +#include "basic-block.h"
3855 +#include "gimple.h"
3856 -+//#include "expr.h" where are you...
3857 -+#include "diagnostic.h"
3858 +#include "rtl.h"
3859 +#include "emit-rtl.h"
3860 -+#include "function.h"
3861 +#include "tree-flow.h"
3862 +#include "target.h"
3863 +
3864 @@ -80991,7 +82688,7 @@ diff -urNp linux-2.6.32.48/tools/gcc/checker_plugin.c linux-2.6.32.48/tools/gcc/
3865 +int plugin_is_GPL_compatible;
3866 +
3867 +static struct plugin_info checker_plugin_info = {
3868 -+ .version = "201110031940",
3869 ++ .version = "201111150100",
3870 +};
3871 +
3872 +#define ADDR_SPACE_KERNEL 0
3873 @@ -81112,8 +82809,8 @@ diff -urNp linux-2.6.32.48/tools/gcc/checker_plugin.c linux-2.6.32.48/tools/gcc/
3874 +}
3875 diff -urNp linux-2.6.32.48/tools/gcc/constify_plugin.c linux-2.6.32.48/tools/gcc/constify_plugin.c
3876 --- linux-2.6.32.48/tools/gcc/constify_plugin.c 1969-12-31 19:00:00.000000000 -0500
3877 -+++ linux-2.6.32.48/tools/gcc/constify_plugin.c 2011-11-15 19:59:43.000000000 -0500
3878 -@@ -0,0 +1,293 @@
3879 ++++ linux-2.6.32.48/tools/gcc/constify_plugin.c 2011-11-18 18:01:52.000000000 -0500
3880 +@@ -0,0 +1,303 @@
3881 +/*
3882 + * Copyright 2011 by Emese Revfy <re.emese@×××××.com>
3883 + * Copyright 2011 by PaX Team <pageexec@××××××××.hu>
3884 @@ -81135,22 +82832,26 @@ diff -urNp linux-2.6.32.48/tools/gcc/constify_plugin.c linux-2.6.32.48/tools/gcc
3885 +#include "coretypes.h"
3886 +#include "tree.h"
3887 +#include "tree-pass.h"
3888 ++#include "flags.h"
3889 +#include "intl.h"
3890 ++#include "toplev.h"
3891 ++#include "plugin.h"
3892 ++#include "diagnostic.h"
3893 +#include "plugin-version.h"
3894 +#include "tm.h"
3895 -+#include "toplev.h"
3896 +#include "function.h"
3897 ++#include "basic-block.h"
3898 ++#include "gimple.h"
3899 ++#include "rtl.h"
3900 ++#include "emit-rtl.h"
3901 +#include "tree-flow.h"
3902 -+#include "plugin.h"
3903 -+#include "diagnostic.h"
3904 -+//#include "c-tree.h"
3905 +
3906 +#define C_TYPE_FIELDS_READONLY(TYPE) TREE_LANG_FLAG_1(TYPE)
3907 +
3908 +int plugin_is_GPL_compatible;
3909 +
3910 +static struct plugin_info const_plugin_info = {
3911 -+ .version = "20110826",
3912 ++ .version = "201111150100",
3913 + .help = "no-constify\tturn off constification\n",
3914 +};
3915 +
3916 @@ -81244,7 +82945,10 @@ diff -urNp linux-2.6.32.48/tools/gcc/constify_plugin.c linux-2.6.32.48/tools/gcc
3917 + .decl_required = false,
3918 + .type_required = false,
3919 + .function_type_required = false,
3920 -+ .handler = handle_no_const_attribute
3921 ++ .handler = handle_no_const_attribute,
3922 ++#if __GNUC__ > 4 || __GNUC_MINOR__ >= 7
3923 ++ .affects_type_identity = true
3924 ++#endif
3925 +};
3926 +
3927 +static struct attribute_spec do_const_attr = {
3928 @@ -81254,7 +82958,10 @@ diff -urNp linux-2.6.32.48/tools/gcc/constify_plugin.c linux-2.6.32.48/tools/gcc
3929 + .decl_required = false,
3930 + .type_required = false,
3931 + .function_type_required = false,
3932 -+ .handler = handle_do_const_attribute
3933 ++ .handler = handle_do_const_attribute,
3934 ++#if __GNUC__ > 4 || __GNUC_MINOR__ >= 7
3935 ++ .affects_type_identity = true
3936 ++#endif
3937 +};
3938 +
3939 +static void register_attributes(void *event_data, void *data)
3940 @@ -81409,8 +83116,8 @@ diff -urNp linux-2.6.32.48/tools/gcc/constify_plugin.c linux-2.6.32.48/tools/gcc
3941 +}
3942 diff -urNp linux-2.6.32.48/tools/gcc/kallocstat_plugin.c linux-2.6.32.48/tools/gcc/kallocstat_plugin.c
3943 --- linux-2.6.32.48/tools/gcc/kallocstat_plugin.c 1969-12-31 19:00:00.000000000 -0500
3944 -+++ linux-2.6.32.48/tools/gcc/kallocstat_plugin.c 2011-11-15 19:59:43.000000000 -0500
3945 -@@ -0,0 +1,165 @@
3946 ++++ linux-2.6.32.48/tools/gcc/kallocstat_plugin.c 2011-11-18 18:01:52.000000000 -0500
3947 +@@ -0,0 +1,167 @@
3948 +/*
3949 + * Copyright 2011 by the PaX Team <pageexec@××××××××.hu>
3950 + * Licensed under the GPL v2
3951 @@ -81433,17 +83140,19 @@ diff -urNp linux-2.6.32.48/tools/gcc/kallocstat_plugin.c linux-2.6.32.48/tools/g
3952 +#include "coretypes.h"
3953 +#include "tree.h"
3954 +#include "tree-pass.h"
3955 ++#include "flags.h"
3956 +#include "intl.h"
3957 ++#include "toplev.h"
3958 ++#include "plugin.h"
3959 ++//#include "expr.h" where are you...
3960 ++#include "diagnostic.h"
3961 +#include "plugin-version.h"
3962 +#include "tm.h"
3963 -+#include "toplev.h"
3964 ++#include "function.h"
3965 +#include "basic-block.h"
3966 +#include "gimple.h"
3967 -+//#include "expr.h" where are you...
3968 -+#include "diagnostic.h"
3969 +#include "rtl.h"
3970 +#include "emit-rtl.h"
3971 -+#include "function.h"
3972 +
3973 +extern void print_gimple_stmt(FILE *, gimple, int, int);
3974 +
3975 @@ -81462,7 +83171,7 @@ diff -urNp linux-2.6.32.48/tools/gcc/kallocstat_plugin.c linux-2.6.32.48/tools/g
3976 +};
3977 +
3978 +static struct plugin_info kallocstat_plugin_info = {
3979 -+ .version = "201109121100",
3980 ++ .version = "201111150100",
3981 +};
3982 +
3983 +static unsigned int execute_kallocstat(void);
3984 @@ -81578,8 +83287,8 @@ diff -urNp linux-2.6.32.48/tools/gcc/kallocstat_plugin.c linux-2.6.32.48/tools/g
3985 +}
3986 diff -urNp linux-2.6.32.48/tools/gcc/kernexec_plugin.c linux-2.6.32.48/tools/gcc/kernexec_plugin.c
3987 --- linux-2.6.32.48/tools/gcc/kernexec_plugin.c 1969-12-31 19:00:00.000000000 -0500
3988 -+++ linux-2.6.32.48/tools/gcc/kernexec_plugin.c 2011-11-15 19:59:43.000000000 -0500
3989 -@@ -0,0 +1,273 @@
3990 ++++ linux-2.6.32.48/tools/gcc/kernexec_plugin.c 2011-11-18 18:01:52.000000000 -0500
3991 +@@ -0,0 +1,275 @@
3992 +/*
3993 + * Copyright 2011 by the PaX Team <pageexec@××××××××.hu>
3994 + * Licensed under the GPL v2
3995 @@ -81602,17 +83311,19 @@ diff -urNp linux-2.6.32.48/tools/gcc/kernexec_plugin.c linux-2.6.32.48/tools/gcc
3996 +#include "coretypes.h"
3997 +#include "tree.h"
3998 +#include "tree-pass.h"
3999 ++#include "flags.h"
4000 +#include "intl.h"
4001 ++#include "toplev.h"
4002 ++#include "plugin.h"
4003 ++//#include "expr.h" where are you...
4004 ++#include "diagnostic.h"
4005 +#include "plugin-version.h"
4006 +#include "tm.h"
4007 -+#include "toplev.h"
4008 ++#include "function.h"
4009 +#include "basic-block.h"
4010 +#include "gimple.h"
4011 -+//#include "expr.h" where are you...
4012 -+#include "diagnostic.h"
4013 +#include "rtl.h"
4014 +#include "emit-rtl.h"
4015 -+#include "function.h"
4016 +#include "tree-flow.h"
4017 +
4018 +extern void print_gimple_stmt(FILE *, gimple, int, int);
4019 @@ -81621,7 +83332,7 @@ diff -urNp linux-2.6.32.48/tools/gcc/kernexec_plugin.c linux-2.6.32.48/tools/gcc
4020 +int plugin_is_GPL_compatible;
4021 +
4022 +static struct plugin_info kernexec_plugin_info = {
4023 -+ .version = "201110032145",
4024 ++ .version = "201111150100",
4025 +};
4026 +
4027 +static unsigned int execute_kernexec_fptr(void);
4028 @@ -81671,7 +83382,7 @@ diff -urNp linux-2.6.32.48/tools/gcc/kernexec_plugin.c linux-2.6.32.48/tools/gcc
4029 + if (ix86_cmodel != CM_KERNEL)
4030 + return false;
4031 +
4032 -+ section = lookup_attribute("__section__", DECL_ATTRIBUTES(current_function_decl));
4033 ++ section = lookup_attribute("section", DECL_ATTRIBUTES(current_function_decl));
4034 + if (!section || !TREE_VALUE(section))
4035 + return true;
4036 +
4037 @@ -81782,7 +83493,7 @@ diff -urNp linux-2.6.32.48/tools/gcc/kernexec_plugin.c linux-2.6.32.48/tools/gcc
4038 + line = expand_location(RTL_LOCATION(insn)).line;
4039 + btsq = gen_rtx_ASM_OPERANDS(VOIDmode, "btsq $63,(%%rsp)", empty_string, 0, argvec, constraintvec, labelvec, line);
4040 + MEM_VOLATILE_P(btsq) = 1;
4041 -+ RTX_FRAME_RELATED_P(btsq) = 1;
4042 ++// RTX_FRAME_RELATED_P(btsq) = 1; // not for ASM_OPERANDS
4043 + emit_insn_before(btsq, insn);
4044 +}
4045 +
4046 @@ -81855,12 +83566,12 @@ diff -urNp linux-2.6.32.48/tools/gcc/kernexec_plugin.c linux-2.6.32.48/tools/gcc
4047 +}
4048 diff -urNp linux-2.6.32.48/tools/gcc/Makefile linux-2.6.32.48/tools/gcc/Makefile
4049 --- linux-2.6.32.48/tools/gcc/Makefile 1969-12-31 19:00:00.000000000 -0500
4050 -+++ linux-2.6.32.48/tools/gcc/Makefile 2011-11-15 19:59:43.000000000 -0500
4051 ++++ linux-2.6.32.48/tools/gcc/Makefile 2011-11-18 18:08:04.000000000 -0500
4052 @@ -0,0 +1,21 @@
4053 +#CC := gcc
4054 +#PLUGIN_SOURCE_FILES := pax_plugin.c
4055 +#PLUGIN_OBJECT_FILES := $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
4056 -+GCCPLUGINS_DIR := $(shell $(HOSTCC) -print-file-name=plugin)
4057 ++GCCPLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
4058 +#CFLAGS += -I$(GCCPLUGINS_DIR)/include -fPIC -O2 -Wall -W
4059 +
4060 +HOST_EXTRACFLAGS += -I$(GCCPLUGINS_DIR)/include
4061 @@ -81873,15 +83584,15 @@ diff -urNp linux-2.6.32.48/tools/gcc/Makefile linux-2.6.32.48/tools/gcc/Makefile
4062 +
4063 +always := $(hostlibs-y)
4064 +
4065 -+stackleak_plugin-objs := stackleak_plugin.o
4066 +constify_plugin-objs := constify_plugin.o
4067 ++stackleak_plugin-objs := stackleak_plugin.o
4068 +kallocstat_plugin-objs := kallocstat_plugin.o
4069 +kernexec_plugin-objs := kernexec_plugin.o
4070 +checker_plugin-objs := checker_plugin.o
4071 diff -urNp linux-2.6.32.48/tools/gcc/stackleak_plugin.c linux-2.6.32.48/tools/gcc/stackleak_plugin.c
4072 --- linux-2.6.32.48/tools/gcc/stackleak_plugin.c 1969-12-31 19:00:00.000000000 -0500
4073 -+++ linux-2.6.32.48/tools/gcc/stackleak_plugin.c 2011-11-15 19:59:43.000000000 -0500
4074 -@@ -0,0 +1,251 @@
4075 ++++ linux-2.6.32.48/tools/gcc/stackleak_plugin.c 2011-11-18 18:01:52.000000000 -0500
4076 +@@ -0,0 +1,291 @@
4077 +/*
4078 + * Copyright 2011 by the PaX Team <pageexec@××××××××.hu>
4079 + * Licensed under the GPL v2
4080 @@ -81907,26 +83618,31 @@ diff -urNp linux-2.6.32.48/tools/gcc/stackleak_plugin.c linux-2.6.32.48/tools/gc
4081 +#include "coretypes.h"
4082 +#include "tree.h"
4083 +#include "tree-pass.h"
4084 ++#include "flags.h"
4085 +#include "intl.h"
4086 ++#include "toplev.h"
4087 ++#include "plugin.h"
4088 ++//#include "expr.h" where are you...
4089 ++#include "diagnostic.h"
4090 +#include "plugin-version.h"
4091 +#include "tm.h"
4092 -+#include "toplev.h"
4093 ++#include "function.h"
4094 +#include "basic-block.h"
4095 +#include "gimple.h"
4096 -+//#include "expr.h" where are you...
4097 -+#include "diagnostic.h"
4098 +#include "rtl.h"
4099 +#include "emit-rtl.h"
4100 -+#include "function.h"
4101 ++
4102 ++extern void print_gimple_stmt(FILE *, gimple, int, int);
4103 +
4104 +int plugin_is_GPL_compatible;
4105 +
4106 +static int track_frame_size = -1;
4107 +static const char track_function[] = "pax_track_stack";
4108 ++static const char check_function[] = "pax_check_alloca";
4109 +static bool init_locals;
4110 +
4111 +static struct plugin_info stackleak_plugin_info = {
4112 -+ .version = "201109112100",
4113 ++ .version = "201111150100",
4114 + .help = "track-lowest-sp=nn\ttrack sp in functions whose frame size is at least nn bytes\n"
4115 +// "initialize-locals\t\tforcibly initialize all stack frames\n"
4116 +};
4117 @@ -81949,7 +83665,7 @@ diff -urNp linux-2.6.32.48/tools/gcc/stackleak_plugin.c linux-2.6.32.48/tools/gc
4118 + .properties_provided = 0,
4119 + .properties_destroyed = 0,
4120 + .todo_flags_start = 0, //TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts,
4121 -+ .todo_flags_finish = TODO_verify_stmts | TODO_dump_func
4122 ++ .todo_flags_finish = TODO_verify_ssa | TODO_verify_stmts | TODO_dump_func | TODO_update_ssa
4123 + }
4124 +};
4125 +
4126 @@ -81976,63 +83692,94 @@ diff -urNp linux-2.6.32.48/tools/gcc/stackleak_plugin.c linux-2.6.32.48/tools/gc
4127 + return track_frame_size >= 0;
4128 +}
4129 +
4130 -+static void stackleak_add_instrumentation(gimple_stmt_iterator *gsi, bool before)
4131 ++static void stackleak_check_alloca(gimple_stmt_iterator gsi)
4132 +{
4133 -+ gimple call;
4134 -+ tree fndecl, type;
4135 ++ gimple check_alloca;
4136 ++ tree fndecl, fntype, alloca_size;
4137 ++
4138 ++ // insert call to void pax_check_alloca(unsigned long size)
4139 ++ fntype = build_function_type_list(void_type_node, long_unsigned_type_node, NULL_TREE);
4140 ++ fndecl = build_fn_decl(check_function, fntype);
4141 ++ DECL_ASSEMBLER_NAME(fndecl); // for LTO
4142 ++ alloca_size = gimple_call_arg(gsi_stmt(gsi), 0);
4143 ++ check_alloca = gimple_build_call(fndecl, 1, alloca_size);
4144 ++ gsi_insert_before(&gsi, check_alloca, GSI_CONTINUE_LINKING);
4145 ++}
4146 ++
4147 ++static void stackleak_add_instrumentation(gimple_stmt_iterator gsi)
4148 ++{
4149 ++ gimple track_stack;
4150 ++ tree fndecl, fntype;
4151 +
4152 + // insert call to void pax_track_stack(void)
4153 -+ type = build_function_type_list(void_type_node, NULL_TREE);
4154 -+ fndecl = build_fn_decl(track_function, type);
4155 ++ fntype = build_function_type_list(void_type_node, NULL_TREE);
4156 ++ fndecl = build_fn_decl(track_function, fntype);
4157 + DECL_ASSEMBLER_NAME(fndecl); // for LTO
4158 -+ call = gimple_build_call(fndecl, 0);
4159 -+ if (before)
4160 -+ gsi_insert_before(gsi, call, GSI_CONTINUE_LINKING);
4161 -+ else
4162 -+ gsi_insert_after(gsi, call, GSI_CONTINUE_LINKING);
4163 ++ track_stack = gimple_build_call(fndecl, 0);
4164 ++ gsi_insert_after(&gsi, track_stack, GSI_CONTINUE_LINKING);
4165 ++}
4166 ++
4167 ++#if __GNUC__ == 4 && __GNUC_MINOR__ == 5
4168 ++static bool gimple_call_builtin_p(gimple stmt, enum built_in_function code)
4169 ++{
4170 ++ tree fndecl;
4171 ++
4172 ++ if (!is_gimple_call(stmt))
4173 ++ return false;
4174 ++ fndecl = gimple_call_fndecl(stmt);
4175 ++ if (!fndecl)
4176 ++ return false;
4177 ++ if (DECL_BUILT_IN_CLASS(fndecl) != BUILT_IN_NORMAL)
4178 ++ return false;
4179 ++// print_node(stderr, "pax", fndecl, 4);
4180 ++ return DECL_FUNCTION_CODE(fndecl) == code;
4181 ++}
4182 ++#endif
4183 ++
4184 ++static bool is_alloca(gimple stmt)
4185 ++{
4186 ++ if (gimple_call_builtin_p(stmt, BUILT_IN_ALLOCA))
4187 ++ return true;
4188 ++
4189 ++#if __GNUC__ > 4 || __GNUC_MINOR__ >= 7
4190 ++ if (gimple_call_builtin_p(stmt, BUILT_IN_ALLOCA_WITH_ALIGN))
4191 ++ return true;
4192 ++#endif
4193 ++
4194 ++ return false;
4195 +}
4196 +
4197 +static unsigned int execute_stackleak_tree_instrument(void)
4198 +{
4199 + basic_block bb, entry_bb;
4200 -+ gimple_stmt_iterator gsi;
4201 + bool prologue_instrumented = false;
4202 +
4203 + entry_bb = ENTRY_BLOCK_PTR_FOR_FUNCTION(cfun)->next_bb;
4204 +
4205 + // 1. loop through BBs and GIMPLE statements
4206 + FOR_EACH_BB(bb) {
4207 ++ gimple_stmt_iterator gsi;
4208 + for (gsi = gsi_start_bb(bb); !gsi_end_p(gsi); gsi_next(&gsi)) {
4209 + // gimple match: align 8 built-in BUILT_IN_NORMAL:BUILT_IN_ALLOCA attributes <tree_list 0xb7576450>
4210 -+ tree fndecl;
4211 -+ gimple stmt = gsi_stmt(gsi);
4212 -+
4213 -+ if (!is_gimple_call(stmt))
4214 -+ continue;
4215 -+ fndecl = gimple_call_fndecl(stmt);
4216 -+ if (!fndecl)
4217 -+ continue;
4218 -+ if (TREE_CODE(fndecl) != FUNCTION_DECL)
4219 -+ continue;
4220 -+ if (!DECL_BUILT_IN(fndecl))
4221 -+ continue;
4222 -+ if (DECL_BUILT_IN_CLASS(fndecl) != BUILT_IN_NORMAL)
4223 -+ continue;
4224 -+ if (DECL_FUNCTION_CODE(fndecl) != BUILT_IN_ALLOCA)
4225 ++ if (!is_alloca(gsi_stmt(gsi)))
4226 + continue;
4227 +
4228 -+ // 2. insert track call after each __builtin_alloca call
4229 -+ stackleak_add_instrumentation(&gsi, false);
4230 ++ // 2. insert stack overflow check before each __builtin_alloca call
4231 ++ stackleak_check_alloca(gsi);
4232 ++
4233 ++ // 3. insert track call after each __builtin_alloca call
4234 ++ stackleak_add_instrumentation(gsi);
4235 + if (bb == entry_bb)
4236 + prologue_instrumented = true;
4237 -+// print_node(stderr, "pax", fndecl, 4);
4238 + }
4239 + }
4240 +
4241 -+ // 3. insert track call at the beginning
4242 ++ // 4. insert track call at the beginning
4243 + if (!prologue_instrumented) {
4244 -+ gsi = gsi_start_bb(entry_bb);
4245 -+ stackleak_add_instrumentation(&gsi, true);
4246 ++ bb = split_block_after_labels(ENTRY_BLOCK_PTR)->dest;
4247 ++ if (dom_info_available_p(CDI_DOMINATORS))
4248 ++ set_immediate_dominator(CDI_DOMINATORS, bb, ENTRY_BLOCK_PTR);
4249 ++ stackleak_add_instrumentation(gsi_start_bb(bb));
4250 + }
4251 +
4252 + return 0;
4253 @@ -82069,7 +83816,11 @@ diff -urNp linux-2.6.32.48/tools/gcc/stackleak_plugin.c linux-2.6.32.48/tools/gc
4254 + continue;
4255 +// warning(0, "track_frame_size: %d %ld %d", cfun->calls_alloca, get_frame_size(), track_frame_size);
4256 + // 2. delete call
4257 -+ delete_insn_and_edges(insn);
4258 ++ insn = delete_insn_and_edges(insn);
4259 ++#if __GNUC__ > 4 || __GNUC_MINOR__ >= 7
4260 ++ if (GET_CODE(insn) == NOTE && NOTE_KIND(insn) == NOTE_INSN_CALL_ARG_LOCATION)
4261 ++ insn = delete_insn_and_edges(insn);
4262 ++#endif
4263 + }
4264 +
4265 +// print_simple_rtl(stderr, get_insns());
4266
4267 diff --git a/3.1.1/0000_README b/3.1.1/0000_README
4268 index 2f63187..b04fd7b 100644
4269 --- a/3.1.1/0000_README
4270 +++ b/3.1.1/0000_README
4271 @@ -3,7 +3,7 @@ README
4272
4273 Individual Patch Descriptions:
4274 -----------------------------------------------------------------------------
4275 -Patch: 4420_grsecurity-2.2.2-3.1.1-201111171911.patch
4276 +Patch: 4420_grsecurity-2.2.2-3.1.1-201111181902.patch
4277 From: http://www.grsecurity.net
4278 Desc: hardened-sources base patch from upstream grsecurity
4279
4280
4281 diff --git a/3.1.1/4420_grsecurity-2.2.2-3.1.1-201111171911.patch b/3.1.1/4420_grsecurity-2.2.2-3.1.1-201111181902.patch
4282 similarity index 99%
4283 rename from 3.1.1/4420_grsecurity-2.2.2-3.1.1-201111171911.patch
4284 rename to 3.1.1/4420_grsecurity-2.2.2-3.1.1-201111181902.patch
4285 index 0a5ebc1..2b025b8 100644
4286 --- a/3.1.1/4420_grsecurity-2.2.2-3.1.1-201111171911.patch
4287 +++ b/3.1.1/4420_grsecurity-2.2.2-3.1.1-201111181902.patch
4288 @@ -21973,9 +21973,13 @@ diff -urNp linux-3.1.1/arch/x86/mm/tlb.c linux-3.1.1/arch/x86/mm/tlb.c
4289
4290 diff -urNp linux-3.1.1/arch/x86/net/bpf_jit_comp.c linux-3.1.1/arch/x86/net/bpf_jit_comp.c
4291 --- linux-3.1.1/arch/x86/net/bpf_jit_comp.c 2011-11-11 15:19:27.000000000 -0500
4292 -+++ linux-3.1.1/arch/x86/net/bpf_jit_comp.c 2011-11-16 18:39:07.000000000 -0500
4293 -@@ -589,7 +589,9 @@ cond_branch: f_offset = addrs[i + filt
4294 - module_free(NULL, image);
4295 ++++ linux-3.1.1/arch/x86/net/bpf_jit_comp.c 2011-11-18 17:57:33.000000000 -0500
4296 +@@ -586,10 +586,12 @@ cond_branch: f_offset = addrs[i + filt
4297 + if (unlikely(proglen + ilen > oldproglen)) {
4298 + pr_err("bpb_jit_compile fatal error\n");
4299 + kfree(addrs);
4300 +- module_free(NULL, image);
4301 ++ module_free_exec(NULL, image);
4302 return;
4303 }
4304 + pax_open_kernel();
4305 @@ -21993,6 +21997,20 @@ diff -urNp linux-3.1.1/arch/x86/net/bpf_jit_comp.c linux-3.1.1/arch/x86/net/bpf_
4306 proglen,
4307 sizeof(struct work_struct)));
4308 if (!image)
4309 +@@ -637,11 +639,11 @@ out:
4310 +
4311 + static void jit_free_defer(struct work_struct *arg)
4312 + {
4313 +- module_free(NULL, arg);
4314 ++ module_free_exec(NULL, arg);
4315 + }
4316 +
4317 + /* run from softirq, we must use a work_struct to call
4318 +- * module_free() from process context
4319 ++ * module_free_exec() from process context
4320 + */
4321 + void bpf_jit_free(struct sk_filter *fp)
4322 + {
4323 diff -urNp linux-3.1.1/arch/x86/net/bpf_jit.S linux-3.1.1/arch/x86/net/bpf_jit.S
4324 --- linux-3.1.1/arch/x86/net/bpf_jit.S 2011-11-11 15:19:27.000000000 -0500
4325 +++ linux-3.1.1/arch/x86/net/bpf_jit.S 2011-11-16 18:39:07.000000000 -0500
4326 @@ -43824,6 +43842,61 @@ diff -urNp linux-3.1.1/fs/gfs2/inode.c linux-3.1.1/fs/gfs2/inode.c
4327 if (!IS_ERR(s))
4328 kfree(s);
4329 }
4330 +diff -urNp linux-3.1.1/fs/hfs/btree.c linux-3.1.1/fs/hfs/btree.c
4331 +--- linux-3.1.1/fs/hfs/btree.c 2011-11-11 15:19:27.000000000 -0500
4332 ++++ linux-3.1.1/fs/hfs/btree.c 2011-11-18 18:48:11.000000000 -0500
4333 +@@ -46,11 +46,27 @@ struct hfs_btree *hfs_btree_open(struct
4334 + case HFS_EXT_CNID:
4335 + hfs_inode_read_fork(tree->inode, mdb->drXTExtRec, mdb->drXTFlSize,
4336 + mdb->drXTFlSize, be32_to_cpu(mdb->drXTClpSiz));
4337 ++
4338 ++ if (HFS_I(tree->inode)->alloc_blocks >
4339 ++ HFS_I(tree->inode)->first_blocks) {
4340 ++ printk(KERN_ERR "hfs: invalid btree extent records\n");
4341 ++ unlock_new_inode(tree->inode);
4342 ++ goto free_inode;
4343 ++ }
4344 ++
4345 + tree->inode->i_mapping->a_ops = &hfs_btree_aops;
4346 + break;
4347 + case HFS_CAT_CNID:
4348 + hfs_inode_read_fork(tree->inode, mdb->drCTExtRec, mdb->drCTFlSize,
4349 + mdb->drCTFlSize, be32_to_cpu(mdb->drCTClpSiz));
4350 ++
4351 ++ if (!HFS_I(tree->inode)->first_blocks) {
4352 ++ printk(KERN_ERR "hfs: invalid btree extent records "
4353 ++ "(0 size).\n");
4354 ++ unlock_new_inode(tree->inode);
4355 ++ goto free_inode;
4356 ++ }
4357 ++
4358 + tree->inode->i_mapping->a_ops = &hfs_btree_aops;
4359 + break;
4360 + default:
4361 +@@ -59,11 +75,6 @@ struct hfs_btree *hfs_btree_open(struct
4362 + }
4363 + unlock_new_inode(tree->inode);
4364 +
4365 +- if (!HFS_I(tree->inode)->first_blocks) {
4366 +- printk(KERN_ERR "hfs: invalid btree extent records (0 size).\n");
4367 +- goto free_inode;
4368 +- }
4369 +-
4370 + mapping = tree->inode->i_mapping;
4371 + page = read_mapping_page(mapping, 0, NULL);
4372 + if (IS_ERR(page))
4373 +diff -urNp linux-3.1.1/fs/hfs/trans.c linux-3.1.1/fs/hfs/trans.c
4374 +--- linux-3.1.1/fs/hfs/trans.c 2011-11-11 15:19:27.000000000 -0500
4375 ++++ linux-3.1.1/fs/hfs/trans.c 2011-11-18 18:37:38.000000000 -0500
4376 +@@ -40,6 +40,8 @@ int hfs_mac2asc(struct super_block *sb,
4377 +
4378 + src = in->name;
4379 + srclen = in->len;
4380 ++ if (srclen > HFS_NAMELEN)
4381 ++ srclen = HFS_NAMELEN;
4382 + dst = out;
4383 + dstlen = HFS_MAX_NAMELEN;
4384 + if (nls_io) {
4385 diff -urNp linux-3.1.1/fs/hfsplus/catalog.c linux-3.1.1/fs/hfsplus/catalog.c
4386 --- linux-3.1.1/fs/hfsplus/catalog.c 2011-11-11 15:19:27.000000000 -0500
4387 +++ linux-3.1.1/fs/hfsplus/catalog.c 2011-11-16 19:23:09.000000000 -0500
4388 @@ -46070,7 +46143,7 @@ diff -urNp linux-3.1.1/fs/proc/proc_net.c linux-3.1.1/fs/proc/proc_net.c
4389 task = pid_task(proc_pid(dir), PIDTYPE_PID);
4390 diff -urNp linux-3.1.1/fs/proc/proc_sysctl.c linux-3.1.1/fs/proc/proc_sysctl.c
4391 --- linux-3.1.1/fs/proc/proc_sysctl.c 2011-11-11 15:19:27.000000000 -0500
4392 -+++ linux-3.1.1/fs/proc/proc_sysctl.c 2011-11-16 18:40:29.000000000 -0500
4393 ++++ linux-3.1.1/fs/proc/proc_sysctl.c 2011-11-18 18:45:33.000000000 -0500
4394 @@ -8,11 +8,13 @@
4395 #include <linux/namei.h>
4396 #include "internal.h"
4397 @@ -46132,7 +46205,12 @@ diff -urNp linux-3.1.1/fs/proc/proc_sysctl.c linux-3.1.1/fs/proc/proc_sysctl.c
4398 generic_fillattr(inode, stat);
4399 if (table)
4400 stat->mode = (stat->mode & S_IFMT) | table->mode;
4401 -@@ -374,13 +391,13 @@ static const struct file_operations proc
4402 +@@ -370,17 +387,18 @@ static const struct file_operations proc
4403 + };
4404 +
4405 + static const struct file_operations proc_sys_dir_file_operations = {
4406 ++ .read = generic_read_dir,
4407 + .readdir = proc_sys_readdir,
4408 .llseek = generic_file_llseek,
4409 };
4410
4411 @@ -47098,6 +47176,30 @@ diff -urNp linux-3.1.1/fs/xfs/xfs_iops.c linux-3.1.1/fs/xfs/xfs_iops.c
4412
4413 if (!IS_ERR(s))
4414 kfree(s);
4415 +diff -urNp linux-3.1.1/fs/xfs/xfs_vnodeops.c linux-3.1.1/fs/xfs/xfs_vnodeops.c
4416 +--- linux-3.1.1/fs/xfs/xfs_vnodeops.c 2011-11-11 15:19:27.000000000 -0500
4417 ++++ linux-3.1.1/fs/xfs/xfs_vnodeops.c 2011-11-18 18:54:56.000000000 -0500
4418 +@@ -123,13 +123,17 @@ xfs_readlink(
4419 +
4420 + xfs_ilock(ip, XFS_ILOCK_SHARED);
4421 +
4422 +- ASSERT(S_ISLNK(ip->i_d.di_mode));
4423 +- ASSERT(ip->i_d.di_size <= MAXPATHLEN);
4424 +-
4425 + pathlen = ip->i_d.di_size;
4426 + if (!pathlen)
4427 + goto out;
4428 +
4429 ++ if (pathlen > MAXPATHLEN) {
4430 ++ xfs_alert(mp, "%s: inode (%llu) symlink length (%d) too long",
4431 ++ __func__, (unsigned long long)ip->i_ino, pathlen);
4432 ++ ASSERT(0);
4433 ++ return XFS_ERROR(EFSCORRUPTED);
4434 ++ }
4435 ++
4436 + if (ip->i_df.if_flags & XFS_IFINLINE) {
4437 + memcpy(link, ip->i_df.if_u1.if_data, pathlen);
4438 + link[pathlen] = '\0';
4439 diff -urNp linux-3.1.1/grsecurity/gracl_alloc.c linux-3.1.1/grsecurity/gracl_alloc.c
4440 --- linux-3.1.1/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
4441 +++ linux-3.1.1/grsecurity/gracl_alloc.c 2011-11-16 18:40:31.000000000 -0500
4442 @@ -69901,6 +70003,18 @@ diff -urNp linux-3.1.1/mm/nommu.c linux-3.1.1/mm/nommu.c
4443 *region = *vma->vm_region;
4444 new->vm_region = region;
4445
4446 +diff -urNp linux-3.1.1/mm/oom_kill.c linux-3.1.1/mm/oom_kill.c
4447 +--- linux-3.1.1/mm/oom_kill.c 2011-11-11 15:19:27.000000000 -0500
4448 ++++ linux-3.1.1/mm/oom_kill.c 2011-11-18 18:44:21.000000000 -0500
4449 +@@ -162,7 +162,7 @@ static bool oom_unkillable_task(struct t
4450 + unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem,
4451 + const nodemask_t *nodemask, unsigned long totalpages)
4452 + {
4453 +- int points;
4454 ++ long points;
4455 +
4456 + if (oom_unkillable_task(p, mem, nodemask))
4457 + return 0;
4458 diff -urNp linux-3.1.1/mm/page_alloc.c linux-3.1.1/mm/page_alloc.c
4459 --- linux-3.1.1/mm/page_alloc.c 2011-11-11 15:19:27.000000000 -0500
4460 +++ linux-3.1.1/mm/page_alloc.c 2011-11-16 18:40:44.000000000 -0500
4461 @@ -73333,6 +73447,17 @@ diff -urNp linux-3.1.1/net/iucv/af_iucv.c linux-3.1.1/net/iucv/af_iucv.c
4462 }
4463
4464 write_unlock_bh(&iucv_sk_list.lock);
4465 +diff -urNp linux-3.1.1/net/Kconfig linux-3.1.1/net/Kconfig
4466 +--- linux-3.1.1/net/Kconfig 2011-11-11 15:19:27.000000000 -0500
4467 ++++ linux-3.1.1/net/Kconfig 2011-11-18 19:02:18.000000000 -0500
4468 +@@ -239,6 +239,7 @@ config BPF_JIT
4469 + bool "enable BPF Just In Time compiler"
4470 + depends on HAVE_BPF_JIT
4471 + depends on MODULES
4472 ++ depends on !GRKERNSEC
4473 + ---help---
4474 + Berkeley Packet Filter filtering capabilities are normally handled
4475 + by an interpreter. This option allows kernel to generate a native
4476 diff -urNp linux-3.1.1/net/key/af_key.c linux-3.1.1/net/key/af_key.c
4477 --- linux-3.1.1/net/key/af_key.c 2011-11-11 15:19:27.000000000 -0500
4478 +++ linux-3.1.1/net/key/af_key.c 2011-11-16 18:40:44.000000000 -0500
4479 @@ -76308,6 +76433,19 @@ diff -urNp linux-3.1.1/security/keys/keyring.c linux-3.1.1/security/keys/keyring
4480 goto error;
4481
4482 buflen -= tmp;
4483 +diff -urNp linux-3.1.1/security/keys/user_defined.c linux-3.1.1/security/keys/user_defined.c
4484 +--- linux-3.1.1/security/keys/user_defined.c 2011-11-11 15:19:27.000000000 -0500
4485 ++++ linux-3.1.1/security/keys/user_defined.c 2011-11-18 18:38:28.000000000 -0500
4486 +@@ -102,7 +102,8 @@ int user_update(struct key *key, const v
4487 + key->expiry = 0;
4488 + }
4489 +
4490 +- kfree_rcu(zap, rcu);
4491 ++ if (zap)
4492 ++ kfree_rcu(zap, rcu);
4493 +
4494 + error:
4495 + return ret;
4496 diff -urNp linux-3.1.1/security/min_addr.c linux-3.1.1/security/min_addr.c
4497 --- linux-3.1.1/security/min_addr.c 2011-11-11 15:19:27.000000000 -0500
4498 +++ linux-3.1.1/security/min_addr.c 2011-11-16 18:40:44.000000000 -0500
4499 @@ -77620,7 +77758,7 @@ diff -urNp linux-3.1.1/tools/gcc/kallocstat_plugin.c linux-3.1.1/tools/gcc/kallo
4500 +}
4501 diff -urNp linux-3.1.1/tools/gcc/kernexec_plugin.c linux-3.1.1/tools/gcc/kernexec_plugin.c
4502 --- linux-3.1.1/tools/gcc/kernexec_plugin.c 1969-12-31 19:00:00.000000000 -0500
4503 -+++ linux-3.1.1/tools/gcc/kernexec_plugin.c 2011-11-16 18:39:08.000000000 -0500
4504 ++++ linux-3.1.1/tools/gcc/kernexec_plugin.c 2011-11-18 17:57:07.000000000 -0500
4505 @@ -0,0 +1,275 @@
4506 +/*
4507 + * Copyright 2011 by the PaX Team <pageexec@××××××××.hu>
4508 @@ -77826,7 +77964,7 @@ diff -urNp linux-3.1.1/tools/gcc/kernexec_plugin.c linux-3.1.1/tools/gcc/kernexe
4509 + line = expand_location(RTL_LOCATION(insn)).line;
4510 + btsq = gen_rtx_ASM_OPERANDS(VOIDmode, "btsq $63,(%%rsp)", empty_string, 0, argvec, constraintvec, labelvec, line);
4511 + MEM_VOLATILE_P(btsq) = 1;
4512 -+ RTX_FRAME_RELATED_P(btsq) = 1;
4513 ++// RTX_FRAME_RELATED_P(btsq) = 1; // not for ASM_OPERANDS
4514 + emit_insn_before(btsq, insn);
4515 +}
4516 +