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.2.59/, 3.14.4/, 3.2.58/
Date: Mon, 26 May 2014 12:22:29
Message-Id: 1401107049.807f663e9e58af2dcf2eeb8641ac8442e6cafb98.blueness@gentoo
1 commit: 807f663e9e58af2dcf2eeb8641ac8442e6cafb98
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 26 12:24:09 2014 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Mon May 26 12:24:09 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-patchset.git;a=commit;h=807f663e
7
8 Grsec/PaX: 3.0-{3.2.59,3.14.4}-201405252047
9
10 ---
11 3.14.4/0000_README | 2 +-
12 ... 4420_grsecurity-3.0-3.14.4-201405252047.patch} | 441 +++++--
13 {3.2.58 => 3.2.59}/0000_README | 6 +-
14 {3.2.58 => 3.2.59}/1021_linux-3.2.22.patch | 0
15 {3.2.58 => 3.2.59}/1022_linux-3.2.23.patch | 0
16 {3.2.58 => 3.2.59}/1023_linux-3.2.24.patch | 0
17 {3.2.58 => 3.2.59}/1024_linux-3.2.25.patch | 0
18 {3.2.58 => 3.2.59}/1025_linux-3.2.26.patch | 0
19 {3.2.58 => 3.2.59}/1026_linux-3.2.27.patch | 0
20 {3.2.58 => 3.2.59}/1027_linux-3.2.28.patch | 0
21 {3.2.58 => 3.2.59}/1028_linux-3.2.29.patch | 0
22 {3.2.58 => 3.2.59}/1029_linux-3.2.30.patch | 0
23 {3.2.58 => 3.2.59}/1030_linux-3.2.31.patch | 0
24 {3.2.58 => 3.2.59}/1031_linux-3.2.32.patch | 0
25 {3.2.58 => 3.2.59}/1032_linux-3.2.33.patch | 0
26 {3.2.58 => 3.2.59}/1033_linux-3.2.34.patch | 0
27 {3.2.58 => 3.2.59}/1034_linux-3.2.35.patch | 0
28 {3.2.58 => 3.2.59}/1035_linux-3.2.36.patch | 0
29 {3.2.58 => 3.2.59}/1036_linux-3.2.37.patch | 0
30 {3.2.58 => 3.2.59}/1037_linux-3.2.38.patch | 0
31 {3.2.58 => 3.2.59}/1038_linux-3.2.39.patch | 0
32 {3.2.58 => 3.2.59}/1039_linux-3.2.40.patch | 0
33 {3.2.58 => 3.2.59}/1040_linux-3.2.41.patch | 0
34 {3.2.58 => 3.2.59}/1041_linux-3.2.42.patch | 0
35 {3.2.58 => 3.2.59}/1042_linux-3.2.43.patch | 0
36 {3.2.58 => 3.2.59}/1043_linux-3.2.44.patch | 0
37 {3.2.58 => 3.2.59}/1044_linux-3.2.45.patch | 0
38 {3.2.58 => 3.2.59}/1045_linux-3.2.46.patch | 0
39 {3.2.58 => 3.2.59}/1046_linux-3.2.47.patch | 0
40 {3.2.58 => 3.2.59}/1047_linux-3.2.48.patch | 0
41 {3.2.58 => 3.2.59}/1048_linux-3.2.49.patch | 0
42 {3.2.58 => 3.2.59}/1049_linux-3.2.50.patch | 0
43 {3.2.58 => 3.2.59}/1050_linux-3.2.51.patch | 0
44 {3.2.58 => 3.2.59}/1051_linux-3.2.52.patch | 0
45 {3.2.58 => 3.2.59}/1052_linux-3.2.53.patch | 0
46 {3.2.58 => 3.2.59}/1053_linux-3.2.54.patch | 0
47 {3.2.58 => 3.2.59}/1054_linux-3.2.55.patch | 0
48 {3.2.58 => 3.2.59}/1055_linux-3.2.56.patch | 0
49 {3.2.58 => 3.2.59}/1056_linux-3.2.57.patch | 0
50 {3.2.58 => 3.2.59}/1057_linux-3.2.58.patch | 0
51 3.2.59/1058_linux-3.2.59.patch | 1213 ++++++++++++++++++++
52 .../4420_grsecurity-3.0-3.2.59-201405252042.patch | 308 ++---
53 {3.2.58 => 3.2.59}/4425_grsec_remove_EI_PAX.patch | 0
54 .../4427_force_XATTR_PAX_tmpfs.patch | 0
55 .../4430_grsec-remove-localversion-grsec.patch | 0
56 {3.2.58 => 3.2.59}/4435_grsec-mute-warnings.patch | 0
57 .../4440_grsec-remove-protected-paths.patch | 0
58 .../4450_grsec-kconfig-default-gids.patch | 0
59 .../4465_selinux-avc_audit-log-curr_ip.patch | 0
60 {3.2.58 => 3.2.59}/4470_disable-compat_vdso.patch | 0
61 {3.2.58 => 3.2.59}/4475_emutramp_default_on.patch | 0
62 51 files changed, 1719 insertions(+), 251 deletions(-)
63
64 diff --git a/3.14.4/0000_README b/3.14.4/0000_README
65 index d9b0963..1ddd194 100644
66 --- a/3.14.4/0000_README
67 +++ b/3.14.4/0000_README
68 @@ -2,7 +2,7 @@ README
69 -----------------------------------------------------------------------------
70 Individual Patch Descriptions:
71 -----------------------------------------------------------------------------
72 -Patch: 4420_grsecurity-3.0-3.14.4-201405141623.patch
73 +Patch: 4420_grsecurity-3.0-3.14.4-201405252047.patch
74 From: http://www.grsecurity.net
75 Desc: hardened-sources base patch from upstream grsecurity
76
77
78 diff --git a/3.14.4/4420_grsecurity-3.0-3.14.4-201405141623.patch b/3.14.4/4420_grsecurity-3.0-3.14.4-201405252047.patch
79 similarity index 99%
80 rename from 3.14.4/4420_grsecurity-3.0-3.14.4-201405141623.patch
81 rename to 3.14.4/4420_grsecurity-3.0-3.14.4-201405252047.patch
82 index 723fbc4..f294dbc 100644
83 --- a/3.14.4/4420_grsecurity-3.0-3.14.4-201405141623.patch
84 +++ b/3.14.4/4420_grsecurity-3.0-3.14.4-201405252047.patch
85 @@ -287,7 +287,7 @@ index 7116fda..d8ed6e8 100644
86
87 pcd. [PARIDE]
88 diff --git a/Makefile b/Makefile
89 -index d7c07fd..d6d4bfa 100644
90 +index d7c07fd..1ad8228 100644
91 --- a/Makefile
92 +++ b/Makefile
93 @@ -244,8 +244,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
94 @@ -445,17 +445,19 @@ index d7c07fd..d6d4bfa 100644
95
96 # Target to install modules
97 PHONY += modules_install
98 -@@ -1072,7 +1146,8 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
99 +@@ -1072,7 +1146,10 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
100 Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
101 signing_key.priv signing_key.x509 x509.genkey \
102 extra_certificates signing_key.x509.keyid \
103 - signing_key.x509.signer
104 -+ signing_key.x509.signer tools/gcc/size_overflow_hash.h \
105 ++ signing_key.x509.signer \
106 ++ tools/gcc/size_overflow_plugin/size_overflow_hash_aux.h \
107 ++ tools/gcc/size_overflow_plugin/size_overflow_hash.h \
108 + tools/gcc/randomize_layout_seed.h
109
110 # clean - Delete most, but leave enough to build external modules
111 #
112 -@@ -1112,6 +1187,7 @@ distclean: mrproper
113 +@@ -1112,6 +1189,7 @@ distclean: mrproper
114 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
115 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
116 -o -name '.*.rej' \
117 @@ -463,7 +465,7 @@ index d7c07fd..d6d4bfa 100644
118 -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
119 -type f -print | xargs rm -f
120
121 -@@ -1273,6 +1349,8 @@ PHONY += $(module-dirs) modules
122 +@@ -1273,6 +1351,8 @@ PHONY += $(module-dirs) modules
123 $(module-dirs): crmodverdir $(objtree)/Module.symvers
124 $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
125
126 @@ -472,7 +474,7 @@ index d7c07fd..d6d4bfa 100644
127 modules: $(module-dirs)
128 @$(kecho) ' Building modules, stage 2.';
129 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
130 -@@ -1412,17 +1490,21 @@ else
131 +@@ -1412,17 +1492,21 @@ else
132 target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
133 endif
134
135 @@ -498,7 +500,7 @@ index d7c07fd..d6d4bfa 100644
136 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
137 %.symtypes: %.c prepare scripts FORCE
138 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
139 -@@ -1432,11 +1514,15 @@ endif
140 +@@ -1432,11 +1516,15 @@ endif
141 $(cmd_crmodverdir)
142 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
143 $(build)=$(build-dir)
144 @@ -16968,6 +16970,18 @@ index b4c1f54..e290c08 100644
145
146 pagefault_enable();
147
148 +diff --git a/arch/x86/include/asm/hugetlb.h b/arch/x86/include/asm/hugetlb.h
149 +index a809121..68c0539 100644
150 +--- a/arch/x86/include/asm/hugetlb.h
151 ++++ b/arch/x86/include/asm/hugetlb.h
152 +@@ -52,6 +52,7 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
153 + static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
154 + unsigned long addr, pte_t *ptep)
155 + {
156 ++ ptep_clear_flush(vma, addr, ptep);
157 + }
158 +
159 + static inline int huge_pte_none(pte_t pte)
160 diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
161 index 67d69b8..50e4b77 100644
162 --- a/arch/x86/include/asm/hw_irq.h
163 @@ -25819,10 +25833,19 @@ index c2bedae..25e7ab6 100644
164 .name = "data",
165 .mode = S_IRUGO,
166 diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
167 -index af1d14a..37b8776 100644
168 +index af1d14a..81ae763 100644
169 --- a/arch/x86/kernel/ldt.c
170 +++ b/arch/x86/kernel/ldt.c
171 -@@ -66,13 +66,13 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
172 +@@ -20,6 +20,8 @@
173 + #include <asm/mmu_context.h>
174 + #include <asm/syscalls.h>
175 +
176 ++int sysctl_ldt16 = 0;
177 ++
178 + #ifdef CONFIG_SMP
179 + static void flush_ldt(void *current_mm)
180 + {
181 +@@ -66,13 +68,13 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
182 if (reload) {
183 #ifdef CONFIG_SMP
184 preempt_disable();
185 @@ -25838,7 +25861,7 @@ index af1d14a..37b8776 100644
186 #endif
187 }
188 if (oldsize) {
189 -@@ -94,7 +94,7 @@ static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
190 +@@ -94,7 +96,7 @@ static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
191 return err;
192
193 for (i = 0; i < old->size; i++)
194 @@ -25847,7 +25870,7 @@ index af1d14a..37b8776 100644
195 return 0;
196 }
197
198 -@@ -115,6 +115,24 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
199 +@@ -115,6 +117,24 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
200 retval = copy_ldt(&mm->context, &old_mm->context);
201 mutex_unlock(&old_mm->context.lock);
202 }
203 @@ -25872,7 +25895,7 @@ index af1d14a..37b8776 100644
204 return retval;
205 }
206
207 -@@ -229,6 +247,13 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
208 +@@ -229,12 +249,19 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
209 }
210 }
211
212 @@ -25886,6 +25909,13 @@ index af1d14a..37b8776 100644
213 /*
214 * On x86-64 we do not support 16-bit segments due to
215 * IRET leaking the high bits of the kernel stack address.
216 + */
217 + #ifdef CONFIG_X86_64
218 +- if (!ldt_info.seg_32bit) {
219 ++ if (!ldt_info.seg_32bit && !sysctl_ldt16) {
220 + error = -EINVAL;
221 + goto out_unlock;
222 + }
223 diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
224 index 1667b1d..16492c5 100644
225 --- a/arch/x86/kernel/machine_kexec_32.c
226 @@ -35598,7 +35628,7 @@ index fd14be1..e3c79c0 100644
227
228 #
229 diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
230 -index d6bfb87..876ee18 100644
231 +index d6bfb87..a75c5f7 100644
232 --- a/arch/x86/vdso/vdso32-setup.c
233 +++ b/arch/x86/vdso/vdso32-setup.c
234 @@ -25,6 +25,7 @@
235 @@ -35609,7 +35639,15 @@ index d6bfb87..876ee18 100644
236
237 enum {
238 VDSO_DISABLED = 0,
239 -@@ -226,7 +227,7 @@ static inline void map_compat_vdso(int map)
240 +@@ -41,6 +42,7 @@ enum {
241 + #ifdef CONFIG_X86_64
242 + #define vdso_enabled sysctl_vsyscall32
243 + #define arch_setup_additional_pages syscall32_setup_pages
244 ++extern int sysctl_ldt16;
245 + #endif
246 +
247 + /*
248 +@@ -226,7 +228,7 @@ static inline void map_compat_vdso(int map)
249 void enable_sep_cpu(void)
250 {
251 int cpu = get_cpu();
252 @@ -35618,7 +35656,7 @@ index d6bfb87..876ee18 100644
253
254 if (!boot_cpu_has(X86_FEATURE_SEP)) {
255 put_cpu();
256 -@@ -249,7 +250,7 @@ static int __init gate_vma_init(void)
257 +@@ -249,7 +251,7 @@ static int __init gate_vma_init(void)
258 gate_vma.vm_start = FIXADDR_USER_START;
259 gate_vma.vm_end = FIXADDR_USER_END;
260 gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
261 @@ -35627,7 +35665,7 @@ index d6bfb87..876ee18 100644
262
263 return 0;
264 }
265 -@@ -330,14 +331,14 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
266 +@@ -330,14 +332,14 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
267 if (compat)
268 addr = VDSO_HIGH_BASE;
269 else {
270 @@ -35644,7 +35682,7 @@ index d6bfb87..876ee18 100644
271
272 if (compat_uses_vma || !compat) {
273 /*
274 -@@ -353,11 +354,11 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
275 +@@ -353,11 +355,11 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
276 }
277
278 current_thread_info()->sysenter_return =
279 @@ -35658,7 +35696,21 @@ index d6bfb87..876ee18 100644
280
281 up_write(&mm->mmap_sem);
282
283 -@@ -404,8 +405,14 @@ __initcall(ia32_binfmt_init);
284 +@@ -380,6 +382,13 @@ static struct ctl_table abi_table2[] = {
285 + .mode = 0644,
286 + .proc_handler = proc_dointvec
287 + },
288 ++ {
289 ++ .procname = "ldt16",
290 ++ .data = &sysctl_ldt16,
291 ++ .maxlen = sizeof(int),
292 ++ .mode = 0644,
293 ++ .proc_handler = proc_dointvec
294 ++ },
295 + {}
296 + };
297 +
298 +@@ -404,8 +413,14 @@ __initcall(ia32_binfmt_init);
299
300 const char *arch_vma_name(struct vm_area_struct *vma)
301 {
302 @@ -35674,7 +35726,7 @@ index d6bfb87..876ee18 100644
303 return NULL;
304 }
305
306 -@@ -415,7 +422,7 @@ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
307 +@@ -415,7 +430,7 @@ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
308 * Check to see if the corresponding task was created in compat vdso
309 * mode.
310 */
311 @@ -65598,6 +65650,25 @@ index ee0d761..b346c58 100644
312 return PTR_ERR(kn);
313 }
314
315 +diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
316 +index 810cf6e..5fd2bf1 100644
317 +--- a/fs/sysfs/file.c
318 ++++ b/fs/sysfs/file.c
319 +@@ -47,12 +47,13 @@ static int sysfs_kf_seq_show(struct seq_file *sf, void *v)
320 + ssize_t count;
321 + char *buf;
322 +
323 +- /* acquire buffer and ensure that it's >= PAGE_SIZE */
324 ++ /* acquire buffer and ensure that it's >= PAGE_SIZE and clear */
325 + count = seq_get_buf(sf, &buf);
326 + if (count < PAGE_SIZE) {
327 + seq_commit(sf, -1);
328 + return 0;
329 + }
330 ++ memset(buf, 0, PAGE_SIZE);
331 +
332 + /*
333 + * Invoke show(). Control may reach here via seq file lseek even
334 diff --git a/fs/sysv/sysv.h b/fs/sysv/sysv.h
335 index 69d4889..a810bd4 100644
336 --- a/fs/sysv/sysv.h
337 @@ -96328,7 +96399,7 @@ index 4bf8809..98a6914 100644
338 EXPORT_SYMBOL(kmem_cache_free);
339
340 diff --git a/mm/slub.c b/mm/slub.c
341 -index 25f14ad..ff4d0b7 100644
342 +index 25f14ad..c904f6f 100644
343 --- a/mm/slub.c
344 +++ b/mm/slub.c
345 @@ -207,7 +207,7 @@ struct track {
346 @@ -96487,7 +96558,19 @@ index 25f14ad..ff4d0b7 100644
347 static int count_inuse(struct page *page)
348 {
349 return page->inuse;
350 -@@ -4268,12 +4333,12 @@ static void resiliency_test(void)
351 +@@ -4163,7 +4228,11 @@ static int list_locations(struct kmem_cache *s, char *buf,
352 + len += sprintf(buf + len, "%7ld ", l->count);
353 +
354 + if (l->addr)
355 ++#ifdef CONFIG_GRKERNSEC_HIDESYM
356 ++ len += sprintf(buf + len, "%pS", NULL);
357 ++#else
358 + len += sprintf(buf + len, "%pS", (void *)l->addr);
359 ++#endif
360 + else
361 + len += sprintf(buf + len, "<not-available>");
362 +
363 +@@ -4268,12 +4337,12 @@ static void resiliency_test(void)
364 validate_slab_cache(kmalloc_caches[9]);
365 }
366 #else
367 @@ -96502,7 +96585,17 @@ index 25f14ad..ff4d0b7 100644
368 enum slab_stat_type {
369 SL_ALL, /* All slabs */
370 SL_PARTIAL, /* Only partially allocated slabs */
371 -@@ -4519,7 +4584,7 @@ SLAB_ATTR_RO(ctor);
372 +@@ -4513,13 +4582,17 @@ static ssize_t ctor_show(struct kmem_cache *s, char *buf)
373 + {
374 + if (!s->ctor)
375 + return 0;
376 ++#ifdef CONFIG_GRKERNSEC_HIDESYM
377 ++ return sprintf(buf, "%pS\n", NULL);
378 ++#else
379 + return sprintf(buf, "%pS\n", s->ctor);
380 ++#endif
381 + }
382 + SLAB_ATTR_RO(ctor);
383
384 static ssize_t aliases_show(struct kmem_cache *s, char *buf)
385 {
386 @@ -96511,7 +96604,7 @@ index 25f14ad..ff4d0b7 100644
387 }
388 SLAB_ATTR_RO(aliases);
389
390 -@@ -4607,6 +4672,14 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf)
391 +@@ -4607,6 +4680,14 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf)
392 SLAB_ATTR_RO(cache_dma);
393 #endif
394
395 @@ -96526,7 +96619,7 @@ index 25f14ad..ff4d0b7 100644
396 static ssize_t destroy_by_rcu_show(struct kmem_cache *s, char *buf)
397 {
398 return sprintf(buf, "%d\n", !!(s->flags & SLAB_DESTROY_BY_RCU));
399 -@@ -4941,6 +5014,9 @@ static struct attribute *slab_attrs[] = {
400 +@@ -4941,6 +5022,9 @@ static struct attribute *slab_attrs[] = {
401 #ifdef CONFIG_ZONE_DMA
402 &cache_dma_attr.attr,
403 #endif
404 @@ -96536,7 +96629,7 @@ index 25f14ad..ff4d0b7 100644
405 #ifdef CONFIG_NUMA
406 &remote_node_defrag_ratio_attr.attr,
407 #endif
408 -@@ -5173,6 +5249,7 @@ static char *create_unique_id(struct kmem_cache *s)
409 +@@ -5173,6 +5257,7 @@ static char *create_unique_id(struct kmem_cache *s)
410 return name;
411 }
412
413 @@ -96544,7 +96637,7 @@ index 25f14ad..ff4d0b7 100644
414 static int sysfs_slab_add(struct kmem_cache *s)
415 {
416 int err;
417 -@@ -5230,6 +5307,7 @@ static void sysfs_slab_remove(struct kmem_cache *s)
418 +@@ -5230,6 +5315,7 @@ static void sysfs_slab_remove(struct kmem_cache *s)
419 kobject_del(&s->kobj);
420 kobject_put(&s->kobj);
421 }
422 @@ -96552,7 +96645,7 @@ index 25f14ad..ff4d0b7 100644
423
424 /*
425 * Need to buffer aliases during bootup until sysfs becomes
426 -@@ -5243,6 +5321,7 @@ struct saved_alias {
427 +@@ -5243,6 +5329,7 @@ struct saved_alias {
428
429 static struct saved_alias *alias_list;
430
431 @@ -96560,7 +96653,7 @@ index 25f14ad..ff4d0b7 100644
432 static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
433 {
434 struct saved_alias *al;
435 -@@ -5265,6 +5344,7 @@ static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
436 +@@ -5265,6 +5352,7 @@ static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
437 alias_list = al;
438 return 0;
439 }
440 @@ -110658,10 +110751,10 @@ index 0000000..3e8148c
441 +}
442 diff --git a/tools/gcc/size_overflow_plugin/insert_size_overflow_check_core.c b/tools/gcc/size_overflow_plugin/insert_size_overflow_check_core.c
443 new file mode 100644
444 -index 0000000..880cd86
445 +index 0000000..88469e9
446 --- /dev/null
447 +++ b/tools/gcc/size_overflow_plugin/insert_size_overflow_check_core.c
448 -@@ -0,0 +1,897 @@
449 +@@ -0,0 +1,902 @@
450 +/*
451 + * Copyright 2011-2014 by Emese Revfy <re.emese@×××××.com>
452 + * Licensed under the GPL v2, or (at your option) v3
453 @@ -111349,8 +111442,13 @@ index 0000000..880cd86
454 + return create_assign(visited, def_stmt, lhs, AFTER_STMT);
455 +
456 + switch (TREE_CODE(rhs1)) {
457 -+ case SSA_NAME:
458 -+ return handle_unary_rhs(visited, caller_node, def_stmt);
459 ++ case SSA_NAME: {
460 ++ tree ret = handle_unary_rhs(visited, caller_node, def_stmt);
461 ++
462 ++ if (gimple_assign_cast_p(stmt))
463 ++ unsigned_signed_cast_intentional_overflow(visited, stmt);
464 ++ return ret;
465 ++ }
466 + case ARRAY_REF:
467 + case BIT_FIELD_REF:
468 + case ADDR_EXPR:
469 @@ -112700,10 +112798,10 @@ index 0000000..f8f5dd5
470 +
471 diff --git a/tools/gcc/size_overflow_plugin/intentional_overflow.c b/tools/gcc/size_overflow_plugin/intentional_overflow.c
472 new file mode 100644
473 -index 0000000..967c0b2
474 +index 0000000..38904bc
475 --- /dev/null
476 +++ b/tools/gcc/size_overflow_plugin/intentional_overflow.c
477 -@@ -0,0 +1,635 @@
478 +@@ -0,0 +1,733 @@
479 +/*
480 + * Copyright 2011-2014 by Emese Revfy <re.emese@×××××.com>
481 + * Licensed under the GPL v2, or (at your option) v3
482 @@ -112963,21 +113061,29 @@ index 0000000..967c0b2
483 + return true;
484 +}
485 +
486 -+static bool no_uses(tree node)
487 ++static unsigned int uses_num(tree node)
488 +{
489 + imm_use_iterator imm_iter;
490 + use_operand_p use_p;
491 ++ unsigned int num = 0;
492 +
493 + FOR_EACH_IMM_USE_FAST(use_p, imm_iter, node) {
494 -+ const_gimple use_stmt = USE_STMT(use_p);
495 ++ gimple use_stmt = USE_STMT(use_p);
496 +
497 + if (use_stmt == NULL)
498 -+ return true;
499 ++ return num;
500 + if (is_gimple_debug(use_stmt))
501 + continue;
502 -+ return false;
503 ++ if (gimple_assign_cast_p(use_stmt) && is_size_overflow_type(gimple_assign_lhs(use_stmt)))
504 ++ continue;
505 ++ num++;
506 + }
507 -+ return true;
508 ++ return num;
509 ++}
510 ++
511 ++static bool no_uses(tree node)
512 ++{
513 ++ return !uses_num(node);
514 +}
515 +
516 +// 3.8.5 mm/page-writeback.c __ilog2_u64(): ret, uint + uintmax; uint -> int; int max
517 @@ -113339,12 +113445,102 @@ index 0000000..967c0b2
518 + return NO_INTENTIONAL_OVERFLOW;
519 +}
520 +
521 ++static gimple get_dup_stmt(struct visited *visited, gimple stmt)
522 ++{
523 ++ gimple my_stmt;
524 ++ gimple_stmt_iterator gsi = gsi_for_stmt(stmt);
525 ++
526 ++ gsi_next(&gsi);
527 ++ my_stmt = gsi_stmt(gsi);
528 ++
529 ++ gcc_assert(pointer_set_contains(visited->my_stmts, my_stmt));
530 ++ gcc_assert(gimple_assign_rhs_code(stmt) == gimple_assign_rhs_code(my_stmt));
531 ++
532 ++ return my_stmt;
533 ++}
534 ++
535 ++/* unsigned type -> unary or binary assign (rhs1 or rhs2 is constant)
536 ++ * unsigned type cast to signed type, unsigned type: no more uses
537 ++ * e.g., lib/vsprintf.c:simple_strtol()
538 ++ * _10 = (unsigned long int) _9
539 ++ * _11 = -_10;
540 ++ * _12 = (long int) _11; (_11_ no more uses)
541 ++ */
542 ++static bool is_call_or_cast(gimple stmt)
543 ++{
544 ++ return gimple_assign_cast_p(stmt) || is_gimple_call(stmt);
545 ++}
546 ++
547 ++static bool is_unsigned_cast_or_call_def_stmt(const_tree node)
548 ++{
549 ++ const_tree rhs;
550 ++ gimple def_stmt;
551 ++
552 ++ if (node == NULL_TREE)
553 ++ return true;
554 ++ if (is_gimple_constant(node))
555 ++ return true;
556 ++
557 ++ def_stmt = get_def_stmt(node);
558 ++ if (!def_stmt)
559 ++ return false;
560 ++
561 ++ if (is_call_or_cast(def_stmt))
562 ++ return true;
563 ++
564 ++ if (!is_gimple_assign(def_stmt) || gimple_num_ops(def_stmt) != 2)
565 ++ return false;
566 ++ rhs = gimple_assign_rhs1(def_stmt);
567 ++ def_stmt = get_def_stmt(rhs);
568 ++ if (!def_stmt)
569 ++ return false;
570 ++ return is_call_or_cast(def_stmt);
571 ++}
572 ++
573 ++void unsigned_signed_cast_intentional_overflow(struct visited *visited, gimple stmt)
574 ++{
575 ++ unsigned int use_num;
576 ++ gimple so_stmt;
577 ++ const_gimple def_stmt;
578 ++ const_tree rhs1, rhs2;
579 ++ tree rhs = gimple_assign_rhs1(stmt);
580 ++ tree lhs_type = TREE_TYPE(gimple_assign_lhs(stmt));
581 ++ const_tree rhs_type = TREE_TYPE(rhs);
582 ++
583 ++ if (!(TYPE_UNSIGNED(rhs_type) && !TYPE_UNSIGNED(lhs_type)))
584 ++ return;
585 ++ if (GET_MODE_BITSIZE(TYPE_MODE(rhs_type)) != GET_MODE_BITSIZE(TYPE_MODE(lhs_type)))
586 ++ return;
587 ++ use_num = uses_num(rhs);
588 ++ if (use_num != 1)
589 ++ return;
590 ++
591 ++ def_stmt = get_def_stmt(rhs);
592 ++ if (!def_stmt)
593 ++ return;
594 ++ if (!is_gimple_assign(def_stmt))
595 ++ return;
596 ++
597 ++ rhs1 = gimple_assign_rhs1(def_stmt);
598 ++ if (!is_unsigned_cast_or_call_def_stmt(rhs1))
599 ++ return;
600 ++
601 ++ rhs2 = gimple_assign_rhs2(def_stmt);
602 ++ if (!is_unsigned_cast_or_call_def_stmt(rhs2))
603 ++ return;
604 ++ if (gimple_num_ops(def_stmt) == 3 && !is_gimple_constant(rhs1) && !is_gimple_constant(rhs2))
605 ++ return;
606 ++
607 ++ so_stmt = get_dup_stmt(visited, stmt);
608 ++ create_up_and_down_cast(visited, so_stmt, lhs_type, gimple_assign_rhs1(so_stmt));
609 ++}
610 ++
611 diff --git a/tools/gcc/size_overflow_plugin/misc.c b/tools/gcc/size_overflow_plugin/misc.c
612 new file mode 100644
613 -index 0000000..ca4def3
614 +index 0000000..4bddad2
615 --- /dev/null
616 +++ b/tools/gcc/size_overflow_plugin/misc.c
617 -@@ -0,0 +1,180 @@
618 +@@ -0,0 +1,203 @@
619 +/*
620 + * Copyright 2011-2014 by Emese Revfy <re.emese@×××××.com>
621 + * Licensed under the GPL v2, or (at your option) v3
622 @@ -113525,12 +113721,35 @@ index 0000000..ca4def3
623 + return assign;
624 +}
625 +
626 ++bool is_size_overflow_type(const_tree var)
627 ++{
628 ++ const char *name;
629 ++ const_tree type_name, type;
630 ++
631 ++ if (var == NULL_TREE)
632 ++ return false;
633 ++
634 ++ type = TREE_TYPE(var);
635 ++ type_name = TYPE_NAME(type);
636 ++ if (type_name == NULL_TREE)
637 ++ return false;
638 ++
639 ++ if (DECL_P(type_name))
640 ++ name = DECL_NAME_POINTER(type_name);
641 ++ else
642 ++ name = IDENTIFIER_POINTER(type_name);
643 ++
644 ++ if (!strncmp(name, "size_overflow_type", 18))
645 ++ return true;
646 ++ return false;
647 ++}
648 ++
649 diff --git a/tools/gcc/size_overflow_plugin/remove_unnecessary_dup.c b/tools/gcc/size_overflow_plugin/remove_unnecessary_dup.c
650 new file mode 100644
651 -index 0000000..ee108f0
652 +index 0000000..7c9e6d1
653 --- /dev/null
654 +++ b/tools/gcc/size_overflow_plugin/remove_unnecessary_dup.c
655 -@@ -0,0 +1,161 @@
656 +@@ -0,0 +1,138 @@
657 +/*
658 + * Copyright 2011-2014 by Emese Revfy <re.emese@×××××.com>
659 + * Licensed under the GPL v2, or (at your option) v3
660 @@ -113575,30 +113794,7 @@ index 0000000..ee108f0
661 + }
662 +}
663 +
664 -+static bool is_size_overflow_type(const_tree var)
665 -+{
666 -+ const char *name;
667 -+ const_tree type_name, type;
668 -+
669 -+ if (var == NULL_TREE)
670 -+ return false;
671 -+
672 -+ type = TREE_TYPE(var);
673 -+ type_name = TYPE_NAME(type);
674 -+ if (type_name == NULL_TREE)
675 -+ return false;
676 -+
677 -+ if (DECL_P(type_name))
678 -+ name = DECL_NAME_POINTER(type_name);
679 -+ else
680 -+ name = IDENTIFIER_POINTER(type_name);
681 -+
682 -+ if (!strncmp(name, "size_overflow_type", 18))
683 -+ return true;
684 -+ return false;
685 -+}
686 -+
687 -+static void create_up_and_down_cast(struct visited *visited, gimple use_stmt, tree orig_type, tree rhs)
688 ++void create_up_and_down_cast(struct visited *visited, gimple use_stmt, tree orig_type, tree rhs)
689 +{
690 + const_tree orig_rhs1;
691 + tree down_lhs, new_lhs, dup_type = TREE_TYPE(rhs);
692 @@ -113694,10 +113890,10 @@ index 0000000..ee108f0
693 +
694 diff --git a/tools/gcc/size_overflow_plugin/size_overflow.h b/tools/gcc/size_overflow_plugin/size_overflow.h
695 new file mode 100644
696 -index 0000000..0729973
697 +index 0000000..e5b4e50
698 --- /dev/null
699 +++ b/tools/gcc/size_overflow_plugin/size_overflow.h
700 -@@ -0,0 +1,124 @@
701 +@@ -0,0 +1,127 @@
702 +#ifndef SIZE_OVERFLOW_H
703 +#define SIZE_OVERFLOW_H
704 +
705 @@ -113786,6 +113982,7 @@ index 0000000..0729973
706 +extern tree handle_integer_truncation(struct visited *visited, struct cgraph_node *caller_node, const_tree lhs);
707 +extern bool is_a_neg_overflow(const_gimple stmt, const_tree rhs);
708 +extern enum intentional_overflow_type add_mul_intentional_overflow(const_gimple def_stmt);
709 ++extern void unsigned_signed_cast_intentional_overflow(struct visited *visited, gimple stmt);
710 +
711 +
712 +// insert_size_overflow_check_ipa.c
713 @@ -113807,6 +114004,7 @@ index 0000000..0729973
714 +extern gimple build_cast_stmt(struct visited *visited, tree dst_type, tree rhs, tree lhs, gimple_stmt_iterator *gsi, bool before, bool force);
715 +extern bool skip_types(const_tree var);
716 +extern tree cast_a_tree(tree type, tree var);
717 ++extern bool is_size_overflow_type(const_tree var);
718 +
719 +
720 +// insert_size_overflow_check_core.c
721 @@ -113820,6 +114018,7 @@ index 0000000..0729973
722 +extern struct opt_pass *make_remove_unnecessary_dup_pass(void);
723 +extern void insert_cast_expr(struct visited *visited, gimple stmt, enum intentional_overflow_type type);
724 +extern bool skip_expr_on_double_type(const_gimple stmt);
725 ++extern void create_up_and_down_cast(struct visited *visited, gimple use_stmt, tree orig_type, tree rhs);
726 +
727 +#endif
728 diff --git a/tools/gcc/size_overflow_plugin/size_overflow_debug.c b/tools/gcc/size_overflow_plugin/size_overflow_debug.c
729 @@ -113946,10 +114145,10 @@ index 0000000..4378111
730 +}
731 diff --git a/tools/gcc/size_overflow_plugin/size_overflow_hash.data b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
732 new file mode 100644
733 -index 0000000..41777a8
734 +index 0000000..72e9c0e
735 --- /dev/null
736 +++ b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
737 -@@ -0,0 +1,5934 @@
738 +@@ -0,0 +1,5986 @@
739 +intel_fake_agp_alloc_by_type_1 intel_fake_agp_alloc_by_type 1 1 NULL
740 +ocfs2_get_refcount_tree_3 ocfs2_get_refcount_tree 0 3 NULL
741 +storvsc_connect_to_vsp_22 storvsc_connect_to_vsp 2 22 NULL
742 @@ -113993,6 +114192,7 @@ index 0000000..41777a8
743 +zlib_deflate_workspacesize_537 zlib_deflate_workspacesize 0-1-2 537 NULL
744 +iwl_dbgfs_wowlan_sram_read_540 iwl_dbgfs_wowlan_sram_read 3 540 NULL
745 +sco_sock_setsockopt_552 sco_sock_setsockopt 5 552 NULL
746 ++lpfc_nlp_state_name_556 lpfc_nlp_state_name 2 556 NULL
747 +snd_aw2_saa7146_get_hw_ptr_playback_558 snd_aw2_saa7146_get_hw_ptr_playback 0 558 NULL
748 +start_isoc_chain_565 start_isoc_chain 2 565 NULL nohasharray
749 +dev_hard_header_565 dev_hard_header 0 565 &start_isoc_chain_565
750 @@ -114008,7 +114208,7 @@ index 0000000..41777a8
751 +unlink_queued_645 unlink_queued 4 645 NULL
752 +dtim_interval_read_654 dtim_interval_read 3 654 NULL
753 +mem_rx_free_mem_blks_read_675 mem_rx_free_mem_blks_read 3 675 NULL
754 -+persistent_ram_vmap_709 persistent_ram_vmap 2-1 709 NULL
755 ++persistent_ram_vmap_709 persistent_ram_vmap 1-2 709 NULL
756 +xfs_bmap_eof_728 xfs_bmap_eof 0 728 NULL
757 +sctp_setsockopt_peer_addr_params_734 sctp_setsockopt_peer_addr_params 3 734 NULL
758 +dvb_video_write_754 dvb_video_write 3 754 NULL
759 @@ -114022,6 +114222,7 @@ index 0000000..41777a8
760 +snd_pcm_action_single_905 snd_pcm_action_single 0 905 NULL
761 +carl9170_cmd_buf_950 carl9170_cmd_buf 3 950 NULL
762 +__nodes_weight_956 __nodes_weight 2-0 956 NULL
763 ++bnx2x_fill_fw_str_968 bnx2x_fill_fw_str 3 968 NULL
764 +mnt_want_write_975 mnt_want_write 0 975 NULL
765 +usnic_ib_qp_grp_dump_hdr_989 usnic_ib_qp_grp_dump_hdr 2 989 NULL
766 +memcmp_990 memcmp 0 990 NULL
767 @@ -114076,6 +114277,7 @@ index 0000000..41777a8
768 +ath6kl_init_get_fwcaps_1557 ath6kl_init_get_fwcaps 3 1557 NULL
769 +ffs_mutex_lock_1564 ffs_mutex_lock 0 1564 NULL
770 +ieee80211_if_read_dot11MeshHWMPnetDiameterTraversalTime_1589 ieee80211_if_read_dot11MeshHWMPnetDiameterTraversalTime 3 1589 NULL
771 ++ipath_ht_handle_hwerrors_1592 ipath_ht_handle_hwerrors 3 1592 NULL
772 +packet_buffer_init_1607 packet_buffer_init 2 1607 NULL
773 +btmrvl_hscmd_read_1614 btmrvl_hscmd_read 3 1614 NULL
774 +v9fs_fid_xattr_get_1618 v9fs_fid_xattr_get 0 1618 NULL
775 @@ -114398,6 +114600,7 @@ index 0000000..41777a8
776 +blk_rq_sectors_5091 blk_rq_sectors 0 5091 &get_random_bytes_5091
777 +sound_write_5102 sound_write 3 5102 NULL
778 +i40e_dbg_netdev_ops_write_5117 i40e_dbg_netdev_ops_write 3 5117 NULL
779 ++qib_7220_handle_hwerrors_5142 qib_7220_handle_hwerrors 3 5142 NULL
780 +__uwb_addr_print_5161 __uwb_addr_print 2 5161 NULL
781 +iwl_dbgfs_status_read_5171 iwl_dbgfs_status_read 3 5171 NULL
782 +acpi_pcc_get_sqty_5176 acpi_pcc_get_sqty 0 5176 NULL
783 @@ -114558,6 +114761,7 @@ index 0000000..41777a8
784 +beacon_interval_read_7091 beacon_interval_read 3 7091 NULL
785 +pipeline_enc_rx_stat_fifo_int_read_7107 pipeline_enc_rx_stat_fifo_int_read 3 7107 NULL
786 +osc_resend_count_seq_write_7120 osc_resend_count_seq_write 3 7120 NULL
787 ++qib_format_hwerrors_7133 qib_format_hwerrors 5 7133 NULL
788 +kvm_mmu_notifier_test_young_7139 kvm_mmu_notifier_test_young 3 7139 NULL
789 +__alloc_objio_seg_7203 __alloc_objio_seg 1 7203 NULL
790 +hdlc_loop_7255 hdlc_loop 0 7255 NULL
791 @@ -114776,6 +114980,7 @@ index 0000000..41777a8
792 +crypt_status_9492 crypt_status 5 9492 NULL
793 +lbs_threshold_write_9502 lbs_threshold_write 5 9502 NULL
794 +lp_write_9511 lp_write 3 9511 NULL
795 ++mext_calc_swap_extents_9517 mext_calc_swap_extents 4 9517 NULL
796 +scsi_tgt_kspace_exec_9522 scsi_tgt_kspace_exec 8 9522 NULL
797 +ll_max_read_ahead_whole_mb_seq_write_9528 ll_max_read_ahead_whole_mb_seq_write 3 9528 NULL
798 +read_file_dma_9530 read_file_dma 3 9530 NULL
799 @@ -114826,6 +115031,7 @@ index 0000000..41777a8
800 +bm_register_write_9893 bm_register_write 3 9893 &snd_midi_event_new_9893
801 +snd_gf1_pcm_playback_copy_9895 snd_gf1_pcm_playback_copy 5-3 9895 NULL
802 +nonpaging_page_fault_9908 nonpaging_page_fault 2 9908 NULL
803 ++root_nfs_parse_options_9937 root_nfs_parse_options 3 9937 NULL
804 +pstore_ftrace_knob_read_9947 pstore_ftrace_knob_read 3 9947 NULL
805 +read_file_misc_9948 read_file_misc 3 9948 NULL
806 +csum_partial_copy_fromiovecend_9957 csum_partial_copy_fromiovecend 3-4 9957 NULL
807 @@ -114929,8 +115135,8 @@ index 0000000..41777a8
808 +kvm_write_guest_cached_11106 kvm_write_guest_cached 4 11106 NULL
809 +tw_change_queue_depth_11116 tw_change_queue_depth 2 11116 NULL
810 +page_offset_11120 page_offset 0 11120 NULL
811 -+tracing_buffers_read_11124 tracing_buffers_read 3 11124 NULL nohasharray
812 -+cea_db_payload_len_11124 cea_db_payload_len 0 11124 &tracing_buffers_read_11124
813 ++cea_db_payload_len_11124 cea_db_payload_len 0 11124 NULL nohasharray
814 ++tracing_buffers_read_11124 tracing_buffers_read 3 11124 &cea_db_payload_len_11124
815 +snd_gf1_pcm_playback_silence_11172 snd_gf1_pcm_playback_silence 4-3 11172 NULL
816 +il_dbgfs_rx_queue_read_11221 il_dbgfs_rx_queue_read 3 11221 NULL
817 +comedi_alloc_spriv_11234 comedi_alloc_spriv 2 11234 NULL
818 @@ -114945,7 +115151,7 @@ index 0000000..41777a8
819 +construct_key_11329 construct_key 3 11329 NULL nohasharray
820 +__kfifo_out_peek_11329 __kfifo_out_peek 0-3 11329 &construct_key_11329
821 +next_segment_11330 next_segment 0-2-1 11330 NULL
822 -+persistent_ram_buffer_map_11332 persistent_ram_buffer_map 1-2 11332 NULL
823 ++persistent_ram_buffer_map_11332 persistent_ram_buffer_map 2-1 11332 NULL
824 +ext4_get_inline_size_11349 ext4_get_inline_size 0 11349 NULL
825 +sel_write_create_11353 sel_write_create 3 11353 NULL nohasharray
826 +nl80211_send_mgmt_11353 nl80211_send_mgmt 7 11353 &sel_write_create_11353
827 @@ -115170,6 +115376,7 @@ index 0000000..41777a8
828 +packet_snd_13634 packet_snd 3 13634 NULL
829 +blk_msg_write_13655 blk_msg_write 3 13655 NULL
830 +cache_downcall_13666 cache_downcall 3 13666 NULL
831 ++ext3_xattr_list_entries_13682 ext3_xattr_list_entries 0 13682 NULL
832 +usb_get_string_13693 usb_get_string 0 13693 NULL
833 +fw_iso_buffer_alloc_13704 fw_iso_buffer_alloc 2 13704 NULL
834 +audit_unpack_string_13748 audit_unpack_string 3 13748 NULL
835 @@ -115242,6 +115449,7 @@ index 0000000..41777a8
836 +ath6kl_regdump_read_14393 ath6kl_regdump_read 3 14393 NULL
837 +smk_write_onlycap_14400 smk_write_onlycap 3 14400 NULL
838 +mtd_concat_create_14416 mtd_concat_create 2 14416 NULL
839 ++get_kcore_size_14425 get_kcore_size 0 14425 NULL
840 +_iwl_dbgfs_sram_write_14439 _iwl_dbgfs_sram_write 3 14439 NULL
841 +block_size_14443 block_size 0 14443 NULL
842 +lmv_user_md_size_14456 lmv_user_md_size 0-1 14456 NULL
843 @@ -115273,6 +115481,7 @@ index 0000000..41777a8
844 +persistent_ram_ecc_string_14704 persistent_ram_ecc_string 0 14704 NULL
845 +u_audio_playback_14709 u_audio_playback 3 14709 NULL
846 +rtw_cbuf_alloc_14710 rtw_cbuf_alloc 1 14710 NULL
847 ++cgroup_path_14713 cgroup_path 3 14713 NULL
848 +vfd_write_14717 vfd_write 3 14717 NULL
849 +__blk_end_request_14729 __blk_end_request 3 14729 NULL
850 +raid1_resize_14740 raid1_resize 2 14740 NULL
851 @@ -115286,6 +115495,7 @@ index 0000000..41777a8
852 +__kfifo_in_14797 __kfifo_in 3-0 14797 NULL
853 +hpet_readl_14801 hpet_readl 0 14801 NULL nohasharray
854 +snd_als300_gcr_read_14801 snd_als300_gcr_read 0 14801 &hpet_readl_14801
855 ++security_inode_rename_14805 security_inode_rename 0 14805 NULL
856 +xfs_btree_kill_iroot_14824 xfs_btree_kill_iroot 0 14824 NULL
857 +mrp_attr_create_14853 mrp_attr_create 3 14853 NULL
858 +lcd_write_14857 lcd_write 3 14857 NULL
859 @@ -115554,6 +115764,7 @@ index 0000000..41777a8
860 +gnttab_max_grant_frames_17993 gnttab_max_grant_frames 0 17993 NULL
861 +pvr2_v4l2_read_18006 pvr2_v4l2_read 3 18006 NULL
862 +alloc_rx_desc_ring_18016 alloc_rx_desc_ring 2 18016 NULL
863 ++cpufreq_add_dev_symlink_18028 cpufreq_add_dev_symlink 0 18028 NULL
864 +o2hb_highest_node_18034 o2hb_highest_node 0 18034 NULL
865 +cryptd_alloc_instance_18048 cryptd_alloc_instance 2-3 18048 NULL
866 +__btrfs_drop_extents_18049 __btrfs_drop_extents 5 18049 NULL
867 @@ -115743,22 +115954,25 @@ index 0000000..41777a8
868 +iwl_dbgfs_rx_queue_read_19943 iwl_dbgfs_rx_queue_read 3 19943 NULL
869 +cfg80211_rx_assoc_resp_19944 cfg80211_rx_assoc_resp 4 19944 NULL
870 +ll_xattr_cache_list_19954 ll_xattr_cache_list 0 19954 NULL
871 ++get_jack_mode_name_19976 get_jack_mode_name 4 19976 NULL
872 +attach_hdlc_protocol_19986 attach_hdlc_protocol 3 19986 NULL
873 +rtw_set_wps_probe_resp_19989 rtw_set_wps_probe_resp 3 19989 NULL
874 +diva_um_idi_read_20003 diva_um_idi_read 0 20003 NULL
875 -+event_trigger_write_20009 event_trigger_write 3 20009 NULL nohasharray
876 -+lov_stripe_md_size_20009 lov_stripe_md_size 0-1 20009 &event_trigger_write_20009
877 ++lov_stripe_md_size_20009 lov_stripe_md_size 0-1 20009 NULL nohasharray
878 ++event_trigger_write_20009 event_trigger_write 3 20009 &lov_stripe_md_size_20009
879 +tree_mod_log_eb_move_20011 tree_mod_log_eb_move 5 20011 NULL
880 +SYSC_fgetxattr_20027 SYSC_fgetxattr 4 20027 NULL
881 +split_scan_timeout_read_20029 split_scan_timeout_read 3 20029 NULL
882 +alloc_ieee80211_20063 alloc_ieee80211 1 20063 NULL
883 +iwl_mvm_power_mac_dbgfs_read_20067 iwl_mvm_power_mac_dbgfs_read 4 20067 NULL
884 ++target_message_20072 target_message 2 20072 NULL
885 +rawv6_sendmsg_20080 rawv6_sendmsg 4 20080 NULL
886 +fuse_conn_limit_read_20084 fuse_conn_limit_read 3 20084 NULL
887 +aat2870_reg_write_file_20086 aat2870_reg_write_file 3 20086 NULL
888 +team_options_register_20091 team_options_register 3 20091 NULL
889 +qla2x00_adjust_sdev_qdepth_up_20097 qla2x00_adjust_sdev_qdepth_up 2 20097 NULL
890 +xfs_qm_dqget_20103 xfs_qm_dqget 0 20103 NULL
891 ++root_nfs_copy_20111 root_nfs_copy 3 20111 NULL
892 +hptiop_adjust_disk_queue_depth_20122 hptiop_adjust_disk_queue_depth 2 20122 NULL
893 +tomoyo_commit_ok_20167 tomoyo_commit_ok 2 20167 NULL
894 +read_flush_pipefs_20171 read_flush_pipefs 3 20171 NULL
895 @@ -115829,6 +116043,7 @@ index 0000000..41777a8
896 +uvc_alloc_entity_20836 uvc_alloc_entity 4-3 20836 NULL
897 +p9_tag_alloc_20845 p9_tag_alloc 3 20845 NULL
898 +nvme_trans_supported_vpd_pages_20847 nvme_trans_supported_vpd_pages 4 20847 NULL
899 ++get_name_20855 get_name 4 20855 NULL
900 +iwl_dbgfs_pm_params_read_20866 iwl_dbgfs_pm_params_read 3 20866 NULL
901 +snd_pcm_capture_avail_20867 snd_pcm_capture_avail 0 20867 NULL
902 +srq_free_res_20868 srq_free_res 5 20868 NULL
903 @@ -115854,6 +116069,7 @@ index 0000000..41777a8
904 +lbs_threshold_read_21046 lbs_threshold_read 5 21046 NULL
905 +reiserfs_direct_IO_21051 reiserfs_direct_IO 4 21051 NULL
906 +proc_fault_inject_write_21058 proc_fault_inject_write 3 21058 NULL
907 ++qdisc_get_default_21072 qdisc_get_default 2 21072 NULL
908 +event_calibration_read_21083 event_calibration_read 3 21083 NULL
909 +bl_add_page_to_bio_21094 bl_add_page_to_bio 2 21094 NULL nohasharray
910 +multipath_status_21094 multipath_status 5 21094 &bl_add_page_to_bio_21094
911 @@ -116110,8 +116326,8 @@ index 0000000..41777a8
912 +bin_to_hex_dup_23853 bin_to_hex_dup 2 23853 NULL
913 +ocfs2_xattr_get_clusters_23857 ocfs2_xattr_get_clusters 0 23857 NULL
914 +ieee80211_if_read_dot11MeshMaxPeerLinks_23878 ieee80211_if_read_dot11MeshMaxPeerLinks 3 23878 NULL
915 -+writeback_single_inode_23881 writeback_single_inode 0 23881 NULL nohasharray
916 -+nouveau_clock_create__23881 nouveau_clock_create_ 5 23881 &writeback_single_inode_23881
917 ++nouveau_clock_create__23881 nouveau_clock_create_ 5 23881 NULL nohasharray
918 ++writeback_single_inode_23881 writeback_single_inode 0 23881 &nouveau_clock_create__23881
919 +tipc_snprintf_23893 tipc_snprintf 2-0 23893 NULL
920 +add_new_gdb_meta_bg_23911 add_new_gdb_meta_bg 3 23911 NULL nohasharray
921 +ieee80211_if_read_hw_queues_23911 ieee80211_if_read_hw_queues 3 23911 &add_new_gdb_meta_bg_23911
922 @@ -116221,8 +116437,8 @@ index 0000000..41777a8
923 +__vxge_hw_vp_initialize_24885 __vxge_hw_vp_initialize 2 24885 NULL
924 +xfs_qm_dqattach_24898 xfs_qm_dqattach 0 24898 NULL
925 +codec_list_read_file_24910 codec_list_read_file 3 24910 NULL
926 -+__btrfs_free_extent_24927 __btrfs_free_extent 7 24927 NULL nohasharray
927 -+v4l2_ctrl_new_24927 v4l2_ctrl_new 7 24927 &__btrfs_free_extent_24927
928 ++v4l2_ctrl_new_24927 v4l2_ctrl_new 7 24927 NULL nohasharray
929 ++__btrfs_free_extent_24927 __btrfs_free_extent 7 24927 &v4l2_ctrl_new_24927
930 +ocfs2_fiemap_24949 ocfs2_fiemap 4-3 24949 NULL
931 +packet_sendmsg_24954 packet_sendmsg 4 24954 NULL
932 +twl_i2c_write_u8_24976 twl_i2c_write_u8 3 24976 NULL
933 @@ -116238,6 +116454,7 @@ index 0000000..41777a8
934 +ll_track_pid_seq_write_25068 ll_track_pid_seq_write 3 25068 NULL
935 +SYSC_listxattr_25072 SYSC_listxattr 3 25072 NULL
936 +ima_appraise_measurement_25093 ima_appraise_measurement 6 25093 NULL
937 ++blkg_path_25099 blkg_path 3 25099 NULL
938 +snd_rawmidi_kernel_write_25106 snd_rawmidi_kernel_write 3 25106 NULL
939 +gfs2_quota_check_25130 gfs2_quota_check 0 25130 NULL
940 +ipath_init_qp_table_25167 ipath_init_qp_table 2 25167 NULL
941 @@ -116259,6 +116476,7 @@ index 0000000..41777a8
942 +dai_list_read_file_25421 dai_list_read_file 3 25421 NULL
943 +xfs_qm_dqtobp_25448 xfs_qm_dqtobp 0 25448 NULL
944 +generic_file_buffered_write_25464 generic_file_buffered_write 4-0-7 25464 NULL
945 ++ipath_decode_err_25468 ipath_decode_err 3 25468 NULL
946 +crypto_hash_digestsize_25469 crypto_hash_digestsize 0 25469 NULL
947 +ivtv_buf_copy_from_user_25502 ivtv_buf_copy_from_user 4-0 25502 NULL
948 +snd_pcm_plugin_build_25505 snd_pcm_plugin_build 5 25505 NULL
949 @@ -116458,8 +116676,10 @@ index 0000000..41777a8
950 +sky2_pci_read16_27863 sky2_pci_read16 0 27863 NULL
951 +ieee80211_if_read_dot11MeshHWMProotInterval_27873 ieee80211_if_read_dot11MeshHWMProotInterval 3 27873 NULL
952 +unix_seqpacket_sendmsg_27893 unix_seqpacket_sendmsg 4 27893 NULL
953 -+tracing_clock_write_27961 tracing_clock_write 3 27961 NULL nohasharray
954 -+bio_next_split_27961 bio_next_split 2 27961 &tracing_clock_write_27961
955 ++check_mapped_name_27943 check_mapped_name 3 27943 NULL
956 ++bio_next_split_27961 bio_next_split 2 27961 NULL nohasharray
957 ++tracing_clock_write_27961 tracing_clock_write 3 27961 &bio_next_split_27961
958 ++security_path_chown_27966 security_path_chown 0 27966 NULL
959 +tipc_media_addr_printf_27971 tipc_media_addr_printf 2 27971 NULL
960 +device_register_27972 device_register 0 27972 NULL nohasharray
961 +mic_rx_pkts_read_27972 mic_rx_pkts_read 3 27972 &device_register_27972
962 @@ -116500,6 +116720,7 @@ index 0000000..41777a8
963 +kstrtos16_from_user_28300 kstrtos16_from_user 2 28300 NULL
964 +nouveau_compat_ioctl_28305 nouveau_compat_ioctl 2 28305 NULL
965 +snd_pcm_oss_read_28317 snd_pcm_oss_read 3 28317 NULL
966 ++security_inode_link_28327 security_inode_link 0 28327 NULL
967 +generic_write_checks_28329 generic_write_checks 0 28329 NULL
968 +bm_entry_write_28338 bm_entry_write 3 28338 NULL
969 +tcp_copy_to_iovec_28344 tcp_copy_to_iovec 3 28344 NULL
970 @@ -116532,6 +116753,7 @@ index 0000000..41777a8
971 +kfifo_unused_28612 kfifo_unused 0 28612 NULL
972 +snd_nm256_capture_copy_28622 snd_nm256_capture_copy 5-3 28622 NULL
973 +setup_usemap_28636 setup_usemap 3-4 28636 NULL
974 ++qib_handle_6120_hwerrors_28642 qib_handle_6120_hwerrors 3 28642 NULL
975 +xfs_bmap_finish_28644 xfs_bmap_finish 0 28644 NULL
976 +p9_fcall_alloc_28652 p9_fcall_alloc 1 28652 NULL
977 +read_nic_io_byte_28654 read_nic_io_byte 0 28654 NULL
978 @@ -116615,6 +116837,7 @@ index 0000000..41777a8
979 +leaf_dealloc_29566 leaf_dealloc 3 29566 NULL
980 +kvm_read_guest_virt_system_29569 kvm_read_guest_virt_system 4-2 29569 NULL
981 +lbs_lowsnr_read_29571 lbs_lowsnr_read 3 29571 NULL
982 ++security_path_chmod_29578 security_path_chmod 0 29578 NULL
983 +iwl_dbgfs_missed_beacon_write_29586 iwl_dbgfs_missed_beacon_write 3 29586 NULL
984 +pvr2_hdw_report_unlocked_29589 pvr2_hdw_report_unlocked 4-0 29589 NULL
985 +dio_set_defer_completion_29599 dio_set_defer_completion 0 29599 NULL
986 @@ -116769,6 +116992,7 @@ index 0000000..41777a8
987 +uvc_simplify_fraction_31303 uvc_simplify_fraction 3 31303 NULL
988 +sisusbcon_scroll_31315 sisusbcon_scroll 5-2-3 31315 NULL
989 +command_file_write_31318 command_file_write 3 31318 NULL
990 ++hwerr_crcbits_31334 hwerr_crcbits 4 31334 NULL
991 +radix_tree_insert_31336 radix_tree_insert 0 31336 NULL
992 +em28xx_init_usb_xfer_31337 em28xx_init_usb_xfer 4-6 31337 NULL
993 +outlen_write_31358 outlen_write 3 31358 NULL
994 @@ -117111,6 +117335,7 @@ index 0000000..41777a8
995 +btrfs_super_chunk_root_34925 btrfs_super_chunk_root 0 34925 NULL nohasharray
996 +__inode_permission_34925 __inode_permission 0 34925 &btrfs_super_chunk_root_34925
997 +ceph_aio_write_34930 ceph_aio_write 4 34930 NULL
998 ++sec_flags2str_34933 sec_flags2str 3 34933 NULL
999 +snd_info_entry_read_34938 snd_info_entry_read 3 34938 NULL
1000 +i2c_transfer_34958 i2c_transfer 0 34958 NULL
1001 +do_add_page_to_bio_34974 do_add_page_to_bio 2-10 34974 NULL
1002 @@ -117333,7 +117558,8 @@ index 0000000..41777a8
1003 +ext3_direct_IO_37308 ext3_direct_IO 4 37308 NULL
1004 +jffs2_write_dirent_37311 jffs2_write_dirent 5 37311 NULL
1005 +send_msg_37323 send_msg 4 37323 NULL
1006 -+l2cap_create_connless_pdu_37327 l2cap_create_connless_pdu 3 37327 NULL
1007 ++l2cap_create_connless_pdu_37327 l2cap_create_connless_pdu 3 37327 NULL nohasharray
1008 ++bnx2x_vf_fill_fw_str_37327 bnx2x_vf_fill_fw_str 3 37327 &l2cap_create_connless_pdu_37327
1009 +scsi_mode_select_37330 scsi_mode_select 6 37330 NULL
1010 +rxrpc_server_sendmsg_37331 rxrpc_server_sendmsg 4 37331 NULL
1011 +xfs_iomap_write_allocate_37336 xfs_iomap_write_allocate 0 37336 NULL
1012 @@ -117504,8 +117730,9 @@ index 0000000..41777a8
1013 +qcam_read_bytes_39205 qcam_read_bytes 0 39205 NULL
1014 +ivtv_v4l2_write_39226 ivtv_v4l2_write 3 39226 NULL
1015 +posix_acl_to_xattr_39237 posix_acl_to_xattr 0 39237 NULL
1016 -+pwr_cont_miss_bcns_spread_read_39250 pwr_cont_miss_bcns_spread_read 3 39250 NULL nohasharray
1017 -+r128_compat_ioctl_39250 r128_compat_ioctl 2 39250 &pwr_cont_miss_bcns_spread_read_39250
1018 ++snd_pcm_capture_forward_39248 snd_pcm_capture_forward 2 39248 NULL
1019 ++r128_compat_ioctl_39250 r128_compat_ioctl 2 39250 NULL nohasharray
1020 ++pwr_cont_miss_bcns_spread_read_39250 pwr_cont_miss_bcns_spread_read 3 39250 &r128_compat_ioctl_39250
1021 +i915_error_state_read_39254 i915_error_state_read 3 39254 NULL
1022 +rx_filter_protection_filter_read_39282 rx_filter_protection_filter_read 3 39282 NULL
1023 +_iwl_dbgfs_pm_params_write_39325 _iwl_dbgfs_pm_params_write 3 39325 NULL
1024 @@ -117569,6 +117796,7 @@ index 0000000..41777a8
1025 +broadsheetfb_write_39976 broadsheetfb_write 3 39976 NULL
1026 +mthca_array_init_39987 mthca_array_init 2 39987 NULL
1027 +fw_device_op_read_39990 fw_device_op_read 3 39990 NULL
1028 ++server_name2svname_39998 server_name2svname 4 39998 NULL
1029 +xen_hvm_config_40018 xen_hvm_config 2 40018 NULL
1030 +ivtvfb_write_40023 ivtvfb_write 3 40023 NULL
1031 +disc_pwup_write_40027 disc_pwup_write 3 40027 NULL
1032 @@ -117638,7 +117866,7 @@ index 0000000..41777a8
1033 +pg_write_40766 pg_write 3 40766 NULL
1034 +kernfs_fop_read_40770 kernfs_fop_read 3 40770 NULL
1035 +show_list_40775 show_list 3-0 40775 NULL
1036 -+kfifo_out_copy_r_40784 kfifo_out_copy_r 0-3 40784 NULL
1037 ++kfifo_out_copy_r_40784 kfifo_out_copy_r 3-0 40784 NULL
1038 +bitmap_weight_40791 bitmap_weight 0-2 40791 NULL
1039 +pyra_sysfs_read_40795 pyra_sysfs_read 6 40795 NULL
1040 +add_action_40811 add_action 4 40811 NULL
1041 @@ -117722,6 +117950,7 @@ index 0000000..41777a8
1042 +rx_rx_pre_complt_read_41653 rx_rx_pre_complt_read 3 41653 NULL
1043 +get_std_timing_41654 get_std_timing 0 41654 NULL
1044 +ieee80211_if_fmt_bssid_41677 ieee80211_if_fmt_bssid 3 41677 NULL
1045 ++fill_pcm_stream_name_41685 fill_pcm_stream_name 2 41685 NULL
1046 +lov_unpackmd_41701 lov_unpackmd 4 41701 NULL
1047 +apei_exec_for_each_entry_41717 apei_exec_for_each_entry 0 41717 NULL
1048 +fillonedir_41746 fillonedir 3 41746 NULL
1049 @@ -117891,6 +118120,7 @@ index 0000000..41777a8
1050 +tx_frag_failed_read_43540 tx_frag_failed_read 3 43540 NULL
1051 +request_resource_43548 request_resource 0 43548 NULL
1052 +rpc_malloc_43573 rpc_malloc 2 43573 NULL
1053 ++handle_frequent_errors_43599 handle_frequent_errors 4 43599 NULL
1054 +lpfc_idiag_drbacc_read_reg_43606 lpfc_idiag_drbacc_read_reg 0-3 43606 NULL
1055 +proc_read_43614 proc_read 3 43614 NULL
1056 +disable_dma_on_even_43618 disable_dma_on_even 0 43618 NULL
1057 @@ -117960,6 +118190,7 @@ index 0000000..41777a8
1058 +rts_threshold_read_44384 rts_threshold_read 3 44384 NULL
1059 +mtip_hw_read_flags_44396 mtip_hw_read_flags 3 44396 NULL
1060 +aoedev_flush_44398 aoedev_flush 2 44398 NULL
1061 ++strlcpy_44400 strlcpy 3 44400 NULL
1062 +drm_buffer_alloc_44405 drm_buffer_alloc 2 44405 NULL
1063 +osst_do_scsi_44410 osst_do_scsi 4 44410 NULL
1064 +ieee80211_if_read_rc_rateidx_mcs_mask_5ghz_44423 ieee80211_if_read_rc_rateidx_mcs_mask_5ghz 3 44423 NULL
1065 @@ -118072,7 +118303,8 @@ index 0000000..41777a8
1066 +unix_dgram_sendmsg_45699 unix_dgram_sendmsg 4 45699 NULL nohasharray
1067 +bscnl_emit_45699 bscnl_emit 2-5-0 45699 &unix_dgram_sendmsg_45699
1068 +sg_proc_write_adio_45704 sg_proc_write_adio 3 45704 NULL
1069 -+snd_cs46xx_io_read_45734 snd_cs46xx_io_read 5 45734 NULL
1070 ++snd_cs46xx_io_read_45734 snd_cs46xx_io_read 5 45734 NULL nohasharray
1071 ++task_cgroup_path_45734 task_cgroup_path 3 45734 &snd_cs46xx_io_read_45734
1072 +rw_copy_check_uvector_45748 rw_copy_check_uvector 3-0 45748 NULL nohasharray
1073 +v4l2_ctrl_new_std_45748 v4l2_ctrl_new_std 5 45748 &rw_copy_check_uvector_45748
1074 +lkdtm_debugfs_read_45752 lkdtm_debugfs_read 3 45752 NULL
1075 @@ -118151,7 +118383,7 @@ index 0000000..41777a8
1076 +snd_compr_write_data_46592 snd_compr_write_data 3 46592 NULL
1077 +il3945_stats_flag_46606 il3945_stats_flag 0-3 46606 NULL
1078 +vscnprintf_46617 vscnprintf 0-2 46617 NULL
1079 -+__kfifo_out_r_46623 __kfifo_out_r 0-3 46623 NULL
1080 ++__kfifo_out_r_46623 __kfifo_out_r 3-0 46623 NULL
1081 +request_key_async_with_auxdata_46624 request_key_async_with_auxdata 4 46624 NULL
1082 +pci_enable_device_46642 pci_enable_device 0 46642 NULL
1083 +vfs_getxattr_alloc_46649 vfs_getxattr_alloc 0 46649 NULL
1084 @@ -118186,12 +118418,14 @@ index 0000000..41777a8
1085 +SYSC_poll_46965 SYSC_poll 2 46965 NULL
1086 +crypto_tfm_alg_alignmask_46971 crypto_tfm_alg_alignmask 0 46971 NULL
1087 +mgmt_pending_add_46976 mgmt_pending_add 5 46976 NULL
1088 ++strlcat_46985 strlcat 3 46985 NULL
1089 +bitmap_file_clear_bit_46990 bitmap_file_clear_bit 2 46990 NULL
1090 +sel_write_bool_46996 sel_write_bool 3 46996 NULL
1091 +blk_rq_map_kern_47004 blk_rq_map_kern 4 47004 NULL
1092 +cx231xx_init_bulk_47024 cx231xx_init_bulk 3-2-4 47024 NULL
1093 +fs_path_len_47060 fs_path_len 0 47060 NULL
1094 +event_trigger_regex_write_47067 event_trigger_regex_write 3 47067 NULL
1095 ++ext4_xattr_list_entries_47070 ext4_xattr_list_entries 0 47070 NULL
1096 +pipeline_dec_packet_in_read_47076 pipeline_dec_packet_in_read 3 47076 NULL
1097 +scsi_deactivate_tcq_47086 scsi_deactivate_tcq 2 47086 NULL
1098 +iwl_dump_nic_event_log_47089 iwl_dump_nic_event_log 0 47089 NULL
1099 @@ -118246,7 +118480,8 @@ index 0000000..41777a8
1100 +twl4030_clear_set_47624 twl4030_clear_set 4 47624 NULL
1101 +ccp_sha_setkey_47633 ccp_sha_setkey 3 47633 NULL
1102 +get_size_47644 get_size 1-2 47644 NULL
1103 -+packet_recvmsg_47700 packet_recvmsg 4 47700 NULL
1104 ++packet_recvmsg_47700 packet_recvmsg 4 47700 NULL nohasharray
1105 ++ipath_format_hwmsg_47700 ipath_format_hwmsg 2 47700 &packet_recvmsg_47700
1106 +save_microcode_47717 save_microcode 3 47717 NULL
1107 +bits_to_user_47733 bits_to_user 2-3 47733 NULL
1108 +carl9170_debugfs_read_47738 carl9170_debugfs_read 3 47738 NULL
1109 @@ -118267,6 +118502,7 @@ index 0000000..41777a8
1110 +cfs_percpt_alloc_47918 cfs_percpt_alloc 2 47918 NULL
1111 +comedi_write_47926 comedi_write 3 47926 NULL
1112 +nvme_trans_get_blk_desc_len_47946 nvme_trans_get_blk_desc_len 0-2 47946 NULL
1113 ++gether_get_ifname_47972 gether_get_ifname 3 47972 NULL
1114 +mempool_resize_47983 mempool_resize 2 47983 NULL nohasharray
1115 +iwl_dbgfs_ucode_tracing_read_47983 iwl_dbgfs_ucode_tracing_read 3 47983 &mempool_resize_47983
1116 +dbg_port_buf_47990 dbg_port_buf 2 47990 NULL
1117 @@ -118319,6 +118555,7 @@ index 0000000..41777a8
1118 +print_filtered_48442 print_filtered 2-0 48442 NULL
1119 +tun_recvmsg_48463 tun_recvmsg 4 48463 NULL
1120 +compat_SyS_preadv64_48469 compat_SyS_preadv64 3 48469 NULL
1121 ++ipath_format_hwerrors_48487 ipath_format_hwerrors 5 48487 NULL
1122 +r8712_usbctrl_vendorreq_48489 r8712_usbctrl_vendorreq 6 48489 NULL
1123 +send_control_msg_48498 send_control_msg 6 48498 NULL
1124 +count_masked_bytes_48507 count_masked_bytes 0-1 48507 NULL
1125 @@ -118385,6 +118622,7 @@ index 0000000..41777a8
1126 +ath6kl_bgscan_int_write_49178 ath6kl_bgscan_int_write 3 49178 NULL
1127 +dvb_dvr_ioctl_49182 dvb_dvr_ioctl 2 49182 NULL
1128 +print_queue_49191 print_queue 4-0 49191 NULL
1129 ++root_nfs_cat_49192 root_nfs_cat 3 49192 NULL
1130 +iwl_dbgfs_ucode_general_stats_read_49199 iwl_dbgfs_ucode_general_stats_read 3 49199 NULL
1131 +il4965_rs_sta_dbgfs_stats_table_read_49206 il4965_rs_sta_dbgfs_stats_table_read 3 49206 NULL
1132 +do_jffs2_getxattr_49210 do_jffs2_getxattr 0 49210 NULL
1133 @@ -118465,6 +118703,7 @@ index 0000000..41777a8
1134 +ioread8_50049 ioread8 0 50049 NULL
1135 +fuse_conn_max_background_write_50061 fuse_conn_max_background_write 3 50061 NULL
1136 +__kfifo_dma_in_prepare_50081 __kfifo_dma_in_prepare 4 50081 NULL
1137 ++dev_set_alias_50084 dev_set_alias 3 50084 NULL
1138 +libcfs_ioctl_popdata_50087 libcfs_ioctl_popdata 3 50087 NULL
1139 +sock_setsockopt_50088 sock_setsockopt 5 50088 NULL
1140 +altera_swap_dr_50090 altera_swap_dr 2 50090 NULL
1141 @@ -118683,6 +118922,7 @@ index 0000000..41777a8
1142 +mdiobus_alloc_size_52259 mdiobus_alloc_size 1 52259 NULL
1143 +shrink_slab_52261 shrink_slab 2 52261 NULL
1144 +sisusbcon_do_font_op_52271 sisusbcon_do_font_op 9 52271 NULL
1145 ++handle_supp_msgs_52284 handle_supp_msgs 4 52284 NULL
1146 +kobject_set_name_vargs_52309 kobject_set_name_vargs 0 52309 NULL
1147 +read_file_reset_52310 read_file_reset 3 52310 NULL
1148 +request_asymmetric_key_52317 request_asymmetric_key 2-4 52317 NULL
1149 @@ -118742,6 +118982,7 @@ index 0000000..41777a8
1150 +lb_alloc_ep_req_52837 lb_alloc_ep_req 2 52837 NULL
1151 +mon_bin_get_event_52863 mon_bin_get_event 4-6 52863 NULL
1152 +twl6030_gpadc_write_52867 twl6030_gpadc_write 1 52867 NULL
1153 ++qib_decode_6120_err_52876 qib_decode_6120_err 3 52876 NULL
1154 +twlreg_write_52880 twlreg_write 3 52880 NULL
1155 +pvr2_ctrl_value_to_sym_internal_52881 pvr2_ctrl_value_to_sym_internal 5 52881 NULL
1156 +cache_read_procfs_52882 cache_read_procfs 3 52882 NULL
1157 @@ -118967,7 +119208,7 @@ index 0000000..41777a8
1158 +dbAllocDmap_55227 dbAllocDmap 0 55227 NULL
1159 +memcpy_fromiovec_55247 memcpy_fromiovec 3 55247 NULL
1160 +lbs_failcount_write_55276 lbs_failcount_write 3 55276 NULL
1161 -+persistent_ram_new_55286 persistent_ram_new 1-2 55286 NULL
1162 ++persistent_ram_new_55286 persistent_ram_new 2-1 55286 NULL
1163 +rx_streaming_interval_read_55291 rx_streaming_interval_read 3 55291 NULL
1164 +lov_get_stripecnt_55297 lov_get_stripecnt 0-3 55297 NULL
1165 +gsm_control_modem_55303 gsm_control_modem 3 55303 NULL
1166 @@ -119123,12 +119364,14 @@ index 0000000..41777a8
1167 +debug_debug3_read_56894 debug_debug3_read 3 56894 NULL
1168 +batadv_tt_update_changes_56895 batadv_tt_update_changes 3 56895 NULL
1169 +hfsplus_find_cat_56899 hfsplus_find_cat 0 56899 NULL
1170 ++strcspn_56913 strcspn 0 56913 NULL
1171 +__kfifo_out_56927 __kfifo_out 0-3 56927 NULL
1172 +journal_init_revoke_56933 journal_init_revoke 2 56933 NULL
1173 +xfs_alloc_ag_vextent_56943 xfs_alloc_ag_vextent 0 56943 NULL
1174 +nouveau_xtensa_create__56952 nouveau_xtensa_create_ 8 56952 NULL
1175 +diva_get_driver_info_56967 diva_get_driver_info 0 56967 NULL
1176 +nouveau_device_create__56984 nouveau_device_create_ 6 56984 NULL
1177 ++sptlrpc_secflags2str_56995 sptlrpc_secflags2str 3 56995 NULL
1178 +vlsi_alloc_ring_57003 vlsi_alloc_ring 3-4 57003 NULL
1179 +btrfs_super_csum_size_57004 btrfs_super_csum_size 0 57004 NULL
1180 +aircable_process_packet_57027 aircable_process_packet 4 57027 NULL
1181 @@ -119140,6 +119383,7 @@ index 0000000..41777a8
1182 +sca3000_read_data_57064 sca3000_read_data 4 57064 NULL
1183 +pcmcia_replace_cis_57066 pcmcia_replace_cis 3 57066 NULL
1184 +tracing_set_trace_write_57096 tracing_set_trace_write 3 57096 NULL
1185 ++altera_get_note_57099 altera_get_note 6 57099 NULL
1186 +hpfs_readpages_57106 hpfs_readpages 4 57106 NULL
1187 +crypto_compress_ctxsize_57109 crypto_compress_ctxsize 0 57109 NULL
1188 +cipso_v4_gentag_loc_57119 cipso_v4_gentag_loc 0 57119 NULL
1189 @@ -119153,7 +119397,7 @@ index 0000000..41777a8
1190 +rx_hw_stuck_read_57179 rx_hw_stuck_read 3 57179 NULL
1191 +hash_netnet6_expire_57191 hash_netnet6_expire 4 57191 NULL
1192 +tt3650_ci_msg_57219 tt3650_ci_msg 4 57219 NULL
1193 -+dma_fifo_alloc_57236 dma_fifo_alloc 2-3-5 57236 NULL
1194 ++dma_fifo_alloc_57236 dma_fifo_alloc 5-3-2 57236 NULL
1195 +flush_space_57241 flush_space 0 57241 NULL
1196 +rsxx_cram_write_57244 rsxx_cram_write 3 57244 NULL
1197 +ieee80211_if_fmt_tsf_57249 ieee80211_if_fmt_tsf 3 57249 NULL
1198 @@ -119214,6 +119458,7 @@ index 0000000..41777a8
1199 +ieee80211_if_fmt_dot11MeshHWMPpreqMinInterval_57762 ieee80211_if_fmt_dot11MeshHWMPpreqMinInterval 3 57762 NULL
1200 +SYSC_process_vm_writev_57776 SYSC_process_vm_writev 3-5 57776 NULL
1201 +apei_exec_collect_resources_57788 apei_exec_collect_resources 0 57788 NULL
1202 ++security_inode_unlink_57791 security_inode_unlink 0 57791 NULL
1203 +ld2_57794 ld2 0 57794 NULL
1204 +ivtv_read_57796 ivtv_read 3 57796 NULL
1205 +ion_test_ioctl_57799 ion_test_ioctl 2 57799 NULL
1206 @@ -119283,6 +119528,7 @@ index 0000000..41777a8
1207 +rndis_add_response_58544 rndis_add_response 2 58544 NULL
1208 +wep_decrypt_fail_read_58567 wep_decrypt_fail_read 3 58567 NULL
1209 +scnprint_mac_oui_58578 scnprint_mac_oui 3-0 58578 NULL
1210 ++get_rhf_errstring_58582 get_rhf_errstring 3 58582 NULL
1211 +ea_read_inline_58589 ea_read_inline 0 58589 NULL
1212 +isku_sysfs_read_keys_thumbster_58590 isku_sysfs_read_keys_thumbster 6 58590 NULL
1213 +xip_file_read_58592 xip_file_read 3 58592 NULL
1214 @@ -119337,6 +119583,7 @@ index 0000000..41777a8
1215 +ocfs2_move_extent_59187 ocfs2_move_extent 2-5 59187 NULL
1216 +xfs_ialloc_next_rec_59193 xfs_ialloc_next_rec 0 59193 NULL
1217 +xfs_iext_realloc_indirect_59211 xfs_iext_realloc_indirect 2 59211 NULL
1218 ++check_mapped_selector_name_59216 check_mapped_selector_name 5 59216 NULL
1219 +dt3155_read_59226 dt3155_read 3 59226 NULL
1220 +paging64_gpte_to_gfn_lvl_59229 paging64_gpte_to_gfn_lvl 0-1-2 59229 NULL
1221 +nla_len_59258 nla_len 0 59258 NULL
1222 @@ -119513,7 +119760,8 @@ index 0000000..41777a8
1223 +smk_read_ambient_61220 smk_read_ambient 3 61220 NULL
1224 +v9fs_mmap_file_read_61262 v9fs_mmap_file_read 3 61262 NULL
1225 +btrfs_bio_alloc_61270 btrfs_bio_alloc 3 61270 NULL nohasharray
1226 -+find_get_pages_tag_61270 find_get_pages_tag 0 61270 &btrfs_bio_alloc_61270
1227 ++find_get_pages_tag_61270 find_get_pages_tag 0 61270 &btrfs_bio_alloc_61270 nohasharray
1228 ++ifalias_store_61270 ifalias_store 4 61270 &find_get_pages_tag_61270
1229 +vortex_adbdma_getlinearpos_61283 vortex_adbdma_getlinearpos 0 61283 NULL nohasharray
1230 +hfsplus_getxattr_finder_info_61283 hfsplus_getxattr_finder_info 0 61283 &vortex_adbdma_getlinearpos_61283
1231 +nvme_trans_copy_to_user_61288 nvme_trans_copy_to_user 3 61288 NULL
1232 @@ -119550,6 +119798,7 @@ index 0000000..41777a8
1233 +resize_stripes_61650 resize_stripes 2 61650 NULL
1234 +ttm_page_pool_free_61661 ttm_page_pool_free 2-0 61661 NULL
1235 +insert_one_name_61668 insert_one_name 7 61668 NULL
1236 ++qib_format_hwmsg_61679 qib_format_hwmsg 2 61679 NULL
1237 +lock_loop_61681 lock_loop 1 61681 NULL
1238 +filter_read_61692 filter_read 3 61692 NULL
1239 +iov_length_61716 iov_length 0 61716 NULL
1240 @@ -119700,6 +119949,7 @@ index 0000000..41777a8
1241 +si5351_bulk_write_63468 si5351_bulk_write 2-3 63468 NULL
1242 +snd_info_entry_write_63474 snd_info_entry_write 3 63474 NULL
1243 +reada_find_extent_63486 reada_find_extent 2 63486 NULL
1244 ++read_kcore_63488 read_kcore 3 63488 NULL
1245 +snd_pcm_plug_write_transfer_63503 snd_pcm_plug_write_transfer 0-3 63503 NULL
1246 +efx_mcdi_rpc_async_63529 efx_mcdi_rpc_async 4-5 63529 NULL
1247 +ubi_more_leb_change_data_63534 ubi_more_leb_change_data 4 63534 NULL nohasharray
1248 @@ -119846,6 +120096,7 @@ index 0000000..41777a8
1249 +suspend_dtim_interval_read_64971 suspend_dtim_interval_read 3 64971 NULL
1250 +crypto_ahash_digestsize_65014 crypto_ahash_digestsize 0 65014 NULL
1251 +insert_dent_65034 insert_dent 7 65034 NULL
1252 ++snd_hda_get_pin_label_65035 snd_hda_get_pin_label 5 65035 NULL
1253 +ext4_ind_trans_blocks_65053 ext4_ind_trans_blocks 0-2 65053 NULL
1254 +pcibios_enable_device_65059 pcibios_enable_device 0 65059 NULL
1255 +__alloc_bootmem_node_high_65076 __alloc_bootmem_node_high 2 65076 NULL
1256 @@ -119984,7 +120235,7 @@ index 0000000..560cd7b
1257 +zpios_read_64734 zpios_read 3 64734 NULL
1258 diff --git a/tools/gcc/size_overflow_plugin/size_overflow_plugin.c b/tools/gcc/size_overflow_plugin/size_overflow_plugin.c
1259 new file mode 100644
1260 -index 0000000..0e9dcee
1261 +index 0000000..e6fe17b
1262 --- /dev/null
1263 +++ b/tools/gcc/size_overflow_plugin/size_overflow_plugin.c
1264 @@ -0,0 +1,259 @@
1265 @@ -120020,7 +120271,7 @@ index 0000000..0e9dcee
1266 +tree size_overflow_type_TI;
1267 +
1268 +static struct plugin_info size_overflow_plugin_info = {
1269 -+ .version = "20140515",
1270 ++ .version = "20140517",
1271 + .help = "no-size-overflow\tturn off size overflow checking\n",
1272 +};
1273 +
1274
1275 diff --git a/3.2.58/0000_README b/3.2.59/0000_README
1276 similarity index 97%
1277 rename from 3.2.58/0000_README
1278 rename to 3.2.59/0000_README
1279 index 5094122..e328e8d 100644
1280 --- a/3.2.58/0000_README
1281 +++ b/3.2.59/0000_README
1282 @@ -150,7 +150,11 @@ Patch: 1057_linux-3.2.58.patch
1283 From: http://www.kernel.org
1284 Desc: Linux 3.2.58
1285
1286 -Patch: 4420_grsecurity-3.0-3.2.58-201405112002.patch
1287 +Patch: 1058_linux-3.2.59.patch
1288 +From: http://www.kernel.org
1289 +Desc: Linux 3.2.59
1290 +
1291 +Patch: 4420_grsecurity-3.0-3.2.59-201405252042.patch
1292 From: http://www.grsecurity.net
1293 Desc: hardened-sources base patch from upstream grsecurity
1294
1295
1296 diff --git a/3.2.58/1021_linux-3.2.22.patch b/3.2.59/1021_linux-3.2.22.patch
1297 similarity index 100%
1298 rename from 3.2.58/1021_linux-3.2.22.patch
1299 rename to 3.2.59/1021_linux-3.2.22.patch
1300
1301 diff --git a/3.2.58/1022_linux-3.2.23.patch b/3.2.59/1022_linux-3.2.23.patch
1302 similarity index 100%
1303 rename from 3.2.58/1022_linux-3.2.23.patch
1304 rename to 3.2.59/1022_linux-3.2.23.patch
1305
1306 diff --git a/3.2.58/1023_linux-3.2.24.patch b/3.2.59/1023_linux-3.2.24.patch
1307 similarity index 100%
1308 rename from 3.2.58/1023_linux-3.2.24.patch
1309 rename to 3.2.59/1023_linux-3.2.24.patch
1310
1311 diff --git a/3.2.58/1024_linux-3.2.25.patch b/3.2.59/1024_linux-3.2.25.patch
1312 similarity index 100%
1313 rename from 3.2.58/1024_linux-3.2.25.patch
1314 rename to 3.2.59/1024_linux-3.2.25.patch
1315
1316 diff --git a/3.2.58/1025_linux-3.2.26.patch b/3.2.59/1025_linux-3.2.26.patch
1317 similarity index 100%
1318 rename from 3.2.58/1025_linux-3.2.26.patch
1319 rename to 3.2.59/1025_linux-3.2.26.patch
1320
1321 diff --git a/3.2.58/1026_linux-3.2.27.patch b/3.2.59/1026_linux-3.2.27.patch
1322 similarity index 100%
1323 rename from 3.2.58/1026_linux-3.2.27.patch
1324 rename to 3.2.59/1026_linux-3.2.27.patch
1325
1326 diff --git a/3.2.58/1027_linux-3.2.28.patch b/3.2.59/1027_linux-3.2.28.patch
1327 similarity index 100%
1328 rename from 3.2.58/1027_linux-3.2.28.patch
1329 rename to 3.2.59/1027_linux-3.2.28.patch
1330
1331 diff --git a/3.2.58/1028_linux-3.2.29.patch b/3.2.59/1028_linux-3.2.29.patch
1332 similarity index 100%
1333 rename from 3.2.58/1028_linux-3.2.29.patch
1334 rename to 3.2.59/1028_linux-3.2.29.patch
1335
1336 diff --git a/3.2.58/1029_linux-3.2.30.patch b/3.2.59/1029_linux-3.2.30.patch
1337 similarity index 100%
1338 rename from 3.2.58/1029_linux-3.2.30.patch
1339 rename to 3.2.59/1029_linux-3.2.30.patch
1340
1341 diff --git a/3.2.58/1030_linux-3.2.31.patch b/3.2.59/1030_linux-3.2.31.patch
1342 similarity index 100%
1343 rename from 3.2.58/1030_linux-3.2.31.patch
1344 rename to 3.2.59/1030_linux-3.2.31.patch
1345
1346 diff --git a/3.2.58/1031_linux-3.2.32.patch b/3.2.59/1031_linux-3.2.32.patch
1347 similarity index 100%
1348 rename from 3.2.58/1031_linux-3.2.32.patch
1349 rename to 3.2.59/1031_linux-3.2.32.patch
1350
1351 diff --git a/3.2.58/1032_linux-3.2.33.patch b/3.2.59/1032_linux-3.2.33.patch
1352 similarity index 100%
1353 rename from 3.2.58/1032_linux-3.2.33.patch
1354 rename to 3.2.59/1032_linux-3.2.33.patch
1355
1356 diff --git a/3.2.58/1033_linux-3.2.34.patch b/3.2.59/1033_linux-3.2.34.patch
1357 similarity index 100%
1358 rename from 3.2.58/1033_linux-3.2.34.patch
1359 rename to 3.2.59/1033_linux-3.2.34.patch
1360
1361 diff --git a/3.2.58/1034_linux-3.2.35.patch b/3.2.59/1034_linux-3.2.35.patch
1362 similarity index 100%
1363 rename from 3.2.58/1034_linux-3.2.35.patch
1364 rename to 3.2.59/1034_linux-3.2.35.patch
1365
1366 diff --git a/3.2.58/1035_linux-3.2.36.patch b/3.2.59/1035_linux-3.2.36.patch
1367 similarity index 100%
1368 rename from 3.2.58/1035_linux-3.2.36.patch
1369 rename to 3.2.59/1035_linux-3.2.36.patch
1370
1371 diff --git a/3.2.58/1036_linux-3.2.37.patch b/3.2.59/1036_linux-3.2.37.patch
1372 similarity index 100%
1373 rename from 3.2.58/1036_linux-3.2.37.patch
1374 rename to 3.2.59/1036_linux-3.2.37.patch
1375
1376 diff --git a/3.2.58/1037_linux-3.2.38.patch b/3.2.59/1037_linux-3.2.38.patch
1377 similarity index 100%
1378 rename from 3.2.58/1037_linux-3.2.38.patch
1379 rename to 3.2.59/1037_linux-3.2.38.patch
1380
1381 diff --git a/3.2.58/1038_linux-3.2.39.patch b/3.2.59/1038_linux-3.2.39.patch
1382 similarity index 100%
1383 rename from 3.2.58/1038_linux-3.2.39.patch
1384 rename to 3.2.59/1038_linux-3.2.39.patch
1385
1386 diff --git a/3.2.58/1039_linux-3.2.40.patch b/3.2.59/1039_linux-3.2.40.patch
1387 similarity index 100%
1388 rename from 3.2.58/1039_linux-3.2.40.patch
1389 rename to 3.2.59/1039_linux-3.2.40.patch
1390
1391 diff --git a/3.2.58/1040_linux-3.2.41.patch b/3.2.59/1040_linux-3.2.41.patch
1392 similarity index 100%
1393 rename from 3.2.58/1040_linux-3.2.41.patch
1394 rename to 3.2.59/1040_linux-3.2.41.patch
1395
1396 diff --git a/3.2.58/1041_linux-3.2.42.patch b/3.2.59/1041_linux-3.2.42.patch
1397 similarity index 100%
1398 rename from 3.2.58/1041_linux-3.2.42.patch
1399 rename to 3.2.59/1041_linux-3.2.42.patch
1400
1401 diff --git a/3.2.58/1042_linux-3.2.43.patch b/3.2.59/1042_linux-3.2.43.patch
1402 similarity index 100%
1403 rename from 3.2.58/1042_linux-3.2.43.patch
1404 rename to 3.2.59/1042_linux-3.2.43.patch
1405
1406 diff --git a/3.2.58/1043_linux-3.2.44.patch b/3.2.59/1043_linux-3.2.44.patch
1407 similarity index 100%
1408 rename from 3.2.58/1043_linux-3.2.44.patch
1409 rename to 3.2.59/1043_linux-3.2.44.patch
1410
1411 diff --git a/3.2.58/1044_linux-3.2.45.patch b/3.2.59/1044_linux-3.2.45.patch
1412 similarity index 100%
1413 rename from 3.2.58/1044_linux-3.2.45.patch
1414 rename to 3.2.59/1044_linux-3.2.45.patch
1415
1416 diff --git a/3.2.58/1045_linux-3.2.46.patch b/3.2.59/1045_linux-3.2.46.patch
1417 similarity index 100%
1418 rename from 3.2.58/1045_linux-3.2.46.patch
1419 rename to 3.2.59/1045_linux-3.2.46.patch
1420
1421 diff --git a/3.2.58/1046_linux-3.2.47.patch b/3.2.59/1046_linux-3.2.47.patch
1422 similarity index 100%
1423 rename from 3.2.58/1046_linux-3.2.47.patch
1424 rename to 3.2.59/1046_linux-3.2.47.patch
1425
1426 diff --git a/3.2.58/1047_linux-3.2.48.patch b/3.2.59/1047_linux-3.2.48.patch
1427 similarity index 100%
1428 rename from 3.2.58/1047_linux-3.2.48.patch
1429 rename to 3.2.59/1047_linux-3.2.48.patch
1430
1431 diff --git a/3.2.58/1048_linux-3.2.49.patch b/3.2.59/1048_linux-3.2.49.patch
1432 similarity index 100%
1433 rename from 3.2.58/1048_linux-3.2.49.patch
1434 rename to 3.2.59/1048_linux-3.2.49.patch
1435
1436 diff --git a/3.2.58/1049_linux-3.2.50.patch b/3.2.59/1049_linux-3.2.50.patch
1437 similarity index 100%
1438 rename from 3.2.58/1049_linux-3.2.50.patch
1439 rename to 3.2.59/1049_linux-3.2.50.patch
1440
1441 diff --git a/3.2.58/1050_linux-3.2.51.patch b/3.2.59/1050_linux-3.2.51.patch
1442 similarity index 100%
1443 rename from 3.2.58/1050_linux-3.2.51.patch
1444 rename to 3.2.59/1050_linux-3.2.51.patch
1445
1446 diff --git a/3.2.58/1051_linux-3.2.52.patch b/3.2.59/1051_linux-3.2.52.patch
1447 similarity index 100%
1448 rename from 3.2.58/1051_linux-3.2.52.patch
1449 rename to 3.2.59/1051_linux-3.2.52.patch
1450
1451 diff --git a/3.2.58/1052_linux-3.2.53.patch b/3.2.59/1052_linux-3.2.53.patch
1452 similarity index 100%
1453 rename from 3.2.58/1052_linux-3.2.53.patch
1454 rename to 3.2.59/1052_linux-3.2.53.patch
1455
1456 diff --git a/3.2.58/1053_linux-3.2.54.patch b/3.2.59/1053_linux-3.2.54.patch
1457 similarity index 100%
1458 rename from 3.2.58/1053_linux-3.2.54.patch
1459 rename to 3.2.59/1053_linux-3.2.54.patch
1460
1461 diff --git a/3.2.58/1054_linux-3.2.55.patch b/3.2.59/1054_linux-3.2.55.patch
1462 similarity index 100%
1463 rename from 3.2.58/1054_linux-3.2.55.patch
1464 rename to 3.2.59/1054_linux-3.2.55.patch
1465
1466 diff --git a/3.2.58/1055_linux-3.2.56.patch b/3.2.59/1055_linux-3.2.56.patch
1467 similarity index 100%
1468 rename from 3.2.58/1055_linux-3.2.56.patch
1469 rename to 3.2.59/1055_linux-3.2.56.patch
1470
1471 diff --git a/3.2.58/1056_linux-3.2.57.patch b/3.2.59/1056_linux-3.2.57.patch
1472 similarity index 100%
1473 rename from 3.2.58/1056_linux-3.2.57.patch
1474 rename to 3.2.59/1056_linux-3.2.57.patch
1475
1476 diff --git a/3.2.58/1057_linux-3.2.58.patch b/3.2.59/1057_linux-3.2.58.patch
1477 similarity index 100%
1478 rename from 3.2.58/1057_linux-3.2.58.patch
1479 rename to 3.2.59/1057_linux-3.2.58.patch
1480
1481 diff --git a/3.2.59/1058_linux-3.2.59.patch b/3.2.59/1058_linux-3.2.59.patch
1482 new file mode 100644
1483 index 0000000..cd59fe9
1484 --- /dev/null
1485 +++ b/3.2.59/1058_linux-3.2.59.patch
1486 @@ -0,0 +1,1213 @@
1487 +diff --git a/Makefile b/Makefile
1488 +index d59b394..1be3414 100644
1489 +--- a/Makefile
1490 ++++ b/Makefile
1491 +@@ -1,6 +1,6 @@
1492 + VERSION = 3
1493 + PATCHLEVEL = 2
1494 +-SUBLEVEL = 58
1495 ++SUBLEVEL = 59
1496 + EXTRAVERSION =
1497 + NAME = Saber-toothed Squirrel
1498 +
1499 +diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h
1500 +index d3f0a9e..506e33b 100644
1501 +--- a/arch/arm/include/asm/div64.h
1502 ++++ b/arch/arm/include/asm/div64.h
1503 +@@ -156,7 +156,7 @@
1504 + /* Select the best insn combination to perform the */ \
1505 + /* actual __m * __n / (__p << 64) operation. */ \
1506 + if (!__c) { \
1507 +- asm ( "umull %Q0, %R0, %1, %Q2\n\t" \
1508 ++ asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" \
1509 + "mov %Q0, #0" \
1510 + : "=&r" (__res) \
1511 + : "r" (__m), "r" (__n) \
1512 +diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
1513 +index 3735abd..4014d90 100644
1514 +--- a/arch/parisc/kernel/syscall_table.S
1515 ++++ b/arch/parisc/kernel/syscall_table.S
1516 +@@ -395,7 +395,7 @@
1517 + ENTRY_COMP(vmsplice)
1518 + ENTRY_COMP(move_pages) /* 295 */
1519 + ENTRY_SAME(getcpu)
1520 +- ENTRY_SAME(epoll_pwait)
1521 ++ ENTRY_COMP(epoll_pwait)
1522 + ENTRY_COMP(statfs64)
1523 + ENTRY_COMP(fstatfs64)
1524 + ENTRY_COMP(kexec_load) /* 300 */
1525 +diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
1526 +index b3f0f5a..2b662725 100644
1527 +--- a/drivers/ata/libata-core.c
1528 ++++ b/drivers/ata/libata-core.c
1529 +@@ -4718,21 +4718,26 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
1530 + static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap)
1531 + {
1532 + struct ata_queued_cmd *qc = NULL;
1533 +- unsigned int i;
1534 ++ unsigned int i, tag;
1535 +
1536 + /* no command while frozen */
1537 + if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
1538 + return NULL;
1539 +
1540 +- /* the last tag is reserved for internal command. */
1541 +- for (i = 0; i < ATA_MAX_QUEUE - 1; i++)
1542 +- if (!test_and_set_bit(i, &ap->qc_allocated)) {
1543 +- qc = __ata_qc_from_tag(ap, i);
1544 ++ for (i = 0; i < ATA_MAX_QUEUE; i++) {
1545 ++ tag = (i + ap->last_tag + 1) % ATA_MAX_QUEUE;
1546 ++
1547 ++ /* the last tag is reserved for internal command. */
1548 ++ if (tag == ATA_TAG_INTERNAL)
1549 ++ continue;
1550 ++
1551 ++ if (!test_and_set_bit(tag, &ap->qc_allocated)) {
1552 ++ qc = __ata_qc_from_tag(ap, tag);
1553 ++ qc->tag = tag;
1554 ++ ap->last_tag = tag;
1555 + break;
1556 + }
1557 +-
1558 +- if (qc)
1559 +- qc->tag = i;
1560 ++ }
1561 +
1562 + return qc;
1563 + }
1564 +diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
1565 +index 7a90d4a..6d0f3e1 100644
1566 +--- a/drivers/block/floppy.c
1567 ++++ b/drivers/block/floppy.c
1568 +@@ -3060,7 +3060,10 @@ static int raw_cmd_copyout(int cmd, void __user *param,
1569 + int ret;
1570 +
1571 + while (ptr) {
1572 +- ret = copy_to_user(param, ptr, sizeof(*ptr));
1573 ++ struct floppy_raw_cmd cmd = *ptr;
1574 ++ cmd.next = NULL;
1575 ++ cmd.kernel_data = NULL;
1576 ++ ret = copy_to_user(param, &cmd, sizeof(cmd));
1577 + if (ret)
1578 + return -EFAULT;
1579 + param += sizeof(struct floppy_raw_cmd);
1580 +@@ -3114,10 +3117,11 @@ loop:
1581 + return -ENOMEM;
1582 + *rcmd = ptr;
1583 + ret = copy_from_user(ptr, param, sizeof(*ptr));
1584 +- if (ret)
1585 +- return -EFAULT;
1586 + ptr->next = NULL;
1587 + ptr->buffer_length = 0;
1588 ++ ptr->kernel_data = NULL;
1589 ++ if (ret)
1590 ++ return -EFAULT;
1591 + param += sizeof(struct floppy_raw_cmd);
1592 + if (ptr->cmd_count > 33)
1593 + /* the command may now also take up the space
1594 +@@ -3133,7 +3137,6 @@ loop:
1595 + for (i = 0; i < 16; i++)
1596 + ptr->reply[i] = 0;
1597 + ptr->resultcode = 0;
1598 +- ptr->kernel_data = NULL;
1599 +
1600 + if (ptr->flags & (FD_RAW_READ | FD_RAW_WRITE)) {
1601 + if (ptr->length <= 0)
1602 +diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
1603 +index 4cd392d..2861ef4 100644
1604 +--- a/drivers/firmware/dmi_scan.c
1605 ++++ b/drivers/firmware/dmi_scan.c
1606 +@@ -534,9 +534,15 @@ static bool dmi_matches(const struct dmi_system_id *dmi)
1607 + int s = dmi->matches[i].slot;
1608 + if (s == DMI_NONE)
1609 + break;
1610 +- if (dmi_ident[s]
1611 +- && strstr(dmi_ident[s], dmi->matches[i].substr))
1612 +- continue;
1613 ++ if (dmi_ident[s]) {
1614 ++ if (!dmi->matches[i].exact_match &&
1615 ++ strstr(dmi_ident[s], dmi->matches[i].substr))
1616 ++ continue;
1617 ++ else if (dmi->matches[i].exact_match &&
1618 ++ !strcmp(dmi_ident[s], dmi->matches[i].substr))
1619 ++ continue;
1620 ++ }
1621 ++
1622 + /* No match */
1623 + return false;
1624 + }
1625 +diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
1626 +index bc35070..886c191 100644
1627 +--- a/drivers/input/mouse/synaptics.c
1628 ++++ b/drivers/input/mouse/synaptics.c
1629 +@@ -1394,6 +1394,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = {
1630 + .driver_data = (int []){1232, 5710, 1156, 4696},
1631 + },
1632 + {
1633 ++ /* Lenovo ThinkPad T431s */
1634 ++ .matches = {
1635 ++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1636 ++ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T431"),
1637 ++ },
1638 ++ .driver_data = (int []){1024, 5112, 2024, 4832},
1639 ++ },
1640 ++ {
1641 + /* Lenovo ThinkPad T440s */
1642 + .matches = {
1643 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1644 +@@ -1402,6 +1410,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = {
1645 + .driver_data = (int []){1024, 5112, 2024, 4832},
1646 + },
1647 + {
1648 ++ /* Lenovo ThinkPad L440 */
1649 ++ .matches = {
1650 ++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1651 ++ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L440"),
1652 ++ },
1653 ++ .driver_data = (int []){1024, 5112, 2024, 4832},
1654 ++ },
1655 ++ {
1656 + /* Lenovo ThinkPad T540p */
1657 + .matches = {
1658 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1659 +@@ -1409,6 +1425,32 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = {
1660 + },
1661 + .driver_data = (int []){1024, 5056, 2058, 4832},
1662 + },
1663 ++ {
1664 ++ /* Lenovo ThinkPad L540 */
1665 ++ .matches = {
1666 ++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1667 ++ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L540"),
1668 ++ },
1669 ++ .driver_data = (int []){1024, 5112, 2024, 4832},
1670 ++ },
1671 ++ {
1672 ++ /* Lenovo Yoga S1 */
1673 ++ .matches = {
1674 ++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1675 ++ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
1676 ++ "ThinkPad S1 Yoga"),
1677 ++ },
1678 ++ .driver_data = (int []){1232, 5710, 1156, 4696},
1679 ++ },
1680 ++ {
1681 ++ /* Lenovo ThinkPad X1 Carbon Haswell (3rd generation) */
1682 ++ .matches = {
1683 ++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1684 ++ DMI_MATCH(DMI_PRODUCT_VERSION,
1685 ++ "ThinkPad X1 Carbon 2nd"),
1686 ++ },
1687 ++ .driver_data = (int []){1024, 5112, 2024, 4832},
1688 ++ },
1689 + #endif
1690 + { }
1691 + };
1692 +diff --git a/drivers/net/ethernet/mellanox/mlx4/en_cq.c b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
1693 +index 5829e0b..ba7c861 100644
1694 +--- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c
1695 ++++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
1696 +@@ -58,7 +58,6 @@ int mlx4_en_create_cq(struct mlx4_en_priv *priv,
1697 +
1698 + cq->ring = ring;
1699 + cq->is_tx = mode;
1700 +- spin_lock_init(&cq->lock);
1701 +
1702 + err = mlx4_alloc_hwq_res(mdev->dev, &cq->wqres,
1703 + cq->buf_size, 2 * PAGE_SIZE);
1704 +diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
1705 +index 78d776b..308349a 100644
1706 +--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
1707 ++++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
1708 +@@ -355,15 +355,11 @@ static void mlx4_en_netpoll(struct net_device *dev)
1709 + {
1710 + struct mlx4_en_priv *priv = netdev_priv(dev);
1711 + struct mlx4_en_cq *cq;
1712 +- unsigned long flags;
1713 + int i;
1714 +
1715 + for (i = 0; i < priv->rx_ring_num; i++) {
1716 + cq = &priv->rx_cq[i];
1717 +- spin_lock_irqsave(&cq->lock, flags);
1718 +- napi_synchronize(&cq->napi);
1719 +- mlx4_en_process_rx_cq(dev, cq, 0);
1720 +- spin_unlock_irqrestore(&cq->lock, flags);
1721 ++ napi_schedule(&cq->napi);
1722 + }
1723 + }
1724 + #endif
1725 +diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
1726 +index 207b5ad..4920558 100644
1727 +--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
1728 ++++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
1729 +@@ -300,7 +300,6 @@ struct mlx4_en_cq {
1730 + struct mlx4_cq mcq;
1731 + struct mlx4_hwq_resources wqres;
1732 + int ring;
1733 +- spinlock_t lock;
1734 + struct net_device *dev;
1735 + struct napi_struct napi;
1736 + /* Per-core Tx cq processing support */
1737 +diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
1738 +index a004ad7..ba7ef2f 100644
1739 +--- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
1740 ++++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
1741 +@@ -1228,11 +1228,14 @@ static void rtl92c_dm_refresh_rate_adaptive_mask(struct ieee80211_hw *hw)
1742 + if (rtlhal->interface == INTF_PCI) {
1743 + rcu_read_lock();
1744 + sta = ieee80211_find_sta(mac->vif, mac->bssid);
1745 ++ if (!sta)
1746 ++ goto out_unlock;
1747 + }
1748 + rtlpriv->cfg->ops->update_rate_tbl(hw, sta,
1749 + p_ra->ratr_state);
1750 +
1751 + p_ra->pre_ratr_state = p_ra->ratr_state;
1752 ++ out_unlock:
1753 + if (rtlhal->interface == INTF_PCI)
1754 + rcu_read_unlock();
1755 + }
1756 +diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c
1757 +index 7069f06..4cc68d1 100644
1758 +--- a/drivers/staging/rtl8712/rtl871x_recv.c
1759 ++++ b/drivers/staging/rtl8712/rtl871x_recv.c
1760 +@@ -254,7 +254,7 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter,
1761 + struct sta_info *psta;
1762 + struct sta_priv *pstapriv;
1763 + union recv_frame *prtnframe;
1764 +- u16 ether_type = 0;
1765 ++ u16 ether_type;
1766 +
1767 + pstapriv = &adapter->stapriv;
1768 + ptr = get_recvframe_data(precv_frame);
1769 +@@ -263,15 +263,14 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter,
1770 + psta = r8712_get_stainfo(pstapriv, psta_addr);
1771 + auth_alg = adapter->securitypriv.AuthAlgrthm;
1772 + if (auth_alg == 2) {
1773 ++ /* get ether_type */
1774 ++ ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE;
1775 ++ memcpy(&ether_type, ptr, 2);
1776 ++ ether_type = ntohs((unsigned short)ether_type);
1777 ++
1778 + if ((psta != NULL) && (psta->ieee8021x_blocked)) {
1779 + /* blocked
1780 + * only accept EAPOL frame */
1781 +- prtnframe = precv_frame;
1782 +- /*get ether_type */
1783 +- ptr = ptr + pfhdr->attrib.hdrlen +
1784 +- pfhdr->attrib.iv_len + LLC_HEADER_SIZE;
1785 +- memcpy(&ether_type, ptr, 2);
1786 +- ether_type = ntohs((unsigned short)ether_type);
1787 + if (ether_type == 0x888e)
1788 + prtnframe = precv_frame;
1789 + else {
1790 +diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
1791 +index 0f8a785..bac83d8 100644
1792 +--- a/drivers/tty/n_tty.c
1793 ++++ b/drivers/tty/n_tty.c
1794 +@@ -1997,7 +1997,9 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
1795 + tty->ops->flush_chars(tty);
1796 + } else {
1797 + while (nr > 0) {
1798 ++ mutex_lock(&tty->output_lock);
1799 + c = tty->ops->write(tty, b, nr);
1800 ++ mutex_unlock(&tty->output_lock);
1801 + if (c < 0) {
1802 + retval = c;
1803 + goto break_out;
1804 +diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
1805 +index 636ee9e..320db2a 100644
1806 +--- a/drivers/usb/class/cdc-acm.c
1807 ++++ b/drivers/usb/class/cdc-acm.c
1808 +@@ -1493,13 +1493,27 @@ static const struct usb_device_id acm_ids[] = {
1809 + },
1810 + /* Motorola H24 HSPA module: */
1811 + { USB_DEVICE(0x22b8, 0x2d91) }, /* modem */
1812 +- { USB_DEVICE(0x22b8, 0x2d92) }, /* modem + diagnostics */
1813 +- { USB_DEVICE(0x22b8, 0x2d93) }, /* modem + AT port */
1814 +- { USB_DEVICE(0x22b8, 0x2d95) }, /* modem + AT port + diagnostics */
1815 +- { USB_DEVICE(0x22b8, 0x2d96) }, /* modem + NMEA */
1816 +- { USB_DEVICE(0x22b8, 0x2d97) }, /* modem + diagnostics + NMEA */
1817 +- { USB_DEVICE(0x22b8, 0x2d99) }, /* modem + AT port + NMEA */
1818 +- { USB_DEVICE(0x22b8, 0x2d9a) }, /* modem + AT port + diagnostics + NMEA */
1819 ++ { USB_DEVICE(0x22b8, 0x2d92), /* modem + diagnostics */
1820 ++ .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1821 ++ },
1822 ++ { USB_DEVICE(0x22b8, 0x2d93), /* modem + AT port */
1823 ++ .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1824 ++ },
1825 ++ { USB_DEVICE(0x22b8, 0x2d95), /* modem + AT port + diagnostics */
1826 ++ .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1827 ++ },
1828 ++ { USB_DEVICE(0x22b8, 0x2d96), /* modem + NMEA */
1829 ++ .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1830 ++ },
1831 ++ { USB_DEVICE(0x22b8, 0x2d97), /* modem + diagnostics + NMEA */
1832 ++ .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1833 ++ },
1834 ++ { USB_DEVICE(0x22b8, 0x2d99), /* modem + AT port + NMEA */
1835 ++ .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1836 ++ },
1837 ++ { USB_DEVICE(0x22b8, 0x2d9a), /* modem + AT port + diagnostics + NMEA */
1838 ++ .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1839 ++ },
1840 +
1841 + { USB_DEVICE(0x0572, 0x1329), /* Hummingbird huc56s (Conexant) */
1842 + .driver_info = NO_UNION_NORMAL, /* union descriptor misplaced on
1843 +diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
1844 +index 2b4f42b..1886544 100644
1845 +--- a/drivers/usb/host/xhci-ring.c
1846 ++++ b/drivers/usb/host/xhci-ring.c
1847 +@@ -570,10 +570,11 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
1848 + struct xhci_dequeue_state *state)
1849 + {
1850 + struct xhci_virt_device *dev = xhci->devs[slot_id];
1851 ++ struct xhci_virt_ep *ep = &dev->eps[ep_index];
1852 + struct xhci_ring *ep_ring;
1853 + struct xhci_generic_trb *trb;
1854 +- struct xhci_ep_ctx *ep_ctx;
1855 + dma_addr_t addr;
1856 ++ u64 hw_dequeue;
1857 +
1858 + ep_ring = xhci_triad_to_transfer_ring(xhci, slot_id,
1859 + ep_index, stream_id);
1860 +@@ -583,52 +584,62 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
1861 + stream_id);
1862 + return;
1863 + }
1864 +- state->new_cycle_state = 0;
1865 +- xhci_dbg(xhci, "Finding segment containing stopped TRB.\n");
1866 +- state->new_deq_seg = find_trb_seg(cur_td->start_seg,
1867 +- dev->eps[ep_index].stopped_trb,
1868 +- &state->new_cycle_state);
1869 +- if (!state->new_deq_seg) {
1870 +- WARN_ON(1);
1871 +- return;
1872 +- }
1873 +
1874 + /* Dig out the cycle state saved by the xHC during the stop ep cmd */
1875 + xhci_dbg(xhci, "Finding endpoint context\n");
1876 +- ep_ctx = xhci_get_ep_ctx(xhci, dev->out_ctx, ep_index);
1877 +- state->new_cycle_state = 0x1 & le64_to_cpu(ep_ctx->deq);
1878 ++ /* 4.6.9 the css flag is written to the stream context for streams */
1879 ++ if (ep->ep_state & EP_HAS_STREAMS) {
1880 ++ struct xhci_stream_ctx *ctx =
1881 ++ &ep->stream_info->stream_ctx_array[stream_id];
1882 ++ hw_dequeue = le64_to_cpu(ctx->stream_ring);
1883 ++ } else {
1884 ++ struct xhci_ep_ctx *ep_ctx
1885 ++ = xhci_get_ep_ctx(xhci, dev->out_ctx, ep_index);
1886 ++ hw_dequeue = le64_to_cpu(ep_ctx->deq);
1887 ++ }
1888 ++
1889 ++ /* Find virtual address and segment of hardware dequeue pointer */
1890 ++ state->new_deq_seg = ep_ring->deq_seg;
1891 ++ state->new_deq_ptr = ep_ring->dequeue;
1892 ++ while (xhci_trb_virt_to_dma(state->new_deq_seg, state->new_deq_ptr)
1893 ++ != (dma_addr_t)(hw_dequeue & ~0xf)) {
1894 ++ next_trb(xhci, ep_ring, &state->new_deq_seg,
1895 ++ &state->new_deq_ptr);
1896 ++ if (state->new_deq_ptr == ep_ring->dequeue) {
1897 ++ WARN_ON(1);
1898 ++ return;
1899 ++ }
1900 ++ }
1901 ++ /*
1902 ++ * Find cycle state for last_trb, starting at old cycle state of
1903 ++ * hw_dequeue. If there is only one segment ring, find_trb_seg() will
1904 ++ * return immediately and cannot toggle the cycle state if this search
1905 ++ * wraps around, so add one more toggle manually in that case.
1906 ++ */
1907 ++ state->new_cycle_state = hw_dequeue & 0x1;
1908 ++ if (ep_ring->first_seg == ep_ring->first_seg->next &&
1909 ++ cur_td->last_trb < state->new_deq_ptr)
1910 ++ state->new_cycle_state ^= 0x1;
1911 +
1912 + state->new_deq_ptr = cur_td->last_trb;
1913 + xhci_dbg(xhci, "Finding segment containing last TRB in TD.\n");
1914 + state->new_deq_seg = find_trb_seg(state->new_deq_seg,
1915 +- state->new_deq_ptr,
1916 +- &state->new_cycle_state);
1917 ++ state->new_deq_ptr, &state->new_cycle_state);
1918 + if (!state->new_deq_seg) {
1919 + WARN_ON(1);
1920 + return;
1921 + }
1922 +
1923 ++ /* Increment to find next TRB after last_trb. Cycle if appropriate. */
1924 + trb = &state->new_deq_ptr->generic;
1925 + if (TRB_TYPE_LINK_LE32(trb->field[3]) &&
1926 + (trb->field[3] & cpu_to_le32(LINK_TOGGLE)))
1927 + state->new_cycle_state ^= 0x1;
1928 + next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr);
1929 +
1930 +- /*
1931 +- * If there is only one segment in a ring, find_trb_seg()'s while loop
1932 +- * will not run, and it will return before it has a chance to see if it
1933 +- * needs to toggle the cycle bit. It can't tell if the stalled transfer
1934 +- * ended just before the link TRB on a one-segment ring, or if the TD
1935 +- * wrapped around the top of the ring, because it doesn't have the TD in
1936 +- * question. Look for the one-segment case where stalled TRB's address
1937 +- * is greater than the new dequeue pointer address.
1938 +- */
1939 +- if (ep_ring->first_seg == ep_ring->first_seg->next &&
1940 +- state->new_deq_ptr < dev->eps[ep_index].stopped_trb)
1941 +- state->new_cycle_state ^= 0x1;
1942 ++ /* Don't update the ring cycle state for the producer (us). */
1943 + xhci_dbg(xhci, "Cycle state = 0x%x\n", state->new_cycle_state);
1944 +
1945 +- /* Don't update the ring cycle state for the producer (us). */
1946 + xhci_dbg(xhci, "New dequeue segment = %p (virtual)\n",
1947 + state->new_deq_seg);
1948 + addr = xhci_trb_virt_to_dma(state->new_deq_seg, state->new_deq_ptr);
1949 +@@ -813,7 +824,6 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci,
1950 + if (list_empty(&ep->cancelled_td_list)) {
1951 + xhci_stop_watchdog_timer_in_irq(xhci, ep);
1952 + ep->stopped_td = NULL;
1953 +- ep->stopped_trb = NULL;
1954 + ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
1955 + return;
1956 + }
1957 +@@ -880,11 +890,9 @@ remove_finished_td:
1958 + ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
1959 + }
1960 +
1961 +- /* Clear stopped_td and stopped_trb if endpoint is not halted */
1962 +- if (!(ep->ep_state & EP_HALTED)) {
1963 ++ /* Clear stopped_td if endpoint is not halted */
1964 ++ if (!(ep->ep_state & EP_HALTED))
1965 + ep->stopped_td = NULL;
1966 +- ep->stopped_trb = NULL;
1967 +- }
1968 +
1969 + /*
1970 + * Drop the lock and complete the URBs in the cancelled TD list.
1971 +@@ -1744,14 +1752,12 @@ static void xhci_cleanup_halted_endpoint(struct xhci_hcd *xhci,
1972 + struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index];
1973 + ep->ep_state |= EP_HALTED;
1974 + ep->stopped_td = td;
1975 +- ep->stopped_trb = event_trb;
1976 + ep->stopped_stream = stream_id;
1977 +
1978 + xhci_queue_reset_ep(xhci, slot_id, ep_index);
1979 + xhci_cleanup_stalled_ring(xhci, td->urb->dev, ep_index);
1980 +
1981 + ep->stopped_td = NULL;
1982 +- ep->stopped_trb = NULL;
1983 + ep->stopped_stream = 0;
1984 +
1985 + xhci_ring_cmd_db(xhci);
1986 +@@ -1833,7 +1839,6 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
1987 + * the ring dequeue pointer or take this TD off any lists yet.
1988 + */
1989 + ep->stopped_td = td;
1990 +- ep->stopped_trb = event_trb;
1991 + return 0;
1992 + } else {
1993 + if (trb_comp_code == COMP_STALL) {
1994 +@@ -1845,7 +1850,6 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
1995 + * USB class driver clear the stall later.
1996 + */
1997 + ep->stopped_td = td;
1998 +- ep->stopped_trb = event_trb;
1999 + ep->stopped_stream = ep_ring->stream_id;
2000 + } else if (xhci_requires_manual_halt_cleanup(xhci,
2001 + ep_ctx, trb_comp_code)) {
2002 +diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
2003 +index 03c35da..b2eac8d 100644
2004 +--- a/drivers/usb/host/xhci.c
2005 ++++ b/drivers/usb/host/xhci.c
2006 +@@ -378,16 +378,16 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
2007 +
2008 + #else
2009 +
2010 +-static int xhci_try_enable_msi(struct usb_hcd *hcd)
2011 ++static inline int xhci_try_enable_msi(struct usb_hcd *hcd)
2012 + {
2013 + return 0;
2014 + }
2015 +
2016 +-static void xhci_cleanup_msix(struct xhci_hcd *xhci)
2017 ++static inline void xhci_cleanup_msix(struct xhci_hcd *xhci)
2018 + {
2019 + }
2020 +
2021 +-static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
2022 ++static inline void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
2023 + {
2024 + }
2025 +
2026 +@@ -2884,7 +2884,6 @@ void xhci_endpoint_reset(struct usb_hcd *hcd,
2027 + xhci_ring_cmd_db(xhci);
2028 + }
2029 + virt_ep->stopped_td = NULL;
2030 +- virt_ep->stopped_trb = NULL;
2031 + virt_ep->stopped_stream = 0;
2032 + spin_unlock_irqrestore(&xhci->lock, flags);
2033 +
2034 +diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
2035 +index cf4fd24..1bc91c8 100644
2036 +--- a/drivers/usb/host/xhci.h
2037 ++++ b/drivers/usb/host/xhci.h
2038 +@@ -835,8 +835,6 @@ struct xhci_virt_ep {
2039 + #define EP_GETTING_NO_STREAMS (1 << 5)
2040 + /* ---- Related to URB cancellation ---- */
2041 + struct list_head cancelled_td_list;
2042 +- /* The TRB that was last reported in a stopped endpoint ring */
2043 +- union xhci_trb *stopped_trb;
2044 + struct xhci_td *stopped_td;
2045 + unsigned int stopped_stream;
2046 + /* Watchdog timer for stop endpoint command to cancel URBs */
2047 +diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
2048 +index c408ff7..01fd64a 100644
2049 +--- a/drivers/usb/serial/cp210x.c
2050 ++++ b/drivers/usb/serial/cp210x.c
2051 +@@ -110,6 +110,7 @@ static const struct usb_device_id id_table[] = {
2052 + { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
2053 + { USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */
2054 + { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demonstration module */
2055 ++ { USB_DEVICE(0x10C4, 0x8281) }, /* Nanotec Plug & Drive */
2056 + { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesis ETRX2USB */
2057 + { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */
2058 + { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
2059 +diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
2060 +index 5c97d9f..332f04d 100644
2061 +--- a/drivers/usb/serial/ftdi_sio.c
2062 ++++ b/drivers/usb/serial/ftdi_sio.c
2063 +@@ -920,6 +920,39 @@ static struct usb_device_id id_table_combined [] = {
2064 + { USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) },
2065 + /* Cressi Devices */
2066 + { USB_DEVICE(FTDI_VID, FTDI_CRESSI_PID) },
2067 ++ /* Brainboxes Devices */
2068 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_001_PID) },
2069 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_012_PID) },
2070 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_023_PID) },
2071 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_034_PID) },
2072 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_101_PID) },
2073 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_1_PID) },
2074 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_2_PID) },
2075 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_3_PID) },
2076 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_4_PID) },
2077 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_5_PID) },
2078 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_6_PID) },
2079 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_7_PID) },
2080 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_8_PID) },
2081 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_257_PID) },
2082 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_1_PID) },
2083 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_2_PID) },
2084 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_3_PID) },
2085 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_4_PID) },
2086 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_313_PID) },
2087 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_324_PID) },
2088 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_346_1_PID) },
2089 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_346_2_PID) },
2090 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_357_PID) },
2091 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_606_1_PID) },
2092 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_606_2_PID) },
2093 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_606_3_PID) },
2094 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_701_1_PID) },
2095 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_701_2_PID) },
2096 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_1_PID) },
2097 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_2_PID) },
2098 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_3_PID) },
2099 ++ { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_4_PID) },
2100 + { }, /* Optional parameter entry */
2101 + { } /* Terminating entry */
2102 + };
2103 +diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
2104 +index 71fe2de..83a440f 100644
2105 +--- a/drivers/usb/serial/ftdi_sio_ids.h
2106 ++++ b/drivers/usb/serial/ftdi_sio_ids.h
2107 +@@ -1326,3 +1326,40 @@
2108 + * Manufacturer: Cressi
2109 + */
2110 + #define FTDI_CRESSI_PID 0x87d0
2111 ++
2112 ++/*
2113 ++ * Brainboxes devices
2114 ++ */
2115 ++#define BRAINBOXES_VID 0x05d1
2116 ++#define BRAINBOXES_VX_001_PID 0x1001 /* VX-001 ExpressCard 1 Port RS232 */
2117 ++#define BRAINBOXES_VX_012_PID 0x1002 /* VX-012 ExpressCard 2 Port RS232 */
2118 ++#define BRAINBOXES_VX_023_PID 0x1003 /* VX-023 ExpressCard 1 Port RS422/485 */
2119 ++#define BRAINBOXES_VX_034_PID 0x1004 /* VX-034 ExpressCard 2 Port RS422/485 */
2120 ++#define BRAINBOXES_US_101_PID 0x1011 /* US-101 1xRS232 */
2121 ++#define BRAINBOXES_US_324_PID 0x1013 /* US-324 1xRS422/485 1Mbaud */
2122 ++#define BRAINBOXES_US_606_1_PID 0x2001 /* US-606 6 Port RS232 Serial Port 1 and 2 */
2123 ++#define BRAINBOXES_US_606_2_PID 0x2002 /* US-606 6 Port RS232 Serial Port 3 and 4 */
2124 ++#define BRAINBOXES_US_606_3_PID 0x2003 /* US-606 6 Port RS232 Serial Port 4 and 6 */
2125 ++#define BRAINBOXES_US_701_1_PID 0x2011 /* US-701 4xRS232 1Mbaud Port 1 and 2 */
2126 ++#define BRAINBOXES_US_701_2_PID 0x2012 /* US-701 4xRS422 1Mbaud Port 3 and 4 */
2127 ++#define BRAINBOXES_US_279_1_PID 0x2021 /* US-279 8xRS422 1Mbaud Port 1 and 2 */
2128 ++#define BRAINBOXES_US_279_2_PID 0x2022 /* US-279 8xRS422 1Mbaud Port 3 and 4 */
2129 ++#define BRAINBOXES_US_279_3_PID 0x2023 /* US-279 8xRS422 1Mbaud Port 5 and 6 */
2130 ++#define BRAINBOXES_US_279_4_PID 0x2024 /* US-279 8xRS422 1Mbaud Port 7 and 8 */
2131 ++#define BRAINBOXES_US_346_1_PID 0x3011 /* US-346 4xRS422/485 1Mbaud Port 1 and 2 */
2132 ++#define BRAINBOXES_US_346_2_PID 0x3012 /* US-346 4xRS422/485 1Mbaud Port 3 and 4 */
2133 ++#define BRAINBOXES_US_257_PID 0x5001 /* US-257 2xRS232 1Mbaud */
2134 ++#define BRAINBOXES_US_313_PID 0x6001 /* US-313 2xRS422/485 1Mbaud */
2135 ++#define BRAINBOXES_US_357_PID 0x7001 /* US_357 1xRS232/422/485 */
2136 ++#define BRAINBOXES_US_842_1_PID 0x8001 /* US-842 8xRS422/485 1Mbaud Port 1 and 2 */
2137 ++#define BRAINBOXES_US_842_2_PID 0x8002 /* US-842 8xRS422/485 1Mbaud Port 3 and 4 */
2138 ++#define BRAINBOXES_US_842_3_PID 0x8003 /* US-842 8xRS422/485 1Mbaud Port 5 and 6 */
2139 ++#define BRAINBOXES_US_842_4_PID 0x8004 /* US-842 8xRS422/485 1Mbaud Port 7 and 8 */
2140 ++#define BRAINBOXES_US_160_1_PID 0x9001 /* US-160 16xRS232 1Mbaud Port 1 and 2 */
2141 ++#define BRAINBOXES_US_160_2_PID 0x9002 /* US-160 16xRS232 1Mbaud Port 3 and 4 */
2142 ++#define BRAINBOXES_US_160_3_PID 0x9003 /* US-160 16xRS232 1Mbaud Port 5 and 6 */
2143 ++#define BRAINBOXES_US_160_4_PID 0x9004 /* US-160 16xRS232 1Mbaud Port 7 and 8 */
2144 ++#define BRAINBOXES_US_160_5_PID 0x9005 /* US-160 16xRS232 1Mbaud Port 9 and 10 */
2145 ++#define BRAINBOXES_US_160_6_PID 0x9006 /* US-160 16xRS232 1Mbaud Port 11 and 12 */
2146 ++#define BRAINBOXES_US_160_7_PID 0x9007 /* US-160 16xRS232 1Mbaud Port 13 and 14 */
2147 ++#define BRAINBOXES_US_160_8_PID 0x9008 /* US-160 16xRS232 1Mbaud Port 15 and 16 */
2148 +diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
2149 +index f42119d..c575e0a 100644
2150 +--- a/drivers/usb/serial/io_ti.c
2151 ++++ b/drivers/usb/serial/io_ti.c
2152 +@@ -36,6 +36,7 @@
2153 + #include <linux/spinlock.h>
2154 + #include <linux/mutex.h>
2155 + #include <linux/serial.h>
2156 ++#include <linux/swab.h>
2157 + #include <linux/kfifo.h>
2158 + #include <linux/ioctl.h>
2159 + #include <linux/firmware.h>
2160 +@@ -306,7 +307,7 @@ static int read_download_mem(struct usb_device *dev, int start_address,
2161 + {
2162 + int status = 0;
2163 + __u8 read_length;
2164 +- __be16 be_start_address;
2165 ++ u16 be_start_address;
2166 +
2167 + dbg("%s - @ %x for %d", __func__, start_address, length);
2168 +
2169 +@@ -323,10 +324,14 @@ static int read_download_mem(struct usb_device *dev, int start_address,
2170 + dbg("%s - @ %x for %d", __func__,
2171 + start_address, read_length);
2172 + }
2173 +- be_start_address = cpu_to_be16(start_address);
2174 ++ /*
2175 ++ * NOTE: Must use swab as wIndex is sent in little-endian
2176 ++ * byte order regardless of host byte order.
2177 ++ */
2178 ++ be_start_address = swab16((u16)start_address);
2179 + status = ti_vread_sync(dev, UMPC_MEMORY_READ,
2180 + (__u16)address_type,
2181 +- (__force __u16)be_start_address,
2182 ++ be_start_address,
2183 + buffer, read_length);
2184 +
2185 + if (status) {
2186 +@@ -426,7 +431,7 @@ static int write_i2c_mem(struct edgeport_serial *serial,
2187 + {
2188 + int status = 0;
2189 + int write_length;
2190 +- __be16 be_start_address;
2191 ++ u16 be_start_address;
2192 +
2193 + /* We can only send a maximum of 1 aligned byte page at a time */
2194 +
2195 +@@ -442,11 +447,16 @@ static int write_i2c_mem(struct edgeport_serial *serial,
2196 + usb_serial_debug_data(debug, &serial->serial->dev->dev,
2197 + __func__, write_length, buffer);
2198 +
2199 +- /* Write first page */
2200 +- be_start_address = cpu_to_be16(start_address);
2201 ++ /*
2202 ++ * Write first page.
2203 ++ *
2204 ++ * NOTE: Must use swab as wIndex is sent in little-endian byte order
2205 ++ * regardless of host byte order.
2206 ++ */
2207 ++ be_start_address = swab16((u16)start_address);
2208 + status = ti_vsend_sync(serial->serial->dev,
2209 + UMPC_MEMORY_WRITE, (__u16)address_type,
2210 +- (__force __u16)be_start_address,
2211 ++ be_start_address,
2212 + buffer, write_length);
2213 + if (status) {
2214 + dbg("%s - ERROR %d", __func__, status);
2215 +@@ -470,11 +480,16 @@ static int write_i2c_mem(struct edgeport_serial *serial,
2216 + usb_serial_debug_data(debug, &serial->serial->dev->dev,
2217 + __func__, write_length, buffer);
2218 +
2219 +- /* Write next page */
2220 +- be_start_address = cpu_to_be16(start_address);
2221 ++ /*
2222 ++ * Write next page.
2223 ++ *
2224 ++ * NOTE: Must use swab as wIndex is sent in little-endian byte
2225 ++ * order regardless of host byte order.
2226 ++ */
2227 ++ be_start_address = swab16((u16)start_address);
2228 + status = ti_vsend_sync(serial->serial->dev, UMPC_MEMORY_WRITE,
2229 + (__u16)address_type,
2230 +- (__force __u16)be_start_address,
2231 ++ be_start_address,
2232 + buffer, write_length);
2233 + if (status) {
2234 + dev_err(&serial->serial->dev->dev, "%s - ERROR %d\n",
2235 +@@ -681,8 +696,8 @@ static int get_descriptor_addr(struct edgeport_serial *serial,
2236 + if (rom_desc->Type == desc_type)
2237 + return start_address;
2238 +
2239 +- start_address = start_address + sizeof(struct ti_i2c_desc)
2240 +- + rom_desc->Size;
2241 ++ start_address = start_address + sizeof(struct ti_i2c_desc) +
2242 ++ le16_to_cpu(rom_desc->Size);
2243 +
2244 + } while ((start_address < TI_MAX_I2C_SIZE) && rom_desc->Type);
2245 +
2246 +@@ -695,7 +710,7 @@ static int valid_csum(struct ti_i2c_desc *rom_desc, __u8 *buffer)
2247 + __u16 i;
2248 + __u8 cs = 0;
2249 +
2250 +- for (i = 0; i < rom_desc->Size; i++)
2251 ++ for (i = 0; i < le16_to_cpu(rom_desc->Size); i++)
2252 + cs = (__u8)(cs + buffer[i]);
2253 +
2254 + if (cs != rom_desc->CheckSum) {
2255 +@@ -749,7 +764,7 @@ static int check_i2c_image(struct edgeport_serial *serial)
2256 + break;
2257 +
2258 + if ((start_address + sizeof(struct ti_i2c_desc) +
2259 +- rom_desc->Size) > TI_MAX_I2C_SIZE) {
2260 ++ le16_to_cpu(rom_desc->Size)) > TI_MAX_I2C_SIZE) {
2261 + status = -ENODEV;
2262 + dbg("%s - structure too big, erroring out.", __func__);
2263 + break;
2264 +@@ -764,7 +779,8 @@ static int check_i2c_image(struct edgeport_serial *serial)
2265 + /* Read the descriptor data */
2266 + status = read_rom(serial, start_address +
2267 + sizeof(struct ti_i2c_desc),
2268 +- rom_desc->Size, buffer);
2269 ++ le16_to_cpu(rom_desc->Size),
2270 ++ buffer);
2271 + if (status)
2272 + break;
2273 +
2274 +@@ -773,7 +789,7 @@ static int check_i2c_image(struct edgeport_serial *serial)
2275 + break;
2276 + }
2277 + start_address = start_address + sizeof(struct ti_i2c_desc) +
2278 +- rom_desc->Size;
2279 ++ le16_to_cpu(rom_desc->Size);
2280 +
2281 + } while ((rom_desc->Type != I2C_DESC_TYPE_ION) &&
2282 + (start_address < TI_MAX_I2C_SIZE));
2283 +@@ -812,7 +828,7 @@ static int get_manuf_info(struct edgeport_serial *serial, __u8 *buffer)
2284 +
2285 + /* Read the descriptor data */
2286 + status = read_rom(serial, start_address+sizeof(struct ti_i2c_desc),
2287 +- rom_desc->Size, buffer);
2288 ++ le16_to_cpu(rom_desc->Size), buffer);
2289 + if (status)
2290 + goto exit;
2291 +
2292 +diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
2293 +index 5f5047f..9823e79 100644
2294 +--- a/drivers/usb/serial/option.c
2295 ++++ b/drivers/usb/serial/option.c
2296 +@@ -234,8 +234,31 @@ static void option_instat_callback(struct urb *urb);
2297 + #define QUALCOMM_VENDOR_ID 0x05C6
2298 +
2299 + #define CMOTECH_VENDOR_ID 0x16d8
2300 +-#define CMOTECH_PRODUCT_6008 0x6008
2301 +-#define CMOTECH_PRODUCT_6280 0x6280
2302 ++#define CMOTECH_PRODUCT_6001 0x6001
2303 ++#define CMOTECH_PRODUCT_CMU_300 0x6002
2304 ++#define CMOTECH_PRODUCT_6003 0x6003
2305 ++#define CMOTECH_PRODUCT_6004 0x6004
2306 ++#define CMOTECH_PRODUCT_6005 0x6005
2307 ++#define CMOTECH_PRODUCT_CGU_628A 0x6006
2308 ++#define CMOTECH_PRODUCT_CHE_628S 0x6007
2309 ++#define CMOTECH_PRODUCT_CMU_301 0x6008
2310 ++#define CMOTECH_PRODUCT_CHU_628 0x6280
2311 ++#define CMOTECH_PRODUCT_CHU_628S 0x6281
2312 ++#define CMOTECH_PRODUCT_CDU_680 0x6803
2313 ++#define CMOTECH_PRODUCT_CDU_685A 0x6804
2314 ++#define CMOTECH_PRODUCT_CHU_720S 0x7001
2315 ++#define CMOTECH_PRODUCT_7002 0x7002
2316 ++#define CMOTECH_PRODUCT_CHU_629K 0x7003
2317 ++#define CMOTECH_PRODUCT_7004 0x7004
2318 ++#define CMOTECH_PRODUCT_7005 0x7005
2319 ++#define CMOTECH_PRODUCT_CGU_629 0x7006
2320 ++#define CMOTECH_PRODUCT_CHU_629S 0x700a
2321 ++#define CMOTECH_PRODUCT_CHU_720I 0x7211
2322 ++#define CMOTECH_PRODUCT_7212 0x7212
2323 ++#define CMOTECH_PRODUCT_7213 0x7213
2324 ++#define CMOTECH_PRODUCT_7251 0x7251
2325 ++#define CMOTECH_PRODUCT_7252 0x7252
2326 ++#define CMOTECH_PRODUCT_7253 0x7253
2327 +
2328 + #define TELIT_VENDOR_ID 0x1bc7
2329 + #define TELIT_PRODUCT_UC864E 0x1003
2330 +@@ -243,6 +266,7 @@ static void option_instat_callback(struct urb *urb);
2331 + #define TELIT_PRODUCT_CC864_DUAL 0x1005
2332 + #define TELIT_PRODUCT_CC864_SINGLE 0x1006
2333 + #define TELIT_PRODUCT_DE910_DUAL 0x1010
2334 ++#define TELIT_PRODUCT_UE910_V2 0x1012
2335 + #define TELIT_PRODUCT_LE920 0x1200
2336 +
2337 + /* ZTE PRODUCTS */
2338 +@@ -291,6 +315,7 @@ static void option_instat_callback(struct urb *urb);
2339 + #define ALCATEL_PRODUCT_X060S_X200 0x0000
2340 + #define ALCATEL_PRODUCT_X220_X500D 0x0017
2341 + #define ALCATEL_PRODUCT_L100V 0x011e
2342 ++#define ALCATEL_PRODUCT_L800MA 0x0203
2343 +
2344 + #define PIRELLI_VENDOR_ID 0x1266
2345 + #define PIRELLI_PRODUCT_C100_1 0x1002
2346 +@@ -353,6 +378,7 @@ static void option_instat_callback(struct urb *urb);
2347 + #define OLIVETTI_PRODUCT_OLICARD100 0xc000
2348 + #define OLIVETTI_PRODUCT_OLICARD145 0xc003
2349 + #define OLIVETTI_PRODUCT_OLICARD200 0xc005
2350 ++#define OLIVETTI_PRODUCT_OLICARD500 0xc00b
2351 +
2352 + /* Celot products */
2353 + #define CELOT_VENDOR_ID 0x211f
2354 +@@ -514,6 +540,10 @@ static const struct option_blacklist_info huawei_cdc12_blacklist = {
2355 + .reserved = BIT(1) | BIT(2),
2356 + };
2357 +
2358 ++static const struct option_blacklist_info net_intf0_blacklist = {
2359 ++ .reserved = BIT(0),
2360 ++};
2361 ++
2362 + static const struct option_blacklist_info net_intf1_blacklist = {
2363 + .reserved = BIT(1),
2364 + };
2365 +@@ -1048,13 +1078,53 @@ static const struct usb_device_id option_ids[] = {
2366 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
2367 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
2368 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
2369 +- { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
2370 +- { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },
2371 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
2372 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
2373 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),
2374 ++ .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
2375 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6004) },
2376 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6005) },
2377 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CGU_628A) },
2378 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHE_628S),
2379 ++ .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
2380 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_301),
2381 ++ .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
2382 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_628),
2383 ++ .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
2384 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_628S) },
2385 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU_680) },
2386 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU_685A) },
2387 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_720S),
2388 ++ .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
2389 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7002),
2390 ++ .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
2391 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_629K),
2392 ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
2393 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7004),
2394 ++ .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
2395 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7005) },
2396 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CGU_629),
2397 ++ .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
2398 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_629S),
2399 ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
2400 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_720I),
2401 ++ .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
2402 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7212),
2403 ++ .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
2404 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7213),
2405 ++ .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
2406 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7251),
2407 ++ .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
2408 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7252),
2409 ++ .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
2410 ++ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7253),
2411 ++ .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
2412 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
2413 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
2414 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_DUAL) },
2415 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) },
2416 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) },
2417 ++ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) },
2418 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
2419 + .driver_info = (kernel_ulong_t)&telit_le920_blacklist },
2420 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
2421 +@@ -1518,6 +1588,8 @@ static const struct usb_device_id option_ids[] = {
2422 + .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
2423 + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L100V),
2424 + .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
2425 ++ { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L800MA),
2426 ++ .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
2427 + { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
2428 + { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
2429 + { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14),
2430 +@@ -1563,6 +1635,9 @@ static const struct usb_device_id option_ids[] = {
2431 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200),
2432 + .driver_info = (kernel_ulong_t)&net_intf6_blacklist
2433 + },
2434 ++ { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD500),
2435 ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist
2436 ++ },
2437 + { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */
2438 + { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/
2439 + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) },
2440 +diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
2441 +index 7b29317..45a288c 100644
2442 +--- a/drivers/usb/serial/pl2303.c
2443 ++++ b/drivers/usb/serial/pl2303.c
2444 +@@ -86,6 +86,9 @@ static const struct usb_device_id id_table[] = {
2445 + { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) },
2446 + { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) },
2447 + { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
2448 ++ { USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) },
2449 ++ { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) },
2450 ++ { USB_DEVICE(HP_VENDOR_ID, HP_LCM960_PRODUCT_ID) },
2451 + { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) },
2452 + { USB_DEVICE(ZEAGLE_VENDOR_ID, ZEAGLE_N2ITION3_PRODUCT_ID) },
2453 + { USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) },
2454 +diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
2455 +index c38b8c0..42bc082 100644
2456 +--- a/drivers/usb/serial/pl2303.h
2457 ++++ b/drivers/usb/serial/pl2303.h
2458 +@@ -121,8 +121,11 @@
2459 + #define SUPERIAL_VENDOR_ID 0x5372
2460 + #define SUPERIAL_PRODUCT_ID 0x2303
2461 +
2462 +-/* Hewlett-Packard LD220-HP POS Pole Display */
2463 ++/* Hewlett-Packard POS Pole Displays */
2464 + #define HP_VENDOR_ID 0x03f0
2465 ++#define HP_LD960_PRODUCT_ID 0x0b39
2466 ++#define HP_LCM220_PRODUCT_ID 0x3139
2467 ++#define HP_LCM960_PRODUCT_ID 0x3239
2468 + #define HP_LD220_PRODUCT_ID 0x3524
2469 +
2470 + /* Cressi Edy (diving computer) PC interface */
2471 +diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
2472 +index a7fa673..dbdfeb4 100644
2473 +--- a/drivers/usb/serial/sierra.c
2474 ++++ b/drivers/usb/serial/sierra.c
2475 +@@ -305,7 +305,6 @@ static const struct usb_device_id id_table[] = {
2476 + { USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */
2477 + .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
2478 + },
2479 +- { USB_DEVICE(0x413C, 0x08133) }, /* Dell Computer Corp. Wireless 5720 VZW Mobile Broadband (EVDO Rev-A) Minicard GPS Port */
2480 +
2481 + { }
2482 + };
2483 +diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
2484 +index 850faa4..8f76a2b 100644
2485 +--- a/drivers/usb/serial/usb-serial.c
2486 ++++ b/drivers/usb/serial/usb-serial.c
2487 +@@ -1400,10 +1400,12 @@ void usb_serial_deregister(struct usb_serial_driver *device)
2488 + /* must be called with BKL held */
2489 + printk(KERN_INFO "USB Serial deregistering driver %s\n",
2490 + device->description);
2491 ++
2492 + mutex_lock(&table_lock);
2493 + list_del(&device->driver_list);
2494 +- usb_serial_bus_deregister(device);
2495 + mutex_unlock(&table_lock);
2496 ++
2497 ++ usb_serial_bus_deregister(device);
2498 + }
2499 + EXPORT_SYMBOL_GPL(usb_serial_deregister);
2500 +
2501 +diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
2502 +index f8962a9..a1fee6f 100644
2503 +--- a/fs/btrfs/inode-map.c
2504 ++++ b/fs/btrfs/inode-map.c
2505 +@@ -207,24 +207,14 @@ again:
2506 +
2507 + void btrfs_return_ino(struct btrfs_root *root, u64 objectid)
2508 + {
2509 +- struct btrfs_free_space_ctl *ctl = root->free_ino_ctl;
2510 + struct btrfs_free_space_ctl *pinned = root->free_ino_pinned;
2511 +
2512 + if (!btrfs_test_opt(root, INODE_MAP_CACHE))
2513 + return;
2514 +-
2515 + again:
2516 + if (root->cached == BTRFS_CACHE_FINISHED) {
2517 +- __btrfs_add_free_space(ctl, objectid, 1);
2518 ++ __btrfs_add_free_space(pinned, objectid, 1);
2519 + } else {
2520 +- /*
2521 +- * If we are in the process of caching free ino chunks,
2522 +- * to avoid adding the same inode number to the free_ino
2523 +- * tree twice due to cross transaction, we'll leave it
2524 +- * in the pinned tree until a transaction is committed
2525 +- * or the caching work is done.
2526 +- */
2527 +-
2528 + mutex_lock(&root->fs_commit_mutex);
2529 + spin_lock(&root->cache_lock);
2530 + if (root->cached == BTRFS_CACHE_FINISHED) {
2531 +@@ -236,11 +226,7 @@ again:
2532 +
2533 + start_caching(root);
2534 +
2535 +- if (objectid <= root->cache_progress ||
2536 +- objectid > root->highest_objectid)
2537 +- __btrfs_add_free_space(ctl, objectid, 1);
2538 +- else
2539 +- __btrfs_add_free_space(pinned, objectid, 1);
2540 ++ __btrfs_add_free_space(pinned, objectid, 1);
2541 +
2542 + mutex_unlock(&root->fs_commit_mutex);
2543 + }
2544 +diff --git a/fs/ext4/file.c b/fs/ext4/file.c
2545 +index cb70f18..6199922 100644
2546 +--- a/fs/ext4/file.c
2547 ++++ b/fs/ext4/file.c
2548 +@@ -80,7 +80,7 @@ ext4_unaligned_aio(struct inode *inode, const struct iovec *iov,
2549 + size_t count = iov_length(iov, nr_segs);
2550 + loff_t final_size = pos + count;
2551 +
2552 +- if (pos >= inode->i_size)
2553 ++ if (pos >= i_size_read(inode))
2554 + return 0;
2555 +
2556 + if ((pos & blockmask) || (final_size & blockmask))
2557 +diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
2558 +index dc9f0ec..55d4f46 100644
2559 +--- a/fs/ext4/inode.c
2560 ++++ b/fs/ext4/inode.c
2561 +@@ -481,6 +481,11 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
2562 + ext_debug("ext4_map_blocks(): inode %lu, flag %d, max_blocks %u,"
2563 + "logical block %lu\n", inode->i_ino, flags, map->m_len,
2564 + (unsigned long) map->m_lblk);
2565 ++
2566 ++ /* We can handle the block number less than EXT_MAX_BLOCKS */
2567 ++ if (unlikely(map->m_lblk >= EXT_MAX_BLOCKS))
2568 ++ return -EIO;
2569 ++
2570 + /*
2571 + * Try to see if we can get the block without requesting a new
2572 + * file system block.
2573 +diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
2574 +index 54f566d..b46a675 100644
2575 +--- a/fs/ext4/page-io.c
2576 ++++ b/fs/ext4/page-io.c
2577 +@@ -241,13 +241,14 @@ static void ext4_end_bio(struct bio *bio, int error)
2578 +
2579 + if (error) {
2580 + io_end->flag |= EXT4_IO_END_ERROR;
2581 +- ext4_warning(inode->i_sb, "I/O error writing to inode %lu "
2582 ++ ext4_warning(inode->i_sb, "I/O error %d writing to inode %lu "
2583 + "(offset %llu size %ld starting block %llu)",
2584 +- inode->i_ino,
2585 ++ error, inode->i_ino,
2586 + (unsigned long long) io_end->offset,
2587 + (long) io_end->size,
2588 + (unsigned long long)
2589 + bi_sector >> (inode->i_blkbits - 9));
2590 ++ mapping_set_error(inode->i_mapping, error);
2591 + }
2592 +
2593 + if (!(io_end->flag & EXT4_IO_END_UNWRITTEN)) {
2594 +diff --git a/fs/locks.c b/fs/locks.c
2595 +index fcc50ab..d4f1d89 100644
2596 +--- a/fs/locks.c
2597 ++++ b/fs/locks.c
2598 +@@ -1253,11 +1253,10 @@ int __break_lease(struct inode *inode, unsigned int mode)
2599 +
2600 + restart:
2601 + break_time = flock->fl_break_time;
2602 +- if (break_time != 0) {
2603 ++ if (break_time != 0)
2604 + break_time -= jiffies;
2605 +- if (break_time == 0)
2606 +- break_time++;
2607 +- }
2608 ++ if (break_time == 0)
2609 ++ break_time++;
2610 + locks_insert_block(flock, new_fl);
2611 + unlock_flocks();
2612 + error = wait_event_interruptible_timeout(new_fl->fl_wait,
2613 +diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
2614 +index 7748d6a..809a38a 100644
2615 +--- a/fs/nfsd/nfs4callback.c
2616 ++++ b/fs/nfsd/nfs4callback.c
2617 +@@ -633,9 +633,11 @@ static int max_cb_time(void)
2618 +
2619 + static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_session *ses)
2620 + {
2621 ++ int maxtime = max_cb_time();
2622 + struct rpc_timeout timeparms = {
2623 +- .to_initval = max_cb_time(),
2624 ++ .to_initval = maxtime,
2625 + .to_retries = 0,
2626 ++ .to_maxval = maxtime,
2627 + };
2628 + struct rpc_create_args args = {
2629 + .net = &init_net,
2630 +diff --git a/include/linux/libata.h b/include/linux/libata.h
2631 +index b1fcdba..375dfdf 100644
2632 +--- a/include/linux/libata.h
2633 ++++ b/include/linux/libata.h
2634 +@@ -763,6 +763,7 @@ struct ata_port {
2635 + unsigned long qc_allocated;
2636 + unsigned int qc_active;
2637 + int nr_active_links; /* #links with active qcs */
2638 ++ unsigned int last_tag; /* track next tag hw expects */
2639 +
2640 + struct ata_link link; /* host default link */
2641 + struct ata_link *slave_link; /* see ata_slave_link_init() */
2642 +diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
2643 +index 468819c..226e0ff 100644
2644 +--- a/include/linux/mod_devicetable.h
2645 ++++ b/include/linux/mod_devicetable.h
2646 +@@ -461,7 +461,8 @@ enum dmi_field {
2647 + };
2648 +
2649 + struct dmi_strmatch {
2650 +- unsigned char slot;
2651 ++ unsigned char slot:7;
2652 ++ unsigned char exact_match:1;
2653 + char substr[79];
2654 + };
2655 +
2656 +@@ -489,7 +490,8 @@ struct dmi_system_id {
2657 + #define dmi_device_id dmi_system_id
2658 + #endif
2659 +
2660 +-#define DMI_MATCH(a, b) { a, b }
2661 ++#define DMI_MATCH(a, b) { .slot = a, .substr = b }
2662 ++#define DMI_EXACT_MATCH(a, b) { .slot = a, .substr = b, .exact_match = 1 }
2663 +
2664 + #define PLATFORM_NAME_SIZE 20
2665 + #define PLATFORM_MODULE_PREFIX "platform:"
2666 +diff --git a/mm/hugetlb.c b/mm/hugetlb.c
2667 +index d399f5f..cac2441 100644
2668 +--- a/mm/hugetlb.c
2669 ++++ b/mm/hugetlb.c
2670 +@@ -1078,6 +1078,7 @@ static void return_unused_surplus_pages(struct hstate *h,
2671 + while (nr_pages--) {
2672 + if (!free_pool_huge_page(h, &node_states[N_HIGH_MEMORY], 1))
2673 + break;
2674 ++ cond_resched_lock(&hugetlb_lock);
2675 + }
2676 + }
2677 +
2678 +diff --git a/mm/memory.c b/mm/memory.c
2679 +index d5f913b..483e665 100644
2680 +--- a/mm/memory.c
2681 ++++ b/mm/memory.c
2682 +@@ -1852,12 +1852,17 @@ int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
2683 + unsigned long address, unsigned int fault_flags)
2684 + {
2685 + struct vm_area_struct *vma;
2686 ++ vm_flags_t vm_flags;
2687 + int ret;
2688 +
2689 + vma = find_extend_vma(mm, address);
2690 + if (!vma || address < vma->vm_start)
2691 + return -EFAULT;
2692 +
2693 ++ vm_flags = (fault_flags & FAULT_FLAG_WRITE) ? VM_WRITE : VM_READ;
2694 ++ if (!(vm_flags & vma->vm_flags))
2695 ++ return -EFAULT;
2696 ++
2697 + ret = handle_mm_fault(mm, vma, address, fault_flags);
2698 + if (ret & VM_FAULT_ERROR) {
2699 + if (ret & VM_FAULT_OOM)
2700
2701 diff --git a/3.2.58/4420_grsecurity-3.0-3.2.58-201405112002.patch b/3.2.59/4420_grsecurity-3.0-3.2.59-201405252042.patch
2702 similarity index 99%
2703 rename from 3.2.58/4420_grsecurity-3.0-3.2.58-201405112002.patch
2704 rename to 3.2.59/4420_grsecurity-3.0-3.2.59-201405252042.patch
2705 index b77f99b..a27bb43 100644
2706 --- a/3.2.58/4420_grsecurity-3.0-3.2.58-201405112002.patch
2707 +++ b/3.2.59/4420_grsecurity-3.0-3.2.59-201405252042.patch
2708 @@ -273,7 +273,7 @@ index 88fd7f5..b318a78 100644
2709 ==============================================================
2710
2711 diff --git a/Makefile b/Makefile
2712 -index d59b394..cbbdc10 100644
2713 +index 1be3414..ef0a264 100644
2714 --- a/Makefile
2715 +++ b/Makefile
2716 @@ -245,8 +245,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
2717 @@ -13573,6 +13573,18 @@ index d09bb03..0a3629b 100644
2718 : "i" (-EFAULT), "r" (newval), "1" (oldval)
2719 : "memory"
2720 );
2721 +diff --git a/arch/x86/include/asm/hugetlb.h b/arch/x86/include/asm/hugetlb.h
2722 +index 439a9ac..48fa391 100644
2723 +--- a/arch/x86/include/asm/hugetlb.h
2724 ++++ b/arch/x86/include/asm/hugetlb.h
2725 +@@ -51,6 +51,7 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
2726 + static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
2727 + unsigned long addr, pte_t *ptep)
2728 + {
2729 ++ ptep_clear_flush(vma, addr, ptep);
2730 + }
2731 +
2732 + static inline int huge_pte_none(pte_t pte)
2733 diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
2734 index eb92a6e..b98b2f4 100644
2735 --- a/arch/x86/include/asm/hw_irq.h
2736 @@ -21726,10 +21738,19 @@ index a9c2116..94c1e1a 100644
2737 };
2738 #endif
2739 diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
2740 -index 4ac4531..2476f99 100644
2741 +index 4ac4531..d655d56 100644
2742 --- a/arch/x86/kernel/ldt.c
2743 +++ b/arch/x86/kernel/ldt.c
2744 -@@ -67,13 +67,13 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
2745 +@@ -21,6 +21,8 @@
2746 + #include <asm/mmu_context.h>
2747 + #include <asm/syscalls.h>
2748 +
2749 ++int sysctl_ldt16 = 0;
2750 ++
2751 + #ifdef CONFIG_SMP
2752 + static void flush_ldt(void *current_mm)
2753 + {
2754 +@@ -67,13 +69,13 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
2755 if (reload) {
2756 #ifdef CONFIG_SMP
2757 preempt_disable();
2758 @@ -21745,7 +21766,7 @@ index 4ac4531..2476f99 100644
2759 #endif
2760 }
2761 if (oldsize) {
2762 -@@ -95,7 +95,7 @@ static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
2763 +@@ -95,7 +97,7 @@ static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
2764 return err;
2765
2766 for (i = 0; i < old->size; i++)
2767 @@ -21754,7 +21775,7 @@ index 4ac4531..2476f99 100644
2768 return 0;
2769 }
2770
2771 -@@ -116,6 +116,24 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
2772 +@@ -116,6 +118,24 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
2773 retval = copy_ldt(&mm->context, &old_mm->context);
2774 mutex_unlock(&old_mm->context.lock);
2775 }
2776 @@ -21779,7 +21800,7 @@ index 4ac4531..2476f99 100644
2777 return retval;
2778 }
2779
2780 -@@ -230,6 +248,13 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
2781 +@@ -230,12 +250,19 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
2782 }
2783 }
2784
2785 @@ -21793,6 +21814,13 @@ index 4ac4531..2476f99 100644
2786 /*
2787 * On x86-64 we do not support 16-bit segments due to
2788 * IRET leaking the high bits of the kernel stack address.
2789 + */
2790 + #ifdef CONFIG_X86_64
2791 +- if (!ldt_info.seg_32bit) {
2792 ++ if (!ldt_info.seg_32bit && !sysctl_ldt16) {
2793 + error = -EINVAL;
2794 + goto out_unlock;
2795 + }
2796 diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
2797 index a3fa43b..8966f4c 100644
2798 --- a/arch/x86/kernel/machine_kexec_32.c
2799 @@ -22097,7 +22125,7 @@ index 676b8c7..870ba04 100644
2800 .spin_is_locked = __ticket_spin_is_locked,
2801 .spin_is_contended = __ticket_spin_is_contended,
2802 diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
2803 -index 84c938f..09fb3e0 100644
2804 +index 84c938f..fa25421 100644
2805 --- a/arch/x86/kernel/paravirt.c
2806 +++ b/arch/x86/kernel/paravirt.c
2807 @@ -53,6 +53,9 @@ u64 _paravirt_ident_64(u64 x)
2808 @@ -22110,11 +22138,13 @@ index 84c938f..09fb3e0 100644
2809
2810 void __init default_banner(void)
2811 {
2812 -@@ -145,15 +148,19 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
2813 +@@ -144,16 +147,20 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
2814 +
2815 if (opfunc == NULL)
2816 /* If there's no function, patch it with a ud2a (BUG) */
2817 - ret = paravirt_patch_insns(insnbuf, len, ud2a, ud2a+sizeof(ud2a));
2818 +- ret = paravirt_patch_insns(insnbuf, len, ud2a, ud2a+sizeof(ud2a));
2819 - else if (opfunc == _paravirt_nop)
2820 ++ ret = paravirt_patch_insns(insnbuf, len, ktva_ktla(ud2a), ud2a+sizeof(ud2a));
2821 + else if (opfunc == (void *)_paravirt_nop)
2822 /* If the operation is a nop, then nop the callsite */
2823 ret = paravirt_patch_nop();
2824 @@ -31445,7 +31475,7 @@ index 5d17950..2253fc9 100644
2825
2826 #
2827 diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
2828 -index 468d591..8e80a0a 100644
2829 +index 468d591..8be5888 100644
2830 --- a/arch/x86/vdso/vdso32-setup.c
2831 +++ b/arch/x86/vdso/vdso32-setup.c
2832 @@ -25,6 +25,7 @@
2833 @@ -31456,7 +31486,15 @@ index 468d591..8e80a0a 100644
2834
2835 enum {
2836 VDSO_DISABLED = 0,
2837 -@@ -226,7 +227,7 @@ static inline void map_compat_vdso(int map)
2838 +@@ -41,6 +42,7 @@ enum {
2839 + #ifdef CONFIG_X86_64
2840 + #define vdso_enabled sysctl_vsyscall32
2841 + #define arch_setup_additional_pages syscall32_setup_pages
2842 ++extern int sysctl_ldt16;
2843 + #endif
2844 +
2845 + /*
2846 +@@ -226,7 +228,7 @@ static inline void map_compat_vdso(int map)
2847 void enable_sep_cpu(void)
2848 {
2849 int cpu = get_cpu();
2850 @@ -31465,7 +31503,7 @@ index 468d591..8e80a0a 100644
2851
2852 if (!boot_cpu_has(X86_FEATURE_SEP)) {
2853 put_cpu();
2854 -@@ -249,7 +250,7 @@ static int __init gate_vma_init(void)
2855 +@@ -249,7 +251,7 @@ static int __init gate_vma_init(void)
2856 gate_vma.vm_start = FIXADDR_USER_START;
2857 gate_vma.vm_end = FIXADDR_USER_END;
2858 gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
2859 @@ -31474,7 +31512,7 @@ index 468d591..8e80a0a 100644
2860 /*
2861 * Make sure the vDSO gets into every core dump.
2862 * Dumping its contents makes post-mortem fully interpretable later
2863 -@@ -331,14 +332,14 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
2864 +@@ -331,14 +333,14 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
2865 if (compat)
2866 addr = VDSO_HIGH_BASE;
2867 else {
2868 @@ -31491,7 +31529,7 @@ index 468d591..8e80a0a 100644
2869
2870 if (compat_uses_vma || !compat) {
2871 /*
2872 -@@ -361,11 +362,11 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
2873 +@@ -361,11 +363,11 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
2874 }
2875
2876 current_thread_info()->sysenter_return =
2877 @@ -31505,7 +31543,21 @@ index 468d591..8e80a0a 100644
2878
2879 up_write(&mm->mmap_sem);
2880
2881 -@@ -412,8 +413,14 @@ __initcall(ia32_binfmt_init);
2882 +@@ -388,6 +390,13 @@ static ctl_table abi_table2[] = {
2883 + .mode = 0644,
2884 + .proc_handler = proc_dointvec
2885 + },
2886 ++ {
2887 ++ .procname = "ldt16",
2888 ++ .data = &sysctl_ldt16,
2889 ++ .maxlen = sizeof(int),
2890 ++ .mode = 0644,
2891 ++ .proc_handler = proc_dointvec
2892 ++ },
2893 + {}
2894 + };
2895 +
2896 +@@ -412,8 +421,14 @@ __initcall(ia32_binfmt_init);
2897
2898 const char *arch_vma_name(struct vm_area_struct *vma)
2899 {
2900 @@ -31521,7 +31573,7 @@ index 468d591..8e80a0a 100644
2901 return NULL;
2902 }
2903
2904 -@@ -423,7 +430,7 @@ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
2905 +@@ -423,7 +438,7 @@ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
2906 * Check to see if the corresponding task was created in compat vdso
2907 * mode.
2908 */
2909 @@ -32482,10 +32534,10 @@ index de2802c..2260da9 100644
2910 unsigned long timeout_msec)
2911 {
2912 diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
2913 -index b3f0f5a..b6bc0a7 100644
2914 +index 2b662725..202bcc8 100644
2915 --- a/drivers/ata/libata-core.c
2916 +++ b/drivers/ata/libata-core.c
2917 -@@ -4777,7 +4777,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
2918 +@@ -4782,7 +4782,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
2919 struct ata_port *ap;
2920 unsigned int tag;
2921
2922 @@ -32494,7 +32546,7 @@ index b3f0f5a..b6bc0a7 100644
2923 ap = qc->ap;
2924
2925 qc->flags = 0;
2926 -@@ -4793,7 +4793,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
2927 +@@ -4798,7 +4798,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
2928 struct ata_port *ap;
2929 struct ata_link *link;
2930
2931 @@ -32503,7 +32555,7 @@ index b3f0f5a..b6bc0a7 100644
2932 WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
2933 ap = qc->ap;
2934 link = qc->dev->link;
2935 -@@ -5798,6 +5798,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
2936 +@@ -5803,6 +5803,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
2937 return;
2938
2939 spin_lock(&lock);
2940 @@ -32511,7 +32563,7 @@ index b3f0f5a..b6bc0a7 100644
2941
2942 for (cur = ops->inherits; cur; cur = cur->inherits) {
2943 void **inherit = (void **)cur;
2944 -@@ -5811,8 +5812,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
2945 +@@ -5816,8 +5817,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
2946 if (IS_ERR(*pp))
2947 *pp = NULL;
2948
2949 @@ -34259,44 +34311,6 @@ index 13cbdd3..d374957 100644
2950
2951 static struct asender_cmd *get_asender_cmd(int cmd)
2952 {
2953 -diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
2954 -index 7a90d4a..6d0f3e1 100644
2955 ---- a/drivers/block/floppy.c
2956 -+++ b/drivers/block/floppy.c
2957 -@@ -3060,7 +3060,10 @@ static int raw_cmd_copyout(int cmd, void __user *param,
2958 - int ret;
2959 -
2960 - while (ptr) {
2961 -- ret = copy_to_user(param, ptr, sizeof(*ptr));
2962 -+ struct floppy_raw_cmd cmd = *ptr;
2963 -+ cmd.next = NULL;
2964 -+ cmd.kernel_data = NULL;
2965 -+ ret = copy_to_user(param, &cmd, sizeof(cmd));
2966 - if (ret)
2967 - return -EFAULT;
2968 - param += sizeof(struct floppy_raw_cmd);
2969 -@@ -3114,10 +3117,11 @@ loop:
2970 - return -ENOMEM;
2971 - *rcmd = ptr;
2972 - ret = copy_from_user(ptr, param, sizeof(*ptr));
2973 -- if (ret)
2974 -- return -EFAULT;
2975 - ptr->next = NULL;
2976 - ptr->buffer_length = 0;
2977 -+ ptr->kernel_data = NULL;
2978 -+ if (ret)
2979 -+ return -EFAULT;
2980 - param += sizeof(struct floppy_raw_cmd);
2981 - if (ptr->cmd_count > 33)
2982 - /* the command may now also take up the space
2983 -@@ -3133,7 +3137,6 @@ loop:
2984 - for (i = 0; i < 16; i++)
2985 - ptr->reply[i] = 0;
2986 - ptr->resultcode = 0;
2987 -- ptr->kernel_data = NULL;
2988 -
2989 - if (ptr->flags & (FD_RAW_READ | FD_RAW_WRITE)) {
2990 - if (ptr->length <= 0)
2991 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
2992 index d659135..45fe633 100644
2993 --- a/drivers/block/loop.c
2994 @@ -34891,7 +34905,7 @@ index da3cfee..a5a6606 100644
2995
2996 *ppos = i;
2997 diff --git a/drivers/char/random.c b/drivers/char/random.c
2998 -index c244f0e..05e9c5e 100644
2999 +index c244f0e..0fa19d6 100644
3000 --- a/drivers/char/random.c
3001 +++ b/drivers/char/random.c
3002 @@ -255,10 +255,8 @@
3003 @@ -35629,7 +35643,7 @@ index c244f0e..05e9c5e 100644
3004 }
3005 #endif
3006
3007 -@@ -835,104 +915,127 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
3008 +@@ -835,104 +915,130 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
3009 * from the primary pool to the secondary extraction pool. We make
3010 * sure we pull enough for a 'catastrophic reseed'.
3011 */
3012 @@ -35753,10 +35767,10 @@ index c244f0e..05e9c5e 100644
3013 + ibytes = min_t(size_t, ibytes, max(0, have_bytes - reserved));
3014 + if (ibytes < min)
3015 + ibytes = 0;
3016 -+ entropy_count = max_t(int, 0,
3017 -+ entropy_count - (ibytes << (ENTROPY_SHIFT + 3)));
3018 -+ if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig)
3019 -+ goto retry;
3020 ++ if (have_bytes >= ibytes + reserved)
3021 ++ entropy_count -= ibytes << (ENTROPY_SHIFT + 3);
3022 ++ else
3023 ++ entropy_count = reserved << (ENTROPY_SHIFT + 3);
3024
3025 - if (entropy_count / 8 >= nbytes + reserved) {
3026 - entropy_count -= nbytes*8;
3027 @@ -35767,7 +35781,9 @@ index c244f0e..05e9c5e 100644
3028 - if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig)
3029 - goto retry;
3030 - }
3031 --
3032 ++ if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig)
3033 ++ goto retry;
3034 +
3035 - if (entropy_count < random_write_wakeup_thresh) {
3036 - wake_up_interruptible(&random_write_wait);
3037 - kill_fasync(&fasync, SIGIO, POLL_OUT);
3038 @@ -35823,7 +35839,7 @@ index c244f0e..05e9c5e 100644
3039 spin_lock_irqsave(&r->lock, flags);
3040 for (i = 0; i < r->poolinfo->poolwords; i += 16)
3041 sha_transform(hash.w, (__u8 *)(r->pool + i), workspace);
3042 -@@ -966,27 +1069,43 @@ static void extract_buf(struct entropy_store *r, __u8 *out)
3043 +@@ -966,27 +1072,43 @@ static void extract_buf(struct entropy_store *r, __u8 *out)
3044 hash.w[1] ^= hash.w[4];
3045 hash.w[2] ^= rol32(hash.w[2], 16);
3046
3047 @@ -35878,7 +35894,7 @@ index c244f0e..05e9c5e 100644
3048 xfer_secondary_pool(r, nbytes);
3049 nbytes = account(r, nbytes, min, reserved);
3050
3051 -@@ -994,8 +1113,6 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
3052 +@@ -994,8 +1116,6 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
3053 extract_buf(r, tmp);
3054
3055 if (fips_enabled) {
3056 @@ -35887,7 +35903,7 @@ index c244f0e..05e9c5e 100644
3057 spin_lock_irqsave(&r->lock, flags);
3058 if (!memcmp(tmp, r->last_data, EXTRACT_SIZE))
3059 panic("Hardware RNG duplicated output!\n");
3060 -@@ -1015,12 +1132,17 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
3061 +@@ -1015,12 +1135,17 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
3062 return ret;
3063 }
3064
3065 @@ -35905,7 +35921,7 @@ index c244f0e..05e9c5e 100644
3066 xfer_secondary_pool(r, nbytes);
3067 nbytes = account(r, nbytes, 0, 0);
3068
3069 -@@ -1036,7 +1158,7 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf,
3070 +@@ -1036,7 +1161,7 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf,
3071
3072 extract_buf(r, tmp);
3073 i = min_t(int, nbytes, EXTRACT_SIZE);
3074 @@ -35914,7 +35930,7 @@ index c244f0e..05e9c5e 100644
3075 ret = -EFAULT;
3076 break;
3077 }
3078 -@@ -1055,11 +1177,20 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf,
3079 +@@ -1055,11 +1180,20 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf,
3080 /*
3081 * This function is the exported kernel interface. It returns some
3082 * number of good random numbers, suitable for key generation, seeding
3083 @@ -35937,7 +35953,7 @@ index c244f0e..05e9c5e 100644
3084 extract_entropy(&nonblocking_pool, buf, nbytes, 0, 0);
3085 }
3086 EXPORT_SYMBOL(get_random_bytes);
3087 -@@ -1078,6 +1209,7 @@ void get_random_bytes_arch(void *buf, int nbytes)
3088 +@@ -1078,6 +1212,7 @@ void get_random_bytes_arch(void *buf, int nbytes)
3089 {
3090 char *p = buf;
3091
3092 @@ -35945,7 +35961,7 @@ index c244f0e..05e9c5e 100644
3093 while (nbytes) {
3094 unsigned long v;
3095 int chunk = min(nbytes, (int)sizeof(unsigned long));
3096 -@@ -1111,12 +1243,11 @@ static void init_std_data(struct entropy_store *r)
3097 +@@ -1111,12 +1246,11 @@ static void init_std_data(struct entropy_store *r)
3098 ktime_t now = ktime_get_real();
3099 unsigned long rv;
3100
3101 @@ -35961,7 +35977,7 @@ index c244f0e..05e9c5e 100644
3102 mix_pool_bytes(r, &rv, sizeof(rv), NULL);
3103 }
3104 mix_pool_bytes(r, utsname(), sizeof(*(utsname())), NULL);
3105 -@@ -1139,25 +1270,7 @@ static int rand_initialize(void)
3106 +@@ -1139,25 +1273,7 @@ static int rand_initialize(void)
3107 init_std_data(&nonblocking_pool);
3108 return 0;
3109 }
3110 @@ -35988,7 +36004,7 @@ index c244f0e..05e9c5e 100644
3111
3112 #ifdef CONFIG_BLOCK
3113 void rand_initialize_disk(struct gendisk *disk)
3114 -@@ -1169,71 +1282,59 @@ void rand_initialize_disk(struct gendisk *disk)
3115 +@@ -1169,71 +1285,59 @@ void rand_initialize_disk(struct gendisk *disk)
3116 * source.
3117 */
3118 state = kzalloc(sizeof(struct timer_rand_state), GFP_KERNEL);
3119 @@ -36096,7 +36112,7 @@ index c244f0e..05e9c5e 100644
3120 }
3121
3122 static unsigned int
3123 -@@ -1244,9 +1345,9 @@ random_poll(struct file *file, poll_table * wait)
3124 +@@ -1244,9 +1348,9 @@ random_poll(struct file *file, poll_table * wait)
3125 poll_wait(file, &random_read_wait, wait);
3126 poll_wait(file, &random_write_wait, wait);
3127 mask = 0;
3128 @@ -36108,7 +36124,7 @@ index c244f0e..05e9c5e 100644
3129 mask |= POLLOUT | POLLWRNORM;
3130 return mask;
3131 }
3132 -@@ -1297,7 +1398,8 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
3133 +@@ -1297,7 +1401,8 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
3134 switch (cmd) {
3135 case RNDGETENTCNT:
3136 /* inherently racy, no point locking */
3137 @@ -36118,7 +36134,7 @@ index c244f0e..05e9c5e 100644
3138 return -EFAULT;
3139 return 0;
3140 case RNDADDTOENTCNT:
3141 -@@ -1305,7 +1407,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
3142 +@@ -1305,7 +1410,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
3143 return -EPERM;
3144 if (get_user(ent_count, p))
3145 return -EFAULT;
3146 @@ -36127,7 +36143,7 @@ index c244f0e..05e9c5e 100644
3147 return 0;
3148 case RNDADDENTROPY:
3149 if (!capable(CAP_SYS_ADMIN))
3150 -@@ -1320,14 +1422,19 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
3151 +@@ -1320,14 +1425,19 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
3152 size);
3153 if (retval < 0)
3154 return retval;
3155 @@ -36150,7 +36166,7 @@ index c244f0e..05e9c5e 100644
3156 return 0;
3157 default:
3158 return -EINVAL;
3159 -@@ -1387,23 +1494,23 @@ EXPORT_SYMBOL(generate_random_uuid);
3160 +@@ -1387,23 +1497,23 @@ EXPORT_SYMBOL(generate_random_uuid);
3161 #include <linux/sysctl.h>
3162
3163 static int min_read_thresh = 8, min_write_thresh;
3164 @@ -36181,7 +36197,7 @@ index c244f0e..05e9c5e 100644
3165 unsigned char buf[64], tmp_uuid[16], *uuid;
3166
3167 uuid = table->data;
3168 -@@ -1427,8 +1534,26 @@ static int proc_do_uuid(ctl_table *table, int write,
3169 +@@ -1427,8 +1537,26 @@ static int proc_do_uuid(ctl_table *table, int write,
3170 return proc_dostring(&fake_table, write, buffer, lenp, ppos);
3171 }
3172
3173 @@ -36209,7 +36225,7 @@ index c244f0e..05e9c5e 100644
3174 {
3175 .procname = "poolsize",
3176 .data = &sysctl_poolsize,
3177 -@@ -1440,12 +1565,12 @@ ctl_table random_table[] = {
3178 +@@ -1440,12 +1568,12 @@ ctl_table random_table[] = {
3179 .procname = "entropy_avail",
3180 .maxlen = sizeof(int),
3181 .mode = 0444,
3182 @@ -36224,7 +36240,7 @@ index c244f0e..05e9c5e 100644
3183 .maxlen = sizeof(int),
3184 .mode = 0644,
3185 .proc_handler = proc_dointvec_minmax,
3186 -@@ -1454,7 +1579,7 @@ ctl_table random_table[] = {
3187 +@@ -1454,7 +1582,7 @@ ctl_table random_table[] = {
3188 },
3189 {
3190 .procname = "write_wakeup_threshold",
3191 @@ -36233,7 +36249,7 @@ index c244f0e..05e9c5e 100644
3192 .maxlen = sizeof(int),
3193 .mode = 0644,
3194 .proc_handler = proc_dointvec_minmax,
3195 -@@ -1462,6 +1587,13 @@ ctl_table random_table[] = {
3196 +@@ -1462,6 +1590,13 @@ ctl_table random_table[] = {
3197 .extra2 = &max_write_thresh,
3198 },
3199 {
3200 @@ -36247,7 +36263,7 @@ index c244f0e..05e9c5e 100644
3201 .procname = "boot_id",
3202 .data = &sysctl_bootid,
3203 .maxlen = 16,
3204 -@@ -1492,7 +1624,7 @@ int random_int_secret_init(void)
3205 +@@ -1492,7 +1627,7 @@ int random_int_secret_init(void)
3206 * value is not cryptographically secure but for several uses the cost of
3207 * depleting entropy is too high
3208 */
3209 @@ -36256,7 +36272,7 @@ index c244f0e..05e9c5e 100644
3210 unsigned int get_random_int(void)
3211 {
3212 __u32 *hash;
3213 -@@ -1510,6 +1642,7 @@ unsigned int get_random_int(void)
3214 +@@ -1510,6 +1645,7 @@ unsigned int get_random_int(void)
3215
3216 return ret;
3217 }
3218 @@ -37119,7 +37135,7 @@ index 94a58a0..f5eba42 100644
3219 container_of(_dev_attr, struct dmi_device_attribute, dev_attr)
3220
3221 diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
3222 -index 4cd392d..4b629e1 100644
3223 +index 2861ef4..9e90c69 100644
3224 --- a/drivers/firmware/dmi_scan.c
3225 +++ b/drivers/firmware/dmi_scan.c
3226 @@ -490,11 +490,6 @@ void __init dmi_scan_machine(void)
3227 @@ -37134,7 +37150,7 @@ index 4cd392d..4b629e1 100644
3228 p = dmi_ioremap(0xF0000, 0x10000);
3229 if (p == NULL)
3230 goto error;
3231 -@@ -769,7 +764,7 @@ int dmi_walk(void (*decode)(const struct dmi_header *, void *),
3232 +@@ -775,7 +770,7 @@ int dmi_walk(void (*decode)(const struct dmi_header *, void *),
3233 if (buf == NULL)
3234 return -1;
3235
3236 @@ -49403,7 +49419,7 @@ index 643a0a0..4da1c03 100644
3237 return NULL;
3238 }
3239 diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
3240 -index 0f8a785..9b332e0 100644
3241 +index bac83d8..37d177a 100644
3242 --- a/drivers/tty/n_tty.c
3243 +++ b/drivers/tty/n_tty.c
3244 @@ -1639,6 +1639,7 @@ static int copy_from_read_buf(struct tty_struct *tty,
3245 @@ -49434,7 +49450,7 @@ index 0f8a785..9b332e0 100644
3246 spin_unlock_irqrestore(&tty->read_lock, flags);
3247 *b += n;
3248 *nr -= n;
3249 -@@ -1996,10 +1997,17 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
3250 +@@ -1996,12 +1997,19 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
3251 if (tty->ops->flush_chars)
3252 tty->ops->flush_chars(tty);
3253 } else {
3254 @@ -49444,7 +49460,9 @@ index 0f8a785..9b332e0 100644
3255 + if (lock)
3256 + mutex_lock(&tty->output_lock);
3257 while (nr > 0) {
3258 + mutex_lock(&tty->output_lock);
3259 c = tty->ops->write(tty, b, nr);
3260 + mutex_unlock(&tty->output_lock);
3261 if (c < 0) {
3262 retval = c;
3263 + if (lock)
3264 @@ -49452,7 +49470,7 @@ index 0f8a785..9b332e0 100644
3265 goto break_out;
3266 }
3267 if (!c)
3268 -@@ -2007,6 +2015,8 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
3269 +@@ -2009,6 +2017,8 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
3270 b += c;
3271 nr -= c;
3272 }
3273 @@ -49461,7 +49479,7 @@ index 0f8a785..9b332e0 100644
3274 }
3275 if (!nr)
3276 break;
3277 -@@ -2132,6 +2142,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
3278 +@@ -2134,6 +2144,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
3279 {
3280 *ops = tty_ldisc_N_TTY;
3281 ops->owner = NULL;
3282 @@ -60198,10 +60216,10 @@ index 2444780..2544030 100644
3283 error = PTR_ERR(nlmsvc_task);
3284 svc_exit_thread(nlmsvc_rqst);
3285 diff --git a/fs/locks.c b/fs/locks.c
3286 -index fcc50ab..c3dacf26 100644
3287 +index d4f1d89..0114708 100644
3288 --- a/fs/locks.c
3289 +++ b/fs/locks.c
3290 -@@ -2075,16 +2075,16 @@ void locks_remove_flock(struct file *filp)
3291 +@@ -2074,16 +2074,16 @@ void locks_remove_flock(struct file *filp)
3292 return;
3293
3294 if (filp->f_op && filp->f_op->flock) {
3295 @@ -79815,10 +79833,10 @@ index e6796c1..350d338 100644
3296
3297 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
3298 diff --git a/include/linux/libata.h b/include/linux/libata.h
3299 -index b1fcdba..855901a 100644
3300 +index 375dfdf..7dca34f 100644
3301 --- a/include/linux/libata.h
3302 +++ b/include/linux/libata.h
3303 -@@ -912,7 +912,7 @@ struct ata_port_operations {
3304 +@@ -913,7 +913,7 @@ struct ata_port_operations {
3305 * fields must be pointers.
3306 */
3307 const struct ata_port_operations *inherits;
3308 @@ -80284,7 +80302,7 @@ index 25842b6..6e42df8 100644
3309 /*
3310 * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
3311 diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
3312 -index 468819c..c02b63b 100644
3313 +index 226e0ff..7a566d0 100644
3314 --- a/include/linux/mod_devicetable.h
3315 +++ b/include/linux/mod_devicetable.h
3316 @@ -12,7 +12,7 @@
3317 @@ -80305,7 +80323,7 @@ index 468819c..c02b63b 100644
3318
3319 struct hid_device_id {
3320 __u16 bus;
3321 -@@ -479,7 +479,7 @@ struct dmi_system_id {
3322 +@@ -480,7 +480,7 @@ struct dmi_system_id {
3323 const char *ident;
3324 struct dmi_strmatch matches[4];
3325 void *driver_data;
3326 @@ -93399,7 +93417,7 @@ index 2a07f97..2cdc054 100644
3327 set_page_address(page, (void *)vaddr);
3328
3329 diff --git a/mm/huge_memory.c b/mm/huge_memory.c
3330 -index ed0ed8a..cc835b9 100644
3331 +index ed0ed8a..cc835b97 100644
3332 --- a/mm/huge_memory.c
3333 +++ b/mm/huge_memory.c
3334 @@ -704,7 +704,7 @@ out:
3335 @@ -93412,10 +93430,10 @@ index ed0ed8a..cc835b9 100644
3336 /* if an huge pmd materialized from under us just retry later */
3337 if (unlikely(pmd_trans_huge(*pmd)))
3338 diff --git a/mm/hugetlb.c b/mm/hugetlb.c
3339 -index d399f5f..786c190 100644
3340 +index cac2441..2e0afc5 100644
3341 --- a/mm/hugetlb.c
3342 +++ b/mm/hugetlb.c
3343 -@@ -2008,15 +2008,17 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
3344 +@@ -2009,15 +2009,17 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
3345 struct hstate *h = &default_hstate;
3346 unsigned long tmp;
3347 int ret;
3348 @@ -93436,7 +93454,7 @@ index d399f5f..786c190 100644
3349 if (ret)
3350 goto out;
3351
3352 -@@ -2073,15 +2075,17 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
3353 +@@ -2074,15 +2076,17 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
3354 struct hstate *h = &default_hstate;
3355 unsigned long tmp;
3356 int ret;
3357 @@ -93457,7 +93475,7 @@ index d399f5f..786c190 100644
3358 if (ret)
3359 goto out;
3360
3361 -@@ -2500,6 +2504,27 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
3362 +@@ -2501,6 +2505,27 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
3363 return 1;
3364 }
3365
3366 @@ -93485,7 +93503,7 @@ index d399f5f..786c190 100644
3367 /*
3368 * Hugetlb_cow() should be called with page lock of the original hugepage held.
3369 */
3370 -@@ -2602,6 +2627,11 @@ retry_avoidcopy:
3371 +@@ -2603,6 +2628,11 @@ retry_avoidcopy:
3372 make_huge_pte(vma, new_page, 1));
3373 page_remove_rmap(old_page);
3374 hugepage_add_new_anon_rmap(new_page, vma, address);
3375 @@ -93497,7 +93515,7 @@ index d399f5f..786c190 100644
3376 /* Make the old page be freed below */
3377 new_page = old_page;
3378 mmu_notifier_invalidate_range_end(mm,
3379 -@@ -2753,6 +2783,10 @@ retry:
3380 +@@ -2754,6 +2784,10 @@ retry:
3381 && (vma->vm_flags & VM_SHARED)));
3382 set_huge_pte_at(mm, address, ptep, new_pte);
3383
3384 @@ -93508,7 +93526,7 @@ index d399f5f..786c190 100644
3385 if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) {
3386 /* Optimization, do the COW without a second fault */
3387 ret = hugetlb_cow(mm, vma, address, ptep, new_pte, page);
3388 -@@ -2782,6 +2816,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3389 +@@ -2783,6 +2817,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3390 static DEFINE_MUTEX(hugetlb_instantiation_mutex);
3391 struct hstate *h = hstate_vma(vma);
3392
3393 @@ -93519,7 +93537,7 @@ index d399f5f..786c190 100644
3394 ptep = huge_pte_offset(mm, address);
3395 if (ptep) {
3396 entry = huge_ptep_get(ptep);
3397 -@@ -2793,6 +2831,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3398 +@@ -2794,6 +2832,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3399 VM_FAULT_SET_HINDEX(h - hstates);
3400 }
3401
3402 @@ -93784,7 +93802,7 @@ index 96c4bcf..436254e 100644
3403 /* keep elevated page count for bad page */
3404 return ret;
3405 diff --git a/mm/memory.c b/mm/memory.c
3406 -index d5f913b..32583a0 100644
3407 +index 483e665..32583a0 100644
3408 --- a/mm/memory.c
3409 +++ b/mm/memory.c
3410 @@ -462,8 +462,12 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
3411 @@ -93869,25 +93887,7 @@ index d5f913b..32583a0 100644
3412 return i;
3413 }
3414 EXPORT_SYMBOL(__get_user_pages);
3415 -@@ -1852,12 +1848,17 @@ int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
3416 - unsigned long address, unsigned int fault_flags)
3417 - {
3418 - struct vm_area_struct *vma;
3419 -+ vm_flags_t vm_flags;
3420 - int ret;
3421 -
3422 - vma = find_extend_vma(mm, address);
3423 - if (!vma || address < vma->vm_start)
3424 - return -EFAULT;
3425 -
3426 -+ vm_flags = (fault_flags & FAULT_FLAG_WRITE) ? VM_WRITE : VM_READ;
3427 -+ if (!(vm_flags & vma->vm_flags))
3428 -+ return -EFAULT;
3429 -+
3430 - ret = handle_mm_fault(mm, vma, address, fault_flags);
3431 - if (ret & VM_FAULT_ERROR) {
3432 - if (ret & VM_FAULT_OOM)
3433 -@@ -2023,6 +2024,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
3434 +@@ -2028,6 +2024,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
3435 page_add_file_rmap(page);
3436 set_pte_at(mm, addr, pte, mk_pte(page, prot));
3437
3438 @@ -93898,7 +93898,7 @@ index d5f913b..32583a0 100644
3439 retval = 0;
3440 pte_unmap_unlock(pte, ptl);
3441 return retval;
3442 -@@ -2057,10 +2062,22 @@ out:
3443 +@@ -2062,10 +2062,22 @@ out:
3444 int vm_insert_page(struct vm_area_struct *vma, unsigned long addr,
3445 struct page *page)
3446 {
3447 @@ -93921,7 +93921,7 @@ index d5f913b..32583a0 100644
3448 vma->vm_flags |= VM_INSERTPAGE;
3449 return insert_page(vma, addr, page, vma->vm_page_prot);
3450 }
3451 -@@ -2146,6 +2163,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
3452 +@@ -2151,6 +2163,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
3453 unsigned long pfn)
3454 {
3455 BUG_ON(!(vma->vm_flags & VM_MIXEDMAP));
3456 @@ -93929,7 +93929,7 @@ index d5f913b..32583a0 100644
3457
3458 if (addr < vma->vm_start || addr >= vma->vm_end)
3459 return -EFAULT;
3460 -@@ -2400,7 +2418,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud,
3461 +@@ -2405,7 +2418,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud,
3462
3463 BUG_ON(pud_huge(*pud));
3464
3465 @@ -93940,7 +93940,7 @@ index d5f913b..32583a0 100644
3466 if (!pmd)
3467 return -ENOMEM;
3468 do {
3469 -@@ -2420,7 +2440,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd,
3470 +@@ -2425,7 +2440,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd,
3471 unsigned long next;
3472 int err;
3473
3474 @@ -93951,7 +93951,7 @@ index d5f913b..32583a0 100644
3475 if (!pud)
3476 return -ENOMEM;
3477 do {
3478 -@@ -2508,6 +2530,186 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
3479 +@@ -2513,6 +2530,186 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
3480 copy_user_highpage(dst, src, va, vma);
3481 }
3482
3483 @@ -94138,7 +94138,7 @@ index d5f913b..32583a0 100644
3484 /*
3485 * This routine handles present pages, when users try to write
3486 * to a shared page. It is done by copying the page to a new address
3487 -@@ -2719,6 +2921,12 @@ gotten:
3488 +@@ -2724,6 +2921,12 @@ gotten:
3489 */
3490 page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
3491 if (likely(pte_same(*page_table, orig_pte))) {
3492 @@ -94151,7 +94151,7 @@ index d5f913b..32583a0 100644
3493 if (old_page) {
3494 if (!PageAnon(old_page)) {
3495 dec_mm_counter_fast(mm, MM_FILEPAGES);
3496 -@@ -2770,6 +2978,10 @@ gotten:
3497 +@@ -2775,6 +2978,10 @@ gotten:
3498 page_remove_rmap(old_page);
3499 }
3500
3501 @@ -94162,7 +94162,7 @@ index d5f913b..32583a0 100644
3502 /* Free the old page.. */
3503 new_page = old_page;
3504 ret |= VM_FAULT_WRITE;
3505 -@@ -3049,6 +3261,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
3506 +@@ -3054,6 +3261,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
3507 swap_free(entry);
3508 if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
3509 try_to_free_swap(page);
3510 @@ -94174,7 +94174,7 @@ index d5f913b..32583a0 100644
3511 unlock_page(page);
3512 if (swapcache) {
3513 /*
3514 -@@ -3072,6 +3289,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
3515 +@@ -3077,6 +3289,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
3516
3517 /* No need to invalidate - it was non-present before */
3518 update_mmu_cache(vma, address, page_table);
3519 @@ -94186,7 +94186,7 @@ index d5f913b..32583a0 100644
3520 unlock:
3521 pte_unmap_unlock(page_table, ptl);
3522 out:
3523 -@@ -3091,40 +3313,6 @@ out_release:
3524 +@@ -3096,40 +3313,6 @@ out_release:
3525 }
3526
3527 /*
3528 @@ -94227,7 +94227,7 @@ index d5f913b..32583a0 100644
3529 * We enter with non-exclusive mmap_sem (to exclude vma changes,
3530 * but allow concurrent faults), and pte mapped but not yet locked.
3531 * We return with mmap_sem still held, but pte unmapped and unlocked.
3532 -@@ -3133,27 +3321,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
3533 +@@ -3138,27 +3321,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
3534 unsigned long address, pte_t *page_table, pmd_t *pmd,
3535 unsigned int flags)
3536 {
3537 @@ -94260,7 +94260,7 @@ index d5f913b..32583a0 100644
3538 if (unlikely(anon_vma_prepare(vma)))
3539 goto oom;
3540 page = alloc_zeroed_user_highpage_movable(vma, address);
3541 -@@ -3172,6 +3356,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
3542 +@@ -3177,6 +3356,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
3543 if (!pte_none(*page_table))
3544 goto release;
3545
3546 @@ -94272,7 +94272,7 @@ index d5f913b..32583a0 100644
3547 inc_mm_counter_fast(mm, MM_ANONPAGES);
3548 page_add_new_anon_rmap(page, vma, address);
3549 setpte:
3550 -@@ -3179,6 +3368,12 @@ setpte:
3551 +@@ -3184,6 +3368,12 @@ setpte:
3552
3553 /* No need to invalidate - it was non-present before */
3554 update_mmu_cache(vma, address, page_table);
3555 @@ -94285,7 +94285,7 @@ index d5f913b..32583a0 100644
3556 unlock:
3557 pte_unmap_unlock(page_table, ptl);
3558 return 0;
3559 -@@ -3322,6 +3517,12 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3560 +@@ -3327,6 +3517,12 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3561 */
3562 /* Only go through if we didn't race with anybody else... */
3563 if (likely(pte_same(*page_table, orig_pte))) {
3564 @@ -94298,7 +94298,7 @@ index d5f913b..32583a0 100644
3565 flush_icache_page(vma, page);
3566 entry = mk_pte(page, vma->vm_page_prot);
3567 if (flags & FAULT_FLAG_WRITE)
3568 -@@ -3341,6 +3542,14 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3569 +@@ -3346,6 +3542,14 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3570
3571 /* no need to invalidate: a not-present page won't be cached */
3572 update_mmu_cache(vma, address, page_table);
3573 @@ -94313,7 +94313,7 @@ index d5f913b..32583a0 100644
3574 } else {
3575 if (cow_page)
3576 mem_cgroup_uncharge_page(cow_page);
3577 -@@ -3494,6 +3703,12 @@ int handle_pte_fault(struct mm_struct *mm,
3578 +@@ -3499,6 +3703,12 @@ int handle_pte_fault(struct mm_struct *mm,
3579 if (flags & FAULT_FLAG_WRITE)
3580 flush_tlb_fix_spurious_fault(vma, address);
3581 }
3582 @@ -94326,7 +94326,7 @@ index d5f913b..32583a0 100644
3583 unlock:
3584 pte_unmap_unlock(pte, ptl);
3585 return 0;
3586 -@@ -3510,6 +3725,10 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3587 +@@ -3515,6 +3725,10 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3588 pmd_t *pmd;
3589 pte_t *pte;
3590
3591 @@ -94337,7 +94337,7 @@ index d5f913b..32583a0 100644
3592 __set_current_state(TASK_RUNNING);
3593
3594 count_vm_event(PGFAULT);
3595 -@@ -3521,6 +3740,34 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3596 +@@ -3526,6 +3740,34 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
3597 if (unlikely(is_vm_hugetlb_page(vma)))
3598 return hugetlb_fault(mm, vma, address, flags);
3599
3600 @@ -94372,7 +94372,7 @@ index d5f913b..32583a0 100644
3601 retry:
3602 pgd = pgd_offset(mm, address);
3603 pud = pud_alloc(mm, pgd, address);
3604 -@@ -3562,7 +3809,7 @@ retry:
3605 +@@ -3567,7 +3809,7 @@ retry:
3606 * run pte_offset_map on the pmd, if an huge pmd could
3607 * materialize from under us from a different thread.
3608 */
3609 @@ -94381,7 +94381,7 @@ index d5f913b..32583a0 100644
3610 return VM_FAULT_OOM;
3611 /* if an huge pmd materialized from under us just retry later */
3612 if (unlikely(pmd_trans_huge(*pmd)))
3613 -@@ -3599,6 +3846,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
3614 +@@ -3604,6 +3846,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
3615 spin_unlock(&mm->page_table_lock);
3616 return 0;
3617 }
3618 @@ -94405,7 +94405,7 @@ index d5f913b..32583a0 100644
3619 #endif /* __PAGETABLE_PUD_FOLDED */
3620
3621 #ifndef __PAGETABLE_PMD_FOLDED
3622 -@@ -3629,11 +3893,35 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
3623 +@@ -3634,11 +3893,35 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
3624 spin_unlock(&mm->page_table_lock);
3625 return 0;
3626 }
3627 @@ -94443,7 +94443,7 @@ index d5f913b..32583a0 100644
3628 struct vm_area_struct * vma;
3629
3630 vma = find_vma(current->mm, addr);
3631 -@@ -3666,7 +3954,7 @@ static int __init gate_vma_init(void)
3632 +@@ -3671,7 +3954,7 @@ static int __init gate_vma_init(void)
3633 gate_vma.vm_start = FIXADDR_USER_START;
3634 gate_vma.vm_end = FIXADDR_USER_END;
3635 gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
3636 @@ -94452,7 +94452,7 @@ index d5f913b..32583a0 100644
3637 /*
3638 * Make sure the vDSO gets into every core dump.
3639 * Dumping its contents makes post-mortem fully interpretable later
3640 -@@ -3806,8 +4094,8 @@ out:
3641 +@@ -3811,8 +4094,8 @@ out:
3642 return ret;
3643 }
3644
3645 @@ -94463,7 +94463,7 @@ index d5f913b..32583a0 100644
3646 {
3647 resource_size_t phys_addr;
3648 unsigned long prot = 0;
3649 -@@ -3832,8 +4120,8 @@ int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
3650 +@@ -3837,8 +4120,8 @@ int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
3651 * Access another process' address space as given in mm. If non-NULL, use the
3652 * given task for page fault accounting.
3653 */
3654 @@ -94474,7 +94474,7 @@ index d5f913b..32583a0 100644
3655 {
3656 struct vm_area_struct *vma;
3657 void *old_buf = buf;
3658 -@@ -3841,7 +4129,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
3659 +@@ -3846,7 +4129,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
3660 down_read(&mm->mmap_sem);
3661 /* ignore errors, just check how much was successfully transferred */
3662 while (len) {
3663 @@ -94483,7 +94483,7 @@ index d5f913b..32583a0 100644
3664 void *maddr;
3665 struct page *page = NULL;
3666
3667 -@@ -3900,8 +4188,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
3668 +@@ -3905,8 +4188,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
3669 *
3670 * The caller must hold a reference on @mm.
3671 */
3672 @@ -94494,7 +94494,7 @@ index d5f913b..32583a0 100644
3673 {
3674 return __access_remote_vm(NULL, mm, addr, buf, len, write);
3675 }
3676 -@@ -3911,11 +4199,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
3677 +@@ -3916,11 +4199,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
3678 * Source/target buffer must be kernel space,
3679 * Do not walk the page table directly, use get_user_pages
3680 */
3681
3682 diff --git a/3.2.58/4425_grsec_remove_EI_PAX.patch b/3.2.59/4425_grsec_remove_EI_PAX.patch
3683 similarity index 100%
3684 rename from 3.2.58/4425_grsec_remove_EI_PAX.patch
3685 rename to 3.2.59/4425_grsec_remove_EI_PAX.patch
3686
3687 diff --git a/3.2.58/4427_force_XATTR_PAX_tmpfs.patch b/3.2.59/4427_force_XATTR_PAX_tmpfs.patch
3688 similarity index 100%
3689 rename from 3.2.58/4427_force_XATTR_PAX_tmpfs.patch
3690 rename to 3.2.59/4427_force_XATTR_PAX_tmpfs.patch
3691
3692 diff --git a/3.2.58/4430_grsec-remove-localversion-grsec.patch b/3.2.59/4430_grsec-remove-localversion-grsec.patch
3693 similarity index 100%
3694 rename from 3.2.58/4430_grsec-remove-localversion-grsec.patch
3695 rename to 3.2.59/4430_grsec-remove-localversion-grsec.patch
3696
3697 diff --git a/3.2.58/4435_grsec-mute-warnings.patch b/3.2.59/4435_grsec-mute-warnings.patch
3698 similarity index 100%
3699 rename from 3.2.58/4435_grsec-mute-warnings.patch
3700 rename to 3.2.59/4435_grsec-mute-warnings.patch
3701
3702 diff --git a/3.2.58/4440_grsec-remove-protected-paths.patch b/3.2.59/4440_grsec-remove-protected-paths.patch
3703 similarity index 100%
3704 rename from 3.2.58/4440_grsec-remove-protected-paths.patch
3705 rename to 3.2.59/4440_grsec-remove-protected-paths.patch
3706
3707 diff --git a/3.2.58/4450_grsec-kconfig-default-gids.patch b/3.2.59/4450_grsec-kconfig-default-gids.patch
3708 similarity index 100%
3709 rename from 3.2.58/4450_grsec-kconfig-default-gids.patch
3710 rename to 3.2.59/4450_grsec-kconfig-default-gids.patch
3711
3712 diff --git a/3.2.58/4465_selinux-avc_audit-log-curr_ip.patch b/3.2.59/4465_selinux-avc_audit-log-curr_ip.patch
3713 similarity index 100%
3714 rename from 3.2.58/4465_selinux-avc_audit-log-curr_ip.patch
3715 rename to 3.2.59/4465_selinux-avc_audit-log-curr_ip.patch
3716
3717 diff --git a/3.2.58/4470_disable-compat_vdso.patch b/3.2.59/4470_disable-compat_vdso.patch
3718 similarity index 100%
3719 rename from 3.2.58/4470_disable-compat_vdso.patch
3720 rename to 3.2.59/4470_disable-compat_vdso.patch
3721
3722 diff --git a/3.2.58/4475_emutramp_default_on.patch b/3.2.59/4475_emutramp_default_on.patch
3723 similarity index 100%
3724 rename from 3.2.58/4475_emutramp_default_on.patch
3725 rename to 3.2.59/4475_emutramp_default_on.patch