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.14.27/, 3.17.7/, 3.18.1/, 3.2.65/
Date: Tue, 30 Dec 2014 16:45:19
Message-Id: 1419957930.1f54d81cd90878aca49e50f0e479e6ad246e8637.blueness@gentoo.org@gentoo
1 commit: 1f54d81cd90878aca49e50f0e479e6ad246e8637
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 30 16:45:30 2014 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 30 16:45:30 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-patchset.git;a=commit;h=1f54d81c
7
8 Grsec/PaX: 3.0-{3.2.65,3.14.27,3.18.1}-201412281149
9
10 ---
11 3.14.27/0000_README | 2 +-
12 ...4420_grsecurity-3.0-3.14.27-201412280859.patch} | 19 +-
13 3.14.27/4470_disable-compat_vdso.patch | 2 +-
14 {3.17.7 => 3.18.1}/0000_README | 2 +-
15 .../4420_grsecurity-3.0-3.18.1-201412281149.patch | 10398 ++++++++-----------
16 {3.17.7 => 3.18.1}/4425_grsec_remove_EI_PAX.patch | 0
17 .../4427_force_XATTR_PAX_tmpfs.patch | 4 +-
18 .../4430_grsec-remove-localversion-grsec.patch | 0
19 {3.17.7 => 3.18.1}/4435_grsec-mute-warnings.patch | 13 +-
20 .../4440_grsec-remove-protected-paths.patch | 0
21 .../4450_grsec-kconfig-default-gids.patch | 0
22 .../4465_selinux-avc_audit-log-curr_ip.patch | 0
23 {3.17.7 => 3.18.1}/4470_disable-compat_vdso.patch | 2 +-
24 {3.17.7 => 3.18.1}/4475_emutramp_default_on.patch | 0
25 3.2.65/0000_README | 2 +-
26 ... 4420_grsecurity-3.0-3.2.65-201412280855.patch} | 14 +-
27 3.2.65/4470_disable-compat_vdso.patch | 2 +-
28 17 files changed, 4397 insertions(+), 6063 deletions(-)
29
30 diff --git a/3.14.27/0000_README b/3.14.27/0000_README
31 index 21a4163..677dcac 100644
32 --- a/3.14.27/0000_README
33 +++ b/3.14.27/0000_README
34 @@ -2,7 +2,7 @@ README
35 -----------------------------------------------------------------------------
36 Individual Patch Descriptions:
37 -----------------------------------------------------------------------------
38 -Patch: 4420_grsecurity-3.0-3.14.27-201412211908.patch
39 +Patch: 4420_grsecurity-3.0-3.14.27-201412280859.patch
40 From: http://www.grsecurity.net
41 Desc: hardened-sources base patch from upstream grsecurity
42
43
44 diff --git a/3.14.27/4420_grsecurity-3.0-3.14.27-201412211908.patch b/3.14.27/4420_grsecurity-3.0-3.14.27-201412280859.patch
45 similarity index 99%
46 rename from 3.14.27/4420_grsecurity-3.0-3.14.27-201412211908.patch
47 rename to 3.14.27/4420_grsecurity-3.0-3.14.27-201412280859.patch
48 index 9c6d797..55abedd 100644
49 --- a/3.14.27/4420_grsecurity-3.0-3.14.27-201412211908.patch
50 +++ b/3.14.27/4420_grsecurity-3.0-3.14.27-201412280859.patch
51 @@ -107500,10 +107500,10 @@ index 152d4d2..791684c 100644
52 mkdir -p "$destdir"
53 (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -)
54 diff --git a/scripts/package/mkspec b/scripts/package/mkspec
55 -index 1395760..6ceef68 100755
56 +index 1395760..bca2734 100755
57 --- a/scripts/package/mkspec
58 +++ b/scripts/package/mkspec
59 -@@ -121,14 +121,27 @@ echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
60 +@@ -121,29 +121,40 @@ echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
61 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
62 echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\""
63 echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
64 @@ -107532,9 +107532,16 @@ index 1395760..6ceef68 100755
65 +echo "ln -sf /usr/src/kernels/$KERNELRELEASE /lib/modules/$KERNELRELEASE/source"
66 +echo ""
67 echo "%post"
68 - echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
69 - echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm"
70 -@@ -139,11 +152,11 @@ echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm
71 +-echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
72 +-echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm"
73 +-echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm"
74 +-echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE"
75 +-echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
76 +-echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
77 ++echo "if [ -x /sbin/dracut ]; then"
78 ++echo '/sbin/new-kernel-pkg --dracut --mkinitrd --depmod --install --make-default '"$KERNELRELEASE"' || exit $?'
79 ++echo "else"
80 ++echo '/sbin/new-kernel-pkg --mkinitrd --depmod --install --make-default '"$KERNELRELEASE"' || exit $?'
81 echo "fi"
82 echo ""
83 echo "%files"
84 @@ -107548,7 +107555,7 @@ index 1395760..6ceef68 100755
85 echo "/lib/firmware/$KERNELRELEASE"
86 echo "/boot/*"
87 echo ""
88 -@@ -152,8 +165,7 @@ echo '%defattr (-, root, root)'
89 +@@ -152,8 +163,7 @@ echo '%defattr (-, root, root)'
90 echo "/usr/include"
91 echo ""
92 echo "%files devel"
93
94 diff --git a/3.14.27/4470_disable-compat_vdso.patch b/3.14.27/4470_disable-compat_vdso.patch
95 index d5eed75..cc7c122 100644
96 --- a/3.14.27/4470_disable-compat_vdso.patch
97 +++ b/3.14.27/4470_disable-compat_vdso.patch
98 @@ -26,7 +26,7 @@ Closes bug: http://bugs.gentoo.org/show_bug.cgi?id=210138
99 diff -urp a/arch/x86/Kconfig b/arch/x86/Kconfig
100 --- a/arch/x86/Kconfig 2009-07-31 01:36:57.323857684 +0100
101 +++ b/arch/x86/Kconfig 2009-07-31 01:51:39.395749681 +0100
102 -@@ -1861,17 +1861,8 @@
103 +@@ -1862,17 +1862,8 @@
104
105 config COMPAT_VDSO
106 def_bool n
107
108 diff --git a/3.17.7/0000_README b/3.18.1/0000_README
109 similarity index 96%
110 rename from 3.17.7/0000_README
111 rename to 3.18.1/0000_README
112 index 0970663..2f3438b 100644
113 --- a/3.17.7/0000_README
114 +++ b/3.18.1/0000_README
115 @@ -2,7 +2,7 @@ README
116 -----------------------------------------------------------------------------
117 Individual Patch Descriptions:
118 -----------------------------------------------------------------------------
119 -Patch: 4420_grsecurity-3.0-3.17.7-201412211910.patch
120 +Patch: 4420_grsecurity-3.0-3.18.1-201412281149.patch
121 From: http://www.grsecurity.net
122 Desc: hardened-sources base patch from upstream grsecurity
123
124
125 diff --git a/3.17.7/4420_grsecurity-3.0-3.17.7-201412211910.patch b/3.18.1/4420_grsecurity-3.0-3.18.1-201412281149.patch
126 similarity index 95%
127 rename from 3.17.7/4420_grsecurity-3.0-3.17.7-201412211910.patch
128 rename to 3.18.1/4420_grsecurity-3.0-3.18.1-201412281149.patch
129 index cdfe8b5..9709c10 100644
130 --- a/3.17.7/4420_grsecurity-3.0-3.17.7-201412211910.patch
131 +++ b/3.18.1/4420_grsecurity-3.0-3.18.1-201412281149.patch
132 @@ -235,7 +235,7 @@ index 9de9813..1462492 100644
133 +zconf.lex.c
134 zoffset.h
135 diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
136 -index 764f599..c600e2f 100644
137 +index a311db8..415b28c 100644
138 --- a/Documentation/kbuild/makefiles.txt
139 +++ b/Documentation/kbuild/makefiles.txt
140 @@ -23,10 +23,11 @@ This document describes the Linux kernel Makefiles.
141 @@ -313,10 +313,10 @@ index 764f599..c600e2f 100644
142 A typical pattern in a Kbuild file looks like this:
143
144 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
145 -index 1edd5fd..107ff46 100644
146 +index 479f332..2475ac2 100644
147 --- a/Documentation/kernel-parameters.txt
148 +++ b/Documentation/kernel-parameters.txt
149 -@@ -1155,6 +1155,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
150 +@@ -1182,6 +1182,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
151 Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0.
152 Default: 1024
153
154 @@ -327,7 +327,7 @@ index 1edd5fd..107ff46 100644
155 hashdist= [KNL,NUMA] Large hashes allocated during boot
156 are distributed across NUMA nodes. Defaults on
157 for 64-bit NUMA, off otherwise.
158 -@@ -2175,6 +2179,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
159 +@@ -2259,6 +2263,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
160 noexec=on: enable non-executable mappings (default)
161 noexec=off: disable non-executable mappings
162
163 @@ -338,7 +338,7 @@ index 1edd5fd..107ff46 100644
164 nosmap [X86]
165 Disable SMAP (Supervisor Mode Access Prevention)
166 even if it is supported by processor.
167 -@@ -2467,6 +2475,30 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
168 +@@ -2551,6 +2559,30 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
169 the specified number of seconds. This is to be used if
170 your oopses keep scrolling off the screen.
171
172 @@ -370,22 +370,21 @@ index 1edd5fd..107ff46 100644
173
174 pcd. [PARIDE]
175 diff --git a/Makefile b/Makefile
176 -index 267f893..78c2d4b 100644
177 +index 3f84029..3c5b65e 100644
178 --- a/Makefile
179 +++ b/Makefile
180 -@@ -303,8 +303,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
181 -
182 +@@ -298,7 +298,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
183 HOSTCC = gcc
184 HOSTCXX = g++
185 --HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
186 + HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
187 -HOSTCXXFLAGS = -O2
188 -+HOSTCFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks
189 ++HOSTCFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -std=gnu89 -fno-delete-null-pointer-checks
190 +HOSTCFLAGS += $(call cc-option, -Wno-empty-body)
191 +HOSTCXXFLAGS = -O2 -Wall -W -Wno-array-bounds
192
193 ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
194 HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \
195 -@@ -450,8 +451,8 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
196 +@@ -445,8 +447,8 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
197 # Rules shared between *config targets and build targets
198
199 # Basic helpers built in scripts/
200 @@ -396,7 +395,7 @@ index 267f893..78c2d4b 100644
201 $(Q)$(MAKE) $(build)=scripts/basic
202 $(Q)rm -f .tmp_quiet_recordmcount
203
204 -@@ -625,6 +626,72 @@ endif
205 +@@ -620,6 +622,72 @@ endif
206 # Tell gcc to never replace conditional load with a non-conditional one
207 KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
208
209 @@ -469,7 +468,7 @@ index 267f893..78c2d4b 100644
210 ifdef CONFIG_READABLE_ASM
211 # Disable optimizations that make assembler listings hard to read.
212 # reorder blocks reorders the control in the function
213 -@@ -717,7 +784,7 @@ KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
214 +@@ -712,7 +780,7 @@ KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
215 else
216 KBUILD_CFLAGS += -g
217 endif
218 @@ -478,7 +477,7 @@ index 267f893..78c2d4b 100644
219 endif
220 ifdef CONFIG_DEBUG_INFO_DWARF4
221 KBUILD_CFLAGS += $(call cc-option, -gdwarf-4,)
222 -@@ -867,7 +934,7 @@ export mod_sign_cmd
223 +@@ -877,7 +945,7 @@ export mod_sign_cmd
224
225
226 ifeq ($(KBUILD_EXTMOD),)
227 @@ -487,7 +486,7 @@ index 267f893..78c2d4b 100644
228
229 vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
230 $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
231 -@@ -916,6 +983,8 @@ endif
232 +@@ -924,6 +992,8 @@ endif
233
234 # The actual objects are generated when descending,
235 # make sure no implicit rule kicks in
236 @@ -496,7 +495,7 @@ index 267f893..78c2d4b 100644
237 $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
238
239 # Handle descending into subdirectories listed in $(vmlinux-dirs)
240 -@@ -925,7 +994,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
241 +@@ -933,7 +1003,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
242 # Error messages still appears in the original language
243
244 PHONY += $(vmlinux-dirs)
245 @@ -505,7 +504,7 @@ index 267f893..78c2d4b 100644
246 $(Q)$(MAKE) $(build)=$@
247
248 define filechk_kernel.release
249 -@@ -968,10 +1037,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
250 +@@ -976,10 +1046,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
251
252 archprepare: archheaders archscripts prepare1 scripts_basic
253
254 @@ -519,7 +518,7 @@ index 267f893..78c2d4b 100644
255 prepare: prepare0
256
257 # Generate some files
258 -@@ -1086,6 +1158,8 @@ all: modules
259 +@@ -1094,6 +1167,8 @@ all: modules
260 # using awk while concatenating to the final file.
261
262 PHONY += modules
263 @@ -528,7 +527,7 @@ index 267f893..78c2d4b 100644
264 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
265 $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
266 @$(kecho) ' Building modules, stage 2.';
267 -@@ -1101,7 +1175,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
268 +@@ -1109,7 +1184,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
269
270 # Target to prepare building external modules
271 PHONY += modules_prepare
272 @@ -537,7 +536,7 @@ index 267f893..78c2d4b 100644
273
274 # Target to install modules
275 PHONY += modules_install
276 -@@ -1167,7 +1241,10 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
277 +@@ -1175,7 +1250,10 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
278 Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
279 signing_key.priv signing_key.x509 x509.genkey \
280 extra_certificates signing_key.x509.keyid \
281 @@ -549,7 +548,7 @@ index 267f893..78c2d4b 100644
282
283 # clean - Delete most, but leave enough to build external modules
284 #
285 -@@ -1206,7 +1283,7 @@ distclean: mrproper
286 +@@ -1214,7 +1292,7 @@ distclean: mrproper
287 @find $(srctree) $(RCS_FIND_IGNORE) \
288 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
289 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
290 @@ -558,7 +557,7 @@ index 267f893..78c2d4b 100644
291 -type f -print | xargs rm -f
292
293
294 -@@ -1372,6 +1449,8 @@ PHONY += $(module-dirs) modules
295 +@@ -1380,6 +1458,8 @@ PHONY += $(module-dirs) modules
296 $(module-dirs): crmodverdir $(objtree)/Module.symvers
297 $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
298
299 @@ -567,7 +566,7 @@ index 267f893..78c2d4b 100644
300 modules: $(module-dirs)
301 @$(kecho) ' Building modules, stage 2.';
302 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
303 -@@ -1512,17 +1591,21 @@ else
304 +@@ -1520,17 +1600,21 @@ else
305 target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
306 endif
307
308 @@ -593,10 +592,10 @@ index 267f893..78c2d4b 100644
309 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
310 %.symtypes: %.c prepare scripts FORCE
311 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
312 -@@ -1532,11 +1615,15 @@ endif
313 - $(cmd_crmodverdir)
314 - $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
315 +@@ -1542,11 +1626,15 @@ endif
316 $(build)=$(build-dir)
317 + # Make sure the latest headers are built for Documentation
318 + Documentation/: headers_install
319 -%/: prepare scripts FORCE
320 +%/: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
321 +%/: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
322 @@ -612,10 +611,10 @@ index 267f893..78c2d4b 100644
323 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
324 $(build)=$(build-dir) $(@:.ko=.o)
325 diff --git a/arch/alpha/include/asm/atomic.h b/arch/alpha/include/asm/atomic.h
326 -index ed60a1e..47f1a55 100644
327 +index 8f8eafb..3405f46 100644
328 --- a/arch/alpha/include/asm/atomic.h
329 +++ b/arch/alpha/include/asm/atomic.h
330 -@@ -292,4 +292,14 @@ static inline long atomic64_dec_if_positive(atomic64_t *v)
331 +@@ -239,4 +239,14 @@ static inline long atomic64_dec_if_positive(atomic64_t *v)
332 #define atomic_dec(v) atomic_sub(1,(v))
333 #define atomic64_dec(v) atomic64_sub(1,(v))
334
335 @@ -727,10 +726,10 @@ index 2fd00b7..cfd5069 100644
336
337 for (i = 0; i < n; i++) {
338 diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
339 -index 1402fcc..0b1abd2 100644
340 +index f9c732e..78fbb0f 100644
341 --- a/arch/alpha/kernel/osf_sys.c
342 +++ b/arch/alpha/kernel/osf_sys.c
343 -@@ -1298,10 +1298,11 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
344 +@@ -1295,10 +1295,11 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
345 generic version except that we know how to honor ADDR_LIMIT_32BIT. */
346
347 static unsigned long
348 @@ -744,7 +743,7 @@ index 1402fcc..0b1abd2 100644
349
350 info.flags = 0;
351 info.length = len;
352 -@@ -1309,6 +1310,7 @@ arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
353 +@@ -1306,6 +1307,7 @@ arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
354 info.high_limit = limit;
355 info.align_mask = 0;
356 info.align_offset = 0;
357 @@ -752,7 +751,7 @@ index 1402fcc..0b1abd2 100644
358 return vm_unmapped_area(&info);
359 }
360
361 -@@ -1341,20 +1343,24 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
362 +@@ -1338,20 +1340,24 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
363 merely specific addresses, but regions of memory -- perhaps
364 this feature should be incorporated into all ports? */
365
366 @@ -941,27 +940,11 @@ index 98838a0..b304fb4 100644
367 } else if (!cause) {
368 /* Allow reads even for write-only mappings */
369 if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
370 -diff --git a/arch/arc/kernel/kgdb.c b/arch/arc/kernel/kgdb.c
371 -index a2ff5c5..ecf6a78 100644
372 ---- a/arch/arc/kernel/kgdb.c
373 -+++ b/arch/arc/kernel/kgdb.c
374 -@@ -158,11 +158,6 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
375 - return -1;
376 - }
377 -
378 --unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs)
379 --{
380 -- return instruction_pointer(regs);
381 --}
382 --
383 - int kgdb_arch_init(void)
384 - {
385 - single_step_data.armed = 0;
386 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
387 -index 32cbbd5..c102df9 100644
388 +index 89c4b5c..847a7be 100644
389 --- a/arch/arm/Kconfig
390 +++ b/arch/arm/Kconfig
391 -@@ -1719,7 +1719,7 @@ config ALIGNMENT_TRAP
392 +@@ -1740,7 +1740,7 @@ config ALIGNMENT_TRAP
393
394 config UACCESS_WITH_MEMCPY
395 bool "Use kernel mem{cpy,set}() for {copy_to,clear}_user()"
396 @@ -970,7 +953,7 @@ index 32cbbd5..c102df9 100644
397 default y if CPU_FEROCEON
398 help
399 Implement faster copy_to_user and clear_user methods for CPU
400 -@@ -1983,6 +1983,7 @@ config XIP_PHYS_ADDR
401 +@@ -2004,6 +2004,7 @@ config XIP_PHYS_ADDR
402 config KEXEC
403 bool "Kexec system call (EXPERIMENTAL)"
404 depends on (!SMP || PM_SLEEP_SMP)
405 @@ -979,7 +962,7 @@ index 32cbbd5..c102df9 100644
406 kexec is a system call that implements the ability to shutdown your
407 current kernel, and to start another kernel. It is like a reboot
408 diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
409 -index 3040359..2e964a2 100644
410 +index e22c119..9531fcc 100644
411 --- a/arch/arm/include/asm/atomic.h
412 +++ b/arch/arm/include/asm/atomic.h
413 @@ -18,17 +18,41 @@
414 @@ -1011,10 +994,10 @@ index 3040359..2e964a2 100644
415 * strex/ldrex monitor on some implementations. The reason we can use it for
416 * atomic_set() is the clrex or dummy strex done on every exception return.
417 */
418 - #define atomic_read(v) (*(volatile int *)&(v)->counter)
419 + #define atomic_read(v) ACCESS_ONCE((v)->counter)
420 +static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
421 +{
422 -+ return *(const volatile int *)&v->counter;
423 ++ return ACCESS_ONCE(v->counter);
424 +}
425 #define atomic_set(v,i) (((v)->counter) = (i))
426 +static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i)
427 @@ -1024,153 +1007,80 @@ index 3040359..2e964a2 100644
428
429 #if __LINUX_ARM_ARCH__ >= 6
430
431 -@@ -44,6 +68,36 @@ static inline void atomic_add(int i, atomic_t *v)
432 -
433 - prefetchw(&v->counter);
434 - __asm__ __volatile__("@ atomic_add\n"
435 -+"1: ldrex %1, [%3]\n"
436 -+" adds %0, %1, %4\n"
437 -+
438 -+#ifdef CONFIG_PAX_REFCOUNT
439 -+" bvc 3f\n"
440 -+"2: " REFCOUNT_TRAP_INSN "\n"
441 -+"3:\n"
442 -+#endif
443 -+
444 -+" strex %1, %0, [%3]\n"
445 -+" teq %1, #0\n"
446 -+" bne 1b"
447 -+
448 -+#ifdef CONFIG_PAX_REFCOUNT
449 -+"\n4:\n"
450 -+ _ASM_EXTABLE(2b, 4b)
451 -+#endif
452 -+
453 -+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
454 -+ : "r" (&v->counter), "Ir" (i)
455 -+ : "cc");
456 -+}
457 -+
458 -+static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
459 -+{
460 -+ unsigned long tmp;
461 -+ int result;
462 -+
463 -+ prefetchw(&v->counter);
464 -+ __asm__ __volatile__("@ atomic_add_unchecked\n"
465 - "1: ldrex %0, [%3]\n"
466 - " add %0, %0, %4\n"
467 - " strex %1, %0, [%3]\n"
468 -@@ -63,6 +117,43 @@ static inline int atomic_add_return(int i, atomic_t *v)
469 - prefetchw(&v->counter);
470 +@@ -38,7 +62,25 @@
471 + * to ensure that the update happens.
472 + */
473
474 - __asm__ __volatile__("@ atomic_add_return\n"
475 -+"1: ldrex %1, [%3]\n"
476 -+" adds %0, %1, %4\n"
477 -+
478 +-#define ATOMIC_OP(op, c_op, asm_op) \
479 +#ifdef CONFIG_PAX_REFCOUNT
480 -+" bvc 3f\n"
481 -+" mov %0, %1\n"
482 -+"2: " REFCOUNT_TRAP_INSN "\n"
483 -+"3:\n"
484 -+#endif
485 -+
486 -+" strex %1, %0, [%3]\n"
487 -+" teq %1, #0\n"
488 -+" bne 1b"
489 -+
490 -+#ifdef CONFIG_PAX_REFCOUNT
491 -+"\n4:\n"
492 -+ _ASM_EXTABLE(2b, 4b)
493 -+#endif
494 -+
495 -+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
496 -+ : "r" (&v->counter), "Ir" (i)
497 -+ : "cc");
498 -+
499 -+ smp_mb();
500 -+
501 -+ return result;
502 -+}
503 -+
504 -+static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
505 -+{
506 -+ unsigned long tmp;
507 -+ int result;
508 -+
509 -+ smp_mb();
510 -+ prefetchw(&v->counter);
511 -+
512 -+ __asm__ __volatile__("@ atomic_add_return_unchecked\n"
513 - "1: ldrex %0, [%3]\n"
514 - " add %0, %0, %4\n"
515 - " strex %1, %0, [%3]\n"
516 -@@ -84,6 +175,36 @@ static inline void atomic_sub(int i, atomic_t *v)
517 -
518 - prefetchw(&v->counter);
519 - __asm__ __volatile__("@ atomic_sub\n"
520 -+"1: ldrex %1, [%3]\n"
521 -+" subs %0, %1, %4\n"
522 -+
523 -+#ifdef CONFIG_PAX_REFCOUNT
524 -+" bvc 3f\n"
525 -+"2: " REFCOUNT_TRAP_INSN "\n"
526 -+"3:\n"
527 -+#endif
528 -+
529 -+" strex %1, %0, [%3]\n"
530 -+" teq %1, #0\n"
531 -+" bne 1b"
532 -+
533 -+#ifdef CONFIG_PAX_REFCOUNT
534 -+"\n4:\n"
535 ++#define __OVERFLOW_POST \
536 ++ " bvc 3f\n" \
537 ++ "2: " REFCOUNT_TRAP_INSN "\n"\
538 ++ "3:\n"
539 ++#define __OVERFLOW_POST_RETURN \
540 ++ " bvc 3f\n" \
541 ++" mov %0, %1\n" \
542 ++ "2: " REFCOUNT_TRAP_INSN "\n"\
543 ++ "3:\n"
544 ++#define __OVERFLOW_EXTABLE \
545 ++ "4:\n"
546 + _ASM_EXTABLE(2b, 4b)
547 ++#else
548 ++#define __OVERFLOW_POST
549 ++#define __OVERFLOW_EXTABLE
550 +#endif
551 +
552 -+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
553 -+ : "r" (&v->counter), "Ir" (i)
554 -+ : "cc");
555 -+}
556 -+
557 -+static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
558 -+{
559 -+ unsigned long tmp;
560 -+ int result;
561 -+
562 -+ prefetchw(&v->counter);
563 -+ __asm__ __volatile__("@ atomic_sub_unchecked\n"
564 - "1: ldrex %0, [%3]\n"
565 - " sub %0, %0, %4\n"
566 - " strex %1, %0, [%3]\n"
567 -@@ -103,11 +224,25 @@ static inline int atomic_sub_return(int i, atomic_t *v)
568 - prefetchw(&v->counter);
569 ++#define __ATOMIC_OP(op, suffix, c_op, asm_op, post_op, extable) \
570 + static inline void atomic_##op(int i, atomic_t *v) \
571 + { \
572 + unsigned long tmp; \
573 +@@ -48,15 +90,20 @@ static inline void atomic_##op(int i, atomic_t *v) \
574 + __asm__ __volatile__("@ atomic_" #op "\n" \
575 + "1: ldrex %0, [%3]\n" \
576 + " " #asm_op " %0, %0, %4\n" \
577 ++ post_op \
578 + " strex %1, %0, [%3]\n" \
579 + " teq %1, #0\n" \
580 +-" bne 1b" \
581 ++" bne 1b\n" \
582 ++ extable \
583 + : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \
584 + : "r" (&v->counter), "Ir" (i) \
585 + : "cc"); \
586 + } \
587
588 - __asm__ __volatile__("@ atomic_sub_return\n"
589 --"1: ldrex %0, [%3]\n"
590 --" sub %0, %0, %4\n"
591 -+"1: ldrex %1, [%3]\n"
592 -+" subs %0, %1, %4\n"
593 -+
594 -+#ifdef CONFIG_PAX_REFCOUNT
595 -+" bvc 3f\n"
596 -+" mov %0, %1\n"
597 -+"2: " REFCOUNT_TRAP_INSN "\n"
598 -+"3:\n"
599 -+#endif
600 +-#define ATOMIC_OP_RETURN(op, c_op, asm_op) \
601 ++#define ATOMIC_OP(op, c_op, asm_op) __ATOMIC_OP(op, , c_op, asm_op, , )\
602 ++ __ATOMIC_OP(op, _unchecked, c_op, asm_op##s, __OVERFLOW_POST, __OVERFLOW_EXTABLE)
603 +
604 - " strex %1, %0, [%3]\n"
605 - " teq %1, #0\n"
606 - " bne 1b"
607 -+
608 -+#ifdef CONFIG_PAX_REFCOUNT
609 -+"\n4:\n"
610 -+ _ASM_EXTABLE(2b, 4b)
611 -+#endif
612 -+
613 - : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
614 - : "r" (&v->counter), "Ir" (i)
615 - : "cc");
616 -@@ -152,12 +287,24 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
617 ++#define __ATOMIC_OP_RETURN(op, suffix, c_op, asm_op, post_op, extable) \
618 + static inline int atomic_##op##_return(int i, atomic_t *v) \
619 + { \
620 + unsigned long tmp; \
621 +@@ -68,9 +115,11 @@ static inline int atomic_##op##_return(int i, atomic_t *v) \
622 + __asm__ __volatile__("@ atomic_" #op "_return\n" \
623 + "1: ldrex %0, [%3]\n" \
624 + " " #asm_op " %0, %0, %4\n" \
625 ++ post_op \
626 + " strex %1, %0, [%3]\n" \
627 + " teq %1, #0\n" \
628 +-" bne 1b" \
629 ++" bne 1b\n" \
630 ++ extable \
631 + : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \
632 + : "r" (&v->counter), "Ir" (i) \
633 + : "cc"); \
634 +@@ -80,6 +129,9 @@ static inline int atomic_##op##_return(int i, atomic_t *v) \
635 + return result; \
636 + }
637 +
638 ++#define ATOMIC_OP_RETURN(op, c_op, asm_op) __ATOMIC_OP_RETURN(op, , c_op, asm_op, , )\
639 ++ __ATOMIC_OP_RETURN(op, _unchecked, c_op, asm_op##s, __OVERFLOW_POST_RETURN, __OVERFLOW_EXTABLE)
640 ++
641 + static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
642 + {
643 + int oldval;
644 +@@ -115,12 +167,24 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
645 __asm__ __volatile__ ("@ atomic_add_unless\n"
646 "1: ldrex %0, [%4]\n"
647 " teq %0, %5\n"
648 @@ -1198,7 +1108,7 @@ index 3040359..2e964a2 100644
649 : "=&r" (oldval), "=&r" (newval), "=&r" (tmp), "+Qo" (v->counter)
650 : "r" (&v->counter), "r" (u), "r" (a)
651 : "cc");
652 -@@ -168,6 +315,28 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
653 +@@ -131,6 +195,28 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
654 return oldval;
655 }
656
657 @@ -1227,36 +1137,7 @@ index 3040359..2e964a2 100644
658 #else /* ARM_ARCH_6 */
659
660 #ifdef CONFIG_SMP
661 -@@ -186,7 +355,17 @@ static inline int atomic_add_return(int i, atomic_t *v)
662 -
663 - return val;
664 - }
665 -+
666 -+static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
667 -+{
668 -+ return atomic_add_return(i, v);
669 -+}
670 -+
671 - #define atomic_add(i, v) (void) atomic_add_return(i, v)
672 -+static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
673 -+{
674 -+ (void) atomic_add_return(i, v);
675 -+}
676 -
677 - static inline int atomic_sub_return(int i, atomic_t *v)
678 - {
679 -@@ -201,6 +380,10 @@ static inline int atomic_sub_return(int i, atomic_t *v)
680 - return val;
681 - }
682 - #define atomic_sub(i, v) (void) atomic_sub_return(i, v)
683 -+static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
684 -+{
685 -+ (void) atomic_sub_return(i, v);
686 -+}
687 -
688 - static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
689 - {
690 -@@ -216,6 +399,11 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
691 +@@ -175,6 +261,11 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
692 return ret;
693 }
694
695 @@ -1268,8 +1149,13 @@ index 3040359..2e964a2 100644
696 static inline int __atomic_add_unless(atomic_t *v, int a, int u)
697 {
698 int c, old;
699 -@@ -229,13 +417,33 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
700 - #endif /* __LINUX_ARM_ARCH__ */
701 +@@ -196,16 +287,38 @@ ATOMIC_OPS(sub, -=, sub)
702 +
703 + #undef ATOMIC_OPS
704 + #undef ATOMIC_OP_RETURN
705 ++#undef __ATOMIC_OP_RETURN
706 + #undef ATOMIC_OP
707 ++#undef __ATOMIC_OP
708
709 #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
710 +static inline int atomic_xchg_unchecked(atomic_unchecked_t *v, int new)
711 @@ -1302,7 +1188,7 @@ index 3040359..2e964a2 100644
712 #define atomic_dec_return(v) (atomic_sub_return(1, v))
713 #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
714
715 -@@ -246,6 +454,14 @@ typedef struct {
716 +@@ -216,6 +329,14 @@ typedef struct {
717 long long counter;
718 } atomic64_t;
719
720 @@ -1317,7 +1203,7 @@ index 3040359..2e964a2 100644
721 #define ATOMIC64_INIT(i) { (i) }
722
723 #ifdef CONFIG_ARM_LPAE
724 -@@ -262,6 +478,19 @@ static inline long long atomic64_read(const atomic64_t *v)
725 +@@ -232,6 +353,19 @@ static inline long long atomic64_read(const atomic64_t *v)
726 return result;
727 }
728
729 @@ -1337,7 +1223,7 @@ index 3040359..2e964a2 100644
730 static inline void atomic64_set(atomic64_t *v, long long i)
731 {
732 __asm__ __volatile__("@ atomic64_set\n"
733 -@@ -270,6 +499,15 @@ static inline void atomic64_set(atomic64_t *v, long long i)
734 +@@ -240,6 +374,15 @@ static inline void atomic64_set(atomic64_t *v, long long i)
735 : "r" (&v->counter), "r" (i)
736 );
737 }
738 @@ -1353,7 +1239,7 @@ index 3040359..2e964a2 100644
739 #else
740 static inline long long atomic64_read(const atomic64_t *v)
741 {
742 -@@ -284,6 +522,19 @@ static inline long long atomic64_read(const atomic64_t *v)
743 +@@ -254,6 +397,19 @@ static inline long long atomic64_read(const atomic64_t *v)
744 return result;
745 }
746
747 @@ -1373,7 +1259,7 @@ index 3040359..2e964a2 100644
748 static inline void atomic64_set(atomic64_t *v, long long i)
749 {
750 long long tmp;
751 -@@ -298,6 +549,21 @@ static inline void atomic64_set(atomic64_t *v, long long i)
752 +@@ -268,29 +424,57 @@ static inline void atomic64_set(atomic64_t *v, long long i)
753 : "r" (&v->counter), "r" (i)
754 : "cc");
755 }
756 @@ -1394,156 +1280,91 @@ index 3040359..2e964a2 100644
757 +}
758 #endif
759
760 - static inline void atomic64_add(long long i, atomic64_t *v)
761 -@@ -309,6 +575,37 @@ static inline void atomic64_add(long long i, atomic64_t *v)
762 - __asm__ __volatile__("@ atomic64_add\n"
763 - "1: ldrexd %0, %H0, [%3]\n"
764 - " adds %Q0, %Q0, %Q4\n"
765 -+" adcs %R0, %R0, %R4\n"
766 -+
767 -+#ifdef CONFIG_PAX_REFCOUNT
768 -+" bvc 3f\n"
769 -+"2: " REFCOUNT_TRAP_INSN "\n"
770 -+"3:\n"
771 -+#endif
772 -+
773 -+" strexd %1, %0, %H0, [%3]\n"
774 -+" teq %1, #0\n"
775 -+" bne 1b"
776 -+
777 -+#ifdef CONFIG_PAX_REFCOUNT
778 -+"\n4:\n"
779 -+ _ASM_EXTABLE(2b, 4b)
780 -+#endif
781 -+
782 -+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
783 -+ : "r" (&v->counter), "r" (i)
784 -+ : "cc");
785 -+}
786 -+
787 -+static inline void atomic64_add_unchecked(long long i, atomic64_unchecked_t *v)
788 -+{
789 -+ long long result;
790 -+ unsigned long tmp;
791 -+
792 -+ prefetchw(&v->counter);
793 -+ __asm__ __volatile__("@ atomic64_add_unchecked\n"
794 -+"1: ldrexd %0, %H0, [%3]\n"
795 -+" adds %Q0, %Q0, %Q4\n"
796 - " adc %R0, %R0, %R4\n"
797 - " strexd %1, %0, %H0, [%3]\n"
798 - " teq %1, #0\n"
799 -@@ -329,6 +626,44 @@ static inline long long atomic64_add_return(long long i, atomic64_t *v)
800 - __asm__ __volatile__("@ atomic64_add_return\n"
801 - "1: ldrexd %0, %H0, [%3]\n"
802 - " adds %Q0, %Q0, %Q4\n"
803 -+" adcs %R0, %R0, %R4\n"
804 -+
805 -+#ifdef CONFIG_PAX_REFCOUNT
806 -+" bvc 3f\n"
807 -+" mov %0, %1\n"
808 -+" mov %H0, %H1\n"
809 -+"2: " REFCOUNT_TRAP_INSN "\n"
810 -+"3:\n"
811 -+#endif
812 -+
813 -+" strexd %1, %0, %H0, [%3]\n"
814 -+" teq %1, #0\n"
815 -+" bne 1b"
816 -+
817 -+#ifdef CONFIG_PAX_REFCOUNT
818 -+"\n4:\n"
819 -+ _ASM_EXTABLE(2b, 4b)
820 -+#endif
821 -+
822 -+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
823 -+ : "r" (&v->counter), "r" (i)
824 -+ : "cc");
825 -+
826 -+ smp_mb();
827 -+
828 -+ return result;
829 -+}
830 -+
831 -+static inline long long atomic64_add_return_unchecked(long long i, atomic64_unchecked_t *v)
832 -+{
833 -+ long long result;
834 -+ unsigned long tmp;
835 -+
836 -+ smp_mb();
837 -+
838 -+ __asm__ __volatile__("@ atomic64_add_return_unchecked\n"
839 -+"1: ldrexd %0, %H0, [%3]\n"
840 -+" adds %Q0, %Q0, %Q4\n"
841 - " adc %R0, %R0, %R4\n"
842 - " strexd %1, %0, %H0, [%3]\n"
843 - " teq %1, #0\n"
844 -@@ -351,6 +686,37 @@ static inline void atomic64_sub(long long i, atomic64_t *v)
845 - __asm__ __volatile__("@ atomic64_sub\n"
846 - "1: ldrexd %0, %H0, [%3]\n"
847 - " subs %Q0, %Q0, %Q4\n"
848 -+" sbcs %R0, %R0, %R4\n"
849 -+
850 -+#ifdef CONFIG_PAX_REFCOUNT
851 -+" bvc 3f\n"
852 -+"2: " REFCOUNT_TRAP_INSN "\n"
853 -+"3:\n"
854 -+#endif
855 -+
856 -+" strexd %1, %0, %H0, [%3]\n"
857 -+" teq %1, #0\n"
858 -+" bne 1b"
859 -+
860 -+#ifdef CONFIG_PAX_REFCOUNT
861 -+"\n4:\n"
862 -+ _ASM_EXTABLE(2b, 4b)
863 -+#endif
864 -+
865 -+ : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
866 -+ : "r" (&v->counter), "r" (i)
867 -+ : "cc");
868 -+}
869 -+
870 -+static inline void atomic64_sub_unchecked(long long i, atomic64_unchecked_t *v)
871 -+{
872 -+ long long result;
873 -+ unsigned long tmp;
874 -+
875 -+ prefetchw(&v->counter);
876 -+ __asm__ __volatile__("@ atomic64_sub_unchecked\n"
877 -+"1: ldrexd %0, %H0, [%3]\n"
878 -+" subs %Q0, %Q0, %Q4\n"
879 - " sbc %R0, %R0, %R4\n"
880 - " strexd %1, %0, %H0, [%3]\n"
881 - " teq %1, #0\n"
882 -@@ -371,10 +737,25 @@ static inline long long atomic64_sub_return(long long i, atomic64_t *v)
883 - __asm__ __volatile__("@ atomic64_sub_return\n"
884 - "1: ldrexd %0, %H0, [%3]\n"
885 - " subs %Q0, %Q0, %Q4\n"
886 --" sbc %R0, %R0, %R4\n"
887 -+" sbcs %R0, %R0, %R4\n"
888 -+
889 -+#ifdef CONFIG_PAX_REFCOUNT
890 -+" bvc 3f\n"
891 -+" mov %0, %1\n"
892 -+" mov %H0, %H1\n"
893 -+"2: " REFCOUNT_TRAP_INSN "\n"
894 -+"3:\n"
895 -+#endif
896 -+
897 - " strexd %1, %0, %H0, [%3]\n"
898 - " teq %1, #0\n"
899 - " bne 1b"
900 -+
901 -+#ifdef CONFIG_PAX_REFCOUNT
902 -+"\n4:\n"
903 -+ _ASM_EXTABLE(2b, 4b)
904 -+#endif
905 +-#define ATOMIC64_OP(op, op1, op2) \
906 +-static inline void atomic64_##op(long long i, atomic64_t *v) \
907 ++#undef __OVERFLOW_POST_RETURN
908 ++#define __OVERFLOW_POST_RETURN \
909 ++ " bvc 3f\n" \
910 ++" mov %0, %1\n" \
911 ++" mov %H0, %H1\n" \
912 ++ "2: " REFCOUNT_TRAP_INSN "\n"\
913 ++ "3:\n"
914 ++
915 ++#define __ATOMIC64_OP(op, suffix, op1, op2, post_op, extable) \
916 ++static inline void atomic64_##op##suffix(long long i, atomic64##suffix##_t *v)\
917 + { \
918 + long long result; \
919 + unsigned long tmp; \
920 + \
921 + prefetchw(&v->counter); \
922 +- __asm__ __volatile__("@ atomic64_" #op "\n" \
923 ++ __asm__ __volatile__("@ atomic64_" #op #suffix "\n" \
924 + "1: ldrexd %0, %H0, [%3]\n" \
925 + " " #op1 " %Q0, %Q0, %Q4\n" \
926 + " " #op2 " %R0, %R0, %R4\n" \
927 ++ post_op \
928 + " strexd %1, %0, %H0, [%3]\n" \
929 + " teq %1, #0\n" \
930 +-" bne 1b" \
931 ++" bne 1b\n" \
932 ++ extable \
933 + : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \
934 + : "r" (&v->counter), "r" (i) \
935 + : "cc"); \
936 + } \
937 +
938 +-#define ATOMIC64_OP_RETURN(op, op1, op2) \
939 +-static inline long long atomic64_##op##_return(long long i, atomic64_t *v) \
940 ++#define ATOMIC64_OP(op, op1, op2) __ATOMIC64_OP(op, , op1, op2, , ) \
941 ++ __ATOMIC64_OP(op, _unchecked, op1, op2##s, __OVERFLOW_POST, __OVERFLOW_EXTABLE)
942 +
943 - : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
944 - : "r" (&v->counter), "r" (i)
945 - : "cc");
946 -@@ -410,6 +791,31 @@ static inline long long atomic64_cmpxchg(atomic64_t *ptr, long long old,
947 ++#define __ATOMIC64_OP_RETURN(op, op1, op2, post_op, extable) \
948 ++static inline long long atomic64_##op##_return##suffix(long long i, atomic64##suffix##_t *v) \
949 + { \
950 + long long result; \
951 + unsigned long tmp; \
952 +@@ -298,13 +482,15 @@ static inline long long atomic64_##op##_return(long long i, atomic64_t *v) \
953 + smp_mb(); \
954 + prefetchw(&v->counter); \
955 + \
956 +- __asm__ __volatile__("@ atomic64_" #op "_return\n" \
957 ++ __asm__ __volatile__("@ atomic64_" #op "_return" #suffix "\n" \
958 + "1: ldrexd %0, %H0, [%3]\n" \
959 + " " #op1 " %Q0, %Q0, %Q4\n" \
960 + " " #op2 " %R0, %R0, %R4\n" \
961 ++ post_op \
962 + " strexd %1, %0, %H0, [%3]\n" \
963 + " teq %1, #0\n" \
964 +-" bne 1b" \
965 ++" bne 1b\n" \
966 ++ extable \
967 + : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \
968 + : "r" (&v->counter), "r" (i) \
969 + : "cc"); \
970 +@@ -314,6 +500,9 @@ static inline long long atomic64_##op##_return(long long i, atomic64_t *v) \
971 + return result; \
972 + }
973 +
974 ++#define ATOMIC64_OP_RETURN(op, op1, op2) __ATOMIC64_OP_RETURN(op, , op1, op2, , ) \
975 ++ __ATOMIC64_OP_RETURN(op, _unchecked, op1, op2##s, __OVERFLOW_POST_RETURN, __OVERFLOW_EXTABLE)
976 ++
977 + #define ATOMIC64_OPS(op, op1, op2) \
978 + ATOMIC64_OP(op, op1, op2) \
979 + ATOMIC64_OP_RETURN(op, op1, op2)
980 +@@ -323,7 +512,12 @@ ATOMIC64_OPS(sub, subs, sbc)
981 +
982 + #undef ATOMIC64_OPS
983 + #undef ATOMIC64_OP_RETURN
984 ++#undef __ATOMIC64_OP_RETURN
985 + #undef ATOMIC64_OP
986 ++#undef __ATOMIC64_OP
987 ++#undef __OVERFLOW_EXTABLE
988 ++#undef __OVERFLOW_POST_RETURN
989 ++#undef __OVERFLOW_POST
990 +
991 + static inline long long atomic64_cmpxchg(atomic64_t *ptr, long long old,
992 + long long new)
993 +@@ -351,6 +545,31 @@ static inline long long atomic64_cmpxchg(atomic64_t *ptr, long long old,
994 return oldval;
995 }
996
997 @@ -1575,7 +1396,7 @@ index 3040359..2e964a2 100644
998 static inline long long atomic64_xchg(atomic64_t *ptr, long long new)
999 {
1000 long long result;
1001 -@@ -435,21 +841,35 @@ static inline long long atomic64_xchg(atomic64_t *ptr, long long new)
1002 +@@ -376,21 +595,35 @@ static inline long long atomic64_xchg(atomic64_t *ptr, long long new)
1003 static inline long long atomic64_dec_if_positive(atomic64_t *v)
1004 {
1005 long long result;
1006 @@ -1617,7 +1438,7 @@ index 3040359..2e964a2 100644
1007 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
1008 : "r" (&v->counter)
1009 : "cc");
1010 -@@ -473,13 +893,25 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u)
1011 +@@ -414,13 +647,25 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u)
1012 " teq %0, %5\n"
1013 " teqeq %H0, %H5\n"
1014 " moveq %1, #0\n"
1015 @@ -1646,7 +1467,7 @@ index 3040359..2e964a2 100644
1016 : "=&r" (val), "+r" (ret), "=&r" (tmp), "+Qo" (v->counter)
1017 : "r" (&v->counter), "r" (u), "r" (a)
1018 : "cc");
1019 -@@ -492,10 +924,13 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u)
1020 +@@ -433,10 +678,13 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u)
1021
1022 #define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0)
1023 #define atomic64_inc(v) atomic64_add(1LL, (v))
1024 @@ -2097,7 +1918,7 @@ index 5cfba15..f415e1a 100644
1025 #define PTE_EXT_AP0 (_AT(pteval_t, 1) << 4)
1026 #define PTE_EXT_AP1 (_AT(pteval_t, 2) << 4)
1027 diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h
1028 -index 219ac88..73ec32a 100644
1029 +index f027941..f36ce30 100644
1030 --- a/arch/arm/include/asm/pgtable-2level.h
1031 +++ b/arch/arm/include/asm/pgtable-2level.h
1032 @@ -126,6 +126,9 @@
1033 @@ -2123,7 +1944,7 @@ index 9fd61c7..f8f1cff 100644
1034
1035 /*
1036 diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
1037 -index 06e0bc0..c65bca8 100644
1038 +index a31ecdad..95e98d4 100644
1039 --- a/arch/arm/include/asm/pgtable-3level.h
1040 +++ b/arch/arm/include/asm/pgtable-3level.h
1041 @@ -81,6 +81,7 @@
1042 @@ -2148,7 +1969,7 @@ index 06e0bc0..c65bca8 100644
1043 #define L_PTE_DIRTY_HIGH (1 << (55 - 32))
1044
1045 diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
1046 -index 01baef0..73c156e 100644
1047 +index 3b30062..01a5f9d 100644
1048 --- a/arch/arm/include/asm/pgtable.h
1049 +++ b/arch/arm/include/asm/pgtable.h
1050 @@ -33,6 +33,9 @@
1051 @@ -2231,7 +2052,7 @@ index 01baef0..73c156e 100644
1052 */
1053 #define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG
1054
1055 -@@ -269,7 +317,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
1056 +@@ -267,7 +315,7 @@ PTE_BIT_FUNC(mknexec, |= L_PTE_XN);
1057 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
1058 {
1059 const pteval_t mask = L_PTE_XN | L_PTE_RDONLY | L_PTE_USER |
1060 @@ -2254,10 +2075,10 @@ index c25ef3e..735f14b 100644
1061 extern struct psci_operations psci_ops;
1062 extern struct smp_operations psci_smp_ops;
1063 diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
1064 -index 2ec765c..beb1fe16 100644
1065 +index 18f5a55..5072a40 100644
1066 --- a/arch/arm/include/asm/smp.h
1067 +++ b/arch/arm/include/asm/smp.h
1068 -@@ -113,7 +113,7 @@ struct smp_operations {
1069 +@@ -107,7 +107,7 @@ struct smp_operations {
1070 int (*cpu_disable)(unsigned int cpu);
1071 #endif
1072 #endif
1073 @@ -2563,7 +2384,7 @@ index a88671c..1cc895e 100644
1074 EXPORT_SYMBOL(__get_user_1);
1075 EXPORT_SYMBOL(__get_user_2);
1076 diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
1077 -index 36276cd..9d7b13b 100644
1078 +index 2f5555d..d493c91 100644
1079 --- a/arch/arm/kernel/entry-armv.S
1080 +++ b/arch/arm/kernel/entry-armv.S
1081 @@ -47,6 +47,87 @@
1082 @@ -2671,7 +2492,7 @@ index 36276cd..9d7b13b 100644
1083 .endm
1084
1085 @@ -149,7 +234,11 @@ ENDPROC(__und_invalid)
1086 - .macro svc_entry, stack_hole=0
1087 + .macro svc_entry, stack_hole=0, trace=1
1088 UNWIND(.fnstart )
1089 UNWIND(.save {r0 - pc} )
1090 +
1091 @@ -2695,8 +2516,8 @@ index 36276cd..9d7b13b 100644
1092 SPFIX( addeq r2, r2, #4 )
1093 str r3, [sp, #-4]! @ save the "real" r0 copied
1094 @ from the exception stack
1095 -@@ -317,6 +411,9 @@ ENDPROC(__pabt_svc)
1096 - .macro usr_entry
1097 +@@ -368,6 +462,9 @@ ENDPROC(__fiq_abt)
1098 + .macro usr_entry, trace=1
1099 UNWIND(.fnstart )
1100 UNWIND(.cantunwind ) @ don't unwind the user space
1101 +
1102 @@ -2705,7 +2526,7 @@ index 36276cd..9d7b13b 100644
1103 sub sp, sp, #S_FRAME_SIZE
1104 ARM( stmib sp, {r1 - r12} )
1105 THUMB( stmia sp, {r0 - r12} )
1106 -@@ -421,7 +518,9 @@ __und_usr:
1107 +@@ -478,7 +575,9 @@ __und_usr:
1108 tst r3, #PSR_T_BIT @ Thumb mode?
1109 bne __und_usr_thumb
1110 sub r4, r2, #4 @ ARM instr at LR - 4
1111 @@ -2715,7 +2536,7 @@ index 36276cd..9d7b13b 100644
1112 ARM_BE8(rev r0, r0) @ little endian instruction
1113
1114 @ r0 = 32-bit ARM instruction which caused the exception
1115 -@@ -455,11 +554,15 @@ __und_usr_thumb:
1116 +@@ -512,11 +611,15 @@ __und_usr_thumb:
1117 */
1118 .arch armv6t2
1119 #endif
1120 @@ -2731,7 +2552,7 @@ index 36276cd..9d7b13b 100644
1121 ARM_BE8(rev16 r0, r0) @ little endian instruction
1122 add r2, r2, #2 @ r2 is PC + 2, make it PC + 4
1123 str r2, [sp, #S_PC] @ it's a 2x16bit instr, update
1124 -@@ -489,7 +592,8 @@ ENDPROC(__und_usr)
1125 +@@ -546,7 +649,8 @@ ENDPROC(__und_usr)
1126 */
1127 .pushsection .fixup, "ax"
1128 .align 2
1129 @@ -2741,7 +2562,7 @@ index 36276cd..9d7b13b 100644
1130 ret r9
1131 .popsection
1132 .pushsection __ex_table,"a"
1133 -@@ -698,7 +802,7 @@ ENTRY(__switch_to)
1134 +@@ -766,7 +870,7 @@ ENTRY(__switch_to)
1135 THUMB( str lr, [ip], #4 )
1136 ldr r4, [r2, #TI_TP_VALUE]
1137 ldr r5, [r2, #TI_TP_VALUE + 4]
1138 @@ -2750,7 +2571,7 @@ index 36276cd..9d7b13b 100644
1139 ldr r6, [r2, #TI_CPU_DOMAIN]
1140 #endif
1141 switch_tls r1, r4, r5, r3, r7
1142 -@@ -707,7 +811,7 @@ ENTRY(__switch_to)
1143 +@@ -775,7 +879,7 @@ ENTRY(__switch_to)
1144 ldr r8, =__stack_chk_guard
1145 ldr r7, [r7, #TSK_STACK_CANARY]
1146 #endif
1147 @@ -2760,7 +2581,7 @@ index 36276cd..9d7b13b 100644
1148 #endif
1149 mov r5, r0
1150 diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
1151 -index e52fe5a..1b0a924 100644
1152 +index 6bb09d4..113e875 100644
1153 --- a/arch/arm/kernel/entry-common.S
1154 +++ b/arch/arm/kernel/entry-common.S
1155 @@ -11,18 +11,46 @@
1156 @@ -2827,10 +2648,10 @@ index e52fe5a..1b0a924 100644
1157
1158 #if defined(CONFIG_OABI_COMPAT)
1159 diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
1160 -index 2fdf867..6e909e4 100644
1161 +index 4176df7..a901f8d 100644
1162 --- a/arch/arm/kernel/entry-header.S
1163 +++ b/arch/arm/kernel/entry-header.S
1164 -@@ -188,6 +188,60 @@
1165 +@@ -196,6 +196,60 @@
1166 msr cpsr_c, \rtemp @ switch back to the SVC mode
1167 .endm
1168
1169 @@ -2891,7 +2712,7 @@ index 2fdf867..6e909e4 100644
1170 #ifndef CONFIG_THUMB2_KERNEL
1171 .macro svc_exit, rpsr, irq = 0
1172 .if \irq != 0
1173 -@@ -207,6 +261,9 @@
1174 +@@ -215,6 +269,9 @@
1175 blne trace_hardirqs_off
1176 #endif
1177 .endif
1178 @@ -2901,7 +2722,7 @@ index 2fdf867..6e909e4 100644
1179 msr spsr_cxsf, \rpsr
1180 #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
1181 @ We must avoid clrex due to Cortex-A15 erratum #830321
1182 -@@ -254,6 +311,9 @@
1183 +@@ -290,6 +347,9 @@
1184 blne trace_hardirqs_off
1185 #endif
1186 .endif
1187 @@ -2912,10 +2733,10 @@ index 2fdf867..6e909e4 100644
1188 ldrd r0, r1, [sp, #S_LR] @ calling lr and pc
1189
1190 diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
1191 -index 918875d..cd5fa27 100644
1192 +index b37752a..ff5cb72 100644
1193 --- a/arch/arm/kernel/fiq.c
1194 +++ b/arch/arm/kernel/fiq.c
1195 -@@ -87,7 +87,10 @@ void set_fiq_handler(void *start, unsigned int length)
1196 +@@ -95,7 +95,10 @@ void set_fiq_handler(void *start, unsigned int length)
1197 void *base = vectors_page;
1198 unsigned offset = FIQ_OFFSET;
1199
1200 @@ -3006,10 +2827,10 @@ index 07314af..c46655c 100644
1201 flush_icache_range((uintptr_t)(addr),
1202 (uintptr_t)(addr) + size);
1203 diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
1204 -index a35f6eb..7af43a0 100644
1205 +index fe972a2..a772d83 100644
1206 --- a/arch/arm/kernel/process.c
1207 +++ b/arch/arm/kernel/process.c
1208 -@@ -212,6 +212,7 @@ void machine_power_off(void)
1209 +@@ -207,6 +207,7 @@ void machine_power_off(void)
1210
1211 if (pm_power_off)
1212 pm_power_off();
1213 @@ -3017,7 +2838,7 @@ index a35f6eb..7af43a0 100644
1214 }
1215
1216 /*
1217 -@@ -225,7 +226,7 @@ void machine_power_off(void)
1218 +@@ -220,7 +221,7 @@ void machine_power_off(void)
1219 * executing pre-reset code, and using RAM that the primary CPU's code wishes
1220 * to use. Implementing such co-ordination would be essentially impossible.
1221 */
1222 @@ -3026,7 +2847,7 @@ index a35f6eb..7af43a0 100644
1223 {
1224 local_irq_disable();
1225 smp_send_stop();
1226 -@@ -248,8 +249,8 @@ void __show_regs(struct pt_regs *regs)
1227 +@@ -246,8 +247,8 @@ void __show_regs(struct pt_regs *regs)
1228
1229 show_regs_print_info(KERN_DEFAULT);
1230
1231 @@ -3037,7 +2858,7 @@ index a35f6eb..7af43a0 100644
1232 printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
1233 "sp : %08lx ip : %08lx fp : %08lx\n",
1234 regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr,
1235 -@@ -427,12 +428,6 @@ unsigned long get_wchan(struct task_struct *p)
1236 +@@ -424,12 +425,6 @@ unsigned long get_wchan(struct task_struct *p)
1237 return 0;
1238 }
1239
1240 @@ -3050,7 +2871,7 @@ index a35f6eb..7af43a0 100644
1241 #ifdef CONFIG_MMU
1242 #ifdef CONFIG_KUSER_HELPERS
1243 /*
1244 -@@ -448,7 +443,7 @@ static struct vm_area_struct gate_vma = {
1245 +@@ -445,7 +440,7 @@ static struct vm_area_struct gate_vma = {
1246
1247 static int __init gate_vma_init(void)
1248 {
1249 @@ -3059,24 +2880,58 @@ index a35f6eb..7af43a0 100644
1250 return 0;
1251 }
1252 arch_initcall(gate_vma_init);
1253 -@@ -474,41 +469,16 @@ int in_gate_area_no_mm(unsigned long addr)
1254 -
1255 - const char *arch_vma_name(struct vm_area_struct *vma)
1256 - {
1257 -- return is_gate_vma(vma) ? "[vectors]" :
1258 -- (vma->vm_mm && vma->vm_start == vma->vm_mm->context.sigpage) ?
1259 -- "[sigpage]" : NULL;
1260 -+ return is_gate_vma(vma) ? "[vectors]" : NULL;
1261 +@@ -474,81 +469,13 @@ const char *arch_vma_name(struct vm_area_struct *vma)
1262 + return is_gate_vma(vma) ? "[vectors]" : NULL;
1263 }
1264
1265 +-/* If possible, provide a placement hint at a random offset from the
1266 +- * stack for the signal page.
1267 +- */
1268 +-static unsigned long sigpage_addr(const struct mm_struct *mm,
1269 +- unsigned int npages)
1270 +-{
1271 +- unsigned long offset;
1272 +- unsigned long first;
1273 +- unsigned long last;
1274 +- unsigned long addr;
1275 +- unsigned int slots;
1276 +-
1277 +- first = PAGE_ALIGN(mm->start_stack);
1278 +-
1279 +- last = TASK_SIZE - (npages << PAGE_SHIFT);
1280 +-
1281 +- /* No room after stack? */
1282 +- if (first > last)
1283 +- return 0;
1284 +-
1285 +- /* Just enough room? */
1286 +- if (first == last)
1287 +- return first;
1288 +-
1289 +- slots = ((last - first) >> PAGE_SHIFT) + 1;
1290 +-
1291 +- offset = get_random_int() % slots;
1292 +-
1293 +- addr = first + (offset << PAGE_SHIFT);
1294 +-
1295 +- return addr;
1296 +-}
1297 +-
1298 -static struct page *signal_page;
1299 -extern struct page *get_signal_page(void);
1300 -
1301 +-static const struct vm_special_mapping sigpage_mapping = {
1302 +- .name = "[sigpage]",
1303 +- .pages = &signal_page,
1304 +-};
1305 +-
1306 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
1307 {
1308 struct mm_struct *mm = current->mm;
1309 +- struct vm_area_struct *vma;
1310 - unsigned long addr;
1311 -- int ret;
1312 +- unsigned long hint;
1313 +- int ret = 0;
1314 -
1315 - if (!signal_page)
1316 - signal_page = get_signal_page();
1317 @@ -3084,18 +2939,23 @@ index a35f6eb..7af43a0 100644
1318 - return -ENOMEM;
1319
1320 down_write(&mm->mmap_sem);
1321 -- addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0);
1322 +- hint = sigpage_addr(mm, 1);
1323 +- addr = get_unmapped_area(NULL, hint, PAGE_SIZE, 0, 0);
1324 - if (IS_ERR_VALUE(addr)) {
1325 - ret = addr;
1326 - goto up_fail;
1327 - }
1328 -
1329 -- ret = install_special_mapping(mm, addr, PAGE_SIZE,
1330 +- vma = _install_special_mapping(mm, addr, PAGE_SIZE,
1331 - VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC,
1332 -- &signal_page);
1333 +- &sigpage_mapping);
1334 -
1335 -- if (ret == 0)
1336 -- mm->context.sigpage = addr;
1337 +- if (IS_ERR(vma)) {
1338 +- ret = PTR_ERR(vma);
1339 +- goto up_fail;
1340 +- }
1341 +-
1342 +- mm->context.sigpage = addr;
1343 -
1344 - up_fail:
1345 + mm->context.sigpage = (PAGE_OFFSET + (get_random_int() % 0x3FFEFFE0)) & 0xFFFFFFFC;
1346 @@ -3118,7 +2978,7 @@ index f73891b..cf3004e 100644
1347 static int (*invoke_psci_fn)(u32, u32, u32, u32);
1348 typedef int (*psci_initcall_t)(const struct device_node *);
1349 diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
1350 -index 0c27ed6..b67388e 100644
1351 +index ef9119f..31995a3 100644
1352 --- a/arch/arm/kernel/ptrace.c
1353 +++ b/arch/arm/kernel/ptrace.c
1354 @@ -928,10 +928,19 @@ static void tracehook_report_syscall(struct pt_regs *regs,
1355 @@ -3139,10 +2999,10 @@ index 0c27ed6..b67388e 100644
1356 +#endif
1357 +
1358 /* Do the secure computing check first; failures should be fast. */
1359 - if (secure_computing(scno) == -1)
1360 - return -1;
1361 + #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
1362 + if (secure_computing() == -1)
1363 diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
1364 -index 84db893d..bd8213a 100644
1365 +index c031063..e277ab8 100644
1366 --- a/arch/arm/kernel/setup.c
1367 +++ b/arch/arm/kernel/setup.c
1368 @@ -104,21 +104,23 @@ EXPORT_SYMBOL(elf_hwcap);
1369 @@ -3174,7 +3034,7 @@ index 84db893d..bd8213a 100644
1370 EXPORT_SYMBOL(outer_cache);
1371 #endif
1372
1373 -@@ -251,9 +253,13 @@ static int __get_cpu_architecture(void)
1374 +@@ -252,9 +254,13 @@ static int __get_cpu_architecture(void)
1375 asm("mrc p15, 0, %0, c0, c1, 4"
1376 : "=r" (mmfr0));
1377 if ((mmfr0 & 0x0000000f) >= 0x00000003 ||
1378 @@ -3248,7 +3108,7 @@ index bd19834..e4d8c66 100644
1379 - return page;
1380 -}
1381 diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
1382 -index bbe22fc..d7737f5 100644
1383 +index 13396d3..589d615 100644
1384 --- a/arch/arm/kernel/smp.c
1385 +++ b/arch/arm/kernel/smp.c
1386 @@ -76,7 +76,7 @@ enum ipi_msg_type {
1387 @@ -3284,10 +3144,10 @@ index 7a3be1d..b00c7de 100644
1388 start, end);
1389 itcm_present = true;
1390 diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
1391 -index bea63f5..bc660a7 100644
1392 +index 9f5d818..e013427 100644
1393 --- a/arch/arm/kernel/traps.c
1394 +++ b/arch/arm/kernel/traps.c
1395 -@@ -64,7 +64,7 @@ static void dump_mem(const char *, const char *, unsigned long, unsigned long);
1396 +@@ -65,7 +65,7 @@ static void dump_mem(const char *, const char *, unsigned long, unsigned long);
1397 void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame)
1398 {
1399 #ifdef CONFIG_KALLSYMS
1400 @@ -3296,7 +3156,7 @@ index bea63f5..bc660a7 100644
1401 #else
1402 printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from);
1403 #endif
1404 -@@ -266,6 +266,8 @@ static arch_spinlock_t die_lock = __ARCH_SPIN_LOCK_UNLOCKED;
1405 +@@ -267,6 +267,8 @@ static arch_spinlock_t die_lock = __ARCH_SPIN_LOCK_UNLOCKED;
1406 static int die_owner = -1;
1407 static unsigned int die_nest_count;
1408
1409 @@ -3305,7 +3165,7 @@ index bea63f5..bc660a7 100644
1410 static unsigned long oops_begin(void)
1411 {
1412 int cpu;
1413 -@@ -308,6 +310,9 @@ static void oops_end(unsigned long flags, struct pt_regs *regs, int signr)
1414 +@@ -309,6 +311,9 @@ static void oops_end(unsigned long flags, struct pt_regs *regs, int signr)
1415 panic("Fatal exception in interrupt");
1416 if (panic_on_oops)
1417 panic("Fatal exception");
1418 @@ -3315,7 +3175,7 @@ index bea63f5..bc660a7 100644
1419 if (signr)
1420 do_exit(signr);
1421 }
1422 -@@ -860,7 +865,11 @@ void __init early_trap_init(void *vectors_base)
1423 +@@ -880,7 +885,11 @@ void __init early_trap_init(void *vectors_base)
1424 kuser_init(vectors_base);
1425
1426 flush_icache_range(vectors, vectors + PAGE_SIZE * 2);
1427 @@ -3329,7 +3189,7 @@ index bea63f5..bc660a7 100644
1428 /*
1429 * on V7-M there is no need to copy the vector table to a dedicated
1430 diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
1431 -index 6f57cb9..645f8c4 100644
1432 +index 8e95aa4..595dfc8 100644
1433 --- a/arch/arm/kernel/vmlinux.lds.S
1434 +++ b/arch/arm/kernel/vmlinux.lds.S
1435 @@ -8,7 +8,11 @@
1436 @@ -3386,20 +3246,20 @@ index 6f57cb9..645f8c4 100644
1437
1438 #ifndef CONFIG_XIP_KERNEL
1439 . = ALIGN(PAGE_SIZE);
1440 -@@ -220,6 +233,11 @@ SECTIONS
1441 - . = PAGE_OFFSET + TEXT_OFFSET;
1442 +@@ -221,6 +234,11 @@ SECTIONS
1443 #else
1444 + . = ALIGN(THREAD_SIZE);
1445 __init_end = .;
1446 +
1447 +#ifdef CONFIG_PAX_KERNEXEC
1448 + . = ALIGN(1<<SECTION_SHIFT);
1449 +#endif
1450 +
1451 - . = ALIGN(THREAD_SIZE);
1452 __data_loc = .;
1453 #endif
1454 +
1455 diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
1456 -index a99e0cd..ab56421d 100644
1457 +index 9e193c8..3560fe6 100644
1458 --- a/arch/arm/kvm/arm.c
1459 +++ b/arch/arm/kvm/arm.c
1460 @@ -57,7 +57,7 @@ static unsigned long hyp_default_vectors;
1461 @@ -3411,7 +3271,7 @@ index a99e0cd..ab56421d 100644
1462 static u8 kvm_next_vmid;
1463 static DEFINE_SPINLOCK(kvm_vmid_lock);
1464
1465 -@@ -372,7 +372,7 @@ void force_vm_exit(const cpumask_t *mask)
1466 +@@ -354,7 +354,7 @@ void force_vm_exit(const cpumask_t *mask)
1467 */
1468 static bool need_new_vmid_gen(struct kvm *kvm)
1469 {
1470 @@ -3420,7 +3280,7 @@ index a99e0cd..ab56421d 100644
1471 }
1472
1473 /**
1474 -@@ -405,7 +405,7 @@ static void update_vttbr(struct kvm *kvm)
1475 +@@ -387,7 +387,7 @@ static void update_vttbr(struct kvm *kvm)
1476
1477 /* First user of a new VMID generation? */
1478 if (unlikely(kvm_next_vmid == 0)) {
1479 @@ -3429,7 +3289,7 @@ index a99e0cd..ab56421d 100644
1480 kvm_next_vmid = 1;
1481
1482 /*
1483 -@@ -422,7 +422,7 @@ static void update_vttbr(struct kvm *kvm)
1484 +@@ -404,7 +404,7 @@ static void update_vttbr(struct kvm *kvm)
1485 kvm_call_hyp(__kvm_flush_vm_context);
1486 }
1487
1488 @@ -3438,7 +3298,7 @@ index a99e0cd..ab56421d 100644
1489 kvm->arch.vmid = kvm_next_vmid;
1490 kvm_next_vmid++;
1491
1492 -@@ -997,7 +997,7 @@ static void check_kvm_target_cpu(void *ret)
1493 +@@ -980,7 +980,7 @@ static void check_kvm_target_cpu(void *ret)
1494 /**
1495 * Initialize Hyp-mode and memory mappings on all CPUs.
1496 */
1497 @@ -3594,17 +3454,17 @@ index 3e58d71..029817c 100644
1498 /* See rational for this in __copy_to_user() above. */
1499 if (n < 64)
1500 diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
1501 -index f7a07a5..258e1f7 100644
1502 +index 9610792..4dfb851 100644
1503 --- a/arch/arm/mach-at91/setup.c
1504 +++ b/arch/arm/mach-at91/setup.c
1505 -@@ -81,7 +81,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length)
1506 +@@ -83,7 +83,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length)
1507
1508 desc->pfn = __phys_to_pfn(base);
1509 desc->length = length;
1510 - desc->type = MT_MEMORY_RWX_NONCACHED;
1511 + desc->type = MT_MEMORY_RW_NONCACHED;
1512
1513 - pr_info("AT91: sram at 0x%lx of 0x%x mapped at 0x%lx\n",
1514 + pr_info("sram at 0x%lx of 0x%x mapped at 0x%lx\n",
1515 base, length, desc->virtual);
1516 diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
1517 index 7f352de..6dc0929 100644
1518 @@ -3642,20 +3502,20 @@ index 044b511..afd1da8 100644
1519 return __arm_ioremap_caller(phys_addr, size, mtype, caller);
1520 }
1521 diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
1522 -index aead77a..a2253fa 100644
1523 +index 97767a2..9233746 100644
1524 --- a/arch/arm/mach-omap2/board-n8x0.c
1525 +++ b/arch/arm/mach-omap2/board-n8x0.c
1526 -@@ -568,7 +568,7 @@ static int n8x0_menelaus_late_init(struct device *dev)
1527 +@@ -569,7 +569,7 @@ static int n8x0_menelaus_late_init(struct device *dev)
1528 }
1529 #endif
1530
1531 --static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {
1532 -+static struct menelaus_platform_data n8x0_menelaus_platform_data __initconst = {
1533 +-struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {
1534 ++struct menelaus_platform_data n8x0_menelaus_platform_data __initconst = {
1535 .late_init = n8x0_menelaus_late_init,
1536 };
1537
1538 diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
1539 -index 2f97228..6ce10e1 100644
1540 +index 5fa3755..1e8c247 100644
1541 --- a/arch/arm/mach-omap2/gpmc.c
1542 +++ b/arch/arm/mach-omap2/gpmc.c
1543 @@ -151,7 +151,6 @@ struct omap3_gpmc_regs {
1544 @@ -3702,19 +3562,19 @@ index 2f97228..6ce10e1 100644
1545 gpmc_client_irq[1].bitmask = GPMC_IRQ_COUNT_EVENT;
1546
1547 diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
1548 -index 4001325..b14e2a0 100644
1549 +index 6944ae3..bc587ca 100644
1550 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
1551 +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
1552 -@@ -84,7 +84,7 @@ struct cpu_pm_ops {
1553 - int (*finish_suspend)(unsigned long cpu_state);
1554 +@@ -86,7 +86,7 @@ struct cpu_pm_ops {
1555 void (*resume)(void);
1556 void (*scu_prepare)(unsigned int cpu_id, unsigned int cpu_state);
1557 + void (*hotplug_restart)(void);
1558 -};
1559 +} __no_const;
1560
1561 static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info);
1562 static struct powerdomain *mpuss_pd;
1563 -@@ -102,7 +102,7 @@ static void dummy_cpu_resume(void)
1564 +@@ -105,7 +105,7 @@ static void dummy_cpu_resume(void)
1565 static void dummy_scu_prepare(unsigned int cpu_id, unsigned int cpu_state)
1566 {}
1567
1568 @@ -3724,10 +3584,10 @@ index 4001325..b14e2a0 100644
1569 .resume = dummy_cpu_resume,
1570 .scu_prepare = dummy_scu_prepare,
1571 diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
1572 -index 37843a7..a98df13 100644
1573 +index f961c46..4a453dc 100644
1574 --- a/arch/arm/mach-omap2/omap-wakeupgen.c
1575 +++ b/arch/arm/mach-omap2/omap-wakeupgen.c
1576 -@@ -343,7 +343,7 @@ static int irq_cpu_hotplug_notify(struct notifier_block *self,
1577 +@@ -344,7 +344,7 @@ static int irq_cpu_hotplug_notify(struct notifier_block *self,
1578 return NOTIFY_OK;
1579 }
1580
1581 @@ -3737,7 +3597,7 @@ index 37843a7..a98df13 100644
1582 };
1583
1584 diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
1585 -index d22c30d..23697a1 100644
1586 +index 8c58b71..95b655f 100644
1587 --- a/arch/arm/mach-omap2/omap_device.c
1588 +++ b/arch/arm/mach-omap2/omap_device.c
1589 @@ -510,7 +510,7 @@ void omap_device_delete(struct omap_device *od)
1590 @@ -3778,7 +3638,7 @@ index 78c02b3..c94109a 100644
1591 struct omap_device *omap_device_alloc(struct platform_device *pdev,
1592 struct omap_hwmod **ohs, int oh_cnt);
1593 diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
1594 -index 9e91a4e..357ed0d 100644
1595 +index 716247e..8df346d 100644
1596 --- a/arch/arm/mach-omap2/omap_hwmod.c
1597 +++ b/arch/arm/mach-omap2/omap_hwmod.c
1598 @@ -194,10 +194,10 @@ struct omap_hwmod_soc_ops {
1599 @@ -3818,7 +3678,7 @@ index 95fee54..cfa9cf1 100644
1600 pwrdm_register_pwrdms(powerdomains_am43xx);
1601 pwrdm_complete_init();
1602 diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c
1603 -index 97d6607..8429d14 100644
1604 +index ff0a68c..b312aa0 100644
1605 --- a/arch/arm/mach-omap2/wd_timer.c
1606 +++ b/arch/arm/mach-omap2/wd_timer.c
1607 @@ -110,7 +110,9 @@ static int __init omap_init_wdt(void)
1608 @@ -3976,10 +3836,10 @@ index 83792f4..c25d36b 100644
1609 goto fault; \
1610 } while (0)
1611 diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
1612 -index 5f2c988..221412d 100644
1613 +index 5e65ca8..879e7b3 100644
1614 --- a/arch/arm/mm/cache-l2x0.c
1615 +++ b/arch/arm/mm/cache-l2x0.c
1616 -@@ -41,7 +41,7 @@ struct l2c_init_data {
1617 +@@ -42,7 +42,7 @@ struct l2c_init_data {
1618 void (*fixup)(void __iomem *, u32, struct outer_cache_fns *);
1619 void (*save)(void __iomem *);
1620 struct outer_cache_fns outer_cache;
1621 @@ -4287,7 +4147,7 @@ index cf08bdf..772656c 100644
1622 unsigned long search_exception_table(unsigned long addr);
1623
1624 diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
1625 -index 659c75d..6f8c029 100644
1626 +index 9481f85..6dae261 100644
1627 --- a/arch/arm/mm/init.c
1628 +++ b/arch/arm/mm/init.c
1629 @@ -31,6 +31,8 @@
1630 @@ -4474,7 +4334,7 @@ index 5e85ed3..b10a7ed 100644
1631 }
1632 }
1633 diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
1634 -index 8348ed6..b73a807 100644
1635 +index 9f98cec..115fcb6 100644
1636 --- a/arch/arm/mm/mmu.c
1637 +++ b/arch/arm/mm/mmu.c
1638 @@ -40,6 +40,22 @@
1639 @@ -4858,10 +4718,18 @@ index 8348ed6..b73a807 100644
1640 }
1641
1642 diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
1643 -index a37b989..5c9ae75 100644
1644 +index e1268f9..a9755a7 100644
1645 --- a/arch/arm/net/bpf_jit_32.c
1646 +++ b/arch/arm/net/bpf_jit_32.c
1647 -@@ -71,7 +71,11 @@ struct jit_ctx {
1648 +@@ -20,6 +20,7 @@
1649 + #include <asm/cacheflush.h>
1650 + #include <asm/hwcap.h>
1651 + #include <asm/opcodes.h>
1652 ++#include <asm/pgtable.h>
1653 +
1654 + #include "bpf_jit_32.h"
1655 +
1656 +@@ -71,7 +72,11 @@ struct jit_ctx {
1657 #endif
1658 };
1659
1660 @@ -4873,14 +4741,17 @@ index a37b989..5c9ae75 100644
1661
1662 static u64 jit_get_skb_b(struct sk_buff *skb, unsigned offset)
1663 {
1664 -@@ -930,5 +934,6 @@ void bpf_jit_free(struct bpf_prog *fp)
1665 +@@ -178,8 +183,10 @@ static void jit_fill_hole(void *area, unsigned int size)
1666 {
1667 - if (fp->jited)
1668 - module_free(NULL, fp->bpf_func);
1669 -- kfree(fp);
1670 -+
1671 -+ bpf_prog_unlock_free(fp);
1672 + u32 *ptr;
1673 + /* We are guaranteed to have aligned memory. */
1674 ++ pax_open_kernel();
1675 + for (ptr = area; size >= sizeof(u32); size -= sizeof(u32))
1676 + *ptr++ = __opcode_to_mem_arm(ARM_INST_UDF);
1677 ++ pax_close_kernel();
1678 }
1679 +
1680 + static void build_prologue(struct jit_ctx *ctx)
1681 diff --git a/arch/arm/plat-iop/setup.c b/arch/arm/plat-iop/setup.c
1682 index 5b217f4..c23f40e 100644
1683 --- a/arch/arm/plat-iop/setup.c
1684 @@ -5097,7 +4968,7 @@ index 7caf25d..ee65ac5 100644
1685 #define __read_mostly __attribute__((__section__(".data..read_mostly")))
1686
1687 diff --git a/arch/frv/include/asm/atomic.h b/arch/frv/include/asm/atomic.h
1688 -index f6c3a16..cd422a4 100644
1689 +index 102190a..5334cea 100644
1690 --- a/arch/frv/include/asm/atomic.h
1691 +++ b/arch/frv/include/asm/atomic.h
1692 @@ -181,6 +181,16 @@ static inline void atomic64_dec(atomic64_t *v)
1693 @@ -5218,10 +5089,10 @@ index 5441b14..039a446 100644
1694 make_nr_irqs_h: FORCE
1695 $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h
1696 diff --git a/arch/ia64/include/asm/atomic.h b/arch/ia64/include/asm/atomic.h
1697 -index 0f8bf48..40ea950 100644
1698 +index 0bf0350..2ad1957 100644
1699 --- a/arch/ia64/include/asm/atomic.h
1700 +++ b/arch/ia64/include/asm/atomic.h
1701 -@@ -209,4 +209,14 @@ atomic64_add_negative (__s64 i, atomic64_t *v)
1702 +@@ -193,4 +193,14 @@ atomic64_add_negative (__s64 i, atomic64_t *v)
1703 #define atomic64_inc(v) atomic64_add(1, (v))
1704 #define atomic64_dec(v) atomic64_sub(1, (v))
1705
1706 @@ -5789,10 +5660,10 @@ index 4efe96a..60e8699 100644
1707 #define SMP_CACHE_BYTES L1_CACHE_BYTES
1708
1709 diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
1710 -index 574c430..470200d 100644
1711 +index 9536ef9..9333776 100644
1712 --- a/arch/mips/Kconfig
1713 +++ b/arch/mips/Kconfig
1714 -@@ -2399,6 +2399,7 @@ source "kernel/Kconfig.preempt"
1715 +@@ -2413,6 +2413,7 @@ source "kernel/Kconfig.preempt"
1716
1717 config KEXEC
1718 bool "Kexec system call"
1719 @@ -5814,7 +5685,7 @@ index 02f2444..506969c 100644
1720
1721 static dma_addr_t octeon_unity_phys_to_dma(struct device *dev, phys_addr_t paddr)
1722 diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h
1723 -index 37b2bef..02122b8 100644
1724 +index 6dd6bfc..903b0d6 100644
1725 --- a/arch/mips/include/asm/atomic.h
1726 +++ b/arch/mips/include/asm/atomic.h
1727 @@ -21,15 +21,39 @@
1728 @@ -5845,20 +5716,20 @@ index 37b2bef..02122b8 100644
1729 *
1730 * Atomically reads the value of @v.
1731 */
1732 --#define atomic_read(v) (*(volatile int *)&(v)->counter)
1733 +-#define atomic_read(v) ACCESS_ONCE((v)->counter)
1734 +static inline int atomic_read(const atomic_t *v)
1735 +{
1736 -+ return (*(volatile const int *) &v->counter);
1737 ++ return ACCESS_ONCE(v->counter);
1738 +}
1739 +
1740 +static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
1741 +{
1742 -+ return (*(volatile const int *) &v->counter);
1743 ++ return ACCESS_ONCE(v->counter);
1744 +}
1745
1746 /*
1747 * atomic_set - set atomic variable
1748 -@@ -38,7 +62,15 @@
1749 +@@ -38,47 +62,77 @@
1750 *
1751 * Atomically sets the value of @v to @i.
1752 */
1753 @@ -5867,343 +5738,187 @@ index 37b2bef..02122b8 100644
1754 +{
1755 + v->counter = i;
1756 +}
1757 -+
1758 +
1759 +-#define ATOMIC_OP(op, c_op, asm_op) \
1760 +-static __inline__ void atomic_##op(int i, atomic_t * v) \
1761 +static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i)
1762 +{
1763 + v->counter = i;
1764 +}
1765 -
1766 - /*
1767 - * atomic_add - add integer to atomic variable
1768 -@@ -47,7 +79,67 @@
1769 - *
1770 - * Atomically adds @i to @v.
1771 - */
1772 --static __inline__ void atomic_add(int i, atomic_t * v)
1773 -+static __inline__ void atomic_add(int i, atomic_t *v)
1774 -+{
1775 -+ int temp;
1776 -+
1777 -+ if (kernel_uses_llsc && R10000_LLSC_WAR) {
1778 -+ __asm__ __volatile__(
1779 -+ " .set mips3 \n"
1780 -+ "1: ll %0, %1 # atomic_add \n"
1781 -+#ifdef CONFIG_PAX_REFCOUNT
1782 -+ /* Exception on overflow. */
1783 -+ "2: add %0, %2 \n"
1784 -+#else
1785 -+ " addu %0, %2 \n"
1786 -+#endif
1787 -+ " sc %0, %1 \n"
1788 -+ " beqzl %0, 1b \n"
1789 -+#ifdef CONFIG_PAX_REFCOUNT
1790 -+ "3: \n"
1791 -+ _ASM_EXTABLE(2b, 3b)
1792 -+#endif
1793 -+ " .set mips0 \n"
1794 -+ : "=&r" (temp), "+m" (v->counter)
1795 -+ : "Ir" (i));
1796 -+ } else if (kernel_uses_llsc) {
1797 -+ __asm__ __volatile__(
1798 -+ " .set mips3 \n"
1799 -+ "1: ll %0, %1 # atomic_add \n"
1800 -+#ifdef CONFIG_PAX_REFCOUNT
1801 -+ /* Exception on overflow. */
1802 -+ "2: add %0, %2 \n"
1803 -+#else
1804 -+ " addu %0, %2 \n"
1805 -+#endif
1806 -+ " sc %0, %1 \n"
1807 -+ " beqz %0, 1b \n"
1808 -+#ifdef CONFIG_PAX_REFCOUNT
1809 -+ "3: \n"
1810 -+ _ASM_EXTABLE(2b, 3b)
1811 -+#endif
1812 -+ " .set mips0 \n"
1813 -+ : "=&r" (temp), "+m" (v->counter)
1814 -+ : "Ir" (i));
1815 -+ } else {
1816 -+ unsigned long flags;
1817 -+
1818 -+ raw_local_irq_save(flags);
1819 -+ __asm__ __volatile__(
1820 -+#ifdef CONFIG_PAX_REFCOUNT
1821 -+ /* Exception on overflow. */
1822 -+ "1: add %0, %1 \n"
1823 -+ "2: \n"
1824 -+ _ASM_EXTABLE(1b, 2b)
1825 -+#else
1826 -+ " addu %0, %1 \n"
1827 -+#endif
1828 -+ : "+r" (v->counter) : "Ir" (i));
1829 -+ raw_local_irq_restore(flags);
1830 -+ }
1831 -+}
1832 -+
1833 -+static __inline__ void atomic_add_unchecked(int i, atomic_unchecked_t *v)
1834 - {
1835 - if (kernel_uses_llsc && R10000_LLSC_WAR) {
1836 - int temp;
1837 -@@ -90,7 +182,67 @@ static __inline__ void atomic_add(int i, atomic_t * v)
1838 - *
1839 - * Atomically subtracts @i from @v.
1840 - */
1841 --static __inline__ void atomic_sub(int i, atomic_t * v)
1842 -+static __inline__ void atomic_sub(int i, atomic_t *v)
1843 -+{
1844 -+ int temp;
1845 -+
1846 -+ if (kernel_uses_llsc && R10000_LLSC_WAR) {
1847 -+ __asm__ __volatile__(
1848 -+ " .set mips3 \n"
1849 -+ "1: ll %0, %1 # atomic64_sub \n"
1850 -+#ifdef CONFIG_PAX_REFCOUNT
1851 -+ /* Exception on overflow. */
1852 -+ "2: sub %0, %2 \n"
1853 -+#else
1854 -+ " subu %0, %2 \n"
1855 -+#endif
1856 -+ " sc %0, %1 \n"
1857 -+ " beqzl %0, 1b \n"
1858 -+#ifdef CONFIG_PAX_REFCOUNT
1859 -+ "3: \n"
1860 -+ _ASM_EXTABLE(2b, 3b)
1861 -+#endif
1862 -+ " .set mips0 \n"
1863 -+ : "=&r" (temp), "+m" (v->counter)
1864 -+ : "Ir" (i));
1865 -+ } else if (kernel_uses_llsc) {
1866 -+ __asm__ __volatile__(
1867 -+ " .set mips3 \n"
1868 -+ "1: ll %0, %1 # atomic64_sub \n"
1869 -+#ifdef CONFIG_PAX_REFCOUNT
1870 -+ /* Exception on overflow. */
1871 -+ "2: sub %0, %2 \n"
1872 -+#else
1873 -+ " subu %0, %2 \n"
1874 -+#endif
1875 -+ " sc %0, %1 \n"
1876 -+ " beqz %0, 1b \n"
1877 -+#ifdef CONFIG_PAX_REFCOUNT
1878 -+ "3: \n"
1879 -+ _ASM_EXTABLE(2b, 3b)
1880 -+#endif
1881 -+ " .set mips0 \n"
1882 -+ : "=&r" (temp), "+m" (v->counter)
1883 -+ : "Ir" (i));
1884 -+ } else {
1885 -+ unsigned long flags;
1886 -+
1887 -+ raw_local_irq_save(flags);
1888 -+ __asm__ __volatile__(
1889 -+#ifdef CONFIG_PAX_REFCOUNT
1890 -+ /* Exception on overflow. */
1891 -+ "1: sub %0, %1 \n"
1892 -+ "2: \n"
1893 -+ _ASM_EXTABLE(1b, 2b)
1894 -+#else
1895 -+ " subu %0, %1 \n"
1896 -+#endif
1897 -+ : "+r" (v->counter) : "Ir" (i));
1898 -+ raw_local_irq_restore(flags);
1899 -+ }
1900 -+}
1901 -+
1902 -+static __inline__ void atomic_sub_unchecked(long i, atomic_unchecked_t *v)
1903 - {
1904 - if (kernel_uses_llsc && R10000_LLSC_WAR) {
1905 - int temp;
1906 -@@ -129,7 +281,93 @@ static __inline__ void atomic_sub(int i, atomic_t * v)
1907 - /*
1908 - * Same as above, but return the result value
1909 - */
1910 --static __inline__ int atomic_add_return(int i, atomic_t * v)
1911 -+static __inline__ int atomic_add_return(int i, atomic_t *v)
1912 -+{
1913 -+ int result;
1914 -+ int temp;
1915 -+
1916 -+ smp_mb__before_llsc();
1917 -+
1918 -+ if (kernel_uses_llsc && R10000_LLSC_WAR) {
1919 -+ __asm__ __volatile__(
1920 -+ " .set mips3 \n"
1921 -+ "1: ll %1, %2 # atomic_add_return \n"
1922 -+#ifdef CONFIG_PAX_REFCOUNT
1923 -+ "2: add %0, %1, %3 \n"
1924 -+#else
1925 -+ " addu %0, %1, %3 \n"
1926 -+#endif
1927 -+ " sc %0, %2 \n"
1928 -+ " beqzl %0, 1b \n"
1929 -+#ifdef CONFIG_PAX_REFCOUNT
1930 -+ " b 4f \n"
1931 -+ " .set noreorder \n"
1932 -+ "3: b 5f \n"
1933 -+ " move %0, %1 \n"
1934 -+ " .set reorder \n"
1935 -+ _ASM_EXTABLE(2b, 3b)
1936 -+#endif
1937 -+ "4: addu %0, %1, %3 \n"
1938 -+#ifdef CONFIG_PAX_REFCOUNT
1939 -+ "5: \n"
1940 -+#endif
1941 -+ " .set mips0 \n"
1942 -+ : "=&r" (result), "=&r" (temp), "+m" (v->counter)
1943 -+ : "Ir" (i));
1944 -+ } else if (kernel_uses_llsc) {
1945 -+ __asm__ __volatile__(
1946 -+ " .set mips3 \n"
1947 -+ "1: ll %1, %2 # atomic_add_return \n"
1948 -+#ifdef CONFIG_PAX_REFCOUNT
1949 -+ "2: add %0, %1, %3 \n"
1950 -+#else
1951 -+ " addu %0, %1, %3 \n"
1952 -+#endif
1953 -+ " sc %0, %2 \n"
1954 -+ " bnez %0, 4f \n"
1955 -+ " b 1b \n"
1956 -+#ifdef CONFIG_PAX_REFCOUNT
1957 -+ " .set noreorder \n"
1958 -+ "3: b 5f \n"
1959 -+ " move %0, %1 \n"
1960 -+ " .set reorder \n"
1961 -+ _ASM_EXTABLE(2b, 3b)
1962 -+#endif
1963 -+ "4: addu %0, %1, %3 \n"
1964 -+#ifdef CONFIG_PAX_REFCOUNT
1965 -+ "5: \n"
1966 -+#endif
1967 -+ " .set mips0 \n"
1968 -+ : "=&r" (result), "=&r" (temp), "+m" (v->counter)
1969 -+ : "Ir" (i));
1970 -+ } else {
1971 -+ unsigned long flags;
1972 +
1973 -+ raw_local_irq_save(flags);
1974 -+ __asm__ __volatile__(
1975 -+ " lw %0, %1 \n"
1976 +#ifdef CONFIG_PAX_REFCOUNT
1977 -+ /* Exception on overflow. */
1978 -+ "1: add %0, %2 \n"
1979 ++#define __OVERFLOW_POST \
1980 ++ " b 4f \n" \
1981 ++ " .set noreorder \n" \
1982 ++ "3: b 5f \n" \
1983 ++ " move %0, %1 \n" \
1984 ++ " .set reorder \n"
1985 ++#define __OVERFLOW_EXTABLE \
1986 ++ "3:\n" \
1987 ++ _ASM_EXTABLE(2b, 3b)
1988 +#else
1989 -+ " addu %0, %2 \n"
1990 -+#endif
1991 -+ " sw %0, %1 \n"
1992 -+#ifdef CONFIG_PAX_REFCOUNT
1993 -+ /* Note: Dest reg is not modified on overflow */
1994 -+ "2: \n"
1995 -+ _ASM_EXTABLE(1b, 2b)
1996 -+#endif
1997 -+ : "=&r" (result), "+m" (v->counter) : "Ir" (i));
1998 -+ raw_local_irq_restore(flags);
1999 -+ }
2000 -+
2001 -+ smp_llsc_mb();
2002 -+
2003 -+ return result;
2004 -+}
2005 -+
2006 -+static __inline__ int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
2007 - {
2008 - int result;
2009 ++#define __OVERFLOW_POST
2010 ++#define __OVERFLOW_EXTABLE
2011 ++#endif
2012 ++
2013 ++#define __ATOMIC_OP(op, suffix, asm_op, extable) \
2014 ++static inline void atomic_##op##suffix(int i, atomic##suffix##_t * v) \
2015 + { \
2016 + if (kernel_uses_llsc && R10000_LLSC_WAR) { \
2017 + int temp; \
2018 + \
2019 + __asm__ __volatile__( \
2020 +- " .set arch=r4000 \n" \
2021 +- "1: ll %0, %1 # atomic_" #op " \n" \
2022 +- " " #asm_op " %0, %2 \n" \
2023 ++ " .set mips3 \n" \
2024 ++ "1: ll %0, %1 # atomic_" #op #suffix "\n" \
2025 ++ "2: " #asm_op " %0, %2 \n" \
2026 + " sc %0, %1 \n" \
2027 + " beqzl %0, 1b \n" \
2028 ++ extable \
2029 + " .set mips0 \n" \
2030 + : "=&r" (temp), "+m" (v->counter) \
2031 + : "Ir" (i)); \
2032 + } else if (kernel_uses_llsc) { \
2033 + int temp; \
2034 + \
2035 +- do { \
2036 +- __asm__ __volatile__( \
2037 +- " .set arch=r4000 \n" \
2038 +- " ll %0, %1 # atomic_" #op "\n" \
2039 +- " " #asm_op " %0, %2 \n" \
2040 +- " sc %0, %1 \n" \
2041 +- " .set mips0 \n" \
2042 +- : "=&r" (temp), "+m" (v->counter) \
2043 +- : "Ir" (i)); \
2044 +- } while (unlikely(!temp)); \
2045 ++ __asm__ __volatile__( \
2046 ++ " .set mips3 \n" \
2047 ++ " ll %0, %1 # atomic_" #op #suffix "\n" \
2048 ++ "2: " #asm_op " %0, %2 \n" \
2049 ++ " sc %0, %1 \n" \
2050 ++ " beqz %0, 1b \n" \
2051 ++ extable \
2052 ++ " .set mips0 \n" \
2053 ++ : "=&r" (temp), "+m" (v->counter) \
2054 ++ : "Ir" (i)); \
2055 + } else { \
2056 + unsigned long flags; \
2057 + \
2058 + raw_local_irq_save(flags); \
2059 +- v->counter c_op i; \
2060 ++ __asm__ __volatile__( \
2061 ++ "2: " #asm_op " %0, %1 \n" \
2062 ++ extable \
2063 ++ : "+r" (v->counter) : "Ir" (i)); \
2064 + raw_local_irq_restore(flags); \
2065 + } \
2066 + } \
2067 +
2068 +-#define ATOMIC_OP_RETURN(op, c_op, asm_op) \
2069 +-static __inline__ int atomic_##op##_return(int i, atomic_t * v) \
2070 ++#define ATOMIC_OP(op, asm_op) __ATOMIC_OP(op, , asm_op##u) \
2071 ++ __ATOMIC_OP(op, _unchecked, asm_op)
2072 ++
2073 ++#define __ATOMIC_OP_RETURN(op, suffix, asm_op, post_op, extable) \
2074 ++static inline int atomic_##op##_return##suffix(int i, atomic##suffix##_t * v) \
2075 + { \
2076 + int result; \
2077 + \
2078 +@@ -88,37 +142,47 @@ static __inline__ int atomic_##op##_return(int i, atomic_t * v) \
2079 + int temp; \
2080 + \
2081 + __asm__ __volatile__( \
2082 +- " .set arch=r4000 \n" \
2083 +- "1: ll %1, %2 # atomic_" #op "_return \n" \
2084 +- " " #asm_op " %0, %1, %3 \n" \
2085 ++ " .set mips3 \n" \
2086 ++ "1: ll %1, %2 # atomic_" #op "_return" #suffix "\n" \
2087 ++ "2: " #asm_op " %0, %1, %3 \n" \
2088 + " sc %0, %2 \n" \
2089 + " beqzl %0, 1b \n" \
2090 +- " " #asm_op " %0, %1, %3 \n" \
2091 ++ post_op \
2092 ++ extable \
2093 ++ "4: " #asm_op " %0, %1, %3 \n" \
2094 ++ "5: \n" \
2095 + " .set mips0 \n" \
2096 + : "=&r" (result), "=&r" (temp), "+m" (v->counter) \
2097 + : "Ir" (i)); \
2098 + } else if (kernel_uses_llsc) { \
2099 + int temp; \
2100 + \
2101 +- do { \
2102 +- __asm__ __volatile__( \
2103 +- " .set arch=r4000 \n" \
2104 +- " ll %1, %2 # atomic_" #op "_return \n" \
2105 +- " " #asm_op " %0, %1, %3 \n" \
2106 +- " sc %0, %2 \n" \
2107 +- " .set mips0 \n" \
2108 +- : "=&r" (result), "=&r" (temp), "+m" (v->counter) \
2109 +- : "Ir" (i)); \
2110 +- } while (unlikely(!result)); \
2111 ++ __asm__ __volatile__( \
2112 ++ " .set mips3 \n" \
2113 ++ "1: ll %1, %2 # atomic_" #op "_return" #suffix "\n" \
2114 ++ "2: " #asm_op " %0, %1, %3 \n" \
2115 ++ " sc %0, %2 \n" \
2116 ++ " beqz %0, 1b \n" \
2117 ++ post_op \
2118 ++ extable \
2119 ++ "4: " #asm_op " %0, %1, %3 \n" \
2120 ++ "5: \n" \
2121 ++ " .set mips0 \n" \
2122 ++ : "=&r" (result), "=&r" (temp), "+m" (v->counter) \
2123 ++ : "Ir" (i)); \
2124 + \
2125 + result = temp; result c_op i; \
2126 + } else { \
2127 + unsigned long flags; \
2128 + \
2129 + raw_local_irq_save(flags); \
2130 +- result = v->counter; \
2131 +- result c_op i; \
2132 +- v->counter = result; \
2133 ++ __asm__ __volatile__( \
2134 ++ " lw %0, %1 \n" \
2135 ++ "2: " #asm_op " %0, %1, %2 \n" \
2136 ++ " sw %0, %1 \n" \
2137 ++ "3: \n" \
2138 ++ extable \
2139 ++ : "=&r" (result), "+m" (v->counter) : "Ir" (i)); \
2140 + raw_local_irq_restore(flags); \
2141 + } \
2142 + \
2143 +@@ -127,16 +191,21 @@ static __inline__ int atomic_##op##_return(int i, atomic_t * v) \
2144 + return result; \
2145 + }
2146 +
2147 +-#define ATOMIC_OPS(op, c_op, asm_op) \
2148 +- ATOMIC_OP(op, c_op, asm_op) \
2149 +- ATOMIC_OP_RETURN(op, c_op, asm_op)
2150 ++#define ATOMIC_OP_RETURN(op, asm_op) __ATOMIC_OP_RETURN(op, , asm_op##u, , __OVERFLOW_EXTABLE) \
2151 ++ __ATOMIC_OP_RETURN(op, _unchecked, asm_op, __OVERFLOW_POST, __OVERFLOW_EXTABLE)
2152 +
2153 +-ATOMIC_OPS(add, +=, addu)
2154 +-ATOMIC_OPS(sub, -=, subu)
2155 ++#define ATOMIC_OPS(op, asm_op) \
2156 ++ ATOMIC_OP(op, asm_op) \
2157 ++ ATOMIC_OP_RETURN(op, asm_op)
2158 ++
2159 ++ATOMIC_OPS(add, add)
2160 ++ATOMIC_OPS(sub, sub)
2161 +
2162 + #undef ATOMIC_OPS
2163 + #undef ATOMIC_OP_RETURN
2164 ++#undef __ATOMIC_OP_RETURN
2165 + #undef ATOMIC_OP
2166 ++#undef __ATOMIC_OP
2167
2168 -@@ -178,7 +416,93 @@ static __inline__ int atomic_add_return(int i, atomic_t * v)
2169 - return result;
2170 - }
2171 -
2172 --static __inline__ int atomic_sub_return(int i, atomic_t * v)
2173 -+static __inline__ int atomic_sub_return(int i, atomic_t *v)
2174 -+{
2175 -+ int result;
2176 -+ int temp;
2177 -+
2178 -+ smp_mb__before_llsc();
2179 -+
2180 -+ if (kernel_uses_llsc && R10000_LLSC_WAR) {
2181 -+ __asm__ __volatile__(
2182 -+ " .set mips3 \n"
2183 -+ "1: ll %1, %2 # atomic_sub_return \n"
2184 -+#ifdef CONFIG_PAX_REFCOUNT
2185 -+ "2: sub %0, %1, %3 \n"
2186 -+#else
2187 -+ " subu %0, %1, %3 \n"
2188 -+#endif
2189 -+ " sc %0, %2 \n"
2190 -+ " beqzl %0, 1b \n"
2191 -+#ifdef CONFIG_PAX_REFCOUNT
2192 -+ " b 4f \n"
2193 -+ " .set noreorder \n"
2194 -+ "3: b 5f \n"
2195 -+ " move %0, %1 \n"
2196 -+ " .set reorder \n"
2197 -+ _ASM_EXTABLE(2b, 3b)
2198 -+#endif
2199 -+ "4: subu %0, %1, %3 \n"
2200 -+#ifdef CONFIG_PAX_REFCOUNT
2201 -+ "5: \n"
2202 -+#endif
2203 -+ " .set mips0 \n"
2204 -+ : "=&r" (result), "=&r" (temp), "=m" (v->counter)
2205 -+ : "Ir" (i), "m" (v->counter)
2206 -+ : "memory");
2207 -+ } else if (kernel_uses_llsc) {
2208 -+ __asm__ __volatile__(
2209 -+ " .set mips3 \n"
2210 -+ "1: ll %1, %2 # atomic_sub_return \n"
2211 -+#ifdef CONFIG_PAX_REFCOUNT
2212 -+ "2: sub %0, %1, %3 \n"
2213 -+#else
2214 -+ " subu %0, %1, %3 \n"
2215 -+#endif
2216 -+ " sc %0, %2 \n"
2217 -+ " bnez %0, 4f \n"
2218 -+ " b 1b \n"
2219 -+#ifdef CONFIG_PAX_REFCOUNT
2220 -+ " .set noreorder \n"
2221 -+ "3: b 5f \n"
2222 -+ " move %0, %1 \n"
2223 -+ " .set reorder \n"
2224 -+ _ASM_EXTABLE(2b, 3b)
2225 -+#endif
2226 -+ "4: subu %0, %1, %3 \n"
2227 -+#ifdef CONFIG_PAX_REFCOUNT
2228 -+ "5: \n"
2229 -+#endif
2230 -+ " .set mips0 \n"
2231 -+ : "=&r" (result), "=&r" (temp), "+m" (v->counter)
2232 -+ : "Ir" (i));
2233 -+ } else {
2234 -+ unsigned long flags;
2235 -+
2236 -+ raw_local_irq_save(flags);
2237 -+ __asm__ __volatile__(
2238 -+ " lw %0, %1 \n"
2239 -+#ifdef CONFIG_PAX_REFCOUNT
2240 -+ /* Exception on overflow. */
2241 -+ "1: sub %0, %2 \n"
2242 -+#else
2243 -+ " subu %0, %2 \n"
2244 -+#endif
2245 -+ " sw %0, %1 \n"
2246 -+#ifdef CONFIG_PAX_REFCOUNT
2247 -+ /* Note: Dest reg is not modified on overflow */
2248 -+ "2: \n"
2249 -+ _ASM_EXTABLE(1b, 2b)
2250 -+#endif
2251 -+ : "=&r" (result), "+m" (v->counter) : "Ir" (i));
2252 -+ raw_local_irq_restore(flags);
2253 -+ }
2254 -+
2255 -+ smp_llsc_mb();
2256 -+
2257 -+ return result;
2258 -+}
2259 -+static __inline__ int atomic_sub_return_unchecked(int i, atomic_unchecked_t *v)
2260 - {
2261 - int result;
2262 -
2263 -@@ -238,7 +562,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v)
2264 + /*
2265 + * atomic_sub_if_positive - conditionally subtract integer from atomic variable
2266 +@@ -146,7 +215,7 @@ ATOMIC_OPS(sub, -=, subu)
2267 * Atomically test @v and subtract @i if @v is greater or equal than @i.
2268 * The function returns the old value of @v minus @i.
2269 */
2270 @@ -6212,7 +5927,7 @@ index 37b2bef..02122b8 100644
2271 {
2272 int result;
2273
2274 -@@ -295,8 +619,26 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
2275 +@@ -203,8 +272,26 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
2276 return result;
2277 }
2278
2279 @@ -6241,7 +5956,7 @@ index 37b2bef..02122b8 100644
2280
2281 /**
2282 * __atomic_add_unless - add unless the number is a given value
2283 -@@ -324,6 +666,10 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2284 +@@ -232,6 +319,10 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2285
2286 #define atomic_dec_return(v) atomic_sub_return(1, (v))
2287 #define atomic_inc_return(v) atomic_add_return(1, (v))
2288 @@ -6252,7 +5967,7 @@ index 37b2bef..02122b8 100644
2289
2290 /*
2291 * atomic_sub_and_test - subtract value from variable and test result
2292 -@@ -345,6 +691,10 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2293 +@@ -253,6 +344,10 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2294 * other cases.
2295 */
2296 #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
2297 @@ -6263,7 +5978,7 @@ index 37b2bef..02122b8 100644
2298
2299 /*
2300 * atomic_dec_and_test - decrement by 1 and test
2301 -@@ -369,6 +719,10 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2302 +@@ -277,6 +372,10 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2303 * Atomically increments @v by 1.
2304 */
2305 #define atomic_inc(v) atomic_add(1, (v))
2306 @@ -6274,7 +5989,7 @@ index 37b2bef..02122b8 100644
2307
2308 /*
2309 * atomic_dec - decrement and test
2310 -@@ -377,6 +731,10 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2311 +@@ -285,6 +384,10 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2312 * Atomically decrements @v by 1.
2313 */
2314 #define atomic_dec(v) atomic_sub(1, (v))
2315 @@ -6285,19 +6000,19 @@ index 37b2bef..02122b8 100644
2316
2317 /*
2318 * atomic_add_negative - add and test if negative
2319 -@@ -398,14 +756,30 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2320 +@@ -306,54 +409,77 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2321 * @v: pointer of type atomic64_t
2322 *
2323 */
2324 --#define atomic64_read(v) (*(volatile long *)&(v)->counter)
2325 +-#define atomic64_read(v) ACCESS_ONCE((v)->counter)
2326 +static inline long atomic64_read(const atomic64_t *v)
2327 +{
2328 -+ return (*(volatile const long *) &v->counter);
2329 ++ return ACCESS_ONCE(v->counter);
2330 +}
2331 +
2332 +static inline long atomic64_read_unchecked(const atomic64_unchecked_t *v)
2333 +{
2334 -+ return (*(volatile const long *) &v->counter);
2335 ++ return ACCESS_ONCE(v->counter);
2336 +}
2337
2338 /*
2339 @@ -6310,346 +6025,175 @@ index 37b2bef..02122b8 100644
2340 +{
2341 + v->counter = i;
2342 +}
2343 -+
2344 +
2345 +-#define ATOMIC64_OP(op, c_op, asm_op) \
2346 +-static __inline__ void atomic64_##op(long i, atomic64_t * v) \
2347 +static inline void atomic64_set_unchecked(atomic64_unchecked_t *v, long i)
2348 +{
2349 + v->counter = i;
2350 +}
2351 -
2352 - /*
2353 - * atomic64_add - add integer to atomic variable
2354 -@@ -414,7 +788,66 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
2355 - *
2356 - * Atomically adds @i to @v.
2357 - */
2358 --static __inline__ void atomic64_add(long i, atomic64_t * v)
2359 -+static __inline__ void atomic64_add(long i, atomic64_t *v)
2360 -+{
2361 -+ long temp;
2362 +
2363 -+ if (kernel_uses_llsc && R10000_LLSC_WAR) {
2364 -+ __asm__ __volatile__(
2365 -+ " .set mips3 \n"
2366 -+ "1: lld %0, %1 # atomic64_add \n"
2367 -+#ifdef CONFIG_PAX_REFCOUNT
2368 -+ /* Exception on overflow. */
2369 -+ "2: dadd %0, %2 \n"
2370 -+#else
2371 -+ " daddu %0, %2 \n"
2372 -+#endif
2373 -+ " scd %0, %1 \n"
2374 -+ " beqzl %0, 1b \n"
2375 -+#ifdef CONFIG_PAX_REFCOUNT
2376 -+ "3: \n"
2377 -+ _ASM_EXTABLE(2b, 3b)
2378 -+#endif
2379 -+ " .set mips0 \n"
2380 -+ : "=&r" (temp), "+m" (v->counter)
2381 -+ : "Ir" (i));
2382 -+ } else if (kernel_uses_llsc) {
2383 -+ __asm__ __volatile__(
2384 -+ " .set mips3 \n"
2385 -+ "1: lld %0, %1 # atomic64_add \n"
2386 -+#ifdef CONFIG_PAX_REFCOUNT
2387 -+ /* Exception on overflow. */
2388 -+ "2: dadd %0, %2 \n"
2389 -+#else
2390 -+ " daddu %0, %2 \n"
2391 -+#endif
2392 -+ " scd %0, %1 \n"
2393 -+ " beqz %0, 1b \n"
2394 -+#ifdef CONFIG_PAX_REFCOUNT
2395 -+ "3: \n"
2396 -+ _ASM_EXTABLE(2b, 3b)
2397 -+#endif
2398 -+ " .set mips0 \n"
2399 -+ : "=&r" (temp), "+m" (v->counter)
2400 -+ : "Ir" (i));
2401 -+ } else {
2402 -+ unsigned long flags;
2403 -+
2404 -+ raw_local_irq_save(flags);
2405 -+ __asm__ __volatile__(
2406 -+#ifdef CONFIG_PAX_REFCOUNT
2407 -+ /* Exception on overflow. */
2408 -+ "1: dadd %0, %1 \n"
2409 -+ "2: \n"
2410 -+ _ASM_EXTABLE(1b, 2b)
2411 -+#else
2412 -+ " daddu %0, %1 \n"
2413 -+#endif
2414 -+ : "+r" (v->counter) : "Ir" (i));
2415 -+ raw_local_irq_restore(flags);
2416 -+ }
2417 -+}
2418 -+static __inline__ void atomic64_add_unchecked(long i, atomic64_unchecked_t *v)
2419 - {
2420 - if (kernel_uses_llsc && R10000_LLSC_WAR) {
2421 - long temp;
2422 -@@ -457,7 +890,67 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
2423 - *
2424 - * Atomically subtracts @i from @v.
2425 - */
2426 --static __inline__ void atomic64_sub(long i, atomic64_t * v)
2427 -+static __inline__ void atomic64_sub(long i, atomic64_t *v)
2428 -+{
2429 -+ long temp;
2430 -+
2431 -+ if (kernel_uses_llsc && R10000_LLSC_WAR) {
2432 -+ __asm__ __volatile__(
2433 -+ " .set mips3 \n"
2434 -+ "1: lld %0, %1 # atomic64_sub \n"
2435 -+#ifdef CONFIG_PAX_REFCOUNT
2436 -+ /* Exception on overflow. */
2437 -+ "2: dsub %0, %2 \n"
2438 -+#else
2439 -+ " dsubu %0, %2 \n"
2440 -+#endif
2441 -+ " scd %0, %1 \n"
2442 -+ " beqzl %0, 1b \n"
2443 -+#ifdef CONFIG_PAX_REFCOUNT
2444 -+ "3: \n"
2445 -+ _ASM_EXTABLE(2b, 3b)
2446 -+#endif
2447 -+ " .set mips0 \n"
2448 -+ : "=&r" (temp), "+m" (v->counter)
2449 -+ : "Ir" (i));
2450 -+ } else if (kernel_uses_llsc) {
2451 -+ __asm__ __volatile__(
2452 -+ " .set mips3 \n"
2453 -+ "1: lld %0, %1 # atomic64_sub \n"
2454 -+#ifdef CONFIG_PAX_REFCOUNT
2455 -+ /* Exception on overflow. */
2456 -+ "2: dsub %0, %2 \n"
2457 -+#else
2458 -+ " dsubu %0, %2 \n"
2459 -+#endif
2460 -+ " scd %0, %1 \n"
2461 -+ " beqz %0, 1b \n"
2462 -+#ifdef CONFIG_PAX_REFCOUNT
2463 -+ "3: \n"
2464 -+ _ASM_EXTABLE(2b, 3b)
2465 -+#endif
2466 -+ " .set mips0 \n"
2467 -+ : "=&r" (temp), "+m" (v->counter)
2468 -+ : "Ir" (i));
2469 -+ } else {
2470 -+ unsigned long flags;
2471 -+
2472 -+ raw_local_irq_save(flags);
2473 -+ __asm__ __volatile__(
2474 -+#ifdef CONFIG_PAX_REFCOUNT
2475 -+ /* Exception on overflow. */
2476 -+ "1: dsub %0, %1 \n"
2477 -+ "2: \n"
2478 -+ _ASM_EXTABLE(1b, 2b)
2479 -+#else
2480 -+ " dsubu %0, %1 \n"
2481 -+#endif
2482 -+ : "+r" (v->counter) : "Ir" (i));
2483 -+ raw_local_irq_restore(flags);
2484 -+ }
2485 -+}
2486 -+
2487 -+static __inline__ void atomic64_sub_unchecked(long i, atomic64_unchecked_t *v)
2488 - {
2489 - if (kernel_uses_llsc && R10000_LLSC_WAR) {
2490 - long temp;
2491 -@@ -496,7 +989,93 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
2492 - /*
2493 - * Same as above, but return the result value
2494 - */
2495 --static __inline__ long atomic64_add_return(long i, atomic64_t * v)
2496 -+static __inline__ long atomic64_add_return(long i, atomic64_t *v)
2497 -+{
2498 -+ long result;
2499 -+ long temp;
2500 -+
2501 -+ smp_mb__before_llsc();
2502 -+
2503 -+ if (kernel_uses_llsc && R10000_LLSC_WAR) {
2504 -+ __asm__ __volatile__(
2505 -+ " .set mips3 \n"
2506 -+ "1: lld %1, %2 # atomic64_add_return \n"
2507 -+#ifdef CONFIG_PAX_REFCOUNT
2508 -+ "2: dadd %0, %1, %3 \n"
2509 -+#else
2510 -+ " daddu %0, %1, %3 \n"
2511 -+#endif
2512 -+ " scd %0, %2 \n"
2513 -+ " beqzl %0, 1b \n"
2514 -+#ifdef CONFIG_PAX_REFCOUNT
2515 -+ " b 4f \n"
2516 -+ " .set noreorder \n"
2517 -+ "3: b 5f \n"
2518 -+ " move %0, %1 \n"
2519 -+ " .set reorder \n"
2520 -+ _ASM_EXTABLE(2b, 3b)
2521 -+#endif
2522 -+ "4: daddu %0, %1, %3 \n"
2523 -+#ifdef CONFIG_PAX_REFCOUNT
2524 -+ "5: \n"
2525 -+#endif
2526 -+ " .set mips0 \n"
2527 -+ : "=&r" (result), "=&r" (temp), "+m" (v->counter)
2528 -+ : "Ir" (i));
2529 -+ } else if (kernel_uses_llsc) {
2530 -+ __asm__ __volatile__(
2531 -+ " .set mips3 \n"
2532 -+ "1: lld %1, %2 # atomic64_add_return \n"
2533 -+#ifdef CONFIG_PAX_REFCOUNT
2534 -+ "2: dadd %0, %1, %3 \n"
2535 -+#else
2536 -+ " daddu %0, %1, %3 \n"
2537 -+#endif
2538 -+ " scd %0, %2 \n"
2539 -+ " bnez %0, 4f \n"
2540 -+ " b 1b \n"
2541 -+#ifdef CONFIG_PAX_REFCOUNT
2542 -+ " .set noreorder \n"
2543 -+ "3: b 5f \n"
2544 -+ " move %0, %1 \n"
2545 -+ " .set reorder \n"
2546 -+ _ASM_EXTABLE(2b, 3b)
2547 -+#endif
2548 -+ "4: daddu %0, %1, %3 \n"
2549 -+#ifdef CONFIG_PAX_REFCOUNT
2550 -+ "5: \n"
2551 -+#endif
2552 -+ " .set mips0 \n"
2553 -+ : "=&r" (result), "=&r" (temp), "=m" (v->counter)
2554 -+ : "Ir" (i), "m" (v->counter)
2555 -+ : "memory");
2556 -+ } else {
2557 -+ unsigned long flags;
2558 -+
2559 -+ raw_local_irq_save(flags);
2560 -+ __asm__ __volatile__(
2561 -+ " ld %0, %1 \n"
2562 -+#ifdef CONFIG_PAX_REFCOUNT
2563 -+ /* Exception on overflow. */
2564 -+ "1: dadd %0, %2 \n"
2565 -+#else
2566 -+ " daddu %0, %2 \n"
2567 -+#endif
2568 -+ " sd %0, %1 \n"
2569 -+#ifdef CONFIG_PAX_REFCOUNT
2570 -+ /* Note: Dest reg is not modified on overflow */
2571 -+ "2: \n"
2572 -+ _ASM_EXTABLE(1b, 2b)
2573 -+#endif
2574 -+ : "=&r" (result), "+m" (v->counter) : "Ir" (i));
2575 -+ raw_local_irq_restore(flags);
2576 -+ }
2577 -+
2578 -+ smp_llsc_mb();
2579 -+
2580 -+ return result;
2581 -+}
2582 -+static __inline__ long atomic64_add_return_unchecked(long i, atomic64_unchecked_t *v)
2583 - {
2584 - long result;
2585 ++#define __ATOMIC64_OP(op, suffix, asm_op, extable) \
2586 ++static inline void atomic64_##op##suffix(long i, atomic64##suffix##_t * v) \
2587 + { \
2588 + if (kernel_uses_llsc && R10000_LLSC_WAR) { \
2589 + long temp; \
2590 + \
2591 + __asm__ __volatile__( \
2592 +- " .set arch=r4000 \n" \
2593 +- "1: lld %0, %1 # atomic64_" #op " \n" \
2594 +- " " #asm_op " %0, %2 \n" \
2595 ++ " .set mips3 \n" \
2596 ++ "1: lld %0, %1 # atomic64_" #op #suffix "\n" \
2597 ++ "2: " #asm_op " %0, %2 \n" \
2598 + " scd %0, %1 \n" \
2599 + " beqzl %0, 1b \n" \
2600 ++ extable \
2601 + " .set mips0 \n" \
2602 + : "=&r" (temp), "+m" (v->counter) \
2603 + : "Ir" (i)); \
2604 + } else if (kernel_uses_llsc) { \
2605 + long temp; \
2606 + \
2607 +- do { \
2608 +- __asm__ __volatile__( \
2609 +- " .set arch=r4000 \n" \
2610 +- " lld %0, %1 # atomic64_" #op "\n" \
2611 +- " " #asm_op " %0, %2 \n" \
2612 +- " scd %0, %1 \n" \
2613 +- " .set mips0 \n" \
2614 +- : "=&r" (temp), "+m" (v->counter) \
2615 +- : "Ir" (i)); \
2616 +- } while (unlikely(!temp)); \
2617 ++ __asm__ __volatile__( \
2618 ++ " .set mips3 \n" \
2619 ++ " lld %0, %1 # atomic64_" #op #suffix "\n" \
2620 ++ "2: " #asm_op " %0, %2 \n" \
2621 ++ " scd %0, %1 \n" \
2622 ++ " beqz %0, 1b \n" \
2623 ++ extable \
2624 ++ " .set mips0 \n" \
2625 ++ : "=&r" (temp), "+m" (v->counter) \
2626 ++ : "Ir" (i)); \
2627 + } else { \
2628 + unsigned long flags; \
2629 + \
2630 + raw_local_irq_save(flags); \
2631 +- v->counter c_op i; \
2632 ++ __asm__ __volatile__( \
2633 ++ "2: " #asm_op " %0, %1 \n" \
2634 ++ extable \
2635 ++ : "+r" (v->counter) : "Ir" (i)); \
2636 + raw_local_irq_restore(flags); \
2637 + } \
2638 + } \
2639 +
2640 +-#define ATOMIC64_OP_RETURN(op, c_op, asm_op) \
2641 +-static __inline__ long atomic64_##op##_return(long i, atomic64_t * v) \
2642 ++#define ATOMIC64_OP(op, asm_op) __ATOMIC64_OP(op, , asm_op##u) \
2643 ++ __ATOMIC64_OP(op, _unchecked, asm_op)
2644 ++
2645 ++#define __ATOMIC64_OP_RETURN(op, suffix, asm_op, post_op, extable) \
2646 ++static inline long atomic64_##op##_return##suffix(long i, atomic64##suffix##_t * v)\
2647 + { \
2648 + long result; \
2649 + \
2650 +@@ -363,38 +489,48 @@ static __inline__ long atomic64_##op##_return(long i, atomic64_t * v) \
2651 + long temp; \
2652 + \
2653 + __asm__ __volatile__( \
2654 +- " .set arch=r4000 \n" \
2655 ++ " .set mips3 \n" \
2656 + "1: lld %1, %2 # atomic64_" #op "_return\n" \
2657 +- " " #asm_op " %0, %1, %3 \n" \
2658 ++ "2: " #asm_op " %0, %1, %3 \n" \
2659 + " scd %0, %2 \n" \
2660 + " beqzl %0, 1b \n" \
2661 +- " " #asm_op " %0, %1, %3 \n" \
2662 ++ post_op \
2663 ++ extable \
2664 ++ "4: " #asm_op " %0, %1, %3 \n" \
2665 ++ "5: \n" \
2666 + " .set mips0 \n" \
2667 + : "=&r" (result), "=&r" (temp), "+m" (v->counter) \
2668 + : "Ir" (i)); \
2669 + } else if (kernel_uses_llsc) { \
2670 + long temp; \
2671 + \
2672 +- do { \
2673 +- __asm__ __volatile__( \
2674 +- " .set arch=r4000 \n" \
2675 +- " lld %1, %2 # atomic64_" #op "_return\n" \
2676 +- " " #asm_op " %0, %1, %3 \n" \
2677 +- " scd %0, %2 \n" \
2678 +- " .set mips0 \n" \
2679 +- : "=&r" (result), "=&r" (temp), "=m" (v->counter) \
2680 +- : "Ir" (i), "m" (v->counter) \
2681 +- : "memory"); \
2682 +- } while (unlikely(!result)); \
2683 ++ __asm__ __volatile__( \
2684 ++ " .set mips3 \n" \
2685 ++ "1: lld %1, %2 # atomic64_" #op "_return" #suffix "\n" \
2686 ++ "2: " #asm_op " %0, %1, %3 \n" \
2687 ++ " scd %0, %2 \n" \
2688 ++ " beqz %0, 1b \n" \
2689 ++ post_op \
2690 ++ extable \
2691 ++ "4: " #asm_op " %0, %1, %3 \n" \
2692 ++ "5: \n" \
2693 ++ " .set mips0 \n" \
2694 ++ : "=&r" (result), "=&r" (temp), "=m" (v->counter) \
2695 ++ : "Ir" (i), "m" (v->counter) \
2696 ++ : "memory"); \
2697 + \
2698 + result = temp; result c_op i; \
2699 + } else { \
2700 + unsigned long flags; \
2701 + \
2702 + raw_local_irq_save(flags); \
2703 +- result = v->counter; \
2704 +- result c_op i; \
2705 +- v->counter = result; \
2706 ++ __asm__ __volatile__( \
2707 ++ " ld %0, %1 \n" \
2708 ++ "2: " #asm_op " %0, %1, %2 \n" \
2709 ++ " sd %0, %1 \n" \
2710 ++ "3: \n" \
2711 ++ extable \
2712 ++ : "=&r" (result), "+m" (v->counter) : "Ir" (i)); \
2713 + raw_local_irq_restore(flags); \
2714 + } \
2715 + \
2716 +@@ -403,16 +539,23 @@ static __inline__ long atomic64_##op##_return(long i, atomic64_t * v) \
2717 + return result; \
2718 + }
2719 +
2720 +-#define ATOMIC64_OPS(op, c_op, asm_op) \
2721 +- ATOMIC64_OP(op, c_op, asm_op) \
2722 +- ATOMIC64_OP_RETURN(op, c_op, asm_op)
2723 ++#define ATOMIC64_OP_RETURN(op, asm_op) __ATOMIC64_OP_RETURN(op, , asm_op##u, , __OVERFLOW_EXTABLE) \
2724 ++ __ATOMIC64_OP_RETURN(op, _unchecked, asm_op, __OVERFLOW_POST, __OVERFLOW_EXTABLE)
2725 +
2726 +-ATOMIC64_OPS(add, +=, daddu)
2727 +-ATOMIC64_OPS(sub, -=, dsubu)
2728 ++#define ATOMIC64_OPS(op, asm_op) \
2729 ++ ATOMIC64_OP(op, asm_op) \
2730 ++ ATOMIC64_OP_RETURN(op, asm_op)
2731 ++
2732 ++ATOMIC64_OPS(add, dadd)
2733 ++ATOMIC64_OPS(sub, dsub)
2734 +
2735 + #undef ATOMIC64_OPS
2736 + #undef ATOMIC64_OP_RETURN
2737 ++#undef __ATOMIC64_OP_RETURN
2738 + #undef ATOMIC64_OP
2739 ++#undef __ATOMIC64_OP
2740 ++#undef __OVERFLOW_EXTABLE
2741 ++#undef __OVERFLOW_POST
2742
2743 -@@ -546,7 +1125,97 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
2744 - return result;
2745 - }
2746 -
2747 --static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
2748 -+static __inline__ long atomic64_sub_return(long i, atomic64_t *v)
2749 -+{
2750 -+ long result;
2751 -+ long temp;
2752 -+
2753 -+ smp_mb__before_llsc();
2754 -+
2755 -+ if (kernel_uses_llsc && R10000_LLSC_WAR) {
2756 -+ long temp;
2757 -+
2758 -+ __asm__ __volatile__(
2759 -+ " .set mips3 \n"
2760 -+ "1: lld %1, %2 # atomic64_sub_return \n"
2761 -+#ifdef CONFIG_PAX_REFCOUNT
2762 -+ "2: dsub %0, %1, %3 \n"
2763 -+#else
2764 -+ " dsubu %0, %1, %3 \n"
2765 -+#endif
2766 -+ " scd %0, %2 \n"
2767 -+ " beqzl %0, 1b \n"
2768 -+#ifdef CONFIG_PAX_REFCOUNT
2769 -+ " b 4f \n"
2770 -+ " .set noreorder \n"
2771 -+ "3: b 5f \n"
2772 -+ " move %0, %1 \n"
2773 -+ " .set reorder \n"
2774 -+ _ASM_EXTABLE(2b, 3b)
2775 -+#endif
2776 -+ "4: dsubu %0, %1, %3 \n"
2777 -+#ifdef CONFIG_PAX_REFCOUNT
2778 -+ "5: \n"
2779 -+#endif
2780 -+ " .set mips0 \n"
2781 -+ : "=&r" (result), "=&r" (temp), "=m" (v->counter)
2782 -+ : "Ir" (i), "m" (v->counter)
2783 -+ : "memory");
2784 -+ } else if (kernel_uses_llsc) {
2785 -+ __asm__ __volatile__(
2786 -+ " .set mips3 \n"
2787 -+ "1: lld %1, %2 # atomic64_sub_return \n"
2788 -+#ifdef CONFIG_PAX_REFCOUNT
2789 -+ "2: dsub %0, %1, %3 \n"
2790 -+#else
2791 -+ " dsubu %0, %1, %3 \n"
2792 -+#endif
2793 -+ " scd %0, %2 \n"
2794 -+ " bnez %0, 4f \n"
2795 -+ " b 1b \n"
2796 -+#ifdef CONFIG_PAX_REFCOUNT
2797 -+ " .set noreorder \n"
2798 -+ "3: b 5f \n"
2799 -+ " move %0, %1 \n"
2800 -+ " .set reorder \n"
2801 -+ _ASM_EXTABLE(2b, 3b)
2802 -+#endif
2803 -+ "4: dsubu %0, %1, %3 \n"
2804 -+#ifdef CONFIG_PAX_REFCOUNT
2805 -+ "5: \n"
2806 -+#endif
2807 -+ " .set mips0 \n"
2808 -+ : "=&r" (result), "=&r" (temp), "=m" (v->counter)
2809 -+ : "Ir" (i), "m" (v->counter)
2810 -+ : "memory");
2811 -+ } else {
2812 -+ unsigned long flags;
2813 -+
2814 -+ raw_local_irq_save(flags);
2815 -+ __asm__ __volatile__(
2816 -+ " ld %0, %1 \n"
2817 -+#ifdef CONFIG_PAX_REFCOUNT
2818 -+ /* Exception on overflow. */
2819 -+ "1: dsub %0, %2 \n"
2820 -+#else
2821 -+ " dsubu %0, %2 \n"
2822 -+#endif
2823 -+ " sd %0, %1 \n"
2824 -+#ifdef CONFIG_PAX_REFCOUNT
2825 -+ /* Note: Dest reg is not modified on overflow */
2826 -+ "2: \n"
2827 -+ _ASM_EXTABLE(1b, 2b)
2828 -+#endif
2829 -+ : "=&r" (result), "+m" (v->counter) : "Ir" (i));
2830 -+ raw_local_irq_restore(flags);
2831 -+ }
2832 -+
2833 -+ smp_llsc_mb();
2834 -+
2835 -+ return result;
2836 -+}
2837 -+
2838 -+static __inline__ long atomic64_sub_return_unchecked(long i, atomic64_unchecked_t *v)
2839 - {
2840 - long result;
2841 -
2842 -@@ -605,7 +1274,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
2843 + /*
2844 + * atomic64_sub_if_positive - conditionally subtract integer from atomic variable
2845 +@@ -422,7 +565,7 @@ ATOMIC64_OPS(sub, -=, dsubu)
2846 * Atomically test @v and subtract @i if @v is greater or equal than @i.
2847 * The function returns the old value of @v minus @i.
2848 */
2849 @@ -6658,7 +6202,7 @@ index 37b2bef..02122b8 100644
2850 {
2851 long result;
2852
2853 -@@ -662,9 +1331,26 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
2854 +@@ -479,9 +622,26 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
2855 return result;
2856 }
2857
2858 @@ -6688,7 +6232,7 @@ index 37b2bef..02122b8 100644
2859
2860 /**
2861 * atomic64_add_unless - add unless the number is a given value
2862 -@@ -694,6 +1380,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
2863 +@@ -511,6 +671,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
2864
2865 #define atomic64_dec_return(v) atomic64_sub_return(1, (v))
2866 #define atomic64_inc_return(v) atomic64_add_return(1, (v))
2867 @@ -6696,7 +6240,7 @@ index 37b2bef..02122b8 100644
2868
2869 /*
2870 * atomic64_sub_and_test - subtract value from variable and test result
2871 -@@ -715,6 +1402,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
2872 +@@ -532,6 +693,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
2873 * other cases.
2874 */
2875 #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0)
2876 @@ -6704,7 +6248,7 @@ index 37b2bef..02122b8 100644
2877
2878 /*
2879 * atomic64_dec_and_test - decrement by 1 and test
2880 -@@ -739,6 +1427,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
2881 +@@ -556,6 +718,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
2882 * Atomically increments @v by 1.
2883 */
2884 #define atomic64_inc(v) atomic64_add(1, (v))
2885 @@ -6712,7 +6256,7 @@ index 37b2bef..02122b8 100644
2886
2887 /*
2888 * atomic64_dec - decrement and test
2889 -@@ -747,6 +1436,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
2890 +@@ -564,6 +727,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
2891 * Atomically decrements @v by 1.
2892 */
2893 #define atomic64_dec(v) atomic64_sub(1, (v))
2894 @@ -6921,7 +6465,7 @@ index b336037..5b874cc 100644
2895
2896 /*
2897 diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
2898 -index df49a30..c0d3dd6 100644
2899 +index d6d1928..ce4f822 100644
2900 --- a/arch/mips/include/asm/pgtable.h
2901 +++ b/arch/mips/include/asm/pgtable.h
2902 @@ -20,6 +20,9 @@
2903 @@ -6977,7 +6521,7 @@ index 7de8658..c109224 100644
2904 /*
2905 * We stash processor id into a COP0 register to retrieve it fast
2906 diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h
2907 -index b9ab717..3a15c28 100644
2908 +index 22a5624..7c96295 100644
2909 --- a/arch/mips/include/asm/uaccess.h
2910 +++ b/arch/mips/include/asm/uaccess.h
2911 @@ -130,6 +130,7 @@ extern u64 __ua_limit;
2912 @@ -6988,32 +6532,6 @@ index b9ab717..3a15c28 100644
2913 #define access_ok(type, addr, size) \
2914 likely(__access_ok((addr), (size), __access_mask))
2915
2916 -@@ -301,7 +302,8 @@ do { \
2917 - __get_kernel_common((x), size, __gu_ptr); \
2918 - else \
2919 - __get_user_common((x), size, __gu_ptr); \
2920 -- } \
2921 -+ } else \
2922 -+ (x) = 0; \
2923 - \
2924 - __gu_err; \
2925 - })
2926 -@@ -316,6 +318,7 @@ do { \
2927 - " .insn \n" \
2928 - " .section .fixup,\"ax\" \n" \
2929 - "3: li %0, %4 \n" \
2930 -+ " move %1, $0 \n" \
2931 - " j 2b \n" \
2932 - " .previous \n" \
2933 - " .section __ex_table,\"a\" \n" \
2934 -@@ -630,6 +633,7 @@ do { \
2935 - " .insn \n" \
2936 - " .section .fixup,\"ax\" \n" \
2937 - "3: li %0, %4 \n" \
2938 -+ " move %1, $0 \n" \
2939 - " j 2b \n" \
2940 - " .previous \n" \
2941 - " .section __ex_table,\"a\" \n" \
2942 diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
2943 index 1188e00..41cf144 100644
2944 --- a/arch/mips/kernel/binfmt_elfn32.c
2945 @@ -7154,7 +6672,7 @@ index 636b074..8fbb91f 100644
2946 - return sp & ALMASK;
2947 -}
2948 diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
2949 -index 645b3c4..909c75a 100644
2950 +index 9d1487d..10c5da5 100644
2951 --- a/arch/mips/kernel/ptrace.c
2952 +++ b/arch/mips/kernel/ptrace.c
2953 @@ -761,6 +761,10 @@ long arch_ptrace(struct task_struct *child, long request,
2954 @@ -7306,10 +6824,10 @@ index 22b19c2..c5cc8c4 100644
2955 info.si_code = FPE_INTOVF;
2956 info.si_signo = SIGFPE;
2957 diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
2958 -index cd71141..e02c4df 100644
2959 +index e3b21e5..ea5ff7c 100644
2960 --- a/arch/mips/kvm/mips.c
2961 +++ b/arch/mips/kvm/mips.c
2962 -@@ -839,7 +839,7 @@ long kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
2963 +@@ -805,7 +805,7 @@ long kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
2964 return r;
2965 }
2966
2967 @@ -7466,18 +6984,6 @@ index f1baadd..5472dca 100644
2968 int __virt_addr_valid(const volatile void *kaddr)
2969 {
2970 return pfn_valid(PFN_DOWN(virt_to_phys(kaddr)));
2971 -diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c
2972 -index 1588716..42cfa97 100644
2973 ---- a/arch/mips/net/bpf_jit.c
2974 -+++ b/arch/mips/net/bpf_jit.c
2975 -@@ -1428,5 +1428,6 @@ void bpf_jit_free(struct bpf_prog *fp)
2976 - {
2977 - if (fp->jited)
2978 - module_free(NULL, fp->bpf_func);
2979 -- kfree(fp);
2980 -+
2981 -+ bpf_prog_unlock_free(fp);
2982 - }
2983 diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c
2984 index 59cccd9..f39ac2f 100644
2985 --- a/arch/mips/pci/pci-octeon.c
2986 @@ -7664,10 +7170,10 @@ index 4ce7a01..449202a 100644
2987
2988 #endif /* __ASM_OPENRISC_CACHE_H */
2989 diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h
2990 -index 0be2db2..1b0f26d 100644
2991 +index 226f8ca..9d9b87d 100644
2992 --- a/arch/parisc/include/asm/atomic.h
2993 +++ b/arch/parisc/include/asm/atomic.h
2994 -@@ -248,6 +248,16 @@ static inline long atomic64_dec_if_positive(atomic64_t *v)
2995 +@@ -273,6 +273,16 @@ static inline long atomic64_dec_if_positive(atomic64_t *v)
2996 return dec;
2997 }
2998
2999 @@ -7777,10 +7283,10 @@ index 22b89d1..ce34230 100644
3000 #define PAGE_KERNEL_EXEC __pgprot(_PAGE_KERNEL_EXEC)
3001 #define PAGE_KERNEL_RWX __pgprot(_PAGE_KERNEL_RWX)
3002 diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h
3003 -index 4006964..fcb3cc2 100644
3004 +index a5cb070..8604ddc 100644
3005 --- a/arch/parisc/include/asm/uaccess.h
3006 +++ b/arch/parisc/include/asm/uaccess.h
3007 -@@ -246,10 +246,10 @@ static inline unsigned long __must_check copy_from_user(void *to,
3008 +@@ -243,10 +243,10 @@ static inline unsigned long __must_check copy_from_user(void *to,
3009 const void __user *from,
3010 unsigned long n)
3011 {
3012 @@ -8157,10 +7663,10 @@ index 3ca9c11..d163ef7 100644
3013 /*
3014 * If for any reason at all we couldn't handle the fault, make
3015 diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
3016 -index 4bc7b62..107e0b2 100644
3017 +index 88eace4..4ba2591 100644
3018 --- a/arch/powerpc/Kconfig
3019 +++ b/arch/powerpc/Kconfig
3020 -@@ -399,6 +399,7 @@ config PPC64_SUPPORTS_MEMORY_FAILURE
3021 +@@ -404,6 +404,7 @@ config PPC64_SUPPORTS_MEMORY_FAILURE
3022 config KEXEC
3023 bool "kexec system call"
3024 depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP))
3025 @@ -8169,7 +7675,7 @@ index 4bc7b62..107e0b2 100644
3026 kexec is a system call that implements the ability to shutdown your
3027 current kernel, and to start another kernel. It is like a reboot
3028 diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h
3029 -index 28992d0..bbbff7e 100644
3030 +index 512d278..d31fadd 100644
3031 --- a/arch/powerpc/include/asm/atomic.h
3032 +++ b/arch/powerpc/include/asm/atomic.h
3033 @@ -12,6 +12,11 @@
3034 @@ -8184,7 +7690,7 @@ index 28992d0..bbbff7e 100644
3035 static __inline__ int atomic_read(const atomic_t *v)
3036 {
3037 int t;
3038 -@@ -21,16 +26,61 @@ static __inline__ int atomic_read(const atomic_t *v)
3039 +@@ -21,39 +26,80 @@ static __inline__ int atomic_read(const atomic_t *v)
3040 return t;
3041 }
3042
3043 @@ -8202,199 +7708,102 @@ index 28992d0..bbbff7e 100644
3044 __asm__ __volatile__("stw%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i));
3045 }
3046
3047 +-#define ATOMIC_OP(op, asm_op) \
3048 +-static __inline__ void atomic_##op(int a, atomic_t *v) \
3049 +static __inline__ void atomic_set_unchecked(atomic_unchecked_t *v, int i)
3050 +{
3051 + __asm__ __volatile__("stw%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i));
3052 +}
3053 +
3054 - static __inline__ void atomic_add(int a, atomic_t *v)
3055 - {
3056 - int t;
3057 -
3058 - __asm__ __volatile__(
3059 -+"1: lwarx %0,0,%3 # atomic_add\n"
3060 -+
3061 -+#ifdef CONFIG_PAX_REFCOUNT
3062 -+" mcrxr cr0\n"
3063 -+" addo. %0,%2,%0\n"
3064 -+" bf 4*cr0+so, 3f\n"
3065 -+"2:.long " "0x00c00b00""\n"
3066 -+#else
3067 -+" add %0,%2,%0\n"
3068 -+#endif
3069 -+
3070 -+"3:\n"
3071 -+ PPC405_ERR77(0,%3)
3072 -+" stwcx. %0,0,%3 \n\
3073 -+ bne- 1b"
3074 -+
3075 -+#ifdef CONFIG_PAX_REFCOUNT
3076 -+"\n4:\n"
3077 -+ _ASM_EXTABLE(2b, 4b)
3078 -+#endif
3079 -+
3080 -+ : "=&r" (t), "+m" (v->counter)
3081 -+ : "r" (a), "r" (&v->counter)
3082 -+ : "cc");
3083 -+}
3084 -+
3085 -+static __inline__ void atomic_add_unchecked(int a, atomic_unchecked_t *v)
3086 -+{
3087 -+ int t;
3088 -+
3089 -+ __asm__ __volatile__(
3090 - "1: lwarx %0,0,%3 # atomic_add\n\
3091 - add %0,%2,%0\n"
3092 - PPC405_ERR77(0,%3)
3093 -@@ -41,12 +91,49 @@ static __inline__ void atomic_add(int a, atomic_t *v)
3094 - : "cc");
3095 - }
3096 -
3097 -+/* Same as atomic_add but return the value */
3098 - static __inline__ int atomic_add_return(int a, atomic_t *v)
3099 - {
3100 - int t;
3101 -
3102 - __asm__ __volatile__(
3103 - PPC_ATOMIC_ENTRY_BARRIER
3104 -+"1: lwarx %0,0,%2 # atomic_add_return\n"
3105 -+
3106 -+#ifdef CONFIG_PAX_REFCOUNT
3107 -+" mcrxr cr0\n"
3108 -+" addo. %0,%1,%0\n"
3109 -+" bf 4*cr0+so, 3f\n"
3110 -+"2:.long " "0x00c00b00""\n"
3111 -+#else
3112 -+" add %0,%1,%0\n"
3113 -+#endif
3114 -+
3115 -+"3:\n"
3116 -+ PPC405_ERR77(0,%2)
3117 -+" stwcx. %0,0,%2 \n\
3118 -+ bne- 1b\n"
3119 -+"4:"
3120 -+
3121 +#ifdef CONFIG_PAX_REFCOUNT
3122 ++#define __REFCOUNT_OP(op) op##o.
3123 ++#define __OVERFLOW_PRE \
3124 ++ " mcrxr cr0\n"
3125 ++#define __OVERFLOW_POST \
3126 ++ " bf 4*cr0+so, 3f\n" \
3127 ++ "2: .long 0x00c00b00\n" \
3128 ++ "3:\n"
3129 ++#define __OVERFLOW_EXTABLE \
3130 ++ "\n4:\n"
3131 + _ASM_EXTABLE(2b, 4b)
3132 -+#endif
3133 -+
3134 -+ PPC_ATOMIC_EXIT_BARRIER
3135 -+ : "=&r" (t)
3136 -+ : "r" (a), "r" (&v->counter)
3137 -+ : "cc", "memory");
3138 -+
3139 -+ return t;
3140 -+}
3141 -+
3142 -+/* Same as atomic_add_unchecked but return the value */
3143 -+static __inline__ int atomic_add_return_unchecked(int a, atomic_unchecked_t *v)
3144 -+{
3145 -+ int t;
3146 -+
3147 -+ __asm__ __volatile__(
3148 -+ PPC_ATOMIC_ENTRY_BARRIER
3149 - "1: lwarx %0,0,%2 # atomic_add_return\n\
3150 - add %0,%1,%0\n"
3151 - PPC405_ERR77(0,%2)
3152 -@@ -67,6 +154,37 @@ static __inline__ void atomic_sub(int a, atomic_t *v)
3153 - int t;
3154 -
3155 - __asm__ __volatile__(
3156 -+"1: lwarx %0,0,%3 # atomic_sub\n"
3157 -+
3158 -+#ifdef CONFIG_PAX_REFCOUNT
3159 -+" mcrxr cr0\n"
3160 -+" subfo. %0,%2,%0\n"
3161 -+" bf 4*cr0+so, 3f\n"
3162 -+"2:.long " "0x00c00b00""\n"
3163 +#else
3164 -+" subf %0,%2,%0\n"
3165 ++#define __REFCOUNT_OP(op) op
3166 ++#define __OVERFLOW_PRE
3167 ++#define __OVERFLOW_POST
3168 ++#define __OVERFLOW_EXTABLE
3169 +#endif
3170 +
3171 -+"3:\n"
3172 -+ PPC405_ERR77(0,%3)
3173 -+" stwcx. %0,0,%3 \n\
3174 -+ bne- 1b\n"
3175 -+"4:"
3176 -+
3177 -+#ifdef CONFIG_PAX_REFCOUNT
3178 -+ _ASM_EXTABLE(2b, 4b)
3179 -+#endif
3180 -+
3181 -+ : "=&r" (t), "+m" (v->counter)
3182 -+ : "r" (a), "r" (&v->counter)
3183 -+ : "cc");
3184 -+}
3185 -+
3186 -+static __inline__ void atomic_sub_unchecked(int a, atomic_unchecked_t *v)
3187 -+{
3188 -+ int t;
3189 -+
3190 -+ __asm__ __volatile__(
3191 - "1: lwarx %0,0,%3 # atomic_sub\n\
3192 - subf %0,%2,%0\n"
3193 - PPC405_ERR77(0,%3)
3194 -@@ -77,12 +195,49 @@ static __inline__ void atomic_sub(int a, atomic_t *v)
3195 - : "cc");
3196 - }
3197 -
3198 -+/* Same as atomic_sub but return the value */
3199 - static __inline__ int atomic_sub_return(int a, atomic_t *v)
3200 - {
3201 - int t;
3202 ++#define __ATOMIC_OP(op, suffix, pre_op, asm_op, post_op, extable) \
3203 ++static inline void atomic_##op##suffix(int a, atomic##suffix##_t *v) \
3204 + { \
3205 + int t; \
3206 + \
3207 + __asm__ __volatile__( \
3208 +-"1: lwarx %0,0,%3 # atomic_" #op "\n" \
3209 ++"1: lwarx %0,0,%3 # atomic_" #op #suffix "\n" \
3210 ++ pre_op \
3211 + #asm_op " %0,%2,%0\n" \
3212 ++ post_op \
3213 + PPC405_ERR77(0,%3) \
3214 + " stwcx. %0,0,%3 \n" \
3215 + " bne- 1b\n" \
3216 ++ extable \
3217 + : "=&r" (t), "+m" (v->counter) \
3218 + : "r" (a), "r" (&v->counter) \
3219 + : "cc"); \
3220 + } \
3221
3222 - __asm__ __volatile__(
3223 - PPC_ATOMIC_ENTRY_BARRIER
3224 -+"1: lwarx %0,0,%2 # atomic_sub_return\n"
3225 +-#define ATOMIC_OP_RETURN(op, asm_op) \
3226 +-static __inline__ int atomic_##op##_return(int a, atomic_t *v) \
3227 ++#define ATOMIC_OP(op, asm_op) __ATOMIC_OP(op, , , asm_op, , ) \
3228 ++ __ATOMIC_OP(op, _unchecked, __OVERFLOW_PRE, __REFCOUNT_OP(asm_op), __OVERFLOW_POST, __OVERFLOW_EXTABLE)
3229 +
3230 -+#ifdef CONFIG_PAX_REFCOUNT
3231 -+" mcrxr cr0\n"
3232 -+" subfo. %0,%1,%0\n"
3233 -+" bf 4*cr0+so, 3f\n"
3234 -+"2:.long " "0x00c00b00""\n"
3235 -+#else
3236 -+" subf %0,%1,%0\n"
3237 -+#endif
3238 -+
3239 -+"3:\n"
3240 -+ PPC405_ERR77(0,%2)
3241 -+" stwcx. %0,0,%2 \n\
3242 -+ bne- 1b\n"
3243 -+ PPC_ATOMIC_EXIT_BARRIER
3244 -+"4:"
3245 -+
3246 -+#ifdef CONFIG_PAX_REFCOUNT
3247 -+ _ASM_EXTABLE(2b, 4b)
3248 -+#endif
3249 -+
3250 -+ : "=&r" (t)
3251 -+ : "r" (a), "r" (&v->counter)
3252 -+ : "cc", "memory");
3253 -+
3254 -+ return t;
3255 -+}
3256 -+
3257 -+/* Same as atomic_sub_unchecked but return the value */
3258 -+static __inline__ int atomic_sub_return_unchecked(int a, atomic_unchecked_t *v)
3259 -+{
3260 -+ int t;
3261 -+
3262 -+ __asm__ __volatile__(
3263 -+ PPC_ATOMIC_ENTRY_BARRIER
3264 - "1: lwarx %0,0,%2 # atomic_sub_return\n\
3265 - subf %0,%1,%0\n"
3266 - PPC405_ERR77(0,%2)
3267 -@@ -96,38 +251,23 @@ static __inline__ int atomic_sub_return(int a, atomic_t *v)
3268 - return t;
3269 - }
3270 ++#define __ATOMIC_OP_RETURN(op, suffix, pre_op, asm_op, post_op, extable)\
3271 ++static inline int atomic_##op##_return##suffix(int a, atomic##suffix##_t *v)\
3272 + { \
3273 + int t; \
3274 + \
3275 + __asm__ __volatile__( \
3276 + PPC_ATOMIC_ENTRY_BARRIER \
3277 +-"1: lwarx %0,0,%2 # atomic_" #op "_return\n" \
3278 ++"1: lwarx %0,0,%2 # atomic_" #op "_return" #suffix "\n" \
3279 ++ pre_op \
3280 + #asm_op " %0,%1,%0\n" \
3281 ++ post_op \
3282 + PPC405_ERR77(0,%2) \
3283 + " stwcx. %0,0,%2 \n" \
3284 + " bne- 1b\n" \
3285 ++ extable \
3286 + PPC_ATOMIC_EXIT_BARRIER \
3287 + : "=&r" (t) \
3288 + : "r" (a), "r" (&v->counter) \
3289 +@@ -62,6 +108,9 @@ static __inline__ int atomic_##op##_return(int a, atomic_t *v) \
3290 + return t; \
3291 + }
3292 +
3293 ++#define ATOMIC_OP_RETURN(op, asm_op) __ATOMIC_OP_RETURN(op, , , asm_op, , )\
3294 ++ __ATOMIC_OP_RETURN(op, _unchecked, __OVERFLOW_PRE, __REFCOUNT_OP(asm_op), __OVERFLOW_POST, __OVERFLOW_EXTABLE)
3295 ++
3296 + #define ATOMIC_OPS(op, asm_op) ATOMIC_OP(op, asm_op) ATOMIC_OP_RETURN(op, asm_op)
3297 +
3298 + ATOMIC_OPS(add, add)
3299 +@@ -69,42 +118,29 @@ ATOMIC_OPS(sub, subf)
3300 +
3301 + #undef ATOMIC_OPS
3302 + #undef ATOMIC_OP_RETURN
3303 ++#undef __ATOMIC_OP_RETURN
3304 + #undef ATOMIC_OP
3305 ++#undef __ATOMIC_OP
3306 +
3307 + #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
3308
3309 -static __inline__ void atomic_inc(atomic_t *v)
3310 -{
3311 - int t;
3312 -+/*
3313 ++/*
3314 + * atomic_inc - increment atomic variable
3315 + * @v: pointer of type atomic_t
3316 -+ *
3317 ++ *
3318 + * Automatically increments @v by 1
3319 + */
3320 +#define atomic_inc(v) atomic_add(1, (v))
3321 @@ -8409,13 +7818,13 @@ index 28992d0..bbbff7e 100644
3322 - : "=&r" (t), "+m" (v->counter)
3323 - : "r" (&v->counter)
3324 - : "cc", "xer");
3325 -+static __inline__ void atomic_inc_unchecked(atomic_unchecked_t *v)
3326 ++static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
3327 +{
3328 + atomic_add_unchecked(1, v);
3329 }
3330
3331 -static __inline__ int atomic_inc_return(atomic_t *v)
3332 -+static __inline__ int atomic_inc_return_unchecked(atomic_unchecked_t *v)
3333 ++static inline int atomic_inc_return_unchecked(atomic_unchecked_t *v)
3334 {
3335 - int t;
3336 -
3337 @@ -8436,7 +7845,7 @@ index 28992d0..bbbff7e 100644
3338 }
3339
3340 /*
3341 -@@ -140,43 +280,38 @@ static __inline__ int atomic_inc_return(atomic_t *v)
3342 +@@ -117,43 +153,38 @@ static __inline__ int atomic_inc_return(atomic_t *v)
3343 */
3344 #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
3345
3346 @@ -8503,7 +7912,7 @@ index 28992d0..bbbff7e 100644
3347 /**
3348 * __atomic_add_unless - add unless the number is a given value
3349 * @v: pointer of type atomic_t
3350 -@@ -194,11 +329,27 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
3351 +@@ -171,11 +202,27 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
3352 PPC_ATOMIC_ENTRY_BARRIER
3353 "1: lwarx %0,0,%1 # __atomic_add_unless\n\
3354 cmpw 0,%0,%3 \n\
3355 @@ -8533,7 +7942,7 @@ index 28992d0..bbbff7e 100644
3356 PPC_ATOMIC_EXIT_BARRIER
3357 " subf %0,%2,%0 \n\
3358 2:"
3359 -@@ -271,6 +422,11 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
3360 +@@ -248,6 +295,11 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
3361 }
3362 #define atomic_dec_if_positive atomic_dec_if_positive
3363
3364 @@ -8545,7 +7954,7 @@ index 28992d0..bbbff7e 100644
3365 #ifdef __powerpc64__
3366
3367 #define ATOMIC64_INIT(i) { (i) }
3368 -@@ -284,11 +440,25 @@ static __inline__ long atomic64_read(const atomic64_t *v)
3369 +@@ -261,37 +313,60 @@ static __inline__ long atomic64_read(const atomic64_t *v)
3370 return t;
3371 }
3372
3373 @@ -8563,180 +7972,84 @@ index 28992d0..bbbff7e 100644
3374 __asm__ __volatile__("std%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i));
3375 }
3376
3377 +-#define ATOMIC64_OP(op, asm_op) \
3378 +-static __inline__ void atomic64_##op(long a, atomic64_t *v) \
3379 +static __inline__ void atomic64_set_unchecked(atomic64_unchecked_t *v, long i)
3380 +{
3381 + __asm__ __volatile__("std%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i));
3382 +}
3383 +
3384 - static __inline__ void atomic64_add(long a, atomic64_t *v)
3385 - {
3386 - long t;
3387 -@@ -303,12 +473,76 @@ static __inline__ void atomic64_add(long a, atomic64_t *v)
3388 - : "cc");
3389 - }
3390 -
3391 -+static __inline__ void atomic64_add_unchecked(long a, atomic64_unchecked_t *v)
3392 -+{
3393 -+ long t;
3394 -+
3395 -+ __asm__ __volatile__(
3396 -+"1: ldarx %0,0,%3 # atomic64_add\n"
3397 -+
3398 -+#ifdef CONFIG_PAX_REFCOUNT
3399 -+" mcrxr cr0\n"
3400 -+" addo. %0,%2,%0\n"
3401 -+" bf 4*cr0+so, 3f\n"
3402 -+"2:.long " "0x00c00b00""\n"
3403 -+#else
3404 -+" add %0,%2,%0\n"
3405 -+#endif
3406 -+
3407 -+"3:\n"
3408 -+" stdcx. %0,0,%3 \n\
3409 -+ bne- 1b\n"
3410 -+"4:"
3411 -+
3412 -+#ifdef CONFIG_PAX_REFCOUNT
3413 -+ _ASM_EXTABLE(2b, 4b)
3414 -+#endif
3415 -+
3416 -+ : "=&r" (t), "+m" (v->counter)
3417 -+ : "r" (a), "r" (&v->counter)
3418 -+ : "cc");
3419 -+}
3420 -+
3421 - static __inline__ long atomic64_add_return(long a, atomic64_t *v)
3422 - {
3423 - long t;
3424 -
3425 - __asm__ __volatile__(
3426 - PPC_ATOMIC_ENTRY_BARRIER
3427 -+"1: ldarx %0,0,%2 # atomic64_add_return\n"
3428 -+
3429 -+#ifdef CONFIG_PAX_REFCOUNT
3430 -+" mcrxr cr0\n"
3431 -+" addo. %0,%1,%0\n"
3432 -+" bf 4*cr0+so, 3f\n"
3433 -+"2:.long " "0x00c00b00""\n"
3434 -+#else
3435 -+" add %0,%1,%0\n"
3436 -+#endif
3437 -+
3438 -+"3:\n"
3439 -+" stdcx. %0,0,%2 \n\
3440 -+ bne- 1b\n"
3441 -+ PPC_ATOMIC_EXIT_BARRIER
3442 -+"4:"
3443 -+
3444 -+#ifdef CONFIG_PAX_REFCOUNT
3445 -+ _ASM_EXTABLE(2b, 4b)
3446 -+#endif
3447 -+
3448 -+ : "=&r" (t)
3449 -+ : "r" (a), "r" (&v->counter)
3450 -+ : "cc", "memory");
3451 -+
3452 -+ return t;
3453 -+}
3454 -+
3455 -+static __inline__ long atomic64_add_return_unchecked(long a, atomic64_unchecked_t *v)
3456 -+{
3457 -+ long t;
3458 -+
3459 -+ __asm__ __volatile__(
3460 -+ PPC_ATOMIC_ENTRY_BARRIER
3461 - "1: ldarx %0,0,%2 # atomic64_add_return\n\
3462 - add %0,%1,%0\n\
3463 - stdcx. %0,0,%2 \n\
3464 -@@ -328,6 +562,36 @@ static __inline__ void atomic64_sub(long a, atomic64_t *v)
3465 - long t;
3466 -
3467 - __asm__ __volatile__(
3468 -+"1: ldarx %0,0,%3 # atomic64_sub\n"
3469 -+
3470 -+#ifdef CONFIG_PAX_REFCOUNT
3471 -+" mcrxr cr0\n"
3472 -+" subfo. %0,%2,%0\n"
3473 -+" bf 4*cr0+so, 3f\n"
3474 -+"2:.long " "0x00c00b00""\n"
3475 -+#else
3476 -+" subf %0,%2,%0\n"
3477 -+#endif
3478 -+
3479 -+"3:\n"
3480 -+" stdcx. %0,0,%3 \n\
3481 -+ bne- 1b"
3482 -+"4:"
3483 -+
3484 -+#ifdef CONFIG_PAX_REFCOUNT
3485 -+ _ASM_EXTABLE(2b, 4b)
3486 -+#endif
3487 -+
3488 -+ : "=&r" (t), "+m" (v->counter)
3489 -+ : "r" (a), "r" (&v->counter)
3490 -+ : "cc");
3491 -+}
3492 -+
3493 -+static __inline__ void atomic64_sub_unchecked(long a, atomic64_unchecked_t *v)
3494 -+{
3495 -+ long t;
3496 -+
3497 -+ __asm__ __volatile__(
3498 - "1: ldarx %0,0,%3 # atomic64_sub\n\
3499 - subf %0,%2,%0\n\
3500 - stdcx. %0,0,%3 \n\
3501 -@@ -343,6 +607,40 @@ static __inline__ long atomic64_sub_return(long a, atomic64_t *v)
3502 ++#define __ATOMIC64_OP(op, suffix, pre_op, asm_op, post_op, extable) \
3503 ++static inline void atomic64_##op##suffix(long a, atomic64##suffix##_t *v)\
3504 + { \
3505 + long t; \
3506 + \
3507 + __asm__ __volatile__( \
3508 + "1: ldarx %0,0,%3 # atomic64_" #op "\n" \
3509 ++ pre_op \
3510 + #asm_op " %0,%2,%0\n" \
3511 ++ post_op \
3512 + " stdcx. %0,0,%3 \n" \
3513 + " bne- 1b\n" \
3514 ++ extable \
3515 + : "=&r" (t), "+m" (v->counter) \
3516 + : "r" (a), "r" (&v->counter) \
3517 + : "cc"); \
3518 + }
3519 +
3520 +-#define ATOMIC64_OP_RETURN(op, asm_op) \
3521 +-static __inline__ long atomic64_##op##_return(long a, atomic64_t *v) \
3522 ++#define ATOMIC64_OP(op, asm_op) __ATOMIC64_OP(op, , , asm_op, , ) \
3523 ++ __ATOMIC64_OP(op, _unchecked, __OVERFLOW_PRE, __REFCOUNT_OP(asm_op), __OVERFLOW_POST, __OVERFLOW_EXTABLE)
3524 ++
3525 ++#define __ATOMIC64_OP_RETURN(op, suffix, pre_op, asm_op, post_op, extable)\
3526 ++static inline long atomic64_##op##_return##suffix(long a, atomic64##suffix##_t *v)\
3527 + { \
3528 + long t; \
3529 + \
3530 + __asm__ __volatile__( \
3531 + PPC_ATOMIC_ENTRY_BARRIER \
3532 + "1: ldarx %0,0,%2 # atomic64_" #op "_return\n" \
3533 ++ pre_op \
3534 + #asm_op " %0,%1,%0\n" \
3535 ++ post_op \
3536 + " stdcx. %0,0,%2 \n" \
3537 + " bne- 1b\n" \
3538 ++ extable \
3539 + PPC_ATOMIC_EXIT_BARRIER \
3540 + : "=&r" (t) \
3541 + : "r" (a), "r" (&v->counter) \
3542 +@@ -300,6 +375,9 @@ static __inline__ long atomic64_##op##_return(long a, atomic64_t *v) \
3543 + return t; \
3544 + }
3545 +
3546 ++#define ATOMIC64_OP_RETURN(op, asm_op) __ATOMIC64_OP_RETURN(op, , , asm_op, , )\
3547 ++ __ATOMIC64_OP_RETURN(op, _unchecked, __OVERFLOW_PRE, __REFCOUNT_OP(asm_op), __OVERFLOW_POST, __OVERFLOW_EXTABLE)
3548 ++
3549 + #define ATOMIC64_OPS(op, asm_op) ATOMIC64_OP(op, asm_op) ATOMIC64_OP_RETURN(op, asm_op)
3550 +
3551 + ATOMIC64_OPS(add, add)
3552 +@@ -307,40 +385,33 @@ ATOMIC64_OPS(sub, subf)
3553 +
3554 + #undef ATOMIC64_OPS
3555 + #undef ATOMIC64_OP_RETURN
3556 ++#undef __ATOMIC64_OP_RETURN
3557 + #undef ATOMIC64_OP
3558 ++#undef __ATOMIC64_OP
3559 ++#undef __OVERFLOW_EXTABLE
3560 ++#undef __OVERFLOW_POST
3561 ++#undef __OVERFLOW_PRE
3562 ++#undef __REFCOUNT_OP
3563
3564 - __asm__ __volatile__(
3565 - PPC_ATOMIC_ENTRY_BARRIER
3566 -+"1: ldarx %0,0,%2 # atomic64_sub_return\n"
3567 -+
3568 -+#ifdef CONFIG_PAX_REFCOUNT
3569 -+" mcrxr cr0\n"
3570 -+" subfo. %0,%1,%0\n"
3571 -+" bf 4*cr0+so, 3f\n"
3572 -+"2:.long " "0x00c00b00""\n"
3573 -+#else
3574 -+" subf %0,%1,%0\n"
3575 -+#endif
3576 -+
3577 -+"3:\n"
3578 -+" stdcx. %0,0,%2 \n\
3579 -+ bne- 1b\n"
3580 -+ PPC_ATOMIC_EXIT_BARRIER
3581 -+"4:"
3582 -+
3583 -+#ifdef CONFIG_PAX_REFCOUNT
3584 -+ _ASM_EXTABLE(2b, 4b)
3585 -+#endif
3586 -+
3587 -+ : "=&r" (t)
3588 -+ : "r" (a), "r" (&v->counter)
3589 -+ : "cc", "memory");
3590 -+
3591 -+ return t;
3592 -+}
3593 -+
3594 -+static __inline__ long atomic64_sub_return_unchecked(long a, atomic64_unchecked_t *v)
3595 -+{
3596 -+ long t;
3597 -+
3598 -+ __asm__ __volatile__(
3599 -+ PPC_ATOMIC_ENTRY_BARRIER
3600 - "1: ldarx %0,0,%2 # atomic64_sub_return\n\
3601 - subf %0,%1,%0\n\
3602 - stdcx. %0,0,%2 \n\
3603 -@@ -355,36 +653,23 @@ static __inline__ long atomic64_sub_return(long a, atomic64_t *v)
3604 - return t;
3605 - }
3606 + #define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0)
3607
3608 -static __inline__ void atomic64_inc(atomic64_t *v)
3609 -{
3610 - long t;
3611 -+/*
3612 ++/*
3613 + * atomic64_inc - increment atomic variable
3614 + * @v: pointer of type atomic64_t
3615 -+ *
3616 ++ *
3617 + * Automatically increments @v by 1
3618 + */
3619 +#define atomic64_inc(v) atomic64_add(1, (v))
3620 @@ -8750,13 +8063,13 @@ index 28992d0..bbbff7e 100644
3621 - : "=&r" (t), "+m" (v->counter)
3622 - : "r" (&v->counter)
3623 - : "cc", "xer");
3624 -+static __inline__ void atomic64_inc_unchecked(atomic64_unchecked_t *v)
3625 ++static inline void atomic64_inc_unchecked(atomic64_unchecked_t *v)
3626 +{
3627 + atomic64_add_unchecked(1, v);
3628 }
3629
3630 -static __inline__ long atomic64_inc_return(atomic64_t *v)
3631 -+static __inline__ long atomic64_inc_return_unchecked(atomic64_unchecked_t *v)
3632 ++static inline long atomic64_inc_return_unchecked(atomic64_unchecked_t *v)
3633 {
3634 - long t;
3635 -
3636 @@ -8776,7 +8089,7 @@ index 28992d0..bbbff7e 100644
3637 }
3638
3639 /*
3640 -@@ -397,36 +682,18 @@ static __inline__ long atomic64_inc_return(atomic64_t *v)
3641 +@@ -353,36 +424,18 @@ static __inline__ long atomic64_inc_return(atomic64_t *v)
3642 */
3643 #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0)
3644
3645 @@ -8824,7 +8137,7 @@ index 28992d0..bbbff7e 100644
3646 }
3647
3648 #define atomic64_sub_and_test(a, v) (atomic64_sub_return((a), (v)) == 0)
3649 -@@ -459,6 +726,16 @@ static __inline__ long atomic64_dec_if_positive(atomic64_t *v)
3650 +@@ -415,6 +468,16 @@ static __inline__ long atomic64_dec_if_positive(atomic64_t *v)
3651 #define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
3652 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
3653
3654 @@ -8841,7 +8154,7 @@ index 28992d0..bbbff7e 100644
3655 /**
3656 * atomic64_add_unless - add unless the number is a given value
3657 * @v: pointer of type atomic64_t
3658 -@@ -474,13 +751,29 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
3659 +@@ -430,13 +493,29 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
3660
3661 __asm__ __volatile__ (
3662 PPC_ATOMIC_ENTRY_BARRIER
3663 @@ -9089,10 +8402,10 @@ index 26fe1ae..987ffc5 100644
3664 /*
3665 * Use the top bit of the higher-level page table entries to indicate whether
3666 diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h
3667 -index 88693ce..ac6f9ab 100644
3668 +index d908a46..3753f71 100644
3669 --- a/arch/powerpc/include/asm/page_64.h
3670 +++ b/arch/powerpc/include/asm/page_64.h
3671 -@@ -153,15 +153,18 @@ do { \
3672 +@@ -172,15 +172,18 @@ do { \
3673 * stack by default, so in the absence of a PT_GNU_STACK program header
3674 * we turn execute permission off.
3675 */
3676 @@ -9146,7 +8459,7 @@ index 4b0be20..c15a27d 100644
3677 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
3678 pte_t *pte)
3679 diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
3680 -index d98c1ec..9f61569 100644
3681 +index 316f9a5..ba05c77 100644
3682 --- a/arch/powerpc/include/asm/pgtable.h
3683 +++ b/arch/powerpc/include/asm/pgtable.h
3684 @@ -2,6 +2,7 @@
3685 @@ -9156,7 +8469,7 @@ index d98c1ec..9f61569 100644
3686 +#include <linux/const.h>
3687 #ifndef __ASSEMBLY__
3688 #include <linux/mmdebug.h>
3689 - #include <asm/processor.h> /* For TASK_SIZE */
3690 + #include <linux/mmzone.h>
3691 diff --git a/arch/powerpc/include/asm/pte-hash32.h b/arch/powerpc/include/asm/pte-hash32.h
3692 index 4aad413..85d86bf 100644
3693 --- a/arch/powerpc/include/asm/pte-hash32.h
3694 @@ -9170,7 +8483,7 @@ index 4aad413..85d86bf 100644
3695 #define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
3696 #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
3697 diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
3698 -index 0c05059..7e056e4 100644
3699 +index c998279..d13a9f8 100644
3700 --- a/arch/powerpc/include/asm/reg.h
3701 +++ b/arch/powerpc/include/asm/reg.h
3702 @@ -251,6 +251,7 @@
3703 @@ -9467,7 +8780,7 @@ index 9485b43..3bd3c16 100644
3704
3705 static inline unsigned long clear_user(void __user *addr, unsigned long size)
3706 diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
3707 -index 670c312..60c2b52 100644
3708 +index 502cf69..822e63b 100644
3709 --- a/arch/powerpc/kernel/Makefile
3710 +++ b/arch/powerpc/kernel/Makefile
3711 @@ -27,6 +27,8 @@ CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog
3712 @@ -9480,7 +8793,7 @@ index 670c312..60c2b52 100644
3713 irq.o align.o signal_32.o pmc.o vdso.o \
3714 process.o systbl.o idle.o \
3715 diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
3716 -index bb9cac6..5181202 100644
3717 +index 3e68d1c..72a5ee6 100644
3718 --- a/arch/powerpc/kernel/exceptions-64e.S
3719 +++ b/arch/powerpc/kernel/exceptions-64e.S
3720 @@ -1010,6 +1010,7 @@ storage_fault_common:
3721 @@ -9502,10 +8815,10 @@ index bb9cac6..5181202 100644
3722 ld r4,_DAR(r1)
3723 bl bad_page_fault
3724 diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
3725 -index 050f79a..f385bfe 100644
3726 +index 72e783e..fe058e2 100644
3727 --- a/arch/powerpc/kernel/exceptions-64s.S
3728 +++ b/arch/powerpc/kernel/exceptions-64s.S
3729 -@@ -1593,10 +1593,10 @@ handle_page_fault:
3730 +@@ -1588,10 +1588,10 @@ handle_page_fault:
3731 11: ld r4,_DAR(r1)
3732 ld r5,_DSISR(r1)
3733 addi r3,r1,STACK_FRAME_OVERHEAD
3734 @@ -9518,7 +8831,7 @@ index 050f79a..f385bfe 100644
3735 addi r3,r1,STACK_FRAME_OVERHEAD
3736 lwz r4,_DAR(r1)
3737 diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
3738 -index 4c5891d..a5d88bb 100644
3739 +index c143835..5a9697f 100644
3740 --- a/arch/powerpc/kernel/irq.c
3741 +++ b/arch/powerpc/kernel/irq.c
3742 @@ -461,6 +461,8 @@ void migrate_irqs(void)
3743 @@ -9531,7 +8844,7 @@ index 4c5891d..a5d88bb 100644
3744 {
3745 #ifdef CONFIG_DEBUG_STACKOVERFLOW
3746 @@ -473,6 +475,7 @@ static inline void check_stack_overflow(void)
3747 - printk("do_IRQ: stack overflow: %ld\n",
3748 + pr_err("do_IRQ: stack overflow: %ld\n",
3749 sp - sizeof(struct thread_info));
3750 dump_stack();
3751 + gr_handle_kernel_exploit();
3752 @@ -9539,21 +8852,21 @@ index 4c5891d..a5d88bb 100644
3753 #endif
3754 }
3755 diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
3756 -index 6cff040..74ac5d1b 100644
3757 +index c94d2e0..992a9ce 100644
3758 --- a/arch/powerpc/kernel/module_32.c
3759 +++ b/arch/powerpc/kernel/module_32.c
3760 -@@ -161,7 +161,7 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,
3761 +@@ -158,7 +158,7 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,
3762 me->arch.core_plt_section = i;
3763 }
3764 if (!me->arch.core_plt_section || !me->arch.init_plt_section) {
3765 -- printk("Module doesn't contain .plt or .init.plt sections.\n");
3766 -+ printk("Module %s doesn't contain .plt or .init.plt sections.\n", me->name);
3767 +- pr_err("Module doesn't contain .plt or .init.plt sections.\n");
3768 ++ pr_err("Module $s doesn't contain .plt or .init.plt sections.\n", me->name);
3769 return -ENOEXEC;
3770 }
3771
3772 -@@ -191,11 +191,16 @@ static uint32_t do_plt_call(void *location,
3773 +@@ -188,11 +188,16 @@ static uint32_t do_plt_call(void *location,
3774
3775 - DEBUGP("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location);
3776 + pr_debug("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location);
3777 /* Init, or core PLT? */
3778 - if (location >= mod->module_core
3779 - && location < mod->module_core + mod->core_size)
3780 @@ -9571,7 +8884,7 @@ index 6cff040..74ac5d1b 100644
3781
3782 /* Find this entry, or if that fails, the next avail. entry */
3783 while (entry->jump[0]) {
3784 -@@ -299,7 +304,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
3785 +@@ -296,7 +301,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
3786 }
3787 #ifdef CONFIG_DYNAMIC_FTRACE
3788 module->arch.tramp =
3789 @@ -9581,10 +8894,10 @@ index 6cff040..74ac5d1b 100644
3790 sechdrs, module);
3791 #endif
3792 diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
3793 -index bf44ae9..6d2ce71 100644
3794 +index 923cd2d..ae782a9 100644
3795 --- a/arch/powerpc/kernel/process.c
3796 +++ b/arch/powerpc/kernel/process.c
3797 -@@ -1039,8 +1039,8 @@ void show_regs(struct pt_regs * regs)
3798 +@@ -1040,8 +1040,8 @@ void show_regs(struct pt_regs * regs)
3799 * Lookup NIP late so we have the best change of getting the
3800 * above info out without failing
3801 */
3802 @@ -9595,7 +8908,7 @@ index bf44ae9..6d2ce71 100644
3803 #endif
3804 show_stack(current, (unsigned long *) regs->gpr[1]);
3805 if (!user_mode(regs))
3806 -@@ -1558,10 +1558,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
3807 +@@ -1560,10 +1560,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
3808 newsp = stack[0];
3809 ip = stack[STACK_FRAME_LR_SAVE];
3810 if (!firstframe || ip != lr) {
3811 @@ -9608,7 +8921,7 @@ index bf44ae9..6d2ce71 100644
3812 (void *)current->ret_stack[curr_frame].ret);
3813 curr_frame--;
3814 }
3815 -@@ -1581,7 +1581,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
3816 +@@ -1583,7 +1583,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
3817 struct pt_regs *regs = (struct pt_regs *)
3818 (sp + STACK_FRAME_OVERHEAD);
3819 lr = regs->link;
3820 @@ -9617,7 +8930,7 @@ index bf44ae9..6d2ce71 100644
3821 regs->trap, (void *)regs->nip, (void *)lr);
3822 firstframe = 1;
3823 }
3824 -@@ -1617,58 +1617,3 @@ void notrace __ppc64_runlatch_off(void)
3825 +@@ -1619,58 +1619,3 @@ void notrace __ppc64_runlatch_off(void)
3826 mtspr(SPRN_CTRLT, ctrl);
3827 }
3828 #endif /* CONFIG_PPC64 */
3829 @@ -9677,7 +8990,7 @@ index bf44ae9..6d2ce71 100644
3830 - return ret;
3831 -}
3832 diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
3833 -index 2e3d2bf..35df241 100644
3834 +index f21897b..28c0428 100644
3835 --- a/arch/powerpc/kernel/ptrace.c
3836 +++ b/arch/powerpc/kernel/ptrace.c
3837 @@ -1762,6 +1762,10 @@ long arch_ptrace(struct task_struct *child, long request,
3838 @@ -9703,7 +9016,7 @@ index 2e3d2bf..35df241 100644
3839 if (test_thread_flag(TIF_SYSCALL_TRACE) &&
3840 tracehook_report_syscall_entry(regs))
3841 /*
3842 -@@ -1808,6 +1817,11 @@ void do_syscall_trace_leave(struct pt_regs *regs)
3843 +@@ -1805,6 +1814,11 @@ void do_syscall_trace_leave(struct pt_regs *regs)
3844 {
3845 int step;
3846
3847 @@ -9830,10 +9143,10 @@ index f174351..5722009 100644
3848 rc = vdso_base;
3849 goto fail_mmapsem;
3850 diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
3851 -index 4c79284..0e462c3 100644
3852 +index c1f8f53..71a3b96 100644
3853 --- a/arch/powerpc/kvm/powerpc.c
3854 +++ b/arch/powerpc/kvm/powerpc.c
3855 -@@ -1338,7 +1338,7 @@ void kvmppc_init_lpid(unsigned long nr_lpids_param)
3856 +@@ -1409,7 +1409,7 @@ void kvmppc_init_lpid(unsigned long nr_lpids_param)
3857 }
3858 EXPORT_SYMBOL_GPL(kvmppc_init_lpid);
3859
3860 @@ -9878,13 +9191,13 @@ index 5eea6f3..5d10396 100644
3861 EXPORT_SYMBOL(copy_in_user);
3862
3863 diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
3864 -index 51ab9e7..7d3c78b 100644
3865 +index 08d659a..ab329f4 100644
3866 --- a/arch/powerpc/mm/fault.c
3867 +++ b/arch/powerpc/mm/fault.c
3868 @@ -33,6 +33,10 @@
3869 - #include <linux/magic.h>
3870 #include <linux/ratelimit.h>
3871 #include <linux/context_tracking.h>
3872 + #include <linux/hugetlb.h>
3873 +#include <linux/slab.h>
3874 +#include <linux/pagemap.h>
3875 +#include <linux/compiler.h>
3876 @@ -9926,7 +9239,7 @@ index 51ab9e7..7d3c78b 100644
3877 /*
3878 * Check whether the instruction at regs->nip is a store using
3879 * an update addressing form which will update r1.
3880 -@@ -216,7 +247,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
3881 +@@ -228,7 +259,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
3882 * indicate errors in DSISR but can validly be set in SRR1.
3883 */
3884 if (trap == 0x400)
3885 @@ -9935,7 +9248,7 @@ index 51ab9e7..7d3c78b 100644
3886 else
3887 is_write = error_code & DSISR_ISSTORE;
3888 #else
3889 -@@ -378,7 +409,7 @@ good_area:
3890 +@@ -390,7 +421,7 @@ good_area:
3891 * "undefined". Of those that can be set, this is the only
3892 * one which seems bad.
3893 */
3894 @@ -9944,7 +9257,7 @@ index 51ab9e7..7d3c78b 100644
3895 /* Guarded storage error. */
3896 goto bad_area;
3897 #endif /* CONFIG_8xx */
3898 -@@ -393,7 +424,7 @@ good_area:
3899 +@@ -405,7 +436,7 @@ good_area:
3900 * processors use the same I/D cache coherency mechanism
3901 * as embedded.
3902 */
3903 @@ -9953,7 +9266,7 @@ index 51ab9e7..7d3c78b 100644
3904 goto bad_area;
3905 #endif /* CONFIG_PPC_STD_MMU */
3906
3907 -@@ -483,6 +514,23 @@ bad_area:
3908 +@@ -495,6 +526,23 @@ bad_area:
3909 bad_area_nosemaphore:
3910 /* User mode accesses cause a SIGSEGV */
3911 if (user_mode(regs)) {
3912 @@ -10039,10 +9352,10 @@ index cb8bdbe..cde4bc7 100644
3913 }
3914 }
3915 diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
3916 -index b0c75cc..ef7fb93 100644
3917 +index ded0ea1..f213a9b 100644
3918 --- a/arch/powerpc/mm/slice.c
3919 +++ b/arch/powerpc/mm/slice.c
3920 -@@ -103,7 +103,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr,
3921 +@@ -105,7 +105,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr,
3922 if ((mm->task_size - len) < addr)
3923 return 0;
3924 vma = find_vma(mm, addr);
3925 @@ -10076,18 +9389,6 @@ index b0c75cc..ef7fb93 100644
3926 /* If hint, make sure it matches our alignment restrictions */
3927 if (!fixed && addr) {
3928 addr = _ALIGN_UP(addr, 1ul << pshift);
3929 -diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c
3930 -index 3afa6f4..40c53ff 100644
3931 ---- a/arch/powerpc/net/bpf_jit_comp.c
3932 -+++ b/arch/powerpc/net/bpf_jit_comp.c
3933 -@@ -697,5 +697,6 @@ void bpf_jit_free(struct bpf_prog *fp)
3934 - {
3935 - if (fp->jited)
3936 - module_free(NULL, fp->bpf_func);
3937 -- kfree(fp);
3938 -+
3939 -+ bpf_prog_unlock_free(fp);
3940 - }
3941 diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c
3942 index 4278acf..67fd0e6 100644
3943 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c
3944 @@ -10139,10 +9440,10 @@ index fa934fe..c296056 100644
3945 +
3946 #endif /* __ARCH_S390_ATOMIC__ */
3947 diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h
3948 -index 19ff956..8d39cb1 100644
3949 +index b5dce65..8aca09a 100644
3950 --- a/arch/s390/include/asm/barrier.h
3951 +++ b/arch/s390/include/asm/barrier.h
3952 -@@ -37,7 +37,7 @@
3953 +@@ -39,7 +39,7 @@
3954 do { \
3955 compiletime_assert_atomic_type(*p); \
3956 barrier(); \
3957 @@ -10168,10 +9469,10 @@ index 4d7ccac..d03d0ad 100644
3958
3959 #define __read_mostly __attribute__((__section__(".data..read_mostly")))
3960 diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
3961 -index 78f4f87..598ce39 100644
3962 +index f6e43d3..5f57681 100644
3963 --- a/arch/s390/include/asm/elf.h
3964 +++ b/arch/s390/include/asm/elf.h
3965 -@@ -162,8 +162,14 @@ extern unsigned int vdso_enabled;
3966 +@@ -163,8 +163,14 @@ extern unsigned int vdso_enabled;
3967 the loader. We need to make sure that it is out of the way of the program
3968 that it will "exec", and that there is sufficient room for the brk. */
3969
3970 @@ -10188,14 +9489,14 @@ index 78f4f87..598ce39 100644
3971
3972 /* This yields a mask that user programs can use to figure out what
3973 instruction set this CPU supports. */
3974 -@@ -222,9 +228,6 @@ struct linux_binprm;
3975 +@@ -223,9 +229,6 @@ struct linux_binprm;
3976 #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
3977 int arch_setup_additional_pages(struct linux_binprm *, int);
3978
3979 -extern unsigned long arch_randomize_brk(struct mm_struct *mm);
3980 -#define arch_randomize_brk arch_randomize_brk
3981 -
3982 - void *fill_cpu_elf_notes(void *ptr, struct save_area *sa);
3983 + void *fill_cpu_elf_notes(void *ptr, struct save_area *sa, __vector128 *vxrs);
3984
3985 #endif
3986 diff --git a/arch/s390/include/asm/exec.h b/arch/s390/include/asm/exec.h
3987 @@ -10326,10 +9627,10 @@ index b89b591..fd9609d 100644
3988 if (r_type == R_390_GOTPC)
3989 rc = apply_rela_bits(loc, val, 1, 32, 0);
3990 diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
3991 -index 93b9ca4..4ea1454 100644
3992 +index ed84cc2..c05a9d2 100644
3993 --- a/arch/s390/kernel/process.c
3994 +++ b/arch/s390/kernel/process.c
3995 -@@ -242,37 +242,3 @@ unsigned long get_wchan(struct task_struct *p)
3996 +@@ -218,37 +218,3 @@ unsigned long get_wchan(struct task_struct *p)
3997 }
3998 return 0;
3999 }
4000 @@ -10415,17 +9716,6 @@ index 9b436c2..54fbf0a 100644
4001 mm->get_unmapped_area = s390_get_unmapped_area_topdown;
4002 }
4003 }
4004 -diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
4005 -index 61e45b7..f2833c5 100644
4006 ---- a/arch/s390/net/bpf_jit_comp.c
4007 -+++ b/arch/s390/net/bpf_jit_comp.c
4008 -@@ -887,5 +887,5 @@ void bpf_jit_free(struct bpf_prog *fp)
4009 - module_free(NULL, header);
4010 -
4011 - free_filter:
4012 -- kfree(fp);
4013 -+ bpf_prog_unlock_free(fp);
4014 - }
4015 diff --git a/arch/score/include/asm/cache.h b/arch/score/include/asm/cache.h
4016 index ae3d59f..f65f075 100644
4017 --- a/arch/score/include/asm/cache.h
4018 @@ -10566,21 +9856,21 @@ index 6777177..cb5e44f 100644
4019 addr = vm_unmapped_area(&info);
4020 }
4021 diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h
4022 -index bb894c8..81b82e9 100644
4023 +index 4082749..fd97781 100644
4024 --- a/arch/sparc/include/asm/atomic_64.h
4025 +++ b/arch/sparc/include/asm/atomic_64.h
4026 -@@ -15,18 +15,40 @@
4027 +@@ -15,18 +15,38 @@
4028 #define ATOMIC64_INIT(i) { (i) }
4029
4030 - #define atomic_read(v) (*(volatile int *)&(v)->counter)
4031 + #define atomic_read(v) ACCESS_ONCE((v)->counter)
4032 +static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
4033 +{
4034 -+ return *(const volatile int *)&v->counter;
4035 ++ return ACCESS_ONCE(v->counter);
4036 +}
4037 - #define atomic64_read(v) (*(volatile long *)&(v)->counter)
4038 + #define atomic64_read(v) ACCESS_ONCE((v)->counter)
4039 +static inline long atomic64_read_unchecked(const atomic64_unchecked_t *v)
4040 +{
4041 -+ return *(const volatile long *)&v->counter;
4042 ++ return ACCESS_ONCE(v->counter);
4043 +}
4044
4045 #define atomic_set(v, i) (((v)->counter) = i)
4046 @@ -10594,53 +9884,51 @@ index bb894c8..81b82e9 100644
4047 + v->counter = i;
4048 +}
4049
4050 - void atomic_add(int, atomic_t *);
4051 -+void atomic_add_unchecked(int, atomic_unchecked_t *);
4052 - void atomic64_add(long, atomic64_t *);
4053 -+void atomic64_add_unchecked(long, atomic64_unchecked_t *);
4054 - void atomic_sub(int, atomic_t *);
4055 -+void atomic_sub_unchecked(int, atomic_unchecked_t *);
4056 - void atomic64_sub(long, atomic64_t *);
4057 -+void atomic64_sub_unchecked(long, atomic64_unchecked_t *);
4058 +-#define ATOMIC_OP(op) \
4059 +-void atomic_##op(int, atomic_t *); \
4060 +-void atomic64_##op(long, atomic64_t *);
4061 ++#define __ATOMIC_OP(op, suffix) \
4062 ++void atomic_##op##suffix(int, atomic##suffix##_t *); \
4063 ++void atomic64_##op##suffix(long, atomic64##suffix##_t *);
4064
4065 - int atomic_add_ret(int, atomic_t *);
4066 -+int atomic_add_ret_unchecked(int, atomic_unchecked_t *);
4067 - long atomic64_add_ret(long, atomic64_t *);
4068 -+long atomic64_add_ret_unchecked(long, atomic64_unchecked_t *);
4069 - int atomic_sub_ret(int, atomic_t *);
4070 - long atomic64_sub_ret(long, atomic64_t *);
4071 +-#define ATOMIC_OP_RETURN(op) \
4072 +-int atomic_##op##_return(int, atomic_t *); \
4073 +-long atomic64_##op##_return(long, atomic64_t *);
4074 ++#define ATOMIC_OP(op) __ATOMIC_OP(op, ) __ATOMIC_OP(op, _unchecked)
4075 ++
4076 ++#define __ATOMIC_OP_RETURN(op, suffix) \
4077 ++int atomic_##op##_return##suffix(int, atomic##suffix##_t *); \
4078 ++long atomic64_##op##_return##suffix(long, atomic64##suffix##_t *);
4079 ++
4080 ++#define ATOMIC_OP_RETURN(op) __ATOMIC_OP_RETURN(op, ) __ATOMIC_OP_RETURN(op, _unchecked)
4081
4082 -@@ -34,13 +56,29 @@ long atomic64_sub_ret(long, atomic64_t *);
4083 - #define atomic64_dec_return(v) atomic64_sub_ret(1, v)
4084 + #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op)
4085
4086 - #define atomic_inc_return(v) atomic_add_ret(1, v)
4087 -+static inline int atomic_inc_return_unchecked(atomic_unchecked_t *v)
4088 -+{
4089 -+ return atomic_add_ret_unchecked(1, v);
4090 -+}
4091 - #define atomic64_inc_return(v) atomic64_add_ret(1, v)
4092 -+static inline long atomic64_inc_return_unchecked(atomic64_unchecked_t *v)
4093 -+{
4094 -+ return atomic64_add_ret_unchecked(1, v);
4095 -+}
4096 +@@ -35,13 +55,23 @@ ATOMIC_OPS(sub)
4097
4098 - #define atomic_sub_return(i, v) atomic_sub_ret(i, v)
4099 - #define atomic64_sub_return(i, v) atomic64_sub_ret(i, v)
4100 + #undef ATOMIC_OPS
4101 + #undef ATOMIC_OP_RETURN
4102 ++#undef __ATOMIC_OP_RETURN
4103 + #undef ATOMIC_OP
4104 ++#undef __ATOMIC_OP
4105
4106 - #define atomic_add_return(i, v) atomic_add_ret(i, v)
4107 -+static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
4108 + #define atomic_dec_return(v) atomic_sub_return(1, v)
4109 + #define atomic64_dec_return(v) atomic64_sub_return(1, v)
4110 +
4111 + #define atomic_inc_return(v) atomic_add_return(1, v)
4112 ++static inline int atomic_inc_return_unchecked(atomic_unchecked_t *v)
4113 +{
4114 -+ return atomic_add_ret_unchecked(i, v);
4115 ++ return atomic_add_return_unchecked(1, v);
4116 +}
4117 - #define atomic64_add_return(i, v) atomic64_add_ret(i, v)
4118 -+static inline long atomic64_add_return_unchecked(long i, atomic64_unchecked_t *v)
4119 + #define atomic64_inc_return(v) atomic64_add_return(1, v)
4120 ++static inline long atomic64_inc_return_unchecked(atomic64_unchecked_t *v)
4121 +{
4122 -+ return atomic64_add_ret_unchecked(i, v);
4123 ++ return atomic64_add_return_unchecked(1, v);
4124 +}
4125
4126 /*
4127 * atomic_inc_and_test - increment and test
4128 -@@ -51,6 +89,10 @@ long atomic64_sub_ret(long, atomic64_t *);
4129 +@@ -52,6 +82,10 @@ ATOMIC_OPS(sub)
4130 * other cases.
4131 */
4132 #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
4133 @@ -10650,9 +9938,9 @@ index bb894c8..81b82e9 100644
4134 +}
4135 #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0)
4136
4137 - #define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0)
4138 -@@ -60,25 +102,60 @@ long atomic64_sub_ret(long, atomic64_t *);
4139 - #define atomic64_dec_and_test(v) (atomic64_sub_ret(1, v) == 0)
4140 + #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
4141 +@@ -61,25 +95,60 @@ ATOMIC_OPS(sub)
4142 + #define atomic64_dec_and_test(v) (atomic64_sub_return(1, v) == 0)
4143
4144 #define atomic_inc(v) atomic_add(1, v)
4145 +static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
4146 @@ -10676,8 +9964,8 @@ index bb894c8..81b82e9 100644
4147 + atomic64_sub_unchecked(1, v);
4148 +}
4149
4150 - #define atomic_add_negative(i, v) (atomic_add_ret(i, v) < 0)
4151 - #define atomic64_add_negative(i, v) (atomic64_add_ret(i, v) < 0)
4152 + #define atomic_add_negative(i, v) (atomic_add_return(i, v) < 0)
4153 + #define atomic64_add_negative(i, v) (atomic64_add_return(i, v) < 0)
4154
4155 #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
4156 +static inline int atomic_cmpxchg_unchecked(atomic_unchecked_t *v, int old, int new)
4157 @@ -10715,7 +10003,7 @@ index bb894c8..81b82e9 100644
4158 if (likely(old == c))
4159 break;
4160 c = old;
4161 -@@ -89,20 +166,35 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
4162 +@@ -90,20 +159,35 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
4163 #define atomic64_cmpxchg(v, o, n) \
4164 ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
4165 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
4166 @@ -11039,7 +10327,7 @@ index 9689176..63c18ea 100644
4167 unsigned long mask, tmp1, tmp2, result;
4168
4169 diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h
4170 -index 96efa7a..16858bf 100644
4171 +index 025c984..a216504 100644
4172 --- a/arch/sparc/include/asm/thread_info_32.h
4173 +++ b/arch/sparc/include/asm/thread_info_32.h
4174 @@ -49,6 +49,8 @@ struct thread_info {
4175 @@ -11052,7 +10340,7 @@ index 96efa7a..16858bf 100644
4176
4177 /*
4178 diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
4179 -index cc6275c..7eb8e21 100644
4180 +index 798f027..b009941 100644
4181 --- a/arch/sparc/include/asm/thread_info_64.h
4182 +++ b/arch/sparc/include/asm/thread_info_64.h
4183 @@ -63,6 +63,8 @@ struct thread_info {
4184 @@ -11079,7 +10367,7 @@ index cc6275c..7eb8e21 100644
4185 /* NOTE: Thread flags >= 12 should be ones we have no interest
4186 * in using in assembly, else we can't use the mask as
4187 * an immediate value in instructions such as andcc.
4188 -@@ -215,12 +218,18 @@ register struct thread_info *current_thread_info_reg asm("g6");
4189 +@@ -215,12 +218,17 @@ register struct thread_info *current_thread_info_reg asm("g6");
4190 #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
4191 #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT)
4192 #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
4193 @@ -11094,10 +10382,9 @@ index cc6275c..7eb8e21 100644
4194 + (_TIF_SYSCALL_TRACE | _TIF_SECCOMP | _TIF_SYSCALL_AUDIT | \
4195 + _TIF_SYSCALL_TRACEPOINT | _TIF_NOHZ | _TIF_GRSEC_SETXID)
4196 +
4197 -+
4198 + #define is_32bit_task() (test_thread_flag(TIF_32BIT))
4199 +
4200 /*
4201 - * Thread-synchronous status.
4202 - *
4203 diff --git a/arch/sparc/include/asm/uaccess.h b/arch/sparc/include/asm/uaccess.h
4204 index bd56c28..4b63d83 100644
4205 --- a/arch/sparc/include/asm/uaccess.h
4206 @@ -11307,7 +10594,7 @@ index 79cc0d1..ec62734 100644
4207 .getproplen = prom_getproplen,
4208 .getproperty = prom_getproperty,
4209 diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c
4210 -index c13c9f2..d572c34 100644
4211 +index 9ddc492..27a5619 100644
4212 --- a/arch/sparc/kernel/ptrace_64.c
4213 +++ b/arch/sparc/kernel/ptrace_64.c
4214 @@ -1060,6 +1060,10 @@ long arch_ptrace(struct task_struct *child, long request,
4215 @@ -11333,7 +10620,7 @@ index c13c9f2..d572c34 100644
4216 if (test_thread_flag(TIF_SYSCALL_TRACE))
4217 ret = tracehook_report_syscall_entry(regs);
4218
4219 -@@ -1093,6 +1102,11 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs)
4220 +@@ -1088,6 +1097,11 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs)
4221 if (test_thread_flag(TIF_NOHZ))
4222 user_exit();
4223
4224 @@ -11346,7 +10633,7 @@ index c13c9f2..d572c34 100644
4225
4226 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
4227 diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
4228 -index 81954ee..6cfaa98 100644
4229 +index da6f1a7..e5dea8f 100644
4230 --- a/arch/sparc/kernel/smp_64.c
4231 +++ b/arch/sparc/kernel/smp_64.c
4232 @@ -887,7 +887,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu)
4233 @@ -11861,242 +11148,150 @@ index 3269b02..64f5231 100644
4234 lib-$(CONFIG_SPARC32) += ashrdi3.o
4235 lib-$(CONFIG_SPARC32) += memcpy.o memset.o
4236 diff --git a/arch/sparc/lib/atomic_64.S b/arch/sparc/lib/atomic_64.S
4237 -index 85c233d..68500e0 100644
4238 +index 05dac43..76f8ed4 100644
4239 --- a/arch/sparc/lib/atomic_64.S
4240 +++ b/arch/sparc/lib/atomic_64.S
4241 -@@ -17,7 +17,12 @@
4242 - ENTRY(atomic_add) /* %o0 = increment, %o1 = atomic_ptr */
4243 - BACKOFF_SETUP(%o2)
4244 - 1: lduw [%o1], %g1
4245 -- add %g1, %o0, %g7
4246 -+ addcc %g1, %o0, %g7
4247 -+
4248 -+#ifdef CONFIG_PAX_REFCOUNT
4249 -+ tvs %icc, 6
4250 -+#endif
4251 -+
4252 - cas [%o1], %g1, %g7
4253 - cmp %g1, %g7
4254 - bne,pn %icc, BACKOFF_LABEL(2f, 1b)
4255 -@@ -27,10 +32,28 @@ ENTRY(atomic_add) /* %o0 = increment, %o1 = atomic_ptr */
4256 - 2: BACKOFF_SPIN(%o2, %o3, 1b)
4257 - ENDPROC(atomic_add)
4258 -
4259 -+ENTRY(atomic_add_unchecked) /* %o0 = increment, %o1 = atomic_ptr */
4260 -+ BACKOFF_SETUP(%o2)
4261 -+1: lduw [%o1], %g1
4262 -+ add %g1, %o0, %g7
4263 -+ cas [%o1], %g1, %g7
4264 -+ cmp %g1, %g7
4265 -+ bne,pn %icc, 2f
4266 -+ nop
4267 -+ retl
4268 -+ nop
4269 -+2: BACKOFF_SPIN(%o2, %o3, 1b)
4270 -+ENDPROC(atomic_add_unchecked)
4271 -+
4272 - ENTRY(atomic_sub) /* %o0 = decrement, %o1 = atomic_ptr */
4273 - BACKOFF_SETUP(%o2)
4274 - 1: lduw [%o1], %g1
4275 -- sub %g1, %o0, %g7
4276 -+ subcc %g1, %o0, %g7
4277 -+
4278 -+#ifdef CONFIG_PAX_REFCOUNT
4279 -+ tvs %icc, 6
4280 -+#endif
4281 -+
4282 - cas [%o1], %g1, %g7
4283 - cmp %g1, %g7
4284 - bne,pn %icc, BACKOFF_LABEL(2f, 1b)
4285 -@@ -40,10 +63,28 @@ ENTRY(atomic_sub) /* %o0 = decrement, %o1 = atomic_ptr */
4286 - 2: BACKOFF_SPIN(%o2, %o3, 1b)
4287 - ENDPROC(atomic_sub)
4288 -
4289 -+ENTRY(atomic_sub_unchecked) /* %o0 = decrement, %o1 = atomic_ptr */
4290 -+ BACKOFF_SETUP(%o2)
4291 -+1: lduw [%o1], %g1
4292 -+ sub %g1, %o0, %g7
4293 -+ cas [%o1], %g1, %g7
4294 -+ cmp %g1, %g7
4295 -+ bne,pn %icc, 2f
4296 -+ nop
4297 -+ retl
4298 -+ nop
4299 -+2: BACKOFF_SPIN(%o2, %o3, 1b)
4300 -+ENDPROC(atomic_sub_unchecked)
4301 -+
4302 - ENTRY(atomic_add_ret) /* %o0 = increment, %o1 = atomic_ptr */
4303 - BACKOFF_SETUP(%o2)
4304 - 1: lduw [%o1], %g1
4305 -- add %g1, %o0, %g7
4306 -+ addcc %g1, %o0, %g7
4307 -+
4308 -+#ifdef CONFIG_PAX_REFCOUNT
4309 -+ tvs %icc, 6
4310 -+#endif
4311 -+
4312 - cas [%o1], %g1, %g7
4313 - cmp %g1, %g7
4314 - bne,pn %icc, BACKOFF_LABEL(2f, 1b)
4315 -@@ -53,10 +94,29 @@ ENTRY(atomic_add_ret) /* %o0 = increment, %o1 = atomic_ptr */
4316 - 2: BACKOFF_SPIN(%o2, %o3, 1b)
4317 - ENDPROC(atomic_add_ret)
4318 -
4319 -+ENTRY(atomic_add_ret_unchecked) /* %o0 = increment, %o1 = atomic_ptr */
4320 -+ BACKOFF_SETUP(%o2)
4321 -+1: lduw [%o1], %g1
4322 -+ addcc %g1, %o0, %g7
4323 -+ cas [%o1], %g1, %g7
4324 -+ cmp %g1, %g7
4325 -+ bne,pn %icc, 2f
4326 -+ add %g7, %o0, %g7
4327 -+ sra %g7, 0, %o0
4328 -+ retl
4329 -+ nop
4330 -+2: BACKOFF_SPIN(%o2, %o3, 1b)
4331 -+ENDPROC(atomic_add_ret_unchecked)
4332 -+
4333 - ENTRY(atomic_sub_ret) /* %o0 = decrement, %o1 = atomic_ptr */
4334 - BACKOFF_SETUP(%o2)
4335 - 1: lduw [%o1], %g1
4336 -- sub %g1, %o0, %g7
4337 -+ subcc %g1, %o0, %g7
4338 -+
4339 -+#ifdef CONFIG_PAX_REFCOUNT
4340 -+ tvs %icc, 6
4341 -+#endif
4342 -+
4343 - cas [%o1], %g1, %g7
4344 - cmp %g1, %g7
4345 - bne,pn %icc, BACKOFF_LABEL(2f, 1b)
4346 -@@ -69,7 +129,12 @@ ENDPROC(atomic_sub_ret)
4347 - ENTRY(atomic64_add) /* %o0 = increment, %o1 = atomic_ptr */
4348 - BACKOFF_SETUP(%o2)
4349 - 1: ldx [%o1], %g1
4350 -- add %g1, %o0, %g7
4351 -+ addcc %g1, %o0, %g7
4352 -+
4353 -+#ifdef CONFIG_PAX_REFCOUNT
4354 -+ tvs %xcc, 6
4355 -+#endif
4356 -+
4357 - casx [%o1], %g1, %g7
4358 - cmp %g1, %g7
4359 - bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
4360 -@@ -79,10 +144,28 @@ ENTRY(atomic64_add) /* %o0 = increment, %o1 = atomic_ptr */
4361 - 2: BACKOFF_SPIN(%o2, %o3, 1b)
4362 - ENDPROC(atomic64_add)
4363 -
4364 -+ENTRY(atomic64_add_unchecked) /* %o0 = increment, %o1 = atomic_ptr */
4365 -+ BACKOFF_SETUP(%o2)
4366 -+1: ldx [%o1], %g1
4367 -+ addcc %g1, %o0, %g7
4368 -+ casx [%o1], %g1, %g7
4369 -+ cmp %g1, %g7
4370 -+ bne,pn %xcc, 2f
4371 -+ nop
4372 -+ retl
4373 -+ nop
4374 -+2: BACKOFF_SPIN(%o2, %o3, 1b)
4375 -+ENDPROC(atomic64_add_unchecked)
4376 -+
4377 - ENTRY(atomic64_sub) /* %o0 = decrement, %o1 = atomic_ptr */
4378 - BACKOFF_SETUP(%o2)
4379 - 1: ldx [%o1], %g1
4380 -- sub %g1, %o0, %g7
4381 -+ subcc %g1, %o0, %g7
4382 -+
4383 -+#ifdef CONFIG_PAX_REFCOUNT
4384 -+ tvs %xcc, 6
4385 -+#endif
4386 -+
4387 - casx [%o1], %g1, %g7
4388 - cmp %g1, %g7
4389 - bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
4390 -@@ -92,10 +175,28 @@ ENTRY(atomic64_sub) /* %o0 = decrement, %o1 = atomic_ptr */
4391 - 2: BACKOFF_SPIN(%o2, %o3, 1b)
4392 - ENDPROC(atomic64_sub)
4393 -
4394 -+ENTRY(atomic64_sub_unchecked) /* %o0 = decrement, %o1 = atomic_ptr */
4395 -+ BACKOFF_SETUP(%o2)
4396 -+1: ldx [%o1], %g1
4397 -+ subcc %g1, %o0, %g7
4398 -+ casx [%o1], %g1, %g7
4399 -+ cmp %g1, %g7
4400 -+ bne,pn %xcc, 2f
4401 -+ nop
4402 -+ retl
4403 -+ nop
4404 -+2: BACKOFF_SPIN(%o2, %o3, 1b)
4405 -+ENDPROC(atomic64_sub_unchecked)
4406 -+
4407 - ENTRY(atomic64_add_ret) /* %o0 = increment, %o1 = atomic_ptr */
4408 - BACKOFF_SETUP(%o2)
4409 - 1: ldx [%o1], %g1
4410 -- add %g1, %o0, %g7
4411 -+ addcc %g1, %o0, %g7
4412 -+
4413 +@@ -15,11 +15,22 @@
4414 + * a value and does the barriers.
4415 + */
4416 +
4417 +-#define ATOMIC_OP(op) \
4418 +-ENTRY(atomic_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
4419 +#ifdef CONFIG_PAX_REFCOUNT
4420 -+ tvs %xcc, 6
4421 -+#endif
4422 -+
4423 - casx [%o1], %g1, %g7
4424 - cmp %g1, %g7
4425 - bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
4426 -@@ -105,10 +206,29 @@ ENTRY(atomic64_add_ret) /* %o0 = increment, %o1 = atomic_ptr */
4427 - 2: BACKOFF_SPIN(%o2, %o3, 1b)
4428 - ENDPROC(atomic64_add_ret)
4429 -
4430 -+ENTRY(atomic64_add_ret_unchecked) /* %o0 = increment, %o1 = atomic_ptr */
4431 -+ BACKOFF_SETUP(%o2)
4432 -+1: ldx [%o1], %g1
4433 -+ addcc %g1, %o0, %g7
4434 -+ casx [%o1], %g1, %g7
4435 -+ cmp %g1, %g7
4436 -+ bne,pn %xcc, 2f
4437 -+ add %g7, %o0, %g7
4438 -+ mov %g7, %o0
4439 -+ retl
4440 -+ nop
4441 -+2: BACKOFF_SPIN(%o2, %o3, 1b)
4442 -+ENDPROC(atomic64_add_ret_unchecked)
4443 -+
4444 - ENTRY(atomic64_sub_ret) /* %o0 = decrement, %o1 = atomic_ptr */
4445 ++#define __REFCOUNT_OP(op) op##cc
4446 ++#define __OVERFLOW_IOP tvs %icc, 6;
4447 ++#define __OVERFLOW_XOP tvs %xcc, 6;
4448 ++#else
4449 ++#define __REFCOUNT_OP(op) op
4450 ++#define __OVERFLOW_IOP
4451 ++#define __OVERFLOW_XOP
4452 ++#endif
4453 ++
4454 ++#define __ATOMIC_OP(op, suffix, asm_op, post_op) \
4455 ++ENTRY(atomic_##op##suffix) /* %o0 = increment, %o1 = atomic_ptr */ \
4456 + BACKOFF_SETUP(%o2); \
4457 + 1: lduw [%o1], %g1; \
4458 +- op %g1, %o0, %g7; \
4459 ++ asm_op %g1, %o0, %g7; \
4460 ++ post_op \
4461 + cas [%o1], %g1, %g7; \
4462 + cmp %g1, %g7; \
4463 + bne,pn %icc, BACKOFF_LABEL(2f, 1b); \
4464 +@@ -29,11 +40,15 @@ ENTRY(atomic_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
4465 + 2: BACKOFF_SPIN(%o2, %o3, 1b); \
4466 + ENDPROC(atomic_##op); \
4467 +
4468 +-#define ATOMIC_OP_RETURN(op) \
4469 +-ENTRY(atomic_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \
4470 ++#define ATOMIC_OP(op) __ATOMIC_OP(op, , op, ) \
4471 ++ __ATOMIC_OP(op, _unchecked, __REFCOUNT_OP(op), __OVERFLOW_IOP)
4472 ++
4473 ++#define __ATOMIC_OP_RETURN(op, suffix, asm_op, post_op) \
4474 ++ENTRY(atomic_##op##_return##suffix) /* %o0 = increment, %o1 = atomic_ptr */\
4475 + BACKOFF_SETUP(%o2); \
4476 + 1: lduw [%o1], %g1; \
4477 +- op %g1, %o0, %g7; \
4478 ++ asm_op %g1, %o0, %g7; \
4479 ++ post_op \
4480 + cas [%o1], %g1, %g7; \
4481 + cmp %g1, %g7; \
4482 + bne,pn %icc, BACKOFF_LABEL(2f, 1b); \
4483 +@@ -43,6 +58,9 @@ ENTRY(atomic_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \
4484 + 2: BACKOFF_SPIN(%o2, %o3, 1b); \
4485 + ENDPROC(atomic_##op##_return);
4486 +
4487 ++#define ATOMIC_OP_RETURN(op) __ATOMIC_OP_RETURN(op, , op, ) \
4488 ++ __ATOMIC_OP_RETURN(op, _unchecked, __REFCOUNT_OP(op), __OVERFLOW_IOP)
4489 ++
4490 + #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op)
4491 +
4492 + ATOMIC_OPS(add)
4493 +@@ -50,13 +68,16 @@ ATOMIC_OPS(sub)
4494 +
4495 + #undef ATOMIC_OPS
4496 + #undef ATOMIC_OP_RETURN
4497 ++#undef __ATOMIC_OP_RETURN
4498 + #undef ATOMIC_OP
4499 ++#undef __ATOMIC_OP
4500 +
4501 +-#define ATOMIC64_OP(op) \
4502 +-ENTRY(atomic64_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
4503 ++#define __ATOMIC64_OP(op, suffix, asm_op, post_op) \
4504 ++ENTRY(atomic64_##op##suffix) /* %o0 = increment, %o1 = atomic_ptr */ \
4505 + BACKOFF_SETUP(%o2); \
4506 + 1: ldx [%o1], %g1; \
4507 +- op %g1, %o0, %g7; \
4508 ++ asm_op %g1, %o0, %g7; \
4509 ++ post_op \
4510 + casx [%o1], %g1, %g7; \
4511 + cmp %g1, %g7; \
4512 + bne,pn %xcc, BACKOFF_LABEL(2f, 1b); \
4513 +@@ -66,11 +87,15 @@ ENTRY(atomic64_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
4514 + 2: BACKOFF_SPIN(%o2, %o3, 1b); \
4515 + ENDPROC(atomic64_##op); \
4516 +
4517 +-#define ATOMIC64_OP_RETURN(op) \
4518 +-ENTRY(atomic64_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \
4519 ++#define ATOMIC64_OP(op) __ATOMIC64_OP(op, , op, ) \
4520 ++ __ATOMIC64_OP(op, _unchecked, __REFCOUNT_OP(op), __OVERFLOW_XOP)
4521 ++
4522 ++#define __ATOMIC64_OP_RETURN(op, suffix, asm_op, post_op) \
4523 ++ENTRY(atomic64_##op##_return##suffix) /* %o0 = increment, %o1 = atomic_ptr */\
4524 + BACKOFF_SETUP(%o2); \
4525 + 1: ldx [%o1], %g1; \
4526 +- op %g1, %o0, %g7; \
4527 ++ asm_op %g1, %o0, %g7; \
4528 ++ post_op \
4529 + casx [%o1], %g1, %g7; \
4530 + cmp %g1, %g7; \
4531 + bne,pn %xcc, BACKOFF_LABEL(2f, 1b); \
4532 +@@ -80,6 +105,9 @@ ENTRY(atomic64_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \
4533 + 2: BACKOFF_SPIN(%o2, %o3, 1b); \
4534 + ENDPROC(atomic64_##op##_return);
4535 +
4536 ++#define ATOMIC64_OP_RETURN(op) __ATOMIC64_OP_RETURN(op, , op, ) \
4537 ++i __ATOMIC64_OP_RETURN(op, _unchecked, __REFCOUNT_OP(op), __OVERFLOW_XOP)
4538 ++
4539 + #define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_OP_RETURN(op)
4540 +
4541 + ATOMIC64_OPS(add)
4542 +@@ -87,7 +115,12 @@ ATOMIC64_OPS(sub)
4543 +
4544 + #undef ATOMIC64_OPS
4545 + #undef ATOMIC64_OP_RETURN
4546 ++#undef __ATOMIC64_OP_RETURN
4547 + #undef ATOMIC64_OP
4548 ++#undef __ATOMIC64_OP
4549 ++#undef __OVERFLOW_XOP
4550 ++#undef __OVERFLOW_IOP
4551 ++#undef __REFCOUNT_OP
4552 +
4553 + ENTRY(atomic64_dec_if_positive) /* %o0 = atomic_ptr */
4554 BACKOFF_SETUP(%o2)
4555 - 1: ldx [%o1], %g1
4556 -- sub %g1, %o0, %g7
4557 -+ subcc %g1, %o0, %g7
4558 -+
4559 -+#ifdef CONFIG_PAX_REFCOUNT
4560 -+ tvs %xcc, 6
4561 -+#endif
4562 -+
4563 - casx [%o1], %g1, %g7
4564 - cmp %g1, %g7
4565 - bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
4566 diff --git a/arch/sparc/lib/ksyms.c b/arch/sparc/lib/ksyms.c
4567 -index 323335b..ed85ea2 100644
4568 +index 1d649a9..fbc5bfc 100644
4569 --- a/arch/sparc/lib/ksyms.c
4570 +++ b/arch/sparc/lib/ksyms.c
4571 -@@ -100,12 +100,18 @@ EXPORT_SYMBOL(__clear_user);
4572 -
4573 +@@ -101,7 +101,9 @@ EXPORT_SYMBOL(__clear_user);
4574 /* Atomic counter implementation. */
4575 - EXPORT_SYMBOL(atomic_add);
4576 -+EXPORT_SYMBOL(atomic_add_unchecked);
4577 - EXPORT_SYMBOL(atomic_add_ret);
4578 + #define ATOMIC_OP(op) \
4579 + EXPORT_SYMBOL(atomic_##op); \
4580 +-EXPORT_SYMBOL(atomic64_##op);
4581 ++EXPORT_SYMBOL(atomic_##op##_unchecked); \
4582 ++EXPORT_SYMBOL(atomic64_##op); \
4583 ++EXPORT_SYMBOL(atomic64_##op##_unchecked);
4584 +
4585 + #define ATOMIC_OP_RETURN(op) \
4586 + EXPORT_SYMBOL(atomic_##op##_return); \
4587 +@@ -110,6 +112,8 @@ EXPORT_SYMBOL(atomic64_##op##_return);
4588 + #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op)
4589 +
4590 + ATOMIC_OPS(add)
4591 +EXPORT_SYMBOL(atomic_add_ret_unchecked);
4592 - EXPORT_SYMBOL(atomic_sub);
4593 -+EXPORT_SYMBOL(atomic_sub_unchecked);
4594 - EXPORT_SYMBOL(atomic_sub_ret);
4595 - EXPORT_SYMBOL(atomic64_add);
4596 -+EXPORT_SYMBOL(atomic64_add_unchecked);
4597 - EXPORT_SYMBOL(atomic64_add_ret);
4598 +EXPORT_SYMBOL(atomic64_add_ret_unchecked);
4599 - EXPORT_SYMBOL(atomic64_sub);
4600 -+EXPORT_SYMBOL(atomic64_sub_unchecked);
4601 - EXPORT_SYMBOL(atomic64_sub_ret);
4602 - EXPORT_SYMBOL(atomic64_dec_if_positive);
4603 + ATOMIC_OPS(sub)
4604
4605 + #undef ATOMIC_OPS
4606 diff --git a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile
4607 index 30c3ecc..736f015 100644
4608 --- a/arch/sparc/mm/Makefile
4609 @@ -13054,7 +12249,7 @@ index d329537..2c3746a 100644
4610
4611 pte_t *huge_pte_alloc(struct mm_struct *mm,
4612 diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
4613 -index 04bc826..0fefab9 100644
4614 +index 2d91c62..17a8fff 100644
4615 --- a/arch/sparc/mm/init_64.c
4616 +++ b/arch/sparc/mm/init_64.c
4617 @@ -186,9 +186,9 @@ unsigned long sparc64_kern_sec_context __read_mostly;
4618 @@ -13091,23 +12286,11 @@ index 04bc826..0fefab9 100644
4619 #endif /* CONFIG_SMP */
4620 #endif /* CONFIG_DEBUG_DCFLUSH */
4621 }
4622 -diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c
4623 -index ece4af0..f04b862 100644
4624 ---- a/arch/sparc/net/bpf_jit_comp.c
4625 -+++ b/arch/sparc/net/bpf_jit_comp.c
4626 -@@ -823,5 +823,6 @@ void bpf_jit_free(struct bpf_prog *fp)
4627 - {
4628 - if (fp->jited)
4629 - module_free(NULL, fp->bpf_func);
4630 -- kfree(fp);
4631 -+
4632 -+ bpf_prog_unlock_free(fp);
4633 - }
4634 diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
4635 -index 7fcd492..1311074 100644
4636 +index 7cca418..53fc030 100644
4637 --- a/arch/tile/Kconfig
4638 +++ b/arch/tile/Kconfig
4639 -@@ -191,6 +191,7 @@ source "kernel/Kconfig.hz"
4640 +@@ -192,6 +192,7 @@ source "kernel/Kconfig.hz"
4641
4642 config KEXEC
4643 bool "kexec system call"
4644 @@ -13308,10 +12491,10 @@ index ad8f795..2c7eec6 100644
4645 /*
4646 * Memory returned by kmalloc() may be used for DMA, so we must make
4647 diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
4648 -index 3632743..5cf7bff 100644
4649 +index 41a503c..cf98b04 100644
4650 --- a/arch/x86/Kconfig
4651 +++ b/arch/x86/Kconfig
4652 -@@ -130,7 +130,7 @@ config X86
4653 +@@ -129,7 +129,7 @@ config X86
4654 select RTC_LIB
4655 select HAVE_DEBUG_STACKOVERFLOW
4656 select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64
4657 @@ -13320,7 +12503,7 @@ index 3632743..5cf7bff 100644
4658 select GENERIC_CPU_AUTOPROBE
4659 select HAVE_ARCH_AUDITSYSCALL
4660 select ARCH_SUPPORTS_ATOMIC_RMW
4661 -@@ -258,7 +258,7 @@ config X86_HT
4662 +@@ -262,7 +262,7 @@ config X86_HT
4663
4664 config X86_32_LAZY_GS
4665 def_bool y
4666 @@ -13329,7 +12512,7 @@ index 3632743..5cf7bff 100644
4667
4668 config ARCH_HWEIGHT_CFLAGS
4669 string
4670 -@@ -555,6 +555,7 @@ config SCHED_OMIT_FRAME_POINTER
4671 +@@ -600,6 +600,7 @@ config SCHED_OMIT_FRAME_POINTER
4672
4673 menuconfig HYPERVISOR_GUEST
4674 bool "Linux guest support"
4675 @@ -13337,7 +12520,7 @@ index 3632743..5cf7bff 100644
4676 ---help---
4677 Say Y here to enable options for running Linux under various hyper-
4678 visors. This option enables basic hypervisor detection and platform
4679 -@@ -928,6 +929,7 @@ config VM86
4680 +@@ -973,6 +974,7 @@ config VM86
4681
4682 config X86_16BIT
4683 bool "Enable support for 16-bit segments" if EXPERT
4684 @@ -13345,7 +12528,7 @@ index 3632743..5cf7bff 100644
4685 default y
4686 ---help---
4687 This option is required by programs like Wine to run 16-bit
4688 -@@ -1083,6 +1085,7 @@ choice
4689 +@@ -1128,6 +1130,7 @@ choice
4690
4691 config NOHIGHMEM
4692 bool "off"
4693 @@ -13353,7 +12536,7 @@ index 3632743..5cf7bff 100644
4694 ---help---
4695 Linux can use up to 64 Gigabytes of physical memory on x86 systems.
4696 However, the address space of 32-bit x86 processors is only 4
4697 -@@ -1119,6 +1122,7 @@ config NOHIGHMEM
4698 +@@ -1164,6 +1167,7 @@ config NOHIGHMEM
4699
4700 config HIGHMEM4G
4701 bool "4GB"
4702 @@ -13361,7 +12544,7 @@ index 3632743..5cf7bff 100644
4703 ---help---
4704 Select this if you have a 32-bit processor and between 1 and 4
4705 gigabytes of physical RAM.
4706 -@@ -1171,7 +1175,7 @@ config PAGE_OFFSET
4707 +@@ -1216,7 +1220,7 @@ config PAGE_OFFSET
4708 hex
4709 default 0xB0000000 if VMSPLIT_3G_OPT
4710 default 0x80000000 if VMSPLIT_2G
4711 @@ -13370,7 +12553,7 @@ index 3632743..5cf7bff 100644
4712 default 0x40000000 if VMSPLIT_1G
4713 default 0xC0000000
4714 depends on X86_32
4715 -@@ -1586,6 +1590,7 @@ source kernel/Kconfig.hz
4716 +@@ -1631,6 +1635,7 @@ source kernel/Kconfig.hz
4717
4718 config KEXEC
4719 bool "kexec system call"
4720 @@ -13378,7 +12561,7 @@ index 3632743..5cf7bff 100644
4721 ---help---
4722 kexec is a system call that implements the ability to shutdown your
4723 current kernel, and to start another kernel. It is like a reboot
4724 -@@ -1771,7 +1776,9 @@ config X86_NEED_RELOCS
4725 +@@ -1816,7 +1821,9 @@ config X86_NEED_RELOCS
4726
4727 config PHYSICAL_ALIGN
4728 hex "Alignment value to which kernel should be aligned"
4729 @@ -13389,7 +12572,7 @@ index 3632743..5cf7bff 100644
4730 range 0x2000 0x1000000 if X86_32
4731 range 0x200000 0x1000000 if X86_64
4732 ---help---
4733 -@@ -1854,6 +1861,7 @@ config COMPAT_VDSO
4734 +@@ -1899,6 +1906,7 @@ config COMPAT_VDSO
4735 def_bool n
4736 prompt "Disable the 32-bit vDSO (needed for glibc 2.3.3)"
4737 depends on X86_32 || IA32_EMULATION
4738 @@ -13451,10 +12634,10 @@ index 61bd2ad..50b625d 100644
4739 This option helps catch unintended modifications to loadable
4740 kernel module's text and read-only data. It also prevents execution
4741 diff --git a/arch/x86/Makefile b/arch/x86/Makefile
4742 -index 60087ca..9d9500e 100644
4743 +index 920e616..ac3d4df 100644
4744 --- a/arch/x86/Makefile
4745 +++ b/arch/x86/Makefile
4746 -@@ -68,9 +68,6 @@ ifeq ($(CONFIG_X86_32),y)
4747 +@@ -65,9 +65,6 @@ ifeq ($(CONFIG_X86_32),y)
4748 # CPU-specific tuning. Anything which can be shared with UML should go here.
4749 include $(srctree)/arch/x86/Makefile_32.cpu
4750 KBUILD_CFLAGS += $(cflags-y)
4751 @@ -13464,7 +12647,7 @@ index 60087ca..9d9500e 100644
4752 else
4753 BITS := 64
4754 UTS_MACHINE := x86_64
4755 -@@ -111,6 +108,9 @@ else
4756 +@@ -107,6 +104,9 @@ else
4757 KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args)
4758 endif
4759
4760 @@ -13474,7 +12657,7 @@ index 60087ca..9d9500e 100644
4761 # Make sure compiler does not have buggy stack-protector support.
4762 ifdef CONFIG_CC_STACKPROTECTOR
4763 cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh
4764 -@@ -184,6 +184,7 @@ archheaders:
4765 +@@ -180,6 +180,7 @@ archheaders:
4766 $(Q)$(MAKE) $(build)=arch/x86/syscalls all
4767
4768 archprepare:
4769 @@ -13482,9 +12665,9 @@ index 60087ca..9d9500e 100644
4770 ifeq ($(CONFIG_KEXEC_FILE),y)
4771 $(Q)$(MAKE) $(build)=arch/x86/purgatory arch/x86/purgatory/kexec-purgatory.c
4772 endif
4773 -@@ -274,3 +275,9 @@ define archhelp
4774 +@@ -263,3 +264,9 @@ define archhelp
4775 + echo ' FDARGS="..." arguments for the booted kernel'
4776 echo ' FDINITRD=file initrd for the booted kernel'
4777 - echo ' kvmconfig - Enable additional options for guest kernel support'
4778 endef
4779 +
4780 +define OLD_LD
4781 @@ -13493,10 +12676,10 @@ index 60087ca..9d9500e 100644
4782 +*** Please upgrade your binutils to 2.18 or newer
4783 +endef
4784 diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
4785 -index dbe8dd2..2f0a98f 100644
4786 +index 5b016e2..04ef69c 100644
4787 --- a/arch/x86/boot/Makefile
4788 +++ b/arch/x86/boot/Makefile
4789 -@@ -52,6 +52,9 @@ $(obj)/cpustr.h: $(obj)/mkcpustr FORCE
4790 +@@ -55,6 +55,9 @@ endif
4791 # ---------------------------------------------------------------------------
4792
4793 KBUILD_CFLAGS := $(USERINCLUDE) $(REALMODE_CFLAGS) -D_SETUP
4794 @@ -13542,7 +12725,7 @@ index bd49ec6..94c7f58 100644
4795 }
4796
4797 diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
4798 -index b5bb498..74110e8 100644
4799 +index 45abc36..97bea2d 100644
4800 --- a/arch/x86/boot/compressed/Makefile
4801 +++ b/arch/x86/boot/compressed/Makefile
4802 @@ -16,6 +16,9 @@ KBUILD_CFLAGS += $(cflags-y)
4803 @@ -15364,7 +14547,7 @@ index a039d21..524b8b2 100644
4804 ret
4805 ENDPROC(twofish_dec_blk)
4806 diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c
4807 -index d21ff89..6da8e6e 100644
4808 +index df91466..74b31cb 100644
4809 --- a/arch/x86/ia32/ia32_aout.c
4810 +++ b/arch/x86/ia32/ia32_aout.c
4811 @@ -153,6 +153,8 @@ static int aout_core_dump(struct coredump_params *cprm)
4812 @@ -15454,7 +14637,7 @@ index f9e181a..300544c 100644
4813
4814 err |= copy_siginfo_to_user32(&frame->info, &ksig->info);
4815 diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
4816 -index 92a2e93..cd4d95f 100644
4817 +index ffe7122..899bad3 100644
4818 --- a/arch/x86/ia32/ia32entry.S
4819 +++ b/arch/x86/ia32/ia32entry.S
4820 @@ -15,8 +15,10 @@
4821 @@ -15618,8 +14801,8 @@ index 92a2e93..cd4d95f 100644
4822 RESTORE_ARGS 0,24,0,0,0,0
4823 xorq %r8,%r8
4824 @@ -205,6 +254,9 @@ sysexit_from_sys_call:
4825 - movl %eax,%esi /* 2nd arg: syscall number */
4826 - movl $AUDIT_ARCH_I386,%edi /* 1st arg: audit arch */
4827 + movl %ebx,%esi /* 2nd arg: 1st syscall arg */
4828 + movl %eax,%edi /* 1st arg: syscall number */
4829 call __audit_syscall_entry
4830 +
4831 + pax_erase_kstack
4832 @@ -15941,18 +15124,13 @@ index 20370c6..a2eb9b0 100644
4833 "popl %%ebp\n\t"
4834 "popl %%edi\n\t"
4835 diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h
4836 -index 6dd1c7dd..5a85bf2 100644
4837 +index 5e5cd12..3d18208 100644
4838 --- a/arch/x86/include/asm/atomic.h
4839 +++ b/arch/x86/include/asm/atomic.h
4840 -@@ -24,7 +24,18 @@
4841 - */
4842 - static inline int atomic_read(const atomic_t *v)
4843 - {
4844 -- return (*(volatile int *)&(v)->counter);
4845 -+ return (*(volatile const int *)&(v)->counter);
4846 -+}
4847 -+
4848 -+/**
4849 +@@ -28,6 +28,17 @@ static inline int atomic_read(const atomic_t *v)
4850 + }
4851 +
4852 + /**
4853 + * atomic_read_unchecked - read atomic variable
4854 + * @v: pointer of type atomic_unchecked_t
4855 + *
4856 @@ -15960,10 +15138,13 @@ index 6dd1c7dd..5a85bf2 100644
4857 + */
4858 +static inline int __intentional_overflow(-1) atomic_read_unchecked(const atomic_unchecked_t *v)
4859 +{
4860 -+ return (*(volatile const int *)&(v)->counter);
4861 - }
4862 -
4863 - /**
4864 ++ return ACCESS_ONCE((v)->counter);
4865 ++}
4866 ++
4867 ++/**
4868 + * atomic_set - set atomic variable
4869 + * @v: pointer of type atomic_t
4870 + * @i: required value
4871 @@ -40,6 +51,18 @@ static inline void atomic_set(atomic_t *v, int i)
4872 }
4873
4874 @@ -16294,8 +15475,8 @@ index 6dd1c7dd..5a85bf2 100644
4875 * atomic_inc_short - increment of a short integer
4876 * @v: pointer to type int
4877 *
4878 -@@ -235,14 +437,37 @@ static inline void atomic_or_long(unsigned long *v1, unsigned long v2)
4879 - #endif
4880 +@@ -220,14 +422,37 @@ static inline short int atomic_inc_short(short int *v)
4881 + }
4882
4883 /* These are x86-specific, used by some header files */
4884 -#define atomic_clear_mask(mask, addr) \
4885 @@ -16515,18 +15696,13 @@ index b154de7..bf18a5a 100644
4886 * @i: integer value to subtract
4887 * @v: pointer to type atomic64_t
4888 diff --git a/arch/x86/include/asm/atomic64_64.h b/arch/x86/include/asm/atomic64_64.h
4889 -index 46e9052..ae45136 100644
4890 +index f8d273e..02f39f3 100644
4891 --- a/arch/x86/include/asm/atomic64_64.h
4892 +++ b/arch/x86/include/asm/atomic64_64.h
4893 -@@ -18,7 +18,19 @@
4894 - */
4895 - static inline long atomic64_read(const atomic64_t *v)
4896 - {
4897 -- return (*(volatile long *)&(v)->counter);
4898 -+ return (*(volatile const long *)&(v)->counter);
4899 -+}
4900 -+
4901 -+/**
4902 +@@ -22,6 +22,18 @@ static inline long atomic64_read(const atomic64_t *v)
4903 + }
4904 +
4905 + /**
4906 + * atomic64_read_unchecked - read atomic64 variable
4907 + * @v: pointer of type atomic64_unchecked_t
4908 + *
4909 @@ -16535,10 +15711,13 @@ index 46e9052..ae45136 100644
4910 + */
4911 +static inline long __intentional_overflow(-1) atomic64_read_unchecked(const atomic64_unchecked_t *v)
4912 +{
4913 -+ return (*(volatile const long *)&(v)->counter);
4914 - }
4915 -
4916 - /**
4917 ++ return ACCESS_ONCE((v)->counter);
4918 ++}
4919 ++
4920 ++/**
4921 + * atomic64_set - set atomic64 variable
4922 + * @v: pointer to type atomic64_t
4923 + * @i: required value
4924 @@ -34,6 +46,18 @@ static inline void atomic64_set(atomic64_t *v, long i)
4925 }
4926
4927 @@ -16951,10 +16130,10 @@ index 9863ee3..4a1f8e1 100644
4928 return _PAGE_CACHE_WC;
4929 else if (pg_flags == _PGMT_UC_MINUS)
4930 diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h
4931 -index cb4c73b..c473c29 100644
4932 +index 76659b6..6e0b30a 100644
4933 --- a/arch/x86/include/asm/calling.h
4934 +++ b/arch/x86/include/asm/calling.h
4935 -@@ -82,103 +82,113 @@ For 32-bit we have the following conventions - kernel is built with
4936 +@@ -82,107 +82,117 @@ For 32-bit we have the following conventions - kernel is built with
4937 #define RSP 152
4938 #define SS 160
4939
4940 @@ -16962,7 +16141,7 @@ index cb4c73b..c473c29 100644
4941 -#define SWFRAME ORIG_RAX
4942 +#define ARGOFFSET R15
4943
4944 - .macro SAVE_ARGS addskip=0, save_rcx=1, save_r891011=1
4945 + .macro SAVE_ARGS addskip=0, save_rcx=1, save_r891011=1, rax_enosys=0
4946 - subq $9*8+\addskip, %rsp
4947 - CFI_ADJUST_CFA_OFFSET 9*8+\addskip
4948 - movq_cfi rdi, 8*8
4949 @@ -16979,8 +16158,13 @@ index cb4c73b..c473c29 100644
4950 + movq_cfi rcx, RCX
4951 .endif
4952
4953 + .if \rax_enosys
4954 +- movq $-ENOSYS, 4*8(%rsp)
4955 ++ movq $-ENOSYS, RAX(%rsp)
4956 + .else
4957 - movq_cfi rax, 4*8
4958 + movq_cfi rax, RAX
4959 + .endif
4960
4961 .if \save_r891011
4962 - movq_cfi r8, 3*8
4963 @@ -17239,10 +16423,10 @@ index 59c6c40..5e0b22c 100644
4964 struct compat_timespec {
4965 compat_time_t tv_sec;
4966 diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
4967 -index 2075e6c..4d368b4 100644
4968 +index 0bb1335..8f1aec7 100644
4969 --- a/arch/x86/include/asm/cpufeature.h
4970 +++ b/arch/x86/include/asm/cpufeature.h
4971 -@@ -203,7 +203,7 @@
4972 +@@ -207,7 +207,7 @@
4973 #define X86_FEATURE_PAUSEFILTER ( 8*32+13) /* AMD filtered pause intercept */
4974 #define X86_FEATURE_PFTHRESHOLD ( 8*32+14) /* AMD pause filter threshold */
4975 #define X86_FEATURE_VMMCALL ( 8*32+15) /* Prefer vmmcall to vmcall */
4976 @@ -17251,7 +16435,7 @@ index 2075e6c..4d368b4 100644
4977
4978 /* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */
4979 #define X86_FEATURE_FSGSBASE ( 9*32+ 0) /* {RD/WR}{FS/GS}BASE instructions*/
4980 -@@ -211,7 +211,7 @@
4981 +@@ -215,7 +215,7 @@
4982 #define X86_FEATURE_BMI1 ( 9*32+ 3) /* 1st group bit manipulation extensions */
4983 #define X86_FEATURE_HLE ( 9*32+ 4) /* Hardware Lock Elision */
4984 #define X86_FEATURE_AVX2 ( 9*32+ 5) /* AVX2 instructions */
4985 @@ -17260,15 +16444,15 @@ index 2075e6c..4d368b4 100644
4986 #define X86_FEATURE_BMI2 ( 9*32+ 8) /* 2nd group bit manipulation extensions */
4987 #define X86_FEATURE_ERMS ( 9*32+ 9) /* Enhanced REP MOVSB/STOSB */
4988 #define X86_FEATURE_INVPCID ( 9*32+10) /* Invalidate Processor Context ID */
4989 -@@ -371,6 +371,7 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
4990 - #undef cpu_has_centaur_mcr
4991 - #define cpu_has_centaur_mcr 0
4992 -
4993 +@@ -383,6 +383,7 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
4994 + #define cpu_has_cx16 boot_cpu_has(X86_FEATURE_CX16)
4995 + #define cpu_has_eager_fpu boot_cpu_has(X86_FEATURE_EAGER_FPU)
4996 + #define cpu_has_topoext boot_cpu_has(X86_FEATURE_TOPOEXT)
4997 +#define cpu_has_pcid boot_cpu_has(X86_FEATURE_PCID)
4998 - #endif /* CONFIG_X86_64 */
4999
5000 #if __GNUC__ >= 4
5001 -@@ -423,7 +424,8 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
5002 + extern void warn_pre_alternatives(void);
5003 +@@ -434,7 +435,8 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
5004
5005 #ifdef CONFIG_X86_DEBUG_STATIC_CPU_HAS
5006 t_warn:
5007 @@ -17278,7 +16462,7 @@ index 2075e6c..4d368b4 100644
5008 return false;
5009 #endif
5010
5011 -@@ -443,7 +445,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
5012 +@@ -454,7 +456,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
5013 ".section .discard,\"aw\",@progbits\n"
5014 " .byte 0xff + (4f-3f) - (2b-1b)\n" /* size check */
5015 ".previous\n"
5016 @@ -17287,7 +16471,7 @@ index 2075e6c..4d368b4 100644
5017 "3: movb $1,%0\n"
5018 "4:\n"
5019 ".previous\n"
5020 -@@ -480,7 +482,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
5021 +@@ -491,7 +493,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
5022 " .byte 2b - 1b\n" /* src len */
5023 " .byte 4f - 3f\n" /* repl len */
5024 ".previous\n"
5025 @@ -17296,7 +16480,7 @@ index 2075e6c..4d368b4 100644
5026 "3: .byte 0xe9\n .long %l[t_no] - 2b\n"
5027 "4:\n"
5028 ".previous\n"
5029 -@@ -513,7 +515,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
5030 +@@ -524,7 +526,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
5031 ".section .discard,\"aw\",@progbits\n"
5032 " .byte 0xff + (4f-3f) - (2b-1b)\n" /* size check */
5033 ".previous\n"
5034 @@ -17305,7 +16489,7 @@ index 2075e6c..4d368b4 100644
5035 "3: movb $0,%0\n"
5036 "4:\n"
5037 ".previous\n"
5038 -@@ -527,7 +529,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
5039 +@@ -538,7 +540,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
5040 ".section .discard,\"aw\",@progbits\n"
5041 " .byte 0xff + (6f-5f) - (4b-3b)\n" /* size check */
5042 ".previous\n"
5043 @@ -17701,7 +16885,7 @@ index 1c7eefe..d0e4702 100644
5044 };
5045
5046 diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h
5047 -index 412ecec..c1ea43a 100644
5048 +index e97622f..d0ba77a 100644
5049 --- a/arch/x86/include/asm/fpu-internal.h
5050 +++ b/arch/x86/include/asm/fpu-internal.h
5051 @@ -124,8 +124,11 @@ static inline void sanitize_i387_state(struct task_struct *tsk)
5052 @@ -17900,10 +17084,10 @@ index 0a8b519..80e7d5b 100644
5053 #define INTERRUPT_RETURN iret
5054 #define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
5055 diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
5056 -index 53cdfb2..d1369e6 100644
5057 +index 4421b5d..8543006 100644
5058 --- a/arch/x86/include/asm/kprobes.h
5059 +++ b/arch/x86/include/asm/kprobes.h
5060 -@@ -38,13 +38,8 @@ typedef u8 kprobe_opcode_t;
5061 +@@ -37,13 +37,8 @@ typedef u8 kprobe_opcode_t;
5062 #define RELATIVEJUMP_SIZE 5
5063 #define RELATIVECALL_OPCODE 0xe8
5064 #define RELATIVE_ADDR_SIZE 4
5065 @@ -17920,7 +17104,7 @@ index 53cdfb2..d1369e6 100644
5066 #define flush_insn_slot(p) do { } while (0)
5067
5068 diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
5069 -index 0d47ae1..b0e3ee1 100644
5070 +index 6ed0c30..74fb6c3 100644
5071 --- a/arch/x86/include/asm/kvm_host.h
5072 +++ b/arch/x86/include/asm/kvm_host.h
5073 @@ -51,6 +51,7 @@
5074 @@ -18982,7 +18166,7 @@ index aa97a07..5c53c32 100644
5075 static inline int page_level_shift(enum pg_level level)
5076 {
5077 diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
5078 -index 9ee3221..b979c6b 100644
5079 +index b6c0b40..3535d47 100644
5080 --- a/arch/x86/include/asm/pgtable_32.h
5081 +++ b/arch/x86/include/asm/pgtable_32.h
5082 @@ -25,9 +25,6 @@
5083 @@ -18995,7 +18179,7 @@ index 9ee3221..b979c6b 100644
5084 static inline void pgtable_cache_init(void) { }
5085 static inline void check_pgt_cache(void) { }
5086 void paging_init(void);
5087 -@@ -48,6 +45,12 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
5088 +@@ -45,6 +42,12 @@ void paging_init(void);
5089 # include <asm/pgtable-2level.h>
5090 #endif
5091
5092 @@ -19008,7 +18192,7 @@ index 9ee3221..b979c6b 100644
5093 #if defined(CONFIG_HIGHPTE)
5094 #define pte_offset_map(dir, address) \
5095 ((pte_t *)kmap_atomic(pmd_page(*(dir))) + \
5096 -@@ -62,12 +65,17 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
5097 +@@ -59,12 +62,17 @@ void paging_init(void);
5098 /* Clear a kernel PTE and flush it from the TLB */
5099 #define kpte_clear_flush(ptep, vaddr) \
5100 do { \
5101 @@ -19060,7 +18244,7 @@ index ed5903b..c7fe163 100644
5102 #define MODULES_END VMALLOC_END
5103 #define MODULES_LEN (MODULES_VADDR - MODULES_END)
5104 diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
5105 -index 3874693..d7906ac 100644
5106 +index 4572b2f..4430113 100644
5107 --- a/arch/x86/include/asm/pgtable_64.h
5108 +++ b/arch/x86/include/asm/pgtable_64.h
5109 @@ -16,11 +16,16 @@
5110 @@ -19136,10 +18320,10 @@ index 7166e25..baaa6fe 100644
5111
5112 #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
5113 diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
5114 -index f216963..6bd7c21 100644
5115 +index 0778964..0e94758 100644
5116 --- a/arch/x86/include/asm/pgtable_types.h
5117 +++ b/arch/x86/include/asm/pgtable_types.h
5118 -@@ -111,8 +111,10 @@
5119 +@@ -110,8 +110,10 @@
5120
5121 #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
5122 #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
5123 @@ -19151,7 +18335,7 @@ index f216963..6bd7c21 100644
5124 #endif
5125
5126 #define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE)
5127 -@@ -151,6 +153,9 @@
5128 +@@ -150,6 +152,9 @@
5129 #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
5130 _PAGE_ACCESSED)
5131
5132 @@ -19161,7 +18345,7 @@ index f216963..6bd7c21 100644
5133 #define __PAGE_KERNEL_EXEC \
5134 (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
5135 #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
5136 -@@ -161,7 +166,7 @@
5137 +@@ -160,7 +165,7 @@
5138 #define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC)
5139 #define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT)
5140 #define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD)
5141 @@ -19170,7 +18354,7 @@ index f216963..6bd7c21 100644
5142 #define __PAGE_KERNEL_VVAR (__PAGE_KERNEL_RO | _PAGE_USER)
5143 #define __PAGE_KERNEL_VVAR_NOCACHE (__PAGE_KERNEL_VVAR | _PAGE_PCD | _PAGE_PWT)
5144 #define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
5145 -@@ -218,7 +223,7 @@
5146 +@@ -217,7 +222,7 @@
5147 #ifdef CONFIG_X86_64
5148 #define __PAGE_KERNEL_IDENT_LARGE_EXEC __PAGE_KERNEL_LARGE_EXEC
5149 #else
5150 @@ -19179,7 +18363,7 @@ index f216963..6bd7c21 100644
5151 #define PDE_IDENT_ATTR 0x063 /* PRESENT+RW+DIRTY+ACCESSED */
5152 #define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
5153 #endif
5154 -@@ -257,7 +262,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd)
5155 +@@ -256,7 +261,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd)
5156 {
5157 return native_pgd_val(pgd) & PTE_FLAGS_MASK;
5158 }
5159 @@ -19197,7 +18381,7 @@ index f216963..6bd7c21 100644
5160 #if PAGETABLE_LEVELS > 3
5161 typedef struct { pudval_t pud; } pud_t;
5162
5163 -@@ -271,8 +286,6 @@ static inline pudval_t native_pud_val(pud_t pud)
5164 +@@ -270,8 +285,6 @@ static inline pudval_t native_pud_val(pud_t pud)
5165 return pud.pud;
5166 }
5167 #else
5168 @@ -19206,7 +18390,7 @@ index f216963..6bd7c21 100644
5169 static inline pudval_t native_pud_val(pud_t pud)
5170 {
5171 return native_pgd_val(pud.pgd);
5172 -@@ -292,8 +305,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
5173 +@@ -291,8 +304,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
5174 return pmd.pmd;
5175 }
5176 #else
5177 @@ -19215,7 +18399,7 @@ index f216963..6bd7c21 100644
5178 static inline pmdval_t native_pmd_val(pmd_t pmd)
5179 {
5180 return native_pgd_val(pmd.pud.pgd);
5181 -@@ -333,7 +344,6 @@ typedef struct page *pgtable_t;
5182 +@@ -346,7 +357,6 @@ typedef struct page *pgtable_t;
5183
5184 extern pteval_t __supported_pte_mask;
5185 extern void set_nx(void);
5186 @@ -19224,7 +18408,7 @@ index f216963..6bd7c21 100644
5187 #define pgprot_writecombine pgprot_writecombine
5188 extern pgprot_t pgprot_writecombine(pgprot_t prot);
5189 diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h
5190 -index 7024c12..71c46b9 100644
5191 +index 4008734..48f0d81 100644
5192 --- a/arch/x86/include/asm/preempt.h
5193 +++ b/arch/x86/include/asm/preempt.h
5194 @@ -87,7 +87,7 @@ static __always_inline void __preempt_count_sub(int val)
5195 @@ -19432,10 +18616,10 @@ index eb71ec7..f06532a 100644
5196 void df_debug(struct pt_regs *regs, long error_code);
5197 #endif /* _ASM_X86_PROCESSOR_H */
5198 diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
5199 -index 6205f0c..688a3a9 100644
5200 +index 86fc2bb..bd5049a 100644
5201 --- a/arch/x86/include/asm/ptrace.h
5202 +++ b/arch/x86/include/asm/ptrace.h
5203 -@@ -84,28 +84,29 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
5204 +@@ -89,28 +89,29 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
5205 }
5206
5207 /*
5208 @@ -19471,7 +18655,7 @@ index 6205f0c..688a3a9 100644
5209 #endif
5210 }
5211
5212 -@@ -121,15 +122,16 @@ static inline int v8086_mode(struct pt_regs *regs)
5213 +@@ -126,15 +127,16 @@ static inline int v8086_mode(struct pt_regs *regs)
5214 #ifdef CONFIG_X86_64
5215 static inline bool user_64bit_mode(struct pt_regs *regs)
5216 {
5217 @@ -19490,7 +18674,7 @@ index 6205f0c..688a3a9 100644
5218 #endif
5219 }
5220
5221 -@@ -180,9 +182,11 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
5222 +@@ -185,9 +187,11 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
5223 * Traps from the kernel do not save sp and ss.
5224 * Use the helper function to retrieve sp.
5225 */
5226 @@ -19989,7 +19173,7 @@ index 8d3120f..352b440 100644
5227
5228 static __always_inline void clac(void)
5229 diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
5230 -index 8cd27e0..7f05ec8 100644
5231 +index 8cd1cc3..827e09e 100644
5232 --- a/arch/x86/include/asm/smp.h
5233 +++ b/arch/x86/include/asm/smp.h
5234 @@ -35,7 +35,7 @@ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map);
5235 @@ -20010,7 +19194,7 @@ index 8cd27e0..7f05ec8 100644
5236
5237 /* Globals due to paravirt */
5238 extern void set_cpu_sibling_map(int cpu);
5239 -@@ -190,14 +190,8 @@ extern unsigned disabled_cpus;
5240 +@@ -191,14 +191,8 @@ extern unsigned disabled_cpus;
5241 extern int safe_smp_processor_id(void);
5242
5243 #elif defined(CONFIG_X86_64_SMP)
5244 @@ -20027,72 +19211,6 @@ index 8cd27e0..7f05ec8 100644
5245 #define safe_smp_processor_id() smp_processor_id()
5246
5247 #endif
5248 -diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
5249 -index 54f1c80..39362a5 100644
5250 ---- a/arch/x86/include/asm/spinlock.h
5251 -+++ b/arch/x86/include/asm/spinlock.h
5252 -@@ -223,6 +223,14 @@ static inline int arch_write_can_lock(arch_rwlock_t *lock)
5253 - static inline void arch_read_lock(arch_rwlock_t *rw)
5254 - {
5255 - asm volatile(LOCK_PREFIX READ_LOCK_SIZE(dec) " (%0)\n\t"
5256 -+
5257 -+#ifdef CONFIG_PAX_REFCOUNT
5258 -+ "jno 0f\n"
5259 -+ LOCK_PREFIX READ_LOCK_SIZE(inc) " (%0)\n"
5260 -+ "int $4\n0:\n"
5261 -+ _ASM_EXTABLE(0b, 0b)
5262 -+#endif
5263 -+
5264 - "jns 1f\n"
5265 - "call __read_lock_failed\n\t"
5266 - "1:\n"
5267 -@@ -232,6 +240,14 @@ static inline void arch_read_lock(arch_rwlock_t *rw)
5268 - static inline void arch_write_lock(arch_rwlock_t *rw)
5269 - {
5270 - asm volatile(LOCK_PREFIX WRITE_LOCK_SUB(%1) "(%0)\n\t"
5271 -+
5272 -+#ifdef CONFIG_PAX_REFCOUNT
5273 -+ "jno 0f\n"
5274 -+ LOCK_PREFIX WRITE_LOCK_ADD(%1) "(%0)\n"
5275 -+ "int $4\n0:\n"
5276 -+ _ASM_EXTABLE(0b, 0b)
5277 -+#endif
5278 -+
5279 - "jz 1f\n"
5280 - "call __write_lock_failed\n\t"
5281 - "1:\n"
5282 -@@ -261,13 +277,29 @@ static inline int arch_write_trylock(arch_rwlock_t *lock)
5283 -
5284 - static inline void arch_read_unlock(arch_rwlock_t *rw)
5285 - {
5286 -- asm volatile(LOCK_PREFIX READ_LOCK_SIZE(inc) " %0"
5287 -+ asm volatile(LOCK_PREFIX READ_LOCK_SIZE(inc) " %0\n"
5288 -+
5289 -+#ifdef CONFIG_PAX_REFCOUNT
5290 -+ "jno 0f\n"
5291 -+ LOCK_PREFIX READ_LOCK_SIZE(dec) " %0\n"
5292 -+ "int $4\n0:\n"
5293 -+ _ASM_EXTABLE(0b, 0b)
5294 -+#endif
5295 -+
5296 - :"+m" (rw->lock) : : "memory");
5297 - }
5298 -
5299 - static inline void arch_write_unlock(arch_rwlock_t *rw)
5300 - {
5301 -- asm volatile(LOCK_PREFIX WRITE_LOCK_ADD(%1) "%0"
5302 -+ asm volatile(LOCK_PREFIX WRITE_LOCK_ADD(%1) "%0\n"
5303 -+
5304 -+#ifdef CONFIG_PAX_REFCOUNT
5305 -+ "jno 0f\n"
5306 -+ LOCK_PREFIX WRITE_LOCK_SUB(%1) "%0\n"
5307 -+ "int $4\n0:\n"
5308 -+ _ASM_EXTABLE(0b, 0b)
5309 -+#endif
5310 -+
5311 - : "+m" (rw->write) : "i" (RW_LOCK_BIAS) : "memory");
5312 - }
5313 - #else
5314 diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h
5315 index 6a99859..03cb807 100644
5316 --- a/arch/x86/include/asm/stackprotector.h
5317 @@ -21390,10 +20508,10 @@ index 7e7a79a..0824666 100644
5318 }
5319
5320 diff --git a/arch/x86/include/uapi/asm/e820.h b/arch/x86/include/uapi/asm/e820.h
5321 -index bbae024..e1528f9 100644
5322 +index d993e33..8db1b18 100644
5323 --- a/arch/x86/include/uapi/asm/e820.h
5324 +++ b/arch/x86/include/uapi/asm/e820.h
5325 -@@ -63,7 +63,7 @@ struct e820map {
5326 +@@ -58,7 +58,7 @@ struct e820map {
5327 #define ISA_START_ADDRESS 0xa0000
5328 #define ISA_END_ADDRESS 0x100000
5329
5330 @@ -21433,7 +20551,7 @@ index 7b0a55a..ad115bf 100644
5331
5332 /* top of stack page */
5333 diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
5334 -index ada2e2d..ca69e16 100644
5335 +index 8f1e774..9b4c381 100644
5336 --- a/arch/x86/kernel/Makefile
5337 +++ b/arch/x86/kernel/Makefile
5338 @@ -24,7 +24,7 @@ obj-y += time.o ioport.o ldt.o dumpstack.o nmi.o
5339 @@ -21672,7 +20790,7 @@ index 703130f..27a155d 100644
5340 bp_int3_handler = handler;
5341 bp_int3_addr = (u8 *)addr + sizeof(int3);
5342 diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
5343 -index 24b5894..6d9701b 100644
5344 +index ba6cc04..06fd971 100644
5345 --- a/arch/x86/kernel/apic/apic.c
5346 +++ b/arch/x86/kernel/apic/apic.c
5347 @@ -201,7 +201,7 @@ int first_system_vector = 0xfe;
5348 @@ -21742,7 +20860,7 @@ index c4a8d63..fe893ac 100644
5349 .name = "bigsmp",
5350 .probe = probe_bigsmp,
5351 diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
5352 -index 337ce5a..c8d98b4 100644
5353 +index 1183d54..6158e47 100644
5354 --- a/arch/x86/kernel/apic/io_apic.c
5355 +++ b/arch/x86/kernel/apic/io_apic.c
5356 @@ -1230,7 +1230,7 @@ out:
5357 @@ -21795,7 +20913,7 @@ index bda4886..f9c7195 100644
5358 .name = "default",
5359 .probe = probe_default,
5360 diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
5361 -index 6ce600f..cb44af8 100644
5362 +index e658f21..b695a1a 100644
5363 --- a/arch/x86/kernel/apic/x2apic_cluster.c
5364 +++ b/arch/x86/kernel/apic/x2apic_cluster.c
5365 @@ -182,7 +182,7 @@ update_clusterinfo(struct notifier_block *nfb, unsigned long action, void *hcpu)
5366 @@ -21830,10 +20948,10 @@ index 6fae733..5ca17af 100644
5367 .name = "physical x2apic",
5368 .probe = x2apic_phys_probe,
5369 diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
5370 -index 004f017..8fbc8b5 100644
5371 +index 8e9dcfd..c61b3e4 100644
5372 --- a/arch/x86/kernel/apic/x2apic_uv_x.c
5373 +++ b/arch/x86/kernel/apic/x2apic_uv_x.c
5374 -@@ -350,7 +350,7 @@ static int uv_probe(void)
5375 +@@ -348,7 +348,7 @@ static int uv_probe(void)
5376 return apic == &apic_x2apic_uv_x;
5377 }
5378
5379 @@ -21970,7 +21088,7 @@ index e7c798b..2b2019b 100644
5380 BLANK();
5381
5382 diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
5383 -index 7fd54f0..0691410 100644
5384 +index e27b49d..85b106c 100644
5385 --- a/arch/x86/kernel/cpu/Makefile
5386 +++ b/arch/x86/kernel/cpu/Makefile
5387 @@ -8,10 +8,6 @@ CFLAGS_REMOVE_common.o = -pg
5388 @@ -21982,7 +21100,7 @@ index 7fd54f0..0691410 100644
5389 -CFLAGS_common.o := $(nostackp)
5390 -
5391 obj-y := intel_cacheinfo.o scattered.o topology.o
5392 - obj-y += proc.o capflags.o powerflags.o common.o
5393 + obj-y += common.o
5394 obj-y += rdrand.o
5395 diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
5396 index 813d29d..6e542d4 100644
5397 @@ -21998,7 +21116,7 @@ index 813d29d..6e542d4 100644
5398 if (c->x86_model == 3 && c->x86_mask == 0)
5399 size = 64;
5400 diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
5401 -index 35db56b..256e87c 100644
5402 +index cfa9b5b..19b5084 100644
5403 --- a/arch/x86/kernel/cpu/common.c
5404 +++ b/arch/x86/kernel/cpu/common.c
5405 @@ -90,60 +90,6 @@ static const struct cpu_dev default_cpu = {
5406 @@ -22153,7 +21271,7 @@ index 35db56b..256e87c 100644
5407 /* If the model name is still unset, do table lookup. */
5408 if (!c->x86_model_id[0]) {
5409 const char *p;
5410 -@@ -983,7 +990,7 @@ static void syscall32_cpu_init(void)
5411 +@@ -985,7 +992,7 @@ static void syscall32_cpu_init(void)
5412 void enable_sep_cpu(void)
5413 {
5414 int cpu = get_cpu();
5415 @@ -22162,7 +21280,7 @@ index 35db56b..256e87c 100644
5416
5417 if (!boot_cpu_has(X86_FEATURE_SEP)) {
5418 put_cpu();
5419 -@@ -1123,14 +1130,16 @@ static __init int setup_disablecpuid(char *arg)
5420 +@@ -1125,14 +1132,16 @@ static __init int setup_disablecpuid(char *arg)
5421 }
5422 __setup("clearcpuid=", setup_disablecpuid);
5423
5424 @@ -22183,16 +21301,16 @@ index 35db56b..256e87c 100644
5425
5426 DEFINE_PER_CPU_FIRST(union irq_stack_union,
5427 irq_stack_union) __aligned(PAGE_SIZE) __visible;
5428 -@@ -1293,7 +1302,7 @@ void cpu_init(void)
5429 +@@ -1309,7 +1318,7 @@ void cpu_init(void)
5430 + */
5431 load_ucode_ap();
5432
5433 - cpu = stack_smp_processor_id();
5434 - t = &per_cpu(init_tss, cpu);
5435 + t = init_tss + cpu;
5436 oist = &per_cpu(orig_ist, cpu);
5437
5438 #ifdef CONFIG_NUMA
5439 -@@ -1328,7 +1337,6 @@ void cpu_init(void)
5440 +@@ -1341,7 +1350,6 @@ void cpu_init(void)
5441 wrmsrl(MSR_KERNEL_GS_BASE, 0);
5442 barrier();
5443
5444 @@ -22200,7 +21318,7 @@ index 35db56b..256e87c 100644
5445 enable_x2apic();
5446
5447 /*
5448 -@@ -1380,7 +1388,7 @@ void cpu_init(void)
5449 +@@ -1393,7 +1401,7 @@ void cpu_init(void)
5450 {
5451 int cpu = smp_processor_id();
5452 struct task_struct *curr = current;
5453 @@ -22208,7 +21326,7 @@ index 35db56b..256e87c 100644
5454 + struct tss_struct *t = init_tss + cpu;
5455 struct thread_struct *thread = &curr->thread;
5456
5457 - show_ucode_info_early();
5458 + wait_for_master_cpu(cpu);
5459 diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
5460 index c703507..28535e3 100644
5461 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c
5462 @@ -22301,7 +21419,7 @@ index c703507..28535e3 100644
5463 "index%1lu", i);
5464 if (unlikely(retval)) {
5465 diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
5466 -index bd9ccda..38314e7 100644
5467 +index 61a9668ce..b446a37 100644
5468 --- a/arch/x86/kernel/cpu/mcheck/mce.c
5469 +++ b/arch/x86/kernel/cpu/mcheck/mce.c
5470 @@ -45,6 +45,7 @@
5471 @@ -22488,10 +21606,10 @@ index 7dc5564..1273569 100644
5472 wmb();
5473
5474 diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
5475 -index dd9d619..86e1d81 100644
5476 +index 08fe6e8..35885b0 100644
5477 --- a/arch/x86/kernel/cpu/microcode/core.c
5478 +++ b/arch/x86/kernel/cpu/microcode/core.c
5479 -@@ -516,7 +516,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
5480 +@@ -526,7 +526,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
5481 return NOTIFY_OK;
5482 }
5483
5484 @@ -22501,7 +21619,7 @@ index dd9d619..86e1d81 100644
5485 };
5486
5487 diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
5488 -index a276fa7..e66810f 100644
5489 +index c6826d1..ad18e14a 100644
5490 --- a/arch/x86/kernel/cpu/microcode/intel.c
5491 +++ b/arch/x86/kernel/cpu/microcode/intel.c
5492 @@ -293,13 +293,13 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
5493 @@ -22521,7 +21639,7 @@ index a276fa7..e66810f 100644
5494
5495 static void microcode_fini_cpu(int cpu)
5496 diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
5497 -index f961de9..8a9d332 100644
5498 +index ea5f363..cb0e905 100644
5499 --- a/arch/x86/kernel/cpu/mtrr/main.c
5500 +++ b/arch/x86/kernel/cpu/mtrr/main.c
5501 @@ -66,7 +66,7 @@ static DEFINE_MUTEX(mtrr_mutex);
5502 @@ -22547,10 +21665,10 @@ index df5e41f..816c719 100644
5503 extern int generic_get_free_region(unsigned long base, unsigned long size,
5504 int replace_reg);
5505 diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
5506 -index 2879ecd..bb8c80b 100644
5507 +index 143e5f5..5825081 100644
5508 --- a/arch/x86/kernel/cpu/perf_event.c
5509 +++ b/arch/x86/kernel/cpu/perf_event.c
5510 -@@ -1372,7 +1372,7 @@ static void __init pmu_check_apic(void)
5511 +@@ -1374,7 +1374,7 @@ static void __init pmu_check_apic(void)
5512
5513 }
5514
5515 @@ -22559,7 +21677,7 @@ index 2879ecd..bb8c80b 100644
5516 .name = "format",
5517 .attrs = NULL,
5518 };
5519 -@@ -1471,7 +1471,7 @@ static struct attribute *events_attr[] = {
5520 +@@ -1473,7 +1473,7 @@ static struct attribute *events_attr[] = {
5521 NULL,
5522 };
5523
5524 @@ -22568,16 +21686,16 @@ index 2879ecd..bb8c80b 100644
5525 .name = "events",
5526 .attrs = events_attr,
5527 };
5528 -@@ -1995,7 +1995,7 @@ static unsigned long get_segment_base(unsigned int segment)
5529 +@@ -1997,7 +1997,7 @@ static unsigned long get_segment_base(unsigned int segment)
5530 if (idx > GDT_ENTRIES)
5531 return 0;
5532
5533 -- desc = __this_cpu_ptr(&gdt_page.gdt[0]);
5534 +- desc = raw_cpu_ptr(gdt_page.gdt);
5535 + desc = get_cpu_gdt_table(smp_processor_id());
5536 }
5537
5538 return get_desc_base(desc + idx);
5539 -@@ -2085,7 +2085,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
5540 +@@ -2087,7 +2087,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
5541 break;
5542
5543 perf_callchain_store(entry, frame.return_address);
5544 @@ -22600,7 +21718,7 @@ index 639d128..e92d7e5 100644
5545
5546 while (amd_iommu_v2_event_descs[i].attr.attr.name)
5547 diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
5548 -index 2502d0d..e5cc05c 100644
5549 +index 944bf01..4a4392f 100644
5550 --- a/arch/x86/kernel/cpu/perf_event_intel.c
5551 +++ b/arch/x86/kernel/cpu/perf_event_intel.c
5552 @@ -2353,10 +2353,10 @@ __init int intel_pmu_init(void)
5553 @@ -22618,7 +21736,7 @@ index 2502d0d..e5cc05c 100644
5554
5555 intel_ds_init();
5556 diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
5557 -index 619f769..d510008 100644
5558 +index d64f275..26522ff 100644
5559 --- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c
5560 +++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
5561 @@ -449,7 +449,7 @@ static struct attribute *rapl_events_hsw_attr[] = {
5562 @@ -22631,10 +21749,10 @@ index 619f769..d510008 100644
5563 .attrs = NULL, /* patched at runtime */
5564 };
5565 diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
5566 -index 0939f86..69730af 100644
5567 +index 9762dbd..53d5d21 100644
5568 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
5569 +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
5570 -@@ -3691,7 +3691,7 @@ static void __init uncore_types_exit(struct intel_uncore_type **types)
5571 +@@ -721,7 +721,7 @@ static void __init uncore_types_exit(struct intel_uncore_type **types)
5572 static int __init uncore_type_init(struct intel_uncore_type *type)
5573 {
5574 struct intel_uncore_pmu *pmus;
5575 @@ -22644,18 +21762,18 @@ index 0939f86..69730af 100644
5576 int i, j;
5577
5578 diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
5579 -index 90236f0..54cb20d 100644
5580 +index 18eb78b..18747cc 100644
5581 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h
5582 +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
5583 -@@ -503,7 +503,7 @@ struct intel_uncore_box {
5584 +@@ -114,7 +114,7 @@ struct intel_uncore_box {
5585 struct uncore_event_desc {
5586 struct kobj_attribute attr;
5587 const char *config;
5588 -};
5589 +} __do_const;
5590
5591 - #define INTEL_UNCORE_EVENT_DESC(_name, _config) \
5592 - { \
5593 + ssize_t uncore_event_show(struct kobject *kobj,
5594 + struct kobj_attribute *attr, char *buf);
5595 diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
5596 index 3225ae6c..ee3c6db 100644
5597 --- a/arch/x86/kernel/cpuid.c
5598 @@ -22670,7 +21788,7 @@ index 3225ae6c..ee3c6db 100644
5599 .notifier_call = cpuid_class_cpu_callback,
5600 };
5601 diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
5602 -index a618fcd..200e95b 100644
5603 +index f5ab56d..d3b201a 100644
5604 --- a/arch/x86/kernel/crash.c
5605 +++ b/arch/x86/kernel/crash.c
5606 @@ -104,7 +104,7 @@ static void kdump_nmi_callback(int cpu, struct pt_regs *regs)
5607 @@ -23096,10 +22214,10 @@ index ff86f19..a20c62c 100644
5608 +EXPORT_SYMBOL(pax_check_alloca);
5609 +#endif
5610 diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
5611 -index 988c00a..4f673b6 100644
5612 +index 49f8864..1cc6d07 100644
5613 --- a/arch/x86/kernel/e820.c
5614 +++ b/arch/x86/kernel/e820.c
5615 -@@ -803,8 +803,8 @@ unsigned long __init e820_end_of_low_ram_pfn(void)
5616 +@@ -802,8 +802,8 @@ unsigned long __init e820_end_of_low_ram_pfn(void)
5617
5618 static void early_panic(char *msg)
5619 {
5620 @@ -23123,7 +22241,7 @@ index 01d1c18..8073693 100644
5621 #include <asm/processor.h>
5622 #include <asm/fcntl.h>
5623 diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
5624 -index 4b0e1df..884b67e 100644
5625 +index 344b63f..ccdac7a 100644
5626 --- a/arch/x86/kernel/entry_32.S
5627 +++ b/arch/x86/kernel/entry_32.S
5628 @@ -177,13 +177,153 @@
5629 @@ -23425,17 +22543,17 @@ index 4b0e1df..884b67e 100644
5630 PTGS_TO_GS
5631 ENABLE_INTERRUPTS_SYSEXIT
5632
5633 -@@ -456,6 +640,9 @@ sysenter_audit:
5634 - movl %eax,%edx /* 2nd arg: syscall number */
5635 - movl $AUDIT_ARCH_I386,%eax /* 1st arg: audit arch */
5636 +@@ -453,6 +637,9 @@ sysenter_audit:
5637 + pushl_cfi PT_ESI(%esp) /* a3: 5th arg */
5638 + pushl_cfi PT_EDX+4(%esp) /* a2: 4th arg */
5639 call __audit_syscall_entry
5640 +
5641 + pax_erase_kstack
5642 +
5643 - pushl_cfi %ebx
5644 + popl_cfi %ecx /* get that remapped edx off the stack */
5645 + popl_cfi %ecx /* get that remapped esi off the stack */
5646 movl PT_EAX(%esp),%eax /* reload syscall number */
5647 - jmp sysenter_do_call
5648 -@@ -481,10 +668,16 @@ sysexit_audit:
5649 +@@ -479,10 +666,16 @@ sysexit_audit:
5650
5651 CFI_ENDPROC
5652 .pushsection .fixup,"ax"
5653 @@ -23454,7 +22572,7 @@ index 4b0e1df..884b67e 100644
5654 PTGS_TO_GS_EX
5655 ENDPROC(ia32_sysenter_target)
5656
5657 -@@ -495,6 +688,11 @@ ENTRY(system_call)
5658 +@@ -493,6 +686,11 @@ ENTRY(system_call)
5659 pushl_cfi %eax # save orig_eax
5660 SAVE_ALL
5661 GET_THREAD_INFO(%ebp)
5662 @@ -23466,7 +22584,7 @@ index 4b0e1df..884b67e 100644
5663 # system call tracing in operation / emulation
5664 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
5665 jnz syscall_trace_entry
5666 -@@ -514,6 +712,15 @@ syscall_exit:
5667 +@@ -512,6 +710,15 @@ syscall_exit:
5668 testl $_TIF_ALLWORK_MASK, %ecx # current->work
5669 jne syscall_exit_work
5670
5671 @@ -23482,7 +22600,7 @@ index 4b0e1df..884b67e 100644
5672 restore_all:
5673 TRACE_IRQS_IRET
5674 restore_all_notrace:
5675 -@@ -568,14 +775,34 @@ ldt_ss:
5676 +@@ -566,14 +773,34 @@ ldt_ss:
5677 * compensating for the offset by changing to the ESPFIX segment with
5678 * a base address that matches for the difference.
5679 */
5680 @@ -23520,7 +22638,7 @@ index 4b0e1df..884b67e 100644
5681 pushl_cfi $__ESPFIX_SS
5682 pushl_cfi %eax /* new kernel esp */
5683 /* Disable interrupts, but do not irqtrace this section: we
5684 -@@ -605,20 +832,18 @@ work_resched:
5685 +@@ -603,20 +830,18 @@ work_resched:
5686 movl TI_flags(%ebp), %ecx
5687 andl $_TIF_WORK_MASK, %ecx # is there any work to be done other
5688 # than syscall tracing?
5689 @@ -23543,7 +22661,7 @@ index 4b0e1df..884b67e 100644
5690 #endif
5691 TRACE_IRQS_ON
5692 ENABLE_INTERRUPTS(CLBR_NONE)
5693 -@@ -639,7 +864,7 @@ work_notifysig_v86:
5694 +@@ -637,7 +862,7 @@ work_notifysig_v86:
5695 movl %eax, %esp
5696 jmp 1b
5697 #endif
5698 @@ -23552,7 +22670,7 @@ index 4b0e1df..884b67e 100644
5699
5700 # perform syscall exit tracing
5701 ALIGN
5702 -@@ -647,11 +872,14 @@ syscall_trace_entry:
5703 +@@ -645,11 +870,14 @@ syscall_trace_entry:
5704 movl $-ENOSYS,PT_EAX(%esp)
5705 movl %esp, %eax
5706 call syscall_trace_enter
5707 @@ -23568,7 +22686,7 @@ index 4b0e1df..884b67e 100644
5708
5709 # perform syscall exit tracing
5710 ALIGN
5711 -@@ -664,26 +892,30 @@ syscall_exit_work:
5712 +@@ -662,26 +890,30 @@ syscall_exit_work:
5713 movl %esp, %eax
5714 call syscall_trace_leave
5715 jmp resume_userspace
5716 @@ -23603,7 +22721,7 @@ index 4b0e1df..884b67e 100644
5717 CFI_ENDPROC
5718
5719 .macro FIXUP_ESPFIX_STACK
5720 -@@ -696,8 +928,15 @@ END(sysenter_badsys)
5721 +@@ -694,8 +926,15 @@ END(sysenter_badsys)
5722 */
5723 #ifdef CONFIG_X86_ESPFIX32
5724 /* fixup the stack */
5725 @@ -23621,7 +22739,7 @@ index 4b0e1df..884b67e 100644
5726 shl $16, %eax
5727 addl %esp, %eax /* the adjusted stack pointer */
5728 pushl_cfi $__KERNEL_DS
5729 -@@ -753,7 +992,7 @@ vector=vector+1
5730 +@@ -751,7 +990,7 @@ vector=vector+1
5731 .endr
5732 2: jmp common_interrupt
5733 .endr
5734 @@ -23630,7 +22748,7 @@ index 4b0e1df..884b67e 100644
5735
5736 .previous
5737 END(interrupt)
5738 -@@ -810,7 +1049,7 @@ ENTRY(coprocessor_error)
5739 +@@ -808,7 +1047,7 @@ ENTRY(coprocessor_error)
5740 pushl_cfi $do_coprocessor_error
5741 jmp error_code
5742 CFI_ENDPROC
5743 @@ -23639,7 +22757,7 @@ index 4b0e1df..884b67e 100644
5744
5745 ENTRY(simd_coprocessor_error)
5746 RING0_INT_FRAME
5747 -@@ -823,7 +1062,7 @@ ENTRY(simd_coprocessor_error)
5748 +@@ -821,7 +1060,7 @@ ENTRY(simd_coprocessor_error)
5749 .section .altinstructions,"a"
5750 altinstruction_entry 661b, 663f, X86_FEATURE_XMM, 662b-661b, 664f-663f
5751 .previous
5752 @@ -23648,7 +22766,7 @@ index 4b0e1df..884b67e 100644
5753 663: pushl $do_simd_coprocessor_error
5754 664:
5755 .previous
5756 -@@ -832,7 +1071,7 @@ ENTRY(simd_coprocessor_error)
5757 +@@ -830,7 +1069,7 @@ ENTRY(simd_coprocessor_error)
5758 #endif
5759 jmp error_code
5760 CFI_ENDPROC
5761 @@ -23657,7 +22775,7 @@ index 4b0e1df..884b67e 100644
5762
5763 ENTRY(device_not_available)
5764 RING0_INT_FRAME
5765 -@@ -841,18 +1080,18 @@ ENTRY(device_not_available)
5766 +@@ -839,18 +1078,18 @@ ENTRY(device_not_available)
5767 pushl_cfi $do_device_not_available
5768 jmp error_code
5769 CFI_ENDPROC
5770 @@ -23679,7 +22797,7 @@ index 4b0e1df..884b67e 100644
5771 #endif
5772
5773 ENTRY(overflow)
5774 -@@ -862,7 +1101,7 @@ ENTRY(overflow)
5775 +@@ -860,7 +1099,7 @@ ENTRY(overflow)
5776 pushl_cfi $do_overflow
5777 jmp error_code
5778 CFI_ENDPROC
5779 @@ -23688,7 +22806,7 @@ index 4b0e1df..884b67e 100644
5780
5781 ENTRY(bounds)
5782 RING0_INT_FRAME
5783 -@@ -871,7 +1110,7 @@ ENTRY(bounds)
5784 +@@ -869,7 +1108,7 @@ ENTRY(bounds)
5785 pushl_cfi $do_bounds
5786 jmp error_code
5787 CFI_ENDPROC
5788 @@ -23697,7 +22815,7 @@ index 4b0e1df..884b67e 100644
5789
5790 ENTRY(invalid_op)
5791 RING0_INT_FRAME
5792 -@@ -880,7 +1119,7 @@ ENTRY(invalid_op)
5793 +@@ -878,7 +1117,7 @@ ENTRY(invalid_op)
5794 pushl_cfi $do_invalid_op
5795 jmp error_code
5796 CFI_ENDPROC
5797 @@ -23706,7 +22824,7 @@ index 4b0e1df..884b67e 100644
5798
5799 ENTRY(coprocessor_segment_overrun)
5800 RING0_INT_FRAME
5801 -@@ -889,7 +1128,7 @@ ENTRY(coprocessor_segment_overrun)
5802 +@@ -887,7 +1126,7 @@ ENTRY(coprocessor_segment_overrun)
5803 pushl_cfi $do_coprocessor_segment_overrun
5804 jmp error_code
5805 CFI_ENDPROC
5806 @@ -23715,7 +22833,7 @@ index 4b0e1df..884b67e 100644
5807
5808 ENTRY(invalid_TSS)
5809 RING0_EC_FRAME
5810 -@@ -897,7 +1136,7 @@ ENTRY(invalid_TSS)
5811 +@@ -895,7 +1134,7 @@ ENTRY(invalid_TSS)
5812 pushl_cfi $do_invalid_TSS
5813 jmp error_code
5814 CFI_ENDPROC
5815 @@ -23724,7 +22842,7 @@ index 4b0e1df..884b67e 100644
5816
5817 ENTRY(segment_not_present)
5818 RING0_EC_FRAME
5819 -@@ -905,7 +1144,7 @@ ENTRY(segment_not_present)
5820 +@@ -903,7 +1142,7 @@ ENTRY(segment_not_present)
5821 pushl_cfi $do_segment_not_present
5822 jmp error_code
5823 CFI_ENDPROC
5824 @@ -23733,7 +22851,7 @@ index 4b0e1df..884b67e 100644
5825
5826 ENTRY(stack_segment)
5827 RING0_EC_FRAME
5828 -@@ -913,7 +1152,7 @@ ENTRY(stack_segment)
5829 +@@ -911,7 +1150,7 @@ ENTRY(stack_segment)
5830 pushl_cfi $do_stack_segment
5831 jmp error_code
5832 CFI_ENDPROC
5833 @@ -23742,7 +22860,7 @@ index 4b0e1df..884b67e 100644
5834
5835 ENTRY(alignment_check)
5836 RING0_EC_FRAME
5837 -@@ -921,7 +1160,7 @@ ENTRY(alignment_check)
5838 +@@ -919,7 +1158,7 @@ ENTRY(alignment_check)
5839 pushl_cfi $do_alignment_check
5840 jmp error_code
5841 CFI_ENDPROC
5842 @@ -23751,7 +22869,7 @@ index 4b0e1df..884b67e 100644
5843
5844 ENTRY(divide_error)
5845 RING0_INT_FRAME
5846 -@@ -930,7 +1169,7 @@ ENTRY(divide_error)
5847 +@@ -928,7 +1167,7 @@ ENTRY(divide_error)
5848 pushl_cfi $do_divide_error
5849 jmp error_code
5850 CFI_ENDPROC
5851 @@ -23760,7 +22878,7 @@ index 4b0e1df..884b67e 100644
5852
5853 #ifdef CONFIG_X86_MCE
5854 ENTRY(machine_check)
5855 -@@ -940,7 +1179,7 @@ ENTRY(machine_check)
5856 +@@ -938,7 +1177,7 @@ ENTRY(machine_check)
5857 pushl_cfi machine_check_vector
5858 jmp error_code
5859 CFI_ENDPROC
5860 @@ -23769,7 +22887,7 @@ index 4b0e1df..884b67e 100644
5861 #endif
5862
5863 ENTRY(spurious_interrupt_bug)
5864 -@@ -950,7 +1189,7 @@ ENTRY(spurious_interrupt_bug)
5865 +@@ -948,7 +1187,7 @@ ENTRY(spurious_interrupt_bug)
5866 pushl_cfi $do_spurious_interrupt_bug
5867 jmp error_code
5868 CFI_ENDPROC
5869 @@ -23778,7 +22896,7 @@ index 4b0e1df..884b67e 100644
5870
5871 #ifdef CONFIG_XEN
5872 /* Xen doesn't set %esp to be precisely what the normal sysenter
5873 -@@ -1056,7 +1295,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
5874 +@@ -1054,7 +1293,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
5875
5876 ENTRY(mcount)
5877 ret
5878 @@ -23787,7 +22905,7 @@ index 4b0e1df..884b67e 100644
5879
5880 ENTRY(ftrace_caller)
5881 pushl %eax
5882 -@@ -1086,7 +1325,7 @@ ftrace_graph_call:
5883 +@@ -1084,7 +1323,7 @@ ftrace_graph_call:
5884 .globl ftrace_stub
5885 ftrace_stub:
5886 ret
5887 @@ -23796,7 +22914,7 @@ index 4b0e1df..884b67e 100644
5888
5889 ENTRY(ftrace_regs_caller)
5890 pushf /* push flags before compare (in cs location) */
5891 -@@ -1184,7 +1423,7 @@ trace:
5892 +@@ -1182,7 +1421,7 @@ trace:
5893 popl %ecx
5894 popl %eax
5895 jmp ftrace_stub
5896 @@ -23805,7 +22923,7 @@ index 4b0e1df..884b67e 100644
5897 #endif /* CONFIG_DYNAMIC_FTRACE */
5898 #endif /* CONFIG_FUNCTION_TRACER */
5899
5900 -@@ -1202,7 +1441,7 @@ ENTRY(ftrace_graph_caller)
5901 +@@ -1200,7 +1439,7 @@ ENTRY(ftrace_graph_caller)
5902 popl %ecx
5903 popl %eax
5904 ret
5905 @@ -23814,7 +22932,7 @@ index 4b0e1df..884b67e 100644
5906
5907 .globl return_to_handler
5908 return_to_handler:
5909 -@@ -1263,15 +1502,18 @@ error_code:
5910 +@@ -1261,15 +1500,18 @@ error_code:
5911 movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart
5912 REG_TO_PTGS %ecx
5913 SET_KERNEL_GS %ecx
5914 @@ -23835,7 +22953,7 @@ index 4b0e1df..884b67e 100644
5915
5916 /*
5917 * Debug traps and NMI can happen at the one SYSENTER instruction
5918 -@@ -1314,7 +1556,7 @@ debug_stack_correct:
5919 +@@ -1312,7 +1554,7 @@ debug_stack_correct:
5920 call do_debug
5921 jmp ret_from_exception
5922 CFI_ENDPROC
5923 @@ -23844,7 +22962,7 @@ index 4b0e1df..884b67e 100644
5924
5925 /*
5926 * NMI is doubly nasty. It can happen _while_ we're handling
5927 -@@ -1354,6 +1596,9 @@ nmi_stack_correct:
5928 +@@ -1352,6 +1594,9 @@ nmi_stack_correct:
5929 xorl %edx,%edx # zero error code
5930 movl %esp,%eax # pt_regs pointer
5931 call do_nmi
5932 @@ -23854,7 +22972,7 @@ index 4b0e1df..884b67e 100644
5933 jmp restore_all_notrace
5934 CFI_ENDPROC
5935
5936 -@@ -1391,13 +1636,16 @@ nmi_espfix_stack:
5937 +@@ -1389,13 +1634,16 @@ nmi_espfix_stack:
5938 FIXUP_ESPFIX_STACK # %eax == %esp
5939 xorl %edx,%edx # zero error code
5940 call do_nmi
5941 @@ -23872,7 +22990,7 @@ index 4b0e1df..884b67e 100644
5942
5943 ENTRY(int3)
5944 RING0_INT_FRAME
5945 -@@ -1410,14 +1658,14 @@ ENTRY(int3)
5946 +@@ -1408,14 +1656,14 @@ ENTRY(int3)
5947 call do_int3
5948 jmp ret_from_exception
5949 CFI_ENDPROC
5950 @@ -23889,7 +23007,7 @@ index 4b0e1df..884b67e 100644
5951
5952 #ifdef CONFIG_KVM_GUEST
5953 ENTRY(async_page_fault)
5954 -@@ -1426,6 +1674,6 @@ ENTRY(async_page_fault)
5955 +@@ -1424,6 +1672,6 @@ ENTRY(async_page_fault)
5956 pushl_cfi $do_async_page_fault
5957 jmp error_code
5958 CFI_ENDPROC
5959 @@ -23898,7 +23016,7 @@ index 4b0e1df..884b67e 100644
5960 #endif
5961
5962 diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
5963 -index b9dde27..6e9dc4e 100644
5964 +index c0226ab..b1d8cdd 100644
5965 --- a/arch/x86/kernel/entry_64.S
5966 +++ b/arch/x86/kernel/entry_64.S
5967 @@ -59,6 +59,8 @@
5968 @@ -24531,7 +23649,7 @@ index b9dde27..6e9dc4e 100644
5969
5970 movq %rsp,PER_CPU_VAR(old_rsp)
5971 movq PER_CPU_VAR(kernel_stack),%rsp
5972 -+ SAVE_ARGS 8*6,0
5973 ++ SAVE_ARGS 8*6, 0, rax_enosys=1
5974 + pax_enter_kernel_user
5975 +
5976 +#ifdef CONFIG_PAX_RANDKSTACK
5977 @@ -24543,8 +23661,8 @@ index b9dde27..6e9dc4e 100644
5978 * and short:
5979 */
5980 ENABLE_INTERRUPTS(CLBR_NONE)
5981 -- SAVE_ARGS 8,0
5982 - movq %rax,ORIG_RAX-ARGOFFSET(%rsp)
5983 +- SAVE_ARGS 8, 0, rax_enosys=1
5984 + movq_cfi rax,(ORIG_RAX-ARGOFFSET)
5985 movq %rcx,RIP-ARGOFFSET(%rsp)
5986 CFI_REL_OFFSET rip,RIP-ARGOFFSET
5987 - testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
5988 @@ -24568,35 +23686,31 @@ index b9dde27..6e9dc4e 100644
5989 /*
5990 * sysretq will re-enable interrupts:
5991 */
5992 -@@ -494,6 +963,9 @@ auditsys:
5993 - movq %rax,%rsi /* 2nd arg: syscall number */
5994 - movl $AUDIT_ARCH_X86_64,%edi /* 1st arg: audit arch */
5995 - call __audit_syscall_entry
5996 -+
5997 -+ pax_erase_kstack
5998 -+
5999 - LOAD_ARGS 0 /* reload call-clobbered registers */
6000 - jmp system_call_fastpath
6001 +@@ -494,11 +963,14 @@ sysret_audit:
6002
6003 -@@ -515,7 +987,7 @@ sysret_audit:
6004 /* Do syscall tracing */
6005 tracesys:
6006 - #ifdef CONFIG_AUDITSYSCALL
6007 -- testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
6008 -+ testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%rcx)
6009 - jz auditsys
6010 - #endif
6011 - SAVE_REST
6012 -@@ -523,12 +995,15 @@ tracesys:
6013 - FIXUP_TOP_OF_STACK %rdi
6014 - movq %rsp,%rdi
6015 - call syscall_trace_enter
6016 +- leaq -REST_SKIP(%rsp), %rdi
6017 ++ movq %rsp, %rdi
6018 + movq $AUDIT_ARCH_X86_64, %rsi
6019 + call syscall_trace_enter_phase1
6020 + test %rax, %rax
6021 + jnz tracesys_phase2 /* if needed, run the slow path */
6022 ++
6023 ++ pax_erase_kstack
6024 +
6025 + LOAD_ARGS 0 /* else restore clobbered regs */
6026 + jmp system_call_fastpath /* and return to the fast path */
6027 +
6028 +@@ -510,12 +982,14 @@ tracesys_phase2:
6029 + movq %rax,%rdx
6030 + call syscall_trace_enter_phase2
6031 +
6032 + pax_erase_kstack
6033 +
6034 /*
6035 * Reload arg registers from stack in case ptrace changed them.
6036 - * We don't reload %rax because syscall_trace_enter() returned
6037 + * We don't reload %rax because syscall_trace_entry_phase2() returned
6038 * the value it wants us to use in the table lookup.
6039 */
6040 - LOAD_ARGS ARGOFFSET, 1
6041 @@ -24604,7 +23718,7 @@ index b9dde27..6e9dc4e 100644
6042 RESTORE_REST
6043 #if __SYSCALL_MASK == ~0
6044 cmpq $__NR_syscall_max,%rax
6045 -@@ -558,7 +1033,9 @@ GLOBAL(int_with_check)
6046 +@@ -545,7 +1019,9 @@ GLOBAL(int_with_check)
6047 andl %edi,%edx
6048 jnz int_careful
6049 andl $~TS_COMPAT,TI_status(%rcx)
6050 @@ -24615,7 +23729,7 @@ index b9dde27..6e9dc4e 100644
6051
6052 /* Either reschedule or signal or syscall exit tracking needed. */
6053 /* First do a reschedule test. */
6054 -@@ -604,7 +1081,7 @@ int_restore_rest:
6055 +@@ -591,7 +1067,7 @@ int_restore_rest:
6056 TRACE_IRQS_OFF
6057 jmp int_with_check
6058 CFI_ENDPROC
6059 @@ -24624,7 +23738,7 @@ index b9dde27..6e9dc4e 100644
6060
6061 .macro FORK_LIKE func
6062 ENTRY(stub_\func)
6063 -@@ -617,9 +1094,10 @@ ENTRY(stub_\func)
6064 +@@ -604,9 +1080,10 @@ ENTRY(stub_\func)
6065 DEFAULT_FRAME 0 8 /* offset 8: return address */
6066 call sys_\func
6067 RESTORE_TOP_OF_STACK %r11, 8
6068 @@ -24637,7 +23751,7 @@ index b9dde27..6e9dc4e 100644
6069 .endm
6070
6071 .macro FIXED_FRAME label,func
6072 -@@ -629,9 +1107,10 @@ ENTRY(\label)
6073 +@@ -616,9 +1093,10 @@ ENTRY(\label)
6074 FIXUP_TOP_OF_STACK %r11, 8-ARGOFFSET
6075 call \func
6076 RESTORE_TOP_OF_STACK %r11, 8-ARGOFFSET
6077 @@ -24649,7 +23763,7 @@ index b9dde27..6e9dc4e 100644
6078 .endm
6079
6080 FORK_LIKE clone
6081 -@@ -639,19 +1118,6 @@ END(\label)
6082 +@@ -626,19 +1104,6 @@ END(\label)
6083 FORK_LIKE vfork
6084 FIXED_FRAME stub_iopl, sys_iopl
6085
6086 @@ -24669,7 +23783,7 @@ index b9dde27..6e9dc4e 100644
6087 ENTRY(stub_execve)
6088 CFI_STARTPROC
6089 addq $8, %rsp
6090 -@@ -663,7 +1129,7 @@ ENTRY(stub_execve)
6091 +@@ -650,7 +1115,7 @@ ENTRY(stub_execve)
6092 RESTORE_REST
6093 jmp int_ret_from_sys_call
6094 CFI_ENDPROC
6095 @@ -24678,7 +23792,7 @@ index b9dde27..6e9dc4e 100644
6096
6097 /*
6098 * sigreturn is special because it needs to restore all registers on return.
6099 -@@ -680,7 +1146,7 @@ ENTRY(stub_rt_sigreturn)
6100 +@@ -667,7 +1132,7 @@ ENTRY(stub_rt_sigreturn)
6101 RESTORE_REST
6102 jmp int_ret_from_sys_call
6103 CFI_ENDPROC
6104 @@ -24687,7 +23801,7 @@ index b9dde27..6e9dc4e 100644
6105
6106 #ifdef CONFIG_X86_X32_ABI
6107 ENTRY(stub_x32_rt_sigreturn)
6108 -@@ -694,7 +1160,7 @@ ENTRY(stub_x32_rt_sigreturn)
6109 +@@ -681,7 +1146,7 @@ ENTRY(stub_x32_rt_sigreturn)
6110 RESTORE_REST
6111 jmp int_ret_from_sys_call
6112 CFI_ENDPROC
6113 @@ -24696,7 +23810,7 @@ index b9dde27..6e9dc4e 100644
6114
6115 ENTRY(stub_x32_execve)
6116 CFI_STARTPROC
6117 -@@ -708,7 +1174,7 @@ ENTRY(stub_x32_execve)
6118 +@@ -695,7 +1160,7 @@ ENTRY(stub_x32_execve)
6119 RESTORE_REST
6120 jmp int_ret_from_sys_call
6121 CFI_ENDPROC
6122 @@ -24705,7 +23819,7 @@ index b9dde27..6e9dc4e 100644
6123
6124 #endif
6125
6126 -@@ -745,7 +1211,7 @@ vector=vector+1
6127 +@@ -732,7 +1197,7 @@ vector=vector+1
6128 2: jmp common_interrupt
6129 .endr
6130 CFI_ENDPROC
6131 @@ -24714,7 +23828,7 @@ index b9dde27..6e9dc4e 100644
6132
6133 .previous
6134 END(interrupt)
6135 -@@ -762,8 +1228,8 @@ END(interrupt)
6136 +@@ -749,8 +1214,8 @@ END(interrupt)
6137 /* 0(%rsp): ~(interrupt number) */
6138 .macro interrupt func
6139 /* reserve pt_regs for scratch regs and rbp */
6140 @@ -24725,7 +23839,7 @@ index b9dde27..6e9dc4e 100644
6141 SAVE_ARGS_IRQ
6142 call \func
6143 .endm
6144 -@@ -786,14 +1252,14 @@ ret_from_intr:
6145 +@@ -773,14 +1238,14 @@ ret_from_intr:
6146
6147 /* Restore saved previous stack */
6148 popq %rsi
6149 @@ -24744,7 +23858,7 @@ index b9dde27..6e9dc4e 100644
6150 je retint_kernel
6151
6152 /* Interrupt came from user space */
6153 -@@ -815,12 +1281,35 @@ retint_swapgs: /* return to user-space */
6154 +@@ -802,12 +1267,35 @@ retint_swapgs: /* return to user-space */
6155 * The iretq could re-enable interrupts:
6156 */
6157 DISABLE_INTERRUPTS(CLBR_ANY)
6158 @@ -24780,7 +23894,7 @@ index b9dde27..6e9dc4e 100644
6159 /*
6160 * The iretq could re-enable interrupts:
6161 */
6162 -@@ -920,7 +1409,7 @@ ENTRY(retint_kernel)
6163 +@@ -907,7 +1395,7 @@ ENTRY(retint_kernel)
6164 jmp exit_intr
6165 #endif
6166 CFI_ENDPROC
6167 @@ -24789,7 +23903,7 @@ index b9dde27..6e9dc4e 100644
6168
6169 /*
6170 * APIC interrupts.
6171 -@@ -934,7 +1423,7 @@ ENTRY(\sym)
6172 +@@ -921,7 +1409,7 @@ ENTRY(\sym)
6173 interrupt \do_sym
6174 jmp ret_from_intr
6175 CFI_ENDPROC
6176 @@ -24798,7 +23912,7 @@ index b9dde27..6e9dc4e 100644
6177 .endm
6178
6179 #ifdef CONFIG_TRACING
6180 -@@ -1007,7 +1496,7 @@ apicinterrupt IRQ_WORK_VECTOR \
6181 +@@ -994,7 +1482,7 @@ apicinterrupt IRQ_WORK_VECTOR \
6182 /*
6183 * Exception entry points.
6184 */
6185 @@ -24807,7 +23921,7 @@ index b9dde27..6e9dc4e 100644
6186
6187 .macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1
6188 ENTRY(\sym)
6189 -@@ -1058,6 +1547,12 @@ ENTRY(\sym)
6190 +@@ -1045,6 +1533,12 @@ ENTRY(\sym)
6191 .endif
6192
6193 .if \shift_ist != -1
6194 @@ -24820,7 +23934,7 @@ index b9dde27..6e9dc4e 100644
6195 subq $EXCEPTION_STKSZ, INIT_TSS_IST(\shift_ist)
6196 .endif
6197
6198 -@@ -1074,7 +1569,7 @@ ENTRY(\sym)
6199 +@@ -1061,7 +1555,7 @@ ENTRY(\sym)
6200 .endif
6201
6202 CFI_ENDPROC
6203 @@ -24829,7 +23943,7 @@ index b9dde27..6e9dc4e 100644
6204 .endm
6205
6206 #ifdef CONFIG_TRACING
6207 -@@ -1115,9 +1610,10 @@ gs_change:
6208 +@@ -1102,9 +1596,10 @@ gs_change:
6209 2: mfence /* workaround */
6210 SWAPGS
6211 popfq_cfi
6212 @@ -24841,7 +23955,7 @@ index b9dde27..6e9dc4e 100644
6213
6214 _ASM_EXTABLE(gs_change,bad_gs)
6215 .section .fixup,"ax"
6216 -@@ -1145,9 +1641,10 @@ ENTRY(do_softirq_own_stack)
6217 +@@ -1132,9 +1627,10 @@ ENTRY(do_softirq_own_stack)
6218 CFI_DEF_CFA_REGISTER rsp
6219 CFI_ADJUST_CFA_OFFSET -8
6220 decl PER_CPU_VAR(irq_count)
6221 @@ -24853,7 +23967,7 @@ index b9dde27..6e9dc4e 100644
6222
6223 #ifdef CONFIG_XEN
6224 idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0
6225 -@@ -1185,7 +1682,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs)
6226 +@@ -1172,7 +1668,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs)
6227 decl PER_CPU_VAR(irq_count)
6228 jmp error_exit
6229 CFI_ENDPROC
6230 @@ -24862,7 +23976,7 @@ index b9dde27..6e9dc4e 100644
6231
6232 /*
6233 * Hypervisor uses this for application faults while it executes.
6234 -@@ -1244,7 +1741,7 @@ ENTRY(xen_failsafe_callback)
6235 +@@ -1231,7 +1727,7 @@ ENTRY(xen_failsafe_callback)
6236 SAVE_ALL
6237 jmp error_exit
6238 CFI_ENDPROC
6239 @@ -24871,7 +23985,7 @@ index b9dde27..6e9dc4e 100644
6240
6241 apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \
6242 xen_hvm_callback_vector xen_evtchn_do_upcall
6243 -@@ -1291,18 +1788,33 @@ ENTRY(paranoid_exit)
6244 +@@ -1278,18 +1774,33 @@ ENTRY(paranoid_exit)
6245 DEFAULT_FRAME
6246 DISABLE_INTERRUPTS(CLBR_NONE)
6247 TRACE_IRQS_OFF_DEBUG
6248 @@ -24907,7 +24021,7 @@ index b9dde27..6e9dc4e 100644
6249 jmp irq_return
6250 paranoid_userspace:
6251 GET_THREAD_INFO(%rcx)
6252 -@@ -1331,7 +1843,7 @@ paranoid_schedule:
6253 +@@ -1318,7 +1829,7 @@ paranoid_schedule:
6254 TRACE_IRQS_OFF
6255 jmp paranoid_userspace
6256 CFI_ENDPROC
6257 @@ -24916,7 +24030,7 @@ index b9dde27..6e9dc4e 100644
6258
6259 /*
6260 * Exception entry point. This expects an error code/orig_rax on the stack.
6261 -@@ -1358,12 +1870,23 @@ ENTRY(error_entry)
6262 +@@ -1345,12 +1856,23 @@ ENTRY(error_entry)
6263 movq %r14, R14+8(%rsp)
6264 movq %r15, R15+8(%rsp)
6265 xorl %ebx,%ebx
6266 @@ -24941,7 +24055,7 @@ index b9dde27..6e9dc4e 100644
6267 ret
6268
6269 /*
6270 -@@ -1398,7 +1921,7 @@ error_bad_iret:
6271 +@@ -1385,7 +1907,7 @@ error_bad_iret:
6272 decl %ebx /* Return to usergs */
6273 jmp error_sti
6274 CFI_ENDPROC
6275 @@ -24950,7 +24064,7 @@ index b9dde27..6e9dc4e 100644
6276
6277
6278 /* ebx: no swapgs flag (1: don't need swapgs, 0: need it) */
6279 -@@ -1409,7 +1932,7 @@ ENTRY(error_exit)
6280 +@@ -1396,7 +1918,7 @@ ENTRY(error_exit)
6281 DISABLE_INTERRUPTS(CLBR_NONE)
6282 TRACE_IRQS_OFF
6283 GET_THREAD_INFO(%rcx)
6284 @@ -24959,7 +24073,7 @@ index b9dde27..6e9dc4e 100644
6285 jne retint_kernel
6286 LOCKDEP_SYS_EXIT_IRQ
6287 movl TI_flags(%rcx),%edx
6288 -@@ -1418,7 +1941,7 @@ ENTRY(error_exit)
6289 +@@ -1405,7 +1927,7 @@ ENTRY(error_exit)
6290 jnz retint_careful
6291 jmp retint_swapgs
6292 CFI_ENDPROC
6293 @@ -24968,7 +24082,7 @@ index b9dde27..6e9dc4e 100644
6294
6295 /*
6296 * Test if a given stack is an NMI stack or not.
6297 -@@ -1476,9 +1999,11 @@ ENTRY(nmi)
6298 +@@ -1463,9 +1985,11 @@ ENTRY(nmi)
6299 * If %cs was not the kernel segment, then the NMI triggered in user
6300 * space, which means it is definitely not nested.
6301 */
6302 @@ -24981,7 +24095,7 @@ index b9dde27..6e9dc4e 100644
6303 /*
6304 * Check the special variable on the stack to see if NMIs are
6305 * executing.
6306 -@@ -1512,8 +2037,7 @@ nested_nmi:
6307 +@@ -1499,8 +2023,7 @@ nested_nmi:
6308
6309 1:
6310 /* Set up the interrupted NMIs stack to jump to repeat_nmi */
6311 @@ -24991,7 +24105,7 @@ index b9dde27..6e9dc4e 100644
6312 CFI_ADJUST_CFA_OFFSET 1*8
6313 leaq -10*8(%rsp), %rdx
6314 pushq_cfi $__KERNEL_DS
6315 -@@ -1531,6 +2055,7 @@ nested_nmi_out:
6316 +@@ -1518,6 +2041,7 @@ nested_nmi_out:
6317 CFI_RESTORE rdx
6318
6319 /* No need to check faults here */
6320 @@ -24999,7 +24113,7 @@ index b9dde27..6e9dc4e 100644
6321 INTERRUPT_RETURN
6322
6323 CFI_RESTORE_STATE
6324 -@@ -1627,13 +2152,13 @@ end_repeat_nmi:
6325 +@@ -1614,13 +2138,13 @@ end_repeat_nmi:
6326 subq $ORIG_RAX-R15, %rsp
6327 CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
6328 /*
6329 @@ -25015,7 +24129,7 @@ index b9dde27..6e9dc4e 100644
6330 DEFAULT_FRAME 0
6331
6332 /*
6333 -@@ -1643,9 +2168,9 @@ end_repeat_nmi:
6334 +@@ -1630,9 +2154,9 @@ end_repeat_nmi:
6335 * NMI itself takes a page fault, the page fault that was preempted
6336 * will read the information from the NMI page fault and not the
6337 * origin fault. Save it off and restore it if it changes.
6338 @@ -25027,7 +24141,7 @@ index b9dde27..6e9dc4e 100644
6339
6340 /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */
6341 movq %rsp,%rdi
6342 -@@ -1654,29 +2179,34 @@ end_repeat_nmi:
6343 +@@ -1641,29 +2165,34 @@ end_repeat_nmi:
6344
6345 /* Did the NMI take a page fault? Restore cr2 if it did */
6346 movq %cr2, %rcx
6347 @@ -25937,7 +25051,7 @@ index a9a4229..6f4d476 100644
6348
6349 /*
6350 diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
6351 -index 8af8171..f8c1169 100644
6352 +index e7cc537..67d7372 100644
6353 --- a/arch/x86/kernel/i8259.c
6354 +++ b/arch/x86/kernel/i8259.c
6355 @@ -110,7 +110,7 @@ static int i8259A_irq_pending(unsigned int irq)
6356 @@ -25946,10 +25060,10 @@ index 8af8171..f8c1169 100644
6357 disable_irq_nosync(irq);
6358 - io_apic_irqs &= ~(1<<irq);
6359 + io_apic_irqs &= ~(1UL<<irq);
6360 - irq_set_chip_and_handler_name(irq, &i8259A_chip, handle_level_irq,
6361 - i8259A_chip.name);
6362 + irq_set_chip_and_handler(irq, &i8259A_chip, handle_level_irq);
6363 enable_irq(irq);
6364 -@@ -209,7 +209,7 @@ spurious_8259A_irq:
6365 + }
6366 +@@ -208,7 +208,7 @@ spurious_8259A_irq:
6367 "spurious 8259A interrupt: IRQ%d.\n", irq);
6368 spurious_irq_mask |= irqmask;
6369 }
6370 @@ -25958,7 +25072,7 @@ index 8af8171..f8c1169 100644
6371 /*
6372 * Theoretically we do not have to handle this IRQ,
6373 * but in Linux this does not cause problems and is
6374 -@@ -350,14 +350,16 @@ static void init_8259A(int auto_eoi)
6375 +@@ -349,14 +349,16 @@ static void init_8259A(int auto_eoi)
6376 /* (slave's support for AEOI in flat mode is to be investigated) */
6377 outb_pic(SLAVE_ICW4_DEFAULT, PIC_SLAVE_IMR);
6378
6379 @@ -26208,7 +25322,7 @@ index 63ce838..2ea3e06 100644
6380 print_stack_overflow();
6381 desc->handle_irq(irq, desc);
6382 diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
6383 -index 4d1c746..55a22d6 100644
6384 +index e4b503d..824fce8 100644
6385 --- a/arch/x86/kernel/irq_64.c
6386 +++ b/arch/x86/kernel/irq_64.c
6387 @@ -26,6 +26,8 @@ EXPORT_PER_CPU_SYMBOL(irq_stat);
6388 @@ -26578,10 +25692,10 @@ index c2bedae..25e7ab60 100644
6389 .name = "data",
6390 .mode = S_IRUGO,
6391 diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
6392 -index 3dd8e2c..07de51f 100644
6393 +index f6945bef..94f6434 100644
6394 --- a/arch/x86/kernel/kvm.c
6395 +++ b/arch/x86/kernel/kvm.c
6396 -@@ -282,7 +282,14 @@ NOKPROBE_SYMBOL(do_async_page_fault);
6397 +@@ -283,7 +283,14 @@ NOKPROBE_SYMBOL(do_async_page_fault);
6398 static void __init paravirt_ops_setup(void)
6399 {
6400 pv_info.name = "KVM";
6401 @@ -26678,7 +25792,7 @@ index c37886d..d851d32 100644
6402 error = -EINVAL;
6403 goto out_unlock;
6404 diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
6405 -index 1667b1d..16492c5 100644
6406 +index 72e8e31..f2f1605 100644
6407 --- a/arch/x86/kernel/machine_kexec_32.c
6408 +++ b/arch/x86/kernel/machine_kexec_32.c
6409 @@ -25,7 +25,7 @@
6410 @@ -27310,35 +26424,8 @@ index 77dd0ad..9ec4723 100644
6411 else
6412 dma_generic_free_coherent(dev, size, vaddr, dma_addr, attrs);
6413 }
6414 -diff --git a/arch/x86/kernel/preempt.S b/arch/x86/kernel/preempt.S
6415 -index ca7f0d5..8996469 100644
6416 ---- a/arch/x86/kernel/preempt.S
6417 -+++ b/arch/x86/kernel/preempt.S
6418 -@@ -3,12 +3,14 @@
6419 - #include <asm/dwarf2.h>
6420 - #include <asm/asm.h>
6421 - #include <asm/calling.h>
6422 -+#include <asm/alternative-asm.h>
6423 -
6424 - ENTRY(___preempt_schedule)
6425 - CFI_STARTPROC
6426 - SAVE_ALL
6427 - call preempt_schedule
6428 - RESTORE_ALL
6429 -+ pax_force_retaddr
6430 - ret
6431 - CFI_ENDPROC
6432 -
6433 -@@ -19,6 +21,7 @@ ENTRY(___preempt_schedule_context)
6434 - SAVE_ALL
6435 - call preempt_schedule_context
6436 - RESTORE_ALL
6437 -+ pax_force_retaddr
6438 - ret
6439 - CFI_ENDPROC
6440 -
6441 diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
6442 -index f804dc9..7c62095 100644
6443 +index e127dda..94e384d 100644
6444 --- a/arch/x86/kernel/process.c
6445 +++ b/arch/x86/kernel/process.c
6446 @@ -36,7 +36,8 @@
6447 @@ -27351,7 +26438,7 @@ index f804dc9..7c62095 100644
6448
6449 #ifdef CONFIG_X86_64
6450 static DEFINE_PER_CPU(unsigned char, is_idle);
6451 -@@ -92,7 +93,7 @@ void arch_task_cache_init(void)
6452 +@@ -94,7 +95,7 @@ void arch_task_cache_init(void)
6453 task_xstate_cachep =
6454 kmem_cache_create("task_xstate", xstate_size,
6455 __alignof__(union thread_xstate),
6456 @@ -27360,7 +26447,7 @@ index f804dc9..7c62095 100644
6457 setup_xstate_comp();
6458 }
6459
6460 -@@ -106,7 +107,7 @@ void exit_thread(void)
6461 +@@ -108,7 +109,7 @@ void exit_thread(void)
6462 unsigned long *bp = t->io_bitmap_ptr;
6463
6464 if (bp) {
6465 @@ -27369,7 +26456,7 @@ index f804dc9..7c62095 100644
6466
6467 t->io_bitmap_ptr = NULL;
6468 clear_thread_flag(TIF_IO_BITMAP);
6469 -@@ -126,6 +127,9 @@ void flush_thread(void)
6470 +@@ -128,6 +129,9 @@ void flush_thread(void)
6471 {
6472 struct task_struct *tsk = current;
6473
6474 @@ -27379,7 +26466,7 @@ index f804dc9..7c62095 100644
6475 flush_ptrace_hw_breakpoint(tsk);
6476 memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
6477 drop_init_fpu(tsk);
6478 -@@ -272,7 +276,7 @@ static void __exit_idle(void)
6479 +@@ -274,7 +278,7 @@ static void __exit_idle(void)
6480 void exit_idle(void)
6481 {
6482 /* idle loop has pid 0 */
6483 @@ -27388,7 +26475,7 @@ index f804dc9..7c62095 100644
6484 return;
6485 __exit_idle();
6486 }
6487 -@@ -325,7 +329,7 @@ bool xen_set_default_idle(void)
6488 +@@ -327,7 +331,7 @@ bool xen_set_default_idle(void)
6489 return ret;
6490 }
6491 #endif
6492 @@ -27397,7 +26484,7 @@ index f804dc9..7c62095 100644
6493 {
6494 local_irq_disable();
6495 /*
6496 -@@ -454,16 +458,37 @@ static int __init idle_setup(char *str)
6497 +@@ -456,16 +460,37 @@ static int __init idle_setup(char *str)
6498 }
6499 early_param("idle", idle_setup);
6500
6501 @@ -27446,7 +26533,7 @@ index f804dc9..7c62095 100644
6502 +}
6503 +#endif
6504 diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
6505 -index 7bc86bb..0ea06e8 100644
6506 +index 8f3ebfe..e6ced5a 100644
6507 --- a/arch/x86/kernel/process_32.c
6508 +++ b/arch/x86/kernel/process_32.c
6509 @@ -64,6 +64,7 @@ asmlinkage void ret_from_kernel_thread(void) __asm__("ret_from_kernel_thread");
6510 @@ -27480,7 +26567,7 @@ index 7bc86bb..0ea06e8 100644
6511 print_symbol("EIP is at %s\n", regs->ip);
6512
6513 printk(KERN_DEFAULT "EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
6514 -@@ -132,20 +132,21 @@ void release_thread(struct task_struct *dead_task)
6515 +@@ -132,21 +132,22 @@ void release_thread(struct task_struct *dead_task)
6516 int copy_thread(unsigned long clone_flags, unsigned long sp,
6517 unsigned long arg, struct task_struct *p)
6518 {
6519 @@ -27492,6 +26579,7 @@ index 7bc86bb..0ea06e8 100644
6520 p->thread.sp = (unsigned long) childregs;
6521 p->thread.sp0 = (unsigned long) (childregs+1);
6522 + p->tinfo.lowest_stack = (unsigned long)task_stack_page(p);
6523 + memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
6524
6525 if (unlikely(p->flags & PF_KTHREAD)) {
6526 /* kernel thread */
6527 @@ -27506,7 +26594,7 @@ index 7bc86bb..0ea06e8 100644
6528 childregs->fs = __KERNEL_PERCPU;
6529 childregs->bx = sp; /* function */
6530 childregs->bp = arg;
6531 -@@ -252,7 +253,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6532 +@@ -248,7 +249,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6533 struct thread_struct *prev = &prev_p->thread,
6534 *next = &next_p->thread;
6535 int cpu = smp_processor_id();
6536 @@ -27515,7 +26603,7 @@ index 7bc86bb..0ea06e8 100644
6537 fpu_switch_t fpu;
6538
6539 /* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
6540 -@@ -276,6 +277,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6541 +@@ -272,6 +273,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6542 */
6543 lazy_save_gs(prev->gs);
6544
6545 @@ -27526,7 +26614,7 @@ index 7bc86bb..0ea06e8 100644
6546 /*
6547 * Load the per-thread Thread-Local Storage descriptor.
6548 */
6549 -@@ -314,9 +319,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6550 +@@ -310,9 +315,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6551 */
6552 arch_end_context_switch(next_p);
6553
6554 @@ -27539,7 +26627,7 @@ index 7bc86bb..0ea06e8 100644
6555
6556 /*
6557 * Restore %gs if needed (which is common)
6558 -@@ -326,8 +331,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6559 +@@ -322,8 +327,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6560
6561 switch_fpu_finish(next_p, fpu);
6562
6563 @@ -27548,13 +26636,13 @@ index 7bc86bb..0ea06e8 100644
6564 return prev_p;
6565 }
6566
6567 -@@ -357,4 +360,3 @@ unsigned long get_wchan(struct task_struct *p)
6568 +@@ -353,4 +356,3 @@ unsigned long get_wchan(struct task_struct *p)
6569 } while (count++ < 16);
6570 return 0;
6571 }
6572 -
6573 diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
6574 -index ca5b02d..c0b2f6a 100644
6575 +index 3ed4a68..ee8f337 100644
6576 --- a/arch/x86/kernel/process_64.c
6577 +++ b/arch/x86/kernel/process_64.c
6578 @@ -158,10 +158,11 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
6579 @@ -27568,9 +26656,9 @@ index ca5b02d..c0b2f6a 100644
6580 p->thread.usersp = me->thread.usersp;
6581 + p->tinfo.lowest_stack = (unsigned long)task_stack_page(p);
6582 set_tsk_thread_flag(p, TIF_FORK);
6583 - p->thread.fpu_counter = 0;
6584 p->thread.io_bitmap_ptr = NULL;
6585 -@@ -172,6 +173,8 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
6586 +
6587 +@@ -171,6 +172,8 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
6588 p->thread.fs = p->thread.fsindex ? 0 : me->thread.fs;
6589 savesegment(es, p->thread.es);
6590 savesegment(ds, p->thread.ds);
6591 @@ -27579,7 +26667,7 @@ index ca5b02d..c0b2f6a 100644
6592 memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
6593
6594 if (unlikely(p->flags & PF_KTHREAD)) {
6595 -@@ -280,7 +283,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6596 +@@ -277,7 +280,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6597 struct thread_struct *prev = &prev_p->thread;
6598 struct thread_struct *next = &next_p->thread;
6599 int cpu = smp_processor_id();
6600 @@ -27588,7 +26676,7 @@ index ca5b02d..c0b2f6a 100644
6601 unsigned fsindex, gsindex;
6602 fpu_switch_t fpu;
6603
6604 -@@ -303,6 +306,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6605 +@@ -300,6 +303,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6606 if (unlikely(next->ds | prev->ds))
6607 loadsegment(ds, next->ds);
6608
6609 @@ -27598,7 +26686,7 @@ index ca5b02d..c0b2f6a 100644
6610
6611 /* We must save %fs and %gs before load_TLS() because
6612 * %fs and %gs may be cleared by load_TLS().
6613 -@@ -362,6 +368,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6614 +@@ -359,6 +365,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6615 prev->usersp = this_cpu_read(old_rsp);
6616 this_cpu_write(old_rsp, next->usersp);
6617 this_cpu_write(current_task, next_p);
6618 @@ -27606,7 +26694,7 @@ index ca5b02d..c0b2f6a 100644
6619
6620 /*
6621 * If it were not for PREEMPT_ACTIVE we could guarantee that the
6622 -@@ -371,9 +378,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6623 +@@ -368,9 +375,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
6624 task_thread_info(prev_p)->saved_preempt_count = this_cpu_read(__preempt_count);
6625 this_cpu_write(__preempt_count, task_thread_info(next_p)->saved_preempt_count);
6626
6627 @@ -27617,7 +26705,7 @@ index ca5b02d..c0b2f6a 100644
6628
6629 /*
6630 * Now maybe reload the debug registers and handle I/O bitmaps
6631 -@@ -443,12 +448,11 @@ unsigned long get_wchan(struct task_struct *p)
6632 +@@ -440,12 +445,11 @@ unsigned long get_wchan(struct task_struct *p)
6633 if (!p || p == current || p->state == TASK_RUNNING)
6634 return 0;
6635 stack = (unsigned long)task_stack_page(p);
6636 @@ -27633,7 +26721,7 @@ index ca5b02d..c0b2f6a 100644
6637 ip = *(u64 *)(fp+8);
6638 if (!in_sched_functions(ip))
6639 diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
6640 -index b1a5dfa..ed94526 100644
6641 +index e510618..5165ac0 100644
6642 --- a/arch/x86/kernel/ptrace.c
6643 +++ b/arch/x86/kernel/ptrace.c
6644 @@ -186,10 +186,10 @@ unsigned long kernel_stack_pointer(struct pt_regs *regs)
6645 @@ -27741,8 +26829,8 @@ index b1a5dfa..ed94526 100644
6646 }
6647
6648 void user_single_step_siginfo(struct task_struct *tsk,
6649 -@@ -1441,6 +1455,10 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
6650 - force_sig_info(SIGTRAP, &info, tsk);
6651 +@@ -1455,6 +1469,10 @@ static void do_audit_syscall_entry(struct pt_regs *regs, u32 arch)
6652 + }
6653 }
6654
6655 +#ifdef CONFIG_GRKERNSEC_SETXID
6656 @@ -27750,11 +26838,11 @@ index b1a5dfa..ed94526 100644
6657 +#endif
6658 +
6659 /*
6660 - * We must return the syscall number to actually look up in the table.
6661 - * This can be -1L to skip running any syscall at all.
6662 -@@ -1451,6 +1469,11 @@ long syscall_trace_enter(struct pt_regs *regs)
6663 + * We can return 0 to resume the syscall or anything else to go to phase
6664 + * 2. If we resume the syscall, we need to put something appropriate in
6665 +@@ -1562,6 +1580,11 @@ long syscall_trace_enter_phase2(struct pt_regs *regs, u32 arch,
6666
6667 - user_exit();
6668 + BUG_ON(regs != task_pt_regs(current));
6669
6670 +#ifdef CONFIG_GRKERNSEC_SETXID
6671 + if (unlikely(test_and_clear_thread_flag(TIF_GRSEC_SETXID)))
6672 @@ -27764,7 +26852,7 @@ index b1a5dfa..ed94526 100644
6673 /*
6674 * If we stepped into a sysenter/syscall insn, it trapped in
6675 * kernel mode; do_debug() cleared TF and set TIF_SINGLESTEP.
6676 -@@ -1506,6 +1529,11 @@ void syscall_trace_leave(struct pt_regs *regs)
6677 +@@ -1620,6 +1643,11 @@ void syscall_trace_leave(struct pt_regs *regs)
6678 */
6679 user_exit();
6680
6681 @@ -27938,7 +27026,7 @@ index 3fd2c69..a444264 100644
6682 identity_mapped:
6683 /* set return address to 0 if not preserving context */
6684 diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
6685 -index 41ead8d..7ccde23 100644
6686 +index ab08aa2..6d74a3a 100644
6687 --- a/arch/x86/kernel/setup.c
6688 +++ b/arch/x86/kernel/setup.c
6689 @@ -110,6 +110,7 @@
6690 @@ -28034,7 +27122,7 @@ index 41ead8d..7ccde23 100644
6691
6692 early_reserve_initrd();
6693
6694 -@@ -946,14 +989,14 @@ void __init setup_arch(char **cmdline_p)
6695 +@@ -955,14 +998,14 @@ void __init setup_arch(char **cmdline_p)
6696
6697 if (!boot_params.hdr.root_flags)
6698 root_mountflags &= ~MS_RDONLY;
6699 @@ -28224,10 +27312,10 @@ index be8e1bd..a3d93fa 100644
6700 .smp_prepare_cpus = native_smp_prepare_cpus,
6701 .smp_cpus_done = native_smp_cpus_done,
6702 diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
6703 -index 42a2dca..35a07aa 100644
6704 +index 668d8f2..84a9d54 100644
6705 --- a/arch/x86/kernel/smpboot.c
6706 +++ b/arch/x86/kernel/smpboot.c
6707 -@@ -226,14 +226,17 @@ static void notrace start_secondary(void *unused)
6708 +@@ -194,14 +194,17 @@ static void notrace start_secondary(void *unused)
6709
6710 enable_start_cpu0 = 0;
6711
6712 @@ -28249,7 +27337,7 @@ index 42a2dca..35a07aa 100644
6713 /*
6714 * Check TSC synchronization with the BP:
6715 */
6716 -@@ -760,8 +763,9 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
6717 +@@ -765,8 +768,9 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
6718 alternatives_enable_smp();
6719
6720 idle->thread.sp = (unsigned long) (((struct pt_regs *)
6721 @@ -28260,7 +27348,7 @@ index 42a2dca..35a07aa 100644
6722
6723 #ifdef CONFIG_X86_32
6724 /* Stack for startup_32 can be just as for start_secondary onwards */
6725 -@@ -770,10 +774,10 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
6726 +@@ -775,10 +779,10 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
6727 clear_tsk_thread_flag(idle, TIF_FORK);
6728 initial_gs = per_cpu_offset(cpu);
6729 #endif
6730 @@ -28274,7 +27362,7 @@ index 42a2dca..35a07aa 100644
6731 initial_code = (unsigned long)start_secondary;
6732 stack_start = idle->thread.sp;
6733
6734 -@@ -919,6 +923,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
6735 +@@ -918,6 +922,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
6736 /* the FPU context is blank, nobody can own it */
6737 __cpu_disable_lazy_restore(cpu);
6738
6739 @@ -29371,7 +28459,7 @@ index 49edf2d..c0d1362 100644
6740
6741 #ifdef CONFIG_SMP
6742 diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
6743 -index e1e1e80..1400089 100644
6744 +index 957779f..74e405c 100644
6745 --- a/arch/x86/kernel/vsyscall_64.c
6746 +++ b/arch/x86/kernel/vsyscall_64.c
6747 @@ -54,15 +54,13 @@
6748 @@ -29517,10 +28605,10 @@ index 4c540c4..0b985b0 100644
6749 if ((unsigned long)buf % 64 || fx_only) {
6750 u64 init_bv = pcntxt_mask & ~XSTATE_FPSSE;
6751 diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
6752 -index 38a0afe..94421a9 100644
6753 +index 976e3a5..8bb998c 100644
6754 --- a/arch/x86/kvm/cpuid.c
6755 +++ b/arch/x86/kvm/cpuid.c
6756 -@@ -166,15 +166,20 @@ int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu,
6757 +@@ -175,15 +175,20 @@ int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu,
6758 struct kvm_cpuid2 *cpuid,
6759 struct kvm_cpuid_entry2 __user *entries)
6760 {
6761 @@ -29544,7 +28632,7 @@ index 38a0afe..94421a9 100644
6762 vcpu->arch.cpuid_nent = cpuid->nent;
6763 kvm_apic_set_version(vcpu);
6764 kvm_x86_ops->cpuid_update(vcpu);
6765 -@@ -189,15 +194,19 @@ int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,
6766 +@@ -196,15 +201,19 @@ int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,
6767 struct kvm_cpuid2 *cpuid,
6768 struct kvm_cpuid_entry2 __user *entries)
6769 {
6770 @@ -29568,10 +28656,10 @@ index 38a0afe..94421a9 100644
6771
6772 out:
6773 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
6774 -index 9254069..bf25b97 100644
6775 +index 9f8a2fa..565eb4f 100644
6776 --- a/arch/x86/kvm/emulate.c
6777 +++ b/arch/x86/kvm/emulate.c
6778 -@@ -3550,7 +3550,7 @@ static int check_cr_write(struct x86_emulate_ctxt *ctxt)
6779 +@@ -3554,7 +3554,7 @@ static int check_cr_write(struct x86_emulate_ctxt *ctxt)
6780
6781 ctxt->ops->get_msr(ctxt, MSR_EFER, &efer);
6782 if (efer & EFER_LMA)
6783 @@ -29581,7 +28669,7 @@ index 9254069..bf25b97 100644
6784 if (new_val & rsvd)
6785 return emulate_gp(ctxt, 0);
6786 diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
6787 -index 08e8a89..0e9183e 100644
6788 +index b8345dd..f225d71 100644
6789 --- a/arch/x86/kvm/lapic.c
6790 +++ b/arch/x86/kvm/lapic.c
6791 @@ -55,7 +55,7 @@
6792 @@ -29594,10 +28682,10 @@ index 08e8a89..0e9183e 100644
6793 #define APIC_LVT_NUM 6
6794 /* 14 is the version for Xeon and Pentium 8.4.8*/
6795 diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
6796 -index 4107765..d9eb358 100644
6797 +index fd49c86..77e1aa0 100644
6798 --- a/arch/x86/kvm/paging_tmpl.h
6799 +++ b/arch/x86/kvm/paging_tmpl.h
6800 -@@ -331,7 +331,7 @@ retry_walk:
6801 +@@ -343,7 +343,7 @@ retry_walk:
6802 if (unlikely(kvm_is_error_hva(host_addr)))
6803 goto error;
6804
6805 @@ -29607,10 +28695,10 @@ index 4107765..d9eb358 100644
6806 goto error;
6807 walker->ptep_user[walker->level - 1] = ptep_user;
6808 diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
6809 -index 78dadc3..fd84599 100644
6810 +index 7527cef..c63a838e 100644
6811 --- a/arch/x86/kvm/svm.c
6812 +++ b/arch/x86/kvm/svm.c
6813 -@@ -3547,7 +3547,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
6814 +@@ -3564,7 +3564,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
6815 int cpu = raw_smp_processor_id();
6816
6817 struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
6818 @@ -29622,7 +28710,7 @@ index 78dadc3..fd84599 100644
6819 load_TR_desc();
6820 }
6821
6822 -@@ -3948,6 +3952,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
6823 +@@ -3965,6 +3969,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
6824 #endif
6825 #endif
6826
6827 @@ -29634,10 +28722,10 @@ index 78dadc3..fd84599 100644
6828
6829 local_irq_disable();
6830 diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
6831 -index 41a5426..c0b3c00 100644
6832 +index 3e556c6..08bbf7f 100644
6833 --- a/arch/x86/kvm/vmx.c
6834 +++ b/arch/x86/kvm/vmx.c
6835 -@@ -1341,12 +1341,12 @@ static void vmcs_write64(unsigned long field, u64 value)
6836 +@@ -1366,12 +1366,12 @@ static void vmcs_write64(unsigned long field, u64 value)
6837 #endif
6838 }
6839
6840 @@ -29652,7 +28740,7 @@ index 41a5426..c0b3c00 100644
6841 {
6842 vmcs_writel(field, vmcs_readl(field) | mask);
6843 }
6844 -@@ -1606,7 +1606,11 @@ static void reload_tss(void)
6845 +@@ -1631,7 +1631,11 @@ static void reload_tss(void)
6846 struct desc_struct *descs;
6847
6848 descs = (void *)gdt->address;
6849 @@ -29664,7 +28752,7 @@ index 41a5426..c0b3c00 100644
6850 load_TR_desc();
6851 }
6852
6853 -@@ -1834,6 +1838,10 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
6854 +@@ -1859,6 +1863,10 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
6855 vmcs_writel(HOST_TR_BASE, kvm_read_tr_base()); /* 22.2.4 */
6856 vmcs_writel(HOST_GDTR_BASE, gdt->address); /* 22.2.4 */
6857
6858 @@ -29675,7 +28763,7 @@ index 41a5426..c0b3c00 100644
6859 rdmsrl(MSR_IA32_SYSENTER_ESP, sysenter_esp);
6860 vmcs_writel(HOST_IA32_SYSENTER_ESP, sysenter_esp); /* 22.2.3 */
6861 vmx->loaded_vmcs->cpu = cpu;
6862 -@@ -2123,7 +2131,7 @@ static void setup_msrs(struct vcpu_vmx *vmx)
6863 +@@ -2148,7 +2156,7 @@ static void setup_msrs(struct vcpu_vmx *vmx)
6864 * reads and returns guest's timestamp counter "register"
6865 * guest_tsc = host_tsc + tsc_offset -- 21.3
6866 */
6867 @@ -29684,9 +28772,15 @@ index 41a5426..c0b3c00 100644
6868 {
6869 u64 host_tsc, tsc_offset;
6870
6871 -@@ -3114,8 +3122,11 @@ static __init int hardware_setup(void)
6872 - if (!cpu_has_vmx_flexpriority())
6873 - flexpriority_enabled = 0;
6874 +@@ -3146,11 +3154,16 @@ static __init int hardware_setup(void)
6875 + * page upon invalidation. No need to do anything if the
6876 + * processor does not have the APIC_ACCESS_ADDR VMCS field.
6877 + */
6878 +- kvm_x86_ops->set_apic_access_page_addr = NULL;
6879 ++ pax_open_kernel();
6880 ++ *(void **)&kvm_x86_ops->set_apic_access_page_addr = NULL;
6881 ++ pax_close_kernel();
6882 + }
6883
6884 - if (!cpu_has_vmx_tpr_shadow())
6885 - kvm_x86_ops->update_cr8_intercept = NULL;
6886 @@ -29698,7 +28792,7 @@ index 41a5426..c0b3c00 100644
6887
6888 if (enable_ept && !cpu_has_vmx_ept_2m_page())
6889 kvm_disable_largepages();
6890 -@@ -3126,13 +3137,15 @@ static __init int hardware_setup(void)
6891 +@@ -3161,13 +3174,15 @@ static __init int hardware_setup(void)
6892 if (!cpu_has_vmx_apicv())
6893 enable_apicv = 0;
6894
6895 @@ -29718,7 +28812,7 @@ index 41a5426..c0b3c00 100644
6896
6897 if (nested)
6898 nested_vmx_setup_ctls_msrs();
6899 -@@ -4242,7 +4255,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
6900 +@@ -4274,7 +4289,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
6901 unsigned long cr4;
6902
6903 vmcs_writel(HOST_CR0, read_cr0() & ~X86_CR0_TS); /* 22.2.3 */
6904 @@ -29729,7 +28823,7 @@ index 41a5426..c0b3c00 100644
6905
6906 /* Save the most likely value for this task's CR4 in the VMCS. */
6907 cr4 = read_cr4();
6908 -@@ -4269,7 +4285,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
6909 +@@ -4301,7 +4319,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
6910 vmcs_writel(HOST_IDTR_BASE, dt.address); /* 22.2.4 */
6911 vmx->host_idt_base = dt.address;
6912
6913 @@ -29738,7 +28832,7 @@ index 41a5426..c0b3c00 100644
6914
6915 rdmsr(MSR_IA32_SYSENTER_CS, low32, high32);
6916 vmcs_write32(HOST_IA32_SYSENTER_CS, low32);
6917 -@@ -7475,6 +7491,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
6918 +@@ -7622,6 +7640,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
6919 "jmp 2f \n\t"
6920 "1: " __ex(ASM_VMX_VMRESUME) "\n\t"
6921 "2: "
6922 @@ -29751,7 +28845,7 @@ index 41a5426..c0b3c00 100644
6923 /* Save guest registers, load host registers, keep flags */
6924 "mov %0, %c[wordsize](%%" _ASM_SP ") \n\t"
6925 "pop %0 \n\t"
6926 -@@ -7527,6 +7549,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
6927 +@@ -7674,6 +7698,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
6928 #endif
6929 [cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)),
6930 [wordsize]"i"(sizeof(ulong))
6931 @@ -29763,7 +28857,7 @@ index 41a5426..c0b3c00 100644
6932 : "cc", "memory"
6933 #ifdef CONFIG_X86_64
6934 , "rax", "rbx", "rdi", "rsi"
6935 -@@ -7540,7 +7567,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
6936 +@@ -7687,7 +7716,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
6937 if (debugctlmsr)
6938 update_debugctlmsr(debugctlmsr);
6939
6940 @@ -29772,7 +28866,7 @@ index 41a5426..c0b3c00 100644
6941 /*
6942 * The sysexit path does not restore ds/es, so we must set them to
6943 * a reasonable value ourselves.
6944 -@@ -7549,8 +7576,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
6945 +@@ -7696,8 +7725,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
6946 * may be executed in interrupt context, which saves and restore segments
6947 * around it, nullifying its effect.
6948 */
6949 @@ -29794,10 +28888,10 @@ index 41a5426..c0b3c00 100644
6950
6951 vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP)
6952 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
6953 -index d6aeccf..f0f150c 100644
6954 +index 0033df3..db6236d 100644
6955 --- a/arch/x86/kvm/x86.c
6956 +++ b/arch/x86/kvm/x86.c
6957 -@@ -729,6 +729,8 @@ EXPORT_SYMBOL_GPL(kvm_set_cr4);
6958 +@@ -732,6 +732,8 @@ EXPORT_SYMBOL_GPL(kvm_set_cr4);
6959
6960 int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
6961 {
6962 @@ -29805,8 +28899,8 @@ index d6aeccf..f0f150c 100644
6963 +
6964 if (cr3 == kvm_read_cr3(vcpu) && !pdptrs_changed(vcpu)) {
6965 kvm_mmu_sync_roots(vcpu);
6966 - kvm_mmu_flush_tlb(vcpu);
6967 -@@ -1857,8 +1859,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data)
6968 + kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
6969 +@@ -1878,8 +1880,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data)
6970 {
6971 struct kvm *kvm = vcpu->kvm;
6972 int lm = is_long_mode(vcpu);
6973 @@ -29817,7 +28911,7 @@ index d6aeccf..f0f150c 100644
6974 u8 blob_size = lm ? kvm->arch.xen_hvm_config.blob_size_64
6975 : kvm->arch.xen_hvm_config.blob_size_32;
6976 u32 page_num = data & ~PAGE_MASK;
6977 -@@ -2779,6 +2781,8 @@ long kvm_arch_dev_ioctl(struct file *filp,
6978 +@@ -2806,6 +2808,8 @@ long kvm_arch_dev_ioctl(struct file *filp,
6979 if (n < msr_list.nmsrs)
6980 goto out;
6981 r = -EFAULT;
6982 @@ -29826,7 +28920,7 @@ index d6aeccf..f0f150c 100644
6983 if (copy_to_user(user_msr_list->indices, &msrs_to_save,
6984 num_msrs_to_save * sizeof(u32)))
6985 goto out;
6986 -@@ -5639,7 +5643,7 @@ static struct notifier_block pvclock_gtod_notifier = {
6987 +@@ -5670,7 +5674,7 @@ static struct notifier_block pvclock_gtod_notifier = {
6988 };
6989 #endif
6990
6991 @@ -30621,18 +29715,27 @@ index f2145cf..cea889d 100644
6992 .byte (clear_page_c - clear_page) - (2f - 1b) /* offset */
6993 2: .byte 0xeb /* jmp <disp8> */
6994 diff --git a/arch/x86/lib/cmpxchg16b_emu.S b/arch/x86/lib/cmpxchg16b_emu.S
6995 -index 1e572c5..2a162cd 100644
6996 +index 40a1725..5d12ac4 100644
6997 --- a/arch/x86/lib/cmpxchg16b_emu.S
6998 +++ b/arch/x86/lib/cmpxchg16b_emu.S
6999 -@@ -53,11 +53,13 @@ this_cpu_cmpxchg16b_emu:
7000 +@@ -8,6 +8,7 @@
7001 + #include <linux/linkage.h>
7002 + #include <asm/dwarf2.h>
7003 + #include <asm/percpu.h>
7004 ++#include <asm/alternative-asm.h>
7005 +
7006 + .text
7007
7008 - popf
7009 +@@ -46,12 +47,14 @@ CFI_STARTPROC
7010 + CFI_REMEMBER_STATE
7011 + popfq_cfi
7012 mov $1, %al
7013 + pax_force_retaddr
7014 ret
7015
7016 - not_same:
7017 - popf
7018 + CFI_RESTORE_STATE
7019 + .Lnot_same:
7020 + popfq_cfi
7021 xor %al,%al
7022 + pax_force_retaddr
7023 ret
7024 @@ -30979,10 +30082,10 @@ index 2419d5f..fe52d0e 100644
7025 CFI_RESTORE_STATE
7026
7027 diff --git a/arch/x86/lib/csum-wrappers_64.c b/arch/x86/lib/csum-wrappers_64.c
7028 -index 7609e0e..b449b98 100644
7029 +index 1318f75..44c30fd 100644
7030 --- a/arch/x86/lib/csum-wrappers_64.c
7031 +++ b/arch/x86/lib/csum-wrappers_64.c
7032 -@@ -53,10 +53,12 @@ csum_partial_copy_from_user(const void __user *src, void *dst,
7033 +@@ -52,10 +52,12 @@ csum_partial_copy_from_user(const void __user *src, void *dst,
7034 len -= 2;
7035 }
7036 }
7037 @@ -30996,7 +30099,7 @@ index 7609e0e..b449b98 100644
7038 if (unlikely(*errp))
7039 goto out_err;
7040
7041 -@@ -110,10 +112,12 @@ csum_partial_copy_to_user(const void *src, void __user *dst,
7042 +@@ -109,10 +111,12 @@ csum_partial_copy_to_user(const void *src, void __user *dst,
7043 }
7044
7045 *errp = 0;
7046 @@ -31836,80 +30939,6 @@ index fc6ba17..d4d989d 100644
7047 #endif
7048 xor %eax,%eax
7049 EXIT
7050 -diff --git a/arch/x86/lib/rwlock.S b/arch/x86/lib/rwlock.S
7051 -index 1cad221..de671ee 100644
7052 ---- a/arch/x86/lib/rwlock.S
7053 -+++ b/arch/x86/lib/rwlock.S
7054 -@@ -16,13 +16,34 @@ ENTRY(__write_lock_failed)
7055 - FRAME
7056 - 0: LOCK_PREFIX
7057 - WRITE_LOCK_ADD($RW_LOCK_BIAS) (%__lock_ptr)
7058 -+
7059 -+#ifdef CONFIG_PAX_REFCOUNT
7060 -+ jno 1234f
7061 -+ LOCK_PREFIX
7062 -+ WRITE_LOCK_SUB($RW_LOCK_BIAS) (%__lock_ptr)
7063 -+ int $4
7064 -+1234:
7065 -+ _ASM_EXTABLE(1234b, 1234b)
7066 -+#endif
7067 -+
7068 - 1: rep; nop
7069 - cmpl $WRITE_LOCK_CMP, (%__lock_ptr)
7070 - jne 1b
7071 - LOCK_PREFIX
7072 - WRITE_LOCK_SUB($RW_LOCK_BIAS) (%__lock_ptr)
7073 -+
7074 -+#ifdef CONFIG_PAX_REFCOUNT
7075 -+ jno 1234f
7076 -+ LOCK_PREFIX
7077 -+ WRITE_LOCK_ADD($RW_LOCK_BIAS) (%__lock_ptr)
7078 -+ int $4
7079 -+1234:
7080 -+ _ASM_EXTABLE(1234b, 1234b)
7081 -+#endif
7082 -+
7083 - jnz 0b
7084 - ENDFRAME
7085 -+ pax_force_retaddr
7086 - ret
7087 - CFI_ENDPROC
7088 - END(__write_lock_failed)
7089 -@@ -32,13 +53,34 @@ ENTRY(__read_lock_failed)
7090 - FRAME
7091 - 0: LOCK_PREFIX
7092 - READ_LOCK_SIZE(inc) (%__lock_ptr)
7093 -+
7094 -+#ifdef CONFIG_PAX_REFCOUNT
7095 -+ jno 1234f
7096 -+ LOCK_PREFIX
7097 -+ READ_LOCK_SIZE(dec) (%__lock_ptr)
7098 -+ int $4
7099 -+1234:
7100 -+ _ASM_EXTABLE(1234b, 1234b)
7101 -+#endif
7102 -+
7103 - 1: rep; nop
7104 - READ_LOCK_SIZE(cmp) $1, (%__lock_ptr)
7105 - js 1b
7106 - LOCK_PREFIX
7107 - READ_LOCK_SIZE(dec) (%__lock_ptr)
7108 -+
7109 -+#ifdef CONFIG_PAX_REFCOUNT
7110 -+ jno 1234f
7111 -+ LOCK_PREFIX
7112 -+ READ_LOCK_SIZE(inc) (%__lock_ptr)
7113 -+ int $4
7114 -+1234:
7115 -+ _ASM_EXTABLE(1234b, 1234b)
7116 -+#endif
7117 -+
7118 - js 0b
7119 - ENDFRAME
7120 -+ pax_force_retaddr
7121 - ret
7122 - CFI_ENDPROC
7123 - END(__read_lock_failed)
7124 diff --git a/arch/x86/lib/rwsem.S b/arch/x86/lib/rwsem.S
7125 index 5dff5f0..cadebf4 100644
7126 --- a/arch/x86/lib/rwsem.S
7127 @@ -31949,7 +30978,7 @@ index 5dff5f0..cadebf4 100644
7128 CFI_ENDPROC
7129 ENDPROC(call_rwsem_downgrade_wake)
7130 diff --git a/arch/x86/lib/thunk_64.S b/arch/x86/lib/thunk_64.S
7131 -index 92d9fea..b2762c8 100644
7132 +index b30b5eb..2b57052 100644
7133 --- a/arch/x86/lib/thunk_64.S
7134 +++ b/arch/x86/lib/thunk_64.S
7135 @@ -9,6 +9,7 @@
7136 @@ -31975,7 +31004,7 @@ index 92d9fea..b2762c8 100644
7137 .endif
7138
7139 call \func
7140 -@@ -40,9 +41,10 @@
7141 +@@ -47,9 +48,10 @@
7142
7143 /* SAVE_ARGS below is used only for the .cfi directives it contains. */
7144 CFI_STARTPROC
7145 @@ -32698,10 +31727,10 @@ index 903ec1e..c4166b2 100644
7146 }
7147
7148 diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
7149 -index a241946..d7a04cf 100644
7150 +index d973e61..fb868e9 100644
7151 --- a/arch/x86/mm/fault.c
7152 +++ b/arch/x86/mm/fault.c
7153 -@@ -14,12 +14,19 @@
7154 +@@ -13,12 +13,19 @@
7155 #include <linux/hugetlb.h> /* hstate_index_to_shift */
7156 #include <linux/prefetch.h> /* prefetchw */
7157 #include <linux/context_tracking.h> /* exception_enter(), ... */
7158 @@ -32721,7 +31750,7 @@ index a241946..d7a04cf 100644
7159
7160 #define CREATE_TRACE_POINTS
7161 #include <asm/trace/exceptions.h>
7162 -@@ -60,7 +67,7 @@ static nokprobe_inline int kprobes_fault(struct pt_regs *regs)
7163 +@@ -59,7 +66,7 @@ static nokprobe_inline int kprobes_fault(struct pt_regs *regs)
7164 int ret = 0;
7165
7166 /* kprobe_running() needs smp_processor_id() */
7167 @@ -32730,7 +31759,7 @@ index a241946..d7a04cf 100644
7168 preempt_disable();
7169 if (kprobe_running() && kprobe_fault_handler(regs, 14))
7170 ret = 1;
7171 -@@ -121,7 +128,10 @@ check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr,
7172 +@@ -120,7 +127,10 @@ check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr,
7173 return !instr_lo || (instr_lo>>1) == 1;
7174 case 0x00:
7175 /* Prefetch instruction is 0x0F0D or 0x0F18 */
7176 @@ -32742,7 +31771,7 @@ index a241946..d7a04cf 100644
7177 return 0;
7178
7179 *prefetch = (instr_lo == 0xF) &&
7180 -@@ -155,7 +165,10 @@ is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr)
7181 +@@ -154,7 +164,10 @@ is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr)
7182 while (instr < max_instr) {
7183 unsigned char opcode;
7184
7185 @@ -32754,7 +31783,7 @@ index a241946..d7a04cf 100644
7186 break;
7187
7188 instr++;
7189 -@@ -186,6 +199,34 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address,
7190 +@@ -185,6 +198,34 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address,
7191 force_sig_info(si_signo, &info, tsk);
7192 }
7193
7194 @@ -32789,7 +31818,7 @@ index a241946..d7a04cf 100644
7195 DEFINE_SPINLOCK(pgd_lock);
7196 LIST_HEAD(pgd_list);
7197
7198 -@@ -236,10 +277,27 @@ void vmalloc_sync_all(void)
7199 +@@ -235,10 +276,27 @@ void vmalloc_sync_all(void)
7200 for (address = VMALLOC_START & PMD_MASK;
7201 address >= TASK_SIZE && address < FIXADDR_TOP;
7202 address += PMD_SIZE) {
7203 @@ -32817,7 +31846,7 @@ index a241946..d7a04cf 100644
7204 spinlock_t *pgt_lock;
7205 pmd_t *ret;
7206
7207 -@@ -247,8 +305,14 @@ void vmalloc_sync_all(void)
7208 +@@ -246,8 +304,14 @@ void vmalloc_sync_all(void)
7209 pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
7210
7211 spin_lock(pgt_lock);
7212 @@ -32833,7 +31862,7 @@ index a241946..d7a04cf 100644
7213
7214 if (!ret)
7215 break;
7216 -@@ -282,6 +346,12 @@ static noinline int vmalloc_fault(unsigned long address)
7217 +@@ -281,6 +345,12 @@ static noinline int vmalloc_fault(unsigned long address)
7218 * an interrupt in the middle of a task switch..
7219 */
7220 pgd_paddr = read_cr3();
7221 @@ -32846,7 +31875,7 @@ index a241946..d7a04cf 100644
7222 pmd_k = vmalloc_sync_one(__va(pgd_paddr), address);
7223 if (!pmd_k)
7224 return -1;
7225 -@@ -378,11 +448,25 @@ static noinline int vmalloc_fault(unsigned long address)
7226 +@@ -377,11 +447,25 @@ static noinline int vmalloc_fault(unsigned long address)
7227 * happen within a race in page table update. In the later
7228 * case just flush:
7229 */
7230 @@ -32873,7 +31902,7 @@ index a241946..d7a04cf 100644
7231 if (pgd_none(*pgd)) {
7232 set_pgd(pgd, *pgd_ref);
7233 arch_flush_lazy_mmu_mode();
7234 -@@ -549,7 +633,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address)
7235 +@@ -548,7 +632,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address)
7236 static int is_errata100(struct pt_regs *regs, unsigned long address)
7237 {
7238 #ifdef CONFIG_X86_64
7239 @@ -32882,7 +31911,7 @@ index a241946..d7a04cf 100644
7240 return 1;
7241 #endif
7242 return 0;
7243 -@@ -576,9 +660,9 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
7244 +@@ -575,9 +659,9 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
7245 }
7246
7247 static const char nx_warning[] = KERN_CRIT
7248 @@ -32894,7 +31923,7 @@ index a241946..d7a04cf 100644
7249
7250 static void
7251 show_fault_oops(struct pt_regs *regs, unsigned long error_code,
7252 -@@ -587,7 +671,7 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
7253 +@@ -586,7 +670,7 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
7254 if (!oops_may_print())
7255 return;
7256
7257 @@ -32903,7 +31932,7 @@ index a241946..d7a04cf 100644
7258 unsigned int level;
7259 pgd_t *pgd;
7260 pte_t *pte;
7261 -@@ -598,13 +682,25 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
7262 +@@ -597,13 +681,25 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
7263 pte = lookup_address_in_pgd(pgd, address, &level);
7264
7265 if (pte && pte_present(*pte) && !pte_exec(*pte))
7266 @@ -32931,7 +31960,7 @@ index a241946..d7a04cf 100644
7267 printk(KERN_ALERT "BUG: unable to handle kernel ");
7268 if (address < PAGE_SIZE)
7269 printk(KERN_CONT "NULL pointer dereference");
7270 -@@ -785,6 +881,22 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
7271 +@@ -782,6 +878,22 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
7272 return;
7273 }
7274 #endif
7275 @@ -32954,7 +31983,7 @@ index a241946..d7a04cf 100644
7276 /* Kernel addresses are always protection faults: */
7277 if (address >= TASK_SIZE)
7278 error_code |= PF_PROT;
7279 -@@ -870,7 +982,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
7280 +@@ -867,7 +979,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
7281 if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) {
7282 printk(KERN_ERR
7283 "MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n",
7284 @@ -32963,7 +31992,7 @@ index a241946..d7a04cf 100644
7285 code = BUS_MCEERR_AR;
7286 }
7287 #endif
7288 -@@ -924,6 +1036,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte)
7289 +@@ -921,6 +1033,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte)
7290 return 1;
7291 }
7292
7293 @@ -33063,7 +32092,7 @@ index a241946..d7a04cf 100644
7294 /*
7295 * Handle a spurious fault caused by a stale TLB entry.
7296 *
7297 -@@ -991,6 +1196,9 @@ int show_unhandled_signals = 1;
7298 +@@ -1006,6 +1211,9 @@ int show_unhandled_signals = 1;
7299 static inline int
7300 access_error(unsigned long error_code, struct vm_area_struct *vma)
7301 {
7302 @@ -33073,7 +32102,7 @@ index a241946..d7a04cf 100644
7303 if (error_code & PF_WRITE) {
7304 /* write, present and write, not present: */
7305 if (unlikely(!(vma->vm_flags & VM_WRITE)))
7306 -@@ -1025,7 +1233,7 @@ static inline bool smap_violation(int error_code, struct pt_regs *regs)
7307 +@@ -1040,7 +1248,7 @@ static inline bool smap_violation(int error_code, struct pt_regs *regs)
7308 if (error_code & PF_USER)
7309 return false;
7310
7311 @@ -33082,7 +32111,7 @@ index a241946..d7a04cf 100644
7312 return false;
7313
7314 return true;
7315 -@@ -1053,6 +1261,22 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
7316 +@@ -1068,6 +1276,22 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
7317 tsk = current;
7318 mm = tsk->mm;
7319
7320 @@ -33105,7 +32134,7 @@ index a241946..d7a04cf 100644
7321 /*
7322 * Detect and handle instructions that would cause a page fault for
7323 * both a tracked kernel page and a userspace page.
7324 -@@ -1130,7 +1354,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
7325 +@@ -1145,7 +1369,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
7326 * User-mode registers count as a user access even for any
7327 * potential system fault or CPU buglet:
7328 */
7329 @@ -33114,7 +32143,7 @@ index a241946..d7a04cf 100644
7330 local_irq_enable();
7331 error_code |= PF_USER;
7332 flags |= FAULT_FLAG_USER;
7333 -@@ -1177,6 +1401,11 @@ retry:
7334 +@@ -1192,6 +1416,11 @@ retry:
7335 might_sleep();
7336 }
7337
7338 @@ -33126,7 +32155,7 @@ index a241946..d7a04cf 100644
7339 vma = find_vma(mm, address);
7340 if (unlikely(!vma)) {
7341 bad_area(regs, error_code, address);
7342 -@@ -1188,18 +1417,24 @@ retry:
7343 +@@ -1203,18 +1432,24 @@ retry:
7344 bad_area(regs, error_code, address);
7345 return;
7346 }
7347 @@ -33162,7 +32191,7 @@ index a241946..d7a04cf 100644
7348 if (unlikely(expand_stack(vma, address))) {
7349 bad_area(regs, error_code, address);
7350 return;
7351 -@@ -1316,3 +1551,292 @@ trace_do_page_fault(struct pt_regs *regs, unsigned long error_code)
7352 +@@ -1331,3 +1566,292 @@ trace_do_page_fault(struct pt_regs *regs, unsigned long error_code)
7353 }
7354 NOKPROBE_SYMBOL(trace_do_page_fault);
7355 #endif /* CONFIG_TRACING */
7356 @@ -33798,7 +32827,7 @@ index 66dba36..f8082ec 100644
7357 (unsigned long)(&__init_begin),
7358 (unsigned long)(&__init_end));
7359 diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
7360 -index 7d05565..bfc5338 100644
7361 +index c8140e1..59257fc 100644
7362 --- a/arch/x86/mm/init_32.c
7363 +++ b/arch/x86/mm/init_32.c
7364 @@ -62,33 +62,6 @@ static noinline int do_test_wp_bit(void);
7365 @@ -34007,8 +33036,8 @@ index 7d05565..bfc5338 100644
7366 + permanent_kmaps_init(swapper_pg_dir);
7367 }
7368
7369 --pteval_t __supported_pte_mask __read_mostly = ~(_PAGE_NX | _PAGE_GLOBAL | _PAGE_IOMAP);
7370 -+pteval_t __supported_pte_mask __read_only = ~(_PAGE_NX | _PAGE_GLOBAL | _PAGE_IOMAP);
7371 +-pteval_t __supported_pte_mask __read_mostly = ~(_PAGE_NX | _PAGE_GLOBAL);
7372 ++pteval_t __supported_pte_mask __read_only = ~(_PAGE_NX | _PAGE_GLOBAL);
7373 EXPORT_SYMBOL_GPL(__supported_pte_mask);
7374
7375 /* user-defined highmem size */
7376 @@ -34051,19 +33080,19 @@ index 7d05565..bfc5338 100644
7377 printk(KERN_INFO "Write protecting the kernel text: %luk\n",
7378 size >> 10);
7379 diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
7380 -index ac7de5f..ceb56df 100644
7381 +index 4e5dfec..6fd6dc5 100644
7382 --- a/arch/x86/mm/init_64.c
7383 +++ b/arch/x86/mm/init_64.c
7384 @@ -151,7 +151,7 @@ early_param("gbpages", parse_direct_gbpages_on);
7385 * around without checking the pgd every time.
7386 */
7387
7388 --pteval_t __supported_pte_mask __read_mostly = ~_PAGE_IOMAP;
7389 -+pteval_t __supported_pte_mask __read_only = ~(_PAGE_NX | _PAGE_IOMAP);
7390 +-pteval_t __supported_pte_mask __read_mostly = ~0;
7391 ++pteval_t __supported_pte_mask __read_only = ~_PAGE_NX;
7392 EXPORT_SYMBOL_GPL(__supported_pte_mask);
7393
7394 int force_personality32;
7395 -@@ -184,12 +184,29 @@ void sync_global_pgds(unsigned long start, unsigned long end)
7396 +@@ -184,7 +184,12 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
7397
7398 for (address = start; address <= end; address += PGDIR_SIZE) {
7399 const pgd_t *pgd_ref = pgd_offset_k(address);
7400 @@ -34074,7 +33103,9 @@ index ac7de5f..ceb56df 100644
7401 struct page *page;
7402 +#endif
7403
7404 - if (pgd_none(*pgd_ref))
7405 + /*
7406 + * When it is called after memory hot remove, pgd_none()
7407 +@@ -195,6 +200,25 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
7408 continue;
7409
7410 spin_lock(&pgd_lock);
7411 @@ -34083,27 +33114,34 @@ index ac7de5f..ceb56df 100644
7412 + for (cpu = 0; cpu < nr_cpu_ids; ++cpu) {
7413 + pgd_t *pgd = pgd_offset_cpu(cpu, user, address);
7414 +
7415 -+ if (pgd_none(*pgd))
7416 -+ set_pgd(pgd, *pgd_ref);
7417 -+ else
7418 ++ if (!pgd_none(*pgd_ref) && !pgd_none(*pgd))
7419 + BUG_ON(pgd_page_vaddr(*pgd)
7420 + != pgd_page_vaddr(*pgd_ref));
7421 ++
7422 ++ if (removed) {
7423 ++ if (pgd_none(*pgd_ref) && !pgd_none(*pgd))
7424 ++ pgd_clear(pgd);
7425 ++ } else {
7426 ++ if (pgd_none(*pgd))
7427 ++ set_pgd(pgd, *pgd_ref);
7428 ++ }
7429 ++
7430 + pgd = pgd_offset_cpu(cpu, kernel, address);
7431 +#else
7432 list_for_each_entry(page, &pgd_list, lru) {
7433 pgd_t *pgd;
7434 spinlock_t *pgt_lock;
7435 -@@ -198,6 +215,7 @@ void sync_global_pgds(unsigned long start, unsigned long end)
7436 +@@ -203,6 +227,7 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
7437 /* the pgt_lock only for Xen */
7438 pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
7439 spin_lock(pgt_lock);
7440 +#endif
7441
7442 - if (pgd_none(*pgd))
7443 - set_pgd(pgd, *pgd_ref);
7444 -@@ -205,7 +223,10 @@ void sync_global_pgds(unsigned long start, unsigned long end)
7445 + if (!pgd_none(*pgd_ref) && !pgd_none(*pgd))
7446 BUG_ON(pgd_page_vaddr(*pgd)
7447 - != pgd_page_vaddr(*pgd_ref));
7448 +@@ -216,7 +241,10 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
7449 + set_pgd(pgd, *pgd_ref);
7450 + }
7451
7452 +#ifndef CONFIG_PAX_PER_CPU_PGD
7453 spin_unlock(pgt_lock);
7454 @@ -34112,7 +33150,7 @@ index ac7de5f..ceb56df 100644
7455 }
7456 spin_unlock(&pgd_lock);
7457 }
7458 -@@ -238,7 +259,7 @@ static pud_t *fill_pud(pgd_t *pgd, unsigned long vaddr)
7459 +@@ -249,7 +277,7 @@ static pud_t *fill_pud(pgd_t *pgd, unsigned long vaddr)
7460 {
7461 if (pgd_none(*pgd)) {
7462 pud_t *pud = (pud_t *)spp_getpage();
7463 @@ -34121,7 +33159,7 @@ index ac7de5f..ceb56df 100644
7464 if (pud != pud_offset(pgd, 0))
7465 printk(KERN_ERR "PAGETABLE BUG #00! %p <-> %p\n",
7466 pud, pud_offset(pgd, 0));
7467 -@@ -250,7 +271,7 @@ static pmd_t *fill_pmd(pud_t *pud, unsigned long vaddr)
7468 +@@ -261,7 +289,7 @@ static pmd_t *fill_pmd(pud_t *pud, unsigned long vaddr)
7469 {
7470 if (pud_none(*pud)) {
7471 pmd_t *pmd = (pmd_t *) spp_getpage();
7472 @@ -34130,7 +33168,7 @@ index ac7de5f..ceb56df 100644
7473 if (pmd != pmd_offset(pud, 0))
7474 printk(KERN_ERR "PAGETABLE BUG #01! %p <-> %p\n",
7475 pmd, pmd_offset(pud, 0));
7476 -@@ -279,7 +300,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
7477 +@@ -290,7 +318,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
7478 pmd = fill_pmd(pud, vaddr);
7479 pte = fill_pte(pmd, vaddr);
7480
7481 @@ -34140,7 +33178,7 @@ index ac7de5f..ceb56df 100644
7482
7483 /*
7484 * It's enough to flush this one mapping.
7485 -@@ -338,14 +361,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
7486 +@@ -349,14 +379,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
7487 pgd = pgd_offset_k((unsigned long)__va(phys));
7488 if (pgd_none(*pgd)) {
7489 pud = (pud_t *) spp_getpage();
7490 @@ -34157,7 +33195,7 @@ index ac7de5f..ceb56df 100644
7491 }
7492 pmd = pmd_offset(pud, phys);
7493 BUG_ON(!pmd_none(*pmd));
7494 -@@ -586,7 +607,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end,
7495 +@@ -597,7 +625,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end,
7496 prot);
7497
7498 spin_lock(&init_mm.page_table_lock);
7499 @@ -34166,7 +33204,7 @@ index ac7de5f..ceb56df 100644
7500 spin_unlock(&init_mm.page_table_lock);
7501 }
7502 __flush_tlb_all();
7503 -@@ -627,7 +648,7 @@ kernel_physical_mapping_init(unsigned long start,
7504 +@@ -638,7 +666,7 @@ kernel_physical_mapping_init(unsigned long start,
7505 page_size_mask);
7506
7507 spin_lock(&init_mm.page_table_lock);
7508 @@ -34175,7 +33213,7 @@ index ac7de5f..ceb56df 100644
7509 spin_unlock(&init_mm.page_table_lock);
7510 pgd_changed = true;
7511 }
7512 -@@ -1205,8 +1226,8 @@ static struct vm_operations_struct gate_vma_ops = {
7513 +@@ -1217,8 +1245,8 @@ static struct vm_operations_struct gate_vma_ops = {
7514 static struct vm_area_struct gate_vma = {
7515 .vm_start = VSYSCALL_ADDR,
7516 .vm_end = VSYSCALL_ADDR + PAGE_SIZE,
7517 @@ -34203,7 +33241,7 @@ index 7b179b49..6bd17777 100644
7518
7519 return (void *)vaddr;
7520 diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
7521 -index baff1da..2816ef4 100644
7522 +index af78e50..0790b03 100644
7523 --- a/arch/x86/mm/ioremap.c
7524 +++ b/arch/x86/mm/ioremap.c
7525 @@ -56,8 +56,8 @@ static int __ioremap_check_ram(unsigned long start_pfn, unsigned long nr_pages,
7526 @@ -34217,7 +33255,7 @@ index baff1da..2816ef4 100644
7527 return 1;
7528
7529 WARN_ONCE(1, "ioremap on RAM pfn 0x%lx\n", start_pfn);
7530 -@@ -268,7 +268,7 @@ EXPORT_SYMBOL(ioremap_prot);
7531 +@@ -280,7 +280,7 @@ EXPORT_SYMBOL(ioremap_prot);
7532 *
7533 * Caller must ensure there is only one unmapping for the same pointer.
7534 */
7535 @@ -34226,7 +33264,7 @@ index baff1da..2816ef4 100644
7536 {
7537 struct vm_struct *p, *o;
7538
7539 -@@ -322,6 +322,9 @@ void *xlate_dev_mem_ptr(unsigned long phys)
7540 +@@ -334,6 +334,9 @@ void *xlate_dev_mem_ptr(unsigned long phys)
7541
7542 /* If page is RAM, we can use __va. Otherwise ioremap and unmap. */
7543 if (page_is_ram(start >> PAGE_SHIFT))
7544 @@ -34236,7 +33274,7 @@ index baff1da..2816ef4 100644
7545 return __va(phys);
7546
7547 addr = (void __force *)ioremap_cache(start, PAGE_SIZE);
7548 -@@ -334,13 +337,16 @@ void *xlate_dev_mem_ptr(unsigned long phys)
7549 +@@ -346,13 +349,16 @@ void *xlate_dev_mem_ptr(unsigned long phys)
7550 void unxlate_dev_mem_ptr(unsigned long phys, void *addr)
7551 {
7552 if (page_is_ram(phys >> PAGE_SHIFT))
7553 @@ -34254,7 +33292,7 @@ index baff1da..2816ef4 100644
7554
7555 static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
7556 {
7557 -@@ -376,8 +382,7 @@ void __init early_ioremap_init(void)
7558 +@@ -388,8 +394,7 @@ void __init early_ioremap_init(void)
7559 early_ioremap_setup();
7560
7561 pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
7562 @@ -34265,7 +33303,7 @@ index baff1da..2816ef4 100644
7563 /*
7564 * The boot-ioremap range spans multiple pmds, for which
7565 diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c
7566 -index dd89a13..d77bdcc 100644
7567 +index b4f2e7e..96c9c3e 100644
7568 --- a/arch/x86/mm/kmemcheck/kmemcheck.c
7569 +++ b/arch/x86/mm/kmemcheck/kmemcheck.c
7570 @@ -628,9 +628,9 @@ bool kmemcheck_fault(struct pt_regs *regs, unsigned long address,
7571 @@ -34407,11 +33445,11 @@ index 0057a7a..95c7edd 100644
7572 might_sleep();
7573 if (is_enabled()) /* recheck and proper locking in *_core() */
7574 diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
7575 -index a32b706..efb308b 100644
7576 +index 1a88370..3f598b5 100644
7577 --- a/arch/x86/mm/numa.c
7578 +++ b/arch/x86/mm/numa.c
7579 -@@ -478,7 +478,7 @@ static bool __init numa_meminfo_cover_memory(const struct numa_meminfo *mi)
7580 - return true;
7581 +@@ -499,7 +499,7 @@ static void __init numa_clear_kernel_node_hotplug(void)
7582 + }
7583 }
7584
7585 -static int __init numa_register_memblks(struct numa_meminfo *mi)
7586 @@ -34897,7 +33935,7 @@ index 6fb6927..4fc13c0 100644
7587 paravirt_pgd_free(mm, pgd);
7588 free_page((unsigned long)pgd);
7589 diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
7590 -index 4dd8cf6..f9d143e 100644
7591 +index 75cc097..79a097f 100644
7592 --- a/arch/x86/mm/pgtable_32.c
7593 +++ b/arch/x86/mm/pgtable_32.c
7594 @@ -47,10 +47,13 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pteval)
7595 @@ -35118,12 +34156,12 @@ index 6440221..f84b5c7 100644
7596 + pax_force_retaddr
7597 ret
7598 diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
7599 -index c881ba8..71aca2e 100644
7600 +index 3f62734..097bf93 100644
7601 --- a/arch/x86/net/bpf_jit_comp.c
7602 +++ b/arch/x86/net/bpf_jit_comp.c
7603 -@@ -15,7 +15,11 @@
7604 +@@ -13,7 +13,11 @@
7605 #include <linux/if_vlan.h>
7606 - #include <linux/random.h>
7607 + #include <asm/cacheflush.h>
7608
7609 +#ifdef CONFIG_GRKERNSEC_BPF_HARDEN
7610 +int bpf_jit_enable __read_only;
7611 @@ -35133,55 +34171,17 @@ index c881ba8..71aca2e 100644
7612
7613 /*
7614 * assembly code in arch/x86/net/bpf_jit.S
7615 -@@ -109,36 +113,32 @@ static inline void bpf_flush_icache(void *start, void *end)
7616 - #define CHOOSE_LOAD_FUNC(K, func) \
7617 - ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset)
7618 -
7619 --struct bpf_binary_header {
7620 -- unsigned int pages;
7621 -- /* Note : for security reasons, bpf code will follow a randomly
7622 -- * sized amount of int3 instructions
7623 -- */
7624 -- u8 image[];
7625 --};
7626 --
7627 --static struct bpf_binary_header *bpf_alloc_binary(unsigned int proglen,
7628 -+/* Note : for security reasons, bpf code will follow a randomly
7629 -+ * sized amount of int3 instructions
7630 -+ */
7631 -+static u8 *bpf_alloc_binary(unsigned int proglen,
7632 - u8 **image_ptr)
7633 +@@ -174,7 +178,9 @@ static inline u8 add_2reg(u8 byte, u32 dst_reg, u32 src_reg)
7634 + static void jit_fill_hole(void *area, unsigned int size)
7635 {
7636 - unsigned int sz, hole;
7637 -- struct bpf_binary_header *header;
7638 -+ u8 *header;
7639 -
7640 - /* Most of BPF filters are really small,
7641 - * but if some of them fill a page, allow at least
7642 - * 128 extra bytes to insert a random section of int3
7643 - */
7644 -- sz = round_up(proglen + sizeof(*header) + 128, PAGE_SIZE);
7645 -- header = module_alloc(sz);
7646 -+ sz = round_up(proglen + 128, PAGE_SIZE);
7647 -+ header = module_alloc_exec(sz);
7648 - if (!header)
7649 - return NULL;
7650 -
7651 + /* fill whole space with int3 instructions */
7652 + pax_open_kernel();
7653 - memset(header, 0xcc, sz); /* fill whole space with int3 instructions */
7654 + memset(area, 0xcc, size);
7655 + pax_close_kernel();
7656 -
7657 -- header->pages = sz / PAGE_SIZE;
7658 -- hole = min(sz - (proglen + sizeof(*header)), PAGE_SIZE - sizeof(*header));
7659 -+ hole = PAGE_SIZE - (proglen & ~PAGE_MASK);
7660 -
7661 - /* insert a random number of int3 instructions before BPF code */
7662 -- *image_ptr = &header->image[prandom_u32() % hole];
7663 -+ *image_ptr = &header[prandom_u32() % hole];
7664 - return header;
7665 }
7666
7667 -@@ -864,7 +864,9 @@ common_load:
7668 + struct jit_context {
7669 +@@ -894,7 +900,9 @@ common_load:
7670 pr_err("bpf_jit_compile fatal error\n");
7671 return -EFAULT;
7672 }
7673 @@ -35191,65 +34191,22 @@ index c881ba8..71aca2e 100644
7674 }
7675 proglen += ilen;
7676 addrs[i] = proglen;
7677 -@@ -879,7 +881,7 @@ void bpf_jit_compile(struct bpf_prog *prog)
7678 -
7679 - void bpf_int_jit_compile(struct bpf_prog *prog)
7680 - {
7681 -- struct bpf_binary_header *header = NULL;
7682 -+ u8 *header = NULL;
7683 - int proglen, oldproglen = 0;
7684 - struct jit_context ctx = {};
7685 - u8 *image = NULL;
7686 -@@ -911,7 +913,7 @@ void bpf_int_jit_compile(struct bpf_prog *prog)
7687 - if (proglen <= 0) {
7688 - image = NULL;
7689 - if (header)
7690 -- module_free(NULL, header);
7691 -+ module_free_exec(NULL, image);
7692 - goto out;
7693 - }
7694 - if (image) {
7695 -@@ -935,7 +937,6 @@ void bpf_int_jit_compile(struct bpf_prog *prog)
7696 +@@ -966,7 +974,6 @@ void bpf_int_jit_compile(struct bpf_prog *prog)
7697
7698 if (image) {
7699 bpf_flush_icache(header, image + proglen);
7700 - set_memory_ro((unsigned long)header, header->pages);
7701 prog->bpf_func = (void *)image;
7702 - prog->jited = 1;
7703 + prog->jited = true;
7704 }
7705 -@@ -943,23 +944,15 @@ out:
7706 - kfree(addrs);
7707 - }
7708 +@@ -982,7 +989,6 @@ void bpf_jit_free(struct bpf_prog *fp)
7709 + if (!fp->jited)
7710 + goto free_filter;
7711
7712 --static void bpf_jit_free_deferred(struct work_struct *work)
7713 --{
7714 -- struct bpf_prog *fp = container_of(work, struct bpf_prog, work);
7715 -- unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
7716 -- struct bpf_binary_header *header = (void *)addr;
7717 --
7718 - set_memory_rw(addr, header->pages);
7719 -- module_free(NULL, header);
7720 -- kfree(fp);
7721 --}
7722 --
7723 - void bpf_jit_free(struct bpf_prog *fp)
7724 - {
7725 -- if (fp->jited) {
7726 -- INIT_WORK(&fp->work, bpf_jit_free_deferred);
7727 -- schedule_work(&fp->work);
7728 -- } else {
7729 -- kfree(fp);
7730 -- }
7731 -+ unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
7732 -+
7733 -+ if (!fp->jited)
7734 -+ goto free_filter;
7735 -+
7736 -+ module_free_exec(NULL, (void *)addr);
7737 -+
7738 -+free_filter:
7739 -+ bpf_prog_unlock_free(fp);
7740 - }
7741 + bpf_jit_binary_free(header);
7742 +
7743 + free_filter:
7744 diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c
7745 index 5d04be5..2beeaa2 100644
7746 --- a/arch/x86/oprofile/backtrace.c
7747 @@ -35287,7 +34244,7 @@ index 5d04be5..2beeaa2 100644
7748 if (depth)
7749 dump_trace(NULL, regs, (unsigned long *)stack, 0,
7750 diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
7751 -index 379e8bd..6386e09 100644
7752 +index 1d2e639..f6ef82a 100644
7753 --- a/arch/x86/oprofile/nmi_int.c
7754 +++ b/arch/x86/oprofile/nmi_int.c
7755 @@ -23,6 +23,7 @@
7756 @@ -35423,19 +34380,19 @@ index eb500c2..eab9e70 100644
7757 .callback = fix_broken_hp_bios_irq9,
7758 .ident = "HP Pavilion N5400 Series Laptop",
7759 diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
7760 -index c77b24a..c979855 100644
7761 +index 9b83b90..4112152 100644
7762 --- a/arch/x86/pci/pcbios.c
7763 +++ b/arch/x86/pci/pcbios.c
7764 @@ -79,7 +79,7 @@ union bios32 {
7765 static struct {
7766 unsigned long address;
7767 unsigned short segment;
7768 --} bios32_indirect = { 0, __KERNEL_CS };
7769 -+} bios32_indirect __read_only = { 0, __PCIBIOS_CS };
7770 +-} bios32_indirect __initdata = { 0, __KERNEL_CS };
7771 ++} bios32_indirect __initconst = { 0, __PCIBIOS_CS };
7772
7773 /*
7774 * Returns the entry point for the given service, NULL on error
7775 -@@ -92,37 +92,80 @@ static unsigned long bios32_service(unsigned long service)
7776 +@@ -92,37 +92,80 @@ static unsigned long __init bios32_service(unsigned long service)
7777 unsigned long length; /* %ecx */
7778 unsigned long entry; /* %edx */
7779 unsigned long flags;
7780 @@ -35526,9 +34483,9 @@ index c77b24a..c979855 100644
7781 -static int pci_bios_present;
7782 +static int pci_bios_present __read_only;
7783
7784 - static int check_pcibios(void)
7785 + static int __init check_pcibios(void)
7786 {
7787 -@@ -131,11 +174,13 @@ static int check_pcibios(void)
7788 +@@ -131,11 +174,13 @@ static int __init check_pcibios(void)
7789 unsigned long flags, pcibios_entry;
7790
7791 if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
7792 @@ -35545,7 +34502,7 @@ index c77b24a..c979855 100644
7793 "jc 1f\n\t"
7794 "xor %%ah, %%ah\n"
7795 "1:"
7796 -@@ -144,7 +189,8 @@ static int check_pcibios(void)
7797 +@@ -144,7 +189,8 @@ static int __init check_pcibios(void)
7798 "=b" (ebx),
7799 "=c" (ecx)
7800 : "1" (PCIBIOS_PCI_BIOS_PRESENT),
7801 @@ -35725,10 +34682,10 @@ index c77b24a..c979855 100644
7802 }
7803 EXPORT_SYMBOL(pcibios_set_irq_routing);
7804 diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
7805 -index 9ee3491..872192f 100644
7806 +index 40e7cda..c7e6672 100644
7807 --- a/arch/x86/platform/efi/efi_32.c
7808 +++ b/arch/x86/platform/efi/efi_32.c
7809 -@@ -59,11 +59,22 @@ void efi_call_phys_prelog(void)
7810 +@@ -61,11 +61,22 @@ void __init efi_call_phys_prolog(void)
7811 {
7812 struct desc_ptr gdt_descr;
7813
7814 @@ -35751,7 +34708,7 @@ index 9ee3491..872192f 100644
7815 gdt_descr.address = __pa(get_cpu_gdt_table(0));
7816 gdt_descr.size = GDT_SIZE - 1;
7817 load_gdt(&gdt_descr);
7818 -@@ -73,11 +84,24 @@ void efi_call_phys_epilog(void)
7819 +@@ -75,11 +86,24 @@ void __init efi_call_phys_epilog(void)
7820 {
7821 struct desc_ptr gdt_descr;
7822
7823 @@ -35777,10 +34734,10 @@ index 9ee3491..872192f 100644
7824
7825 local_irq_restore(efi_rt_eflags);
7826 diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
7827 -index 290d397..e09d270 100644
7828 +index 35aecb6..46177db 100644
7829 --- a/arch/x86/platform/efi/efi_64.c
7830 +++ b/arch/x86/platform/efi/efi_64.c
7831 -@@ -99,6 +99,11 @@ void __init efi_call_phys_prelog(void)
7832 +@@ -99,6 +99,11 @@ void __init efi_call_phys_prolog(void)
7833 vaddress = (unsigned long)__va(pgd * PGDIR_SIZE);
7834 set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), *pgd_offset_k(vaddress));
7835 }
7836 @@ -35804,7 +34761,7 @@ index 290d397..e09d270 100644
7837 __flush_tlb_all();
7838 local_irq_restore(efi_flags);
7839 early_code_mapping_set_exec(0);
7840 -@@ -146,8 +156,23 @@ int efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
7841 +@@ -146,8 +156,23 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
7842 unsigned npages;
7843 pgd_t *pgd;
7844
7845 @@ -35830,7 +34787,7 @@ index 290d397..e09d270 100644
7846 efi_scratch.efi_pgt = (pgd_t *)(unsigned long)real_mode_header->trampoline_pgd;
7847 pgd = __va(efi_scratch.efi_pgt);
7848 diff --git a/arch/x86/platform/efi/efi_stub_32.S b/arch/x86/platform/efi/efi_stub_32.S
7849 -index fbe66e6..eae5e38 100644
7850 +index 040192b..7d3300f 100644
7851 --- a/arch/x86/platform/efi/efi_stub_32.S
7852 +++ b/arch/x86/platform/efi/efi_stub_32.S
7853 @@ -6,7 +6,9 @@
7854 @@ -35853,7 +34810,7 @@ index fbe66e6..eae5e38 100644
7855 /*
7856 * 0. The function can only be called in Linux kernel. So CS has been
7857 @@ -36,10 +38,24 @@ ENTRY(efi_call_phys)
7858 - * The mapping of lower virtual memory has been created in prelog and
7859 + * The mapping of lower virtual memory has been created in prolog and
7860 * epilog.
7861 */
7862 - movl $1f, %edx
7863 @@ -36006,20 +34963,16 @@ index 1bbedc4..eb795b5 100644
7864
7865 static unsigned long __init intel_mid_calibrate_tsc(void)
7866 diff --git a/arch/x86/platform/intel-mid/intel_mid_weak_decls.h b/arch/x86/platform/intel-mid/intel_mid_weak_decls.h
7867 -index 46aa25c..59a68ed 100644
7868 +index 3c1c386..59a68ed 100644
7869 --- a/arch/x86/platform/intel-mid/intel_mid_weak_decls.h
7870 +++ b/arch/x86/platform/intel-mid/intel_mid_weak_decls.h
7871 -@@ -10,10 +10,9 @@
7872 - */
7873 -
7874 -
7875 --/* __attribute__((weak)) makes these declarations overridable */
7876 +@@ -13,6 +13,6 @@
7877 /* For every CPU addition a new get_<cpuname>_ops interface needs
7878 * to be added.
7879 */
7880 --extern void *get_penwell_ops(void) __attribute__((weak));
7881 --extern void *get_cloverview_ops(void) __attribute__((weak));
7882 --extern void *get_tangier_ops(void) __attribute__((weak));
7883 +-extern void *get_penwell_ops(void);
7884 +-extern void *get_cloverview_ops(void);
7885 +-extern void *get_tangier_ops(void);
7886 +extern const void *get_penwell_ops(void);
7887 +extern const void *get_cloverview_ops(void);
7888 +extern const void *get_tangier_ops(void);
7889 @@ -36250,7 +35203,7 @@ index 604a37e..e49702a 100644
7890 relocs-objs := relocs_32.o relocs_64.o relocs_common.o
7891 PHONY += relocs
7892 diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
7893 -index bbb1d22..e505211 100644
7894 +index a5efb21..97490e9 100644
7895 --- a/arch/x86/tools/relocs.c
7896 +++ b/arch/x86/tools/relocs.c
7897 @@ -1,5 +1,7 @@
7898 @@ -36503,6 +35456,19 @@ index 5a4affe..9e2d522 100644
7899 $(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS)
7900 GCOV_PROFILE := n
7901
7902 +diff --git a/arch/x86/vdso/vdso2c.h b/arch/x86/vdso/vdso2c.h
7903 +index 0224987..c7d65a5 100644
7904 +--- a/arch/x86/vdso/vdso2c.h
7905 ++++ b/arch/x86/vdso/vdso2c.h
7906 +@@ -12,7 +12,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
7907 + unsigned long load_size = -1; /* Work around bogus warning */
7908 + unsigned long mapping_size;
7909 + ELF(Ehdr) *hdr = (ELF(Ehdr) *)raw_addr;
7910 +- int i;
7911 ++ unsigned int i;
7912 + unsigned long j;
7913 + ELF(Shdr) *symtab_hdr = NULL, *strtab_hdr, *secstrings_hdr,
7914 + *alt_sec = NULL;
7915 diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
7916 index e904c27..b9eaa03 100644
7917 --- a/arch/x86/vdso/vdso32-setup.c
7918 @@ -36638,7 +35604,7 @@ index e88fda8..76ce7ce 100644
7919 This is the Linux Xen port. Enabling this will allow the
7920 kernel to boot in a paravirtualized environment under the
7921 diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
7922 -index c0cb11f..bed56ff 100644
7923 +index fac5e4f..5b5cf4f 100644
7924 --- a/arch/x86/xen/enlighten.c
7925 +++ b/arch/x86/xen/enlighten.c
7926 @@ -123,8 +123,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
7927 @@ -36726,7 +35692,7 @@ index c0cb11f..bed56ff 100644
7928 {
7929 if (pm_power_off)
7930 pm_power_off();
7931 -@@ -1568,7 +1564,17 @@ asmlinkage __visible void __init xen_start_kernel(void)
7932 +@@ -1573,7 +1569,17 @@ asmlinkage __visible void __init xen_start_kernel(void)
7933 __userpte_alloc_gfp &= ~__GFP_HIGHMEM;
7934
7935 /* Work out if we support NX */
7936 @@ -36745,7 +35711,7 @@ index c0cb11f..bed56ff 100644
7937
7938 /* Get mfn list */
7939 xen_build_dynamic_phys_to_machine();
7940 -@@ -1596,13 +1602,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
7941 +@@ -1601,13 +1607,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
7942
7943 machine_ops = xen_machine_ops;
7944
7945 @@ -36760,7 +35726,7 @@ index c0cb11f..bed56ff 100644
7946
7947 #ifdef CONFIG_ACPI_NUMA
7948 diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
7949 -index 16fb009..02b7801 100644
7950 +index a8a1a3d..8216142 100644
7951 --- a/arch/x86/xen/mmu.c
7952 +++ b/arch/x86/xen/mmu.c
7953 @@ -379,7 +379,7 @@ static pteval_t pte_mfn_to_pfn(pteval_t val)
7954 @@ -36772,7 +35738,7 @@ index 16fb009..02b7801 100644
7955 {
7956 if (val & _PAGE_PRESENT) {
7957 unsigned long pfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT;
7958 -@@ -1904,7 +1904,11 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
7959 +@@ -1867,7 +1867,11 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
7960 * L3_k[511] -> level2_fixmap_pgt */
7961 convert_pfn_mfn(level3_kernel_pgt);
7962
7963 @@ -36784,7 +35750,7 @@ index 16fb009..02b7801 100644
7964 convert_pfn_mfn(level2_fixmap_pgt);
7965 }
7966 /* We get [511][511] and have Xen's version of level2_kernel_pgt */
7967 -@@ -1929,11 +1933,16 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
7968 +@@ -1892,11 +1896,16 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
7969 set_page_prot(init_level4_pgt, PAGE_KERNEL_RO);
7970 set_page_prot(level3_ident_pgt, PAGE_KERNEL_RO);
7971 set_page_prot(level3_kernel_pgt, PAGE_KERNEL_RO);
7972 @@ -36801,7 +35767,7 @@ index 16fb009..02b7801 100644
7973
7974 /* Pin down new L4 */
7975 pin_pagetable_pfn(MMUEXT_PIN_L4_TABLE,
7976 -@@ -2117,6 +2126,7 @@ static void __init xen_post_allocator_init(void)
7977 +@@ -2080,6 +2089,7 @@ static void __init xen_post_allocator_init(void)
7978 pv_mmu_ops.set_pud = xen_set_pud;
7979 #if PAGETABLE_LEVELS == 4
7980 pv_mmu_ops.set_pgd = xen_set_pgd;
7981 @@ -36809,7 +35775,7 @@ index 16fb009..02b7801 100644
7982 #endif
7983
7984 /* This will work as long as patching hasn't happened yet
7985 -@@ -2195,6 +2205,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
7986 +@@ -2158,6 +2168,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
7987 .pud_val = PV_CALLEE_SAVE(xen_pud_val),
7988 .make_pud = PV_CALLEE_SAVE(xen_make_pud),
7989 .set_pgd = xen_set_pgd_hyper,
7990 @@ -36818,10 +35784,10 @@ index 16fb009..02b7801 100644
7991 .alloc_pud = xen_alloc_pmd_init,
7992 .release_pud = xen_release_pmd_init,
7993 diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
7994 -index 7005974..54fb05f 100644
7995 +index 4c071ae..00e7049 100644
7996 --- a/arch/x86/xen/smp.c
7997 +++ b/arch/x86/xen/smp.c
7998 -@@ -283,17 +283,13 @@ static void __init xen_smp_prepare_boot_cpu(void)
7999 +@@ -288,17 +288,13 @@ static void __init xen_smp_prepare_boot_cpu(void)
8000
8001 if (xen_pv_domain()) {
8002 if (!xen_feature(XENFEAT_writable_page_tables))
8003 @@ -36841,17 +35807,17 @@ index 7005974..54fb05f 100644
8004 #endif
8005
8006 xen_filter_cpu_maps();
8007 -@@ -372,7 +368,7 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
8008 +@@ -379,7 +375,7 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
8009 #ifdef CONFIG_X86_32
8010 /* Note: PVH is not yet supported on x86_32. */
8011 ctxt->user_regs.fs = __KERNEL_PERCPU;
8012 - ctxt->user_regs.gs = __KERNEL_STACK_CANARY;
8013 + savesegment(gs, ctxt->user_regs.gs);
8014 #endif
8015 - ctxt->user_regs.eip = (unsigned long)cpu_bringup_and_idle;
8016 + memset(&ctxt->fpu_ctxt, 0, sizeof(ctxt->fpu_ctxt));
8017
8018 -@@ -381,8 +377,8 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
8019 - if (!xen_feature(XENFEAT_auto_translated_physmap)) {
8020 +@@ -387,8 +383,8 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
8021 + ctxt->user_regs.eip = (unsigned long)cpu_bringup_and_idle;
8022 ctxt->flags = VGCF_IN_KERNEL;
8023 ctxt->user_regs.eflags = 0x1000; /* IOPL_RING1 */
8024 - ctxt->user_regs.ds = __USER_DS;
8025 @@ -36861,7 +35827,7 @@ index 7005974..54fb05f 100644
8026 ctxt->user_regs.ss = __KERNEL_DS;
8027
8028 xen_copy_trap_info(ctxt->trap_ctxt);
8029 -@@ -437,14 +433,13 @@ static int xen_cpu_up(unsigned int cpu, struct task_struct *idle)
8030 +@@ -446,14 +442,13 @@ static int xen_cpu_up(unsigned int cpu, struct task_struct *idle)
8031 int rc;
8032
8033 per_cpu(current_task, cpu) = idle;
8034 @@ -36878,7 +35844,7 @@ index 7005974..54fb05f 100644
8035
8036 xen_setup_runstate_info(cpu);
8037 xen_setup_timer(cpu);
8038 -@@ -720,7 +715,7 @@ static const struct smp_ops xen_smp_ops __initconst = {
8039 +@@ -732,7 +727,7 @@ static const struct smp_ops xen_smp_ops __initconst = {
8040
8041 void __init xen_smp_init(void)
8042 {
8043 @@ -36901,7 +35867,7 @@ index fd92a64..1f72641 100644
8044 #else
8045 movl %ss:xen_vcpu, %eax
8046 diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
8047 -index 485b695..fda3e7c 100644
8048 +index 674b2225..f1f5dc1 100644
8049 --- a/arch/x86/xen/xen-head.S
8050 +++ b/arch/x86/xen/xen-head.S
8051 @@ -39,6 +39,17 @@ ENTRY(startup_xen)
8052 @@ -36997,10 +35963,10 @@ index af00795..2bb8105 100644
8053 #define XCHAL_ICACHE_SIZE 32768 /* I-cache size in bytes or 0 */
8054 #define XCHAL_DCACHE_SIZE 32768 /* D-cache size in bytes or 0 */
8055 diff --git a/block/bio.c b/block/bio.c
8056 -index 3e6331d..f970433 100644
8057 +index 3e6e198..5c65199 100644
8058 --- a/block/bio.c
8059 +++ b/block/bio.c
8060 -@@ -1160,7 +1160,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
8061 +@@ -1163,7 +1163,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
8062 /*
8063 * Overflow, abort
8064 */
8065 @@ -37009,7 +35975,7 @@ index 3e6331d..f970433 100644
8066 return ERR_PTR(-EINVAL);
8067
8068 nr_pages += end - start;
8069 -@@ -1294,7 +1294,7 @@ static struct bio *__bio_map_user_iov(struct request_queue *q,
8070 +@@ -1297,7 +1297,7 @@ static struct bio *__bio_map_user_iov(struct request_queue *q,
8071 /*
8072 * Overflow, abort
8073 */
8074 @@ -37018,7 +35984,7 @@ index 3e6331d..f970433 100644
8075 return ERR_PTR(-EINVAL);
8076
8077 nr_pages += end - start;
8078 -@@ -1556,7 +1556,7 @@ static void bio_copy_kern_endio(struct bio *bio, int err)
8079 +@@ -1559,7 +1559,7 @@ static void bio_copy_kern_endio(struct bio *bio, int err)
8080 const int read = bio_data_dir(bio) == READ;
8081 struct bio_map_data *bmd = bio->bi_private;
8082 int i;
8083 @@ -37027,28 +35993,6 @@ index 3e6331d..f970433 100644
8084
8085 bio_for_each_segment_all(bvec, bio, i) {
8086 char *addr = page_address(bvec->bv_page);
8087 -diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
8088 -index e17da94..e01cce1 100644
8089 ---- a/block/blk-cgroup.c
8090 -+++ b/block/blk-cgroup.c
8091 -@@ -822,7 +822,7 @@ static void blkcg_css_free(struct cgroup_subsys_state *css)
8092 - static struct cgroup_subsys_state *
8093 - blkcg_css_alloc(struct cgroup_subsys_state *parent_css)
8094 - {
8095 -- static atomic64_t id_seq = ATOMIC64_INIT(0);
8096 -+ static atomic64_unchecked_t id_seq = ATOMIC64_INIT(0);
8097 - struct blkcg *blkcg;
8098 -
8099 - if (!parent_css) {
8100 -@@ -836,7 +836,7 @@ blkcg_css_alloc(struct cgroup_subsys_state *parent_css)
8101 -
8102 - blkcg->cfq_weight = CFQ_WEIGHT_DEFAULT;
8103 - blkcg->cfq_leaf_weight = CFQ_WEIGHT_DEFAULT;
8104 -- blkcg->id = atomic64_inc_return(&id_seq); /* root is 0, start from 1 */
8105 -+ blkcg->id = atomic64_inc_return_unchecked(&id_seq); /* root is 0, start from 1 */
8106 - done:
8107 - spin_lock_init(&blkcg->lock);
8108 - INIT_RADIX_TREE(&blkcg->blkg_tree, GFP_ATOMIC);
8109 diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c
8110 index 0736729..2ec3b48 100644
8111 --- a/block/blk-iopoll.c
8112 @@ -37089,7 +36033,7 @@ index 53b1737..08177d2e 100644
8113 struct list_head *cpu_list, local_list;
8114
8115 diff --git a/block/bsg.c b/block/bsg.c
8116 -index ff46add..c4ba8ee 100644
8117 +index 276e869..6fe4c61 100644
8118 --- a/block/bsg.c
8119 +++ b/block/bsg.c
8120 @@ -176,16 +176,24 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
8121 @@ -37120,7 +36064,7 @@ index ff46add..c4ba8ee 100644
8122 if (blk_verify_command(rq->cmd, has_write_perm))
8123 return -EPERM;
8124 diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
8125 -index 18b282c..050dbe5 100644
8126 +index f678c73..f35aa18 100644
8127 --- a/block/compat_ioctl.c
8128 +++ b/block/compat_ioctl.c
8129 @@ -156,7 +156,7 @@ static int compat_cdrom_generic_command(struct block_device *bdev, fmode_t mode,
8130 @@ -37142,7 +36086,7 @@ index 18b282c..050dbe5 100644
8131 err = -EFAULT;
8132 goto out;
8133 diff --git a/block/genhd.c b/block/genhd.c
8134 -index e6723bd..703e4ac 100644
8135 +index bd30606..bbc9b90 100644
8136 --- a/block/genhd.c
8137 +++ b/block/genhd.c
8138 @@ -469,21 +469,24 @@ static char *bdevt_str(dev_t devt, char *buf)
8139 @@ -37199,7 +36143,7 @@ index 56d08fd..2e07090 100644
8140 (u8 *) pte, count) < count) {
8141 kfree(pte);
8142 diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
8143 -index a6d6270..c4bb72f 100644
8144 +index b0c2a61..10bb6ec 100644
8145 --- a/block/scsi_ioctl.c
8146 +++ b/block/scsi_ioctl.c
8147 @@ -67,7 +67,7 @@ static int scsi_get_bus(struct request_queue *q, int __user *p)
8148 @@ -37233,7 +36177,7 @@ index a6d6270..c4bb72f 100644
8149 if (blk_verify_command(rq->cmd, mode & FMODE_WRITE))
8150 return -EPERM;
8151
8152 -@@ -432,6 +444,8 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
8153 +@@ -431,6 +443,8 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
8154 int err;
8155 unsigned int in_len, out_len, bytes, opcode, cmdlen;
8156 char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
8157 @@ -37242,7 +36186,7 @@ index a6d6270..c4bb72f 100644
8158
8159 if (!sic)
8160 return -EINVAL;
8161 -@@ -470,9 +484,18 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
8162 +@@ -469,9 +483,18 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
8163 */
8164 err = -EFAULT;
8165 rq->cmd_len = cmdlen;
8166 @@ -37284,20 +36228,6 @@ index e592c90..c566114 100644
8167
8168 static void cryptd_queue_worker(struct work_struct *work);
8169
8170 -diff --git a/crypto/cts.c b/crypto/cts.c
8171 -index 042223f..133f087 100644
8172 ---- a/crypto/cts.c
8173 -+++ b/crypto/cts.c
8174 -@@ -202,7 +202,8 @@ static int cts_cbc_decrypt(struct crypto_cts_ctx *ctx,
8175 - /* 5. Append the tail (BB - Ln) bytes of Xn (tmp) to Cn to create En */
8176 - memcpy(s + bsize + lastn, tmp + lastn, bsize - lastn);
8177 - /* 6. Decrypt En to create Pn-1 */
8178 -- memset(iv, 0, sizeof(iv));
8179 -+ memzero_explicit(iv, sizeof(iv));
8180 -+
8181 - sg_set_buf(&sgsrc[0], s + bsize, bsize);
8182 - sg_set_buf(&sgdst[0], d, bsize);
8183 - err = crypto_blkcipher_decrypt_iv(&lcldesc, sgdst, sgsrc, bsize);
8184 diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
8185 index 309d345..1632720 100644
8186 --- a/crypto/pcrypt.c
8187 @@ -37311,118 +36241,6 @@ index 309d345..1632720 100644
8188 if (!ret)
8189 kobject_uevent(&pinst->kobj, KOBJ_ADD);
8190
8191 -diff --git a/crypto/sha1_generic.c b/crypto/sha1_generic.c
8192 -index 4279480..7bb0474 100644
8193 ---- a/crypto/sha1_generic.c
8194 -+++ b/crypto/sha1_generic.c
8195 -@@ -64,7 +64,7 @@ int crypto_sha1_update(struct shash_desc *desc, const u8 *data,
8196 - src = data + done;
8197 - } while (done + SHA1_BLOCK_SIZE <= len);
8198 -
8199 -- memset(temp, 0, sizeof(temp));
8200 -+ memzero_explicit(temp, sizeof(temp));
8201 - partial = 0;
8202 - }
8203 - memcpy(sctx->buffer + partial, src, len - done);
8204 -diff --git a/crypto/sha256_generic.c b/crypto/sha256_generic.c
8205 -index 5433667..32c5e5e 100644
8206 ---- a/crypto/sha256_generic.c
8207 -+++ b/crypto/sha256_generic.c
8208 -@@ -210,10 +210,9 @@ static void sha256_transform(u32 *state, const u8 *input)
8209 -
8210 - /* clear any sensitive info... */
8211 - a = b = c = d = e = f = g = h = t1 = t2 = 0;
8212 -- memset(W, 0, 64 * sizeof(u32));
8213 -+ memzero_explicit(W, 64 * sizeof(u32));
8214 - }
8215 -
8216 --
8217 - static int sha224_init(struct shash_desc *desc)
8218 - {
8219 - struct sha256_state *sctx = shash_desc_ctx(desc);
8220 -@@ -316,7 +315,7 @@ static int sha224_final(struct shash_desc *desc, u8 *hash)
8221 - sha256_final(desc, D);
8222 -
8223 - memcpy(hash, D, SHA224_DIGEST_SIZE);
8224 -- memset(D, 0, SHA256_DIGEST_SIZE);
8225 -+ memzero_explicit(D, SHA256_DIGEST_SIZE);
8226 -
8227 - return 0;
8228 - }
8229 -diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
8230 -index 6ed124f..04d295a 100644
8231 ---- a/crypto/sha512_generic.c
8232 -+++ b/crypto/sha512_generic.c
8233 -@@ -238,7 +238,7 @@ static int sha384_final(struct shash_desc *desc, u8 *hash)
8234 - sha512_final(desc, D);
8235 -
8236 - memcpy(hash, D, 48);
8237 -- memset(D, 0, 64);
8238 -+ memzero_explicit(D, 64);
8239 -
8240 - return 0;
8241 - }
8242 -diff --git a/crypto/tgr192.c b/crypto/tgr192.c
8243 -index 8740355..3c7af0d 100644
8244 ---- a/crypto/tgr192.c
8245 -+++ b/crypto/tgr192.c
8246 -@@ -612,7 +612,7 @@ static int tgr160_final(struct shash_desc *desc, u8 * out)
8247 -
8248 - tgr192_final(desc, D);
8249 - memcpy(out, D, TGR160_DIGEST_SIZE);
8250 -- memset(D, 0, TGR192_DIGEST_SIZE);
8251 -+ memzero_explicit(D, TGR192_DIGEST_SIZE);
8252 -
8253 - return 0;
8254 - }
8255 -@@ -623,7 +623,7 @@ static int tgr128_final(struct shash_desc *desc, u8 * out)
8256 -
8257 - tgr192_final(desc, D);
8258 - memcpy(out, D, TGR128_DIGEST_SIZE);
8259 -- memset(D, 0, TGR192_DIGEST_SIZE);
8260 -+ memzero_explicit(D, TGR192_DIGEST_SIZE);
8261 -
8262 - return 0;
8263 - }
8264 -diff --git a/crypto/vmac.c b/crypto/vmac.c
8265 -index 2eb11a3..d84c24b 100644
8266 ---- a/crypto/vmac.c
8267 -+++ b/crypto/vmac.c
8268 -@@ -613,7 +613,7 @@ static int vmac_final(struct shash_desc *pdesc, u8 *out)
8269 - }
8270 - mac = vmac(ctx->partial, ctx->partial_size, nonce, NULL, ctx);
8271 - memcpy(out, &mac, sizeof(vmac_t));
8272 -- memset(&mac, 0, sizeof(vmac_t));
8273 -+ memzero_explicit(&mac, sizeof(vmac_t));
8274 - memset(&ctx->__vmac_ctx, 0, sizeof(struct vmac_ctx));
8275 - ctx->partial_size = 0;
8276 - return 0;
8277 -diff --git a/crypto/wp512.c b/crypto/wp512.c
8278 -index 180f1d6..ec64e77 100644
8279 ---- a/crypto/wp512.c
8280 -+++ b/crypto/wp512.c
8281 -@@ -1102,8 +1102,8 @@ static int wp384_final(struct shash_desc *desc, u8 *out)
8282 - u8 D[64];
8283 -
8284 - wp512_final(desc, D);
8285 -- memcpy (out, D, WP384_DIGEST_SIZE);
8286 -- memset (D, 0, WP512_DIGEST_SIZE);
8287 -+ memcpy(out, D, WP384_DIGEST_SIZE);
8288 -+ memzero_explicit(D, WP512_DIGEST_SIZE);
8289 -
8290 - return 0;
8291 - }
8292 -@@ -1113,8 +1113,8 @@ static int wp256_final(struct shash_desc *desc, u8 *out)
8293 - u8 D[64];
8294 -
8295 - wp512_final(desc, D);
8296 -- memcpy (out, D, WP256_DIGEST_SIZE);
8297 -- memset (D, 0, WP512_DIGEST_SIZE);
8298 -+ memcpy(out, D, WP256_DIGEST_SIZE);
8299 -+ memzero_explicit(D, WP512_DIGEST_SIZE);
8300 -
8301 - return 0;
8302 - }
8303 diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
8304 index 6921c7f..78e1af7 100644
8305 --- a/drivers/acpi/acpica/hwxfsleep.c
8306 @@ -37498,7 +36316,7 @@ index a83e3c6..c3d617f 100644
8307 bgrt_kobj = kobject_create_and_add("bgrt", acpi_kobj);
8308 if (!bgrt_kobj)
8309 diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
8310 -index 36eb42e..3b2f47e 100644
8311 +index 7556e7c..89a96bd 100644
8312 --- a/drivers/acpi/blacklist.c
8313 +++ b/drivers/acpi/blacklist.c
8314 @@ -51,7 +51,7 @@ struct acpi_blacklist_item {
8315 @@ -37534,6 +36352,35 @@ index c68e724..e863008 100644
8316 if (!(*ppos)) {
8317 /* parse the table header to get the table length */
8318 if (count <= sizeof(struct acpi_table_header))
8319 +diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
8320 +index 7db1931..302dd5f 100644
8321 +--- a/drivers/acpi/device_pm.c
8322 ++++ b/drivers/acpi/device_pm.c
8323 +@@ -1021,6 +1021,8 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);
8324 +
8325 + #endif /* CONFIG_PM_SLEEP */
8326 +
8327 ++static void acpi_dev_pm_detach(struct device *dev, bool power_off);
8328 ++
8329 + static struct dev_pm_domain acpi_general_pm_domain = {
8330 + .ops = {
8331 + #ifdef CONFIG_PM_RUNTIME
8332 +@@ -1039,6 +1041,7 @@ static struct dev_pm_domain acpi_general_pm_domain = {
8333 + .restore_early = acpi_subsys_resume_early,
8334 + #endif
8335 + },
8336 ++ .detach = acpi_dev_pm_detach
8337 + };
8338 +
8339 + /**
8340 +@@ -1108,7 +1111,6 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
8341 + acpi_device_wakeup(adev, ACPI_STATE_S0, false);
8342 + }
8343 +
8344 +- dev->pm_domain->detach = acpi_dev_pm_detach;
8345 + return 0;
8346 + }
8347 + EXPORT_SYMBOL_GPL(acpi_dev_pm_attach);
8348 diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
8349 index 17f9ec5..d9a455e 100644
8350 --- a/drivers/acpi/processor_idle.c
8351 @@ -37548,7 +36395,7 @@ index 17f9ec5..d9a455e 100644
8352
8353 if (!pr->flags.power_setup_done)
8354 diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
8355 -index 38cb978..352c761 100644
8356 +index 13e577c..cef11ee 100644
8357 --- a/drivers/acpi/sysfs.c
8358 +++ b/drivers/acpi/sysfs.c
8359 @@ -423,11 +423,11 @@ static u32 num_counters;
8360 @@ -37566,7 +36413,7 @@ index 38cb978..352c761 100644
8361 static void delete_gpe_attr_array(void)
8362 {
8363 diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
8364 -index b784e9d..a69a049 100644
8365 +index 97683e4..655f6ba 100644
8366 --- a/drivers/ata/libahci.c
8367 +++ b/drivers/ata/libahci.c
8368 @@ -1252,7 +1252,7 @@ int ahci_kick_engine(struct ata_port *ap)
8369 @@ -37579,7 +36426,7 @@ index b784e9d..a69a049 100644
8370 unsigned long timeout_msec)
8371 {
8372 diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
8373 -index 6f67490..f951ead 100644
8374 +index c5ba15a..75ec7a8 100644
8375 --- a/drivers/ata/libata-core.c
8376 +++ b/drivers/ata/libata-core.c
8377 @@ -99,7 +99,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
8378 @@ -37664,7 +36511,7 @@ index 5f4e0cc..ff2c347 100644
8379 extern int libata_fua;
8380 extern int libata_noacpi;
8381 diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
8382 -index 4edb1a8..84e1658 100644
8383 +index 38216b9..4ec6aeb 100644
8384 --- a/drivers/ata/pata_arasan_cf.c
8385 +++ b/drivers/ata/pata_arasan_cf.c
8386 @@ -865,7 +865,9 @@ static int arasan_cf_probe(struct platform_device *pdev)
8387 @@ -38296,7 +37143,7 @@ index 4217f29..88f547a 100644
8388 vcc->tx_quota = vcc->tx_quota * 3 / 4;
8389 printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
8390 diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
8391 -index fa7d7019..1e404c7 100644
8392 +index 93eaf8d..b4ca7da 100644
8393 --- a/drivers/atm/lanai.c
8394 +++ b/drivers/atm/lanai.c
8395 @@ -1303,7 +1303,7 @@ static void lanai_send_one_aal5(struct lanai_dev *lanai,
8396 @@ -38559,7 +37406,7 @@ index 9988ac9..7c52585 100644
8397 }
8398
8399 diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
8400 -index 7652e8d..db45069 100644
8401 +index 21b0bc6..b5f40ba 100644
8402 --- a/drivers/atm/solos-pci.c
8403 +++ b/drivers/atm/solos-pci.c
8404 @@ -838,7 +838,7 @@ static void solos_bh(unsigned long card_arg)
8405 @@ -38725,10 +37572,10 @@ index 25798db..15f130e 100644
8406 while (1) {
8407 spin_lock(&req_lock);
8408 diff --git a/drivers/base/node.c b/drivers/base/node.c
8409 -index d51c49c..28908df 100644
8410 +index 472168c..4af587e 100644
8411 --- a/drivers/base/node.c
8412 +++ b/drivers/base/node.c
8413 -@@ -623,7 +623,7 @@ static ssize_t print_nodes_state(enum node_states state, char *buf)
8414 +@@ -620,7 +620,7 @@ static ssize_t print_nodes_state(enum node_states state, char *buf)
8415 struct node_attr {
8416 struct device_attribute attr;
8417 enum node_states state;
8418 @@ -38738,44 +37585,32 @@ index d51c49c..28908df 100644
8419 static ssize_t show_node_state(struct device *dev,
8420 struct device_attribute *attr, char *buf)
8421 diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
8422 -index eee55c1..b8c9393 100644
8423 +index fb83d4a..4aa50ec 100644
8424 --- a/drivers/base/power/domain.c
8425 +++ b/drivers/base/power/domain.c
8426 -@@ -1821,9 +1821,9 @@ int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td)
8427 -
8428 - if (dev->power.subsys_data->domain_data) {
8429 - gpd_data = to_gpd_data(dev->power.subsys_data->domain_data);
8430 -- gpd_data->ops = (struct gpd_dev_ops){ NULL };
8431 -+ memset(&gpd_data->ops, 0, sizeof(gpd_data->ops));
8432 - if (clear_td)
8433 -- gpd_data->td = (struct gpd_timing_data){ 0 };
8434 -+ memset(&gpd_data->td, 0, sizeof(gpd_data->td));
8435 -
8436 - if (--gpd_data->refcount == 0) {
8437 - dev->power.subsys_data->domain_data = NULL;
8438 -@@ -1862,7 +1862,7 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state)
8439 +@@ -1725,7 +1725,7 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state)
8440 {
8441 struct cpuidle_driver *cpuidle_drv;
8442 - struct gpd_cpu_data *cpu_data;
8443 + struct gpd_cpuidle_data *cpuidle_data;
8444 - struct cpuidle_state *idle_state;
8445 + cpuidle_state_no_const *idle_state;
8446 int ret = 0;
8447
8448 if (IS_ERR_OR_NULL(genpd) || state < 0)
8449 -@@ -1930,7 +1930,7 @@ int pm_genpd_name_attach_cpuidle(const char *name, int state)
8450 +@@ -1793,7 +1793,7 @@ int pm_genpd_name_attach_cpuidle(const char *name, int state)
8451 int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd)
8452 {
8453 - struct gpd_cpu_data *cpu_data;
8454 + struct gpd_cpuidle_data *cpuidle_data;
8455 - struct cpuidle_state *idle_state;
8456 + cpuidle_state_no_const *idle_state;
8457 int ret = 0;
8458
8459 if (IS_ERR_OR_NULL(genpd))
8460 diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c
8461 -index 95b181d1..c4f0e19 100644
8462 +index a9d26ed..74b8405 100644
8463 --- a/drivers/base/power/sysfs.c
8464 +++ b/drivers/base/power/sysfs.c
8465 -@@ -185,7 +185,7 @@ static ssize_t rtpm_status_show(struct device *dev,
8466 +@@ -182,7 +182,7 @@ static ssize_t rtpm_status_show(struct device *dev,
8467 return -EIO;
8468 }
8469 }
8470 @@ -38785,10 +37620,10 @@ index 95b181d1..c4f0e19 100644
8471
8472 static DEVICE_ATTR(runtime_status, 0444, rtpm_status_show, NULL);
8473 diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
8474 -index eb1bd2e..2667d3a 100644
8475 +index c2744b3..08fac19 100644
8476 --- a/drivers/base/power/wakeup.c
8477 +++ b/drivers/base/power/wakeup.c
8478 -@@ -29,14 +29,14 @@ bool events_check_enabled __read_mostly;
8479 +@@ -32,14 +32,14 @@ static bool pm_abort_suspend __read_mostly;
8480 * They need to be modified together atomically, so it's better to use one
8481 * atomic variable to hold them both.
8482 */
8483 @@ -38805,7 +37640,7 @@ index eb1bd2e..2667d3a 100644
8484
8485 *cnt = (comb >> IN_PROGRESS_BITS);
8486 *inpr = comb & MAX_IN_PROGRESS;
8487 -@@ -401,7 +401,7 @@ static void wakeup_source_activate(struct wakeup_source *ws)
8488 +@@ -404,7 +404,7 @@ static void wakeup_source_activate(struct wakeup_source *ws)
8489 ws->start_prevent_time = ws->last_time;
8490
8491 /* Increment the counter of events in progress. */
8492 @@ -38814,7 +37649,7 @@ index eb1bd2e..2667d3a 100644
8493
8494 trace_wakeup_source_activate(ws->name, cec);
8495 }
8496 -@@ -527,7 +527,7 @@ static void wakeup_source_deactivate(struct wakeup_source *ws)
8497 +@@ -530,7 +530,7 @@ static void wakeup_source_deactivate(struct wakeup_source *ws)
8498 * Increment the counter of registered wakeup events and decrement the
8499 * couter of wakeup events in progress simultaneously.
8500 */
8501 @@ -38824,7 +37659,7 @@ index eb1bd2e..2667d3a 100644
8502
8503 split_counters(&cnt, &inpr);
8504 diff --git a/drivers/base/syscore.c b/drivers/base/syscore.c
8505 -index dbb8350..4762f4c 100644
8506 +index 8d98a32..61d3165 100644
8507 --- a/drivers/base/syscore.c
8508 +++ b/drivers/base/syscore.c
8509 @@ -22,7 +22,7 @@ static DEFINE_MUTEX(syscore_ops_lock);
8510 @@ -39153,7 +37988,7 @@ index be73e9d..7fbf140 100644
8511 cmdlist_t *reqQ;
8512 cmdlist_t *cmpQ;
8513 diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
8514 -index 426c97a..8c58607 100644
8515 +index 434c77d..6d3219a 100644
8516 --- a/drivers/block/drbd/drbd_bitmap.c
8517 +++ b/drivers/block/drbd/drbd_bitmap.c
8518 @@ -1036,7 +1036,7 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho
8519 @@ -39166,10 +38001,10 @@ index 426c97a..8c58607 100644
8520 }
8521
8522 diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
8523 -index 1a00001..c0d4253 100644
8524 +index 9b22f8f..f2932af 100644
8525 --- a/drivers/block/drbd/drbd_int.h
8526 +++ b/drivers/block/drbd/drbd_int.h
8527 -@@ -387,7 +387,7 @@ struct drbd_epoch {
8528 +@@ -385,7 +385,7 @@ struct drbd_epoch {
8529 struct drbd_connection *connection;
8530 struct list_head list;
8531 unsigned int barrier_nr;
8532 @@ -39178,7 +38013,7 @@ index 1a00001..c0d4253 100644
8533 atomic_t active; /* increased on every req. added, and dec on every finished. */
8534 unsigned long flags;
8535 };
8536 -@@ -948,7 +948,7 @@ struct drbd_device {
8537 +@@ -946,7 +946,7 @@ struct drbd_device {
8538 unsigned int al_tr_number;
8539 int al_tr_cycle;
8540 wait_queue_head_t seq_wait;
8541 @@ -39187,7 +38022,7 @@ index 1a00001..c0d4253 100644
8542 unsigned int peer_seq;
8543 spinlock_t peer_seq_lock;
8544 unsigned long comm_bm_set; /* communicated number of set bits. */
8545 -@@ -957,8 +957,8 @@ struct drbd_device {
8546 +@@ -955,8 +955,8 @@ struct drbd_device {
8547 struct mutex own_state_mutex;
8548 struct mutex *state_mutex; /* either own_state_mutex or first_peer_device(device)->connection->cstate_mutex */
8549 char congestion_reason; /* Why we where congested... */
8550 @@ -39198,7 +38033,7 @@ index 1a00001..c0d4253 100644
8551 int rs_last_sect_ev; /* counter to compare with */
8552 int rs_last_events; /* counter of read or write "events" (unit sectors)
8553 * on the lower level device when we last looked. */
8554 -@@ -1569,7 +1569,7 @@ static inline int drbd_setsockopt(struct socket *sock, int level, int optname,
8555 +@@ -1567,7 +1567,7 @@ static inline int drbd_setsockopt(struct socket *sock, int level, int optname,
8556 char __user *uoptval;
8557 int err;
8558
8559 @@ -39207,25 +38042,8 @@ index 1a00001..c0d4253 100644
8560
8561 set_fs(KERNEL_DS);
8562 if (level == SOL_SOCKET)
8563 -diff --git a/drivers/block/drbd/drbd_interval.c b/drivers/block/drbd/drbd_interval.c
8564 -index 04a14e0..5b8f0aa 100644
8565 ---- a/drivers/block/drbd/drbd_interval.c
8566 -+++ b/drivers/block/drbd/drbd_interval.c
8567 -@@ -67,9 +67,9 @@ static void augment_rotate(struct rb_node *rb_old, struct rb_node *rb_new)
8568 - }
8569 -
8570 - static const struct rb_augment_callbacks augment_callbacks = {
8571 -- augment_propagate,
8572 -- augment_copy,
8573 -- augment_rotate,
8574 -+ .propagate = augment_propagate,
8575 -+ .copy = augment_copy,
8576 -+ .rotate = augment_rotate,
8577 - };
8578 -
8579 - /**
8580 diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
8581 -index 9b465bb..00034ecf 100644
8582 +index 973c185..05d8b1a 100644
8583 --- a/drivers/block/drbd/drbd_main.c
8584 +++ b/drivers/block/drbd/drbd_main.c
8585 @@ -1328,7 +1328,7 @@ static int _drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet
8586 @@ -39289,7 +38107,7 @@ index 1cd47df..57c53c0 100644
8587 if (!msg)
8588 goto failed;
8589 diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
8590 -index 9342b8d..b6a6825 100644
8591 +index 6960fb0..215d76b 100644
8592 --- a/drivers/block/drbd/drbd_receiver.c
8593 +++ b/drivers/block/drbd/drbd_receiver.c
8594 @@ -870,7 +870,7 @@ int drbd_connected(struct drbd_peer_device *peer_device)
8595 @@ -39442,7 +38260,7 @@ index 9342b8d..b6a6825 100644
8596 static struct asender_cmd asender_tbl[] = {
8597 [P_PING] = { 0, got_Ping },
8598 diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
8599 -index 50776b3..1477c3f 100644
8600 +index d2d1f97..6a1188f 100644
8601 --- a/drivers/block/drbd/drbd_worker.c
8602 +++ b/drivers/block/drbd/drbd_worker.c
8603 @@ -408,7 +408,7 @@ static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector,
8604 @@ -39488,7 +38306,7 @@ index 6cb1beb..bf490f7 100644
8605 file_end_write(file);
8606 if (likely(bw == len))
8607 diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
8608 -index 02351e2..a9ea617 100644
8609 +index e2bb8af..44b8aef 100644
8610 --- a/drivers/block/nvme-core.c
8611 +++ b/drivers/block/nvme-core.c
8612 @@ -73,7 +73,6 @@ static LIST_HEAD(dev_list);
8613 @@ -39499,7 +38317,7 @@ index 02351e2..a9ea617 100644
8614
8615 static void nvme_reset_failed_dev(struct work_struct *ws);
8616
8617 -@@ -2925,6 +2924,10 @@ static struct pci_driver nvme_driver = {
8618 +@@ -2926,6 +2925,10 @@ static struct pci_driver nvme_driver = {
8619 .err_handler = &nvme_err_handler,
8620 };
8621
8622 @@ -39510,7 +38328,7 @@ index 02351e2..a9ea617 100644
8623 static int __init nvme_init(void)
8624 {
8625 int result;
8626 -@@ -2941,7 +2944,6 @@ static int __init nvme_init(void)
8627 +@@ -2942,7 +2945,6 @@ static int __init nvme_init(void)
8628 else if (result > 0)
8629 nvme_major = result;
8630
8631 @@ -39519,7 +38337,7 @@ index 02351e2..a9ea617 100644
8632 if (result)
8633 goto unregister_blkdev;
8634 diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
8635 -index 758ac44..58087fd 100644
8636 +index 09e628da..7607aaa 100644
8637 --- a/drivers/block/pktcdvd.c
8638 +++ b/drivers/block/pktcdvd.c
8639 @@ -108,7 +108,7 @@ static int pkt_seq_show(struct seq_file *m, void *p);
8640 @@ -39531,7 +38349,7 @@ index 758ac44..58087fd 100644
8641 }
8642
8643 /*
8644 -@@ -1888,7 +1888,7 @@ static noinline_for_stack int pkt_probe_settings(struct pktcdvd_device *pd)
8645 +@@ -1890,7 +1890,7 @@ static noinline_for_stack int pkt_probe_settings(struct pktcdvd_device *pd)
8646 return -EROFS;
8647 }
8648 pd->settings.fp = ti.fp;
8649 @@ -39624,7 +38442,7 @@ index f038dba..bb74c08 100644
8650 int err;
8651
8652 diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
8653 -index 898b84b..86f74b9 100644
8654 +index 5d28a45..a538f90 100644
8655 --- a/drivers/cdrom/cdrom.c
8656 +++ b/drivers/cdrom/cdrom.c
8657 @@ -610,7 +610,6 @@ int register_cdrom(struct cdrom_device_info *cdi)
8658 @@ -39688,7 +38506,7 @@ index 584bc31..e64a12c 100644
8659
8660 static int gdrom_bdops_open(struct block_device *bdev, fmode_t mode)
8661 diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
8662 -index 6e9f74a..50c7cea 100644
8663 +index efefd12..4f1d494 100644
8664 --- a/drivers/char/Kconfig
8665 +++ b/drivers/char/Kconfig
8666 @@ -8,7 +8,8 @@ source "drivers/tty/Kconfig"
8667 @@ -39769,21 +38587,8 @@ index d5d4cd8..22d561d 100644
8668 struct hpet_info *info)
8669 {
8670 struct hpet_timer __iomem *timer;
8671 -diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c
8672 -index 86fe45c..c0ea948 100644
8673 ---- a/drivers/char/hw_random/intel-rng.c
8674 -+++ b/drivers/char/hw_random/intel-rng.c
8675 -@@ -314,7 +314,7 @@ PFX "RNG, try using the 'no_fwh_detect' option.\n";
8676 -
8677 - if (no_fwh_detect)
8678 - return -ENODEV;
8679 -- printk(warning);
8680 -+ printk("%s", warning);
8681 - return -EBUSY;
8682 - }
8683 -
8684 diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
8685 -index e6db938..835e3a2 100644
8686 +index f816211..89eadea 100644
8687 --- a/drivers/char/ipmi/ipmi_msghandler.c
8688 +++ b/drivers/char/ipmi/ipmi_msghandler.c
8689 @@ -438,7 +438,7 @@ struct ipmi_smi {
8690 @@ -39807,7 +38612,7 @@ index e6db938..835e3a2 100644
8691
8692 static int is_lan_addr(struct ipmi_addr *addr)
8693 {
8694 -@@ -2926,7 +2926,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
8695 +@@ -2925,7 +2925,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
8696 INIT_LIST_HEAD(&intf->cmd_rcvrs);
8697 init_waitqueue_head(&intf->waitq);
8698 for (i = 0; i < IPMI_NUM_STATS; i++)
8699 @@ -39817,7 +38622,7 @@ index e6db938..835e3a2 100644
8700 intf->proc_dir = NULL;
8701
8702 diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
8703 -index 5d66568..c9d93c3 100644
8704 +index 5c4e1f6..0ea58f9 100644
8705 --- a/drivers/char/ipmi/ipmi_si_intf.c
8706 +++ b/drivers/char/ipmi/ipmi_si_intf.c
8707 @@ -285,7 +285,7 @@ struct smi_info {
8708 @@ -39841,7 +38646,7 @@ index 5d66568..c9d93c3 100644
8709
8710 #define SI_MAX_PARMS 4
8711
8712 -@@ -3374,7 +3374,7 @@ static int try_smi_init(struct smi_info *new_smi)
8713 +@@ -3377,7 +3377,7 @@ static int try_smi_init(struct smi_info *new_smi)
8714 atomic_set(&new_smi->req_events, 0);
8715 new_smi->run_to_completion = false;
8716 for (i = 0; i < SI_NUM_STATS; i++)
8717 @@ -39851,7 +38656,7 @@ index 5d66568..c9d93c3 100644
8718 new_smi->interrupt_disabled = true;
8719 atomic_set(&new_smi->stop_operation, 0);
8720 diff --git a/drivers/char/mem.c b/drivers/char/mem.c
8721 -index 917403f..dddd899 100644
8722 +index 524b707..29d07c1 100644
8723 --- a/drivers/char/mem.c
8724 +++ b/drivers/char/mem.c
8725 @@ -18,6 +18,7 @@
8726 @@ -39976,7 +38781,7 @@ index 917403f..dddd899 100644
8727 return -EFAULT;
8728 buf += sz;
8729 p += sz;
8730 -@@ -827,6 +874,9 @@ static const struct memdev {
8731 +@@ -797,6 +844,9 @@ static const struct memdev {
8732 #ifdef CONFIG_PRINTK
8733 [11] = { "kmsg", 0644, &kmsg_fops, NULL },
8734 #endif
8735 @@ -39986,7 +38791,7 @@ index 917403f..dddd899 100644
8736 };
8737
8738 static int memory_open(struct inode *inode, struct file *filp)
8739 -@@ -898,7 +948,7 @@ static int __init chr_dev_init(void)
8740 +@@ -868,7 +918,7 @@ static int __init chr_dev_init(void)
8741 continue;
8742
8743 device_create(mem_class, NULL, MKDEV(MEM_MAJOR, minor),
8744 @@ -40081,7 +38886,7 @@ index 0ea9986..e7b07e4 100644
8745
8746 if (cmd != SIOCWANDEV)
8747 diff --git a/drivers/char/random.c b/drivers/char/random.c
8748 -index 8c86a95..7c499f3 100644
8749 +index 04645c0..560e350 100644
8750 --- a/drivers/char/random.c
8751 +++ b/drivers/char/random.c
8752 @@ -289,9 +289,6 @@
8753 @@ -40236,7 +39041,7 @@ index 3a56a13..f8cbd25 100644
8754 return 0;
8755 }
8756 diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
8757 -index b585b47..488f43e 100644
8758 +index cf7a561..c319ce0 100644
8759 --- a/drivers/char/virtio_console.c
8760 +++ b/drivers/char/virtio_console.c
8761 @@ -684,7 +684,7 @@ static ssize_t fill_readbuf(struct port *port, char *out_buf, size_t out_count,
8762 @@ -40380,11 +39185,35 @@ index b0c18ed..1713a80 100644
8763
8764 cpu_notifier_register_begin();
8765
8766 +diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
8767 +index f657c57..ada41b6 100644
8768 +--- a/drivers/cpufreq/cpufreq-dt.c
8769 ++++ b/drivers/cpufreq/cpufreq-dt.c
8770 +@@ -345,6 +345,7 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
8771 + struct device *cpu_dev;
8772 + struct regulator *cpu_reg;
8773 + struct clk *cpu_clk;
8774 ++ void *fptr;
8775 + int ret;
8776 +
8777 + /*
8778 +@@ -362,7 +363,10 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
8779 + if (!IS_ERR(cpu_reg))
8780 + regulator_put(cpu_reg);
8781 +
8782 +- dt_cpufreq_driver.driver_data = dev_get_platdata(&pdev->dev);
8783 ++ fptr = dev_get_platdata(&pdev->dev);
8784 ++ pax_open_kernel();
8785 ++ *(void **)&dt_cpufreq_driver.driver_data = fptr;
8786 ++ pax_close_kernel();
8787 +
8788 + ret = cpufreq_register_driver(&dt_cpufreq_driver);
8789 + if (ret)
8790 diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
8791 -index 07c8276..38bd07c 100644
8792 +index 4473eba..a4c9dc2 100644
8793 --- a/drivers/cpufreq/cpufreq.c
8794 +++ b/drivers/cpufreq/cpufreq.c
8795 -@@ -2107,7 +2107,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)
8796 +@@ -2122,7 +2122,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)
8797 }
8798
8799 mutex_lock(&cpufreq_governor_mutex);
8800 @@ -40393,7 +39222,7 @@ index 07c8276..38bd07c 100644
8801 mutex_unlock(&cpufreq_governor_mutex);
8802 return;
8803 }
8804 -@@ -2323,7 +2323,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
8805 +@@ -2338,7 +2338,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
8806 return NOTIFY_OK;
8807 }
8808
8809 @@ -40402,7 +39231,7 @@ index 07c8276..38bd07c 100644
8810 .notifier_call = cpufreq_cpu_callback,
8811 };
8812
8813 -@@ -2363,13 +2363,17 @@ int cpufreq_boost_trigger_state(int state)
8814 +@@ -2378,13 +2378,17 @@ int cpufreq_boost_trigger_state(int state)
8815 return 0;
8816
8817 write_lock_irqsave(&cpufreq_driver_lock, flags);
8818 @@ -40422,7 +39251,7 @@ index 07c8276..38bd07c 100644
8819 write_unlock_irqrestore(&cpufreq_driver_lock, flags);
8820
8821 pr_err("%s: Cannot %s BOOST\n",
8822 -@@ -2426,8 +2430,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
8823 +@@ -2441,8 +2445,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
8824
8825 pr_debug("trying to register driver %s\n", driver_data->name);
8826
8827 @@ -40436,7 +39265,7 @@ index 07c8276..38bd07c 100644
8828
8829 write_lock_irqsave(&cpufreq_driver_lock, flags);
8830 if (cpufreq_driver) {
8831 -@@ -2442,8 +2449,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
8832 +@@ -2457,8 +2464,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
8833 * Check if driver provides function to enable boost -
8834 * if not, use cpufreq_boost_set_sw as default
8835 */
8836 @@ -40790,7 +39619,7 @@ index e431d11..d0b997e 100644
8837 snprintf(state->name, CPUIDLE_NAME_LEN, "POLL");
8838 snprintf(state->desc, CPUIDLE_DESC_LEN, "CPUIDLE CORE POLL IDLE");
8839 diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c
8840 -index ca89412..a7b9c49 100644
8841 +index fb9f511..213e6cc 100644
8842 --- a/drivers/cpuidle/governor.c
8843 +++ b/drivers/cpuidle/governor.c
8844 @@ -87,7 +87,7 @@ int cpuidle_register_governor(struct cpuidle_governor *gov)
8845 @@ -40838,7 +39667,7 @@ index 8d2a772..33826c9 100644
8846 err = pci_request_regions(pdev, name);
8847 if (err)
8848 diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
8849 -index 9f90369..bfcacdb 100644
8850 +index 30b538d8..1610d75 100644
8851 --- a/drivers/devfreq/devfreq.c
8852 +++ b/drivers/devfreq/devfreq.c
8853 @@ -673,7 +673,7 @@ int devfreq_add_governor(struct devfreq_governor *governor)
8854 @@ -41206,10 +40035,10 @@ index 5b53d61..72cee96 100644
8855 EXPORT_SYMBOL_GPL(cper_next_record_id);
8856
8857 diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
8858 -index 64ecbb5..d921eb3 100644
8859 +index 8590099..d83627a 100644
8860 --- a/drivers/firmware/efi/efi.c
8861 +++ b/drivers/firmware/efi/efi.c
8862 -@@ -126,14 +126,16 @@ static struct attribute_group efi_subsys_attr_group = {
8863 +@@ -148,14 +148,16 @@ static struct attribute_group efi_subsys_attr_group = {
8864 };
8865
8866 static struct efivars generic_efivars;
8867 @@ -41313,10 +40142,10 @@ index dbf28fa..04dad4e 100644
8868 return -EINVAL;
8869 }
8870 diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
8871 -index c68d037..2f4f9a9 100644
8872 +index e8e98ca..10f416e 100644
8873 --- a/drivers/gpio/gpiolib.c
8874 +++ b/drivers/gpio/gpiolib.c
8875 -@@ -529,8 +529,10 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)
8876 +@@ -537,8 +537,10 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)
8877 }
8878
8879 if (gpiochip->irqchip) {
8880 @@ -41329,7 +40158,7 @@ index c68d037..2f4f9a9 100644
8881 gpiochip->irqchip = NULL;
8882 }
8883 }
8884 -@@ -596,8 +598,11 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip,
8885 +@@ -604,8 +606,11 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip,
8886 gpiochip->irqchip = NULL;
8887 return -EINVAL;
8888 }
8889 @@ -41344,10 +40173,10 @@ index c68d037..2f4f9a9 100644
8890 /*
8891 * Prepare the mapping since the irqchip shall be orthogonal to
8892 diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
8893 -index 90e7730..3b41807 100644
8894 +index e79c8d3..a9370bc 100644
8895 --- a/drivers/gpu/drm/drm_crtc.c
8896 +++ b/drivers/gpu/drm/drm_crtc.c
8897 -@@ -3861,7 +3861,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
8898 +@@ -3900,7 +3900,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
8899 goto done;
8900 }
8901
8902 @@ -41357,10 +40186,10 @@ index 90e7730..3b41807 100644
8903 ret = -EFAULT;
8904 goto done;
8905 diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
8906 -index 3242e20..7e4f621 100644
8907 +index bc3da32..7289357 100644
8908 --- a/drivers/gpu/drm/drm_drv.c
8909 +++ b/drivers/gpu/drm/drm_drv.c
8910 -@@ -463,7 +463,7 @@ void drm_unplug_dev(struct drm_device *dev)
8911 +@@ -443,7 +443,7 @@ void drm_unplug_dev(struct drm_device *dev)
8912
8913 drm_device_set_unplugged(dev);
8914
8915 @@ -41370,7 +40199,7 @@ index 3242e20..7e4f621 100644
8916 }
8917 mutex_unlock(&drm_global_mutex);
8918 diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
8919 -index 79d5221..7ff73496 100644
8920 +index ed7bc68..0d536af 100644
8921 --- a/drivers/gpu/drm/drm_fops.c
8922 +++ b/drivers/gpu/drm/drm_fops.c
8923 @@ -89,7 +89,7 @@ int drm_open(struct inode *inode, struct file *filp)
8924 @@ -41391,7 +40220,7 @@ index 79d5221..7ff73496 100644
8925 drm_minor_release(minor);
8926 return retcode;
8927 }
8928 -@@ -384,7 +384,7 @@ int drm_release(struct inode *inode, struct file *filp)
8929 +@@ -376,7 +376,7 @@ int drm_release(struct inode *inode, struct file *filp)
8930
8931 mutex_lock(&drm_global_mutex);
8932
8933 @@ -41400,7 +40229,7 @@ index 79d5221..7ff73496 100644
8934
8935 mutex_lock(&dev->struct_mutex);
8936 list_del(&file_priv->lhead);
8937 -@@ -397,10 +397,10 @@ int drm_release(struct inode *inode, struct file *filp)
8938 +@@ -389,10 +389,10 @@ int drm_release(struct inode *inode, struct file *filp)
8939 * Begin inline drm_release
8940 */
8941
8942 @@ -41413,7 +40242,7 @@ index 79d5221..7ff73496 100644
8943
8944 /* Release any auth tokens that might point to this file_priv,
8945 (do that under the drm_global_mutex) */
8946 -@@ -471,7 +471,7 @@ int drm_release(struct inode *inode, struct file *filp)
8947 +@@ -465,7 +465,7 @@ int drm_release(struct inode *inode, struct file *filp)
8948 * End inline drm_release
8949 */
8950
8951 @@ -41484,10 +40313,10 @@ index 3d2e91c..d31c4c9 100644
8952 item->object = NULL;
8953 }
8954 diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c
8955 -index ecaf0fa..a49cee9 100644
8956 +index 51efebd..2b70935 100644
8957 --- a/drivers/gpu/drm/drm_info.c
8958 +++ b/drivers/gpu/drm/drm_info.c
8959 -@@ -73,10 +73,13 @@ int drm_vm_info(struct seq_file *m, void *data)
8960 +@@ -76,10 +76,13 @@ int drm_vm_info(struct seq_file *m, void *data)
8961 struct drm_local_map *map;
8962 struct drm_map_list *r_list;
8963
8964 @@ -41505,7 +40334,7 @@ index ecaf0fa..a49cee9 100644
8965 const char *type;
8966 int i;
8967
8968 -@@ -87,7 +90,7 @@ int drm_vm_info(struct seq_file *m, void *data)
8969 +@@ -90,7 +93,7 @@ int drm_vm_info(struct seq_file *m, void *data)
8970 map = r_list->map;
8971 if (!map)
8972 continue;
8973 @@ -41514,18 +40343,6 @@ index ecaf0fa..a49cee9 100644
8974 type = "??";
8975 else
8976 type = types[map->type];
8977 -@@ -259,7 +262,11 @@ int drm_vma_info(struct seq_file *m, void *data)
8978 - vma->vm_flags & VM_MAYSHARE ? 's' : 'p',
8979 - vma->vm_flags & VM_LOCKED ? 'l' : '-',
8980 - vma->vm_flags & VM_IO ? 'i' : '-',
8981 -+#ifdef CONFIG_GRKERNSEC_HIDESYM
8982 -+ 0);
8983 -+#else
8984 - vma->vm_pgoff);
8985 -+#endif
8986 -
8987 - #if defined(__i386__)
8988 - pgprot = pgprot_val(vma->vm_page_prot);
8989 diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
8990 index 2f4c4343..dd12cd2 100644
8991 --- a/drivers/gpu/drm/drm_ioc32.c
8992 @@ -41579,7 +40396,7 @@ index 2f4c4343..dd12cd2 100644
8993 ret = drm_ioctl(filp, cmd, arg);
8994
8995 diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
8996 -index 40be746..fd78faf 100644
8997 +index 00587a1..57a65ca 100644
8998 --- a/drivers/gpu/drm/drm_ioctl.c
8999 +++ b/drivers/gpu/drm/drm_ioctl.c
9000 @@ -642,7 +642,7 @@ long drm_ioctl(struct file *filp,
9001 @@ -41592,10 +40409,10 @@ index 40be746..fd78faf 100644
9002 int retcode = -EINVAL;
9003 char stack_kdata[128];
9004 diff --git a/drivers/gpu/drm/i810/i810_drv.h b/drivers/gpu/drm/i810/i810_drv.h
9005 -index d4d16ed..8fb0b51 100644
9006 +index 93ec5dc..82acbaf 100644
9007 --- a/drivers/gpu/drm/i810/i810_drv.h
9008 +++ b/drivers/gpu/drm/i810/i810_drv.h
9009 -@@ -108,8 +108,8 @@ typedef struct drm_i810_private {
9010 +@@ -110,8 +110,8 @@ typedef struct drm_i810_private {
9011 int page_flipping;
9012
9013 wait_queue_head_t irq_queue;
9014 @@ -41607,10 +40424,10 @@ index d4d16ed..8fb0b51 100644
9015 int front_offset;
9016 } drm_i810_private_t;
9017 diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
9018 -index 2d23e57..1c61d41 100644
9019 +index 318ade9..1f5de55 100644
9020 --- a/drivers/gpu/drm/i915/i915_dma.c
9021 +++ b/drivers/gpu/drm/i915/i915_dma.c
9022 -@@ -1292,7 +1292,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
9023 +@@ -1294,7 +1294,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
9024 * locking inversion with the driver load path. And the access here is
9025 * completely racy anyway. So don't bother with locking for now.
9026 */
9027 @@ -41620,21 +40437,24 @@ index 2d23e57..1c61d41 100644
9028
9029 static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {
9030 diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
9031 -index 60998fc..3b244bc 100644
9032 +index 1a0611b..dd1fbfc 100644
9033 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
9034 +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
9035 -@@ -891,9 +891,9 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec)
9036 -
9037 +@@ -866,12 +866,12 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec)
9038 static int
9039 - validate_exec_list(struct drm_i915_gem_exec_object2 *exec,
9040 + validate_exec_list(struct drm_device *dev,
9041 + struct drm_i915_gem_exec_object2 *exec,
9042 - int count)
9043 + unsigned int count)
9044 {
9045 -- int i;
9046 -+ unsigned int i;
9047 unsigned relocs_total = 0;
9048 unsigned relocs_max = UINT_MAX / sizeof(struct drm_i915_gem_relocation_entry);
9049 + unsigned invalid_flags;
9050 +- int i;
9051 ++ unsigned int i;
9052
9053 + invalid_flags = __EXEC_OBJECT_UNKNOWN_FLAGS;
9054 + if (USES_FULL_PPGTT(dev))
9055 diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
9056 index 2e0613e..a8b94d9 100644
9057 --- a/drivers/gpu/drm/i915/i915_ioc32.c
9058 @@ -41671,10 +40491,10 @@ index 2e0613e..a8b94d9 100644
9059
9060 return ret;
9061 diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
9062 -index 8663c21..46f2cbf 100644
9063 +index 9cb5c95..9228666 100644
9064 --- a/drivers/gpu/drm/i915/intel_display.c
9065 +++ b/drivers/gpu/drm/i915/intel_display.c
9066 -@@ -12439,13 +12439,13 @@ struct intel_quirk {
9067 +@@ -12811,13 +12811,13 @@ struct intel_quirk {
9068 int subsystem_vendor;
9069 int subsystem_device;
9070 void (*hook)(struct drm_device *dev);
9071 @@ -41690,7 +40510,7 @@ index 8663c21..46f2cbf 100644
9072
9073 static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
9074 {
9075 -@@ -12453,18 +12453,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
9076 +@@ -12825,18 +12825,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
9077 return 1;
9078 }
9079
9080 @@ -41722,10 +40542,10 @@ index 8663c21..46f2cbf 100644
9081 },
9082 };
9083 diff --git a/drivers/gpu/drm/mga/mga_drv.h b/drivers/gpu/drm/mga/mga_drv.h
9084 -index fe45321..836fdca 100644
9085 +index b4a2014..219ab78 100644
9086 --- a/drivers/gpu/drm/mga/mga_drv.h
9087 +++ b/drivers/gpu/drm/mga/mga_drv.h
9088 -@@ -120,9 +120,9 @@ typedef struct drm_mga_private {
9089 +@@ -122,9 +122,9 @@ typedef struct drm_mga_private {
9090 u32 clear_cmd;
9091 u32 maccess;
9092
9093 @@ -41826,10 +40646,10 @@ index dae2c96..324dbe4 100644
9094 #define BIT_TABLE(id, funcid) ((struct bit_table){ id, parse_bit_##funcid##_tbl_entry })
9095
9096 diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h
9097 -index b02b024..aed7bad 100644
9098 +index 8ae36f2..1147a30 100644
9099 --- a/drivers/gpu/drm/nouveau/nouveau_drm.h
9100 +++ b/drivers/gpu/drm/nouveau/nouveau_drm.h
9101 -@@ -119,7 +119,6 @@ struct nouveau_drm {
9102 +@@ -121,7 +121,6 @@ struct nouveau_drm {
9103 struct drm_global_reference mem_global_ref;
9104 struct ttm_bo_global_ref bo_global_ref;
9105 struct ttm_bo_device bdev;
9106 @@ -41851,10 +40671,10 @@ index 462679a..88e32a7 100644
9107
9108 if (nr < DRM_COMMAND_BASE)
9109 diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c
9110 -index 53874b7..1db0a68 100644
9111 +index 753a6de..dd66b98 100644
9112 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
9113 +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
9114 -@@ -127,11 +127,11 @@ nouveau_vram_manager_debug(struct ttm_mem_type_manager *man, const char *prefix)
9115 +@@ -126,11 +126,11 @@ nouveau_vram_manager_debug(struct ttm_mem_type_manager *man, const char *prefix)
9116 }
9117
9118 const struct ttm_mem_type_manager_func nouveau_vram_manager = {
9119 @@ -41871,7 +40691,7 @@ index 53874b7..1db0a68 100644
9120 };
9121
9122 static int
9123 -@@ -196,11 +196,11 @@ nouveau_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix)
9124 +@@ -194,11 +194,11 @@ nouveau_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix)
9125 }
9126
9127 const struct ttm_mem_type_manager_func nouveau_gart_manager = {
9128 @@ -41888,7 +40708,7 @@ index 53874b7..1db0a68 100644
9129 };
9130
9131 /*XXX*/
9132 -@@ -270,11 +270,11 @@ nv04_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix)
9133 +@@ -267,11 +267,11 @@ nv04_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix)
9134 }
9135
9136 const struct ttm_mem_type_manager_func nv04_gart_manager = {
9137 @@ -41919,7 +40739,7 @@ index c7592ec..dd45ebc 100644
9138
9139 static const struct vga_switcheroo_client_ops
9140 diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
9141 -index eb89653..613cf71 100644
9142 +index 9782364..89bd954 100644
9143 --- a/drivers/gpu/drm/qxl/qxl_cmd.c
9144 +++ b/drivers/gpu/drm/qxl/qxl_cmd.c
9145 @@ -285,27 +285,27 @@ static int wait_for_io_cmd_user(struct qxl_device *qdev, uint8_t val, long port,
9146 @@ -41957,7 +40777,7 @@ index eb89653..613cf71 100644
9147 if (ret > 0)
9148 ret = 0;
9149 diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c b/drivers/gpu/drm/qxl/qxl_debugfs.c
9150 -index c3c2bbd..bc3c0fb 100644
9151 +index 6911b8c..89d6867 100644
9152 --- a/drivers/gpu/drm/qxl/qxl_debugfs.c
9153 +++ b/drivers/gpu/drm/qxl/qxl_debugfs.c
9154 @@ -42,10 +42,10 @@ qxl_debugfs_irq_received(struct seq_file *m, void *data)
9155 @@ -41976,7 +40796,7 @@ index c3c2bbd..bc3c0fb 100644
9156 return 0;
9157 }
9158 diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
9159 -index 36ed40b..0397633 100644
9160 +index 7c6cafe..460f542 100644
9161 --- a/drivers/gpu/drm/qxl/qxl_drv.h
9162 +++ b/drivers/gpu/drm/qxl/qxl_drv.h
9163 @@ -290,10 +290,10 @@ struct qxl_device {
9164 @@ -42074,7 +40894,7 @@ index 0bf1e20..42a7310 100644
9165 ret = drm_irq_install(qdev->ddev, qdev->ddev->pdev->irq);
9166 qdev->ram_header->int_mask = QXL_INTERRUPT_MASK;
9167 diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
9168 -index 71a1bae..cb1f103 100644
9169 +index 0cbc4c9..0e46686 100644
9170 --- a/drivers/gpu/drm/qxl/qxl_ttm.c
9171 +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
9172 @@ -103,7 +103,7 @@ static void qxl_ttm_global_fini(struct qxl_device *qdev)
9173 @@ -42097,7 +40917,7 @@ index 71a1bae..cb1f103 100644
9174 }
9175 vma->vm_ops = &qxl_ttm_vm_ops;
9176 return 0;
9177 -@@ -555,25 +557,23 @@ static int qxl_mm_dump_table(struct seq_file *m, void *data)
9178 +@@ -464,25 +466,23 @@ static int qxl_mm_dump_table(struct seq_file *m, void *data)
9179 static int qxl_ttm_debugfs_init(struct qxl_device *qdev)
9180 {
9181 #if defined(CONFIG_DEBUG_FS)
9182 @@ -42139,7 +40959,7 @@ index 71a1bae..cb1f103 100644
9183 return 0;
9184 #endif
9185 diff --git a/drivers/gpu/drm/r128/r128_cce.c b/drivers/gpu/drm/r128/r128_cce.c
9186 -index 59459fe..be26b31 100644
9187 +index 2c45ac9..5d740f8 100644
9188 --- a/drivers/gpu/drm/r128/r128_cce.c
9189 +++ b/drivers/gpu/drm/r128/r128_cce.c
9190 @@ -377,7 +377,7 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init)
9191 @@ -42152,10 +40972,10 @@ index 59459fe..be26b31 100644
9192 /* We don't support anything other than bus-mastering ring mode,
9193 * but the ring can be in either AGP or PCI space for the ring
9194 diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h
9195 -index 5bf3f5f..7000661 100644
9196 +index 723e5d6..102dbaf 100644
9197 --- a/drivers/gpu/drm/r128/r128_drv.h
9198 +++ b/drivers/gpu/drm/r128/r128_drv.h
9199 -@@ -90,14 +90,14 @@ typedef struct drm_r128_private {
9200 +@@ -93,14 +93,14 @@ typedef struct drm_r128_private {
9201 int is_pci;
9202 unsigned long cce_buffers_offset;
9203
9204 @@ -42268,7 +41088,7 @@ index 4a85bb6..aaea819 100644
9205 if (regcomp
9206 (&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) {
9207 diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
9208 -index 5d4416f..80b7fc4 100644
9209 +index 995a8b1..b7cb898 100644
9210 --- a/drivers/gpu/drm/radeon/radeon_device.c
9211 +++ b/drivers/gpu/drm/radeon/radeon_device.c
9212 @@ -1214,7 +1214,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev)
9213 @@ -42281,10 +41101,10 @@ index 5d4416f..80b7fc4 100644
9214
9215 static const struct vga_switcheroo_client_ops radeon_switcheroo_ops = {
9216 diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
9217 -index dafd812..1bf20c7 100644
9218 +index 46bd393..6ae4719 100644
9219 --- a/drivers/gpu/drm/radeon/radeon_drv.h
9220 +++ b/drivers/gpu/drm/radeon/radeon_drv.h
9221 -@@ -262,7 +262,7 @@ typedef struct drm_radeon_private {
9222 +@@ -264,7 +264,7 @@ typedef struct drm_radeon_private {
9223
9224 /* SW interrupt */
9225 wait_queue_head_t swi_queue;
9226 @@ -42362,7 +41182,7 @@ index 244b19b..c19226d 100644
9227
9228 dev->max_vblank_count = 0x001fffff;
9229 diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c
9230 -index 23bb64f..69d7234 100644
9231 +index 535403e..5dd655b 100644
9232 --- a/drivers/gpu/drm/radeon/radeon_state.c
9233 +++ b/drivers/gpu/drm/radeon/radeon_state.c
9234 @@ -2168,7 +2168,7 @@ static int radeon_cp_clear(struct drm_device *dev, void *data, struct drm_file *
9235 @@ -42384,10 +41204,10 @@ index 23bb64f..69d7234 100644
9236 DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
9237
9238 diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
9239 -index 72afe82..056a57a 100644
9240 +index 8624979..65e5243 100644
9241 --- a/drivers/gpu/drm/radeon/radeon_ttm.c
9242 +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
9243 -@@ -801,7 +801,7 @@ void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size)
9244 +@@ -936,7 +936,7 @@ void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size)
9245 man->size = size >> PAGE_SHIFT;
9246 }
9247
9248 @@ -42396,7 +41216,7 @@ index 72afe82..056a57a 100644
9249 static const struct vm_operations_struct *ttm_vm_ops = NULL;
9250
9251 static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
9252 -@@ -842,8 +842,10 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
9253 +@@ -977,8 +977,10 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
9254 }
9255 if (unlikely(ttm_vm_ops == NULL)) {
9256 ttm_vm_ops = vma->vm_ops;
9257 @@ -42408,10 +41228,10 @@ index 72afe82..056a57a 100644
9258 vma->vm_ops = &radeon_ttm_vm_ops;
9259 return 0;
9260 diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
9261 -index 6553fd2..aecd29c 100644
9262 +index 054a79f..30d9ac4 100644
9263 --- a/drivers/gpu/drm/tegra/dc.c
9264 +++ b/drivers/gpu/drm/tegra/dc.c
9265 -@@ -1243,7 +1243,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor)
9266 +@@ -1242,7 +1242,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor)
9267 }
9268
9269 for (i = 0; i < ARRAY_SIZE(debugfs_files); i++)
9270 @@ -42447,10 +41267,10 @@ index ffe2654..03c7b1c 100644
9271 struct dentry *debugfs;
9272 };
9273 diff --git a/drivers/gpu/drm/ttm/ttm_bo_manager.c b/drivers/gpu/drm/ttm/ttm_bo_manager.c
9274 -index 9e103a48..0e117f3 100644
9275 +index 964387f..4eafc00 100644
9276 --- a/drivers/gpu/drm/ttm/ttm_bo_manager.c
9277 +++ b/drivers/gpu/drm/ttm/ttm_bo_manager.c
9278 -@@ -147,10 +147,10 @@ static void ttm_bo_man_debug(struct ttm_mem_type_manager *man,
9279 +@@ -146,10 +146,10 @@ static void ttm_bo_man_debug(struct ttm_mem_type_manager *man,
9280 }
9281
9282 const struct ttm_mem_type_manager_func ttm_bo_manager_func = {
9283 @@ -42467,7 +41287,7 @@ index 9e103a48..0e117f3 100644
9284 };
9285 EXPORT_SYMBOL(ttm_bo_manager_func);
9286 diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c
9287 -index dbc2def..0a9f710 100644
9288 +index a1803fb..c53f6b0 100644
9289 --- a/drivers/gpu/drm/ttm/ttm_memory.c
9290 +++ b/drivers/gpu/drm/ttm/ttm_memory.c
9291 @@ -264,7 +264,7 @@ static int ttm_mem_init_kernel_zone(struct ttm_mem_global *glob,
9292 @@ -42479,7 +41299,7 @@ index dbc2def..0a9f710 100644
9293 if (unlikely(ret != 0)) {
9294 kobject_put(&zone->kobj);
9295 return ret;
9296 -@@ -347,7 +347,7 @@ static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob,
9297 +@@ -348,7 +348,7 @@ static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob,
9298 zone->glob = glob;
9299 glob->zone_dma32 = zone;
9300 ret = kobject_init_and_add(
9301 @@ -42642,7 +41462,7 @@ index c96db43..c367557 100644
9302 nr_free, shrink_pages);
9303 }
9304 diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
9305 -index d1da339..829235e 100644
9306 +index 8cbcb45..a4d9cf7 100644
9307 --- a/drivers/gpu/drm/udl/udl_fb.c
9308 +++ b/drivers/gpu/drm/udl/udl_fb.c
9309 @@ -367,7 +367,6 @@ static int udl_fb_release(struct fb_info *info, int user)
9310 @@ -42654,10 +41474,10 @@ index d1da339..829235e 100644
9311
9312 pr_warn("released /dev/fb%d user=%d count=%d\n",
9313 diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
9314 -index ad02732..144f5ed 100644
9315 +index ef8c500..01030c8 100644
9316 --- a/drivers/gpu/drm/via/via_drv.h
9317 +++ b/drivers/gpu/drm/via/via_drv.h
9318 -@@ -51,7 +51,7 @@ typedef struct drm_via_ring_buffer {
9319 +@@ -53,7 +53,7 @@ typedef struct drm_via_ring_buffer {
9320 typedef uint32_t maskarray_t[5];
9321
9322 typedef struct drm_via_irq {
9323 @@ -42666,7 +41486,7 @@ index ad02732..144f5ed 100644
9324 uint32_t pending_mask;
9325 uint32_t enable_mask;
9326 wait_queue_head_t irq_queue;
9327 -@@ -75,7 +75,7 @@ typedef struct drm_via_private {
9328 +@@ -77,7 +77,7 @@ typedef struct drm_via_private {
9329 struct timeval last_vblank;
9330 int last_vblank_valid;
9331 unsigned usec_per_vblank;
9332 @@ -42750,10 +41570,10 @@ index 1319433..a993b0c 100644
9333 case VIA_IRQ_ABSOLUTE:
9334 break;
9335 diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
9336 -index 99f7317..33a835b 100644
9337 +index 4ee799b..69fc0d1 100644
9338 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
9339 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
9340 -@@ -447,7 +447,7 @@ struct vmw_private {
9341 +@@ -446,7 +446,7 @@ struct vmw_private {
9342 * Fencing and IRQs.
9343 */
9344
9345 @@ -42763,7 +41583,7 @@ index 99f7317..33a835b 100644
9346 wait_queue_head_t fifo_queue;
9347 int fence_queue_waiters; /* Protected by hw_mutex */
9348 diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
9349 -index 6eae14d..aa311b3 100644
9350 +index 09e10ae..cb76c60 100644
9351 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
9352 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
9353 @@ -154,7 +154,7 @@ int vmw_fifo_init(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo)
9354 @@ -42775,7 +41595,7 @@ index 6eae14d..aa311b3 100644
9355 iowrite32(dev_priv->last_read_seqno, fifo_mem + SVGA_FIFO_FENCE);
9356 vmw_marker_queue_init(&fifo->marker_queue);
9357 return vmw_fifo_send_fence(dev_priv, &dummy);
9358 -@@ -373,7 +373,7 @@ void *vmw_fifo_reserve(struct vmw_private *dev_priv, uint32_t bytes)
9359 +@@ -378,7 +378,7 @@ void *vmw_fifo_reserve(struct vmw_private *dev_priv, uint32_t bytes)
9360 if (reserveable)
9361 iowrite32(bytes, fifo_mem +
9362 SVGA_FIFO_RESERVED);
9363 @@ -42784,7 +41604,7 @@ index 6eae14d..aa311b3 100644
9364 } else {
9365 need_bounce = true;
9366 }
9367 -@@ -493,7 +493,7 @@ int vmw_fifo_send_fence(struct vmw_private *dev_priv, uint32_t *seqno)
9368 +@@ -498,7 +498,7 @@ int vmw_fifo_send_fence(struct vmw_private *dev_priv, uint32_t *seqno)
9369
9370 fm = vmw_fifo_reserve(dev_priv, bytes);
9371 if (unlikely(fm == NULL)) {
9372 @@ -42793,7 +41613,7 @@ index 6eae14d..aa311b3 100644
9373 ret = -ENOMEM;
9374 (void)vmw_fallback_wait(dev_priv, false, true, *seqno,
9375 false, 3*HZ);
9376 -@@ -501,7 +501,7 @@ int vmw_fifo_send_fence(struct vmw_private *dev_priv, uint32_t *seqno)
9377 +@@ -506,7 +506,7 @@ int vmw_fifo_send_fence(struct vmw_private *dev_priv, uint32_t *seqno)
9378 }
9379
9380 do {
9381 @@ -42803,10 +41623,10 @@ index 6eae14d..aa311b3 100644
9382
9383 if (!(fifo_state->capabilities & SVGA_FIFO_CAP_FENCE)) {
9384 diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
9385 -index 26f8bdd..90a0008 100644
9386 +index 170b61b..fec7348 100644
9387 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
9388 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
9389 -@@ -165,9 +165,9 @@ static void vmw_gmrid_man_debug(struct ttm_mem_type_manager *man,
9390 +@@ -164,9 +164,9 @@ static void vmw_gmrid_man_debug(struct ttm_mem_type_manager *man,
9391 }
9392
9393 const struct ttm_mem_type_manager_func vmw_gmrid_manager_func = {
9394 @@ -42901,10 +41721,10 @@ index 37ac7b5..d52a5c9 100644
9395 /* copy over all the bus versions */
9396 if (dev->bus && dev->bus->pm) {
9397 diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
9398 -index 12b6e67..ddd983c 100644
9399 +index 3402033..50b562c 100644
9400 --- a/drivers/hid/hid-core.c
9401 +++ b/drivers/hid/hid-core.c
9402 -@@ -2500,7 +2500,7 @@ EXPORT_SYMBOL_GPL(hid_ignore);
9403 +@@ -2506,7 +2506,7 @@ EXPORT_SYMBOL_GPL(hid_ignore);
9404
9405 int hid_add_device(struct hid_device *hdev)
9406 {
9407 @@ -42913,7 +41733,7 @@ index 12b6e67..ddd983c 100644
9408 int ret;
9409
9410 if (WARN_ON(hdev->status & HID_STAT_ADDED))
9411 -@@ -2542,7 +2542,7 @@ int hid_add_device(struct hid_device *hdev)
9412 +@@ -2548,7 +2548,7 @@ int hid_add_device(struct hid_device *hdev)
9413 /* XXX hack, any other cleaner solution after the driver core
9414 * is converted to allow more than 20 bytes as the device name? */
9415 dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
9416 @@ -42923,10 +41743,10 @@ index 12b6e67..ddd983c 100644
9417 hid_debug_register(hdev, dev_name(&hdev->dev));
9418 ret = device_add(&hdev->dev);
9419 diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
9420 -index 9bf8637..f462416 100644
9421 +index 71f5692..147d3da 100644
9422 --- a/drivers/hid/hid-logitech-dj.c
9423 +++ b/drivers/hid/hid-logitech-dj.c
9424 -@@ -682,6 +682,12 @@ static int logi_dj_raw_event(struct hid_device *hdev,
9425 +@@ -658,6 +658,12 @@ static int logi_dj_raw_event(struct hid_device *hdev,
9426 * device (via hid_input_report() ) and return 1 so hid-core does not do
9427 * anything else with it.
9428 */
9429 @@ -42940,10 +41760,10 @@ index 9bf8637..f462416 100644
9430 /* case 1) */
9431 if (data[0] != REPORT_ID_DJ_SHORT)
9432 diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
9433 -index c372368..ecb9d90 100644
9434 +index bc4269e..b6e6102 100644
9435 --- a/drivers/hid/hid-sony.c
9436 +++ b/drivers/hid/hid-sony.c
9437 -@@ -797,6 +797,12 @@ union sixaxis_output_report_01 {
9438 +@@ -798,6 +798,12 @@ union sixaxis_output_report_01 {
9439 __u8 buf[36];
9440 };
9441
9442 @@ -42956,7 +41776,7 @@ index c372368..ecb9d90 100644
9443 static spinlock_t sony_dev_list_lock;
9444 static LIST_HEAD(sony_device_list);
9445 static DEFINE_IDA(sony_device_id_allocator);
9446 -@@ -810,6 +816,7 @@ struct sony_sc {
9447 +@@ -811,6 +817,7 @@ struct sony_sc {
9448 struct work_struct state_worker;
9449 struct power_supply battery;
9450 int device_id;
9451 @@ -42964,7 +41784,7 @@ index c372368..ecb9d90 100644
9452
9453 #ifdef CONFIG_SONY_FF
9454 __u8 left;
9455 -@@ -1108,9 +1115,20 @@ static int sixaxis_set_operational_usb(struct hid_device *hdev)
9456 +@@ -1142,9 +1149,20 @@ static int sixaxis_set_operational_usb(struct hid_device *hdev)
9457
9458 static int sixaxis_set_operational_bt(struct hid_device *hdev)
9459 {
9460 @@ -42987,7 +41807,7 @@ index c372368..ecb9d90 100644
9461 }
9462
9463 /*
9464 -@@ -1119,10 +1137,19 @@ static int sixaxis_set_operational_bt(struct hid_device *hdev)
9465 +@@ -1153,10 +1171,19 @@ static int sixaxis_set_operational_bt(struct hid_device *hdev)
9466 */
9467 static int dualshock4_set_operational_bt(struct hid_device *hdev)
9468 {
9469 @@ -43009,7 +41829,7 @@ index c372368..ecb9d90 100644
9470 }
9471
9472 static void sixaxis_set_leds_from_id(int id, __u8 values[MAX_LEDS])
9473 -@@ -1437,9 +1464,7 @@ error_leds:
9474 +@@ -1471,9 +1498,7 @@ error_leds:
9475
9476 static void sixaxis_state_worker(struct work_struct *work)
9477 {
9478 @@ -43020,7 +41840,7 @@ index c372368..ecb9d90 100644
9479 .buf = {
9480 0x01,
9481 0x00, 0xff, 0x00, 0xff, 0x00,
9482 -@@ -1451,20 +1476,27 @@ static void sixaxis_state_worker(struct work_struct *work)
9483 +@@ -1485,20 +1510,27 @@ static void sixaxis_state_worker(struct work_struct *work)
9484 0x00, 0x00, 0x00, 0x00, 0x00
9485 }
9486 };
9487 @@ -43056,7 +41876,7 @@ index c372368..ecb9d90 100644
9488
9489 /*
9490 * The LEDs in the report are indexed in reverse order to their
9491 -@@ -1477,28 +1509,30 @@ static void sixaxis_state_worker(struct work_struct *work)
9492 +@@ -1511,28 +1543,30 @@ static void sixaxis_state_worker(struct work_struct *work)
9493 */
9494 for (n = 0; n < 4; n++) {
9495 if (sc->led_delay_on[n] || sc->led_delay_off[n]) {
9496 @@ -43093,7 +41913,7 @@ index c372368..ecb9d90 100644
9497 buf[0] = 0x11;
9498 buf[1] = 0xB0;
9499 buf[3] = 0x0F;
9500 -@@ -1526,12 +1560,33 @@ static void dualshock4_state_worker(struct work_struct *work)
9501 +@@ -1560,12 +1594,33 @@ static void dualshock4_state_worker(struct work_struct *work)
9502 buf[offset++] = sc->led_delay_off[3];
9503
9504 if (sc->quirks & DUALSHOCK4_CONTROLLER_USB)
9505 @@ -43129,7 +41949,7 @@ index c372368..ecb9d90 100644
9506 #ifdef CONFIG_SONY_FF
9507 static int sony_play_effect(struct input_dev *dev, void *data,
9508 struct ff_effect *effect)
9509 -@@ -1740,6 +1795,7 @@ static int sony_get_bt_devaddr(struct sony_sc *sc)
9510 +@@ -1754,6 +1809,7 @@ static int sony_get_bt_devaddr(struct sony_sc *sc)
9511
9512 static int sony_check_add(struct sony_sc *sc)
9513 {
9514 @@ -43137,7 +41957,7 @@ index c372368..ecb9d90 100644
9515 int n, ret;
9516
9517 if ((sc->quirks & DUALSHOCK4_CONTROLLER_BT) ||
9518 -@@ -1755,36 +1811,44 @@ static int sony_check_add(struct sony_sc *sc)
9519 +@@ -1769,36 +1825,44 @@ static int sony_check_add(struct sony_sc *sc)
9520 return 0;
9521 }
9522 } else if (sc->quirks & DUALSHOCK4_CONTROLLER_USB) {
9523 @@ -43192,7 +42012,7 @@ index c372368..ecb9d90 100644
9524 }
9525
9526 /*
9527 -@@ -1797,7 +1861,13 @@ static int sony_check_add(struct sony_sc *sc)
9528 +@@ -1811,7 +1875,13 @@ static int sony_check_add(struct sony_sc *sc)
9529 return 0;
9530 }
9531
9532 @@ -43207,7 +42027,7 @@ index c372368..ecb9d90 100644
9533 }
9534
9535 static int sony_set_device_id(struct sony_sc *sc)
9536 -@@ -1881,6 +1951,12 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
9537 +@@ -1895,6 +1965,12 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
9538 return ret;
9539 }
9540
9541 @@ -43220,7 +42040,7 @@ index c372368..ecb9d90 100644
9542 ret = sony_set_device_id(sc);
9543 if (ret < 0) {
9544 hid_err(hdev, "failed to allocate the device id\n");
9545 -@@ -1977,6 +2053,7 @@ err_stop:
9546 +@@ -1984,6 +2060,7 @@ err_stop:
9547 if (sc->quirks & SONY_BATTERY_SUPPORT)
9548 sony_battery_remove(sc);
9549 sony_cancel_work_sync(sc);
9550 @@ -43228,7 +42048,7 @@ index c372368..ecb9d90 100644
9551 sony_remove_dev_list(sc);
9552 sony_release_device_id(sc);
9553 hid_hw_stop(hdev);
9554 -@@ -1997,6 +2074,8 @@ static void sony_remove(struct hid_device *hdev)
9555 +@@ -2004,6 +2081,8 @@ static void sony_remove(struct hid_device *hdev)
9556
9557 sony_cancel_work_sync(sc);
9558
9559 @@ -43250,39 +42070,8 @@ index c13fb5b..55a3802 100644
9560 return -EFAULT;
9561
9562 *off += size;
9563 -diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
9564 -index 0cb92e3..c7d453d 100644
9565 ---- a/drivers/hid/uhid.c
9566 -+++ b/drivers/hid/uhid.c
9567 -@@ -47,7 +47,7 @@ struct uhid_device {
9568 - struct mutex report_lock;
9569 - wait_queue_head_t report_wait;
9570 - atomic_t report_done;
9571 -- atomic_t report_id;
9572 -+ atomic_unchecked_t report_id;
9573 - struct uhid_event report_buf;
9574 - };
9575 -
9576 -@@ -163,7 +163,7 @@ static int uhid_hid_get_raw(struct hid_device *hid, unsigned char rnum,
9577 -
9578 - spin_lock_irqsave(&uhid->qlock, flags);
9579 - ev->type = UHID_FEATURE;
9580 -- ev->u.feature.id = atomic_inc_return(&uhid->report_id);
9581 -+ ev->u.feature.id = atomic_inc_return_unchecked(&uhid->report_id);
9582 - ev->u.feature.rnum = rnum;
9583 - ev->u.feature.rtype = report_type;
9584 -
9585 -@@ -538,7 +538,7 @@ static int uhid_dev_feature_answer(struct uhid_device *uhid,
9586 - spin_lock_irqsave(&uhid->qlock, flags);
9587 -
9588 - /* id for old report; drop it silently */
9589 -- if (atomic_read(&uhid->report_id) != ev->u.feature_answer.id)
9590 -+ if (atomic_read_unchecked(&uhid->report_id) != ev->u.feature_answer.id)
9591 - goto unlock;
9592 - if (atomic_read(&uhid->report_done))
9593 - goto unlock;
9594 diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
9595 -index 19bad59..ca24eaf 100644
9596 +index 433f72a..2926005 100644
9597 --- a/drivers/hv/channel.c
9598 +++ b/drivers/hv/channel.c
9599 @@ -366,8 +366,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
9600 @@ -43687,10 +42476,10 @@ index 8df43c5..b07b91d 100644
9601 };
9602
9603 diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c
9604 -index 41fc683..a39cfea 100644
9605 +index 65e3240..e6c511d 100644
9606 --- a/drivers/i2c/busses/i2c-amd756-s4882.c
9607 +++ b/drivers/i2c/busses/i2c-amd756-s4882.c
9608 -@@ -43,7 +43,7 @@
9609 +@@ -39,7 +39,7 @@
9610 extern struct i2c_adapter amd756_smbus;
9611
9612 static struct i2c_adapter *s4882_adapter;
9613 @@ -43713,10 +42502,10 @@ index b19a310..d6eece0 100644
9614 int ret = 0;
9615 int actual;
9616 diff --git a/drivers/i2c/busses/i2c-nforce2-s4985.c b/drivers/i2c/busses/i2c-nforce2-s4985.c
9617 -index b170bdf..3c76427 100644
9618 +index 88eda09..cf40434 100644
9619 --- a/drivers/i2c/busses/i2c-nforce2-s4985.c
9620 +++ b/drivers/i2c/busses/i2c-nforce2-s4985.c
9621 -@@ -41,7 +41,7 @@
9622 +@@ -37,7 +37,7 @@
9623 extern struct i2c_adapter *nforce2_smbus;
9624
9625 static struct i2c_adapter *s4985_adapter;
9626 @@ -43726,10 +42515,10 @@ index b170bdf..3c76427 100644
9627 /* Wrapper access functions for multiplexed SMBus */
9628 static DEFINE_MUTEX(nforce2_lock);
9629 diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
9630 -index 80b47e8..1a6040d9 100644
9631 +index 71c7a39..71dd3e0 100644
9632 --- a/drivers/i2c/i2c-dev.c
9633 +++ b/drivers/i2c/i2c-dev.c
9634 -@@ -277,7 +277,7 @@ static noinline int i2cdev_ioctl_rdrw(struct i2c_client *client,
9635 +@@ -272,7 +272,7 @@ static noinline int i2cdev_ioctl_rdrw(struct i2c_client *client,
9636 break;
9637 }
9638
9639 @@ -44655,10 +43444,10 @@ index cdc7df4..a2fdfdb 100644
9640 .maxtype = IFLA_IPOIB_MAX,
9641 .policy = ipoib_policy,
9642 diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
9643 -index 24c41ba..102d71f 100644
9644 +index e29c04e..adbf68c 100644
9645 --- a/drivers/input/gameport/gameport.c
9646 +++ b/drivers/input/gameport/gameport.c
9647 -@@ -490,14 +490,14 @@ EXPORT_SYMBOL(gameport_set_phys);
9648 +@@ -527,14 +527,14 @@ EXPORT_SYMBOL(gameport_set_phys);
9649 */
9650 static void gameport_init_port(struct gameport *gameport)
9651 {
9652 @@ -44676,10 +43465,10 @@ index 24c41ba..102d71f 100644
9653 gameport->dev.release = gameport_release_port;
9654 if (gameport->parent)
9655 diff --git a/drivers/input/input.c b/drivers/input/input.c
9656 -index 29ca0bb..f4bc2e3 100644
9657 +index 0f175f5..4c481c0 100644
9658 --- a/drivers/input/input.c
9659 +++ b/drivers/input/input.c
9660 -@@ -1774,7 +1774,7 @@ EXPORT_SYMBOL_GPL(input_class);
9661 +@@ -1775,7 +1775,7 @@ EXPORT_SYMBOL_GPL(input_class);
9662 */
9663 struct input_dev *input_allocate_device(void)
9664 {
9665 @@ -44688,10 +43477,10 @@ index 29ca0bb..f4bc2e3 100644
9666 struct input_dev *dev;
9667
9668 dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL);
9669 -@@ -1789,7 +1789,7 @@ struct input_dev *input_allocate_device(void)
9670 +@@ -1790,7 +1790,7 @@ struct input_dev *input_allocate_device(void)
9671 INIT_LIST_HEAD(&dev->node);
9672
9673 - dev_set_name(&dev->dev, "input%ld",
9674 + dev_set_name(&dev->dev, "input%lu",
9675 - (unsigned long) atomic_inc_return(&input_no) - 1);
9676 + (unsigned long) atomic_inc_return_unchecked(&input_no) - 1);
9677
9678 @@ -44710,10 +43499,10 @@ index 4a95b22..874c182 100644
9679 #include <linux/gameport.h>
9680 #include <linux/jiffies.h>
9681 diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
9682 -index e65d9c0..ad3942e 100644
9683 +index fc55f0d..11e2aa6 100644
9684 --- a/drivers/input/joystick/xpad.c
9685 +++ b/drivers/input/joystick/xpad.c
9686 -@@ -850,7 +850,7 @@ static void xpad_led_set(struct led_classdev *led_cdev,
9687 +@@ -886,7 +886,7 @@ static void xpad_led_set(struct led_classdev *led_cdev,
9688
9689 static int xpad_led_probe(struct usb_xpad *xpad)
9690 {
9691 @@ -44722,7 +43511,7 @@ index e65d9c0..ad3942e 100644
9692 long led_no;
9693 struct xpad_led *led;
9694 struct led_classdev *led_cdev;
9695 -@@ -863,7 +863,7 @@ static int xpad_led_probe(struct usb_xpad *xpad)
9696 +@@ -899,7 +899,7 @@ static int xpad_led_probe(struct usb_xpad *xpad)
9697 if (!led)
9698 return -ENOMEM;
9699
9700 @@ -44732,7 +43521,7 @@ index e65d9c0..ad3942e 100644
9701 snprintf(led->name, sizeof(led->name), "xpad%ld", led_no);
9702 led->xpad = xpad;
9703 diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c
9704 -index 719410f..1896169 100644
9705 +index afed8e2..3aa8a18 100644
9706 --- a/drivers/input/misc/ims-pcu.c
9707 +++ b/drivers/input/misc/ims-pcu.c
9708 @@ -1851,7 +1851,7 @@ static int ims_pcu_identify_type(struct ims_pcu *pcu, u8 *device_id)
9709 @@ -44754,10 +43543,10 @@ index 719410f..1896169 100644
9710 /*
9711 * PCU-B devices, both GEN_1 and GEN_2 do not have OFN sensor
9712 diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
9713 -index 2f0b39d..7370f13 100644
9714 +index f4cf664..3204fda 100644
9715 --- a/drivers/input/mouse/psmouse.h
9716 +++ b/drivers/input/mouse/psmouse.h
9717 -@@ -116,7 +116,7 @@ struct psmouse_attribute {
9718 +@@ -117,7 +117,7 @@ struct psmouse_attribute {
9719 ssize_t (*set)(struct psmouse *psmouse, void *data,
9720 const char *buf, size_t count);
9721 bool protect;
9722 @@ -44780,7 +43569,7 @@ index b604564..3f14ae4 100644
9723
9724 return count;
9725 diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
9726 -index b29134d..394deb0 100644
9727 +index d399b8b..4913ede 100644
9728 --- a/drivers/input/serio/serio.c
9729 +++ b/drivers/input/serio/serio.c
9730 @@ -514,7 +514,7 @@ static void serio_release_port(struct device *dev)
9731 @@ -44795,9 +43584,9 @@ index b29134d..394deb0 100644
9732 @@ -525,7 +525,7 @@ static void serio_init_port(struct serio *serio)
9733 mutex_init(&serio->drv_mutex);
9734 device_initialize(&serio->dev);
9735 - dev_set_name(&serio->dev, "serio%ld",
9736 -- (long)atomic_inc_return(&serio_no) - 1);
9737 -+ (long)atomic_inc_return_unchecked(&serio_no) - 1);
9738 + dev_set_name(&serio->dev, "serio%lu",
9739 +- (unsigned long)atomic_inc_return(&serio_no) - 1);
9740 ++ (unsigned long)atomic_inc_return_unchecked(&serio_no) - 1);
9741 serio->dev.bus = &serio_bus;
9742 serio->dev.release = serio_release_port;
9743 serio->dev.groups = serio_device_attr_groups;
9744 @@ -44824,10 +43613,10 @@ index c9a02fe..0debc75 100644
9745 INIT_LIST_HEAD(&serio_raw->client_list);
9746 init_waitqueue_head(&serio_raw->wait);
9747 diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
9748 -index 5aff937..9cff67c 100644
9749 +index 505a9ad..f0b1b6e 100644
9750 --- a/drivers/iommu/amd_iommu.c
9751 +++ b/drivers/iommu/amd_iommu.c
9752 -@@ -798,11 +798,21 @@ static void copy_cmd_to_buffer(struct amd_iommu *iommu,
9753 +@@ -823,11 +823,21 @@ static void copy_cmd_to_buffer(struct amd_iommu *iommu,
9754
9755 static void build_completion_wait(struct iommu_cmd *cmd, u64 address)
9756 {
9757 @@ -44852,10 +43641,10 @@ index 5aff937..9cff67c 100644
9758 CMD_SET_TYPE(cmd, CMD_COMPL_WAIT);
9759 }
9760 diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
9761 -index a83cc2a..64462e6 100644
9762 +index 60558f7..5a02369 100644
9763 --- a/drivers/iommu/arm-smmu.c
9764 +++ b/drivers/iommu/arm-smmu.c
9765 -@@ -921,7 +921,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
9766 +@@ -934,7 +934,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
9767 cfg->irptndx = cfg->cbndx;
9768 }
9769
9770 @@ -44864,11 +43653,24 @@ index a83cc2a..64462e6 100644
9771 arm_smmu_init_context_bank(smmu_domain);
9772 spin_unlock_irqrestore(&smmu_domain->lock, flags);
9773
9774 +diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
9775 +index ed8b048..7fbcc01 100644
9776 +--- a/drivers/iommu/iommu.c
9777 ++++ b/drivers/iommu/iommu.c
9778 +@@ -802,7 +802,7 @@ static int iommu_bus_notifier(struct notifier_block *nb,
9779 + static int iommu_bus_init(struct bus_type *bus, const struct iommu_ops *ops)
9780 + {
9781 + int err;
9782 +- struct notifier_block *nb;
9783 ++ notifier_block_no_const *nb;
9784 + struct iommu_callback_data cb = {
9785 + .ops = ops,
9786 + };
9787 diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
9788 -index 33c4395..e06447e 100644
9789 +index 74a1767..5a359e8 100644
9790 --- a/drivers/iommu/irq_remapping.c
9791 +++ b/drivers/iommu/irq_remapping.c
9792 -@@ -354,7 +354,7 @@ int setup_hpet_msi_remapped(unsigned int irq, unsigned int id)
9793 +@@ -361,7 +361,7 @@ int setup_hpet_msi_remapped(unsigned int irq, unsigned int id)
9794 void panic_if_irq_remap(const char *msg)
9795 {
9796 if (irq_remapping_enabled)
9797 @@ -44877,7 +43679,7 @@ index 33c4395..e06447e 100644
9798 }
9799
9800 static void ir_ack_apic_edge(struct irq_data *data)
9801 -@@ -375,10 +375,12 @@ static void ir_print_prefix(struct irq_data *data, struct seq_file *p)
9802 +@@ -382,10 +382,12 @@ static void ir_print_prefix(struct irq_data *data, struct seq_file *p)
9803
9804 void irq_remap_modify_chip_defaults(struct irq_chip *chip)
9805 {
9806 @@ -44895,7 +43697,7 @@ index 33c4395..e06447e 100644
9807
9808 bool setup_remapped_irq(int irq, struct irq_cfg *cfg, struct irq_chip *chip)
9809 diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
9810 -index dda6dbc..f9adebb 100644
9811 +index 38493ff..001538b 100644
9812 --- a/drivers/irqchip/irq-gic.c
9813 +++ b/drivers/irqchip/irq-gic.c
9814 @@ -84,7 +84,7 @@ static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly;
9815 @@ -44907,7 +43709,7 @@ index dda6dbc..f9adebb 100644
9816 .irq_eoi = NULL,
9817 .irq_mask = NULL,
9818 .irq_unmask = NULL,
9819 -@@ -312,7 +312,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
9820 +@@ -311,7 +311,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
9821 chained_irq_exit(chip, desc);
9822 }
9823
9824 @@ -44971,7 +43773,7 @@ index 6a2df32..dc962f1 100644
9825 capimsg_setu32(skb->data, 12, (u32)(long)skb->data);/* Data32 */
9826 capimsg_setu16(skb->data, 16, len); /* Data length */
9827 diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
9828 -index b7ae0a0..04590fa 100644
9829 +index aecec6d..11e13c5 100644
9830 --- a/drivers/isdn/gigaset/bas-gigaset.c
9831 +++ b/drivers/isdn/gigaset/bas-gigaset.c
9832 @@ -2565,22 +2565,22 @@ static int gigaset_post_reset(struct usb_interface *intf)
9833 @@ -45085,10 +43887,10 @@ index 8c91fd5..14f13ce 100644
9834
9835
9836 diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c
9837 -index d0a41cb..b953e50 100644
9838 +index a8e652d..edadaa4 100644
9839 --- a/drivers/isdn/gigaset/usb-gigaset.c
9840 +++ b/drivers/isdn/gigaset/usb-gigaset.c
9841 -@@ -547,7 +547,7 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6])
9842 +@@ -548,7 +548,7 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6])
9843 gigaset_dbg_buffer(DEBUG_USBREQ, "brkchars", 6, buf);
9844 memcpy(cs->hw.usb->bchars, buf, 6);
9845 return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x19, 0x41,
9846 @@ -45097,7 +43899,7 @@ index d0a41cb..b953e50 100644
9847 }
9848
9849 static void gigaset_freebcshw(struct bc_state *bcs)
9850 -@@ -869,22 +869,22 @@ static int gigaset_pre_reset(struct usb_interface *intf)
9851 +@@ -867,22 +867,22 @@ static int gigaset_pre_reset(struct usb_interface *intf)
9852 }
9853
9854 static const struct gigaset_ops ops = {
9855 @@ -45189,10 +43991,10 @@ index 91d5730..336523e 100644
9856
9857 /* The following should better go into a dedicated source file such that
9858 diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
9859 -index 3c5f249..5fac4d0 100644
9860 +index bc91261..2ef7e36 100644
9861 --- a/drivers/isdn/i4l/isdn_tty.c
9862 +++ b/drivers/isdn/i4l/isdn_tty.c
9863 -@@ -1508,9 +1508,9 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp)
9864 +@@ -1503,9 +1503,9 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp)
9865
9866 #ifdef ISDN_DEBUG_MODEM_OPEN
9867 printk(KERN_DEBUG "isdn_tty_open %s, count = %d\n", tty->name,
9868 @@ -45204,7 +44006,7 @@ index 3c5f249..5fac4d0 100644
9869 port->tty = tty;
9870 /*
9871 * Start up serial port
9872 -@@ -1554,7 +1554,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
9873 +@@ -1549,7 +1549,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
9874 #endif
9875 return;
9876 }
9877 @@ -45213,7 +44015,7 @@ index 3c5f249..5fac4d0 100644
9878 /*
9879 * Uh, oh. tty->count is 1, which means that the tty
9880 * structure will be freed. Info->count should always
9881 -@@ -1563,15 +1563,15 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
9882 +@@ -1558,15 +1558,15 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
9883 * serial port won't be shutdown.
9884 */
9885 printk(KERN_ERR "isdn_tty_close: bad port count; tty->count is 1, "
9886 @@ -45235,7 +44037,7 @@ index 3c5f249..5fac4d0 100644
9887 #ifdef ISDN_DEBUG_MODEM_OPEN
9888 printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n");
9889 #endif
9890 -@@ -1625,7 +1625,7 @@ isdn_tty_hangup(struct tty_struct *tty)
9891 +@@ -1620,7 +1620,7 @@ isdn_tty_hangup(struct tty_struct *tty)
9892 if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_hangup"))
9893 return;
9894 isdn_tty_shutdown(info);
9895 @@ -45244,7 +44046,7 @@ index 3c5f249..5fac4d0 100644
9896 port->flags &= ~ASYNC_NORMAL_ACTIVE;
9897 port->tty = NULL;
9898 wake_up_interruptible(&port->open_wait);
9899 -@@ -1970,7 +1970,7 @@ isdn_tty_find_icall(int di, int ch, setup_parm *setup)
9900 +@@ -1965,7 +1965,7 @@ isdn_tty_find_icall(int di, int ch, setup_parm *setup)
9901 for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
9902 modem_info *info = &dev->mdm.info[i];
9903
9904 @@ -45294,10 +44096,10 @@ index 6a7447c..cae33fe 100644
9905 } else
9906 memcpy(msg, buf, count);
9907 diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c
9908 -index a4f05c5..1433bc5 100644
9909 +index 87f7dff..7300125 100644
9910 --- a/drivers/isdn/mISDN/dsp_cmx.c
9911 +++ b/drivers/isdn/mISDN/dsp_cmx.c
9912 -@@ -1628,7 +1628,7 @@ unsigned long dsp_spl_jiffies; /* calculate the next time to fire */
9913 +@@ -1625,7 +1625,7 @@ unsigned long dsp_spl_jiffies; /* calculate the next time to fire */
9914 static u16 dsp_count; /* last sample count */
9915 static int dsp_count_valid; /* if we have last sample count */
9916
9917 @@ -45497,10 +44299,10 @@ index a08e3ee..df8ade2 100644
9918 cl->fn = fn;
9919 cl->wq = wq;
9920 diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
9921 -index 67f8b31..9418f2b 100644
9922 +index da3604e..7789cb4c 100644
9923 --- a/drivers/md/bitmap.c
9924 +++ b/drivers/md/bitmap.c
9925 -@@ -1775,7 +1775,7 @@ void bitmap_status(struct seq_file *seq, struct bitmap *bitmap)
9926 +@@ -1771,7 +1771,7 @@ void bitmap_status(struct seq_file *seq, struct bitmap *bitmap)
9927 chunk_kb ? "KB" : "B");
9928 if (bitmap->storage.file) {
9929 seq_printf(seq, ", file: ");
9930 @@ -45510,7 +44312,7 @@ index 67f8b31..9418f2b 100644
9931
9932 seq_printf(seq, "\n");
9933 diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
9934 -index 5152142..623d141 100644
9935 +index 0be9381..114262b 100644
9936 --- a/drivers/md/dm-ioctl.c
9937 +++ b/drivers/md/dm-ioctl.c
9938 @@ -1769,7 +1769,7 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
9939 @@ -45599,7 +44401,7 @@ index 7dfdb5c..4caada6 100644
9940
9941 return (test_bit(DM_RAID1_FLUSH_ERROR, &(m->error_type))) ? 'F' :
9942 diff --git a/drivers/md/dm-stats.c b/drivers/md/dm-stats.c
9943 -index 28a9012..9c0f6a5 100644
9944 +index 87f86c7..a1a4100 100644
9945 --- a/drivers/md/dm-stats.c
9946 +++ b/drivers/md/dm-stats.c
9947 @@ -382,7 +382,7 @@ do_sync_free:
9948 @@ -45623,7 +44425,7 @@ index 28a9012..9c0f6a5 100644
9949
9950 rcu_read_lock();
9951 diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
9952 -index d1600d2..4c3af3a 100644
9953 +index f8b37d4..5c5cafd 100644
9954 --- a/drivers/md/dm-stripe.c
9955 +++ b/drivers/md/dm-stripe.c
9956 @@ -21,7 +21,7 @@ struct stripe {
9957 @@ -45635,7 +44437,7 @@ index d1600d2..4c3af3a 100644
9958 };
9959
9960 struct stripe_c {
9961 -@@ -186,7 +186,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
9962 +@@ -188,7 +188,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
9963 kfree(sc);
9964 return r;
9965 }
9966 @@ -45644,7 +44446,7 @@ index d1600d2..4c3af3a 100644
9967 }
9968
9969 ti->private = sc;
9970 -@@ -330,7 +330,7 @@ static void stripe_status(struct dm_target *ti, status_type_t type,
9971 +@@ -332,7 +332,7 @@ static void stripe_status(struct dm_target *ti, status_type_t type,
9972 DMEMIT("%d ", sc->stripes);
9973 for (i = 0; i < sc->stripes; i++) {
9974 DMEMIT("%s ", sc->stripe[i].dev->name);
9975 @@ -45653,7 +44455,7 @@ index d1600d2..4c3af3a 100644
9976 'D' : 'A';
9977 }
9978 buffer[i] = '\0';
9979 -@@ -375,8 +375,8 @@ static int stripe_end_io(struct dm_target *ti, struct bio *bio, int error)
9980 +@@ -377,8 +377,8 @@ static int stripe_end_io(struct dm_target *ti, struct bio *bio, int error)
9981 */
9982 for (i = 0; i < sc->stripes; i++)
9983 if (!strcmp(sc->stripe[i].dev->name, major_minor)) {
9984 @@ -45665,19 +44467,10 @@ index d1600d2..4c3af3a 100644
9985 schedule_work(&sc->trigger_event);
9986 }
9987 diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
9988 -index f9c6cb8..e272df6 100644
9989 +index b2bd1eb..38f7a44 100644
9990 --- a/drivers/md/dm-table.c
9991 +++ b/drivers/md/dm-table.c
9992 -@@ -274,7 +274,7 @@ static struct dm_dev_internal *find_device(struct list_head *l, dev_t dev)
9993 - static int open_dev(struct dm_dev_internal *d, dev_t dev,
9994 - struct mapped_device *md)
9995 - {
9996 -- static char *_claim_ptr = "I belong to device-mapper";
9997 -+ static char _claim_ptr[] = "I belong to device-mapper";
9998 - struct block_device *bdev;
9999 -
10000 - int r;
10001 -@@ -342,7 +342,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
10002 +@@ -303,7 +303,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
10003 if (!dev_size)
10004 return 0;
10005
10006 @@ -45709,10 +44502,10 @@ index e9d33ad..dae9880d 100644
10007 pmd->bl_info.value_type.inc = data_block_inc;
10008 pmd->bl_info.value_type.dec = data_block_dec;
10009 diff --git a/drivers/md/dm.c b/drivers/md/dm.c
10010 -index 32b958d..34011e8 100644
10011 +index 58f3927..bfbad3e 100644
10012 --- a/drivers/md/dm.c
10013 +++ b/drivers/md/dm.c
10014 -@@ -180,9 +180,9 @@ struct mapped_device {
10015 +@@ -183,9 +183,9 @@ struct mapped_device {
10016 /*
10017 * Event handling.
10018 */
10019 @@ -45724,7 +44517,7 @@ index 32b958d..34011e8 100644
10020 struct list_head uevent_list;
10021 spinlock_t uevent_lock; /* Protect access to uevent_list */
10022
10023 -@@ -1952,8 +1952,8 @@ static struct mapped_device *alloc_dev(int minor)
10024 +@@ -2071,8 +2071,8 @@ static struct mapped_device *alloc_dev(int minor)
10025 spin_lock_init(&md->deferred_lock);
10026 atomic_set(&md->holders, 1);
10027 atomic_set(&md->open_count, 0);
10028 @@ -45733,9 +44526,9 @@ index 32b958d..34011e8 100644
10029 + atomic_set_unchecked(&md->event_nr, 0);
10030 + atomic_set_unchecked(&md->uevent_seq, 0);
10031 INIT_LIST_HEAD(&md->uevent_list);
10032 + INIT_LIST_HEAD(&md->table_devices);
10033 spin_lock_init(&md->uevent_lock);
10034 -
10035 -@@ -2107,7 +2107,7 @@ static void event_callback(void *context)
10036 +@@ -2228,7 +2228,7 @@ static void event_callback(void *context)
10037
10038 dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj);
10039
10040 @@ -45744,7 +44537,7 @@ index 32b958d..34011e8 100644
10041 wake_up(&md->eventq);
10042 }
10043
10044 -@@ -2800,18 +2800,18 @@ int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
10045 +@@ -2921,18 +2921,18 @@ int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
10046
10047 uint32_t dm_next_uevent_seq(struct mapped_device *md)
10048 {
10049 @@ -45767,10 +44560,10 @@ index 32b958d..34011e8 100644
10050
10051 void dm_uevent_add(struct mapped_device *md, struct list_head *elist)
10052 diff --git a/drivers/md/md.c b/drivers/md/md.c
10053 -index b7f603c..723d2bd 100644
10054 +index 9233c71..ed5243a 100644
10055 --- a/drivers/md/md.c
10056 +++ b/drivers/md/md.c
10057 -@@ -194,10 +194,10 @@ EXPORT_SYMBOL_GPL(bio_clone_mddev);
10058 +@@ -190,10 +190,10 @@ EXPORT_SYMBOL_GPL(bio_clone_mddev);
10059 * start build, activate spare
10060 */
10061 static DECLARE_WAIT_QUEUE_HEAD(md_event_waiters);
10062 @@ -45783,7 +44576,7 @@ index b7f603c..723d2bd 100644
10063 wake_up(&md_event_waiters);
10064 }
10065 EXPORT_SYMBOL_GPL(md_new_event);
10066 -@@ -207,7 +207,7 @@ EXPORT_SYMBOL_GPL(md_new_event);
10067 +@@ -203,7 +203,7 @@ EXPORT_SYMBOL_GPL(md_new_event);
10068 */
10069 static void md_new_event_inintr(struct mddev *mddev)
10070 {
10071 @@ -45792,7 +44585,7 @@ index b7f603c..723d2bd 100644
10072 wake_up(&md_event_waiters);
10073 }
10074
10075 -@@ -1462,7 +1462,7 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_
10076 +@@ -1426,7 +1426,7 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_
10077 if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_RESHAPE_ACTIVE) &&
10078 (le32_to_cpu(sb->feature_map) & MD_FEATURE_NEW_OFFSET))
10079 rdev->new_data_offset += (s32)le32_to_cpu(sb->new_offset);
10080 @@ -45801,7 +44594,7 @@ index b7f603c..723d2bd 100644
10081
10082 rdev->sb_size = le32_to_cpu(sb->max_dev) * 2 + 256;
10083 bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1;
10084 -@@ -1713,7 +1713,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
10085 +@@ -1677,7 +1677,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
10086 else
10087 sb->resync_offset = cpu_to_le64(0);
10088
10089 @@ -45810,7 +44603,7 @@ index b7f603c..723d2bd 100644
10090
10091 sb->raid_disks = cpu_to_le32(mddev->raid_disks);
10092 sb->size = cpu_to_le64(mddev->dev_sectors);
10093 -@@ -2725,7 +2725,7 @@ __ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store);
10094 +@@ -2547,7 +2547,7 @@ __ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store);
10095 static ssize_t
10096 errors_show(struct md_rdev *rdev, char *page)
10097 {
10098 @@ -45819,7 +44612,7 @@ index b7f603c..723d2bd 100644
10099 }
10100
10101 static ssize_t
10102 -@@ -2734,7 +2734,7 @@ errors_store(struct md_rdev *rdev, const char *buf, size_t len)
10103 +@@ -2556,7 +2556,7 @@ errors_store(struct md_rdev *rdev, const char *buf, size_t len)
10104 char *e;
10105 unsigned long n = simple_strtoul(buf, &e, 10);
10106 if (*buf && (*e == 0 || *e == '\n')) {
10107 @@ -45828,7 +44621,7 @@ index b7f603c..723d2bd 100644
10108 return len;
10109 }
10110 return -EINVAL;
10111 -@@ -3183,8 +3183,8 @@ int md_rdev_init(struct md_rdev *rdev)
10112 +@@ -3000,8 +3000,8 @@ int md_rdev_init(struct md_rdev *rdev)
10113 rdev->sb_loaded = 0;
10114 rdev->bb_page = NULL;
10115 atomic_set(&rdev->nr_pending, 0);
10116 @@ -45839,7 +44632,7 @@ index b7f603c..723d2bd 100644
10117
10118 INIT_LIST_HEAD(&rdev->same_set);
10119 init_waitqueue_head(&rdev->blocked_wait);
10120 -@@ -7072,7 +7072,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
10121 +@@ -6855,7 +6855,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
10122
10123 spin_unlock(&pers_lock);
10124 seq_printf(seq, "\n");
10125 @@ -45848,7 +44641,7 @@ index b7f603c..723d2bd 100644
10126 return 0;
10127 }
10128 if (v == (void*)2) {
10129 -@@ -7175,7 +7175,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
10130 +@@ -6958,7 +6958,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
10131 return error;
10132
10133 seq = file->private_data;
10134 @@ -45857,7 +44650,7 @@ index b7f603c..723d2bd 100644
10135 return error;
10136 }
10137
10138 -@@ -7192,7 +7192,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
10139 +@@ -6975,7 +6975,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
10140 /* always allow read */
10141 mask = POLLIN | POLLRDNORM;
10142
10143 @@ -45866,7 +44659,7 @@ index b7f603c..723d2bd 100644
10144 mask |= POLLERR | POLLPRI;
10145 return mask;
10146 }
10147 -@@ -7236,7 +7236,7 @@ static int is_mddev_idle(struct mddev *mddev, int init)
10148 +@@ -7022,7 +7022,7 @@ static int is_mddev_idle(struct mddev *mddev, int init)
10149 struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
10150 curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
10151 (int)part_stat_read(&disk->part0, sectors[1]) -
10152 @@ -45876,7 +44669,7 @@ index b7f603c..723d2bd 100644
10153 * as sync_io is counted when a request starts, and
10154 * disk_stats is counted when it completes.
10155 diff --git a/drivers/md/md.h b/drivers/md/md.h
10156 -index a49d991..3582bb7 100644
10157 +index 03cec5b..0a658c1 100644
10158 --- a/drivers/md/md.h
10159 +++ b/drivers/md/md.h
10160 @@ -94,13 +94,13 @@ struct md_rdev {
10161 @@ -45895,11 +44688,11 @@ index a49d991..3582bb7 100644
10162 * for reporting to userspace and storing
10163 * in superblock.
10164 */
10165 -@@ -449,7 +449,7 @@ static inline void rdev_dec_pending(struct md_rdev *rdev, struct mddev *mddev)
10166 +@@ -448,7 +448,7 @@ static inline void rdev_dec_pending(struct md_rdev *rdev, struct mddev *mddev)
10167
10168 static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors)
10169 {
10170 -- atomic_add(nr_sectors, &bdev->bd_contains->bd_disk->sync_io);
10171 +- atomic_add(nr_sectors, &bdev->bd_contains->bd_disk->sync_io);
10172 + atomic_add_unchecked(nr_sectors, &bdev->bd_contains->bd_disk->sync_io);
10173 }
10174
10175 @@ -45939,10 +44732,10 @@ index 3e6d115..ffecdeb 100644
10176 /*----------------------------------------------------------------*/
10177
10178 diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
10179 -index 55de4f6..b1c57fe 100644
10180 +index 40b35be..a327e11 100644
10181 --- a/drivers/md/raid1.c
10182 +++ b/drivers/md/raid1.c
10183 -@@ -1936,7 +1936,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio)
10184 +@@ -1931,7 +1931,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio)
10185 if (r1_sync_page_io(rdev, sect, s,
10186 bio->bi_io_vec[idx].bv_page,
10187 READ) != 0)
10188 @@ -45951,7 +44744,7 @@ index 55de4f6..b1c57fe 100644
10189 }
10190 sectors -= s;
10191 sect += s;
10192 -@@ -2170,7 +2170,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk,
10193 +@@ -2164,7 +2164,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk,
10194 !test_bit(Faulty, &rdev->flags)) {
10195 if (r1_sync_page_io(rdev, sect, s,
10196 conf->tmppage, READ)) {
10197 @@ -45961,10 +44754,10 @@ index 55de4f6..b1c57fe 100644
10198 "md/raid1:%s: read error corrected "
10199 "(%d sectors at %llu on %s)\n",
10200 diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
10201 -index 6703751..187af1e 100644
10202 +index 32e282f..5cec803 100644
10203 --- a/drivers/md/raid10.c
10204 +++ b/drivers/md/raid10.c
10205 -@@ -1948,7 +1948,7 @@ static void end_sync_read(struct bio *bio, int error)
10206 +@@ -1944,7 +1944,7 @@ static void end_sync_read(struct bio *bio, int error)
10207 /* The write handler will notice the lack of
10208 * R10BIO_Uptodate and record any errors etc
10209 */
10210 @@ -45973,7 +44766,7 @@ index 6703751..187af1e 100644
10211 &conf->mirrors[d].rdev->corrected_errors);
10212
10213 /* for reconstruct, we always reschedule after a read.
10214 -@@ -2306,7 +2306,7 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev)
10215 +@@ -2301,7 +2301,7 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev)
10216 {
10217 struct timespec cur_time_mon;
10218 unsigned long hours_since_last;
10219 @@ -45982,7 +44775,7 @@ index 6703751..187af1e 100644
10220
10221 ktime_get_ts(&cur_time_mon);
10222
10223 -@@ -2328,9 +2328,9 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev)
10224 +@@ -2323,9 +2323,9 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev)
10225 * overflowing the shift of read_errors by hours_since_last.
10226 */
10227 if (hours_since_last >= 8 * sizeof(read_errors))
10228 @@ -45994,7 +44787,7 @@ index 6703751..187af1e 100644
10229 }
10230
10231 static int r10_sync_page_io(struct md_rdev *rdev, sector_t sector,
10232 -@@ -2384,8 +2384,8 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
10233 +@@ -2379,8 +2379,8 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
10234 return;
10235
10236 check_decay_read_errors(mddev, rdev);
10237 @@ -46005,7 +44798,7 @@ index 6703751..187af1e 100644
10238 char b[BDEVNAME_SIZE];
10239 bdevname(rdev->bdev, b);
10240
10241 -@@ -2393,7 +2393,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
10242 +@@ -2388,7 +2388,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
10243 "md/raid10:%s: %s: Raid device exceeded "
10244 "read_error threshold [cur %d:max %d]\n",
10245 mdname(mddev), b,
10246 @@ -46014,7 +44807,7 @@ index 6703751..187af1e 100644
10247 printk(KERN_NOTICE
10248 "md/raid10:%s: %s: Failing raid device\n",
10249 mdname(mddev), b);
10250 -@@ -2548,7 +2548,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
10251 +@@ -2543,7 +2543,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
10252 sect +
10253 choose_data_offset(r10_bio, rdev)),
10254 bdevname(rdev->bdev, b));
10255 @@ -46024,10 +44817,10 @@ index 6703751..187af1e 100644
10256
10257 rdev_dec_pending(rdev, mddev);
10258 diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
10259 -index 9f0fbec..991e7a1 100644
10260 +index 9c66e59..42a8eac 100644
10261 --- a/drivers/md/raid5.c
10262 +++ b/drivers/md/raid5.c
10263 -@@ -1735,6 +1735,10 @@ static int grow_one_stripe(struct r5conf *conf, int hash)
10264 +@@ -1730,6 +1730,10 @@ static int grow_one_stripe(struct r5conf *conf, int hash)
10265 return 1;
10266 }
10267
10268 @@ -46038,7 +44831,7 @@ index 9f0fbec..991e7a1 100644
10269 static int grow_stripes(struct r5conf *conf, int num)
10270 {
10271 struct kmem_cache *sc;
10272 -@@ -1746,7 +1750,11 @@ static int grow_stripes(struct r5conf *conf, int num)
10273 +@@ -1741,7 +1745,11 @@ static int grow_stripes(struct r5conf *conf, int num)
10274 "raid%d-%s", conf->level, mdname(conf->mddev));
10275 else
10276 sprintf(conf->cache_name[0],
10277 @@ -46050,7 +44843,7 @@ index 9f0fbec..991e7a1 100644
10278 sprintf(conf->cache_name[1], "%s-alt", conf->cache_name[0]);
10279
10280 conf->active_name = 0;
10281 -@@ -2022,21 +2030,21 @@ static void raid5_end_read_request(struct bio * bi, int error)
10282 +@@ -2017,21 +2025,21 @@ static void raid5_end_read_request(struct bio * bi, int error)
10283 mdname(conf->mddev), STRIPE_SECTORS,
10284 (unsigned long long)s,
10285 bdevname(rdev->bdev, b));
10286 @@ -46076,7 +44869,7 @@ index 9f0fbec..991e7a1 100644
10287 if (test_bit(R5_ReadRepl, &sh->dev[i].flags))
10288 printk_ratelimited(
10289 KERN_WARNING
10290 -@@ -2064,7 +2072,7 @@ static void raid5_end_read_request(struct bio * bi, int error)
10291 +@@ -2059,7 +2067,7 @@ static void raid5_end_read_request(struct bio * bi, int error)
10292 mdname(conf->mddev),
10293 (unsigned long long)s,
10294 bdn);
10295 @@ -46099,18 +44892,17 @@ index 983db75..ef9248c 100644
10296 int minor;
10297 int id;
10298 diff --git a/drivers/media/dvb-frontends/af9033.h b/drivers/media/dvb-frontends/af9033.h
10299 -index 539f4db..cdd403b 100644
10300 +index 6ad22b6..6e90e2a 100644
10301 --- a/drivers/media/dvb-frontends/af9033.h
10302 +++ b/drivers/media/dvb-frontends/af9033.h
10303 -@@ -82,7 +82,7 @@ struct af9033_ops {
10304 +@@ -96,6 +96,6 @@ struct af9033_ops {
10305 int (*pid_filter_ctrl)(struct dvb_frontend *fe, int onoff);
10306 int (*pid_filter)(struct dvb_frontend *fe, int index, u16 pid,
10307 int onoff);
10308 -};
10309 +} __no_const;
10310
10311 -
10312 - #if IS_ENABLED(CONFIG_DVB_AF9033)
10313 + #endif /* AF9033_H */
10314 diff --git a/drivers/media/dvb-frontends/dib3000.h b/drivers/media/dvb-frontends/dib3000.h
10315 index 9b6c3bb..baeb5c7 100644
10316 --- a/drivers/media/dvb-frontends/dib3000.h
10317 @@ -46151,7 +44943,7 @@ index 84cc103..5780c54 100644
10318 #if IS_ENABLED(CONFIG_DVB_DIB8000)
10319 void *dib8000_attach(struct dib8000_ops *ops);
10320 diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c
10321 -index ed8cb90..5ef7f79 100644
10322 +index ce27e6d..b70435a 100644
10323 --- a/drivers/media/pci/cx88/cx88-video.c
10324 +++ b/drivers/media/pci/cx88/cx88-video.c
10325 @@ -50,9 +50,9 @@ MODULE_VERSION(CX88_VERSION);
10326 @@ -46181,10 +44973,10 @@ index 802642d..5534900 100644
10327 /* Parameter declarations */
10328 static int cardtype[IVTV_MAX_CARDS];
10329 diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c
10330 -index 172583d..0f806f4 100644
10331 +index 8cbe6b4..ea3601c 100644
10332 --- a/drivers/media/pci/solo6x10/solo6x10-core.c
10333 +++ b/drivers/media/pci/solo6x10/solo6x10-core.c
10334 -@@ -430,7 +430,7 @@ static void solo_device_release(struct device *dev)
10335 +@@ -424,7 +424,7 @@ static void solo_device_release(struct device *dev)
10336
10337 static int solo_sysfs_init(struct solo_dev *solo_dev)
10338 {
10339 @@ -46220,7 +45012,7 @@ index 8c84846..27b4f83 100644
10340 p2m_id = -p2m_id;
10341 }
10342 diff --git a/drivers/media/pci/solo6x10/solo6x10.h b/drivers/media/pci/solo6x10/solo6x10.h
10343 -index c6154b0..73e4ae9 100644
10344 +index 72017b7..dd37ae6 100644
10345 --- a/drivers/media/pci/solo6x10/solo6x10.h
10346 +++ b/drivers/media/pci/solo6x10/solo6x10.h
10347 @@ -219,7 +219,7 @@ struct solo_dev {
10348 @@ -46232,8 +45024,21 @@ index c6154b0..73e4ae9 100644
10349 int p2m_jiffies;
10350 unsigned int p2m_timeouts;
10351
10352 +diff --git a/drivers/media/pci/tw68/tw68-core.c b/drivers/media/pci/tw68/tw68-core.c
10353 +index 63f0b64..a017c1c 100644
10354 +--- a/drivers/media/pci/tw68/tw68-core.c
10355 ++++ b/drivers/media/pci/tw68/tw68-core.c
10356 +@@ -60,7 +60,7 @@ static unsigned int card[] = {[0 ... (TW68_MAXBOARDS - 1)] = UNSET };
10357 + module_param_array(card, int, NULL, 0444);
10358 + MODULE_PARM_DESC(card, "card type");
10359 +
10360 +-static atomic_t tw68_instance = ATOMIC_INIT(0);
10361 ++static atomic_unchecked_t tw68_instance = ATOMIC_INIT(0);
10362 +
10363 + /* ------------------------------------------------------------------ */
10364 +
10365 diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
10366 -index 2d177fa..5b925a1 100644
10367 +index 64ab6fb..ef4a8b9 100644
10368 --- a/drivers/media/platform/omap/omap_vout.c
10369 +++ b/drivers/media/platform/omap/omap_vout.c
10370 @@ -63,7 +63,6 @@ enum omap_vout_channels {
10371 @@ -46244,7 +45049,7 @@ index 2d177fa..5b925a1 100644
10372 /* Variables configurable through module params*/
10373 static u32 video1_numbuffers = 3;
10374 static u32 video2_numbuffers = 3;
10375 -@@ -1014,6 +1013,12 @@ static int omap_vout_open(struct file *file)
10376 +@@ -1012,6 +1011,12 @@ static int omap_vout_open(struct file *file)
10377 {
10378 struct videobuf_queue *q;
10379 struct omap_vout_device *vout = NULL;
10380 @@ -46257,7 +45062,7 @@ index 2d177fa..5b925a1 100644
10381
10382 vout = video_drvdata(file);
10383 v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, "Entering %s\n", __func__);
10384 -@@ -1031,10 +1036,6 @@ static int omap_vout_open(struct file *file)
10385 +@@ -1029,10 +1034,6 @@ static int omap_vout_open(struct file *file)
10386 vout->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
10387
10388 q = &vout->vbq;
10389 @@ -46420,21 +45225,6 @@ index c9388c4..ce71ece 100644
10390 .release = mxr_vp_layer_release,
10391 .buffer_set = mxr_vp_buffer_set,
10392 .stream_set = mxr_vp_stream_set,
10393 -diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c
10394 -index 8033371..de5bca0 100644
10395 ---- a/drivers/media/platform/vivi.c
10396 -+++ b/drivers/media/platform/vivi.c
10397 -@@ -58,8 +58,8 @@ MODULE_AUTHOR("Mauro Carvalho Chehab, Ted Walther and John Sokol");
10398 - MODULE_LICENSE("Dual BSD/GPL");
10399 - MODULE_VERSION(VIVI_VERSION);
10400 -
10401 --static unsigned video_nr = -1;
10402 --module_param(video_nr, uint, 0644);
10403 -+static int video_nr = -1;
10404 -+module_param(video_nr, int, 0644);
10405 - MODULE_PARM_DESC(video_nr, "videoX start number, -1 is autodetect");
10406 -
10407 - static unsigned n_devs = 1;
10408 diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
10409 index 82affae..42833ec 100644
10410 --- a/drivers/media/radio/radio-cadet.c
10411 @@ -47013,7 +45803,7 @@ index 733a7ff..f8b52e3 100644
10412 }
10413 EXPORT_SYMBOL(usb_cypress_load_firmware);
10414 diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c
10415 -index 2add8c5..c33b854 100644
10416 +index 1a3df10..57997a5 100644
10417 --- a/drivers/media/usb/dvb-usb/dw2102.c
10418 +++ b/drivers/media/usb/dvb-usb/dw2102.c
10419 @@ -118,7 +118,7 @@ struct su3000_state {
10420 @@ -47232,33 +46022,15 @@ index 6b0b8b6b..4038398 100644
10421 }
10422
10423 diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
10424 -index cca6c2f..77b9a18 100644
10425 +index e502a5f..2a27f40 100644
10426 --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
10427 +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
10428 -@@ -328,7 +328,7 @@ struct v4l2_buffer32 {
10429 - __u32 reserved;
10430 - };
10431 -
10432 --static int get_v4l2_plane32(struct v4l2_plane *up, struct v4l2_plane32 *up32,
10433 -+static int get_v4l2_plane32(struct v4l2_plane __user *up, struct v4l2_plane32 __user *up32,
10434 - enum v4l2_memory memory)
10435 - {
10436 - void __user *up_pln;
10437 -@@ -357,7 +357,7 @@ static int get_v4l2_plane32(struct v4l2_plane *up, struct v4l2_plane32 *up32,
10438 - return 0;
10439 - }
10440 -
10441 --static int put_v4l2_plane32(struct v4l2_plane *up, struct v4l2_plane32 *up32,
10442 -+static int put_v4l2_plane32(struct v4l2_plane __user *up, struct v4l2_plane32 __user *up32,
10443 - enum v4l2_memory memory)
10444 - {
10445 - if (copy_in_user(up32, up, 2 * sizeof(__u32)) ||
10446 @@ -427,7 +427,7 @@ static int get_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user
10447 * by passing a very big num_planes value */
10448 uplane = compat_alloc_user_space(num_planes *
10449 sizeof(struct v4l2_plane));
10450 -- kp->m.planes = uplane;
10451 -+ kp->m.planes = (struct v4l2_plane __force_kernel *)uplane;
10452 +- kp->m.planes = (__force struct v4l2_plane *)uplane;
10453 ++ kp->m.planes = (__force_kernel struct v4l2_plane *)uplane;
10454
10455 while (--num_planes >= 0) {
10456 ret = get_v4l2_plane32(uplane, uplane32, kp->memory);
10457 @@ -47266,7 +46038,7 @@ index cca6c2f..77b9a18 100644
10458 if (num_planes == 0)
10459 return 0;
10460
10461 -- uplane = kp->m.planes;
10462 +- uplane = (__force struct v4l2_plane __user *)kp->m.planes;
10463 + uplane = (struct v4l2_plane __force_user *)kp->m.planes;
10464 if (get_user(p, &up->m.planes))
10465 return -EFAULT;
10466 @@ -47275,8 +46047,8 @@ index cca6c2f..77b9a18 100644
10467 get_user(kp->flags, &up->flags) ||
10468 copy_from_user(&kp->fmt, &up->fmt, sizeof(up->fmt)))
10469 return -EFAULT;
10470 -- kp->base = compat_ptr(tmp);
10471 -+ kp->base = (void __force_kernel *)compat_ptr(tmp);
10472 +- kp->base = (__force void *)compat_ptr(tmp);
10473 ++ kp->base = (__force_kernel void *)compat_ptr(tmp);
10474 return 0;
10475 }
10476
10477 @@ -47284,29 +46056,29 @@ index cca6c2f..77b9a18 100644
10478 n * sizeof(struct v4l2_ext_control32)))
10479 return -EFAULT;
10480 kcontrols = compat_alloc_user_space(n * sizeof(struct v4l2_ext_control));
10481 -- kp->controls = kcontrols;
10482 -+ kp->controls = (struct v4l2_ext_control __force_kernel *)kcontrols;
10483 +- kp->controls = (__force struct v4l2_ext_control *)kcontrols;
10484 ++ kp->controls = (__force_kernel struct v4l2_ext_control *)kcontrols;
10485 while (--n >= 0) {
10486 - if (copy_in_user(kcontrols, ucontrols, sizeof(*ucontrols)))
10487 - return -EFAULT;
10488 -@@ -689,7 +689,7 @@ static int get_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext
10489 - static int put_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext_controls32 __user *up)
10490 + u32 id;
10491 +
10492 +@@ -694,7 +694,7 @@ static int put_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext
10493 {
10494 struct v4l2_ext_control32 __user *ucontrols;
10495 -- struct v4l2_ext_control __user *kcontrols = kp->controls;
10496 -+ struct v4l2_ext_control __user *kcontrols = (struct v4l2_ext_control __force_user *)kp->controls;
10497 + struct v4l2_ext_control __user *kcontrols =
10498 +- (__force struct v4l2_ext_control __user *)kp->controls;
10499 ++ (struct v4l2_ext_control __force_user *)kp->controls;
10500 int n = kp->count;
10501 compat_caddr_t p;
10502
10503 -@@ -783,7 +783,7 @@ static int put_v4l2_edid32(struct v4l2_edid *kp, struct v4l2_edid32 __user *up)
10504 - put_user(kp->start_block, &up->start_block) ||
10505 - put_user(kp->blocks, &up->blocks) ||
10506 - put_user(tmp, &up->edid) ||
10507 -- copy_to_user(kp->reserved, up->reserved, sizeof(kp->reserved)))
10508 -+ copy_to_user(up->reserved, kp->reserved, sizeof(kp->reserved)))
10509 +@@ -778,7 +778,7 @@ static int get_v4l2_edid32(struct v4l2_edid *kp, struct v4l2_edid32 __user *up)
10510 + get_user(tmp, &up->edid) ||
10511 + copy_from_user(kp->reserved, up->reserved, sizeof(kp->reserved)))
10512 return -EFAULT;
10513 +- kp->edid = (__force u8 *)compat_ptr(tmp);
10514 ++ kp->edid = (__force_kernel u8 *)compat_ptr(tmp);
10515 return 0;
10516 }
10517 +
10518 diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c
10519 index 015f92a..59e311e 100644
10520 --- a/drivers/media/v4l2-core/v4l2-device.c
10521 @@ -47324,7 +46096,7 @@ index 015f92a..59e311e 100644
10522
10523 if (basename[len - 1] >= '0' && basename[len - 1] <= '9')
10524 diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
10525 -index d15e167..337f374 100644
10526 +index 9ccb19a..d131468 100644
10527 --- a/drivers/media/v4l2-core/v4l2-ioctl.c
10528 +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
10529 @@ -2142,7 +2142,8 @@ struct v4l2_ioctl_info {
10530 @@ -47383,10 +46155,10 @@ index d15e167..337f374 100644
10531 err = -EFAULT;
10532 goto out_array_args;
10533 diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
10534 -index a896d94..a5d56b1 100644
10535 +index 187f836..679544b 100644
10536 --- a/drivers/message/fusion/mptbase.c
10537 +++ b/drivers/message/fusion/mptbase.c
10538 -@@ -6752,8 +6752,13 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
10539 +@@ -6746,8 +6746,13 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
10540 seq_printf(m, " MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth);
10541 seq_printf(m, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize);
10542
10543 @@ -47400,7 +46172,7 @@ index a896d94..a5d56b1 100644
10544 /*
10545 * Rounding UP to nearest 4-kB boundary here...
10546 */
10547 -@@ -6766,7 +6771,11 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
10548 +@@ -6760,7 +6765,11 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
10549 ioc->facts.GlobalCredits);
10550
10551 seq_printf(m, " Frames @ 0x%p (Dma @ 0x%p)\n",
10552 @@ -47669,7 +46441,7 @@ index b2c7e3b..85aa4764 100644
10553
10554 static u8 avg_sample = SAMPLE_16;
10555 diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c
10556 -index ecbe78e..b2ca870 100644
10557 +index c880c89..45a7c68 100644
10558 --- a/drivers/mfd/max8925-i2c.c
10559 +++ b/drivers/mfd/max8925-i2c.c
10560 @@ -152,7 +152,7 @@ static int max8925_probe(struct i2c_client *client,
10561 @@ -47682,7 +46454,7 @@ index ecbe78e..b2ca870 100644
10562
10563 if (node && !pdata) {
10564 diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
10565 -index f243e75..322176c 100644
10566 +index 7612d89..70549c2 100644
10567 --- a/drivers/mfd/tps65910.c
10568 +++ b/drivers/mfd/tps65910.c
10569 @@ -230,7 +230,7 @@ static int tps65910_irq_init(struct tps65910 *tps65910, int irq,
10570 @@ -47695,7 +46467,7 @@ index f243e75..322176c 100644
10571 if (!irq) {
10572 dev_warn(tps65910->dev, "No interrupt support, no core IRQ\n");
10573 diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
10574 -index b1dabba..24a88f2 100644
10575 +index 1b772ef..01e77d33 100644
10576 --- a/drivers/mfd/twl4030-irq.c
10577 +++ b/drivers/mfd/twl4030-irq.c
10578 @@ -34,6 +34,7 @@
10579 @@ -47706,7 +46478,7 @@ index b1dabba..24a88f2 100644
10580
10581 #include "twl-core.h"
10582
10583 -@@ -725,10 +726,12 @@ int twl4030_init_irq(struct device *dev, int irq_num)
10584 +@@ -729,10 +730,12 @@ int twl4030_init_irq(struct device *dev, int irq_num)
10585 * Install an irq handler for each of the SIH modules;
10586 * clone dummy irq_chip since PIH can't *do* anything
10587 */
10588 @@ -48131,7 +46903,7 @@ index 82dc574..8539ab2 100644
10589
10590 break;
10591 diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
10592 -index ede41f0..744fbd9 100644
10593 +index 1fa4c80..59447c9 100644
10594 --- a/drivers/mmc/card/block.c
10595 +++ b/drivers/mmc/card/block.c
10596 @@ -574,7 +574,7 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev,
10597 @@ -48144,10 +46916,10 @@ index ede41f0..744fbd9 100644
10598 goto cmd_rel_host;
10599 }
10600 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
10601 -index f51b5ba..86614a7 100644
10602 +index 7911e05..d0f9dda 100644
10603 --- a/drivers/mmc/core/mmc_ops.c
10604 +++ b/drivers/mmc/core/mmc_ops.c
10605 -@@ -247,7 +247,7 @@ mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host,
10606 +@@ -267,7 +267,7 @@ mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host,
10607 void *data_buf;
10608 int is_on_stack;
10609
10610 @@ -48157,10 +46929,10 @@ index f51b5ba..86614a7 100644
10611 /*
10612 * dma onto stack is unsafe/nonportable, but callers to this
10613 diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
10614 -index 08fd956..370487a 100644
10615 +index 01b99e8..5c325e3 100644
10616 --- a/drivers/mmc/host/dw_mmc.h
10617 +++ b/drivers/mmc/host/dw_mmc.h
10618 -@@ -262,5 +262,5 @@ struct dw_mci_drv_data {
10619 +@@ -265,5 +265,5 @@ struct dw_mci_drv_data {
10620 int (*parse_dt)(struct dw_mci *host);
10621 int (*execute_tuning)(struct dw_mci_slot *slot, u32 opcode,
10622 struct dw_mci_tuning_data *tuning_data);
10623 @@ -48168,10 +46940,10 @@ index 08fd956..370487a 100644
10624 +} __do_const;
10625 #endif /* _DW_MMC_H_ */
10626 diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
10627 -index e4d4707..28262a3 100644
10628 +index 43af791..86f4c48 100644
10629 --- a/drivers/mmc/host/mmci.c
10630 +++ b/drivers/mmc/host/mmci.c
10631 -@@ -1612,7 +1612,9 @@ static int mmci_probe(struct amba_device *dev,
10632 +@@ -1628,7 +1628,9 @@ static int mmci_probe(struct amba_device *dev,
10633 mmc->caps |= MMC_CAP_CMD23;
10634
10635 if (variant->busy_detect) {
10636 @@ -48182,11 +46954,26 @@ index e4d4707..28262a3 100644
10637 mmci_write_datactrlreg(host, MCI_ST_DPSM_BUSYMODE);
10638 mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
10639 mmc->max_busy_timeout = 0;
10640 +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
10641 +index df27bb4..2085f0b 100644
10642 +--- a/drivers/mmc/host/omap_hsmmc.c
10643 ++++ b/drivers/mmc/host/omap_hsmmc.c
10644 +@@ -2111,7 +2111,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
10645 +
10646 + if (host->pdata->controller_flags & OMAP_HSMMC_BROKEN_MULTIBLOCK_READ) {
10647 + dev_info(&pdev->dev, "multiblock reads disabled due to 35xx erratum 2.1.1.128; MMC read performance may suffer\n");
10648 +- omap_hsmmc_ops.multi_io_quirk = omap_hsmmc_multi_io_quirk;
10649 ++ pax_open_kernel();
10650 ++ *(void **)&omap_hsmmc_ops.multi_io_quirk = omap_hsmmc_multi_io_quirk;
10651 ++ pax_close_kernel();
10652 + }
10653 +
10654 + pm_runtime_enable(host->dev);
10655 diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
10656 -index ccec0e3..199f9ce 100644
10657 +index 587ee0e..b3bbcab 100644
10658 --- a/drivers/mmc/host/sdhci-esdhc-imx.c
10659 +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
10660 -@@ -1034,9 +1034,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
10661 +@@ -1054,9 +1054,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
10662 host->mmc->caps |= MMC_CAP_1_8V_DDR;
10663 }
10664
10665 @@ -48202,7 +46989,7 @@ index ccec0e3..199f9ce 100644
10666 if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING)
10667 writel(readl(host->ioaddr + ESDHC_TUNING_CTRL) |
10668 diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
10669 -index 1e47903..7683916 100644
10670 +index 0ce6eb1..8dcce1b 100644
10671 --- a/drivers/mmc/host/sdhci-s3c.c
10672 +++ b/drivers/mmc/host/sdhci-s3c.c
10673 @@ -584,9 +584,11 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
10674 @@ -48234,7 +47021,7 @@ index 423666b..81ff5eb 100644
10675 if (!ECCBUF_SIZE) {
10676 /* We should fall back to a general writev implementation.
10677 diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
10678 -index 0b071a3..8ec3d5b 100644
10679 +index b3b7ca1..5dd4634 100644
10680 --- a/drivers/mtd/nand/denali.c
10681 +++ b/drivers/mtd/nand/denali.c
10682 @@ -24,6 +24,7 @@
10683 @@ -48271,7 +47058,7 @@ index 51b9d6a..52af9a7 100644
10684 #include <linux/mtd/nand.h>
10685 #include <linux/mtd/nftl.h>
10686 diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
10687 -index cf49c22..971b133 100644
10688 +index c23184a..4115c41 100644
10689 --- a/drivers/mtd/sm_ftl.c
10690 +++ b/drivers/mtd/sm_ftl.c
10691 @@ -56,7 +56,7 @@ static ssize_t sm_attr_show(struct device *dev, struct device_attribute *attr,
10692 @@ -48283,11 +47070,24 @@ index cf49c22..971b133 100644
10693 struct attribute **attributes;
10694 struct sm_sysfs_attribute *vendor_attribute;
10695 char *vendor;
10696 +diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
10697 +index a5115fb..81b03f6 100644
10698 +--- a/drivers/net/bonding/bond_main.c
10699 ++++ b/drivers/net/bonding/bond_main.c
10700 +@@ -3749,7 +3749,7 @@ int bond_3ad_xor_xmit(struct sk_buff *skb, struct net_device *dev)
10701 + bond_dev_queue_xmit(bond, skb, slave->dev);
10702 + } else {
10703 + dev_kfree_skb_any(skb);
10704 +- atomic_long_inc(&dev->tx_dropped);
10705 ++ atomic_long_inc_unchecked(&dev->tx_dropped);
10706 + }
10707 +
10708 + return NETDEV_TX_OK;
10709 diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
10710 -index fc061c3..53853ef 100644
10711 +index 45f09a6..f154f8d 100644
10712 --- a/drivers/net/bonding/bond_netlink.c
10713 +++ b/drivers/net/bonding/bond_netlink.c
10714 -@@ -553,7 +553,7 @@ nla_put_failure:
10715 +@@ -585,7 +585,7 @@ nla_put_failure:
10716 return -EMSGSIZE;
10717 }
10718
10719 @@ -48310,7 +47110,7 @@ index 5e40a8b..126bfda 100644
10720 .priv_size = sizeof(struct cfhsi),
10721 .setup = cfhsi_setup,
10722 diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
10723 -index 4168822..f38eeddf 100644
10724 +index 98d73aa..63ef9da 100644
10725 --- a/drivers/net/can/Kconfig
10726 +++ b/drivers/net/can/Kconfig
10727 @@ -98,7 +98,7 @@ config CAN_JANZ_ICAN3
10728 @@ -48323,10 +47123,10 @@ index 4168822..f38eeddf 100644
10729 Say Y here if you want to support for Freescale FlexCAN.
10730
10731 diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
10732 -index 6403503..a0c8bb6 100644
10733 +index 2cfe501..477d4b5 100644
10734 --- a/drivers/net/can/dev.c
10735 +++ b/drivers/net/can/dev.c
10736 -@@ -869,7 +869,7 @@ static int can_newlink(struct net *src_net, struct net_device *dev,
10737 +@@ -868,7 +868,7 @@ static int can_newlink(struct net *src_net, struct net_device *dev,
10738 return -EOPNOTSUPP;
10739 }
10740
10741 @@ -48379,10 +47179,10 @@ index 1d162cc..b546a75 100644
10742
10743 if (!request_mem_region(mem->start, mem_size, pdev->name)) {
10744 diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
10745 -index 7330681..7e9e463 100644
10746 +index 4efc435..4ab9e14 100644
10747 --- a/drivers/net/ethernet/altera/altera_tse_main.c
10748 +++ b/drivers/net/ethernet/altera/altera_tse_main.c
10749 -@@ -1182,7 +1182,7 @@ static int tse_shutdown(struct net_device *dev)
10750 +@@ -1224,7 +1224,7 @@ static int tse_shutdown(struct net_device *dev)
10751 return 0;
10752 }
10753
10754 @@ -48391,7 +47191,7 @@ index 7330681..7e9e463 100644
10755 .ndo_open = tse_open,
10756 .ndo_stop = tse_shutdown,
10757 .ndo_start_xmit = tse_start_xmit,
10758 -@@ -1439,11 +1439,13 @@ static int altera_tse_probe(struct platform_device *pdev)
10759 +@@ -1461,11 +1461,13 @@ static int altera_tse_probe(struct platform_device *pdev)
10760 ndev->netdev_ops = &altera_tse_netdev_ops;
10761 altera_tse_set_ethtool_ops(ndev);
10762
10763 @@ -48406,10 +47206,10 @@ index 7330681..7e9e463 100644
10764 /* Scatter/gather IO is not supported,
10765 * so it is turned off
10766 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-common.h b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
10767 -index cc25a3a..c8d72d3 100644
10768 +index caade30..3e257d9 100644
10769 --- a/drivers/net/ethernet/amd/xgbe/xgbe-common.h
10770 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
10771 -@@ -1083,14 +1083,14 @@ do { \
10772 +@@ -1072,14 +1072,14 @@ do { \
10773 * operations, everything works on mask values.
10774 */
10775 #define XMDIO_READ(_pdata, _mmd, _reg) \
10776 @@ -48427,10 +47227,10 @@ index cc25a3a..c8d72d3 100644
10777
10778 #define XMDIO_WRITE_BITS(_pdata, _mmd, _reg, _mask, _val) \
10779 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c b/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c
10780 -index 7d6a49b..e6d403b 100644
10781 +index 8a50b01..39c1ad0 100644
10782 --- a/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c
10783 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c
10784 -@@ -188,7 +188,7 @@ static int xgbe_dcb_ieee_setets(struct net_device *netdev,
10785 +@@ -187,7 +187,7 @@ static int xgbe_dcb_ieee_setets(struct net_device *netdev,
10786
10787 memcpy(pdata->ets, ets, sizeof(*pdata->ets));
10788
10789 @@ -48439,7 +47239,7 @@ index 7d6a49b..e6d403b 100644
10790
10791 return 0;
10792 }
10793 -@@ -227,7 +227,7 @@ static int xgbe_dcb_ieee_setpfc(struct net_device *netdev,
10794 +@@ -226,7 +226,7 @@ static int xgbe_dcb_ieee_setpfc(struct net_device *netdev,
10795
10796 memcpy(pdata->pfc, pfc, sizeof(*pdata->pfc));
10797
10798 @@ -48449,10 +47249,10 @@ index 7d6a49b..e6d403b 100644
10799 return 0;
10800 }
10801 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
10802 -index 1c5d62e..8e14d54 100644
10803 +index 6fc5da0..61ac2cb 100644
10804 --- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
10805 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
10806 -@@ -236,7 +236,7 @@ err_ring:
10807 +@@ -235,7 +235,7 @@ err_ring:
10808
10809 static void xgbe_wrapper_tx_descriptor_init(struct xgbe_prv_data *pdata)
10810 {
10811 @@ -48461,7 +47261,7 @@ index 1c5d62e..8e14d54 100644
10812 struct xgbe_channel *channel;
10813 struct xgbe_ring *ring;
10814 struct xgbe_ring_data *rdata;
10815 -@@ -277,7 +277,7 @@ static void xgbe_wrapper_tx_descriptor_init(struct xgbe_prv_data *pdata)
10816 +@@ -276,7 +276,7 @@ static void xgbe_wrapper_tx_descriptor_init(struct xgbe_prv_data *pdata)
10817
10818 static void xgbe_wrapper_rx_descriptor_init(struct xgbe_prv_data *pdata)
10819 {
10820 @@ -48470,7 +47270,7 @@ index 1c5d62e..8e14d54 100644
10821 struct xgbe_channel *channel;
10822 struct xgbe_ring *ring;
10823 struct xgbe_ring_desc *rdesc;
10824 -@@ -506,7 +506,7 @@ err_out:
10825 +@@ -505,7 +505,7 @@ err_out:
10826 static void xgbe_realloc_skb(struct xgbe_channel *channel)
10827 {
10828 struct xgbe_prv_data *pdata = channel->pdata;
10829 @@ -48479,7 +47279,7 @@ index 1c5d62e..8e14d54 100644
10830 struct xgbe_ring *ring = channel->rx_ring;
10831 struct xgbe_ring_data *rdata;
10832 struct sk_buff *skb = NULL;
10833 -@@ -550,17 +550,12 @@ static void xgbe_realloc_skb(struct xgbe_channel *channel)
10834 +@@ -546,17 +546,12 @@ static void xgbe_realloc_skb(struct xgbe_channel *channel)
10835 DBGPR("<--xgbe_realloc_skb\n");
10836 }
10837
10838 @@ -48507,10 +47307,10 @@ index 1c5d62e..8e14d54 100644
10839 + .wrapper_rx_desc_init = xgbe_wrapper_rx_descriptor_init,
10840 +};
10841 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
10842 -index ea27383..faa8936 100644
10843 +index 9da3a03..022f15c 100644
10844 --- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
10845 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
10846 -@@ -2463,7 +2463,7 @@ static void xgbe_powerdown_rx(struct xgbe_prv_data *pdata)
10847 +@@ -2462,7 +2462,7 @@ static void xgbe_powerdown_rx(struct xgbe_prv_data *pdata)
10848
10849 static int xgbe_init(struct xgbe_prv_data *pdata)
10850 {
10851 @@ -48519,7 +47319,7 @@ index ea27383..faa8936 100644
10852 int ret;
10853
10854 DBGPR("-->xgbe_init\n");
10855 -@@ -2525,101 +2525,96 @@ static int xgbe_init(struct xgbe_prv_data *pdata)
10856 +@@ -2524,101 +2524,96 @@ static int xgbe_init(struct xgbe_prv_data *pdata)
10857 return 0;
10858 }
10859
10860 @@ -48695,10 +47495,10 @@ index ea27383..faa8936 100644
10861 + .config_dcb_pfc = xgbe_config_dcb_pfc,
10862 +};
10863 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
10864 -index b26d758..b0d1c3b 100644
10865 +index 2349ea9..a83a677 100644
10866 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
10867 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
10868 -@@ -155,7 +155,7 @@ static int xgbe_calc_rx_buf_size(struct net_device *netdev, unsigned int mtu)
10869 +@@ -154,7 +154,7 @@ static int xgbe_calc_rx_buf_size(struct net_device *netdev, unsigned int mtu)
10870
10871 static void xgbe_enable_rx_tx_ints(struct xgbe_prv_data *pdata)
10872 {
10873 @@ -48707,7 +47507,7 @@ index b26d758..b0d1c3b 100644
10874 struct xgbe_channel *channel;
10875 enum xgbe_int int_id;
10876 unsigned int i;
10877 -@@ -177,7 +177,7 @@ static void xgbe_enable_rx_tx_ints(struct xgbe_prv_data *pdata)
10878 +@@ -176,7 +176,7 @@ static void xgbe_enable_rx_tx_ints(struct xgbe_prv_data *pdata)
10879
10880 static void xgbe_disable_rx_tx_ints(struct xgbe_prv_data *pdata)
10881 {
10882 @@ -48716,7 +47516,7 @@ index b26d758..b0d1c3b 100644
10883 struct xgbe_channel *channel;
10884 enum xgbe_int int_id;
10885 unsigned int i;
10886 -@@ -200,7 +200,7 @@ static void xgbe_disable_rx_tx_ints(struct xgbe_prv_data *pdata)
10887 +@@ -199,7 +199,7 @@ static void xgbe_disable_rx_tx_ints(struct xgbe_prv_data *pdata)
10888 static irqreturn_t xgbe_isr(int irq, void *data)
10889 {
10890 struct xgbe_prv_data *pdata = data;
10891 @@ -48725,7 +47525,7 @@ index b26d758..b0d1c3b 100644
10892 struct xgbe_channel *channel;
10893 unsigned int dma_isr, dma_ch_isr;
10894 unsigned int mac_isr, mac_tssr;
10895 -@@ -447,7 +447,7 @@ static void xgbe_napi_disable(struct xgbe_prv_data *pdata, unsigned int del)
10896 +@@ -446,7 +446,7 @@ static void xgbe_napi_disable(struct xgbe_prv_data *pdata, unsigned int del)
10897
10898 void xgbe_init_tx_coalesce(struct xgbe_prv_data *pdata)
10899 {
10900 @@ -48734,7 +47534,7 @@ index b26d758..b0d1c3b 100644
10901
10902 DBGPR("-->xgbe_init_tx_coalesce\n");
10903
10904 -@@ -461,7 +461,7 @@ void xgbe_init_tx_coalesce(struct xgbe_prv_data *pdata)
10905 +@@ -460,7 +460,7 @@ void xgbe_init_tx_coalesce(struct xgbe_prv_data *pdata)
10906
10907 void xgbe_init_rx_coalesce(struct xgbe_prv_data *pdata)
10908 {
10909 @@ -48743,7 +47543,7 @@ index b26d758..b0d1c3b 100644
10910
10911 DBGPR("-->xgbe_init_rx_coalesce\n");
10912
10913 -@@ -475,7 +475,7 @@ void xgbe_init_rx_coalesce(struct xgbe_prv_data *pdata)
10914 +@@ -474,7 +474,7 @@ void xgbe_init_rx_coalesce(struct xgbe_prv_data *pdata)
10915
10916 static void xgbe_free_tx_skbuff(struct xgbe_prv_data *pdata)
10917 {
10918 @@ -48752,7 +47552,7 @@ index b26d758..b0d1c3b 100644
10919 struct xgbe_channel *channel;
10920 struct xgbe_ring *ring;
10921 struct xgbe_ring_data *rdata;
10922 -@@ -500,7 +500,7 @@ static void xgbe_free_tx_skbuff(struct xgbe_prv_data *pdata)
10923 +@@ -499,7 +499,7 @@ static void xgbe_free_tx_skbuff(struct xgbe_prv_data *pdata)
10924
10925 static void xgbe_free_rx_skbuff(struct xgbe_prv_data *pdata)
10926 {
10927 @@ -48761,7 +47561,7 @@ index b26d758..b0d1c3b 100644
10928 struct xgbe_channel *channel;
10929 struct xgbe_ring *ring;
10930 struct xgbe_ring_data *rdata;
10931 -@@ -526,7 +526,7 @@ static void xgbe_free_rx_skbuff(struct xgbe_prv_data *pdata)
10932 +@@ -525,7 +525,7 @@ static void xgbe_free_rx_skbuff(struct xgbe_prv_data *pdata)
10933 static void xgbe_adjust_link(struct net_device *netdev)
10934 {
10935 struct xgbe_prv_data *pdata = netdev_priv(netdev);
10936 @@ -48770,7 +47570,7 @@ index b26d758..b0d1c3b 100644
10937 struct phy_device *phydev = pdata->phydev;
10938 int new_state = 0;
10939
10940 -@@ -634,7 +634,7 @@ static void xgbe_phy_exit(struct xgbe_prv_data *pdata)
10941 +@@ -633,7 +633,7 @@ static void xgbe_phy_exit(struct xgbe_prv_data *pdata)
10942 int xgbe_powerdown(struct net_device *netdev, unsigned int caller)
10943 {
10944 struct xgbe_prv_data *pdata = netdev_priv(netdev);
10945 @@ -48779,7 +47579,7 @@ index b26d758..b0d1c3b 100644
10946 unsigned long flags;
10947
10948 DBGPR("-->xgbe_powerdown\n");
10949 -@@ -672,7 +672,7 @@ int xgbe_powerdown(struct net_device *netdev, unsigned int caller)
10950 +@@ -671,7 +671,7 @@ int xgbe_powerdown(struct net_device *netdev, unsigned int caller)
10951 int xgbe_powerup(struct net_device *netdev, unsigned int caller)
10952 {
10953 struct xgbe_prv_data *pdata = netdev_priv(netdev);
10954 @@ -48788,7 +47588,7 @@ index b26d758..b0d1c3b 100644
10955 unsigned long flags;
10956
10957 DBGPR("-->xgbe_powerup\n");
10958 -@@ -709,7 +709,7 @@ int xgbe_powerup(struct net_device *netdev, unsigned int caller)
10959 +@@ -708,7 +708,7 @@ int xgbe_powerup(struct net_device *netdev, unsigned int caller)
10960
10961 static int xgbe_start(struct xgbe_prv_data *pdata)
10962 {
10963 @@ -48797,7 +47597,7 @@ index b26d758..b0d1c3b 100644
10964 struct net_device *netdev = pdata->netdev;
10965
10966 DBGPR("-->xgbe_start\n");
10967 -@@ -735,7 +735,7 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
10968 +@@ -734,7 +734,7 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
10969
10970 static void xgbe_stop(struct xgbe_prv_data *pdata)
10971 {
10972 @@ -48806,7 +47606,7 @@ index b26d758..b0d1c3b 100644
10973 struct net_device *netdev = pdata->netdev;
10974
10975 DBGPR("-->xgbe_stop\n");
10976 -@@ -755,7 +755,7 @@ static void xgbe_stop(struct xgbe_prv_data *pdata)
10977 +@@ -754,7 +754,7 @@ static void xgbe_stop(struct xgbe_prv_data *pdata)
10978
10979 static void xgbe_restart_dev(struct xgbe_prv_data *pdata, unsigned int reset)
10980 {
10981 @@ -48815,7 +47615,7 @@ index b26d758..b0d1c3b 100644
10982
10983 DBGPR("-->xgbe_restart_dev\n");
10984
10985 -@@ -952,7 +952,7 @@ static int xgbe_set_hwtstamp_settings(struct xgbe_prv_data *pdata,
10986 +@@ -951,7 +951,7 @@ static int xgbe_set_hwtstamp_settings(struct xgbe_prv_data *pdata,
10987 return -ERANGE;
10988 }
10989
10990 @@ -48824,7 +47624,7 @@ index b26d758..b0d1c3b 100644
10991
10992 memcpy(&pdata->tstamp_config, &config, sizeof(config));
10993
10994 -@@ -1090,8 +1090,8 @@ static void xgbe_packet_info(struct xgbe_prv_data *pdata,
10995 +@@ -1089,8 +1089,8 @@ static void xgbe_packet_info(struct xgbe_prv_data *pdata,
10996 static int xgbe_open(struct net_device *netdev)
10997 {
10998 struct xgbe_prv_data *pdata = netdev_priv(netdev);
10999 @@ -48835,7 +47635,7 @@ index b26d758..b0d1c3b 100644
11000 int ret;
11001
11002 DBGPR("-->xgbe_open\n");
11003 -@@ -1171,8 +1171,8 @@ err_phy_init:
11004 +@@ -1170,8 +1170,8 @@ err_phy_init:
11005 static int xgbe_close(struct net_device *netdev)
11006 {
11007 struct xgbe_prv_data *pdata = netdev_priv(netdev);
11008 @@ -48846,7 +47646,7 @@ index b26d758..b0d1c3b 100644
11009
11010 DBGPR("-->xgbe_close\n");
11011
11012 -@@ -1206,8 +1206,8 @@ static int xgbe_close(struct net_device *netdev)
11013 +@@ -1205,8 +1205,8 @@ static int xgbe_close(struct net_device *netdev)
11014 static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
11015 {
11016 struct xgbe_prv_data *pdata = netdev_priv(netdev);
11017 @@ -48857,7 +47657,7 @@ index b26d758..b0d1c3b 100644
11018 struct xgbe_channel *channel;
11019 struct xgbe_ring *ring;
11020 struct xgbe_packet_data *packet;
11021 -@@ -1276,7 +1276,7 @@ tx_netdev_return:
11022 +@@ -1275,7 +1275,7 @@ tx_netdev_return:
11023 static void xgbe_set_rx_mode(struct net_device *netdev)
11024 {
11025 struct xgbe_prv_data *pdata = netdev_priv(netdev);
11026 @@ -48866,7 +47666,7 @@ index b26d758..b0d1c3b 100644
11027 unsigned int pr_mode, am_mode;
11028
11029 DBGPR("-->xgbe_set_rx_mode\n");
11030 -@@ -1295,7 +1295,7 @@ static void xgbe_set_rx_mode(struct net_device *netdev)
11031 +@@ -1294,7 +1294,7 @@ static void xgbe_set_rx_mode(struct net_device *netdev)
11032 static int xgbe_set_mac_address(struct net_device *netdev, void *addr)
11033 {
11034 struct xgbe_prv_data *pdata = netdev_priv(netdev);
11035 @@ -48875,7 +47675,7 @@ index b26d758..b0d1c3b 100644
11036 struct sockaddr *saddr = addr;
11037
11038 DBGPR("-->xgbe_set_mac_address\n");
11039 -@@ -1362,7 +1362,7 @@ static struct rtnl_link_stats64 *xgbe_get_stats64(struct net_device *netdev,
11040 +@@ -1361,7 +1361,7 @@ static struct rtnl_link_stats64 *xgbe_get_stats64(struct net_device *netdev,
11041
11042 DBGPR("-->%s\n", __func__);
11043
11044 @@ -48884,7 +47684,7 @@ index b26d758..b0d1c3b 100644
11045
11046 s->rx_packets = pstats->rxframecount_gb;
11047 s->rx_bytes = pstats->rxoctetcount_gb;
11048 -@@ -1389,7 +1389,7 @@ static int xgbe_vlan_rx_add_vid(struct net_device *netdev, __be16 proto,
11049 +@@ -1388,7 +1388,7 @@ static int xgbe_vlan_rx_add_vid(struct net_device *netdev, __be16 proto,
11050 u16 vid)
11051 {
11052 struct xgbe_prv_data *pdata = netdev_priv(netdev);
11053 @@ -48893,7 +47693,7 @@ index b26d758..b0d1c3b 100644
11054
11055 DBGPR("-->%s\n", __func__);
11056
11057 -@@ -1405,7 +1405,7 @@ static int xgbe_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto,
11058 +@@ -1404,7 +1404,7 @@ static int xgbe_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto,
11059 u16 vid)
11060 {
11061 struct xgbe_prv_data *pdata = netdev_priv(netdev);
11062 @@ -48902,16 +47702,16 @@ index b26d758..b0d1c3b 100644
11063
11064 DBGPR("-->%s\n", __func__);
11065
11066 -@@ -1465,7 +1465,7 @@ static int xgbe_set_features(struct net_device *netdev,
11067 +@@ -1464,7 +1464,7 @@ static int xgbe_set_features(struct net_device *netdev,
11068 netdev_features_t features)
11069 {
11070 struct xgbe_prv_data *pdata = netdev_priv(netdev);
11071 - struct xgbe_hw_if *hw_if = &pdata->hw_if;
11072 + struct xgbe_hw_if *hw_if = pdata->hw_if;
11073 - unsigned int rxcsum, rxvlan, rxvlan_filter;
11074 + netdev_features_t rxcsum, rxvlan, rxvlan_filter;
11075
11076 rxcsum = pdata->netdev_features & NETIF_F_RXCSUM;
11077 -@@ -1521,7 +1521,7 @@ struct net_device_ops *xgbe_get_netdev_ops(void)
11078 +@@ -1520,7 +1520,7 @@ struct net_device_ops *xgbe_get_netdev_ops(void)
11079 static void xgbe_rx_refresh(struct xgbe_channel *channel)
11080 {
11081 struct xgbe_prv_data *pdata = channel->pdata;
11082 @@ -48920,7 +47720,7 @@ index b26d758..b0d1c3b 100644
11083 struct xgbe_ring *ring = channel->rx_ring;
11084 struct xgbe_ring_data *rdata;
11085
11086 -@@ -1537,8 +1537,8 @@ static void xgbe_rx_refresh(struct xgbe_channel *channel)
11087 +@@ -1536,8 +1536,8 @@ static void xgbe_rx_refresh(struct xgbe_channel *channel)
11088 static int xgbe_tx_poll(struct xgbe_channel *channel)
11089 {
11090 struct xgbe_prv_data *pdata = channel->pdata;
11091 @@ -48931,7 +47731,7 @@ index b26d758..b0d1c3b 100644
11092 struct xgbe_ring *ring = channel->tx_ring;
11093 struct xgbe_ring_data *rdata;
11094 struct xgbe_ring_desc *rdesc;
11095 -@@ -1590,7 +1590,7 @@ static int xgbe_tx_poll(struct xgbe_channel *channel)
11096 +@@ -1589,7 +1589,7 @@ static int xgbe_tx_poll(struct xgbe_channel *channel)
11097 static int xgbe_rx_poll(struct xgbe_channel *channel, int budget)
11098 {
11099 struct xgbe_prv_data *pdata = channel->pdata;
11100 @@ -48941,7 +47741,7 @@ index b26d758..b0d1c3b 100644
11101 struct xgbe_ring_data *rdata;
11102 struct xgbe_packet_data *packet;
11103 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
11104 -index 46f6130..f37dde3 100644
11105 +index 49508ec..2617cca 100644
11106 --- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
11107 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
11108 @@ -203,7 +203,7 @@ static void xgbe_get_ethtool_stats(struct net_device *netdev,
11109 @@ -48972,10 +47772,10 @@ index 46f6130..f37dde3 100644
11110 unsigned int tx_frames, tx_usecs;
11111
11112 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
11113 -index bdf9cfa..340aea1 100644
11114 +index f5a8fa0..0bb58ff 100644
11115 --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c
11116 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
11117 -@@ -210,12 +210,6 @@ static void xgbe_default_config(struct xgbe_prv_data *pdata)
11118 +@@ -209,12 +209,6 @@ static void xgbe_default_config(struct xgbe_prv_data *pdata)
11119 DBGPR("<--xgbe_default_config\n");
11120 }
11121
11122 @@ -48988,7 +47788,7 @@ index bdf9cfa..340aea1 100644
11123 static int xgbe_probe(struct platform_device *pdev)
11124 {
11125 struct xgbe_prv_data *pdata;
11126 -@@ -328,9 +322,8 @@ static int xgbe_probe(struct platform_device *pdev)
11127 +@@ -327,9 +321,8 @@ static int xgbe_probe(struct platform_device *pdev)
11128 netdev->base_addr = (unsigned long)pdata->xgmac_regs;
11129
11130 /* Set all the function pointers */
11131 @@ -49001,10 +47801,10 @@ index bdf9cfa..340aea1 100644
11132 /* Issue software reset to device */
11133 hw_if->exit(pdata);
11134 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
11135 -index 6d2221e..47d1325 100644
11136 +index 363b210..b241389 100644
11137 --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
11138 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
11139 -@@ -127,7 +127,7 @@
11140 +@@ -126,7 +126,7 @@
11141 static int xgbe_mdio_read(struct mii_bus *mii, int prtad, int mmd_reg)
11142 {
11143 struct xgbe_prv_data *pdata = mii->priv;
11144 @@ -49013,7 +47813,7 @@ index 6d2221e..47d1325 100644
11145 int mmd_data;
11146
11147 DBGPR_MDIO("-->xgbe_mdio_read: prtad=%#x mmd_reg=%#x\n",
11148 -@@ -144,7 +144,7 @@ static int xgbe_mdio_write(struct mii_bus *mii, int prtad, int mmd_reg,
11149 +@@ -143,7 +143,7 @@ static int xgbe_mdio_write(struct mii_bus *mii, int prtad, int mmd_reg,
11150 u16 mmd_val)
11151 {
11152 struct xgbe_prv_data *pdata = mii->priv;
11153 @@ -49023,10 +47823,10 @@ index 6d2221e..47d1325 100644
11154
11155 DBGPR_MDIO("-->xgbe_mdio_write: prtad=%#x mmd_reg=%#x mmd_data=%#x\n",
11156 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
11157 -index 37e64cf..c3b61cf 100644
11158 +index a1bf9d1c..84adcab 100644
11159 --- a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
11160 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
11161 -@@ -130,7 +130,7 @@ static cycle_t xgbe_cc_read(const struct cyclecounter *cc)
11162 +@@ -129,7 +129,7 @@ static cycle_t xgbe_cc_read(const struct cyclecounter *cc)
11163 tstamp_cc);
11164 u64 nsec;
11165
11166 @@ -49035,7 +47835,7 @@ index 37e64cf..c3b61cf 100644
11167
11168 return nsec;
11169 }
11170 -@@ -159,7 +159,7 @@ static int xgbe_adjfreq(struct ptp_clock_info *info, s32 delta)
11171 +@@ -158,7 +158,7 @@ static int xgbe_adjfreq(struct ptp_clock_info *info, s32 delta)
11172
11173 spin_lock_irqsave(&pdata->tstamp_lock, flags);
11174
11175 @@ -49045,10 +47845,10 @@ index 37e64cf..c3b61cf 100644
11176 spin_unlock_irqrestore(&pdata->tstamp_lock, flags);
11177
11178 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
11179 -index e9fe6e6..875fbaf 100644
11180 +index 789957d..d7d0245 100644
11181 --- a/drivers/net/ethernet/amd/xgbe/xgbe.h
11182 +++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
11183 -@@ -585,8 +585,8 @@ struct xgbe_prv_data {
11184 +@@ -583,8 +583,8 @@ struct xgbe_prv_data {
11185
11186 int irq_number;
11187
11188 @@ -49059,7 +47859,7 @@ index e9fe6e6..875fbaf 100644
11189
11190 /* AXI DMA settings */
11191 unsigned int axdomain;
11192 -@@ -699,6 +699,9 @@ struct xgbe_prv_data {
11193 +@@ -697,6 +697,9 @@ struct xgbe_prv_data {
11194 #endif
11195 };
11196
11197 @@ -49070,10 +47870,10 @@ index e9fe6e6..875fbaf 100644
11198
11199 void xgbe_init_function_ptrs_dev(struct xgbe_hw_if *);
11200 diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
11201 -index 571427c..e9fe9e7 100644
11202 +index adcacda..fa6e0ae 100644
11203 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
11204 +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
11205 -@@ -1058,7 +1058,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp)
11206 +@@ -1065,7 +1065,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp)
11207 static inline void bnx2x_init_bp_objs(struct bnx2x *bp)
11208 {
11209 /* RX_MODE controlling object */
11210 @@ -49083,7 +47883,7 @@ index 571427c..e9fe9e7 100644
11211 /* multicast configuration controlling object */
11212 bnx2x_init_mcast_obj(bp, &bp->mcast_obj, bp->fp->cl_id, bp->fp->cid,
11213 diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
11214 -index b193604..8873bfd 100644
11215 +index 7bc2924..2112002 100644
11216 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
11217 +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
11218 @@ -2329,15 +2329,14 @@ int bnx2x_config_rx_mode(struct bnx2x *bp,
11219 @@ -49108,10 +47908,10 @@ index b193604..8873bfd 100644
11220 }
11221
11222 diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
11223 -index 718ecd2..2183b2f 100644
11224 +index e97275f..52e28bc 100644
11225 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
11226 +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
11227 -@@ -1340,8 +1340,7 @@ int bnx2x_vlan_mac_move(struct bnx2x *bp,
11228 +@@ -1409,8 +1409,7 @@ int bnx2x_vlan_mac_move(struct bnx2x *bp,
11229
11230 /********************* RX MODE ****************/
11231
11232 @@ -49134,10 +47934,10 @@ index 31c9f82..e65e986 100644
11233 #define CHIPREV_ID_5752_A0_HW 0x5000
11234 #define CHIPREV_ID_5752_A0 0x6000
11235 diff --git a/drivers/net/ethernet/brocade/bna/bna_enet.c b/drivers/net/ethernet/brocade/bna/bna_enet.c
11236 -index 13f9636..228040f 100644
11237 +index 903466e..b285864 100644
11238 --- a/drivers/net/ethernet/brocade/bna/bna_enet.c
11239 +++ b/drivers/net/ethernet/brocade/bna/bna_enet.c
11240 -@@ -1690,10 +1690,10 @@ bna_cb_ioceth_reset(void *arg)
11241 +@@ -1693,10 +1693,10 @@ bna_cb_ioceth_reset(void *arg)
11242 }
11243
11244 static struct bfa_ioc_cbfn bna_ioceth_cbfn = {
11245 @@ -49152,26 +47952,6 @@ index 13f9636..228040f 100644
11246 };
11247
11248 static void bna_attr_init(struct bna_ioceth *ioceth)
11249 -diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
11250 -index ffc92a4..40edc77 100644
11251 ---- a/drivers/net/ethernet/brocade/bna/bnad.c
11252 -+++ b/drivers/net/ethernet/brocade/bna/bnad.c
11253 -@@ -552,6 +552,7 @@ bnad_cq_setup_skb_frags(struct bna_rcb *rcb, struct sk_buff *skb,
11254 -
11255 - len = (vec == nvecs) ?
11256 - last_fraglen : unmap->vector.len;
11257 -+ skb->truesize += unmap->vector.len;
11258 - totlen += len;
11259 -
11260 - skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
11261 -@@ -563,7 +564,6 @@ bnad_cq_setup_skb_frags(struct bna_rcb *rcb, struct sk_buff *skb,
11262 -
11263 - skb->len += totlen;
11264 - skb->data_len += totlen;
11265 -- skb->truesize += totlen;
11266 - }
11267 -
11268 - static inline void
11269 diff --git a/drivers/net/ethernet/chelsio/cxgb3/l2t.h b/drivers/net/ethernet/chelsio/cxgb3/l2t.h
11270 index 8cffcdf..aadf043 100644
11271 --- a/drivers/net/ethernet/chelsio/cxgb3/l2t.h
11272 @@ -49186,10 +47966,10 @@ index 8cffcdf..aadf043 100644
11273 #define L2T_SKB_CB(skb) ((struct l2t_skb_cb *)(skb)->cb)
11274
11275 diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
11276 -index 9f5f3c3..86d21a6 100644
11277 +index 279873c..11e1921 100644
11278 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
11279 +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
11280 -@@ -2359,7 +2359,7 @@ static void get_regs(struct net_device *dev, struct ethtool_regs *regs,
11281 +@@ -2365,7 +2365,7 @@ static void get_regs(struct net_device *dev, struct ethtool_regs *regs,
11282
11283 int i;
11284 struct adapter *ap = netdev2adap(dev);
11285 @@ -49221,10 +48001,10 @@ index cf8b6ff..274271e 100644
11286 break;
11287 }
11288 diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
11289 -index 93ff8ef..39c64dd 100644
11290 +index 597c463..5cc1a7f 100644
11291 --- a/drivers/net/ethernet/emulex/benet/be_main.c
11292 +++ b/drivers/net/ethernet/emulex/benet/be_main.c
11293 -@@ -533,7 +533,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val)
11294 +@@ -537,7 +537,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val)
11295
11296 if (wrapped)
11297 newacc += 65536;
11298 @@ -49233,16 +48013,6 @@ index 93ff8ef..39c64dd 100644
11299 }
11300
11301 static void populate_erx_stats(struct be_adapter *adapter,
11302 -@@ -4286,6 +4286,9 @@ static int be_ndo_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh)
11303 - if (nla_type(attr) != IFLA_BRIDGE_MODE)
11304 - continue;
11305 -
11306 -+ if (nla_len(attr) < sizeof(mode))
11307 -+ return -EINVAL;
11308 -+
11309 - mode = nla_get_u16(attr);
11310 - if (mode != BRIDGE_MODE_VEPA && mode != BRIDGE_MODE_VEB)
11311 - return -EINVAL;
11312 diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
11313 index c77fa4a..7fd42fc 100644
11314 --- a/drivers/net/ethernet/faraday/ftgmac100.c
11315 @@ -49282,20 +48052,6 @@ index 537b621..07f87ce 100644
11316 smp_mb(); /* Force the above update. */
11317 }
11318
11319 -diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
11320 -index e82821f..c7dd0af 100644
11321 ---- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
11322 -+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
11323 -@@ -7789,6 +7789,9 @@ static int ixgbe_ndo_bridge_setlink(struct net_device *dev,
11324 - if (nla_type(attr) != IFLA_BRIDGE_MODE)
11325 - continue;
11326 -
11327 -+ if (nla_len(attr) < sizeof(mode))
11328 -+ return -EINVAL;
11329 -+
11330 - mode = nla_get_u16(attr);
11331 - if (mode == BRIDGE_MODE_VEPA) {
11332 - reg = 0;
11333 diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
11334 index 5fd4b52..87aa34b 100644
11335 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
11336 @@ -49309,20 +48065,21 @@ index 5fd4b52..87aa34b 100644
11337 smp_mb();
11338
11339 /* need lock to prevent incorrect read while modifying cyclecounter */
11340 -diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
11341 -index c14d4d8..66da603 100644
11342 ---- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
11343 -+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
11344 -@@ -1259,6 +1259,9 @@ int ixgbe_ndo_set_vf_spoofchk(struct net_device *netdev, int vf, bool setting)
11345 - struct ixgbe_hw *hw = &adapter->hw;
11346 - u32 regval;
11347 -
11348 -+ if (vf >= adapter->num_vfs)
11349 -+ return -EINVAL;
11350 -+
11351 - adapter->vfinfo[vf].spoofchk_enabled = setting;
11352 +diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
11353 +index 454d9fe..59f0f0b 100644
11354 +--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
11355 ++++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
11356 +@@ -458,8 +458,8 @@ static bool mlx4_en_process_tx_cq(struct net_device *dev,
11357 + wmb();
11358 +
11359 + /* we want to dirty this cache line once */
11360 +- ACCESS_ONCE(ring->last_nr_txbb) = last_nr_txbb;
11361 +- ACCESS_ONCE(ring->cons) = ring_cons + txbbs_skipped;
11362 ++ ACCESS_ONCE_RW(ring->last_nr_txbb) = last_nr_txbb;
11363 ++ ACCESS_ONCE_RW(ring->cons) = ring_cons + txbbs_skipped;
11364 +
11365 + netdev_tx_completed_queue(ring->tx_queue, packets, bytes);
11366
11367 - regval = IXGBE_READ_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg));
11368 diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c
11369 index 2bbd01f..e8baa64 100644
11370 --- a/drivers/net/ethernet/neterion/vxge/vxge-config.c
11371 @@ -49349,10 +48106,10 @@ index 2bbd01f..e8baa64 100644
11372 __vxge_hw_mempool_create(vpath->hldev,
11373 fifo->config->memblock_size,
11374 diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
11375 -index 3172cdf..d01ab34 100644
11376 +index 2bb48d5..d1a865d 100644
11377 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
11378 +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
11379 -@@ -2190,7 +2190,9 @@ int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter)
11380 +@@ -2324,7 +2324,9 @@ int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter)
11381 max_tx_rings = QLCNIC_MAX_VNIC_TX_RINGS;
11382 } else if (ret == QLC_83XX_DEFAULT_OPMODE) {
11383 ahw->nic_mode = QLCNIC_DEFAULT_MODE;
11384 @@ -49408,10 +48165,10 @@ index c9f57fb..208bdc1 100644
11385 u32 entry_offset, dump, no_entries, buf_offset = 0;
11386 int i, k, ops_cnt, ops_index, dump_size = 0;
11387 diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
11388 -index 0921302..927f761 100644
11389 +index cf154f7..c948d1b 100644
11390 --- a/drivers/net/ethernet/realtek/r8169.c
11391 +++ b/drivers/net/ethernet/realtek/r8169.c
11392 -@@ -744,22 +744,22 @@ struct rtl8169_private {
11393 +@@ -788,22 +788,22 @@ struct rtl8169_private {
11394 struct mdio_ops {
11395 void (*write)(struct rtl8169_private *, int, int);
11396 int (*read)(struct rtl8169_private *, int);
11397 @@ -49467,7 +48224,7 @@ index 08c483b..2c4a553 100644
11398
11399 /* To mask all all interrupts.*/
11400 diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
11401 -index d5e07de..e3bf20a 100644
11402 +index 2f48f79..8ae1a1a 100644
11403 --- a/drivers/net/hyperv/hyperv_net.h
11404 +++ b/drivers/net/hyperv/hyperv_net.h
11405 @@ -171,7 +171,7 @@ struct rndis_device {
11406 @@ -49515,10 +48272,10 @@ index 6cbc56a..5f7e6c8 100644
11407 priv = netdev_priv(dev);
11408 priv->phy = phy;
11409 diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
11410 -index d2d4a3d..8b7a1be 100644
11411 +index 34f846b..4a0d5b1 100644
11412 --- a/drivers/net/ifb.c
11413 +++ b/drivers/net/ifb.c
11414 -@@ -252,7 +252,7 @@ static int ifb_validate(struct nlattr *tb[], struct nlattr *data[])
11415 +@@ -253,7 +253,7 @@ static int ifb_validate(struct nlattr *tb[], struct nlattr *data[])
11416 return 0;
11417 }
11418
11419 @@ -49528,10 +48285,10 @@ index d2d4a3d..8b7a1be 100644
11420 .priv_size = sizeof(struct ifb_private),
11421 .setup = ifb_setup,
11422 diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
11423 -index 5f17ad0..e0463c8 100644
11424 +index bfb0b6e..5c396ce 100644
11425 --- a/drivers/net/macvlan.c
11426 +++ b/drivers/net/macvlan.c
11427 -@@ -264,7 +264,7 @@ static void macvlan_broadcast_enqueue(struct macvlan_port *port,
11428 +@@ -335,7 +335,7 @@ static void macvlan_broadcast_enqueue(struct macvlan_port *port,
11429 free_nskb:
11430 kfree_skb(nskb);
11431 err:
11432 @@ -49539,8 +48296,8 @@ index 5f17ad0..e0463c8 100644
11433 + atomic_long_inc_unchecked(&skb->dev->rx_dropped);
11434 }
11435
11436 - /* called under rcu_read_lock() from netif_receive_skb */
11437 -@@ -1150,13 +1150,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = {
11438 + static void macvlan_flush_sources(struct macvlan_port *port,
11439 +@@ -1454,13 +1454,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = {
11440 int macvlan_link_register(struct rtnl_link_ops *ops)
11441 {
11442 /* common fields */
11443 @@ -49563,7 +48320,7 @@ index 5f17ad0..e0463c8 100644
11444
11445 return rtnl_link_register(ops);
11446 };
11447 -@@ -1236,7 +1238,7 @@ static int macvlan_device_event(struct notifier_block *unused,
11448 +@@ -1540,7 +1542,7 @@ static int macvlan_device_event(struct notifier_block *unused,
11449 return NOTIFY_DONE;
11450 }
11451
11452 @@ -49573,7 +48330,7 @@ index 5f17ad0..e0463c8 100644
11453 };
11454
11455 diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
11456 -index 07c942b..bce8b8a 100644
11457 +index 880cc09..6a68ba6 100644
11458 --- a/drivers/net/macvtap.c
11459 +++ b/drivers/net/macvtap.c
11460 @@ -422,7 +422,7 @@ static void macvtap_setup(struct net_device *dev)
11461 @@ -49585,7 +48342,7 @@ index 07c942b..bce8b8a 100644
11462 .kind = "macvtap",
11463 .setup = macvtap_setup,
11464 .newlink = macvtap_newlink,
11465 -@@ -1023,7 +1023,7 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd,
11466 +@@ -1020,7 +1020,7 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd,
11467 }
11468
11469 ret = 0;
11470 @@ -49594,7 +48351,7 @@ index 07c942b..bce8b8a 100644
11471 put_user(q->flags, &ifr->ifr_flags))
11472 ret = -EFAULT;
11473 macvtap_put_vlan(vlan);
11474 -@@ -1193,7 +1193,7 @@ static int macvtap_device_event(struct notifier_block *unused,
11475 +@@ -1190,7 +1190,7 @@ static int macvtap_device_event(struct notifier_block *unused,
11476 return NOTIFY_DONE;
11477 }
11478
11479 @@ -49617,7 +48374,7 @@ index 34924df..a747360 100644
11480 .priv_size = sizeof(struct nlmon),
11481 .setup = nlmon_setup,
11482 diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
11483 -index 17ecdd6..79ad848 100644
11484 +index 794a473..9fd437b 100644
11485 --- a/drivers/net/ppp/ppp_generic.c
11486 +++ b/drivers/net/ppp/ppp_generic.c
11487 @@ -1020,7 +1020,6 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
11488 @@ -49652,10 +48409,10 @@ index 079f7ad..b2a2bfa7 100644
11489
11490 /* We've got a compressed packet; read the change byte */
11491 diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
11492 -index 1f76c2ea..997760b 100644
11493 +index 2368395..bf6fe96 100644
11494 --- a/drivers/net/team/team.c
11495 +++ b/drivers/net/team/team.c
11496 -@@ -2072,7 +2072,7 @@ static unsigned int team_get_num_rx_queues(void)
11497 +@@ -2090,7 +2090,7 @@ static unsigned int team_get_num_rx_queues(void)
11498 return TEAM_DEFAULT_NUM_RX_QUEUES;
11499 }
11500
11501 @@ -49664,7 +48421,7 @@ index 1f76c2ea..997760b 100644
11502 .kind = DRV_NAME,
11503 .priv_size = sizeof(struct team),
11504 .setup = team_setup,
11505 -@@ -2862,7 +2862,7 @@ static int team_device_event(struct notifier_block *unused,
11506 +@@ -2880,7 +2880,7 @@ static int team_device_event(struct notifier_block *unused,
11507 return NOTIFY_DONE;
11508 }
11509
11510 @@ -49674,10 +48431,10 @@ index 1f76c2ea..997760b 100644
11511 };
11512
11513 diff --git a/drivers/net/tun.c b/drivers/net/tun.c
11514 -index d965e8a..6226000 100644
11515 +index 9dd3746..74f191e 100644
11516 --- a/drivers/net/tun.c
11517 +++ b/drivers/net/tun.c
11518 -@@ -1414,7 +1414,7 @@ static int tun_validate(struct nlattr *tb[], struct nlattr *data[])
11519 +@@ -1426,7 +1426,7 @@ static int tun_validate(struct nlattr *tb[], struct nlattr *data[])
11520 return -EINVAL;
11521 }
11522
11523 @@ -49686,7 +48443,7 @@ index d965e8a..6226000 100644
11524 .kind = DRV_NAME,
11525 .priv_size = sizeof(struct tun_struct),
11526 .setup = tun_setup,
11527 -@@ -1861,7 +1861,7 @@ unlock:
11528 +@@ -1868,7 +1868,7 @@ unlock:
11529 }
11530
11531 static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
11532 @@ -49695,7 +48452,7 @@ index d965e8a..6226000 100644
11533 {
11534 struct tun_file *tfile = file->private_data;
11535 struct tun_struct *tun;
11536 -@@ -1874,6 +1874,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
11537 +@@ -1881,6 +1881,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
11538 unsigned int ifindex;
11539 int ret;
11540
11541 @@ -49797,13 +48554,13 @@ index babda7d..e40c90a 100644
11542 hso_start_serial_device(serial_table[i], GFP_NOIO);
11543 hso_kick_transmit(dev2ser(serial_table[i]));
11544 diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
11545 -index 604ef21..d1f49a1 100644
11546 +index c6554c7..7e2ebd7 100644
11547 --- a/drivers/net/usb/r8152.c
11548 +++ b/drivers/net/usb/r8152.c
11549 -@@ -575,7 +575,7 @@ struct r8152 {
11550 - void (*up)(struct r8152 *);
11551 - void (*down)(struct r8152 *);
11552 +@@ -577,7 +577,7 @@ struct r8152 {
11553 void (*unload)(struct r8152 *);
11554 + int (*eee_get)(struct r8152 *, struct ethtool_eee *);
11555 + int (*eee_set)(struct r8152 *, struct ethtool_eee *);
11556 - } rtl_ops;
11557 + } __no_const rtl_ops;
11558
11559 @@ -49832,7 +48589,7 @@ index a2515887..6d13233 100644
11560
11561 /* we will have to manufacture ethernet headers, prepare template */
11562 diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
11563 -index 59caa06..de191b3 100644
11564 +index b0bc8ea..3af931b5 100644
11565 --- a/drivers/net/virtio_net.c
11566 +++ b/drivers/net/virtio_net.c
11567 @@ -48,7 +48,7 @@ module_param(gso, bool, 0444);
11568 @@ -49845,10 +48602,10 @@ index 59caa06..de191b3 100644
11569 #define VIRTNET_DRIVER_VERSION "1.0.0"
11570
11571 diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
11572 -index 2aa3a8d..d15e3c4 100644
11573 +index 42b2d6a5..2a2cb41 100644
11574 --- a/drivers/net/vxlan.c
11575 +++ b/drivers/net/vxlan.c
11576 -@@ -2758,7 +2758,7 @@ nla_put_failure:
11577 +@@ -2695,7 +2695,7 @@ nla_put_failure:
11578 return -EMSGSIZE;
11579 }
11580
11581 @@ -49857,7 +48614,7 @@ index 2aa3a8d..d15e3c4 100644
11582 .kind = "vxlan",
11583 .maxtype = IFLA_VXLAN_MAX,
11584 .policy = vxlan_policy,
11585 -@@ -2805,7 +2805,7 @@ static int vxlan_lowerdev_event(struct notifier_block *unused,
11586 +@@ -2742,7 +2742,7 @@ static int vxlan_lowerdev_event(struct notifier_block *unused,
11587 return NOTIFY_DONE;
11588 }
11589
11590 @@ -50074,10 +48831,10 @@ index da92bfa..5a9001a 100644
11591 return msecs_to_jiffies((s->poll_timeout[2] << 16)
11592 | (s->poll_timeout[1] << 8)
11593 diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
11594 -index 5fdc40d..3975205 100644
11595 +index 676bd4e..0b807a3 100644
11596 --- a/drivers/net/wireless/ath/ath10k/htc.c
11597 +++ b/drivers/net/wireless/ath/ath10k/htc.c
11598 -@@ -856,7 +856,10 @@ void ath10k_htc_stop(struct ath10k_htc *htc)
11599 +@@ -848,7 +848,10 @@ int ath10k_htc_start(struct ath10k_htc *htc)
11600 /* registered target arrival callback from the HIF layer */
11601 int ath10k_htc_init(struct ath10k *ar)
11602 {
11603 @@ -50089,7 +48846,7 @@ index 5fdc40d..3975205 100644
11604 struct ath10k_htc_ep *ep = NULL;
11605 struct ath10k_htc *htc = &ar->htc;
11606
11607 -@@ -866,8 +869,6 @@ int ath10k_htc_init(struct ath10k *ar)
11608 +@@ -857,8 +860,6 @@ int ath10k_htc_init(struct ath10k *ar)
11609 ath10k_htc_reset_endpoint_states(htc);
11610
11611 /* setup HIF layer callbacks */
11612 @@ -50099,10 +48856,10 @@ index 5fdc40d..3975205 100644
11613
11614 /* Get HIF default pipe for HTC message exchange */
11615 diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h
11616 -index 4716d33..a688310 100644
11617 +index 527179c..a890150 100644
11618 --- a/drivers/net/wireless/ath/ath10k/htc.h
11619 +++ b/drivers/net/wireless/ath/ath10k/htc.h
11620 -@@ -271,13 +271,13 @@ enum ath10k_htc_ep_id {
11621 +@@ -270,13 +270,13 @@ enum ath10k_htc_ep_id {
11622
11623 struct ath10k_htc_ops {
11624 void (*target_send_suspend_complete)(struct ath10k *ar);
11625 @@ -50119,7 +48876,7 @@ index 4716d33..a688310 100644
11626 /* service connection information */
11627 struct ath10k_htc_svc_conn_req {
11628 diff --git a/drivers/net/wireless/ath/ath9k/ar9002_mac.c b/drivers/net/wireless/ath/ath9k/ar9002_mac.c
11629 -index 59af9f9..5f3564f 100644
11630 +index 2a93519..7052786 100644
11631 --- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c
11632 +++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c
11633 @@ -220,8 +220,8 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i)
11634 @@ -50213,7 +48970,7 @@ index 59af9f9..5f3564f 100644
11635
11636 static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds,
11637 diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
11638 -index 71e38e8..5ac96ca 100644
11639 +index 057b165..98ae88f 100644
11640 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
11641 +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
11642 @@ -39,47 +39,47 @@ ar9003_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i)
11643 @@ -50342,10 +49099,10 @@ index 71e38e8..5ac96ca 100644
11644
11645 static u16 ar9003_calc_ptr_chksum(struct ar9003_txc *ads)
11646 diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
11647 -index 51b4ebe..d1929dd 100644
11648 +index 975074f..e9440da 100644
11649 --- a/drivers/net/wireless/ath/ath9k/hw.h
11650 +++ b/drivers/net/wireless/ath/ath9k/hw.h
11651 -@@ -629,7 +629,7 @@ struct ath_hw_private_ops {
11652 +@@ -630,7 +630,7 @@ struct ath_hw_private_ops {
11653
11654 /* ANI */
11655 void (*ani_cache_ini_regs)(struct ath_hw *ah);
11656 @@ -50354,7 +49111,7 @@ index 51b4ebe..d1929dd 100644
11657
11658 /**
11659 * struct ath_spec_scan - parameters for Atheros spectral scan
11660 -@@ -706,7 +706,7 @@ struct ath_hw_ops {
11661 +@@ -708,7 +708,7 @@ struct ath_hw_ops {
11662 #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
11663 void (*set_bt_ant_diversity)(struct ath_hw *hw, bool enable);
11664 #endif
11665 @@ -50364,43 +49121,43 @@ index 51b4ebe..d1929dd 100644
11666 struct ath_nf_limits {
11667 s16 max;
11668 diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
11669 -index 4b148bb..ac738fa 100644
11670 +index 4f18a6b..b07d92f 100644
11671 --- a/drivers/net/wireless/ath/ath9k/main.c
11672 +++ b/drivers/net/wireless/ath/ath9k/main.c
11673 -@@ -2592,16 +2592,18 @@ void ath9k_fill_chanctx_ops(void)
11674 - if (!ath9k_use_chanctx)
11675 +@@ -2454,16 +2454,18 @@ void ath9k_fill_chanctx_ops(void)
11676 + if (!ath9k_is_chanctx_enabled())
11677 return;
11678
11679 -- ath9k_ops.hw_scan = ath9k_hw_scan;
11680 -- ath9k_ops.cancel_hw_scan = ath9k_cancel_hw_scan;
11681 -- ath9k_ops.remain_on_channel = ath9k_remain_on_channel;
11682 +- ath9k_ops.hw_scan = ath9k_hw_scan;
11683 +- ath9k_ops.cancel_hw_scan = ath9k_cancel_hw_scan;
11684 +- ath9k_ops.remain_on_channel = ath9k_remain_on_channel;
11685 - ath9k_ops.cancel_remain_on_channel = ath9k_cancel_remain_on_channel;
11686 -- ath9k_ops.add_chanctx = ath9k_add_chanctx;
11687 -- ath9k_ops.remove_chanctx = ath9k_remove_chanctx;
11688 -- ath9k_ops.change_chanctx = ath9k_change_chanctx;
11689 -- ath9k_ops.assign_vif_chanctx = ath9k_assign_vif_chanctx;
11690 -- ath9k_ops.unassign_vif_chanctx = ath9k_unassign_vif_chanctx;
11691 -- ath9k_ops.mgd_prepare_tx = ath9k_chanctx_force_active;
11692 +- ath9k_ops.add_chanctx = ath9k_add_chanctx;
11693 +- ath9k_ops.remove_chanctx = ath9k_remove_chanctx;
11694 +- ath9k_ops.change_chanctx = ath9k_change_chanctx;
11695 +- ath9k_ops.assign_vif_chanctx = ath9k_assign_vif_chanctx;
11696 +- ath9k_ops.unassign_vif_chanctx = ath9k_unassign_vif_chanctx;
11697 +- ath9k_ops.mgd_prepare_tx = ath9k_mgd_prepare_tx;
11698 + pax_open_kernel();
11699 -+ *(void **)&ath9k_ops.hw_scan = ath9k_hw_scan;
11700 -+ *(void **)&ath9k_ops.cancel_hw_scan = ath9k_cancel_hw_scan;
11701 -+ *(void **)&ath9k_ops.remain_on_channel = ath9k_remain_on_channel;
11702 ++ *(void **)&ath9k_ops.hw_scan = ath9k_hw_scan;
11703 ++ *(void **)&ath9k_ops.cancel_hw_scan = ath9k_cancel_hw_scan;
11704 ++ *(void **)&ath9k_ops.remain_on_channel = ath9k_remain_on_channel;
11705 + *(void **)&ath9k_ops.cancel_remain_on_channel = ath9k_cancel_remain_on_channel;
11706 -+ *(void **)&ath9k_ops.add_chanctx = ath9k_add_chanctx;
11707 -+ *(void **)&ath9k_ops.remove_chanctx = ath9k_remove_chanctx;
11708 -+ *(void **)&ath9k_ops.change_chanctx = ath9k_change_chanctx;
11709 -+ *(void **)&ath9k_ops.assign_vif_chanctx = ath9k_assign_vif_chanctx;
11710 -+ *(void **)&ath9k_ops.unassign_vif_chanctx = ath9k_unassign_vif_chanctx;
11711 -+ *(void **)&ath9k_ops.mgd_prepare_tx = ath9k_chanctx_force_active;
11712 ++ *(void **)&ath9k_ops.add_chanctx = ath9k_add_chanctx;
11713 ++ *(void **)&ath9k_ops.remove_chanctx = ath9k_remove_chanctx;
11714 ++ *(void **)&ath9k_ops.change_chanctx = ath9k_change_chanctx;
11715 ++ *(void **)&ath9k_ops.assign_vif_chanctx = ath9k_assign_vif_chanctx;
11716 ++ *(void **)&ath9k_ops.unassign_vif_chanctx = ath9k_unassign_vif_chanctx;
11717 ++ *(void **)&ath9k_ops.mgd_prepare_tx = ath9k_mgd_prepare_tx;
11718 + pax_close_kernel();
11719 }
11720
11721 - struct ieee80211_ops ath9k_ops = {
11722 + #endif
11723 diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
11724 -index 92190da..f3a4c4c 100644
11725 +index 058a9f2..d5cb1ba 100644
11726 --- a/drivers/net/wireless/b43/phy_lp.c
11727 +++ b/drivers/net/wireless/b43/phy_lp.c
11728 -@@ -2514,7 +2514,7 @@ static int lpphy_b2063_tune(struct b43_wldev *dev,
11729 +@@ -2502,7 +2502,7 @@ static int lpphy_b2063_tune(struct b43_wldev *dev,
11730 {
11731 struct ssb_bus *bus = dev->dev->sdev->bus;
11732
11733 @@ -50561,10 +49318,10 @@ index 0ffb6ff..c0b7f0e 100644
11734 memset(buf, 0, sizeof(buf));
11735 buf_size = min(count, sizeof(buf) - 1);
11736 diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
11737 -index bb36d67..a43451e 100644
11738 +index dd2f3f8..fb1ae88 100644
11739 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c
11740 +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
11741 -@@ -1686,7 +1686,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file,
11742 +@@ -1689,7 +1689,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file,
11743 struct isr_statistics *isr_stats = &trans_pcie->isr_stats;
11744
11745 char buf[8];
11746 @@ -50573,7 +49330,7 @@ index bb36d67..a43451e 100644
11747 u32 reset_flag;
11748
11749 memset(buf, 0, sizeof(buf));
11750 -@@ -1707,7 +1707,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
11751 +@@ -1710,7 +1710,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
11752 {
11753 struct iwl_trans *trans = file->private_data;
11754 char buf[8];
11755 @@ -50583,7 +49340,7 @@ index bb36d67..a43451e 100644
11756
11757 memset(buf, 0, sizeof(buf));
11758 diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
11759 -index 6b48c865..19646a7 100644
11760 +index c9ad4cf..49a2fa0 100644
11761 --- a/drivers/net/wireless/mac80211_hwsim.c
11762 +++ b/drivers/net/wireless/mac80211_hwsim.c
11763 @@ -2577,20 +2577,20 @@ static int __init init_mac80211_hwsim(void)
11764 @@ -50622,7 +49379,7 @@ index 6b48c865..19646a7 100644
11765 spin_lock_init(&hwsim_radio_lock);
11766 INIT_LIST_HEAD(&hwsim_radios);
11767 diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
11768 -index d2a9a08..0cb175d 100644
11769 +index 1a4facd..a2ecbbd 100644
11770 --- a/drivers/net/wireless/rndis_wlan.c
11771 +++ b/drivers/net/wireless/rndis_wlan.c
11772 @@ -1236,7 +1236,7 @@ static int set_rts_threshold(struct usbnet *usbdev, u32 rts_threshold)
11773 @@ -50903,7 +49660,7 @@ index 3f49345..c750d0b 100644
11774 return __oprofilefs_create_file(root, name,
11775 &atomic_ro_fops, 0444, val);
11776 diff --git a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c
11777 -index 61be1d9..dec05d7 100644
11778 +index bdef916..88c7dee 100644
11779 --- a/drivers/oprofile/timer_int.c
11780 +++ b/drivers/oprofile/timer_int.c
11781 @@ -93,7 +93,7 @@ static int oprofile_cpu_notify(struct notifier_block *self,
11782 @@ -50938,7 +49695,7 @@ index 3b47080..6cd05dd 100644
11783 #endif /* IEEE1284.3 support. */
11784
11785 diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
11786 -index 8dcccff..35d701d 100644
11787 +index 6ca2399..68d866b 100644
11788 --- a/drivers/pci/hotplug/acpiphp_ibm.c
11789 +++ b/drivers/pci/hotplug/acpiphp_ibm.c
11790 @@ -452,7 +452,9 @@ static int __init ibm_acpiphp_init(void)
11791 @@ -50953,7 +49710,7 @@ index 8dcccff..35d701d 100644
11792
11793 return retval;
11794 diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
11795 -index 04fcd78..39e83f1 100644
11796 +index 66b7bbe..26bee78 100644
11797 --- a/drivers/pci/hotplug/cpcihp_generic.c
11798 +++ b/drivers/pci/hotplug/cpcihp_generic.c
11799 @@ -73,7 +73,6 @@ static u16 port;
11800 @@ -50984,7 +49741,7 @@ index 04fcd78..39e83f1 100644
11801
11802 status = cpci_hp_register_controller(&generic_hpc);
11803 diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c
11804 -index 6757b3e..d3bad62 100644
11805 +index 7ecf34e..effed62 100644
11806 --- a/drivers/pci/hotplug/cpcihp_zt5550.c
11807 +++ b/drivers/pci/hotplug/cpcihp_zt5550.c
11808 @@ -59,7 +59,6 @@
11809 @@ -50995,7 +49752,7 @@ index 6757b3e..d3bad62 100644
11810 static struct cpci_hp_controller zt5550_hpc;
11811
11812 /* Primary cPCI bus bridge device */
11813 -@@ -205,6 +204,10 @@ static int zt5550_hc_disable_irq(void)
11814 +@@ -204,6 +203,10 @@ static int zt5550_hc_disable_irq(void)
11815 return 0;
11816 }
11817
11818 @@ -51006,13 +49763,13 @@ index 6757b3e..d3bad62 100644
11819 static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
11820 {
11821 int status;
11822 -@@ -216,16 +219,17 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
11823 +@@ -215,16 +218,17 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
11824 dbg("returned from zt5550_hc_config");
11825
11826 memset(&zt5550_hpc, 0, sizeof (struct cpci_hp_controller));
11827 - zt5550_hpc_ops.query_enum = zt5550_hc_query_enum;
11828 zt5550_hpc.ops = &zt5550_hpc_ops;
11829 - if(!poll) {
11830 + if (!poll) {
11831 zt5550_hpc.irq = hc_dev->irq;
11832 zt5550_hpc.irq_flags = IRQF_SHARED;
11833 zt5550_hpc.dev_id = hc_dev;
11834 @@ -51029,23 +49786,20 @@ index 6757b3e..d3bad62 100644
11835 info("using ENUM# polling mode");
11836 }
11837 diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c
11838 -index 0968a9b..5a00edf 100644
11839 +index 1e08ff8c..3cd145f 100644
11840 --- a/drivers/pci/hotplug/cpqphp_nvram.c
11841 +++ b/drivers/pci/hotplug/cpqphp_nvram.c
11842 -@@ -427,9 +427,13 @@ static u32 store_HRT (void __iomem *rom_start)
11843 +@@ -425,8 +425,10 @@ static u32 store_HRT (void __iomem *rom_start)
11844
11845 void compaq_nvram_init (void __iomem *rom_start)
11846 {
11847 -+
11848 +#ifndef CONFIG_PAX_KERNEXEC
11849 - if (rom_start) {
11850 + if (rom_start)
11851 compaq_int15_entry_point = (rom_start + ROM_INT15_PHY_ADDR - ROM_PHY_ADDR);
11852 - }
11853 +#endif
11854 -+
11855 +
11856 dbg("int15 entry = %p\n", compaq_int15_entry_point);
11857
11858 - /* initialize our int15 lock */
11859 diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
11860 index 56d8486..f26113f 100644
11861 --- a/drivers/pci/hotplug/pci_hotplug_core.c
11862 @@ -51077,10 +49831,10 @@ index 07aa722..84514b4 100644
11863 int retval = -ENOMEM;
11864
11865 diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
11866 -index 6807edd..086a7dc 100644
11867 +index 084587d..4a8f9df 100644
11868 --- a/drivers/pci/msi.c
11869 +++ b/drivers/pci/msi.c
11870 -@@ -507,8 +507,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
11871 +@@ -488,8 +488,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
11872 {
11873 struct attribute **msi_attrs;
11874 struct attribute *msi_attr;
11875 @@ -51091,7 +49845,7 @@ index 6807edd..086a7dc 100644
11876 const struct attribute_group **msi_irq_groups;
11877 struct msi_desc *entry;
11878 int ret = -ENOMEM;
11879 -@@ -568,7 +568,7 @@ error_attrs:
11880 +@@ -549,7 +549,7 @@ error_attrs:
11881 count = 0;
11882 msi_attr = msi_attrs[count];
11883 while (msi_attr) {
11884 @@ -51101,10 +49855,10 @@ index 6807edd..086a7dc 100644
11885 kfree(msi_dev_attr);
11886 ++count;
11887 diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
11888 -index 6d04771..4126004 100644
11889 +index 2c6643f..3a6d8e0 100644
11890 --- a/drivers/pci/pci-sysfs.c
11891 +++ b/drivers/pci/pci-sysfs.c
11892 -@@ -1134,7 +1134,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
11893 +@@ -1133,7 +1133,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
11894 {
11895 /* allocate attribute structure, piggyback attribute name */
11896 int name_len = write_combine ? 13 : 10;
11897 @@ -51113,7 +49867,7 @@ index 6d04771..4126004 100644
11898 int retval;
11899
11900 res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC);
11901 -@@ -1311,7 +1311,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor
11902 +@@ -1310,7 +1310,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor
11903 static int pci_create_capabilities_sysfs(struct pci_dev *dev)
11904 {
11905 int retval;
11906 @@ -51122,7 +49876,7 @@ index 6d04771..4126004 100644
11907
11908 /* If the device has VPD, try to expose it in sysfs. */
11909 if (dev->vpd) {
11910 -@@ -1358,7 +1358,7 @@ int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev)
11911 +@@ -1357,7 +1357,7 @@ int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev)
11912 {
11913 int retval;
11914 int rom_size = 0;
11915 @@ -51132,10 +49886,10 @@ index 6d04771..4126004 100644
11916 if (!sysfs_initialized)
11917 return -EACCES;
11918 diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
11919 -index 0601890..dc15007 100644
11920 +index 4a3902d..7f1fc42 100644
11921 --- a/drivers/pci/pci.h
11922 +++ b/drivers/pci/pci.h
11923 -@@ -91,7 +91,7 @@ struct pci_vpd_ops {
11924 +@@ -93,7 +93,7 @@ struct pci_vpd_ops {
11925 struct pci_vpd {
11926 unsigned int len;
11927 const struct pci_vpd_ops *ops;
11928 @@ -51162,10 +49916,10 @@ index e1e7026..d28dd33 100644
11929 #define ASPM_STATE_ALL (ASPM_STATE_L0S | ASPM_STATE_L1)
11930
11931 diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
11932 -index 9cce960..7c530f4 100644
11933 +index c8ca98c..b1bc005 100644
11934 --- a/drivers/pci/probe.c
11935 +++ b/drivers/pci/probe.c
11936 -@@ -176,7 +176,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
11937 +@@ -177,7 +177,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
11938 struct pci_bus_region region, inverted_region;
11939 bool bar_too_big = false, bar_too_high = false, bar_invalid = false;
11940
11941 @@ -51364,7 +50118,7 @@ index 26ad9ff..7c52909 100644
11942 static ssize_t sony_nc_smart_conn_store(struct device *dev,
11943 struct device_attribute *attr,
11944 diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
11945 -index 3bbc6eb..7760460 100644
11946 +index cf0f893..5955997 100644
11947 --- a/drivers/platform/x86/thinkpad_acpi.c
11948 +++ b/drivers/platform/x86/thinkpad_acpi.c
11949 @@ -2094,7 +2094,7 @@ static int hotkey_mask_get(void)
11950 @@ -51493,7 +50247,7 @@ index cc439fd..8fa30df 100644
11951
11952 #endif /* CONFIG_SYSFS */
11953 diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
11954 -index 078afd6..fbac9da 100644
11955 +index 694e8cd..9f03483 100644
11956 --- a/drivers/power/power_supply_core.c
11957 +++ b/drivers/power/power_supply_core.c
11958 @@ -28,7 +28,10 @@ EXPORT_SYMBOL_GPL(power_supply_class);
11959 @@ -51508,7 +50262,7 @@ index 078afd6..fbac9da 100644
11960
11961 static bool __power_supply_is_supplied_by(struct power_supply *supplier,
11962 struct power_supply *supply)
11963 -@@ -640,7 +643,7 @@ static int __init power_supply_class_init(void)
11964 +@@ -637,7 +640,7 @@ static int __init power_supply_class_init(void)
11965 return PTR_ERR(power_supply_class);
11966
11967 power_supply_class->dev_uevent = power_supply_uevent;
11968 @@ -51518,10 +50272,10 @@ index 078afd6..fbac9da 100644
11969 return 0;
11970 }
11971 diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
11972 -index 750a202..99c8f4b 100644
11973 +index 62653f5..d0bb485 100644
11974 --- a/drivers/power/power_supply_sysfs.c
11975 +++ b/drivers/power/power_supply_sysfs.c
11976 -@@ -234,17 +234,15 @@ static struct attribute_group power_supply_attr_group = {
11977 +@@ -238,17 +238,15 @@ static struct attribute_group power_supply_attr_group = {
11978 .is_visible = power_supply_attr_is_visible,
11979 };
11980
11981 @@ -51757,10 +50511,10 @@ index 302e626..12579af 100644
11982 da->attr.name = info->pin_config[i].name;
11983 da->attr.mode = 0644;
11984 diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
11985 -index a3c3785..c901e3a 100644
11986 +index cd87c0c..715ecbe 100644
11987 --- a/drivers/regulator/core.c
11988 +++ b/drivers/regulator/core.c
11989 -@@ -3481,7 +3481,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
11990 +@@ -3567,7 +3567,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
11991 {
11992 const struct regulation_constraints *constraints = NULL;
11993 const struct regulator_init_data *init_data;
11994 @@ -51769,8 +50523,8 @@ index a3c3785..c901e3a 100644
11995 struct regulator_dev *rdev;
11996 struct device *dev;
11997 int ret, i;
11998 -@@ -3551,7 +3551,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
11999 - rdev->dev.of_node = of_node_get(config->of_node);
12000 +@@ -3641,7 +3641,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
12001 + rdev->dev.class = &regulator_class;
12002 rdev->dev.parent = dev;
12003 dev_set_name(&rdev->dev, "regulator.%d",
12004 - atomic_inc_return(&regulator_no) - 1);
12005 @@ -51779,7 +50533,7 @@ index a3c3785..c901e3a 100644
12006 if (ret != 0) {
12007 put_device(&rdev->dev);
12008 diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
12009 -index 2fc4111..6aa88ca 100644
12010 +index 7eee2ca..4024513 100644
12011 --- a/drivers/regulator/max8660.c
12012 +++ b/drivers/regulator/max8660.c
12013 @@ -424,8 +424,10 @@ static int max8660_probe(struct i2c_client *client,
12014 @@ -51815,24 +50569,24 @@ index dbedf17..18ff6b7 100644
12015
12016 if (pdata) {
12017 diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
12018 -index f374fa5..26f0683 100644
12019 +index 793b662..85f74cd 100644
12020 --- a/drivers/regulator/mc13892-regulator.c
12021 +++ b/drivers/regulator/mc13892-regulator.c
12022 -@@ -582,10 +582,12 @@ static int mc13892_regulator_probe(struct platform_device *pdev)
12023 - }
12024 +@@ -584,10 +584,12 @@ static int mc13892_regulator_probe(struct platform_device *pdev)
12025 mc13xxx_unlock(mc13892);
12026
12027 -- mc13892_regulators[MC13892_VCAM].desc.ops->set_mode
12028 + /* update mc13892_vcam ops */
12029 + pax_open_kernel();
12030 -+ *(void **)&mc13892_regulators[MC13892_VCAM].desc.ops->set_mode
12031 - = mc13892_vcam_set_mode;
12032 -- mc13892_regulators[MC13892_VCAM].desc.ops->get_mode
12033 -+ *(void **)&mc13892_regulators[MC13892_VCAM].desc.ops->get_mode
12034 - = mc13892_vcam_get_mode;
12035 + memcpy(&mc13892_vcam_ops, mc13892_regulators[MC13892_VCAM].desc.ops,
12036 + sizeof(struct regulator_ops));
12037 +- mc13892_vcam_ops.set_mode = mc13892_vcam_set_mode,
12038 +- mc13892_vcam_ops.get_mode = mc13892_vcam_get_mode,
12039 ++ *(void **)&mc13892_vcam_ops.set_mode = mc13892_vcam_set_mode,
12040 ++ *(void **)&mc13892_vcam_ops.get_mode = mc13892_vcam_get_mode,
12041 + pax_close_kernel();
12042 + mc13892_regulators[MC13892_VCAM].desc.ops = &mc13892_vcam_ops;
12043
12044 mc13xxx_data = mc13xxx_parse_regulators_dt(pdev, mc13892_regulators,
12045 - ARRAY_SIZE(mc13892_regulators));
12046 diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
12047 index 5b2e761..c8c8a4a 100644
12048 --- a/drivers/rtc/rtc-cmos.c
12049 @@ -51870,7 +50624,7 @@ index d049393..bb20be0 100644
12050
12051 case RTC_PIE_ON:
12052 diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
12053 -index f03d5ba..8325bf6 100644
12054 +index bb43cf7..ee4d274 100644
12055 --- a/drivers/rtc/rtc-ds1307.c
12056 +++ b/drivers/rtc/rtc-ds1307.c
12057 @@ -107,7 +107,7 @@ struct ds1307 {
12058 @@ -52092,7 +50846,7 @@ index 6de80e3..a11e0ac 100644
12059
12060 /* These three are default values which can be overridden */
12061 diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
12062 -index 6b35d0d..2880305 100644
12063 +index cef5d49..01e280e 100644
12064 --- a/drivers/scsi/hpsa.c
12065 +++ b/drivers/scsi/hpsa.c
12066 @@ -701,10 +701,10 @@ static inline u32 next_command(struct ctlr_info *h, u8 q)
12067 @@ -52147,7 +50901,7 @@ index 6b35d0d..2880305 100644
12068 (h->interrupts_enabled == 0);
12069 }
12070
12071 -@@ -6458,7 +6458,7 @@ static int hpsa_pci_init(struct ctlr_info *h)
12072 +@@ -6445,7 +6445,7 @@ static int hpsa_pci_init(struct ctlr_info *h)
12073 if (prod_index < 0)
12074 return -ENODEV;
12075 h->product_name = products[prod_index].product_name;
12076 @@ -52156,7 +50910,7 @@ index 6b35d0d..2880305 100644
12077
12078 pci_disable_link_state(h->pdev, PCIE_LINK_STATE_L0S |
12079 PCIE_LINK_STATE_L1 | PCIE_LINK_STATE_CLKPM);
12080 -@@ -6780,7 +6780,7 @@ static void controller_lockup_detected(struct ctlr_info *h)
12081 +@@ -6790,7 +6790,7 @@ static void controller_lockup_detected(struct ctlr_info *h)
12082 unsigned long flags;
12083 u32 lockup_detected;
12084
12085 @@ -52165,7 +50919,7 @@ index 6b35d0d..2880305 100644
12086 spin_lock_irqsave(&h->lock, flags);
12087 lockup_detected = readl(h->vaddr + SA5_SCRATCHPAD_OFFSET);
12088 if (!lockup_detected) {
12089 -@@ -7027,7 +7027,7 @@ reinit_after_soft_reset:
12090 +@@ -7037,7 +7037,7 @@ reinit_after_soft_reset:
12091 }
12092
12093 /* make sure the board interrupts are off */
12094 @@ -52174,7 +50928,7 @@ index 6b35d0d..2880305 100644
12095
12096 if (hpsa_request_irq(h, do_hpsa_intr_msi, do_hpsa_intr_intx))
12097 goto clean2;
12098 -@@ -7062,7 +7062,7 @@ reinit_after_soft_reset:
12099 +@@ -7072,7 +7072,7 @@ reinit_after_soft_reset:
12100 * fake ones to scoop up any residual completions.
12101 */
12102 spin_lock_irqsave(&h->lock, flags);
12103 @@ -52183,7 +50937,7 @@ index 6b35d0d..2880305 100644
12104 spin_unlock_irqrestore(&h->lock, flags);
12105 free_irqs(h);
12106 rc = hpsa_request_irq(h, hpsa_msix_discard_completions,
12107 -@@ -7081,9 +7081,9 @@ reinit_after_soft_reset:
12108 +@@ -7091,9 +7091,9 @@ reinit_after_soft_reset:
12109 dev_info(&h->pdev->dev, "Board READY.\n");
12110 dev_info(&h->pdev->dev,
12111 "Waiting for stale completions to drain.\n");
12112 @@ -52195,7 +50949,7 @@ index 6b35d0d..2880305 100644
12113
12114 rc = controller_reset_failed(h->cfgtable);
12115 if (rc)
12116 -@@ -7109,7 +7109,7 @@ reinit_after_soft_reset:
12117 +@@ -7119,7 +7119,7 @@ reinit_after_soft_reset:
12118 h->drv_req_rescan = 0;
12119
12120 /* Turn the interrupts on so we can service requests */
12121 @@ -52204,7 +50958,7 @@ index 6b35d0d..2880305 100644
12122
12123 hpsa_hba_inquiry(h);
12124 hpsa_register_scsi(h); /* hook ourselves into SCSI subsystem */
12125 -@@ -7174,7 +7174,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
12126 +@@ -7184,7 +7184,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
12127 * To write all data in the battery backed cache to disks
12128 */
12129 hpsa_flush_cache(h);
12130 @@ -52213,7 +50967,7 @@ index 6b35d0d..2880305 100644
12131 hpsa_free_irqs_and_disable_msix(h);
12132 }
12133
12134 -@@ -7292,7 +7292,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
12135 +@@ -7302,7 +7302,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
12136 CFGTBL_Trans_enable_directed_msix |
12137 (trans_support & (CFGTBL_Trans_io_accel1 |
12138 CFGTBL_Trans_io_accel2));
12139 @@ -52222,7 +50976,7 @@ index 6b35d0d..2880305 100644
12140
12141 /* This is a bit complicated. There are 8 registers on
12142 * the controller which we write to to tell it 8 different
12143 -@@ -7334,7 +7334,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
12144 +@@ -7344,7 +7344,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
12145 * perform the superfluous readl() after each command submission.
12146 */
12147 if (trans_support & (CFGTBL_Trans_io_accel1 | CFGTBL_Trans_io_accel2))
12148 @@ -52231,7 +50985,7 @@ index 6b35d0d..2880305 100644
12149
12150 /* Controller spec: zero out this buffer. */
12151 for (i = 0; i < h->nreply_queues; i++)
12152 -@@ -7364,12 +7364,12 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
12153 +@@ -7374,12 +7374,12 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
12154 * enable outbound interrupt coalescing in accelerator mode;
12155 */
12156 if (trans_support & CFGTBL_Trans_io_accel1) {
12157 @@ -52520,7 +51274,7 @@ index 434e903..5a4a79b 100644
12158 struct dentry *idiag_root;
12159 struct dentry *idiag_pci_cfg;
12160 diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
12161 -index b0aedce..89c6ca6 100644
12162 +index 786a2af..562c6a2 100644
12163 --- a/drivers/scsi/lpfc/lpfc_debugfs.c
12164 +++ b/drivers/scsi/lpfc/lpfc_debugfs.c
12165 @@ -106,7 +106,7 @@ MODULE_PARM_DESC(lpfc_debugfs_mask_disc_trc,
12166 @@ -52603,10 +51357,10 @@ index b0aedce..89c6ca6 100644
12167 snprintf(name, sizeof(name), "discovery_trace");
12168 vport->debug_disc_trc =
12169 diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
12170 -index a5769a9..718ecc7 100644
12171 +index 0b2c53a..aec2b45 100644
12172 --- a/drivers/scsi/lpfc/lpfc_init.c
12173 +++ b/drivers/scsi/lpfc/lpfc_init.c
12174 -@@ -11299,8 +11299,10 @@ lpfc_init(void)
12175 +@@ -11290,8 +11290,10 @@ lpfc_init(void)
12176 "misc_register returned with status %d", error);
12177
12178 if (lpfc_enable_npiv) {
12179 @@ -52620,19 +51374,19 @@ index a5769a9..718ecc7 100644
12180 lpfc_transport_template =
12181 fc_attach_transport(&lpfc_transport_functions);
12182 diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
12183 -index 7862c55..5aa65df 100644
12184 +index b99399f..d29dc75 100644
12185 --- a/drivers/scsi/lpfc/lpfc_scsi.c
12186 +++ b/drivers/scsi/lpfc/lpfc_scsi.c
12187 -@@ -382,7 +382,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba)
12188 - uint32_t evt_posted;
12189 +@@ -383,7 +383,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba)
12190 + unsigned long expires;
12191
12192 spin_lock_irqsave(&phba->hbalock, flags);
12193 - atomic_inc(&phba->num_rsrc_err);
12194 + atomic_inc_unchecked(&phba->num_rsrc_err);
12195 phba->last_rsrc_error_time = jiffies;
12196
12197 - if ((phba->last_ramp_down_time + QUEUE_RAMP_DOWN_INTERVAL) > jiffies) {
12198 -@@ -423,8 +423,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
12199 + expires = phba->last_ramp_down_time + QUEUE_RAMP_DOWN_INTERVAL;
12200 +@@ -425,8 +425,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
12201 unsigned long num_rsrc_err, num_cmd_success;
12202 int i;
12203
12204 @@ -52643,7 +51397,7 @@ index 7862c55..5aa65df 100644
12205
12206 /*
12207 * The error and success command counters are global per
12208 -@@ -452,8 +452,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
12209 +@@ -454,8 +454,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
12210 }
12211 }
12212 lpfc_destroy_vport_work_array(phba, vports);
12213 @@ -52655,10 +51409,10 @@ index 7862c55..5aa65df 100644
12214
12215 /**
12216 diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
12217 -index dd46101..ca80eb9 100644
12218 +index c80ed04..e674f01 100644
12219 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
12220 +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
12221 -@@ -1559,7 +1559,7 @@ _scsih_get_resync(struct device *dev)
12222 +@@ -1561,7 +1561,7 @@ _scsih_get_resync(struct device *dev)
12223 {
12224 struct scsi_device *sdev = to_scsi_device(dev);
12225 struct MPT2SAS_ADAPTER *ioc = shost_priv(sdev->host);
12226 @@ -52667,7 +51421,7 @@ index dd46101..ca80eb9 100644
12227 unsigned long flags;
12228 Mpi2RaidVolPage0_t vol_pg0;
12229 Mpi2ConfigReply_t mpi_reply;
12230 -@@ -1611,7 +1611,7 @@ _scsih_get_state(struct device *dev)
12231 +@@ -1613,7 +1613,7 @@ _scsih_get_state(struct device *dev)
12232 {
12233 struct scsi_device *sdev = to_scsi_device(dev);
12234 struct MPT2SAS_ADAPTER *ioc = shost_priv(sdev->host);
12235 @@ -52676,7 +51430,7 @@ index dd46101..ca80eb9 100644
12236 unsigned long flags;
12237 Mpi2RaidVolPage0_t vol_pg0;
12238 Mpi2ConfigReply_t mpi_reply;
12239 -@@ -6648,7 +6648,7 @@ _scsih_sas_ir_operation_status_event(struct MPT2SAS_ADAPTER *ioc,
12240 +@@ -6663,7 +6663,7 @@ _scsih_sas_ir_operation_status_event(struct MPT2SAS_ADAPTER *ioc,
12241 Mpi2EventDataIrOperationStatus_t *event_data =
12242 (Mpi2EventDataIrOperationStatus_t *)
12243 fw_event->event_data;
12244 @@ -52685,7 +51439,7 @@ index dd46101..ca80eb9 100644
12245 unsigned long flags;
12246 u16 handle;
12247
12248 -@@ -7119,7 +7119,7 @@ _scsih_scan_for_devices_after_reset(struct MPT2SAS_ADAPTER *ioc)
12249 +@@ -7134,7 +7134,7 @@ _scsih_scan_for_devices_after_reset(struct MPT2SAS_ADAPTER *ioc)
12250 u64 sas_address;
12251 struct _sas_device *sas_device;
12252 struct _sas_node *expander_device;
12253 @@ -52695,7 +51449,7 @@ index dd46101..ca80eb9 100644
12254 unsigned long flags;
12255
12256 diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
12257 -index 6f3275d..fa5e6b6 100644
12258 +index bcb64eb..f08cf71 100644
12259 --- a/drivers/scsi/pmcraid.c
12260 +++ b/drivers/scsi/pmcraid.c
12261 @@ -200,8 +200,8 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev)
12262 @@ -52748,7 +51502,7 @@ index 6f3275d..fa5e6b6 100644
12263 return;
12264
12265 fw_version = be16_to_cpu(pinstance->inq_data->fw_version);
12266 -@@ -5322,8 +5322,8 @@ static int pmcraid_init_instance(struct pci_dev *pdev, struct Scsi_Host *host,
12267 +@@ -5312,8 +5312,8 @@ static int pmcraid_init_instance(struct pci_dev *pdev, struct Scsi_Host *host,
12268 init_waitqueue_head(&pinstance->reset_wait_q);
12269
12270 atomic_set(&pinstance->outstanding_cmds, 0);
12271 @@ -52759,7 +51513,7 @@ index 6f3275d..fa5e6b6 100644
12272
12273 INIT_LIST_HEAD(&pinstance->free_res_q);
12274 INIT_LIST_HEAD(&pinstance->used_res_q);
12275 -@@ -6036,7 +6036,7 @@ static int pmcraid_probe(struct pci_dev *pdev,
12276 +@@ -6026,7 +6026,7 @@ static int pmcraid_probe(struct pci_dev *pdev,
12277 /* Schedule worker thread to handle CCN and take care of adding and
12278 * removing devices to OS
12279 */
12280 @@ -52802,10 +51556,10 @@ index e1d150f..6c6df44 100644
12281 /* To indicate add/delete/modify during CCN */
12282 u8 change_detected;
12283 diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
12284 -index 16fe519..3b1ec82 100644
12285 +index 82b92c4..3178171 100644
12286 --- a/drivers/scsi/qla2xxx/qla_attr.c
12287 +++ b/drivers/scsi/qla2xxx/qla_attr.c
12288 -@@ -2188,7 +2188,7 @@ qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
12289 +@@ -2192,7 +2192,7 @@ qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
12290 return 0;
12291 }
12292
12293 @@ -52814,7 +51568,7 @@ index 16fe519..3b1ec82 100644
12294
12295 .show_host_node_name = 1,
12296 .show_host_port_name = 1,
12297 -@@ -2236,7 +2236,7 @@ struct fc_function_template qla2xxx_transport_functions = {
12298 +@@ -2240,7 +2240,7 @@ struct fc_function_template qla2xxx_transport_functions = {
12299 .bsg_timeout = qla24xx_bsg_timeout,
12300 };
12301
12302 @@ -52824,10 +51578,10 @@ index 16fe519..3b1ec82 100644
12303 .show_host_node_name = 1,
12304 .show_host_port_name = 1,
12305 diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
12306 -index d646540..5b13554 100644
12307 +index b1865a7..a7723d3 100644
12308 --- a/drivers/scsi/qla2xxx/qla_gbl.h
12309 +++ b/drivers/scsi/qla2xxx/qla_gbl.h
12310 -@@ -569,8 +569,8 @@ extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *);
12311 +@@ -571,8 +571,8 @@ extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t);
12312 struct device_attribute;
12313 extern struct device_attribute *qla2x00_host_attrs[];
12314 struct fc_function_template;
12315 @@ -52839,10 +51593,10 @@ index d646540..5b13554 100644
12316 extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *, bool);
12317 extern void qla2x00_init_host_attr(scsi_qla_host_t *);
12318 diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
12319 -index 8252c0e..613adad 100644
12320 +index db3dbd9..2492392 100644
12321 --- a/drivers/scsi/qla2xxx/qla_os.c
12322 +++ b/drivers/scsi/qla2xxx/qla_os.c
12323 -@@ -1493,8 +1493,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
12324 +@@ -1507,8 +1507,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
12325 !pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(64))) {
12326 /* Ok, a 64bit DMA mask is applicable. */
12327 ha->flags.enable_64bit_addressing = 1;
12328 @@ -52897,7 +51651,7 @@ index 199fcf7..3c3a918 100644
12329 ddb_entry->default_relogin_timeout =
12330 (def_timeout > LOGIN_TOV) && (def_timeout < LOGIN_TOV * 10) ?
12331 diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
12332 -index d81f3cc..0093e5b 100644
12333 +index 79c77b4..ef6ec0b 100644
12334 --- a/drivers/scsi/scsi.c
12335 +++ b/drivers/scsi/scsi.c
12336 @@ -645,7 +645,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
12337 @@ -52910,10 +51664,10 @@ index d81f3cc..0093e5b 100644
12338 /* check if the device is still usable */
12339 if (unlikely(cmd->device->sdev_state == SDEV_DEL)) {
12340 diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
12341 -index 7cb8c73..14561b5 100644
12342 +index 50a6e1a..de5252e 100644
12343 --- a/drivers/scsi/scsi_lib.c
12344 +++ b/drivers/scsi/scsi_lib.c
12345 -@@ -1581,7 +1581,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
12346 +@@ -1583,7 +1583,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
12347 shost = sdev->host;
12348 scsi_init_cmd_errh(cmd);
12349 cmd->result = DID_NO_CONNECT << 16;
12350 @@ -52922,7 +51676,7 @@ index 7cb8c73..14561b5 100644
12351
12352 /*
12353 * SCSI request completion path will do scsi_device_unbusy(),
12354 -@@ -1604,9 +1604,9 @@ static void scsi_softirq_done(struct request *rq)
12355 +@@ -1606,9 +1606,9 @@ static void scsi_softirq_done(struct request *rq)
12356
12357 INIT_LIST_HEAD(&cmd->eh_entry);
12358
12359 @@ -52935,7 +51689,7 @@ index 7cb8c73..14561b5 100644
12360 disposition = scsi_decide_disposition(cmd);
12361 if (disposition != SUCCESS &&
12362 diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
12363 -index 8b4105a..1f58363 100644
12364 +index f4cb7b3..dfa79c4 100644
12365 --- a/drivers/scsi/scsi_sysfs.c
12366 +++ b/drivers/scsi/scsi_sysfs.c
12367 @@ -805,7 +805,7 @@ show_iostat_##field(struct device *dev, struct device_attribute *attr, \
12368 @@ -53050,10 +51804,10 @@ index ae45bd9..c32a586 100644
12369
12370 transport_setup_device(&rport->dev);
12371 diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
12372 -index 2c2041c..9d94085 100644
12373 +index cfba74c..415f09b 100644
12374 --- a/drivers/scsi/sd.c
12375 +++ b/drivers/scsi/sd.c
12376 -@@ -3002,7 +3002,7 @@ static int sd_probe(struct device *dev)
12377 +@@ -3022,7 +3022,7 @@ static int sd_probe(struct device *dev)
12378 sdkp->disk = gd;
12379 sdkp->index = index;
12380 atomic_set(&sdkp->openers, 0);
12381 @@ -53063,7 +51817,7 @@ index 2c2041c..9d94085 100644
12382 if (!sdp->request_queue->rq_timeout) {
12383 if (sdp->type != TYPE_MOD)
12384 diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
12385 -index 01cf888..59e0475 100644
12386 +index 6035444..c82edd4 100644
12387 --- a/drivers/scsi/sg.c
12388 +++ b/drivers/scsi/sg.c
12389 @@ -1138,7 +1138,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
12390 @@ -53089,10 +51843,10 @@ index 11a5043..e36f04c 100644
12391 .read = fuse_read,
12392 };
12393 diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
12394 -index 2bf2dfa..b4d9008 100644
12395 +index 50f20f2..6bd81e0 100644
12396 --- a/drivers/spi/spi.c
12397 +++ b/drivers/spi/spi.c
12398 -@@ -2210,7 +2210,7 @@ int spi_bus_unlock(struct spi_master *master)
12399 +@@ -2224,7 +2224,7 @@ int spi_bus_unlock(struct spi_master *master)
12400 EXPORT_SYMBOL_GPL(spi_bus_unlock);
12401
12402 /* portable code must never pass more than 32 bytes */
12403 @@ -53146,10 +51900,10 @@ index 001348c..cfaac8a 100644
12404 static struct tty_driver *gdm_driver[TTY_MAX_COUNT];
12405 static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR];
12406 diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
12407 -index 6b22106..6c6e641 100644
12408 +index 9cb222e..8766f26 100644
12409 --- a/drivers/staging/imx-drm/imx-drm-core.c
12410 +++ b/drivers/staging/imx-drm/imx-drm-core.c
12411 -@@ -355,7 +355,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
12412 +@@ -357,7 +357,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
12413 if (imxdrm->pipes >= MAX_CRTC)
12414 return -EINVAL;
12415
12416 @@ -53211,7 +51965,7 @@ index 503b2d7..c918745 100644
12417 /* receive the result: */
12418 ret = usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0), 0x67,
12419 diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c
12420 -index bcce919..f30fcf9 100644
12421 +index a94f336..6a1924d 100644
12422 --- a/drivers/staging/lustre/lnet/selftest/brw_test.c
12423 +++ b/drivers/staging/lustre/lnet/selftest/brw_test.c
12424 @@ -488,13 +488,11 @@ brw_server_handle(struct srpc_server_rpc *rpc)
12425 @@ -53234,10 +51988,10 @@ index bcce919..f30fcf9 100644
12426
12427 srpc_service_t brw_test_service;
12428 diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c
12429 -index 7e83dff..1f9a545 100644
12430 +index df04ab7..1deb1ac 100644
12431 --- a/drivers/staging/lustre/lnet/selftest/framework.c
12432 +++ b/drivers/staging/lustre/lnet/selftest/framework.c
12433 -@@ -1633,12 +1633,10 @@ static srpc_service_t sfw_services[] =
12434 +@@ -1632,12 +1632,10 @@ static srpc_service_t sfw_services[] = {
12435
12436 extern sfw_test_client_ops_t ping_test_client;
12437 extern srpc_service_t ping_test_service;
12438 @@ -53250,7 +52004,7 @@ index 7e83dff..1f9a545 100644
12439 extern void brw_init_test_service(void);
12440
12441
12442 -@@ -1682,12 +1680,10 @@ sfw_startup (void)
12443 +@@ -1681,12 +1679,10 @@ sfw_startup (void)
12444 INIT_LIST_HEAD(&sfw_data.fw_zombie_rpcs);
12445 INIT_LIST_HEAD(&sfw_data.fw_zombie_sessions);
12446
12447 @@ -53289,10 +52043,10 @@ index 750cac4..e4d751f 100644
12448 srpc_service_t ping_test_service;
12449 void ping_init_test_service(void)
12450 diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h
12451 -index 30b1812f..9e5bd0b 100644
12452 +index 14ac46f..eca2c16 100644
12453 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h
12454 +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h
12455 -@@ -1141,7 +1141,7 @@ struct ldlm_callback_suite {
12456 +@@ -1139,7 +1139,7 @@ struct ldlm_callback_suite {
12457 ldlm_completion_callback lcs_completion;
12458 ldlm_blocking_callback lcs_blocking;
12459 ldlm_glimpse_callback lcs_glimpse;
12460 @@ -53302,10 +52056,10 @@ index 30b1812f..9e5bd0b 100644
12461 /* ldlm_lockd.c */
12462 int ldlm_del_waiting_lock(struct ldlm_lock *lock);
12463 diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h
12464 -index 489bdd3..65058081 100644
12465 +index 2a88b80..62e7e5f 100644
12466 --- a/drivers/staging/lustre/lustre/include/obd.h
12467 +++ b/drivers/staging/lustre/lustre/include/obd.h
12468 -@@ -1438,7 +1438,7 @@ struct md_ops {
12469 +@@ -1362,7 +1362,7 @@ struct md_ops {
12470 * lprocfs_alloc_md_stats() in obdclass/lprocfs_status.c. Also, add a
12471 * wrapper function in include/linux/obd_class.h.
12472 */
12473 @@ -53328,10 +52082,10 @@ index b798daa..b28ca8f 100644
12474 CDEBUG(D_DLMTRACE, "flags %#llx owner %llu pid %u mode %u start %llu end %llu\n",
12475 *flags, new->l_policy_data.l_flock.owner,
12476 diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c
12477 -index 13a9266..3439390 100644
12478 +index bbe2c68..c6b4275 100644
12479 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c
12480 +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c
12481 -@@ -235,7 +235,7 @@ int proc_console_max_delay_cs(struct ctl_table *table, int write,
12482 +@@ -236,7 +236,7 @@ int proc_console_max_delay_cs(struct ctl_table *table, int write,
12483 void __user *buffer, size_t *lenp, loff_t *ppos)
12484 {
12485 int rc, max_delay_cs;
12486 @@ -53340,7 +52094,7 @@ index 13a9266..3439390 100644
12487 long d;
12488
12489 dummy.data = &max_delay_cs;
12490 -@@ -267,7 +267,7 @@ int proc_console_min_delay_cs(struct ctl_table *table, int write,
12491 +@@ -268,7 +268,7 @@ int proc_console_min_delay_cs(struct ctl_table *table, int write,
12492 void __user *buffer, size_t *lenp, loff_t *ppos)
12493 {
12494 int rc, min_delay_cs;
12495 @@ -53349,7 +52103,7 @@ index 13a9266..3439390 100644
12496 long d;
12497
12498 dummy.data = &min_delay_cs;
12499 -@@ -299,7 +299,7 @@ int proc_console_backoff(struct ctl_table *table, int write,
12500 +@@ -300,7 +300,7 @@ int proc_console_backoff(struct ctl_table *table, int write,
12501 void __user *buffer, size_t *lenp, loff_t *ppos)
12502 {
12503 int rc, backoff;
12504 @@ -53359,10 +52113,10 @@ index 13a9266..3439390 100644
12505 dummy.data = &backoff;
12506 dummy.proc_handler = &proc_dointvec;
12507 diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
12508 -index 3396858..c0bd996 100644
12509 +index 2c4fc74..b04ca79 100644
12510 --- a/drivers/staging/lustre/lustre/libcfs/module.c
12511 +++ b/drivers/staging/lustre/lustre/libcfs/module.c
12512 -@@ -314,11 +314,11 @@ out:
12513 +@@ -315,11 +315,11 @@ out:
12514
12515
12516 struct cfs_psdev_ops libcfs_psdev_ops = {
12517 @@ -53380,10 +52134,10 @@ index 3396858..c0bd996 100644
12518
12519 extern int insert_proc(void);
12520 diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
12521 -index efa2faf..03a9836 100644
12522 +index b0bb709..0117c96 100644
12523 --- a/drivers/staging/lustre/lustre/llite/dir.c
12524 +++ b/drivers/staging/lustre/lustre/llite/dir.c
12525 -@@ -659,7 +659,7 @@ int ll_dir_setdirstripe(struct inode *dir, struct lmv_user_md *lump,
12526 +@@ -661,7 +661,7 @@ int ll_dir_setdirstripe(struct inode *dir, struct lmv_user_md *lump,
12527 int mode;
12528 int err;
12529
12530 @@ -53393,10 +52147,10 @@ index efa2faf..03a9836 100644
12531 strlen(filename), mode, LUSTRE_OPC_MKDIR,
12532 lump);
12533 diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
12534 -index a0f4868..139f1fb 100644
12535 +index b2b6c3c..302e4e4 100644
12536 --- a/drivers/staging/octeon/ethernet-rx.c
12537 +++ b/drivers/staging/octeon/ethernet-rx.c
12538 -@@ -417,11 +417,11 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
12539 +@@ -416,11 +416,11 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
12540 /* Increment RX stats for virtual ports */
12541 if (work->ipprt >= CVMX_PIP_NUM_INPUT_PORTS) {
12542 #ifdef CONFIG_64BIT
12543 @@ -53412,7 +52166,7 @@ index a0f4868..139f1fb 100644
12544 #endif
12545 }
12546 netif_receive_skb(skb);
12547 -@@ -432,9 +432,9 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
12548 +@@ -431,9 +431,9 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
12549 dev->name);
12550 */
12551 #ifdef CONFIG_64BIT
12552 @@ -53425,7 +52179,7 @@ index a0f4868..139f1fb 100644
12553 dev_kfree_skb_irq(skb);
12554 }
12555 diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
12556 -index 2aa7235..ba3c205 100644
12557 +index 8f9e3fb..d283fb9 100644
12558 --- a/drivers/staging/octeon/ethernet.c
12559 +++ b/drivers/staging/octeon/ethernet.c
12560 @@ -247,11 +247,11 @@ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
12561 @@ -53445,10 +52199,10 @@ index 2aa7235..ba3c205 100644
12562 }
12563
12564 diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h
12565 -index 56d5c50..a14f4db 100644
12566 +index 9191993..30e9817 100644
12567 --- a/drivers/staging/rtl8188eu/include/hal_intf.h
12568 +++ b/drivers/staging/rtl8188eu/include/hal_intf.h
12569 -@@ -234,7 +234,7 @@ struct hal_ops {
12570 +@@ -225,7 +225,7 @@ struct hal_ops {
12571
12572 void (*hal_notch_filter)(struct adapter *adapter, bool enable);
12573 void (*hal_reset_security_engine)(struct adapter *adapter);
12574 @@ -53458,7 +52212,7 @@ index 56d5c50..a14f4db 100644
12575 enum rt_eeprom_type {
12576 EEPROM_93C46,
12577 diff --git a/drivers/staging/rtl8712/rtl871x_io.h b/drivers/staging/rtl8712/rtl871x_io.h
12578 -index dc23395..cf7e9b1 100644
12579 +index 070cc03..6806e37 100644
12580 --- a/drivers/staging/rtl8712/rtl871x_io.h
12581 +++ b/drivers/staging/rtl8712/rtl871x_io.h
12582 @@ -108,7 +108,7 @@ struct _io_ops {
12583 @@ -53493,27 +52247,27 @@ index 2bf2e2f..84421c9 100644
12584 /** Register functions (in the bus driver) to get called by visorchipset
12585 * whenever a bus or device appears for which this service partition is
12586 diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
12587 -index 164136b..7244df5 100644
12588 +index ae0dade..803d53a 100644
12589 --- a/drivers/staging/vt6655/hostap.c
12590 +++ b/drivers/staging/vt6655/hostap.c
12591 -@@ -68,14 +68,13 @@ static int msglevel = MSG_LEVEL_INFO;
12592 +@@ -65,14 +65,13 @@
12593 *
12594 */
12595
12596 +static net_device_ops_no_const apdev_netdev_ops;
12597 +
12598 - static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
12599 + static int hostap_enable_hostapd(struct vnt_private *pDevice, int rtnl_locked)
12600 {
12601 - PSDevice apdev_priv;
12602 + struct vnt_private *apdev_priv;
12603 struct net_device *dev = pDevice->dev;
12604 int ret;
12605 - const struct net_device_ops apdev_netdev_ops = {
12606 - .ndo_start_xmit = pDevice->tx_80211,
12607 - };
12608
12609 - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name);
12610 + pr_debug("%s: Enabling hostapd mode\n", dev->name);
12611
12612 -@@ -87,6 +86,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
12613 +@@ -84,6 +83,8 @@ static int hostap_enable_hostapd(struct vnt_private *pDevice, int rtnl_locked)
12614 *apdev_priv = *pDevice;
12615 eth_hw_addr_inherit(pDevice->apdev, dev);
12616
12617 @@ -53545,10 +52299,10 @@ index e7e9372..161f530 100644
12618 login->tgt_agt = sbp_target_agent_register(login);
12619 if (IS_ERR(login->tgt_agt)) {
12620 diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
12621 -index 15a1c13..6c9b96b 100644
12622 +index c45f9e9..00e85f0 100644
12623 --- a/drivers/target/target_core_device.c
12624 +++ b/drivers/target/target_core_device.c
12625 -@@ -1526,7 +1526,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)
12626 +@@ -1532,7 +1532,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)
12627 spin_lock_init(&dev->se_tmr_lock);
12628 spin_lock_init(&dev->qf_cmd_lock);
12629 sema_init(&dev->caw_sem, 1);
12630 @@ -53558,20 +52312,37 @@ index 15a1c13..6c9b96b 100644
12631 spin_lock_init(&dev->t10_wwn.t10_vpd_lock);
12632 INIT_LIST_HEAD(&dev->t10_pr.registration_list);
12633 diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
12634 -index a9c77b5..024a07d 100644
12635 +index be877bf..7be9cd4 100644
12636 --- a/drivers/target/target_core_transport.c
12637 +++ b/drivers/target/target_core_transport.c
12638 -@@ -1165,7 +1165,7 @@ transport_check_alloc_task_attr(struct se_cmd *cmd)
12639 +@@ -1168,7 +1168,7 @@ transport_check_alloc_task_attr(struct se_cmd *cmd)
12640 * Used to determine when ORDERED commands should go from
12641 * Dormant to Active status.
12642 */
12643 - cmd->se_ordered_id = atomic_inc_return(&dev->dev_ordered_id);
12644 + cmd->se_ordered_id = atomic_inc_return_unchecked(&dev->dev_ordered_id);
12645 - smp_mb__after_atomic();
12646 pr_debug("Allocated se_ordered_id: %u for Task Attr: 0x%02x on %s\n",
12647 cmd->se_ordered_id, cmd->sam_task_attr,
12648 + dev->transport->name);
12649 +diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c
12650 +index edc1cce..769e4cb 100644
12651 +--- a/drivers/thermal/int340x_thermal/int3400_thermal.c
12652 ++++ b/drivers/thermal/int340x_thermal/int3400_thermal.c
12653 +@@ -209,8 +209,10 @@ static int int3400_thermal_probe(struct platform_device *pdev)
12654 + platform_set_drvdata(pdev, priv);
12655 +
12656 + if (priv->uuid_bitmap & 1 << INT3400_THERMAL_PASSIVE_1) {
12657 +- int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
12658 +- int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
12659 ++ pax_open_kernel();
12660 ++ *(void **)&int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
12661 ++ *(void **)&int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
12662 ++ pax_close_kernel();
12663 + }
12664 + priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
12665 + priv, &int3400_thermal_ops,
12666 diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
12667 -index 4b2b999..cad9fa5 100644
12668 +index 62143ba..ae21165 100644
12669 --- a/drivers/thermal/of-thermal.c
12670 +++ b/drivers/thermal/of-thermal.c
12671 @@ -30,6 +30,7 @@
12672 @@ -53595,7 +52366,7 @@ index 4b2b999..cad9fa5 100644
12673 mutex_unlock(&tzd->lock);
12674
12675 return tzd;
12676 -@@ -461,8 +464,10 @@ void thermal_zone_of_sensor_unregister(struct device *dev,
12677 +@@ -473,8 +476,10 @@ void thermal_zone_of_sensor_unregister(struct device *dev,
12678 return;
12679
12680 mutex_lock(&tzd->lock);
12681 @@ -54026,7 +52797,7 @@ index 345cebb..d5a1e9e 100644
12682 ipwireless_disassociate_network_ttys(network,
12683 ttyj->channel_idx);
12684 diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
12685 -index 1deaca4..c8582d4 100644
12686 +index 14c54e0..1efd4f2 100644
12687 --- a/drivers/tty/moxa.c
12688 +++ b/drivers/tty/moxa.c
12689 @@ -1189,7 +1189,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
12690 @@ -54061,7 +52832,7 @@ index c434376..114ce13 100644
12691
12692 dlci->modem_rx = 0;
12693 diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
12694 -index f44f1ba..a8d5915 100644
12695 +index 2e900a9..576d216 100644
12696 --- a/drivers/tty/n_tty.c
12697 +++ b/drivers/tty/n_tty.c
12698 @@ -115,7 +115,7 @@ struct n_tty_data {
12699 @@ -54073,7 +52844,7 @@ index f44f1ba..a8d5915 100644
12700 size_t line_start;
12701
12702 /* protected by output lock */
12703 -@@ -2517,6 +2517,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
12704 +@@ -2522,6 +2522,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
12705 {
12706 *ops = tty_ldisc_N_TTY;
12707 ops->owner = NULL;
12708 @@ -54083,10 +52854,10 @@ index f44f1ba..a8d5915 100644
12709 }
12710 EXPORT_SYMBOL_GPL(n_tty_inherit_ops);
12711 diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
12712 -index 9bbdb1d..dc514ee 100644
12713 +index 7c4447a..70fbc1e 100644
12714 --- a/drivers/tty/pty.c
12715 +++ b/drivers/tty/pty.c
12716 -@@ -789,8 +789,10 @@ static void __init unix98_pty_init(void)
12717 +@@ -830,8 +830,10 @@ static void __init unix98_pty_init(void)
12718 panic("Couldn't register Unix98 pts driver");
12719
12720 /* Now create the /dev/ptmx special device */
12721 @@ -54161,10 +52932,10 @@ index aa28209..e08fb85 100644
12722
12723 this_mir = this_ir = pending_intrs(soft, intr_type);
12724 diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
12725 -index 6ec7501..265bcbf 100644
12726 +index 129dc5b..1da5bb8 100644
12727 --- a/drivers/tty/serial/kgdb_nmi.c
12728 +++ b/drivers/tty/serial/kgdb_nmi.c
12729 -@@ -51,7 +51,9 @@ static int kgdb_nmi_console_setup(struct console *co, char *options)
12730 +@@ -53,7 +53,9 @@ static int kgdb_nmi_console_setup(struct console *co, char *options)
12731 * I/O utilities that messages sent to the console will automatically
12732 * be displayed on the dbg_io.
12733 */
12734 @@ -54282,10 +53053,10 @@ index a260cde..6b2b5ce 100644
12735 /* This is only available if kgdboc is a built in for early debugging */
12736 static int __init kgdboc_early_init(char *opt)
12737 diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
12738 -index 077570a..12550a9 100644
12739 +index 4b6c783..9a19db3 100644
12740 --- a/drivers/tty/serial/msm_serial.c
12741 +++ b/drivers/tty/serial/msm_serial.c
12742 -@@ -981,7 +981,7 @@ static struct uart_driver msm_uart_driver = {
12743 +@@ -1028,7 +1028,7 @@ static struct uart_driver msm_uart_driver = {
12744 .cons = MSM_CONSOLE,
12745 };
12746
12747 @@ -54294,7 +53065,7 @@ index 077570a..12550a9 100644
12748
12749 static const struct of_device_id msm_uartdm_table[] = {
12750 { .compatible = "qcom,msm-uartdm-v1.1", .data = (void *)UARTDM_1P1 },
12751 -@@ -1000,7 +1000,7 @@ static int msm_serial_probe(struct platform_device *pdev)
12752 +@@ -1047,7 +1047,7 @@ static int msm_serial_probe(struct platform_device *pdev)
12753 int irq;
12754
12755 if (pdev->id == -1)
12756 @@ -54336,10 +53107,10 @@ index c78f43a..22b1dab 100644
12757
12758 if (cfg->uart_flags & UPF_CONS_FLOW) {
12759 diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
12760 -index 0f03988..8a8038d 100644
12761 +index eaeb9a0..2691250 100644
12762 --- a/drivers/tty/serial/serial_core.c
12763 +++ b/drivers/tty/serial/serial_core.c
12764 -@@ -1343,7 +1343,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
12765 +@@ -1339,7 +1339,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
12766
12767 pr_debug("uart_close(%d) called\n", uport ? uport->line : -1);
12768
12769 @@ -54348,7 +53119,7 @@ index 0f03988..8a8038d 100644
12770 return;
12771
12772 /*
12773 -@@ -1470,7 +1470,7 @@ static void uart_hangup(struct tty_struct *tty)
12774 +@@ -1466,7 +1466,7 @@ static void uart_hangup(struct tty_struct *tty)
12775 uart_flush_buffer(tty);
12776 uart_shutdown(tty, state);
12777 spin_lock_irqsave(&port->lock, flags);
12778 @@ -54357,7 +53128,7 @@ index 0f03988..8a8038d 100644
12779 clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
12780 spin_unlock_irqrestore(&port->lock, flags);
12781 tty_port_tty_set(port, NULL);
12782 -@@ -1568,7 +1568,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
12783 +@@ -1564,7 +1564,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
12784 goto end;
12785 }
12786
12787 @@ -54366,7 +53137,7 @@ index 0f03988..8a8038d 100644
12788 if (!state->uart_port || state->uart_port->flags & UPF_DEAD) {
12789 retval = -ENXIO;
12790 goto err_dec_count;
12791 -@@ -1600,7 +1600,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
12792 +@@ -1596,7 +1596,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
12793 end:
12794 return retval;
12795 err_dec_count:
12796 @@ -54774,10 +53545,10 @@ index 42bad18..447d7a2 100644
12797
12798 if (get_user(c, buf))
12799 diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
12800 -index 848c17a..e930437 100644
12801 +index 0508a1d..b610592 100644
12802 --- a/drivers/tty/tty_io.c
12803 +++ b/drivers/tty/tty_io.c
12804 -@@ -3469,7 +3469,7 @@ EXPORT_SYMBOL_GPL(get_current_tty);
12805 +@@ -3498,7 +3498,7 @@ EXPORT_SYMBOL_GPL(get_current_tty);
12806
12807 void tty_default_fops(struct file_operations *fops)
12808 {
12809 @@ -54894,7 +53665,7 @@ index 1b93357..ea9f82c 100644
12810 tty_port_tty_set(port, tty);
12811
12812 diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
12813 -index d0e3a44..5f8b754 100644
12814 +index c039cfe..0b463b0 100644
12815 --- a/drivers/tty/vt/keyboard.c
12816 +++ b/drivers/tty/vt/keyboard.c
12817 @@ -641,6 +641,16 @@ static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)
12818 @@ -54955,7 +53726,7 @@ index d0e3a44..5f8b754 100644
12819 ret = -EPERM;
12820 goto reterr;
12821 diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
12822 -index a673e5b..36e5d32 100644
12823 +index 60fa627..7214965 100644
12824 --- a/drivers/uio/uio.c
12825 +++ b/drivers/uio/uio.c
12826 @@ -25,6 +25,7 @@
12827 @@ -54966,16 +53737,7 @@ index a673e5b..36e5d32 100644
12828
12829 #define UIO_MAX_DEVICES (1U << MINORBITS)
12830
12831 -@@ -32,7 +33,7 @@ struct uio_device {
12832 - struct module *owner;
12833 - struct device *dev;
12834 - int minor;
12835 -- atomic_t event;
12836 -+ atomic_unchecked_t event;
12837 - struct fasync_struct *async_queue;
12838 - wait_queue_head_t wait;
12839 - struct uio_info *info;
12840 -@@ -243,7 +244,7 @@ static ssize_t event_show(struct device *dev,
12841 +@@ -231,7 +232,7 @@ static ssize_t event_show(struct device *dev,
12842 struct device_attribute *attr, char *buf)
12843 {
12844 struct uio_device *idev = dev_get_drvdata(dev);
12845 @@ -54984,7 +53746,7 @@ index a673e5b..36e5d32 100644
12846 }
12847 static DEVICE_ATTR_RO(event);
12848
12849 -@@ -405,7 +406,7 @@ void uio_event_notify(struct uio_info *info)
12850 +@@ -393,7 +394,7 @@ void uio_event_notify(struct uio_info *info)
12851 {
12852 struct uio_device *idev = info->uio_dev;
12853
12854 @@ -54993,7 +53755,7 @@ index a673e5b..36e5d32 100644
12855 wake_up_interruptible(&idev->wait);
12856 kill_fasync(&idev->async_queue, SIGIO, POLL_IN);
12857 }
12858 -@@ -458,7 +459,7 @@ static int uio_open(struct inode *inode, struct file *filep)
12859 +@@ -446,7 +447,7 @@ static int uio_open(struct inode *inode, struct file *filep)
12860 }
12861
12862 listener->dev = idev;
12863 @@ -55002,7 +53764,7 @@ index a673e5b..36e5d32 100644
12864 filep->private_data = listener;
12865
12866 if (idev->info->open) {
12867 -@@ -509,7 +510,7 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait)
12868 +@@ -497,7 +498,7 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait)
12869 return -EIO;
12870
12871 poll_wait(filep, &idev->wait, wait);
12872 @@ -55011,7 +53773,7 @@ index a673e5b..36e5d32 100644
12873 return POLLIN | POLLRDNORM;
12874 return 0;
12875 }
12876 -@@ -534,7 +535,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf,
12877 +@@ -522,7 +523,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf,
12878 do {
12879 set_current_state(TASK_INTERRUPTIBLE);
12880
12881 @@ -55020,7 +53782,7 @@ index a673e5b..36e5d32 100644
12882 if (event_count != listener->event_count) {
12883 if (copy_to_user(buf, &event_count, count))
12884 retval = -EFAULT;
12885 -@@ -591,9 +592,13 @@ static ssize_t uio_write(struct file *filep, const char __user *buf,
12886 +@@ -579,9 +580,13 @@ static ssize_t uio_write(struct file *filep, const char __user *buf,
12887 static int uio_find_mem_index(struct vm_area_struct *vma)
12888 {
12889 struct uio_device *idev = vma->vm_private_data;
12890 @@ -55035,7 +53797,7 @@ index a673e5b..36e5d32 100644
12891 return -1;
12892 return (int)vma->vm_pgoff;
12893 }
12894 -@@ -825,7 +830,7 @@ int __uio_register_device(struct module *owner,
12895 +@@ -813,7 +818,7 @@ int __uio_register_device(struct module *owner,
12896 idev->owner = owner;
12897 idev->info = info;
12898 init_waitqueue_head(&idev->wait);
12899 @@ -55212,10 +53974,10 @@ index 0b59731..46ee7d1 100644
12900 dev->rawdescriptors[i] + (*ppos - pos),
12901 min(len, alloclen))) {
12902 diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
12903 -index 258e6fe..9ea48d7 100644
12904 +index a6efb41..6f72549b 100644
12905 --- a/drivers/usb/core/hcd.c
12906 +++ b/drivers/usb/core/hcd.c
12907 -@@ -1550,7 +1550,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
12908 +@@ -1551,7 +1551,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
12909 */
12910 usb_get_urb(urb);
12911 atomic_inc(&urb->use_count);
12912 @@ -55224,7 +53986,7 @@ index 258e6fe..9ea48d7 100644
12913 usbmon_urb_submit(&hcd->self, urb);
12914
12915 /* NOTE requirements on root-hub callers (usbfs and the hub
12916 -@@ -1577,7 +1577,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
12917 +@@ -1578,7 +1578,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
12918 urb->hcpriv = NULL;
12919 INIT_LIST_HEAD(&urb->urb_list);
12920 atomic_dec(&urb->use_count);
12921 @@ -55234,18 +53996,18 @@ index 258e6fe..9ea48d7 100644
12922 wake_up(&usb_kill_urb_queue);
12923 usb_put_urb(urb);
12924 diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
12925 -index 674c262..71fdd90 100644
12926 +index b649fef..c7107a0 100644
12927 --- a/drivers/usb/core/hub.c
12928 +++ b/drivers/usb/core/hub.c
12929 -@@ -27,6 +27,7 @@
12930 - #include <linux/freezer.h>
12931 +@@ -26,6 +26,7 @@
12932 + #include <linux/mutex.h>
12933 #include <linux/random.h>
12934 #include <linux/pm_qos.h>
12935 +#include <linux/grsecurity.h>
12936
12937 #include <asm/uaccess.h>
12938 #include <asm/byteorder.h>
12939 -@@ -4665,6 +4666,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
12940 +@@ -4666,6 +4667,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
12941 goto done;
12942 return;
12943 }
12944 @@ -55257,7 +54019,7 @@ index 674c262..71fdd90 100644
12945 unit_load = 150;
12946 else
12947 diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
12948 -index 0c8a7fc..c45b40a 100644
12949 +index f7b7713..23d07ec 100644
12950 --- a/drivers/usb/core/message.c
12951 +++ b/drivers/usb/core/message.c
12952 @@ -128,7 +128,7 @@ static int usb_internal_control_msg(struct usb_device *usb_dev,
12953 @@ -55355,11 +54117,11 @@ index 8cfc319..4868255 100644
12954 return 0;
12955 }
12956 diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
12957 -index 2b4c82d..06a8ee6 100644
12958 +index f7b2032..fbb340c 100644
12959 --- a/drivers/usb/gadget/function/f_uac1.c
12960 +++ b/drivers/usb/gadget/function/f_uac1.c
12961 -@@ -13,6 +13,7 @@
12962 - #include <linux/kernel.h>
12963 +@@ -14,6 +14,7 @@
12964 + #include <linux/module.h>
12965 #include <linux/device.h>
12966 #include <linux/atomic.h>
12967 +#include <linux/module.h>
12968 @@ -55367,10 +54129,10 @@ index 2b4c82d..06a8ee6 100644
12969 #include "u_uac1.h"
12970
12971 diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
12972 -index ad0aca8..8ff84865 100644
12973 +index 491082a..dfd7d17 100644
12974 --- a/drivers/usb/gadget/function/u_serial.c
12975 +++ b/drivers/usb/gadget/function/u_serial.c
12976 -@@ -733,9 +733,9 @@ static int gs_open(struct tty_struct *tty, struct file *file)
12977 +@@ -729,9 +729,9 @@ static int gs_open(struct tty_struct *tty, struct file *file)
12978 spin_lock_irq(&port->port_lock);
12979
12980 /* already open? Great. */
12981 @@ -55382,7 +54144,7 @@ index ad0aca8..8ff84865 100644
12982
12983 /* currently opening/closing? wait ... */
12984 } else if (port->openclose) {
12985 -@@ -794,7 +794,7 @@ static int gs_open(struct tty_struct *tty, struct file *file)
12986 +@@ -790,7 +790,7 @@ static int gs_open(struct tty_struct *tty, struct file *file)
12987 tty->driver_data = port;
12988 port->port.tty = tty;
12989
12990 @@ -55391,7 +54153,7 @@ index ad0aca8..8ff84865 100644
12991 port->openclose = false;
12992
12993 /* if connected, start the I/O stream */
12994 -@@ -836,11 +836,11 @@ static void gs_close(struct tty_struct *tty, struct file *file)
12995 +@@ -832,11 +832,11 @@ static void gs_close(struct tty_struct *tty, struct file *file)
12996
12997 spin_lock_irq(&port->port_lock);
12998
12999 @@ -55406,7 +54168,7 @@ index ad0aca8..8ff84865 100644
13000 goto exit;
13001 }
13002
13003 -@@ -850,7 +850,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
13004 +@@ -846,7 +846,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
13005 * and sleep if necessary
13006 */
13007 port->openclose = true;
13008 @@ -55415,7 +54177,7 @@ index ad0aca8..8ff84865 100644
13009
13010 gser = port->port_usb;
13011 if (gser && gser->disconnect)
13012 -@@ -1066,7 +1066,7 @@ static int gs_closed(struct gs_port *port)
13013 +@@ -1062,7 +1062,7 @@ static int gs_closed(struct gs_port *port)
13014 int cond;
13015
13016 spin_lock_irq(&port->port_lock);
13017 @@ -55424,7 +54186,7 @@ index ad0aca8..8ff84865 100644
13018 spin_unlock_irq(&port->port_lock);
13019 return cond;
13020 }
13021 -@@ -1209,7 +1209,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
13022 +@@ -1205,7 +1205,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
13023 /* if it's already open, start I/O ... and notify the serial
13024 * protocol about open/close status (connect/disconnect).
13025 */
13026 @@ -55433,7 +54195,7 @@ index ad0aca8..8ff84865 100644
13027 pr_debug("gserial_connect: start ttyGS%d\n", port->port_num);
13028 gs_start_io(port);
13029 if (gser->connect)
13030 -@@ -1256,7 +1256,7 @@ void gserial_disconnect(struct gserial *gser)
13031 +@@ -1252,7 +1252,7 @@ void gserial_disconnect(struct gserial *gser)
13032
13033 port->port_usb = NULL;
13034 gser->ioport = NULL;
13035 @@ -55442,7 +54204,7 @@ index ad0aca8..8ff84865 100644
13036 wake_up_interruptible(&port->drain_wait);
13037 if (port->port.tty)
13038 tty_hangup(port->port.tty);
13039 -@@ -1272,7 +1272,7 @@ void gserial_disconnect(struct gserial *gser)
13040 +@@ -1268,7 +1268,7 @@ void gserial_disconnect(struct gserial *gser)
13041
13042 /* finally, free any unused/unusable I/O buffers */
13043 spin_lock_irqsave(&port->port_lock, flags);
13044 @@ -55452,10 +54214,10 @@ index ad0aca8..8ff84865 100644
13045 gs_free_requests(gser->out, &port->read_pool, NULL);
13046 gs_free_requests(gser->out, &port->read_queue, NULL);
13047 diff --git a/drivers/usb/gadget/function/u_uac1.c b/drivers/usb/gadget/function/u_uac1.c
13048 -index 7a55fea..cc0ed4f 100644
13049 +index a44a07f..ecea924 100644
13050 --- a/drivers/usb/gadget/function/u_uac1.c
13051 +++ b/drivers/usb/gadget/function/u_uac1.c
13052 -@@ -16,6 +16,7 @@
13053 +@@ -17,6 +17,7 @@
13054 #include <linux/ctype.h>
13055 #include <linux/random.h>
13056 #include <linux/syscalls.h>
13057 @@ -55464,7 +54226,7 @@ index 7a55fea..cc0ed4f 100644
13058 #include "u_uac1.h"
13059
13060 diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
13061 -index 6130b75..3b60008 100644
13062 +index 5728829..fefc6bf 100644
13063 --- a/drivers/usb/host/ehci-hub.c
13064 +++ b/drivers/usb/host/ehci-hub.c
13065 @@ -771,7 +771,7 @@ static struct urb *request_single_step_set_feature_urb(
13066 @@ -55486,7 +54248,7 @@ index 6130b75..3b60008 100644
13067 if (!retval && !wait_for_completion_timeout(&done,
13068 msecs_to_jiffies(2000))) {
13069 diff --git a/drivers/usb/host/hwa-hc.c b/drivers/usb/host/hwa-hc.c
13070 -index d0d8fad..668ef7b 100644
13071 +index 1db0626..4948782 100644
13072 --- a/drivers/usb/host/hwa-hc.c
13073 +++ b/drivers/usb/host/hwa-hc.c
13074 @@ -337,7 +337,10 @@ static int __hwahc_op_bwa_set(struct wusbhc *wusbhc, s8 stream_index,
13075 @@ -55648,7 +54410,7 @@ index 00e4a54..d676f85 100644
13076 return;
13077 }
13078 diff --git a/drivers/usb/wusbcore/wa-hc.h b/drivers/usb/wusbcore/wa-hc.h
13079 -index f2a8d29..7bc3fe7 100644
13080 +index edc7267..9f65ce2 100644
13081 --- a/drivers/usb/wusbcore/wa-hc.h
13082 +++ b/drivers/usb/wusbcore/wa-hc.h
13083 @@ -240,7 +240,7 @@ struct wahc {
13084 @@ -55670,7 +54432,7 @@ index f2a8d29..7bc3fe7 100644
13085 for (index = 0; index < WA_MAX_BUF_IN_URBS; ++index)
13086 usb_init_urb(&(wa->buf_in_urbs[index]));
13087 diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
13088 -index e279015..c2d0dae 100644
13089 +index 69af4fd..da390d7 100644
13090 --- a/drivers/usb/wusbcore/wa-xfer.c
13091 +++ b/drivers/usb/wusbcore/wa-xfer.c
13092 @@ -314,7 +314,7 @@ static void wa_xfer_completion(struct wa_xfer *xfer)
13093 @@ -55792,7 +54554,7 @@ index 1b0b233..6f34c2c 100644
13094 err = -ENOSPC;
13095 }
13096 diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c
13097 -index ff60701..814b973 100644
13098 +index aedf2fb..47c9aca 100644
13099 --- a/drivers/video/fbdev/aty/aty128fb.c
13100 +++ b/drivers/video/fbdev/aty/aty128fb.c
13101 @@ -149,7 +149,7 @@ enum {
13102 @@ -55873,7 +54635,7 @@ index 900aa4e..6d49418 100644
13103 }
13104 EXPORT_SYMBOL_GPL(fb_deferred_io_cleanup);
13105 diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
13106 -index b5e85f6..290f8c7 100644
13107 +index 0705d88..d9429bf 100644
13108 --- a/drivers/video/fbdev/core/fbmem.c
13109 +++ b/drivers/video/fbdev/core/fbmem.c
13110 @@ -1301,7 +1301,7 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix,
13111 @@ -56113,7 +54875,7 @@ index d513ed6..90b0de9 100644
13112
13113 pr_debug("released /dev/fb%d user=%d count=%d",
13114 diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
13115 -index 77b890e..458e666 100644
13116 +index 046d51d..be564da 100644
13117 --- a/drivers/video/fbdev/udlfb.c
13118 +++ b/drivers/video/fbdev/udlfb.c
13119 @@ -623,11 +623,11 @@ static int dlfb_handle_damage(struct dlfb_data *dev, int x, int y,
13120 @@ -59203,7 +57965,7 @@ index fef20db..d28b1ab 100644
13121 return -ENOMEM;
13122 return 0;
13123 diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
13124 -index cc1cfae..41158ad 100644
13125 +index eb14e05..5156de7 100644
13126 --- a/fs/9p/vfs_addr.c
13127 +++ b/fs/9p/vfs_addr.c
13128 @@ -187,7 +187,7 @@ static int v9fs_vfs_writepage_locked(struct page *page)
13129 @@ -59216,7 +57978,7 @@ index cc1cfae..41158ad 100644
13130 if (retval > 0)
13131 retval = 0;
13132 diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
13133 -index 7fa4f7a..a7ebf8c 100644
13134 +index 296482f..183ddc3 100644
13135 --- a/fs/9p/vfs_inode.c
13136 +++ b/fs/9p/vfs_inode.c
13137 @@ -1312,7 +1312,7 @@ static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd)
13138 @@ -59226,8 +57988,8 @@ index 7fa4f7a..a7ebf8c 100644
13139 - char *s = nd_get_link(nd);
13140 + const char *s = nd_get_link(nd);
13141
13142 - p9_debug(P9_DEBUG_VFS, " %s %s\n",
13143 - dentry->d_name.name, IS_ERR(s) ? "<error>" : s);
13144 + p9_debug(P9_DEBUG_VFS, " %pd %s\n",
13145 + dentry, IS_ERR(s) ? "<error>" : s);
13146 diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
13147 index 370b24c..ff0be7b 100644
13148 --- a/fs/Kconfig.binfmt
13149 @@ -59264,7 +58026,7 @@ index 2946712..f737435 100644
13150 &data);
13151 if (!inode) {
13152 diff --git a/fs/aio.c b/fs/aio.c
13153 -index 0ff7c46..7f5d132 100644
13154 +index 14b9315..365980f 100644
13155 --- a/fs/aio.c
13156 +++ b/fs/aio.c
13157 @@ -388,7 +388,7 @@ static int aio_setup_ring(struct kioctx *ctx)
13158 @@ -59357,7 +58119,7 @@ index 2722387..56059b5 100644
13159 {
13160 if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
13161 diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
13162 -index ca0ba15..0fa3257 100644
13163 +index 929dec0..84bd914 100644
13164 --- a/fs/binfmt_aout.c
13165 +++ b/fs/binfmt_aout.c
13166 @@ -16,6 +16,7 @@
13167 @@ -59399,7 +58161,7 @@ index ca0ba15..0fa3257 100644
13168 if (ex.a_data + ex.a_bss > rlim)
13169 return -ENOMEM;
13170
13171 -@@ -264,6 +271,27 @@ static int load_aout_binary(struct linux_binprm * bprm)
13172 +@@ -261,6 +268,27 @@ static int load_aout_binary(struct linux_binprm * bprm)
13173
13174 install_exec_creds(bprm);
13175
13176 @@ -59427,17 +58189,17 @@ index ca0ba15..0fa3257 100644
13177 if (N_MAGIC(ex) == OMAGIC) {
13178 unsigned long text_addr, map_size;
13179 loff_t pos;
13180 -@@ -321,7 +349,7 @@ static int load_aout_binary(struct linux_binprm * bprm)
13181 - }
13182 +@@ -312,7 +340,7 @@ static int load_aout_binary(struct linux_binprm * bprm)
13183 + return error;
13184
13185 error = vm_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
13186 - PROT_READ | PROT_WRITE | PROT_EXEC,
13187 + PROT_READ | PROT_WRITE,
13188 MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
13189 fd_offset + ex.a_text);
13190 - if (error != N_DATADDR(ex)) {
13191 + if (error != N_DATADDR(ex))
13192 diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
13193 -index 3892c1a..4e27c04 100644
13194 +index d8fc060..cbd44d5 100644
13195 --- a/fs/binfmt_elf.c
13196 +++ b/fs/binfmt_elf.c
13197 @@ -34,6 +34,7 @@
13198 @@ -60059,7 +58821,7 @@ index 3892c1a..4e27c04 100644
13199 if (elf_read_implies_exec(loc->elf_ex, executable_stack))
13200 current->personality |= READ_IMPLIES_EXEC;
13201
13202 -@@ -815,6 +1253,20 @@ static int load_elf_binary(struct linux_binprm *bprm)
13203 +@@ -811,6 +1249,20 @@ static int load_elf_binary(struct linux_binprm *bprm)
13204 #else
13205 load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
13206 #endif
13207 @@ -60080,7 +58842,7 @@ index 3892c1a..4e27c04 100644
13208 }
13209
13210 error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
13211 -@@ -847,9 +1299,9 @@ static int load_elf_binary(struct linux_binprm *bprm)
13212 +@@ -842,9 +1294,9 @@ static int load_elf_binary(struct linux_binprm *bprm)
13213 * allowed task size. Note that p_filesz must always be
13214 * <= p_memsz so it is only necessary to check p_memsz.
13215 */
13216 @@ -60091,13 +58853,12 @@ index 3892c1a..4e27c04 100644
13217 + elf_ppnt->p_memsz > pax_task_size ||
13218 + pax_task_size - elf_ppnt->p_memsz < k) {
13219 /* set_brk can never work. Avoid overflows. */
13220 - send_sig(SIGKILL, current, 0);
13221 retval = -EINVAL;
13222 -@@ -888,17 +1340,45 @@ static int load_elf_binary(struct linux_binprm *bprm)
13223 + goto out_free_dentry;
13224 +@@ -880,16 +1332,43 @@ static int load_elf_binary(struct linux_binprm *bprm)
13225 + if (retval)
13226 goto out_free_dentry;
13227 - }
13228 if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
13229 -- send_sig(SIGSEGV, current, 0);
13230 - retval = -EFAULT; /* Nobody gets to see this, but.. */
13231 - goto out_free_dentry;
13232 + /*
13233 @@ -60129,10 +58890,8 @@ index 3892c1a..4e27c04 100644
13234 + up_write(&current->mm->mmap_sem);
13235 + if (retval == 0)
13236 + retval = set_brk(start + size, start + size + PAGE_SIZE);
13237 -+ if (retval < 0) {
13238 -+ send_sig(SIGKILL, current, 0);
13239 ++ if (retval < 0)
13240 + goto out_free_dentry;
13241 -+ }
13242 + }
13243 +#endif
13244 +
13245 @@ -60145,7 +58904,7 @@ index 3892c1a..4e27c04 100644
13246 load_bias);
13247 if (!IS_ERR((void *)elf_entry)) {
13248 /*
13249 -@@ -1130,7 +1610,7 @@ static bool always_dump_vma(struct vm_area_struct *vma)
13250 +@@ -1115,7 +1594,7 @@ static bool always_dump_vma(struct vm_area_struct *vma)
13251 * Decide what to dump of a segment, part, all or none.
13252 */
13253 static unsigned long vma_dump_size(struct vm_area_struct *vma,
13254 @@ -60154,7 +58913,7 @@ index 3892c1a..4e27c04 100644
13255 {
13256 #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
13257
13258 -@@ -1168,7 +1648,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
13259 +@@ -1153,7 +1632,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
13260 if (vma->vm_file == NULL)
13261 return 0;
13262
13263 @@ -60163,7 +58922,7 @@ index 3892c1a..4e27c04 100644
13264 goto whole;
13265
13266 /*
13267 -@@ -1375,9 +1855,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
13268 +@@ -1360,9 +1839,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
13269 {
13270 elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
13271 int i = 0;
13272 @@ -60175,7 +58934,7 @@ index 3892c1a..4e27c04 100644
13273 fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
13274 }
13275
13276 -@@ -1386,7 +1866,7 @@ static void fill_siginfo_note(struct memelfnote *note, user_siginfo_t *csigdata,
13277 +@@ -1371,7 +1850,7 @@ static void fill_siginfo_note(struct memelfnote *note, user_siginfo_t *csigdata,
13278 {
13279 mm_segment_t old_fs = get_fs();
13280 set_fs(KERNEL_DS);
13281 @@ -60184,7 +58943,7 @@ index 3892c1a..4e27c04 100644
13282 set_fs(old_fs);
13283 fill_note(note, "CORE", NT_SIGINFO, sizeof(*csigdata), csigdata);
13284 }
13285 -@@ -2010,14 +2490,14 @@ static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum,
13286 +@@ -1995,14 +2474,14 @@ static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum,
13287 }
13288
13289 static size_t elf_core_vma_data_size(struct vm_area_struct *gate_vma,
13290 @@ -60201,7 +58960,7 @@ index 3892c1a..4e27c04 100644
13291 return size;
13292 }
13293
13294 -@@ -2108,7 +2588,7 @@ static int elf_core_dump(struct coredump_params *cprm)
13295 +@@ -2093,7 +2572,7 @@ static int elf_core_dump(struct coredump_params *cprm)
13296
13297 dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);
13298
13299 @@ -60210,7 +58969,7 @@ index 3892c1a..4e27c04 100644
13300 offset += elf_core_extra_data_size();
13301 e_shoff = offset;
13302
13303 -@@ -2136,7 +2616,7 @@ static int elf_core_dump(struct coredump_params *cprm)
13304 +@@ -2121,7 +2600,7 @@ static int elf_core_dump(struct coredump_params *cprm)
13305 phdr.p_offset = offset;
13306 phdr.p_vaddr = vma->vm_start;
13307 phdr.p_paddr = 0;
13308 @@ -60219,7 +58978,7 @@ index 3892c1a..4e27c04 100644
13309 phdr.p_memsz = vma->vm_end - vma->vm_start;
13310 offset += phdr.p_filesz;
13311 phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
13312 -@@ -2169,7 +2649,7 @@ static int elf_core_dump(struct coredump_params *cprm)
13313 +@@ -2154,7 +2633,7 @@ static int elf_core_dump(struct coredump_params *cprm)
13314 unsigned long addr;
13315 unsigned long end;
13316
13317 @@ -60228,7 +58987,7 @@ index 3892c1a..4e27c04 100644
13318
13319 for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
13320 struct page *page;
13321 -@@ -2210,6 +2690,167 @@ out:
13322 +@@ -2195,6 +2674,167 @@ out:
13323
13324 #endif /* CONFIG_ELF_CORE */
13325
13326 @@ -60397,10 +59156,10 @@ index 3892c1a..4e27c04 100644
13327 {
13328 register_binfmt(&elf_format);
13329 diff --git a/fs/block_dev.c b/fs/block_dev.c
13330 -index 6d72746..536d1db 100644
13331 +index 1d9c9f3..2905786 100644
13332 --- a/fs/block_dev.c
13333 +++ b/fs/block_dev.c
13334 -@@ -701,7 +701,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole,
13335 +@@ -697,7 +697,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole,
13336 else if (bdev->bd_contains == bdev)
13337 return true; /* is a whole device which isn't held */
13338
13339 @@ -60410,10 +59169,10 @@ index 6d72746..536d1db 100644
13340 else if (whole->bd_holder != NULL)
13341 return false; /* is a partition of a held device */
13342 diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
13343 -index 8bbcc24..6f10d78 100644
13344 +index 150822e..75bb326 100644
13345 --- a/fs/btrfs/ctree.c
13346 +++ b/fs/btrfs/ctree.c
13347 -@@ -1174,9 +1174,12 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
13348 +@@ -1173,9 +1173,12 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
13349 free_extent_buffer(buf);
13350 add_root_to_dirty_list(root);
13351 } else {
13352 @@ -60430,7 +59189,7 @@ index 8bbcc24..6f10d78 100644
13353
13354 WARN_ON(trans->transid != btrfs_header_generation(parent));
13355 diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
13356 -index a2e90f8..5135e5f 100644
13357 +index 054577b..9b342cc 100644
13358 --- a/fs/btrfs/delayed-inode.c
13359 +++ b/fs/btrfs/delayed-inode.c
13360 @@ -462,7 +462,7 @@ static int __btrfs_add_delayed_deletion_item(struct btrfs_delayed_node *node,
13361 @@ -60483,10 +59242,10 @@ index f70119f..ab5894d 100644
13362 spin_lock_init(&delayed_root->lock);
13363 init_waitqueue_head(&delayed_root->wait);
13364 diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
13365 -index b765d41..5a8b0c3 100644
13366 +index 4399f0c..a34d8b4 100644
13367 --- a/fs/btrfs/ioctl.c
13368 +++ b/fs/btrfs/ioctl.c
13369 -@@ -3975,9 +3975,12 @@ static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
13370 +@@ -3953,9 +3953,12 @@ static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
13371 for (i = 0; i < num_types; i++) {
13372 struct btrfs_space_info *tmp;
13373
13374 @@ -60499,7 +59258,7 @@ index b765d41..5a8b0c3 100644
13375 info = NULL;
13376 rcu_read_lock();
13377 list_for_each_entry_rcu(tmp, &root->fs_info->space_info,
13378 -@@ -3999,10 +4002,7 @@ static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
13379 +@@ -3977,10 +3980,7 @@ static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
13380 memcpy(dest, &space, sizeof(space));
13381 dest++;
13382 space_args.total_spaces++;
13383 @@ -60511,10 +59270,10 @@ index b765d41..5a8b0c3 100644
13384 up_read(&info->groups_sem);
13385 }
13386 diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
13387 -index c4124de..d7613eb6 100644
13388 +index 54bd91e..aefa810 100644
13389 --- a/fs/btrfs/super.c
13390 +++ b/fs/btrfs/super.c
13391 -@@ -270,7 +270,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
13392 +@@ -271,7 +271,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
13393 function, line, errstr);
13394 return;
13395 }
13396 @@ -60524,10 +59283,10 @@ index c4124de..d7613eb6 100644
13397 wake_up(&root->fs_info->transaction_wait);
13398 wake_up(&root->fs_info->transaction_blocked_wait);
13399 diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
13400 -index 12e5355..cdf30c6 100644
13401 +index b2e7bb4..3719201 100644
13402 --- a/fs/btrfs/sysfs.c
13403 +++ b/fs/btrfs/sysfs.c
13404 -@@ -475,7 +475,7 @@ static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add)
13405 +@@ -480,7 +480,7 @@ static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add)
13406 for (set = 0; set < FEAT_MAX; set++) {
13407 int i;
13408 struct attribute *attrs[2];
13409 @@ -60536,11 +59295,37 @@ index 12e5355..cdf30c6 100644
13410 .name = "features",
13411 .attrs = attrs,
13412 };
13413 +diff --git a/fs/btrfs/tests/free-space-tests.c b/fs/btrfs/tests/free-space-tests.c
13414 +index 2299bfd..4098e72 100644
13415 +--- a/fs/btrfs/tests/free-space-tests.c
13416 ++++ b/fs/btrfs/tests/free-space-tests.c
13417 +@@ -463,7 +463,9 @@ test_steal_space_from_bitmap_to_extent(struct btrfs_block_group_cache *cache)
13418 + * extent entry.
13419 + */
13420 + use_bitmap_op = cache->free_space_ctl->op->use_bitmap;
13421 +- cache->free_space_ctl->op->use_bitmap = test_use_bitmap;
13422 ++ pax_open_kernel();
13423 ++ *(void **)&cache->free_space_ctl->op->use_bitmap = test_use_bitmap;
13424 ++ pax_close_kernel();
13425 +
13426 + /*
13427 + * Extent entry covering free space range [128Mb - 256Kb, 128Mb - 128Kb[
13428 +@@ -870,7 +872,9 @@ test_steal_space_from_bitmap_to_extent(struct btrfs_block_group_cache *cache)
13429 + if (ret)
13430 + return ret;
13431 +
13432 +- cache->free_space_ctl->op->use_bitmap = use_bitmap_op;
13433 ++ pax_open_kernel();
13434 ++ *(void **)&cache->free_space_ctl->op->use_bitmap = use_bitmap_op;
13435 ++ pax_close_kernel();
13436 + __btrfs_remove_free_space_cache(cache->free_space_ctl);
13437 +
13438 + return 0;
13439 diff --git a/fs/btrfs/tree-log.h b/fs/btrfs/tree-log.h
13440 -index e2e798a..f454c18 100644
13441 +index 154990c..d0cf699 100644
13442 --- a/fs/btrfs/tree-log.h
13443 +++ b/fs/btrfs/tree-log.h
13444 -@@ -41,7 +41,7 @@ static inline void btrfs_init_log_ctx(struct btrfs_log_ctx *ctx)
13445 +@@ -43,7 +43,7 @@ static inline void btrfs_init_log_ctx(struct btrfs_log_ctx *ctx)
13446 static inline void btrfs_set_log_full_commit(struct btrfs_fs_info *fs_info,
13447 struct btrfs_trans_handle *trans)
13448 {
13449 @@ -60550,10 +59335,10 @@ index e2e798a..f454c18 100644
13450
13451 static inline int btrfs_need_log_full_commit(struct btrfs_fs_info *fs_info,
13452 diff --git a/fs/buffer.c b/fs/buffer.c
13453 -index 72daaa5..60ffeb9 100644
13454 +index 20805db..2e8fc69 100644
13455 --- a/fs/buffer.c
13456 +++ b/fs/buffer.c
13457 -@@ -3432,7 +3432,7 @@ void __init buffer_init(void)
13458 +@@ -3417,7 +3417,7 @@ void __init buffer_init(void)
13459 bh_cachep = kmem_cache_create("buffer_head",
13460 sizeof(struct buffer_head), 0,
13461 (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
13462 @@ -60661,7 +59446,7 @@ index 8c52472..c4e3a69 100644
13463
13464 #else
13465 diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c
13466 -index dad7d95..07475af 100644
13467 +index e12f189..ed17244 100644
13468 --- a/fs/cachefiles/namei.c
13469 +++ b/fs/cachefiles/namei.c
13470 @@ -312,7 +312,7 @@ try_again:
13471 @@ -60703,21 +59488,8 @@ index eccd339..4c1d995 100644
13472 if (x == 0 && y == 0 && z == 0)
13473 return 0;
13474
13475 -diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
13476 -index 25e745b..220e604 100644
13477 ---- a/fs/cachefiles/rdwr.c
13478 -+++ b/fs/cachefiles/rdwr.c
13479 -@@ -937,7 +937,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
13480 - old_fs = get_fs();
13481 - set_fs(KERNEL_DS);
13482 - ret = file->f_op->write(
13483 -- file, (const void __user *) data, len, &pos);
13484 -+ file, (const void __force_user *) data, len, &pos);
13485 - set_fs(old_fs);
13486 - kunmap(page);
13487 - file_end_write(file);
13488 diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
13489 -index c29d6ae..719b9bb 100644
13490 +index 695e788..f4a9d4d 100644
13491 --- a/fs/ceph/dir.c
13492 +++ b/fs/ceph/dir.c
13493 @@ -129,6 +129,8 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx,
13494 @@ -60752,19 +59524,6 @@ index c29d6ae..719b9bb 100644
13495 int err;
13496 u32 ftype;
13497 struct ceph_mds_reply_info_parsed *rinfo;
13498 -diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c
13499 -index a822a6e..4644256 100644
13500 ---- a/fs/ceph/ioctl.c
13501 -+++ b/fs/ceph/ioctl.c
13502 -@@ -41,7 +41,7 @@ static long __validate_layout(struct ceph_mds_client *mdsc,
13503 - /* validate striping parameters */
13504 - if ((l->object_size & ~PAGE_MASK) ||
13505 - (l->stripe_unit & ~PAGE_MASK) ||
13506 -- (l->stripe_unit != 0 &&
13507 -+ ((unsigned)l->stripe_unit != 0 &&
13508 - ((unsigned)l->object_size % (unsigned)l->stripe_unit)))
13509 - return -EINVAL;
13510 -
13511 diff --git a/fs/ceph/super.c b/fs/ceph/super.c
13512 index f6e1237..796ffd1 100644
13513 --- a/fs/ceph/super.c
13514 @@ -60832,10 +59591,10 @@ index 44ec726..bcb06a3 100644
13515 server->ops->print_stats(m, tcon);
13516 }
13517 diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
13518 -index 889b984..fcb8431 100644
13519 +index 9d7996e..35ad5cf4 100644
13520 --- a/fs/cifs/cifsfs.c
13521 +++ b/fs/cifs/cifsfs.c
13522 -@@ -1092,7 +1092,7 @@ cifs_init_request_bufs(void)
13523 +@@ -1093,7 +1093,7 @@ cifs_init_request_bufs(void)
13524 */
13525 cifs_req_cachep = kmem_cache_create("cifs_request",
13526 CIFSMaxBufSize + max_hdr_size, 0,
13527 @@ -60844,7 +59603,7 @@ index 889b984..fcb8431 100644
13528 if (cifs_req_cachep == NULL)
13529 return -ENOMEM;
13530
13531 -@@ -1119,7 +1119,7 @@ cifs_init_request_bufs(void)
13532 +@@ -1120,7 +1120,7 @@ cifs_init_request_bufs(void)
13533 efficient to alloc 1 per page off the slab compared to 17K (5page)
13534 alloc of large cifs buffers even when page debugging is on */
13535 cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq",
13536 @@ -60853,7 +59612,7 @@ index 889b984..fcb8431 100644
13537 NULL);
13538 if (cifs_sm_req_cachep == NULL) {
13539 mempool_destroy(cifs_req_poolp);
13540 -@@ -1204,8 +1204,8 @@ init_cifs(void)
13541 +@@ -1205,8 +1205,8 @@ init_cifs(void)
13542 atomic_set(&bufAllocCount, 0);
13543 atomic_set(&smBufAllocCount, 0);
13544 #ifdef CONFIG_CIFS_STATS2
13545 @@ -60865,10 +59624,10 @@ index 889b984..fcb8431 100644
13546
13547 atomic_set(&midCount, 0);
13548 diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
13549 -index 25b8392..01e46dc 100644
13550 +index 02a33e5..3a28b5a 100644
13551 --- a/fs/cifs/cifsglob.h
13552 +++ b/fs/cifs/cifsglob.h
13553 -@@ -821,35 +821,35 @@ struct cifs_tcon {
13554 +@@ -823,35 +823,35 @@ struct cifs_tcon {
13555 __u16 Flags; /* optional support bits */
13556 enum statusEnum tidStatus;
13557 #ifdef CONFIG_CIFS_STATS
13558 @@ -60928,7 +59687,7 @@ index 25b8392..01e46dc 100644
13559 } smb2_stats;
13560 #endif /* CONFIG_CIFS_SMB2 */
13561 } stats;
13562 -@@ -1190,7 +1190,7 @@ convert_delimiter(char *path, char delim)
13563 +@@ -1192,7 +1192,7 @@ convert_delimiter(char *path, char delim)
13564 }
13565
13566 #ifdef CONFIG_CIFS_STATS
13567 @@ -60937,7 +59696,7 @@ index 25b8392..01e46dc 100644
13568
13569 static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon,
13570 unsigned int bytes)
13571 -@@ -1557,8 +1557,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount;
13572 +@@ -1559,8 +1559,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount;
13573 /* Various Debug counters */
13574 GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */
13575 #ifdef CONFIG_CIFS_STATS2
13576 @@ -60949,7 +59708,7 @@ index 25b8392..01e46dc 100644
13577 GLOBAL_EXTERN atomic_t smBufAllocCount;
13578 GLOBAL_EXTERN atomic_t midCount;
13579 diff --git a/fs/cifs/file.c b/fs/cifs/file.c
13580 -index 5f29354..359bc0d 100644
13581 +index 3e4d00a..38a122d 100644
13582 --- a/fs/cifs/file.c
13583 +++ b/fs/cifs/file.c
13584 @@ -2056,10 +2056,14 @@ static int cifs_writepages(struct address_space *mapping,
13585 @@ -60993,10 +59752,10 @@ index b7415d5..3984ec0 100644
13586
13587 }
13588 diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
13589 -index 52131d8..fd79e97 100644
13590 +index d297903..1cb7516 100644
13591 --- a/fs/cifs/smb1ops.c
13592 +++ b/fs/cifs/smb1ops.c
13593 -@@ -626,27 +626,27 @@ static void
13594 +@@ -622,27 +622,27 @@ static void
13595 cifs_clear_stats(struct cifs_tcon *tcon)
13596 {
13597 #ifdef CONFIG_CIFS_STATS
13598 @@ -61045,7 +59804,7 @@ index 52131d8..fd79e97 100644
13599 #endif
13600 }
13601
13602 -@@ -655,36 +655,36 @@ cifs_print_stats(struct seq_file *m, struct cifs_tcon *tcon)
13603 +@@ -651,36 +651,36 @@ cifs_print_stats(struct seq_file *m, struct cifs_tcon *tcon)
13604 {
13605 #ifdef CONFIG_CIFS_STATS
13606 seq_printf(m, " Oplocks breaks: %d",
13607 @@ -61102,10 +59861,10 @@ index 52131d8..fd79e97 100644
13608 }
13609
13610 diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
13611 -index f522193..586121b 100644
13612 +index c5f521b..1a40865 100644
13613 --- a/fs/cifs/smb2ops.c
13614 +++ b/fs/cifs/smb2ops.c
13615 -@@ -414,8 +414,8 @@ smb2_clear_stats(struct cifs_tcon *tcon)
13616 +@@ -417,8 +417,8 @@ smb2_clear_stats(struct cifs_tcon *tcon)
13617 #ifdef CONFIG_CIFS_STATS
13618 int i;
13619 for (i = 0; i < NUMBER_OF_SMB2_COMMANDS; i++) {
13620 @@ -61116,7 +59875,7 @@ index f522193..586121b 100644
13621 }
13622 #endif
13623 }
13624 -@@ -455,65 +455,65 @@ static void
13625 +@@ -458,65 +458,65 @@ static void
13626 smb2_print_stats(struct seq_file *m, struct cifs_tcon *tcon)
13627 {
13628 #ifdef CONFIG_CIFS_STATS
13629 @@ -61223,10 +59982,10 @@ index f522193..586121b 100644
13630 }
13631
13632 diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
13633 -index 74b3a66..0c709f3 100644
13634 +index 8f1672b..af339c07 100644
13635 --- a/fs/cifs/smb2pdu.c
13636 +++ b/fs/cifs/smb2pdu.c
13637 -@@ -2143,8 +2143,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
13638 +@@ -2145,8 +2145,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
13639 default:
13640 cifs_dbg(VFS, "info level %u isn't supported\n",
13641 srch_inf->info_level);
13642 @@ -61237,7 +59996,7 @@ index 74b3a66..0c709f3 100644
13643
13644 req->FileIndex = cpu_to_le32(index);
13645 diff --git a/fs/coda/cache.c b/fs/coda/cache.c
13646 -index 278f8fd..e69c52d 100644
13647 +index 46ee6f2..89a9e7f 100644
13648 --- a/fs/coda/cache.c
13649 +++ b/fs/coda/cache.c
13650 @@ -24,7 +24,7 @@
13651 @@ -61285,7 +60044,7 @@ index 278f8fd..e69c52d 100644
13652
13653 return hit;
13654 diff --git a/fs/compat.c b/fs/compat.c
13655 -index 66d3d3c..9c10175 100644
13656 +index b13df99..6f6f4a3 100644
13657 --- a/fs/compat.c
13658 +++ b/fs/compat.c
13659 @@ -54,7 +54,7 @@
13660 @@ -61315,7 +60074,7 @@ index 66d3d3c..9c10175 100644
13661 goto out;
13662 if (nr_segs > fast_segs) {
13663 ret = -ENOMEM;
13664 -@@ -850,6 +850,7 @@ struct compat_old_linux_dirent {
13665 +@@ -844,6 +844,7 @@ struct compat_old_linux_dirent {
13666 struct compat_readdir_callback {
13667 struct dir_context ctx;
13668 struct compat_old_linux_dirent __user *dirent;
13669 @@ -61323,7 +60082,7 @@ index 66d3d3c..9c10175 100644
13670 int result;
13671 };
13672
13673 -@@ -867,6 +868,10 @@ static int compat_fillonedir(void *__buf, const char *name, int namlen,
13674 +@@ -861,6 +862,10 @@ static int compat_fillonedir(void *__buf, const char *name, int namlen,
13675 buf->result = -EOVERFLOW;
13676 return -EOVERFLOW;
13677 }
13678 @@ -61334,7 +60093,7 @@ index 66d3d3c..9c10175 100644
13679 buf->result++;
13680 dirent = buf->dirent;
13681 if (!access_ok(VERIFY_WRITE, dirent,
13682 -@@ -898,6 +903,7 @@ COMPAT_SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
13683 +@@ -892,6 +897,7 @@ COMPAT_SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
13684 if (!f.file)
13685 return -EBADF;
13686
13687 @@ -61342,7 +60101,7 @@ index 66d3d3c..9c10175 100644
13688 error = iterate_dir(f.file, &buf.ctx);
13689 if (buf.result)
13690 error = buf.result;
13691 -@@ -917,6 +923,7 @@ struct compat_getdents_callback {
13692 +@@ -911,6 +917,7 @@ struct compat_getdents_callback {
13693 struct dir_context ctx;
13694 struct compat_linux_dirent __user *current_dir;
13695 struct compat_linux_dirent __user *previous;
13696 @@ -61350,7 +60109,7 @@ index 66d3d3c..9c10175 100644
13697 int count;
13698 int error;
13699 };
13700 -@@ -938,6 +945,10 @@ static int compat_filldir(void *__buf, const char *name, int namlen,
13701 +@@ -932,6 +939,10 @@ static int compat_filldir(void *__buf, const char *name, int namlen,
13702 buf->error = -EOVERFLOW;
13703 return -EOVERFLOW;
13704 }
13705 @@ -61361,7 +60120,7 @@ index 66d3d3c..9c10175 100644
13706 dirent = buf->previous;
13707 if (dirent) {
13708 if (__put_user(offset, &dirent->d_off))
13709 -@@ -983,6 +994,7 @@ COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd,
13710 +@@ -977,6 +988,7 @@ COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd,
13711 if (!f.file)
13712 return -EBADF;
13713
13714 @@ -61369,7 +60128,7 @@ index 66d3d3c..9c10175 100644
13715 error = iterate_dir(f.file, &buf.ctx);
13716 if (error >= 0)
13717 error = buf.error;
13718 -@@ -1003,6 +1015,7 @@ struct compat_getdents_callback64 {
13719 +@@ -997,6 +1009,7 @@ struct compat_getdents_callback64 {
13720 struct dir_context ctx;
13721 struct linux_dirent64 __user *current_dir;
13722 struct linux_dirent64 __user *previous;
13723 @@ -61377,7 +60136,7 @@ index 66d3d3c..9c10175 100644
13724 int count;
13725 int error;
13726 };
13727 -@@ -1019,6 +1032,10 @@ static int compat_filldir64(void * __buf, const char * name, int namlen, loff_t
13728 +@@ -1013,6 +1026,10 @@ static int compat_filldir64(void * __buf, const char * name, int namlen, loff_t
13729 buf->error = -EINVAL; /* only used if we fail.. */
13730 if (reclen > buf->count)
13731 return -EINVAL;
13732 @@ -61388,7 +60147,7 @@ index 66d3d3c..9c10175 100644
13733 dirent = buf->previous;
13734
13735 if (dirent) {
13736 -@@ -1068,6 +1085,7 @@ COMPAT_SYSCALL_DEFINE3(getdents64, unsigned int, fd,
13737 +@@ -1062,6 +1079,7 @@ COMPAT_SYSCALL_DEFINE3(getdents64, unsigned int, fd,
13738 if (!f.file)
13739 return -EBADF;
13740
13741 @@ -61487,10 +60246,10 @@ index 668dcab..daebcd6 100644
13742 /*
13743 * We'll have a dentry and an inode for
13744 diff --git a/fs/coredump.c b/fs/coredump.c
13745 -index a93f7e6..d58bcbe 100644
13746 +index b5c86ff..0dac262 100644
13747 --- a/fs/coredump.c
13748 +++ b/fs/coredump.c
13749 -@@ -442,8 +442,8 @@ static void wait_for_dump_helpers(struct file *file)
13750 +@@ -450,8 +450,8 @@ static void wait_for_dump_helpers(struct file *file)
13751 struct pipe_inode_info *pipe = file->private_data;
13752
13753 pipe_lock(pipe);
13754 @@ -61501,7 +60260,7 @@ index a93f7e6..d58bcbe 100644
13755 wake_up_interruptible_sync(&pipe->wait);
13756 kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
13757 pipe_unlock(pipe);
13758 -@@ -452,11 +452,11 @@ static void wait_for_dump_helpers(struct file *file)
13759 +@@ -460,11 +460,11 @@ static void wait_for_dump_helpers(struct file *file)
13760 * We actually want wait_event_freezable() but then we need
13761 * to clear TIF_SIGPENDING and improve dump_interrupted().
13762 */
13763 @@ -61516,7 +60275,7 @@ index a93f7e6..d58bcbe 100644
13764 pipe_unlock(pipe);
13765 }
13766
13767 -@@ -503,7 +503,9 @@ void do_coredump(const siginfo_t *siginfo)
13768 +@@ -511,7 +511,9 @@ void do_coredump(const siginfo_t *siginfo)
13769 struct files_struct *displaced;
13770 bool need_nonrelative = false;
13771 bool core_dumped = false;
13772 @@ -61527,7 +60286,7 @@ index a93f7e6..d58bcbe 100644
13773 struct coredump_params cprm = {
13774 .siginfo = siginfo,
13775 .regs = signal_pt_regs(),
13776 -@@ -516,12 +518,17 @@ void do_coredump(const siginfo_t *siginfo)
13777 +@@ -524,12 +526,17 @@ void do_coredump(const siginfo_t *siginfo)
13778 .mm_flags = mm->flags,
13779 };
13780
13781 @@ -61547,7 +60306,7 @@ index a93f7e6..d58bcbe 100644
13782 goto fail;
13783
13784 cred = prepare_creds();
13785 -@@ -540,7 +547,7 @@ void do_coredump(const siginfo_t *siginfo)
13786 +@@ -548,7 +555,7 @@ void do_coredump(const siginfo_t *siginfo)
13787 need_nonrelative = true;
13788 }
13789
13790 @@ -61556,7 +60315,7 @@ index a93f7e6..d58bcbe 100644
13791 if (retval < 0)
13792 goto fail_creds;
13793
13794 -@@ -583,7 +590,7 @@ void do_coredump(const siginfo_t *siginfo)
13795 +@@ -591,7 +598,7 @@ void do_coredump(const siginfo_t *siginfo)
13796 }
13797 cprm.limit = RLIM_INFINITY;
13798
13799 @@ -61565,7 +60324,7 @@ index a93f7e6..d58bcbe 100644
13800 if (core_pipe_limit && (core_pipe_limit < dump_count)) {
13801 printk(KERN_WARNING "Pid %d(%s) over core_pipe_limit\n",
13802 task_tgid_vnr(current), current->comm);
13803 -@@ -615,6 +622,8 @@ void do_coredump(const siginfo_t *siginfo)
13804 +@@ -623,6 +630,8 @@ void do_coredump(const siginfo_t *siginfo)
13805 } else {
13806 struct inode *inode;
13807
13808 @@ -61574,7 +60333,7 @@ index a93f7e6..d58bcbe 100644
13809 if (cprm.limit < binfmt->min_coredump)
13810 goto fail_unlock;
13811
13812 -@@ -673,7 +682,7 @@ close_fail:
13813 +@@ -681,7 +690,7 @@ close_fail:
13814 filp_close(cprm.file, NULL);
13815 fail_dropcount:
13816 if (ispipe)
13817 @@ -61583,7 +60342,7 @@ index a93f7e6..d58bcbe 100644
13818 fail_unlock:
13819 kfree(cn.corename);
13820 coredump_finish(mm, core_dumped);
13821 -@@ -694,6 +703,8 @@ int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
13822 +@@ -702,6 +711,8 @@ int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
13823 struct file *file = cprm->file;
13824 loff_t pos = file->f_pos;
13825 ssize_t n;
13826 @@ -61593,10 +60352,10 @@ index a93f7e6..d58bcbe 100644
13827 return 0;
13828 while (nr) {
13829 diff --git a/fs/dcache.c b/fs/dcache.c
13830 -index 34b40be8..2003532 100644
13831 +index 71acf8d..815e743 100644
13832 --- a/fs/dcache.c
13833 +++ b/fs/dcache.c
13834 -@@ -478,7 +478,7 @@ static void __dentry_kill(struct dentry *dentry)
13835 +@@ -508,7 +508,7 @@ static void __dentry_kill(struct dentry *dentry)
13836 * dentry_iput drops the locks, at which point nobody (except
13837 * transient RCU lookups) can reach this dentry.
13838 */
13839 @@ -61605,7 +60364,7 @@ index 34b40be8..2003532 100644
13840 this_cpu_dec(nr_dentry);
13841 if (dentry->d_op && dentry->d_op->d_release)
13842 dentry->d_op->d_release(dentry);
13843 -@@ -531,7 +531,7 @@ static inline struct dentry *lock_parent(struct dentry *dentry)
13844 +@@ -561,7 +561,7 @@ static inline struct dentry *lock_parent(struct dentry *dentry)
13845 struct dentry *parent = dentry->d_parent;
13846 if (IS_ROOT(dentry))
13847 return NULL;
13848 @@ -61614,7 +60373,7 @@ index 34b40be8..2003532 100644
13849 return NULL;
13850 if (likely(spin_trylock(&parent->d_lock)))
13851 return parent;
13852 -@@ -608,7 +608,7 @@ repeat:
13853 +@@ -638,7 +638,7 @@ repeat:
13854 dentry->d_flags |= DCACHE_REFERENCED;
13855 dentry_lru_add(dentry);
13856
13857 @@ -61623,16 +60382,7 @@ index 34b40be8..2003532 100644
13858 spin_unlock(&dentry->d_lock);
13859 return;
13860
13861 -@@ -663,7 +663,7 @@ int d_invalidate(struct dentry * dentry)
13862 - * We also need to leave mountpoints alone,
13863 - * directory or not.
13864 - */
13865 -- if (dentry->d_lockref.count > 1 && dentry->d_inode) {
13866 -+ if (__lockref_read(&dentry->d_lockref) > 1 && dentry->d_inode) {
13867 - if (S_ISDIR(dentry->d_inode->i_mode) || d_mountpoint(dentry)) {
13868 - spin_unlock(&dentry->d_lock);
13869 - return -EBUSY;
13870 -@@ -679,7 +679,7 @@ EXPORT_SYMBOL(d_invalidate);
13871 +@@ -653,7 +653,7 @@ EXPORT_SYMBOL(dput);
13872 /* This must be called with d_lock held */
13873 static inline void __dget_dlock(struct dentry *dentry)
13874 {
13875 @@ -61641,7 +60391,7 @@ index 34b40be8..2003532 100644
13876 }
13877
13878 static inline void __dget(struct dentry *dentry)
13879 -@@ -720,8 +720,8 @@ repeat:
13880 +@@ -694,8 +694,8 @@ repeat:
13881 goto repeat;
13882 }
13883 rcu_read_unlock();
13884 @@ -61652,16 +60402,19 @@ index 34b40be8..2003532 100644
13885 spin_unlock(&ret->d_lock);
13886 return ret;
13887 }
13888 -@@ -798,7 +798,7 @@ restart:
13889 +@@ -773,9 +773,9 @@ restart:
13890 spin_lock(&inode->i_lock);
13891 - hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) {
13892 + hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) {
13893 spin_lock(&dentry->d_lock);
13894 - if (!dentry->d_lockref.count) {
13895 + if (!__lockref_read(&dentry->d_lockref)) {
13896 - /*
13897 - * inform the fs via d_prune that this dentry
13898 - * is about to be unhashed and destroyed.
13899 -@@ -841,7 +841,7 @@ static void shrink_dentry_list(struct list_head *list)
13900 + struct dentry *parent = lock_parent(dentry);
13901 +- if (likely(!dentry->d_lockref.count)) {
13902 ++ if (likely(!__lockref_read(&dentry->d_lockref))) {
13903 + __dentry_kill(dentry);
13904 + dput(parent);
13905 + goto restart;
13906 +@@ -810,7 +810,7 @@ static void shrink_dentry_list(struct list_head *list)
13907 * We found an inuse dentry which was not removed from
13908 * the LRU because of laziness during lookup. Do not free it.
13909 */
13910 @@ -61670,7 +60423,7 @@ index 34b40be8..2003532 100644
13911 spin_unlock(&dentry->d_lock);
13912 if (parent)
13913 spin_unlock(&parent->d_lock);
13914 -@@ -879,8 +879,8 @@ static void shrink_dentry_list(struct list_head *list)
13915 +@@ -848,8 +848,8 @@ static void shrink_dentry_list(struct list_head *list)
13916 dentry = parent;
13917 while (dentry && !lockref_put_or_lock(&dentry->d_lockref)) {
13918 parent = lock_parent(dentry);
13919 @@ -61681,7 +60434,7 @@ index 34b40be8..2003532 100644
13920 spin_unlock(&dentry->d_lock);
13921 if (parent)
13922 spin_unlock(&parent->d_lock);
13923 -@@ -920,7 +920,7 @@ dentry_lru_isolate(struct list_head *item, spinlock_t *lru_lock, void *arg)
13924 +@@ -889,7 +889,7 @@ dentry_lru_isolate(struct list_head *item, spinlock_t *lru_lock, void *arg)
13925 * counts, just remove them from the LRU. Otherwise give them
13926 * another pass through the LRU.
13927 */
13928 @@ -61690,15 +60443,7 @@ index 34b40be8..2003532 100644
13929 d_lru_isolate(dentry);
13930 spin_unlock(&dentry->d_lock);
13931 return LRU_REMOVED;
13932 -@@ -1149,6 +1149,7 @@ out_unlock:
13933 - return;
13934 -
13935 - rename_retry:
13936 -+ done_seqretry(&rename_lock, seq);
13937 - if (!retry)
13938 - return;
13939 - seq = 1;
13940 -@@ -1255,7 +1256,7 @@ static enum d_walk_ret select_collect(void *_data, struct dentry *dentry)
13941 +@@ -1225,7 +1225,7 @@ static enum d_walk_ret select_collect(void *_data, struct dentry *dentry)
13942 } else {
13943 if (dentry->d_flags & DCACHE_LRU_LIST)
13944 d_lru_del(dentry);
13945 @@ -61707,7 +60452,7 @@ index 34b40be8..2003532 100644
13946 d_shrink_add(dentry, &data->dispose);
13947 data->found++;
13948 }
13949 -@@ -1303,7 +1304,7 @@ static enum d_walk_ret umount_check(void *_data, struct dentry *dentry)
13950 +@@ -1273,7 +1273,7 @@ static enum d_walk_ret umount_check(void *_data, struct dentry *dentry)
13951 return D_WALK_CONTINUE;
13952
13953 /* root with refcount 1 is fine */
13954 @@ -61716,7 +60461,7 @@ index 34b40be8..2003532 100644
13955 return D_WALK_CONTINUE;
13956
13957 printk(KERN_ERR "BUG: Dentry %p{i=%lx,n=%pd} "
13958 -@@ -1312,7 +1313,7 @@ static enum d_walk_ret umount_check(void *_data, struct dentry *dentry)
13959 +@@ -1282,7 +1282,7 @@ static enum d_walk_ret umount_check(void *_data, struct dentry *dentry)
13960 dentry->d_inode ?
13961 dentry->d_inode->i_ino : 0UL,
13962 dentry,
13963 @@ -61725,16 +60470,16 @@ index 34b40be8..2003532 100644
13964 dentry->d_sb->s_type->name,
13965 dentry->d_sb->s_id);
13966 WARN_ON(1);
13967 -@@ -1438,7 +1439,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
13968 - */
13969 +@@ -1423,7 +1423,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
13970 dentry->d_iname[DNAME_INLINE_LEN-1] = 0;
13971 if (name->len > DNAME_INLINE_LEN-1) {
13972 -- dname = kmalloc(name->len + 1, GFP_KERNEL);
13973 -+ dname = kmalloc(round_up(name->len + 1, sizeof(unsigned long)), GFP_KERNEL);
13974 - if (!dname) {
13975 + size_t size = offsetof(struct external_name, name[1]);
13976 +- struct external_name *p = kmalloc(size + name->len, GFP_KERNEL);
13977 ++ struct external_name *p = kmalloc(round_up(size + name->len, sizeof(unsigned long)), GFP_KERNEL);
13978 + if (!p) {
13979 kmem_cache_free(dentry_cache, dentry);
13980 return NULL;
13981 -@@ -1456,7 +1457,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
13982 +@@ -1443,7 +1443,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
13983 smp_wmb();
13984 dentry->d_name.name = dname;
13985
13986 @@ -61743,7 +60488,7 @@ index 34b40be8..2003532 100644
13987 dentry->d_flags = 0;
13988 spin_lock_init(&dentry->d_lock);
13989 seqcount_init(&dentry->d_seq);
13990 -@@ -2196,7 +2197,7 @@ struct dentry *__d_lookup(const struct dentry *parent, const struct qstr *name)
13991 +@@ -2183,7 +2183,7 @@ struct dentry *__d_lookup(const struct dentry *parent, const struct qstr *name)
13992 goto next;
13993 }
13994
13995 @@ -61752,7 +60497,7 @@ index 34b40be8..2003532 100644
13996 found = dentry;
13997 spin_unlock(&dentry->d_lock);
13998 break;
13999 -@@ -2295,7 +2296,7 @@ again:
14000 +@@ -2282,7 +2282,7 @@ again:
14001 spin_lock(&dentry->d_lock);
14002 inode = dentry->d_inode;
14003 isdir = S_ISDIR(inode->i_mode);
14004 @@ -61761,7 +60506,7 @@ index 34b40be8..2003532 100644
14005 if (!spin_trylock(&inode->i_lock)) {
14006 spin_unlock(&dentry->d_lock);
14007 cpu_relax();
14008 -@@ -3307,7 +3308,7 @@ static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
14009 +@@ -3306,7 +3306,7 @@ static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
14010
14011 if (!(dentry->d_flags & DCACHE_GENOCIDE)) {
14012 dentry->d_flags |= DCACHE_GENOCIDE;
14013 @@ -61770,7 +60515,7 @@ index 34b40be8..2003532 100644
14014 }
14015 }
14016 return D_WALK_CONTINUE;
14017 -@@ -3423,7 +3424,8 @@ void __init vfs_caches_init(unsigned long mempages)
14018 +@@ -3422,7 +3422,8 @@ void __init vfs_caches_init(unsigned long mempages)
14019 mempages -= reserve;
14020
14021 names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0,
14022 @@ -61781,7 +60526,7 @@ index 34b40be8..2003532 100644
14023 dcache_init();
14024 inode_init();
14025 diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
14026 -index 1e3b99d..6512101 100644
14027 +index 05f2960..b012481 100644
14028 --- a/fs/debugfs/inode.c
14029 +++ b/fs/debugfs/inode.c
14030 @@ -416,7 +416,11 @@ EXPORT_SYMBOL_GPL(debugfs_create_file);
14031 @@ -61797,10 +60542,10 @@ index 1e3b99d..6512101 100644
14032 }
14033 EXPORT_SYMBOL_GPL(debugfs_create_dir);
14034 diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
14035 -index 57ee4c5..ecb13b0 100644
14036 +index 1686dc2..9611c50 100644
14037 --- a/fs/ecryptfs/inode.c
14038 +++ b/fs/ecryptfs/inode.c
14039 -@@ -673,7 +673,7 @@ static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz)
14040 +@@ -664,7 +664,7 @@ static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz)
14041 old_fs = get_fs();
14042 set_fs(get_ds());
14043 rc = lower_dentry->d_inode->i_op->readlink(lower_dentry,
14044 @@ -61823,7 +60568,7 @@ index e4141f2..d8263e8 100644
14045 i += packet_length_size;
14046 if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size))
14047 diff --git a/fs/exec.c b/fs/exec.c
14048 -index a2b42a9..1e924b3 100644
14049 +index 7302b75..7d61d19 100644
14050 --- a/fs/exec.c
14051 +++ b/fs/exec.c
14052 @@ -56,8 +56,20 @@
14053 @@ -62149,7 +60894,7 @@ index a2b42a9..1e924b3 100644
14054 bprm->unsafe |= LSM_UNSAFE_SHARE;
14055 else
14056 p->fs->in_exec = 1;
14057 -@@ -1419,6 +1498,31 @@ static int exec_binprm(struct linux_binprm *bprm)
14058 +@@ -1424,6 +1503,31 @@ static int exec_binprm(struct linux_binprm *bprm)
14059 return ret;
14060 }
14061
14062 @@ -62181,7 +60926,7 @@ index a2b42a9..1e924b3 100644
14063 /*
14064 * sys_execve() executes a new program.
14065 */
14066 -@@ -1426,6 +1530,11 @@ static int do_execve_common(struct filename *filename,
14067 +@@ -1431,6 +1535,11 @@ static int do_execve_common(struct filename *filename,
14068 struct user_arg_ptr argv,
14069 struct user_arg_ptr envp)
14070 {
14071 @@ -62193,7 +60938,7 @@ index a2b42a9..1e924b3 100644
14072 struct linux_binprm *bprm;
14073 struct file *file;
14074 struct files_struct *displaced;
14075 -@@ -1434,6 +1543,8 @@ static int do_execve_common(struct filename *filename,
14076 +@@ -1439,6 +1548,8 @@ static int do_execve_common(struct filename *filename,
14077 if (IS_ERR(filename))
14078 return PTR_ERR(filename);
14079
14080 @@ -62202,7 +60947,7 @@ index a2b42a9..1e924b3 100644
14081 /*
14082 * We move the actual failure in case of RLIMIT_NPROC excess from
14083 * set*uid() to execve() because too many poorly written programs
14084 -@@ -1471,11 +1582,21 @@ static int do_execve_common(struct filename *filename,
14085 +@@ -1476,11 +1587,21 @@ static int do_execve_common(struct filename *filename,
14086 if (IS_ERR(file))
14087 goto out_unmark;
14088
14089 @@ -62224,7 +60969,7 @@ index a2b42a9..1e924b3 100644
14090 retval = bprm_mm_init(bprm);
14091 if (retval)
14092 goto out_unmark;
14093 -@@ -1492,24 +1613,70 @@ static int do_execve_common(struct filename *filename,
14094 +@@ -1497,24 +1618,70 @@ static int do_execve_common(struct filename *filename,
14095 if (retval < 0)
14096 goto out;
14097
14098 @@ -62299,7 +61044,7 @@ index a2b42a9..1e924b3 100644
14099 current->fs->in_exec = 0;
14100 current->in_execve = 0;
14101 acct_update_integrals(current);
14102 -@@ -1520,6 +1687,14 @@ static int do_execve_common(struct filename *filename,
14103 +@@ -1525,6 +1692,14 @@ static int do_execve_common(struct filename *filename,
14104 put_files_struct(displaced);
14105 return retval;
14106
14107 @@ -62314,7 +61059,7 @@ index a2b42a9..1e924b3 100644
14108 out:
14109 if (bprm->mm) {
14110 acct_arg_size(bprm, 0);
14111 -@@ -1611,3 +1786,312 @@ COMPAT_SYSCALL_DEFINE3(execve, const char __user *, filename,
14112 +@@ -1616,3 +1791,312 @@ COMPAT_SYSCALL_DEFINE3(execve, const char __user *, filename,
14113 return compat_do_execve(getname(filename), argv, envp);
14114 }
14115 #endif
14116 @@ -62645,7 +61390,7 @@ index 9f9992b..8b59411 100644
14117 }
14118 return 1;
14119 diff --git a/fs/ext2/super.c b/fs/ext2/super.c
14120 -index b88edc0..c4088ab 100644
14121 +index 170dc41..62f6b18 100644
14122 --- a/fs/ext2/super.c
14123 +++ b/fs/ext2/super.c
14124 @@ -264,10 +264,8 @@ static int ext2_show_options(struct seq_file *seq, struct dentry *root)
14125 @@ -62714,7 +61459,7 @@ index 158b5d4..2432610 100644
14126 }
14127 return 1;
14128 diff --git a/fs/ext3/super.c b/fs/ext3/super.c
14129 -index 2c42e73..cf5b892 100644
14130 +index eb742d0..c19f705 100644
14131 --- a/fs/ext3/super.c
14132 +++ b/fs/ext3/super.c
14133 @@ -649,10 +649,8 @@ static int ext3_show_options(struct seq_file *seq, struct dentry *root)
14134 @@ -62766,7 +61511,7 @@ index c6874be..f8a6ae8 100644
14135
14136 static int
14137 diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
14138 -index e069155..b825b08 100644
14139 +index 83a6f49..d4e4d03 100644
14140 --- a/fs/ext4/balloc.c
14141 +++ b/fs/ext4/balloc.c
14142 @@ -557,8 +557,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi,
14143 @@ -62781,10 +61526,10 @@ index e069155..b825b08 100644
14144 if (free_clusters >= (nclusters + dirty_clusters +
14145 resv_clusters))
14146 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
14147 -index 96ac9d3..1c30e7e6 100644
14148 +index c55a1fa..9904ebb 100644
14149 --- a/fs/ext4/ext4.h
14150 +++ b/fs/ext4/ext4.h
14151 -@@ -1275,19 +1275,19 @@ struct ext4_sb_info {
14152 +@@ -1279,19 +1279,19 @@ struct ext4_sb_info {
14153 unsigned long s_mb_last_start;
14154
14155 /* stats for buddy allocator */
14156 @@ -62815,7 +61560,7 @@ index 96ac9d3..1c30e7e6 100644
14157
14158 /* locality groups */
14159 diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
14160 -index 8b0f9ef..cb9f620 100644
14161 +index dbfe15c..9a6ee8d 100644
14162 --- a/fs/ext4/mballoc.c
14163 +++ b/fs/ext4/mballoc.c
14164 @@ -1901,7 +1901,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac,
14165 @@ -62872,7 +61617,7 @@ index 8b0f9ef..cb9f620 100644
14166 }
14167
14168 free_percpu(sbi->s_locality_groups);
14169 -@@ -3192,16 +3192,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac)
14170 +@@ -3191,16 +3191,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac)
14171 struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
14172
14173 if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) {
14174 @@ -62895,7 +61640,7 @@ index 8b0f9ef..cb9f620 100644
14175 }
14176
14177 if (ac->ac_op == EXT4_MB_HISTORY_ALLOC)
14178 -@@ -3628,7 +3628,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
14179 +@@ -3627,7 +3627,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
14180 trace_ext4_mb_new_inode_pa(ac, pa);
14181
14182 ext4_mb_use_inode_pa(ac, pa);
14183 @@ -62904,7 +61649,7 @@ index 8b0f9ef..cb9f620 100644
14184
14185 ei = EXT4_I(ac->ac_inode);
14186 grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group);
14187 -@@ -3688,7 +3688,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac)
14188 +@@ -3687,7 +3687,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac)
14189 trace_ext4_mb_new_group_pa(ac, pa);
14190
14191 ext4_mb_use_group_pa(ac, pa);
14192 @@ -62913,7 +61658,7 @@ index 8b0f9ef..cb9f620 100644
14193
14194 grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group);
14195 lg = ac->ac_lg;
14196 -@@ -3777,7 +3777,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
14197 +@@ -3776,7 +3776,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
14198 * from the bitmap and continue.
14199 */
14200 }
14201 @@ -62922,7 +61667,7 @@ index 8b0f9ef..cb9f620 100644
14202
14203 return err;
14204 }
14205 -@@ -3795,7 +3795,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b,
14206 +@@ -3794,7 +3794,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b,
14207 ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit);
14208 BUG_ON(group != e4b->bd_group && pa->pa_len != 0);
14209 mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len);
14210 @@ -62945,10 +61690,10 @@ index 8313ca3..8a37d08 100644
14211 "MMP failure info: last update time: %llu, last update "
14212 "node: %s, last update device: %s\n",
14213 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
14214 -index b1f0ac7..77e9a05 100644
14215 +index 2c9e686..6a40edc 100644
14216 --- a/fs/ext4/super.c
14217 +++ b/fs/ext4/super.c
14218 -@@ -1274,7 +1274,7 @@ static ext4_fsblk_t get_sb_block(void **data)
14219 +@@ -1254,7 +1254,7 @@ static ext4_fsblk_t get_sb_block(void **data)
14220 }
14221
14222 #define DEFAULT_JOURNAL_IOPRIO (IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 3))
14223 @@ -62957,7 +61702,7 @@ index b1f0ac7..77e9a05 100644
14224 "Contact linux-ext4@×××××××××××.org if you think we should keep it.\n";
14225
14226 #ifdef CONFIG_QUOTA
14227 -@@ -2454,7 +2454,7 @@ struct ext4_attr {
14228 +@@ -2434,7 +2434,7 @@ struct ext4_attr {
14229 int offset;
14230 int deprecated_val;
14231 } u;
14232 @@ -62967,7 +61712,7 @@ index b1f0ac7..77e9a05 100644
14233 static int parse_strtoull(const char *buf,
14234 unsigned long long max, unsigned long long *value)
14235 diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
14236 -index 2d1e5803..1b082d415 100644
14237 +index 1e09fc7..0400dd4 100644
14238 --- a/fs/ext4/xattr.c
14239 +++ b/fs/ext4/xattr.c
14240 @@ -399,7 +399,7 @@ static int
14241 @@ -62992,21 +61737,20 @@ index 2d1e5803..1b082d415 100644
14242
14243 static int
14244 diff --git a/fs/fcntl.c b/fs/fcntl.c
14245 -index 22d1c3d..600cf7e 100644
14246 +index 99d440a..eb979d1 100644
14247 --- a/fs/fcntl.c
14248 +++ b/fs/fcntl.c
14249 -@@ -107,6 +107,11 @@ int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
14250 - if (err)
14251 - return err;
14252 -
14253 +@@ -102,6 +102,10 @@ void __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
14254 + int force)
14255 + {
14256 + security_file_set_fowner(filp);
14257 + if (gr_handle_chroot_fowner(pid, type))
14258 -+ return -ENOENT;
14259 ++ return;
14260 + if (gr_check_protected_task_fowner(pid, type))
14261 -+ return -EACCES;
14262 -+
14263 ++ return;
14264 f_modown(filp, pid, type, force);
14265 - return 0;
14266 }
14267 + EXPORT_SYMBOL(__f_setown);
14268 diff --git a/fs/fhandle.c b/fs/fhandle.c
14269 index 999ff5c..ac037c9 100644
14270 --- a/fs/fhandle.c
14271 @@ -63039,7 +61783,7 @@ index 999ff5c..ac037c9 100644
14272 goto out_err;
14273 }
14274 diff --git a/fs/file.c b/fs/file.c
14275 -index 66923fe..2849783 100644
14276 +index ab3eb6a..8de2392 100644
14277 --- a/fs/file.c
14278 +++ b/fs/file.c
14279 @@ -16,6 +16,7 @@
14280 @@ -63068,7 +61812,7 @@ index 66923fe..2849783 100644
14281 {
14282 struct fdtable *fdt;
14283
14284 -@@ -799,6 +800,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
14285 +@@ -800,6 +801,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
14286 if (!file)
14287 return __close_fd(files, fd);
14288
14289 @@ -63076,7 +61820,7 @@ index 66923fe..2849783 100644
14290 if (fd >= rlimit(RLIMIT_NOFILE))
14291 return -EBADF;
14292
14293 -@@ -825,6 +827,7 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags)
14294 +@@ -826,6 +828,7 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags)
14295 if (unlikely(oldfd == newfd))
14296 return -EINVAL;
14297
14298 @@ -63084,7 +61828,7 @@ index 66923fe..2849783 100644
14299 if (newfd >= rlimit(RLIMIT_NOFILE))
14300 return -EBADF;
14301
14302 -@@ -880,6 +883,7 @@ SYSCALL_DEFINE1(dup, unsigned int, fildes)
14303 +@@ -881,6 +884,7 @@ SYSCALL_DEFINE1(dup, unsigned int, fildes)
14304 int f_dupfd(unsigned int from, struct file *file, unsigned flags)
14305 {
14306 int err;
14307 @@ -64625,10 +63369,10 @@ index ca88731..8e9c55d 100644
14308 }
14309
14310 diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
14311 -index de1d84a..fd69c0c 100644
14312 +index dbab798..fefa22b 100644
14313 --- a/fs/fuse/dir.c
14314 +++ b/fs/fuse/dir.c
14315 -@@ -1479,7 +1479,7 @@ static char *read_link(struct dentry *dentry)
14316 +@@ -1474,7 +1474,7 @@ static char *read_link(struct dentry *dentry)
14317 return link;
14318 }
14319
14320 @@ -64788,7 +63532,7 @@ index 09ed551..45684f8 100644
14321
14322 /*
14323 diff --git a/fs/jfs/super.c b/fs/jfs/super.c
14324 -index adf8cb0..bb935fa 100644
14325 +index 93e897e..a863de4 100644
14326 --- a/fs/jfs/super.c
14327 +++ b/fs/jfs/super.c
14328 @@ -893,7 +893,7 @@ static int __init init_jfs_fs(void)
14329 @@ -64801,7 +63545,7 @@ index adf8cb0..bb935fa 100644
14330 if (jfs_inode_cachep == NULL)
14331 return -ENOMEM;
14332 diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
14333 -index a693f5b..82276a1 100644
14334 +index 1c77193..a50091d 100644
14335 --- a/fs/kernfs/dir.c
14336 +++ b/fs/kernfs/dir.c
14337 @@ -182,7 +182,7 @@ struct kernfs_node *kernfs_get_parent(struct kernfs_node *kn)
14338 @@ -64892,13 +63636,13 @@ index 8a19889..4c3069a 100644
14339 free_page((unsigned long)page);
14340 }
14341 diff --git a/fs/libfs.c b/fs/libfs.c
14342 -index 88e3e00..979c262 100644
14343 +index 005843c..06c4191 100644
14344 --- a/fs/libfs.c
14345 +++ b/fs/libfs.c
14346 @@ -160,6 +160,9 @@ int dcache_readdir(struct file *file, struct dir_context *ctx)
14347
14348 for (p = q->next; p != &dentry->d_subdirs; p = p->next) {
14349 - struct dentry *next = list_entry(p, struct dentry, d_u.d_child);
14350 + struct dentry *next = list_entry(p, struct dentry, d_child);
14351 + char d_name[sizeof(next->d_iname)];
14352 + const unsigned char *name;
14353 +
14354 @@ -64947,10 +63691,10 @@ index acd3947..1f896e2 100644
14355 memcpy(c->data, &cookie, 4);
14356 c->len=4;
14357 diff --git a/fs/locks.c b/fs/locks.c
14358 -index bb08857..f65e8bf 100644
14359 +index 735b8d3..dfc44a2 100644
14360 --- a/fs/locks.c
14361 +++ b/fs/locks.c
14362 -@@ -2350,7 +2350,7 @@ void locks_remove_file(struct file *filp)
14363 +@@ -2374,7 +2374,7 @@ void locks_remove_file(struct file *filp)
14364 locks_remove_posix(filp, filp);
14365
14366 if (filp->f_op->flock) {
14367 @@ -64959,7 +63703,7 @@ index bb08857..f65e8bf 100644
14368 .fl_owner = filp,
14369 .fl_pid = current->tgid,
14370 .fl_file = filp,
14371 -@@ -2358,9 +2358,9 @@ void locks_remove_file(struct file *filp)
14372 +@@ -2382,9 +2382,9 @@ void locks_remove_file(struct file *filp)
14373 .fl_type = F_UNLCK,
14374 .fl_end = OFFSET_MAX,
14375 };
14376 @@ -64973,7 +63717,7 @@ index bb08857..f65e8bf 100644
14377
14378 spin_lock(&inode->i_lock);
14379 diff --git a/fs/mount.h b/fs/mount.h
14380 -index 6740a62..ccb472f 100644
14381 +index f82c628..9492b99 100644
14382 --- a/fs/mount.h
14383 +++ b/fs/mount.h
14384 @@ -11,7 +11,7 @@ struct mnt_namespace {
14385 @@ -64985,7 +63729,7 @@ index 6740a62..ccb472f 100644
14386
14387 struct mnt_pcp {
14388 int mnt_count;
14389 -@@ -57,7 +57,7 @@ struct mount {
14390 +@@ -62,7 +62,7 @@ struct mount {
14391 int mnt_expiry_mark; /* true if marked for expiry */
14392 struct hlist_head mnt_pins;
14393 struct path mnt_ex_mountpoint;
14394 @@ -64995,7 +63739,7 @@ index 6740a62..ccb472f 100644
14395 #define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */
14396
14397 diff --git a/fs/namei.c b/fs/namei.c
14398 -index bb02687..79cba2c 100644
14399 +index db5fe86..d3dcc14 100644
14400 --- a/fs/namei.c
14401 +++ b/fs/namei.c
14402 @@ -331,17 +331,32 @@ int generic_permission(struct inode *inode, int mask)
14403 @@ -65050,7 +63794,7 @@ index bb02687..79cba2c 100644
14404 return -EACCES;
14405 }
14406 EXPORT_SYMBOL(generic_permission);
14407 -@@ -823,7 +830,7 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
14408 +@@ -824,7 +831,7 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
14409 {
14410 struct dentry *dentry = link->dentry;
14411 int error;
14412 @@ -65059,7 +63803,7 @@ index bb02687..79cba2c 100644
14413
14414 BUG_ON(nd->flags & LOOKUP_RCU);
14415
14416 -@@ -844,6 +851,12 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
14417 +@@ -845,6 +852,12 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
14418 if (error)
14419 goto out_put_nd_path;
14420
14421 @@ -65072,7 +63816,7 @@ index bb02687..79cba2c 100644
14422 nd->last_type = LAST_BIND;
14423 *p = dentry->d_inode->i_op->follow_link(dentry, nd);
14424 error = PTR_ERR(*p);
14425 -@@ -1607,6 +1620,8 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd)
14426 +@@ -1608,6 +1621,8 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd)
14427 if (res)
14428 break;
14429 res = walk_component(nd, path, LOOKUP_FOLLOW);
14430 @@ -65081,7 +63825,7 @@ index bb02687..79cba2c 100644
14431 put_link(nd, &link, cookie);
14432 } while (res > 0);
14433
14434 -@@ -1679,7 +1694,7 @@ EXPORT_SYMBOL(full_name_hash);
14435 +@@ -1680,7 +1695,7 @@ EXPORT_SYMBOL(full_name_hash);
14436 static inline u64 hash_name(const char *name)
14437 {
14438 unsigned long a, b, adata, bdata, mask, hash, len;
14439 @@ -65090,7 +63834,7 @@ index bb02687..79cba2c 100644
14440
14441 hash = a = 0;
14442 len = -sizeof(unsigned long);
14443 -@@ -1968,6 +1983,8 @@ static int path_lookupat(int dfd, const char *name,
14444 +@@ -1969,6 +1984,8 @@ static int path_lookupat(int dfd, const char *name,
14445 if (err)
14446 break;
14447 err = lookup_last(nd, &path);
14448 @@ -65099,7 +63843,7 @@ index bb02687..79cba2c 100644
14449 put_link(nd, &link, cookie);
14450 }
14451 }
14452 -@@ -1975,6 +1992,13 @@ static int path_lookupat(int dfd, const char *name,
14453 +@@ -1976,6 +1993,13 @@ static int path_lookupat(int dfd, const char *name,
14454 if (!err)
14455 err = complete_walk(nd);
14456
14457 @@ -65113,7 +63857,7 @@ index bb02687..79cba2c 100644
14458 if (!err && nd->flags & LOOKUP_DIRECTORY) {
14459 if (!d_can_lookup(nd->path.dentry)) {
14460 path_put(&nd->path);
14461 -@@ -2002,8 +2026,15 @@ static int filename_lookup(int dfd, struct filename *name,
14462 +@@ -2004,8 +2028,15 @@ static int filename_lookup(int dfd, struct filename *name,
14463 retval = path_lookupat(dfd, name->name,
14464 flags | LOOKUP_REVAL, nd);
14465
14466 @@ -65130,7 +63874,7 @@ index bb02687..79cba2c 100644
14467 return retval;
14468 }
14469
14470 -@@ -2585,6 +2616,13 @@ static int may_open(struct path *path, int acc_mode, int flag)
14471 +@@ -2582,6 +2613,13 @@ static int may_open(struct path *path, int acc_mode, int flag)
14472 if (flag & O_NOATIME && !inode_owner_or_capable(inode))
14473 return -EPERM;
14474
14475 @@ -65144,7 +63888,7 @@ index bb02687..79cba2c 100644
14476 return 0;
14477 }
14478
14479 -@@ -2816,7 +2854,7 @@ looked_up:
14480 +@@ -2813,7 +2851,7 @@ looked_up:
14481 * cleared otherwise prior to returning.
14482 */
14483 static int lookup_open(struct nameidata *nd, struct path *path,
14484 @@ -65153,7 +63897,7 @@ index bb02687..79cba2c 100644
14485 const struct open_flags *op,
14486 bool got_write, int *opened)
14487 {
14488 -@@ -2851,6 +2889,17 @@ static int lookup_open(struct nameidata *nd, struct path *path,
14489 +@@ -2848,6 +2886,17 @@ static int lookup_open(struct nameidata *nd, struct path *path,
14490 /* Negative dentry, just create the file */
14491 if (!dentry->d_inode && (op->open_flag & O_CREAT)) {
14492 umode_t mode = op->mode;
14493 @@ -65171,7 +63915,7 @@ index bb02687..79cba2c 100644
14494 if (!IS_POSIXACL(dir->d_inode))
14495 mode &= ~current_umask();
14496 /*
14497 -@@ -2872,6 +2921,8 @@ static int lookup_open(struct nameidata *nd, struct path *path,
14498 +@@ -2869,6 +2918,8 @@ static int lookup_open(struct nameidata *nd, struct path *path,
14499 nd->flags & LOOKUP_EXCL);
14500 if (error)
14501 goto out_dput;
14502 @@ -65180,7 +63924,7 @@ index bb02687..79cba2c 100644
14503 }
14504 out_no_open:
14505 path->dentry = dentry;
14506 -@@ -2886,7 +2937,7 @@ out_dput:
14507 +@@ -2883,7 +2934,7 @@ out_dput:
14508 /*
14509 * Handle the last step of open()
14510 */
14511 @@ -65189,7 +63933,7 @@ index bb02687..79cba2c 100644
14512 struct file *file, const struct open_flags *op,
14513 int *opened, struct filename *name)
14514 {
14515 -@@ -2936,6 +2987,15 @@ static int do_last(struct nameidata *nd, struct path *path,
14516 +@@ -2933,6 +2984,15 @@ static int do_last(struct nameidata *nd, struct path *path,
14517 if (error)
14518 return error;
14519
14520 @@ -65205,7 +63949,7 @@ index bb02687..79cba2c 100644
14521 audit_inode(name, dir, LOOKUP_PARENT);
14522 error = -EISDIR;
14523 /* trailing slashes? */
14524 -@@ -2955,7 +3015,7 @@ retry_lookup:
14525 +@@ -2952,7 +3012,7 @@ retry_lookup:
14526 */
14527 }
14528 mutex_lock(&dir->d_inode->i_mutex);
14529 @@ -65214,7 +63958,7 @@ index bb02687..79cba2c 100644
14530 mutex_unlock(&dir->d_inode->i_mutex);
14531
14532 if (error <= 0) {
14533 -@@ -2979,11 +3039,28 @@ retry_lookup:
14534 +@@ -2976,11 +3036,28 @@ retry_lookup:
14535 goto finish_open_created;
14536 }
14537
14538 @@ -65244,7 +63988,7 @@ index bb02687..79cba2c 100644
14539
14540 /*
14541 * If atomic_open() acquired write access it is dropped now due to
14542 -@@ -3024,6 +3101,11 @@ finish_lookup:
14543 +@@ -3021,6 +3098,11 @@ finish_lookup:
14544 }
14545 }
14546 BUG_ON(inode != path->dentry->d_inode);
14547 @@ -65256,15 +64000,7 @@ index bb02687..79cba2c 100644
14548 return 1;
14549 }
14550
14551 -@@ -3033,7 +3115,6 @@ finish_lookup:
14552 - save_parent.dentry = nd->path.dentry;
14553 - save_parent.mnt = mntget(path->mnt);
14554 - nd->path.dentry = path->dentry;
14555 --
14556 - }
14557 - nd->inode = inode;
14558 - /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */
14559 -@@ -3043,7 +3124,18 @@ finish_open:
14560 +@@ -3040,7 +3122,18 @@ finish_open:
14561 path_put(&save_parent);
14562 return error;
14563 }
14564 @@ -65283,7 +64019,7 @@ index bb02687..79cba2c 100644
14565 error = -EISDIR;
14566 if ((open_flag & O_CREAT) && d_is_dir(nd->path.dentry))
14567 goto out;
14568 -@@ -3207,7 +3299,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
14569 +@@ -3207,7 +3300,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
14570 if (unlikely(error))
14571 goto out;
14572
14573 @@ -65292,7 +64028,7 @@ index bb02687..79cba2c 100644
14574 while (unlikely(error > 0)) { /* trailing symlink */
14575 struct path link = path;
14576 void *cookie;
14577 -@@ -3225,7 +3317,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
14578 +@@ -3225,7 +3318,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
14579 error = follow_link(&link, nd, &cookie);
14580 if (unlikely(error))
14581 break;
14582 @@ -65301,7 +64037,7 @@ index bb02687..79cba2c 100644
14583 put_link(nd, &link, cookie);
14584 }
14585 out:
14586 -@@ -3325,9 +3417,11 @@ struct dentry *kern_path_create(int dfd, const char *pathname,
14587 +@@ -3325,9 +3418,11 @@ struct dentry *kern_path_create(int dfd, const char *pathname,
14588 goto unlock;
14589
14590 error = -EEXIST;
14591 @@ -65315,7 +64051,7 @@ index bb02687..79cba2c 100644
14592 /*
14593 * Special case - lookup gave negative, but... we had foo/bar/
14594 * From the vfs_mknod() POV we just have a negative dentry -
14595 -@@ -3379,6 +3473,20 @@ struct dentry *user_path_create(int dfd, const char __user *pathname,
14596 +@@ -3379,6 +3474,20 @@ struct dentry *user_path_create(int dfd, const char __user *pathname,
14597 }
14598 EXPORT_SYMBOL(user_path_create);
14599
14600 @@ -65336,7 +64072,7 @@ index bb02687..79cba2c 100644
14601 int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
14602 {
14603 int error = may_create(dir, dentry);
14604 -@@ -3442,6 +3550,17 @@ retry:
14605 +@@ -3442,6 +3551,17 @@ retry:
14606
14607 if (!IS_POSIXACL(path.dentry->d_inode))
14608 mode &= ~current_umask();
14609 @@ -65354,7 +64090,7 @@ index bb02687..79cba2c 100644
14610 error = security_path_mknod(&path, dentry, mode, dev);
14611 if (error)
14612 goto out;
14613 -@@ -3457,6 +3576,8 @@ retry:
14614 +@@ -3457,6 +3577,8 @@ retry:
14615 error = vfs_mknod(path.dentry->d_inode,dentry,mode,0);
14616 break;
14617 }
14618 @@ -65363,7 +64099,7 @@ index bb02687..79cba2c 100644
14619 out:
14620 done_path_create(&path, dentry);
14621 if (retry_estale(error, lookup_flags)) {
14622 -@@ -3511,9 +3632,16 @@ retry:
14623 +@@ -3511,9 +3633,16 @@ retry:
14624
14625 if (!IS_POSIXACL(path.dentry->d_inode))
14626 mode &= ~current_umask();
14627 @@ -65380,7 +64116,7 @@ index bb02687..79cba2c 100644
14628 done_path_create(&path, dentry);
14629 if (retry_estale(error, lookup_flags)) {
14630 lookup_flags |= LOOKUP_REVAL;
14631 -@@ -3596,6 +3724,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
14632 +@@ -3597,6 +3726,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
14633 struct filename *name;
14634 struct dentry *dentry;
14635 struct nameidata nd;
14636 @@ -65389,7 +64125,7 @@ index bb02687..79cba2c 100644
14637 unsigned int lookup_flags = 0;
14638 retry:
14639 name = user_path_parent(dfd, pathname, &nd, lookup_flags);
14640 -@@ -3628,10 +3758,21 @@ retry:
14641 +@@ -3629,10 +3760,21 @@ retry:
14642 error = -ENOENT;
14643 goto exit3;
14644 }
14645 @@ -65411,7 +64147,7 @@ index bb02687..79cba2c 100644
14646 exit3:
14647 dput(dentry);
14648 exit2:
14649 -@@ -3722,6 +3863,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
14650 +@@ -3725,6 +3867,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
14651 struct nameidata nd;
14652 struct inode *inode = NULL;
14653 struct inode *delegated_inode = NULL;
14654 @@ -65420,7 +64156,7 @@ index bb02687..79cba2c 100644
14655 unsigned int lookup_flags = 0;
14656 retry:
14657 name = user_path_parent(dfd, pathname, &nd, lookup_flags);
14658 -@@ -3748,10 +3891,22 @@ retry_deleg:
14659 +@@ -3751,10 +3895,22 @@ retry_deleg:
14660 if (d_is_negative(dentry))
14661 goto slashes;
14662 ihold(inode);
14663 @@ -65443,7 +64179,7 @@ index bb02687..79cba2c 100644
14664 exit2:
14665 dput(dentry);
14666 }
14667 -@@ -3840,9 +3995,17 @@ retry:
14668 +@@ -3843,9 +3999,17 @@ retry:
14669 if (IS_ERR(dentry))
14670 goto out_putname;
14671
14672 @@ -65461,7 +64197,7 @@ index bb02687..79cba2c 100644
14673 done_path_create(&path, dentry);
14674 if (retry_estale(error, lookup_flags)) {
14675 lookup_flags |= LOOKUP_REVAL;
14676 -@@ -3946,6 +4109,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
14677 +@@ -3949,6 +4113,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
14678 struct dentry *new_dentry;
14679 struct path old_path, new_path;
14680 struct inode *delegated_inode = NULL;
14681 @@ -65469,7 +64205,7 @@ index bb02687..79cba2c 100644
14682 int how = 0;
14683 int error;
14684
14685 -@@ -3969,7 +4133,7 @@ retry:
14686 +@@ -3972,7 +4137,7 @@ retry:
14687 if (error)
14688 return error;
14689
14690 @@ -65478,7 +64214,7 @@ index bb02687..79cba2c 100644
14691 (how & LOOKUP_REVAL));
14692 error = PTR_ERR(new_dentry);
14693 if (IS_ERR(new_dentry))
14694 -@@ -3981,11 +4145,28 @@ retry:
14695 +@@ -3984,11 +4149,28 @@ retry:
14696 error = may_linkat(&old_path);
14697 if (unlikely(error))
14698 goto out_dput;
14699 @@ -65507,7 +64243,7 @@ index bb02687..79cba2c 100644
14700 done_path_create(&new_path, new_dentry);
14701 if (delegated_inode) {
14702 error = break_deleg_wait(&delegated_inode);
14703 -@@ -4296,6 +4477,12 @@ retry_deleg:
14704 +@@ -4304,6 +4486,12 @@ retry_deleg:
14705 if (new_dentry == trap)
14706 goto exit5;
14707
14708 @@ -65520,7 +64256,7 @@ index bb02687..79cba2c 100644
14709 error = security_path_rename(&oldnd.path, old_dentry,
14710 &newnd.path, new_dentry, flags);
14711 if (error)
14712 -@@ -4303,6 +4490,9 @@ retry_deleg:
14713 +@@ -4311,6 +4499,9 @@ retry_deleg:
14714 error = vfs_rename(old_dir->d_inode, old_dentry,
14715 new_dir->d_inode, new_dentry,
14716 &delegated_inode, flags);
14717 @@ -65530,7 +64266,7 @@ index bb02687..79cba2c 100644
14718 exit5:
14719 dput(new_dentry);
14720 exit4:
14721 -@@ -4345,14 +4535,24 @@ SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newna
14722 +@@ -4367,14 +4558,24 @@ EXPORT_SYMBOL(vfs_whiteout);
14723
14724 int readlink_copy(char __user *buffer, int buflen, const char *link)
14725 {
14726 @@ -65557,10 +64293,10 @@ index bb02687..79cba2c 100644
14727 out:
14728 return len;
14729 diff --git a/fs/namespace.c b/fs/namespace.c
14730 -index 550dbff..6c24d43 100644
14731 +index 5b66b2b..4d8290d 100644
14732 --- a/fs/namespace.c
14733 +++ b/fs/namespace.c
14734 -@@ -1286,6 +1286,8 @@ void umount_tree(struct mount *mnt, int how)
14735 +@@ -1369,6 +1369,8 @@ void umount_tree(struct mount *mnt, int how)
14736 }
14737 if (last) {
14738 last->mnt_hash.next = unmounted.first;
14739 @@ -65569,7 +64305,7 @@ index 550dbff..6c24d43 100644
14740 unmounted.first = tmp_list.first;
14741 unmounted.first->pprev = &unmounted.first;
14742 }
14743 -@@ -1362,6 +1364,9 @@ static int do_umount(struct mount *mnt, int flags)
14744 +@@ -1445,6 +1447,9 @@ static int do_umount(struct mount *mnt, int flags)
14745 if (!(sb->s_flags & MS_RDONLY))
14746 retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
14747 up_write(&sb->s_umount);
14748 @@ -65579,7 +64315,7 @@ index 550dbff..6c24d43 100644
14749 return retval;
14750 }
14751
14752 -@@ -1384,6 +1389,9 @@ static int do_umount(struct mount *mnt, int flags)
14753 +@@ -1467,6 +1472,9 @@ static int do_umount(struct mount *mnt, int flags)
14754 }
14755 unlock_mount_hash();
14756 namespace_unlock();
14757 @@ -65589,7 +64325,7 @@ index 550dbff..6c24d43 100644
14758 return retval;
14759 }
14760
14761 -@@ -1403,7 +1411,7 @@ static inline bool may_mount(void)
14762 +@@ -1517,7 +1525,7 @@ static inline bool may_mount(void)
14763 * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
14764 */
14765
14766 @@ -65598,7 +64334,7 @@ index 550dbff..6c24d43 100644
14767 {
14768 struct path path;
14769 struct mount *mnt;
14770 -@@ -1445,7 +1453,7 @@ out:
14771 +@@ -1559,7 +1567,7 @@ out:
14772 /*
14773 * The 2.0 compatible umount. No flags.
14774 */
14775 @@ -65607,7 +64343,7 @@ index 550dbff..6c24d43 100644
14776 {
14777 return sys_umount(name, 0);
14778 }
14779 -@@ -2494,6 +2502,16 @@ long do_mount(const char *dev_name, const char *dir_name,
14780 +@@ -2621,6 +2629,16 @@ long do_mount(const char *dev_name, const char __user *dir_name,
14781 MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
14782 MS_STRICTATIME);
14783
14784 @@ -65624,17 +64360,18 @@ index 550dbff..6c24d43 100644
14785 if (flags & MS_REMOUNT)
14786 retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
14787 data_page);
14788 -@@ -2508,6 +2526,9 @@ long do_mount(const char *dev_name, const char *dir_name,
14789 +@@ -2634,7 +2652,10 @@ long do_mount(const char *dev_name, const char __user *dir_name,
14790 + retval = do_new_mount(&path, type_page, flags, mnt_flags,
14791 dev_name, data_page);
14792 dput_out:
14793 - path_put(&path);
14794 ++ gr_log_mount(dev_name, &path, retval);
14795 +
14796 -+ gr_log_mount(dev_name, dir_name, retval);
14797 + path_put(&path);
14798 +
14799 return retval;
14800 }
14801
14802 -@@ -2525,7 +2546,7 @@ static void free_mnt_ns(struct mnt_namespace *ns)
14803 +@@ -2652,7 +2673,7 @@ static void free_mnt_ns(struct mnt_namespace *ns)
14804 * number incrementing at 10Ghz will take 12,427 years to wrap which
14805 * is effectively never, so we can ignore the possibility.
14806 */
14807 @@ -65643,7 +64380,7 @@ index 550dbff..6c24d43 100644
14808
14809 static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
14810 {
14811 -@@ -2540,7 +2561,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
14812 +@@ -2667,7 +2688,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
14813 kfree(new_ns);
14814 return ERR_PTR(ret);
14815 }
14816 @@ -65652,7 +64389,7 @@ index 550dbff..6c24d43 100644
14817 atomic_set(&new_ns->count, 1);
14818 new_ns->root = NULL;
14819 INIT_LIST_HEAD(&new_ns->list);
14820 -@@ -2550,7 +2571,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
14821 +@@ -2677,7 +2698,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
14822 return new_ns;
14823 }
14824
14825 @@ -65661,7 +64398,7 @@ index 550dbff..6c24d43 100644
14826 struct user_namespace *user_ns, struct fs_struct *new_fs)
14827 {
14828 struct mnt_namespace *new_ns;
14829 -@@ -2671,8 +2692,8 @@ struct dentry *mount_subtree(struct vfsmount *mnt, const char *name)
14830 +@@ -2798,8 +2819,8 @@ struct dentry *mount_subtree(struct vfsmount *mnt, const char *name)
14831 }
14832 EXPORT_SYMBOL(mount_subtree);
14833
14834 @@ -65672,7 +64409,7 @@ index 550dbff..6c24d43 100644
14835 {
14836 int ret;
14837 char *kernel_type;
14838 -@@ -2785,6 +2806,11 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
14839 +@@ -2905,6 +2926,11 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
14840 if (error)
14841 goto out2;
14842
14843 @@ -65684,7 +64421,7 @@ index 550dbff..6c24d43 100644
14844 get_fs_root(current->fs, &root);
14845 old_mp = lock_mount(&old);
14846 error = PTR_ERR(old_mp);
14847 -@@ -3056,7 +3082,7 @@ static int mntns_install(struct nsproxy *nsproxy, void *ns)
14848 +@@ -3176,7 +3202,7 @@ static int mntns_install(struct nsproxy *nsproxy, void *ns)
14849 !ns_capable(current_user_ns(), CAP_SYS_ADMIN))
14850 return -EPERM;
14851
14852 @@ -65707,10 +64444,10 @@ index f4ccfe6..a5cf064 100644
14853 static struct callback_op callback_ops[];
14854
14855 diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
14856 -index 0689aa5..299386e 100644
14857 +index 00689a8..b162632 100644
14858 --- a/fs/nfs/inode.c
14859 +++ b/fs/nfs/inode.c
14860 -@@ -1228,16 +1228,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt
14861 +@@ -1232,16 +1232,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt
14862 return nfs_size_to_loff_t(fattr->size) > i_size_read(inode);
14863 }
14864
14865 @@ -65731,10 +64468,10 @@ index 0689aa5..299386e 100644
14866
14867 void nfs_fattr_init(struct nfs_fattr *fattr)
14868 diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
14869 -index 1d3cb47..2b8ed89 100644
14870 +index 0beb023..3f685ec 100644
14871 --- a/fs/nfsd/nfs4proc.c
14872 +++ b/fs/nfsd/nfs4proc.c
14873 -@@ -1155,7 +1155,7 @@ struct nfsd4_operation {
14874 +@@ -1198,7 +1198,7 @@ struct nfsd4_operation {
14875 nfsd4op_rsize op_rsize_bop;
14876 stateid_getter op_get_currentstateid;
14877 stateid_setter op_set_currentstateid;
14878 @@ -65744,10 +64481,10 @@ index 1d3cb47..2b8ed89 100644
14879 static struct nfsd4_operation nfsd4_ops[];
14880
14881 diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
14882 -index 353aac8..32035ee 100644
14883 +index eeea7a9..f3ba422 100644
14884 --- a/fs/nfsd/nfs4xdr.c
14885 +++ b/fs/nfsd/nfs4xdr.c
14886 -@@ -1534,7 +1534,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p)
14887 +@@ -1543,7 +1543,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p)
14888
14889 typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, void *);
14890
14891 @@ -65757,19 +64494,21 @@ index 353aac8..32035ee 100644
14892 [OP_CLOSE] = (nfsd4_dec)nfsd4_decode_close,
14893 [OP_COMMIT] = (nfsd4_dec)nfsd4_decode_commit,
14894 diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c
14895 -index ff95676..96cf3f62 100644
14896 +index 122f691..a00e2e0 100644
14897 --- a/fs/nfsd/nfscache.c
14898 +++ b/fs/nfsd/nfscache.c
14899 -@@ -527,17 +527,20 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp)
14900 - {
14901 - struct svc_cacherep *rp = rqstp->rq_cacherep;
14902 +@@ -537,7 +537,7 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp)
14903 struct kvec *resv = &rqstp->rq_res.head[0], *cachv;
14904 + u32 hash;
14905 + struct nfsd_drc_bucket *b;
14906 - int len;
14907 + long len;
14908 size_t bufsize = 0;
14909
14910 if (!rp)
14911 - return;
14912 +@@ -546,11 +546,14 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp)
14913 + hash = nfsd_cache_hash(rp->c_xid);
14914 + b = &drc_hashtbl[hash];
14915
14916 - len = resv->iov_len - ((char*)statp - (char*)resv->iov_base);
14917 - len >>= 2;
14918 @@ -65782,10 +64521,10 @@ index ff95676..96cf3f62 100644
14919 /* Don't cache excessive amounts of data and XDR failures */
14920 - if (!statp || len > (256 >> 2)) {
14921 + if (!statp || len > (256 >> 2) || len < 0) {
14922 - nfsd_reply_cache_free(rp);
14923 + nfsd_reply_cache_free(b, rp);
14924 return;
14925 }
14926 -@@ -545,7 +548,7 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp)
14927 +@@ -558,7 +561,7 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp)
14928 switch (cachetype) {
14929 case RC_REPLSTAT:
14930 if (len != 1)
14931 @@ -65795,10 +64534,10 @@ index ff95676..96cf3f62 100644
14932 break;
14933 case RC_REPLBUFF:
14934 diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
14935 -index 6ab077b..5ac7f0b 100644
14936 +index 989129e..42e019e 100644
14937 --- a/fs/nfsd/vfs.c
14938 +++ b/fs/nfsd/vfs.c
14939 -@@ -855,7 +855,7 @@ __be32 nfsd_readv(struct file *file, loff_t offset, struct kvec *vec, int vlen,
14940 +@@ -872,7 +872,7 @@ __be32 nfsd_readv(struct file *file, loff_t offset, struct kvec *vec, int vlen,
14941
14942 oldfs = get_fs();
14943 set_fs(KERNEL_DS);
14944 @@ -65807,7 +64546,7 @@ index 6ab077b..5ac7f0b 100644
14945 set_fs(oldfs);
14946 return nfsd_finish_read(file, count, host_err);
14947 }
14948 -@@ -943,7 +943,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
14949 +@@ -960,7 +960,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
14950
14951 /* Write the data. */
14952 oldfs = get_fs(); set_fs(KERNEL_DS);
14953 @@ -65816,7 +64555,7 @@ index 6ab077b..5ac7f0b 100644
14954 set_fs(oldfs);
14955 if (host_err < 0)
14956 goto out_nfserr;
14957 -@@ -1485,7 +1485,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
14958 +@@ -1502,7 +1502,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
14959 */
14960
14961 oldfs = get_fs(); set_fs(KERNEL_DS);
14962 @@ -65945,23 +64684,6 @@ index c991616..5ae51af 100644
14963 goto out_close_fd;
14964
14965 #ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
14966 -diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
14967 -index 0f88bc0..7d888d7 100644
14968 ---- a/fs/notify/inotify/inotify_fsnotify.c
14969 -+++ b/fs/notify/inotify/inotify_fsnotify.c
14970 -@@ -165,8 +165,10 @@ static void inotify_free_group_priv(struct fsnotify_group *group)
14971 - /* ideally the idr is empty and we won't hit the BUG in the callback */
14972 - idr_for_each(&group->inotify_data.idr, idr_callback, group);
14973 - idr_destroy(&group->inotify_data.idr);
14974 -- atomic_dec(&group->inotify_data.user->inotify_devs);
14975 -- free_uid(group->inotify_data.user);
14976 -+ if (group->inotify_data.user) {
14977 -+ atomic_dec(&group->inotify_data.user->inotify_devs);
14978 -+ free_uid(group->inotify_data.user);
14979 -+ }
14980 - }
14981 -
14982 - static void inotify_free_event(struct fsnotify_event *fsn_event)
14983 diff --git a/fs/notify/notification.c b/fs/notify/notification.c
14984 index a95d8e0..a91a5fd 100644
14985 --- a/fs/notify/notification.c
14986 @@ -65998,10 +64720,10 @@ index 9e38daf..5727cae 100644
14987 "inode 0x%lx or driver bug.", vdir->i_ino);
14988 goto err_out;
14989 diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
14990 -index f5ec1ce..807fd78 100644
14991 +index 643faa4..ef9027e 100644
14992 --- a/fs/ntfs/file.c
14993 +++ b/fs/ntfs/file.c
14994 -@@ -1279,7 +1279,7 @@ static inline size_t ntfs_copy_from_user(struct page **pages,
14995 +@@ -1280,7 +1280,7 @@ static inline size_t ntfs_copy_from_user(struct page **pages,
14996 char *addr;
14997 size_t total = 0;
14998 unsigned len;
14999 @@ -66011,7 +64733,7 @@ index f5ec1ce..807fd78 100644
15000 do {
15001 len = PAGE_CACHE_SIZE - ofs;
15002 diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
15003 -index 6c3296e..c0b99f0 100644
15004 +index 9e1e112..241a52a 100644
15005 --- a/fs/ntfs/super.c
15006 +++ b/fs/ntfs/super.c
15007 @@ -688,7 +688,7 @@ static struct buffer_head *read_ntfs_boot_sector(struct super_block *sb,
15008 @@ -66054,19 +64776,6 @@ index 0440134..d52c93a 100644
15009
15010 bail:
15011 if (handle)
15012 -diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
15013 -index 8add6f1..b931e04 100644
15014 ---- a/fs/ocfs2/namei.c
15015 -+++ b/fs/ocfs2/namei.c
15016 -@@ -158,7 +158,7 @@ bail_add:
15017 - * NOTE: This dentry already has ->d_op set from
15018 - * ocfs2_get_parent() and ocfs2_get_dentry()
15019 - */
15020 -- if (ret)
15021 -+ if (!IS_ERR_OR_NULL(ret))
15022 - dentry = ret;
15023 -
15024 - status = ocfs2_dentry_attach_lock(dentry, inode,
15025 diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
15026 index bbec539..7b266d5 100644
15027 --- a/fs/ocfs2/ocfs2.h
15028 @@ -66147,7 +64856,7 @@ index 0cb889a..6a26b24 100644
15029 }
15030 }
15031 diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
15032 -index 4142546..69375a9 100644
15033 +index 93c85bc..02f68a4 100644
15034 --- a/fs/ocfs2/super.c
15035 +++ b/fs/ocfs2/super.c
15036 @@ -300,11 +300,11 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
15037 @@ -66167,7 +64876,7 @@ index 4142546..69375a9 100644
15038
15039 out += snprintf(buf + out, len - out,
15040 "%10s => State: %u Descriptor: %llu Size: %u bits "
15041 -@@ -2100,11 +2100,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
15042 +@@ -2104,11 +2104,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
15043
15044 mutex_init(&osb->system_file_mutex);
15045
15046 @@ -66185,7 +64894,7 @@ index 4142546..69375a9 100644
15047 /* Copy the blockcheck stats from the superblock probe */
15048 osb->osb_ecc_stats = *stats;
15049 diff --git a/fs/open.c b/fs/open.c
15050 -index d6fd3ac..6ccf474 100644
15051 +index de92c13..52d2a6c 100644
15052 --- a/fs/open.c
15053 +++ b/fs/open.c
15054 @@ -32,6 +32,8 @@
15055 @@ -66289,7 +64998,7 @@ index d6fd3ac..6ccf474 100644
15056 newattrs.ia_valid = ATTR_CTIME;
15057 if (user != (uid_t) -1) {
15058 if (!uid_valid(uid))
15059 -@@ -983,6 +1020,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
15060 +@@ -1002,6 +1039,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
15061 } else {
15062 fsnotify_open(f);
15063 fd_install(fd, f);
15064 @@ -66784,7 +65493,7 @@ index cd3653e..9b9b79a 100644
15065 static struct pid *
15066 get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos)
15067 diff --git a/fs/proc/base.c b/fs/proc/base.c
15068 -index baf852b..03fe930 100644
15069 +index 772efa4..e7f1a5c 100644
15070 --- a/fs/proc/base.c
15071 +++ b/fs/proc/base.c
15072 @@ -113,6 +113,14 @@ struct pid_entry {
15073 @@ -66849,7 +65558,7 @@ index baf852b..03fe930 100644
15074
15075 #define MAX_STACK_TRACE_DEPTH 64
15076
15077 -@@ -487,7 +511,7 @@ static int proc_pid_limits(struct seq_file *m, struct pid_namespace *ns,
15078 +@@ -456,7 +480,7 @@ static int proc_pid_limits(struct seq_file *m, struct pid_namespace *ns,
15079 return 0;
15080 }
15081
15082 @@ -66858,7 +65567,7 @@ index baf852b..03fe930 100644
15083 static int proc_pid_syscall(struct seq_file *m, struct pid_namespace *ns,
15084 struct pid *pid, struct task_struct *task)
15085 {
15086 -@@ -517,7 +541,7 @@ static int proc_pid_syscall(struct seq_file *m, struct pid_namespace *ns,
15087 +@@ -486,7 +510,7 @@ static int proc_pid_syscall(struct seq_file *m, struct pid_namespace *ns,
15088 /************************************************************************/
15089
15090 /* permission checks */
15091 @@ -66867,7 +65576,7 @@ index baf852b..03fe930 100644
15092 {
15093 struct task_struct *task;
15094 int allowed = 0;
15095 -@@ -527,7 +551,10 @@ static int proc_fd_access_allowed(struct inode *inode)
15096 +@@ -496,7 +520,10 @@ static int proc_fd_access_allowed(struct inode *inode)
15097 */
15098 task = get_proc_task(inode);
15099 if (task) {
15100 @@ -66879,7 +65588,7 @@ index baf852b..03fe930 100644
15101 put_task_struct(task);
15102 }
15103 return allowed;
15104 -@@ -558,10 +585,35 @@ static bool has_pid_permissions(struct pid_namespace *pid,
15105 +@@ -527,10 +554,35 @@ static bool has_pid_permissions(struct pid_namespace *pid,
15106 struct task_struct *task,
15107 int hide_pid_min)
15108 {
15109 @@ -66915,7 +65624,7 @@ index baf852b..03fe930 100644
15110 return ptrace_may_access(task, PTRACE_MODE_READ);
15111 }
15112
15113 -@@ -579,7 +631,11 @@ static int proc_pid_permission(struct inode *inode, int mask)
15114 +@@ -548,7 +600,11 @@ static int proc_pid_permission(struct inode *inode, int mask)
15115 put_task_struct(task);
15116
15117 if (!has_perms) {
15118 @@ -66927,22 +65636,20 @@ index baf852b..03fe930 100644
15119 /*
15120 * Let's make getdents(), stat(), and open()
15121 * consistent with each other. If a process
15122 -@@ -640,6 +696,11 @@ static int __mem_open(struct inode *inode, struct file *file, unsigned int mode)
15123 - if (!task)
15124 - return -ESRCH;
15125 +@@ -609,6 +665,8 @@ struct mm_struct *proc_mem_open(struct inode *inode, unsigned int mode)
15126
15127 -+ if (gr_acl_handle_procpidmem(task)) {
15128 -+ put_task_struct(task);
15129 -+ return -EPERM;
15130 -+ }
15131 -+
15132 - mm = mm_access(task, mode);
15133 - put_task_struct(task);
15134 + if (task) {
15135 + mm = mm_access(task, mode);
15136 ++ if (gr_acl_handle_procpidmem(task))
15137 ++ mm = ERR_PTR(-EPERM);
15138 + put_task_struct(task);
15139
15140 -@@ -655,6 +716,10 @@ static int __mem_open(struct inode *inode, struct file *file, unsigned int mode)
15141 + if (!IS_ERR_OR_NULL(mm)) {
15142 +@@ -630,6 +688,11 @@ static int __mem_open(struct inode *inode, struct file *file, unsigned int mode)
15143 + return PTR_ERR(mm);
15144
15145 file->private_data = mm;
15146 -
15147 ++
15148 +#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
15149 + file->f_version = current->exec_id;
15150 +#endif
15151 @@ -66950,7 +65657,7 @@ index baf852b..03fe930 100644
15152 return 0;
15153 }
15154
15155 -@@ -676,6 +741,17 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
15156 +@@ -651,6 +714,17 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
15157 ssize_t copied;
15158 char *page;
15159
15160 @@ -66968,7 +65675,7 @@ index baf852b..03fe930 100644
15161 if (!mm)
15162 return 0;
15163
15164 -@@ -688,7 +764,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
15165 +@@ -663,7 +737,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
15166 goto free;
15167
15168 while (count > 0) {
15169 @@ -66977,7 +65684,7 @@ index baf852b..03fe930 100644
15170
15171 if (write && copy_from_user(page, buf, this_len)) {
15172 copied = -EFAULT;
15173 -@@ -780,6 +856,13 @@ static ssize_t environ_read(struct file *file, char __user *buf,
15174 +@@ -755,6 +829,13 @@ static ssize_t environ_read(struct file *file, char __user *buf,
15175 if (!mm)
15176 return 0;
15177
15178 @@ -66991,7 +65698,7 @@ index baf852b..03fe930 100644
15179 page = (char *)__get_free_page(GFP_TEMPORARY);
15180 if (!page)
15181 return -ENOMEM;
15182 -@@ -789,7 +872,7 @@ static ssize_t environ_read(struct file *file, char __user *buf,
15183 +@@ -764,7 +845,7 @@ static ssize_t environ_read(struct file *file, char __user *buf,
15184 goto free;
15185 while (count > 0) {
15186 size_t this_len, max_len;
15187 @@ -67000,7 +65707,7 @@ index baf852b..03fe930 100644
15188
15189 if (src >= (mm->env_end - mm->env_start))
15190 break;
15191 -@@ -1403,7 +1486,7 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
15192 +@@ -1378,7 +1459,7 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
15193 int error = -EACCES;
15194
15195 /* Are we allowed to snoop on the tasks file descriptors? */
15196 @@ -67009,7 +65716,7 @@ index baf852b..03fe930 100644
15197 goto out;
15198
15199 error = PROC_I(inode)->op.proc_get_link(dentry, &path);
15200 -@@ -1447,8 +1530,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
15201 +@@ -1422,8 +1503,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
15202 struct path path;
15203
15204 /* Are we allowed to snoop on the tasks file descriptors? */
15205 @@ -67030,7 +65737,7 @@ index baf852b..03fe930 100644
15206
15207 error = PROC_I(inode)->op.proc_get_link(dentry, &path);
15208 if (error)
15209 -@@ -1498,7 +1591,11 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
15210 +@@ -1473,7 +1564,11 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
15211 rcu_read_lock();
15212 cred = __task_cred(task);
15213 inode->i_uid = cred->euid;
15214 @@ -67042,7 +65749,7 @@ index baf852b..03fe930 100644
15215 rcu_read_unlock();
15216 }
15217 security_task_to_inode(task, inode);
15218 -@@ -1534,10 +1631,19 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
15219 +@@ -1509,10 +1604,19 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
15220 return -ENOENT;
15221 }
15222 if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
15223 @@ -67062,7 +65769,7 @@ index baf852b..03fe930 100644
15224 }
15225 }
15226 rcu_read_unlock();
15227 -@@ -1575,11 +1681,20 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
15228 +@@ -1550,11 +1654,20 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
15229
15230 if (task) {
15231 if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
15232 @@ -67083,7 +65790,7 @@ index baf852b..03fe930 100644
15233 rcu_read_unlock();
15234 } else {
15235 inode->i_uid = GLOBAL_ROOT_UID;
15236 -@@ -2114,6 +2229,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
15237 +@@ -2085,6 +2198,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
15238 if (!task)
15239 goto out_no_task;
15240
15241 @@ -67093,7 +65800,7 @@ index baf852b..03fe930 100644
15242 /*
15243 * Yes, it does not scale. And it should not. Don't add
15244 * new entries into /proc/<tgid>/ without very good reasons.
15245 -@@ -2144,6 +2262,9 @@ static int proc_pident_readdir(struct file *file, struct dir_context *ctx,
15246 +@@ -2115,6 +2231,9 @@ static int proc_pident_readdir(struct file *file, struct dir_context *ctx,
15247 if (!task)
15248 return -ENOENT;
15249
15250 @@ -67103,7 +65810,7 @@ index baf852b..03fe930 100644
15251 if (!dir_emit_dots(file, ctx))
15252 goto out;
15253
15254 -@@ -2535,7 +2656,7 @@ static const struct pid_entry tgid_base_stuff[] = {
15255 +@@ -2506,7 +2625,7 @@ static const struct pid_entry tgid_base_stuff[] = {
15256 REG("autogroup", S_IRUGO|S_IWUSR, proc_pid_sched_autogroup_operations),
15257 #endif
15258 REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
15259 @@ -67112,7 +65819,7 @@ index baf852b..03fe930 100644
15260 ONE("syscall", S_IRUSR, proc_pid_syscall),
15261 #endif
15262 ONE("cmdline", S_IRUGO, proc_pid_cmdline),
15263 -@@ -2560,10 +2681,10 @@ static const struct pid_entry tgid_base_stuff[] = {
15264 +@@ -2531,10 +2650,10 @@ static const struct pid_entry tgid_base_stuff[] = {
15265 #ifdef CONFIG_SECURITY
15266 DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
15267 #endif
15268 @@ -67125,7 +65832,7 @@ index baf852b..03fe930 100644
15269 ONE("stack", S_IRUSR, proc_pid_stack),
15270 #endif
15271 #ifdef CONFIG_SCHEDSTATS
15272 -@@ -2597,6 +2718,9 @@ static const struct pid_entry tgid_base_stuff[] = {
15273 +@@ -2568,6 +2687,9 @@ static const struct pid_entry tgid_base_stuff[] = {
15274 #ifdef CONFIG_HARDWALL
15275 ONE("hardwall", S_IRUGO, proc_pid_hardwall),
15276 #endif
15277 @@ -67135,7 +65842,7 @@ index baf852b..03fe930 100644
15278 #ifdef CONFIG_USER_NS
15279 REG("uid_map", S_IRUGO|S_IWUSR, proc_uid_map_operations),
15280 REG("gid_map", S_IRUGO|S_IWUSR, proc_gid_map_operations),
15281 -@@ -2727,7 +2851,14 @@ static int proc_pid_instantiate(struct inode *dir,
15282 +@@ -2696,7 +2818,14 @@ static int proc_pid_instantiate(struct inode *dir,
15283 if (!inode)
15284 goto out;
15285
15286 @@ -67150,7 +65857,7 @@ index baf852b..03fe930 100644
15287 inode->i_op = &proc_tgid_base_inode_operations;
15288 inode->i_fop = &proc_tgid_base_operations;
15289 inode->i_flags|=S_IMMUTABLE;
15290 -@@ -2765,7 +2896,11 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsign
15291 +@@ -2734,7 +2863,11 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsign
15292 if (!task)
15293 goto out;
15294
15295 @@ -67162,7 +65869,7 @@ index baf852b..03fe930 100644
15296 put_task_struct(task);
15297 out:
15298 return ERR_PTR(result);
15299 -@@ -2879,7 +3014,7 @@ static const struct pid_entry tid_base_stuff[] = {
15300 +@@ -2848,7 +2981,7 @@ static const struct pid_entry tid_base_stuff[] = {
15301 REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
15302 #endif
15303 REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
15304 @@ -67171,7 +65878,7 @@ index baf852b..03fe930 100644
15305 ONE("syscall", S_IRUSR, proc_pid_syscall),
15306 #endif
15307 ONE("cmdline", S_IRUGO, proc_pid_cmdline),
15308 -@@ -2906,10 +3041,10 @@ static const struct pid_entry tid_base_stuff[] = {
15309 +@@ -2875,10 +3008,10 @@ static const struct pid_entry tid_base_stuff[] = {
15310 #ifdef CONFIG_SECURITY
15311 DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
15312 #endif
15313 @@ -67217,7 +65924,7 @@ index 50493ed..248166b 100644
15314 }
15315 fs_initcall(proc_devices_init);
15316 diff --git a/fs/proc/fd.c b/fs/proc/fd.c
15317 -index 955bb55..71948bd 100644
15318 +index e11d7c5..9128ce06 100644
15319 --- a/fs/proc/fd.c
15320 +++ b/fs/proc/fd.c
15321 @@ -26,7 +26,8 @@ static int seq_show(struct seq_file *m, void *v)
15322 @@ -67230,7 +65937,7 @@ index 955bb55..71948bd 100644
15323 put_task_struct(task);
15324
15325 if (files) {
15326 -@@ -285,11 +286,21 @@ static struct dentry *proc_lookupfd(struct inode *dir, struct dentry *dentry,
15327 +@@ -283,11 +284,21 @@ static struct dentry *proc_lookupfd(struct inode *dir, struct dentry *dentry,
15328 */
15329 int proc_fd_permission(struct inode *inode, int mask)
15330 {
15331 @@ -67432,7 +66139,7 @@ index 333080d..0a35ec4 100644
15332 if (de->size)
15333 inode->i_size = de->size;
15334 diff --git a/fs/proc/internal.h b/fs/proc/internal.h
15335 -index 7da13e4..68d0981 100644
15336 +index aa7a0ee..f2318df 100644
15337 --- a/fs/proc/internal.h
15338 +++ b/fs/proc/internal.h
15339 @@ -46,9 +46,10 @@ struct proc_dir_entry {
15340 @@ -67496,7 +66203,7 @@ index a352d57..cb94a5c 100644
15341 }
15342 fs_initcall(proc_interrupts_init);
15343 diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
15344 -index 6df8d07..3321060 100644
15345 +index 91a4e64..cb007c0 100644
15346 --- a/fs/proc/kcore.c
15347 +++ b/fs/proc/kcore.c
15348 @@ -483,9 +483,10 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
15349 @@ -67985,7 +66692,7 @@ index bf2d03f..f058f9c 100644
15350 seq_printf(p, "softirq %llu", (unsigned long long)sum_softirq);
15351
15352 diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
15353 -index c341568..75852a2 100644
15354 +index 4e0388c..fc6a0e1 100644
15355 --- a/fs/proc/task_mmu.c
15356 +++ b/fs/proc/task_mmu.c
15357 @@ -13,12 +13,19 @@
15358 @@ -68045,7 +66752,7 @@ index c341568..75852a2 100644
15359 }
15360
15361 unsigned long task_vsize(struct mm_struct *mm)
15362 -@@ -271,13 +295,13 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
15363 +@@ -282,13 +306,13 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
15364 pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
15365 }
15366
15367 @@ -68064,7 +66771,7 @@ index c341568..75852a2 100644
15368
15369 seq_setwidth(m, 25 + sizeof(void *) * 6 - 1);
15370 seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ",
15371 -@@ -287,7 +311,11 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
15372 +@@ -298,7 +322,11 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
15373 flags & VM_WRITE ? 'w' : '-',
15374 flags & VM_EXEC ? 'x' : '-',
15375 flags & VM_MAYSHARE ? 's' : 'p',
15376 @@ -68076,7 +66783,7 @@ index c341568..75852a2 100644
15377 MAJOR(dev), MINOR(dev), ino);
15378
15379 /*
15380 -@@ -296,7 +324,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
15381 +@@ -307,7 +335,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
15382 */
15383 if (file) {
15384 seq_pad(m, ' ');
15385 @@ -68085,7 +66792,7 @@ index c341568..75852a2 100644
15386 goto done;
15387 }
15388
15389 -@@ -328,8 +356,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
15390 +@@ -338,8 +366,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
15391 * Thread stack in /proc/PID/task/TID/maps or
15392 * the main process stack.
15393 */
15394 @@ -68097,21 +66804,20 @@ index c341568..75852a2 100644
15395 name = "[stack]";
15396 } else {
15397 /* Thread stack in /proc/PID/maps */
15398 -@@ -353,6 +382,13 @@ static int show_map(struct seq_file *m, void *v, int is_pid)
15399 - struct proc_maps_private *priv = m->private;
15400 - struct task_struct *task = priv->task;
15401 +@@ -359,6 +388,12 @@ done:
15402
15403 + static int show_map(struct seq_file *m, void *v, int is_pid)
15404 + {
15405 +#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
15406 + if (current->exec_id != m->exec_id) {
15407 + gr_log_badprocpid("maps");
15408 + return 0;
15409 + }
15410 +#endif
15411 -+
15412 - show_map_vma(m, vma, is_pid);
15413 -
15414 - if (m->count < m->size) /* vma is copied successfully */
15415 -@@ -593,12 +629,23 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
15416 + show_map_vma(m, v, is_pid);
15417 + m_cache_vma(m, v);
15418 + return 0;
15419 +@@ -594,12 +629,23 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
15420 .private = &mss,
15421 };
15422
15423 @@ -68140,7 +66846,7 @@ index c341568..75852a2 100644
15424 show_map_vma(m, vma, is_pid);
15425
15426 seq_printf(m,
15427 -@@ -616,7 +663,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
15428 +@@ -617,7 +663,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
15429 "KernelPageSize: %8lu kB\n"
15430 "MMUPageSize: %8lu kB\n"
15431 "Locked: %8lu kB\n",
15432 @@ -68152,7 +66858,7 @@ index c341568..75852a2 100644
15433 mss.resident >> 10,
15434 (unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
15435 mss.shared_clean >> 10,
15436 -@@ -1422,6 +1473,13 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
15437 +@@ -1447,6 +1497,13 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
15438 char buffer[64];
15439 int nid;
15440
15441 @@ -68166,9 +66872,9 @@ index c341568..75852a2 100644
15442 if (!mm)
15443 return 0;
15444
15445 -@@ -1439,11 +1497,15 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
15446 - mpol_to_str(buffer, sizeof(buffer), pol);
15447 - mpol_cond_put(pol);
15448 +@@ -1468,11 +1525,15 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
15449 + mpol_to_str(buffer, sizeof(buffer), proc_priv->task_mempolicy);
15450 + }
15451
15452 +#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
15453 + seq_printf(m, "%08lx %s", PAX_RAND_FLAGS(vma->vm_mm) ? 0UL : vma->vm_start, buffer);
15454 @@ -68184,7 +66890,7 @@ index c341568..75852a2 100644
15455 seq_puts(m, " heap");
15456 } else {
15457 diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
15458 -index 678455d..ebd3245 100644
15459 +index 599ec2e..f1413ae 100644
15460 --- a/fs/proc/task_nommu.c
15461 +++ b/fs/proc/task_nommu.c
15462 @@ -51,7 +51,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
15463 @@ -68196,14 +66902,14 @@ index 678455d..ebd3245 100644
15464 sbytes += kobjsize(current->fs);
15465 else
15466 bytes += kobjsize(current->fs);
15467 -@@ -161,7 +161,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
15468 +@@ -180,7 +180,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
15469
15470 if (file) {
15471 seq_pad(m, ' ');
15472 - seq_path(m, &file->f_path, "");
15473 + seq_path(m, &file->f_path, "\n\\");
15474 } else if (mm) {
15475 - pid_t tid = vm_is_stack(priv->task, vma, is_pid);
15476 + pid_t tid = pid_of_stack(priv, vma, is_pid);
15477
15478 diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
15479 index a90d6d35..d08047c 100644
15480 @@ -68298,7 +67004,7 @@ index bb2869f..d34ada8 100644
15481 if (!msg_head) {
15482 printk(KERN_ERR
15483 diff --git a/fs/read_write.c b/fs/read_write.c
15484 -index 009d854..16ce214 100644
15485 +index 7d9318c..51b336f 100644
15486 --- a/fs/read_write.c
15487 +++ b/fs/read_write.c
15488 @@ -495,7 +495,7 @@ ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t
15489 @@ -68464,10 +67170,10 @@ index 621b9f3..af527fd 100644
15490 SF(s_do_balance), SF(s_unneeded_left_neighbor),
15491 SF(s_good_search_by_key_reada), SF(s_bmaps),
15492 diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h
15493 -index 735c2c2..81b91af 100644
15494 +index 1894d96..1dfd1c2 100644
15495 --- a/fs/reiserfs/reiserfs.h
15496 +++ b/fs/reiserfs/reiserfs.h
15497 -@@ -573,7 +573,7 @@ struct reiserfs_sb_info {
15498 +@@ -576,7 +576,7 @@ struct reiserfs_sb_info {
15499 /* Comment? -Hans */
15500 wait_queue_head_t s_wait;
15501 /* increased by one every time the tree gets re-balanced */
15502 @@ -68476,7 +67182,7 @@ index 735c2c2..81b91af 100644
15503
15504 /* File system properties. Currently holds on-disk FS format */
15505 unsigned long s_properties;
15506 -@@ -2294,7 +2294,7 @@ static inline loff_t max_reiserfs_offset(struct inode *inode)
15507 +@@ -2297,7 +2297,7 @@ static inline loff_t max_reiserfs_offset(struct inode *inode)
15508 #define REISERFS_USER_MEM 1 /* user memory mode */
15509
15510 #define fs_generation(s) (REISERFS_SB(s)->s_generation_counter)
15511 @@ -68486,7 +67192,7 @@ index 735c2c2..81b91af 100644
15512 #define __fs_changed(gen,s) (gen != get_generation (s))
15513 #define fs_changed(gen,s) \
15514 diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
15515 -index d46e88a..1a06a94 100644
15516 +index f1376c9..f9378e9 100644
15517 --- a/fs/reiserfs/super.c
15518 +++ b/fs/reiserfs/super.c
15519 @@ -1857,6 +1857,10 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
15520 @@ -68611,7 +67317,7 @@ index 3857b72..0b7281e 100644
15521 {
15522 const struct seq_operations *op = ((struct seq_file *)file->private_data)->op;
15523 diff --git a/fs/splice.c b/fs/splice.c
15524 -index f5cb9ba..8ddb1e9 100644
15525 +index 75c6058..770d40c 100644
15526 --- a/fs/splice.c
15527 +++ b/fs/splice.c
15528 @@ -193,7 +193,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
15529 @@ -68711,7 +67417,7 @@ index f5cb9ba..8ddb1e9 100644
15530
15531 current->splice_pipe = pipe;
15532 }
15533 -@@ -1496,6 +1496,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
15534 +@@ -1497,6 +1497,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
15535
15536 partial[buffers].offset = off;
15537 partial[buffers].len = plen;
15538 @@ -68719,7 +67425,7 @@ index f5cb9ba..8ddb1e9 100644
15539
15540 off = 0;
15541 len -= plen;
15542 -@@ -1732,9 +1733,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
15543 +@@ -1733,9 +1734,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
15544 ret = -ERESTARTSYS;
15545 break;
15546 }
15547 @@ -68731,7 +67437,7 @@ index f5cb9ba..8ddb1e9 100644
15548 if (flags & SPLICE_F_NONBLOCK) {
15549 ret = -EAGAIN;
15550 break;
15551 -@@ -1766,7 +1767,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
15552 +@@ -1767,7 +1768,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
15553 pipe_lock(pipe);
15554
15555 while (pipe->nrbufs >= pipe->buffers) {
15556 @@ -68740,7 +67446,7 @@ index f5cb9ba..8ddb1e9 100644
15557 send_sig(SIGPIPE, current, 0);
15558 ret = -EPIPE;
15559 break;
15560 -@@ -1779,9 +1780,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
15561 +@@ -1780,9 +1781,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
15562 ret = -ERESTARTSYS;
15563 break;
15564 }
15565 @@ -68752,7 +67458,7 @@ index f5cb9ba..8ddb1e9 100644
15566 }
15567
15568 pipe_unlock(pipe);
15569 -@@ -1817,14 +1818,14 @@ retry:
15570 +@@ -1818,14 +1819,14 @@ retry:
15571 pipe_double_lock(ipipe, opipe);
15572
15573 do {
15574 @@ -68769,7 +67475,7 @@ index f5cb9ba..8ddb1e9 100644
15575 break;
15576
15577 /*
15578 -@@ -1921,7 +1922,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
15579 +@@ -1922,7 +1923,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
15580 pipe_double_lock(ipipe, opipe);
15581
15582 do {
15583 @@ -68778,7 +67484,7 @@ index f5cb9ba..8ddb1e9 100644
15584 send_sig(SIGPIPE, current, 0);
15585 if (!ret)
15586 ret = -EPIPE;
15587 -@@ -1966,7 +1967,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
15588 +@@ -1967,7 +1968,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
15589 * return EAGAIN if we have the potential of some data in the
15590 * future, otherwise just return 0
15591 */
15592 @@ -68960,7 +67666,7 @@ index aa138d6..5f3a811 100644
15593 error = notify_change(path->dentry, &newattrs, &delegated_inode);
15594 mutex_unlock(&inode->i_mutex);
15595 diff --git a/fs/xattr.c b/fs/xattr.c
15596 -index c69e6d4..cc56af5 100644
15597 +index 64e83ef..b6be154 100644
15598 --- a/fs/xattr.c
15599 +++ b/fs/xattr.c
15600 @@ -227,6 +227,27 @@ int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
15601 @@ -69014,16 +67720,7 @@ index c69e6d4..cc56af5 100644
15602 out:
15603 if (vvalue)
15604 vfree(vvalue);
15605 -@@ -377,7 +403,7 @@ retry:
15606 - return error;
15607 - error = mnt_want_write(path.mnt);
15608 - if (!error) {
15609 -- error = setxattr(path.dentry, name, value, size, flags);
15610 -+ error = setxattr(&path, name, value, size, flags);
15611 - mnt_drop_write(path.mnt);
15612 - }
15613 - path_put(&path);
15614 -@@ -401,7 +427,7 @@ retry:
15615 +@@ -376,7 +402,7 @@ retry:
15616 return error;
15617 error = mnt_want_write(path.mnt);
15618 if (!error) {
15619 @@ -69032,7 +67729,7 @@ index c69e6d4..cc56af5 100644
15620 mnt_drop_write(path.mnt);
15621 }
15622 path_put(&path);
15623 -@@ -416,16 +442,14 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
15624 +@@ -405,16 +431,14 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
15625 const void __user *,value, size_t, size, int, flags)
15626 {
15627 struct fd f = fdget(fd);
15628 @@ -69051,7 +67748,7 @@ index c69e6d4..cc56af5 100644
15629 mnt_drop_write_file(f.file);
15630 }
15631 fdput(f);
15632 -@@ -626,7 +650,7 @@ SYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size)
15633 +@@ -600,7 +624,7 @@ SYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size)
15634 * Extended attribute REMOVE operations
15635 */
15636 static long
15637 @@ -69060,7 +67757,7 @@ index c69e6d4..cc56af5 100644
15638 {
15639 int error;
15640 char kname[XATTR_NAME_MAX + 1];
15641 -@@ -637,7 +661,10 @@ removexattr(struct dentry *d, const char __user *name)
15642 +@@ -611,7 +635,10 @@ removexattr(struct dentry *d, const char __user *name)
15643 if (error < 0)
15644 return error;
15645
15646 @@ -69071,17 +67768,8 @@ index c69e6d4..cc56af5 100644
15647 + return vfs_removexattr(path->dentry, kname);
15648 }
15649
15650 - SYSCALL_DEFINE2(removexattr, const char __user *, pathname,
15651 -@@ -652,7 +679,7 @@ retry:
15652 - return error;
15653 - error = mnt_want_write(path.mnt);
15654 - if (!error) {
15655 -- error = removexattr(path.dentry, name);
15656 -+ error = removexattr(&path, name);
15657 - mnt_drop_write(path.mnt);
15658 - }
15659 - path_put(&path);
15660 -@@ -675,7 +702,7 @@ retry:
15661 + static int path_removexattr(const char __user *pathname,
15662 +@@ -625,7 +652,7 @@ retry:
15663 return error;
15664 error = mnt_want_write(path.mnt);
15665 if (!error) {
15666 @@ -69090,7 +67778,7 @@ index c69e6d4..cc56af5 100644
15667 mnt_drop_write(path.mnt);
15668 }
15669 path_put(&path);
15670 -@@ -689,16 +716,16 @@ retry:
15671 +@@ -651,16 +678,16 @@ SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,
15672 SYSCALL_DEFINE2(fremovexattr, int, fd, const char __user *, name)
15673 {
15674 struct fd f = fdget(fd);
15675 @@ -69112,7 +67800,7 @@ index c69e6d4..cc56af5 100644
15676 }
15677 fdput(f);
15678 diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
15679 -index 86df952..ac430d6 100644
15680 +index 79c9819..22226b4 100644
15681 --- a/fs/xfs/libxfs/xfs_bmap.c
15682 +++ b/fs/xfs/libxfs/xfs_bmap.c
15683 @@ -583,7 +583,7 @@ xfs_bmap_validate_ret(
15684 @@ -69143,7 +67831,7 @@ index f1b69ed..3d0222f 100644
15685 return 0;
15686 sfep = dp->d_ops->sf_nextentry(sfp, sfep);
15687 diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
15688 -index 3799695..0ddc953 100644
15689 +index 24c926b6..8726af88 100644
15690 --- a/fs/xfs/xfs_ioctl.c
15691 +++ b/fs/xfs/xfs_ioctl.c
15692 @@ -122,7 +122,7 @@ xfs_find_handle(
15693 @@ -69156,10 +67844,10 @@ index 3799695..0ddc953 100644
15694 goto out_put;
15695
15696 diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
15697 -index d10dc8f..56b3430 100644
15698 +index 6a51619..9592e1b 100644
15699 --- a/fs/xfs/xfs_linux.h
15700 +++ b/fs/xfs/xfs_linux.h
15701 -@@ -230,7 +230,7 @@ static inline kgid_t xfs_gid_to_kgid(__uint32_t gid)
15702 +@@ -234,7 +234,7 @@ static inline kgid_t xfs_gid_to_kgid(__uint32_t gid)
15703 * of the compiler which do not like us using do_div in the middle
15704 * of large functions.
15705 */
15706 @@ -69168,7 +67856,7 @@ index d10dc8f..56b3430 100644
15707 {
15708 __u32 mod;
15709
15710 -@@ -286,7 +286,7 @@ static inline __u32 xfs_do_mod(void *a, __u32 b, int n)
15711 +@@ -290,7 +290,7 @@ static inline __u32 xfs_do_mod(void *a, __u32 b, int n)
15712 return 0;
15713 }
15714 #else
15715 @@ -78849,7 +77537,7 @@ index 0000000..0e39d8c
15716 +}
15717 diff --git a/grsecurity/grsec_mount.c b/grsecurity/grsec_mount.c
15718 new file mode 100644
15719 -index 0000000..cd9e124
15720 +index 0000000..6f9eb73
15721 --- /dev/null
15722 +++ b/grsecurity/grsec_mount.c
15723 @@ -0,0 +1,65 @@
15724 @@ -78881,11 +77569,11 @@ index 0000000..cd9e124
15725 +}
15726 +
15727 +void
15728 -+gr_log_mount(const char *from, const char *to, const int retval)
15729 ++gr_log_mount(const char *from, struct path *to, const int retval)
15730 +{
15731 +#ifdef CONFIG_GRKERNSEC_AUDIT_MOUNT
15732 + if (grsec_enable_mount && (retval >= 0))
15733 -+ gr_log_str_str(GR_DO_AUDIT, GR_MOUNT_AUDIT_MSG, from ? from : "none", to);
15734 ++ gr_log_str_fs(GR_DO_AUDIT, GR_MOUNT_AUDIT_MSG, from ? from : "none", to->dentry, to->mnt);
15735 +#endif
15736 + return;
15737 +}
15738 @@ -80581,21 +79269,8 @@ index b7babf0..1e4b4f1 100644
15739 +#endif
15740 +
15741 #endif /* _ASM_GENERIC_ATOMIC_LONG_H */
15742 -diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
15743 -index 9c79e76..9f7827d 100644
15744 ---- a/include/asm-generic/atomic.h
15745 -+++ b/include/asm-generic/atomic.h
15746 -@@ -154,7 +154,7 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
15747 - * Atomically clears the bits set in @mask from @v
15748 - */
15749 - #ifndef atomic_clear_mask
15750 --static inline void atomic_clear_mask(unsigned long mask, atomic_t *v)
15751 -+static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
15752 - {
15753 - unsigned long flags;
15754 -
15755 diff --git a/include/asm-generic/atomic64.h b/include/asm-generic/atomic64.h
15756 -index b18ce4f..2ee2843 100644
15757 +index 30ad9c8..c70c170 100644
15758 --- a/include/asm-generic/atomic64.h
15759 +++ b/include/asm-generic/atomic64.h
15760 @@ -16,6 +16,8 @@ typedef struct {
15761 @@ -80607,7 +79282,7 @@ index b18ce4f..2ee2843 100644
15762 #define ATOMIC64_INIT(i) { (i) }
15763
15764 extern long long atomic64_read(const atomic64_t *v);
15765 -@@ -39,4 +41,14 @@ extern int atomic64_add_unless(atomic64_t *v, long long a, long long u);
15766 +@@ -51,4 +53,14 @@ extern int atomic64_add_unless(atomic64_t *v, long long a, long long u);
15767 #define atomic64_dec_and_test(v) (atomic64_dec_return((v)) == 0)
15768 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1LL, 0LL)
15769
15770 @@ -80711,7 +79386,7 @@ index 0d68a1e..b74a761 100644
15771 machine_restart(NULL);
15772 }
15773 diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
15774 -index 975e1cc..0b8a083 100644
15775 +index b8fdc57..c6d5a5c 100644
15776 --- a/include/asm-generic/io.h
15777 +++ b/include/asm-generic/io.h
15778 @@ -289,7 +289,7 @@ static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
15779 @@ -80864,10 +79539,10 @@ index 810431d..0ec4804f 100644
15780 * (puds are folded into pgds so this doesn't get actually called,
15781 * but the define is needed for a generic inline function.)
15782 diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
15783 -index 53b2acc..f4568e7 100644
15784 +index 752e30d..87f172d 100644
15785 --- a/include/asm-generic/pgtable.h
15786 +++ b/include/asm-generic/pgtable.h
15787 -@@ -819,6 +819,22 @@ static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr,
15788 +@@ -828,6 +828,22 @@ static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr,
15789 }
15790 #endif /* CONFIG_NUMA_BALANCING */
15791
15792 @@ -80916,10 +79591,10 @@ index 72d8803..cb9749c 100644
15793 +
15794 #endif /* __ASM_GENERIC_UACCESS_H */
15795 diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
15796 -index 5ba0360..e85c934 100644
15797 +index aa70cbd..fd72c7a 100644
15798 --- a/include/asm-generic/vmlinux.lds.h
15799 +++ b/include/asm-generic/vmlinux.lds.h
15800 -@@ -231,6 +231,7 @@
15801 +@@ -233,6 +233,7 @@
15802 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
15803 VMLINUX_SYMBOL(__start_rodata) = .; \
15804 *(.rodata) *(.rodata.*) \
15805 @@ -80927,7 +79602,7 @@ index 5ba0360..e85c934 100644
15806 *(__vermagic) /* Kernel version magic */ \
15807 . = ALIGN(8); \
15808 VMLINUX_SYMBOL(__start___tracepoints_ptrs) = .; \
15809 -@@ -722,17 +723,18 @@
15810 +@@ -724,17 +725,18 @@
15811 * section in the linker script will go there too. @phdr should have
15812 * a leading colon.
15813 *
15814 @@ -80964,18 +79639,18 @@ index 623a59c..1e79ab9 100644
15815 struct crypto_instance {
15816 struct crypto_alg alg;
15817 diff --git a/include/drm/drmP.h b/include/drm/drmP.h
15818 -index 1968907..7d9ed9f 100644
15819 +index 53ed876..5bb09be 100644
15820 --- a/include/drm/drmP.h
15821 +++ b/include/drm/drmP.h
15822 -@@ -68,6 +68,7 @@
15823 - #include <linux/workqueue.h>
15824 - #include <linux/poll.h>
15825 +@@ -59,6 +59,7 @@
15826 +
15827 + #include <asm/mman.h>
15828 #include <asm/pgalloc.h>
15829 +#include <asm/local.h>
15830 - #include <drm/drm.h>
15831 - #include <drm/drm_sarea.h>
15832 - #include <drm/drm_vma_manager.h>
15833 -@@ -260,10 +261,12 @@ do { \
15834 + #include <asm/uaccess.h>
15835 +
15836 + #include <uapi/drm/drm.h>
15837 +@@ -223,10 +224,12 @@ void drm_err(const char *func, const char *format, ...);
15838 * \param cmd command.
15839 * \param arg argument.
15840 */
15841 @@ -80990,7 +79665,7 @@ index 1968907..7d9ed9f 100644
15842 unsigned long arg);
15843
15844 #define DRM_IOCTL_NR(n) _IOC_NR(n)
15845 -@@ -279,10 +282,10 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
15846 +@@ -242,10 +245,10 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
15847 struct drm_ioctl_desc {
15848 unsigned int cmd;
15849 int flags;
15850 @@ -81003,7 +79678,7 @@ index 1968907..7d9ed9f 100644
15851
15852 /**
15853 * Creates a driver or general drm_ioctl_desc array entry for the given
15854 -@@ -946,7 +949,8 @@ struct drm_info_list {
15855 +@@ -629,7 +632,8 @@ struct drm_info_list {
15856 int (*show)(struct seq_file*, void*); /** show callback */
15857 u32 driver_features; /**< Required driver features for this entry */
15858 void *data;
15859 @@ -81013,7 +79688,7 @@ index 1968907..7d9ed9f 100644
15860
15861 /**
15862 * debugfs node structure. This structure represents a debugfs file.
15863 -@@ -1030,7 +1034,7 @@ struct drm_device {
15864 +@@ -713,7 +717,7 @@ struct drm_device {
15865
15866 /** \name Usage Counters */
15867 /*@{ */
15868 @@ -81109,19 +79784,10 @@ index c1da539..1dcec55 100644
15869 struct atmphy_ops {
15870 int (*start)(struct atm_dev *dev);
15871 diff --git a/include/linux/audit.h b/include/linux/audit.h
15872 -index 22cfddb..1514eef 100644
15873 +index e58fe7d..be9f6d8 100644
15874 --- a/include/linux/audit.h
15875 +++ b/include/linux/audit.h
15876 -@@ -86,7 +86,7 @@ extern unsigned compat_dir_class[];
15877 - extern unsigned compat_chattr_class[];
15878 - extern unsigned compat_signal_class[];
15879 -
15880 --extern int __weak audit_classify_compat_syscall(int abi, unsigned syscall);
15881 -+extern int audit_classify_compat_syscall(int abi, unsigned syscall);
15882 -
15883 - /* audit_names->type values */
15884 - #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */
15885 -@@ -210,7 +210,7 @@ static inline void audit_ptrace(struct task_struct *t)
15886 +@@ -215,7 +215,7 @@ static inline void audit_ptrace(struct task_struct *t)
15887 extern unsigned int audit_serial(void);
15888 extern int auditsc_get_stamp(struct audit_context *ctx,
15889 struct timespec *t, unsigned int *serial);
15890 @@ -81156,10 +79822,10 @@ index 61f29e5..e67c658 100644
15891 extern void __register_binfmt(struct linux_binfmt *fmt, int insert);
15892
15893 diff --git a/include/linux/bitops.h b/include/linux/bitops.h
15894 -index 38b5f5c..645018c 100644
15895 +index 5d858e0..336c1d9 100644
15896 --- a/include/linux/bitops.h
15897 +++ b/include/linux/bitops.h
15898 -@@ -125,7 +125,7 @@ static inline __u64 ror64(__u64 word, unsigned int shift)
15899 +@@ -105,7 +105,7 @@ static inline __u64 ror64(__u64 word, unsigned int shift)
15900 * @word: value to rotate
15901 * @shift: bits to roll
15902 */
15903 @@ -81168,7 +79834,7 @@ index 38b5f5c..645018c 100644
15904 {
15905 return (word << shift) | (word >> (32 - shift));
15906 }
15907 -@@ -135,7 +135,7 @@ static inline __u32 rol32(__u32 word, unsigned int shift)
15908 +@@ -115,7 +115,7 @@ static inline __u32 rol32(__u32 word, unsigned int shift)
15909 * @word: value to rotate
15910 * @shift: bits to roll
15911 */
15912 @@ -81177,7 +79843,7 @@ index 38b5f5c..645018c 100644
15913 {
15914 return (word >> shift) | (word << (32 - shift));
15915 }
15916 -@@ -191,7 +191,7 @@ static inline __s32 sign_extend32(__u32 value, int index)
15917 +@@ -171,7 +171,7 @@ static inline __s32 sign_extend32(__u32 value, int index)
15918 return (__s32)(value << shift) >> shift;
15919 }
15920
15921 @@ -81187,10 +79853,10 @@ index 38b5f5c..645018c 100644
15922 if (sizeof(l) == 4)
15923 return fls(l);
15924 diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
15925 -index f2057ff8..59dfa2d 100644
15926 +index aac0f9e..73c9869 100644
15927 --- a/include/linux/blkdev.h
15928 +++ b/include/linux/blkdev.h
15929 -@@ -1625,7 +1625,7 @@ struct block_device_operations {
15930 +@@ -1615,7 +1615,7 @@ struct block_device_operations {
15931 /* this callback is with swap_lock and sometimes page table lock held */
15932 void (*swap_slot_free_notify) (struct block_device *, unsigned long);
15933 struct module *owner;
15934 @@ -81276,10 +79942,10 @@ index 4ce9056..86caac6 100644
15935 extern struct cleancache_ops *
15936 cleancache_register_ops(struct cleancache_ops *ops);
15937 diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
15938 -index da6996e..9d13d5f 100644
15939 +index 2839c63..5b06b6b 100644
15940 --- a/include/linux/clk-provider.h
15941 +++ b/include/linux/clk-provider.h
15942 -@@ -180,6 +180,7 @@ struct clk_ops {
15943 +@@ -191,6 +191,7 @@ struct clk_ops {
15944 void (*init)(struct clk_hw *hw);
15945 int (*debug_init)(struct clk_hw *hw, struct dentry *dentry);
15946 };
15947 @@ -81310,7 +79976,7 @@ index e649426..a74047b 100644
15948 asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t);
15949 /*
15950 diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
15951 -index 2507fd2..55203f8 100644
15952 +index d1a5582..4424efa 100644
15953 --- a/include/linux/compiler-gcc4.h
15954 +++ b/include/linux/compiler-gcc4.h
15955 @@ -39,9 +39,34 @@
15956 @@ -81526,10 +80192,10 @@ index 34025df..d94bbbc 100644
15957 /*
15958 * Users often need to create attribute structures for their configurable
15959 diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
15960 -index 7d1955a..d86a3ca 100644
15961 +index 503b085b..1638c9e 100644
15962 --- a/include/linux/cpufreq.h
15963 +++ b/include/linux/cpufreq.h
15964 -@@ -203,6 +203,7 @@ struct global_attr {
15965 +@@ -206,6 +206,7 @@ struct global_attr {
15966 ssize_t (*store)(struct kobject *a, struct attribute *b,
15967 const char *c, size_t count);
15968 };
15969 @@ -81537,7 +80203,7 @@ index 7d1955a..d86a3ca 100644
15970
15971 #define define_one_global_ro(_name) \
15972 static struct global_attr _name = \
15973 -@@ -269,7 +270,7 @@ struct cpufreq_driver {
15974 +@@ -273,7 +274,7 @@ struct cpufreq_driver {
15975 bool boost_supported;
15976 bool boost_enabled;
15977 int (*set_boost) (int state);
15978 @@ -81570,7 +80236,7 @@ index 25e0df6..952dffd 100644
15979 #ifdef CONFIG_CPU_IDLE
15980 extern int cpuidle_register_governor(struct cpuidle_governor *gov);
15981 diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
15982 -index 2997af6..424ddc1 100644
15983 +index 0a9a6da..ea597ca 100644
15984 --- a/include/linux/cpumask.h
15985 +++ b/include/linux/cpumask.h
15986 @@ -118,17 +118,17 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
15987 @@ -81704,13 +80370,13 @@ index 653589e..4ef254a 100644
15988 return c | 0x20;
15989 }
15990 diff --git a/include/linux/dcache.h b/include/linux/dcache.h
15991 -index 75a227c..1456987 100644
15992 +index 1c2f1b8..c67151e 100644
15993 --- a/include/linux/dcache.h
15994 +++ b/include/linux/dcache.h
15995 -@@ -134,7 +134,7 @@ struct dentry {
15996 +@@ -133,7 +133,7 @@ struct dentry {
15997 + struct hlist_node d_alias; /* inode alias list */
15998 + struct rcu_head d_rcu;
15999 } d_u;
16000 - struct list_head d_subdirs; /* our children */
16001 - struct hlist_node d_alias; /* inode alias list */
16002 -};
16003 +} __randomize_layout;
16004
16005 @@ -81743,10 +80409,10 @@ index f1863dc..5c26074 100644
16006 /**
16007 * struct devfreq - Device devfreq structure
16008 diff --git a/include/linux/device.h b/include/linux/device.h
16009 -index 43d183a..03b6ba2 100644
16010 +index ce1f2160..189bc33 100644
16011 --- a/include/linux/device.h
16012 +++ b/include/linux/device.h
16013 -@@ -310,7 +310,7 @@ struct subsys_interface {
16014 +@@ -311,7 +311,7 @@ struct subsys_interface {
16015 struct list_head node;
16016 int (*add_dev)(struct device *dev, struct subsys_interface *sif);
16017 int (*remove_dev)(struct device *dev, struct subsys_interface *sif);
16018 @@ -81755,7 +80421,7 @@ index 43d183a..03b6ba2 100644
16019
16020 int subsys_interface_register(struct subsys_interface *sif);
16021 void subsys_interface_unregister(struct subsys_interface *sif);
16022 -@@ -506,7 +506,7 @@ struct device_type {
16023 +@@ -507,7 +507,7 @@ struct device_type {
16024 void (*release)(struct device *dev);
16025
16026 const struct dev_pm_ops *pm;
16027 @@ -81764,7 +80430,7 @@ index 43d183a..03b6ba2 100644
16028
16029 /* interface for exporting device attributes */
16030 struct device_attribute {
16031 -@@ -516,11 +516,12 @@ struct device_attribute {
16032 +@@ -517,11 +517,12 @@ struct device_attribute {
16033 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
16034 const char *buf, size_t count);
16035 };
16036 @@ -81779,7 +80445,7 @@ index 43d183a..03b6ba2 100644
16037 ssize_t device_show_ulong(struct device *dev, struct device_attribute *attr,
16038 char *buf);
16039 diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
16040 -index 931b709..89b2d89 100644
16041 +index d5d3881..7ed54af 100644
16042 --- a/include/linux/dma-mapping.h
16043 +++ b/include/linux/dma-mapping.h
16044 @@ -60,7 +60,7 @@ struct dma_map_ops {
16045 @@ -81792,10 +80458,10 @@ index 931b709..89b2d89 100644
16046 #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
16047
16048 diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
16049 -index 1f9e642..39e4263 100644
16050 +index 653a1fd..9133cd1 100644
16051 --- a/include/linux/dmaengine.h
16052 +++ b/include/linux/dmaengine.h
16053 -@@ -1147,9 +1147,9 @@ struct dma_pinned_list {
16054 +@@ -1136,9 +1136,9 @@ struct dma_pinned_list {
16055 struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len);
16056 void dma_unpin_iovec_pages(struct dma_pinned_list* pinned_list);
16057
16058 @@ -81808,11 +80474,11 @@ index 1f9e642..39e4263 100644
16059 unsigned int offset, size_t len);
16060
16061 diff --git a/include/linux/efi.h b/include/linux/efi.h
16062 -index 45cb4ff..c9b4912 100644
16063 +index 0949f9c..04cb9a5 100644
16064 --- a/include/linux/efi.h
16065 +++ b/include/linux/efi.h
16066 -@@ -1036,6 +1036,7 @@ struct efivar_operations {
16067 - efi_set_variable_t *set_variable;
16068 +@@ -1050,6 +1050,7 @@ struct efivar_operations {
16069 + efi_set_variable_nonblocking_t *set_variable_nonblocking;
16070 efi_query_variable_store_t *query_variable_store;
16071 };
16072 +typedef struct efivar_operations __no_const efivar_operations_no_const;
16073 @@ -81897,104 +80563,6 @@ index 230f87b..1fd0485 100644
16074 void do_close_on_exec(struct files_struct *);
16075 int iterate_fd(struct files_struct *, unsigned,
16076 int (*)(const void *, struct file *, unsigned),
16077 -diff --git a/include/linux/filter.h b/include/linux/filter.h
16078 -index a5227ab..c789945 100644
16079 ---- a/include/linux/filter.h
16080 -+++ b/include/linux/filter.h
16081 -@@ -9,6 +9,11 @@
16082 - #include <linux/skbuff.h>
16083 - #include <linux/workqueue.h>
16084 - #include <uapi/linux/filter.h>
16085 -+#include <asm/cacheflush.h>
16086 -+
16087 -+struct sk_buff;
16088 -+struct sock;
16089 -+struct seccomp_data;
16090 -
16091 - /* Internally used and optimized filter representation with extended
16092 - * instruction set based on top of classic BPF.
16093 -@@ -320,20 +325,23 @@ struct sock_fprog_kern {
16094 - struct sock_filter *filter;
16095 - };
16096 -
16097 --struct sk_buff;
16098 --struct sock;
16099 --struct seccomp_data;
16100 -+struct bpf_work_struct {
16101 -+ struct bpf_prog *prog;
16102 -+ struct work_struct work;
16103 -+};
16104 -
16105 - struct bpf_prog {
16106 -+ u32 pages; /* Number of allocated pages */
16107 - u32 jited:1, /* Is our filter JIT'ed? */
16108 - len:31; /* Number of filter blocks */
16109 - struct sock_fprog_kern *orig_prog; /* Original BPF program */
16110 -+ struct bpf_work_struct *work; /* Deferred free work struct */
16111 - unsigned int (*bpf_func)(const struct sk_buff *skb,
16112 - const struct bpf_insn *filter);
16113 -+ /* Instructions for interpreter */
16114 - union {
16115 - struct sock_filter insns[0];
16116 - struct bpf_insn insnsi[0];
16117 -- struct work_struct work;
16118 - };
16119 - };
16120 -
16121 -@@ -353,6 +361,26 @@ static inline unsigned int bpf_prog_size(unsigned int proglen)
16122 -
16123 - #define bpf_classic_proglen(fprog) (fprog->len * sizeof(fprog->filter[0]))
16124 -
16125 -+#ifdef CONFIG_DEBUG_SET_MODULE_RONX
16126 -+static inline void bpf_prog_lock_ro(struct bpf_prog *fp)
16127 -+{
16128 -+ set_memory_ro((unsigned long)fp, fp->pages);
16129 -+}
16130 -+
16131 -+static inline void bpf_prog_unlock_ro(struct bpf_prog *fp)
16132 -+{
16133 -+ set_memory_rw((unsigned long)fp, fp->pages);
16134 -+}
16135 -+#else
16136 -+static inline void bpf_prog_lock_ro(struct bpf_prog *fp)
16137 -+{
16138 -+}
16139 -+
16140 -+static inline void bpf_prog_unlock_ro(struct bpf_prog *fp)
16141 -+{
16142 -+}
16143 -+#endif /* CONFIG_DEBUG_SET_MODULE_RONX */
16144 -+
16145 - int sk_filter(struct sock *sk, struct sk_buff *skb);
16146 -
16147 - void bpf_prog_select_runtime(struct bpf_prog *fp);
16148 -@@ -361,6 +389,17 @@ void bpf_prog_free(struct bpf_prog *fp);
16149 - int bpf_convert_filter(struct sock_filter *prog, int len,
16150 - struct bpf_insn *new_prog, int *new_len);
16151 -
16152 -+struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags);
16153 -+struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
16154 -+ gfp_t gfp_extra_flags);
16155 -+void __bpf_prog_free(struct bpf_prog *fp);
16156 -+
16157 -+static inline void bpf_prog_unlock_free(struct bpf_prog *fp)
16158 -+{
16159 -+ bpf_prog_unlock_ro(fp);
16160 -+ __bpf_prog_free(fp);
16161 -+}
16162 -+
16163 - int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog);
16164 - void bpf_prog_destroy(struct bpf_prog *fp);
16165 -
16166 -@@ -450,7 +489,7 @@ static inline void bpf_jit_compile(struct bpf_prog *fp)
16167 -
16168 - static inline void bpf_jit_free(struct bpf_prog *fp)
16169 - {
16170 -- kfree(fp);
16171 -+ bpf_prog_unlock_free(fp);
16172 - }
16173 - #endif /* CONFIG_BPF_JIT */
16174 -
16175 diff --git a/include/linux/frontswap.h b/include/linux/frontswap.h
16176 index 8293262..2b3b8bd 100644
16177 --- a/include/linux/frontswap.h
16178 @@ -82009,10 +80577,10 @@ index 8293262..2b3b8bd 100644
16179 extern bool frontswap_enabled;
16180 extern struct frontswap_ops *
16181 diff --git a/include/linux/fs.h b/include/linux/fs.h
16182 -index 9418772..0155807 100644
16183 +index 9ab779e..0c636f2 100644
16184 --- a/include/linux/fs.h
16185 +++ b/include/linux/fs.h
16186 -@@ -401,7 +401,7 @@ struct address_space {
16187 +@@ -412,7 +412,7 @@ struct address_space {
16188 spinlock_t private_lock; /* for use by the address_space */
16189 struct list_head private_list; /* ditto */
16190 void *private_data; /* ditto */
16191 @@ -82021,7 +80589,7 @@ index 9418772..0155807 100644
16192 /*
16193 * On most architectures that alignment is already the case; but
16194 * must be enforced here for CRIS, to let the least significant bit
16195 -@@ -444,7 +444,7 @@ struct block_device {
16196 +@@ -455,7 +455,7 @@ struct block_device {
16197 int bd_fsfreeze_count;
16198 /* Mutex for freeze */
16199 struct mutex bd_fsfreeze_mutex;
16200 @@ -82030,7 +80598,7 @@ index 9418772..0155807 100644
16201
16202 /*
16203 * Radix-tree tags, for tagging dirty and writeback pages within the pagecache
16204 -@@ -613,7 +613,7 @@ struct inode {
16205 +@@ -624,7 +624,7 @@ struct inode {
16206 #endif
16207
16208 void *i_private; /* fs or device private pointer */
16209 @@ -82039,7 +80607,7 @@ index 9418772..0155807 100644
16210
16211 static inline int inode_unhashed(struct inode *inode)
16212 {
16213 -@@ -806,7 +806,7 @@ struct file {
16214 +@@ -820,7 +820,7 @@ struct file {
16215 struct list_head f_tfile_llink;
16216 #endif /* #ifdef CONFIG_EPOLL */
16217 struct address_space *f_mapping;
16218 @@ -82048,7 +80616,7 @@ index 9418772..0155807 100644
16219
16220 struct file_handle {
16221 __u32 handle_bytes;
16222 -@@ -934,7 +934,7 @@ struct file_lock {
16223 +@@ -945,7 +945,7 @@ struct file_lock {
16224 int state; /* state of grant or error if -ve */
16225 } afs;
16226 } fl_u;
16227 @@ -82057,16 +80625,16 @@ index 9418772..0155807 100644
16228
16229 /* The following constant reflects the upper bound of the file/locking space */
16230 #ifndef OFFSET_MAX
16231 -@@ -1284,7 +1284,7 @@ struct super_block {
16232 - struct list_lru s_dentry_lru ____cacheline_aligned_in_smp;
16233 - struct list_lru s_inode_lru ____cacheline_aligned_in_smp;
16234 - struct rcu_head rcu;
16235 +@@ -1287,7 +1287,7 @@ struct super_block {
16236 + * Indicates how deep in a filesystem stack this SB is
16237 + */
16238 + int s_stack_depth;
16239 -};
16240 +} __randomize_layout;
16241
16242 extern struct timespec current_fs_time(struct super_block *sb);
16243
16244 -@@ -1510,7 +1510,8 @@ struct file_operations {
16245 +@@ -1514,7 +1514,8 @@ struct file_operations {
16246 long (*fallocate)(struct file *file, int mode, loff_t offset,
16247 loff_t len);
16248 int (*show_fdinfo)(struct seq_file *m, struct file *f);
16249 @@ -82076,7 +80644,7 @@ index 9418772..0155807 100644
16250
16251 struct inode_operations {
16252 struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
16253 -@@ -2796,4 +2797,14 @@ static inline bool dir_relax(struct inode *inode)
16254 +@@ -2823,4 +2824,14 @@ static inline bool dir_relax(struct inode *inode)
16255 return !IS_DEADDIR(inode);
16256 }
16257
16258 @@ -82202,7 +80770,7 @@ index ec274e0..e678159 100644
16259
16260 static inline sector_t get_start_sect(struct block_device *bdev)
16261 diff --git a/include/linux/genl_magic_func.h b/include/linux/genl_magic_func.h
16262 -index c0894dd..2fbf10c 100644
16263 +index 667c311..abac2a7 100644
16264 --- a/include/linux/genl_magic_func.h
16265 +++ b/include/linux/genl_magic_func.h
16266 @@ -246,7 +246,7 @@ const char *CONCAT_(GENL_MAGIC_FAMILY, _genl_cmd_to_str)(__u8 cmd)
16267 @@ -82215,7 +80783,7 @@ index c0894dd..2fbf10c 100644
16268 };
16269
16270 diff --git a/include/linux/gfp.h b/include/linux/gfp.h
16271 -index 5e7219d..b1ed627 100644
16272 +index 41b30fd..a3718cf 100644
16273 --- a/include/linux/gfp.h
16274 +++ b/include/linux/gfp.h
16275 @@ -34,6 +34,13 @@ struct vm_area_struct;
16276 @@ -82256,7 +80824,7 @@ index 5e7219d..b1ed627 100644
16277 +#define GFP_USERCOPY __GFP_USERCOPY
16278 +
16279 /* Convert GFP flags to their corresponding migrate type */
16280 - static inline int allocflags_to_migratetype(gfp_t gfp_flags)
16281 + static inline int gfpflags_to_migratetype(const gfp_t gfp_flags)
16282 {
16283 diff --git a/include/linux/gracl.h b/include/linux/gracl.h
16284 new file mode 100644
16285 @@ -83287,10 +81855,10 @@ index 0000000..b02ba9d
16286 +#define GR_MSRWRITE_MSG "denied write to CPU MSR by "
16287 diff --git a/include/linux/grsecurity.h b/include/linux/grsecurity.h
16288 new file mode 100644
16289 -index 0000000..10b9635
16290 +index 0000000..c3b0738
16291 --- /dev/null
16292 +++ b/include/linux/grsecurity.h
16293 -@@ -0,0 +1,254 @@
16294 +@@ -0,0 +1,244 @@
16295 +#ifndef GR_SECURITY_H
16296 +#define GR_SECURITY_H
16297 +#include <linux/fs.h>
16298 @@ -83377,7 +81945,7 @@ index 0000000..10b9635
16299 + const struct vfsmount *mnt);
16300 +void gr_log_remount(const char *devname, const int retval);
16301 +void gr_log_unmount(const char *devname, const int retval);
16302 -+void gr_log_mount(const char *from, const char *to, const int retval);
16303 ++void gr_log_mount(const char *from, struct path *to, const int retval);
16304 +void gr_log_textrel(struct vm_area_struct *vma);
16305 +void gr_log_ptgnustack(struct file *file);
16306 +void gr_log_rwxmmap(struct file *file);
16307 @@ -83502,16 +82070,6 @@ index 0000000..10b9635
16308 +
16309 +int gr_ptrace_readexec(struct file *file, int unsafe_flags);
16310 +
16311 -+#if defined(CONFIG_GRKERNSEC) && (defined(CONFIG_GRKERNSEC_RESLOG) || !defined(CONFIG_GRKERNSEC_NO_RBAC))
16312 -+extern void gr_learn_resource(const struct task_struct *task, const int res,
16313 -+ const unsigned long wanted, const int gt);
16314 -+#else
16315 -+static inline void gr_learn_resource(const struct task_struct *task, const int res,
16316 -+ const unsigned long wanted, const int gt)
16317 -+{
16318 -+}
16319 -+#endif
16320 -+
16321 +#ifdef CONFIG_GRKERNSEC_RESLOG
16322 +extern void gr_log_resource(const struct task_struct *task, const int res,
16323 + const unsigned long wanted, const int gt);
16324 @@ -83701,10 +82259,10 @@ index 2df8e8d..3e1280d 100644
16325 #define __meminitconst __constsection(.meminit.rodata)
16326 #define __memexit __section(.memexit.text) __exitused __cold notrace
16327 diff --git a/include/linux/init_task.h b/include/linux/init_task.h
16328 -index 2bb4c4f3..e0fac69 100644
16329 +index 77fc43f..73caf92 100644
16330 --- a/include/linux/init_task.h
16331 +++ b/include/linux/init_task.h
16332 -@@ -149,6 +149,12 @@ extern struct task_group root_task_group;
16333 +@@ -158,6 +158,12 @@ extern struct task_group root_task_group;
16334
16335 #define INIT_TASK_COMM "swapper"
16336
16337 @@ -83717,7 +82275,7 @@ index 2bb4c4f3..e0fac69 100644
16338 #ifdef CONFIG_RT_MUTEXES
16339 # define INIT_RT_MUTEXES(tsk) \
16340 .pi_waiters = RB_ROOT, \
16341 -@@ -196,6 +202,7 @@ extern struct task_group root_task_group;
16342 +@@ -205,6 +211,7 @@ extern struct task_group root_task_group;
16343 RCU_POINTER_INITIALIZER(cred, &init_cred), \
16344 .comm = INIT_TASK_COMM, \
16345 .thread = INIT_THREAD, \
16346 @@ -83726,10 +82284,10 @@ index 2bb4c4f3..e0fac69 100644
16347 .files = &init_files, \
16348 .signal = &init_signals, \
16349 diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
16350 -index 698ad05..8601bb7 100644
16351 +index 69517a2..6b12d37 100644
16352 --- a/include/linux/interrupt.h
16353 +++ b/include/linux/interrupt.h
16354 -@@ -418,8 +418,8 @@ extern const char * const softirq_to_name[NR_SOFTIRQS];
16355 +@@ -413,8 +413,8 @@ extern const char * const softirq_to_name[NR_SOFTIRQS];
16356
16357 struct softirq_action
16358 {
16359 @@ -83740,7 +82298,7 @@ index 698ad05..8601bb7 100644
16360
16361 asmlinkage void do_softirq(void);
16362 asmlinkage void __do_softirq(void);
16363 -@@ -433,7 +433,7 @@ static inline void do_softirq_own_stack(void)
16364 +@@ -428,7 +428,7 @@ static inline void do_softirq_own_stack(void)
16365 }
16366 #endif
16367
16368 @@ -83750,10 +82308,10 @@ index 698ad05..8601bb7 100644
16369 extern void __raise_softirq_irqoff(unsigned int nr);
16370
16371 diff --git a/include/linux/iommu.h b/include/linux/iommu.h
16372 -index 20f9a52..63ee2e3 100644
16373 +index e6a7c9f..5804745 100644
16374 --- a/include/linux/iommu.h
16375 +++ b/include/linux/iommu.h
16376 -@@ -131,7 +131,7 @@ struct iommu_ops {
16377 +@@ -133,7 +133,7 @@ struct iommu_ops {
16378 u32 (*domain_get_windows)(struct iommu_domain *domain);
16379
16380 unsigned long pgsize_bitmap;
16381 @@ -83763,7 +82321,7 @@ index 20f9a52..63ee2e3 100644
16382 #define IOMMU_GROUP_NOTIFY_ADD_DEVICE 1 /* Device added */
16383 #define IOMMU_GROUP_NOTIFY_DEL_DEVICE 2 /* Pre Device removed */
16384 diff --git a/include/linux/ioport.h b/include/linux/ioport.h
16385 -index 142ec54..873e033 100644
16386 +index 2c525022..345b106 100644
16387 --- a/include/linux/ioport.h
16388 +++ b/include/linux/ioport.h
16389 @@ -161,7 +161,7 @@ struct resource *lookup_resource(struct resource *root, resource_size_t start);
16390 @@ -83789,10 +82347,10 @@ index 35e7eca..6afb7ad 100644
16391 extern struct ipc_namespace init_ipc_ns;
16392 extern atomic_t nr_ipc_ns;
16393 diff --git a/include/linux/irq.h b/include/linux/irq.h
16394 -index 62af592..cc3b0d0 100644
16395 +index 03f48d9..e86af0c 100644
16396 --- a/include/linux/irq.h
16397 +++ b/include/linux/irq.h
16398 -@@ -344,7 +344,8 @@ struct irq_chip {
16399 +@@ -352,7 +352,8 @@ struct irq_chip {
16400 void (*irq_release_resources)(struct irq_data *data);
16401
16402 unsigned long flags;
16403 @@ -83803,10 +82361,10 @@ index 62af592..cc3b0d0 100644
16404 /*
16405 * irq_chip specific flags
16406 diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h
16407 -index 45e2d8c..26d85da 100644
16408 +index 13eed92..3261c86 100644
16409 --- a/include/linux/irqchip/arm-gic.h
16410 +++ b/include/linux/irqchip/arm-gic.h
16411 -@@ -75,9 +75,11 @@
16412 +@@ -91,9 +91,11 @@
16413
16414 #ifndef __ASSEMBLY__
16415
16416 @@ -83888,10 +82446,10 @@ index 6883e19..e854fcb 100644
16417 /* This macro allows us to keep printk typechecking */
16418 static __printf(1, 2)
16419 diff --git a/include/linux/key-type.h b/include/linux/key-type.h
16420 -index 44792ee..6172f2a 100644
16421 +index ff9f1d3..6712be5 100644
16422 --- a/include/linux/key-type.h
16423 +++ b/include/linux/key-type.h
16424 -@@ -132,7 +132,7 @@ struct key_type {
16425 +@@ -152,7 +152,7 @@ struct key_type {
16426 /* internal fields */
16427 struct list_head link; /* link in types list */
16428 struct lock_class_key lock_class; /* key->sem lock class */
16429 @@ -84011,10 +82569,10 @@ index 484604d..0f6c5b6 100644
16430 if (atomic_sub_and_test((int) count, &kref->refcount)) {
16431 release(kref);
16432 diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
16433 -index a4c33b3..e854710 100644
16434 +index a6059bd..8126d5c 100644
16435 --- a/include/linux/kvm_host.h
16436 +++ b/include/linux/kvm_host.h
16437 -@@ -452,7 +452,7 @@ static inline void kvm_irqfd_exit(void)
16438 +@@ -460,7 +460,7 @@ static inline void kvm_irqfd_exit(void)
16439 {
16440 }
16441 #endif
16442 @@ -84023,7 +82581,7 @@ index a4c33b3..e854710 100644
16443 struct module *module);
16444 void kvm_exit(void);
16445
16446 -@@ -618,7 +618,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
16447 +@@ -629,7 +629,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
16448 struct kvm_guest_debug *dbg);
16449 int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run);
16450
16451 @@ -84033,7 +82591,7 @@ index a4c33b3..e854710 100644
16452
16453 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
16454 diff --git a/include/linux/libata.h b/include/linux/libata.h
16455 -index 92abb49..e7fff2a 100644
16456 +index bd5fefe..2a8a8d2 100644
16457 --- a/include/linux/libata.h
16458 +++ b/include/linux/libata.h
16459 @@ -976,7 +976,7 @@ struct ata_port_operations {
16460 @@ -84058,10 +82616,10 @@ index a6a42dd..6c5ebce 100644
16461
16462 /*
16463 diff --git a/include/linux/list.h b/include/linux/list.h
16464 -index cbbb96f..602d023 100644
16465 +index f33f831..1ffe5e2 100644
16466 --- a/include/linux/list.h
16467 +++ b/include/linux/list.h
16468 -@@ -112,6 +112,19 @@ extern void __list_del_entry(struct list_head *entry);
16469 +@@ -113,6 +113,19 @@ extern void __list_del_entry(struct list_head *entry);
16470 extern void list_del(struct list_head *entry);
16471 #endif
16472
16473 @@ -84081,7 +82639,7 @@ index cbbb96f..602d023 100644
16474 /**
16475 * list_replace - replace old entry by new one
16476 * @old : the element to be replaced
16477 -@@ -145,6 +158,8 @@ static inline void list_del_init(struct list_head *entry)
16478 +@@ -146,6 +159,8 @@ static inline void list_del_init(struct list_head *entry)
16479 INIT_LIST_HEAD(entry);
16480 }
16481
16482 @@ -84181,7 +82739,7 @@ index c45c089..298841c 100644
16483 u32 remainder;
16484 return div_u64_rem(dividend, divisor, &remainder);
16485 diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
16486 -index f230a97..714c006 100644
16487 +index 3d385c8..deacb6a 100644
16488 --- a/include/linux/mempolicy.h
16489 +++ b/include/linux/mempolicy.h
16490 @@ -91,6 +91,10 @@ static inline struct mempolicy *mpol_dup(struct mempolicy *pol)
16491 @@ -84195,7 +82753,7 @@ index f230a97..714c006 100644
16492
16493 static inline void mpol_get(struct mempolicy *pol)
16494 {
16495 -@@ -228,6 +232,9 @@ static inline void mpol_free_shared_policy(struct shared_policy *p)
16496 +@@ -229,6 +233,9 @@ static inline void mpol_free_shared_policy(struct shared_policy *p)
16497 }
16498
16499 #define vma_policy(vma) NULL
16500 @@ -84206,10 +82764,10 @@ index f230a97..714c006 100644
16501 static inline int
16502 vma_dup_policy(struct vm_area_struct *src, struct vm_area_struct *dst)
16503 diff --git a/include/linux/mm.h b/include/linux/mm.h
16504 -index f952cc8..b9f6135 100644
16505 +index b464611..77cbfc1 100644
16506 --- a/include/linux/mm.h
16507 +++ b/include/linux/mm.h
16508 -@@ -127,6 +127,11 @@ extern unsigned int kobjsize(const void *objp);
16509 +@@ -128,6 +128,11 @@ extern unsigned int kobjsize(const void *objp);
16510 #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
16511 #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */
16512 #define VM_ARCH_1 0x01000000 /* Architecture-specific flag */
16513 @@ -84221,7 +82779,7 @@ index f952cc8..b9f6135 100644
16514 #define VM_DONTDUMP 0x04000000 /* Do not include in the core dump */
16515
16516 #ifdef CONFIG_MEM_SOFT_DIRTY
16517 -@@ -237,8 +242,8 @@ struct vm_operations_struct {
16518 +@@ -238,8 +243,8 @@ struct vm_operations_struct {
16519 /* called by access_process_vm when get_user_pages() fails, typically
16520 * for use by special VMAs that can switch between memory and hardware
16521 */
16522 @@ -84232,7 +82790,7 @@ index f952cc8..b9f6135 100644
16523
16524 /* Called by the /proc/PID/maps code to ask the vma whether it
16525 * has a special name. Returning non-NULL will also cause this
16526 -@@ -274,6 +279,7 @@ struct vm_operations_struct {
16527 +@@ -275,6 +280,7 @@ struct vm_operations_struct {
16528 int (*remap_pages)(struct vm_area_struct *vma, unsigned long addr,
16529 unsigned long size, pgoff_t pgoff);
16530 };
16531 @@ -84240,7 +82798,7 @@ index f952cc8..b9f6135 100644
16532
16533 struct mmu_gather;
16534 struct inode;
16535 -@@ -1163,8 +1169,8 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
16536 +@@ -1165,8 +1171,8 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
16537 unsigned long *pfn);
16538 int follow_phys(struct vm_area_struct *vma, unsigned long address,
16539 unsigned int flags, unsigned long *prot, resource_size_t *phys);
16540 @@ -84251,7 +82809,7 @@ index f952cc8..b9f6135 100644
16541
16542 static inline void unmap_shared_mapping_range(struct address_space *mapping,
16543 loff_t const holebegin, loff_t const holelen)
16544 -@@ -1204,9 +1210,9 @@ static inline int fixup_user_fault(struct task_struct *tsk,
16545 +@@ -1206,9 +1212,9 @@ static inline int fixup_user_fault(struct task_struct *tsk,
16546 }
16547 #endif
16548
16549 @@ -84264,7 +82822,7 @@ index f952cc8..b9f6135 100644
16550
16551 long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
16552 unsigned long start, unsigned long nr_pages,
16553 -@@ -1238,34 +1244,6 @@ int set_page_dirty_lock(struct page *page);
16554 +@@ -1240,34 +1246,6 @@ int set_page_dirty_lock(struct page *page);
16555 int clear_page_dirty_for_io(struct page *page);
16556 int get_cmdline(struct task_struct *task, char *buffer, int buflen);
16557
16558 @@ -84296,26 +82854,10 @@ index f952cc8..b9f6135 100644
16559 - !vma_growsup(vma->vm_next, addr);
16560 -}
16561 -
16562 - extern pid_t
16563 - vm_is_stack(struct task_struct *task, struct vm_area_struct *vma, int in_group);
16564 -
16565 -@@ -1365,6 +1343,15 @@ static inline void sync_mm_rss(struct mm_struct *mm)
16566 - }
16567 - #endif
16568 -
16569 -+#ifdef CONFIG_MMU
16570 -+pgprot_t vm_get_page_prot(vm_flags_t vm_flags);
16571 -+#else
16572 -+static inline pgprot_t vm_get_page_prot(vm_flags_t vm_flags)
16573 -+{
16574 -+ return __pgprot(0);
16575 -+}
16576 -+#endif
16577 -+
16578 - int vma_wants_writenotify(struct vm_area_struct *vma);
16579 + extern struct task_struct *task_of_stack(struct task_struct *task,
16580 + struct vm_area_struct *vma, bool in_group);
16581
16582 - extern pte_t *__get_locked_pte(struct mm_struct *mm, unsigned long addr,
16583 -@@ -1383,8 +1370,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
16584 +@@ -1385,8 +1363,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
16585 {
16586 return 0;
16587 }
16588 @@ -84331,7 +82873,7 @@ index f952cc8..b9f6135 100644
16589 #endif
16590
16591 #ifdef __PAGETABLE_PMD_FOLDED
16592 -@@ -1393,8 +1387,15 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
16593 +@@ -1395,8 +1380,15 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
16594 {
16595 return 0;
16596 }
16597 @@ -84347,7 +82889,7 @@ index f952cc8..b9f6135 100644
16598 #endif
16599
16600 int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
16601 -@@ -1412,11 +1413,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a
16602 +@@ -1414,11 +1406,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a
16603 NULL: pud_offset(pgd, address);
16604 }
16605
16606 @@ -84371,7 +82913,31 @@ index f952cc8..b9f6135 100644
16607 #endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */
16608
16609 #if USE_SPLIT_PTE_PTLOCKS
16610 -@@ -1815,7 +1828,7 @@ extern int install_special_mapping(struct mm_struct *mm,
16611 +@@ -1801,12 +1805,23 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
16612 + bool *need_rmap_locks);
16613 + extern void exit_mmap(struct mm_struct *);
16614 +
16615 ++#if defined(CONFIG_GRKERNSEC) && (defined(CONFIG_GRKERNSEC_RESLOG) || !defined(CONFIG_GRKERNSEC_NO_RBAC))
16616 ++extern void gr_learn_resource(const struct task_struct *task, const int res,
16617 ++ const unsigned long wanted, const int gt);
16618 ++#else
16619 ++static inline void gr_learn_resource(const struct task_struct *task, const int res,
16620 ++ const unsigned long wanted, const int gt)
16621 ++{
16622 ++}
16623 ++#endif
16624 ++
16625 + static inline int check_data_rlimit(unsigned long rlim,
16626 + unsigned long new,
16627 + unsigned long start,
16628 + unsigned long end_data,
16629 + unsigned long start_data)
16630 + {
16631 ++ gr_learn_resource(current, RLIMIT_DATA, (new - start) + (end_data - start_data), 1);
16632 + if (rlim < RLIM_INFINITY) {
16633 + if (((new - start) + (end_data - start_data)) > rlim)
16634 + return -ENOSPC;
16635 +@@ -1831,7 +1846,7 @@ extern int install_special_mapping(struct mm_struct *mm,
16636 unsigned long addr, unsigned long len,
16637 unsigned long flags, struct page **pages);
16638
16639 @@ -84380,7 +82946,7 @@ index f952cc8..b9f6135 100644
16640
16641 extern unsigned long mmap_region(struct file *file, unsigned long addr,
16642 unsigned long len, vm_flags_t vm_flags, unsigned long pgoff);
16643 -@@ -1823,6 +1836,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
16644 +@@ -1839,6 +1854,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
16645 unsigned long len, unsigned long prot, unsigned long flags,
16646 unsigned long pgoff, unsigned long *populate);
16647 extern int do_munmap(struct mm_struct *, unsigned long, size_t);
16648 @@ -84388,7 +82954,7 @@ index f952cc8..b9f6135 100644
16649
16650 #ifdef CONFIG_MMU
16651 extern int __mm_populate(unsigned long addr, unsigned long len,
16652 -@@ -1851,10 +1865,11 @@ struct vm_unmapped_area_info {
16653 +@@ -1867,10 +1883,11 @@ struct vm_unmapped_area_info {
16654 unsigned long high_limit;
16655 unsigned long align_mask;
16656 unsigned long align_offset;
16657 @@ -84402,7 +82968,7 @@ index f952cc8..b9f6135 100644
16658
16659 /*
16660 * Search for an unmapped address range.
16661 -@@ -1866,7 +1881,7 @@ extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info);
16662 +@@ -1882,7 +1899,7 @@ extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info);
16663 * - satisfies (begin_addr & align_mask) == (align_offset & align_mask)
16664 */
16665 static inline unsigned long
16666 @@ -84411,7 +82977,7 @@ index f952cc8..b9f6135 100644
16667 {
16668 if (!(info->flags & VM_UNMAPPED_AREA_TOPDOWN))
16669 return unmapped_area(info);
16670 -@@ -1928,6 +1943,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
16671 +@@ -1944,6 +1961,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
16672 extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
16673 struct vm_area_struct **pprev);
16674
16675 @@ -84422,23 +82988,20 @@ index f952cc8..b9f6135 100644
16676 /* Look up the first VMA which intersects the interval start_addr..end_addr-1,
16677 NULL if none. Assume start_addr < end_addr. */
16678 static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
16679 -@@ -1956,15 +1975,6 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
16680 - return vma;
16681 +@@ -1973,10 +1994,10 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
16682 }
16683
16684 --#ifdef CONFIG_MMU
16685 + #ifdef CONFIG_MMU
16686 -pgprot_t vm_get_page_prot(unsigned long vm_flags);
16687 --#else
16688 ++pgprot_t vm_get_page_prot(vm_flags_t vm_flags);
16689 + void vma_set_page_prot(struct vm_area_struct *vma);
16690 + #else
16691 -static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
16692 --{
16693 -- return __pgprot(0);
16694 --}
16695 --#endif
16696 --
16697 - #ifdef CONFIG_NUMA_BALANCING
16698 - unsigned long change_prot_numa(struct vm_area_struct *vma,
16699 - unsigned long start, unsigned long end);
16700 -@@ -2016,6 +2026,11 @@ void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
16701 ++static inline pgprot_t vm_get_page_prot(vm_flags_t vm_flags)
16702 + {
16703 + return __pgprot(0);
16704 + }
16705 +@@ -2038,6 +2059,11 @@ void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
16706 static inline void vm_stat_account(struct mm_struct *mm,
16707 unsigned long flags, struct file *file, long pages)
16708 {
16709 @@ -84450,7 +83013,7 @@ index f952cc8..b9f6135 100644
16710 mm->total_vm += pages;
16711 }
16712 #endif /* CONFIG_PROC_FS */
16713 -@@ -2104,7 +2119,7 @@ extern int unpoison_memory(unsigned long pfn);
16714 +@@ -2126,7 +2152,7 @@ extern int unpoison_memory(unsigned long pfn);
16715 extern int sysctl_memory_failure_early_kill;
16716 extern int sysctl_memory_failure_recovery;
16717 extern void shake_page(struct page *p, int access);
16718 @@ -84459,7 +83022,7 @@ index f952cc8..b9f6135 100644
16719 extern int soft_offline_page(struct page *page, int flags);
16720
16721 #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS)
16722 -@@ -2139,5 +2154,11 @@ void __init setup_nr_node_ids(void);
16723 +@@ -2161,5 +2187,11 @@ void __init setup_nr_node_ids(void);
16724 static inline void setup_nr_node_ids(void) {}
16725 #endif
16726
16727 @@ -84536,7 +83099,7 @@ index c5d5278..f0b68c8 100644
16728 }
16729
16730 diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
16731 -index b21bac4..94142ca 100644
16732 +index ffe66e3..b310722 100644
16733 --- a/include/linux/mmzone.h
16734 +++ b/include/linux/mmzone.h
16735 @@ -527,7 +527,7 @@ struct zone {
16736 @@ -84547,7 +83110,7 @@ index b21bac4..94142ca 100644
16737 + atomic_long_unchecked_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
16738 } ____cacheline_internodealigned_in_smp;
16739
16740 - typedef enum {
16741 + enum zone_flags {
16742 diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
16743 index 44eeef0..a92d3f9 100644
16744 --- a/include/linux/mod_devicetable.h
16745 @@ -84765,10 +83328,10 @@ index 7eeb9bb..68f37e0 100644
16746 }
16747 #endif
16748 diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
16749 -index 494f99e..5059f63 100644
16750 +index 1c9effa..1160bdd 100644
16751 --- a/include/linux/moduleparam.h
16752 +++ b/include/linux/moduleparam.h
16753 -@@ -293,7 +293,7 @@ static inline void __kernel_param_unlock(void)
16754 +@@ -323,7 +323,7 @@ static inline void __kernel_param_unlock(void)
16755 * @len is usually just sizeof(string).
16756 */
16757 #define module_param_string(name, string, len, perm) \
16758 @@ -84777,7 +83340,7 @@ index 494f99e..5059f63 100644
16759 = { len, string }; \
16760 __module_param_call(MODULE_PARAM_PREFIX, name, \
16761 &param_ops_string, \
16762 -@@ -437,7 +437,7 @@ extern int param_set_bint(const char *val, const struct kernel_param *kp);
16763 +@@ -467,7 +467,7 @@ extern int param_set_bint(const char *val, const struct kernel_param *kp);
16764 */
16765 #define module_param_array_named(name, array, type, nump, perm) \
16766 param_check_##type(name, &(array)[0]); \
16767 @@ -84787,7 +83350,7 @@ index 494f99e..5059f63 100644
16768 .ops = &param_ops_##type, \
16769 .elemsize = sizeof(array[0]), .elem = array }; \
16770 diff --git a/include/linux/mount.h b/include/linux/mount.h
16771 -index 9262e4b..0a45f98 100644
16772 +index c2c561d..a5f2a8c 100644
16773 --- a/include/linux/mount.h
16774 +++ b/include/linux/mount.h
16775 @@ -66,7 +66,7 @@ struct vfsmount {
16776 @@ -84841,18 +83404,18 @@ index 17d8339..81656c0 100644
16777 struct iovec;
16778 struct kvec;
16779 diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
16780 -index c8e388e..5d8cd9b 100644
16781 +index 74fd5d3..86a1e4f 100644
16782 --- a/include/linux/netdevice.h
16783 +++ b/include/linux/netdevice.h
16784 -@@ -1147,6 +1147,7 @@ struct net_device_ops {
16785 - void *priv);
16786 - int (*ndo_get_lock_subclass)(struct net_device *dev);
16787 +@@ -1156,6 +1156,7 @@ struct net_device_ops {
16788 + bool (*ndo_gso_check) (struct sk_buff *skb,
16789 + struct net_device *dev);
16790 };
16791 +typedef struct net_device_ops __no_const net_device_ops_no_const;
16792
16793 /**
16794 * enum net_device_priv_flags - &struct net_device priv_flags
16795 -@@ -1485,10 +1486,10 @@ struct net_device {
16796 +@@ -1498,10 +1499,10 @@ struct net_device {
16797
16798 struct net_device_stats stats;
16799
16800 @@ -84994,7 +83557,7 @@ index d137218..be0c176 100644
16801 extern void path_get(const struct path *);
16802 extern void path_put(const struct path *);
16803 diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
16804 -index 5f2e559..7d59314 100644
16805 +index 2706ee9..e691f7c 100644
16806 --- a/include/linux/pci_hotplug.h
16807 +++ b/include/linux/pci_hotplug.h
16808 @@ -71,7 +71,8 @@ struct hotplug_slot_ops {
16809 @@ -85008,10 +83571,10 @@ index 5f2e559..7d59314 100644
16810 /**
16811 * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot
16812 diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
16813 -index 707617a..28a2e7e 100644
16814 +index 893a0d0..d5f996e 100644
16815 --- a/include/linux/perf_event.h
16816 +++ b/include/linux/perf_event.h
16817 -@@ -339,8 +339,8 @@ struct perf_event {
16818 +@@ -341,8 +341,8 @@ struct perf_event {
16819
16820 enum perf_event_active_state state;
16821 unsigned int attach_state;
16822 @@ -85022,7 +83585,7 @@ index 707617a..28a2e7e 100644
16823
16824 /*
16825 * These are the total time in nanoseconds that the event
16826 -@@ -391,8 +391,8 @@ struct perf_event {
16827 +@@ -393,8 +393,8 @@ struct perf_event {
16828 * These accumulate total time (in nanoseconds) that children
16829 * events have been enabled and running, respectively.
16830 */
16831 @@ -85033,7 +83596,7 @@ index 707617a..28a2e7e 100644
16832
16833 /*
16834 * Protect attach/detach and child_list:
16835 -@@ -722,7 +722,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64
16836 +@@ -734,7 +734,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64
16837 entry->ip[entry->nr++] = ip;
16838 }
16839
16840 @@ -85042,7 +83605,7 @@ index 707617a..28a2e7e 100644
16841 extern int sysctl_perf_event_mlock;
16842 extern int sysctl_perf_event_sample_rate;
16843 extern int sysctl_perf_cpu_time_max_percent;
16844 -@@ -737,19 +737,24 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
16845 +@@ -749,19 +749,24 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
16846 loff_t *ppos);
16847
16848
16849 @@ -85070,7 +83633,7 @@ index 707617a..28a2e7e 100644
16850 }
16851
16852 extern void perf_event_init(void);
16853 -@@ -880,7 +885,7 @@ struct perf_pmu_events_attr {
16854 +@@ -892,7 +897,7 @@ struct perf_pmu_events_attr {
16855 struct device_attribute attr;
16856 u64 id;
16857 const char *event_str;
16858 @@ -85112,29 +83675,29 @@ index eb8b8ac..62649e1 100644
16859 unsigned int w_counter;
16860 struct page *tmp_page;
16861 diff --git a/include/linux/pm.h b/include/linux/pm.h
16862 -index 72c0fe0..26918ed 100644
16863 +index 383fd68..7a11504 100644
16864 --- a/include/linux/pm.h
16865 +++ b/include/linux/pm.h
16866 -@@ -620,6 +620,7 @@ extern int dev_pm_put_subsys_data(struct device *dev);
16867 - struct dev_pm_domain {
16868 +@@ -621,6 +621,7 @@ struct dev_pm_domain {
16869 struct dev_pm_ops ops;
16870 + void (*detach)(struct device *dev, bool power_off);
16871 };
16872 +typedef struct dev_pm_domain __no_const dev_pm_domain_no_const;
16873
16874 /*
16875 * The PM_EVENT_ messages are also used by drivers implementing the legacy
16876 diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
16877 -index ebc4c76..7fab7b0 100644
16878 +index 2e0e06d..824cc9b 100644
16879 --- a/include/linux/pm_domain.h
16880 +++ b/include/linux/pm_domain.h
16881 -@@ -44,11 +44,11 @@ struct gpd_dev_ops {
16882 - int (*thaw_early)(struct device *dev);
16883 - int (*thaw)(struct device *dev);
16884 +@@ -36,11 +36,11 @@ struct gpd_dev_ops {
16885 + int (*save_state)(struct device *dev);
16886 + int (*restore_state)(struct device *dev);
16887 bool (*active_wakeup)(struct device *dev);
16888 -};
16889 +} __no_const;
16890
16891 - struct gpd_cpu_data {
16892 + struct gpd_cpuidle_data {
16893 unsigned int saved_exit_latency;
16894 - struct cpuidle_state *idle_state;
16895 + cpuidle_state_no_const *idle_state;
16896 @@ -85302,7 +83865,7 @@ index d78125f..7f36596 100644
16897 extern void wake_up_klogd(void);
16898
16899 diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
16900 -index 9d117f6..d832b31 100644
16901 +index b97bf2e..f14c92d4 100644
16902 --- a/include/linux/proc_fs.h
16903 +++ b/include/linux/proc_fs.h
16904 @@ -17,8 +17,11 @@ extern void proc_flush_task(struct task_struct *);
16905 @@ -85350,7 +83913,7 @@ index 9d117f6..d832b31 100644
16906 static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,
16907 umode_t mode, struct proc_dir_entry *parent) { return NULL; }
16908 #define proc_create(name, mode, parent, proc_fops) ({NULL;})
16909 -@@ -77,7 +97,7 @@ static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *p
16910 +@@ -79,7 +99,7 @@ struct net;
16911 static inline struct proc_dir_entry *proc_net_mkdir(
16912 struct net *net, const char *name, struct proc_dir_entry *parent)
16913 {
16914 @@ -85386,7 +83949,7 @@ index 80d345a..9e89a9a 100644
16915 extern bool qid_valid(struct kqid qid);
16916
16917 diff --git a/include/linux/random.h b/include/linux/random.h
16918 -index 57fbbff..2170304 100644
16919 +index b05856e..0a9f14e 100644
16920 --- a/include/linux/random.h
16921 +++ b/include/linux/random.h
16922 @@ -9,9 +9,19 @@
16923 @@ -85421,12 +83984,12 @@ index 57fbbff..2170304 100644
16924
16925 -u32 prandom_u32(void);
16926 +u32 prandom_u32(void) __intentional_overflow(-1);
16927 - void prandom_bytes(void *buf, int nbytes);
16928 + void prandom_bytes(void *buf, size_t nbytes);
16929 void prandom_seed(u32 seed);
16930 void prandom_reseed_late(void);
16931 @@ -37,6 +47,11 @@ struct rnd_state {
16932 u32 prandom_u32_state(struct rnd_state *state);
16933 - void prandom_bytes_state(struct rnd_state *state, void *buf, int nbytes);
16934 + void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes);
16935
16936 +static inline unsigned long __intentional_overflow(-1) pax_get_random_long(void)
16937 +{
16938 @@ -85436,7 +83999,7 @@ index 57fbbff..2170304 100644
16939 /**
16940 * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro)
16941 * @ep_ro: right open interval endpoint
16942 -@@ -49,7 +64,7 @@ void prandom_bytes_state(struct rnd_state *state, void *buf, int nbytes);
16943 +@@ -49,7 +64,7 @@ void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes);
16944 *
16945 * Returns: pseudo-random number in interval [0, ep_ro)
16946 */
16947 @@ -85446,10 +84009,10 @@ index 57fbbff..2170304 100644
16948 return (u32)(((u64) prandom_u32() * ep_ro) >> 32);
16949 }
16950 diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h
16951 -index fea49b5..2ac22bb 100644
16952 +index 378c5ee..aa84a47 100644
16953 --- a/include/linux/rbtree_augmented.h
16954 +++ b/include/linux/rbtree_augmented.h
16955 -@@ -80,7 +80,9 @@ rbname ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new) \
16956 +@@ -90,7 +90,9 @@ rbname ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new) \
16957 old->rbaugmented = rbcompute(old); \
16958 } \
16959 rbstatic const struct rb_augment_callbacks rbname = { \
16960 @@ -85519,11 +84082,24 @@ index 372ad5e..d4373f8 100644
16961 /**
16962 * hlist_del_init_rcu - deletes entry from hash list with re-initialization
16963 * @n: the element to delete from the hash list.
16964 +diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
16965 +index 53ff1a7..c40f0ab 100644
16966 +--- a/include/linux/rcupdate.h
16967 ++++ b/include/linux/rcupdate.h
16968 +@@ -332,7 +332,7 @@ extern struct srcu_struct tasks_rcu_exit_srcu;
16969 + #define rcu_note_voluntary_context_switch(t) \
16970 + do { \
16971 + if (ACCESS_ONCE((t)->rcu_tasks_holdout)) \
16972 +- ACCESS_ONCE((t)->rcu_tasks_holdout) = false; \
16973 ++ ACCESS_ONCE_RW((t)->rcu_tasks_holdout) = false; \
16974 + } while (0)
16975 + #else /* #ifdef CONFIG_TASKS_RCU */
16976 + #define TASKS_RCU(x) do { } while (0)
16977 diff --git a/include/linux/reboot.h b/include/linux/reboot.h
16978 -index 48bf152..d38b785 100644
16979 +index 67fc8fc..a90f7d8 100644
16980 --- a/include/linux/reboot.h
16981 +++ b/include/linux/reboot.h
16982 -@@ -44,9 +44,9 @@ extern int unregister_reboot_notifier(struct notifier_block *);
16983 +@@ -47,9 +47,9 @@ extern void do_kernel_restart(char *cmd);
16984 */
16985
16986 extern void migrate_to_reboot_cpu(void);
16987 @@ -85536,7 +84112,7 @@ index 48bf152..d38b785 100644
16988
16989 extern void machine_shutdown(void);
16990 struct pt_regs;
16991 -@@ -57,9 +57,9 @@ extern void machine_crash_shutdown(struct pt_regs *);
16992 +@@ -60,9 +60,9 @@ extern void machine_crash_shutdown(struct pt_regs *);
16993 */
16994
16995 extern void kernel_restart_prepare(char *cmd);
16996 @@ -85549,7 +84125,7 @@ index 48bf152..d38b785 100644
16997
16998 extern int C_A_D; /* for sysctl */
16999 void ctrl_alt_del(void);
17000 -@@ -73,7 +73,7 @@ extern int orderly_poweroff(bool force);
17001 +@@ -76,7 +76,7 @@ extern int orderly_poweroff(bool force);
17002 * Emergency restart, callable from an interrupt handler.
17003 */
17004
17005 @@ -85599,7 +84175,7 @@ index 6bda06f..bf39a9b 100644
17006 #define RIO_RESOURCE_MEM 0x00000100
17007 #define RIO_RESOURCE_DOORBELL 0x00000200
17008 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
17009 -index be57450..31cf65e 100644
17010 +index c0c2bce..4813524 100644
17011 --- a/include/linux/rmap.h
17012 +++ b/include/linux/rmap.h
17013 @@ -144,8 +144,8 @@ static inline void anon_vma_unlock_read(struct anon_vma *anon_vma)
17014 @@ -85639,10 +84215,10 @@ index ed8f9e7..999bc96 100644
17015 }
17016
17017 diff --git a/include/linux/sched.h b/include/linux/sched.h
17018 -index 2b1d9e9..7fd5067 100644
17019 +index 5e344bb..0743255 100644
17020 --- a/include/linux/sched.h
17021 +++ b/include/linux/sched.h
17022 -@@ -132,6 +132,7 @@ struct fs_struct;
17023 +@@ -133,6 +133,7 @@ struct fs_struct;
17024 struct perf_event_context;
17025 struct blk_plug;
17026 struct filename;
17027 @@ -85650,7 +84226,7 @@ index 2b1d9e9..7fd5067 100644
17028
17029 #define VMACACHE_BITS 2
17030 #define VMACACHE_SIZE (1U << VMACACHE_BITS)
17031 -@@ -374,7 +375,7 @@ extern char __sched_text_start[], __sched_text_end[];
17032 +@@ -376,7 +377,7 @@ extern char __sched_text_start[], __sched_text_end[];
17033 extern int in_sched_functions(unsigned long addr);
17034
17035 #define MAX_SCHEDULE_TIMEOUT LONG_MAX
17036 @@ -85659,7 +84235,7 @@ index 2b1d9e9..7fd5067 100644
17037 extern signed long schedule_timeout_interruptible(signed long timeout);
17038 extern signed long schedule_timeout_killable(signed long timeout);
17039 extern signed long schedule_timeout_uninterruptible(signed long timeout);
17040 -@@ -385,6 +386,19 @@ struct nsproxy;
17041 +@@ -387,6 +388,19 @@ struct nsproxy;
17042 struct user_namespace;
17043
17044 #ifdef CONFIG_MMU
17045 @@ -85679,7 +84255,7 @@ index 2b1d9e9..7fd5067 100644
17046 extern void arch_pick_mmap_layout(struct mm_struct *mm);
17047 extern unsigned long
17048 arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
17049 -@@ -682,6 +696,17 @@ struct signal_struct {
17050 +@@ -685,6 +699,17 @@ struct signal_struct {
17051 #ifdef CONFIG_TASKSTATS
17052 struct taskstats *stats;
17053 #endif
17054 @@ -85697,7 +84273,7 @@ index 2b1d9e9..7fd5067 100644
17055 #ifdef CONFIG_AUDIT
17056 unsigned audit_tty;
17057 unsigned audit_tty_log_passwd;
17058 -@@ -708,7 +733,7 @@ struct signal_struct {
17059 +@@ -711,7 +736,7 @@ struct signal_struct {
17060 struct mutex cred_guard_mutex; /* guard against foreign influences on
17061 * credential calculations
17062 * (notably. ptrace) */
17063 @@ -85706,7 +84282,7 @@ index 2b1d9e9..7fd5067 100644
17064
17065 /*
17066 * Bits in flags field of signal_struct.
17067 -@@ -761,6 +786,14 @@ struct user_struct {
17068 +@@ -764,6 +789,14 @@ struct user_struct {
17069 struct key *session_keyring; /* UID's default session keyring */
17070 #endif
17071
17072 @@ -85721,7 +84297,7 @@ index 2b1d9e9..7fd5067 100644
17073 /* Hash table maintenance information */
17074 struct hlist_node uidhash_node;
17075 kuid_t uid;
17076 -@@ -768,7 +801,7 @@ struct user_struct {
17077 +@@ -771,7 +804,7 @@ struct user_struct {
17078 #ifdef CONFIG_PERF_EVENTS
17079 atomic_long_t locked_vm;
17080 #endif
17081 @@ -85730,7 +84306,7 @@ index 2b1d9e9..7fd5067 100644
17082
17083 extern int uids_sysfs_init(void);
17084
17085 -@@ -1224,6 +1257,9 @@ enum perf_event_task_context {
17086 +@@ -1235,6 +1268,9 @@ enum perf_event_task_context {
17087 struct task_struct {
17088 volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
17089 void *stack;
17090 @@ -85740,7 +84316,7 @@ index 2b1d9e9..7fd5067 100644
17091 atomic_t usage;
17092 unsigned int flags; /* per process flags, defined below */
17093 unsigned int ptrace;
17094 -@@ -1345,8 +1381,8 @@ struct task_struct {
17095 +@@ -1362,8 +1398,8 @@ struct task_struct {
17096 struct list_head thread_node;
17097
17098 struct completion *vfork_done; /* for vfork() */
17099 @@ -85751,7 +84327,7 @@ index 2b1d9e9..7fd5067 100644
17100
17101 cputime_t utime, stime, utimescaled, stimescaled;
17102 cputime_t gtime;
17103 -@@ -1371,11 +1407,6 @@ struct task_struct {
17104 +@@ -1388,11 +1424,6 @@ struct task_struct {
17105 struct task_cputime cputime_expires;
17106 struct list_head cpu_timers[3];
17107
17108 @@ -85763,7 +84339,7 @@ index 2b1d9e9..7fd5067 100644
17109 char comm[TASK_COMM_LEN]; /* executable name excluding path
17110 - access with [gs]et_task_comm (which lock
17111 it with task_lock())
17112 -@@ -1393,6 +1424,10 @@ struct task_struct {
17113 +@@ -1410,6 +1441,10 @@ struct task_struct {
17114 #endif
17115 /* CPU-specific state of this task */
17116 struct thread_struct thread;
17117 @@ -85774,7 +84350,7 @@ index 2b1d9e9..7fd5067 100644
17118 /* filesystem information */
17119 struct fs_struct *fs;
17120 /* open file information */
17121 -@@ -1467,6 +1502,10 @@ struct task_struct {
17122 +@@ -1484,6 +1519,10 @@ struct task_struct {
17123 gfp_t lockdep_reclaim_gfp;
17124 #endif
17125
17126 @@ -85785,7 +84361,7 @@ index 2b1d9e9..7fd5067 100644
17127 /* journalling filesystem info */
17128 void *journal_info;
17129
17130 -@@ -1505,6 +1544,10 @@ struct task_struct {
17131 +@@ -1522,6 +1561,10 @@ struct task_struct {
17132 /* cg_list protected by css_set_lock and tsk->alloc_lock */
17133 struct list_head cg_list;
17134 #endif
17135 @@ -85796,7 +84372,7 @@ index 2b1d9e9..7fd5067 100644
17136 #ifdef CONFIG_FUTEX
17137 struct robust_list_head __user *robust_list;
17138 #ifdef CONFIG_COMPAT
17139 -@@ -1618,7 +1661,7 @@ struct task_struct {
17140 +@@ -1635,7 +1678,7 @@ struct task_struct {
17141 * Number of functions that haven't been traced
17142 * because of depth overrun.
17143 */
17144 @@ -85805,7 +84381,7 @@ index 2b1d9e9..7fd5067 100644
17145 /* Pause for the tracing */
17146 atomic_t tracing_graph_pause;
17147 #endif
17148 -@@ -1644,7 +1687,78 @@ struct task_struct {
17149 +@@ -1661,7 +1704,78 @@ struct task_struct {
17150 unsigned int sequential_io;
17151 unsigned int sequential_io_avg;
17152 #endif
17153 @@ -85885,7 +84461,7 @@ index 2b1d9e9..7fd5067 100644
17154
17155 /* Future-safe accessor for struct task_struct's cpus_allowed. */
17156 #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
17157 -@@ -1726,7 +1840,7 @@ struct pid_namespace;
17158 +@@ -1743,7 +1857,7 @@ struct pid_namespace;
17159 pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
17160 struct pid_namespace *ns);
17161
17162 @@ -85894,7 +84470,7 @@ index 2b1d9e9..7fd5067 100644
17163 {
17164 return tsk->pid;
17165 }
17166 -@@ -2097,6 +2211,25 @@ extern u64 sched_clock_cpu(int cpu);
17167 +@@ -2106,6 +2220,25 @@ extern u64 sched_clock_cpu(int cpu);
17168
17169 extern void sched_clock_init(void);
17170
17171 @@ -85920,7 +84496,7 @@ index 2b1d9e9..7fd5067 100644
17172 #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
17173 static inline void sched_clock_tick(void)
17174 {
17175 -@@ -2230,7 +2363,9 @@ void yield(void);
17176 +@@ -2239,7 +2372,9 @@ void yield(void);
17177 extern struct exec_domain default_exec_domain;
17178
17179 union thread_union {
17180 @@ -85930,7 +84506,7 @@ index 2b1d9e9..7fd5067 100644
17181 unsigned long stack[THREAD_SIZE/sizeof(long)];
17182 };
17183
17184 -@@ -2263,6 +2398,7 @@ extern struct pid_namespace init_pid_ns;
17185 +@@ -2272,6 +2407,7 @@ extern struct pid_namespace init_pid_ns;
17186 */
17187
17188 extern struct task_struct *find_task_by_vpid(pid_t nr);
17189 @@ -85938,7 +84514,7 @@ index 2b1d9e9..7fd5067 100644
17190 extern struct task_struct *find_task_by_pid_ns(pid_t nr,
17191 struct pid_namespace *ns);
17192
17193 -@@ -2427,7 +2563,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
17194 +@@ -2436,7 +2572,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
17195 extern void exit_itimers(struct signal_struct *);
17196 extern void flush_itimer_signals(void);
17197
17198 @@ -85947,9 +84523,9 @@ index 2b1d9e9..7fd5067 100644
17199
17200 extern int do_execve(struct filename *,
17201 const char __user * const __user *,
17202 -@@ -2642,9 +2778,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
17203 -
17204 - #endif
17205 +@@ -2653,9 +2789,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
17206 + #define task_stack_end_corrupted(task) \
17207 + (*(end_of_stack(task)) != STACK_END_MAGIC)
17208
17209 -static inline int object_is_on_stack(void *obj)
17210 +static inline int object_starts_on_stack(const void *obj)
17211 @@ -85972,7 +84548,7 @@ index 596a0e0..bea77ec 100644
17212 extern unsigned int sysctl_sched_latency;
17213 extern unsigned int sysctl_sched_min_granularity;
17214 diff --git a/include/linux/security.h b/include/linux/security.h
17215 -index 623f90e..90b39da 100644
17216 +index ba96471..74fb3f6 100644
17217 --- a/include/linux/security.h
17218 +++ b/include/linux/security.h
17219 @@ -27,6 +27,7 @@
17220 @@ -86068,10 +84644,10 @@ index 6fb8016..ab4465e 100644
17221
17222 /* shm_mode upper byte flags */
17223 diff --git a/include/linux/signal.h b/include/linux/signal.h
17224 -index 750196f..ae7a3a4 100644
17225 +index ab1e039..ad4229e 100644
17226 --- a/include/linux/signal.h
17227 +++ b/include/linux/signal.h
17228 -@@ -292,7 +292,7 @@ static inline void allow_signal(int sig)
17229 +@@ -289,7 +289,7 @@ static inline void allow_signal(int sig)
17230 * know it'll be handled, so that they don't get converted to
17231 * SIGKILL or just silently dropped.
17232 */
17233 @@ -86081,10 +84657,10 @@ index 750196f..ae7a3a4 100644
17234
17235 static inline void disallow_signal(int sig)
17236 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
17237 -index abde271..bc9ece1 100644
17238 +index 6c8b6f6..5a0f4bd 100644
17239 --- a/include/linux/skbuff.h
17240 +++ b/include/linux/skbuff.h
17241 -@@ -728,7 +728,7 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
17242 +@@ -773,7 +773,7 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
17243 struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags,
17244 int node);
17245 struct sk_buff *build_skb(void *data, unsigned int frag_size);
17246 @@ -86093,7 +84669,7 @@ index abde271..bc9ece1 100644
17247 gfp_t priority)
17248 {
17249 return __alloc_skb(size, priority, 0, NUMA_NO_NODE);
17250 -@@ -1845,7 +1845,7 @@ static inline u32 skb_inner_network_header_len(const struct sk_buff *skb)
17251 +@@ -1962,7 +1962,7 @@ static inline u32 skb_inner_network_header_len(const struct sk_buff *skb)
17252 return skb->inner_transport_header - skb->inner_network_header;
17253 }
17254
17255 @@ -86102,7 +84678,7 @@ index abde271..bc9ece1 100644
17256 {
17257 return skb_network_header(skb) - skb->data;
17258 }
17259 -@@ -1917,7 +1917,7 @@ static inline void skb_pop_rcv_encapsulation(struct sk_buff *skb)
17260 +@@ -2022,7 +2022,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
17261 * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
17262 */
17263 #ifndef NET_SKB_PAD
17264 @@ -86111,7 +84687,7 @@ index abde271..bc9ece1 100644
17265 #endif
17266
17267 int ___pskb_trim(struct sk_buff *skb, unsigned int len);
17268 -@@ -2524,7 +2524,7 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
17269 +@@ -2629,7 +2629,7 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
17270 int *err);
17271 unsigned int datagram_poll(struct file *file, struct socket *sock,
17272 struct poll_table_struct *wait);
17273 @@ -86120,7 +84696,7 @@ index abde271..bc9ece1 100644
17274 struct iovec *to, int size);
17275 int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, int hlen,
17276 struct iovec *iov);
17277 -@@ -2918,6 +2918,9 @@ static inline void nf_reset(struct sk_buff *skb)
17278 +@@ -3091,6 +3091,9 @@ static inline void nf_reset(struct sk_buff *skb)
17279 nf_bridge_put(skb->nf_bridge);
17280 skb->nf_bridge = NULL;
17281 #endif
17282 @@ -86131,7 +84707,7 @@ index abde271..bc9ece1 100644
17283
17284 static inline void nf_reset_trace(struct sk_buff *skb)
17285 diff --git a/include/linux/slab.h b/include/linux/slab.h
17286 -index 1d9abb7..b1e8b10 100644
17287 +index c265bec..4867d28 100644
17288 --- a/include/linux/slab.h
17289 +++ b/include/linux/slab.h
17290 @@ -14,15 +14,29 @@
17291 @@ -86191,16 +84767,7 @@ index 1d9abb7..b1e8b10 100644
17292
17293 /*
17294 * Some archs want to perform DMA into kmalloc caches and need a guaranteed
17295 -@@ -176,7 +195,7 @@ struct kmem_cache {
17296 - unsigned int align; /* Alignment as calculated */
17297 - unsigned long flags; /* Active flags on the slab */
17298 - const char *name; /* Slab name for sysfs */
17299 -- int refcount; /* Use counter */
17300 -+ atomic_t refcount; /* Use counter */
17301 - void (*ctor)(void *); /* Called on object slot creation */
17302 - struct list_head list; /* List of all slab caches on the system */
17303 - };
17304 -@@ -261,6 +280,10 @@ extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
17305 +@@ -236,6 +255,10 @@ extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
17306 extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
17307 #endif
17308
17309 @@ -86211,7 +84778,7 @@ index 1d9abb7..b1e8b10 100644
17310 /*
17311 * Figure out which kmalloc slab an allocation of a certain size
17312 * belongs to.
17313 -@@ -269,7 +292,7 @@ extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
17314 +@@ -244,7 +267,7 @@ extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
17315 * 2 = 120 .. 192 bytes
17316 * n = 2^(n-1) .. 2^n -1
17317 */
17318 @@ -86220,7 +84787,7 @@ index 1d9abb7..b1e8b10 100644
17319 {
17320 if (!size)
17321 return 0;
17322 -@@ -312,11 +335,11 @@ static __always_inline int kmalloc_index(size_t size)
17323 +@@ -287,11 +310,11 @@ static __always_inline int kmalloc_index(size_t size)
17324 }
17325 #endif /* !CONFIG_SLOB */
17326
17327 @@ -86235,10 +84802,10 @@ index 1d9abb7..b1e8b10 100644
17328 #else
17329 static __always_inline void *__kmalloc_node(size_t size, gfp_t flags, int node)
17330 diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
17331 -index 8235dfb..47ce586 100644
17332 +index b869d16..1453c73 100644
17333 --- a/include/linux/slab_def.h
17334 +++ b/include/linux/slab_def.h
17335 -@@ -38,7 +38,7 @@ struct kmem_cache {
17336 +@@ -40,7 +40,7 @@ struct kmem_cache {
17337 /* 4) cache creation/removal */
17338 const char *name;
17339 struct list_head list;
17340 @@ -86247,7 +84814,7 @@ index 8235dfb..47ce586 100644
17341 int object_size;
17342 int align;
17343
17344 -@@ -54,10 +54,14 @@ struct kmem_cache {
17345 +@@ -56,10 +56,14 @@ struct kmem_cache {
17346 unsigned long node_allocs;
17347 unsigned long node_frees;
17348 unsigned long node_overflow;
17349 @@ -86280,10 +84847,10 @@ index d82abd4..408c3a0 100644
17350 int inuse; /* Offset to metadata */
17351 int align; /* Alignment */
17352 diff --git a/include/linux/smp.h b/include/linux/smp.h
17353 -index 34347f2..8739978 100644
17354 +index 93dff5f..933c561 100644
17355 --- a/include/linux/smp.h
17356 +++ b/include/linux/smp.h
17357 -@@ -174,7 +174,9 @@ static inline void kick_all_cpus_sync(void) { }
17358 +@@ -176,7 +176,9 @@ static inline void wake_up_all_idle_cpus(void) { }
17359 #endif
17360
17361 #define get_cpu() ({ preempt_disable(); smp_processor_id(); })
17362 @@ -86367,10 +84934,10 @@ index 70736b9..37f33db 100644
17363 #ifdef __KERNEL__
17364
17365 diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
17366 -index cf61ecd..a4a9bc0 100644
17367 +index 2167846..0648fc3 100644
17368 --- a/include/linux/sunrpc/svc.h
17369 +++ b/include/linux/sunrpc/svc.h
17370 -@@ -417,7 +417,7 @@ struct svc_procedure {
17371 +@@ -416,7 +416,7 @@ struct svc_procedure {
17372 unsigned int pc_count; /* call count */
17373 unsigned int pc_cachetype; /* cache info (NFS) */
17374 unsigned int pc_xdrressize; /* maximum size of XDR reply */
17375 @@ -86436,10 +85003,10 @@ index e7a018e..49f8b17 100644
17376 extern dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
17377 unsigned long offset, size_t size,
17378 diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
17379 -index 0f86d85..dff3419 100644
17380 +index bda9b81..629e06e 100644
17381 --- a/include/linux/syscalls.h
17382 +++ b/include/linux/syscalls.h
17383 -@@ -98,10 +98,16 @@ struct sigaltstack;
17384 +@@ -99,10 +99,16 @@ union bpf_attr;
17385 #define __MAP(n,...) __MAP##n(__VA_ARGS__)
17386
17387 #define __SC_DECL(t, a) t a
17388 @@ -86457,7 +85024,7 @@ index 0f86d85..dff3419 100644
17389 #define __SC_CAST(t, a) (t) a
17390 #define __SC_ARGS(t, a) a
17391 #define __SC_TEST(t, a) (void)BUILD_BUG_ON_ZERO(!__TYPE_IS_LL(t) && sizeof(t) > sizeof(long))
17392 -@@ -383,11 +389,11 @@ asmlinkage long sys_sync(void);
17393 +@@ -384,11 +390,11 @@ asmlinkage long sys_sync(void);
17394 asmlinkage long sys_fsync(unsigned int fd);
17395 asmlinkage long sys_fdatasync(unsigned int fd);
17396 asmlinkage long sys_bdflush(int func, long data);
17397 @@ -86473,7 +85040,7 @@ index 0f86d85..dff3419 100644
17398 asmlinkage long sys_truncate(const char __user *path, long length);
17399 asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length);
17400 asmlinkage long sys_stat(const char __user *filename,
17401 -@@ -599,7 +605,7 @@ asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
17402 +@@ -600,7 +606,7 @@ asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
17403 asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *);
17404 asmlinkage long sys_send(int, void __user *, size_t, unsigned);
17405 asmlinkage long sys_sendto(int, void __user *, size_t, unsigned,
17406 @@ -86592,7 +85159,7 @@ index ff307b5..f1a4468 100644
17407
17408 #endif /* _LINUX_THREAD_INFO_H */
17409 diff --git a/include/linux/tty.h b/include/linux/tty.h
17410 -index 8413294..44391c7 100644
17411 +index 5171ef8..1048d83e 100644
17412 --- a/include/linux/tty.h
17413 +++ b/include/linux/tty.h
17414 @@ -202,7 +202,7 @@ struct tty_port {
17415 @@ -86604,7 +85171,7 @@ index 8413294..44391c7 100644
17416 wait_queue_head_t open_wait; /* Open waiters */
17417 wait_queue_head_t close_wait; /* Close waiters */
17418 wait_queue_head_t delta_msr_wait; /* Modem status change */
17419 -@@ -284,7 +284,7 @@ struct tty_struct {
17420 +@@ -290,7 +290,7 @@ struct tty_struct {
17421 /* If the tty has a pending do_SAK, queue it here - akpm */
17422 struct work_struct SAK_work;
17423 struct tty_port *port;
17424 @@ -86613,7 +85180,7 @@ index 8413294..44391c7 100644
17425
17426 /* Each of a tty's open files has private_data pointing to tty_file_private */
17427 struct tty_file_private {
17428 -@@ -548,7 +548,7 @@ extern int tty_port_open(struct tty_port *port,
17429 +@@ -555,7 +555,7 @@ extern int tty_port_open(struct tty_port *port,
17430 struct tty_struct *tty, struct file *filp);
17431 static inline int tty_port_users(struct tty_port *port)
17432 {
17433 @@ -86623,10 +85190,10 @@ index 8413294..44391c7 100644
17434
17435 extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc);
17436 diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
17437 -index e48c608..6a19af2 100644
17438 +index 92e337c..f46757b 100644
17439 --- a/include/linux/tty_driver.h
17440 +++ b/include/linux/tty_driver.h
17441 -@@ -287,7 +287,7 @@ struct tty_operations {
17442 +@@ -291,7 +291,7 @@ struct tty_operations {
17443 void (*poll_put_char)(struct tty_driver *driver, int line, char ch);
17444 #endif
17445 const struct file_operations *proc_fops;
17446 @@ -86635,7 +85202,7 @@ index e48c608..6a19af2 100644
17447
17448 struct tty_driver {
17449 int magic; /* magic number for this structure */
17450 -@@ -321,7 +321,7 @@ struct tty_driver {
17451 +@@ -325,7 +325,7 @@ struct tty_driver {
17452
17453 const struct tty_operations *ops;
17454 struct list_head tty_drivers;
17455 @@ -86721,6 +85288,19 @@ index 2d1f9b6..d7a9fce 100644
17456 +#define gr_is_global_nonroot(x) (!uid_eq((x), GLOBAL_ROOT_UID))
17457 +
17458 #endif /* _LINUX_UIDGID_H */
17459 +diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h
17460 +index baa8171..9ca98ba 100644
17461 +--- a/include/linux/uio_driver.h
17462 ++++ b/include/linux/uio_driver.h
17463 +@@ -67,7 +67,7 @@ struct uio_device {
17464 + struct module *owner;
17465 + struct device *dev;
17466 + int minor;
17467 +- atomic_t event;
17468 ++ atomic_unchecked_t event;
17469 + struct fasync_struct *async_queue;
17470 + wait_queue_head_t wait;
17471 + struct uio_info *info;
17472 diff --git a/include/linux/unaligned/access_ok.h b/include/linux/unaligned/access_ok.h
17473 index 99c1b4d..562e6f3 100644
17474 --- a/include/linux/unaligned/access_ok.h
17475 @@ -86772,40 +85352,8 @@ index 99c1b4d..562e6f3 100644
17476 }
17477
17478 static inline void put_unaligned_le16(u16 val, void *p)
17479 -diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
17480 -index 4f844c6..60beb5d 100644
17481 ---- a/include/linux/uprobes.h
17482 -+++ b/include/linux/uprobes.h
17483 -@@ -98,11 +98,11 @@ struct uprobes_state {
17484 - struct xol_area *xol_area;
17485 - };
17486 -
17487 --extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
17488 --extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
17489 --extern bool __weak is_swbp_insn(uprobe_opcode_t *insn);
17490 --extern bool __weak is_trap_insn(uprobe_opcode_t *insn);
17491 --extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs);
17492 -+extern int set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
17493 -+extern int set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
17494 -+extern bool is_swbp_insn(uprobe_opcode_t *insn);
17495 -+extern bool is_trap_insn(uprobe_opcode_t *insn);
17496 -+extern unsigned long uprobe_get_swbp_addr(struct pt_regs *regs);
17497 - extern unsigned long uprobe_get_trap_addr(struct pt_regs *regs);
17498 - extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t);
17499 - extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
17500 -@@ -128,8 +128,8 @@ extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk);
17501 - extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data);
17502 - extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs);
17503 - extern unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs);
17504 --extern bool __weak arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs);
17505 --extern void __weak arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
17506 -+extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs);
17507 -+extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
17508 - void *src, unsigned long len);
17509 - #else /* !CONFIG_UPROBES */
17510 - struct uprobes_state {
17511 diff --git a/include/linux/usb.h b/include/linux/usb.h
17512 -index d2465bc..5256de4 100644
17513 +index 447a7e2..9cea7e9 100644
17514 --- a/include/linux/usb.h
17515 +++ b/include/linux/usb.h
17516 @@ -571,7 +571,7 @@ struct usb_device {
17517 @@ -87117,10 +85665,10 @@ index ffb69da..040393e 100644
17518 /* Set v4l2_dev->dev to NULL. Call when the USB parent disconnects.
17519 Since the parent disappears this ensures that v4l2_dev doesn't have an
17520 diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h
17521 -index d9fa68f..45c88d1 100644
17522 +index 2a25dec..bf6dd8a 100644
17523 --- a/include/net/9p/transport.h
17524 +++ b/include/net/9p/transport.h
17525 -@@ -63,7 +63,7 @@ struct p9_trans_module {
17526 +@@ -62,7 +62,7 @@ struct p9_trans_module {
17527 int (*cancelled)(struct p9_client *, struct p9_req_t *req);
17528 int (*zc_request)(struct p9_client *, struct p9_req_t *,
17529 char *, char *, int , int, int, int);
17530 @@ -87143,7 +85691,7 @@ index a175ba4..196eb8242 100644
17531 #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
17532 #define UNIXSID(skb) (&UNIXCB((skb)).secid)
17533 diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
17534 -index 8df15ad..837fbedd 100644
17535 +index ead99f0..6263c4b 100644
17536 --- a/include/net/bluetooth/l2cap.h
17537 +++ b/include/net/bluetooth/l2cap.h
17538 @@ -608,7 +608,7 @@ struct l2cap_ops {
17539 @@ -87218,7 +85766,7 @@ index 734d9b5..48a9a4b 100644
17540 return;
17541 }
17542 diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
17543 -index 5fbe656..9ed3d8b 100644
17544 +index 848e85c..051c7de 100644
17545 --- a/include/net/inet_connection_sock.h
17546 +++ b/include/net/inet_connection_sock.h
17547 @@ -63,7 +63,7 @@ struct inet_connection_sock_af_ops {
17548 @@ -87231,7 +85779,7 @@ index 5fbe656..9ed3d8b 100644
17549 /** inet_connection_sock - INET connection oriented sock
17550 *
17551 diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
17552 -index 01d590e..f69c61d 100644
17553 +index 80479ab..0c3f647 100644
17554 --- a/include/net/inetpeer.h
17555 +++ b/include/net/inetpeer.h
17556 @@ -47,7 +47,7 @@ struct inet_peer {
17557 @@ -87244,7 +85792,7 @@ index 01d590e..f69c61d 100644
17558 struct rcu_head rcu;
17559 struct inet_peer *gc_next;
17560 diff --git a/include/net/ip.h b/include/net/ip.h
17561 -index db4a771..965a42a 100644
17562 +index 0bb6207..a8878af 100644
17563 --- a/include/net/ip.h
17564 +++ b/include/net/ip.h
17565 @@ -316,7 +316,7 @@ static inline unsigned int ip_skb_dst_mtu(const struct sk_buff *skb)
17566 @@ -87257,10 +85805,10 @@ index db4a771..965a42a 100644
17567
17568 static inline void ip_select_ident_segs(struct sk_buff *skb, struct sock *sk, int segs)
17569 diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
17570 -index 9922093..a1755d6 100644
17571 +index dc9d2a2..d985691 100644
17572 --- a/include/net/ip_fib.h
17573 +++ b/include/net/ip_fib.h
17574 -@@ -169,7 +169,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
17575 +@@ -170,7 +170,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
17576
17577 #define FIB_RES_SADDR(net, res) \
17578 ((FIB_RES_NH(res).nh_saddr_genid == \
17579 @@ -87270,19 +85818,19 @@ index 9922093..a1755d6 100644
17580 fib_info_update_nh_saddr((net), &FIB_RES_NH(res)))
17581 #define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw)
17582 diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
17583 -index 624a8a5..b1e2a24 100644
17584 +index 615b20b..fd4cbd8 100644
17585 --- a/include/net/ip_vs.h
17586 +++ b/include/net/ip_vs.h
17587 -@@ -558,7 +558,7 @@ struct ip_vs_conn {
17588 +@@ -534,7 +534,7 @@ struct ip_vs_conn {
17589 struct ip_vs_conn *control; /* Master control connection */
17590 atomic_t n_control; /* Number of controlled ones */
17591 struct ip_vs_dest *dest; /* real server */
17592 - atomic_t in_pkts; /* incoming packet counter */
17593 + atomic_unchecked_t in_pkts; /* incoming packet counter */
17594
17595 - /* packet transmitter for different forwarding methods. If it
17596 - mangles the packet, it must return NF_DROP or better NF_STOLEN,
17597 -@@ -705,7 +705,7 @@ struct ip_vs_dest {
17598 + /* Packet transmitter for different forwarding methods. If it
17599 + * mangles the packet, it must return NF_DROP or better NF_STOLEN,
17600 +@@ -682,7 +682,7 @@ struct ip_vs_dest {
17601 __be16 port; /* port number of the server */
17602 union nf_inet_addr addr; /* IP address of the server */
17603 volatile unsigned int flags; /* dest status flags */
17604 @@ -87291,7 +85839,7 @@ index 624a8a5..b1e2a24 100644
17605 atomic_t weight; /* server weight */
17606
17607 atomic_t refcnt; /* reference counter */
17608 -@@ -960,11 +960,11 @@ struct netns_ipvs {
17609 +@@ -928,11 +928,11 @@ struct netns_ipvs {
17610 /* ip_vs_lblc */
17611 int sysctl_lblc_expiration;
17612 struct ctl_table_header *lblc_ctl_header;
17613 @@ -87398,10 +85946,10 @@ index 567c681..cd73ac02 100644
17614 struct llc_sap_state {
17615 u8 curr_state;
17616 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
17617 -index dae2e24..89336e6 100644
17618 +index 0ad1f47..aaea45b 100644
17619 --- a/include/net/mac80211.h
17620 +++ b/include/net/mac80211.h
17621 -@@ -4650,7 +4650,7 @@ struct rate_control_ops {
17622 +@@ -4648,7 +4648,7 @@ struct rate_control_ops {
17623 void (*remove_sta_debugfs)(void *priv, void *priv_sta);
17624
17625 u32 (*get_expected_throughput)(void *priv_sta);
17626 @@ -87411,7 +85959,7 @@ index dae2e24..89336e6 100644
17627 static inline int rate_supported(struct ieee80211_sta *sta,
17628 enum ieee80211_band band,
17629 diff --git a/include/net/neighbour.h b/include/net/neighbour.h
17630 -index 47f4254..fd095bc 100644
17631 +index f60558d..e5ed9bd 100644
17632 --- a/include/net/neighbour.h
17633 +++ b/include/net/neighbour.h
17634 @@ -163,7 +163,7 @@ struct neigh_ops {
17635 @@ -87498,21 +86046,8 @@ index e0d6466..e2f3003 100644
17636 }
17637
17638 #endif /* __NET_NET_NAMESPACE_H */
17639 -diff --git a/include/net/netdma.h b/include/net/netdma.h
17640 -index 8ba8ce2..99b7fff 100644
17641 ---- a/include/net/netdma.h
17642 -+++ b/include/net/netdma.h
17643 -@@ -24,7 +24,7 @@
17644 - #include <linux/dmaengine.h>
17645 - #include <linux/skbuff.h>
17646 -
17647 --int dma_skb_copy_datagram_iovec(struct dma_chan* chan,
17648 -+int __intentional_overflow(3,5) dma_skb_copy_datagram_iovec(struct dma_chan* chan,
17649 - struct sk_buff *skb, int offset, struct iovec *to,
17650 - size_t len, struct dma_pinned_list *pinned_list);
17651 -
17652 diff --git a/include/net/netlink.h b/include/net/netlink.h
17653 -index 6c10762..3e5de0c 100644
17654 +index 7b903e1..ad9ca4b 100644
17655 --- a/include/net/netlink.h
17656 +++ b/include/net/netlink.h
17657 @@ -521,7 +521,7 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb)
17658 @@ -87551,10 +86086,10 @@ index 29d6a94..235d3d84 100644
17659 };
17660
17661 diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
17662 -index aec5e12..807233f 100644
17663 +index 24945ce..f19e42f 100644
17664 --- a/include/net/netns/ipv4.h
17665 +++ b/include/net/netns/ipv4.h
17666 -@@ -82,7 +82,7 @@ struct netns_ipv4 {
17667 +@@ -83,7 +83,7 @@ struct netns_ipv4 {
17668
17669 struct ping_group_range ping_group_range;
17670
17671 @@ -87563,7 +86098,7 @@ index aec5e12..807233f 100644
17672
17673 #ifdef CONFIG_SYSCTL
17674 unsigned long *sysctl_local_reserved_ports;
17675 -@@ -96,6 +96,6 @@ struct netns_ipv4 {
17676 +@@ -97,6 +97,6 @@ struct netns_ipv4 {
17677 struct fib_rules_ops *mr_rules_ops;
17678 #endif
17679 #endif
17680 @@ -87572,7 +86107,7 @@ index aec5e12..807233f 100644
17681 };
17682 #endif
17683 diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h
17684 -index eade27a..42894dd 100644
17685 +index 69ae41f..4f94868 100644
17686 --- a/include/net/netns/ipv6.h
17687 +++ b/include/net/netns/ipv6.h
17688 @@ -75,8 +75,8 @@ struct netns_ipv6 {
17689 @@ -87580,17 +86115,17 @@ index eade27a..42894dd 100644
17690 #endif
17691 #endif
17692 - atomic_t dev_addr_genid;
17693 -- atomic_t rt_genid;
17694 +- atomic_t fib6_sernum;
17695 + atomic_unchecked_t dev_addr_genid;
17696 -+ atomic_unchecked_t rt_genid;
17697 ++ atomic_unchecked_t fib6_sernum;
17698 };
17699
17700 #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
17701 diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h
17702 -index 3492434..209f58c 100644
17703 +index 9da7982..099321b9 100644
17704 --- a/include/net/netns/xfrm.h
17705 +++ b/include/net/netns/xfrm.h
17706 -@@ -64,7 +64,7 @@ struct netns_xfrm {
17707 +@@ -78,7 +78,7 @@ struct netns_xfrm {
17708
17709 /* flow cache part */
17710 struct flow_cache flow_cache_global;
17711 @@ -87698,10 +86233,10 @@ index 4ff3f67..89ae38e 100644
17712
17713 /* Structure to track chunk fragments that have been acked, but peer
17714 diff --git a/include/net/sock.h b/include/net/sock.h
17715 -index b9a5bd0..dcd5f3c 100644
17716 +index 7db3db1..a915cca 100644
17717 --- a/include/net/sock.h
17718 +++ b/include/net/sock.h
17719 -@@ -356,7 +356,7 @@ struct sock {
17720 +@@ -355,7 +355,7 @@ struct sock {
17721 unsigned int sk_napi_id;
17722 unsigned int sk_ll_usec;
17723 #endif
17724 @@ -87710,7 +86245,7 @@ index b9a5bd0..dcd5f3c 100644
17725 int sk_rcvbuf;
17726
17727 struct sk_filter __rcu *sk_filter;
17728 -@@ -1053,7 +1053,7 @@ struct proto {
17729 +@@ -1048,7 +1048,7 @@ struct proto {
17730 void (*destroy_cgroup)(struct mem_cgroup *memcg);
17731 struct cg_proto *(*proto_cgroup)(struct mem_cgroup *memcg);
17732 #endif
17733 @@ -87719,7 +86254,7 @@ index b9a5bd0..dcd5f3c 100644
17734
17735 /*
17736 * Bits in struct cg_proto.flags
17737 -@@ -1240,7 +1240,7 @@ static inline u64 memcg_memory_allocated_read(struct cg_proto *prot)
17738 +@@ -1235,7 +1235,7 @@ static inline u64 memcg_memory_allocated_read(struct cg_proto *prot)
17739 return ret >> PAGE_SHIFT;
17740 }
17741
17742 @@ -87728,7 +86263,7 @@ index b9a5bd0..dcd5f3c 100644
17743 sk_memory_allocated(const struct sock *sk)
17744 {
17745 struct proto *prot = sk->sk_prot;
17746 -@@ -1385,7 +1385,7 @@ struct sock_iocb {
17747 +@@ -1380,7 +1380,7 @@ struct sock_iocb {
17748 struct scm_cookie *scm;
17749 struct msghdr *msg, async_msg;
17750 struct kiocb *kiocb;
17751 @@ -87746,7 +86281,7 @@ index b9a5bd0..dcd5f3c 100644
17752 int copy, int offset)
17753 {
17754 if (skb->ip_summed == CHECKSUM_NONE) {
17755 -@@ -2091,7 +2091,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
17756 +@@ -2092,7 +2092,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
17757 }
17758 }
17759
17760 @@ -87756,10 +86291,10 @@ index b9a5bd0..dcd5f3c 100644
17761 /**
17762 * sk_page_frag - return an appropriate page_frag
17763 diff --git a/include/net/tcp.h b/include/net/tcp.h
17764 -index 590e01a..76498f3 100644
17765 +index 4062b4f..9ff45e7 100644
17766 --- a/include/net/tcp.h
17767 +++ b/include/net/tcp.h
17768 -@@ -523,7 +523,7 @@ void tcp_retransmit_timer(struct sock *sk);
17769 +@@ -519,7 +519,7 @@ void tcp_retransmit_timer(struct sock *sk);
17770 void tcp_xmit_retransmit_queue(struct sock *);
17771 void tcp_simple_retransmit(struct sock *);
17772 int tcp_trim_head(struct sock *, struct sk_buff *, u32);
17773 @@ -87768,28 +86303,28 @@ index 590e01a..76498f3 100644
17774
17775 void tcp_send_probe0(struct sock *);
17776 void tcp_send_partial(struct sock *);
17777 -@@ -696,8 +696,8 @@ struct tcp_skb_cb {
17778 - struct inet6_skb_parm h6;
17779 - #endif
17780 - } header; /* For incoming frames */
17781 +@@ -692,8 +692,8 @@ static inline u32 tcp_skb_timestamp(const struct sk_buff *skb)
17782 + * If this grows please adjust skbuff.h:skbuff->cb[xxx] size appropriately.
17783 + */
17784 + struct tcp_skb_cb {
17785 - __u32 seq; /* Starting sequence number */
17786 - __u32 end_seq; /* SEQ + FIN + SYN + datalen */
17787 + __u32 seq __intentional_overflow(0); /* Starting sequence number */
17788 + __u32 end_seq __intentional_overflow(0); /* SEQ + FIN + SYN + datalen */
17789 - __u32 when; /* used to compute rtt's */
17790 - __u8 tcp_flags; /* TCP header flags. (tcp[13]) */
17791 -
17792 -@@ -713,7 +713,7 @@ struct tcp_skb_cb {
17793 + union {
17794 + /* Note : tcp_tw_isn is used in input path only
17795 + * (isn chosen by tcp_timewait_state_process())
17796 +@@ -718,7 +718,7 @@ struct tcp_skb_cb {
17797
17798 __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */
17799 /* 1 byte hole */
17800 - __u32 ack_seq; /* Sequence number ACK'd */
17801 + __u32 ack_seq __intentional_overflow(0); /* Sequence number ACK'd */
17802 - };
17803 -
17804 - #define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0]))
17805 + union {
17806 + struct inet_skb_parm h4;
17807 + #if IS_ENABLED(CONFIG_IPV6)
17808 diff --git a/include/net/xfrm.h b/include/net/xfrm.h
17809 -index 721e9c3b..3c81bbf 100644
17810 +index dc4865e..152ee4c 100644
17811 --- a/include/net/xfrm.h
17812 +++ b/include/net/xfrm.h
17813 @@ -285,7 +285,6 @@ struct xfrm_dst;
17814 @@ -87889,10 +86424,10 @@ index 52beadf..598734c 100644
17815 u8 qfull;
17816 enum fc_lport_state state;
17817 diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
17818 -index 1a0d184..4fb841f 100644
17819 +index 27ecee7..5f42632 100644
17820 --- a/include/scsi/scsi_device.h
17821 +++ b/include/scsi/scsi_device.h
17822 -@@ -185,9 +185,9 @@ struct scsi_device {
17823 +@@ -186,9 +186,9 @@ struct scsi_device {
17824 unsigned int max_device_blocked; /* what device_blocked counts down from */
17825 #define SCSI_DEFAULT_DEVICE_BLOCKED 3
17826
17827 @@ -87933,21 +86468,21 @@ index ae6c3b8..fd748ac 100644
17828 /**
17829 * struct snd_compr: Compressed device
17830 diff --git a/include/sound/soc.h b/include/sound/soc.h
17831 -index c83a334..27c8038 100644
17832 +index 7ba7130..d46594d 100644
17833 --- a/include/sound/soc.h
17834 +++ b/include/sound/soc.h
17835 -@@ -817,7 +817,7 @@ struct snd_soc_codec_driver {
17836 - /* probe ordering - for components with runtime dependencies */
17837 - int probe_order;
17838 - int remove_order;
17839 +@@ -853,7 +853,7 @@ struct snd_soc_codec_driver {
17840 + enum snd_soc_dapm_type, int);
17841 +
17842 + bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */
17843 -};
17844 +} __do_const;
17845
17846 /* SoC platform interface */
17847 struct snd_soc_platform_driver {
17848 -@@ -861,7 +861,7 @@ struct snd_soc_platform_driver {
17849 - unsigned int (*read)(struct snd_soc_platform *, unsigned int);
17850 - int (*write)(struct snd_soc_platform *, unsigned int, unsigned int);
17851 +@@ -882,7 +882,7 @@ struct snd_soc_platform_driver {
17852 + const struct snd_compr_ops *compr_ops;
17853 +
17854 int (*bespoke_trigger)(struct snd_pcm_substream *, int);
17855 -};
17856 +} __do_const;
17857 @@ -87955,10 +86490,10 @@ index c83a334..27c8038 100644
17858 struct snd_soc_dai_link_component {
17859 const char *name;
17860 diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
17861 -index 9ec9864..e2ee1ee 100644
17862 +index 23c518a..d6ef510 100644
17863 --- a/include/target/target_core_base.h
17864 +++ b/include/target/target_core_base.h
17865 -@@ -761,7 +761,7 @@ struct se_device {
17866 +@@ -764,7 +764,7 @@ struct se_device {
17867 atomic_long_t write_bytes;
17868 /* Active commands on this virtual SE device */
17869 atomic_t simple_cmds;
17870 @@ -88161,7 +86696,7 @@ index d876736..ccce5c0 100644
17871 #define __cpu_to_le64s(x) do { (void)(x); } while (0)
17872 #define __le64_to_cpus(x) do { (void)(x); } while (0)
17873 diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
17874 -index ef6103b..d4e65dd 100644
17875 +index ea9bf25..5140c61 100644
17876 --- a/include/uapi/linux/elf.h
17877 +++ b/include/uapi/linux/elf.h
17878 @@ -37,6 +37,17 @@ typedef __s64 Elf64_Sxword;
17879 @@ -88290,19 +86825,6 @@ index 43aaba1..1c30b48 100644
17880 /* CTL_VM names: */
17881 enum
17882 {
17883 -diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
17884 -index 778a329..1416ffb 100644
17885 ---- a/include/uapi/linux/videodev2.h
17886 -+++ b/include/uapi/linux/videodev2.h
17887 -@@ -1285,7 +1285,7 @@ struct v4l2_ext_control {
17888 - union {
17889 - __s32 value;
17890 - __s64 value64;
17891 -- char *string;
17892 -+ char __user *string;
17893 - __u8 *p_u8;
17894 - __u16 *p_u16;
17895 - __u32 *p_u32;
17896 diff --git a/include/uapi/linux/xattr.h b/include/uapi/linux/xattr.h
17897 index 1590c49..5eab462 100644
17898 --- a/include/uapi/linux/xattr.h
17899 @@ -88349,7 +86871,7 @@ index 30f5362..8ed8ac9 100644
17900 void *pmi_pal;
17901 u8 *vbe_state_orig; /*
17902 diff --git a/init/Kconfig b/init/Kconfig
17903 -index 80a6907..baf7d53 100644
17904 +index 2081a4d..98d1149 100644
17905 --- a/init/Kconfig
17906 +++ b/init/Kconfig
17907 @@ -1150,6 +1150,7 @@ endif # CGROUPS
17908 @@ -88360,7 +86882,7 @@ index 80a6907..baf7d53 100644
17909 default n
17910 help
17911 Enables additional kernel features in a sake of checkpoint/restore.
17912 -@@ -1635,7 +1636,7 @@ config SLUB_DEBUG
17913 +@@ -1659,7 +1660,7 @@ config SLUB_DEBUG
17914
17915 config COMPAT_BRK
17916 bool "Disable heap randomization"
17917 @@ -88369,7 +86891,7 @@ index 80a6907..baf7d53 100644
17918 help
17919 Randomizing heap placement makes heap exploits harder, but it
17920 also breaks ancient binaries (including anything libc5 based).
17921 -@@ -1923,7 +1924,7 @@ config INIT_ALL_POSSIBLE
17922 +@@ -1990,7 +1991,7 @@ config INIT_ALL_POSSIBLE
17923 config STOP_MACHINE
17924 bool
17925 default y
17926 @@ -88393,10 +86915,10 @@ index 7bc47ee..6da2dc7 100644
17927 ifneq ($(CONFIG_BLK_DEV_INITRD),y)
17928 obj-y += noinitramfs.o
17929 diff --git a/init/do_mounts.c b/init/do_mounts.c
17930 -index 82f2288..ea1430a 100644
17931 +index 9b3565c..3f90cf9 100644
17932 --- a/init/do_mounts.c
17933 +++ b/init/do_mounts.c
17934 -@@ -359,11 +359,11 @@ static void __init get_fs_names(char *page)
17935 +@@ -360,11 +360,11 @@ static void __init get_fs_names(char *page)
17936 static int __init do_mount_root(char *name, char *fs, int flags, void *data)
17937 {
17938 struct super_block *s;
17939 @@ -88410,7 +86932,7 @@ index 82f2288..ea1430a 100644
17940 s = current->fs->pwd.dentry->d_sb;
17941 ROOT_DEV = s->s_dev;
17942 printk(KERN_INFO
17943 -@@ -484,18 +484,18 @@ void __init change_floppy(char *fmt, ...)
17944 +@@ -485,18 +485,18 @@ void __init change_floppy(char *fmt, ...)
17945 va_start(args, fmt);
17946 vsprintf(buf, fmt, args);
17947 va_end(args);
17948 @@ -88432,7 +86954,7 @@ index 82f2288..ea1430a 100644
17949 termios.c_lflag |= ICANON;
17950 sys_ioctl(fd, TCSETSF, (long)&termios);
17951 sys_close(fd);
17952 -@@ -589,8 +589,8 @@ void __init prepare_namespace(void)
17953 +@@ -590,8 +590,8 @@ void __init prepare_namespace(void)
17954 mount_root();
17955 out:
17956 devtmpfs_mount("dev");
17957 @@ -88607,7 +87129,7 @@ index ba0a7f36..2bcf1d5 100644
17958 { INIT_THREAD_INFO(init_task) };
17959 +#endif
17960 diff --git a/init/initramfs.c b/init/initramfs.c
17961 -index bece48c..e911bd8 100644
17962 +index ad1bd77..dca2c1b 100644
17963 --- a/init/initramfs.c
17964 +++ b/init/initramfs.c
17965 @@ -25,7 +25,7 @@ static ssize_t __init xwrite(int fd, const char *p, size_t count)
17966 @@ -88646,12 +87168,12 @@ index bece48c..e911bd8 100644
17967 }
17968 return 0;
17969 }
17970 -@@ -313,11 +313,11 @@ static void __init clean_path(char *path, umode_t mode)
17971 +@@ -313,11 +313,11 @@ static void __init clean_path(char *path, umode_t fmode)
17972 {
17973 struct stat st;
17974
17975 -- if (!sys_newlstat(path, &st) && (st.st_mode^mode) & S_IFMT) {
17976 -+ if (!sys_newlstat((char __force_user *)path, (struct stat __force_user *)&st) && (st.st_mode^mode) & S_IFMT) {
17977 +- if (!sys_newlstat(path, &st) && (st.st_mode ^ fmode) & S_IFMT) {
17978 ++ if (!sys_newlstat((char __force_user *)path, (struct stat __force_user *)&st) && (st.st_mode ^ fmode) & S_IFMT) {
17979 if (S_ISDIR(st.st_mode))
17980 - sys_rmdir(path);
17981 + sys_rmdir((char __force_user *)path);
17982 @@ -88718,7 +87240,7 @@ index bece48c..e911bd8 100644
17983 next_state = Reset;
17984 return 0;
17985 diff --git a/init/main.c b/init/main.c
17986 -index d0f4b59..0c4b184 100644
17987 +index 321d0ce..91b53e5 100644
17988 --- a/init/main.c
17989 +++ b/init/main.c
17990 @@ -98,6 +98,8 @@ extern void radix_tree_init(void);
17991 @@ -88847,7 +87369,7 @@ index d0f4b59..0c4b184 100644
17992 return ret;
17993 }
17994
17995 -@@ -908,8 +978,8 @@ static int run_init_process(const char *init_filename)
17996 +@@ -907,8 +977,8 @@ static int run_init_process(const char *init_filename)
17997 {
17998 argv_init[0] = init_filename;
17999 return do_execve(getname_kernel(init_filename),
18000 @@ -88858,7 +87380,7 @@ index d0f4b59..0c4b184 100644
18001 }
18002
18003 static int try_to_run_init_process(const char *init_filename)
18004 -@@ -926,6 +996,10 @@ static int try_to_run_init_process(const char *init_filename)
18005 +@@ -925,6 +995,10 @@ static int try_to_run_init_process(const char *init_filename)
18006 return ret;
18007 }
18008
18009 @@ -88869,7 +87391,7 @@ index d0f4b59..0c4b184 100644
18010 static noinline void __init kernel_init_freeable(void);
18011
18012 static int __ref kernel_init(void *unused)
18013 -@@ -950,6 +1024,11 @@ static int __ref kernel_init(void *unused)
18014 +@@ -949,6 +1023,11 @@ static int __ref kernel_init(void *unused)
18015 ramdisk_execute_command, ret);
18016 }
18017
18018 @@ -88881,7 +87403,7 @@ index d0f4b59..0c4b184 100644
18019 /*
18020 * We try each of these until one succeeds.
18021 *
18022 -@@ -1005,7 +1084,7 @@ static noinline void __init kernel_init_freeable(void)
18023 +@@ -1004,7 +1083,7 @@ static noinline void __init kernel_init_freeable(void)
18024 do_basic_setup();
18025
18026 /* Open the /dev/console on the rootfs, this should never fail */
18027 @@ -88890,7 +87412,7 @@ index d0f4b59..0c4b184 100644
18028 pr_err("Warning: unable to open an initial console.\n");
18029
18030 (void) sys_dup(0);
18031 -@@ -1018,11 +1097,13 @@ static noinline void __init kernel_init_freeable(void)
18032 +@@ -1017,11 +1096,13 @@ static noinline void __init kernel_init_freeable(void)
18033 if (!ramdisk_execute_command)
18034 ramdisk_execute_command = "/init";
18035
18036 @@ -88906,7 +87428,7 @@ index d0f4b59..0c4b184 100644
18037 * Ok, we have completed the initial bootup, and
18038 * we're essentially up and running. Get rid of the
18039 diff --git a/ipc/compat.c b/ipc/compat.c
18040 -index b5ef4f7..ff31d87 100644
18041 +index 9b3c85f..1c4d897 100644
18042 --- a/ipc/compat.c
18043 +++ b/ipc/compat.c
18044 @@ -396,7 +396,7 @@ COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
18045 @@ -89002,7 +87524,7 @@ index 4fcf39a..d3cc2ec 100644
18046 if (u->mq_bytes + mq_bytes < u->mq_bytes ||
18047 u->mq_bytes + mq_bytes > rlimit(RLIMIT_MSGQUEUE)) {
18048 diff --git a/ipc/shm.c b/ipc/shm.c
18049 -index 7fc9f9f..95e201f 100644
18050 +index 0145479..3d27947 100644
18051 --- a/ipc/shm.c
18052 +++ b/ipc/shm.c
18053 @@ -72,6 +72,14 @@ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp);
18054 @@ -89070,7 +87592,7 @@ index 7fc9f9f..95e201f 100644
18055 ipc_unlock_object(&shp->shm_perm);
18056 rcu_read_unlock();
18057 diff --git a/ipc/util.c b/ipc/util.c
18058 -index 27d74e6..8be0be2 100644
18059 +index 88adc32..3867c68 100644
18060 --- a/ipc/util.c
18061 +++ b/ipc/util.c
18062 @@ -71,6 +71,8 @@ struct ipc_proc_iface {
18063 @@ -89094,7 +87616,7 @@ index 27d74e6..8be0be2 100644
18064 if ((requested_mode & ~granted_mode & 0007) &&
18065 !ns_capable(ns->user_ns, CAP_IPC_OWNER))
18066 diff --git a/kernel/audit.c b/kernel/audit.c
18067 -index 6726aa6..bb864a9 100644
18068 +index cebb11d..4e0295f 100644
18069 --- a/kernel/audit.c
18070 +++ b/kernel/audit.c
18071 @@ -122,7 +122,7 @@ u32 audit_sig_sid = 0;
18072 @@ -89134,10 +87656,10 @@ index 6726aa6..bb864a9 100644
18073 s.version = AUDIT_VERSION_LATEST;
18074 s.backlog_wait_time = audit_backlog_wait_time;
18075 diff --git a/kernel/auditsc.c b/kernel/auditsc.c
18076 -index 21eae3c..66db239 100644
18077 +index e420a0c..38137fa 100644
18078 --- a/kernel/auditsc.c
18079 +++ b/kernel/auditsc.c
18080 -@@ -2023,7 +2023,7 @@ int auditsc_get_stamp(struct audit_context *ctx,
18081 +@@ -2014,7 +2014,7 @@ int auditsc_get_stamp(struct audit_context *ctx,
18082 }
18083
18084 /* global counter which is incremented every time something logs in */
18085 @@ -89146,7 +87668,7 @@ index 21eae3c..66db239 100644
18086
18087 static int audit_set_loginuid_perm(kuid_t loginuid)
18088 {
18089 -@@ -2090,7 +2090,7 @@ int audit_set_loginuid(kuid_t loginuid)
18090 +@@ -2081,7 +2081,7 @@ int audit_set_loginuid(kuid_t loginuid)
18091
18092 /* are we setting or clearing? */
18093 if (uid_valid(loginuid))
18094 @@ -89156,114 +87678,49 @@ index 21eae3c..66db239 100644
18095 task->sessionid = sessionid;
18096 task->loginuid = loginuid;
18097 diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
18098 -index 7f0dbcb..b54bb2c 100644
18099 +index d6594e4..00348e4 100644
18100 --- a/kernel/bpf/core.c
18101 +++ b/kernel/bpf/core.c
18102 -@@ -22,6 +22,7 @@
18103 - */
18104 - #include <linux/filter.h>
18105 - #include <linux/skbuff.h>
18106 -+#include <linux/vmalloc.h>
18107 - #include <asm/unaligned.h>
18108 +@@ -143,7 +143,7 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
18109 + * random section of illegal instructions.
18110 + */
18111 + size = round_up(proglen + sizeof(*hdr) + 128, PAGE_SIZE);
18112 +- hdr = module_alloc(size);
18113 ++ hdr = module_alloc_exec(size);
18114 + if (hdr == NULL)
18115 + return NULL;
18116
18117 - /* Registers */
18118 -@@ -63,6 +64,67 @@ void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, uns
18119 - return NULL;
18120 +@@ -163,7 +163,7 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
18121 +
18122 + void bpf_jit_binary_free(struct bpf_binary_header *hdr)
18123 + {
18124 +- module_free(NULL, hdr);
18125 ++ module_free_exec(NULL, hdr);
18126 }
18127 + #endif /* CONFIG_BPF_JIT */
18128
18129 -+struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags)
18130 -+{
18131 -+ gfp_t gfp_flags = GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO |
18132 -+ gfp_extra_flags;
18133 -+ struct bpf_work_struct *ws;
18134 -+ struct bpf_prog *fp;
18135 -+
18136 -+ size = round_up(size, PAGE_SIZE);
18137 -+ fp = __vmalloc(size, gfp_flags, PAGE_KERNEL);
18138 -+ if (fp == NULL)
18139 -+ return NULL;
18140 -+
18141 -+ ws = kmalloc(sizeof(*ws), GFP_KERNEL | gfp_extra_flags);
18142 -+ if (ws == NULL) {
18143 -+ vfree(fp);
18144 -+ return NULL;
18145 -+ }
18146 -+
18147 -+ fp->pages = size / PAGE_SIZE;
18148 -+ fp->work = ws;
18149 -+
18150 -+ return fp;
18151 -+}
18152 -+EXPORT_SYMBOL_GPL(bpf_prog_alloc);
18153 -+
18154 -+struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
18155 -+ gfp_t gfp_extra_flags)
18156 -+{
18157 -+ gfp_t gfp_flags = GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO |
18158 -+ gfp_extra_flags;
18159 -+ struct bpf_prog *fp;
18160 -+
18161 -+ BUG_ON(fp_old == NULL);
18162 -+
18163 -+ size = round_up(size, PAGE_SIZE);
18164 -+ if (size <= fp_old->pages * PAGE_SIZE)
18165 -+ return fp_old;
18166 -+
18167 -+ fp = __vmalloc(size, gfp_flags, PAGE_KERNEL);
18168 -+ if (fp != NULL) {
18169 -+ memcpy(fp, fp_old, fp_old->pages * PAGE_SIZE);
18170 -+ fp->pages = size / PAGE_SIZE;
18171 -+
18172 -+ /* We keep fp->work from fp_old around in the new
18173 -+ * reallocated structure.
18174 -+ */
18175 -+ fp_old->work = NULL;
18176 -+ __bpf_prog_free(fp_old);
18177 -+ }
18178 -+
18179 -+ return fp;
18180 -+}
18181 -+EXPORT_SYMBOL_GPL(bpf_prog_realloc);
18182 -+
18183 -+void __bpf_prog_free(struct bpf_prog *fp)
18184 -+{
18185 -+ kfree(fp->work);
18186 -+ vfree(fp);
18187 -+}
18188 -+EXPORT_SYMBOL_GPL(__bpf_prog_free);
18189 -+
18190 - /* Base function for offset calculation. Needs to go into .text section,
18191 - * therefore keeping it non-static as well; will also be used by JITs
18192 - * anyway later on, so do not let the compiler omit it.
18193 -@@ -523,12 +585,26 @@ void bpf_prog_select_runtime(struct bpf_prog *fp)
18194 +diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
18195 +index ba61c8c..c60c486 100644
18196 +--- a/kernel/bpf/syscall.c
18197 ++++ b/kernel/bpf/syscall.c
18198 +@@ -539,11 +539,15 @@ SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, siz
18199 + int err;
18200
18201 - /* Probe if internal BPF can be JITed */
18202 - bpf_int_jit_compile(fp);
18203 -+ /* Lock whole bpf_prog as read-only */
18204 -+ bpf_prog_lock_ro(fp);
18205 - }
18206 - EXPORT_SYMBOL_GPL(bpf_prog_select_runtime);
18207 + /* the syscall is limited to root temporarily. This restriction will be
18208 +- * lifted when security audit is clean. Note that eBPF+tracing must have
18209 +- * this restriction, since it may pass kernel data to user space
18210 ++ * lifted by upstream when a half-assed security audit is clean. Note
18211 ++ * that eBPF+tracing must have this restriction, since it may pass
18212 ++ * kernel data to user space
18213 + */
18214 + if (!capable(CAP_SYS_ADMIN))
18215 + return -EPERM;
18216 ++#ifdef CONFIG_GRKERNSEC
18217 ++ return -EPERM;
18218 ++#endif
18219
18220 --/* free internal BPF program */
18221 -+static void bpf_prog_free_deferred(struct work_struct *work)
18222 -+{
18223 -+ struct bpf_work_struct *ws;
18224 -+
18225 -+ ws = container_of(work, struct bpf_work_struct, work);
18226 -+ bpf_jit_free(ws->prog);
18227 -+}
18228 -+
18229 -+/* Free internal BPF program */
18230 - void bpf_prog_free(struct bpf_prog *fp)
18231 - {
18232 -- bpf_jit_free(fp);
18233 -+ struct bpf_work_struct *ws = fp->work;
18234 -+
18235 -+ INIT_WORK(&ws->work, bpf_prog_free_deferred);
18236 -+ ws->prog = fp;
18237 -+ schedule_work(&ws->work);
18238 - }
18239 - EXPORT_SYMBOL_GPL(bpf_prog_free);
18240 + if (!access_ok(VERIFY_READ, uattr, 1))
18241 + return -EFAULT;
18242 diff --git a/kernel/capability.c b/kernel/capability.c
18243 index 989f5bf..d317ca0 100644
18244 --- a/kernel/capability.c
18245 @@ -89363,25 +87820,20 @@ index 989f5bf..d317ca0 100644
18246 +}
18247 +EXPORT_SYMBOL(capable_wrt_inode_uidgid_nolog);
18248 diff --git a/kernel/cgroup.c b/kernel/cgroup.c
18249 -index 3a73f99..4f29fea 100644
18250 +index 136ecea..45157a6 100644
18251 --- a/kernel/cgroup.c
18252 +++ b/kernel/cgroup.c
18253 -@@ -5341,6 +5341,14 @@ static void cgroup_release_agent(struct work_struct *work)
18254 - release_list);
18255 - list_del_init(&cgrp->release_list);
18256 - raw_spin_unlock(&release_list_lock);
18257 -+
18258 -+ /*
18259 -+ * don't bother calling call_usermodehelper if we haven't
18260 -+ * configured a binary to execute
18261 -+ */
18262 -+ if (cgrp->root->release_agent_path[0] == '\0')
18263 -+ goto continue_free;
18264 +@@ -5276,6 +5276,9 @@ static void cgroup_release_agent(struct work_struct *work)
18265 + if (!pathbuf || !agentbuf)
18266 + goto out;
18267 +
18268 ++ if (agentbuf[0] == '\0')
18269 ++ goto out;
18270 +
18271 - pathbuf = kmalloc(PATH_MAX, GFP_KERNEL);
18272 - if (!pathbuf)
18273 - goto continue_free;
18274 -@@ -5539,7 +5547,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v)
18275 + path = cgroup_path(cgrp, pathbuf, PATH_MAX);
18276 + if (!path)
18277 + goto out;
18278 +@@ -5461,7 +5464,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v)
18279 struct task_struct *task;
18280 int count = 0;
18281
18282 @@ -89801,10 +88253,10 @@ index 379650b..30c5180 100644
18283 #ifdef CONFIG_MODULE_UNLOAD
18284 {
18285 diff --git a/kernel/events/core.c b/kernel/events/core.c
18286 -index 658f232..32e9595 100644
18287 +index 1cd5eef..e8b5af9 100644
18288 --- a/kernel/events/core.c
18289 +++ b/kernel/events/core.c
18290 -@@ -161,8 +161,15 @@ static struct srcu_struct pmus_srcu;
18291 +@@ -170,8 +170,15 @@ static struct srcu_struct pmus_srcu;
18292 * 0 - disallow raw tracepoint access for unpriv
18293 * 1 - disallow cpu events for unpriv
18294 * 2 - disallow kernel profiling for unpriv
18295 @@ -89821,7 +88273,7 @@ index 658f232..32e9595 100644
18296
18297 /* Minimum for 512 kiB + 1 user control page */
18298 int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
18299 -@@ -188,7 +195,7 @@ void update_perf_cpu_limits(void)
18300 +@@ -197,7 +204,7 @@ void update_perf_cpu_limits(void)
18301
18302 tmp *= sysctl_perf_cpu_time_max_percent;
18303 do_div(tmp, 100);
18304 @@ -89830,7 +88282,7 @@ index 658f232..32e9595 100644
18305 }
18306
18307 static int perf_rotate_context(struct perf_cpu_context *cpuctx);
18308 -@@ -294,7 +301,7 @@ void perf_sample_event_took(u64 sample_len_ns)
18309 +@@ -303,7 +310,7 @@ void perf_sample_event_took(u64 sample_len_ns)
18310 }
18311 }
18312
18313 @@ -89839,7 +88291,7 @@ index 658f232..32e9595 100644
18314
18315 static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx,
18316 enum event_type_t event_type);
18317 -@@ -3051,7 +3058,7 @@ static void __perf_event_read(void *info)
18318 +@@ -3102,7 +3109,7 @@ static void __perf_event_read(void *info)
18319
18320 static inline u64 perf_event_count(struct perf_event *event)
18321 {
18322 @@ -89848,7 +88300,7 @@ index 658f232..32e9595 100644
18323 }
18324
18325 static u64 perf_event_read(struct perf_event *event)
18326 -@@ -3430,9 +3437,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
18327 +@@ -3528,9 +3535,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
18328 mutex_lock(&event->child_mutex);
18329 total += perf_event_read(event);
18330 *enabled += event->total_time_enabled +
18331 @@ -89860,7 +88312,7 @@ index 658f232..32e9595 100644
18332
18333 list_for_each_entry(child, &event->child_list, child_list) {
18334 total += perf_event_read(child);
18335 -@@ -3881,10 +3888,10 @@ void perf_event_update_userpage(struct perf_event *event)
18336 +@@ -3994,10 +4001,10 @@ void perf_event_update_userpage(struct perf_event *event)
18337 userpg->offset -= local64_read(&event->hw.prev_count);
18338
18339 userpg->time_enabled = enabled +
18340 @@ -89873,7 +88325,7 @@ index 658f232..32e9595 100644
18341
18342 arch_perf_update_userpage(userpg, now);
18343
18344 -@@ -4448,7 +4455,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
18345 +@@ -4561,7 +4568,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
18346
18347 /* Data. */
18348 sp = perf_user_stack_pointer(regs);
18349 @@ -89882,7 +88334,7 @@ index 658f232..32e9595 100644
18350 dyn_size = dump_size - rem;
18351
18352 perf_output_skip(handle, rem);
18353 -@@ -4539,11 +4546,11 @@ static void perf_output_read_one(struct perf_output_handle *handle,
18354 +@@ -4652,11 +4659,11 @@ static void perf_output_read_one(struct perf_output_handle *handle,
18355 values[n++] = perf_event_count(event);
18356 if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
18357 values[n++] = enabled +
18358 @@ -89896,7 +88348,7 @@ index 658f232..32e9595 100644
18359 }
18360 if (read_format & PERF_FORMAT_ID)
18361 values[n++] = primary_event_id(event);
18362 -@@ -6858,7 +6865,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
18363 +@@ -6958,7 +6965,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
18364 event->parent = parent_event;
18365
18366 event->ns = get_pid_ns(task_active_pid_ns(current));
18367 @@ -89905,7 +88357,7 @@ index 658f232..32e9595 100644
18368
18369 event->state = PERF_EVENT_STATE_INACTIVE;
18370
18371 -@@ -7137,6 +7144,11 @@ SYSCALL_DEFINE5(perf_event_open,
18372 +@@ -7237,6 +7244,11 @@ SYSCALL_DEFINE5(perf_event_open,
18373 if (flags & ~PERF_FLAG_ALL)
18374 return -EINVAL;
18375
18376 @@ -89917,7 +88369,7 @@ index 658f232..32e9595 100644
18377 err = perf_copy_attr(attr_uptr, &attr);
18378 if (err)
18379 return err;
18380 -@@ -7489,10 +7501,10 @@ static void sync_child_event(struct perf_event *child_event,
18381 +@@ -7592,10 +7604,10 @@ static void sync_child_event(struct perf_event *child_event,
18382 /*
18383 * Add back the child's count to the parent's count:
18384 */
18385 @@ -89989,10 +88441,10 @@ index ed8f2cd..fe8030c 100644
18386 pagefault_disable();
18387 result = __copy_from_user_inatomic(&opcode, (void __user*)vaddr,
18388 diff --git a/kernel/exit.c b/kernel/exit.c
18389 -index 32c58f7..9eb6907 100644
18390 +index 5d30019..934add5 100644
18391 --- a/kernel/exit.c
18392 +++ b/kernel/exit.c
18393 -@@ -173,6 +173,10 @@ void release_task(struct task_struct *p)
18394 +@@ -174,6 +174,10 @@ void release_task(struct task_struct *p)
18395 struct task_struct *leader;
18396 int zap_leader;
18397 repeat:
18398 @@ -90003,16 +88455,16 @@ index 32c58f7..9eb6907 100644
18399 /* don't need to get the RCU readlock here - the process is dead and
18400 * can't be modifying its own credentials. But shut RCU-lockdep up */
18401 rcu_read_lock();
18402 -@@ -668,6 +672,8 @@ void do_exit(long code)
18403 - struct task_struct *tsk = current;
18404 +@@ -670,6 +674,8 @@ void do_exit(long code)
18405 int group_dead;
18406 + TASKS_RCU(int tasks_rcu_i);
18407
18408 + set_fs(USER_DS);
18409 +
18410 profile_task_exit(tsk);
18411
18412 WARN_ON(blk_needs_flush_plug(tsk));
18413 -@@ -684,7 +690,6 @@ void do_exit(long code)
18414 +@@ -686,7 +692,6 @@ void do_exit(long code)
18415 * mm_release()->clear_child_tid() from writing to a user-controlled
18416 * kernel address.
18417 */
18418 @@ -90020,7 +88472,7 @@ index 32c58f7..9eb6907 100644
18419
18420 ptrace_event(PTRACE_EVENT_EXIT, code);
18421
18422 -@@ -742,6 +747,9 @@ void do_exit(long code)
18423 +@@ -744,6 +749,9 @@ void do_exit(long code)
18424 tsk->exit_code = code;
18425 taskstats_exit(tsk, group_dead);
18426
18427 @@ -90030,7 +88482,7 @@ index 32c58f7..9eb6907 100644
18428 exit_mm(tsk);
18429
18430 if (group_dead)
18431 -@@ -859,7 +867,7 @@ SYSCALL_DEFINE1(exit, int, error_code)
18432 +@@ -863,7 +871,7 @@ SYSCALL_DEFINE1(exit, int, error_code)
18433 * Take down every thread in the group. This is called by fatal signals
18434 * as well as by sys_exit_group (below).
18435 */
18436 @@ -90040,7 +88492,7 @@ index 32c58f7..9eb6907 100644
18437 {
18438 struct signal_struct *sig = current->signal;
18439 diff --git a/kernel/fork.c b/kernel/fork.c
18440 -index a91e47d..71c9064 100644
18441 +index 9b7d746..5b898ab 100644
18442 --- a/kernel/fork.c
18443 +++ b/kernel/fork.c
18444 @@ -183,6 +183,48 @@ void thread_info_cache_init(void)
18445 @@ -90118,15 +88570,15 @@ index a91e47d..71c9064 100644
18446 rt_mutex_debug_task_free(tsk);
18447 ftrace_graph_exit_task(tsk);
18448 put_seccomp_filter(tsk);
18449 -@@ -299,6 +345,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18450 +@@ -306,6 +352,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18451 + {
18452 struct task_struct *tsk;
18453 struct thread_info *ti;
18454 - unsigned long *stackend;
18455 + void *lowmem_stack;
18456 int node = tsk_fork_get_node(orig);
18457 int err;
18458
18459 -@@ -306,7 +353,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18460 +@@ -313,7 +360,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18461 if (!tsk)
18462 return NULL;
18463
18464 @@ -90135,7 +88587,7 @@ index a91e47d..71c9064 100644
18465 if (!ti)
18466 goto free_tsk;
18467
18468 -@@ -315,6 +362,9 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18469 +@@ -322,6 +369,9 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18470 goto free_ti;
18471
18472 tsk->stack = ti;
18473 @@ -90145,8 +88597,8 @@ index a91e47d..71c9064 100644
18474 #ifdef CONFIG_SECCOMP
18475 /*
18476 * We must handle setting up seccomp filters once we're under
18477 -@@ -332,7 +382,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18478 - *stackend = STACK_END_MAGIC; /* for overflow detection */
18479 +@@ -338,7 +388,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18480 + set_task_stack_end_magic(tsk);
18481
18482 #ifdef CONFIG_CC_STACKPROTECTOR
18483 - tsk->stack_canary = get_random_int();
18484 @@ -90154,7 +88606,7 @@ index a91e47d..71c9064 100644
18485 #endif
18486
18487 /*
18488 -@@ -346,24 +396,92 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18489 +@@ -352,24 +402,92 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
18490 tsk->splice_pipe = NULL;
18491 tsk->task_frag.page = NULL;
18492
18493 @@ -90251,7 +88703,7 @@ index a91e47d..71c9064 100644
18494
18495 uprobe_start_dup_mmap();
18496 down_write(&oldmm->mmap_sem);
18497 -@@ -391,55 +509,15 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
18498 +@@ -397,55 +515,15 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
18499
18500 prev = NULL;
18501 for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
18502 @@ -90311,7 +88763,7 @@ index a91e47d..71c9064 100644
18503 }
18504
18505 /*
18506 -@@ -471,6 +549,31 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
18507 +@@ -477,6 +555,31 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
18508 if (retval)
18509 goto out;
18510 }
18511 @@ -90343,7 +88795,7 @@ index a91e47d..71c9064 100644
18512 /* a new mm has just been created */
18513 arch_dup_mmap(oldmm, mm);
18514 retval = 0;
18515 -@@ -480,14 +583,6 @@ out:
18516 +@@ -486,14 +589,6 @@ out:
18517 up_write(&oldmm->mmap_sem);
18518 uprobe_end_dup_mmap();
18519 return retval;
18520 @@ -90358,7 +88810,7 @@ index a91e47d..71c9064 100644
18521 }
18522
18523 static inline int mm_alloc_pgd(struct mm_struct *mm)
18524 -@@ -729,8 +824,8 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
18525 +@@ -734,8 +829,8 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
18526 return ERR_PTR(err);
18527
18528 mm = get_task_mm(task);
18529 @@ -90369,7 +88821,7 @@ index a91e47d..71c9064 100644
18530 mmput(mm);
18531 mm = ERR_PTR(-EACCES);
18532 }
18533 -@@ -933,13 +1028,20 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
18534 +@@ -938,13 +1033,20 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
18535 spin_unlock(&fs->lock);
18536 return -EAGAIN;
18537 }
18538 @@ -90391,7 +88843,7 @@ index a91e47d..71c9064 100644
18539 return 0;
18540 }
18541
18542 -@@ -1173,7 +1275,7 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid)
18543 +@@ -1179,7 +1281,7 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid)
18544 * parts of the process environment (as per the clone
18545 * flags). The actual kick-off is left to the caller.
18546 */
18547 @@ -90400,7 +88852,7 @@ index a91e47d..71c9064 100644
18548 unsigned long stack_start,
18549 unsigned long stack_size,
18550 int __user *child_tidptr,
18551 -@@ -1244,6 +1346,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
18552 +@@ -1250,6 +1352,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
18553 DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
18554 #endif
18555 retval = -EAGAIN;
18556 @@ -90410,7 +88862,7 @@ index a91e47d..71c9064 100644
18557 if (atomic_read(&p->real_cred->user->processes) >=
18558 task_rlimit(p, RLIMIT_NPROC)) {
18559 if (p->real_cred->user != INIT_USER &&
18560 -@@ -1493,6 +1598,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
18561 +@@ -1499,6 +1604,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
18562 goto bad_fork_free_pid;
18563 }
18564
18565 @@ -90422,7 +88874,7 @@ index a91e47d..71c9064 100644
18566 if (likely(p->pid)) {
18567 ptrace_init_task(p, (clone_flags & CLONE_PTRACE) || trace);
18568
18569 -@@ -1583,6 +1693,8 @@ bad_fork_cleanup_count:
18570 +@@ -1589,6 +1699,8 @@ bad_fork_cleanup_count:
18571 bad_fork_free:
18572 free_task(p);
18573 fork_out:
18574 @@ -90431,7 +88883,7 @@ index a91e47d..71c9064 100644
18575 return ERR_PTR(retval);
18576 }
18577
18578 -@@ -1644,6 +1756,7 @@ long do_fork(unsigned long clone_flags,
18579 +@@ -1650,6 +1762,7 @@ long do_fork(unsigned long clone_flags,
18580
18581 p = copy_process(clone_flags, stack_start, stack_size,
18582 child_tidptr, NULL, trace);
18583 @@ -90439,7 +88891,7 @@ index a91e47d..71c9064 100644
18584 /*
18585 * Do this prior waking up the new thread - the thread pointer
18586 * might get invalid after that point, if the thread exits quickly.
18587 -@@ -1660,6 +1773,8 @@ long do_fork(unsigned long clone_flags,
18588 +@@ -1666,6 +1779,8 @@ long do_fork(unsigned long clone_flags,
18589 if (clone_flags & CLONE_PARENT_SETTID)
18590 put_user(nr, parent_tidptr);
18591
18592 @@ -90448,7 +88900,7 @@ index a91e47d..71c9064 100644
18593 if (clone_flags & CLONE_VFORK) {
18594 p->vfork_done = &vfork;
18595 init_completion(&vfork);
18596 -@@ -1778,7 +1893,7 @@ void __init proc_caches_init(void)
18597 +@@ -1784,7 +1899,7 @@ void __init proc_caches_init(void)
18598 mm_cachep = kmem_cache_create("mm_struct",
18599 sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN,
18600 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL);
18601 @@ -90457,7 +88909,7 @@ index a91e47d..71c9064 100644
18602 mmap_init();
18603 nsproxy_cache_init();
18604 }
18605 -@@ -1818,7 +1933,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
18606 +@@ -1824,7 +1939,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
18607 return 0;
18608
18609 /* don't need lock here; in the worst case we'll do useless copy */
18610 @@ -90466,7 +88918,7 @@ index a91e47d..71c9064 100644
18611 return 0;
18612
18613 *new_fsp = copy_fs_struct(fs);
18614 -@@ -1930,7 +2045,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
18615 +@@ -1936,7 +2051,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
18616 fs = current->fs;
18617 spin_lock(&fs->lock);
18618 current->fs = new_fs;
18619 @@ -90477,10 +88929,10 @@ index a91e47d..71c9064 100644
18620 else
18621 new_fs = fs;
18622 diff --git a/kernel/futex.c b/kernel/futex.c
18623 -index 22b3f1b..6820bc0 100644
18624 +index 63678b5..512f9af 100644
18625 --- a/kernel/futex.c
18626 +++ b/kernel/futex.c
18627 -@@ -202,7 +202,7 @@ struct futex_pi_state {
18628 +@@ -201,7 +201,7 @@ struct futex_pi_state {
18629 atomic_t refcount;
18630
18631 union futex_key key;
18632 @@ -90489,7 +88941,7 @@ index 22b3f1b..6820bc0 100644
18633
18634 /**
18635 * struct futex_q - The hashed futex queue entry, one per waiting task
18636 -@@ -236,7 +236,7 @@ struct futex_q {
18637 +@@ -235,7 +235,7 @@ struct futex_q {
18638 struct rt_mutex_waiter *rt_waiter;
18639 union futex_key *requeue_pi_key;
18640 u32 bitset;
18641 @@ -90498,7 +88950,7 @@ index 22b3f1b..6820bc0 100644
18642
18643 static const struct futex_q futex_q_init = {
18644 /* list gets initialized in queue_me()*/
18645 -@@ -396,6 +396,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
18646 +@@ -402,6 +402,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
18647 struct page *page, *page_head;
18648 int err, ro = 0;
18649
18650 @@ -90510,7 +88962,7 @@ index 22b3f1b..6820bc0 100644
18651 /*
18652 * The futex address must be "naturally" aligned.
18653 */
18654 -@@ -595,7 +600,7 @@ static int cmpxchg_futex_value_locked(u32 *curval, u32 __user *uaddr,
18655 +@@ -601,7 +606,7 @@ static int cmpxchg_futex_value_locked(u32 *curval, u32 __user *uaddr,
18656
18657 static int get_futex_value_locked(u32 *dest, u32 __user *from)
18658 {
18659 @@ -90519,7 +88971,7 @@ index 22b3f1b..6820bc0 100644
18660
18661 pagefault_disable();
18662 ret = __copy_from_user_inatomic(dest, from, sizeof(u32));
18663 -@@ -3000,6 +3005,7 @@ static void __init futex_detect_cmpxchg(void)
18664 +@@ -3006,6 +3011,7 @@ static void __init futex_detect_cmpxchg(void)
18665 {
18666 #ifndef CONFIG_HAVE_FUTEX_CMPXCHG
18667 u32 curval;
18668 @@ -90527,7 +88979,7 @@ index 22b3f1b..6820bc0 100644
18669
18670 /*
18671 * This will fail and we want it. Some arch implementations do
18672 -@@ -3011,8 +3017,11 @@ static void __init futex_detect_cmpxchg(void)
18673 +@@ -3017,8 +3023,11 @@ static void __init futex_detect_cmpxchg(void)
18674 * implementation, the non-functional ones will return
18675 * -ENOSYS.
18676 */
18677 @@ -90613,7 +89065,7 @@ index 9019f15..9a3c42e 100644
18678
18679 static int
18680 diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
18681 -index ae51670..c1a9796 100644
18682 +index 5c5987f..bc502b0 100644
18683 --- a/kernel/kallsyms.c
18684 +++ b/kernel/kallsyms.c
18685 @@ -11,6 +11,9 @@
18686 @@ -90717,15 +89169,6 @@ index ae51670..c1a9796 100644
18687 seq_printf(m, "%pK %c %s\t[%s]\n", (void *)iter->value,
18688 type, iter->name, iter->module_name);
18689 } else
18690 -@@ -567,7 +611,7 @@ static int kallsyms_open(struct inode *inode, struct file *file)
18691 - struct kallsym_iter *iter;
18692 - int ret;
18693 -
18694 -- iter = kmalloc(sizeof(*iter), GFP_KERNEL);
18695 -+ iter = kzalloc(sizeof(*iter), GFP_KERNEL);
18696 - if (!iter)
18697 - return -ENOMEM;
18698 - reset_iter(iter, 0);
18699 diff --git a/kernel/kcmp.c b/kernel/kcmp.c
18700 index 0aa69ea..a7fcafb 100644
18701 --- a/kernel/kcmp.c
18702 @@ -90742,7 +89185,7 @@ index 0aa69ea..a7fcafb 100644
18703
18704 /*
18705 diff --git a/kernel/kexec.c b/kernel/kexec.c
18706 -index 2bee072..8979af8 100644
18707 +index 2abf9f6..c40cf85 100644
18708 --- a/kernel/kexec.c
18709 +++ b/kernel/kexec.c
18710 @@ -1349,7 +1349,8 @@ COMPAT_SYSCALL_DEFINE4(kexec_load, compat_ulong_t, entry,
18711 @@ -90756,7 +89199,7 @@ index 2bee072..8979af8 100644
18712
18713 /* Don't allow clients that don't understand the native
18714 diff --git a/kernel/kmod.c b/kernel/kmod.c
18715 -index 8637e04..8b1d0d8 100644
18716 +index 80f7a6d..3c476d3 100644
18717 --- a/kernel/kmod.c
18718 +++ b/kernel/kmod.c
18719 @@ -75,7 +75,7 @@ static void free_modprobe_argv(struct subprocess_info *info)
18720 @@ -90830,7 +89273,7 @@ index 8637e04..8b1d0d8 100644
18721 /* If modprobe needs a service that is in a module, we get a recursive
18722 * loop. Limit the number of running kmod threads to max_threads/2 or
18723 * MAX_KMOD_CONCURRENT, whichever is the smaller. A cleaner method
18724 -@@ -188,11 +200,52 @@ int __request_module(bool wait, const char *fmt, ...)
18725 +@@ -188,16 +200,61 @@ int __request_module(bool wait, const char *fmt, ...)
18726
18727 trace_module_request(module_name, wait, _RET_IP_);
18728
18729 @@ -90884,7 +89327,16 @@ index 8637e04..8b1d0d8 100644
18730 EXPORT_SYMBOL(__request_module);
18731 #endif /* CONFIG_MODULES */
18732
18733 -@@ -218,6 +271,20 @@ static int ____call_usermodehelper(void *data)
18734 + static void call_usermodehelper_freeinfo(struct subprocess_info *info)
18735 + {
18736 ++#ifdef CONFIG_GRKERNSEC
18737 ++ kfree(info->path);
18738 ++ info->path = info->origpath;
18739 ++#endif
18740 + if (info->cleanup)
18741 + (*info->cleanup)(info);
18742 + kfree(info);
18743 +@@ -240,6 +297,20 @@ static int ____call_usermodehelper(void *data)
18744 */
18745 set_user_nice(current, 0);
18746
18747 @@ -90898,14 +89350,14 @@ index 8637e04..8b1d0d8 100644
18748 + strcmp(sub_info->path, "/usr/share/apport/apport")) || strstr(sub_info->path, "..")) {
18749 + printk(KERN_ALERT "grsec: denied exec of usermode helper binary %.950s located outside of /sbin and system library paths\n", sub_info->path);
18750 + retval = -EPERM;
18751 -+ goto fail;
18752 ++ goto out;
18753 + }
18754 +#endif
18755 +
18756 retval = -ENOMEM;
18757 new = prepare_kernel_cred(current);
18758 if (!new)
18759 -@@ -240,8 +307,8 @@ static int ____call_usermodehelper(void *data)
18760 +@@ -262,8 +333,8 @@ static int ____call_usermodehelper(void *data)
18761 commit_creds(new);
18762
18763 retval = do_execve(getname_kernel(sub_info->path),
18764 @@ -90913,21 +89365,10 @@ index 8637e04..8b1d0d8 100644
18765 - (const char __user *const __user *)sub_info->envp);
18766 + (const char __user *const __force_user *)sub_info->argv,
18767 + (const char __user *const __force_user *)sub_info->envp);
18768 - if (!retval)
18769 - return 0;
18770 -
18771 -@@ -260,6 +327,10 @@ static int call_helper(void *data)
18772 -
18773 - static void call_usermodehelper_freeinfo(struct subprocess_info *info)
18774 - {
18775 -+#ifdef CONFIG_GRKERNSEC
18776 -+ kfree(info->path);
18777 -+ info->path = info->origpath;
18778 -+#endif
18779 - if (info->cleanup)
18780 - (*info->cleanup)(info);
18781 - kfree(info);
18782 -@@ -300,7 +371,7 @@ static int wait_for_helper(void *data)
18783 + out:
18784 + sub_info->retval = retval;
18785 + /* wait_for_helper() will call umh_complete if UHM_WAIT_PROC. */
18786 +@@ -303,7 +374,7 @@ static int wait_for_helper(void *data)
18787 *
18788 * Thus the __user pointer cast is valid here.
18789 */
18790 @@ -90936,7 +89377,7 @@ index 8637e04..8b1d0d8 100644
18791
18792 /*
18793 * If ret is 0, either ____call_usermodehelper failed and the
18794 -@@ -539,7 +610,12 @@ struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
18795 +@@ -532,7 +603,12 @@ struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
18796 goto out;
18797
18798 INIT_WORK(&sub_info->work, __call_usermodehelper);
18799 @@ -90949,7 +89390,7 @@ index 8637e04..8b1d0d8 100644
18800 sub_info->argv = argv;
18801 sub_info->envp = envp;
18802
18803 -@@ -647,7 +723,7 @@ EXPORT_SYMBOL(call_usermodehelper);
18804 +@@ -645,7 +721,7 @@ EXPORT_SYMBOL(call_usermodehelper);
18805 static int proc_cap_handler(struct ctl_table *table, int write,
18806 void __user *buffer, size_t *lenp, loff_t *ppos)
18807 {
18808 @@ -91145,10 +89586,10 @@ index 9887a90..0cd2b1d 100644
18809
18810 #endif
18811 diff --git a/kernel/locking/mcs_spinlock.h b/kernel/locking/mcs_spinlock.h
18812 -index 23e89c5..8558eac 100644
18813 +index 4d60986..5d351c1 100644
18814 --- a/kernel/locking/mcs_spinlock.h
18815 +++ b/kernel/locking/mcs_spinlock.h
18816 -@@ -81,7 +81,7 @@ void mcs_spin_lock(struct mcs_spinlock **lock, struct mcs_spinlock *node)
18817 +@@ -78,7 +78,7 @@ void mcs_spin_lock(struct mcs_spinlock **lock, struct mcs_spinlock *node)
18818 */
18819 return;
18820 }
18821 @@ -91206,10 +89647,10 @@ index 0799fd3..d06ae3b 100644
18822 extern void debug_mutex_init(struct mutex *lock, const char *name,
18823 struct lock_class_key *key);
18824 diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
18825 -index ae712b2..d0d4a41 100644
18826 +index dadbf88..4500507 100644
18827 --- a/kernel/locking/mutex.c
18828 +++ b/kernel/locking/mutex.c
18829 -@@ -486,7 +486,7 @@ slowpath:
18830 +@@ -518,7 +518,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
18831 goto skip_wait;
18832
18833 debug_mutex_lock_common(lock, &waiter);
18834 @@ -91218,7 +89659,7 @@ index ae712b2..d0d4a41 100644
18835
18836 /* add waiting tasks to the end of the waitqueue (FIFO): */
18837 list_add_tail(&waiter.list, &lock->wait_list);
18838 -@@ -531,7 +531,7 @@ slowpath:
18839 +@@ -563,7 +563,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
18840 schedule_preempt_disabled();
18841 spin_lock_mutex(&lock->wait_lock, flags);
18842 }
18843 @@ -91227,7 +89668,7 @@ index ae712b2..d0d4a41 100644
18844 /* set it to 0 if there are no waiters left: */
18845 if (likely(list_empty(&lock->wait_list)))
18846 atomic_set(&lock->count, 0);
18847 -@@ -568,7 +568,7 @@ skip_wait:
18848 +@@ -600,7 +600,7 @@ skip_wait:
18849 return 0;
18850
18851 err:
18852 @@ -91331,7 +89772,7 @@ index 1d96dd0..994ff19 100644
18853
18854 default:
18855 diff --git a/kernel/module.c b/kernel/module.c
18856 -index 1c47139..6242887 100644
18857 +index 88cec1d..d097c28 100644
18858 --- a/kernel/module.c
18859 +++ b/kernel/module.c
18860 @@ -60,6 +60,7 @@
18861 @@ -92248,7 +90689,7 @@ index 161402f..598814c 100644
18862 atomic_set(&pd->refcnt, 0);
18863 pd->pinst = pinst;
18864 diff --git a/kernel/panic.c b/kernel/panic.c
18865 -index d09dc5c..9abbdff 100644
18866 +index cf80672..f6771b2 100644
18867 --- a/kernel/panic.c
18868 +++ b/kernel/panic.c
18869 @@ -53,7 +53,7 @@ EXPORT_SYMBOL(panic_blink);
18870 @@ -92260,7 +90701,7 @@ index d09dc5c..9abbdff 100644
18871 {
18872 while (1)
18873 cpu_relax();
18874 -@@ -421,7 +421,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
18875 +@@ -422,7 +422,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
18876 disable_trace_on_warning();
18877
18878 pr_warn("------------[ cut here ]------------\n");
18879 @@ -92269,7 +90710,7 @@ index d09dc5c..9abbdff 100644
18880 raw_smp_processor_id(), current->pid, file, line, caller);
18881
18882 if (args)
18883 -@@ -475,7 +475,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
18884 +@@ -476,7 +476,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
18885 */
18886 __visible void __stack_chk_fail(void)
18887 {
18888 @@ -92349,7 +90790,7 @@ index db95d8e..a0ca23f 100644
18889 if (write && !ns_capable(pid_ns->user_ns, CAP_SYS_ADMIN))
18890 return -EPERM;
18891 diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
18892 -index e4e4121..71faf14 100644
18893 +index bbef57f..5f94462 100644
18894 --- a/kernel/power/Kconfig
18895 +++ b/kernel/power/Kconfig
18896 @@ -24,6 +24,8 @@ config HIBERNATE_CALLBACKS
18897 @@ -92362,7 +90803,7 @@ index e4e4121..71faf14 100644
18898 select LZO_COMPRESS
18899 select LZO_DECOMPRESS
18900 diff --git a/kernel/power/process.c b/kernel/power/process.c
18901 -index 7a37cf3..3e4c1c8 100644
18902 +index 5a6ec86..3a8c884 100644
18903 --- a/kernel/power/process.c
18904 +++ b/kernel/power/process.c
18905 @@ -35,6 +35,7 @@ static int try_to_freeze_tasks(bool user_only)
18906 @@ -92380,7 +90821,7 @@ index 7a37cf3..3e4c1c8 100644
18907 + if (time_after(jiffies, end_time))
18908 + timedout = true;
18909 read_lock(&tasklist_lock);
18910 - do_each_thread(g, p) {
18911 + for_each_process_thread(g, p) {
18912 if (p == current || !freeze_task(p))
18913 continue;
18914
18915 @@ -92392,7 +90833,7 @@ index 7a37cf3..3e4c1c8 100644
18916 + sched_show_task(p);
18917 + }
18918 + }
18919 - } while_each_thread(g, p);
18920 + }
18921 read_unlock(&tasklist_lock);
18922
18923 @@ -60,7 +68,7 @@ static int try_to_freeze_tasks(bool user_only)
18924 @@ -92405,10 +90846,10 @@ index 7a37cf3..3e4c1c8 100644
18925
18926 if (pm_wakeup_pending()) {
18927 diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
18928 -index 1ce7706..3b07c49 100644
18929 +index ced2b84..ffc4791 100644
18930 --- a/kernel/printk/printk.c
18931 +++ b/kernel/printk/printk.c
18932 -@@ -490,6 +490,11 @@ static int check_syslog_permissions(int type, bool from_file)
18933 +@@ -489,6 +489,11 @@ static int check_syslog_permissions(int type, bool from_file)
18934 if (from_file && type != SYSLOG_ACTION_OPEN)
18935 return 0;
18936
18937 @@ -92577,10 +91018,10 @@ index 54e7522..5b82dd6 100644
18938 }
18939
18940 diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
18941 -index 948a769..5ca842b 100644
18942 +index 240fa90..5fa56bd 100644
18943 --- a/kernel/rcu/rcutorture.c
18944 +++ b/kernel/rcu/rcutorture.c
18945 -@@ -124,12 +124,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
18946 +@@ -134,12 +134,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
18947 rcu_torture_count) = { 0 };
18948 static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
18949 rcu_torture_batch) = { 0 };
18950 @@ -92599,7 +91040,16 @@ index 948a769..5ca842b 100644
18951 static long n_rcu_torture_barrier_error;
18952 static long n_rcu_torture_boost_ktrerror;
18953 static long n_rcu_torture_boost_rterror;
18954 -@@ -200,11 +200,11 @@ rcu_torture_alloc(void)
18955 +@@ -148,7 +148,7 @@ static long n_rcu_torture_boosts;
18956 + static long n_rcu_torture_timers;
18957 + static long n_barrier_attempts;
18958 + static long n_barrier_successes;
18959 +-static atomic_long_t n_cbfloods;
18960 ++static atomic_long_unchecked_t n_cbfloods;
18961 + static struct list_head rcu_torture_removed;
18962 +
18963 + static int rcu_torture_writer_state;
18964 +@@ -211,11 +211,11 @@ rcu_torture_alloc(void)
18965
18966 spin_lock_bh(&rcu_torture_lock);
18967 if (list_empty(&rcu_torture_freelist)) {
18968 @@ -92613,7 +91063,7 @@ index 948a769..5ca842b 100644
18969 p = rcu_torture_freelist.next;
18970 list_del_init(p);
18971 spin_unlock_bh(&rcu_torture_lock);
18972 -@@ -217,7 +217,7 @@ rcu_torture_alloc(void)
18973 +@@ -228,7 +228,7 @@ rcu_torture_alloc(void)
18974 static void
18975 rcu_torture_free(struct rcu_torture *p)
18976 {
18977 @@ -92622,7 +91072,7 @@ index 948a769..5ca842b 100644
18978 spin_lock_bh(&rcu_torture_lock);
18979 list_add_tail(&p->rtort_free, &rcu_torture_freelist);
18980 spin_unlock_bh(&rcu_torture_lock);
18981 -@@ -301,7 +301,7 @@ rcu_torture_pipe_update_one(struct rcu_torture *rp)
18982 +@@ -312,7 +312,7 @@ rcu_torture_pipe_update_one(struct rcu_torture *rp)
18983 i = rp->rtort_pipe_count;
18984 if (i > RCU_TORTURE_PIPE_LEN)
18985 i = RCU_TORTURE_PIPE_LEN;
18986 @@ -92631,7 +91081,16 @@ index 948a769..5ca842b 100644
18987 if (++rp->rtort_pipe_count >= RCU_TORTURE_PIPE_LEN) {
18988 rp->rtort_mbtest = 0;
18989 return true;
18990 -@@ -808,7 +808,7 @@ rcu_torture_writer(void *arg)
18991 +@@ -799,7 +799,7 @@ rcu_torture_cbflood(void *arg)
18992 + VERBOSE_TOROUT_STRING("rcu_torture_cbflood task started");
18993 + do {
18994 + schedule_timeout_interruptible(cbflood_inter_holdoff);
18995 +- atomic_long_inc(&n_cbfloods);
18996 ++ atomic_long_inc_unchecked(&n_cbfloods);
18997 + WARN_ON(signal_pending(current));
18998 + for (i = 0; i < cbflood_n_burst; i++) {
18999 + for (j = 0; j < cbflood_n_per_burst; j++) {
19000 +@@ -917,7 +917,7 @@ rcu_torture_writer(void *arg)
19001 i = old_rp->rtort_pipe_count;
19002 if (i > RCU_TORTURE_PIPE_LEN)
19003 i = RCU_TORTURE_PIPE_LEN;
19004 @@ -92640,7 +91099,7 @@ index 948a769..5ca842b 100644
19005 old_rp->rtort_pipe_count++;
19006 switch (synctype[torture_random(&rand) % nsynctypes]) {
19007 case RTWS_DEF_FREE:
19008 -@@ -926,7 +926,7 @@ static void rcu_torture_timer(unsigned long unused)
19009 +@@ -1035,7 +1035,7 @@ static void rcu_torture_timer(unsigned long unused)
19010 return;
19011 }
19012 if (p->rtort_mbtest == 0)
19013 @@ -92649,7 +91108,7 @@ index 948a769..5ca842b 100644
19014 spin_lock(&rand_lock);
19015 cur_ops->read_delay(&rand);
19016 n_rcu_torture_timers++;
19017 -@@ -996,7 +996,7 @@ rcu_torture_reader(void *arg)
19018 +@@ -1105,7 +1105,7 @@ rcu_torture_reader(void *arg)
19019 continue;
19020 }
19021 if (p->rtort_mbtest == 0)
19022 @@ -92658,31 +91117,30 @@ index 948a769..5ca842b 100644
19023 cur_ops->read_delay(&rand);
19024 preempt_disable();
19025 pipe_count = p->rtort_pipe_count;
19026 -@@ -1054,15 +1054,15 @@ rcu_torture_printk(char *page)
19027 - }
19028 - page += sprintf(page, "%s%s ", torture_type, TORTURE_FLAG);
19029 - page += sprintf(page,
19030 -- "rtc: %p ver: %lu tfle: %d rta: %d rtaf: %d rtf: %d ",
19031 -+ "rtc: %pP ver: %lu tfle: %d rta: %d rtaf: %d rtf: %d ",
19032 - rcu_torture_current,
19033 - rcu_torture_current_version,
19034 - list_empty(&rcu_torture_freelist),
19035 -- atomic_read(&n_rcu_torture_alloc),
19036 -- atomic_read(&n_rcu_torture_alloc_fail),
19037 -- atomic_read(&n_rcu_torture_free));
19038 -+ atomic_read_unchecked(&n_rcu_torture_alloc),
19039 -+ atomic_read_unchecked(&n_rcu_torture_alloc_fail),
19040 -+ atomic_read_unchecked(&n_rcu_torture_free));
19041 - page += sprintf(page, "rtmbe: %d rtbke: %ld rtbre: %ld ",
19042 -- atomic_read(&n_rcu_torture_mberror),
19043 -+ atomic_read_unchecked(&n_rcu_torture_mberror),
19044 - n_rcu_torture_boost_ktrerror,
19045 - n_rcu_torture_boost_rterror);
19046 - page += sprintf(page, "rtbf: %ld rtb: %ld nt: %ld ",
19047 -@@ -1075,14 +1075,14 @@ rcu_torture_printk(char *page)
19048 - n_barrier_attempts,
19049 - n_rcu_torture_barrier_error);
19050 - page += sprintf(page, "\n%s%s ", torture_type, TORTURE_FLAG);
19051 +@@ -1172,11 +1172,11 @@ rcu_torture_stats_print(void)
19052 + rcu_torture_current,
19053 + rcu_torture_current_version,
19054 + list_empty(&rcu_torture_freelist),
19055 +- atomic_read(&n_rcu_torture_alloc),
19056 +- atomic_read(&n_rcu_torture_alloc_fail),
19057 +- atomic_read(&n_rcu_torture_free));
19058 ++ atomic_read_unchecked(&n_rcu_torture_alloc),
19059 ++ atomic_read_unchecked(&n_rcu_torture_alloc_fail),
19060 ++ atomic_read_unchecked(&n_rcu_torture_free));
19061 + pr_cont("rtmbe: %d rtbke: %ld rtbre: %ld ",
19062 +- atomic_read(&n_rcu_torture_mberror),
19063 ++ atomic_read_unchecked(&n_rcu_torture_mberror),
19064 + n_rcu_torture_boost_ktrerror,
19065 + n_rcu_torture_boost_rterror);
19066 + pr_cont("rtbf: %ld rtb: %ld nt: %ld ",
19067 +@@ -1188,17 +1188,17 @@ rcu_torture_stats_print(void)
19068 + n_barrier_successes,
19069 + n_barrier_attempts,
19070 + n_rcu_torture_barrier_error);
19071 +- pr_cont("cbflood: %ld\n", atomic_long_read(&n_cbfloods));
19072 ++ pr_cont("cbflood: %ld\n", atomic_long_read_unchecked(&n_cbfloods));
19073 +
19074 + pr_alert("%s%s ", torture_type, TORTURE_FLAG);
19075 - if (atomic_read(&n_rcu_torture_mberror) != 0 ||
19076 + if (atomic_read_unchecked(&n_rcu_torture_mberror) != 0 ||
19077 n_rcu_torture_barrier_error != 0 ||
19078 @@ -92690,22 +91148,22 @@ index 948a769..5ca842b 100644
19079 n_rcu_torture_boost_rterror != 0 ||
19080 n_rcu_torture_boost_failure != 0 ||
19081 i > 1) {
19082 - page += sprintf(page, "!!! ");
19083 + pr_cont("%s", "!!! ");
19084 - atomic_inc(&n_rcu_torture_error);
19085 + atomic_inc_unchecked(&n_rcu_torture_error);
19086 WARN_ON_ONCE(1);
19087 }
19088 - page += sprintf(page, "Reader Pipe: ");
19089 -@@ -1096,7 +1096,7 @@ rcu_torture_printk(char *page)
19090 - page += sprintf(page, "Free-Block Circulation: ");
19091 + pr_cont("Reader Pipe: ");
19092 +@@ -1215,7 +1215,7 @@ rcu_torture_stats_print(void)
19093 + pr_alert("%s%s ", torture_type, TORTURE_FLAG);
19094 + pr_cont("Free-Block Circulation: ");
19095 for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
19096 - page += sprintf(page, " %d",
19097 -- atomic_read(&rcu_torture_wcount[i]));
19098 -+ atomic_read_unchecked(&rcu_torture_wcount[i]));
19099 +- pr_cont(" %d", atomic_read(&rcu_torture_wcount[i]));
19100 ++ pr_cont(" %d", atomic_read_unchecked(&rcu_torture_wcount[i]));
19101 }
19102 - page += sprintf(page, "\n");
19103 - if (cur_ops->stats)
19104 -@@ -1461,7 +1461,7 @@ rcu_torture_cleanup(void)
19105 + pr_cont("\n");
19106 +
19107 +@@ -1559,7 +1559,7 @@ rcu_torture_cleanup(void)
19108
19109 rcu_torture_stats_print(); /* -After- the stats thread is stopped! */
19110
19111 @@ -92714,7 +91172,7 @@ index 948a769..5ca842b 100644
19112 rcu_torture_print_module_parms(cur_ops, "End of test: FAILURE");
19113 else if (torture_onoff_failures())
19114 rcu_torture_print_module_parms(cur_ops,
19115 -@@ -1584,18 +1584,18 @@ rcu_torture_init(void)
19116 +@@ -1684,18 +1684,18 @@ rcu_torture_init(void)
19117
19118 rcu_torture_current = NULL;
19119 rcu_torture_current_version = 0;
19120 @@ -92740,7 +91198,7 @@ index 948a769..5ca842b 100644
19121 for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
19122 per_cpu(rcu_torture_count, cpu)[i] = 0;
19123 diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
19124 -index d9efcc1..ea543e9 100644
19125 +index c0623fc..329c091 100644
19126 --- a/kernel/rcu/tiny.c
19127 +++ b/kernel/rcu/tiny.c
19128 @@ -42,7 +42,7 @@
19129 @@ -92752,7 +91210,7 @@ index d9efcc1..ea543e9 100644
19130 static void __call_rcu(struct rcu_head *head,
19131 void (*func)(struct rcu_head *rcu),
19132 struct rcu_ctrlblk *rcp);
19133 -@@ -308,7 +308,7 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
19134 +@@ -310,7 +310,7 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
19135 false));
19136 }
19137
19138 @@ -92787,10 +91245,10 @@ index 858c565..7efd915 100644
19139
19140 static void check_cpu_stalls(void)
19141 diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
19142 -index 89a404a..f42a019 100644
19143 +index 9815447..2cdf92a 100644
19144 --- a/kernel/rcu/tree.c
19145 +++ b/kernel/rcu/tree.c
19146 -@@ -263,7 +263,7 @@ static void rcu_momentary_dyntick_idle(void)
19147 +@@ -274,7 +274,7 @@ static void rcu_momentary_dyntick_idle(void)
19148 */
19149 rdtp = this_cpu_ptr(&rcu_dynticks);
19150 smp_mb__before_atomic(); /* Earlier stuff before QS. */
19151 @@ -92799,7 +91257,7 @@ index 89a404a..f42a019 100644
19152 smp_mb__after_atomic(); /* Later stuff after QS. */
19153 break;
19154 }
19155 -@@ -523,9 +523,9 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval,
19156 +@@ -534,9 +534,9 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval,
19157 rcu_prepare_for_idle(smp_processor_id());
19158 /* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
19159 smp_mb__before_atomic(); /* See above. */
19160 @@ -92808,12 +91266,12 @@ index 89a404a..f42a019 100644
19161 smp_mb__after_atomic(); /* Force ordering with next sojourn. */
19162 - WARN_ON_ONCE(atomic_read(&rdtp->dynticks) & 0x1);
19163 + WARN_ON_ONCE(atomic_read_unchecked(&rdtp->dynticks) & 0x1);
19164 + rcu_dynticks_task_enter();
19165
19166 /*
19167 - * It is illegal to enter an extended quiescent state while
19168 -@@ -643,10 +643,10 @@ static void rcu_eqs_exit_common(struct rcu_dynticks *rdtp, long long oldval,
19169 - int user)
19170 +@@ -656,10 +656,10 @@ static void rcu_eqs_exit_common(struct rcu_dynticks *rdtp, long long oldval,
19171 {
19172 + rcu_dynticks_task_exit();
19173 smp_mb__before_atomic(); /* Force ordering w/previous sojourn. */
19174 - atomic_inc(&rdtp->dynticks);
19175 + atomic_inc_unchecked(&rdtp->dynticks);
19176 @@ -92824,7 +91282,7 @@ index 89a404a..f42a019 100644
19177 rcu_cleanup_after_idle(smp_processor_id());
19178 trace_rcu_dyntick(TPS("End"), oldval, rdtp->dynticks_nesting);
19179 if (!user && !is_idle_task(current)) {
19180 -@@ -767,14 +767,14 @@ void rcu_nmi_enter(void)
19181 +@@ -780,14 +780,14 @@ void rcu_nmi_enter(void)
19182 struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
19183
19184 if (rdtp->dynticks_nmi_nesting == 0 &&
19185 @@ -92842,7 +91300,7 @@ index 89a404a..f42a019 100644
19186 }
19187
19188 /**
19189 -@@ -793,9 +793,9 @@ void rcu_nmi_exit(void)
19190 +@@ -806,9 +806,9 @@ void rcu_nmi_exit(void)
19191 return;
19192 /* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
19193 smp_mb__before_atomic(); /* See above. */
19194 @@ -92854,7 +91312,7 @@ index 89a404a..f42a019 100644
19195 }
19196
19197 /**
19198 -@@ -808,7 +808,7 @@ void rcu_nmi_exit(void)
19199 +@@ -821,7 +821,7 @@ void rcu_nmi_exit(void)
19200 */
19201 bool notrace __rcu_is_watching(void)
19202 {
19203 @@ -92863,7 +91321,7 @@ index 89a404a..f42a019 100644
19204 }
19205
19206 /**
19207 -@@ -891,7 +891,7 @@ static int rcu_is_cpu_rrupt_from_idle(void)
19208 +@@ -904,7 +904,7 @@ static int rcu_is_cpu_rrupt_from_idle(void)
19209 static int dyntick_save_progress_counter(struct rcu_data *rdp,
19210 bool *isidle, unsigned long *maxj)
19211 {
19212 @@ -92872,7 +91330,7 @@ index 89a404a..f42a019 100644
19213 rcu_sysidle_check_cpu(rdp, isidle, maxj);
19214 if ((rdp->dynticks_snap & 0x1) == 0) {
19215 trace_rcu_fqs(rdp->rsp->name, rdp->gpnum, rdp->cpu, TPS("dti"));
19216 -@@ -920,7 +920,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
19217 +@@ -933,7 +933,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
19218 int *rcrmp;
19219 unsigned int snap;
19220
19221 @@ -92881,7 +91339,7 @@ index 89a404a..f42a019 100644
19222 snap = (unsigned int)rdp->dynticks_snap;
19223
19224 /*
19225 -@@ -983,10 +983,10 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
19226 +@@ -996,10 +996,10 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
19227 rdp->rsp->gp_start + jiffies_till_sched_qs) ||
19228 ULONG_CMP_GE(jiffies, rdp->rsp->jiffies_resched)) {
19229 if (!(ACCESS_ONCE(*rcrmp) & rdp->rsp->flavor_mask)) {
19230 @@ -92894,7 +91352,7 @@ index 89a404a..f42a019 100644
19231 ACCESS_ONCE(*rcrmp) + rdp->rsp->flavor_mask;
19232 resched_cpu(rdp->cpu); /* Force CPU into scheduler. */
19233 rdp->rsp->jiffies_resched += 5; /* Enable beating. */
19234 -@@ -1008,7 +1008,7 @@ static void record_gp_stall_check_time(struct rcu_state *rsp)
19235 +@@ -1021,7 +1021,7 @@ static void record_gp_stall_check_time(struct rcu_state *rsp)
19236 rsp->gp_start = j;
19237 smp_wmb(); /* Record start time before stall time. */
19238 j1 = rcu_jiffies_till_stall_check();
19239 @@ -92903,7 +91361,7 @@ index 89a404a..f42a019 100644
19240 rsp->jiffies_resched = j + j1 / 2;
19241 }
19242
19243 -@@ -1049,7 +1049,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
19244 +@@ -1062,7 +1062,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
19245 raw_spin_unlock_irqrestore(&rnp->lock, flags);
19246 return;
19247 }
19248 @@ -92912,7 +91370,7 @@ index 89a404a..f42a019 100644
19249 raw_spin_unlock_irqrestore(&rnp->lock, flags);
19250
19251 /*
19252 -@@ -1126,7 +1126,7 @@ static void print_cpu_stall(struct rcu_state *rsp)
19253 +@@ -1139,7 +1139,7 @@ static void print_cpu_stall(struct rcu_state *rsp)
19254
19255 raw_spin_lock_irqsave(&rnp->lock, flags);
19256 if (ULONG_CMP_GE(jiffies, ACCESS_ONCE(rsp->jiffies_stall)))
19257 @@ -92921,7 +91379,7 @@ index 89a404a..f42a019 100644
19258 3 * rcu_jiffies_till_stall_check() + 3;
19259 raw_spin_unlock_irqrestore(&rnp->lock, flags);
19260
19261 -@@ -1210,7 +1210,7 @@ void rcu_cpu_stall_reset(void)
19262 +@@ -1223,7 +1223,7 @@ void rcu_cpu_stall_reset(void)
19263 struct rcu_state *rsp;
19264
19265 for_each_rcu_flavor(rsp)
19266 @@ -92930,7 +91388,7 @@ index 89a404a..f42a019 100644
19267 }
19268
19269 /*
19270 -@@ -1596,7 +1596,7 @@ static int rcu_gp_init(struct rcu_state *rsp)
19271 +@@ -1609,7 +1609,7 @@ static int rcu_gp_init(struct rcu_state *rsp)
19272 raw_spin_unlock_irq(&rnp->lock);
19273 return 0;
19274 }
19275 @@ -92939,7 +91397,7 @@ index 89a404a..f42a019 100644
19276
19277 if (WARN_ON_ONCE(rcu_gp_in_progress(rsp))) {
19278 /*
19279 -@@ -1637,9 +1637,9 @@ static int rcu_gp_init(struct rcu_state *rsp)
19280 +@@ -1650,9 +1650,9 @@ static int rcu_gp_init(struct rcu_state *rsp)
19281 rdp = this_cpu_ptr(rsp->rda);
19282 rcu_preempt_check_blocked_tasks(rnp);
19283 rnp->qsmask = rnp->qsmaskinit;
19284 @@ -92951,16 +91409,16 @@ index 89a404a..f42a019 100644
19285 if (rnp == rdp->mynode)
19286 (void)__note_gp_changes(rsp, rnp, rdp);
19287 rcu_preempt_boost_start_gp(rnp);
19288 -@@ -1684,7 +1684,7 @@ static int rcu_gp_fqs(struct rcu_state *rsp, int fqs_state_in)
19289 +@@ -1697,7 +1697,7 @@ static int rcu_gp_fqs(struct rcu_state *rsp, int fqs_state_in)
19290 if (ACCESS_ONCE(rsp->gp_flags) & RCU_GP_FLAG_FQS) {
19291 raw_spin_lock_irq(&rnp->lock);
19292 smp_mb__after_unlock_lock();
19293 -- ACCESS_ONCE(rsp->gp_flags) &= ~RCU_GP_FLAG_FQS;
19294 -+ ACCESS_ONCE_RW(rsp->gp_flags) &= ~RCU_GP_FLAG_FQS;
19295 +- ACCESS_ONCE(rsp->gp_flags) =
19296 ++ ACCESS_ONCE_RW(rsp->gp_flags) =
19297 + ACCESS_ONCE(rsp->gp_flags) & ~RCU_GP_FLAG_FQS;
19298 raw_spin_unlock_irq(&rnp->lock);
19299 }
19300 - return fqs_state;
19301 -@@ -1729,7 +1729,7 @@ static void rcu_gp_cleanup(struct rcu_state *rsp)
19302 +@@ -1743,7 +1743,7 @@ static void rcu_gp_cleanup(struct rcu_state *rsp)
19303 rcu_for_each_node_breadth_first(rsp, rnp) {
19304 raw_spin_lock_irq(&rnp->lock);
19305 smp_mb__after_unlock_lock();
19306 @@ -92969,7 +91427,7 @@ index 89a404a..f42a019 100644
19307 rdp = this_cpu_ptr(rsp->rda);
19308 if (rnp == rdp->mynode)
19309 needgp = __note_gp_changes(rsp, rnp, rdp) || needgp;
19310 -@@ -1744,14 +1744,14 @@ static void rcu_gp_cleanup(struct rcu_state *rsp)
19311 +@@ -1758,14 +1758,14 @@ static void rcu_gp_cleanup(struct rcu_state *rsp)
19312 rcu_nocb_gp_set(rnp, nocb);
19313
19314 /* Declare grace period done. */
19315 @@ -92986,7 +91444,7 @@ index 89a404a..f42a019 100644
19316 trace_rcu_grace_period(rsp->name,
19317 ACCESS_ONCE(rsp->gpnum),
19318 TPS("newreq"));
19319 -@@ -1876,7 +1876,7 @@ rcu_start_gp_advanced(struct rcu_state *rsp, struct rcu_node *rnp,
19320 +@@ -1890,7 +1890,7 @@ rcu_start_gp_advanced(struct rcu_state *rsp, struct rcu_node *rnp,
19321 */
19322 return false;
19323 }
19324 @@ -92995,7 +91453,7 @@ index 89a404a..f42a019 100644
19325 trace_rcu_grace_period(rsp->name, ACCESS_ONCE(rsp->gpnum),
19326 TPS("newreq"));
19327
19328 -@@ -2097,7 +2097,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp,
19329 +@@ -2111,7 +2111,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp,
19330 rsp->qlen += rdp->qlen;
19331 rdp->n_cbs_orphaned += rdp->qlen;
19332 rdp->qlen_lazy = 0;
19333 @@ -93004,7 +91462,7 @@ index 89a404a..f42a019 100644
19334 }
19335
19336 /*
19337 -@@ -2344,7 +2344,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
19338 +@@ -2356,7 +2356,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
19339 }
19340 smp_mb(); /* List handling before counting for rcu_barrier(). */
19341 rdp->qlen_lazy -= count_lazy;
19342 @@ -93013,16 +91471,16 @@ index 89a404a..f42a019 100644
19343 rdp->n_cbs_invoked += count;
19344
19345 /* Reinstate batch limit if we have worked down the excess. */
19346 -@@ -2505,7 +2505,7 @@ static void force_quiescent_state(struct rcu_state *rsp)
19347 +@@ -2519,7 +2519,7 @@ static void force_quiescent_state(struct rcu_state *rsp)
19348 raw_spin_unlock_irqrestore(&rnp_old->lock, flags);
19349 return; /* Someone beat us to it. */
19350 }
19351 -- ACCESS_ONCE(rsp->gp_flags) |= RCU_GP_FLAG_FQS;
19352 -+ ACCESS_ONCE_RW(rsp->gp_flags) |= RCU_GP_FLAG_FQS;
19353 +- ACCESS_ONCE(rsp->gp_flags) =
19354 ++ ACCESS_ONCE_RW(rsp->gp_flags) =
19355 + ACCESS_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS;
19356 raw_spin_unlock_irqrestore(&rnp_old->lock, flags);
19357 rcu_gp_kthread_wake(rsp);
19358 - }
19359 -@@ -2550,7 +2550,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
19360 +@@ -2565,7 +2565,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
19361 /*
19362 * Do RCU core processing for the current CPU.
19363 */
19364 @@ -93031,7 +91489,7 @@ index 89a404a..f42a019 100644
19365 {
19366 struct rcu_state *rsp;
19367
19368 -@@ -2662,7 +2662,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
19369 +@@ -2677,7 +2677,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
19370 WARN_ON_ONCE((unsigned long)head & 0x1); /* Misaligned rcu_head! */
19371 if (debug_rcu_head_queue(head)) {
19372 /* Probable double call_rcu(), so leak the callback. */
19373 @@ -93040,7 +91498,7 @@ index 89a404a..f42a019 100644
19374 WARN_ONCE(1, "__call_rcu(): Leaked duplicate callback\n");
19375 return;
19376 }
19377 -@@ -2690,7 +2690,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
19378 +@@ -2705,7 +2705,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
19379 local_irq_restore(flags);
19380 return;
19381 }
19382 @@ -93049,7 +91507,7 @@ index 89a404a..f42a019 100644
19383 if (lazy)
19384 rdp->qlen_lazy++;
19385 else
19386 -@@ -2965,11 +2965,11 @@ void synchronize_sched_expedited(void)
19387 +@@ -2975,11 +2975,11 @@ void synchronize_sched_expedited(void)
19388 * counter wrap on a 32-bit system. Quite a few more CPUs would of
19389 * course be required on a 64-bit system.
19390 */
19391 @@ -93063,16 +91521,22 @@ index 89a404a..f42a019 100644
19392 return;
19393 }
19394
19395 -@@ -2977,7 +2977,7 @@ void synchronize_sched_expedited(void)
19396 +@@ -2987,12 +2987,12 @@ void synchronize_sched_expedited(void)
19397 * Take a ticket. Note that atomic_inc_return() implies a
19398 * full memory barrier.
19399 */
19400 - snap = atomic_long_inc_return(&rsp->expedited_start);
19401 + snap = atomic_long_inc_return_unchecked(&rsp->expedited_start);
19402 firstsnap = snap;
19403 - get_online_cpus();
19404 + if (!try_get_online_cpus()) {
19405 + /* CPU hotplug operation in flight, fall back to normal GP. */
19406 + wait_rcu_gp(call_rcu_sched);
19407 +- atomic_long_inc(&rsp->expedited_normal);
19408 ++ atomic_long_inc_unchecked(&rsp->expedited_normal);
19409 + return;
19410 + }
19411 WARN_ON_ONCE(cpu_is_offline(raw_smp_processor_id()));
19412 -@@ -2990,14 +2990,14 @@ void synchronize_sched_expedited(void)
19413 +@@ -3005,14 +3005,14 @@ void synchronize_sched_expedited(void)
19414 synchronize_sched_expedited_cpu_stop,
19415 NULL) == -EAGAIN) {
19416 put_online_cpus();
19417 @@ -93089,7 +91553,7 @@ index 89a404a..f42a019 100644
19418 return;
19419 }
19420
19421 -@@ -3006,7 +3006,7 @@ void synchronize_sched_expedited(void)
19422 +@@ -3021,7 +3021,7 @@ void synchronize_sched_expedited(void)
19423 udelay(trycount * num_online_cpus());
19424 } else {
19425 wait_rcu_gp(call_rcu_sched);
19426 @@ -93098,7 +91562,7 @@ index 89a404a..f42a019 100644
19427 return;
19428 }
19429
19430 -@@ -3015,7 +3015,7 @@ void synchronize_sched_expedited(void)
19431 +@@ -3030,7 +3030,7 @@ void synchronize_sched_expedited(void)
19432 if (ULONG_CMP_GE((ulong)s, (ulong)firstsnap)) {
19433 /* ensure test happens before caller kfree */
19434 smp_mb__before_atomic(); /* ^^^ */
19435 @@ -93107,10 +91571,14 @@ index 89a404a..f42a019 100644
19436 return;
19437 }
19438
19439 -@@ -3027,10 +3027,10 @@ void synchronize_sched_expedited(void)
19440 - * period works for us.
19441 - */
19442 - get_online_cpus();
19443 +@@ -3044,13 +3044,13 @@ void synchronize_sched_expedited(void)
19444 + if (!try_get_online_cpus()) {
19445 + /* CPU hotplug operation in flight, use normal GP. */
19446 + wait_rcu_gp(call_rcu_sched);
19447 +- atomic_long_inc(&rsp->expedited_normal);
19448 ++ atomic_long_inc_unchecked(&rsp->expedited_normal);
19449 + return;
19450 + }
19451 - snap = atomic_long_read(&rsp->expedited_start);
19452 + snap = atomic_long_read_unchecked(&rsp->expedited_start);
19453 smp_mb(); /* ensure read is before try_stop_cpus(). */
19454 @@ -93120,7 +91588,7 @@ index 89a404a..f42a019 100644
19455
19456 /*
19457 * Everyone up to our most recent fetch is covered by our grace
19458 -@@ -3039,16 +3039,16 @@ void synchronize_sched_expedited(void)
19459 +@@ -3059,16 +3059,16 @@ void synchronize_sched_expedited(void)
19460 * than we did already did their update.
19461 */
19462 do {
19463 @@ -93140,7 +91608,7 @@ index 89a404a..f42a019 100644
19464
19465 put_online_cpus();
19466 }
19467 -@@ -3254,7 +3254,7 @@ static void _rcu_barrier(struct rcu_state *rsp)
19468 +@@ -3274,7 +3274,7 @@ static void _rcu_barrier(struct rcu_state *rsp)
19469 * ACCESS_ONCE() to prevent the compiler from speculating
19470 * the increment to precede the early-exit check.
19471 */
19472 @@ -93149,7 +91617,7 @@ index 89a404a..f42a019 100644
19473 WARN_ON_ONCE((rsp->n_barrier_done & 0x1) != 1);
19474 _rcu_barrier_trace(rsp, "Inc1", -1, rsp->n_barrier_done);
19475 smp_mb(); /* Order ->n_barrier_done increment with below mechanism. */
19476 -@@ -3304,7 +3304,7 @@ static void _rcu_barrier(struct rcu_state *rsp)
19477 +@@ -3329,7 +3329,7 @@ static void _rcu_barrier(struct rcu_state *rsp)
19478
19479 /* Increment ->n_barrier_done to prevent duplicate work. */
19480 smp_mb(); /* Keep increment after above mechanism. */
19481 @@ -93158,7 +91626,7 @@ index 89a404a..f42a019 100644
19482 WARN_ON_ONCE((rsp->n_barrier_done & 0x1) != 0);
19483 _rcu_barrier_trace(rsp, "Inc2", -1, rsp->n_barrier_done);
19484 smp_mb(); /* Keep increment before caller's subsequent code. */
19485 -@@ -3349,10 +3349,10 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
19486 +@@ -3374,10 +3374,10 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
19487 rdp->grpmask = 1UL << (cpu - rdp->mynode->grplo);
19488 init_callback_list(rdp);
19489 rdp->qlen_lazy = 0;
19490 @@ -93171,7 +91639,7 @@ index 89a404a..f42a019 100644
19491 rdp->cpu = cpu;
19492 rdp->rsp = rsp;
19493 rcu_boot_init_nocb_percpu_data(rdp);
19494 -@@ -3385,8 +3385,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
19495 +@@ -3410,8 +3410,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
19496 init_callback_list(rdp); /* Re-enable callbacks on this CPU. */
19497 rdp->dynticks->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
19498 rcu_sysidle_init_percpu_data(rdp->dynticks);
19499 @@ -93183,7 +91651,7 @@ index 89a404a..f42a019 100644
19500
19501 /* Add CPU to rcu_node bitmasks. */
19502 diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
19503 -index 6a86eb7..022b506 100644
19504 +index bbdc45d..c882ccb 100644
19505 --- a/kernel/rcu/tree.h
19506 +++ b/kernel/rcu/tree.h
19507 @@ -87,11 +87,11 @@ struct rcu_dynticks {
19508 @@ -93200,7 +91668,7 @@ index 6a86eb7..022b506 100644
19509 /* "Idle" excludes userspace execution. */
19510 unsigned long dynticks_idle_jiffies;
19511 /* End of last non-NMI non-idle period. */
19512 -@@ -461,17 +461,17 @@ struct rcu_state {
19513 +@@ -466,17 +466,17 @@ struct rcu_state {
19514 /* _rcu_barrier(). */
19515 /* End of fields guarded by barrier_mutex. */
19516
19517 @@ -93230,10 +91698,10 @@ index 6a86eb7..022b506 100644
19518 unsigned long jiffies_force_qs; /* Time at which to invoke */
19519 /* force_quiescent_state(). */
19520 diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
19521 -index a7997e2..9787c9e 100644
19522 +index c1d7f27..a64bf49 100644
19523 --- a/kernel/rcu/tree_plugin.h
19524 +++ b/kernel/rcu/tree_plugin.h
19525 -@@ -735,7 +735,7 @@ static int rcu_preempted_readers_exp(struct rcu_node *rnp)
19526 +@@ -709,7 +709,7 @@ static int rcu_preempted_readers_exp(struct rcu_node *rnp)
19527 static int sync_rcu_preempt_exp_done(struct rcu_node *rnp)
19528 {
19529 return !rcu_preempted_readers_exp(rnp) &&
19530 @@ -93242,16 +91710,16 @@ index a7997e2..9787c9e 100644
19531 }
19532
19533 /*
19534 -@@ -897,7 +897,7 @@ void synchronize_rcu_expedited(void)
19535 +@@ -870,7 +870,7 @@ void synchronize_rcu_expedited(void)
19536
19537 /* Clean up and exit. */
19538 smp_mb(); /* ensure expedited GP seen before counter increment. */
19539 -- ACCESS_ONCE(sync_rcu_preempt_exp_count)++;
19540 -+ ACCESS_ONCE_RW(sync_rcu_preempt_exp_count)++;
19541 +- ACCESS_ONCE(sync_rcu_preempt_exp_count) =
19542 ++ ACCESS_ONCE_RW(sync_rcu_preempt_exp_count) =
19543 + sync_rcu_preempt_exp_count + 1;
19544 unlock_mb_ret:
19545 mutex_unlock(&sync_rcu_preempt_exp_mutex);
19546 - mb_ret:
19547 -@@ -1452,7 +1452,7 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu)
19548 +@@ -1426,7 +1426,7 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu)
19549 free_cpumask_var(cm);
19550 }
19551
19552 @@ -93260,7 +91728,7 @@ index a7997e2..9787c9e 100644
19553 .store = &rcu_cpu_kthread_task,
19554 .thread_should_run = rcu_cpu_kthread_should_run,
19555 .thread_fn = rcu_cpu_kthread,
19556 -@@ -1932,7 +1932,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
19557 +@@ -1900,7 +1900,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
19558 print_cpu_stall_fast_no_hz(fast_no_hz, cpu);
19559 pr_err("\t%d: (%lu %s) idle=%03x/%llx/%d softirq=%u/%u %s\n",
19560 cpu, ticks_value, ticks_title,
19561 @@ -93269,16 +91737,16 @@ index a7997e2..9787c9e 100644
19562 rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting,
19563 rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu),
19564 fast_no_hz);
19565 -@@ -2076,7 +2076,7 @@ static void wake_nocb_leader(struct rcu_data *rdp, bool force)
19566 +@@ -2044,7 +2044,7 @@ static void wake_nocb_leader(struct rcu_data *rdp, bool force)
19567 return;
19568 if (ACCESS_ONCE(rdp_leader->nocb_leader_sleep) || force) {
19569 - /* Prior xchg orders against prior callback enqueue. */
19570 + /* Prior smp_mb__after_atomic() orders against prior enqueue. */
19571 - ACCESS_ONCE(rdp_leader->nocb_leader_sleep) = false;
19572 + ACCESS_ONCE_RW(rdp_leader->nocb_leader_sleep) = false;
19573 wake_up(&rdp_leader->nocb_wq);
19574 }
19575 }
19576 -@@ -2101,7 +2101,7 @@ static void __call_rcu_nocb_enqueue(struct rcu_data *rdp,
19577 +@@ -2096,7 +2096,7 @@ static void __call_rcu_nocb_enqueue(struct rcu_data *rdp,
19578
19579 /* Enqueue the callback on the nocb list and update counts. */
19580 old_rhpp = xchg(&rdp->nocb_tail, rhtp);
19581 @@ -93286,8 +91754,8 @@ index a7997e2..9787c9e 100644
19582 + ACCESS_ONCE_RW(*old_rhpp) = rhp;
19583 atomic_long_add(rhcount, &rdp->nocb_q_count);
19584 atomic_long_add(rhcount_lazy, &rdp->nocb_q_count_lazy);
19585 -
19586 -@@ -2272,7 +2272,7 @@ wait_again:
19587 + smp_mb__after_atomic(); /* Store *old_rhpp before _wake test. */
19588 +@@ -2286,7 +2286,7 @@ wait_again:
19589 continue; /* No CBs here, try next follower. */
19590
19591 /* Move callbacks to wait-for-GP list, which is empty. */
19592 @@ -93296,7 +91764,7 @@ index a7997e2..9787c9e 100644
19593 rdp->nocb_gp_tail = xchg(&rdp->nocb_tail, &rdp->nocb_head);
19594 rdp->nocb_gp_count = atomic_long_xchg(&rdp->nocb_q_count, 0);
19595 rdp->nocb_gp_count_lazy =
19596 -@@ -2398,7 +2398,7 @@ static int rcu_nocb_kthread(void *arg)
19597 +@@ -2413,7 +2413,7 @@ static int rcu_nocb_kthread(void *arg)
19598 list = ACCESS_ONCE(rdp->nocb_follower_head);
19599 BUG_ON(!list);
19600 trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, "WokeNonEmpty");
19601 @@ -93305,36 +91773,36 @@ index a7997e2..9787c9e 100644
19602 tail = xchg(&rdp->nocb_follower_tail, &rdp->nocb_follower_head);
19603 c = atomic_long_xchg(&rdp->nocb_follower_count, 0);
19604 cl = atomic_long_xchg(&rdp->nocb_follower_count_lazy, 0);
19605 -@@ -2428,8 +2428,8 @@ static int rcu_nocb_kthread(void *arg)
19606 +@@ -2443,8 +2443,8 @@ static int rcu_nocb_kthread(void *arg)
19607 list = next;
19608 }
19609 trace_rcu_batch_end(rdp->rsp->name, c, !!list, 0, 0, 1);
19610 -- ACCESS_ONCE(rdp->nocb_p_count) -= c;
19611 -- ACCESS_ONCE(rdp->nocb_p_count_lazy) -= cl;
19612 -+ ACCESS_ONCE_RW(rdp->nocb_p_count) -= c;
19613 -+ ACCESS_ONCE_RW(rdp->nocb_p_count_lazy) -= cl;
19614 +- ACCESS_ONCE(rdp->nocb_p_count) = rdp->nocb_p_count - c;
19615 +- ACCESS_ONCE(rdp->nocb_p_count_lazy) =
19616 ++ ACCESS_ONCE_RW(rdp->nocb_p_count) = rdp->nocb_p_count - c;
19617 ++ ACCESS_ONCE_RW(rdp->nocb_p_count_lazy) =
19618 + rdp->nocb_p_count_lazy - cl;
19619 rdp->n_nocbs_invoked += c;
19620 }
19621 - return 0;
19622 -@@ -2446,7 +2446,7 @@ static void do_nocb_deferred_wakeup(struct rcu_data *rdp)
19623 - {
19624 +@@ -2465,7 +2465,7 @@ static void do_nocb_deferred_wakeup(struct rcu_data *rdp)
19625 if (!rcu_nocb_need_deferred_wakeup(rdp))
19626 return;
19627 -- ACCESS_ONCE(rdp->nocb_defer_wakeup) = false;
19628 -+ ACCESS_ONCE_RW(rdp->nocb_defer_wakeup) = false;
19629 - wake_nocb_leader(rdp, false);
19630 - trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("DeferredWakeEmpty"));
19631 + ndw = ACCESS_ONCE(rdp->nocb_defer_wakeup);
19632 +- ACCESS_ONCE(rdp->nocb_defer_wakeup) = RCU_NOGP_WAKE_NOT;
19633 ++ ACCESS_ONCE_RW(rdp->nocb_defer_wakeup) = RCU_NOGP_WAKE_NOT;
19634 + wake_nocb_leader(rdp, ndw == RCU_NOGP_WAKE_FORCE);
19635 + trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("DeferredWake"));
19636 }
19637 -@@ -2510,7 +2510,7 @@ static void __init rcu_spawn_nocb_kthreads(struct rcu_state *rsp)
19638 - t = kthread_run(rcu_nocb_kthread, rdp,
19639 - "rcuo%c/%d", rsp->abbr, cpu);
19640 - BUG_ON(IS_ERR(t));
19641 -- ACCESS_ONCE(rdp->nocb_kthread) = t;
19642 -+ ACCESS_ONCE_RW(rdp->nocb_kthread) = t;
19643 - }
19644 +@@ -2584,7 +2584,7 @@ static void rcu_spawn_one_nocb_kthread(struct rcu_state *rsp, int cpu)
19645 + t = kthread_run(rcu_nocb_kthread, rdp_spawn,
19646 + "rcuo%c/%d", rsp->abbr, cpu);
19647 + BUG_ON(IS_ERR(t));
19648 +- ACCESS_ONCE(rdp_spawn->nocb_kthread) = t;
19649 ++ ACCESS_ONCE_RW(rdp_spawn->nocb_kthread) = t;
19650 }
19651
19652 -@@ -2641,11 +2641,11 @@ static void rcu_sysidle_enter(struct rcu_dynticks *rdtp, int irq)
19653 + /*
19654 +@@ -2788,11 +2788,11 @@ static void rcu_sysidle_enter(struct rcu_dynticks *rdtp, int irq)
19655
19656 /* Record start of fully idle period. */
19657 j = jiffies;
19658 @@ -93349,7 +91817,7 @@ index a7997e2..9787c9e 100644
19659 }
19660
19661 /*
19662 -@@ -2710,9 +2710,9 @@ static void rcu_sysidle_exit(struct rcu_dynticks *rdtp, int irq)
19663 +@@ -2861,9 +2861,9 @@ static void rcu_sysidle_exit(struct rcu_dynticks *rdtp, int irq)
19664
19665 /* Record end of idle period. */
19666 smp_mb__before_atomic();
19667 @@ -93361,7 +91829,7 @@ index a7997e2..9787c9e 100644
19668
19669 /*
19670 * If we are the timekeeping CPU, we are permitted to be non-idle
19671 -@@ -2753,7 +2753,7 @@ static void rcu_sysidle_check_cpu(struct rcu_data *rdp, bool *isidle,
19672 +@@ -2908,7 +2908,7 @@ static void rcu_sysidle_check_cpu(struct rcu_data *rdp, bool *isidle,
19673 WARN_ON_ONCE(smp_processor_id() != tick_do_timer_cpu);
19674
19675 /* Pick up current idle and NMI-nesting counter and check. */
19676 @@ -93370,7 +91838,7 @@ index a7997e2..9787c9e 100644
19677 if (cur & 0x1) {
19678 *isidle = false; /* We are not idle! */
19679 return;
19680 -@@ -2802,7 +2802,7 @@ static void rcu_sysidle(unsigned long j)
19681 +@@ -2957,7 +2957,7 @@ static void rcu_sysidle(unsigned long j)
19682 case RCU_SYSIDLE_NOT:
19683
19684 /* First time all are idle, so note a short idle period. */
19685 @@ -93379,7 +91847,7 @@ index a7997e2..9787c9e 100644
19686 break;
19687
19688 case RCU_SYSIDLE_SHORT:
19689 -@@ -2840,7 +2840,7 @@ static void rcu_sysidle_cancel(void)
19690 +@@ -2995,7 +2995,7 @@ static void rcu_sysidle_cancel(void)
19691 {
19692 smp_mb();
19693 if (full_sysidle_state > RCU_SYSIDLE_SHORT)
19694 @@ -93388,7 +91856,7 @@ index a7997e2..9787c9e 100644
19695 }
19696
19697 /*
19698 -@@ -2888,7 +2888,7 @@ static void rcu_sysidle_cb(struct rcu_head *rhp)
19699 +@@ -3047,7 +3047,7 @@ static void rcu_sysidle_cb(struct rcu_head *rhp)
19700 smp_mb(); /* grace period precedes setting inuse. */
19701
19702 rshp = container_of(rhp, struct rcu_sysidle_head, rh);
19703 @@ -93397,6 +91865,23 @@ index a7997e2..9787c9e 100644
19704 }
19705
19706 /*
19707 +@@ -3200,7 +3200,7 @@ static void rcu_bind_gp_kthread(void)
19708 + static void rcu_dynticks_task_enter(void)
19709 + {
19710 + #if defined(CONFIG_TASKS_RCU) && defined(CONFIG_NO_HZ_FULL)
19711 +- ACCESS_ONCE(current->rcu_tasks_idle_cpu) = smp_processor_id();
19712 ++ ACCESS_ONCE_RW(current->rcu_tasks_idle_cpu) = smp_processor_id();
19713 + #endif /* #if defined(CONFIG_TASKS_RCU) && defined(CONFIG_NO_HZ_FULL) */
19714 + }
19715 +
19716 +@@ -3208,6 +3208,6 @@ static void rcu_dynticks_task_enter(void)
19717 + static void rcu_dynticks_task_exit(void)
19718 + {
19719 + #if defined(CONFIG_TASKS_RCU) && defined(CONFIG_NO_HZ_FULL)
19720 +- ACCESS_ONCE(current->rcu_tasks_idle_cpu) = -1;
19721 ++ ACCESS_ONCE_RW(current->rcu_tasks_idle_cpu) = -1;
19722 + #endif /* #if defined(CONFIG_TASKS_RCU) && defined(CONFIG_NO_HZ_FULL) */
19723 + }
19724 diff --git a/kernel/rcu/tree_trace.c b/kernel/rcu/tree_trace.c
19725 index 5cdc62e..cc52e88 100644
19726 --- a/kernel/rcu/tree_trace.c
19727 @@ -93439,10 +91924,10 @@ index 5cdc62e..cc52e88 100644
19728 }
19729
19730 diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
19731 -index 4056d79..c11741a 100644
19732 +index 3ef8ba5..8c5ebfb6 100644
19733 --- a/kernel/rcu/update.c
19734 +++ b/kernel/rcu/update.c
19735 -@@ -308,10 +308,10 @@ int rcu_jiffies_till_stall_check(void)
19736 +@@ -342,10 +342,10 @@ int rcu_jiffies_till_stall_check(void)
19737 * for CONFIG_RCU_CPU_STALL_TIMEOUT.
19738 */
19739 if (till_stall_check < 3) {
19740 @@ -93455,8 +91940,35 @@ index 4056d79..c11741a 100644
19741 till_stall_check = 300;
19742 }
19743 return till_stall_check * HZ + RCU_STALL_DELAY_DELTA;
19744 +@@ -501,7 +501,7 @@ static void check_holdout_task(struct task_struct *t,
19745 + !ACCESS_ONCE(t->on_rq) ||
19746 + (IS_ENABLED(CONFIG_NO_HZ_FULL) &&
19747 + !is_idle_task(t) && t->rcu_tasks_idle_cpu >= 0)) {
19748 +- ACCESS_ONCE(t->rcu_tasks_holdout) = false;
19749 ++ ACCESS_ONCE_RW(t->rcu_tasks_holdout) = false;
19750 + list_del_init(&t->rcu_tasks_holdout_list);
19751 + put_task_struct(t);
19752 + return;
19753 +@@ -588,7 +588,7 @@ static int __noreturn rcu_tasks_kthread(void *arg)
19754 + !is_idle_task(t)) {
19755 + get_task_struct(t);
19756 + t->rcu_tasks_nvcsw = ACCESS_ONCE(t->nvcsw);
19757 +- ACCESS_ONCE(t->rcu_tasks_holdout) = true;
19758 ++ ACCESS_ONCE_RW(t->rcu_tasks_holdout) = true;
19759 + list_add(&t->rcu_tasks_holdout_list,
19760 + &rcu_tasks_holdouts);
19761 + }
19762 +@@ -685,7 +685,7 @@ static void rcu_spawn_tasks_kthread(void)
19763 + t = kthread_run(rcu_tasks_kthread, NULL, "rcu_tasks_kthread");
19764 + BUG_ON(IS_ERR(t));
19765 + smp_mb(); /* Ensure others see full kthread. */
19766 +- ACCESS_ONCE(rcu_tasks_kthread_ptr) = t;
19767 ++ ACCESS_ONCE_RW(rcu_tasks_kthread_ptr) = t;
19768 + mutex_unlock(&rcu_tasks_kthread_mutex);
19769 + }
19770 +
19771 diff --git a/kernel/resource.c b/kernel/resource.c
19772 -index 60c5a38..ed77193 100644
19773 +index 0bcebff..e7cd5b2 100644
19774 --- a/kernel/resource.c
19775 +++ b/kernel/resource.c
19776 @@ -161,8 +161,18 @@ static const struct file_operations proc_iomem_operations = {
19777 @@ -93479,7 +91991,7 @@ index 60c5a38..ed77193 100644
19778 }
19779 __initcall(ioresources_init);
19780 diff --git a/kernel/sched/auto_group.c b/kernel/sched/auto_group.c
19781 -index e73efba..c9bfbd4 100644
19782 +index 8a2e230..6020954 100644
19783 --- a/kernel/sched/auto_group.c
19784 +++ b/kernel/sched/auto_group.c
19785 @@ -11,7 +11,7 @@
19786 @@ -93532,10 +92044,10 @@ index a63f4dc..349bbb0 100644
19787 unsigned long timeout)
19788 {
19789 diff --git a/kernel/sched/core.c b/kernel/sched/core.c
19790 -index 6d7cb91..420f2d2 100644
19791 +index 89e7283..072bc26 100644
19792 --- a/kernel/sched/core.c
19793 +++ b/kernel/sched/core.c
19794 -@@ -1857,7 +1857,7 @@ void set_numabalancing_state(bool enabled)
19795 +@@ -1885,7 +1885,7 @@ void set_numabalancing_state(bool enabled)
19796 int sysctl_numa_balancing(struct ctl_table *table, int write,
19797 void __user *buffer, size_t *lenp, loff_t *ppos)
19798 {
19799 @@ -93544,7 +92056,7 @@ index 6d7cb91..420f2d2 100644
19800 int err;
19801 int state = numabalancing_enabled;
19802
19803 -@@ -2324,8 +2324,10 @@ context_switch(struct rq *rq, struct task_struct *prev,
19804 +@@ -2348,8 +2348,10 @@ context_switch(struct rq *rq, struct task_struct *prev,
19805 next->active_mm = oldmm;
19806 atomic_inc(&oldmm->mm_count);
19807 enter_lazy_tlb(oldmm, next);
19808 @@ -93556,7 +92068,7 @@ index 6d7cb91..420f2d2 100644
19809
19810 if (!prev->mm) {
19811 prev->active_mm = NULL;
19812 -@@ -3107,6 +3109,8 @@ int can_nice(const struct task_struct *p, const int nice)
19813 +@@ -3160,6 +3162,8 @@ int can_nice(const struct task_struct *p, const int nice)
19814 /* convert nice value [19,-20] to rlimit style value [1,40] */
19815 int nice_rlim = nice_to_rlimit(nice);
19816
19817 @@ -93565,7 +92077,7 @@ index 6d7cb91..420f2d2 100644
19818 return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
19819 capable(CAP_SYS_NICE));
19820 }
19821 -@@ -3133,7 +3137,8 @@ SYSCALL_DEFINE1(nice, int, increment)
19822 +@@ -3186,7 +3190,8 @@ SYSCALL_DEFINE1(nice, int, increment)
19823 nice = task_nice(current) + increment;
19824
19825 nice = clamp_val(nice, MIN_NICE, MAX_NICE);
19826 @@ -93575,7 +92087,7 @@ index 6d7cb91..420f2d2 100644
19827 return -EPERM;
19828
19829 retval = security_task_setnice(current, nice);
19830 -@@ -3412,6 +3417,7 @@ recheck:
19831 +@@ -3465,6 +3470,7 @@ recheck:
19832 if (policy != p->policy && !rlim_rtprio)
19833 return -EPERM;
19834
19835 @@ -93583,7 +92095,7 @@ index 6d7cb91..420f2d2 100644
19836 /* can't increase priority */
19837 if (attr->sched_priority > p->rt_priority &&
19838 attr->sched_priority > rlim_rtprio)
19839 -@@ -4802,6 +4808,7 @@ void idle_task_exit(void)
19840 +@@ -4885,6 +4891,7 @@ void idle_task_exit(void)
19841
19842 if (mm != &init_mm) {
19843 switch_mm(mm, &init_mm, current);
19844 @@ -93591,7 +92103,7 @@ index 6d7cb91..420f2d2 100644
19845 finish_arch_post_lock_switch();
19846 }
19847 mmdrop(mm);
19848 -@@ -4897,7 +4904,7 @@ static void migrate_tasks(unsigned int dead_cpu)
19849 +@@ -4980,7 +4987,7 @@ static void migrate_tasks(unsigned int dead_cpu)
19850
19851 #if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL)
19852
19853 @@ -93600,7 +92112,7 @@ index 6d7cb91..420f2d2 100644
19854 {
19855 .procname = "sched_domain",
19856 .mode = 0555,
19857 -@@ -4914,17 +4921,17 @@ static struct ctl_table sd_ctl_root[] = {
19858 +@@ -4997,17 +5004,17 @@ static struct ctl_table sd_ctl_root[] = {
19859 {}
19860 };
19861
19862 @@ -93622,7 +92134,7 @@ index 6d7cb91..420f2d2 100644
19863
19864 /*
19865 * In the intermediate directories, both the child directory and
19866 -@@ -4932,22 +4939,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
19867 +@@ -5015,22 +5022,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
19868 * will always be set. In the lowest directory the names are
19869 * static strings and all have proc handlers.
19870 */
19871 @@ -93654,7 +92166,7 @@ index 6d7cb91..420f2d2 100644
19872 const char *procname, void *data, int maxlen,
19873 umode_t mode, proc_handler *proc_handler,
19874 bool load_idx)
19875 -@@ -4967,7 +4977,7 @@ set_table_entry(struct ctl_table *entry,
19876 +@@ -5050,7 +5060,7 @@ set_table_entry(struct ctl_table *entry,
19877 static struct ctl_table *
19878 sd_alloc_ctl_domain_table(struct sched_domain *sd)
19879 {
19880 @@ -93663,7 +92175,7 @@ index 6d7cb91..420f2d2 100644
19881
19882 if (table == NULL)
19883 return NULL;
19884 -@@ -5005,9 +5015,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
19885 +@@ -5088,9 +5098,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
19886 return table;
19887 }
19888
19889 @@ -93675,7 +92187,7 @@ index 6d7cb91..420f2d2 100644
19890 struct sched_domain *sd;
19891 int domain_num = 0, i;
19892 char buf[32];
19893 -@@ -5034,11 +5044,13 @@ static struct ctl_table_header *sd_sysctl_header;
19894 +@@ -5117,11 +5127,13 @@ static struct ctl_table_header *sd_sysctl_header;
19895 static void register_sched_domain_sysctl(void)
19896 {
19897 int i, cpu_num = num_possible_cpus();
19898 @@ -93690,7 +92202,7 @@ index 6d7cb91..420f2d2 100644
19899
19900 if (entry == NULL)
19901 return;
19902 -@@ -5061,8 +5073,12 @@ static void unregister_sched_domain_sysctl(void)
19903 +@@ -5144,8 +5156,12 @@ static void unregister_sched_domain_sysctl(void)
19904 if (sd_sysctl_header)
19905 unregister_sysctl_table(sd_sysctl_header);
19906 sd_sysctl_header = NULL;
19907 @@ -93706,10 +92218,10 @@ index 6d7cb91..420f2d2 100644
19908 #else
19909 static void register_sched_domain_sysctl(void)
19910 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
19911 -index bfa3c86..e58767c 100644
19912 +index ef2b104..69961f6 100644
19913 --- a/kernel/sched/fair.c
19914 +++ b/kernel/sched/fair.c
19915 -@@ -1873,7 +1873,7 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
19916 +@@ -1906,7 +1906,7 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
19917
19918 static void reset_ptenuma_scan(struct task_struct *p)
19919 {
19920 @@ -93718,7 +92230,7 @@ index bfa3c86..e58767c 100644
19921 p->mm->numa_scan_offset = 0;
19922 }
19923
19924 -@@ -7339,7 +7339,7 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) { }
19925 +@@ -7465,7 +7465,7 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) { }
19926 * run_rebalance_domains is triggered when needed from the scheduler tick.
19927 * Also triggered for nohz idle balancing (with nohz_balancing_kick set).
19928 */
19929 @@ -93728,10 +92240,10 @@ index bfa3c86..e58767c 100644
19930 struct rq *this_rq = this_rq();
19931 enum cpu_idle_type idle = this_rq->idle_balance ?
19932 diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
19933 -index 579712f..a338a9d 100644
19934 +index 2df8ef0..aae070f 100644
19935 --- a/kernel/sched/sched.h
19936 +++ b/kernel/sched/sched.h
19937 -@@ -1146,7 +1146,7 @@ struct sched_class {
19938 +@@ -1140,7 +1140,7 @@ struct sched_class {
19939 #ifdef CONFIG_FAIR_GROUP_SCHED
19940 void (*task_move_group) (struct task_struct *p, int on_rq);
19941 #endif
19942 @@ -93740,38 +92252,6 @@ index 579712f..a338a9d 100644
19943
19944 static inline void put_prev_task(struct rq *rq, struct task_struct *prev)
19945 {
19946 -diff --git a/kernel/seccomp.c b/kernel/seccomp.c
19947 -index 44eb005..84922be 100644
19948 ---- a/kernel/seccomp.c
19949 -+++ b/kernel/seccomp.c
19950 -@@ -395,16 +395,15 @@ static struct seccomp_filter *seccomp_prepare_filter(struct sock_fprog *fprog)
19951 - if (!filter)
19952 - goto free_prog;
19953 -
19954 -- filter->prog = kzalloc(bpf_prog_size(new_len),
19955 -- GFP_KERNEL|__GFP_NOWARN);
19956 -+ filter->prog = bpf_prog_alloc(bpf_prog_size(new_len), __GFP_NOWARN);
19957 - if (!filter->prog)
19958 - goto free_filter;
19959 -
19960 - ret = bpf_convert_filter(fp, fprog->len, filter->prog->insnsi, &new_len);
19961 - if (ret)
19962 - goto free_filter_prog;
19963 -- kfree(fp);
19964 -
19965 -+ kfree(fp);
19966 - atomic_set(&filter->usage, 1);
19967 - filter->prog->len = new_len;
19968 -
19969 -@@ -413,7 +412,7 @@ static struct seccomp_filter *seccomp_prepare_filter(struct sock_fprog *fprog)
19970 - return filter;
19971 -
19972 - free_filter_prog:
19973 -- kfree(filter->prog);
19974 -+ __bpf_prog_free(filter->prog);
19975 - free_filter:
19976 - kfree(filter);
19977 - free_prog:
19978 diff --git a/kernel/signal.c b/kernel/signal.c
19979 index 8f0876f..1153a5a 100644
19980 --- a/kernel/signal.c
19981 @@ -93933,7 +92413,7 @@ index eb89e18..a4e6792 100644
19982 mutex_unlock(&smpboot_threads_lock);
19983 put_online_cpus();
19984 diff --git a/kernel/softirq.c b/kernel/softirq.c
19985 -index 5918d22..e95d1926 100644
19986 +index 0699add..d365ad8 100644
19987 --- a/kernel/softirq.c
19988 +++ b/kernel/softirq.c
19989 @@ -53,7 +53,7 @@ irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned;
19990 @@ -93991,7 +92471,7 @@ index 5918d22..e95d1926 100644
19991 .thread_should_run = ksoftirqd_should_run,
19992 .thread_fn = run_ksoftirqd,
19993 diff --git a/kernel/sys.c b/kernel/sys.c
19994 -index ce81291..df2ca85 100644
19995 +index 1eaa2f0..d80d27c 100644
19996 --- a/kernel/sys.c
19997 +++ b/kernel/sys.c
19998 @@ -148,6 +148,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error)
19999 @@ -94007,7 +92487,7 @@ index ce81291..df2ca85 100644
20000 no_nice = security_task_setnice(p, niceval);
20001 if (no_nice) {
20002 error = no_nice;
20003 -@@ -351,6 +357,20 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid)
20004 +@@ -353,6 +359,20 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid)
20005 goto error;
20006 }
20007
20008 @@ -94028,7 +92508,7 @@ index ce81291..df2ca85 100644
20009 if (rgid != (gid_t) -1 ||
20010 (egid != (gid_t) -1 && !gid_eq(kegid, old->gid)))
20011 new->sgid = new->egid;
20012 -@@ -386,6 +406,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid)
20013 +@@ -388,6 +408,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid)
20014 old = current_cred();
20015
20016 retval = -EPERM;
20017 @@ -94039,7 +92519,7 @@ index ce81291..df2ca85 100644
20018 if (ns_capable(old->user_ns, CAP_SETGID))
20019 new->gid = new->egid = new->sgid = new->fsgid = kgid;
20020 else if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->sgid))
20021 -@@ -403,7 +427,7 @@ error:
20022 +@@ -405,7 +429,7 @@ error:
20023 /*
20024 * change the user struct in a credentials set to match the new UID
20025 */
20026 @@ -94048,7 +92528,7 @@ index ce81291..df2ca85 100644
20027 {
20028 struct user_struct *new_user;
20029
20030 -@@ -483,7 +507,18 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid)
20031 +@@ -485,7 +509,18 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid)
20032 goto error;
20033 }
20034
20035 @@ -94067,7 +92547,7 @@ index ce81291..df2ca85 100644
20036 retval = set_user(new);
20037 if (retval < 0)
20038 goto error;
20039 -@@ -533,6 +568,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid)
20040 +@@ -535,6 +570,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid)
20041 old = current_cred();
20042
20043 retval = -EPERM;
20044 @@ -94080,7 +92560,7 @@ index ce81291..df2ca85 100644
20045 if (ns_capable(old->user_ns, CAP_SETUID)) {
20046 new->suid = new->uid = kuid;
20047 if (!uid_eq(kuid, old->uid)) {
20048 -@@ -602,6 +643,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
20049 +@@ -604,6 +645,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
20050 goto error;
20051 }
20052
20053 @@ -94090,7 +92570,7 @@ index ce81291..df2ca85 100644
20054 if (ruid != (uid_t) -1) {
20055 new->uid = kruid;
20056 if (!uid_eq(kruid, old->uid)) {
20057 -@@ -684,6 +728,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
20058 +@@ -688,6 +732,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
20059 goto error;
20060 }
20061
20062 @@ -94100,7 +92580,7 @@ index ce81291..df2ca85 100644
20063 if (rgid != (gid_t) -1)
20064 new->gid = krgid;
20065 if (egid != (gid_t) -1)
20066 -@@ -745,12 +792,16 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
20067 +@@ -752,12 +799,16 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
20068 uid_eq(kuid, old->suid) || uid_eq(kuid, old->fsuid) ||
20069 ns_capable(old->user_ns, CAP_SETUID)) {
20070 if (!uid_eq(kuid, old->fsuid)) {
20071 @@ -94117,7 +92597,7 @@ index ce81291..df2ca85 100644
20072 abort_creds(new);
20073 return old_fsuid;
20074
20075 -@@ -783,12 +834,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid)
20076 +@@ -790,12 +841,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid)
20077 if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->egid) ||
20078 gid_eq(kgid, old->sgid) || gid_eq(kgid, old->fsgid) ||
20079 ns_capable(old->user_ns, CAP_SETGID)) {
20080 @@ -94134,7 +92614,7 @@ index ce81291..df2ca85 100644
20081 abort_creds(new);
20082 return old_fsgid;
20083
20084 -@@ -1167,19 +1222,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
20085 +@@ -1172,19 +1227,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
20086 return -EFAULT;
20087
20088 down_read(&uts_sem);
20089 @@ -94159,7 +92639,7 @@ index ce81291..df2ca85 100644
20090 __OLD_UTS_LEN);
20091 error |= __put_user(0, name->machine + __OLD_UTS_LEN);
20092 up_read(&uts_sem);
20093 -@@ -1381,6 +1436,13 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource,
20094 +@@ -1385,6 +1440,13 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource,
20095 */
20096 new_rlim->rlim_cur = 1;
20097 }
20098 @@ -94174,7 +92654,7 @@ index ce81291..df2ca85 100644
20099 if (!retval) {
20100 if (old_rlim)
20101 diff --git a/kernel/sysctl.c b/kernel/sysctl.c
20102 -index 75875a7..cd8e838 100644
20103 +index 15f2511..181b356 100644
20104 --- a/kernel/sysctl.c
20105 +++ b/kernel/sysctl.c
20106 @@ -94,7 +94,6 @@
20107 @@ -94279,7 +92759,7 @@ index 75875a7..cd8e838 100644
20108 {
20109 .procname = "sched_child_runs_first",
20110 .data = &sysctl_sched_child_runs_first,
20111 -@@ -641,7 +671,7 @@ static struct ctl_table kern_table[] = {
20112 +@@ -642,7 +672,7 @@ static struct ctl_table kern_table[] = {
20113 .data = &modprobe_path,
20114 .maxlen = KMOD_PATH_LEN,
20115 .mode = 0644,
20116 @@ -94288,7 +92768,7 @@ index 75875a7..cd8e838 100644
20117 },
20118 {
20119 .procname = "modules_disabled",
20120 -@@ -808,16 +838,20 @@ static struct ctl_table kern_table[] = {
20121 +@@ -809,16 +839,20 @@ static struct ctl_table kern_table[] = {
20122 .extra1 = &zero,
20123 .extra2 = &one,
20124 },
20125 @@ -94310,7 +92790,7 @@ index 75875a7..cd8e838 100644
20126 {
20127 .procname = "ngroups_max",
20128 .data = &ngroups_max,
20129 -@@ -1073,10 +1107,17 @@ static struct ctl_table kern_table[] = {
20130 +@@ -1065,10 +1099,17 @@ static struct ctl_table kern_table[] = {
20131 */
20132 {
20133 .procname = "perf_event_paranoid",
20134 @@ -94331,7 +92811,7 @@ index 75875a7..cd8e838 100644
20135 },
20136 {
20137 .procname = "perf_event_mlock_kb",
20138 -@@ -1335,6 +1376,13 @@ static struct ctl_table vm_table[] = {
20139 +@@ -1327,6 +1368,13 @@ static struct ctl_table vm_table[] = {
20140 .proc_handler = proc_dointvec_minmax,
20141 .extra1 = &zero,
20142 },
20143 @@ -94345,7 +92825,7 @@ index 75875a7..cd8e838 100644
20144 #else
20145 {
20146 .procname = "nr_trim_pages",
20147 -@@ -1824,6 +1872,16 @@ int proc_dostring(struct ctl_table *table, int write,
20148 +@@ -1809,6 +1857,16 @@ int proc_dostring(struct ctl_table *table, int write,
20149 (char __user *)buffer, lenp, ppos);
20150 }
20151
20152 @@ -94362,7 +92842,7 @@ index 75875a7..cd8e838 100644
20153 static size_t proc_skip_spaces(char **buf)
20154 {
20155 size_t ret;
20156 -@@ -1929,6 +1987,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
20157 +@@ -1914,6 +1972,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
20158 len = strlen(tmp);
20159 if (len > *size)
20160 len = *size;
20161 @@ -94371,7 +92851,7 @@ index 75875a7..cd8e838 100644
20162 if (copy_to_user(*buf, tmp, len))
20163 return -EFAULT;
20164 *size -= len;
20165 -@@ -2106,7 +2166,7 @@ int proc_dointvec(struct ctl_table *table, int write,
20166 +@@ -2091,7 +2151,7 @@ int proc_dointvec(struct ctl_table *table, int write,
20167 static int proc_taint(struct ctl_table *table, int write,
20168 void __user *buffer, size_t *lenp, loff_t *ppos)
20169 {
20170 @@ -94380,7 +92860,7 @@ index 75875a7..cd8e838 100644
20171 unsigned long tmptaint = get_taint();
20172 int err;
20173
20174 -@@ -2134,7 +2194,6 @@ static int proc_taint(struct ctl_table *table, int write,
20175 +@@ -2119,7 +2179,6 @@ static int proc_taint(struct ctl_table *table, int write,
20176 return err;
20177 }
20178
20179 @@ -94388,7 +92868,7 @@ index 75875a7..cd8e838 100644
20180 static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
20181 void __user *buffer, size_t *lenp, loff_t *ppos)
20182 {
20183 -@@ -2143,7 +2202,6 @@ static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
20184 +@@ -2128,7 +2187,6 @@ static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
20185
20186 return proc_dointvec_minmax(table, write, buffer, lenp, ppos);
20187 }
20188 @@ -94396,7 +92876,7 @@ index 75875a7..cd8e838 100644
20189
20190 struct do_proc_dointvec_minmax_conv_param {
20191 int *min;
20192 -@@ -2703,6 +2761,12 @@ int proc_dostring(struct ctl_table *table, int write,
20193 +@@ -2688,6 +2746,12 @@ int proc_dostring(struct ctl_table *table, int write,
20194 return -ENOSYS;
20195 }
20196
20197 @@ -94409,7 +92889,7 @@ index 75875a7..cd8e838 100644
20198 int proc_dointvec(struct ctl_table *table, int write,
20199 void __user *buffer, size_t *lenp, loff_t *ppos)
20200 {
20201 -@@ -2759,5 +2823,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
20202 +@@ -2744,5 +2808,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
20203 EXPORT_SYMBOL(proc_dointvec_userhz_jiffies);
20204 EXPORT_SYMBOL(proc_dointvec_ms_jiffies);
20205 EXPORT_SYMBOL(proc_dostring);
20206 @@ -94417,7 +92897,7 @@ index 75875a7..cd8e838 100644
20207 EXPORT_SYMBOL(proc_doulongvec_minmax);
20208 EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax);
20209 diff --git a/kernel/taskstats.c b/kernel/taskstats.c
20210 -index 13d2f7c..c93d0b0 100644
20211 +index b312fcc7..753d72d 100644
20212 --- a/kernel/taskstats.c
20213 +++ b/kernel/taskstats.c
20214 @@ -28,9 +28,12 @@
20215 @@ -94457,7 +92937,7 @@ index a7077d3..dd48a49 100644
20216 .clock_get = alarm_clock_get,
20217 .timer_create = alarm_timer_create,
20218 diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
20219 -index 1c2fe7d..ce7483d 100644
20220 +index 37e50aa..57a9501 100644
20221 --- a/kernel/time/hrtimer.c
20222 +++ b/kernel/time/hrtimer.c
20223 @@ -1399,7 +1399,7 @@ void hrtimer_peek_ahead_timers(void)
20224 @@ -94470,10 +92950,10 @@ index 1c2fe7d..ce7483d 100644
20225 hrtimer_peek_ahead_timers();
20226 }
20227 diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
20228 -index 3b89464..5e38379 100644
20229 +index a16b678..8c5bd9d 100644
20230 --- a/kernel/time/posix-cpu-timers.c
20231 +++ b/kernel/time/posix-cpu-timers.c
20232 -@@ -1464,14 +1464,14 @@ struct k_clock clock_posix_cpu = {
20233 +@@ -1450,14 +1450,14 @@ struct k_clock clock_posix_cpu = {
20234
20235 static __init int init_posix_cpu_timers(void)
20236 {
20237 @@ -94644,7 +93124,7 @@ index ec1791f..6a086cd 100644
20238 write_seqcount_begin(&tk_core.seq);
20239
20240 diff --git a/kernel/time/timer.c b/kernel/time/timer.c
20241 -index 9bbb834..3caa8ed 100644
20242 +index 3260ffd..c93cd5e 100644
20243 --- a/kernel/time/timer.c
20244 +++ b/kernel/time/timer.c
20245 @@ -1394,7 +1394,7 @@ void update_process_times(int user_tick)
20246 @@ -94783,10 +93263,10 @@ index 1fb08f2..ca4bb1e 100644
20247 return -ENOMEM;
20248 return 0;
20249 diff --git a/kernel/torture.c b/kernel/torture.c
20250 -index d600af2..27a4e9d 100644
20251 +index dd70993..0bf694b 100644
20252 --- a/kernel/torture.c
20253 +++ b/kernel/torture.c
20254 -@@ -484,7 +484,7 @@ static int torture_shutdown_notify(struct notifier_block *unused1,
20255 +@@ -482,7 +482,7 @@ static int torture_shutdown_notify(struct notifier_block *unused1,
20256 mutex_lock(&fullstop_mutex);
20257 if (ACCESS_ONCE(fullstop) == FULLSTOP_DONTSTOP) {
20258 VERBOSE_TOROUT_STRING("Unscheduled system shutdown detected");
20259 @@ -94795,7 +93275,7 @@ index d600af2..27a4e9d 100644
20260 } else {
20261 pr_warn("Concurrent rmmod and shutdown illegal!\n");
20262 }
20263 -@@ -551,14 +551,14 @@ static int torture_stutter(void *arg)
20264 +@@ -549,14 +549,14 @@ static int torture_stutter(void *arg)
20265 if (!torture_must_stop()) {
20266 if (stutter > 1) {
20267 schedule_timeout_interruptible(stutter - 1);
20268 @@ -94813,7 +93293,7 @@ index d600af2..27a4e9d 100644
20269 torture_shutdown_absorb("torture_stutter");
20270 } while (!torture_must_stop());
20271 torture_kthread_stopping("torture_stutter");
20272 -@@ -645,7 +645,7 @@ bool torture_cleanup(void)
20273 +@@ -648,7 +648,7 @@ bool torture_cleanup_begin(void)
20274 schedule_timeout_uninterruptible(10);
20275 return true;
20276 }
20277 @@ -94854,10 +93334,10 @@ index c1bd4ad..4b861dc 100644
20278
20279 ret = -EIO;
20280 diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
20281 -index 5916a8e..220c9c2 100644
20282 +index 31c90fe..051ce98 100644
20283 --- a/kernel/trace/ftrace.c
20284 +++ b/kernel/trace/ftrace.c
20285 -@@ -2128,12 +2128,17 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
20286 +@@ -2183,12 +2183,17 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
20287 if (unlikely(ftrace_disabled))
20288 return 0;
20289
20290 @@ -94877,7 +93357,7 @@ index 5916a8e..220c9c2 100644
20291 }
20292
20293 /*
20294 -@@ -4458,8 +4463,10 @@ static int ftrace_process_locs(struct module *mod,
20295 +@@ -4492,8 +4497,10 @@ static int ftrace_process_locs(struct module *mod,
20296 if (!count)
20297 return 0;
20298
20299 @@ -94888,7 +93368,7 @@ index 5916a8e..220c9c2 100644
20300
20301 start_pg = ftrace_allocate_pages(count);
20302 if (!start_pg)
20303 -@@ -5254,7 +5261,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
20304 +@@ -5340,7 +5347,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
20305
20306 if (t->ret_stack == NULL) {
20307 atomic_set(&t->tracing_graph_pause, 0);
20308 @@ -94897,7 +93377,7 @@ index 5916a8e..220c9c2 100644
20309 t->curr_ret_stack = -1;
20310 /* Make sure the tasks see the -1 first: */
20311 smp_wmb();
20312 -@@ -5467,7 +5474,7 @@ static void
20313 +@@ -5553,7 +5560,7 @@ static void
20314 graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack)
20315 {
20316 atomic_set(&t->tracing_graph_pause, 0);
20317 @@ -95185,7 +93665,7 @@ index a56e07c..d46f0ba 100644
20318 *data_page = bpage;
20319
20320 diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
20321 -index 1520933..c651ebc 100644
20322 +index 426962b..e8e2d9a 100644
20323 --- a/kernel/trace/trace.c
20324 +++ b/kernel/trace/trace.c
20325 @@ -3488,7 +3488,7 @@ int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set)
20326 @@ -95231,7 +93711,7 @@ index 57b67b1..66082a9 100644
20327 + return atomic64_inc_return_unchecked(&trace_counter);
20328 }
20329 diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
20330 -index ef06ce7..3ea161d 100644
20331 +index 1b0df1e..4ebb965 100644
20332 --- a/kernel/trace/trace_events.c
20333 +++ b/kernel/trace/trace_events.c
20334 @@ -1720,7 +1720,6 @@ __trace_early_add_new_event(struct ftrace_event_call *call,
20335 @@ -95343,10 +93823,10 @@ index 1f24ed9..10407ec 100644
20336 s->len = p - s->buffer;
20337 return 1;
20338 diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
20339 -index 8a4e5cb..64f270d 100644
20340 +index 16eddb3..758b308 100644
20341 --- a/kernel/trace/trace_stack.c
20342 +++ b/kernel/trace/trace_stack.c
20343 -@@ -91,7 +91,7 @@ check_stack(unsigned long ip, unsigned long *stack)
20344 +@@ -90,7 +90,7 @@ check_stack(unsigned long ip, unsigned long *stack)
20345 return;
20346
20347 /* we do not handle interrupt stacks yet */
20348 @@ -95356,7 +93836,7 @@ index 8a4e5cb..64f270d 100644
20349
20350 local_irq_save(flags);
20351 diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
20352 -index 7e3cd7a..5156a5fe 100644
20353 +index 29228c4..301bc8c 100644
20354 --- a/kernel/trace/trace_syscalls.c
20355 +++ b/kernel/trace/trace_syscalls.c
20356 @@ -602,6 +602,8 @@ static int perf_sysenter_enable(struct ftrace_event_call *call)
20357 @@ -95444,10 +93924,10 @@ index c8eac43..4b5f08f 100644
20358 memcpy(&uts_table, table, sizeof(uts_table));
20359 uts_table.data = get_uts(table, write);
20360 diff --git a/kernel/watchdog.c b/kernel/watchdog.c
20361 -index a8d6914..8fbdb13 100644
20362 +index 70bf118..4be3c37 100644
20363 --- a/kernel/watchdog.c
20364 +++ b/kernel/watchdog.c
20365 -@@ -521,7 +521,7 @@ static int watchdog_nmi_enable(unsigned int cpu) { return 0; }
20366 +@@ -572,7 +572,7 @@ static int watchdog_nmi_enable(unsigned int cpu) { return 0; }
20367 static void watchdog_nmi_disable(unsigned int cpu) { return; }
20368 #endif /* CONFIG_HARDLOCKUP_DETECTOR */
20369
20370 @@ -95457,10 +93937,10 @@ index a8d6914..8fbdb13 100644
20371 .thread_should_run = watchdog_should_run,
20372 .thread_fn = watchdog,
20373 diff --git a/kernel/workqueue.c b/kernel/workqueue.c
20374 -index 5dbe22a..872413c 100644
20375 +index 09b685d..d3565e3 100644
20376 --- a/kernel/workqueue.c
20377 +++ b/kernel/workqueue.c
20378 -@@ -4507,7 +4507,7 @@ static void rebind_workers(struct worker_pool *pool)
20379 +@@ -4508,7 +4508,7 @@ static void rebind_workers(struct worker_pool *pool)
20380 WARN_ON_ONCE(!(worker_flags & WORKER_UNBOUND));
20381 worker_flags |= WORKER_REBOUND;
20382 worker_flags &= ~WORKER_UNBOUND;
20383 @@ -95470,10 +93950,10 @@ index 5dbe22a..872413c 100644
20384
20385 spin_unlock_irq(&pool->lock);
20386 diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
20387 -index a285900..5e3b26b 100644
20388 +index 4e35a5d..8a1f3f0 100644
20389 --- a/lib/Kconfig.debug
20390 +++ b/lib/Kconfig.debug
20391 -@@ -882,7 +882,7 @@ config DEBUG_MUTEXES
20392 +@@ -894,7 +894,7 @@ config DEBUG_MUTEXES
20393
20394 config DEBUG_WW_MUTEX_SLOWPATH
20395 bool "Wait/wound mutex debugging: Slowpath testing"
20396 @@ -95482,7 +93962,7 @@ index a285900..5e3b26b 100644
20397 select DEBUG_LOCK_ALLOC
20398 select DEBUG_SPINLOCK
20399 select DEBUG_MUTEXES
20400 -@@ -899,7 +899,7 @@ config DEBUG_WW_MUTEX_SLOWPATH
20401 +@@ -911,7 +911,7 @@ config DEBUG_WW_MUTEX_SLOWPATH
20402
20403 config DEBUG_LOCK_ALLOC
20404 bool "Lock debugging: detect incorrect freeing of live locks"
20405 @@ -95491,7 +93971,7 @@ index a285900..5e3b26b 100644
20406 select DEBUG_SPINLOCK
20407 select DEBUG_MUTEXES
20408 select LOCKDEP
20409 -@@ -913,7 +913,7 @@ config DEBUG_LOCK_ALLOC
20410 +@@ -925,7 +925,7 @@ config DEBUG_LOCK_ALLOC
20411
20412 config PROVE_LOCKING
20413 bool "Lock debugging: prove locking correctness"
20414 @@ -95500,7 +93980,7 @@ index a285900..5e3b26b 100644
20415 select LOCKDEP
20416 select DEBUG_SPINLOCK
20417 select DEBUG_MUTEXES
20418 -@@ -964,7 +964,7 @@ config LOCKDEP
20419 +@@ -976,7 +976,7 @@ config LOCKDEP
20420
20421 config LOCK_STAT
20422 bool "Lock usage statistics"
20423 @@ -95509,7 +93989,7 @@ index a285900..5e3b26b 100644
20424 select LOCKDEP
20425 select DEBUG_SPINLOCK
20426 select DEBUG_MUTEXES
20427 -@@ -1437,6 +1437,7 @@ config LATENCYTOP
20428 +@@ -1449,6 +1449,7 @@ config LATENCYTOP
20429 depends on DEBUG_KERNEL
20430 depends on STACKTRACE_SUPPORT
20431 depends on PROC_FS
20432 @@ -95517,7 +93997,7 @@ index a285900..5e3b26b 100644
20433 select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC
20434 select KALLSYMS
20435 select KALLSYMS_ALL
20436 -@@ -1453,7 +1454,7 @@ config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
20437 +@@ -1465,7 +1466,7 @@ config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
20438 config DEBUG_STRICT_USER_COPY_CHECKS
20439 bool "Strict user copy size checks"
20440 depends on ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
20441 @@ -95526,7 +94006,7 @@ index a285900..5e3b26b 100644
20442 help
20443 Enabling this option turns a certain set of sanity checks for user
20444 copy operations into compile time failures.
20445 -@@ -1581,7 +1582,7 @@ endmenu # runtime tests
20446 +@@ -1593,7 +1594,7 @@ endmenu # runtime tests
20447
20448 config PROVIDE_OHCI1394_DMA_INIT
20449 bool "Remote debugging over FireWire early on boot"
20450 @@ -95536,7 +94016,7 @@ index a285900..5e3b26b 100644
20451 If you want to debug problems which hang or crash the kernel early
20452 on boot and the crashing machine has a FireWire port, you can use
20453 diff --git a/lib/Makefile b/lib/Makefile
20454 -index d6b4bc4..a3724eb 100644
20455 +index 0211d2b..93f5cc3 100644
20456 --- a/lib/Makefile
20457 +++ b/lib/Makefile
20458 @@ -55,7 +55,7 @@ obj-$(CONFIG_BTREE) += btree.o
20459 @@ -95562,7 +94042,7 @@ index 114d1be..ab0350c 100644
20460 (val << avg->factor)) >> avg->weight :
20461 (val << avg->factor);
20462 diff --git a/lib/bitmap.c b/lib/bitmap.c
20463 -index 33ce011..89e3d6f 100644
20464 +index b499ab6..fbdb76c 100644
20465 --- a/lib/bitmap.c
20466 +++ b/lib/bitmap.c
20467 @@ -433,7 +433,7 @@ int __bitmap_parse(const char *buf, unsigned int buflen,
20468 @@ -95650,7 +94130,7 @@ index 4382ad7..08aa558 100644
20469 u32 high = divisor >> 32;
20470 u64 quot;
20471 diff --git a/lib/dma-debug.c b/lib/dma-debug.c
20472 -index 98f2d7e..899da5c 100644
20473 +index add80cc..0d27550 100644
20474 --- a/lib/dma-debug.c
20475 +++ b/lib/dma-debug.c
20476 @@ -971,7 +971,7 @@ static int dma_debug_device_change(struct notifier_block *nb, unsigned long acti
20477 @@ -95668,7 +94148,7 @@ index 98f2d7e..899da5c 100644
20478 {
20479 - if (object_is_on_stack(addr))
20480 + if (object_starts_on_stack(addr))
20481 - err_printk(dev, NULL, "DMA-API: device driver maps memory from"
20482 + err_printk(dev, NULL, "DMA-API: device driver maps memory from "
20483 "stack [addr=%p]\n", addr);
20484 }
20485 diff --git a/lib/hash.c b/lib/hash.c
20486 @@ -96063,18 +94543,18 @@ index d2233de..fa1a2f6 100644
20487 }
20488 spin_unlock(&lockref->lock);
20489 diff --git a/lib/percpu-refcount.c b/lib/percpu-refcount.c
20490 -index a89cf09..1a42c2d 100644
20491 +index 6111bcb..02e816b 100644
20492 --- a/lib/percpu-refcount.c
20493 +++ b/lib/percpu-refcount.c
20494 -@@ -29,7 +29,7 @@
20495 - * can't hit 0 before we've added up all the percpu refs.
20496 +@@ -31,7 +31,7 @@
20497 + * atomic_long_t can't hit 0 before we've added up all the percpu refs.
20498 */
20499
20500 --#define PCPU_COUNT_BIAS (1U << 31)
20501 -+#define PCPU_COUNT_BIAS (1U << 30)
20502 +-#define PERCPU_COUNT_BIAS (1LU << (BITS_PER_LONG - 1))
20503 ++#define PERCPU_COUNT_BIAS (1LU << (BITS_PER_LONG - 2))
20504 +
20505 + static DECLARE_WAIT_QUEUE_HEAD(percpu_ref_switch_waitq);
20506
20507 - static unsigned __percpu *pcpu_count_ptr(struct percpu_ref *ref)
20508 - {
20509 diff --git a/lib/radix-tree.c b/lib/radix-tree.c
20510 index 3291a8e..346a91e 100644
20511 --- a/lib/radix-tree.c
20512 @@ -96089,10 +94569,10 @@ index 3291a8e..346a91e 100644
20513 static inline void *ptr_to_indirect(void *ptr)
20514 {
20515 diff --git a/lib/random32.c b/lib/random32.c
20516 -index c9b6bf3..4752c6d4 100644
20517 +index 0bee183..526f12f 100644
20518 --- a/lib/random32.c
20519 +++ b/lib/random32.c
20520 -@@ -46,7 +46,7 @@ static inline void prandom_state_selftest(void)
20521 +@@ -47,7 +47,7 @@ static inline void prandom_state_selftest(void)
20522 }
20523 #endif
20524
20525 @@ -96117,7 +94597,7 @@ index c16c81a..4dcbda1 100644
20526
20527 void rb_insert_color(struct rb_node *node, struct rb_root *root)
20528 diff --git a/lib/show_mem.c b/lib/show_mem.c
20529 -index 0922579..9d7adb9 100644
20530 +index 5e25627..3ed9d7f 100644
20531 --- a/lib/show_mem.c
20532 +++ b/lib/show_mem.c
20533 @@ -44,6 +44,6 @@ void show_mem(unsigned int filter)
20534 @@ -96167,19 +94647,6 @@ index 4abda07..b9d3765 100644
20535 {
20536 phys_addr_t paddr = dma_to_phys(hwdev, dev_addr);
20537
20538 -diff --git a/lib/test_bpf.c b/lib/test_bpf.c
20539 -index 89e0345..3347efe 100644
20540 ---- a/lib/test_bpf.c
20541 -+++ b/lib/test_bpf.c
20542 -@@ -1798,7 +1798,7 @@ static struct bpf_prog *generate_filter(int which, int *err)
20543 - break;
20544 -
20545 - case INTERNAL:
20546 -- fp = kzalloc(bpf_prog_size(flen), GFP_KERNEL);
20547 -+ fp = bpf_prog_alloc(bpf_prog_size(flen), 0);
20548 - if (fp == NULL) {
20549 - pr_cont("UNEXPECTED_FAIL no memory left\n");
20550 - *err = -ENOMEM;
20551 diff --git a/lib/usercopy.c b/lib/usercopy.c
20552 index 4f5b1dd..7cab418 100644
20553 --- a/lib/usercopy.c
20554 @@ -96195,7 +94662,7 @@ index 4f5b1dd..7cab418 100644
20555 +}
20556 +EXPORT_SYMBOL(copy_to_user_overflow);
20557 diff --git a/lib/vsprintf.c b/lib/vsprintf.c
20558 -index 6fe2c84..2fe5ec6 100644
20559 +index ec337f6..8484eb2 100644
20560 --- a/lib/vsprintf.c
20561 +++ b/lib/vsprintf.c
20562 @@ -16,6 +16,9 @@
20563 @@ -96208,7 +94675,7 @@ index 6fe2c84..2fe5ec6 100644
20564 #include <stdarg.h>
20565 #include <linux/module.h> /* for KSYM_SYMBOL_LEN */
20566 #include <linux/types.h>
20567 -@@ -624,7 +627,7 @@ char *symbol_string(char *buf, char *end, void *ptr,
20568 +@@ -625,7 +628,7 @@ char *symbol_string(char *buf, char *end, void *ptr,
20569 #ifdef CONFIG_KALLSYMS
20570 if (*fmt == 'B')
20571 sprint_backtrace(sym, value);
20572 @@ -96217,7 +94684,7 @@ index 6fe2c84..2fe5ec6 100644
20573 sprint_symbol(sym, value);
20574 else
20575 sprint_symbol_no_offset(sym, value);
20576 -@@ -1183,7 +1186,11 @@ char *address_val(char *buf, char *end, const void *addr,
20577 +@@ -1240,7 +1243,11 @@ char *address_val(char *buf, char *end, const void *addr,
20578 return number(buf, end, num, spec);
20579 }
20580
20581 @@ -96229,7 +94696,7 @@ index 6fe2c84..2fe5ec6 100644
20582
20583 /*
20584 * Show a '%p' thing. A kernel extension is that the '%p' is followed
20585 -@@ -1194,8 +1201,10 @@ int kptr_restrict __read_mostly;
20586 +@@ -1251,8 +1258,10 @@ int kptr_restrict __read_mostly;
20587 *
20588 * - 'F' For symbolic function descriptor pointers with offset
20589 * - 'f' For simple symbolic function names without offset
20590 @@ -96240,7 +94707,7 @@ index 6fe2c84..2fe5ec6 100644
20591 * - '[FfSs]R' as above with __builtin_extract_return_addr() translation
20592 * - 'B' For backtraced symbolic direct pointers with offset
20593 * - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref]
20594 -@@ -1263,12 +1272,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
20595 +@@ -1331,12 +1340,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
20596
20597 if (!ptr && *fmt != 'K') {
20598 /*
20599 @@ -96255,7 +94722,7 @@ index 6fe2c84..2fe5ec6 100644
20600 }
20601
20602 switch (*fmt) {
20603 -@@ -1278,6 +1287,14 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
20604 +@@ -1346,6 +1355,14 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
20605 /* Fallthrough */
20606 case 'S':
20607 case 's':
20608 @@ -96270,7 +94737,7 @@ index 6fe2c84..2fe5ec6 100644
20609 case 'B':
20610 return symbol_string(buf, end, ptr, spec, fmt);
20611 case 'R':
20612 -@@ -1333,6 +1350,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
20613 +@@ -1403,6 +1420,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
20614 va_end(va);
20615 return buf;
20616 }
20617 @@ -96279,7 +94746,7 @@ index 6fe2c84..2fe5ec6 100644
20618 case 'K':
20619 /*
20620 * %pK cannot be used in IRQ context because its test
20621 -@@ -1390,6 +1409,22 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
20622 +@@ -1460,6 +1479,22 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
20623 ((const struct file *)ptr)->f_path.dentry,
20624 spec, fmt);
20625 }
20626 @@ -96302,7 +94769,7 @@ index 6fe2c84..2fe5ec6 100644
20627 spec.flags |= SMALL;
20628 if (spec.field_width == -1) {
20629 spec.field_width = default_width;
20630 -@@ -2089,11 +2124,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
20631 +@@ -2160,11 +2195,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
20632 typeof(type) value; \
20633 if (sizeof(type) == 8) { \
20634 args = PTR_ALIGN(args, sizeof(u32)); \
20635 @@ -96317,7 +94784,7 @@ index 6fe2c84..2fe5ec6 100644
20636 } \
20637 args += sizeof(type); \
20638 value; \
20639 -@@ -2156,7 +2191,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
20640 +@@ -2227,7 +2262,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
20641 case FORMAT_TYPE_STR: {
20642 const char *str_arg = args;
20643 args += strlen(str_arg) + 1;
20644 @@ -96334,10 +94801,10 @@ index 0000000..7cd6065
20645 @@ -0,0 +1 @@
20646 +-grsec
20647 diff --git a/mm/Kconfig b/mm/Kconfig
20648 -index 886db21..f514de2 100644
20649 +index 1d1ae6b..0f05885 100644
20650 --- a/mm/Kconfig
20651 +++ b/mm/Kconfig
20652 -@@ -333,10 +333,11 @@ config KSM
20653 +@@ -341,10 +341,11 @@ config KSM
20654 root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
20655
20656 config DEFAULT_MMAP_MIN_ADDR
20657 @@ -96352,7 +94819,7 @@ index 886db21..f514de2 100644
20658 This is the portion of low virtual memory which should be protected
20659 from userspace allocation. Keeping a user from writing to low pages
20660 can help reduce the impact of kernel NULL pointer bugs.
20661 -@@ -367,7 +368,7 @@ config MEMORY_FAILURE
20662 +@@ -375,7 +376,7 @@ config MEMORY_FAILURE
20663
20664 config HWPOISON_INJECT
20665 tristate "HWPoison pages injector"
20666 @@ -96362,7 +94829,7 @@ index 886db21..f514de2 100644
20667
20668 config NOMMU_INITIAL_TRIM_EXCESS
20669 diff --git a/mm/backing-dev.c b/mm/backing-dev.c
20670 -index 1706cbb..f89dbca 100644
20671 +index 0ae0df5..82ac56b 100644
20672 --- a/mm/backing-dev.c
20673 +++ b/mm/backing-dev.c
20674 @@ -12,7 +12,7 @@
20675 @@ -96374,7 +94841,7 @@ index 1706cbb..f89dbca 100644
20676
20677 struct backing_dev_info default_backing_dev_info = {
20678 .name = "default",
20679 -@@ -533,7 +533,7 @@ int bdi_setup_and_register(struct backing_dev_info *bdi, char *name,
20680 +@@ -525,7 +525,7 @@ int bdi_setup_and_register(struct backing_dev_info *bdi, char *name,
20681 return err;
20682
20683 err = bdi_register(bdi, NULL, "%.28s-%ld", name,
20684 @@ -96384,10 +94851,10 @@ index 1706cbb..f89dbca 100644
20685 bdi_destroy(bdi);
20686 return err;
20687 diff --git a/mm/filemap.c b/mm/filemap.c
20688 -index 90effcd..539aa64 100644
20689 +index 14b4642..d71ba82 100644
20690 --- a/mm/filemap.c
20691 +++ b/mm/filemap.c
20692 -@@ -2092,7 +2092,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
20693 +@@ -2101,7 +2101,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
20694 struct address_space *mapping = file->f_mapping;
20695
20696 if (!mapping->a_ops->readpage)
20697 @@ -96396,7 +94863,7 @@ index 90effcd..539aa64 100644
20698 file_accessed(file);
20699 vma->vm_ops = &generic_file_vm_ops;
20700 return 0;
20701 -@@ -2270,6 +2270,7 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i
20702 +@@ -2279,6 +2279,7 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i
20703 *pos = i_size_read(inode);
20704
20705 if (limit != RLIM_INFINITY) {
20706 @@ -96421,10 +94888,10 @@ index 72b8fa3..c5b39f1 100644
20707 * Make sure the vma is shared, that it supports prefaulting,
20708 * and that the remapped range is valid and fully within
20709 diff --git a/mm/gup.c b/mm/gup.c
20710 -index 91d044b..a58ecf6 100644
20711 +index cd62c8c..3bb2053 100644
20712 --- a/mm/gup.c
20713 +++ b/mm/gup.c
20714 -@@ -270,11 +270,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
20715 +@@ -274,11 +274,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
20716 unsigned int fault_flags = 0;
20717 int ret;
20718
20719 @@ -96436,7 +94903,7 @@ index 91d044b..a58ecf6 100644
20720 if (*flags & FOLL_WRITE)
20721 fault_flags |= FAULT_FLAG_WRITE;
20722 if (nonblocking)
20723 -@@ -436,14 +431,14 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
20724 +@@ -444,14 +439,14 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
20725 if (!(gup_flags & FOLL_FORCE))
20726 gup_flags |= FOLL_NUMA;
20727
20728 @@ -96453,7 +94920,7 @@ index 91d044b..a58ecf6 100644
20729 if (!vma && in_gate_area(mm, start)) {
20730 int ret;
20731 ret = get_gate_page(mm, start & PAGE_MASK,
20732 -@@ -455,7 +450,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
20733 +@@ -463,7 +458,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
20734 goto next_page;
20735 }
20736
20737 @@ -96462,7 +94929,7 @@ index 91d044b..a58ecf6 100644
20738 return i ? : -EFAULT;
20739 if (is_vm_hugetlb_page(vma)) {
20740 i = follow_hugetlb_page(mm, vma, pages, vmas,
20741 -@@ -510,7 +505,7 @@ next_page:
20742 +@@ -518,7 +513,7 @@ next_page:
20743 i += page_increm;
20744 start += page_increm * PAGE_SIZE;
20745 nr_pages -= page_increm;
20746 @@ -96500,7 +94967,7 @@ index 123bcd3..0de52ba 100644
20747 set_page_address(page, (void *)vaddr);
20748
20749 diff --git a/mm/hugetlb.c b/mm/hugetlb.c
20750 -index eeceeeb..a209d58 100644
20751 +index 9fd7227..5628939 100644
20752 --- a/mm/hugetlb.c
20753 +++ b/mm/hugetlb.c
20754 @@ -2258,6 +2258,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
20755 @@ -96637,7 +95104,7 @@ index eeceeeb..a209d58 100644
20756 if (!ptep)
20757 return VM_FAULT_OOM;
20758 diff --git a/mm/internal.h b/mm/internal.h
20759 -index 5f2772f..4c3882c 100644
20760 +index a4f90ba..fbdc32b 100644
20761 --- a/mm/internal.h
20762 +++ b/mm/internal.h
20763 @@ -134,6 +134,7 @@ __find_buddy_index(unsigned long page_idx, unsigned int order)
20764 @@ -96648,7 +95115,7 @@ index 5f2772f..4c3882c 100644
20765 extern void prep_compound_page(struct page *page, unsigned long order);
20766 #ifdef CONFIG_MEMORY_FAILURE
20767 extern bool is_free_buddy_page(struct page *page);
20768 -@@ -376,7 +377,7 @@ extern u32 hwpoison_filter_enable;
20769 +@@ -390,7 +391,7 @@ extern u32 hwpoison_filter_enable;
20770
20771 extern unsigned long vm_mmap_pgoff(struct file *, unsigned long,
20772 unsigned long, unsigned long,
20773 @@ -96658,10 +95125,10 @@ index 5f2772f..4c3882c 100644
20774 extern void set_pageblock_order(void);
20775 unsigned long reclaim_clean_pages_from_list(struct zone *zone,
20776 diff --git a/mm/iov_iter.c b/mm/iov_iter.c
20777 -index 141dcf7..7327fd3 100644
20778 +index e34a3cb..a810efe 100644
20779 --- a/mm/iov_iter.c
20780 +++ b/mm/iov_iter.c
20781 -@@ -173,7 +173,7 @@ static size_t __iovec_copy_from_user_inatomic(char *vaddr,
20782 +@@ -307,7 +307,7 @@ static size_t __iovec_copy_from_user_inatomic(char *vaddr,
20783
20784 while (bytes) {
20785 char __user *buf = iov->iov_base + base;
20786 @@ -96670,7 +95137,7 @@ index 141dcf7..7327fd3 100644
20787
20788 base = 0;
20789 left = __copy_from_user_inatomic(vaddr, buf, copy);
20790 -@@ -201,7 +201,7 @@ static size_t copy_from_user_atomic_iovec(struct page *page,
20791 +@@ -335,7 +335,7 @@ static size_t copy_from_user_atomic_iovec(struct page *page,
20792
20793 kaddr = kmap_atomic(page);
20794 if (likely(i->nr_segs == 1)) {
20795 @@ -96679,7 +95146,7 @@ index 141dcf7..7327fd3 100644
20796 char __user *buf = i->iov->iov_base + i->iov_offset;
20797 left = __copy_from_user_inatomic(kaddr + offset, buf, bytes);
20798 copied = bytes - left;
20799 -@@ -231,7 +231,7 @@ static void advance_iovec(struct iov_iter *i, size_t bytes)
20800 +@@ -365,7 +365,7 @@ static void advance_iovec(struct iov_iter *i, size_t bytes)
20801 * zero-length segments (without overruning the iovec).
20802 */
20803 while (bytes || unlikely(i->count && !iov->iov_len)) {
20804 @@ -96813,7 +95280,7 @@ index 0938b30..199abe8 100644
20805 if (end == start)
20806 return error;
20807 diff --git a/mm/memory-failure.c b/mm/memory-failure.c
20808 -index 44c6bd2..60369dc3 100644
20809 +index 8639f6b..b623882a 100644
20810 --- a/mm/memory-failure.c
20811 +++ b/mm/memory-failure.c
20812 @@ -61,7 +61,7 @@ int sysctl_memory_failure_early_kill __read_mostly = 0;
20813 @@ -96943,7 +95410,7 @@ index 44c6bd2..60369dc3 100644
20814 }
20815 unset_migratetype_isolate(page, MIGRATE_MOVABLE);
20816 diff --git a/mm/memory.c b/mm/memory.c
20817 -index e497def..9cdef79 100644
20818 +index d5f2ae9..4d678b2 100644
20819 --- a/mm/memory.c
20820 +++ b/mm/memory.c
20821 @@ -415,6 +415,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
20822 @@ -97243,7 +95710,7 @@ index e497def..9cdef79 100644
20823 /*
20824 * This routine handles present pages, when users try to write
20825 * to a shared page. It is done by copying the page to a new address
20826 -@@ -2217,6 +2424,12 @@ gotten:
20827 +@@ -2218,6 +2425,12 @@ gotten:
20828 */
20829 page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
20830 if (likely(pte_same(*page_table, orig_pte))) {
20831 @@ -97256,7 +95723,7 @@ index e497def..9cdef79 100644
20832 if (old_page) {
20833 if (!PageAnon(old_page)) {
20834 dec_mm_counter_fast(mm, MM_FILEPAGES);
20835 -@@ -2270,6 +2483,10 @@ gotten:
20836 +@@ -2271,6 +2484,10 @@ gotten:
20837 page_remove_rmap(old_page);
20838 }
20839
20840 @@ -97267,7 +95734,7 @@ index e497def..9cdef79 100644
20841 /* Free the old page.. */
20842 new_page = old_page;
20843 ret |= VM_FAULT_WRITE;
20844 -@@ -2544,6 +2761,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
20845 +@@ -2545,6 +2762,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
20846 swap_free(entry);
20847 if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
20848 try_to_free_swap(page);
20849 @@ -97279,7 +95746,7 @@ index e497def..9cdef79 100644
20850 unlock_page(page);
20851 if (page != swapcache) {
20852 /*
20853 -@@ -2567,6 +2789,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
20854 +@@ -2568,6 +2790,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
20855
20856 /* No need to invalidate - it was non-present before */
20857 update_mmu_cache(vma, address, page_table);
20858 @@ -97291,7 +95758,7 @@ index e497def..9cdef79 100644
20859 unlock:
20860 pte_unmap_unlock(page_table, ptl);
20861 out:
20862 -@@ -2586,40 +2813,6 @@ out_release:
20863 +@@ -2587,40 +2814,6 @@ out_release:
20864 }
20865
20866 /*
20867 @@ -97332,7 +95799,7 @@ index e497def..9cdef79 100644
20868 * We enter with non-exclusive mmap_sem (to exclude vma changes,
20869 * but allow concurrent faults), and pte mapped but not yet locked.
20870 * We return with mmap_sem still held, but pte unmapped and unlocked.
20871 -@@ -2629,27 +2822,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
20872 +@@ -2630,27 +2823,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
20873 unsigned int flags)
20874 {
20875 struct mem_cgroup *memcg;
20876 @@ -97365,7 +95832,7 @@ index e497def..9cdef79 100644
20877 if (unlikely(anon_vma_prepare(vma)))
20878 goto oom;
20879 page = alloc_zeroed_user_highpage_movable(vma, address);
20880 -@@ -2673,6 +2862,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
20881 +@@ -2674,6 +2863,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
20882 if (!pte_none(*page_table))
20883 goto release;
20884
20885 @@ -97377,7 +95844,7 @@ index e497def..9cdef79 100644
20886 inc_mm_counter_fast(mm, MM_ANONPAGES);
20887 page_add_new_anon_rmap(page, vma, address);
20888 mem_cgroup_commit_charge(page, memcg, false);
20889 -@@ -2682,6 +2876,12 @@ setpte:
20890 +@@ -2683,6 +2877,12 @@ setpte:
20891
20892 /* No need to invalidate - it was non-present before */
20893 update_mmu_cache(vma, address, page_table);
20894 @@ -97390,7 +95857,7 @@ index e497def..9cdef79 100644
20895 unlock:
20896 pte_unmap_unlock(page_table, ptl);
20897 return 0;
20898 -@@ -2912,6 +3112,11 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
20899 +@@ -2913,6 +3113,11 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
20900 return ret;
20901 }
20902 do_set_pte(vma, address, fault_page, pte, false, false);
20903 @@ -97402,7 +95869,7 @@ index e497def..9cdef79 100644
20904 unlock_page(fault_page);
20905 unlock_out:
20906 pte_unmap_unlock(pte, ptl);
20907 -@@ -2954,7 +3159,18 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma,
20908 +@@ -2955,7 +3160,18 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma,
20909 page_cache_release(fault_page);
20910 goto uncharge_out;
20911 }
20912 @@ -97421,7 +95888,7 @@ index e497def..9cdef79 100644
20913 mem_cgroup_commit_charge(new_page, memcg, false);
20914 lru_cache_add_active_or_unevictable(new_page, vma);
20915 pte_unmap_unlock(pte, ptl);
20916 -@@ -3004,6 +3220,11 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma,
20917 +@@ -3005,6 +3221,11 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma,
20918 return ret;
20919 }
20920 do_set_pte(vma, address, fault_page, pte, true, false);
20921 @@ -97433,7 +95900,7 @@ index e497def..9cdef79 100644
20922 pte_unmap_unlock(pte, ptl);
20923
20924 if (set_page_dirty(fault_page))
20925 -@@ -3245,6 +3466,12 @@ static int handle_pte_fault(struct mm_struct *mm,
20926 +@@ -3246,6 +3467,12 @@ static int handle_pte_fault(struct mm_struct *mm,
20927 if (flags & FAULT_FLAG_WRITE)
20928 flush_tlb_fix_spurious_fault(vma, address);
20929 }
20930 @@ -97446,7 +95913,7 @@ index e497def..9cdef79 100644
20931 unlock:
20932 pte_unmap_unlock(pte, ptl);
20933 return 0;
20934 -@@ -3264,9 +3491,41 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
20935 +@@ -3265,9 +3492,41 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
20936 pmd_t *pmd;
20937 pte_t *pte;
20938
20939 @@ -97488,7 +95955,7 @@ index e497def..9cdef79 100644
20940 pgd = pgd_offset(mm, address);
20941 pud = pud_alloc(mm, pgd, address);
20942 if (!pud)
20943 -@@ -3400,6 +3659,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
20944 +@@ -3401,6 +3660,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
20945 spin_unlock(&mm->page_table_lock);
20946 return 0;
20947 }
20948 @@ -97512,7 +95979,7 @@ index e497def..9cdef79 100644
20949 #endif /* __PAGETABLE_PUD_FOLDED */
20950
20951 #ifndef __PAGETABLE_PMD_FOLDED
20952 -@@ -3430,6 +3706,30 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
20953 +@@ -3431,6 +3707,30 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
20954 spin_unlock(&mm->page_table_lock);
20955 return 0;
20956 }
20957 @@ -97543,7 +96010,7 @@ index e497def..9cdef79 100644
20958 #endif /* __PAGETABLE_PMD_FOLDED */
20959
20960 static int __follow_pte(struct mm_struct *mm, unsigned long address,
20961 -@@ -3539,8 +3839,8 @@ out:
20962 +@@ -3540,8 +3840,8 @@ out:
20963 return ret;
20964 }
20965
20966 @@ -97554,7 +96021,7 @@ index e497def..9cdef79 100644
20967 {
20968 resource_size_t phys_addr;
20969 unsigned long prot = 0;
20970 -@@ -3566,8 +3866,8 @@ EXPORT_SYMBOL_GPL(generic_access_phys);
20971 +@@ -3567,8 +3867,8 @@ EXPORT_SYMBOL_GPL(generic_access_phys);
20972 * Access another process' address space as given in mm. If non-NULL, use the
20973 * given task for page fault accounting.
20974 */
20975 @@ -97565,7 +96032,7 @@ index e497def..9cdef79 100644
20976 {
20977 struct vm_area_struct *vma;
20978 void *old_buf = buf;
20979 -@@ -3575,7 +3875,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
20980 +@@ -3576,7 +3876,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
20981 down_read(&mm->mmap_sem);
20982 /* ignore errors, just check how much was successfully transferred */
20983 while (len) {
20984 @@ -97574,7 +96041,7 @@ index e497def..9cdef79 100644
20985 void *maddr;
20986 struct page *page = NULL;
20987
20988 -@@ -3636,8 +3936,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
20989 +@@ -3637,8 +3937,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
20990 *
20991 * The caller must hold a reference on @mm.
20992 */
20993 @@ -97585,7 +96052,7 @@ index e497def..9cdef79 100644
20994 {
20995 return __access_remote_vm(NULL, mm, addr, buf, len, write);
20996 }
20997 -@@ -3647,11 +3947,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
20998 +@@ -3648,11 +3948,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
20999 * Source/target buffer must be kernel space,
21000 * Do not walk the page table directly, use get_user_pages
21001 */
21002 @@ -97601,7 +96068,7 @@ index e497def..9cdef79 100644
21003 mm = get_task_mm(tsk);
21004 if (!mm)
21005 diff --git a/mm/mempolicy.c b/mm/mempolicy.c
21006 -index 8f5330d..b41914b 100644
21007 +index e58725a..e0be017 100644
21008 --- a/mm/mempolicy.c
21009 +++ b/mm/mempolicy.c
21010 @@ -750,6 +750,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
21011 @@ -97632,7 +96099,7 @@ index 8f5330d..b41914b 100644
21012 }
21013
21014 out:
21015 -@@ -1225,6 +1239,17 @@ static long do_mbind(unsigned long start, unsigned long len,
21016 +@@ -1212,6 +1226,17 @@ static long do_mbind(unsigned long start, unsigned long len,
21017
21018 if (end < start)
21019 return -EINVAL;
21020 @@ -97650,7 +96117,7 @@ index 8f5330d..b41914b 100644
21021 if (end == start)
21022 return 0;
21023
21024 -@@ -1450,8 +1475,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
21025 +@@ -1437,8 +1462,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
21026 */
21027 tcred = __task_cred(task);
21028 if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) &&
21029 @@ -97660,7 +96127,7 @@ index 8f5330d..b41914b 100644
21030 rcu_read_unlock();
21031 err = -EPERM;
21032 goto out_put;
21033 -@@ -1482,6 +1506,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
21034 +@@ -1469,6 +1493,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
21035 goto out;
21036 }
21037
21038 @@ -97691,7 +96158,7 @@ index 0143995..b294728 100644
21039 err = -EPERM;
21040 goto out;
21041 diff --git a/mm/mlock.c b/mm/mlock.c
21042 -index ce84cb0..6d5a9aa 100644
21043 +index 73cf098..ab547c7 100644
21044 --- a/mm/mlock.c
21045 +++ b/mm/mlock.c
21046 @@ -14,6 +14,7 @@
21047 @@ -97766,7 +96233,7 @@ index ce84cb0..6d5a9aa 100644
21048 capable(CAP_IPC_LOCK))
21049 ret = do_mlockall(flags);
21050 diff --git a/mm/mmap.c b/mm/mmap.c
21051 -index a226d31..9135e65 100644
21052 +index ae91989..d8308c7 100644
21053 --- a/mm/mmap.c
21054 +++ b/mm/mmap.c
21055 @@ -41,6 +41,7 @@
21056 @@ -97823,7 +96290,7 @@ index a226d31..9135e65 100644
21057 }
21058 EXPORT_SYMBOL(vm_get_page_prot);
21059
21060 -@@ -95,6 +115,7 @@ unsigned long sysctl_overcommit_kbytes __read_mostly;
21061 +@@ -114,6 +134,7 @@ unsigned long sysctl_overcommit_kbytes __read_mostly;
21062 int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
21063 unsigned long sysctl_user_reserve_kbytes __read_mostly = 1UL << 17; /* 128MB */
21064 unsigned long sysctl_admin_reserve_kbytes __read_mostly = 1UL << 13; /* 8MB */
21065 @@ -97831,7 +96298,7 @@ index a226d31..9135e65 100644
21066 /*
21067 * Make sure vm_committed_as in one cacheline and not cacheline shared with
21068 * other variables. It can be updated by several CPUs frequently.
21069 -@@ -255,6 +276,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
21070 +@@ -274,6 +295,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
21071 struct vm_area_struct *next = vma->vm_next;
21072
21073 might_sleep();
21074 @@ -97839,20 +96306,30 @@ index a226d31..9135e65 100644
21075 if (vma->vm_ops && vma->vm_ops->close)
21076 vma->vm_ops->close(vma);
21077 if (vma->vm_file)
21078 -@@ -299,6 +321,12 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
21079 +@@ -287,6 +309,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len);
21080 +
21081 + SYSCALL_DEFINE1(brk, unsigned long, brk)
21082 + {
21083 ++ unsigned long rlim;
21084 + unsigned long retval;
21085 + unsigned long newbrk, oldbrk;
21086 + struct mm_struct *mm = current->mm;
21087 +@@ -317,7 +340,13 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
21088 + * segment grow beyond its set limit the in case where the limit is
21089 * not page aligned -Ram Gupta
21090 */
21091 - rlim = rlimit(RLIMIT_DATA);
21092 +- if (check_data_rlimit(rlimit(RLIMIT_DATA), brk, mm->start_brk,
21093 ++ rlim = rlimit(RLIMIT_DATA);
21094 +#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
21095 + /* force a minimum 16MB brk heap on setuid/setgid binaries */
21096 + if (rlim < PAGE_SIZE && (get_dumpable(mm) != SUID_DUMP_USER) && gr_is_global_nonroot(current_uid()))
21097 + rlim = 4096 * PAGE_SIZE;
21098 +#endif
21099 -+ gr_learn_resource(current, RLIMIT_DATA, (brk - mm->start_brk) + (mm->end_data - mm->start_data), 1);
21100 - if (rlim < RLIM_INFINITY && (brk - mm->start_brk) +
21101 - (mm->end_data - mm->start_data) > rlim)
21102 ++ if (check_data_rlimit(rlim, brk, mm->start_brk,
21103 + mm->end_data, mm->start_data))
21104 goto out;
21105 -@@ -952,6 +980,12 @@ static int
21106 +
21107 +@@ -976,6 +1005,12 @@ static int
21108 can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
21109 struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
21110 {
21111 @@ -97865,7 +96342,7 @@ index a226d31..9135e65 100644
21112 if (is_mergeable_vma(vma, file, vm_flags) &&
21113 is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
21114 if (vma->vm_pgoff == vm_pgoff)
21115 -@@ -971,6 +1005,12 @@ static int
21116 +@@ -995,6 +1030,12 @@ static int
21117 can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
21118 struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
21119 {
21120 @@ -97878,15 +96355,7 @@ index a226d31..9135e65 100644
21121 if (is_mergeable_vma(vma, file, vm_flags) &&
21122 is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
21123 pgoff_t vm_pglen;
21124 -@@ -1013,13 +1053,20 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
21125 - struct vm_area_struct *vma_merge(struct mm_struct *mm,
21126 - struct vm_area_struct *prev, unsigned long addr,
21127 - unsigned long end, unsigned long vm_flags,
21128 -- struct anon_vma *anon_vma, struct file *file,
21129 -+ struct anon_vma *anon_vma, struct file *file,
21130 - pgoff_t pgoff, struct mempolicy *policy)
21131 - {
21132 - pgoff_t pglen = (end - addr) >> PAGE_SHIFT;
21133 +@@ -1044,6 +1085,13 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
21134 struct vm_area_struct *area, *next;
21135 int err;
21136
21137 @@ -97900,7 +96369,7 @@ index a226d31..9135e65 100644
21138 /*
21139 * We later require that vma->vm_flags == vm_flags,
21140 * so this tests vma->vm_flags & VM_SPECIAL, too.
21141 -@@ -1035,6 +1082,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
21142 +@@ -1059,6 +1107,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
21143 if (next && next->vm_end == end) /* cases 6, 7, 8 */
21144 next = next->vm_next;
21145
21146 @@ -97916,7 +96385,7 @@ index a226d31..9135e65 100644
21147 /*
21148 * Can it merge with the predecessor?
21149 */
21150 -@@ -1054,9 +1110,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
21151 +@@ -1078,9 +1135,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
21152 /* cases 1, 6 */
21153 err = vma_adjust(prev, prev->vm_start,
21154 next->vm_end, prev->vm_pgoff, NULL);
21155 @@ -97942,8 +96411,8 @@ index a226d31..9135e65 100644
21156 if (err)
21157 return NULL;
21158 khugepaged_enter_vma_merge(prev, vm_flags);
21159 -@@ -1070,12 +1141,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
21160 - mpol_equal(policy, vma_policy(next)) &&
21161 +@@ -1094,12 +1166,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
21162 + mpol_equal(policy, vma_policy(next)) &&
21163 can_vma_merge_before(next, vm_flags,
21164 anon_vma, file, pgoff+pglen)) {
21165 - if (prev && addr < prev->vm_end) /* case 4 */
21166 @@ -97972,7 +96441,7 @@ index a226d31..9135e65 100644
21167 if (err)
21168 return NULL;
21169 khugepaged_enter_vma_merge(area, vm_flags);
21170 -@@ -1184,8 +1270,10 @@ none:
21171 +@@ -1208,8 +1295,10 @@ none:
21172 void vm_stat_account(struct mm_struct *mm, unsigned long flags,
21173 struct file *file, long pages)
21174 {
21175 @@ -97985,7 +96454,7 @@ index a226d31..9135e65 100644
21176
21177 mm->total_vm += pages;
21178
21179 -@@ -1193,7 +1281,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
21180 +@@ -1217,7 +1306,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
21181 mm->shared_vm += pages;
21182 if ((flags & (VM_EXEC|VM_WRITE)) == VM_EXEC)
21183 mm->exec_vm += pages;
21184 @@ -97994,7 +96463,7 @@ index a226d31..9135e65 100644
21185 mm->stack_vm += pages;
21186 }
21187 #endif /* CONFIG_PROC_FS */
21188 -@@ -1223,6 +1311,7 @@ static inline int mlock_future_check(struct mm_struct *mm,
21189 +@@ -1247,6 +1336,7 @@ static inline int mlock_future_check(struct mm_struct *mm,
21190 locked += mm->locked_vm;
21191 lock_limit = rlimit(RLIMIT_MEMLOCK);
21192 lock_limit >>= PAGE_SHIFT;
21193 @@ -98002,7 +96471,7 @@ index a226d31..9135e65 100644
21194 if (locked > lock_limit && !capable(CAP_IPC_LOCK))
21195 return -EAGAIN;
21196 }
21197 -@@ -1249,7 +1338,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
21198 +@@ -1273,7 +1363,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
21199 * (the exception is when the underlying filesystem is noexec
21200 * mounted, in which case we dont add PROT_EXEC.)
21201 */
21202 @@ -98011,7 +96480,7 @@ index a226d31..9135e65 100644
21203 if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
21204 prot |= PROT_EXEC;
21205
21206 -@@ -1275,7 +1364,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
21207 +@@ -1299,7 +1389,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
21208 /* Obtain the address to map to. we verify (or select) it and ensure
21209 * that it represents a valid section of the address space.
21210 */
21211 @@ -98020,7 +96489,7 @@ index a226d31..9135e65 100644
21212 if (addr & ~PAGE_MASK)
21213 return addr;
21214
21215 -@@ -1286,6 +1375,43 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
21216 +@@ -1310,6 +1400,43 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
21217 vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
21218 mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
21219
21220 @@ -98064,7 +96533,7 @@ index a226d31..9135e65 100644
21221 if (flags & MAP_LOCKED)
21222 if (!can_do_mlock())
21223 return -EPERM;
21224 -@@ -1373,6 +1499,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
21225 +@@ -1397,6 +1524,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
21226 vm_flags |= VM_NORESERVE;
21227 }
21228
21229 @@ -98074,7 +96543,7 @@ index a226d31..9135e65 100644
21230 addr = mmap_region(file, addr, len, vm_flags, pgoff);
21231 if (!IS_ERR_VALUE(addr) &&
21232 ((vm_flags & VM_LOCKED) ||
21233 -@@ -1466,7 +1595,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
21234 +@@ -1490,7 +1620,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
21235 vm_flags_t vm_flags = vma->vm_flags;
21236
21237 /* If it was private or non-writable, the write bit is already clear */
21238 @@ -98083,7 +96552,7 @@ index a226d31..9135e65 100644
21239 return 0;
21240
21241 /* The backer wishes to know when pages are first written to? */
21242 -@@ -1512,7 +1641,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
21243 +@@ -1541,7 +1671,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
21244 struct rb_node **rb_link, *rb_parent;
21245 unsigned long charged = 0;
21246
21247 @@ -98106,7 +96575,7 @@ index a226d31..9135e65 100644
21248 if (!may_expand_vm(mm, len >> PAGE_SHIFT)) {
21249 unsigned long nr_pages;
21250
21251 -@@ -1531,11 +1675,10 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
21252 +@@ -1560,11 +1705,10 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
21253
21254 /* Clear old maps */
21255 error = -ENOMEM;
21256 @@ -98119,7 +96588,7 @@ index a226d31..9135e65 100644
21257 }
21258
21259 /*
21260 -@@ -1566,6 +1709,16 @@ munmap_back:
21261 +@@ -1595,6 +1739,16 @@ munmap_back:
21262 goto unacct_error;
21263 }
21264
21265 @@ -98136,7 +96605,7 @@ index a226d31..9135e65 100644
21266 vma->vm_mm = mm;
21267 vma->vm_start = addr;
21268 vma->vm_end = addr + len;
21269 -@@ -1596,6 +1749,13 @@ munmap_back:
21270 +@@ -1625,6 +1779,13 @@ munmap_back:
21271 if (error)
21272 goto unmap_and_free_vma;
21273
21274 @@ -98150,7 +96619,7 @@ index a226d31..9135e65 100644
21275 /* Can addr have changed??
21276 *
21277 * Answer: Yes, several device drivers can do it in their
21278 -@@ -1629,6 +1789,12 @@ munmap_back:
21279 +@@ -1643,6 +1804,12 @@ munmap_back:
21280 }
21281
21282 vma_link(mm, vma, prev, rb_link, rb_parent);
21283 @@ -98163,7 +96632,7 @@ index a226d31..9135e65 100644
21284 /* Once vma denies write, undo our temporary denial count */
21285 if (file) {
21286 if (vm_flags & VM_SHARED)
21287 -@@ -1641,6 +1807,7 @@ out:
21288 +@@ -1655,6 +1822,7 @@ out:
21289 perf_event_mmap(vma);
21290
21291 vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
21292 @@ -98171,7 +96640,7 @@ index a226d31..9135e65 100644
21293 if (vm_flags & VM_LOCKED) {
21294 if (!((vm_flags & VM_SPECIAL) || is_vm_hugetlb_page(vma) ||
21295 vma == get_gate_vma(current->mm)))
21296 -@@ -1676,6 +1843,12 @@ allow_write_and_free_vma:
21297 +@@ -1692,6 +1860,12 @@ allow_write_and_free_vma:
21298 if (vm_flags & VM_DENYWRITE)
21299 allow_write_access(file);
21300 free_vma:
21301 @@ -98184,7 +96653,7 @@ index a226d31..9135e65 100644
21302 kmem_cache_free(vm_area_cachep, vma);
21303 unacct_error:
21304 if (charged)
21305 -@@ -1683,7 +1856,63 @@ unacct_error:
21306 +@@ -1699,7 +1873,63 @@ unacct_error:
21307 return error;
21308 }
21309
21310 @@ -98249,7 +96718,7 @@ index a226d31..9135e65 100644
21311 {
21312 /*
21313 * We implement the search by looking for an rbtree node that
21314 -@@ -1731,11 +1960,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info)
21315 +@@ -1747,11 +1977,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info)
21316 }
21317 }
21318
21319 @@ -98280,7 +96749,7 @@ index a226d31..9135e65 100644
21320 if (gap_end >= low_limit && gap_end - gap_start >= length)
21321 goto found;
21322
21323 -@@ -1785,7 +2032,7 @@ found:
21324 +@@ -1801,7 +2049,7 @@ found:
21325 return gap_start;
21326 }
21327
21328 @@ -98289,7 +96758,7 @@ index a226d31..9135e65 100644
21329 {
21330 struct mm_struct *mm = current->mm;
21331 struct vm_area_struct *vma;
21332 -@@ -1839,6 +2086,24 @@ check_current:
21333 +@@ -1855,6 +2103,24 @@ check_current:
21334 gap_end = vma->vm_start;
21335 if (gap_end < low_limit)
21336 return -ENOMEM;
21337 @@ -98314,7 +96783,7 @@ index a226d31..9135e65 100644
21338 if (gap_start <= high_limit && gap_end - gap_start >= length)
21339 goto found;
21340
21341 -@@ -1902,6 +2167,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
21342 +@@ -1918,6 +2184,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
21343 struct mm_struct *mm = current->mm;
21344 struct vm_area_struct *vma;
21345 struct vm_unmapped_area_info info;
21346 @@ -98322,7 +96791,7 @@ index a226d31..9135e65 100644
21347
21348 if (len > TASK_SIZE - mmap_min_addr)
21349 return -ENOMEM;
21350 -@@ -1909,11 +2175,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
21351 +@@ -1925,11 +2192,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
21352 if (flags & MAP_FIXED)
21353 return addr;
21354
21355 @@ -98339,15 +96808,15 @@ index a226d31..9135e65 100644
21356 return addr;
21357 }
21358
21359 -@@ -1922,6 +2192,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
21360 +@@ -1938,6 +2209,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
21361 info.low_limit = mm->mmap_base;
21362 info.high_limit = TASK_SIZE;
21363 info.align_mask = 0;
21364 + info.threadstack_offset = offset;
21365 return vm_unmapped_area(&info);
21366 }
21367 - #endif
21368 -@@ -1940,6 +2211,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
21369 + #endif
21370 +@@ -1956,6 +2228,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
21371 struct mm_struct *mm = current->mm;
21372 unsigned long addr = addr0;
21373 struct vm_unmapped_area_info info;
21374 @@ -98355,7 +96824,7 @@ index a226d31..9135e65 100644
21375
21376 /* requested length too big for entire address space */
21377 if (len > TASK_SIZE - mmap_min_addr)
21378 -@@ -1948,12 +2220,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
21379 +@@ -1964,12 +2237,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
21380 if (flags & MAP_FIXED)
21381 return addr;
21382
21383 @@ -98373,7 +96842,7 @@ index a226d31..9135e65 100644
21384 return addr;
21385 }
21386
21387 -@@ -1962,6 +2238,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
21388 +@@ -1978,6 +2255,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
21389 info.low_limit = max(PAGE_SIZE, mmap_min_addr);
21390 info.high_limit = mm->mmap_base;
21391 info.align_mask = 0;
21392 @@ -98381,7 +96850,7 @@ index a226d31..9135e65 100644
21393 addr = vm_unmapped_area(&info);
21394
21395 /*
21396 -@@ -1974,6 +2251,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
21397 +@@ -1990,6 +2268,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
21398 VM_BUG_ON(addr != -ENOMEM);
21399 info.flags = 0;
21400 info.low_limit = TASK_UNMAPPED_BASE;
21401 @@ -98394,7 +96863,7 @@ index a226d31..9135e65 100644
21402 info.high_limit = TASK_SIZE;
21403 addr = vm_unmapped_area(&info);
21404 }
21405 -@@ -2074,6 +2357,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
21406 +@@ -2090,6 +2374,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
21407 return vma;
21408 }
21409
21410 @@ -98423,7 +96892,7 @@ index a226d31..9135e65 100644
21411 /*
21412 * Verify that the stack growth is acceptable and
21413 * update accounting. This is shared with both the
21414 -@@ -2090,6 +2395,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
21415 +@@ -2106,6 +2412,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
21416 return -ENOMEM;
21417
21418 /* Stack limit test */
21419 @@ -98431,7 +96900,7 @@ index a226d31..9135e65 100644
21420 if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur))
21421 return -ENOMEM;
21422
21423 -@@ -2100,6 +2406,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
21424 +@@ -2116,6 +2423,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
21425 locked = mm->locked_vm + grow;
21426 limit = ACCESS_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur);
21427 limit >>= PAGE_SHIFT;
21428 @@ -98439,7 +96908,7 @@ index a226d31..9135e65 100644
21429 if (locked > limit && !capable(CAP_IPC_LOCK))
21430 return -ENOMEM;
21431 }
21432 -@@ -2129,37 +2436,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
21433 +@@ -2145,37 +2453,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
21434 * PA-RISC uses this for its stack; IA64 for its Register Backing Store.
21435 * vma is the last one with address > vma->vm_end. Have to extend vma.
21436 */
21437 @@ -98497,7 +96966,7 @@ index a226d31..9135e65 100644
21438 unsigned long size, grow;
21439
21440 size = address - vma->vm_start;
21441 -@@ -2194,6 +2512,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
21442 +@@ -2210,6 +2529,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
21443 }
21444 }
21445 }
21446 @@ -98506,7 +96975,7 @@ index a226d31..9135e65 100644
21447 vma_unlock_anon_vma(vma);
21448 khugepaged_enter_vma_merge(vma, vma->vm_flags);
21449 validate_mm(vma->vm_mm);
21450 -@@ -2208,6 +2528,8 @@ int expand_downwards(struct vm_area_struct *vma,
21451 +@@ -2224,6 +2545,8 @@ int expand_downwards(struct vm_area_struct *vma,
21452 unsigned long address)
21453 {
21454 int error;
21455 @@ -98515,7 +96984,7 @@ index a226d31..9135e65 100644
21456
21457 /*
21458 * We must make sure the anon_vma is allocated
21459 -@@ -2221,6 +2543,15 @@ int expand_downwards(struct vm_area_struct *vma,
21460 +@@ -2237,6 +2560,15 @@ int expand_downwards(struct vm_area_struct *vma,
21461 if (error)
21462 return error;
21463
21464 @@ -98531,7 +97000,7 @@ index a226d31..9135e65 100644
21465 vma_lock_anon_vma(vma);
21466
21467 /*
21468 -@@ -2230,9 +2561,17 @@ int expand_downwards(struct vm_area_struct *vma,
21469 +@@ -2246,9 +2578,17 @@ int expand_downwards(struct vm_area_struct *vma,
21470 */
21471
21472 /* Somebody else might have raced and expanded it already */
21473 @@ -98550,7 +97019,7 @@ index a226d31..9135e65 100644
21474 size = vma->vm_end - address;
21475 grow = (vma->vm_start - address) >> PAGE_SHIFT;
21476
21477 -@@ -2257,13 +2596,27 @@ int expand_downwards(struct vm_area_struct *vma,
21478 +@@ -2273,13 +2613,27 @@ int expand_downwards(struct vm_area_struct *vma,
21479 vma->vm_pgoff -= grow;
21480 anon_vma_interval_tree_post_update_vma(vma);
21481 vma_gap_update(vma);
21482 @@ -98578,7 +97047,7 @@ index a226d31..9135e65 100644
21483 khugepaged_enter_vma_merge(vma, vma->vm_flags);
21484 validate_mm(vma->vm_mm);
21485 return error;
21486 -@@ -2361,6 +2714,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
21487 +@@ -2377,6 +2731,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
21488 do {
21489 long nrpages = vma_pages(vma);
21490
21491 @@ -98592,7 +97061,7 @@ index a226d31..9135e65 100644
21492 if (vma->vm_flags & VM_ACCOUNT)
21493 nr_accounted += nrpages;
21494 vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages);
21495 -@@ -2405,6 +2765,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
21496 +@@ -2421,6 +2782,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
21497 insertion_point = (prev ? &prev->vm_next : &mm->mmap);
21498 vma->vm_prev = NULL;
21499 do {
21500 @@ -98609,7 +97078,7 @@ index a226d31..9135e65 100644
21501 vma_rb_erase(vma, &mm->mm_rb);
21502 mm->map_count--;
21503 tail_vma = vma;
21504 -@@ -2432,14 +2802,33 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
21505 +@@ -2448,14 +2819,33 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
21506 struct vm_area_struct *new;
21507 int err = -ENOMEM;
21508
21509 @@ -98643,7 +97112,7 @@ index a226d31..9135e65 100644
21510 /* most fields are the same, copy all, and then fixup */
21511 *new = *vma;
21512
21513 -@@ -2452,6 +2841,22 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
21514 +@@ -2468,6 +2858,22 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
21515 new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
21516 }
21517
21518 @@ -98666,7 +97135,7 @@ index a226d31..9135e65 100644
21519 err = vma_dup_policy(vma, new);
21520 if (err)
21521 goto out_free_vma;
21522 -@@ -2472,6 +2877,38 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
21523 +@@ -2488,6 +2894,38 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
21524 else
21525 err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
21526
21527 @@ -98705,7 +97174,7 @@ index a226d31..9135e65 100644
21528 /* Success. */
21529 if (!err)
21530 return 0;
21531 -@@ -2481,10 +2918,18 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
21532 +@@ -2497,10 +2935,18 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
21533 new->vm_ops->close(new);
21534 if (new->vm_file)
21535 fput(new->vm_file);
21536 @@ -98725,7 +97194,7 @@ index a226d31..9135e65 100644
21537 kmem_cache_free(vm_area_cachep, new);
21538 out_err:
21539 return err;
21540 -@@ -2497,6 +2942,15 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
21541 +@@ -2513,6 +2959,15 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
21542 int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
21543 unsigned long addr, int new_below)
21544 {
21545 @@ -98741,7 +97210,7 @@ index a226d31..9135e65 100644
21546 if (mm->map_count >= sysctl_max_map_count)
21547 return -ENOMEM;
21548
21549 -@@ -2508,11 +2962,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
21550 +@@ -2524,11 +2979,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
21551 * work. This now handles partial unmappings.
21552 * Jeremy Fitzhardinge <jeremy@××××.org>
21553 */
21554 @@ -98772,7 +97241,7 @@ index a226d31..9135e65 100644
21555 if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
21556 return -EINVAL;
21557
21558 -@@ -2587,6 +3060,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
21559 +@@ -2604,6 +3078,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
21560 /* Fix up all other VM information */
21561 remove_vma_list(mm, vma);
21562
21563 @@ -98781,7 +97250,7 @@ index a226d31..9135e65 100644
21564 return 0;
21565 }
21566
21567 -@@ -2595,6 +3070,13 @@ int vm_munmap(unsigned long start, size_t len)
21568 +@@ -2612,6 +3088,13 @@ int vm_munmap(unsigned long start, size_t len)
21569 int ret;
21570 struct mm_struct *mm = current->mm;
21571
21572 @@ -98795,7 +97264,7 @@ index a226d31..9135e65 100644
21573 down_write(&mm->mmap_sem);
21574 ret = do_munmap(mm, start, len);
21575 up_write(&mm->mmap_sem);
21576 -@@ -2608,16 +3090,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
21577 +@@ -2625,16 +3108,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
21578 return vm_munmap(addr, len);
21579 }
21580
21581 @@ -98812,15 +97281,15 @@ index a226d31..9135e65 100644
21582 /*
21583 * this is really a simplified "do_mmap". it only handles
21584 * anonymous maps. eventually we may be able to do some
21585 -@@ -2631,6 +3103,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21586 - struct rb_node ** rb_link, * rb_parent;
21587 +@@ -2648,6 +3121,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21588 + struct rb_node **rb_link, *rb_parent;
21589 pgoff_t pgoff = addr >> PAGE_SHIFT;
21590 int error;
21591 + unsigned long charged;
21592
21593 len = PAGE_ALIGN(len);
21594 if (!len)
21595 -@@ -2638,10 +3111,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21596 +@@ -2655,10 +3129,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21597
21598 flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
21599
21600 @@ -98845,7 +97314,7 @@ index a226d31..9135e65 100644
21601 error = mlock_future_check(mm, mm->def_flags, len);
21602 if (error)
21603 return error;
21604 -@@ -2655,21 +3142,20 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21605 +@@ -2672,21 +3160,20 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21606 /*
21607 * Clear old maps. this also does some error checking for us
21608 */
21609 @@ -98870,7 +97339,7 @@ index a226d31..9135e65 100644
21610 return -ENOMEM;
21611
21612 /* Can we just expand an old private anonymous mapping? */
21613 -@@ -2683,7 +3169,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21614 +@@ -2700,7 +3187,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21615 */
21616 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
21617 if (!vma) {
21618 @@ -98879,7 +97348,7 @@ index a226d31..9135e65 100644
21619 return -ENOMEM;
21620 }
21621
21622 -@@ -2697,10 +3183,11 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21623 +@@ -2714,10 +3201,11 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
21624 vma_link(mm, vma, prev, rb_link, rb_parent);
21625 out:
21626 perf_event_mmap(vma);
21627 @@ -98893,7 +97362,7 @@ index a226d31..9135e65 100644
21628 return addr;
21629 }
21630
21631 -@@ -2762,6 +3249,7 @@ void exit_mmap(struct mm_struct *mm)
21632 +@@ -2779,6 +3267,7 @@ void exit_mmap(struct mm_struct *mm)
21633 while (vma) {
21634 if (vma->vm_flags & VM_ACCOUNT)
21635 nr_accounted += vma_pages(vma);
21636 @@ -98901,7 +97370,7 @@ index a226d31..9135e65 100644
21637 vma = remove_vma(vma);
21638 }
21639 vm_unacct_memory(nr_accounted);
21640 -@@ -2779,6 +3267,13 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
21641 +@@ -2796,6 +3285,13 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
21642 struct vm_area_struct *prev;
21643 struct rb_node **rb_link, *rb_parent;
21644
21645 @@ -98915,7 +97384,7 @@ index a226d31..9135e65 100644
21646 /*
21647 * The vm_pgoff of a purely anonymous vma should be irrelevant
21648 * until its first write fault, when page's anon_vma and index
21649 -@@ -2802,7 +3297,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
21650 +@@ -2819,7 +3315,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
21651 security_vm_enough_memory_mm(mm, vma_pages(vma)))
21652 return -ENOMEM;
21653
21654 @@ -98937,7 +97406,7 @@ index a226d31..9135e65 100644
21655 return 0;
21656 }
21657
21658 -@@ -2821,6 +3330,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
21659 +@@ -2838,6 +3348,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
21660 struct rb_node **rb_link, *rb_parent;
21661 bool faulted_in_anon_vma = true;
21662
21663 @@ -98946,7 +97415,7 @@ index a226d31..9135e65 100644
21664 /*
21665 * If anonymous vma has not yet been faulted, update new pgoff
21666 * to match new location, to increase its chance of merging.
21667 -@@ -2885,6 +3396,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
21668 +@@ -2902,6 +3414,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
21669 return NULL;
21670 }
21671
21672 @@ -98986,7 +97455,7 @@ index a226d31..9135e65 100644
21673 /*
21674 * Return true if the calling process may expand its vm space by the passed
21675 * number of pages
21676 -@@ -2896,6 +3440,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
21677 +@@ -2913,6 +3458,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
21678
21679 lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT;
21680
21681 @@ -98994,7 +97463,7 @@ index a226d31..9135e65 100644
21682 if (cur + npages > lim)
21683 return 0;
21684 return 1;
21685 -@@ -2978,6 +3523,22 @@ static struct vm_area_struct *__install_special_mapping(
21686 +@@ -2995,6 +3541,22 @@ static struct vm_area_struct *__install_special_mapping(
21687 vma->vm_start = addr;
21688 vma->vm_end = addr + len;
21689
21690 @@ -99018,7 +97487,7 @@ index a226d31..9135e65 100644
21691 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
21692
21693 diff --git a/mm/mprotect.c b/mm/mprotect.c
21694 -index c43d557..0b7ccd2 100644
21695 +index ace9345..63320dc 100644
21696 --- a/mm/mprotect.c
21697 +++ b/mm/mprotect.c
21698 @@ -24,10 +24,18 @@
21699 @@ -99038,9 +97507,9 @@ index c43d557..0b7ccd2 100644
21700 #include <asm/tlbflush.h>
21701 +#include <asm/mmu_context.h>
21702
21703 - #ifndef pgprot_modify
21704 - static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
21705 -@@ -256,6 +264,48 @@ unsigned long change_protection(struct vm_area_struct *vma, unsigned long start,
21706 + /*
21707 + * For a prot_numa update we only hold mmap_sem for read so there is a
21708 +@@ -251,6 +259,48 @@ unsigned long change_protection(struct vm_area_struct *vma, unsigned long start,
21709 return pages;
21710 }
21711
21712 @@ -99089,7 +97558,7 @@ index c43d557..0b7ccd2 100644
21713 int
21714 mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
21715 unsigned long start, unsigned long end, unsigned long newflags)
21716 -@@ -268,11 +318,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
21717 +@@ -263,11 +313,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
21718 int error;
21719 int dirty_accountable = 0;
21720
21721 @@ -99119,7 +97588,7 @@ index c43d557..0b7ccd2 100644
21722 /*
21723 * If we make a private mapping writable we increase our commit;
21724 * but (without finer accounting) cannot reduce our commit if we
21725 -@@ -289,6 +357,42 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
21726 +@@ -284,6 +352,42 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
21727 }
21728 }
21729
21730 @@ -99162,7 +97631,7 @@ index c43d557..0b7ccd2 100644
21731 /*
21732 * First try to merge with previous and/or next vma.
21733 */
21734 -@@ -319,9 +423,21 @@ success:
21735 +@@ -314,7 +418,19 @@ success:
21736 * vm_flags and vm_page_prot are protected by the mmap_sem
21737 * held in write mode.
21738 */
21739 @@ -99179,13 +97648,10 @@ index c43d557..0b7ccd2 100644
21740 + mm->binfmt->handle_mprotect(vma, newflags);
21741 +#endif
21742 +
21743 - vma->vm_page_prot = pgprot_modify(vma->vm_page_prot,
21744 -- vm_get_page_prot(newflags));
21745 -+ vm_get_page_prot(vma->vm_flags));
21746 + dirty_accountable = vma_wants_writenotify(vma);
21747 + vma_set_page_prot(vma);
21748
21749 - if (vma_wants_writenotify(vma)) {
21750 - vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
21751 -@@ -360,6 +476,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21752 +@@ -350,6 +466,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21753 end = start + len;
21754 if (end <= start)
21755 return -ENOMEM;
21756 @@ -99203,7 +97669,7 @@ index c43d557..0b7ccd2 100644
21757 if (!arch_validate_prot(prot))
21758 return -EINVAL;
21759
21760 -@@ -367,7 +494,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21761 +@@ -357,7 +484,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21762 /*
21763 * Does the application expect PROT_READ to imply PROT_EXEC:
21764 */
21765 @@ -99212,7 +97678,7 @@ index c43d557..0b7ccd2 100644
21766 prot |= PROT_EXEC;
21767
21768 vm_flags = calc_vm_prot_bits(prot);
21769 -@@ -399,6 +526,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21770 +@@ -389,6 +516,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21771 if (start > vma->vm_start)
21772 prev = vma;
21773
21774 @@ -99224,7 +97690,7 @@ index c43d557..0b7ccd2 100644
21775 for (nstart = start ; ; ) {
21776 unsigned long newflags;
21777
21778 -@@ -409,6 +541,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21779 +@@ -399,6 +531,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21780
21781 /* newflags >> 4 shift VM_MAY% in place of VM_% */
21782 if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) {
21783 @@ -99239,7 +97705,7 @@ index c43d557..0b7ccd2 100644
21784 error = -EACCES;
21785 goto out;
21786 }
21787 -@@ -423,6 +563,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21788 +@@ -413,6 +553,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
21789 error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
21790 if (error)
21791 goto out;
21792 @@ -99250,7 +97716,7 @@ index c43d557..0b7ccd2 100644
21793
21794 if (nstart < prev->vm_end)
21795 diff --git a/mm/mremap.c b/mm/mremap.c
21796 -index 05f1180..c3cde48 100644
21797 +index b147f66..98a695a 100644
21798 --- a/mm/mremap.c
21799 +++ b/mm/mremap.c
21800 @@ -144,6 +144,12 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
21801 @@ -99266,7 +97732,7 @@ index 05f1180..c3cde48 100644
21802 pte = move_soft_dirty_pte(pte);
21803 set_pte_at(mm, new_addr, new_pte, pte);
21804 }
21805 -@@ -344,6 +350,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
21806 +@@ -345,6 +351,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
21807 if (is_vm_hugetlb_page(vma))
21808 goto Einval;
21809
21810 @@ -99278,7 +97744,7 @@ index 05f1180..c3cde48 100644
21811 /* We can't remap across vm area boundaries */
21812 if (old_len > vma->vm_end - addr)
21813 goto Efault;
21814 -@@ -399,20 +410,25 @@ static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
21815 +@@ -400,20 +411,25 @@ static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
21816 unsigned long ret = -EINVAL;
21817 unsigned long charged = 0;
21818 unsigned long map_flags;
21819 @@ -99309,7 +97775,7 @@ index 05f1180..c3cde48 100644
21820 goto out;
21821
21822 ret = do_munmap(mm, new_addr, new_len);
21823 -@@ -481,6 +497,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
21824 +@@ -482,6 +498,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
21825 unsigned long ret = -EINVAL;
21826 unsigned long charged = 0;
21827 bool locked = false;
21828 @@ -99317,7 +97783,7 @@ index 05f1180..c3cde48 100644
21829
21830 if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
21831 return ret;
21832 -@@ -502,6 +519,17 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
21833 +@@ -503,6 +520,17 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
21834 if (!new_len)
21835 return ret;
21836
21837 @@ -99335,7 +97801,7 @@ index 05f1180..c3cde48 100644
21838 down_write(&current->mm->mmap_sem);
21839
21840 if (flags & MREMAP_FIXED) {
21841 -@@ -552,6 +580,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
21842 +@@ -553,6 +581,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
21843 new_addr = addr;
21844 }
21845 ret = addr;
21846 @@ -99343,7 +97809,7 @@ index 05f1180..c3cde48 100644
21847 goto out;
21848 }
21849 }
21850 -@@ -575,7 +604,12 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
21851 +@@ -576,7 +605,12 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
21852 goto out;
21853 }
21854
21855 @@ -99357,7 +97823,7 @@ index 05f1180..c3cde48 100644
21856 out:
21857 if (ret & ~PAGE_MASK)
21858 diff --git a/mm/nommu.c b/mm/nommu.c
21859 -index a881d96..e5932cd 100644
21860 +index bd1808e..b63d87c 100644
21861 --- a/mm/nommu.c
21862 +++ b/mm/nommu.c
21863 @@ -70,7 +70,6 @@ int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
21864 @@ -99424,7 +97890,7 @@ index a881d96..e5932cd 100644
21865 struct mm_struct *mm;
21866
21867 diff --git a/mm/page-writeback.c b/mm/page-writeback.c
21868 -index ba5fd97..5a95869 100644
21869 +index 19ceae8..70848ee 100644
21870 --- a/mm/page-writeback.c
21871 +++ b/mm/page-writeback.c
21872 @@ -664,7 +664,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
21873 @@ -99437,10 +97903,10 @@ index ba5fd97..5a95869 100644
21874 unsigned long bg_thresh,
21875 unsigned long dirty,
21876 diff --git a/mm/page_alloc.c b/mm/page_alloc.c
21877 -index c5fe124..2cf7f17 100644
21878 +index 616a2c9..0e755f6 100644
21879 --- a/mm/page_alloc.c
21880 +++ b/mm/page_alloc.c
21881 -@@ -61,6 +61,7 @@
21882 +@@ -59,6 +59,7 @@
21883 #include <linux/page-debug-flags.h>
21884 #include <linux/hugetlb.h>
21885 #include <linux/sched/rt.h>
21886 @@ -99448,7 +97914,7 @@ index c5fe124..2cf7f17 100644
21887
21888 #include <asm/sections.h>
21889 #include <asm/tlbflush.h>
21890 -@@ -357,7 +358,7 @@ out:
21891 +@@ -356,7 +357,7 @@ out:
21892 * This usage means that zero-order pages may not be compound.
21893 */
21894
21895 @@ -99457,7 +97923,7 @@ index c5fe124..2cf7f17 100644
21896 {
21897 __free_pages_ok(page, compound_order(page));
21898 }
21899 -@@ -740,6 +741,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
21900 +@@ -741,6 +742,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
21901 int i;
21902 int bad = 0;
21903
21904 @@ -99468,7 +97934,7 @@ index c5fe124..2cf7f17 100644
21905 trace_mm_page_free(page, order);
21906 kmemcheck_free_shadow(page, order);
21907
21908 -@@ -756,6 +761,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
21909 +@@ -757,6 +762,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
21910 debug_check_no_obj_freed(page_address(page),
21911 PAGE_SIZE << order);
21912 }
21913 @@ -99481,7 +97947,7 @@ index c5fe124..2cf7f17 100644
21914 arch_free_page(page, order);
21915 kernel_map_pages(page, 1 << order, 0);
21916
21917 -@@ -779,6 +790,20 @@ static void __free_pages_ok(struct page *page, unsigned int order)
21918 +@@ -780,6 +791,20 @@ static void __free_pages_ok(struct page *page, unsigned int order)
21919 local_irq_restore(flags);
21920 }
21921
21922 @@ -99502,7 +97968,7 @@ index c5fe124..2cf7f17 100644
21923 void __init __free_pages_bootmem(struct page *page, unsigned int order)
21924 {
21925 unsigned int nr_pages = 1 << order;
21926 -@@ -794,6 +819,19 @@ void __init __free_pages_bootmem(struct page *page, unsigned int order)
21927 +@@ -795,6 +820,19 @@ void __init __free_pages_bootmem(struct page *page, unsigned int order)
21928 __ClearPageReserved(p);
21929 set_page_count(p, 0);
21930
21931 @@ -99522,7 +97988,7 @@ index c5fe124..2cf7f17 100644
21932 page_zone(page)->managed_pages += nr_pages;
21933 set_page_refcounted(page);
21934 __free_pages(page, order);
21935 -@@ -922,8 +960,10 @@ static int prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags)
21936 +@@ -923,8 +961,10 @@ static int prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags)
21937 arch_alloc_page(page, order);
21938 kernel_map_pages(page, 1 << order, 1);
21939
21940 @@ -99533,25 +97999,25 @@ index c5fe124..2cf7f17 100644
21941
21942 if (order && (gfp_flags & __GFP_COMP))
21943 prep_compound_page(page, order);
21944 -@@ -1601,7 +1641,7 @@ again:
21945 +@@ -1602,7 +1642,7 @@ again:
21946 }
21947
21948 __mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 << order));
21949 - if (atomic_long_read(&zone->vm_stat[NR_ALLOC_BATCH]) <= 0 &&
21950 + if (atomic_long_read_unchecked(&zone->vm_stat[NR_ALLOC_BATCH]) <= 0 &&
21951 - !zone_is_fair_depleted(zone))
21952 - zone_set_flag(zone, ZONE_FAIR_DEPLETED);
21953 + !test_bit(ZONE_FAIR_DEPLETED, &zone->flags))
21954 + set_bit(ZONE_FAIR_DEPLETED, &zone->flags);
21955
21956 -@@ -1922,7 +1962,7 @@ static void reset_alloc_batches(struct zone *preferred_zone)
21957 +@@ -1923,7 +1963,7 @@ static void reset_alloc_batches(struct zone *preferred_zone)
21958 do {
21959 mod_zone_page_state(zone, NR_ALLOC_BATCH,
21960 high_wmark_pages(zone) - low_wmark_pages(zone) -
21961 - atomic_long_read(&zone->vm_stat[NR_ALLOC_BATCH]));
21962 + atomic_long_read_unchecked(&zone->vm_stat[NR_ALLOC_BATCH]));
21963 - zone_clear_flag(zone, ZONE_FAIR_DEPLETED);
21964 + clear_bit(ZONE_FAIR_DEPLETED, &zone->flags);
21965 } while (zone++ != preferred_zone);
21966 }
21967 -@@ -5699,7 +5739,7 @@ static void __setup_per_zone_wmarks(void)
21968 +@@ -5698,7 +5738,7 @@ static void __setup_per_zone_wmarks(void)
21969
21970 __mod_zone_page_state(zone, NR_ALLOC_BATCH,
21971 high_wmark_pages(zone) - low_wmark_pages(zone) -
21972 @@ -99561,10 +98027,10 @@ index c5fe124..2cf7f17 100644
21973 setup_zone_migrate_reserve(zone);
21974 spin_unlock_irqrestore(&zone->lock, flags);
21975 diff --git a/mm/percpu.c b/mm/percpu.c
21976 -index 2139e30..1d45bce 100644
21977 +index 014bab6..db5a76f 100644
21978 --- a/mm/percpu.c
21979 +++ b/mm/percpu.c
21980 -@@ -123,7 +123,7 @@ static unsigned int pcpu_low_unit_cpu __read_mostly;
21981 +@@ -131,7 +131,7 @@ static unsigned int pcpu_low_unit_cpu __read_mostly;
21982 static unsigned int pcpu_high_unit_cpu __read_mostly;
21983
21984 /* the address of the first chunk which starts with the kernel static area */
21985 @@ -99625,7 +98091,7 @@ index 5077afc..846c9ef 100644
21986 if (!mm || IS_ERR(mm)) {
21987 rc = IS_ERR(mm) ? PTR_ERR(mm) : -ESRCH;
21988 diff --git a/mm/rmap.c b/mm/rmap.c
21989 -index 1807ca3..7a532bd 100644
21990 +index 3e4c721..a5e3e39 100644
21991 --- a/mm/rmap.c
21992 +++ b/mm/rmap.c
21993 @@ -164,6 +164,10 @@ int anon_vma_prepare(struct vm_area_struct *vma)
21994 @@ -99728,7 +98194,7 @@ index 1807ca3..7a532bd 100644
21995
21996 /*
21997 diff --git a/mm/shmem.c b/mm/shmem.c
21998 -index 469f90d..34a09ee 100644
21999 +index 185836b..d7255a1 100644
22000 --- a/mm/shmem.c
22001 +++ b/mm/shmem.c
22002 @@ -33,7 +33,7 @@
22003 @@ -99749,7 +98215,7 @@ index 469f90d..34a09ee 100644
22004
22005 /*
22006 * shmem_fallocate communicates with shmem_fault or shmem_writepage via
22007 -@@ -2524,6 +2524,11 @@ static const struct xattr_handler *shmem_xattr_handlers[] = {
22008 +@@ -2558,6 +2558,11 @@ static const struct xattr_handler *shmem_xattr_handlers[] = {
22009 static int shmem_xattr_validate(const char *name)
22010 {
22011 struct { const char *prefix; size_t len; } arr[] = {
22012 @@ -99761,7 +98227,7 @@ index 469f90d..34a09ee 100644
22013 { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN },
22014 { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN }
22015 };
22016 -@@ -2579,6 +2584,15 @@ static int shmem_setxattr(struct dentry *dentry, const char *name,
22017 +@@ -2613,6 +2618,15 @@ static int shmem_setxattr(struct dentry *dentry, const char *name,
22018 if (err)
22019 return err;
22020
22021 @@ -99777,7 +98243,7 @@ index 469f90d..34a09ee 100644
22022 return simple_xattr_set(&info->xattrs, name, value, size, flags);
22023 }
22024
22025 -@@ -2962,8 +2976,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
22026 +@@ -2996,8 +3010,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
22027 int err = -ENOMEM;
22028
22029 /* Round up to L1_CACHE_BYTES to resist false sharing */
22030 @@ -99788,10 +98254,10 @@ index 469f90d..34a09ee 100644
22031 return -ENOMEM;
22032
22033 diff --git a/mm/slab.c b/mm/slab.c
22034 -index cc91c1e..0676592 100644
22035 +index f34e053..78a3839 100644
22036 --- a/mm/slab.c
22037 +++ b/mm/slab.c
22038 -@@ -316,10 +316,12 @@ static void kmem_cache_node_init(struct kmem_cache_node *parent)
22039 +@@ -314,10 +314,12 @@ static void kmem_cache_node_init(struct kmem_cache_node *parent)
22040 if ((x)->max_freeable < i) \
22041 (x)->max_freeable = i; \
22042 } while (0)
22043 @@ -99808,7 +98274,7 @@ index cc91c1e..0676592 100644
22044 #else
22045 #define STATS_INC_ACTIVE(x) do { } while (0)
22046 #define STATS_DEC_ACTIVE(x) do { } while (0)
22047 -@@ -336,6 +338,8 @@ static void kmem_cache_node_init(struct kmem_cache_node *parent)
22048 +@@ -334,6 +336,8 @@ static void kmem_cache_node_init(struct kmem_cache_node *parent)
22049 #define STATS_INC_ALLOCMISS(x) do { } while (0)
22050 #define STATS_INC_FREEHIT(x) do { } while (0)
22051 #define STATS_INC_FREEMISS(x) do { } while (0)
22052 @@ -99817,7 +98283,7 @@ index cc91c1e..0676592 100644
22053 #endif
22054
22055 #if DEBUG
22056 -@@ -452,7 +456,7 @@ static inline void *index_to_obj(struct kmem_cache *cache, struct page *page,
22057 +@@ -450,7 +454,7 @@ static inline void *index_to_obj(struct kmem_cache *cache, struct page *page,
22058 * reciprocal_divide(offset, cache->reciprocal_buffer_size)
22059 */
22060 static inline unsigned int obj_to_index(const struct kmem_cache *cache,
22061 @@ -99826,22 +98292,25 @@ index cc91c1e..0676592 100644
22062 {
22063 u32 offset = (obj - page->s_mem);
22064 return reciprocal_divide(offset, cache->reciprocal_buffer_size);
22065 -@@ -1462,12 +1466,12 @@ void __init kmem_cache_init(void)
22066 +@@ -1438,7 +1442,7 @@ void __init kmem_cache_init(void)
22067 + * structures first. Without this, further allocations will bug.
22068 */
22069 -
22070 - kmalloc_caches[INDEX_AC] = create_kmalloc_cache("kmalloc-ac",
22071 -- kmalloc_size(INDEX_AC), ARCH_KMALLOC_FLAGS);
22072 -+ kmalloc_size(INDEX_AC), SLAB_USERCOPY | ARCH_KMALLOC_FLAGS);
22073 -
22074 - if (INDEX_AC != INDEX_NODE)
22075 - kmalloc_caches[INDEX_NODE] =
22076 - create_kmalloc_cache("kmalloc-node",
22077 + kmalloc_caches[INDEX_NODE] = create_kmalloc_cache("kmalloc-node",
22078 - kmalloc_size(INDEX_NODE), ARCH_KMALLOC_FLAGS);
22079 + kmalloc_size(INDEX_NODE), SLAB_USERCOPY | ARCH_KMALLOC_FLAGS);
22080 + slab_state = PARTIAL_NODE;
22081
22082 slab_early_init = 0;
22083 +@@ -2059,7 +2063,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
22084 +
22085 + cachep = find_mergeable(size, align, flags, name, ctor);
22086 + if (cachep) {
22087 +- cachep->refcount++;
22088 ++ atomic_inc(&cachep->refcount);
22089
22090 -@@ -3384,6 +3388,20 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp,
22091 + /*
22092 + * Adjust the object sizes so that we clear
22093 +@@ -3352,6 +3356,20 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp,
22094 struct array_cache *ac = cpu_cache_get(cachep);
22095
22096 check_irq_off();
22097 @@ -99862,7 +98331,7 @@ index cc91c1e..0676592 100644
22098 kmemleak_free_recursive(objp, cachep->flags);
22099 objp = cache_free_debugcheck(cachep, objp, caller);
22100
22101 -@@ -3607,6 +3625,7 @@ void kfree(const void *objp)
22102 +@@ -3557,6 +3575,7 @@ void kfree(const void *objp)
22103
22104 if (unlikely(ZERO_OR_NULL_PTR(objp)))
22105 return;
22106 @@ -99870,7 +98339,7 @@ index cc91c1e..0676592 100644
22107 local_irq_save(flags);
22108 kfree_debugcheck(objp);
22109 c = virt_to_cache(objp);
22110 -@@ -4056,14 +4075,22 @@ void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *cachep)
22111 +@@ -3979,14 +3998,22 @@ void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *cachep)
22112 }
22113 /* cpu stats */
22114 {
22115 @@ -99897,7 +98366,7 @@ index cc91c1e..0676592 100644
22116 #endif
22117 }
22118
22119 -@@ -4281,13 +4308,69 @@ static const struct file_operations proc_slabstats_operations = {
22120 +@@ -4200,13 +4227,69 @@ static const struct file_operations proc_slabstats_operations = {
22121 static int __init slab_proc_init(void)
22122 {
22123 #ifdef CONFIG_DEBUG_SLAB_LEAK
22124 @@ -99969,10 +98438,19 @@ index cc91c1e..0676592 100644
22125 * ksize - get the actual amount of memory allocated for a given object
22126 * @objp: Pointer to the object
22127 diff --git a/mm/slab.h b/mm/slab.h
22128 -index 0e0fdd3..d0fd761 100644
22129 +index ab019e6..fbcac34 100644
22130 --- a/mm/slab.h
22131 +++ b/mm/slab.h
22132 -@@ -32,6 +32,20 @@ extern struct list_head slab_caches;
22133 +@@ -22,7 +22,7 @@ struct kmem_cache {
22134 + unsigned int align; /* Alignment as calculated */
22135 + unsigned long flags; /* Active flags on the slab */
22136 + const char *name; /* Slab name for sysfs */
22137 +- int refcount; /* Use counter */
22138 ++ atomic_t refcount; /* Use counter */
22139 + void (*ctor)(void *); /* Called on object slot creation */
22140 + struct list_head list; /* List of all slab caches on the system */
22141 + };
22142 +@@ -66,6 +66,20 @@ extern struct list_head slab_caches;
22143 /* The slab cache that manages slab cache information */
22144 extern struct kmem_cache *kmem_cache;
22145
22146 @@ -99993,7 +98471,7 @@ index 0e0fdd3..d0fd761 100644
22147 unsigned long calculate_alignment(unsigned long flags,
22148 unsigned long align, unsigned long size);
22149
22150 -@@ -67,7 +81,8 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
22151 +@@ -116,7 +130,8 @@ static inline unsigned long kmem_cache_flags(unsigned long object_size,
22152
22153 /* Legal flag mask for kmem_cache_create(), for various configurations */
22154 #define SLAB_CORE_FLAGS (SLAB_HWCACHE_ALIGN | SLAB_CACHE_DMA | SLAB_PANIC | \
22155 @@ -100003,7 +98481,7 @@ index 0e0fdd3..d0fd761 100644
22156
22157 #if defined(CONFIG_DEBUG_SLAB)
22158 #define SLAB_DEBUG_FLAGS (SLAB_RED_ZONE | SLAB_POISON | SLAB_STORE_USER)
22159 -@@ -251,6 +266,9 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
22160 +@@ -300,6 +315,9 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
22161 return s;
22162
22163 page = virt_to_head_page(x);
22164 @@ -100014,7 +98492,7 @@ index 0e0fdd3..d0fd761 100644
22165 if (slab_equal_or_root(cachep, s))
22166 return cachep;
22167 diff --git a/mm/slab_common.c b/mm/slab_common.c
22168 -index d319502..da7714e 100644
22169 +index dcdab81..3576646 100644
22170 --- a/mm/slab_common.c
22171 +++ b/mm/slab_common.c
22172 @@ -25,11 +25,35 @@
22173 @@ -100051,10 +98529,28 @@ index d319502..da7714e 100644
22174 +early_param("pax_sanitize_slab", pax_sanitize_slab_setup);
22175 +#endif
22176 +
22177 - #ifdef CONFIG_DEBUG_VM
22178 - static int kmem_cache_sanity_check(const char *name, size_t size)
22179 + /*
22180 + * Set of flags that will prevent slab merging
22181 + */
22182 +@@ -44,7 +68,7 @@ struct kmem_cache *kmem_cache;
22183 + * Merge control. If this is set then no merging of slab caches will occur.
22184 + * (Could be removed. This was introduced to pacify the merge skeptics.)
22185 + */
22186 +-static int slab_nomerge;
22187 ++static int slab_nomerge = 1;
22188 +
22189 + static int __init setup_slab_nomerge(char *str)
22190 {
22191 -@@ -160,7 +184,7 @@ do_kmem_cache_create(char *name, size_t object_size, size_t size, size_t align,
22192 +@@ -218,7 +242,7 @@ int slab_unmergeable(struct kmem_cache *s)
22193 + /*
22194 + * We may have set a slab to be unmergeable during bootstrap.
22195 + */
22196 +- if (s->refcount < 0)
22197 ++ if (atomic_read(&s->refcount) < 0)
22198 + return 1;
22199 +
22200 + return 0;
22201 +@@ -322,7 +346,7 @@ do_kmem_cache_create(char *name, size_t object_size, size_t size, size_t align,
22202 if (err)
22203 goto out_free_cache;
22204
22205 @@ -100063,7 +98559,7 @@ index d319502..da7714e 100644
22206 list_add(&s->list, &slab_caches);
22207 out:
22208 if (err)
22209 -@@ -222,6 +246,13 @@ kmem_cache_create(const char *name, size_t size, size_t align,
22210 +@@ -386,6 +410,13 @@ kmem_cache_create(const char *name, size_t size, size_t align,
22211 */
22212 flags &= CACHE_CREATE_MASK;
22213
22214 @@ -100077,7 +98573,7 @@ index d319502..da7714e 100644
22215 s = __kmem_cache_alias(name, size, align, flags, ctor);
22216 if (s)
22217 goto out_unlock;
22218 -@@ -341,8 +372,7 @@ void kmem_cache_destroy(struct kmem_cache *s)
22219 +@@ -505,8 +536,7 @@ void kmem_cache_destroy(struct kmem_cache *s)
22220
22221 mutex_lock(&slab_mutex);
22222
22223 @@ -100087,7 +98583,7 @@ index d319502..da7714e 100644
22224 goto out_unlock;
22225
22226 if (memcg_cleanup_cache_params(s) != 0)
22227 -@@ -362,7 +392,7 @@ void kmem_cache_destroy(struct kmem_cache *s)
22228 +@@ -526,7 +556,7 @@ void kmem_cache_destroy(struct kmem_cache *s)
22229 rcu_barrier();
22230
22231 memcg_free_cache_params(s);
22232 @@ -100096,7 +98592,7 @@ index d319502..da7714e 100644
22233 sysfs_slab_remove(s);
22234 #else
22235 slab_kmem_cache_release(s);
22236 -@@ -418,7 +448,7 @@ void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t siz
22237 +@@ -582,7 +612,7 @@ void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t siz
22238 panic("Creation of kmalloc slab %s size=%zu failed. Reason %d\n",
22239 name, size, err);
22240
22241 @@ -100105,7 +98601,7 @@ index d319502..da7714e 100644
22242 }
22243
22244 struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size,
22245 -@@ -431,7 +461,7 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size,
22246 +@@ -595,7 +625,7 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size,
22247
22248 create_boot_cache(s, name, size, flags);
22249 list_add(&s->list, &slab_caches);
22250 @@ -100114,7 +98610,7 @@ index d319502..da7714e 100644
22251 return s;
22252 }
22253
22254 -@@ -443,6 +473,11 @@ struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
22255 +@@ -607,6 +637,11 @@ struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
22256 EXPORT_SYMBOL(kmalloc_dma_caches);
22257 #endif
22258
22259 @@ -100126,7 +98622,7 @@ index d319502..da7714e 100644
22260 /*
22261 * Conversion table for small slabs sizes / 8 to the index in the
22262 * kmalloc array. This is necessary for slabs < 192 since we have non power
22263 -@@ -507,6 +542,13 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
22264 +@@ -671,6 +706,13 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
22265 return kmalloc_dma_caches[index];
22266
22267 #endif
22268 @@ -100140,7 +98636,7 @@ index d319502..da7714e 100644
22269 return kmalloc_caches[index];
22270 }
22271
22272 -@@ -563,7 +605,7 @@ void __init create_kmalloc_caches(unsigned long flags)
22273 +@@ -727,7 +769,7 @@ void __init create_kmalloc_caches(unsigned long flags)
22274 for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) {
22275 if (!kmalloc_caches[i]) {
22276 kmalloc_caches[i] = create_kmalloc_cache(NULL,
22277 @@ -100149,7 +98645,7 @@ index d319502..da7714e 100644
22278 }
22279
22280 /*
22281 -@@ -572,10 +614,10 @@ void __init create_kmalloc_caches(unsigned long flags)
22282 +@@ -736,10 +778,10 @@ void __init create_kmalloc_caches(unsigned long flags)
22283 * earlier power of two caches
22284 */
22285 if (KMALLOC_MIN_SIZE <= 32 && !kmalloc_caches[1] && i == 6)
22286 @@ -100162,7 +98658,7 @@ index d319502..da7714e 100644
22287 }
22288
22289 /* Kmalloc array is now usable */
22290 -@@ -608,6 +650,23 @@ void __init create_kmalloc_caches(unsigned long flags)
22291 +@@ -772,6 +814,23 @@ void __init create_kmalloc_caches(unsigned long flags)
22292 }
22293 }
22294 #endif
22295 @@ -100186,7 +98682,7 @@ index d319502..da7714e 100644
22296 }
22297 #endif /* !CONFIG_SLOB */
22298
22299 -@@ -666,6 +725,9 @@ void print_slabinfo_header(struct seq_file *m)
22300 +@@ -830,6 +889,9 @@ void print_slabinfo_header(struct seq_file *m)
22301 seq_puts(m, " : globalstat <listallocs> <maxobjs> <grown> <reaped> "
22302 "<error> <maxfreeable> <nodeallocs> <remotefrees> <alienoverflow>");
22303 seq_puts(m, " : cpustat <allochit> <allocmiss> <freehit> <freemiss>");
22304 @@ -100197,7 +98693,7 @@ index d319502..da7714e 100644
22305 seq_putc(m, '\n');
22306 }
22307 diff --git a/mm/slob.c b/mm/slob.c
22308 -index 21980e0..975f1bf 100644
22309 +index 96a8620..3e7e663 100644
22310 --- a/mm/slob.c
22311 +++ b/mm/slob.c
22312 @@ -157,7 +157,7 @@ static void set_slob(slob_t *s, slobidx_t size, slob_t *next)
22313 @@ -100366,7 +98862,7 @@ index 21980e0..975f1bf 100644
22314 return ret;
22315 }
22316
22317 -@@ -493,34 +517,112 @@ void kfree(const void *block)
22318 +@@ -491,34 +515,112 @@ void kfree(const void *block)
22319 return;
22320 kmemleak_free(block);
22321
22322 @@ -100488,7 +98984,7 @@ index 21980e0..975f1bf 100644
22323 }
22324 EXPORT_SYMBOL(ksize);
22325
22326 -@@ -536,23 +638,33 @@ int __kmem_cache_create(struct kmem_cache *c, unsigned long flags)
22327 +@@ -534,23 +636,33 @@ int __kmem_cache_create(struct kmem_cache *c, unsigned long flags)
22328
22329 void *slob_alloc_node(struct kmem_cache *c, gfp_t flags, int node)
22330 {
22331 @@ -100524,7 +99020,7 @@ index 21980e0..975f1bf 100644
22332
22333 if (b && c->ctor)
22334 c->ctor(b);
22335 -@@ -582,12 +694,16 @@ void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t gfp, int node)
22336 +@@ -580,12 +692,16 @@ void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t gfp, int node)
22337 EXPORT_SYMBOL(kmem_cache_alloc_node);
22338 #endif
22339
22340 @@ -100545,7 +99041,7 @@ index 21980e0..975f1bf 100644
22341 }
22342
22343 static void kmem_rcu_free(struct rcu_head *head)
22344 -@@ -595,22 +711,36 @@ static void kmem_rcu_free(struct rcu_head *head)
22345 +@@ -593,22 +709,36 @@ static void kmem_rcu_free(struct rcu_head *head)
22346 struct slob_rcu *slob_rcu = (struct slob_rcu *)head;
22347 void *b = (void *)slob_rcu - (slob_rcu->size - sizeof(struct slob_rcu));
22348
22349 @@ -100587,10 +99083,10 @@ index 21980e0..975f1bf 100644
22350 EXPORT_SYMBOL(kmem_cache_free);
22351
22352 diff --git a/mm/slub.c b/mm/slub.c
22353 -index 3e8afcc..d6e2c89 100644
22354 +index ae7b9f1..7b3fdbe 100644
22355 --- a/mm/slub.c
22356 +++ b/mm/slub.c
22357 -@@ -207,7 +207,7 @@ struct track {
22358 +@@ -197,7 +197,7 @@ struct track {
22359
22360 enum track_item { TRACK_ALLOC, TRACK_FREE };
22361
22362 @@ -100599,7 +99095,7 @@ index 3e8afcc..d6e2c89 100644
22363 static int sysfs_slab_add(struct kmem_cache *);
22364 static int sysfs_slab_alias(struct kmem_cache *, const char *);
22365 static void memcg_propagate_slab_attrs(struct kmem_cache *s);
22366 -@@ -545,7 +545,7 @@ static void print_track(const char *s, struct track *t)
22367 +@@ -535,7 +535,7 @@ static void print_track(const char *s, struct track *t)
22368 if (!t->addr)
22369 return;
22370
22371 @@ -100608,7 +99104,7 @@ index 3e8afcc..d6e2c89 100644
22372 s, (void *)t->addr, jiffies - t->when, t->cpu, t->pid);
22373 #ifdef CONFIG_STACKTRACE
22374 {
22375 -@@ -2643,6 +2643,14 @@ static __always_inline void slab_free(struct kmem_cache *s,
22376 +@@ -2645,6 +2645,14 @@ static __always_inline void slab_free(struct kmem_cache *s,
22377
22378 slab_free_hook(s, x);
22379
22380 @@ -100623,16 +99119,7 @@ index 3e8afcc..d6e2c89 100644
22381 redo:
22382 /*
22383 * Determine the currently cpus per cpu slab.
22384 -@@ -2710,7 +2718,7 @@ static int slub_min_objects;
22385 - * Merge control. If this is set then no merging of slab caches will occur.
22386 - * (Could be removed. This was introduced to pacify the merge skeptics.)
22387 - */
22388 --static int slub_nomerge;
22389 -+static int slub_nomerge = 1;
22390 -
22391 - /*
22392 - * Calculate the order of allocation given an slab object size.
22393 -@@ -2986,6 +2994,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
22394 +@@ -2982,6 +2990,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
22395 s->inuse = size;
22396
22397 if (((flags & (SLAB_DESTROY_BY_RCU | SLAB_POISON)) ||
22398 @@ -100642,7 +99129,7 @@ index 3e8afcc..d6e2c89 100644
22399 s->ctor)) {
22400 /*
22401 * Relocate free pointer after the object if it is not
22402 -@@ -3313,6 +3324,59 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node)
22403 +@@ -3301,6 +3312,59 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node)
22404 EXPORT_SYMBOL(__kmalloc_node);
22405 #endif
22406
22407 @@ -100702,7 +99189,7 @@ index 3e8afcc..d6e2c89 100644
22408 size_t ksize(const void *object)
22409 {
22410 struct page *page;
22411 -@@ -3341,6 +3405,7 @@ void kfree(const void *x)
22412 +@@ -3329,6 +3393,7 @@ void kfree(const void *x)
22413 if (unlikely(ZERO_OR_NULL_PTR(x)))
22414 return;
22415
22416 @@ -100710,16 +99197,7 @@ index 3e8afcc..d6e2c89 100644
22417 page = virt_to_head_page(x);
22418 if (unlikely(!PageSlab(page))) {
22419 BUG_ON(!PageCompound(page));
22420 -@@ -3642,7 +3707,7 @@ static int slab_unmergeable(struct kmem_cache *s)
22421 - /*
22422 - * We may have set a slab to be unmergeable during bootstrap.
22423 - */
22424 -- if (s->refcount < 0)
22425 -+ if (atomic_read(&s->refcount) < 0)
22426 - return 1;
22427 -
22428 - return 0;
22429 -@@ -3699,7 +3764,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
22430 +@@ -3624,7 +3689,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
22431 int i;
22432 struct kmem_cache *c;
22433
22434 @@ -100728,7 +99206,7 @@ index 3e8afcc..d6e2c89 100644
22435
22436 /*
22437 * Adjust the object sizes so that we clear
22438 -@@ -3718,7 +3783,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
22439 +@@ -3643,7 +3708,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
22440 }
22441
22442 if (sysfs_slab_alias(s, name)) {
22443 @@ -100737,7 +99215,7 @@ index 3e8afcc..d6e2c89 100644
22444 s = NULL;
22445 }
22446 }
22447 -@@ -3835,7 +3900,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
22448 +@@ -3760,7 +3825,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
22449 }
22450 #endif
22451
22452 @@ -100746,7 +99224,7 @@ index 3e8afcc..d6e2c89 100644
22453 static int count_inuse(struct page *page)
22454 {
22455 return page->inuse;
22456 -@@ -4116,7 +4181,11 @@ static int list_locations(struct kmem_cache *s, char *buf,
22457 +@@ -4041,7 +4106,11 @@ static int list_locations(struct kmem_cache *s, char *buf,
22458 len += sprintf(buf + len, "%7ld ", l->count);
22459
22460 if (l->addr)
22461 @@ -100758,7 +99236,7 @@ index 3e8afcc..d6e2c89 100644
22462 else
22463 len += sprintf(buf + len, "<not-available>");
22464
22465 -@@ -4218,12 +4287,12 @@ static void __init resiliency_test(void)
22466 +@@ -4143,12 +4212,12 @@ static void __init resiliency_test(void)
22467 validate_slab_cache(kmalloc_caches[9]);
22468 }
22469 #else
22470 @@ -100773,7 +99251,7 @@ index 3e8afcc..d6e2c89 100644
22471 enum slab_stat_type {
22472 SL_ALL, /* All slabs */
22473 SL_PARTIAL, /* Only partially allocated slabs */
22474 -@@ -4460,13 +4529,17 @@ static ssize_t ctor_show(struct kmem_cache *s, char *buf)
22475 +@@ -4385,13 +4454,17 @@ static ssize_t ctor_show(struct kmem_cache *s, char *buf)
22476 {
22477 if (!s->ctor)
22478 return 0;
22479 @@ -100792,7 +99270,7 @@ index 3e8afcc..d6e2c89 100644
22480 }
22481 SLAB_ATTR_RO(aliases);
22482
22483 -@@ -4554,6 +4627,22 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf)
22484 +@@ -4479,6 +4552,22 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf)
22485 SLAB_ATTR_RO(cache_dma);
22486 #endif
22487
22488 @@ -100815,7 +99293,25 @@ index 3e8afcc..d6e2c89 100644
22489 static ssize_t destroy_by_rcu_show(struct kmem_cache *s, char *buf)
22490 {
22491 return sprintf(buf, "%d\n", !!(s->flags & SLAB_DESTROY_BY_RCU));
22492 -@@ -4888,6 +4977,12 @@ static struct attribute *slab_attrs[] = {
22493 +@@ -4534,7 +4623,7 @@ static ssize_t trace_store(struct kmem_cache *s, const char *buf,
22494 + * as well as cause other issues like converting a mergeable
22495 + * cache into an umergeable one.
22496 + */
22497 +- if (s->refcount > 1)
22498 ++ if (atomic_read(&s->refcount) > 1)
22499 + return -EINVAL;
22500 +
22501 + s->flags &= ~SLAB_TRACE;
22502 +@@ -4654,7 +4743,7 @@ static ssize_t failslab_show(struct kmem_cache *s, char *buf)
22503 + static ssize_t failslab_store(struct kmem_cache *s, const char *buf,
22504 + size_t length)
22505 + {
22506 +- if (s->refcount > 1)
22507 ++ if (atomic_read(&s->refcount) > 1)
22508 + return -EINVAL;
22509 +
22510 + s->flags &= ~SLAB_FAILSLAB;
22511 +@@ -4824,6 +4913,12 @@ static struct attribute *slab_attrs[] = {
22512 #ifdef CONFIG_ZONE_DMA
22513 &cache_dma_attr.attr,
22514 #endif
22515 @@ -100828,7 +99324,7 @@ index 3e8afcc..d6e2c89 100644
22516 #ifdef CONFIG_NUMA
22517 &remote_node_defrag_ratio_attr.attr,
22518 #endif
22519 -@@ -5132,6 +5227,7 @@ static char *create_unique_id(struct kmem_cache *s)
22520 +@@ -5068,6 +5163,7 @@ static char *create_unique_id(struct kmem_cache *s)
22521 return name;
22522 }
22523
22524 @@ -100836,7 +99332,7 @@ index 3e8afcc..d6e2c89 100644
22525 static int sysfs_slab_add(struct kmem_cache *s)
22526 {
22527 int err;
22528 -@@ -5205,6 +5301,7 @@ void sysfs_slab_remove(struct kmem_cache *s)
22529 +@@ -5141,6 +5237,7 @@ void sysfs_slab_remove(struct kmem_cache *s)
22530 kobject_del(&s->kobj);
22531 kobject_put(&s->kobj);
22532 }
22533 @@ -100844,7 +99340,7 @@ index 3e8afcc..d6e2c89 100644
22534
22535 /*
22536 * Need to buffer aliases during bootup until sysfs becomes
22537 -@@ -5218,6 +5315,7 @@ struct saved_alias {
22538 +@@ -5154,6 +5251,7 @@ struct saved_alias {
22539
22540 static struct saved_alias *alias_list;
22541
22542 @@ -100852,7 +99348,7 @@ index 3e8afcc..d6e2c89 100644
22543 static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
22544 {
22545 struct saved_alias *al;
22546 -@@ -5240,6 +5338,7 @@ static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
22547 +@@ -5176,6 +5274,7 @@ static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
22548 alias_list = al;
22549 return 0;
22550 }
22551 @@ -100896,7 +99392,7 @@ index d1b48b6..6e8590e 100644
22552 }
22553 }
22554 diff --git a/mm/swap.c b/mm/swap.c
22555 -index 6b2dc38..46b79ba 100644
22556 +index 8a12b33..7068e78 100644
22557 --- a/mm/swap.c
22558 +++ b/mm/swap.c
22559 @@ -31,6 +31,7 @@
22560 @@ -100968,10 +99464,10 @@ index 8798b2e..348f9dd 100644
22561
22562 if (S_ISREG(inode->i_mode))
22563 diff --git a/mm/util.c b/mm/util.c
22564 -index 093c973..b70a268 100644
22565 +index fec39d4..3e60325 100644
22566 --- a/mm/util.c
22567 +++ b/mm/util.c
22568 -@@ -202,6 +202,12 @@ done:
22569 +@@ -195,6 +195,12 @@ struct task_struct *task_of_stack(struct task_struct *task,
22570 void arch_pick_mmap_layout(struct mm_struct *mm)
22571 {
22572 mm->mmap_base = TASK_UNMAPPED_BASE;
22573 @@ -100984,7 +99480,7 @@ index 093c973..b70a268 100644
22574 mm->get_unmapped_area = arch_get_unmapped_area;
22575 }
22576 #endif
22577 -@@ -378,6 +384,9 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
22578 +@@ -371,6 +377,9 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
22579 if (!mm->arg_end)
22580 goto out_mm; /* Shh! No looking before we're done */
22581
22582 @@ -100995,7 +99491,7 @@ index 093c973..b70a268 100644
22583
22584 if (len > buflen)
22585 diff --git a/mm/vmalloc.c b/mm/vmalloc.c
22586 -index 2b0aa54..b451f74 100644
22587 +index 90520af..24231aa 100644
22588 --- a/mm/vmalloc.c
22589 +++ b/mm/vmalloc.c
22590 @@ -40,6 +40,21 @@ struct vfree_deferred {
22591 @@ -101278,10 +99774,10 @@ index 2b0aa54..b451f74 100644
22592 if (v->nr_pages)
22593 seq_printf(m, " pages=%d", v->nr_pages);
22594 diff --git a/mm/vmstat.c b/mm/vmstat.c
22595 -index e9ab104..de275bd 100644
22596 +index 1b12d39..57b29b2 100644
22597 --- a/mm/vmstat.c
22598 +++ b/mm/vmstat.c
22599 -@@ -20,6 +20,7 @@
22600 +@@ -22,6 +22,7 @@
22601 #include <linux/writeback.h>
22602 #include <linux/compaction.h>
22603 #include <linux/mm_inline.h>
22604 @@ -101289,7 +99785,7 @@ index e9ab104..de275bd 100644
22605
22606 #include "internal.h"
22607
22608 -@@ -79,7 +80,7 @@ void vm_events_fold_cpu(int cpu)
22609 +@@ -81,7 +82,7 @@ void vm_events_fold_cpu(int cpu)
22610 *
22611 * vm_stat contains the global counters
22612 */
22613 @@ -101298,16 +99794,16 @@ index e9ab104..de275bd 100644
22614 EXPORT_SYMBOL(vm_stat);
22615
22616 #ifdef CONFIG_SMP
22617 -@@ -425,7 +426,7 @@ static inline void fold_diff(int *diff)
22618 +@@ -433,7 +434,7 @@ static int fold_diff(int *diff)
22619
22620 for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
22621 - if (diff[i])
22622 + if (diff[i]) {
22623 - atomic_long_add(diff[i], &vm_stat[i]);
22624 + atomic_long_add_unchecked(diff[i], &vm_stat[i]);
22625 - }
22626 -
22627 - /*
22628 -@@ -457,7 +458,7 @@ static void refresh_cpu_vm_stats(void)
22629 + changes++;
22630 + }
22631 + return changes;
22632 +@@ -471,7 +472,7 @@ static int refresh_cpu_vm_stats(void)
22633 v = this_cpu_xchg(p->vm_stat_diff[i], 0);
22634 if (v) {
22635
22636 @@ -101316,7 +99812,7 @@ index e9ab104..de275bd 100644
22637 global_diff[i] += v;
22638 #ifdef CONFIG_NUMA
22639 /* 3 seconds idle till flush */
22640 -@@ -519,7 +520,7 @@ void cpu_vm_stats_fold(int cpu)
22641 +@@ -535,7 +536,7 @@ void cpu_vm_stats_fold(int cpu)
22642
22643 v = p->vm_stat_diff[i];
22644 p->vm_stat_diff[i] = 0;
22645 @@ -101325,7 +99821,7 @@ index e9ab104..de275bd 100644
22646 global_diff[i] += v;
22647 }
22648 }
22649 -@@ -539,8 +540,8 @@ void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset)
22650 +@@ -555,8 +556,8 @@ void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset)
22651 if (pset->vm_stat_diff[i]) {
22652 int v = pset->vm_stat_diff[i];
22653 pset->vm_stat_diff[i] = 0;
22654 @@ -101336,7 +99832,7 @@ index e9ab104..de275bd 100644
22655 }
22656 }
22657 #endif
22658 -@@ -1163,10 +1164,22 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
22659 +@@ -1189,10 +1190,22 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
22660 stat_items_size += sizeof(struct vm_event_state);
22661 #endif
22662
22663 @@ -101360,7 +99856,7 @@ index e9ab104..de275bd 100644
22664 for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
22665 v[i] = global_page_state(i);
22666 v += NR_VM_ZONE_STAT_ITEMS;
22667 -@@ -1315,10 +1328,16 @@ static int __init setup_vmstat(void)
22668 +@@ -1424,10 +1437,16 @@ static int __init setup_vmstat(void)
22669 cpu_notifier_register_done();
22670 #endif
22671 #ifdef CONFIG_PROC_FS
22672 @@ -101793,7 +100289,7 @@ index 8854c05..ee5d5497 100644
22673 atomic_t batman_queue_left;
22674 char num_ifaces;
22675 diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
22676 -index 075f20d..62972c9 100644
22677 +index c2e0d14..bfa852b 100644
22678 --- a/net/bluetooth/6lowpan.c
22679 +++ b/net/bluetooth/6lowpan.c
22680 @@ -367,7 +367,6 @@ static int recv_pkt(struct sk_buff *skb, struct net_device *dev,
22681 @@ -101846,7 +100342,7 @@ index 115f149..f0ba286 100644
22682 err = -EFAULT;
22683 break;
22684 diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
22685 -index 6c7ecf1..cf765c7 100644
22686 +index 1b7d605..02ebd10 100644
22687 --- a/net/bluetooth/hidp/core.c
22688 +++ b/net/bluetooth/hidp/core.c
22689 @@ -1318,13 +1318,14 @@ int hidp_connection_add(struct hidp_connadd_req *req,
22690 @@ -101864,12 +100360,12 @@ index 6c7ecf1..cf765c7 100644
22691 + chan = l2cap_pi(ctrl_sock->sk)->chan;
22692 conn = NULL;
22693 l2cap_chan_lock(chan);
22694 - if (chan->conn) {
22695 + if (chan->conn)
22696 diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
22697 -index 14ca8ae..262d49a 100644
22698 +index b6f9777..36d3039 100644
22699 --- a/net/bluetooth/l2cap_core.c
22700 +++ b/net/bluetooth/l2cap_core.c
22701 -@@ -3565,8 +3565,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
22702 +@@ -3512,8 +3512,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
22703 break;
22704
22705 case L2CAP_CONF_RFC:
22706 @@ -101883,10 +100379,10 @@ index 14ca8ae..262d49a 100644
22707 if (test_bit(CONF_STATE2_DEVICE, &chan->conf_state) &&
22708 rfc.mode != chan->mode)
22709 diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
22710 -index 1884f72..b3b71f9 100644
22711 +index 31f106e..323f606 100644
22712 --- a/net/bluetooth/l2cap_sock.c
22713 +++ b/net/bluetooth/l2cap_sock.c
22714 -@@ -629,7 +629,8 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname,
22715 +@@ -628,7 +628,8 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname,
22716 struct sock *sk = sock->sk;
22717 struct l2cap_chan *chan = l2cap_pi(sk)->chan;
22718 struct l2cap_options opts;
22719 @@ -101896,7 +100392,7 @@ index 1884f72..b3b71f9 100644
22720 u32 opt;
22721
22722 BT_DBG("sk %p", sk);
22723 -@@ -656,7 +657,7 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname,
22724 +@@ -655,7 +656,7 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname,
22725 opts.max_tx = chan->max_tx;
22726 opts.txwin_size = chan->tx_win;
22727
22728 @@ -101905,7 +100401,7 @@ index 1884f72..b3b71f9 100644
22729 if (copy_from_user((char *) &opts, optval, len)) {
22730 err = -EFAULT;
22731 break;
22732 -@@ -743,7 +744,8 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
22733 +@@ -742,7 +743,8 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
22734 struct bt_security sec;
22735 struct bt_power pwr;
22736 struct l2cap_conn *conn;
22737 @@ -101915,7 +100411,7 @@ index 1884f72..b3b71f9 100644
22738 u32 opt;
22739
22740 BT_DBG("sk %p", sk);
22741 -@@ -767,7 +769,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
22742 +@@ -766,7 +768,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
22743
22744 sec.level = BT_SECURITY_LOW;
22745
22746 @@ -101978,23 +100474,23 @@ index 8e385a0..a5bdd8e 100644
22747 tty_port_close(&dev->port, tty, filp);
22748 }
22749 diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
22750 -index cb5fcf6..ad0a1a5 100644
22751 +index e5ec470..cbfabd1 100644
22752 --- a/net/bridge/br_netlink.c
22753 +++ b/net/bridge/br_netlink.c
22754 -@@ -484,7 +484,7 @@ static struct rtnl_af_ops br_af_ops = {
22755 +@@ -564,7 +564,7 @@ static struct rtnl_af_ops br_af_ops = {
22756 .get_link_af_size = br_get_link_af_size,
22757 };
22758
22759 -struct rtnl_link_ops br_link_ops __read_mostly = {
22760 +struct rtnl_link_ops br_link_ops = {
22761 - .kind = "bridge",
22762 - .priv_size = sizeof(struct net_bridge),
22763 - .setup = br_dev_setup,
22764 + .kind = "bridge",
22765 + .priv_size = sizeof(struct net_bridge),
22766 + .setup = br_dev_setup,
22767 diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
22768 -index 6d69631..b8fdc85 100644
22769 +index d9a8c05..8dadc6c6 100644
22770 --- a/net/bridge/netfilter/ebtables.c
22771 +++ b/net/bridge/netfilter/ebtables.c
22772 -@@ -1518,7 +1518,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
22773 +@@ -1533,7 +1533,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
22774 tmp.valid_hooks = t->table->valid_hooks;
22775 }
22776 mutex_unlock(&ebt_mutex);
22777 @@ -102003,7 +100499,7 @@ index 6d69631..b8fdc85 100644
22778 BUGPRINT("c2u Didn't work\n");
22779 ret = -EFAULT;
22780 break;
22781 -@@ -2324,7 +2324,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
22782 +@@ -2339,7 +2339,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
22783 goto out;
22784 tmp.valid_hooks = t->valid_hooks;
22785
22786 @@ -102012,7 +100508,7 @@ index 6d69631..b8fdc85 100644
22787 ret = -EFAULT;
22788 break;
22789 }
22790 -@@ -2335,7 +2335,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
22791 +@@ -2350,7 +2350,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
22792 tmp.entries_size = t->table->entries_size;
22793 tmp.valid_hooks = t->table->valid_hooks;
22794
22795 @@ -102148,7 +100644,7 @@ index 1a19b98..df2b4ec 100644
22796 if (!can_dir) {
22797 printk(KERN_INFO "can: failed to create /proc/net/can . "
22798 diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
22799 -index 9f02369..e6160e9 100644
22800 +index 8d1653c..77ad145 100644
22801 --- a/net/ceph/messenger.c
22802 +++ b/net/ceph/messenger.c
22803 @@ -188,7 +188,7 @@ static void con_fault(struct ceph_connection *con);
22804 @@ -102323,7 +100819,7 @@ index fdbc9a8..cd6972c 100644
22805
22806 return err;
22807 diff --git a/net/core/dev.c b/net/core/dev.c
22808 -index cf8a95f..2837211 100644
22809 +index 945bbd0..8b1a370 100644
22810 --- a/net/core/dev.c
22811 +++ b/net/core/dev.c
22812 @@ -1683,14 +1683,14 @@ int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
22813 @@ -102343,25 +100839,16 @@ index cf8a95f..2837211 100644
22814 kfree_skb(skb);
22815 return NET_RX_DROP;
22816 }
22817 -@@ -2487,7 +2487,7 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
22818 -
22819 - struct dev_gso_cb {
22820 - void (*destructor)(struct sk_buff *skb);
22821 --};
22822 -+} __no_const;
22823 -
22824 - #define DEV_GSO_CB(skb) ((struct dev_gso_cb *)(skb)->cb)
22825 -
22826 -@@ -2952,7 +2952,7 @@ recursion_alert:
22827 - rc = -ENETDOWN;
22828 +@@ -2985,7 +2985,7 @@ recursion_alert:
22829 + drop:
22830 rcu_read_unlock_bh();
22831
22832 - atomic_long_inc(&dev->tx_dropped);
22833 + atomic_long_inc_unchecked(&dev->tx_dropped);
22834 - kfree_skb(skb);
22835 + kfree_skb_list(skb);
22836 return rc;
22837 out:
22838 -@@ -3296,7 +3296,7 @@ enqueue:
22839 +@@ -3328,7 +3328,7 @@ enqueue:
22840
22841 local_irq_restore(flags);
22842
22843 @@ -102370,16 +100857,16 @@ index cf8a95f..2837211 100644
22844 kfree_skb(skb);
22845 return NET_RX_DROP;
22846 }
22847 -@@ -3373,7 +3373,7 @@ int netif_rx_ni(struct sk_buff *skb)
22848 +@@ -3405,7 +3405,7 @@ int netif_rx_ni(struct sk_buff *skb)
22849 }
22850 EXPORT_SYMBOL(netif_rx_ni);
22851
22852 -static void net_tx_action(struct softirq_action *h)
22853 +static __latent_entropy void net_tx_action(void)
22854 {
22855 - struct softnet_data *sd = &__get_cpu_var(softnet_data);
22856 + struct softnet_data *sd = this_cpu_ptr(&softnet_data);
22857
22858 -@@ -3706,7 +3706,7 @@ ncls:
22859 +@@ -3738,7 +3738,7 @@ ncls:
22860 ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
22861 } else {
22862 drop:
22863 @@ -102388,16 +100875,16 @@ index cf8a95f..2837211 100644
22864 kfree_skb(skb);
22865 /* Jamal, now you will not able to escape explaining
22866 * me how you were going to use this. :-)
22867 -@@ -4426,7 +4426,7 @@ void netif_napi_del(struct napi_struct *napi)
22868 +@@ -4502,7 +4502,7 @@ void netif_napi_del(struct napi_struct *napi)
22869 }
22870 EXPORT_SYMBOL(netif_napi_del);
22871
22872 -static void net_rx_action(struct softirq_action *h)
22873 +static __latent_entropy void net_rx_action(void)
22874 {
22875 - struct softnet_data *sd = &__get_cpu_var(softnet_data);
22876 + struct softnet_data *sd = this_cpu_ptr(&softnet_data);
22877 unsigned long time_limit = jiffies + 2;
22878 -@@ -6480,8 +6480,8 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
22879 +@@ -6548,8 +6548,8 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
22880 } else {
22881 netdev_stats_to_stats64(storage, &dev->stats);
22882 }
22883 @@ -102409,28 +100896,29 @@ index cf8a95f..2837211 100644
22884 }
22885 EXPORT_SYMBOL(dev_get_stats);
22886 diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
22887 -index cf999e0..c59a9754 100644
22888 +index 72e899a..79a9409 100644
22889 --- a/net/core/dev_ioctl.c
22890 +++ b/net/core/dev_ioctl.c
22891 -@@ -366,9 +366,13 @@ void dev_load(struct net *net, const char *name)
22892 +@@ -365,8 +365,13 @@ void dev_load(struct net *net, const char *name)
22893 + no_module = !dev;
22894 if (no_module && capable(CAP_NET_ADMIN))
22895 no_module = request_module("netdev-%s", name);
22896 - if (no_module && capable(CAP_SYS_MODULE)) {
22897 +- if (no_module && capable(CAP_SYS_MODULE))
22898 ++ if (no_module && capable(CAP_SYS_MODULE)) {
22899 +#ifdef CONFIG_GRKERNSEC_MODHARDEN
22900 + ___request_module(true, "grsec_modharden_netdev", "%s", name);
22901 +#else
22902 - if (!request_module("%s", name))
22903 - pr_warn("Loading kernel module for a network device with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-%s instead.\n",
22904 - name);
22905 + request_module("%s", name);
22906 +#endif
22907 - }
22908 ++ }
22909 }
22910 EXPORT_SYMBOL(dev_load);
22911 +
22912 diff --git a/net/core/filter.c b/net/core/filter.c
22913 -index d814b8a..b5ab778 100644
22914 +index 647b122..18a7ff6 100644
22915 --- a/net/core/filter.c
22916 +++ b/net/core/filter.c
22917 -@@ -559,7 +559,11 @@ do_pass:
22918 +@@ -532,7 +532,11 @@ do_pass:
22919
22920 /* Unkown instruction. */
22921 default:
22922 @@ -102443,7 +100931,7 @@ index d814b8a..b5ab778 100644
22923 }
22924
22925 insn++;
22926 -@@ -606,7 +610,7 @@ static int check_load_and_stores(const struct sock_filter *filter, int flen)
22927 +@@ -576,7 +580,7 @@ static int check_load_and_stores(const struct sock_filter *filter, int flen)
22928 u16 *masks, memvalid = 0; /* One bit per cell, 16 cells */
22929 int pc, ret = 0;
22930
22931 @@ -102452,21 +100940,7 @@ index d814b8a..b5ab778 100644
22932
22933 masks = kmalloc_array(flen, sizeof(*masks), GFP_KERNEL);
22934 if (!masks)
22935 -@@ -933,7 +937,7 @@ static struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp)
22936 -
22937 - /* Expand fp for appending the new filter representation. */
22938 - old_fp = fp;
22939 -- fp = krealloc(old_fp, bpf_prog_size(new_len), GFP_KERNEL);
22940 -+ fp = bpf_prog_realloc(old_fp, bpf_prog_size(new_len), 0);
22941 - if (!fp) {
22942 - /* The old_fp is still around in case we couldn't
22943 - * allocate new memory, so uncharge on that one.
22944 -@@ -1013,11 +1017,11 @@ int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog)
22945 - if (fprog->filter == NULL)
22946 - return -EINVAL;
22947 -
22948 -- fp = kmalloc(bpf_prog_size(fprog->len), GFP_KERNEL);
22949 -+ fp = bpf_prog_alloc(bpf_prog_size(fprog->len), 0);
22950 +@@ -987,7 +991,7 @@ int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog)
22951 if (!fp)
22952 return -ENOMEM;
22953
22954 @@ -102475,30 +100949,6 @@ index d814b8a..b5ab778 100644
22955
22956 fp->len = fprog->len;
22957 /* Since unattached filters are not copied back to user
22958 -@@ -1069,12 +1073,12 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
22959 - if (fprog->filter == NULL)
22960 - return -EINVAL;
22961 -
22962 -- prog = kmalloc(bpf_fsize, GFP_KERNEL);
22963 -+ prog = bpf_prog_alloc(bpf_fsize, 0);
22964 - if (!prog)
22965 - return -ENOMEM;
22966 -
22967 - if (copy_from_user(prog->insns, fprog->filter, fsize)) {
22968 -- kfree(prog);
22969 -+ __bpf_prog_free(prog);
22970 - return -EFAULT;
22971 - }
22972 -
22973 -@@ -1082,7 +1086,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
22974 -
22975 - err = bpf_prog_store_orig_filter(prog, fprog);
22976 - if (err) {
22977 -- kfree(prog);
22978 -+ __bpf_prog_free(prog);
22979 - return -ENOMEM;
22980 - }
22981 -
22982 diff --git a/net/core/flow.c b/net/core/flow.c
22983 index a0348fd..6951c76 100644
22984 --- a/net/core/flow.c
22985 @@ -102639,7 +101089,7 @@ index 9dd0669..c52fb1b 100644
22986 static DEVICE_ATTR_RO(carrier_changes);
22987
22988 diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
22989 -index 7c6b51a..e9dd57f 100644
22990 +index 7f15517..f7d65c0 100644
22991 --- a/net/core/net_namespace.c
22992 +++ b/net/core/net_namespace.c
22993 @@ -445,7 +445,7 @@ static int __register_pernet_operations(struct list_head *list,
22994 @@ -102679,10 +101129,10 @@ index 7c6b51a..e9dd57f 100644
22995 return error;
22996 }
22997 diff --git a/net/core/netpoll.c b/net/core/netpoll.c
22998 -index 907fb5e..8260f040b 100644
22999 +index e6645b4..43e1af9 100644
23000 --- a/net/core/netpoll.c
23001 +++ b/net/core/netpoll.c
23002 -@@ -382,7 +382,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
23003 +@@ -379,7 +379,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
23004 struct udphdr *udph;
23005 struct iphdr *iph;
23006 struct ethhdr *eth;
23007 @@ -102691,7 +101141,7 @@ index 907fb5e..8260f040b 100644
23008 struct ipv6hdr *ip6h;
23009
23010 udp_len = len + sizeof(*udph);
23011 -@@ -453,7 +453,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
23012 +@@ -450,7 +450,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
23013 put_unaligned(0x45, (unsigned char *)iph);
23014 iph->tos = 0;
23015 put_unaligned(htons(ip_len), &(iph->tot_len));
23016 @@ -102701,10 +101151,10 @@ index 907fb5e..8260f040b 100644
23017 iph->ttl = 64;
23018 iph->protocol = IPPROTO_UDP;
23019 diff --git a/net/core/pktgen.c b/net/core/pktgen.c
23020 -index 8b849dd..cd88bfc 100644
23021 +index 443256b..bbff424 100644
23022 --- a/net/core/pktgen.c
23023 +++ b/net/core/pktgen.c
23024 -@@ -3723,7 +3723,7 @@ static int __net_init pg_net_init(struct net *net)
23025 +@@ -3753,7 +3753,7 @@ static int __net_init pg_net_init(struct net *net)
23026 pn->net = net;
23027 INIT_LIST_HEAD(&pn->pktgen_threads);
23028 pn->pktgen_exiting = false;
23029 @@ -102714,7 +101164,7 @@ index 8b849dd..cd88bfc 100644
23030 pr_warn("cannot create /proc/net/%s\n", PG_PROC_DIR);
23031 return -ENODEV;
23032 diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
23033 -index 4921b65..7cb175e 100644
23034 +index 76321ea..3129bd6 100644
23035 --- a/net/core/rtnetlink.c
23036 +++ b/net/core/rtnetlink.c
23037 @@ -58,7 +58,7 @@ struct rtnl_link {
23038 @@ -102761,26 +101211,6 @@ index 4921b65..7cb175e 100644
23039 goto nla_put_failure;
23040
23041 if (1) {
23042 -@@ -2781,6 +2784,9 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
23043 - if (br_spec) {
23044 - nla_for_each_nested(attr, br_spec, rem) {
23045 - if (nla_type(attr) == IFLA_BRIDGE_FLAGS) {
23046 -+ if (nla_len(attr) < sizeof(flags))
23047 -+ return -EINVAL;
23048 -+
23049 - have_flags = true;
23050 - flags = nla_get_u16(attr);
23051 - break;
23052 -@@ -2851,6 +2857,9 @@ static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
23053 - if (br_spec) {
23054 - nla_for_each_nested(attr, br_spec, rem) {
23055 - if (nla_type(attr) == IFLA_BRIDGE_FLAGS) {
23056 -+ if (nla_len(attr) < sizeof(flags))
23057 -+ return -EINVAL;
23058 -+
23059 - have_flags = true;
23060 - flags = nla_get_u16(attr);
23061 - break;
23062 diff --git a/net/core/scm.c b/net/core/scm.c
23063 index b442e7e..6f5b5a2 100644
23064 --- a/net/core/scm.c
23065 @@ -102822,47 +101252,10 @@ index b442e7e..6f5b5a2 100644
23066 {
23067 struct socket *sock;
23068 diff --git a/net/core/skbuff.c b/net/core/skbuff.c
23069 -index 8d28969..4d36260 100644
23070 +index 32e31c2..e981248 100644
23071 --- a/net/core/skbuff.c
23072 +++ b/net/core/skbuff.c
23073 -@@ -360,18 +360,29 @@ refill:
23074 - goto end;
23075 - }
23076 - nc->frag.size = PAGE_SIZE << order;
23077 --recycle:
23078 -- atomic_set(&nc->frag.page->_count, NETDEV_PAGECNT_MAX_BIAS);
23079 -+ /* Even if we own the page, we do not use atomic_set().
23080 -+ * This would break get_page_unless_zero() users.
23081 -+ */
23082 -+ atomic_add(NETDEV_PAGECNT_MAX_BIAS - 1,
23083 -+ &nc->frag.page->_count);
23084 - nc->pagecnt_bias = NETDEV_PAGECNT_MAX_BIAS;
23085 - nc->frag.offset = 0;
23086 - }
23087 -
23088 - if (nc->frag.offset + fragsz > nc->frag.size) {
23089 -- /* avoid unnecessary locked operations if possible */
23090 -- if ((atomic_read(&nc->frag.page->_count) == nc->pagecnt_bias) ||
23091 -- atomic_sub_and_test(nc->pagecnt_bias, &nc->frag.page->_count))
23092 -- goto recycle;
23093 -- goto refill;
23094 -+ if (atomic_read(&nc->frag.page->_count) != nc->pagecnt_bias) {
23095 -+ if (!atomic_sub_and_test(nc->pagecnt_bias,
23096 -+ &nc->frag.page->_count))
23097 -+ goto refill;
23098 -+ /* OK, page count is 0, we can safely set it */
23099 -+ atomic_set(&nc->frag.page->_count,
23100 -+ NETDEV_PAGECNT_MAX_BIAS);
23101 -+ } else {
23102 -+ atomic_add(NETDEV_PAGECNT_MAX_BIAS - nc->pagecnt_bias,
23103 -+ &nc->frag.page->_count);
23104 -+ }
23105 -+ nc->pagecnt_bias = NETDEV_PAGECNT_MAX_BIAS;
23106 -+ nc->frag.offset = 0;
23107 - }
23108 -
23109 - data = page_address(nc->frag.page) + nc->frag.offset;
23110 -@@ -2011,7 +2022,7 @@ EXPORT_SYMBOL(__skb_checksum);
23111 +@@ -2025,7 +2025,7 @@ EXPORT_SYMBOL(__skb_checksum);
23112 __wsum skb_checksum(const struct sk_buff *skb, int offset,
23113 int len, __wsum csum)
23114 {
23115 @@ -102871,7 +101264,7 @@ index 8d28969..4d36260 100644
23116 .update = csum_partial_ext,
23117 .combine = csum_block_add_ext,
23118 };
23119 -@@ -3237,13 +3248,15 @@ void __init skb_init(void)
23120 +@@ -3255,12 +3255,14 @@ void __init skb_init(void)
23121 skbuff_head_cache = kmem_cache_create("skbuff_head_cache",
23122 sizeof(struct sk_buff),
23123 0,
23124 @@ -102880,8 +101273,7 @@ index 8d28969..4d36260 100644
23125 + SLAB_NO_SANITIZE,
23126 NULL);
23127 skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache",
23128 - (2*sizeof(struct sk_buff)) +
23129 - sizeof(atomic_t),
23130 + sizeof(struct sk_buff_fclones),
23131 0,
23132 - SLAB_HWCACHE_ALIGN|SLAB_PANIC,
23133 + SLAB_HWCACHE_ALIGN|SLAB_PANIC|
23134 @@ -102890,10 +101282,10 @@ index 8d28969..4d36260 100644
23135 }
23136
23137 diff --git a/net/core/sock.c b/net/core/sock.c
23138 -index 9c3f823..bd8c884 100644
23139 +index 15e0c67..0310f4a 100644
23140 --- a/net/core/sock.c
23141 +++ b/net/core/sock.c
23142 -@@ -442,7 +442,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
23143 +@@ -441,7 +441,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
23144 struct sk_buff_head *list = &sk->sk_receive_queue;
23145
23146 if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) {
23147 @@ -102902,7 +101294,7 @@ index 9c3f823..bd8c884 100644
23148 trace_sock_rcvqueue_full(sk, skb);
23149 return -ENOMEM;
23150 }
23151 -@@ -452,7 +452,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
23152 +@@ -451,7 +451,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
23153 return err;
23154
23155 if (!sk_rmem_schedule(sk, skb, skb->truesize)) {
23156 @@ -102911,7 +101303,7 @@ index 9c3f823..bd8c884 100644
23157 return -ENOBUFS;
23158 }
23159
23160 -@@ -472,7 +472,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
23161 +@@ -464,7 +464,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
23162 skb_dst_force(skb);
23163
23164 spin_lock_irqsave(&list->lock, flags);
23165 @@ -102920,7 +101312,7 @@ index 9c3f823..bd8c884 100644
23166 __skb_queue_tail(list, skb);
23167 spin_unlock_irqrestore(&list->lock, flags);
23168
23169 -@@ -492,7 +492,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
23170 +@@ -484,7 +484,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
23171 skb->dev = NULL;
23172
23173 if (sk_rcvqueues_full(sk, sk->sk_rcvbuf)) {
23174 @@ -102929,7 +101321,7 @@ index 9c3f823..bd8c884 100644
23175 goto discard_and_relse;
23176 }
23177 if (nested)
23178 -@@ -510,7 +510,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
23179 +@@ -502,7 +502,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
23180 mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
23181 } else if (sk_add_backlog(sk, skb, sk->sk_rcvbuf)) {
23182 bh_unlock_sock(sk);
23183 @@ -102938,7 +101330,7 @@ index 9c3f823..bd8c884 100644
23184 goto discard_and_relse;
23185 }
23186
23187 -@@ -999,12 +999,12 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
23188 +@@ -991,12 +991,12 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
23189 struct timeval tm;
23190 } v;
23191
23192 @@ -102954,7 +101346,7 @@ index 9c3f823..bd8c884 100644
23193 return -EINVAL;
23194
23195 memset(&v, 0, sizeof(v));
23196 -@@ -1142,11 +1142,11 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
23197 +@@ -1134,11 +1134,11 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
23198
23199 case SO_PEERNAME:
23200 {
23201 @@ -102968,7 +101360,7 @@ index 9c3f823..bd8c884 100644
23202 return -EINVAL;
23203 if (copy_to_user(optval, address, len))
23204 return -EFAULT;
23205 -@@ -1227,7 +1227,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
23206 +@@ -1219,7 +1219,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
23207
23208 if (len > lv)
23209 len = lv;
23210 @@ -102977,16 +101369,7 @@ index 9c3f823..bd8c884 100644
23211 return -EFAULT;
23212 lenout:
23213 if (put_user(len, optlen))
23214 -@@ -1723,6 +1723,8 @@ EXPORT_SYMBOL(sock_kmalloc);
23215 - */
23216 - void sock_kfree_s(struct sock *sk, void *mem, int size)
23217 - {
23218 -+ if (WARN_ON_ONCE(!mem))
23219 -+ return;
23220 - kfree(mem);
23221 - atomic_sub(size, &sk->sk_omem_alloc);
23222 - }
23223 -@@ -2369,7 +2371,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
23224 +@@ -2315,7 +2315,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
23225 */
23226 smp_wmb();
23227 atomic_set(&sk->sk_refcnt, 1);
23228 @@ -102995,15 +101378,15 @@ index 9c3f823..bd8c884 100644
23229 }
23230 EXPORT_SYMBOL(sock_init_data);
23231
23232 -@@ -2497,6 +2499,7 @@ void sock_enable_timestamp(struct sock *sk, int flag)
23233 +@@ -2443,6 +2443,7 @@ void sock_enable_timestamp(struct sock *sk, int flag)
23234 int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
23235 int level, int type)
23236 {
23237 + struct sock_extended_err ee;
23238 struct sock_exterr_skb *serr;
23239 - struct sk_buff *skb, *skb2;
23240 + struct sk_buff *skb;
23241 int copied, err;
23242 -@@ -2518,7 +2521,8 @@ int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
23243 +@@ -2464,7 +2465,8 @@ int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
23244 sock_recv_timestamp(msg, sk, skb);
23245
23246 serr = SKB_EXT_ERR(skb);
23247 @@ -103154,10 +101537,10 @@ index cf9cd13..50683950 100644
23248 .exit = sysctl_core_net_exit,
23249 };
23250 diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
23251 -index ae011b4..d2d18bf 100644
23252 +index 25733d5..b9360f0 100644
23253 --- a/net/decnet/af_decnet.c
23254 +++ b/net/decnet/af_decnet.c
23255 -@@ -465,6 +465,7 @@ static struct proto dn_proto = {
23256 +@@ -466,6 +466,7 @@ static struct proto dn_proto = {
23257 .sysctl_rmem = sysctl_decnet_rmem,
23258 .max_header = DN_MAX_NSP_DATA_HEADER + 64,
23259 .obj_size = sizeof(struct dn_sock),
23260 @@ -103166,10 +101549,10 @@ index ae011b4..d2d18bf 100644
23261
23262 static struct sock *dn_alloc_sock(struct net *net, struct socket *sock, gfp_t gfp)
23263 diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
23264 -index 3b726f3..1af6368 100644
23265 +index 4400da7..3429972 100644
23266 --- a/net/decnet/dn_dev.c
23267 +++ b/net/decnet/dn_dev.c
23268 -@@ -200,7 +200,7 @@ static struct dn_dev_sysctl_table {
23269 +@@ -201,7 +201,7 @@ static struct dn_dev_sysctl_table {
23270 .extra1 = &min_t3,
23271 .extra2 = &max_t3
23272 },
23273 @@ -103214,10 +101597,10 @@ index a2c7e4c..3dc9f67 100644
23274 .maxtype = IFLA_HSR_MAX,
23275 .policy = hsr_policy,
23276 diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c
23277 -index 6591d27..499b971 100644
23278 +index 4413629..dea596a 100644
23279 --- a/net/ieee802154/6lowpan_rtnl.c
23280 +++ b/net/ieee802154/6lowpan_rtnl.c
23281 -@@ -590,7 +590,7 @@ static void lowpan_dellink(struct net_device *dev, struct list_head *head)
23282 +@@ -635,7 +635,7 @@ static void lowpan_dellink(struct net_device *dev, struct list_head *head)
23283 dev_put(real_dev);
23284 }
23285
23286 @@ -103227,7 +101610,7 @@ index 6591d27..499b971 100644
23287 .priv_size = sizeof(struct lowpan_dev_info),
23288 .setup = lowpan_setup,
23289 diff --git a/net/ieee802154/reassembly.c b/net/ieee802154/reassembly.c
23290 -index 32755cb..236d827 100644
23291 +index 7cfcd68..84ca5b7 100644
23292 --- a/net/ieee802154/reassembly.c
23293 +++ b/net/ieee802154/reassembly.c
23294 @@ -433,14 +433,13 @@ static struct ctl_table lowpan_frags_ctl_table[] = {
23295 @@ -103271,10 +101654,10 @@ index 32755cb..236d827 100644
23296 return -ENOMEM;
23297 }
23298 diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
23299 -index bf78bc3..f6dbf03 100644
23300 +index e67da4e..da217942 100644
23301 --- a/net/ipv4/af_inet.c
23302 +++ b/net/ipv4/af_inet.c
23303 -@@ -1427,7 +1427,7 @@ int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
23304 +@@ -1392,7 +1392,7 @@ int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
23305 return ip_recv_error(sk, msg, len, addr_len);
23306 #if IS_ENABLED(CONFIG_IPV6)
23307 if (sk->sk_family == AF_INET6)
23308 @@ -103375,10 +101758,10 @@ index 214882e..ec032f6 100644
23309 #endif
23310 if (dflt != &ipv4_devconf_dflt)
23311 diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
23312 -index 255aa99..45c78f8 100644
23313 +index 23104a3..9f5570b 100644
23314 --- a/net/ipv4/fib_frontend.c
23315 +++ b/net/ipv4/fib_frontend.c
23316 -@@ -1015,12 +1015,12 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
23317 +@@ -1017,12 +1017,12 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
23318 #ifdef CONFIG_IP_ROUTE_MULTIPATH
23319 fib_sync_up(dev);
23320 #endif
23321 @@ -103393,7 +101776,7 @@ index 255aa99..45c78f8 100644
23322 if (ifa->ifa_dev->ifa_list == NULL) {
23323 /* Last address was deleted from this interface.
23324 * Disable IP.
23325 -@@ -1058,7 +1058,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
23326 +@@ -1060,7 +1060,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
23327 #ifdef CONFIG_IP_ROUTE_MULTIPATH
23328 fib_sync_up(dev);
23329 #endif
23330 @@ -103403,10 +101786,10 @@ index 255aa99..45c78f8 100644
23331 break;
23332 case NETDEV_DOWN:
23333 diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
23334 -index 4a74ea8..32335a7 100644
23335 +index f99f41b..1879da9 100644
23336 --- a/net/ipv4/fib_semantics.c
23337 +++ b/net/ipv4/fib_semantics.c
23338 -@@ -768,7 +768,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh)
23339 +@@ -770,7 +770,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh)
23340 nh->nh_saddr = inet_select_addr(nh->nh_dev,
23341 nh->nh_gw,
23342 nh->nh_parent->fib_scope);
23343 @@ -103415,29 +101798,8 @@ index 4a74ea8..32335a7 100644
23344
23345 return nh->nh_saddr;
23346 }
23347 -diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
23348 -index 657d80c..0ad744a 100644
23349 ---- a/net/ipv4/gre_offload.c
23350 -+++ b/net/ipv4/gre_offload.c
23351 -@@ -59,13 +59,13 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
23352 - if (csum)
23353 - skb->encap_hdr_csum = 1;
23354 -
23355 -- if (unlikely(!pskb_may_pull(skb, ghl)))
23356 -- goto out;
23357 --
23358 - /* setup inner skb. */
23359 - skb->protocol = greh->protocol;
23360 - skb->encapsulation = 0;
23361 -
23362 -+ if (unlikely(!pskb_may_pull(skb, ghl)))
23363 -+ goto out;
23364 -+
23365 - __skb_pull(skb, ghl);
23366 - skb_reset_mac_header(skb);
23367 - skb_set_network_header(skb, skb_inner_network_offset(skb));
23368 diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
23369 -index 43116e8..ba0916a8 100644
23370 +index 9111a4e..3576905 100644
23371 --- a/net/ipv4/inet_hashtables.c
23372 +++ b/net/ipv4/inet_hashtables.c
23373 @@ -18,6 +18,7 @@
23374 @@ -103467,10 +101829,10 @@ index 43116e8..ba0916a8 100644
23375 inet_twsk_deschedule(tw, death_row);
23376 while (twrefcnt) {
23377 diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
23378 -index bd5f592..e80e605 100644
23379 +index 241afd7..31b95d5 100644
23380 --- a/net/ipv4/inetpeer.c
23381 +++ b/net/ipv4/inetpeer.c
23382 -@@ -482,7 +482,7 @@ relookup:
23383 +@@ -461,7 +461,7 @@ relookup:
23384 if (p) {
23385 p->daddr = *daddr;
23386 atomic_set(&p->refcnt, 1);
23387 @@ -103480,7 +101842,7 @@ index bd5f592..e80e605 100644
23388 p->rate_tokens = 0;
23389 /* 60*HZ is arbitrary, but chosen enough high so that the first
23390 diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
23391 -index 15f0e2b..8cf8177 100644
23392 +index 2811cc1..ad5a534 100644
23393 --- a/net/ipv4/ip_fragment.c
23394 +++ b/net/ipv4/ip_fragment.c
23395 @@ -268,7 +268,7 @@ static inline int ip_frag_too_far(struct ipq *qp)
23396 @@ -103531,7 +101893,7 @@ index 15f0e2b..8cf8177 100644
23397 return -ENOMEM;
23398 }
23399 diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
23400 -index 9b84254..c776611 100644
23401 +index 12055fd..df852c4 100644
23402 --- a/net/ipv4/ip_gre.c
23403 +++ b/net/ipv4/ip_gre.c
23404 @@ -115,7 +115,7 @@ static bool log_ecn_error = true;
23405 @@ -103543,8 +101905,8 @@ index 9b84254..c776611 100644
23406 static int ipgre_tunnel_init(struct net_device *dev);
23407
23408 static int ipgre_net_id __read_mostly;
23409 -@@ -733,7 +733,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
23410 - [IFLA_GRE_PMTUDISC] = { .type = NLA_U8 },
23411 +@@ -815,7 +815,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
23412 + [IFLA_GRE_ENCAP_DPORT] = { .type = NLA_U16 },
23413 };
23414
23415 -static struct rtnl_link_ops ipgre_link_ops __read_mostly = {
23416 @@ -103552,7 +101914,7 @@ index 9b84254..c776611 100644
23417 .kind = "gre",
23418 .maxtype = IFLA_GRE_MAX,
23419 .policy = ipgre_policy,
23420 -@@ -747,7 +747,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = {
23421 +@@ -829,7 +829,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = {
23422 .fill_info = ipgre_fill_info,
23423 };
23424
23425 @@ -103586,24 +101948,11 @@ index 3d4da2c..40f9c29 100644
23426 icmp_send(skb, ICMP_DEST_UNREACH,
23427 ICMP_PROT_UNREACH, 0);
23428 }
23429 -diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
23430 -index c43a1e2..73cbbe1 100644
23431 ---- a/net/ipv4/ip_output.c
23432 -+++ b/net/ipv4/ip_output.c
23433 -@@ -231,7 +231,7 @@ static int ip_finish_output_gso(struct sk_buff *skb)
23434 - */
23435 - features = netif_skb_features(skb);
23436 - segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
23437 -- if (IS_ERR(segs)) {
23438 -+ if (IS_ERR_OR_NULL(segs)) {
23439 - kfree_skb(skb);
23440 - return -ENOMEM;
23441 - }
23442 diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
23443 -index 2407e5d..edc2f1a 100644
23444 +index 9daf217..dc6972d 100644
23445 --- a/net/ipv4/ip_sockglue.c
23446 +++ b/net/ipv4/ip_sockglue.c
23447 -@@ -1188,7 +1188,8 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
23448 +@@ -1177,7 +1177,8 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
23449 len = min_t(unsigned int, len, opt->optlen);
23450 if (put_user(len, optlen))
23451 return -EFAULT;
23452 @@ -103613,7 +101962,7 @@ index 2407e5d..edc2f1a 100644
23453 return -EFAULT;
23454 return 0;
23455 }
23456 -@@ -1319,7 +1320,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
23457 +@@ -1308,7 +1309,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
23458 if (sk->sk_type != SOCK_STREAM)
23459 return -ENOPROTOOPT;
23460
23461 @@ -103623,7 +101972,7 @@ index 2407e5d..edc2f1a 100644
23462 msg.msg_flags = flags;
23463
23464 diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
23465 -index 6073952..8449cf5 100644
23466 +index 1a7e979..fd05aa4 100644
23467 --- a/net/ipv4/ip_vti.c
23468 +++ b/net/ipv4/ip_vti.c
23469 @@ -45,7 +45,7 @@
23470 @@ -103645,10 +101994,10 @@ index 6073952..8449cf5 100644
23471 .maxtype = IFLA_VTI_MAX,
23472 .policy = vti_policy,
23473 diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
23474 -index 5bbef4f..5bc4fb6 100644
23475 +index 648fa14..97864d0 100644
23476 --- a/net/ipv4/ipconfig.c
23477 +++ b/net/ipv4/ipconfig.c
23478 -@@ -332,7 +332,7 @@ static int __init ic_devinet_ioctl(unsigned int cmd, struct ifreq *arg)
23479 +@@ -333,7 +333,7 @@ static int __init ic_devinet_ioctl(unsigned int cmd, struct ifreq *arg)
23480
23481 mm_segment_t oldfs = get_fs();
23482 set_fs(get_ds());
23483 @@ -103657,7 +102006,7 @@ index 5bbef4f..5bc4fb6 100644
23484 set_fs(oldfs);
23485 return res;
23486 }
23487 -@@ -343,7 +343,7 @@ static int __init ic_dev_ioctl(unsigned int cmd, struct ifreq *arg)
23488 +@@ -344,7 +344,7 @@ static int __init ic_dev_ioctl(unsigned int cmd, struct ifreq *arg)
23489
23490 mm_segment_t oldfs = get_fs();
23491 set_fs(get_ds());
23492 @@ -103666,7 +102015,7 @@ index 5bbef4f..5bc4fb6 100644
23493 set_fs(oldfs);
23494 return res;
23495 }
23496 -@@ -354,7 +354,7 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
23497 +@@ -355,7 +355,7 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
23498
23499 mm_segment_t oldfs = get_fs();
23500 set_fs(get_ds());
23501 @@ -103676,7 +102025,7 @@ index 5bbef4f..5bc4fb6 100644
23502 return res;
23503 }
23504 diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
23505 -index 62eaa00..29b2dc2 100644
23506 +index 37096d6..86abb03 100644
23507 --- a/net/ipv4/ipip.c
23508 +++ b/net/ipv4/ipip.c
23509 @@ -124,7 +124,7 @@ MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
23510 @@ -103688,8 +102037,8 @@ index 62eaa00..29b2dc2 100644
23511
23512 static int ipip_err(struct sk_buff *skb, u32 info)
23513 {
23514 -@@ -409,7 +409,7 @@ static const struct nla_policy ipip_policy[IFLA_IPTUN_MAX + 1] = {
23515 - [IFLA_IPTUN_PMTUDISC] = { .type = NLA_U8 },
23516 +@@ -487,7 +487,7 @@ static const struct nla_policy ipip_policy[IFLA_IPTUN_MAX + 1] = {
23517 + [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
23518 };
23519
23520 -static struct rtnl_link_ops ipip_link_ops __read_mostly = {
23521 @@ -103796,7 +102145,7 @@ index 99e810f..3711b81 100644
23522
23523 case IPT_SO_GET_ENTRIES:
23524 diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
23525 -index 2510c02..cfb34fa 100644
23526 +index e90f83a..3e6acca 100644
23527 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
23528 +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
23529 @@ -720,7 +720,7 @@ static int clusterip_net_init(struct net *net)
23530 @@ -103809,7 +102158,7 @@ index 2510c02..cfb34fa 100644
23531 pr_err("Unable to proc dir entry\n");
23532 return -ENOMEM;
23533 diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
23534 -index b503a30..c43e3e1 100644
23535 +index 5d740cc..b2842b9 100644
23536 --- a/net/ipv4/ping.c
23537 +++ b/net/ipv4/ping.c
23538 @@ -59,7 +59,7 @@ struct ping_table {
23539 @@ -103926,7 +102275,7 @@ index 739db31..74f0210 100644
23540
23541 static int raw_seq_show(struct seq_file *seq, void *v)
23542 diff --git a/net/ipv4/route.c b/net/ipv4/route.c
23543 -index 29836f8..bd1e2ba 100644
23544 +index 6a2155b..d426880 100644
23545 --- a/net/ipv4/route.c
23546 +++ b/net/ipv4/route.c
23547 @@ -228,7 +228,7 @@ static const struct seq_operations rt_cache_seq_ops = {
23548 @@ -104047,7 +102396,7 @@ index 29836f8..bd1e2ba 100644
23549 #ifdef CONFIG_IP_ROUTE_CLASSID
23550 ip_rt_acct = __alloc_percpu(256 * sizeof(struct ip_rt_acct), __alignof__(struct ip_rt_acct));
23551 diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
23552 -index 79a007c..5023029 100644
23553 +index b3c53c8..35cc18d 100644
23554 --- a/net/ipv4/sysctl_net_ipv4.c
23555 +++ b/net/ipv4/sysctl_net_ipv4.c
23556 @@ -60,7 +60,7 @@ static int ipv4_local_port_range(struct ctl_table *table, int write,
23557 @@ -104104,7 +102453,7 @@ index 79a007c..5023029 100644
23558 struct tcp_fastopen_context *ctxt;
23559 int ret;
23560 u32 user_key[4]; /* 16 bytes, matching TCP_FASTOPEN_KEY_LENGTH */
23561 -@@ -857,13 +857,12 @@ static struct ctl_table ipv4_net_table[] = {
23562 +@@ -874,13 +874,12 @@ static struct ctl_table ipv4_net_table[] = {
23563
23564 static __net_init int ipv4_sysctl_init_net(struct net *net)
23565 {
23566 @@ -104120,7 +102469,7 @@ index 79a007c..5023029 100644
23567 if (table == NULL)
23568 goto err_alloc;
23569
23570 -@@ -872,7 +871,10 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
23571 +@@ -889,7 +888,10 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
23572 table[i].data += (void *)net - (void *)&init_net;
23573 }
23574
23575 @@ -104133,10 +102482,10 @@ index 79a007c..5023029 100644
23576 goto err_reg;
23577
23578 diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
23579 -index a906e02..f3b6a0f 100644
23580 +index d107ee2..bcebf11 100644
23581 --- a/net/ipv4/tcp_input.c
23582 +++ b/net/ipv4/tcp_input.c
23583 -@@ -755,7 +755,7 @@ static void tcp_update_pacing_rate(struct sock *sk)
23584 +@@ -765,7 +765,7 @@ static void tcp_update_pacing_rate(struct sock *sk)
23585 * without any lock. We want to make sure compiler wont store
23586 * intermediate values in this location.
23587 */
23588 @@ -104145,7 +102494,7 @@ index a906e02..f3b6a0f 100644
23589 sk->sk_max_pacing_rate);
23590 }
23591
23592 -@@ -4488,7 +4488,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
23593 +@@ -4527,7 +4527,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
23594 * simplifies code)
23595 */
23596 static void
23597 @@ -104154,7 +102503,7 @@ index a906e02..f3b6a0f 100644
23598 struct sk_buff *head, struct sk_buff *tail,
23599 u32 start, u32 end)
23600 {
23601 -@@ -5546,6 +5546,7 @@ discard:
23602 +@@ -5506,6 +5506,7 @@ discard:
23603 tcp_paws_reject(&tp->rx_opt, 0))
23604 goto discard_and_undo;
23605
23606 @@ -104162,7 +102511,7 @@ index a906e02..f3b6a0f 100644
23607 if (th->syn) {
23608 /* We see SYN without ACK. It is attempt of
23609 * simultaneous connect with crossed SYNs.
23610 -@@ -5596,6 +5597,7 @@ discard:
23611 +@@ -5556,6 +5557,7 @@ discard:
23612 goto discard;
23613 #endif
23614 }
23615 @@ -104170,7 +102519,7 @@ index a906e02..f3b6a0f 100644
23616 /* "fifth, if neither of the SYN or RST bits is set then
23617 * drop the segment and return."
23618 */
23619 -@@ -5642,7 +5644,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
23620 +@@ -5602,7 +5604,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
23621 goto discard;
23622
23623 if (th->syn) {
23624 @@ -104180,13 +102529,13 @@ index a906e02..f3b6a0f 100644
23625 if (icsk->icsk_af_ops->conn_request(sk, skb) < 0)
23626 return 1;
23627 diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
23628 -index 3f49eae..bde687a 100644
23629 +index ef7089c..a3e65fb 100644
23630 --- a/net/ipv4/tcp_ipv4.c
23631 +++ b/net/ipv4/tcp_ipv4.c
23632 -@@ -91,6 +91,10 @@ int sysctl_tcp_low_latency __read_mostly;
23633 +@@ -89,6 +89,10 @@ int sysctl_tcp_tw_reuse __read_mostly;
23634 + int sysctl_tcp_low_latency __read_mostly;
23635 EXPORT_SYMBOL(sysctl_tcp_low_latency);
23636
23637 -
23638 +#ifdef CONFIG_GRKERNSEC_BLACKHOLE
23639 +extern int grsec_enable_blackhole;
23640 +#endif
23641 @@ -104194,7 +102543,7 @@ index 3f49eae..bde687a 100644
23642 #ifdef CONFIG_TCP_MD5SIG
23643 static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key,
23644 __be32 daddr, __be32 saddr, const struct tcphdr *th);
23645 -@@ -1487,6 +1491,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
23646 +@@ -1469,6 +1473,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
23647 return 0;
23648
23649 reset:
23650 @@ -104227,7 +102576,7 @@ index 3f49eae..bde687a 100644
23651
23652 if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) {
23653 NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
23654 -@@ -1704,6 +1718,10 @@ csum_error:
23655 +@@ -1694,6 +1708,10 @@ csum_error:
23656 bad_packet:
23657 TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
23658 } else {
23659 @@ -104239,7 +102588,7 @@ index 3f49eae..bde687a 100644
23660 }
23661
23662 diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
23663 -index 1649988..6251843 100644
23664 +index 63d2680..2db9d6b 100644
23665 --- a/net/ipv4/tcp_minisocks.c
23666 +++ b/net/ipv4/tcp_minisocks.c
23667 @@ -27,6 +27,10 @@
23668 @@ -104253,7 +102602,7 @@ index 1649988..6251843 100644
23669 int sysctl_tcp_syncookies __read_mostly = 1;
23670 EXPORT_SYMBOL(sysctl_tcp_syncookies);
23671
23672 -@@ -740,7 +744,10 @@ embryonic_reset:
23673 +@@ -739,7 +743,10 @@ embryonic_reset:
23674 * avoid becoming vulnerable to outside attack aiming at
23675 * resetting legit local connections.
23676 */
23677 @@ -104266,10 +102615,10 @@ index 1649988..6251843 100644
23678 reqsk_fastopen_remove(sk, req, true);
23679 tcp_reset(sk);
23680 diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
23681 -index 3b66610..bfbe23a 100644
23682 +index ebf5ff5..4d1ff32 100644
23683 --- a/net/ipv4/tcp_probe.c
23684 +++ b/net/ipv4/tcp_probe.c
23685 -@@ -238,7 +238,7 @@ static ssize_t tcpprobe_read(struct file *file, char __user *buf,
23686 +@@ -236,7 +236,7 @@ static ssize_t tcpprobe_read(struct file *file, char __user *buf,
23687 if (cnt + width >= len)
23688 break;
23689
23690 @@ -104279,7 +102628,7 @@ index 3b66610..bfbe23a 100644
23691 cnt += width;
23692 }
23693 diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
23694 -index df90cd1..9ab2c9b 100644
23695 +index 9b21ae8..4eb67df 100644
23696 --- a/net/ipv4/tcp_timer.c
23697 +++ b/net/ipv4/tcp_timer.c
23698 @@ -22,6 +22,10 @@
23699 @@ -104293,7 +102642,7 @@ index df90cd1..9ab2c9b 100644
23700 int sysctl_tcp_syn_retries __read_mostly = TCP_SYN_RETRIES;
23701 int sysctl_tcp_synack_retries __read_mostly = TCP_SYNACK_RETRIES;
23702 int sysctl_tcp_keepalive_time __read_mostly = TCP_KEEPALIVE_TIME;
23703 -@@ -192,6 +196,13 @@ static int tcp_write_timeout(struct sock *sk)
23704 +@@ -191,6 +195,13 @@ static int tcp_write_timeout(struct sock *sk)
23705 }
23706 }
23707
23708 @@ -104308,7 +102657,7 @@ index df90cd1..9ab2c9b 100644
23709 syn_set ? 0 : icsk->icsk_user_timeout, syn_set)) {
23710 /* Has it gone just too far? */
23711 diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
23712 -index f57c0e4..cf24bd0 100644
23713 +index cd0db54..93a6518 100644
23714 --- a/net/ipv4/udp.c
23715 +++ b/net/ipv4/udp.c
23716 @@ -87,6 +87,7 @@
23717 @@ -104319,7 +102668,7 @@ index f57c0e4..cf24bd0 100644
23718 #include <linux/socket.h>
23719 #include <linux/sockios.h>
23720 #include <linux/igmp.h>
23721 -@@ -113,6 +114,10 @@
23722 +@@ -114,6 +115,10 @@
23723 #include <net/busy_poll.h>
23724 #include "udp_impl.h"
23725
23726 @@ -104330,7 +102679,7 @@ index f57c0e4..cf24bd0 100644
23727 struct udp_table udp_table __read_mostly;
23728 EXPORT_SYMBOL(udp_table);
23729
23730 -@@ -594,6 +599,9 @@ static inline bool __udp_is_mcast_sock(struct net *net, struct sock *sk,
23731 +@@ -595,6 +600,9 @@ static inline bool __udp_is_mcast_sock(struct net *net, struct sock *sk,
23732 return true;
23733 }
23734
23735 @@ -104340,7 +102689,7 @@ index f57c0e4..cf24bd0 100644
23736 /*
23737 * This routine is called by the ICMP module when it gets some
23738 * sort of error condition. If err < 0 then the socket should
23739 -@@ -931,9 +939,18 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
23740 +@@ -932,9 +940,18 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
23741 dport = usin->sin_port;
23742 if (dport == 0)
23743 return -EINVAL;
23744 @@ -104359,7 +102708,7 @@ index f57c0e4..cf24bd0 100644
23745 daddr = inet->inet_daddr;
23746 dport = inet->inet_dport;
23747 /* Open fast path for connected socket.
23748 -@@ -1181,7 +1198,7 @@ static unsigned int first_packet_length(struct sock *sk)
23749 +@@ -1182,7 +1199,7 @@ static unsigned int first_packet_length(struct sock *sk)
23750 IS_UDPLITE(sk));
23751 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
23752 IS_UDPLITE(sk));
23753 @@ -104368,7 +102717,7 @@ index f57c0e4..cf24bd0 100644
23754 __skb_unlink(skb, rcvq);
23755 __skb_queue_tail(&list_kill, skb);
23756 }
23757 -@@ -1261,6 +1278,10 @@ try_again:
23758 +@@ -1262,6 +1279,10 @@ try_again:
23759 if (!skb)
23760 goto out;
23761
23762 @@ -104379,7 +102728,7 @@ index f57c0e4..cf24bd0 100644
23763 ulen = skb->len - sizeof(struct udphdr);
23764 copied = len;
23765 if (copied > ulen)
23766 -@@ -1294,7 +1315,7 @@ try_again:
23767 +@@ -1295,7 +1316,7 @@ try_again:
23768 if (unlikely(err)) {
23769 trace_kfree_skb(skb, udp_recvmsg);
23770 if (!peeked) {
23771 @@ -104388,7 +102737,7 @@ index f57c0e4..cf24bd0 100644
23772 UDP_INC_STATS_USER(sock_net(sk),
23773 UDP_MIB_INERRORS, is_udplite);
23774 }
23775 -@@ -1591,7 +1612,7 @@ csum_error:
23776 +@@ -1592,7 +1613,7 @@ csum_error:
23777 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite);
23778 drop:
23779 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
23780 @@ -104397,7 +102746,7 @@ index f57c0e4..cf24bd0 100644
23781 kfree_skb(skb);
23782 return -1;
23783 }
23784 -@@ -1610,7 +1631,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
23785 +@@ -1611,7 +1632,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
23786 skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);
23787
23788 if (!skb1) {
23789 @@ -104406,7 +102755,7 @@ index f57c0e4..cf24bd0 100644
23790 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
23791 IS_UDPLITE(sk));
23792 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
23793 -@@ -1807,6 +1828,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
23794 +@@ -1812,6 +1833,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
23795 goto csum_error;
23796
23797 UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
23798 @@ -104416,7 +102765,7 @@ index f57c0e4..cf24bd0 100644
23799 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
23800
23801 /*
23802 -@@ -2393,7 +2417,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
23803 +@@ -2398,7 +2422,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
23804 from_kuid_munged(seq_user_ns(f), sock_i_uid(sp)),
23805 0, sock_i_ino(sp),
23806 atomic_read(&sp->sk_refcnt), sp,
23807 @@ -104479,7 +102828,7 @@ index 6156f68..d6ab46d 100644
23808 return -ENOMEM;
23809 }
23810 diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
23811 -index 3e118df..288a0d1 100644
23812 +index 0169ccf..50d7b04 100644
23813 --- a/net/ipv6/addrconf.c
23814 +++ b/net/ipv6/addrconf.c
23815 @@ -171,7 +171,7 @@ static struct ipv6_devconf ipv6_devconf __read_mostly = {
23816 @@ -104518,7 +102867,7 @@ index 3e118df..288a0d1 100644
23817
23818 if (ops->ndo_do_ioctl) {
23819 mm_segment_t oldfs = get_fs();
23820 -@@ -3531,16 +3531,23 @@ static const struct file_operations if6_fops = {
23821 +@@ -3534,16 +3534,23 @@ static const struct file_operations if6_fops = {
23822 .release = seq_release_net,
23823 };
23824
23825 @@ -104543,7 +102892,7 @@ index 3e118df..288a0d1 100644
23826 }
23827
23828 static struct pernet_operations if6_proc_net_ops = {
23829 -@@ -4156,7 +4163,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
23830 +@@ -4159,7 +4166,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
23831 s_ip_idx = ip_idx = cb->args[2];
23832
23833 rcu_read_lock();
23834 @@ -104552,7 +102901,7 @@ index 3e118df..288a0d1 100644
23835 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {
23836 idx = 0;
23837 head = &net->dev_index_head[h];
23838 -@@ -4784,7 +4791,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
23839 +@@ -4788,7 +4795,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
23840 rt_genid_bump_ipv6(net);
23841 break;
23842 }
23843 @@ -104561,7 +102910,7 @@ index 3e118df..288a0d1 100644
23844 }
23845
23846 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
23847 -@@ -4804,7 +4811,7 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write,
23848 +@@ -4808,7 +4815,7 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write,
23849 int *valp = ctl->data;
23850 int val = *valp;
23851 loff_t pos = *ppos;
23852 @@ -104570,7 +102919,7 @@ index 3e118df..288a0d1 100644
23853 int ret;
23854
23855 /*
23856 -@@ -4889,7 +4896,7 @@ int addrconf_sysctl_disable(struct ctl_table *ctl, int write,
23857 +@@ -4893,7 +4900,7 @@ int addrconf_sysctl_disable(struct ctl_table *ctl, int write,
23858 int *valp = ctl->data;
23859 int val = *valp;
23860 loff_t pos = *ppos;
23861 @@ -104580,23 +102929,23 @@ index 3e118df..288a0d1 100644
23862
23863 /*
23864 diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
23865 -index 2daa3a1..341066c 100644
23866 +index e8c4400..a4cd5da 100644
23867 --- a/net/ipv6/af_inet6.c
23868 +++ b/net/ipv6/af_inet6.c
23869 @@ -766,7 +766,7 @@ static int __net_init inet6_net_init(struct net *net)
23870 net->ipv6.sysctl.icmpv6_time = 1*HZ;
23871 net->ipv6.sysctl.flowlabel_consistency = 1;
23872 net->ipv6.sysctl.auto_flowlabels = 0;
23873 -- atomic_set(&net->ipv6.rt_genid, 0);
23874 -+ atomic_set_unchecked(&net->ipv6.rt_genid, 0);
23875 +- atomic_set(&net->ipv6.fib6_sernum, 1);
23876 ++ atomic_set_unchecked(&net->ipv6.fib6_sernum, 1);
23877
23878 err = ipv6_init_mibs(net);
23879 if (err)
23880 diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
23881 -index 2753319..b7e625c 100644
23882 +index 2cdc383..09cffb8 100644
23883 --- a/net/ipv6/datagram.c
23884 +++ b/net/ipv6/datagram.c
23885 -@@ -939,5 +939,5 @@ void ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp,
23886 +@@ -928,5 +928,5 @@ void ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp,
23887 0,
23888 sock_i_ino(sp),
23889 atomic_read(&sp->sk_refcnt), sp,
23890 @@ -104604,10 +102953,10 @@ index 2753319..b7e625c 100644
23891 + atomic_read_unchecked(&sp->sk_drops));
23892 }
23893 diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
23894 -index 06ba3e5..5c08d38 100644
23895 +index 97ae700..18dcae0 100644
23896 --- a/net/ipv6/icmp.c
23897 +++ b/net/ipv6/icmp.c
23898 -@@ -993,7 +993,7 @@ static struct ctl_table ipv6_icmp_table_template[] = {
23899 +@@ -997,7 +997,7 @@ static struct ctl_table ipv6_icmp_table_template[] = {
23900
23901 struct ctl_table * __net_init ipv6_icmp_sysctl_init(struct net *net)
23902 {
23903 @@ -104616,8 +102965,24 @@ index 06ba3e5..5c08d38 100644
23904
23905 table = kmemdup(ipv6_icmp_table_template,
23906 sizeof(ipv6_icmp_table_template),
23907 +diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
23908 +index b2d1838..0194c04 100644
23909 +--- a/net/ipv6/ip6_fib.c
23910 ++++ b/net/ipv6/ip6_fib.c
23911 +@@ -99,9 +99,9 @@ static int fib6_new_sernum(struct net *net)
23912 + int new, old;
23913 +
23914 + do {
23915 +- old = atomic_read(&net->ipv6.fib6_sernum);
23916 ++ old = atomic_read_unchecked(&net->ipv6.fib6_sernum);
23917 + new = old < INT_MAX ? old + 1 : 1;
23918 +- } while (atomic_cmpxchg(&net->ipv6.fib6_sernum,
23919 ++ } while (atomic_cmpxchg_unchecked(&net->ipv6.fib6_sernum,
23920 + old, new) != old);
23921 + return new;
23922 + }
23923 diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
23924 -index 33d08ab..585b825 100644
23925 +index 0e32d2e..98cbe65 100644
23926 --- a/net/ipv6/ip6_gre.c
23927 +++ b/net/ipv6/ip6_gre.c
23928 @@ -71,8 +71,8 @@ struct ip6gre_net {
23929 @@ -104631,7 +102996,7 @@ index 33d08ab..585b825 100644
23930 static int ip6gre_tunnel_init(struct net_device *dev);
23931 static void ip6gre_tunnel_setup(struct net_device *dev);
23932 static void ip6gre_tunnel_link(struct ip6gre_net *ign, struct ip6_tnl *t);
23933 -@@ -1285,7 +1285,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
23934 +@@ -1289,7 +1289,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
23935 }
23936
23937
23938 @@ -104640,7 +103005,7 @@ index 33d08ab..585b825 100644
23939 .handler = ip6gre_rcv,
23940 .err_handler = ip6gre_err,
23941 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
23942 -@@ -1646,7 +1646,7 @@ static const struct nla_policy ip6gre_policy[IFLA_GRE_MAX + 1] = {
23943 +@@ -1650,7 +1650,7 @@ static const struct nla_policy ip6gre_policy[IFLA_GRE_MAX + 1] = {
23944 [IFLA_GRE_FLAGS] = { .type = NLA_U32 },
23945 };
23946
23947 @@ -104649,7 +103014,7 @@ index 33d08ab..585b825 100644
23948 .kind = "ip6gre",
23949 .maxtype = IFLA_GRE_MAX,
23950 .policy = ip6gre_policy,
23951 -@@ -1660,7 +1660,7 @@ static struct rtnl_link_ops ip6gre_link_ops __read_mostly = {
23952 +@@ -1664,7 +1664,7 @@ static struct rtnl_link_ops ip6gre_link_ops __read_mostly = {
23953 .fill_info = ip6gre_fill_info,
23954 };
23955
23956 @@ -104658,20 +103023,8 @@ index 33d08ab..585b825 100644
23957 .kind = "ip6gretap",
23958 .maxtype = IFLA_GRE_MAX,
23959 .policy = ip6gre_policy,
23960 -diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c
23961 -index 65eda2a..620a102 100644
23962 ---- a/net/ipv6/ip6_offload.c
23963 -+++ b/net/ipv6/ip6_offload.c
23964 -@@ -46,6 +46,7 @@ static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
23965 - if (unlikely(!pskb_may_pull(skb, len)))
23966 - break;
23967 -
23968 -+ opth = (void *)skb->data;
23969 - proto = opth->nexthdr;
23970 - __skb_pull(skb, len);
23971 - }
23972 diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
23973 -index d2eeb3b..c186e9a 100644
23974 +index 9cb94cf..5678108 100644
23975 --- a/net/ipv6/ip6_tunnel.c
23976 +++ b/net/ipv6/ip6_tunnel.c
23977 @@ -86,7 +86,7 @@ static u32 HASH(const struct in6_addr *addr1, const struct in6_addr *addr2)
23978 @@ -104693,7 +103046,7 @@ index d2eeb3b..c186e9a 100644
23979 .maxtype = IFLA_IPTUN_MAX,
23980 .policy = ip6_tnl_policy,
23981 diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
23982 -index 3abcd4a..cefa215 100644
23983 +index bcda14d..49378c9 100644
23984 --- a/net/ipv6/ip6_vti.c
23985 +++ b/net/ipv6/ip6_vti.c
23986 @@ -62,7 +62,7 @@ static u32 HASH(const struct in6_addr *addr1, const struct in6_addr *addr2)
23987 @@ -104715,10 +103068,10 @@ index 3abcd4a..cefa215 100644
23988 .maxtype = IFLA_VTI_MAX,
23989 .policy = vti6_policy,
23990 diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
23991 -index 0c28998..d0a2ecd 100644
23992 +index e1a9583..7dd8f4d 100644
23993 --- a/net/ipv6/ipv6_sockglue.c
23994 +++ b/net/ipv6/ipv6_sockglue.c
23995 -@@ -995,7 +995,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
23996 +@@ -993,7 +993,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
23997 if (sk->sk_type != SOCK_STREAM)
23998 return -ENOPROTOOPT;
23999
24000 @@ -104879,7 +103232,7 @@ index 5b7a1ed..d9da205 100644
24001 inet6_unregister_protosw(&pingv6_protosw);
24002 }
24003 diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
24004 -index 2d6f860..b0165f5 100644
24005 +index 1752cd0..3c6af41 100644
24006 --- a/net/ipv6/proc.c
24007 +++ b/net/ipv6/proc.c
24008 @@ -309,7 +309,7 @@ static int __net_init ipv6_proc_init_net(struct net *net)
24009 @@ -104892,7 +103245,7 @@ index 2d6f860..b0165f5 100644
24010 goto proc_dev_snmp6_fail;
24011 return 0;
24012 diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
24013 -index 39d4422..b0979547 100644
24014 +index 896af88..6e2ba628 100644
24015 --- a/net/ipv6/raw.c
24016 +++ b/net/ipv6/raw.c
24017 @@ -388,7 +388,7 @@ static inline int rawv6_rcv_skb(struct sock *sk, struct sk_buff *skb)
24018 @@ -104967,10 +103320,10 @@ index 39d4422..b0979547 100644
24019 return 0;
24020 default:
24021 diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
24022 -index c6557d9..173e728 100644
24023 +index 1a157ca..9fc05f4 100644
24024 --- a/net/ipv6/reassembly.c
24025 +++ b/net/ipv6/reassembly.c
24026 -@@ -627,12 +627,11 @@ static struct ctl_table ip6_frags_ctl_table[] = {
24027 +@@ -625,12 +625,11 @@ static struct ctl_table ip6_frags_ctl_table[] = {
24028
24029 static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
24030 {
24031 @@ -104985,7 +103338,7 @@ index c6557d9..173e728 100644
24032 if (table == NULL)
24033 goto err_alloc;
24034
24035 -@@ -646,9 +645,10 @@ static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
24036 +@@ -644,9 +643,10 @@ static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
24037 /* Don't export sysctls to unprivileged users */
24038 if (net->user_ns != &init_user_ns)
24039 table[0].procname = NULL;
24040 @@ -104998,7 +103351,7 @@ index c6557d9..173e728 100644
24041 if (hdr == NULL)
24042 goto err_reg;
24043
24044 -@@ -656,8 +656,7 @@ static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
24045 +@@ -654,8 +654,7 @@ static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
24046 return 0;
24047
24048 err_reg:
24049 @@ -105009,10 +103362,10 @@ index c6557d9..173e728 100644
24050 return -ENOMEM;
24051 }
24052 diff --git a/net/ipv6/route.c b/net/ipv6/route.c
24053 -index bafde82..af2c91f 100644
24054 +index a318dd89..7ecfea6 100644
24055 --- a/net/ipv6/route.c
24056 +++ b/net/ipv6/route.c
24057 -@@ -2967,7 +2967,7 @@ struct ctl_table ipv6_route_table_template[] = {
24058 +@@ -2965,7 +2965,7 @@ struct ctl_table ipv6_route_table_template[] = {
24059
24060 struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net)
24061 {
24062 @@ -105022,7 +103375,7 @@ index bafde82..af2c91f 100644
24063 table = kmemdup(ipv6_route_table_template,
24064 sizeof(ipv6_route_table_template),
24065 diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
24066 -index ca1c7c4..37fba59 100644
24067 +index a24557a..00a9ed1 100644
24068 --- a/net/ipv6/sit.c
24069 +++ b/net/ipv6/sit.c
24070 @@ -74,7 +74,7 @@ static void ipip6_tunnel_setup(struct net_device *dev);
24071 @@ -105034,30 +103387,7 @@ index ca1c7c4..37fba59 100644
24072
24073 static int sit_net_id __read_mostly;
24074 struct sit_net {
24075 -@@ -484,11 +484,11 @@ static void ipip6_tunnel_uninit(struct net_device *dev)
24076 - */
24077 - static int ipip6_err_gen_icmpv6_unreach(struct sk_buff *skb)
24078 - {
24079 -- const struct iphdr *iph = (const struct iphdr *) skb->data;
24080 -+ int ihl = ((const struct iphdr *)skb->data)->ihl*4;
24081 - struct rt6_info *rt;
24082 - struct sk_buff *skb2;
24083 -
24084 -- if (!pskb_may_pull(skb, iph->ihl * 4 + sizeof(struct ipv6hdr) + 8))
24085 -+ if (!pskb_may_pull(skb, ihl + sizeof(struct ipv6hdr) + 8))
24086 - return 1;
24087 -
24088 - skb2 = skb_clone(skb, GFP_ATOMIC);
24089 -@@ -497,7 +497,7 @@ static int ipip6_err_gen_icmpv6_unreach(struct sk_buff *skb)
24090 - return 1;
24091 -
24092 - skb_dst_drop(skb2);
24093 -- skb_pull(skb2, iph->ihl * 4);
24094 -+ skb_pull(skb2, ihl);
24095 - skb_reset_network_header(skb2);
24096 -
24097 - rt = rt6_lookup(dev_net(skb->dev), &ipv6_hdr(skb2)->saddr, NULL, 0, 0);
24098 -@@ -1659,7 +1659,7 @@ static void ipip6_dellink(struct net_device *dev, struct list_head *head)
24099 +@@ -1750,7 +1750,7 @@ static void ipip6_dellink(struct net_device *dev, struct list_head *head)
24100 unregister_netdevice_queue(dev, head);
24101 }
24102
24103 @@ -105067,10 +103397,10 @@ index ca1c7c4..37fba59 100644
24104 .maxtype = IFLA_IPTUN_MAX,
24105 .policy = ipip6_policy,
24106 diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
24107 -index 0c56c93..ece50df 100644
24108 +index c5c10fa..2577d51 100644
24109 --- a/net/ipv6/sysctl_net_ipv6.c
24110 +++ b/net/ipv6/sysctl_net_ipv6.c
24111 -@@ -68,7 +68,7 @@ static struct ctl_table ipv6_rotable[] = {
24112 +@@ -78,7 +78,7 @@ static struct ctl_table ipv6_rotable[] = {
24113
24114 static int __net_init ipv6_sysctl_net_init(struct net *net)
24115 {
24116 @@ -105080,11 +103410,11 @@ index 0c56c93..ece50df 100644
24117 struct ctl_table *ipv6_icmp_table;
24118 int err;
24119 diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
24120 -index 264c0f2..b6512c6 100644
24121 +index c277951..c7ee5bf 100644
24122 --- a/net/ipv6/tcp_ipv6.c
24123 +++ b/net/ipv6/tcp_ipv6.c
24124 -@@ -102,6 +102,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
24125 - inet6_sk(sk)->rx_dst_cookie = rt->rt6i_node->fn_sernum;
24126 +@@ -104,6 +104,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
24127 + }
24128 }
24129
24130 +#ifdef CONFIG_GRKERNSEC_BLACKHOLE
24131 @@ -105094,7 +103424,7 @@ index 264c0f2..b6512c6 100644
24132 static void tcp_v6_hash(struct sock *sk)
24133 {
24134 if (sk->sk_state != TCP_CLOSE) {
24135 -@@ -1333,6 +1337,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
24136 +@@ -1341,6 +1345,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
24137 return 0;
24138
24139 reset:
24140 @@ -105104,10 +103434,10 @@ index 264c0f2..b6512c6 100644
24141 tcp_v6_send_reset(sk, skb);
24142 discard:
24143 if (opt_skb)
24144 -@@ -1417,12 +1424,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
24145 - TCP_SKB_CB(skb)->sacked = 0;
24146 +@@ -1434,12 +1441,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
24147
24148 - sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
24149 + sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest,
24150 + tcp_v6_iif(skb));
24151 - if (!sk)
24152 + if (!sk) {
24153 +#ifdef CONFIG_GRKERNSEC_BLACKHOLE
24154 @@ -105127,7 +103457,7 @@ index 264c0f2..b6512c6 100644
24155
24156 if (hdr->hop_limit < inet6_sk(sk)->min_hopcount) {
24157 NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
24158 -@@ -1479,6 +1494,10 @@ csum_error:
24159 +@@ -1486,6 +1501,10 @@ csum_error:
24160 bad_packet:
24161 TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
24162 } else {
24163 @@ -105139,7 +103469,7 @@ index 264c0f2..b6512c6 100644
24164 }
24165
24166 diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
24167 -index 4836af8..0e52bbd 100644
24168 +index f6ba535..b41033f 100644
24169 --- a/net/ipv6/udp.c
24170 +++ b/net/ipv6/udp.c
24171 @@ -76,6 +76,10 @@ static unsigned int udp6_ehashfn(struct net *net,
24172 @@ -105180,7 +103510,7 @@ index 4836af8..0e52bbd 100644
24173 UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
24174 IS_UDPLITE(sk));
24175 UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
24176 -@@ -915,6 +919,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
24177 +@@ -919,6 +923,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
24178 goto csum_error;
24179
24180 UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
24181 @@ -105191,7 +103521,7 @@ index 4836af8..0e52bbd 100644
24182
24183 kfree_skb(skb);
24184 diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
24185 -index 2a0bbda..fcd5396 100644
24186 +index 5f98364..5ca982a 100644
24187 --- a/net/ipv6/xfrm6_policy.c
24188 +++ b/net/ipv6/xfrm6_policy.c
24189 @@ -130,8 +130,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
24190 @@ -105204,42 +103534,7 @@ index 2a0bbda..fcd5396 100644
24191 struct ipv6_opt_hdr *exthdr;
24192 const unsigned char *nh = skb_network_header(skb);
24193 u8 nexthdr = nh[IP6CB(skb)->nhoff];
24194 -@@ -170,8 +170,10 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
24195 - case IPPROTO_DCCP:
24196 - if (!onlyproto && (nh + offset + 4 < skb->data ||
24197 - pskb_may_pull(skb, nh + offset + 4 - skb->data))) {
24198 -- __be16 *ports = (__be16 *)exthdr;
24199 -+ __be16 *ports;
24200 -
24201 -+ nh = skb_network_header(skb);
24202 -+ ports = (__be16 *)(nh + offset);
24203 - fl6->fl6_sport = ports[!!reverse];
24204 - fl6->fl6_dport = ports[!reverse];
24205 - }
24206 -@@ -180,8 +182,10 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
24207 -
24208 - case IPPROTO_ICMPV6:
24209 - if (!onlyproto && pskb_may_pull(skb, nh + offset + 2 - skb->data)) {
24210 -- u8 *icmp = (u8 *)exthdr;
24211 -+ u8 *icmp;
24212 -
24213 -+ nh = skb_network_header(skb);
24214 -+ icmp = (u8 *)(nh + offset);
24215 - fl6->fl6_icmp_type = icmp[0];
24216 - fl6->fl6_icmp_code = icmp[1];
24217 - }
24218 -@@ -192,8 +196,9 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
24219 - case IPPROTO_MH:
24220 - if (!onlyproto && pskb_may_pull(skb, nh + offset + 3 - skb->data)) {
24221 - struct ip6_mh *mh;
24222 -- mh = (struct ip6_mh *)exthdr;
24223 -
24224 -+ nh = skb_network_header(skb);
24225 -+ mh = (struct ip6_mh *)(nh + offset);
24226 - fl6->fl6_mh_type = mh->ip6mh_type;
24227 - }
24228 - fl6->flowi6_proto = nexthdr;
24229 -@@ -212,11 +217,11 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
24230 +@@ -217,11 +217,11 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
24231 }
24232 }
24233
24234 @@ -105253,7 +103548,7 @@ index 2a0bbda..fcd5396 100644
24235 return dst_entries_get_fast(ops) > ops->gc_thresh * 2;
24236 }
24237
24238 -@@ -329,19 +334,19 @@ static struct ctl_table xfrm6_policy_table[] = {
24239 +@@ -334,19 +334,19 @@ static struct ctl_table xfrm6_policy_table[] = {
24240
24241 static int __net_init xfrm6_net_init(struct net *net)
24242 {
24243 @@ -105278,7 +103573,7 @@ index 2a0bbda..fcd5396 100644
24244 if (!hdr)
24245 goto err_reg;
24246
24247 -@@ -349,8 +354,7 @@ static int __net_init xfrm6_net_init(struct net *net)
24248 +@@ -354,8 +354,7 @@ static int __net_init xfrm6_net_init(struct net *net)
24249 return 0;
24250
24251 err_reg:
24252 @@ -105406,7 +103701,7 @@ index a089b6b..3ca3b60 100644
24253 memcpy(iucv->src_name, name, 8);
24254 }
24255 diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
24256 -index da78793..bdd78cf 100644
24257 +index 2a6a1fd..6c112b0 100644
24258 --- a/net/iucv/iucv.c
24259 +++ b/net/iucv/iucv.c
24260 @@ -702,7 +702,7 @@ static int iucv_cpu_notify(struct notifier_block *self,
24261 @@ -105525,10 +103820,10 @@ index 1a3c7e0..80f8b0c 100644
24262 goto out;
24263
24264 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
24265 -index 927b4ea..88a30e2 100644
24266 +index 343da1e..509873f 100644
24267 --- a/net/mac80211/cfg.c
24268 +++ b/net/mac80211/cfg.c
24269 -@@ -540,7 +540,7 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy,
24270 +@@ -541,7 +541,7 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy,
24271 ret = ieee80211_vif_use_channel(sdata, chandef,
24272 IEEE80211_CHANCTX_EXCLUSIVE);
24273 }
24274 @@ -105537,7 +103832,7 @@ index 927b4ea..88a30e2 100644
24275 local->_oper_chandef = *chandef;
24276 ieee80211_hw_config(local, 0);
24277 }
24278 -@@ -3286,7 +3286,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
24279 +@@ -3326,7 +3326,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
24280 else
24281 local->probe_req_reg--;
24282
24283 @@ -105546,9 +103841,9 @@ index 927b4ea..88a30e2 100644
24284 break;
24285
24286 ieee80211_queue_work(&local->hw, &local->reconfig_filter);
24287 -@@ -3420,8 +3420,8 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
24288 +@@ -3460,8 +3460,8 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
24289 if (chanctx_conf) {
24290 - *chandef = chanctx_conf->def;
24291 + *chandef = sdata->vif.bss_conf.chandef;
24292 ret = 0;
24293 - } else if (local->open_count > 0 &&
24294 - local->open_count == local->monitors &&
24295 @@ -105558,10 +103853,10 @@ index 927b4ea..88a30e2 100644
24296 if (local->use_chanctx)
24297 *chandef = local->monitor_chandef;
24298 diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
24299 -index 5d102b5..6199fca 100644
24300 +index 8c68da3..0695016 100644
24301 --- a/net/mac80211/ieee80211_i.h
24302 +++ b/net/mac80211/ieee80211_i.h
24303 -@@ -28,6 +28,7 @@
24304 +@@ -29,6 +29,7 @@
24305 #include <net/ieee80211_radiotap.h>
24306 #include <net/cfg80211.h>
24307 #include <net/mac80211.h>
24308 @@ -105569,7 +103864,7 @@ index 5d102b5..6199fca 100644
24309 #include "key.h"
24310 #include "sta_info.h"
24311 #include "debug.h"
24312 -@@ -1055,7 +1056,7 @@ struct ieee80211_local {
24313 +@@ -1057,7 +1058,7 @@ struct ieee80211_local {
24314 /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
24315 spinlock_t queue_stop_reason_lock;
24316
24317 @@ -105579,10 +103874,10 @@ index 5d102b5..6199fca 100644
24318 /* number of interfaces with corresponding FIF_ flags */
24319 int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll,
24320 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
24321 -index 3538e5e..0aa7879 100644
24322 +index 653f5eb..02994ee 100644
24323 --- a/net/mac80211/iface.c
24324 +++ b/net/mac80211/iface.c
24325 -@@ -531,7 +531,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
24326 +@@ -532,7 +532,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
24327 break;
24328 }
24329
24330 @@ -105591,7 +103886,7 @@ index 3538e5e..0aa7879 100644
24331 res = drv_start(local);
24332 if (res)
24333 goto err_del_bss;
24334 -@@ -578,7 +578,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
24335 +@@ -579,7 +579,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
24336 res = drv_add_interface(local, sdata);
24337 if (res)
24338 goto err_stop;
24339 @@ -105600,7 +103895,7 @@ index 3538e5e..0aa7879 100644
24340 res = ieee80211_add_virtual_monitor(local);
24341 if (res)
24342 goto err_stop;
24343 -@@ -687,7 +687,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
24344 +@@ -688,7 +688,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
24345 atomic_inc(&local->iff_promiscs);
24346
24347 if (coming_up)
24348 @@ -105609,7 +103904,7 @@ index 3538e5e..0aa7879 100644
24349
24350 if (hw_reconf_flags)
24351 ieee80211_hw_config(local, hw_reconf_flags);
24352 -@@ -725,7 +725,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
24353 +@@ -726,7 +726,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
24354 err_del_interface:
24355 drv_remove_interface(local, sdata);
24356 err_stop:
24357 @@ -105618,7 +103913,7 @@ index 3538e5e..0aa7879 100644
24358 drv_stop(local);
24359 err_del_bss:
24360 sdata->bss = NULL;
24361 -@@ -891,7 +891,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
24362 +@@ -892,7 +892,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
24363 }
24364
24365 if (going_down)
24366 @@ -105627,7 +103922,7 @@ index 3538e5e..0aa7879 100644
24367
24368 switch (sdata->vif.type) {
24369 case NL80211_IFTYPE_AP_VLAN:
24370 -@@ -952,7 +952,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
24371 +@@ -954,7 +954,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
24372 }
24373 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
24374
24375 @@ -105636,7 +103931,7 @@ index 3538e5e..0aa7879 100644
24376 ieee80211_clear_tx_pending(local);
24377
24378 /*
24379 -@@ -995,7 +995,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
24380 +@@ -997,7 +997,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
24381 if (cancel_scan)
24382 flush_delayed_work(&local->scan_work);
24383
24384 @@ -105645,7 +103940,7 @@ index 3538e5e..0aa7879 100644
24385 ieee80211_stop_device(local);
24386
24387 /* no reconfiguring after stop! */
24388 -@@ -1006,7 +1006,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
24389 +@@ -1008,7 +1008,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
24390 ieee80211_configure_filter(local);
24391 ieee80211_hw_config(local, hw_reconf_flags);
24392
24393 @@ -105655,10 +103950,10 @@ index 3538e5e..0aa7879 100644
24394 }
24395
24396 diff --git a/net/mac80211/main.c b/net/mac80211/main.c
24397 -index e0ab432..36b7b94 100644
24398 +index 0de7c93..884b2ca 100644
24399 --- a/net/mac80211/main.c
24400 +++ b/net/mac80211/main.c
24401 -@@ -174,7 +174,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
24402 +@@ -175,7 +175,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
24403 changed &= ~(IEEE80211_CONF_CHANGE_CHANNEL |
24404 IEEE80211_CONF_CHANGE_POWER);
24405
24406 @@ -105712,10 +104007,10 @@ index 6081329..ab23834 100644
24407
24408 if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) {
24409 diff --git a/net/mac80211/util.c b/net/mac80211/util.c
24410 -index 725af7a..a21a20a 100644
24411 +index 3c61060..7bed2e3 100644
24412 --- a/net/mac80211/util.c
24413 +++ b/net/mac80211/util.c
24414 -@@ -1643,7 +1643,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
24415 +@@ -1669,7 +1669,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
24416 }
24417 #endif
24418 /* everything else happens only if HW was up & running */
24419 @@ -105724,7 +104019,7 @@ index 725af7a..a21a20a 100644
24420 goto wake_up;
24421
24422 /*
24423 -@@ -1869,7 +1869,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
24424 +@@ -1895,7 +1895,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
24425 local->in_reconfig = false;
24426 barrier();
24427
24428 @@ -105734,10 +104029,10 @@ index 725af7a..a21a20a 100644
24429
24430 /*
24431 diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
24432 -index 6d77cce..36e2fc3 100644
24433 +index ae5096ab..e5aa70a 100644
24434 --- a/net/netfilter/Kconfig
24435 +++ b/net/netfilter/Kconfig
24436 -@@ -1096,6 +1096,16 @@ config NETFILTER_XT_MATCH_ESP
24437 +@@ -1105,6 +1105,16 @@ config NETFILTER_XT_MATCH_ESP
24438
24439 To compile it as a module, choose M here. If unsure, say N.
24440
24441 @@ -105755,10 +104050,10 @@ index 6d77cce..36e2fc3 100644
24442 tristate '"hashlimit" match support'
24443 depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
24444 diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
24445 -index fad5fdb..ba3672a 100644
24446 +index a9571be..c59e173 100644
24447 --- a/net/netfilter/Makefile
24448 +++ b/net/netfilter/Makefile
24449 -@@ -136,6 +136,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
24450 +@@ -137,6 +137,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
24451 obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
24452 obj-$(CONFIG_NETFILTER_XT_MATCH_ECN) += xt_ecn.o
24453 obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
24454 @@ -105767,10 +104062,10 @@ index fad5fdb..ba3672a 100644
24455 obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
24456 obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
24457 diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
24458 -index 6582dce..a911da7 100644
24459 +index d259da3..6a32b2c 100644
24460 --- a/net/netfilter/ipset/ip_set_core.c
24461 +++ b/net/netfilter/ipset/ip_set_core.c
24462 -@@ -1921,7 +1921,7 @@ done:
24463 +@@ -1952,7 +1952,7 @@ done:
24464 return ret;
24465 }
24466
24467 @@ -105780,10 +104075,10 @@ index 6582dce..a911da7 100644
24468 .get_optmin = SO_IP_SET,
24469 .get_optmax = SO_IP_SET + 1,
24470 diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
24471 -index 610e19c..08d0c3f 100644
24472 +index b0f7b62..0541842 100644
24473 --- a/net/netfilter/ipvs/ip_vs_conn.c
24474 +++ b/net/netfilter/ipvs/ip_vs_conn.c
24475 -@@ -556,7 +556,7 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
24476 +@@ -572,7 +572,7 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
24477 /* Increase the refcnt counter of the dest */
24478 ip_vs_dest_hold(dest);
24479
24480 @@ -105792,7 +104087,7 @@ index 610e19c..08d0c3f 100644
24481 if (cp->protocol != IPPROTO_UDP)
24482 conn_flags &= ~IP_VS_CONN_F_ONE_PACKET;
24483 flags = cp->flags;
24484 -@@ -899,7 +899,7 @@ ip_vs_conn_new(const struct ip_vs_conn_param *p,
24485 +@@ -922,7 +922,7 @@ ip_vs_conn_new(const struct ip_vs_conn_param *p, int dest_af,
24486
24487 cp->control = NULL;
24488 atomic_set(&cp->n_control, 0);
24489 @@ -105801,7 +104096,7 @@ index 610e19c..08d0c3f 100644
24490
24491 cp->packet_xmit = NULL;
24492 cp->app = NULL;
24493 -@@ -1187,7 +1187,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
24494 +@@ -1229,7 +1229,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
24495
24496 /* Don't drop the entry if its number of incoming packets is not
24497 located in [0, 8] */
24498 @@ -105811,10 +104106,10 @@ index 610e19c..08d0c3f 100644
24499
24500 if (!todrop_rate[i]) return 0;
24501 diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
24502 -index 5c34e8d..0d8eb7f 100644
24503 +index 990decb..5075248 100644
24504 --- a/net/netfilter/ipvs/ip_vs_core.c
24505 +++ b/net/netfilter/ipvs/ip_vs_core.c
24506 -@@ -567,7 +567,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
24507 +@@ -568,7 +568,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
24508 ret = cp->packet_xmit(skb, cp, pd->pp, iph);
24509 /* do not touch skb anymore */
24510
24511 @@ -105823,7 +104118,7 @@ index 5c34e8d..0d8eb7f 100644
24512 ip_vs_conn_put(cp);
24513 return ret;
24514 }
24515 -@@ -1711,7 +1711,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af)
24516 +@@ -1712,7 +1712,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af)
24517 if (cp->flags & IP_VS_CONN_F_ONE_PACKET)
24518 pkts = sysctl_sync_threshold(ipvs);
24519 else
24520 @@ -105833,10 +104128,10 @@ index 5c34e8d..0d8eb7f 100644
24521 if (ipvs->sync_state & IP_VS_STATE_MASTER)
24522 ip_vs_sync_conn(net, cp, pkts);
24523 diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
24524 -index fd3f444..ab28fa24 100644
24525 +index ac7ba68..9735acb9 100644
24526 --- a/net/netfilter/ipvs/ip_vs_ctl.c
24527 +++ b/net/netfilter/ipvs/ip_vs_ctl.c
24528 -@@ -794,7 +794,7 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest,
24529 +@@ -800,7 +800,7 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest,
24530 */
24531 ip_vs_rs_hash(ipvs, dest);
24532 }
24533 @@ -105845,7 +104140,7 @@ index fd3f444..ab28fa24 100644
24534
24535 /* bind the service */
24536 old_svc = rcu_dereference_protected(dest->svc, 1);
24537 -@@ -1654,7 +1654,7 @@ proc_do_sync_ports(struct ctl_table *table, int write,
24538 +@@ -1665,7 +1665,7 @@ proc_do_sync_ports(struct ctl_table *table, int write,
24539 * align with netns init in ip_vs_control_net_init()
24540 */
24541
24542 @@ -105854,7 +104149,7 @@ index fd3f444..ab28fa24 100644
24543 {
24544 .procname = "amemthresh",
24545 .maxlen = sizeof(int),
24546 -@@ -1989,7 +1989,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
24547 +@@ -2000,7 +2000,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
24548 " %-7s %-6d %-10d %-10d\n",
24549 &dest->addr.in6,
24550 ntohs(dest->port),
24551 @@ -105863,7 +104158,7 @@ index fd3f444..ab28fa24 100644
24552 atomic_read(&dest->weight),
24553 atomic_read(&dest->activeconns),
24554 atomic_read(&dest->inactconns));
24555 -@@ -2000,7 +2000,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
24556 +@@ -2011,7 +2011,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
24557 "%-7s %-6d %-10d %-10d\n",
24558 ntohl(dest->addr.ip),
24559 ntohs(dest->port),
24560 @@ -105872,7 +104167,7 @@ index fd3f444..ab28fa24 100644
24561 atomic_read(&dest->weight),
24562 atomic_read(&dest->activeconns),
24563 atomic_read(&dest->inactconns));
24564 -@@ -2471,7 +2471,7 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
24565 +@@ -2500,7 +2500,7 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
24566
24567 entry.addr = dest->addr.ip;
24568 entry.port = dest->port;
24569 @@ -105881,7 +104176,7 @@ index fd3f444..ab28fa24 100644
24570 entry.weight = atomic_read(&dest->weight);
24571 entry.u_threshold = dest->u_threshold;
24572 entry.l_threshold = dest->l_threshold;
24573 -@@ -3010,7 +3010,7 @@ static int ip_vs_genl_fill_dest(struct sk_buff *skb, struct ip_vs_dest *dest)
24574 +@@ -3040,7 +3040,7 @@ static int ip_vs_genl_fill_dest(struct sk_buff *skb, struct ip_vs_dest *dest)
24575 if (nla_put(skb, IPVS_DEST_ATTR_ADDR, sizeof(dest->addr), &dest->addr) ||
24576 nla_put_be16(skb, IPVS_DEST_ATTR_PORT, dest->port) ||
24577 nla_put_u32(skb, IPVS_DEST_ATTR_FWD_METHOD,
24578 @@ -105890,7 +104185,7 @@ index fd3f444..ab28fa24 100644
24579 IP_VS_CONN_F_FWD_MASK)) ||
24580 nla_put_u32(skb, IPVS_DEST_ATTR_WEIGHT,
24581 atomic_read(&dest->weight)) ||
24582 -@@ -3600,7 +3600,7 @@ static int __net_init ip_vs_control_net_init_sysctl(struct net *net)
24583 +@@ -3673,7 +3673,7 @@ static int __net_init ip_vs_control_net_init_sysctl(struct net *net)
24584 {
24585 int idx;
24586 struct netns_ipvs *ipvs = net_ipvs(net);
24587 @@ -105900,7 +104195,7 @@ index fd3f444..ab28fa24 100644
24588 atomic_set(&ipvs->dropentry, 0);
24589 spin_lock_init(&ipvs->dropentry_lock);
24590 diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
24591 -index 547ff33..c8c8117 100644
24592 +index 127f140..553d652 100644
24593 --- a/net/netfilter/ipvs/ip_vs_lblc.c
24594 +++ b/net/netfilter/ipvs/ip_vs_lblc.c
24595 @@ -118,7 +118,7 @@ struct ip_vs_lblc_table {
24596 @@ -105913,7 +104208,7 @@ index 547ff33..c8c8117 100644
24597 .procname = "lblc_expiration",
24598 .data = NULL,
24599 diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c
24600 -index 3f21a2f..a112e85 100644
24601 +index 2229d2d..b32b785 100644
24602 --- a/net/netfilter/ipvs/ip_vs_lblcr.c
24603 +++ b/net/netfilter/ipvs/ip_vs_lblcr.c
24604 @@ -289,7 +289,7 @@ struct ip_vs_lblcr_table {
24605 @@ -105926,7 +104221,7 @@ index 3f21a2f..a112e85 100644
24606 .procname = "lblcr_expiration",
24607 .data = NULL,
24608 diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
24609 -index eadffb2..c2feeae 100644
24610 +index 7162c86..9eeb60e 100644
24611 --- a/net/netfilter/ipvs/ip_vs_sync.c
24612 +++ b/net/netfilter/ipvs/ip_vs_sync.c
24613 @@ -609,7 +609,7 @@ static void ip_vs_sync_conn_v0(struct net *net, struct ip_vs_conn *cp,
24614 @@ -105947,7 +104242,7 @@ index eadffb2..c2feeae 100644
24615 else
24616 pkts = sysctl_sync_threshold(ipvs);
24617 goto sloop;
24618 -@@ -894,7 +894,7 @@ static void ip_vs_proc_conn(struct net *net, struct ip_vs_conn_param *param,
24619 +@@ -901,7 +901,7 @@ static void ip_vs_proc_conn(struct net *net, struct ip_vs_conn_param *param,
24620
24621 if (opt)
24622 memcpy(&cp->in_seq, opt, sizeof(*opt));
24623 @@ -105957,10 +104252,10 @@ index eadffb2..c2feeae 100644
24624 cp->old_state = cp->state;
24625 /*
24626 diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
24627 -index 56896a4..dfe3806 100644
24628 +index bd90bf8..816a020d 100644
24629 --- a/net/netfilter/ipvs/ip_vs_xmit.c
24630 +++ b/net/netfilter/ipvs/ip_vs_xmit.c
24631 -@@ -1114,7 +1114,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
24632 +@@ -1215,7 +1215,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
24633 else
24634 rc = NF_ACCEPT;
24635 /* do not touch skb anymore */
24636 @@ -105969,7 +104264,7 @@ index 56896a4..dfe3806 100644
24637 goto out;
24638 }
24639
24640 -@@ -1206,7 +1206,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
24641 +@@ -1308,7 +1308,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
24642 else
24643 rc = NF_ACCEPT;
24644 /* do not touch skb anymore */
24645 @@ -105992,7 +104287,7 @@ index a4b5e2a..13b1de3 100644
24646 table = kmemdup(acct_sysctl_table, sizeof(acct_sysctl_table),
24647 GFP_KERNEL);
24648 diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
24649 -index de88c4a..ec84234 100644
24650 +index 5016a69..594f8e9 100644
24651 --- a/net/netfilter/nf_conntrack_core.c
24652 +++ b/net/netfilter/nf_conntrack_core.c
24653 @@ -1739,6 +1739,10 @@ void nf_conntrack_init_end(void)
24654 @@ -106058,7 +104353,7 @@ index b65d586..beec902 100644
24655 {
24656 if (users > 0)
24657 diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
24658 -index f641751..d3c5b51 100644
24659 +index cf65a1e..2f291e9 100644
24660 --- a/net/netfilter/nf_conntrack_standalone.c
24661 +++ b/net/netfilter/nf_conntrack_standalone.c
24662 @@ -471,7 +471,7 @@ static struct ctl_table nf_ct_netfilter_table[] = {
24663 @@ -106084,7 +104379,7 @@ index 7a394df..bd91a8a 100644
24664 table = kmemdup(tstamp_sysctl_table, sizeof(tstamp_sysctl_table),
24665 GFP_KERNEL);
24666 diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
24667 -index daad602..384be13 100644
24668 +index d719764..311bc60 100644
24669 --- a/net/netfilter/nf_log.c
24670 +++ b/net/netfilter/nf_log.c
24671 @@ -353,7 +353,7 @@ static const struct file_operations nflog_file_ops = {
24672 @@ -106139,7 +104434,7 @@ index c68c1e5..8b5d670 100644
24673 }
24674 EXPORT_SYMBOL(nf_unregister_sockopt);
24675 diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
24676 -index 3250735..1fac969 100644
24677 +index 5f1be5b..2cba8cd 100644
24678 --- a/net/netfilter/nfnetlink_log.c
24679 +++ b/net/netfilter/nfnetlink_log.c
24680 @@ -80,7 +80,7 @@ static int nfnl_log_net_id __read_mostly;
24681 @@ -106160,41 +104455,6 @@ index 3250735..1fac969 100644
24682 goto nla_put_failure;
24683
24684 if (data_len) {
24685 -diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
24686 -index 108120f..5b169db 100644
24687 ---- a/net/netfilter/nfnetlink_queue_core.c
24688 -+++ b/net/netfilter/nfnetlink_queue_core.c
24689 -@@ -665,7 +665,7 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum)
24690 - * returned by nf_queue. For instance, callers rely on -ECANCELED to
24691 - * mean 'ignore this hook'.
24692 - */
24693 -- if (IS_ERR(segs))
24694 -+ if (IS_ERR_OR_NULL(segs))
24695 - goto out_err;
24696 - queued = 0;
24697 - err = 0;
24698 -diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
24699 -index 5b5ab9e..fc1015c 100644
24700 ---- a/net/netfilter/nft_compat.c
24701 -+++ b/net/netfilter/nft_compat.c
24702 -@@ -225,7 +225,7 @@ target_dump_info(struct sk_buff *skb, const struct xt_target *t, const void *in)
24703 - /* We want to reuse existing compat_to_user */
24704 - old_fs = get_fs();
24705 - set_fs(KERNEL_DS);
24706 -- t->compat_to_user(out, in);
24707 -+ t->compat_to_user((void __force_user *)out, in);
24708 - set_fs(old_fs);
24709 - ret = nla_put(skb, NFTA_TARGET_INFO, XT_ALIGN(t->targetsize), out);
24710 - kfree(out);
24711 -@@ -421,7 +421,7 @@ match_dump_info(struct sk_buff *skb, const struct xt_match *m, const void *in)
24712 - /* We want to reuse existing compat_to_user */
24713 - old_fs = get_fs();
24714 - set_fs(KERNEL_DS);
24715 -- m->compat_to_user(out, in);
24716 -+ m->compat_to_user((void __force_user *)out, in);
24717 - set_fs(old_fs);
24718 - ret = nla_put(skb, NFTA_MATCH_INFO, XT_ALIGN(m->matchsize), out);
24719 - kfree(out);
24720 diff --git a/net/netfilter/xt_gradm.c b/net/netfilter/xt_gradm.c
24721 new file mode 100644
24722 index 0000000..c566332
24723 @@ -106253,7 +104513,7 @@ index 0000000..c566332
24724 +MODULE_ALIAS("ipt_gradm");
24725 +MODULE_ALIAS("ip6t_gradm");
24726 diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
24727 -index 47dc683..2e0d52c 100644
24728 +index 05fbc2a..4424b5c 100644
24729 --- a/net/netfilter/xt_hashlimit.c
24730 +++ b/net/netfilter/xt_hashlimit.c
24731 @@ -871,11 +871,11 @@ static int __net_init hashlimit_proc_net_init(struct net *net)
24732 @@ -106339,19 +104599,6 @@ index b6bf8e8..7884ddf 100644
24733 sock_i_ino(s)
24734 );
24735
24736 -diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
24737 -index 64dc864..7a9e2a4 100644
24738 ---- a/net/openvswitch/datapath.c
24739 -+++ b/net/openvswitch/datapath.c
24740 -@@ -332,6 +332,8 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb,
24741 - segs = __skb_gso_segment(skb, NETIF_F_SG, false);
24742 - if (IS_ERR(segs))
24743 - return PTR_ERR(segs);
24744 -+ if (segs == NULL)
24745 -+ return -EINVAL;
24746 -
24747 - /* Queue all of the segments. */
24748 - skb = segs;
24749 diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
24750 index 8451612..c8872bc 100644
24751 --- a/net/openvswitch/vport-internal_dev.c
24752 @@ -106365,11 +104612,73 @@ index 8451612..c8872bc 100644
24753 .kind = "openvswitch",
24754 };
24755
24756 +diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
24757 +index 6015802..e81e8bf 100644
24758 +--- a/net/openvswitch/vport.c
24759 ++++ b/net/openvswitch/vport.c
24760 +@@ -269,10 +269,10 @@ void ovs_vport_get_stats(struct vport *vport, struct ovs_vport_stats *stats)
24761 + * netdev-stats can be directly read over netlink-ioctl.
24762 + */
24763 +
24764 +- stats->rx_errors = atomic_long_read(&vport->err_stats.rx_errors);
24765 +- stats->tx_errors = atomic_long_read(&vport->err_stats.tx_errors);
24766 +- stats->tx_dropped = atomic_long_read(&vport->err_stats.tx_dropped);
24767 +- stats->rx_dropped = atomic_long_read(&vport->err_stats.rx_dropped);
24768 ++ stats->rx_errors = atomic_long_read_unchecked(&vport->err_stats.rx_errors);
24769 ++ stats->tx_errors = atomic_long_read_unchecked(&vport->err_stats.tx_errors);
24770 ++ stats->tx_dropped = atomic_long_read_unchecked(&vport->err_stats.tx_dropped);
24771 ++ stats->rx_dropped = atomic_long_read_unchecked(&vport->err_stats.rx_dropped);
24772 +
24773 + for_each_possible_cpu(i) {
24774 + const struct pcpu_sw_netstats *percpu_stats;
24775 +@@ -503,19 +503,19 @@ static void ovs_vport_record_error(struct vport *vport,
24776 + {
24777 + switch (err_type) {
24778 + case VPORT_E_RX_DROPPED:
24779 +- atomic_long_inc(&vport->err_stats.rx_dropped);
24780 ++ atomic_long_inc_unchecked(&vport->err_stats.rx_dropped);
24781 + break;
24782 +
24783 + case VPORT_E_RX_ERROR:
24784 +- atomic_long_inc(&vport->err_stats.rx_errors);
24785 ++ atomic_long_inc_unchecked(&vport->err_stats.rx_errors);
24786 + break;
24787 +
24788 + case VPORT_E_TX_DROPPED:
24789 +- atomic_long_inc(&vport->err_stats.tx_dropped);
24790 ++ atomic_long_inc_unchecked(&vport->err_stats.tx_dropped);
24791 + break;
24792 +
24793 + case VPORT_E_TX_ERROR:
24794 +- atomic_long_inc(&vport->err_stats.tx_errors);
24795 ++ atomic_long_inc_unchecked(&vport->err_stats.tx_errors);
24796 + break;
24797 + }
24798 +
24799 +diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
24800 +index 8942125..03ed887 100644
24801 +--- a/net/openvswitch/vport.h
24802 ++++ b/net/openvswitch/vport.h
24803 +@@ -61,10 +61,10 @@ int ovs_vport_send(struct vport *, struct sk_buff *);
24804 + /* The following definitions are for implementers of vport devices: */
24805 +
24806 + struct vport_err_stats {
24807 +- atomic_long_t rx_dropped;
24808 +- atomic_long_t rx_errors;
24809 +- atomic_long_t tx_dropped;
24810 +- atomic_long_t tx_errors;
24811 ++ atomic_long_unchecked_t rx_dropped;
24812 ++ atomic_long_unchecked_t rx_errors;
24813 ++ atomic_long_unchecked_t tx_dropped;
24814 ++ atomic_long_unchecked_t tx_errors;
24815 + };
24816 + /**
24817 + * struct vport_portids - array of netlink portids of a vport.
24818 diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
24819 -index 93896d2..b701c88 100644
24820 +index 07c04a8..3ca11eb 100644
24821 --- a/net/packet/af_packet.c
24822 +++ b/net/packet/af_packet.c
24823 -@@ -275,7 +275,7 @@ static int packet_direct_xmit(struct sk_buff *skb)
24824 +@@ -269,7 +269,7 @@ static int packet_direct_xmit(struct sk_buff *skb)
24825
24826 return ret;
24827 drop:
24828 @@ -106378,7 +104687,7 @@ index 93896d2..b701c88 100644
24829 kfree_skb(skb);
24830 return NET_XMIT_DROP;
24831 }
24832 -@@ -1842,7 +1842,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
24833 +@@ -1836,7 +1836,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
24834
24835 spin_lock(&sk->sk_receive_queue.lock);
24836 po->stats.stats1.tp_packets++;
24837 @@ -106387,7 +104696,7 @@ index 93896d2..b701c88 100644
24838 __skb_queue_tail(&sk->sk_receive_queue, skb);
24839 spin_unlock(&sk->sk_receive_queue.lock);
24840 sk->sk_data_ready(sk);
24841 -@@ -1851,7 +1851,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
24842 +@@ -1845,7 +1845,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
24843 drop_n_acct:
24844 spin_lock(&sk->sk_receive_queue.lock);
24845 po->stats.stats1.tp_drops++;
24846 @@ -106396,7 +104705,7 @@ index 93896d2..b701c88 100644
24847 spin_unlock(&sk->sk_receive_queue.lock);
24848
24849 drop_n_restore:
24850 -@@ -3466,7 +3466,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
24851 +@@ -3460,7 +3460,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
24852 case PACKET_HDRLEN:
24853 if (len > sizeof(int))
24854 len = sizeof(int);
24855 @@ -106405,7 +104714,7 @@ index 93896d2..b701c88 100644
24856 return -EFAULT;
24857 switch (val) {
24858 case TPACKET_V1:
24859 -@@ -3512,7 +3512,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
24860 +@@ -3506,7 +3506,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
24861 len = lv;
24862 if (put_user(len, optlen))
24863 return -EFAULT;
24864 @@ -106598,42 +104907,6 @@ index aa8bf67..b70133c 100644
24865 }
24866 #endif
24867
24868 -diff --git a/net/rds/rdma.c b/net/rds/rdma.c
24869 -index 4e37c1c..40084d8 100644
24870 ---- a/net/rds/rdma.c
24871 -+++ b/net/rds/rdma.c
24872 -@@ -564,12 +564,12 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
24873 -
24874 - if (rs->rs_bound_addr == 0) {
24875 - ret = -ENOTCONN; /* XXX not a great errno */
24876 -- goto out;
24877 -+ goto out_ret;
24878 - }
24879 -
24880 - if (args->nr_local > UIO_MAXIOV) {
24881 - ret = -EMSGSIZE;
24882 -- goto out;
24883 -+ goto out_ret;
24884 - }
24885 -
24886 - /* Check whether to allocate the iovec area */
24887 -@@ -578,7 +578,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
24888 - iovs = sock_kmalloc(rds_rs_to_sk(rs), iov_size, GFP_KERNEL);
24889 - if (!iovs) {
24890 - ret = -ENOMEM;
24891 -- goto out;
24892 -+ goto out_ret;
24893 - }
24894 - }
24895 -
24896 -@@ -696,6 +696,7 @@ out:
24897 - if (iovs != iovstack)
24898 - sock_kfree_s(rds_rs_to_sk(rs), iovs, iov_size);
24899 - kfree(pages);
24900 -+out_ret:
24901 - if (ret)
24902 - rds_rdma_free_op(op);
24903 - else
24904 diff --git a/net/rds/rds.h b/net/rds/rds.h
24905 index 48f8ffc..0ef3eec 100644
24906 --- a/net/rds/rds.h
24907 @@ -106647,43 +104920,6 @@ index 48f8ffc..0ef3eec 100644
24908
24909 struct rds_sock {
24910 struct sock rs_sk;
24911 -diff --git a/net/rds/send.c b/net/rds/send.c
24912 -index 2371816..0a64541 100644
24913 ---- a/net/rds/send.c
24914 -+++ b/net/rds/send.c
24915 -@@ -593,8 +593,11 @@ static void rds_send_remove_from_sock(struct list_head *messages, int status)
24916 - sock_put(rds_rs_to_sk(rs));
24917 - }
24918 - rs = rm->m_rs;
24919 -- sock_hold(rds_rs_to_sk(rs));
24920 -+ if (rs)
24921 -+ sock_hold(rds_rs_to_sk(rs));
24922 - }
24923 -+ if (!rs)
24924 -+ goto unlock_and_drop;
24925 - spin_lock(&rs->rs_lock);
24926 -
24927 - if (test_and_clear_bit(RDS_MSG_ON_SOCK, &rm->m_flags)) {
24928 -@@ -638,9 +641,6 @@ unlock_and_drop:
24929 - * queue. This means that in the TCP case, the message may not have been
24930 - * assigned the m_ack_seq yet - but that's fine as long as tcp_is_acked
24931 - * checks the RDS_MSG_HAS_ACK_SEQ bit.
24932 -- *
24933 -- * XXX It's not clear to me how this is safely serialized with socket
24934 -- * destruction. Maybe it should bail if it sees SOCK_DEAD.
24935 - */
24936 - void rds_send_drop_acked(struct rds_connection *conn, u64 ack,
24937 - is_acked_func is_acked)
24938 -@@ -711,6 +711,9 @@ void rds_send_drop_to(struct rds_sock *rs, struct sockaddr_in *dest)
24939 - */
24940 - if (!test_and_clear_bit(RDS_MSG_ON_CONN, &rm->m_flags)) {
24941 - spin_unlock_irqrestore(&conn->c_lock, flags);
24942 -+ spin_lock_irqsave(&rm->m_rs_lock, flags);
24943 -+ rm->m_rs = NULL;
24944 -+ spin_unlock_irqrestore(&rm->m_rs_lock, flags);
24945 - continue;
24946 - }
24947 - list_del_init(&rm->m_conn_item);
24948 diff --git a/net/rds/tcp.c b/net/rds/tcp.c
24949 index edac9ef..16bcb98 100644
24950 --- a/net/rds/tcp.c
24951 @@ -106830,10 +105066,10 @@ index e7ed43a..6afa140 100644
24952
24953 ret = kernel_sendmsg(conn->trans->local->socket, &msg, iov, 2, len);
24954 diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/ar-input.c
24955 -index 63b21e5..330232e 100644
24956 +index 481f89f..ceeaf8d 100644
24957 --- a/net/rxrpc/ar-input.c
24958 +++ b/net/rxrpc/ar-input.c
24959 -@@ -338,9 +338,9 @@ void rxrpc_fast_process_packet(struct rxrpc_call *call, struct sk_buff *skb)
24960 +@@ -331,9 +331,9 @@ void rxrpc_fast_process_packet(struct rxrpc_call *call, struct sk_buff *skb)
24961 /* track the latest serial number on this connection for ACK packet
24962 * information */
24963 serial = ntohl(sp->hdr.serial);
24964 @@ -106976,10 +105212,10 @@ index f226709..0e735a8 100644
24965
24966 ret = kernel_sendmsg(conn->trans->local->socket, &msg, iov, 3, len);
24967 diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
24968 -index fc04fe9..8167357 100644
24969 +index 6efca30..1259f82 100644
24970 --- a/net/sched/sch_generic.c
24971 +++ b/net/sched/sch_generic.c
24972 -@@ -310,7 +310,7 @@ void netif_carrier_on(struct net_device *dev)
24973 +@@ -349,7 +349,7 @@ void netif_carrier_on(struct net_device *dev)
24974 if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) {
24975 if (dev->reg_state == NETREG_UNINITIALIZED)
24976 return;
24977 @@ -106988,7 +105224,7 @@ index fc04fe9..8167357 100644
24978 linkwatch_fire_event(dev);
24979 if (netif_running(dev))
24980 __netdev_watchdog_up(dev);
24981 -@@ -329,7 +329,7 @@ void netif_carrier_off(struct net_device *dev)
24982 +@@ -368,7 +368,7 @@ void netif_carrier_off(struct net_device *dev)
24983 if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) {
24984 if (dev->reg_state == NETREG_UNINITIALIZED)
24985 return;
24986 @@ -107029,7 +105265,7 @@ index 0e4198e..f94193e 100644
24987
24988 /* Initialize IPv6 support and register with socket layer. */
24989 diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
24990 -index 6240834..cac4b52 100644
24991 +index 8f34b27..b105385 100644
24992 --- a/net/sctp/protocol.c
24993 +++ b/net/sctp/protocol.c
24994 @@ -836,8 +836,10 @@ int sctp_register_af(struct sctp_af *af)
24995 @@ -107216,7 +105452,7 @@ index 2e9ada1..40f425d 100644
24996
24997 table = kmemdup(sctp_net_table, sizeof(sctp_net_table), GFP_KERNEL);
24998 diff --git a/net/socket.c b/net/socket.c
24999 -index 4cdbc10..f075204 100644
25000 +index fe20c31..83a0ed6 100644
25001 --- a/net/socket.c
25002 +++ b/net/socket.c
25003 @@ -89,6 +89,7 @@
25004 @@ -107254,7 +105490,7 @@ index 4cdbc10..f075204 100644
25005
25006 static struct file_system_type sock_fs_type = {
25007 .name = "sockfs",
25008 -@@ -1265,6 +1268,8 @@ int __sock_create(struct net *net, int family, int type, int protocol,
25009 +@@ -1263,6 +1266,8 @@ int __sock_create(struct net *net, int family, int type, int protocol,
25010 return -EAFNOSUPPORT;
25011 if (type < 0 || type >= SOCK_MAX)
25012 return -EINVAL;
25013 @@ -107263,7 +105499,7 @@ index 4cdbc10..f075204 100644
25014
25015 /* Compatibility.
25016
25017 -@@ -1285,6 +1290,20 @@ int __sock_create(struct net *net, int family, int type, int protocol,
25018 +@@ -1283,6 +1288,20 @@ int __sock_create(struct net *net, int family, int type, int protocol,
25019 if (err)
25020 return err;
25021
25022 @@ -107284,7 +105520,7 @@ index 4cdbc10..f075204 100644
25023 /*
25024 * Allocate the socket and allow the family to set things up. if
25025 * the protocol is 0, the family is instructed to select an appropriate
25026 -@@ -1536,6 +1555,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
25027 +@@ -1534,6 +1553,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
25028 if (sock) {
25029 err = move_addr_to_kernel(umyaddr, addrlen, &address);
25030 if (err >= 0) {
25031 @@ -107299,7 +105535,7 @@ index 4cdbc10..f075204 100644
25032 err = security_socket_bind(sock,
25033 (struct sockaddr *)&address,
25034 addrlen);
25035 -@@ -1544,6 +1571,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
25036 +@@ -1542,6 +1569,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
25037 (struct sockaddr *)
25038 &address, addrlen);
25039 }
25040 @@ -107307,7 +105543,7 @@ index 4cdbc10..f075204 100644
25041 fput_light(sock->file, fput_needed);
25042 }
25043 return err;
25044 -@@ -1567,10 +1595,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, backlog)
25045 +@@ -1565,10 +1593,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, backlog)
25046 if ((unsigned int)backlog > somaxconn)
25047 backlog = somaxconn;
25048
25049 @@ -107328,7 +105564,7 @@ index 4cdbc10..f075204 100644
25050 fput_light(sock->file, fput_needed);
25051 }
25052 return err;
25053 -@@ -1614,6 +1652,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
25054 +@@ -1612,6 +1650,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
25055 newsock->type = sock->type;
25056 newsock->ops = sock->ops;
25057
25058 @@ -107347,7 +105583,7 @@ index 4cdbc10..f075204 100644
25059 /*
25060 * We don't need try_module_get here, as the listening socket (sock)
25061 * has the protocol module (sock->ops->owner) held.
25062 -@@ -1659,6 +1709,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
25063 +@@ -1657,6 +1707,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
25064 fd_install(newfd, newfile);
25065 err = newfd;
25066
25067 @@ -107356,7 +105592,7 @@ index 4cdbc10..f075204 100644
25068 out_put:
25069 fput_light(sock->file, fput_needed);
25070 out:
25071 -@@ -1691,6 +1743,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
25072 +@@ -1689,6 +1741,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
25073 int, addrlen)
25074 {
25075 struct socket *sock;
25076 @@ -107364,7 +105600,7 @@ index 4cdbc10..f075204 100644
25077 struct sockaddr_storage address;
25078 int err, fput_needed;
25079
25080 -@@ -1701,6 +1754,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
25081 +@@ -1699,6 +1752,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
25082 if (err < 0)
25083 goto out_put;
25084
25085 @@ -107382,7 +105618,7 @@ index 4cdbc10..f075204 100644
25086 err =
25087 security_socket_connect(sock, (struct sockaddr *)&address, addrlen);
25088 if (err)
25089 -@@ -1782,6 +1846,8 @@ SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr,
25090 +@@ -1780,6 +1844,8 @@ SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr,
25091 * the protocol.
25092 */
25093
25094 @@ -107391,7 +105627,7 @@ index 4cdbc10..f075204 100644
25095 SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len,
25096 unsigned int, flags, struct sockaddr __user *, addr,
25097 int, addr_len)
25098 -@@ -1848,7 +1914,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
25099 +@@ -1846,7 +1912,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
25100 struct socket *sock;
25101 struct iovec iov;
25102 struct msghdr msg;
25103 @@ -107400,7 +105636,7 @@ index 4cdbc10..f075204 100644
25104 int err, err2;
25105 int fput_needed;
25106
25107 -@@ -2077,7 +2143,7 @@ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg,
25108 +@@ -2075,7 +2141,7 @@ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg,
25109 * checking falls down on this.
25110 */
25111 if (copy_from_user(ctl_buf,
25112 @@ -107409,7 +105645,7 @@ index 4cdbc10..f075204 100644
25113 ctl_len))
25114 goto out_freectl;
25115 msg_sys->msg_control = ctl_buf;
25116 -@@ -2228,7 +2294,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
25117 +@@ -2226,7 +2292,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
25118 int err, total_len, len;
25119
25120 /* kernel mode address */
25121 @@ -107418,7 +105654,7 @@ index 4cdbc10..f075204 100644
25122
25123 /* user mode address pointers */
25124 struct sockaddr __user *uaddr;
25125 -@@ -2257,7 +2323,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
25126 +@@ -2255,7 +2321,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
25127 /* Save the user-mode address (verify_iovec will change the
25128 * kernel msghdr to use the kernel address space)
25129 */
25130 @@ -107427,7 +105663,7 @@ index 4cdbc10..f075204 100644
25131 uaddr_len = COMPAT_NAMELEN(msg);
25132 if (MSG_CMSG_COMPAT & flags)
25133 err = verify_compat_iovec(msg_sys, iov, &addr, VERIFY_WRITE);
25134 -@@ -2898,7 +2964,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
25135 +@@ -2896,7 +2962,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
25136 ifr = compat_alloc_user_space(buf_size);
25137 rxnfc = (void __user *)ifr + ALIGN(sizeof(struct ifreq), 8);
25138
25139 @@ -107436,7 +105672,7 @@ index 4cdbc10..f075204 100644
25140 return -EFAULT;
25141
25142 if (put_user(convert_in ? rxnfc : compat_ptr(data),
25143 -@@ -3009,7 +3075,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
25144 +@@ -3007,7 +3073,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
25145 old_fs = get_fs();
25146 set_fs(KERNEL_DS);
25147 err = dev_ioctl(net, cmd,
25148 @@ -107445,7 +105681,7 @@ index 4cdbc10..f075204 100644
25149 set_fs(old_fs);
25150
25151 return err;
25152 -@@ -3102,7 +3168,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd,
25153 +@@ -3100,7 +3166,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd,
25154
25155 old_fs = get_fs();
25156 set_fs(KERNEL_DS);
25157 @@ -107454,7 +105690,7 @@ index 4cdbc10..f075204 100644
25158 set_fs(old_fs);
25159
25160 if (cmd == SIOCGIFMAP && !err) {
25161 -@@ -3186,7 +3252,7 @@ static int routing_ioctl(struct net *net, struct socket *sock,
25162 +@@ -3184,7 +3250,7 @@ static int routing_ioctl(struct net *net, struct socket *sock,
25163 ret |= get_user(rtdev, &(ur4->rt_dev));
25164 if (rtdev) {
25165 ret |= copy_from_user(devname, compat_ptr(rtdev), 15);
25166 @@ -107463,7 +105699,7 @@ index 4cdbc10..f075204 100644
25167 devname[15] = 0;
25168 } else
25169 r4.rt_dev = NULL;
25170 -@@ -3413,8 +3479,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname,
25171 +@@ -3411,8 +3477,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname,
25172 int __user *uoptlen;
25173 int err;
25174
25175 @@ -107474,7 +105710,7 @@ index 4cdbc10..f075204 100644
25176
25177 set_fs(KERNEL_DS);
25178 if (level == SOL_SOCKET)
25179 -@@ -3434,7 +3500,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname,
25180 +@@ -3432,7 +3498,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname,
25181 char __user *uoptval;
25182 int err;
25183
25184 @@ -107519,7 +105755,7 @@ index 0663621..c4928d4 100644
25185 goto out_nomem;
25186 cd->u.procfs.channel_ent = NULL;
25187 diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
25188 -index e0b94ce..6135813 100644
25189 +index 9acd6ce..4353a72 100644
25190 --- a/net/sunrpc/clnt.c
25191 +++ b/net/sunrpc/clnt.c
25192 @@ -1428,7 +1428,9 @@ call_start(struct rpc_task *task)
25193 @@ -107534,7 +105770,7 @@ index e0b94ce..6135813 100644
25194 task->tk_action = call_reserve;
25195 }
25196 diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
25197 -index 9358c79..22d0a5b 100644
25198 +index fe3441a..922c29e 100644
25199 --- a/net/sunrpc/sched.c
25200 +++ b/net/sunrpc/sched.c
25201 @@ -261,9 +261,9 @@ static int rpc_wait_bit_killable(struct wait_bit_key *key)
25202 @@ -107563,10 +105799,10 @@ index 5453049..465669a 100644
25203 return -ENOMEM;
25204
25205 diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
25206 -index 1db5007..6e66296 100644
25207 +index ca8a795..ddfc41b 100644
25208 --- a/net/sunrpc/svc.c
25209 +++ b/net/sunrpc/svc.c
25210 -@@ -1167,7 +1167,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
25211 +@@ -1165,7 +1165,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
25212 svc_putnl(resv, RPC_SUCCESS);
25213
25214 /* Bump per-procedure stats counter */
25215 @@ -107764,7 +106000,7 @@ index 9f1b506..2e0b321 100644
25216 goto err;
25217 return write_len - bc;
25218 diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
25219 -index 374feb4..46487d5 100644
25220 +index 4e61880..1f0d963 100644
25221 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
25222 +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
25223 @@ -295,7 +295,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
25224 @@ -107826,10 +106062,10 @@ index e7000be..e3b0ba7 100644
25225 int mode = (table->mode >> 6) & 7;
25226 return (mode << 6) | (mode << 3) | mode;
25227 diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
25228 -index 6424372..afd36e9 100644
25229 +index 31b5cb2..566ff01 100644
25230 --- a/net/tipc/subscr.c
25231 +++ b/net/tipc/subscr.c
25232 -@@ -97,7 +97,7 @@ static void subscr_send_event(struct tipc_subscription *sub, u32 found_lower,
25233 +@@ -96,7 +96,7 @@ static void subscr_send_event(struct tipc_subscription *sub, u32 found_lower,
25234 struct tipc_subscriber *subscriber = sub->subscriber;
25235 struct kvec msg_sect;
25236
25237 @@ -108070,21 +106306,8 @@ index 0917f04..f4e3d8c 100644
25238 return -ENOMEM;
25239
25240 if (!proc_create("x25/route", S_IRUGO, init_net.proc_net,
25241 -diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
25242 -index c51e8f7b..e44f360 100644
25243 ---- a/net/xfrm/xfrm_output.c
25244 -+++ b/net/xfrm/xfrm_output.c
25245 -@@ -157,6 +157,8 @@ static int xfrm_output_gso(struct sk_buff *skb)
25246 - kfree_skb(skb);
25247 - if (IS_ERR(segs))
25248 - return PTR_ERR(segs);
25249 -+ if (segs == NULL)
25250 -+ return -EINVAL;
25251 -
25252 - do {
25253 - struct sk_buff *nskb = segs->next;
25254 diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
25255 -index fdde51f..4839450 100644
25256 +index 88bf289..7b0741b 100644
25257 --- a/net/xfrm/xfrm_policy.c
25258 +++ b/net/xfrm/xfrm_policy.c
25259 @@ -330,7 +330,7 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
25260 @@ -108096,7 +106319,7 @@ index fdde51f..4839450 100644
25261
25262 if (del_timer(&policy->polq.hold_timer))
25263 xfrm_pol_put(policy);
25264 -@@ -664,7 +664,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
25265 +@@ -781,7 +781,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
25266 hlist_add_head(&policy->bydst, chain);
25267 xfrm_pol_hold(policy);
25268 net->xfrm.policy_count[dir]++;
25269 @@ -108105,7 +106328,7 @@ index fdde51f..4839450 100644
25270
25271 /* After previous checking, family can either be AF_INET or AF_INET6 */
25272 if (policy->family == AF_INET)
25273 -@@ -1754,7 +1754,7 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
25274 +@@ -1871,7 +1871,7 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
25275
25276 xdst->num_pols = num_pols;
25277 memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols);
25278 @@ -108114,7 +106337,7 @@ index fdde51f..4839450 100644
25279
25280 return xdst;
25281 }
25282 -@@ -2570,10 +2570,11 @@ void xfrm_garbage_collect(struct net *net)
25283 +@@ -2685,10 +2685,11 @@ void xfrm_garbage_collect(struct net *net)
25284 }
25285 EXPORT_SYMBOL(xfrm_garbage_collect);
25286
25287 @@ -108127,7 +106350,7 @@ index fdde51f..4839450 100644
25288
25289 static void xfrm_init_pmtu(struct dst_entry *dst)
25290 {
25291 -@@ -2623,7 +2624,7 @@ static int xfrm_bundle_ok(struct xfrm_dst *first)
25292 +@@ -2738,7 +2739,7 @@ static int xfrm_bundle_ok(struct xfrm_dst *first)
25293 if (xdst->xfrm_genid != dst->xfrm->genid)
25294 return 0;
25295 if (xdst->num_pols > 0 &&
25296 @@ -108136,7 +106359,7 @@ index fdde51f..4839450 100644
25297 return 0;
25298
25299 mtu = dst_mtu(dst->child);
25300 -@@ -2711,8 +2712,6 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo)
25301 +@@ -2826,8 +2827,6 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo)
25302 dst_ops->link_failure = xfrm_link_failure;
25303 if (likely(dst_ops->neigh_lookup == NULL))
25304 dst_ops->neigh_lookup = xfrm_neigh_lookup;
25305 @@ -108145,7 +106368,7 @@ index fdde51f..4839450 100644
25306 rcu_assign_pointer(xfrm_policy_afinfo[afinfo->family], afinfo);
25307 }
25308 spin_unlock(&xfrm_policy_afinfo_lock);
25309 -@@ -2766,7 +2765,6 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo)
25310 +@@ -2881,7 +2880,6 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo)
25311 dst_ops->check = NULL;
25312 dst_ops->negative_advice = NULL;
25313 dst_ops->link_failure = NULL;
25314 @@ -108153,7 +106376,7 @@ index fdde51f..4839450 100644
25315 }
25316 return err;
25317 }
25318 -@@ -3151,7 +3149,7 @@ static int xfrm_policy_migrate(struct xfrm_policy *pol,
25319 +@@ -3277,7 +3275,7 @@ static int xfrm_policy_migrate(struct xfrm_policy *pol,
25320 sizeof(pol->xfrm_vec[i].saddr));
25321 pol->xfrm_vec[i].encap_family = mp->new_family;
25322 /* flush bundles */
25323 @@ -108163,10 +106386,10 @@ index fdde51f..4839450 100644
25324 }
25325
25326 diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
25327 -index 0ab5413..73dd2cf 100644
25328 +index de971b6..b843409 100644
25329 --- a/net/xfrm/xfrm_state.c
25330 +++ b/net/xfrm/xfrm_state.c
25331 -@@ -173,12 +173,14 @@ int xfrm_register_type(const struct xfrm_type *type, unsigned short family)
25332 +@@ -166,12 +166,14 @@ int xfrm_register_type(const struct xfrm_type *type, unsigned short family)
25333
25334 if (unlikely(afinfo == NULL))
25335 return -EAFNOSUPPORT;
25336 @@ -108184,7 +106407,7 @@ index 0ab5413..73dd2cf 100644
25337 err = -EEXIST;
25338 spin_unlock_bh(&xfrm_type_lock);
25339 xfrm_state_put_afinfo(afinfo);
25340 -@@ -194,13 +196,16 @@ int xfrm_unregister_type(const struct xfrm_type *type, unsigned short family)
25341 +@@ -187,13 +189,16 @@ int xfrm_unregister_type(const struct xfrm_type *type, unsigned short family)
25342
25343 if (unlikely(afinfo == NULL))
25344 return -EAFNOSUPPORT;
25345 @@ -108203,7 +106426,7 @@ index 0ab5413..73dd2cf 100644
25346 spin_unlock_bh(&xfrm_type_lock);
25347 xfrm_state_put_afinfo(afinfo);
25348 return err;
25349 -@@ -210,7 +215,6 @@ EXPORT_SYMBOL(xfrm_unregister_type);
25350 +@@ -203,7 +208,6 @@ EXPORT_SYMBOL(xfrm_unregister_type);
25351 static const struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family)
25352 {
25353 struct xfrm_state_afinfo *afinfo;
25354 @@ -108211,7 +106434,7 @@ index 0ab5413..73dd2cf 100644
25355 const struct xfrm_type *type;
25356 int modload_attempted = 0;
25357
25358 -@@ -218,9 +222,8 @@ retry:
25359 +@@ -211,9 +215,8 @@ retry:
25360 afinfo = xfrm_state_get_afinfo(family);
25361 if (unlikely(afinfo == NULL))
25362 return NULL;
25363 @@ -108222,7 +106445,7 @@ index 0ab5413..73dd2cf 100644
25364 if (unlikely(type && !try_module_get(type->owner)))
25365 type = NULL;
25366 if (!type && !modload_attempted) {
25367 -@@ -254,7 +257,7 @@ int xfrm_register_mode(struct xfrm_mode *mode, int family)
25368 +@@ -247,7 +250,7 @@ int xfrm_register_mode(struct xfrm_mode *mode, int family)
25369 return -EAFNOSUPPORT;
25370
25371 err = -EEXIST;
25372 @@ -108231,7 +106454,7 @@ index 0ab5413..73dd2cf 100644
25373 spin_lock_bh(&xfrm_mode_lock);
25374 if (modemap[mode->encap])
25375 goto out;
25376 -@@ -263,8 +266,10 @@ int xfrm_register_mode(struct xfrm_mode *mode, int family)
25377 +@@ -256,8 +259,10 @@ int xfrm_register_mode(struct xfrm_mode *mode, int family)
25378 if (!try_module_get(afinfo->owner))
25379 goto out;
25380
25381 @@ -108243,7 +106466,7 @@ index 0ab5413..73dd2cf 100644
25382 err = 0;
25383
25384 out:
25385 -@@ -288,10 +293,12 @@ int xfrm_unregister_mode(struct xfrm_mode *mode, int family)
25386 +@@ -281,10 +286,12 @@ int xfrm_unregister_mode(struct xfrm_mode *mode, int family)
25387 return -EAFNOSUPPORT;
25388
25389 err = -ENOENT;
25390 @@ -108257,7 +106480,7 @@ index 0ab5413..73dd2cf 100644
25391 module_put(mode->afinfo->owner);
25392 err = 0;
25393 }
25394 -@@ -1512,10 +1519,10 @@ EXPORT_SYMBOL(xfrm_find_acq_byseq);
25395 +@@ -1505,10 +1512,10 @@ EXPORT_SYMBOL(xfrm_find_acq_byseq);
25396 u32 xfrm_get_acqseq(void)
25397 {
25398 u32 res;
25399 @@ -108284,7 +106507,7 @@ index 05a6e3d..6716ec9 100644
25400 __xfrm_sysctl_init(net);
25401
25402 diff --git a/scripts/Makefile.build b/scripts/Makefile.build
25403 -index bf3e677..c7d426e 100644
25404 +index 649ce68..f6bc05c 100644
25405 --- a/scripts/Makefile.build
25406 +++ b/scripts/Makefile.build
25407 @@ -60,7 +60,7 @@ endif
25408 @@ -108297,10 +106520,10 @@ index bf3e677..c7d426e 100644
25409 endif
25410
25411 diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
25412 -index a651cee..6b3b9a3 100644
25413 +index b1c668d..638055f 100644
25414 --- a/scripts/Makefile.clean
25415 +++ b/scripts/Makefile.clean
25416 -@@ -43,7 +43,8 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
25417 +@@ -41,7 +41,8 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
25418 __clean-files := $(extra-y) $(extra-m) $(extra-) \
25419 $(always) $(targets) $(clean-files) \
25420 $(host-progs) \
25421 @@ -108311,7 +106534,7 @@ index a651cee..6b3b9a3 100644
25422 __clean-files := $(filter-out $(no-clean-files), $(__clean-files))
25423
25424 diff --git a/scripts/Makefile.host b/scripts/Makefile.host
25425 -index ab5980f..85fd3e1 100644
25426 +index 133edfa..c9aa07f 100644
25427 --- a/scripts/Makefile.host
25428 +++ b/scripts/Makefile.host
25429 @@ -20,7 +20,19 @@
25430 @@ -108365,25 +106588,7 @@ index ab5980f..85fd3e1 100644
25431 host-objdirs := $(addprefix $(obj)/,$(host-objdirs))
25432
25433 obj-dirs += $(host-objdirs)
25434 -@@ -96,7 +125,7 @@ quiet_cmd_host-cmulti = HOSTLD $@
25435 - cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \
25436 - $(addprefix $(obj)/,$($(@F)-objs)) \
25437 - $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
25438 --$(host-cmulti): $(obj)/%: $(host-cobjs) FORCE
25439 -+$(host-cmulti): $(obj)/%: $(host-cobjs) $(host-cshlib) FORCE
25440 - $(call if_changed,host-cmulti)
25441 -
25442 - # Create .o file from a single .c file
25443 -@@ -113,7 +142,7 @@ quiet_cmd_host-cxxmulti = HOSTLD $@
25444 - $(foreach o,objs cxxobjs,\
25445 - $(addprefix $(obj)/,$($(@F)-$(o)))) \
25446 - $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
25447 --$(host-cxxmulti): $(obj)/%: $(host-cobjs) $(host-cxxobjs) FORCE
25448 -+$(host-cxxmulti): $(obj)/%: $(host-cobjs) $(host-cxxobjs) $(host-cshlib) FORCE
25449 - $(call if_changed,host-cxxmulti)
25450 -
25451 - # Create .o file from a single .cc (C++) file
25452 -@@ -122,5 +151,37 @@ quiet_cmd_host-cxxobjs = HOSTCXX $@
25453 +@@ -124,5 +153,37 @@ quiet_cmd_host-cxxobjs = HOSTCXX $@
25454 $(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE
25455 $(call if_changed_dep,host-cxxobjs)
25456
25457 @@ -108527,7 +106732,7 @@ index 0000000..42018ed
25458 +fi
25459 +exit 1
25460 diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
25461 -index 5de5660..d3deb89 100644
25462 +index fdebd66..a349e33 100755
25463 --- a/scripts/headers_install.sh
25464 +++ b/scripts/headers_install.sh
25465 @@ -32,6 +32,7 @@ do
25466 @@ -108539,7 +106744,7 @@ index 5de5660..d3deb89 100644
25467 -e 's@^#include <linux/compiler.h>@@' \
25468 -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \
25469 diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
25470 -index 86a4fe7..99e91f9 100644
25471 +index 86a4fe7..99e91f9 100755
25472 --- a/scripts/link-vmlinux.sh
25473 +++ b/scripts/link-vmlinux.sh
25474 @@ -166,7 +166,7 @@ else
25475 @@ -108619,10 +106824,10 @@ index e614ef6..d9d2b01 100644
25476 sprintf(alias, "dmi*");
25477
25478 diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
25479 -index 091d905..77b88c7 100644
25480 +index d439856..10c1eac 100644
25481 --- a/scripts/mod/modpost.c
25482 +++ b/scripts/mod/modpost.c
25483 -@@ -920,6 +920,7 @@ enum mismatch {
25484 +@@ -921,6 +921,7 @@ enum mismatch {
25485 ANY_INIT_TO_ANY_EXIT,
25486 ANY_EXIT_TO_ANY_INIT,
25487 EXPORT_TO_INIT_EXIT,
25488 @@ -108630,7 +106835,7 @@ index 091d905..77b88c7 100644
25489 };
25490
25491 struct sectioncheck {
25492 -@@ -1006,6 +1007,12 @@ const struct sectioncheck sectioncheck[] = {
25493 +@@ -1007,6 +1008,12 @@ static const struct sectioncheck sectioncheck[] = {
25494 .tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
25495 .mismatch = EXPORT_TO_INIT_EXIT,
25496 .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
25497 @@ -108643,7 +106848,7 @@ index 091d905..77b88c7 100644
25498 }
25499 };
25500
25501 -@@ -1126,10 +1133,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
25502 +@@ -1127,10 +1134,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
25503 continue;
25504 if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
25505 continue;
25506 @@ -108656,7 +106861,7 @@ index 091d905..77b88c7 100644
25507 if (d < 0)
25508 d = addr - sym->st_value;
25509 if (d < distance) {
25510 -@@ -1407,6 +1414,14 @@ static void report_sec_mismatch(const char *modname,
25511 +@@ -1408,6 +1415,14 @@ static void report_sec_mismatch(const char *modname,
25512 tosym, prl_to, prl_to, tosym);
25513 free(prl_to);
25514 break;
25515 @@ -108671,7 +106876,7 @@ index 091d905..77b88c7 100644
25516 }
25517 fprintf(stderr, "\n");
25518 }
25519 -@@ -1658,7 +1673,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
25520 +@@ -1659,7 +1674,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
25521 static void check_sec_ref(struct module *mod, const char *modname,
25522 struct elf_info *elf)
25523 {
25524 @@ -108680,7 +106885,7 @@ index 091d905..77b88c7 100644
25525 Elf_Shdr *sechdrs = elf->sechdrs;
25526
25527 /* Walk through all sections */
25528 -@@ -1789,7 +1804,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
25529 +@@ -1790,7 +1805,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
25530 va_end(ap);
25531 }
25532
25533 @@ -108689,7 +106894,7 @@ index 091d905..77b88c7 100644
25534 {
25535 if (buf->size - buf->pos < len) {
25536 buf->size += len + SZ;
25537 -@@ -2008,7 +2023,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
25538 +@@ -2009,7 +2024,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
25539 if (fstat(fileno(file), &st) < 0)
25540 goto close_write;
25541
25542 @@ -108763,7 +106968,7 @@ index 99ca6e7..3a1a1a1 100644
25543 rm -f $(objtree)/.scmversion
25544 $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
25545 diff --git a/scripts/package/builddeb b/scripts/package/builddeb
25546 -index 7c0e6e4..bf2c90e 100644
25547 +index 5972624..4028795 100755
25548 --- a/scripts/package/builddeb
25549 +++ b/scripts/package/builddeb
25550 @@ -293,6 +293,7 @@ fi
25551 @@ -108775,10 +106980,10 @@ index 7c0e6e4..bf2c90e 100644
25552 mkdir -p "$destdir"
25553 (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
25554 diff --git a/scripts/package/mkspec b/scripts/package/mkspec
25555 -index 1395760..6ceef68 100755
25556 +index 1395760..bca2734 100755
25557 --- a/scripts/package/mkspec
25558 +++ b/scripts/package/mkspec
25559 -@@ -121,14 +121,27 @@ echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
25560 +@@ -121,29 +121,40 @@ echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
25561 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
25562 echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\""
25563 echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
25564 @@ -108807,9 +107012,16 @@ index 1395760..6ceef68 100755
25565 +echo "ln -sf /usr/src/kernels/$KERNELRELEASE /lib/modules/$KERNELRELEASE/source"
25566 +echo ""
25567 echo "%post"
25568 - echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
25569 - echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm"
25570 -@@ -139,11 +152,11 @@ echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm
25571 +-echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
25572 +-echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm"
25573 +-echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm"
25574 +-echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE"
25575 +-echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
25576 +-echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
25577 ++echo "if [ -x /sbin/dracut ]; then"
25578 ++echo '/sbin/new-kernel-pkg --dracut --mkinitrd --depmod --install --make-default '"$KERNELRELEASE"' || exit $?'
25579 ++echo "else"
25580 ++echo '/sbin/new-kernel-pkg --mkinitrd --depmod --install --make-default '"$KERNELRELEASE"' || exit $?'
25581 echo "fi"
25582 echo ""
25583 echo "%files"
25584 @@ -108823,7 +107035,7 @@ index 1395760..6ceef68 100755
25585 echo "/lib/firmware/$KERNELRELEASE"
25586 echo "/boot/*"
25587 echo ""
25588 -@@ -152,8 +165,7 @@ echo '%defattr (-, root, root)'
25589 +@@ -152,8 +163,7 @@ echo '%defattr (-, root, root)'
25590 echo "/usr/include"
25591 echo ""
25592 echo "%files devel"
25593 @@ -108865,7 +107077,7 @@ index 4718d78..9220d58 100644
25594 write_hex_cnt = 0;
25595 for (i = 0; i < logo_clutsize; i++) {
25596 diff --git a/scripts/sortextable.h b/scripts/sortextable.h
25597 -index 8fac3fd..32ff38d 100644
25598 +index ba87004..3f4852c 100644
25599 --- a/scripts/sortextable.h
25600 +++ b/scripts/sortextable.h
25601 @@ -108,9 +108,9 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort)
25602 @@ -108882,7 +107094,7 @@ index 8fac3fd..32ff38d 100644
25603 unsigned int secindex_strings;
25604
25605 diff --git a/scripts/tags.sh b/scripts/tags.sh
25606 -index 293828b..9fbe696 100755
25607 +index cdb491d..8d32bfc 100755
25608 --- a/scripts/tags.sh
25609 +++ b/scripts/tags.sh
25610 @@ -26,7 +26,7 @@ else
25611 @@ -109898,7 +108110,7 @@ index fdaa50c..2761dcb 100644
25612 old_dentry->d_inode->i_uid,
25613 old_dentry->d_inode->i_mode
25614 diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
25615 -index 9981000..eb21356 100644
25616 +index 65ca451..ad6f22d 100644
25617 --- a/security/apparmor/lsm.c
25618 +++ b/security/apparmor/lsm.c
25619 @@ -186,7 +186,7 @@ static int common_perm_dir_dentry(int op, struct path *dir,
25620 @@ -109987,10 +108199,10 @@ index bab0611..f9a0ff5 100644
25621 if (bprm->cap_effective)
25622 return 1;
25623 diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
25624 -index 0fb456c..83711f9 100644
25625 +index 8ee997d..24c174b 100644
25626 --- a/security/integrity/ima/ima.h
25627 +++ b/security/integrity/ima/ima.h
25628 -@@ -118,8 +118,8 @@ int ima_init_template(void);
25629 +@@ -116,8 +116,8 @@ int ima_init_template(void);
25630 extern spinlock_t ima_queue_lock;
25631
25632 struct ima_h_table {
25633 @@ -110002,7 +108214,7 @@ index 0fb456c..83711f9 100644
25634 };
25635 extern struct ima_h_table ima_htable;
25636 diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
25637 -index d9cd5ce..c5c29ac 100644
25638 +index 8688597..9fa80d2 100644
25639 --- a/security/integrity/ima/ima_api.c
25640 +++ b/security/integrity/ima/ima_api.c
25641 @@ -137,7 +137,7 @@ void ima_add_violation(struct file *file, const unsigned char *filename,
25642 @@ -110060,7 +108272,7 @@ index 3478965..ec7bb9e 100644
25643 if (iov != iovstack)
25644 kfree(iov);
25645 diff --git a/security/keys/internal.h b/security/keys/internal.h
25646 -index 5f20da0..444ccf1 100644
25647 +index 200e378..cdc74b5 100644
25648 --- a/security/keys/internal.h
25649 +++ b/security/keys/internal.h
25650 @@ -244,7 +244,7 @@ extern long keyctl_instantiate_key_iov(key_serial_t,
25651 @@ -110073,7 +108285,7 @@ index 5f20da0..444ccf1 100644
25652 #ifdef CONFIG_PERSISTENT_KEYRINGS
25653 extern long keyctl_get_persistent(uid_t, key_serial_t);
25654 diff --git a/security/keys/key.c b/security/keys/key.c
25655 -index 6d0cad1..8f957df 100644
25656 +index e17ba6a..2cc04a6 100644
25657 --- a/security/keys/key.c
25658 +++ b/security/keys/key.c
25659 @@ -285,7 +285,7 @@ struct key *key_alloc(struct key_type *type, const char *desc,
25660 @@ -110130,10 +108342,10 @@ index 6d0cad1..8f957df 100644
25661 /* record the root user tracking */
25662 rb_link_node(&root_key_user.node,
25663 diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
25664 -index eff88a5..51d35ef 100644
25665 +index 4743d71..170a185 100644
25666 --- a/security/keys/keyctl.c
25667 +++ b/security/keys/keyctl.c
25668 -@@ -1004,7 +1004,7 @@ static int keyctl_change_reqkey_auth(struct key *key)
25669 +@@ -1000,7 +1000,7 @@ static int keyctl_change_reqkey_auth(struct key *key)
25670 /*
25671 * Copy the iovec data from userspace
25672 */
25673 @@ -110142,7 +108354,7 @@ index eff88a5..51d35ef 100644
25674 unsigned ioc)
25675 {
25676 for (; ioc > 0; ioc--) {
25677 -@@ -1026,7 +1026,7 @@ static long copy_from_user_iovec(void *buffer, const struct iovec *iov,
25678 +@@ -1022,7 +1022,7 @@ static long copy_from_user_iovec(void *buffer, const struct iovec *iov,
25679 * If successful, 0 will be returned.
25680 */
25681 long keyctl_instantiate_key_common(key_serial_t id,
25682 @@ -110151,7 +108363,7 @@ index eff88a5..51d35ef 100644
25683 unsigned ioc,
25684 size_t plen,
25685 key_serial_t ringid)
25686 -@@ -1121,7 +1121,7 @@ long keyctl_instantiate_key(key_serial_t id,
25687 +@@ -1117,7 +1117,7 @@ long keyctl_instantiate_key(key_serial_t id,
25688 [0].iov_len = plen
25689 };
25690
25691 @@ -110160,7 +108372,7 @@ index eff88a5..51d35ef 100644
25692 }
25693
25694 return keyctl_instantiate_key_common(id, NULL, 0, 0, ringid);
25695 -@@ -1154,7 +1154,7 @@ long keyctl_instantiate_key_iov(key_serial_t id,
25696 +@@ -1150,7 +1150,7 @@ long keyctl_instantiate_key_iov(key_serial_t id,
25697 if (ret == 0)
25698 goto no_payload_free;
25699
25700 @@ -110190,7 +108402,7 @@ index f728728..6457a0c 100644
25701
25702 /*
25703 diff --git a/security/security.c b/security/security.c
25704 -index e41b1a8..b66a558 100644
25705 +index 18b35c6..c9fbc92 100644
25706 --- a/security/security.c
25707 +++ b/security/security.c
25708 @@ -33,8 +33,8 @@
25709 @@ -110248,7 +108460,7 @@ index a18f1fa..c9b9fc4 100644
25710 lock = &avc_cache.slots_lock[hvalue];
25711
25712 diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
25713 -index e03bad5..b15da09 100644
25714 +index c603b20..8716ec9 100644
25715 --- a/security/selinux/hooks.c
25716 +++ b/security/selinux/hooks.c
25717 @@ -95,8 +95,6 @@
25718 @@ -110260,7 +108472,7 @@ index e03bad5..b15da09 100644
25719 /* SECMARK reference count */
25720 static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);
25721
25722 -@@ -5772,7 +5770,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer)
25723 +@@ -5809,7 +5807,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer)
25724
25725 #endif
25726
25727 @@ -110269,7 +108481,7 @@ index e03bad5..b15da09 100644
25728 .name = "selinux",
25729
25730 .ptrace_access_check = selinux_ptrace_access_check,
25731 -@@ -6128,6 +6126,9 @@ static void selinux_nf_ip_exit(void)
25732 +@@ -6150,6 +6148,9 @@ static void selinux_nf_ip_exit(void)
25733 #ifdef CONFIG_SECURITY_SELINUX_DISABLE
25734 static int selinux_disabled;
25735
25736 @@ -110279,7 +108491,7 @@ index e03bad5..b15da09 100644
25737 int selinux_disable(void)
25738 {
25739 if (ss_initialized) {
25740 -@@ -6145,7 +6146,9 @@ int selinux_disable(void)
25741 +@@ -6167,7 +6168,9 @@ int selinux_disable(void)
25742 selinux_disabled = 1;
25743 selinux_enabled = 0;
25744
25745 @@ -110304,10 +108516,10 @@ index 1450f85..a91e0bc 100644
25746 }
25747 rtnl_unlock();
25748 diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
25749 -index e6ab307..2008c98 100644
25750 +index d515ec2..8a4ca71 100644
25751 --- a/security/smack/smack_lsm.c
25752 +++ b/security/smack/smack_lsm.c
25753 -@@ -3849,7 +3849,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen)
25754 +@@ -4079,7 +4079,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen)
25755 return 0;
25756 }
25757
25758 @@ -110675,10 +108887,10 @@ index 2d957ba..fda022c 100644
25759 if (err < 0)
25760 return err;
25761 diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
25762 -index a95356f..0f5eabf 100644
25763 +index 166d59c..89e3889 100644
25764 --- a/sound/core/pcm_native.c
25765 +++ b/sound/core/pcm_native.c
25766 -@@ -2815,11 +2815,11 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
25767 +@@ -2931,11 +2931,11 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
25768 switch (substream->stream) {
25769 case SNDRV_PCM_STREAM_PLAYBACK:
25770 result = snd_pcm_playback_ioctl1(NULL, substream, cmd,
25771 @@ -111102,7 +109314,7 @@ index 4c41c90..37f3631 100644
25772 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, &ops,
25773 sizeof(struct snd_emu10k1_synth_arg));
25774 diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
25775 -index ec6a7d0..4e578f7 100644
25776 +index 15e0089..ad6bc9b 100644
25777 --- a/sound/pci/hda/hda_codec.c
25778 +++ b/sound/pci/hda/hda_codec.c
25779 @@ -966,14 +966,10 @@ find_codec_preset(struct hda_codec *codec)
25780 @@ -111122,7 +109334,7 @@ index ec6a7d0..4e578f7 100644
25781 mod_requested++;
25782 goto again;
25783 }
25784 -@@ -2780,7 +2776,7 @@ static int get_kctl_0dB_offset(struct hda_codec *codec,
25785 +@@ -2800,7 +2796,7 @@ static int get_kctl_0dB_offset(struct hda_codec *codec,
25786 /* FIXME: set_fs() hack for obtaining user-space TLV data */
25787 mm_segment_t fs = get_fs();
25788 set_fs(get_ds());
25789 @@ -111189,10 +109401,10 @@ index 81c916a..516f0bf 100644
25790 chip->pci = pci;
25791 chip->irq = -1;
25792 diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
25793 -index a3e0a0d..ab98399 100644
25794 +index b60ff56..7307f0f 100644
25795 --- a/sound/soc/soc-core.c
25796 +++ b/sound/soc/soc-core.c
25797 -@@ -2286,8 +2286,10 @@ int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
25798 +@@ -2132,8 +2132,10 @@ int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
25799 if (ret)
25800 return ret;
25801
25802 @@ -119000,10 +117212,10 @@ index 0000000..4378111
25803 +}
25804 diff --git a/tools/gcc/size_overflow_plugin/size_overflow_hash.data b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
25805 new file mode 100644
25806 -index 0000000..9addbd7
25807 +index 0000000..367aa34
25808 --- /dev/null
25809 +++ b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
25810 -@@ -0,0 +1,5912 @@
25811 +@@ -0,0 +1,6028 @@
25812 +intel_fake_agp_alloc_by_type_1 intel_fake_agp_alloc_by_type 1 1 NULL
25813 +storvsc_connect_to_vsp_22 storvsc_connect_to_vsp 2 22 NULL
25814 +compat_sock_setsockopt_23 compat_sock_setsockopt 5 23 NULL
25815 @@ -119025,6 +117237,7 @@ index 0000000..9addbd7
25816 +iscsi_session_setup_196 iscsi_session_setup 4-5 196 NULL
25817 +obd_proc_jobid_var_seq_write_199 obd_proc_jobid_var_seq_write 3 199 NULL
25818 +ll_xattr_cache_seq_write_250 ll_xattr_cache_seq_write 3 250 NULL
25819 ++vpdma_create_desc_list_255 vpdma_create_desc_list 2 255 NULL
25820 +br_port_info_size_268 br_port_info_size 0 268 NULL
25821 +read_file_war_stats_292 read_file_war_stats 3 292 NULL
25822 +SYSC_connect_304 SYSC_connect 3 304 NULL
25823 @@ -119038,6 +117251,7 @@ index 0000000..9addbd7
25824 +nvme_trans_modesel_data_488 nvme_trans_modesel_data 4 488 NULL
25825 +iwl_dbgfs_protection_mode_write_502 iwl_dbgfs_protection_mode_write 3 502 NULL
25826 +rx_rx_defrag_end_read_505 rx_rx_defrag_end_read 3 505 NULL
25827 ++smp_send_cmd_512 smp_send_cmd 3 512 NULL
25828 +ocfs2_validate_meta_ecc_bhs_527 ocfs2_validate_meta_ecc_bhs 0 527 NULL
25829 +zlib_deflate_workspacesize_537 zlib_deflate_workspacesize 0-1-2 537 NULL
25830 +iwl_dbgfs_wowlan_sram_read_540 iwl_dbgfs_wowlan_sram_read 3 540 NULL
25831 @@ -119159,6 +117373,7 @@ index 0000000..9addbd7
25832 +nvif_object_sclass_1940 nvif_object_sclass 3 1940 &cyttsp_probe_1940
25833 +ieee80211_if_fmt_dot11MeshConfirmTimeout_1945 ieee80211_if_fmt_dot11MeshConfirmTimeout 3 1945 NULL
25834 +ivtv_v4l2_read_1964 ivtv_v4l2_read 3 1964 NULL
25835 ++qla2xxx_get_vpd_field_1965 qla2xxx_get_vpd_field 4 1965 NULL
25836 +sel_read_avc_hash_stats_1984 sel_read_avc_hash_stats 3 1984 NULL
25837 +gpio_power_write_1991 gpio_power_write 3 1991 NULL
25838 +__alloc_bootmem_node_1992 __alloc_bootmem_node 2 1992 NULL
25839 @@ -119193,6 +117408,7 @@ index 0000000..9addbd7
25840 +sel_write_avc_cache_threshold_2256 sel_write_avc_cache_threshold 3 2256 NULL
25841 +do_update_counters_2259 do_update_counters 4 2259 NULL
25842 +ath6kl_wmi_bssinfo_event_rx_2275 ath6kl_wmi_bssinfo_event_rx 3 2275 NULL
25843 ++vpdma_alloc_desc_buf_2278 vpdma_alloc_desc_buf 2 2278 NULL
25844 +debug_debug5_read_2291 debug_debug5_read 3 2291 NULL
25845 +sr_read_cmd_2299 sr_read_cmd 5 2299 NULL
25846 +kvm_clear_guest_page_2308 kvm_clear_guest_page 4 2308 NULL
25847 @@ -119230,6 +117446,7 @@ index 0000000..9addbd7
25848 +osc_build_ppga_2670 osc_build_ppga 2 2670 NULL
25849 +ffs_ep0_read_2672 ffs_ep0_read 3 2672 NULL
25850 +oti6858_write_2692 oti6858_write 4 2692 NULL
25851 ++copy_to_iter_iovec_2697 copy_to_iter_iovec 2 2697 NULL
25852 +nfc_llcp_send_ui_frame_2702 nfc_llcp_send_ui_frame 5 2702 NULL
25853 +memcpy_fromiovecend_2707 memcpy_fromiovecend 3-4 2707 NULL
25854 +lprocfs_stats_counter_size_2708 lprocfs_stats_counter_size 0 2708 NULL
25855 @@ -119274,6 +117491,7 @@ index 0000000..9addbd7
25856 +hfsplus_asc2uni_3071 hfsplus_asc2uni 0 3071 NULL nohasharray
25857 +dac960_user_command_proc_write_3071 dac960_user_command_proc_write 3 3071 &hfsplus_asc2uni_3071
25858 +read_file_antenna_diversity_3077 read_file_antenna_diversity 3 3077 NULL
25859 ++bio_integrity_intervals_3094 bio_integrity_intervals 0-2 3094 NULL
25860 +ttusb2_msg_3100 ttusb2_msg 4 3100 NULL
25861 +rb_alloc_3102 rb_alloc 1 3102 NULL
25862 +ufshcd_get_rsp_upiu_result_3114 ufshcd_get_rsp_upiu_result 0 3114 NULL
25863 @@ -119288,6 +117506,7 @@ index 0000000..9addbd7
25864 +compat_do_ip6t_set_ctl_3184 compat_do_ip6t_set_ctl 4 3184 NULL
25865 +mempool_create_node_3191 mempool_create_node 1 3191 NULL
25866 +alloc_context_3194 alloc_context 1 3194 NULL
25867 ++dma_init_coherent_memory_3197 dma_init_coherent_memory 3 3197 NULL
25868 +shmem_pread_slow_3198 shmem_pread_slow 3-2 3198 NULL
25869 +codec_reg_write_file_3204 codec_reg_write_file 3 3204 NULL
25870 +SyS_sendto_3219 SyS_sendto 6 3219 NULL
25871 @@ -119323,6 +117542,7 @@ index 0000000..9addbd7
25872 +mem_tx_free_mem_blks_read_3521 mem_tx_free_mem_blks_read 3 3521 NULL
25873 +SyS_semtimedop_3532 SyS_semtimedop 3 3532 NULL
25874 +SyS_readv_3539 SyS_readv 3 3539 NULL
25875 ++nouveau_fuse_create__3546 nouveau_fuse_create_ 4 3546 NULL
25876 +btrfs_dir_name_len_3549 btrfs_dir_name_len 0 3549 NULL
25877 +alloc_smp_resp_3566 alloc_smp_resp 1 3566 NULL
25878 +evtchn_read_3569 evtchn_read 3 3569 NULL
25879 @@ -119333,6 +117553,7 @@ index 0000000..9addbd7
25880 +edac_mc_alloc_3611 edac_mc_alloc 4 3611 NULL
25881 +tx_tx_starts_read_3617 tx_tx_starts_read 3 3617 NULL
25882 +aligned_kmalloc_3628 aligned_kmalloc 1 3628 NULL
25883 ++fm10k_alloc_q_vector_3638 fm10k_alloc_q_vector 4-6 3638 NULL
25884 +ath6kl_disconnect_timeout_read_3650 ath6kl_disconnect_timeout_read 3 3650 NULL
25885 +i915_compat_ioctl_3656 i915_compat_ioctl 2 3656 NULL
25886 +_iwl_dbgfs_tx_flush_write_3675 _iwl_dbgfs_tx_flush_write 3 3675 NULL
25887 @@ -119342,6 +117563,7 @@ index 0000000..9addbd7
25888 +sctp_setsockopt_auth_key_3793 sctp_setsockopt_auth_key 3 3793 NULL
25889 +ncp_file_write_3813 ncp_file_write 3 3813 NULL
25890 +llc_ui_recvmsg_3826 llc_ui_recvmsg 4 3826 NULL
25891 ++ceph_do_getattr_3838 ceph_do_getattr 0 3838 NULL
25892 +create_one_cdev_3852 create_one_cdev 2 3852 NULL
25893 +smk_read_onlycap_3855 smk_read_onlycap 3 3855 NULL
25894 +get_fd_set_3866 get_fd_set 1 3866 NULL
25895 @@ -119383,7 +117605,8 @@ index 0000000..9addbd7
25896 +get_connectors_for_crtc_4291 get_connectors_for_crtc 0 4291 NULL
25897 +__usbnet_read_cmd_4299 __usbnet_read_cmd 7 4299 NULL
25898 +dvb_ringbuffer_pkt_read_user_4303 dvb_ringbuffer_pkt_read_user 2-3-5 4303 NULL
25899 -+count_strings_4315 count_strings 0 4315 NULL
25900 ++count_strings_4315 count_strings 0 4315 NULL nohasharray
25901 ++cfg80211_inform_bss_4315 cfg80211_inform_bss 9 4315 &count_strings_4315
25902 +nouveau_fifo_create__4327 nouveau_fifo_create_ 5-6 4327 NULL
25903 +snd_rawmidi_kernel_read_4328 snd_rawmidi_kernel_read 3 4328 NULL
25904 +ima_eventdigest_init_common_4338 ima_eventdigest_init_common 2 4338 NULL
25905 @@ -119456,6 +117679,8 @@ index 0000000..9addbd7
25906 +ppp_cp_parse_cr_5214 ppp_cp_parse_cr 4 5214 NULL
25907 +dwc2_hcd_urb_alloc_5217 dwc2_hcd_urb_alloc 2 5217 NULL
25908 +ath6kl_debug_roam_tbl_event_5224 ath6kl_debug_roam_tbl_event 3 5224 NULL
25909 ++ipv4_tun_to_nlattr_5261 ipv4_tun_to_nlattr 4 5261 NULL
25910 ++dvb_ringbuffer_write_user_5270 dvb_ringbuffer_write_user 3 5270 NULL
25911 +xgmac_reg_addr_read_5278 xgmac_reg_addr_read 3 5278 NULL
25912 +usb_descriptor_fillbuf_5302 usb_descriptor_fillbuf 0 5302 NULL
25913 +r592_write_fifo_pio_5315 r592_write_fifo_pio 3 5315 NULL
25914 @@ -119469,6 +117694,7 @@ index 0000000..9addbd7
25915 +ll_xattr_cache_refill_5468 ll_xattr_cache_refill 0 5468 NULL
25916 +kernfs_fop_write_5471 kernfs_fop_write 3 5471 NULL
25917 +xfs_efi_init_5476 xfs_efi_init 2 5476 NULL
25918 ++pci_enable_msix_exact_5482 pci_enable_msix_exact 3 5482 NULL
25919 +cifs_security_flags_proc_write_5484 cifs_security_flags_proc_write 3 5484 NULL
25920 +tty_write_5494 tty_write 3 5494 NULL
25921 +tomoyo_update_domain_5498 tomoyo_update_domain 2 5498 NULL nohasharray
25922 @@ -119489,7 +117715,8 @@ index 0000000..9addbd7
25923 +sctp_setsockopt_autoclose_5775 sctp_setsockopt_autoclose 3 5775 NULL
25924 +__vxge_hw_blockpool_malloc_5786 __vxge_hw_blockpool_malloc 2 5786 NULL
25925 +nvme_trans_bdev_char_page_5797 nvme_trans_bdev_char_page 3 5797 NULL
25926 -+skb_copy_datagram_iovec_5806 skb_copy_datagram_iovec 2-4 5806 NULL
25927 ++skb_copy_datagram_iovec_5806 skb_copy_datagram_iovec 2-4 5806 NULL nohasharray
25928 ++ath10k_core_create_5806 ath10k_core_create 1 5806 &skb_copy_datagram_iovec_5806
25929 +nv50_disp_pioc_create__5812 nv50_disp_pioc_create_ 5 5812 NULL
25930 +ceph_x_encrypt_buflen_5829 ceph_x_encrypt_buflen 0-1 5829 NULL
25931 +ceph_msg_new_5846 ceph_msg_new 2 5846 NULL
25932 @@ -119580,8 +117807,10 @@ index 0000000..9addbd7
25933 +hdlcdrv_register_6792 hdlcdrv_register 2 6792 NULL
25934 +ll_xattr_cache_find_6798 ll_xattr_cache_find 0 6798 NULL
25935 +tx_tx_done_data_read_6799 tx_tx_done_data_read 3 6799 NULL
25936 ++rounded_hashtable_size_6802 rounded_hashtable_size 0 6802 NULL
25937 +lbs_rdrf_write_6826 lbs_rdrf_write 3 6826 NULL
25938 +calc_pages_for_6838 calc_pages_for 0-1-2 6838 NULL
25939 ++blk_alloc_flush_queue_6839 blk_alloc_flush_queue 3 6839 NULL
25940 +mon_bin_read_6841 mon_bin_read 3 6841 NULL
25941 +snd_cs4281_BA0_read_6847 snd_cs4281_BA0_read 5 6847 NULL
25942 +perf_output_sample_ustack_6868 perf_output_sample_ustack 2 6868 NULL
25943 @@ -119620,6 +117849,7 @@ index 0000000..9addbd7
25944 +osc_resend_count_seq_write_7120 osc_resend_count_seq_write 3 7120 NULL
25945 +qib_format_hwerrors_7133 qib_format_hwerrors 5 7133 NULL
25946 +kvm_mmu_notifier_test_young_7139 kvm_mmu_notifier_test_young 3 7139 NULL
25947 ++qlcnic_enable_msix_7144 qlcnic_enable_msix 2 7144 NULL
25948 +__alloc_objio_seg_7203 __alloc_objio_seg 1 7203 NULL
25949 +hdlc_loop_7255 hdlc_loop 0 7255 NULL
25950 +rx_rate_rx_frames_per_rates_read_7282 rx_rate_rx_frames_per_rates_read 3 7282 NULL nohasharray
25951 @@ -119744,8 +117974,10 @@ index 0000000..9addbd7
25952 +ctrl_out_8712 ctrl_out 3-5 8712 NULL
25953 +tracing_max_lat_write_8728 tracing_max_lat_write 3 8728 NULL
25954 +jffs2_acl_count_8729 jffs2_acl_count 0-1 8729 NULL
25955 ++iov_iter_zero_8748 iov_iter_zero 1 8748 NULL
25956 +tx_tx_exch_expiry_read_8749 tx_tx_exch_expiry_read 3 8749 NULL
25957 +compound_order_8750 compound_order 0 8750 NULL
25958 ++cfg80211_inform_bss_width_8754 cfg80211_inform_bss_width 10 8754 NULL
25959 +yurex_write_8761 yurex_write 3 8761 NULL
25960 +joydev_compat_ioctl_8765 joydev_compat_ioctl 2 8765 NULL
25961 +kstrtoint_from_user_8778 kstrtoint_from_user 2 8778 NULL
25962 @@ -119894,6 +118126,7 @@ index 0000000..9addbd7
25963 +SYSC_move_pages_9986 SYSC_move_pages 2 9986 NULL
25964 +ceph_oloc_oid_to_pg_10003 ceph_oloc_oid_to_pg 0 10003 NULL
25965 +aat2870_dump_reg_10019 aat2870_dump_reg 0 10019 NULL
25966 ++asymmetric_key_generate_id_10064 asymmetric_key_generate_id 2-4 10064 NULL
25967 +ieee80211_set_probe_resp_10077 ieee80211_set_probe_resp 3 10077 NULL
25968 +get_elem_size_10110 get_elem_size 0-2 10110 NULL nohasharray
25969 +dynamic_ps_timeout_read_10110 dynamic_ps_timeout_read 3 10110 &get_elem_size_10110
25970 @@ -119979,16 +118212,19 @@ index 0000000..9addbd7
25971 +SetLineNumber_11023 SetLineNumber 0 11023 NULL
25972 +nouveau_gpio_create__11048 nouveau_gpio_create_ 4 11048 NULL
25973 +tda10048_writeregbulk_11050 tda10048_writeregbulk 4 11050 NULL
25974 -+insert_inline_extent_backref_11063 insert_inline_extent_backref 8 11063 NULL
25975 ++insert_inline_extent_backref_11063 insert_inline_extent_backref 8 11063 NULL nohasharray
25976 ++qlcnic_83xx_calculate_msix_vector_11063 qlcnic_83xx_calculate_msix_vector 0 11063 &insert_inline_extent_backref_11063
25977 +xfs_collapse_file_space_11075 xfs_collapse_file_space 2-3 11075 NULL
25978 +tcp_send_mss_11079 tcp_send_mss 0 11079 NULL
25979 +count_argc_11083 count_argc 0 11083 NULL
25980 +kvm_write_guest_cached_11106 kvm_write_guest_cached 4 11106 NULL
25981 +tw_change_queue_depth_11116 tw_change_queue_depth 2 11116 NULL
25982 ++tc90522_master_xfer_11119 tc90522_master_xfer 3 11119 NULL
25983 +page_offset_11120 page_offset 0 11120 NULL
25984 +tracing_buffers_read_11124 tracing_buffers_read 3 11124 NULL
25985 +alloc_alien_cache_11127 alloc_alien_cache 2 11127 NULL
25986 +snd_gf1_pcm_playback_silence_11172 snd_gf1_pcm_playback_silence 3-4 11172 NULL
25987 ++copy_from_iter_iovec_11196 copy_from_iter_iovec 2 11196 NULL
25988 +il_dbgfs_rx_queue_read_11221 il_dbgfs_rx_queue_read 3 11221 NULL
25989 +comedi_alloc_spriv_11234 comedi_alloc_spriv 2 11234 NULL
25990 +of_irq_count_11253 of_irq_count 0 11253 NULL
25991 @@ -120064,6 +118300,7 @@ index 0000000..9addbd7
25992 +sctp_setsockopt_maxseg_11829 sctp_setsockopt_maxseg 3 11829 NULL
25993 +rts51x_read_status_11830 rts51x_read_status 4 11830 NULL
25994 +unix_stream_connect_11844 unix_stream_connect 3 11844 NULL
25995 ++pci_enable_msix_range_11852 pci_enable_msix_range 0-4 11852 NULL
25996 +ecryptfs_copy_filename_11868 ecryptfs_copy_filename 4 11868 NULL
25997 +l2cap_chan_send_11878 l2cap_chan_send 3 11878 NULL
25998 +ieee80211_rx_bss_info_11887 ieee80211_rx_bss_info 3 11887 NULL
25999 @@ -120233,6 +118470,7 @@ index 0000000..9addbd7
26000 +udf_direct_IO_13765 udf_direct_IO 4 13765 NULL
26001 +ieee802154_alloc_device_13767 ieee802154_alloc_device 1 13767 NULL
26002 +fb_sys_read_13778 fb_sys_read 3 13778 NULL
26003 ++alloc_indirect_13783 alloc_indirect 1 13783 NULL
26004 +ath6kl_mgmt_powersave_ap_13791 ath6kl_mgmt_powersave_ap 6 13791 NULL
26005 +random_read_13815 random_read 3 13815 NULL
26006 +mutex_lock_interruptible_nested_13817 mutex_lock_interruptible_nested 0 13817 NULL
26007 @@ -120380,6 +118618,7 @@ index 0000000..9addbd7
26008 +kovaplus_sysfs_read_15337 kovaplus_sysfs_read 6 15337 NULL
26009 +ioread16_15342 ioread16 0 15342 NULL
26010 +ept_prefetch_gpte_15348 ept_prefetch_gpte 4 15348 NULL
26011 ++blkdev_readpages_15357 blkdev_readpages 4 15357 NULL
26012 +acpi_ut_create_string_object_15360 acpi_ut_create_string_object 1 15360 NULL
26013 +graph_depth_read_15371 graph_depth_read 3 15371 NULL
26014 +fq_codel_zalloc_15378 fq_codel_zalloc 1 15378 NULL
26015 @@ -120550,6 +118789,7 @@ index 0000000..9addbd7
26016 +ath6kl_wmi_send_mgmt_cmd_17347 ath6kl_wmi_send_mgmt_cmd 7 17347 NULL
26017 +mdc_import_seq_write_17409 mdc_import_seq_write 3 17409 NULL
26018 +lpfc_debugfs_dif_err_write_17424 lpfc_debugfs_dif_err_write 3 17424 NULL
26019 ++copy_from_iter_17433 copy_from_iter 2 17433 NULL
26020 +sta_connected_time_read_17435 sta_connected_time_read 3 17435 NULL
26021 +libcfs_ipif_enumerate_17445 libcfs_ipif_enumerate 0 17445 NULL
26022 +nla_get_u32_17455 nla_get_u32 0 17455 NULL
26023 @@ -120579,6 +118819,7 @@ index 0000000..9addbd7
26024 +nv92_gpio_intr_mask_17773 nv92_gpio_intr_mask 4-3 17773 NULL
26025 +shrink_slab_node_17794 shrink_slab_node 3 17794 NULL
26026 +lpuart_copy_rx_to_tty_17801 lpuart_copy_rx_to_tty 3 17801 NULL
26027 ++_iwl_dbgfs_set_nic_temperature_write_17804 _iwl_dbgfs_set_nic_temperature_write 3 17804 NULL
26028 +gnet_stats_copy_app_17821 gnet_stats_copy_app 3 17821 NULL
26029 +cipso_v4_gentag_rbm_17836 cipso_v4_gentag_rbm 0 17836 NULL
26030 +em28xx_audio_ep_packet_size_17844 em28xx_audio_ep_packet_size 0 17844 NULL
26031 @@ -120701,6 +118942,7 @@ index 0000000..9addbd7
26032 +devm_mdiobus_alloc_size_18902 devm_mdiobus_alloc_size 2 18902 NULL
26033 +tracing_thresh_write_18909 tracing_thresh_write 3 18909 NULL
26034 +ceph_setxattr_18913 ceph_setxattr 4 18913 NULL
26035 ++xfs_buf_read_uncached_18922 xfs_buf_read_uncached 3 18922 NULL
26036 +ieee80211_rx_mgmt_disassoc_18927 ieee80211_rx_mgmt_disassoc 3 18927 NULL
26037 +snapshot_write_next_18937 snapshot_write_next 0 18937 NULL
26038 +__nla_reserve_18974 __nla_reserve 3 18974 NULL
26039 @@ -120788,6 +119030,7 @@ index 0000000..9addbd7
26040 +aes_decrypt_interrupt_read_19910 aes_decrypt_interrupt_read 3 19910 NULL
26041 +ps_upsd_max_apturn_read_19918 ps_upsd_max_apturn_read 3 19918 NULL
26042 +mangle_name_19923 mangle_name 0 19923 NULL
26043 ++tipc_sk_show_19928 tipc_sk_show 3-0 19928 NULL
26044 +cgroup_task_count_19930 cgroup_task_count 0 19930 NULL
26045 +guest_read_tsc_19931 guest_read_tsc 0 19931 NULL
26046 +azx_get_pos_lpib_19933 azx_get_pos_lpib 0 19933 NULL
26047 @@ -120797,7 +119040,8 @@ index 0000000..9addbd7
26048 +ll_xattr_cache_list_19954 ll_xattr_cache_list 0 19954 NULL
26049 +get_jack_mode_name_19976 get_jack_mode_name 4 19976 NULL
26050 +attach_hdlc_protocol_19986 attach_hdlc_protocol 3 19986 NULL
26051 -+rtw_set_wps_probe_resp_19989 rtw_set_wps_probe_resp 3 19989 NULL
26052 ++rtw_set_wps_probe_resp_19989 rtw_set_wps_probe_resp 3 19989 NULL nohasharray
26053 ++i40e_reserve_msix_vectors_19989 i40e_reserve_msix_vectors 2 19989 &rtw_set_wps_probe_resp_19989
26054 +lustre_pack_request_19992 lustre_pack_request 3 19992 NULL
26055 +find_overflow_devnum_19995 find_overflow_devnum 0 19995 NULL
26056 +diva_um_idi_read_20003 diva_um_idi_read 0 20003 NULL
26057 @@ -120895,6 +119139,7 @@ index 0000000..9addbd7
26058 +vfio_msi_enable_20906 vfio_msi_enable 2 20906 NULL
26059 +lbs_rdbbp_write_20918 lbs_rdbbp_write 3 20918 NULL
26060 +htable_bits_20933 htable_bits 0 20933 NULL
26061 ++cfg80211_rx_assoc_resp_20934 cfg80211_rx_assoc_resp 4 20934 NULL
26062 +altera_set_ir_post_20948 altera_set_ir_post 2 20948 NULL
26063 +rx_rx_phy_hdr_read_20950 rx_rx_phy_hdr_read 3 20950 NULL
26064 +rsxx_cram_read_20957 rsxx_cram_read 3 20957 NULL
26065 @@ -120918,6 +119163,7 @@ index 0000000..9addbd7
26066 +_efx_mcdi_rpc_async_21119 _efx_mcdi_rpc_async 4-5 21119 NULL
26067 +i2400m_rx_trace_21127 i2400m_rx_trace 3 21127 NULL
26068 +mei_dbgfs_read_active_21172 mei_dbgfs_read_active 3 21172 NULL
26069 ++bioset_create_nobvec_21180 bioset_create_nobvec 1 21180 NULL
26070 +cx18_v4l2_read_21196 cx18_v4l2_read 3 21196 NULL
26071 +ipc_rcu_alloc_21208 ipc_rcu_alloc 1 21208 NULL
26072 +scsi_execute_req_flags_21215 scsi_execute_req_flags 5 21215 NULL
26073 @@ -120964,7 +119210,8 @@ index 0000000..9addbd7
26074 +atalk_sendmsg_21677 atalk_sendmsg 4 21677 NULL
26075 +ocfs2_xattr_get_nolock_21678 ocfs2_xattr_get_nolock 0 21678 NULL
26076 +regmap_register_patch_21681 regmap_register_patch 3 21681 NULL
26077 -+rtllib_alloc_txb_21687 rtllib_alloc_txb 1 21687 NULL
26078 ++rtllib_alloc_txb_21687 rtllib_alloc_txb 1 21687 NULL nohasharray
26079 ++proc_maps_open_21687 proc_maps_open 4 21687 &rtllib_alloc_txb_21687
26080 +evdev_ioctl_handler_21705 evdev_ioctl_handler 2 21705 NULL
26081 +unix_skb_len_21722 unix_skb_len 0 21722 NULL
26082 +lprocfs_wr_import_21728 lprocfs_wr_import 3 21728 NULL
26083 @@ -120977,10 +119224,12 @@ index 0000000..9addbd7
26084 +oom_adj_read_21847 oom_adj_read 3 21847 NULL
26085 +lpfc_idiag_extacc_avail_get_21865 lpfc_idiag_extacc_avail_get 0-3 21865 NULL
26086 +brcms_debugfs_hardware_read_21867 brcms_debugfs_hardware_read 3 21867 NULL
26087 ++msix_capability_init_21870 msix_capability_init 0 21870 NULL
26088 +sisusbcon_bmove_21873 sisusbcon_bmove 6-5-7 21873 NULL
26089 +ldlm_lock_create_21888 ldlm_lock_create 7 21888 NULL
26090 +__btrfs_direct_write_21894 __btrfs_direct_write 3 21894 NULL
26091 -+dbAllocCtl_21911 dbAllocCtl 0 21911 NULL
26092 ++dbAllocCtl_21911 dbAllocCtl 0 21911 NULL nohasharray
26093 ++nvme_submit_sync_cmd_21911 nvme_submit_sync_cmd 0 21911 &dbAllocCtl_21911
26094 +qsfp_1_read_21915 qsfp_1_read 3 21915 NULL
26095 +twl_i2c_write_u16_21953 twl_i2c_write_u16 3 21953 NULL
26096 +__build_xattrs_21979 __build_xattrs 0 21979 NULL
26097 @@ -121026,10 +119275,12 @@ index 0000000..9addbd7
26098 +queue_max_segments_22441 queue_max_segments 0 22441 NULL
26099 +handle_received_packet_22457 handle_received_packet 3 22457 NULL
26100 +ecryptfs_write_22488 ecryptfs_write 4-3 22488 NULL
26101 -+qib_user_sdma_alloc_header_22490 qib_user_sdma_alloc_header 2 22490 NULL
26102 ++qib_user_sdma_alloc_header_22490 qib_user_sdma_alloc_header 2 22490 NULL nohasharray
26103 ++video_write_22490 video_write 3 22490 &qib_user_sdma_alloc_header_22490
26104 +cache_write_procfs_22491 cache_write_procfs 3 22491 NULL
26105 +mutex_lock_interruptible_22505 mutex_lock_interruptible 0 22505 NULL
26106 +trim_no_bitmap_22524 trim_no_bitmap 4-3 22524 NULL
26107 ++ntb_setup_bwd_msix_22549 ntb_setup_bwd_msix 2 22549 NULL
26108 +ocfs2_read_extent_block_22550 ocfs2_read_extent_block 0 22550 NULL
26109 +agp_alloc_page_array_22554 agp_alloc_page_array 1 22554 NULL
26110 +dbFindCtl_22587 dbFindCtl 0 22587 NULL
26111 @@ -121101,6 +119352,7 @@ index 0000000..9addbd7
26112 +gss_pipe_downcall_23182 gss_pipe_downcall 3 23182 NULL
26113 +mpi_alloc_limb_space_23190 mpi_alloc_limb_space 1 23190 NULL
26114 +tipc_sendmcast_23214 tipc_sendmcast 4 23214 NULL
26115 ++mcryptd_alloc_instance_23221 mcryptd_alloc_instance 2-3 23221 NULL
26116 +nft_hash_tbl_alloc_23224 nft_hash_tbl_alloc 1 23224 NULL
26117 +tty_buffer_request_room_23228 tty_buffer_request_room 2-0 23228 NULL
26118 +xlog_get_bp_23229 xlog_get_bp 2 23229 NULL nohasharray
26119 @@ -121172,6 +119424,7 @@ index 0000000..9addbd7
26120 +size_roundup_power2_23958 size_roundup_power2 0-1 23958 NULL
26121 +sddr55_write_data_23983 sddr55_write_data 4 23983 NULL
26122 +zd_usb_iowrite16v_async_23984 zd_usb_iowrite16v_async 3 23984 NULL
26123 ++xfs_zero_file_space_24000 xfs_zero_file_space 2-3 24000 NULL
26124 +cxgb_alloc_mem_24007 cxgb_alloc_mem 1 24007 NULL
26125 +give_pages_24021 give_pages 3 24021 NULL
26126 +adis16400_show_serial_number_24037 adis16400_show_serial_number 3 24037 NULL
26127 @@ -121192,6 +119445,7 @@ index 0000000..9addbd7
26128 +safe_prepare_write_buffer_24187 safe_prepare_write_buffer 3 24187 NULL
26129 +nv94_aux_24197 nv94_aux 3-6 24197 NULL
26130 +ieee80211_if_read_dot11MeshHWMPpreqMinInterval_24208 ieee80211_if_read_dot11MeshHWMPpreqMinInterval 3 24208 NULL
26131 ++efx_vf_size_24213 efx_vf_size 0 24213 NULL
26132 +tcpprobe_sprint_24222 tcpprobe_sprint 0-2 24222 NULL
26133 +pcpu_embed_first_chunk_24224 pcpu_embed_first_chunk 3-2-1 24224 NULL nohasharray
26134 +mei_amthif_read_24224 mei_amthif_read 4 24224 &pcpu_embed_first_chunk_24224
26135 @@ -121214,6 +119468,7 @@ index 0000000..9addbd7
26136 +osc_cur_grant_bytes_seq_write_24396 osc_cur_grant_bytes_seq_write 3 24396 NULL
26137 +getxattr_24398 getxattr 4 24398 NULL nohasharray
26138 +pvr2_v4l2_ioctl_24398 pvr2_v4l2_ioctl 2 24398 &getxattr_24398
26139 ++populate_msi_sysfs_24399 populate_msi_sysfs 0 24399 NULL
26140 +blk_update_bidi_request_24415 blk_update_bidi_request 3-4 24415 NULL
26141 +nvme_trans_log_supp_pages_24418 nvme_trans_log_supp_pages 3 24418 NULL
26142 +b43_debugfs_read_24425 b43_debugfs_read 3 24425 NULL
26143 @@ -121236,7 +119491,8 @@ index 0000000..9addbd7
26144 +SyS_pselect6_24582 SyS_pselect6 1 24582 NULL
26145 +udf_compute_nr_groups_24594 udf_compute_nr_groups 0 24594 NULL
26146 +sensor_hub_get_physical_device_count_24605 sensor_hub_get_physical_device_count 0 24605 NULL nohasharray
26147 -+lov_alloc_memmd_24605 lov_alloc_memmd 2 24605 &sensor_hub_get_physical_device_count_24605
26148 ++lov_alloc_memmd_24605 lov_alloc_memmd 2 24605 &sensor_hub_get_physical_device_count_24605 nohasharray
26149 ++i915_error_state_buf_init_24605 i915_error_state_buf_init 3 24605 &lov_alloc_memmd_24605
26150 +SyS_poll_24620 SyS_poll 2 24620 NULL
26151 +context_alloc_24645 context_alloc 3 24645 NULL
26152 +blk_rq_err_bytes_24650 blk_rq_err_bytes 0 24650 NULL
26153 @@ -121265,7 +119521,8 @@ index 0000000..9addbd7
26154 +ocfs2_fiemap_24949 ocfs2_fiemap 4-3 24949 NULL
26155 +packet_sendmsg_24954 packet_sendmsg 4 24954 NULL
26156 +twl_i2c_write_u8_24976 twl_i2c_write_u8 3 24976 NULL
26157 -+llc_ui_sendmsg_24987 llc_ui_sendmsg 4 24987 NULL
26158 ++llc_ui_sendmsg_24987 llc_ui_sendmsg 4 24987 NULL nohasharray
26159 ++ath10k_fw_crash_dump_read_24987 ath10k_fw_crash_dump_read 3 24987 &llc_ui_sendmsg_24987
26160 +info_debugfs_read_helper_24988 info_debugfs_read_helper 0 24988 NULL
26161 +key_conf_hw_key_idx_read_25003 key_conf_hw_key_idx_read 3 25003 NULL
26162 +il_dbgfs_channels_read_25005 il_dbgfs_channels_read 3 25005 NULL
26163 @@ -121275,6 +119532,7 @@ index 0000000..9addbd7
26164 +btrfs_stack_key_blockptr_25058 btrfs_stack_key_blockptr 0 25058 NULL
26165 +gs_buf_alloc_25067 gs_buf_alloc 2 25067 NULL
26166 +ll_track_pid_seq_write_25068 ll_track_pid_seq_write 3 25068 NULL
26167 ++do_add_page_to_bio_25071 do_add_page_to_bio 2 25071 NULL
26168 +SYSC_listxattr_25072 SYSC_listxattr 3 25072 NULL
26169 +ima_appraise_measurement_25093 ima_appraise_measurement 6 25093 NULL
26170 +snd_rawmidi_kernel_write_25106 snd_rawmidi_kernel_write 3 25106 NULL
26171 @@ -121288,6 +119546,7 @@ index 0000000..9addbd7
26172 +crypto_alloc_instance2_25277 crypto_alloc_instance2 3 25277 NULL
26173 +vfs_writev_25278 vfs_writev 3 25278 NULL
26174 +l2tp_session_create_25286 l2tp_session_create 1 25286 NULL
26175 ++cx25821_write_frame_25315 cx25821_write_frame 3 25315 NULL
26176 +ath9k_debugfs_read_buf_25316 ath9k_debugfs_read_buf 3 25316 NULL
26177 +rng_buffer_size_25348 rng_buffer_size 0 25348 NULL
26178 +SYSC_kexec_load_25361 SYSC_kexec_load 2 25361 NULL
26179 @@ -121364,6 +119623,7 @@ index 0000000..9addbd7
26180 +mwifiex_regrdwr_write_26225 mwifiex_regrdwr_write 3 26225 NULL
26181 +_scsih_change_queue_depth_26230 _scsih_change_queue_depth 2 26230 NULL
26182 +rxrpc_recvmsg_26233 rxrpc_recvmsg 4 26233 NULL
26183 ++nlm_end_grace_read_26234 nlm_end_grace_read 3 26234 NULL
26184 +genwqe_ffdc_buff_size_26263 genwqe_ffdc_buff_size 0 26263 NULL
26185 +crypto_ctxsize_26278 crypto_ctxsize 0 26278 NULL
26186 +wacom_set_device_mode_26280 wacom_set_device_mode 3 26280 NULL
26187 @@ -121381,7 +119641,8 @@ index 0000000..9addbd7
26188 +enc_pools_add_pages_26461 enc_pools_add_pages 1 26461 &tower_read_26461
26189 +ib_alloc_device_26483 ib_alloc_device 1 26483 NULL
26190 +ulong_write_file_26485 ulong_write_file 3 26485 NULL
26191 -+dvb_ca_en50221_io_ioctl_26490 dvb_ca_en50221_io_ioctl 2 26490 NULL
26192 ++dvb_ca_en50221_io_ioctl_26490 dvb_ca_en50221_io_ioctl 2 26490 NULL nohasharray
26193 ++msi_verify_entries_26490 msi_verify_entries 0 26490 &dvb_ca_en50221_io_ioctl_26490
26194 +read_vmcore_26501 read_vmcore 3 26501 NULL
26195 +uhid_char_write_26502 uhid_char_write 3 26502 NULL
26196 +vfio_pci_set_msi_trigger_26507 vfio_pci_set_msi_trigger 4-3 26507 NULL
26197 @@ -121408,6 +119669,7 @@ index 0000000..9addbd7
26198 +cipso_v4_genopt_26812 cipso_v4_genopt 0 26812 NULL
26199 +iwl_trans_read_mem32_26825 iwl_trans_read_mem32 0 26825 NULL
26200 +smk_write_load_26829 smk_write_load 3 26829 NULL
26201 ++snd_pcm_action_mutex_26832 snd_pcm_action_mutex 0 26832 NULL
26202 +scnprint_id_26842 scnprint_id 3-0 26842 NULL
26203 +ecryptfs_miscdev_write_26847 ecryptfs_miscdev_write 3 26847 NULL
26204 +ss_alloc_ep_req_26848 ss_alloc_ep_req 2 26848 NULL
26205 @@ -121465,7 +119727,8 @@ index 0000000..9addbd7
26206 +hcd_buffer_alloc_27495 hcd_buffer_alloc 2 27495 NULL
26207 +ip_set_get_h32_27498 ip_set_get_h32 0 27498 NULL
26208 +btrfs_get_64_27499 btrfs_get_64 0 27499 NULL
26209 -+garmin_read_process_27509 garmin_read_process 3 27509 NULL
26210 ++garmin_read_process_27509 garmin_read_process 3 27509 NULL nohasharray
26211 ++mcryptd_hash_setkey_27509 mcryptd_hash_setkey 3 27509 &garmin_read_process_27509
26212 +oti_alloc_cookies_27510 oti_alloc_cookies 2 27510 NULL
26213 +ib_copy_to_udata_27525 ib_copy_to_udata 3 27525 NULL
26214 +snd_sonicvibes_getdmaa_27552 snd_sonicvibes_getdmaa 0 27552 NULL
26215 @@ -121577,6 +119840,7 @@ index 0000000..9addbd7
26216 +setup_usemap_28636 setup_usemap 3-4 28636 NULL
26217 +qib_handle_6120_hwerrors_28642 qib_handle_6120_hwerrors 3 28642 NULL
26218 +p9_fcall_alloc_28652 p9_fcall_alloc 1 28652 NULL
26219 ++iwl_dbgfs_nic_temp_read_28662 iwl_dbgfs_nic_temp_read 3 28662 NULL
26220 +blk_queue_resize_tags_28670 blk_queue_resize_tags 2 28670 NULL
26221 +SyS_setgroups16_28686 SyS_setgroups16 1 28686 NULL
26222 +kvm_mmu_get_page_28692 kvm_mmu_get_page 2 28692 NULL
26223 @@ -121644,6 +119908,7 @@ index 0000000..9addbd7
26224 +crypto_ahash_alignmask_29445 crypto_ahash_alignmask 0 29445 NULL
26225 +p9_client_prepare_req_29448 p9_client_prepare_req 3 29448 NULL
26226 +validate_scan_freqs_29462 validate_scan_freqs 0 29462 NULL
26227 ++memcg_update_cache_params_29465 memcg_update_cache_params 2 29465 NULL
26228 +SyS_flistxattr_29474 SyS_flistxattr 3 29474 NULL
26229 +do_register_entry_29478 do_register_entry 4 29478 NULL
26230 +simple_strtoul_29480 simple_strtoul 0 29480 NULL
26231 @@ -121652,6 +119917,7 @@ index 0000000..9addbd7
26232 +usnic_vnic_spec_dump_29508 usnic_vnic_spec_dump 2 29508 NULL
26233 +write_file_regidx_29517 write_file_regidx 3 29517 NULL
26234 +atk_debugfs_ggrp_read_29522 atk_debugfs_ggrp_read 3 29522 NULL
26235 ++pci_enable_msix_29524 pci_enable_msix 0 29524 NULL
26236 +mic_vringh_copy_29531 mic_vringh_copy 4 29531 NULL
26237 +ftrace_write_29551 ftrace_write 3 29551 NULL
26238 +idetape_queue_rw_tail_29562 idetape_queue_rw_tail 3 29562 NULL
26239 @@ -121676,6 +119942,7 @@ index 0000000..9addbd7
26240 +xfs_new_eof_29737 xfs_new_eof 2 29737 NULL
26241 +std_nic_write_29752 std_nic_write 3 29752 NULL
26242 +static_key_count_29771 static_key_count 0 29771 NULL
26243 ++tg3_irq_count_29786 tg3_irq_count 0 29786 NULL
26244 +dbAlloc_29794 dbAlloc 0 29794 NULL
26245 +tcp_sendpage_29829 tcp_sendpage 4 29829 NULL
26246 +__probe_kernel_write_29842 __probe_kernel_write 3 29842 NULL
26247 @@ -121690,6 +119957,7 @@ index 0000000..9addbd7
26248 +write_file_queue_29922 write_file_queue 3 29922 NULL
26249 +__btrfs_getxattr_29947 __btrfs_getxattr 0 29947 NULL nohasharray
26250 +ipv6_recv_error_29947 ipv6_recv_error 3 29947 &__btrfs_getxattr_29947
26251 ++zero_iovec_29955 zero_iovec 1 29955 NULL
26252 +dev_mem_write_30028 dev_mem_write 3 30028 NULL
26253 +alloc_netdev_mqs_30030 alloc_netdev_mqs 1 30030 NULL
26254 +sysfs_add_file_mode_ns_30038 sysfs_add_file_mode_ns 0 30038 NULL
26255 @@ -121741,7 +120009,8 @@ index 0000000..9addbd7
26256 +dwc3_testmode_write_30516 dwc3_testmode_write 3 30516 NULL
26257 +debug_debug2_read_30526 debug_debug2_read 3 30526 NULL nohasharray
26258 +set_config_30526 set_config 0 30526 &debug_debug2_read_30526
26259 -+xfs_sb_version_hasftype_30559 xfs_sb_version_hasftype 0 30559 NULL
26260 ++xfs_sb_version_hasftype_30559 xfs_sb_version_hasftype 0 30559 NULL nohasharray
26261 ++ixgbevf_acquire_msix_vectors_30559 ixgbevf_acquire_msix_vectors 2 30559 &xfs_sb_version_hasftype_30559
26262 +disk_expand_part_tbl_30561 disk_expand_part_tbl 2 30561 NULL
26263 +set_le_30581 set_le 4 30581 NULL
26264 +blk_init_tags_30592 blk_init_tags 1 30592 NULL
26265 @@ -121769,9 +120038,11 @@ index 0000000..9addbd7
26266 +ath10k_write_fw_dbglog_30835 ath10k_write_fw_dbglog 3 30835 NULL
26267 +of_gpio_named_count_30841 of_gpio_named_count 0 30841 NULL
26268 +sctp_setsockopt_auth_chunk_30843 sctp_setsockopt_auth_chunk 3 30843 NULL
26269 ++cfg80211_rx_mgmt_30844 cfg80211_rx_mgmt 5 30844 NULL
26270 +wd_autoreset_write_30862 wd_autoreset_write 3 30862 NULL
26271 +ieee80211_if_fmt_dropped_frames_no_route_30884 ieee80211_if_fmt_dropped_frames_no_route 3 30884 NULL
26272 +pn_recvmsg_30887 pn_recvmsg 4 30887 NULL
26273 ++copy_to_iter_30901 copy_to_iter 2 30901 NULL
26274 +usnic_debugfs_buildinfo_read_30928 usnic_debugfs_buildinfo_read 3 30928 NULL
26275 +sctp_setsockopt_rtoinfo_30941 sctp_setsockopt_rtoinfo 3 30941 NULL
26276 +tty_insert_flip_string_flags_30969 tty_insert_flip_string_flags 4 30969 NULL
26277 @@ -121789,6 +120060,7 @@ index 0000000..9addbd7
26278 +kimage_normal_alloc_31140 kimage_normal_alloc 3 31140 NULL
26279 +size_inside_page_31141 size_inside_page 0 31141 NULL
26280 +w9966_v4l_read_31148 w9966_v4l_read 3 31148 NULL
26281 ++nvme_set_features_31169 nvme_set_features 0 31169 NULL
26282 +ch_do_scsi_31171 ch_do_scsi 4 31171 NULL
26283 +r592_read_fifo_pio_31198 r592_read_fifo_pio 3 31198 NULL
26284 +mtdchar_readoob_31200 mtdchar_readoob 4 31200 NULL
26285 @@ -121800,6 +120072,7 @@ index 0000000..9addbd7
26286 +_create_sg_bios_31244 _create_sg_bios 4 31244 NULL
26287 +ieee80211_if_read_last_beacon_31257 ieee80211_if_read_last_beacon 3 31257 NULL
26288 +hash_netportnet4_expire_31290 hash_netportnet4_expire 4 31290 NULL
26289 ++iwl_dbgfs_set_nic_temperature_read_31300 iwl_dbgfs_set_nic_temperature_read 3 31300 NULL
26290 +uvc_simplify_fraction_31303 uvc_simplify_fraction 3 31303 NULL
26291 +sisusbcon_scroll_31315 sisusbcon_scroll 5-2-3 31315 NULL
26292 +command_file_write_31318 command_file_write 3 31318 NULL
26293 @@ -121891,6 +120164,7 @@ index 0000000..9addbd7
26294 +kiblnd_alloc_pages_32092 kiblnd_alloc_pages 3 32092 NULL
26295 +bio_alloc_32095 bio_alloc 2 32095 NULL
26296 +ath6kl_fwlog_read_32101 ath6kl_fwlog_read 3 32101 NULL
26297 ++wil_read_file_recovery_32104 wil_read_file_recovery 3 32104 NULL
26298 +disk_status_32120 disk_status 4 32120 NULL
26299 +kobject_add_internal_32133 kobject_add_internal 0 32133 NULL
26300 +venus_link_32165 venus_link 5 32165 NULL
26301 @@ -122063,7 +120337,8 @@ index 0000000..9addbd7
26302 +ixgbe_dbg_netdev_ops_write_34141 ixgbe_dbg_netdev_ops_write 3 34141 NULL
26303 +shmem_pread_fast_34147 shmem_pread_fast 3 34147 NULL
26304 +skb_to_sgvec_34171 skb_to_sgvec 0 34171 NULL
26305 -+rsi_debug_zone_write_34206 rsi_debug_zone_write 3 34206 NULL
26306 ++rsi_debug_zone_write_34206 rsi_debug_zone_write 3 34206 NULL nohasharray
26307 ++rbd_osd_req_create_34206 rbd_osd_req_create 3 34206 &rsi_debug_zone_write_34206
26308 +ext4_da_write_begin_34215 ext4_da_write_begin 3-4 34215 NULL
26309 +bl_pipe_downcall_34264 bl_pipe_downcall 3 34264 NULL
26310 +device_private_init_34279 device_private_init 0 34279 NULL
26311 @@ -122171,7 +120446,8 @@ index 0000000..9addbd7
26312 +dma_show_regs_35266 dma_show_regs 3 35266 NULL
26313 +irda_recvmsg_stream_35280 irda_recvmsg_stream 4 35280 NULL
26314 +i2o_block_end_request_35282 i2o_block_end_request 3 35282 NULL
26315 -+isr_rx_rdys_read_35283 isr_rx_rdys_read 3 35283 NULL
26316 ++isr_rx_rdys_read_35283 isr_rx_rdys_read 3 35283 NULL nohasharray
26317 ++nvkm_notify_init_35283 nvkm_notify_init 7 35283 &isr_rx_rdys_read_35283
26318 +__btrfs_buffered_write_35311 __btrfs_buffered_write 3 35311 NULL nohasharray
26319 +brcmf_sdio_forensic_read_35311 brcmf_sdio_forensic_read 3 35311 &__btrfs_buffered_write_35311
26320 +tracing_read_pipe_35312 tracing_read_pipe 3 35312 NULL
26321 @@ -122305,6 +120581,7 @@ index 0000000..9addbd7
26322 +iscsi_host_alloc_36671 iscsi_host_alloc 2 36671 NULL
26323 +xillybus_read_36678 xillybus_read 3 36678 NULL
26324 +gsmtty_write_36702 gsmtty_write 3 36702 NULL
26325 ++path_getxattr_36717 path_getxattr 4 36717 NULL
26326 +snd_rawmidi_kernel_read1_36740 snd_rawmidi_kernel_read1 4-0 36740 NULL
26327 +cxgbi_device_register_36746 cxgbi_device_register 1-2 36746 NULL
26328 +ps_poll_upsd_timeouts_read_36755 ps_poll_upsd_timeouts_read 3 36755 NULL
26329 @@ -122472,6 +120749,7 @@ index 0000000..9addbd7
26330 +dev_names_read_38509 dev_names_read 3 38509 NULL
26331 +iscsi_create_iface_38510 iscsi_create_iface 5 38510 NULL
26332 +event_rx_mismatch_read_38518 event_rx_mismatch_read 3 38518 NULL
26333 ++set_queue_count_38519 set_queue_count 0 38519 NULL
26334 +ubifs_idx_node_sz_38546 ubifs_idx_node_sz 0-2 38546 NULL
26335 +btrfs_discard_extent_38547 btrfs_discard_extent 2 38547 NULL
26336 +kuc_len_38557 kuc_len 0-1 38557 NULL
26337 @@ -122525,6 +120803,7 @@ index 0000000..9addbd7
26338 +ath9k_hw_ar9003_dump_eeprom_39156 ath9k_hw_ar9003_dump_eeprom 5-4 39156 NULL
26339 +echo_client_kbrw_39170 echo_client_kbrw 6 39170 NULL
26340 +ext3_xattr_check_names_39174 ext3_xattr_check_names 0 39174 NULL
26341 ++mlx4_en_create_tx_ring_39179 mlx4_en_create_tx_ring 4 39179 NULL
26342 +ubi_more_update_data_39189 ubi_more_update_data 4 39189 NULL
26343 +qcam_read_bytes_39205 qcam_read_bytes 0 39205 NULL
26344 +ivtv_v4l2_write_39226 ivtv_v4l2_write 3 39226 NULL
26345 @@ -122606,7 +120885,8 @@ index 0000000..9addbd7
26346 +sctp_setsockopt_delayed_ack_40129 sctp_setsockopt_delayed_ack 3 40129 NULL
26347 +dwc2_max_desc_num_40132 dwc2_max_desc_num 0 40132 NULL
26348 +rx_rx_frame_checksum_read_40140 rx_rx_frame_checksum_read 3 40140 NULL
26349 -+ath10k_write_simulate_fw_crash_40143 ath10k_write_simulate_fw_crash 3 40143 NULL
26350 ++ath10k_write_simulate_fw_crash_40143 ath10k_write_simulate_fw_crash 3 40143 NULL nohasharray
26351 ++kvm_mmu_notifier_clear_flush_young_40143 kvm_mmu_notifier_clear_flush_young 3-4 40143 &ath10k_write_simulate_fw_crash_40143
26352 +iwch_alloc_fastreg_pbl_40153 iwch_alloc_fastreg_pbl 2 40153 NULL
26353 +pt_write_40159 pt_write 3 40159 NULL
26354 +scsi_sg_count_40182 scsi_sg_count 0 40182 NULL
26355 @@ -122633,6 +120913,7 @@ index 0000000..9addbd7
26356 +get_chars_40373 get_chars 3 40373 NULL
26357 +fb_prepare_extra_logos_40429 fb_prepare_extra_logos 0-2 40429 NULL
26358 +proc_write_driver_40432 proc_write_driver 3 40432 NULL
26359 ++repair_io_failure_40452 repair_io_failure 4-3 40452 NULL
26360 +tomoyo_update_policy_40458 tomoyo_update_policy 2 40458 NULL
26361 +zd_usb_scnprint_id_40459 zd_usb_scnprint_id 0-3 40459 NULL
26362 +gp2ap020a00f_write_event_threshold_40461 gp2ap020a00f_write_event_threshold 2 40461 NULL
26363 @@ -122646,6 +120927,7 @@ index 0000000..9addbd7
26364 +ixgbe_dbg_reg_ops_read_40540 ixgbe_dbg_reg_ops_read 3 40540 NULL
26365 +ima_write_policy_40548 ima_write_policy 3 40548 NULL
26366 +esp_alloc_tmp_40558 esp_alloc_tmp 3-2 40558 NULL
26367 ++bl_alloc_init_bio_40569 bl_alloc_init_bio 1 40569 NULL
26368 +get_priv_descr_and_size_40612 get_priv_descr_and_size 0 40612 NULL
26369 +twl4030_kpwrite_u8_40665 twl4030_kpwrite_u8 3 40665 NULL
26370 +__cfg80211_roamed_40668 __cfg80211_roamed 4-6 40668 NULL
26371 @@ -122682,6 +120964,7 @@ index 0000000..9addbd7
26372 +gfs2_ea_find_40913 gfs2_ea_find 0 40913 NULL
26373 +vol_cdev_write_40915 vol_cdev_write 3 40915 NULL
26374 +snd_vx_create_40948 snd_vx_create 4 40948 NULL
26375 ++path_listxattr_40949 path_listxattr 3 40949 NULL
26376 +rds_sendmsg_40976 rds_sendmsg 4 40976 NULL
26377 +ima_appraise_measurement_40978 ima_appraise_measurement 6 40978 NULL
26378 +il_dbgfs_fh_reg_read_40993 il_dbgfs_fh_reg_read 3 40993 NULL
26379 @@ -122700,12 +120983,14 @@ index 0000000..9addbd7
26380 +nvme_map_user_pages_41093 nvme_map_user_pages 4-3 41093 NULL nohasharray
26381 +roccat_read_41093 roccat_read 3 41093 &nvme_map_user_pages_41093
26382 +dma_attach_41094 dma_attach 5-6 41094 NULL
26383 ++nl80211_send_mlme_event_41099 nl80211_send_mlme_event 4 41099 NULL
26384 +provide_user_output_41105 provide_user_output 3 41105 NULL
26385 +f_audio_buffer_alloc_41110 f_audio_buffer_alloc 1 41110 NULL
26386 +ath10k_read_wmi_services_41112 ath10k_read_wmi_services 3 41112 NULL
26387 +v4l2_ctrl_new_int_menu_41151 v4l2_ctrl_new_int_menu 4 41151 NULL
26388 +tx_frag_mpdu_alloc_failed_read_41167 tx_frag_mpdu_alloc_failed_read 3 41167 NULL
26389 +dvb_ca_write_41171 dvb_ca_write 3 41171 NULL
26390 ++netif_get_num_default_rss_queues_41187 netif_get_num_default_rss_queues 0 41187 NULL
26391 +dfs_file_write_41196 dfs_file_write 3 41196 NULL
26392 +nfs_page_array_len_41219 nfs_page_array_len 0-2-1 41219 NULL
26393 +cfg80211_process_disassoc_41231 cfg80211_process_disassoc 3 41231 NULL
26394 @@ -122842,7 +121127,8 @@ index 0000000..9addbd7
26395 +ieee80211_if_fmt_dot11MeshHWMPactivePathTimeout_42635 ieee80211_if_fmt_dot11MeshHWMPactivePathTimeout 3 42635 NULL
26396 +scsi_activate_tcq_42640 scsi_activate_tcq 2 42640 NULL
26397 +br_mdb_rehash_42643 br_mdb_rehash 2 42643 NULL
26398 -+parport_pc_compat_write_block_pio_42644 parport_pc_compat_write_block_pio 3 42644 NULL
26399 ++parport_pc_compat_write_block_pio_42644 parport_pc_compat_write_block_pio 3 42644 NULL nohasharray
26400 ++num_controllers_42644 num_controllers 0 42644 &parport_pc_compat_write_block_pio_42644
26401 +_regmap_raw_write_42652 _regmap_raw_write 4-2 42652 NULL
26402 +request_key_and_link_42693 request_key_and_link 4 42693 NULL
26403 +vb2_read_42703 vb2_read 3 42703 NULL
26404 @@ -122871,11 +121157,13 @@ index 0000000..9addbd7
26405 +sta_last_rx_rate_read_42909 sta_last_rx_rate_read 3 42909 NULL
26406 +sctp_getsockopt_maxburst_42941 sctp_getsockopt_maxburst 2 42941 NULL
26407 +vx_reset_chk_42946 vx_reset_chk 0 42946 NULL
26408 ++ntb_setup_snb_msix_42971 ntb_setup_snb_msix 2 42971 NULL
26409 +compat_udpv6_setsockopt_42981 compat_udpv6_setsockopt 5 42981 NULL
26410 +nfs_idmap_get_desc_42990 nfs_idmap_get_desc 4-2 42990 NULL nohasharray
26411 +rtw_os_xmit_resource_alloc_42990 rtw_os_xmit_resource_alloc 3 42990 &nfs_idmap_get_desc_42990
26412 +isr_rx_mem_overflow_read_43025 isr_rx_mem_overflow_read 3 43025 NULL
26413 +wep_default_key_count_read_43035 wep_default_key_count_read 3 43035 NULL
26414 ++__bioset_create_43059 __bioset_create 1 43059 NULL
26415 +nouveau_gpuobj_create__43072 nouveau_gpuobj_create_ 9 43072 NULL
26416 +nfs_map_group_to_gid_43082 nfs_map_group_to_gid 3 43082 NULL
26417 +_xfer_secondary_pool_43089 _xfer_secondary_pool 2 43089 NULL
26418 @@ -123015,6 +121303,7 @@ index 0000000..9addbd7
26419 +mpi_resize_44674 mpi_resize 2 44674 NULL
26420 +sysfs_create_link_44685 sysfs_create_link 0 44685 NULL
26421 +ts_read_44687 ts_read 3 44687 NULL
26422 ++write_file_spectral_bins_44696 write_file_spectral_bins 3 44696 NULL
26423 +lov_emerg_alloc_44698 lov_emerg_alloc 1 44698 NULL
26424 +C_SYSC_select_44701 C_SYSC_select 1 44701 NULL
26425 +__generic_block_fiemap_44713 __generic_block_fiemap 4 44713 NULL nohasharray
26426 @@ -123023,6 +121312,7 @@ index 0000000..9addbd7
26427 +_zd_iowrite32v_locked_44725 _zd_iowrite32v_locked 3 44725 NULL
26428 +clusterip_proc_write_44729 clusterip_proc_write 3 44729 NULL
26429 +fib_count_nexthops_44730 fib_count_nexthops 0 44730 NULL
26430 ++efx_wanted_parallelism_44732 efx_wanted_parallelism 0 44732 NULL
26431 +key_tx_rx_count_read_44742 key_tx_rx_count_read 3 44742 NULL
26432 +bch_bio_max_sectors_44755 bch_bio_max_sectors 0 44755 NULL
26433 +tnode_new_44757 tnode_new 3 44757 NULL nohasharray
26434 @@ -123177,6 +121467,7 @@ index 0000000..9addbd7
26435 +mthca_alloc_cq_buf_46512 mthca_alloc_cq_buf 3 46512 NULL
26436 +kmsg_read_46514 kmsg_read 3 46514 NULL nohasharray
26437 +nouveau_drm_ioctl_46514 nouveau_drm_ioctl 2 46514 &kmsg_read_46514
26438 ++nlm_end_grace_write_46517 nlm_end_grace_write 3 46517 NULL
26439 +nl80211_send_rx_assoc_46538 nl80211_send_rx_assoc 4 46538 NULL
26440 +__btrfs_free_extent_46573 __btrfs_free_extent 7 46573 NULL
26441 +dn_current_mss_46574 dn_current_mss 0 46574 NULL
26442 @@ -123209,6 +121500,7 @@ index 0000000..9addbd7
26443 +lov_iocontrol_46876 lov_iocontrol 3 46876 NULL
26444 +ixgbe_dbg_reg_ops_write_46895 ixgbe_dbg_reg_ops_write 3 46895 NULL
26445 +sk_mem_pages_46896 sk_mem_pages 0-1 46896 NULL
26446 ++alloc_cmdid_46904 alloc_cmdid 0 46904 NULL
26447 +ieee80211_if_fmt_power_mode_46906 ieee80211_if_fmt_power_mode 3 46906 NULL
26448 +wlcore_alloc_hw_46917 wlcore_alloc_hw 1-3 46917 NULL
26449 +fb_write_46924 fb_write 3 46924 NULL
26450 @@ -123241,8 +121533,10 @@ index 0000000..9addbd7
26451 +vsnprintf_47291 vsnprintf 0 47291 NULL
26452 +SYSC_semop_47292 SYSC_semop 3 47292 NULL
26453 +tx_internal_desc_overflow_read_47300 tx_internal_desc_overflow_read 3 47300 NULL
26454 ++virtqueue_add_47306 virtqueue_add 3 47306 NULL
26455 +nouveau_fb_create__47316 nouveau_fb_create_ 4 47316 NULL
26456 +ieee80211_if_read_dot11MeshHoldingTimeout_47356 ieee80211_if_read_dot11MeshHoldingTimeout 3 47356 NULL
26457 ++nvme_submit_admin_cmd_47357 nvme_submit_admin_cmd 0 47357 NULL
26458 +avc_get_hash_stats_47359 avc_get_hash_stats 0 47359 NULL
26459 +kvm_arch_create_memslot_47364 kvm_arch_create_memslot 3 47364 NULL nohasharray
26460 +__output_copy_user_47364 __output_copy_user 3 47364 &kvm_arch_create_memslot_47364
26461 @@ -123298,6 +121592,7 @@ index 0000000..9addbd7
26462 +W6692_empty_Bfifo_47804 W6692_empty_Bfifo 2 47804 NULL
26463 +lov_packmd_47810 lov_packmd 0 47810 NULL
26464 +tree_mod_log_insert_move_47823 tree_mod_log_insert_move 5 47823 NULL
26465 ++read_file_spectral_bins_47829 read_file_spectral_bins 3 47829 NULL
26466 +pinconf_dbg_config_write_47835 pinconf_dbg_config_write 3 47835 NULL
26467 +KEY_SIZE_47855 KEY_SIZE 0 47855 NULL
26468 +vhci_read_47878 vhci_read 3 47878 NULL
26469 @@ -123305,6 +121600,7 @@ index 0000000..9addbd7
26470 +cfs_percpt_alloc_47918 cfs_percpt_alloc 2 47918 NULL
26471 +comedi_write_47926 comedi_write 3 47926 NULL
26472 +nvme_trans_get_blk_desc_len_47946 nvme_trans_get_blk_desc_len 0-2 47946 NULL
26473 ++arch_setup_msi_irq_47959 arch_setup_msi_irq 0 47959 NULL
26474 +gether_get_ifname_47972 gether_get_ifname 3 47972 NULL
26475 +mempool_resize_47983 mempool_resize 2 47983 NULL nohasharray
26476 +iwl_dbgfs_ucode_tracing_read_47983 iwl_dbgfs_ucode_tracing_read 3 47983 &mempool_resize_47983
26477 @@ -123418,7 +121714,8 @@ index 0000000..9addbd7
26478 +compat_do_readv_writev_49102 compat_do_readv_writev 4 49102 NULL
26479 +xfrm_replay_state_esn_len_49119 xfrm_replay_state_esn_len 0 49119 NULL
26480 +ll_max_cached_mb_seq_write_49122 ll_max_cached_mb_seq_write 3 49122 NULL
26481 -+pt_read_49136 pt_read 3 49136 NULL
26482 ++pt_read_49136 pt_read 3 49136 NULL nohasharray
26483 ++netxen_setup_msi_interrupts_49136 netxen_setup_msi_interrupts 2 49136 &pt_read_49136
26484 +ipwireless_tty_received_49154 ipwireless_tty_received 3 49154 NULL
26485 +f2fs_acl_count_49155 f2fs_acl_count 0-1 49155 NULL
26486 +ipw_queue_tx_init_49161 ipw_queue_tx_init 3 49161 NULL
26487 @@ -123501,6 +121798,7 @@ index 0000000..9addbd7
26488 +security_context_to_sid_50019 security_context_to_sid 2 50019 NULL
26489 +isdn_read_50021 isdn_read 3 50021 NULL
26490 +mdc_rename_pack_50023 mdc_rename_pack 4-6 50023 NULL
26491 ++xlog_recovery_process_trans_50028 xlog_recovery_process_trans 4 50028 NULL
26492 +brcmf_debugfs_chipinfo_read_50033 brcmf_debugfs_chipinfo_read 3 50033 NULL
26493 +ioread8_50049 ioread8 0 50049 NULL
26494 +fuse_conn_max_background_write_50061 fuse_conn_max_background_write 3 50061 NULL
26495 @@ -123604,12 +121902,15 @@ index 0000000..9addbd7
26496 +srpt_alloc_ioctx_51042 srpt_alloc_ioctx 2-3 51042 NULL
26497 +do_arpt_set_ctl_51053 do_arpt_set_ctl 4 51053 NULL
26498 +wusb_prf_64_51065 wusb_prf_64 7 51065 NULL
26499 ++rsc_mgr_init_51067 rsc_mgr_init 3 51067 NULL
26500 +jbd2_journal_init_revoke_51088 jbd2_journal_init_revoke 2 51088 NULL
26501 ++__ipv4_tun_to_nlattr_51095 __ipv4_tun_to_nlattr 4 51095 NULL
26502 +__ocfs2_find_path_51096 __ocfs2_find_path 0 51096 NULL
26503 +ti_recv_51110 ti_recv 3 51110 NULL
26504 +alloc_rtllib_51136 alloc_rtllib 1 51136 NULL
26505 +simple_xattr_set_51140 simple_xattr_set 4 51140 NULL
26506 +xfs_trans_get_efd_51148 xfs_trans_get_efd 3 51148 NULL
26507 ++i40evf_acquire_msix_vectors_51190 i40evf_acquire_msix_vectors 2 51190 NULL
26508 +iwl_dbgfs_bcast_filters_macs_read_51231 iwl_dbgfs_bcast_filters_macs_read 3 51231 NULL
26509 +nf_ct_ext_create_51232 nf_ct_ext_create 3 51232 NULL
26510 +snd_pcm_write_51235 snd_pcm_write 3 51235 NULL
26511 @@ -123634,6 +121935,7 @@ index 0000000..9addbd7
26512 +hfsplus_brec_read_51436 hfsplus_brec_read 0 51436 NULL
26513 +ieee80211_if_read_dot11MeshHWMPRootMode_51441 ieee80211_if_read_dot11MeshHWMPRootMode 3 51441 NULL
26514 +print_devstats_dot11ACKFailureCount_51443 print_devstats_dot11ACKFailureCount 3 51443 NULL
26515 ++vmxnet3_acquire_msix_vectors_51462 vmxnet3_acquire_msix_vectors 2 51462 NULL
26516 +____alloc_ei_netdev_51475 ____alloc_ei_netdev 1 51475 NULL
26517 +xfs_buf_get_uncached_51477 xfs_buf_get_uncached 2 51477 NULL
26518 +osc_brw_internal_51489 osc_brw_internal 5 51489 NULL
26519 @@ -123781,6 +122083,7 @@ index 0000000..9addbd7
26520 +pvr2_ctrl_value_to_sym_internal_52881 pvr2_ctrl_value_to_sym_internal 5 52881 NULL
26521 +cache_read_procfs_52882 cache_read_procfs 3 52882 NULL
26522 +kvm_kvzalloc_52894 kvm_kvzalloc 1 52894 NULL
26523 ++copy_from_iter_bvec_52912 copy_from_iter_bvec 0-2 52912 NULL
26524 +dio_bio_reap_52913 dio_bio_reap 0 52913 NULL
26525 +__kfifo_out_peek_r_52919 __kfifo_out_peek_r 3 52919 NULL
26526 +iblock_get_bio_52936 iblock_get_bio 3 52936 NULL
26527 @@ -123794,10 +122097,12 @@ index 0000000..9addbd7
26528 +bio_cur_bytes_53037 bio_cur_bytes 0 53037 NULL
26529 +nv50_chan_create_53039 nv50_chan_create 5 53039 NULL
26530 +regcache_lzo_block_count_53056 regcache_lzo_block_count 0 53056 NULL
26531 ++fimc_get_alpha_mask_53057 fimc_get_alpha_mask 0 53057 NULL
26532 +cfi_read_query_53066 cfi_read_query 0 53066 NULL
26533 +iwl_dbgfs_interrupt_write_53069 iwl_dbgfs_interrupt_write 3 53069 NULL
26534 +mwifiex_debug_read_53074 mwifiex_debug_read 3 53074 NULL
26535 +mic_virtio_copy_from_user_53107 mic_virtio_copy_from_user 3 53107 NULL
26536 ++ath10k_mac_create_53118 ath10k_mac_create 1 53118 NULL
26537 +verity_status_53120 verity_status 5 53120 NULL
26538 +brcmf_usb_dl_cmd_53130 brcmf_usb_dl_cmd 4 53130 NULL
26539 +ps_poll_ps_poll_max_ap_turn_read_53140 ps_poll_ps_poll_max_ap_turn_read 3 53140 NULL
26540 @@ -123890,6 +122195,7 @@ index 0000000..9addbd7
26541 +pi_read_regr_54231 pi_read_regr 0 54231 NULL
26542 +mcp23s08_read_regs_54246 mcp23s08_read_regs 4 54246 NULL
26543 +reada_add_block_54247 reada_add_block 2 54247 NULL
26544 ++write_file_spec_scan_ctl_54248 write_file_spec_scan_ctl 3 54248 NULL
26545 +xfs_dir2_sf_addname_hard_54254 xfs_dir2_sf_addname_hard 3 54254 NULL
26546 +ceph_msgpool_get_54258 ceph_msgpool_get 2 54258 NULL
26547 +audio_write_54261 audio_write 4 54261 NULL nohasharray
26548 @@ -123901,6 +122207,7 @@ index 0000000..9addbd7
26549 +dlm_alloc_pagevec_54296 dlm_alloc_pagevec 1 54296 NULL
26550 +reclaim_pages_54301 reclaim_pages 3 54301 NULL
26551 +sprintf_54306 sprintf 0 54306 NULL
26552 ++path_setxattr_54308 path_setxattr 4 54308 NULL
26553 +bio_add_pc_page_54319 bio_add_pc_page 4 54319 NULL
26554 +br_fdb_fillbuf_54339 br_fdb_fillbuf 0 54339 NULL
26555 +__alloc_dev_table_54343 __alloc_dev_table 2 54343 NULL
26556 @@ -123911,7 +122218,8 @@ index 0000000..9addbd7
26557 +do_dccp_setsockopt_54377 do_dccp_setsockopt 5 54377 &intel_sdvo_write_cmd_54377
26558 +ah_alloc_tmp_54378 ah_alloc_tmp 3-2 54378 NULL
26559 +snd_pcm_oss_read2_54387 snd_pcm_oss_read2 0-3 54387 NULL
26560 -+iwl_dbgfs_power_save_status_read_54392 iwl_dbgfs_power_save_status_read 3 54392 NULL
26561 ++iwl_dbgfs_power_save_status_read_54392 iwl_dbgfs_power_save_status_read 3 54392 NULL nohasharray
26562 ++hash_mac4_expire_54392 hash_mac4_expire 4 54392 &iwl_dbgfs_power_save_status_read_54392
26563 +ll_ra_count_get_54410 ll_ra_count_get 3 54410 NULL
26564 +copy_gadget_strings_54417 copy_gadget_strings 2-3 54417 NULL
26565 +sparse_early_mem_maps_alloc_node_54485 sparse_early_mem_maps_alloc_node 4 54485 NULL
26566 @@ -123934,6 +122242,7 @@ index 0000000..9addbd7
26567 +irq_timeout_read_54653 irq_timeout_read 3 54653 NULL
26568 +dns_resolver_read_54658 dns_resolver_read 3 54658 NULL
26569 +twl6030_interrupt_mask_54659 twl6030_interrupt_mask 2 54659 NULL
26570 ++simple_alloc_urb_54661 simple_alloc_urb 3 54661 NULL
26571 +tdp_page_fault_54663 tdp_page_fault 2 54663 NULL
26572 +bus_add_device_54665 bus_add_device 0 54665 NULL
26573 +cw1200_queue_stats_init_54670 cw1200_queue_stats_init 2 54670 NULL
26574 @@ -123991,6 +122300,7 @@ index 0000000..9addbd7
26575 +sched_feat_write_55202 sched_feat_write 3 55202 NULL
26576 +ht40allow_map_read_55209 ht40allow_map_read 3 55209 NULL
26577 +__kfifo_dma_out_prepare_r_55211 __kfifo_dma_out_prepare_r 4-5 55211 NULL
26578 ++mlx4_load_one_55213 mlx4_load_one 3 55213 NULL
26579 +do_raw_setsockopt_55215 do_raw_setsockopt 5 55215 NULL
26580 +qxl_alloc_client_monitors_config_55216 qxl_alloc_client_monitors_config 2 55216 NULL
26581 +nouveau_mc_create__55217 nouveau_mc_create_ 4 55217 NULL
26582 @@ -124104,7 +122414,8 @@ index 0000000..9addbd7
26583 +ocfs2_control_read_56405 ocfs2_control_read 3 56405 NULL
26584 +store_msg_56417 store_msg 3 56417 NULL
26585 +pppol2tp_sendmsg_56420 pppol2tp_sendmsg 4 56420 NULL
26586 -+l2cap_segment_le_sdu_56426 l2cap_segment_le_sdu 4 56426 NULL
26587 ++l2cap_segment_le_sdu_56426 l2cap_segment_le_sdu 4 56426 NULL nohasharray
26588 ++nvme_submit_cmd_56426 nvme_submit_cmd 0 56426 &l2cap_segment_le_sdu_56426
26589 +lprocfs_fid_space_seq_write_56431 lprocfs_fid_space_seq_write 3 56431 NULL nohasharray
26590 +ec_dbgfs_cmd_read_56431 ec_dbgfs_cmd_read 3 56431 &lprocfs_fid_space_seq_write_56431
26591 +fl_create_56435 fl_create 5 56435 NULL
26592 @@ -124209,6 +122520,7 @@ index 0000000..9addbd7
26593 +bzImage64_load_57388 bzImage64_load 7 57388 NULL
26594 +read_file_blob_57406 read_file_blob 3 57406 NULL
26595 +enclosure_register_57412 enclosure_register 3 57412 NULL
26596 ++read_file_eeprom_57428 read_file_eeprom 3 57428 NULL
26597 +compat_keyctl_instantiate_key_iov_57431 compat_keyctl_instantiate_key_iov 3 57431 NULL
26598 +copy_to_user_fromio_57432 copy_to_user_fromio 3 57432 NULL
26599 +__roundup_pow_of_two_57461 __roundup_pow_of_two 0 57461 NULL
26600 @@ -124233,6 +122545,7 @@ index 0000000..9addbd7
26601 +ldlm_cli_enqueue_local_57582 ldlm_cli_enqueue_local 11 57582 NULL
26602 +il_dbgfs_interrupt_write_57591 il_dbgfs_interrupt_write 3 57591 NULL
26603 +read_file_spectral_fft_period_57593 read_file_spectral_fft_period 3 57593 NULL
26604 ++copy_to_iter_bvec_57604 copy_to_iter_bvec 0-2 57604 NULL
26605 +tx_tx_retry_template_read_57623 tx_tx_retry_template_read 3 57623 NULL
26606 +sisusbcon_putcs_57630 sisusbcon_putcs 3 57630 NULL
26607 +mem_read_57631 mem_read 3 57631 NULL
26608 @@ -124310,6 +122623,7 @@ index 0000000..9addbd7
26609 +nv_rd08_58472 nv_rd08 0 58472 NULL
26610 +snd_gf1_read_addr_58483 snd_gf1_read_addr 0 58483 NULL
26611 +snd_rme96_capture_copy_58484 snd_rme96_capture_copy 5 58484 NULL
26612 ++dw_spi_show_regs_58486 dw_spi_show_regs 3 58486 NULL
26613 +btrfs_cont_expand_58498 btrfs_cont_expand 2-3 58498 NULL
26614 +tcf_hash_create_58507 tcf_hash_create 4 58507 NULL
26615 +cifs_write_from_iter_58526 cifs_write_from_iter 2 58526 NULL
26616 @@ -124394,6 +122708,7 @@ index 0000000..9addbd7
26617 +ib_copy_from_udata_59502 ib_copy_from_udata 3 59502 NULL
26618 +C_SYSC_get_mempolicy_59516 C_SYSC_get_mempolicy 3 59516 NULL
26619 +mic_vringh_copy_59523 mic_vringh_copy 4 59523 NULL
26620 ++msix_setup_entries_59545 msix_setup_entries 0 59545 NULL
26621 +mpi_get_nbits_59551 mpi_get_nbits 0 59551 NULL
26622 +tunables_write_59563 tunables_write 3 59563 NULL
26623 +bio_split_59564 bio_split 2 59564 NULL
26624 @@ -124458,6 +122773,7 @@ index 0000000..9addbd7
26625 +ieee80211_if_fmt_fwded_frames_60103 ieee80211_if_fmt_fwded_frames 3 60103 NULL
26626 +SYSC_msgsnd_60113 SYSC_msgsnd 3 60113 NULL
26627 +nfs_idmap_request_key_60124 nfs_idmap_request_key 2 60124 NULL
26628 ++pcpu_need_to_extend_60133 pcpu_need_to_extend 0 60133 NULL
26629 +__mutex_lock_common_60134 __mutex_lock_common 0 60134 NULL
26630 +ld_usb_read_60156 ld_usb_read 3 60156 NULL
26631 +jmb38x_ms_count_slots_60164 jmb38x_ms_count_slots 0 60164 NULL
26632 @@ -124465,7 +122781,8 @@ index 0000000..9addbd7
26633 +jffs2_alloc_full_dirent_60179 jffs2_alloc_full_dirent 1 60179 NULL nohasharray
26634 +sg_build_sgat_60179 sg_build_sgat 3 60179 &jffs2_alloc_full_dirent_60179
26635 +fuse_async_req_send_60183 fuse_async_req_send 0-3 60183 NULL
26636 -+rx_rx_tkip_replays_read_60193 rx_rx_tkip_replays_read 3 60193 NULL
26637 ++rx_rx_tkip_replays_read_60193 rx_rx_tkip_replays_read 3 60193 NULL nohasharray
26638 ++arch_setup_msi_irqs_60193 arch_setup_msi_irqs 0 60193 &rx_rx_tkip_replays_read_60193
26639 +qib_reg_phys_mr_60202 qib_reg_phys_mr 3 60202 NULL
26640 +btrfs_get_token_16_60220 btrfs_get_token_16 0 60220 NULL
26641 +irq_alloc_domain_generic_chips_60264 irq_alloc_domain_generic_chips 2-3 60264 NULL
26642 @@ -124524,6 +122841,7 @@ index 0000000..9addbd7
26643 +ath6kl_lrssi_roam_read_61022 ath6kl_lrssi_roam_read 3 61022 NULL
26644 +graph_depth_write_61024 graph_depth_write 3 61024 NULL
26645 +sdhci_pltfm_register_61031 sdhci_pltfm_register 3 61031 NULL
26646 ++read_file_ackto_61037 read_file_ackto 3 61037 NULL
26647 +lpfc_idiag_queacc_write_61043 lpfc_idiag_queacc_write 3 61043 NULL
26648 +symtab_init_61050 symtab_init 2 61050 NULL
26649 +fuse_send_write_61053 fuse_send_write 0-4 61053 NULL
26650 @@ -124543,6 +122861,7 @@ index 0000000..9addbd7
26651 +arch_hibernation_header_save_61212 arch_hibernation_header_save 0 61212 NULL
26652 +smk_read_ambient_61220 smk_read_ambient 3 61220 NULL
26653 +v9fs_mmap_file_read_61262 v9fs_mmap_file_read 3 61262 NULL
26654 ++kvm_age_hva_61267 kvm_age_hva 2-3 61267 NULL
26655 +find_get_pages_tag_61270 find_get_pages_tag 0 61270 NULL nohasharray
26656 +btrfs_bio_alloc_61270 btrfs_bio_alloc 3 61270 &find_get_pages_tag_61270 nohasharray
26657 +ifalias_store_61270 ifalias_store 4 61270 &btrfs_bio_alloc_61270
26658 @@ -124557,6 +122876,7 @@ index 0000000..9addbd7
26659 +rx_rx_wa_ba_not_expected_read_61341 rx_rx_wa_ba_not_expected_read 3 61341 NULL
26660 +__dm_get_reserved_ios_61342 __dm_get_reserved_ios 0-3-2 61342 NULL
26661 +f1x_map_sysaddr_to_csrow_61344 f1x_map_sysaddr_to_csrow 2 61344 NULL
26662 ++wil_write_file_recovery_61354 wil_write_file_recovery 3 61354 NULL
26663 +debug_debug4_read_61367 debug_debug4_read 3 61367 NULL
26664 +system_enable_write_61396 system_enable_write 3 61396 NULL
26665 +xfs_zero_remaining_bytes_61423 xfs_zero_remaining_bytes 3 61423 NULL
26666 @@ -124599,6 +122919,7 @@ index 0000000..9addbd7
26667 +bfad_debugfs_write_regwr_61841 bfad_debugfs_write_regwr 3 61841 NULL
26668 +regcache_sync_block_61846 regcache_sync_block 5-4 61846 NULL
26669 +ath9k_hw_def_dump_eeprom_61853 ath9k_hw_def_dump_eeprom 5-4 61853 NULL
26670 ++__skb_flow_dissect_61855 __skb_flow_dissect 5 61855 NULL
26671 +evdev_compute_buffer_size_61863 evdev_compute_buffer_size 0 61863 NULL
26672 +SYSC_lsetxattr_61869 SYSC_lsetxattr 4 61869 NULL
26673 +get_fw_name_61874 get_fw_name 3 61874 NULL
26674 @@ -124622,6 +122943,7 @@ index 0000000..9addbd7
26675 +SyS_setxattr_62019 SyS_setxattr 4 62019 NULL
26676 +jffs2_do_unlink_62020 jffs2_do_unlink 4 62020 NULL
26677 +SYSC_select_62024 SYSC_select 1 62024 NULL
26678 ++comedi_write_array_to_buffer_62032 comedi_write_array_to_buffer 3 62032 NULL
26679 +pmcraid_build_passthrough_ioadls_62034 pmcraid_build_passthrough_ioadls 2 62034 NULL
26680 +sctp_user_addto_chunk_62047 sctp_user_addto_chunk 2-3 62047 NULL
26681 +do_pselect_62061 do_pselect 1 62061 NULL
26682 @@ -124685,6 +123007,7 @@ index 0000000..9addbd7
26683 +ptlrpc_req_set_repsize_62784 ptlrpc_req_set_repsize 2 62784 NULL
26684 +SyS_sched_getaffinity_62786 SyS_sched_getaffinity 2 62786 NULL
26685 +dm_stats_account_io_62787 dm_stats_account_io 3 62787 NULL
26686 ++__add_action_62798 __add_action 4 62798 NULL
26687 +tracing_total_entries_read_62817 tracing_total_entries_read 3 62817 NULL
26688 +__rounddown_pow_of_two_62836 __rounddown_pow_of_two 0 62836 NULL
26689 +bio_get_nr_vecs_62838 bio_get_nr_vecs 0 62838 NULL
26690 @@ -124754,6 +123077,7 @@ index 0000000..9addbd7
26691 +write_file_spectral_fft_period_63696 write_file_spectral_fft_period 3 63696 NULL
26692 +nouveau_object_create__63715 nouveau_object_create_ 5 63715 NULL
26693 +btrfs_insert_delayed_dir_index_63720 btrfs_insert_delayed_dir_index 4 63720 NULL
26694 ++ntb_debugfs_read_63728 ntb_debugfs_read 3 63728 NULL
26695 +selinux_secctx_to_secid_63744 selinux_secctx_to_secid 2 63744 NULL
26696 +snd_pcm_oss_read1_63771 snd_pcm_oss_read1 3 63771 NULL
26697 +snd_opl4_mem_proc_read_63774 snd_opl4_mem_proc_read 5 63774 NULL
26698 @@ -124779,6 +123103,7 @@ index 0000000..9addbd7
26699 +SyS_rt_sigpending_64018 SyS_rt_sigpending 2 64018 NULL
26700 +dbAllocDmapLev_64030 dbAllocDmapLev 0 64030 NULL
26701 +SyS_fsetxattr_64039 SyS_fsetxattr 4 64039 NULL
26702 ++nl80211_send_rx_assoc_64040 nl80211_send_rx_assoc 4 64040 NULL
26703 +__sock_create_64069 __sock_create 0 64069 NULL
26704 +get_u8_64076 get_u8 0 64076 NULL
26705 +xilly_malloc_64077 xilly_malloc 2 64077 NULL
26706 @@ -124814,9 +123139,11 @@ index 0000000..9addbd7
26707 +sisusbcon_clear_64329 sisusbcon_clear 4-3-5 64329 NULL
26708 +ts_write_64336 ts_write 3 64336 NULL
26709 +usbtmc_write_64340 usbtmc_write 3 64340 NULL
26710 ++qlcnic_82xx_calculate_msix_vector_64354 qlcnic_82xx_calculate_msix_vector 0 64354 NULL
26711 +user_regset_copyin_64360 user_regset_copyin 7 64360 NULL
26712 +wlc_phy_loadsampletable_nphy_64367 wlc_phy_loadsampletable_nphy 3 64367 NULL
26713 -+reg_create_64372 reg_create 5 64372 NULL
26714 ++reg_create_64372 reg_create 5 64372 NULL nohasharray
26715 ++bnx2_enable_msix_64372 bnx2_enable_msix 2 64372 &reg_create_64372
26716 +ilo_write_64378 ilo_write 3 64378 NULL
26717 +btrfs_map_block_64379 btrfs_map_block 3 64379 NULL
26718 +vmcs_readl_64381 vmcs_readl 0 64381 NULL
26719 @@ -124887,6 +123214,7 @@ index 0000000..9addbd7
26720 +batadv_socket_write_65083 batadv_socket_write 3 65083 NULL
26721 +ocfs2_truncate_cluster_pages_65086 ocfs2_truncate_cluster_pages 2 65086 NULL
26722 +ath9k_dump_mci_btcoex_65090 ath9k_dump_mci_btcoex 0-3 65090 NULL
26723 ++usbtest_alloc_urb_65115 usbtest_alloc_urb 3-5 65115 NULL
26724 +rx_rx_done_read_65217 rx_rx_done_read 3 65217 NULL
26725 +nouveau_event_create_65229 nouveau_event_create 2-1 65229 NULL
26726 +print_endpoint_stat_65232 print_endpoint_stat 0-4-3 65232 NULL
26727 @@ -126350,10 +124678,10 @@ index 88461f0..6fb70a0 100644
26728
26729 #endif /* _TOOLS_LINUX_COMPILER_H */
26730 diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile
26731 -index ce00f7e..0aca5e4 100644
26732 +index 36c08b1..87c72d1 100644
26733 --- a/tools/lib/api/Makefile
26734 +++ b/tools/lib/api/Makefile
26735 -@@ -16,7 +16,7 @@ LIB_OBJS += $(OUTPUT)fs/fs.o
26736 +@@ -21,7 +21,7 @@ LIB_OBJS += $(OUTPUT)fd/array.o
26737
26738 LIBFILE = libapikfs.a
26739
26740 @@ -126388,10 +124716,10 @@ index 0a578fe..b81f62d 100644
26741 })
26742
26743 diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
26744 -index 6a3f29b..a1d2e93 100644
26745 +index 3cee7b1..29cb7d8 100644
26746 --- a/virt/kvm/kvm_main.c
26747 +++ b/virt/kvm/kvm_main.c
26748 -@@ -77,12 +77,17 @@ LIST_HEAD(vm_list);
26749 +@@ -78,12 +78,17 @@ LIST_HEAD(vm_list);
26750
26751 static cpumask_var_t cpus_hardware_enabled;
26752 static int kvm_usage_count = 0;
26753 @@ -126411,7 +124739,7 @@ index 6a3f29b..a1d2e93 100644
26754
26755 struct dentry *kvm_debugfs_dir;
26756
26757 -@@ -780,7 +785,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
26758 +@@ -786,7 +791,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
26759 /* We can read the guest memory with __xxx_user() later on. */
26760 if ((mem->slot < KVM_USER_MEM_SLOTS) &&
26761 ((mem->userspace_addr & (PAGE_SIZE - 1)) ||
26762 @@ -126420,7 +124748,7 @@ index 6a3f29b..a1d2e93 100644
26763 (void __user *)(unsigned long)mem->userspace_addr,
26764 mem->memory_size)))
26765 goto out;
26766 -@@ -1637,9 +1642,17 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_cached);
26767 +@@ -1690,9 +1695,17 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_cached);
26768
26769 int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len)
26770 {
26771 @@ -126440,7 +124768,7 @@ index 6a3f29b..a1d2e93 100644
26772 }
26773 EXPORT_SYMBOL_GPL(kvm_clear_guest_page);
26774
26775 -@@ -1889,7 +1902,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
26776 +@@ -1941,7 +1954,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
26777 return 0;
26778 }
26779
26780 @@ -126449,7 +124777,7 @@ index 6a3f29b..a1d2e93 100644
26781 .release = kvm_vcpu_release,
26782 .unlocked_ioctl = kvm_vcpu_ioctl,
26783 #ifdef CONFIG_COMPAT
26784 -@@ -2593,7 +2606,7 @@ out:
26785 +@@ -2650,7 +2663,7 @@ out:
26786 }
26787 #endif
26788
26789 @@ -126458,7 +124786,7 @@ index 6a3f29b..a1d2e93 100644
26790 .release = kvm_vm_release,
26791 .unlocked_ioctl = kvm_vm_ioctl,
26792 #ifdef CONFIG_COMPAT
26793 -@@ -2666,7 +2679,7 @@ out:
26794 +@@ -2721,7 +2734,7 @@ out:
26795 return r;
26796 }
26797
26798 @@ -126467,7 +124795,7 @@ index 6a3f29b..a1d2e93 100644
26799 .unlocked_ioctl = kvm_dev_ioctl,
26800 .compat_ioctl = kvm_dev_ioctl,
26801 .llseek = noop_llseek,
26802 -@@ -2692,7 +2705,7 @@ static void hardware_enable_nolock(void *junk)
26803 +@@ -2747,7 +2760,7 @@ static void hardware_enable_nolock(void *junk)
26804
26805 if (r) {
26806 cpumask_clear_cpu(cpu, cpus_hardware_enabled);
26807 @@ -126476,7 +124804,7 @@ index 6a3f29b..a1d2e93 100644
26808 printk(KERN_INFO "kvm: enabling virtualization on "
26809 "CPU%d failed\n", cpu);
26810 }
26811 -@@ -2748,10 +2761,10 @@ static int hardware_enable_all(void)
26812 +@@ -2803,10 +2816,10 @@ static int hardware_enable_all(void)
26813
26814 kvm_usage_count++;
26815 if (kvm_usage_count == 1) {
26816 @@ -126489,7 +124817,7 @@ index 6a3f29b..a1d2e93 100644
26817 hardware_disable_all_nolock();
26818 r = -EBUSY;
26819 }
26820 -@@ -3156,7 +3169,7 @@ static void kvm_sched_out(struct preempt_notifier *pn,
26821 +@@ -3213,7 +3226,7 @@ static void kvm_sched_out(struct preempt_notifier *pn,
26822 kvm_arch_vcpu_put(vcpu);
26823 }
26824
26825 @@ -126498,7 +124826,7 @@ index 6a3f29b..a1d2e93 100644
26826 struct module *module)
26827 {
26828 int r;
26829 -@@ -3203,7 +3216,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
26830 +@@ -3260,7 +3273,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
26831 if (!vcpu_align)
26832 vcpu_align = __alignof__(struct kvm_vcpu);
26833 kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size, vcpu_align,
26834 @@ -126507,7 +124835,7 @@ index 6a3f29b..a1d2e93 100644
26835 if (!kvm_vcpu_cache) {
26836 r = -ENOMEM;
26837 goto out_free_3;
26838 -@@ -3213,9 +3226,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
26839 +@@ -3270,9 +3283,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
26840 if (r)
26841 goto out_free;
26842
26843 @@ -126519,7 +124847,7 @@ index 6a3f29b..a1d2e93 100644
26844
26845 r = misc_register(&kvm_dev);
26846 if (r) {
26847 -@@ -3225,9 +3240,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
26848 +@@ -3282,9 +3297,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
26849
26850 register_syscore_ops(&kvm_syscore_ops);
26851
26852
26853 diff --git a/3.17.7/4425_grsec_remove_EI_PAX.patch b/3.18.1/4425_grsec_remove_EI_PAX.patch
26854 similarity index 100%
26855 rename from 3.17.7/4425_grsec_remove_EI_PAX.patch
26856 rename to 3.18.1/4425_grsec_remove_EI_PAX.patch
26857
26858 diff --git a/3.17.7/4427_force_XATTR_PAX_tmpfs.patch b/3.18.1/4427_force_XATTR_PAX_tmpfs.patch
26859 similarity index 95%
26860 rename from 3.17.7/4427_force_XATTR_PAX_tmpfs.patch
26861 rename to 3.18.1/4427_force_XATTR_PAX_tmpfs.patch
26862 index 21c0171..22c9273 100644
26863 --- a/3.17.7/4427_force_XATTR_PAX_tmpfs.patch
26864 +++ b/3.18.1/4427_force_XATTR_PAX_tmpfs.patch
26865 @@ -6,7 +6,7 @@ namespace supported on tmpfs so that the PaX markings survive emerge.
26866 diff -Naur a/mm/shmem.c b/mm/shmem.c
26867 --- a/mm/shmem.c 2013-06-11 21:00:18.000000000 -0400
26868 +++ b/mm/shmem.c 2013-06-11 21:08:18.000000000 -0400
26869 -@@ -2524,11 +2524,7 @@
26870 +@@ -2558,11 +2558,7 @@
26871 static int shmem_xattr_validate(const char *name)
26872 {
26873 struct { const char *prefix; size_t len; } arr[] = {
26874 @@ -18,7 +18,7 @@ diff -Naur a/mm/shmem.c b/mm/shmem.c
26875 { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN },
26876 { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN }
26877 };
26878 -@@ -2584,14 +2580,12 @@
26879 +@@ -2618,14 +2614,12 @@
26880 if (err)
26881 return err;
26882
26883
26884 diff --git a/3.17.7/4430_grsec-remove-localversion-grsec.patch b/3.18.1/4430_grsec-remove-localversion-grsec.patch
26885 similarity index 100%
26886 rename from 3.17.7/4430_grsec-remove-localversion-grsec.patch
26887 rename to 3.18.1/4430_grsec-remove-localversion-grsec.patch
26888
26889 diff --git a/3.17.7/4435_grsec-mute-warnings.patch b/3.18.1/4435_grsec-mute-warnings.patch
26890 similarity index 76%
26891 rename from 3.17.7/4435_grsec-mute-warnings.patch
26892 rename to 3.18.1/4435_grsec-mute-warnings.patch
26893 index 4a959cc..0585e08 100644
26894 --- a/3.17.7/4435_grsec-mute-warnings.patch
26895 +++ b/3.18.1/4435_grsec-mute-warnings.patch
26896 @@ -28,15 +28,16 @@ warning flags of vanilla kernel versions.
26897
26898 Acked-by: Christian Heim <phreak@g.o>
26899 ---
26900 -
26901 ---- a/Makefile 2014-07-25 11:37:45.206051736 -0400
26902 -+++ b/Makefile 2014-07-25 11:38:13.786050367 -0400
26903 -@@ -303,7 +303,7 @@
26904
26905 +diff -Naur a/Makefile b/Makefile
26906 +--- a/Makefile 2014-12-30 10:18:12.697915684 -0500
26907 ++++ b/Makefile 2014-12-30 10:25:59.132931931 -0500
26908 +@@ -298,7 +298,7 @@
26909 HOSTCC = gcc
26910 HOSTCXX = g++
26911 --HOSTCFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks
26912 -+HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks
26913 + HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
26914 +-HOSTCFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -std=gnu89 -fno-delete-null-pointer-checks
26915 ++HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -std=gnu89 -fno-delete-null-pointer-checks
26916 HOSTCFLAGS += $(call cc-option, -Wno-empty-body)
26917 HOSTCXXFLAGS = -O2 -Wall -W -Wno-array-bounds
26918
26919
26920 diff --git a/3.17.7/4440_grsec-remove-protected-paths.patch b/3.18.1/4440_grsec-remove-protected-paths.patch
26921 similarity index 100%
26922 rename from 3.17.7/4440_grsec-remove-protected-paths.patch
26923 rename to 3.18.1/4440_grsec-remove-protected-paths.patch
26924
26925 diff --git a/3.17.7/4450_grsec-kconfig-default-gids.patch b/3.18.1/4450_grsec-kconfig-default-gids.patch
26926 similarity index 100%
26927 rename from 3.17.7/4450_grsec-kconfig-default-gids.patch
26928 rename to 3.18.1/4450_grsec-kconfig-default-gids.patch
26929
26930 diff --git a/3.17.7/4465_selinux-avc_audit-log-curr_ip.patch b/3.18.1/4465_selinux-avc_audit-log-curr_ip.patch
26931 similarity index 100%
26932 rename from 3.17.7/4465_selinux-avc_audit-log-curr_ip.patch
26933 rename to 3.18.1/4465_selinux-avc_audit-log-curr_ip.patch
26934
26935 diff --git a/3.17.7/4470_disable-compat_vdso.patch b/3.18.1/4470_disable-compat_vdso.patch
26936 similarity index 99%
26937 rename from 3.17.7/4470_disable-compat_vdso.patch
26938 rename to 3.18.1/4470_disable-compat_vdso.patch
26939 index dec59f7..df785ab 100644
26940 --- a/3.17.7/4470_disable-compat_vdso.patch
26941 +++ b/3.18.1/4470_disable-compat_vdso.patch
26942 @@ -26,7 +26,7 @@ Closes bug: http://bugs.gentoo.org/show_bug.cgi?id=210138
26943 diff -urp a/arch/x86/Kconfig b/arch/x86/Kconfig
26944 --- a/arch/x86/Kconfig 2009-07-31 01:36:57.323857684 +0100
26945 +++ b/arch/x86/Kconfig 2009-07-31 01:51:39.395749681 +0100
26946 -@@ -1858,29 +1858,8 @@
26947 +@@ -1904,29 +1904,8 @@
26948
26949 config COMPAT_VDSO
26950 def_bool n
26951
26952 diff --git a/3.17.7/4475_emutramp_default_on.patch b/3.18.1/4475_emutramp_default_on.patch
26953 similarity index 100%
26954 rename from 3.17.7/4475_emutramp_default_on.patch
26955 rename to 3.18.1/4475_emutramp_default_on.patch
26956
26957 diff --git a/3.2.65/0000_README b/3.2.65/0000_README
26958 index f781dcc..153f045 100644
26959 --- a/3.2.65/0000_README
26960 +++ b/3.2.65/0000_README
26961 @@ -178,7 +178,7 @@ Patch: 1064_linux-3.2.65.patch
26962 From: http://www.kernel.org
26963 Desc: Linux 3.2.65
26964
26965 -Patch: 4420_grsecurity-3.0-3.2.65-201412211905.patch
26966 +Patch: 4420_grsecurity-3.0-3.2.65-201412280855.patch
26967 From: http://www.grsecurity.net
26968 Desc: hardened-sources base patch from upstream grsecurity
26969
26970
26971 diff --git a/3.2.65/4420_grsecurity-3.0-3.2.65-201412211905.patch b/3.2.65/4420_grsecurity-3.0-3.2.65-201412280855.patch
26972 similarity index 99%
26973 rename from 3.2.65/4420_grsecurity-3.0-3.2.65-201412211905.patch
26974 rename to 3.2.65/4420_grsecurity-3.0-3.2.65-201412280855.patch
26975 index b1bebf4..ac5d45e 100644
26976 --- a/3.2.65/4420_grsecurity-3.0-3.2.65-201412211905.patch
26977 +++ b/3.2.65/4420_grsecurity-3.0-3.2.65-201412280855.patch
26978 @@ -109666,7 +109666,7 @@ index bee55f6..4108c4b 100644
26979 mkdir -p "$destdir"
26980 (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -)
26981 diff --git a/scripts/package/mkspec b/scripts/package/mkspec
26982 -index 4bf17dd..6ceef68 100755
26983 +index 4bf17dd..bca2734 100755
26984 --- a/scripts/package/mkspec
26985 +++ b/scripts/package/mkspec
26986 @@ -1,7 +1,7 @@
26987 @@ -109724,7 +109724,7 @@ index 4bf17dd..6ceef68 100755
26988 echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
26989
26990 echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
26991 -@@ -107,18 +117,55 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
26992 +@@ -107,18 +117,53 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
26993 echo 'mv vmlinux.orig vmlinux'
26994 echo "%endif"
26995
26996 @@ -109754,12 +109754,10 @@ index 4bf17dd..6ceef68 100755
26997 +echo "ln -sf /usr/src/kernels/$KERNELRELEASE /lib/modules/$KERNELRELEASE/source"
26998 +echo ""
26999 +echo "%post"
27000 -+echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
27001 -+echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm"
27002 -+echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm"
27003 -+echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE"
27004 -+echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
27005 -+echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
27006 ++echo "if [ -x /sbin/dracut ]; then"
27007 ++echo '/sbin/new-kernel-pkg --dracut --mkinitrd --depmod --install --make-default '"$KERNELRELEASE"' || exit $?'
27008 ++echo "else"
27009 ++echo '/sbin/new-kernel-pkg --mkinitrd --depmod --install --make-default '"$KERNELRELEASE"' || exit $?'
27010 +echo "fi"
27011 +echo ""
27012 echo "%files"
27013
27014 diff --git a/3.2.65/4470_disable-compat_vdso.patch b/3.2.65/4470_disable-compat_vdso.patch
27015 index 42bc94d..34d46de 100644
27016 --- a/3.2.65/4470_disable-compat_vdso.patch
27017 +++ b/3.2.65/4470_disable-compat_vdso.patch
27018 @@ -26,7 +26,7 @@ Closes bug: http://bugs.gentoo.org/show_bug.cgi?id=210138
27019 diff -urp a/arch/x86/Kconfig b/arch/x86/Kconfig
27020 --- a/arch/x86/Kconfig 2009-07-31 01:36:57.323857684 +0100
27021 +++ b/arch/x86/Kconfig 2009-07-31 01:51:39.395749681 +0100
27022 -@@ -1672,17 +1672,8 @@
27023 +@@ -1673,17 +1673,8 @@
27024
27025 config COMPAT_VDSO
27026 def_bool n