1 |
commit: 1f5bd0eab3b265afe827baee5f0992f7acfb80a7 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 4 11:11:36 2019 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 4 11:11:36 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1f5bd0ea |
7 |
|
8 |
Linux patch 4.19.48 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1047_linux-4.19.48.patch | 2086 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 2090 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 0c0cd1a..7740baf 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -231,6 +231,10 @@ Patch: 1046_linux-4.19.47.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 4.19.47 |
23 |
|
24 |
+Patch: 1047_linux-4.19.48.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 4.19.48 |
27 |
+ |
28 |
Patch: 1500_XATTR_USER_PREFIX.patch |
29 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
30 |
Desc: Support for namespace user.pax.* on tmpfs. |
31 |
|
32 |
diff --git a/1047_linux-4.19.48.patch b/1047_linux-4.19.48.patch |
33 |
new file mode 100644 |
34 |
index 0000000..ad12e2e |
35 |
--- /dev/null |
36 |
+++ b/1047_linux-4.19.48.patch |
37 |
@@ -0,0 +1,2086 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index b3ba28ff73d5..42529a87f3b4 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 4 |
45 |
+ PATCHLEVEL = 19 |
46 |
+-SUBLEVEL = 47 |
47 |
++SUBLEVEL = 48 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = "People's Front" |
50 |
+ |
51 |
+@@ -508,13 +508,6 @@ export RETPOLINE_VDSO_CFLAGS |
52 |
+ KBUILD_CFLAGS += $(call cc-option,-fno-PIE) |
53 |
+ KBUILD_AFLAGS += $(call cc-option,-fno-PIE) |
54 |
+ |
55 |
+-# check for 'asm goto' |
56 |
+-ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y) |
57 |
+- CC_HAVE_ASM_GOTO := 1 |
58 |
+- KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO |
59 |
+- KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO |
60 |
+-endif |
61 |
+- |
62 |
+ # The expansion should be delayed until arch/$(SRCARCH)/Makefile is included. |
63 |
+ # Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile. |
64 |
+ # CC_VERSION_TEXT is referenced from Kconfig (so it needs export), |
65 |
+diff --git a/arch/Kconfig b/arch/Kconfig |
66 |
+index 6801123932a5..a336548487e6 100644 |
67 |
+--- a/arch/Kconfig |
68 |
++++ b/arch/Kconfig |
69 |
+@@ -71,6 +71,7 @@ config KPROBES |
70 |
+ config JUMP_LABEL |
71 |
+ bool "Optimize very unlikely/likely branches" |
72 |
+ depends on HAVE_ARCH_JUMP_LABEL |
73 |
++ depends on CC_HAS_ASM_GOTO |
74 |
+ help |
75 |
+ This option enables a transparent branch optimization that |
76 |
+ makes certain almost-always-true or almost-always-false branch |
77 |
+diff --git a/arch/arm/kernel/jump_label.c b/arch/arm/kernel/jump_label.c |
78 |
+index 90bce3d9928e..303b3ab87f7e 100644 |
79 |
+--- a/arch/arm/kernel/jump_label.c |
80 |
++++ b/arch/arm/kernel/jump_label.c |
81 |
+@@ -4,8 +4,6 @@ |
82 |
+ #include <asm/patch.h> |
83 |
+ #include <asm/insn.h> |
84 |
+ |
85 |
+-#ifdef HAVE_JUMP_LABEL |
86 |
+- |
87 |
+ static void __arch_jump_label_transform(struct jump_entry *entry, |
88 |
+ enum jump_label_type type, |
89 |
+ bool is_static) |
90 |
+@@ -35,5 +33,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry, |
91 |
+ { |
92 |
+ __arch_jump_label_transform(entry, type, true); |
93 |
+ } |
94 |
+- |
95 |
+-#endif |
96 |
+diff --git a/arch/arm64/kernel/jump_label.c b/arch/arm64/kernel/jump_label.c |
97 |
+index e0756416e567..b90754aebd12 100644 |
98 |
+--- a/arch/arm64/kernel/jump_label.c |
99 |
++++ b/arch/arm64/kernel/jump_label.c |
100 |
+@@ -20,8 +20,6 @@ |
101 |
+ #include <linux/jump_label.h> |
102 |
+ #include <asm/insn.h> |
103 |
+ |
104 |
+-#ifdef HAVE_JUMP_LABEL |
105 |
+- |
106 |
+ void arch_jump_label_transform(struct jump_entry *entry, |
107 |
+ enum jump_label_type type) |
108 |
+ { |
109 |
+@@ -49,5 +47,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry, |
110 |
+ * NOP needs to be replaced by a branch. |
111 |
+ */ |
112 |
+ } |
113 |
+- |
114 |
+-#endif /* HAVE_JUMP_LABEL */ |
115 |
+diff --git a/arch/mips/kernel/jump_label.c b/arch/mips/kernel/jump_label.c |
116 |
+index 32e3168316cd..ab943927f97a 100644 |
117 |
+--- a/arch/mips/kernel/jump_label.c |
118 |
++++ b/arch/mips/kernel/jump_label.c |
119 |
+@@ -16,8 +16,6 @@ |
120 |
+ #include <asm/cacheflush.h> |
121 |
+ #include <asm/inst.h> |
122 |
+ |
123 |
+-#ifdef HAVE_JUMP_LABEL |
124 |
+- |
125 |
+ /* |
126 |
+ * Define parameters for the standard MIPS and the microMIPS jump |
127 |
+ * instruction encoding respectively: |
128 |
+@@ -70,5 +68,3 @@ void arch_jump_label_transform(struct jump_entry *e, |
129 |
+ |
130 |
+ mutex_unlock(&text_mutex); |
131 |
+ } |
132 |
+- |
133 |
+-#endif /* HAVE_JUMP_LABEL */ |
134 |
+diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h |
135 |
+index 1f4691ce4126..e398173ae67d 100644 |
136 |
+--- a/arch/powerpc/include/asm/asm-prototypes.h |
137 |
++++ b/arch/powerpc/include/asm/asm-prototypes.h |
138 |
+@@ -38,7 +38,7 @@ extern struct static_key hcall_tracepoint_key; |
139 |
+ void __trace_hcall_entry(unsigned long opcode, unsigned long *args); |
140 |
+ void __trace_hcall_exit(long opcode, long retval, unsigned long *retbuf); |
141 |
+ /* OPAL tracing */ |
142 |
+-#ifdef HAVE_JUMP_LABEL |
143 |
++#ifdef CONFIG_JUMP_LABEL |
144 |
+ extern struct static_key opal_tracepoint_key; |
145 |
+ #endif |
146 |
+ |
147 |
+diff --git a/arch/powerpc/kernel/jump_label.c b/arch/powerpc/kernel/jump_label.c |
148 |
+index 6472472093d0..0080c5fbd225 100644 |
149 |
+--- a/arch/powerpc/kernel/jump_label.c |
150 |
++++ b/arch/powerpc/kernel/jump_label.c |
151 |
+@@ -11,7 +11,6 @@ |
152 |
+ #include <linux/jump_label.h> |
153 |
+ #include <asm/code-patching.h> |
154 |
+ |
155 |
+-#ifdef HAVE_JUMP_LABEL |
156 |
+ void arch_jump_label_transform(struct jump_entry *entry, |
157 |
+ enum jump_label_type type) |
158 |
+ { |
159 |
+@@ -22,4 +21,3 @@ void arch_jump_label_transform(struct jump_entry *entry, |
160 |
+ else |
161 |
+ patch_instruction(addr, PPC_INST_NOP); |
162 |
+ } |
163 |
+-#endif |
164 |
+diff --git a/arch/powerpc/platforms/powernv/opal-tracepoints.c b/arch/powerpc/platforms/powernv/opal-tracepoints.c |
165 |
+index 1ab7d26c0a2c..f16a43540e30 100644 |
166 |
+--- a/arch/powerpc/platforms/powernv/opal-tracepoints.c |
167 |
++++ b/arch/powerpc/platforms/powernv/opal-tracepoints.c |
168 |
+@@ -4,7 +4,7 @@ |
169 |
+ #include <asm/trace.h> |
170 |
+ #include <asm/asm-prototypes.h> |
171 |
+ |
172 |
+-#ifdef HAVE_JUMP_LABEL |
173 |
++#ifdef CONFIG_JUMP_LABEL |
174 |
+ struct static_key opal_tracepoint_key = STATIC_KEY_INIT; |
175 |
+ |
176 |
+ int opal_tracepoint_regfunc(void) |
177 |
+diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S |
178 |
+index 251528231a9e..f4875fe3f8ff 100644 |
179 |
+--- a/arch/powerpc/platforms/powernv/opal-wrappers.S |
180 |
++++ b/arch/powerpc/platforms/powernv/opal-wrappers.S |
181 |
+@@ -20,7 +20,7 @@ |
182 |
+ .section ".text" |
183 |
+ |
184 |
+ #ifdef CONFIG_TRACEPOINTS |
185 |
+-#ifdef HAVE_JUMP_LABEL |
186 |
++#ifdef CONFIG_JUMP_LABEL |
187 |
+ #define OPAL_BRANCH(LABEL) \ |
188 |
+ ARCH_STATIC_BRANCH(LABEL, opal_tracepoint_key) |
189 |
+ #else |
190 |
+diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S |
191 |
+index d91412c591ef..50dc9426d0be 100644 |
192 |
+--- a/arch/powerpc/platforms/pseries/hvCall.S |
193 |
++++ b/arch/powerpc/platforms/pseries/hvCall.S |
194 |
+@@ -19,7 +19,7 @@ |
195 |
+ |
196 |
+ #ifdef CONFIG_TRACEPOINTS |
197 |
+ |
198 |
+-#ifndef HAVE_JUMP_LABEL |
199 |
++#ifndef CONFIG_JUMP_LABEL |
200 |
+ .section ".toc","aw" |
201 |
+ |
202 |
+ .globl hcall_tracepoint_refcount |
203 |
+@@ -79,7 +79,7 @@ hcall_tracepoint_refcount: |
204 |
+ mr r5,BUFREG; \ |
205 |
+ __HCALL_INST_POSTCALL |
206 |
+ |
207 |
+-#ifdef HAVE_JUMP_LABEL |
208 |
++#ifdef CONFIG_JUMP_LABEL |
209 |
+ #define HCALL_BRANCH(LABEL) \ |
210 |
+ ARCH_STATIC_BRANCH(LABEL, hcall_tracepoint_key) |
211 |
+ #else |
212 |
+diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c |
213 |
+index d3992ced0782..9e52b686a8fa 100644 |
214 |
+--- a/arch/powerpc/platforms/pseries/lpar.c |
215 |
++++ b/arch/powerpc/platforms/pseries/lpar.c |
216 |
+@@ -828,7 +828,7 @@ EXPORT_SYMBOL(arch_free_page); |
217 |
+ #endif /* CONFIG_PPC_BOOK3S_64 */ |
218 |
+ |
219 |
+ #ifdef CONFIG_TRACEPOINTS |
220 |
+-#ifdef HAVE_JUMP_LABEL |
221 |
++#ifdef CONFIG_JUMP_LABEL |
222 |
+ struct static_key hcall_tracepoint_key = STATIC_KEY_INIT; |
223 |
+ |
224 |
+ int hcall_tracepoint_regfunc(void) |
225 |
+diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile |
226 |
+index dbfd1730e631..b205c0ff0b22 100644 |
227 |
+--- a/arch/s390/kernel/Makefile |
228 |
++++ b/arch/s390/kernel/Makefile |
229 |
+@@ -44,7 +44,7 @@ CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' |
230 |
+ obj-y := traps.o time.o process.o base.o early.o setup.o idle.o vtime.o |
231 |
+ obj-y += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o |
232 |
+ obj-y += debug.o irq.o ipl.o dis.o diag.o vdso.o early_nobss.o |
233 |
+-obj-y += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o |
234 |
++obj-y += sysinfo.o lgr.o os_info.o machine_kexec.o pgm_check.o |
235 |
+ obj-y += runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o |
236 |
+ obj-y += entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o |
237 |
+ obj-y += nospec-branch.o |
238 |
+@@ -68,6 +68,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o |
239 |
+ obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o |
240 |
+ obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
241 |
+ obj-$(CONFIG_UPROBES) += uprobes.o |
242 |
++obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
243 |
+ |
244 |
+ obj-$(CONFIG_KEXEC_FILE) += machine_kexec_file.o kexec_image.o |
245 |
+ obj-$(CONFIG_KEXEC_FILE) += kexec_elf.o |
246 |
+diff --git a/arch/s390/kernel/jump_label.c b/arch/s390/kernel/jump_label.c |
247 |
+index 43f8430fb67d..68f415e334a5 100644 |
248 |
+--- a/arch/s390/kernel/jump_label.c |
249 |
++++ b/arch/s390/kernel/jump_label.c |
250 |
+@@ -10,8 +10,6 @@ |
251 |
+ #include <linux/jump_label.h> |
252 |
+ #include <asm/ipl.h> |
253 |
+ |
254 |
+-#ifdef HAVE_JUMP_LABEL |
255 |
+- |
256 |
+ struct insn { |
257 |
+ u16 opcode; |
258 |
+ s32 offset; |
259 |
+@@ -102,5 +100,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry, |
260 |
+ { |
261 |
+ __jump_label_transform(entry, type, 1); |
262 |
+ } |
263 |
+- |
264 |
+-#endif |
265 |
+diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile |
266 |
+index cf8640841b7a..97c0e19263d1 100644 |
267 |
+--- a/arch/sparc/kernel/Makefile |
268 |
++++ b/arch/sparc/kernel/Makefile |
269 |
+@@ -118,4 +118,4 @@ pc--$(CONFIG_PERF_EVENTS) := perf_event.o |
270 |
+ obj-$(CONFIG_SPARC64) += $(pc--y) |
271 |
+ |
272 |
+ obj-$(CONFIG_UPROBES) += uprobes.o |
273 |
+-obj-$(CONFIG_SPARC64) += jump_label.o |
274 |
++obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
275 |
+diff --git a/arch/sparc/kernel/jump_label.c b/arch/sparc/kernel/jump_label.c |
276 |
+index 7f8eac51df33..a4cfaeecaf5e 100644 |
277 |
+--- a/arch/sparc/kernel/jump_label.c |
278 |
++++ b/arch/sparc/kernel/jump_label.c |
279 |
+@@ -9,8 +9,6 @@ |
280 |
+ |
281 |
+ #include <asm/cacheflush.h> |
282 |
+ |
283 |
+-#ifdef HAVE_JUMP_LABEL |
284 |
+- |
285 |
+ void arch_jump_label_transform(struct jump_entry *entry, |
286 |
+ enum jump_label_type type) |
287 |
+ { |
288 |
+@@ -47,5 +45,3 @@ void arch_jump_label_transform(struct jump_entry *entry, |
289 |
+ flushi(insn); |
290 |
+ mutex_unlock(&text_mutex); |
291 |
+ } |
292 |
+- |
293 |
+-#endif |
294 |
+diff --git a/arch/x86/Makefile b/arch/x86/Makefile |
295 |
+index ab2071e40efe..ce0d0424a53d 100644 |
296 |
+--- a/arch/x86/Makefile |
297 |
++++ b/arch/x86/Makefile |
298 |
+@@ -305,7 +305,7 @@ vdso_install: |
299 |
+ |
300 |
+ archprepare: checkbin |
301 |
+ checkbin: |
302 |
+-ifndef CC_HAVE_ASM_GOTO |
303 |
++ifndef CONFIG_CC_HAS_ASM_GOTO |
304 |
+ @echo Compiler lacks asm-goto support. |
305 |
+ @exit 1 |
306 |
+ endif |
307 |
+diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h |
308 |
+index 352e70cd33e8..e699b2041665 100644 |
309 |
+--- a/arch/x86/entry/calling.h |
310 |
++++ b/arch/x86/entry/calling.h |
311 |
+@@ -337,7 +337,7 @@ For 32-bit we have the following conventions - kernel is built with |
312 |
+ */ |
313 |
+ .macro CALL_enter_from_user_mode |
314 |
+ #ifdef CONFIG_CONTEXT_TRACKING |
315 |
+-#ifdef HAVE_JUMP_LABEL |
316 |
++#ifdef CONFIG_JUMP_LABEL |
317 |
+ STATIC_JUMP_IF_FALSE .Lafter_call_\@, context_tracking_enabled, def=0 |
318 |
+ #endif |
319 |
+ call enter_from_user_mode |
320 |
+diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h |
321 |
+index aced6c9290d6..ce95b8cbd229 100644 |
322 |
+--- a/arch/x86/include/asm/cpufeature.h |
323 |
++++ b/arch/x86/include/asm/cpufeature.h |
324 |
+@@ -140,7 +140,7 @@ extern void clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit); |
325 |
+ |
326 |
+ #define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit) |
327 |
+ |
328 |
+-#if defined(__clang__) && !defined(CC_HAVE_ASM_GOTO) |
329 |
++#if defined(__clang__) && !defined(CONFIG_CC_HAS_ASM_GOTO) |
330 |
+ |
331 |
+ /* |
332 |
+ * Workaround for the sake of BPF compilation which utilizes kernel |
333 |
+diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h |
334 |
+index 8c0de4282659..7010e1c594c4 100644 |
335 |
+--- a/arch/x86/include/asm/jump_label.h |
336 |
++++ b/arch/x86/include/asm/jump_label.h |
337 |
+@@ -2,19 +2,6 @@ |
338 |
+ #ifndef _ASM_X86_JUMP_LABEL_H |
339 |
+ #define _ASM_X86_JUMP_LABEL_H |
340 |
+ |
341 |
+-#ifndef HAVE_JUMP_LABEL |
342 |
+-/* |
343 |
+- * For better or for worse, if jump labels (the gcc extension) are missing, |
344 |
+- * then the entire static branch patching infrastructure is compiled out. |
345 |
+- * If that happens, the code in here will malfunction. Raise a compiler |
346 |
+- * error instead. |
347 |
+- * |
348 |
+- * In theory, jump labels and the static branch patching infrastructure |
349 |
+- * could be decoupled to fix this. |
350 |
+- */ |
351 |
+-#error asm/jump_label.h included on a non-jump-label kernel |
352 |
+-#endif |
353 |
+- |
354 |
+ #define JUMP_LABEL_NOP_SIZE 5 |
355 |
+ |
356 |
+ #ifdef CONFIG_X86_64 |
357 |
+diff --git a/arch/x86/include/asm/rmwcc.h b/arch/x86/include/asm/rmwcc.h |
358 |
+index 4914a3e7c803..033dc7ca49e9 100644 |
359 |
+--- a/arch/x86/include/asm/rmwcc.h |
360 |
++++ b/arch/x86/include/asm/rmwcc.h |
361 |
+@@ -4,7 +4,7 @@ |
362 |
+ |
363 |
+ #define __CLOBBERS_MEM(clb...) "memory", ## clb |
364 |
+ |
365 |
+-#if !defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(CC_HAVE_ASM_GOTO) |
366 |
++#if !defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(CONFIG_CC_HAS_ASM_GOTO) |
367 |
+ |
368 |
+ /* Use asm goto */ |
369 |
+ |
370 |
+@@ -21,7 +21,7 @@ cc_label: \ |
371 |
+ #define __BINARY_RMWcc_ARG " %1, " |
372 |
+ |
373 |
+ |
374 |
+-#else /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CC_HAVE_ASM_GOTO) */ |
375 |
++#else /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CONFIG_CC_HAS_ASM_GOTO) */ |
376 |
+ |
377 |
+ /* Use flags output or a set instruction */ |
378 |
+ |
379 |
+@@ -36,7 +36,7 @@ do { \ |
380 |
+ |
381 |
+ #define __BINARY_RMWcc_ARG " %2, " |
382 |
+ |
383 |
+-#endif /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CC_HAVE_ASM_GOTO) */ |
384 |
++#endif /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CONFIG_CC_HAS_ASM_GOTO) */ |
385 |
+ |
386 |
+ #define GEN_UNARY_RMWcc(op, var, arg0, cc) \ |
387 |
+ __GEN_RMWcc(op " " arg0, var, cc, __CLOBBERS_MEM()) |
388 |
+diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile |
389 |
+index 8824d01c0c35..da0b6bc090f3 100644 |
390 |
+--- a/arch/x86/kernel/Makefile |
391 |
++++ b/arch/x86/kernel/Makefile |
392 |
+@@ -49,7 +49,8 @@ obj-$(CONFIG_COMPAT) += signal_compat.o |
393 |
+ obj-y += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o |
394 |
+ obj-y += time.o ioport.o dumpstack.o nmi.o |
395 |
+ obj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o |
396 |
+-obj-y += setup.o x86_init.o i8259.o irqinit.o jump_label.o |
397 |
++obj-y += setup.o x86_init.o i8259.o irqinit.o |
398 |
++obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
399 |
+ obj-$(CONFIG_IRQ_WORK) += irq_work.o |
400 |
+ obj-y += probe_roms.o |
401 |
+ obj-$(CONFIG_X86_64) += sys_x86_64.o |
402 |
+diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c |
403 |
+index eeea935e9bb5..4c3d9a3d45b2 100644 |
404 |
+--- a/arch/x86/kernel/jump_label.c |
405 |
++++ b/arch/x86/kernel/jump_label.c |
406 |
+@@ -16,8 +16,6 @@ |
407 |
+ #include <asm/alternative.h> |
408 |
+ #include <asm/text-patching.h> |
409 |
+ |
410 |
+-#ifdef HAVE_JUMP_LABEL |
411 |
+- |
412 |
+ union jump_code_union { |
413 |
+ char code[JUMP_LABEL_NOP_SIZE]; |
414 |
+ struct { |
415 |
+@@ -142,5 +140,3 @@ __init_or_module void arch_jump_label_transform_static(struct jump_entry *entry, |
416 |
+ if (jlstate == JL_STATE_UPDATE) |
417 |
+ __jump_label_transform(entry, type, text_poke_early, 1); |
418 |
+ } |
419 |
+- |
420 |
+-#endif |
421 |
+diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c |
422 |
+index 860bd271619d..4a688ef9e448 100644 |
423 |
+--- a/arch/x86/kvm/emulate.c |
424 |
++++ b/arch/x86/kvm/emulate.c |
425 |
+@@ -456,7 +456,7 @@ FOP_END; |
426 |
+ |
427 |
+ /* |
428 |
+ * XXX: inoutclob user must know where the argument is being expanded. |
429 |
+- * Relying on CC_HAVE_ASM_GOTO would allow us to remove _fault. |
430 |
++ * Relying on CONFIG_CC_HAS_ASM_GOTO would allow us to remove _fault. |
431 |
+ */ |
432 |
+ #define asm_safe(insn, inoutclob...) \ |
433 |
+ ({ \ |
434 |
+diff --git a/drivers/crypto/vmx/ghash.c b/drivers/crypto/vmx/ghash.c |
435 |
+index dd8b8716467a..2d1a8cd35509 100644 |
436 |
+--- a/drivers/crypto/vmx/ghash.c |
437 |
++++ b/drivers/crypto/vmx/ghash.c |
438 |
+@@ -1,22 +1,14 @@ |
439 |
++// SPDX-License-Identifier: GPL-2.0 |
440 |
+ /** |
441 |
+ * GHASH routines supporting VMX instructions on the Power 8 |
442 |
+ * |
443 |
+- * Copyright (C) 2015 International Business Machines Inc. |
444 |
+- * |
445 |
+- * This program is free software; you can redistribute it and/or modify |
446 |
+- * it under the terms of the GNU General Public License as published by |
447 |
+- * the Free Software Foundation; version 2 only. |
448 |
+- * |
449 |
+- * This program is distributed in the hope that it will be useful, |
450 |
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
451 |
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
452 |
+- * GNU General Public License for more details. |
453 |
+- * |
454 |
+- * You should have received a copy of the GNU General Public License |
455 |
+- * along with this program; if not, write to the Free Software |
456 |
+- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
457 |
++ * Copyright (C) 2015, 2019 International Business Machines Inc. |
458 |
+ * |
459 |
+ * Author: Marcelo Henrique Cerri <mhcerri@××××××.com> |
460 |
++ * |
461 |
++ * Extended by Daniel Axtens <dja@××××××.net> to replace the fallback |
462 |
++ * mechanism. The new approach is based on arm64 code, which is: |
463 |
++ * Copyright (C) 2014 - 2018 Linaro Ltd. <ard.biesheuvel@××××××.org> |
464 |
+ */ |
465 |
+ |
466 |
+ #include <linux/types.h> |
467 |
+@@ -39,71 +31,25 @@ void gcm_ghash_p8(u64 Xi[2], const u128 htable[16], |
468 |
+ const u8 *in, size_t len); |
469 |
+ |
470 |
+ struct p8_ghash_ctx { |
471 |
++ /* key used by vector asm */ |
472 |
+ u128 htable[16]; |
473 |
+- struct crypto_shash *fallback; |
474 |
++ /* key used by software fallback */ |
475 |
++ be128 key; |
476 |
+ }; |
477 |
+ |
478 |
+ struct p8_ghash_desc_ctx { |
479 |
+ u64 shash[2]; |
480 |
+ u8 buffer[GHASH_DIGEST_SIZE]; |
481 |
+ int bytes; |
482 |
+- struct shash_desc fallback_desc; |
483 |
+ }; |
484 |
+ |
485 |
+-static int p8_ghash_init_tfm(struct crypto_tfm *tfm) |
486 |
+-{ |
487 |
+- const char *alg = "ghash-generic"; |
488 |
+- struct crypto_shash *fallback; |
489 |
+- struct crypto_shash *shash_tfm = __crypto_shash_cast(tfm); |
490 |
+- struct p8_ghash_ctx *ctx = crypto_tfm_ctx(tfm); |
491 |
+- |
492 |
+- fallback = crypto_alloc_shash(alg, 0, CRYPTO_ALG_NEED_FALLBACK); |
493 |
+- if (IS_ERR(fallback)) { |
494 |
+- printk(KERN_ERR |
495 |
+- "Failed to allocate transformation for '%s': %ld\n", |
496 |
+- alg, PTR_ERR(fallback)); |
497 |
+- return PTR_ERR(fallback); |
498 |
+- } |
499 |
+- |
500 |
+- crypto_shash_set_flags(fallback, |
501 |
+- crypto_shash_get_flags((struct crypto_shash |
502 |
+- *) tfm)); |
503 |
+- |
504 |
+- /* Check if the descsize defined in the algorithm is still enough. */ |
505 |
+- if (shash_tfm->descsize < sizeof(struct p8_ghash_desc_ctx) |
506 |
+- + crypto_shash_descsize(fallback)) { |
507 |
+- printk(KERN_ERR |
508 |
+- "Desc size of the fallback implementation (%s) does not match the expected value: %lu vs %u\n", |
509 |
+- alg, |
510 |
+- shash_tfm->descsize - sizeof(struct p8_ghash_desc_ctx), |
511 |
+- crypto_shash_descsize(fallback)); |
512 |
+- return -EINVAL; |
513 |
+- } |
514 |
+- ctx->fallback = fallback; |
515 |
+- |
516 |
+- return 0; |
517 |
+-} |
518 |
+- |
519 |
+-static void p8_ghash_exit_tfm(struct crypto_tfm *tfm) |
520 |
+-{ |
521 |
+- struct p8_ghash_ctx *ctx = crypto_tfm_ctx(tfm); |
522 |
+- |
523 |
+- if (ctx->fallback) { |
524 |
+- crypto_free_shash(ctx->fallback); |
525 |
+- ctx->fallback = NULL; |
526 |
+- } |
527 |
+-} |
528 |
+- |
529 |
+ static int p8_ghash_init(struct shash_desc *desc) |
530 |
+ { |
531 |
+- struct p8_ghash_ctx *ctx = crypto_tfm_ctx(crypto_shash_tfm(desc->tfm)); |
532 |
+ struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); |
533 |
+ |
534 |
+ dctx->bytes = 0; |
535 |
+ memset(dctx->shash, 0, GHASH_DIGEST_SIZE); |
536 |
+- dctx->fallback_desc.tfm = ctx->fallback; |
537 |
+- dctx->fallback_desc.flags = desc->flags; |
538 |
+- return crypto_shash_init(&dctx->fallback_desc); |
539 |
++ return 0; |
540 |
+ } |
541 |
+ |
542 |
+ static int p8_ghash_setkey(struct crypto_shash *tfm, const u8 *key, |
543 |
+@@ -121,7 +67,51 @@ static int p8_ghash_setkey(struct crypto_shash *tfm, const u8 *key, |
544 |
+ disable_kernel_vsx(); |
545 |
+ pagefault_enable(); |
546 |
+ preempt_enable(); |
547 |
+- return crypto_shash_setkey(ctx->fallback, key, keylen); |
548 |
++ |
549 |
++ memcpy(&ctx->key, key, GHASH_BLOCK_SIZE); |
550 |
++ |
551 |
++ return 0; |
552 |
++} |
553 |
++ |
554 |
++static inline void __ghash_block(struct p8_ghash_ctx *ctx, |
555 |
++ struct p8_ghash_desc_ctx *dctx) |
556 |
++{ |
557 |
++ if (!IN_INTERRUPT) { |
558 |
++ preempt_disable(); |
559 |
++ pagefault_disable(); |
560 |
++ enable_kernel_vsx(); |
561 |
++ gcm_ghash_p8(dctx->shash, ctx->htable, |
562 |
++ dctx->buffer, GHASH_DIGEST_SIZE); |
563 |
++ disable_kernel_vsx(); |
564 |
++ pagefault_enable(); |
565 |
++ preempt_enable(); |
566 |
++ } else { |
567 |
++ crypto_xor((u8 *)dctx->shash, dctx->buffer, GHASH_BLOCK_SIZE); |
568 |
++ gf128mul_lle((be128 *)dctx->shash, &ctx->key); |
569 |
++ } |
570 |
++} |
571 |
++ |
572 |
++static inline void __ghash_blocks(struct p8_ghash_ctx *ctx, |
573 |
++ struct p8_ghash_desc_ctx *dctx, |
574 |
++ const u8 *src, unsigned int srclen) |
575 |
++{ |
576 |
++ if (!IN_INTERRUPT) { |
577 |
++ preempt_disable(); |
578 |
++ pagefault_disable(); |
579 |
++ enable_kernel_vsx(); |
580 |
++ gcm_ghash_p8(dctx->shash, ctx->htable, |
581 |
++ src, srclen); |
582 |
++ disable_kernel_vsx(); |
583 |
++ pagefault_enable(); |
584 |
++ preempt_enable(); |
585 |
++ } else { |
586 |
++ while (srclen >= GHASH_BLOCK_SIZE) { |
587 |
++ crypto_xor((u8 *)dctx->shash, src, GHASH_BLOCK_SIZE); |
588 |
++ gf128mul_lle((be128 *)dctx->shash, &ctx->key); |
589 |
++ srclen -= GHASH_BLOCK_SIZE; |
590 |
++ src += GHASH_BLOCK_SIZE; |
591 |
++ } |
592 |
++ } |
593 |
+ } |
594 |
+ |
595 |
+ static int p8_ghash_update(struct shash_desc *desc, |
596 |
+@@ -131,49 +121,33 @@ static int p8_ghash_update(struct shash_desc *desc, |
597 |
+ struct p8_ghash_ctx *ctx = crypto_tfm_ctx(crypto_shash_tfm(desc->tfm)); |
598 |
+ struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); |
599 |
+ |
600 |
+- if (IN_INTERRUPT) { |
601 |
+- return crypto_shash_update(&dctx->fallback_desc, src, |
602 |
+- srclen); |
603 |
+- } else { |
604 |
+- if (dctx->bytes) { |
605 |
+- if (dctx->bytes + srclen < GHASH_DIGEST_SIZE) { |
606 |
+- memcpy(dctx->buffer + dctx->bytes, src, |
607 |
+- srclen); |
608 |
+- dctx->bytes += srclen; |
609 |
+- return 0; |
610 |
+- } |
611 |
++ if (dctx->bytes) { |
612 |
++ if (dctx->bytes + srclen < GHASH_DIGEST_SIZE) { |
613 |
+ memcpy(dctx->buffer + dctx->bytes, src, |
614 |
+- GHASH_DIGEST_SIZE - dctx->bytes); |
615 |
+- preempt_disable(); |
616 |
+- pagefault_disable(); |
617 |
+- enable_kernel_vsx(); |
618 |
+- gcm_ghash_p8(dctx->shash, ctx->htable, |
619 |
+- dctx->buffer, GHASH_DIGEST_SIZE); |
620 |
+- disable_kernel_vsx(); |
621 |
+- pagefault_enable(); |
622 |
+- preempt_enable(); |
623 |
+- src += GHASH_DIGEST_SIZE - dctx->bytes; |
624 |
+- srclen -= GHASH_DIGEST_SIZE - dctx->bytes; |
625 |
+- dctx->bytes = 0; |
626 |
+- } |
627 |
+- len = srclen & ~(GHASH_DIGEST_SIZE - 1); |
628 |
+- if (len) { |
629 |
+- preempt_disable(); |
630 |
+- pagefault_disable(); |
631 |
+- enable_kernel_vsx(); |
632 |
+- gcm_ghash_p8(dctx->shash, ctx->htable, src, len); |
633 |
+- disable_kernel_vsx(); |
634 |
+- pagefault_enable(); |
635 |
+- preempt_enable(); |
636 |
+- src += len; |
637 |
+- srclen -= len; |
638 |
+- } |
639 |
+- if (srclen) { |
640 |
+- memcpy(dctx->buffer, src, srclen); |
641 |
+- dctx->bytes = srclen; |
642 |
++ srclen); |
643 |
++ dctx->bytes += srclen; |
644 |
++ return 0; |
645 |
+ } |
646 |
+- return 0; |
647 |
++ memcpy(dctx->buffer + dctx->bytes, src, |
648 |
++ GHASH_DIGEST_SIZE - dctx->bytes); |
649 |
++ |
650 |
++ __ghash_block(ctx, dctx); |
651 |
++ |
652 |
++ src += GHASH_DIGEST_SIZE - dctx->bytes; |
653 |
++ srclen -= GHASH_DIGEST_SIZE - dctx->bytes; |
654 |
++ dctx->bytes = 0; |
655 |
++ } |
656 |
++ len = srclen & ~(GHASH_DIGEST_SIZE - 1); |
657 |
++ if (len) { |
658 |
++ __ghash_blocks(ctx, dctx, src, len); |
659 |
++ src += len; |
660 |
++ srclen -= len; |
661 |
+ } |
662 |
++ if (srclen) { |
663 |
++ memcpy(dctx->buffer, src, srclen); |
664 |
++ dctx->bytes = srclen; |
665 |
++ } |
666 |
++ return 0; |
667 |
+ } |
668 |
+ |
669 |
+ static int p8_ghash_final(struct shash_desc *desc, u8 *out) |
670 |
+@@ -182,25 +156,14 @@ static int p8_ghash_final(struct shash_desc *desc, u8 *out) |
671 |
+ struct p8_ghash_ctx *ctx = crypto_tfm_ctx(crypto_shash_tfm(desc->tfm)); |
672 |
+ struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); |
673 |
+ |
674 |
+- if (IN_INTERRUPT) { |
675 |
+- return crypto_shash_final(&dctx->fallback_desc, out); |
676 |
+- } else { |
677 |
+- if (dctx->bytes) { |
678 |
+- for (i = dctx->bytes; i < GHASH_DIGEST_SIZE; i++) |
679 |
+- dctx->buffer[i] = 0; |
680 |
+- preempt_disable(); |
681 |
+- pagefault_disable(); |
682 |
+- enable_kernel_vsx(); |
683 |
+- gcm_ghash_p8(dctx->shash, ctx->htable, |
684 |
+- dctx->buffer, GHASH_DIGEST_SIZE); |
685 |
+- disable_kernel_vsx(); |
686 |
+- pagefault_enable(); |
687 |
+- preempt_enable(); |
688 |
+- dctx->bytes = 0; |
689 |
+- } |
690 |
+- memcpy(out, dctx->shash, GHASH_DIGEST_SIZE); |
691 |
+- return 0; |
692 |
++ if (dctx->bytes) { |
693 |
++ for (i = dctx->bytes; i < GHASH_DIGEST_SIZE; i++) |
694 |
++ dctx->buffer[i] = 0; |
695 |
++ __ghash_block(ctx, dctx); |
696 |
++ dctx->bytes = 0; |
697 |
+ } |
698 |
++ memcpy(out, dctx->shash, GHASH_DIGEST_SIZE); |
699 |
++ return 0; |
700 |
+ } |
701 |
+ |
702 |
+ struct shash_alg p8_ghash_alg = { |
703 |
+@@ -215,11 +178,8 @@ struct shash_alg p8_ghash_alg = { |
704 |
+ .cra_name = "ghash", |
705 |
+ .cra_driver_name = "p8_ghash", |
706 |
+ .cra_priority = 1000, |
707 |
+- .cra_flags = CRYPTO_ALG_NEED_FALLBACK, |
708 |
+ .cra_blocksize = GHASH_BLOCK_SIZE, |
709 |
+ .cra_ctxsize = sizeof(struct p8_ghash_ctx), |
710 |
+ .cra_module = THIS_MODULE, |
711 |
+- .cra_init = p8_ghash_init_tfm, |
712 |
+- .cra_exit = p8_ghash_exit_tfm, |
713 |
+ }, |
714 |
+ }; |
715 |
+diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c |
716 |
+index 091b454e83fc..039beb5e0fa2 100644 |
717 |
+--- a/drivers/net/bonding/bond_main.c |
718 |
++++ b/drivers/net/bonding/bond_main.c |
719 |
+@@ -3107,13 +3107,18 @@ static int bond_slave_netdev_event(unsigned long event, |
720 |
+ case NETDEV_CHANGE: |
721 |
+ /* For 802.3ad mode only: |
722 |
+ * Getting invalid Speed/Duplex values here will put slave |
723 |
+- * in weird state. So mark it as link-fail for the time |
724 |
+- * being and let link-monitoring (miimon) set it right when |
725 |
+- * correct speeds/duplex are available. |
726 |
++ * in weird state. Mark it as link-fail if the link was |
727 |
++ * previously up or link-down if it hasn't yet come up, and |
728 |
++ * let link-monitoring (miimon) set it right when correct |
729 |
++ * speeds/duplex are available. |
730 |
+ */ |
731 |
+ if (bond_update_speed_duplex(slave) && |
732 |
+- BOND_MODE(bond) == BOND_MODE_8023AD) |
733 |
+- slave->link = BOND_LINK_FAIL; |
734 |
++ BOND_MODE(bond) == BOND_MODE_8023AD) { |
735 |
++ if (slave->last_link_up) |
736 |
++ slave->link = BOND_LINK_FAIL; |
737 |
++ else |
738 |
++ slave->link = BOND_LINK_DOWN; |
739 |
++ } |
740 |
+ |
741 |
+ if (BOND_MODE(bond) == BOND_MODE_8023AD) |
742 |
+ bond_3ad_adapter_speed_duplex_changed(slave); |
743 |
+diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c |
744 |
+index 2caa5c0c2bc4..dfaad1c2c2b8 100644 |
745 |
+--- a/drivers/net/dsa/mv88e6xxx/chip.c |
746 |
++++ b/drivers/net/dsa/mv88e6xxx/chip.c |
747 |
+@@ -877,7 +877,7 @@ static uint64_t _mv88e6xxx_get_ethtool_stat(struct mv88e6xxx_chip *chip, |
748 |
+ err = mv88e6xxx_port_read(chip, port, s->reg + 1, ®); |
749 |
+ if (err) |
750 |
+ return U64_MAX; |
751 |
+- high = reg; |
752 |
++ low |= ((u32)reg) << 16; |
753 |
+ } |
754 |
+ break; |
755 |
+ case STATS_TYPE_BANK1: |
756 |
+diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c |
757 |
+index de46331aefc1..c54a74de7b08 100644 |
758 |
+--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c |
759 |
++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c |
760 |
+@@ -1599,6 +1599,8 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons, |
761 |
+ skb = bnxt_copy_skb(bnapi, data_ptr, len, dma_addr); |
762 |
+ bnxt_reuse_rx_data(rxr, cons, data); |
763 |
+ if (!skb) { |
764 |
++ if (agg_bufs) |
765 |
++ bnxt_reuse_rx_agg_bufs(bnapi, cp_cons, agg_bufs); |
766 |
+ rc = -ENOMEM; |
767 |
+ goto next_rx; |
768 |
+ } |
769 |
+diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c |
770 |
+index c116f96956fe..f2aba5b160c2 100644 |
771 |
+--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c |
772 |
++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c |
773 |
+@@ -228,6 +228,9 @@ static void cxgb4_process_flow_match(struct net_device *dev, |
774 |
+ fs->val.ivlan = vlan_tci; |
775 |
+ fs->mask.ivlan = vlan_tci_mask; |
776 |
+ |
777 |
++ fs->val.ivlan_vld = 1; |
778 |
++ fs->mask.ivlan_vld = 1; |
779 |
++ |
780 |
+ /* Chelsio adapters use ivlan_vld bit to match vlan packets |
781 |
+ * as 802.1Q. Also, when vlan tag is present in packets, |
782 |
+ * ethtype match is used then to match on ethtype of inner |
783 |
+@@ -238,8 +241,6 @@ static void cxgb4_process_flow_match(struct net_device *dev, |
784 |
+ * ethtype value with ethtype of inner header. |
785 |
+ */ |
786 |
+ if (fs->val.ethtype == ETH_P_8021Q) { |
787 |
+- fs->val.ivlan_vld = 1; |
788 |
+- fs->mask.ivlan_vld = 1; |
789 |
+ fs->val.ethtype = 0; |
790 |
+ fs->mask.ethtype = 0; |
791 |
+ } |
792 |
+diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c |
793 |
+index ad41ace0a27a..bf715a367273 100644 |
794 |
+--- a/drivers/net/ethernet/freescale/fec_main.c |
795 |
++++ b/drivers/net/ethernet/freescale/fec_main.c |
796 |
+@@ -3571,7 +3571,7 @@ failed_init: |
797 |
+ if (fep->reg_phy) |
798 |
+ regulator_disable(fep->reg_phy); |
799 |
+ failed_reset: |
800 |
+- pm_runtime_put(&pdev->dev); |
801 |
++ pm_runtime_put_noidle(&pdev->dev); |
802 |
+ pm_runtime_disable(&pdev->dev); |
803 |
+ failed_regulator: |
804 |
+ clk_disable_unprepare(fep->clk_ahb); |
805 |
+diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c |
806 |
+index 2ba0d89aaf3c..28762314353f 100644 |
807 |
+--- a/drivers/net/ethernet/marvell/mvneta.c |
808 |
++++ b/drivers/net/ethernet/marvell/mvneta.c |
809 |
+@@ -4611,7 +4611,7 @@ static int mvneta_probe(struct platform_device *pdev) |
810 |
+ err = register_netdev(dev); |
811 |
+ if (err < 0) { |
812 |
+ dev_err(&pdev->dev, "failed to register\n"); |
813 |
+- goto err_free_stats; |
814 |
++ goto err_netdev; |
815 |
+ } |
816 |
+ |
817 |
+ netdev_info(dev, "Using %s mac address %pM\n", mac_from, |
818 |
+@@ -4622,14 +4622,12 @@ static int mvneta_probe(struct platform_device *pdev) |
819 |
+ return 0; |
820 |
+ |
821 |
+ err_netdev: |
822 |
+- unregister_netdev(dev); |
823 |
+ if (pp->bm_priv) { |
824 |
+ mvneta_bm_pool_destroy(pp->bm_priv, pp->pool_long, 1 << pp->id); |
825 |
+ mvneta_bm_pool_destroy(pp->bm_priv, pp->pool_short, |
826 |
+ 1 << pp->id); |
827 |
+ mvneta_bm_put(pp->bm_priv); |
828 |
+ } |
829 |
+-err_free_stats: |
830 |
+ free_percpu(pp->stats); |
831 |
+ err_free_ports: |
832 |
+ free_percpu(pp->ports); |
833 |
+diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c |
834 |
+index 9b10abb604cb..59212d3d9587 100644 |
835 |
+--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c |
836 |
++++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c |
837 |
+@@ -1404,7 +1404,7 @@ static inline void mvpp2_xlg_max_rx_size_set(struct mvpp2_port *port) |
838 |
+ /* Set defaults to the MVPP2 port */ |
839 |
+ static void mvpp2_defaults_set(struct mvpp2_port *port) |
840 |
+ { |
841 |
+- int tx_port_num, val, queue, ptxq, lrxq; |
842 |
++ int tx_port_num, val, queue, lrxq; |
843 |
+ |
844 |
+ if (port->priv->hw_version == MVPP21) { |
845 |
+ /* Update TX FIFO MIN Threshold */ |
846 |
+@@ -1422,11 +1422,9 @@ static void mvpp2_defaults_set(struct mvpp2_port *port) |
847 |
+ mvpp2_write(port->priv, MVPP2_TXP_SCHED_CMD_1_REG, 0); |
848 |
+ |
849 |
+ /* Close bandwidth for all queues */ |
850 |
+- for (queue = 0; queue < MVPP2_MAX_TXQ; queue++) { |
851 |
+- ptxq = mvpp2_txq_phys(port->id, queue); |
852 |
++ for (queue = 0; queue < MVPP2_MAX_TXQ; queue++) |
853 |
+ mvpp2_write(port->priv, |
854 |
+- MVPP2_TXQ_SCHED_TOKEN_CNTR_REG(ptxq), 0); |
855 |
+- } |
856 |
++ MVPP2_TXQ_SCHED_TOKEN_CNTR_REG(queue), 0); |
857 |
+ |
858 |
+ /* Set refill period to 1 usec, refill tokens |
859 |
+ * and bucket size to maximum |
860 |
+@@ -2271,7 +2269,7 @@ static void mvpp2_txq_deinit(struct mvpp2_port *port, |
861 |
+ txq->descs_dma = 0; |
862 |
+ |
863 |
+ /* Set minimum bandwidth for disabled TXQs */ |
864 |
+- mvpp2_write(port->priv, MVPP2_TXQ_SCHED_TOKEN_CNTR_REG(txq->id), 0); |
865 |
++ mvpp2_write(port->priv, MVPP2_TXQ_SCHED_TOKEN_CNTR_REG(txq->log_id), 0); |
866 |
+ |
867 |
+ /* Set Tx descriptors queue starting address and size */ |
868 |
+ cpu = get_cpu(); |
869 |
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c |
870 |
+index b190c447aeb0..0f1c296c3ce4 100644 |
871 |
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c |
872 |
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c |
873 |
+@@ -3734,6 +3734,12 @@ static netdev_features_t mlx5e_fix_features(struct net_device *netdev, |
874 |
+ netdev_warn(netdev, "Disabling LRO, not supported in legacy RQ\n"); |
875 |
+ } |
876 |
+ |
877 |
++ if (MLX5E_GET_PFLAG(params, MLX5E_PFLAG_RX_CQE_COMPRESS)) { |
878 |
++ features &= ~NETIF_F_RXHASH; |
879 |
++ if (netdev->features & NETIF_F_RXHASH) |
880 |
++ netdev_warn(netdev, "Disabling rxhash, not supported when CQE compress is active\n"); |
881 |
++ } |
882 |
++ |
883 |
+ mutex_unlock(&priv->state_lock); |
884 |
+ |
885 |
+ return features; |
886 |
+@@ -3860,6 +3866,9 @@ int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr) |
887 |
+ memcpy(&priv->tstamp, &config, sizeof(config)); |
888 |
+ mutex_unlock(&priv->state_lock); |
889 |
+ |
890 |
++ /* might need to fix some features */ |
891 |
++ netdev_update_features(priv->netdev); |
892 |
++ |
893 |
+ return copy_to_user(ifr->ifr_data, &config, |
894 |
+ sizeof(config)) ? -EFAULT : 0; |
895 |
+ } |
896 |
+@@ -4702,6 +4711,10 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev) |
897 |
+ if (!priv->channels.params.scatter_fcs_en) |
898 |
+ netdev->features &= ~NETIF_F_RXFCS; |
899 |
+ |
900 |
++ /* prefere CQE compression over rxhash */ |
901 |
++ if (MLX5E_GET_PFLAG(&priv->channels.params, MLX5E_PFLAG_RX_CQE_COMPRESS)) |
902 |
++ netdev->features &= ~NETIF_F_RXHASH; |
903 |
++ |
904 |
+ #define FT_CAP(f) MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_receive.f) |
905 |
+ if (FT_CAP(flow_modify_en) && |
906 |
+ FT_CAP(modify_root) && |
907 |
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c |
908 |
+index d181645fd968..c079f85593d6 100644 |
909 |
+--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c |
910 |
++++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c |
911 |
+@@ -2220,7 +2220,7 @@ static struct mlx5_flow_root_namespace |
912 |
+ cmds = mlx5_fs_cmd_get_default_ipsec_fpga_cmds(table_type); |
913 |
+ |
914 |
+ /* Create the root namespace */ |
915 |
+- root_ns = kvzalloc(sizeof(*root_ns), GFP_KERNEL); |
916 |
++ root_ns = kzalloc(sizeof(*root_ns), GFP_KERNEL); |
917 |
+ if (!root_ns) |
918 |
+ return NULL; |
919 |
+ |
920 |
+@@ -2363,6 +2363,7 @@ static void cleanup_egress_acls_root_ns(struct mlx5_core_dev *dev) |
921 |
+ cleanup_root_ns(steering->esw_egress_root_ns[i]); |
922 |
+ |
923 |
+ kfree(steering->esw_egress_root_ns); |
924 |
++ steering->esw_egress_root_ns = NULL; |
925 |
+ } |
926 |
+ |
927 |
+ static void cleanup_ingress_acls_root_ns(struct mlx5_core_dev *dev) |
928 |
+@@ -2377,6 +2378,7 @@ static void cleanup_ingress_acls_root_ns(struct mlx5_core_dev *dev) |
929 |
+ cleanup_root_ns(steering->esw_ingress_root_ns[i]); |
930 |
+ |
931 |
+ kfree(steering->esw_ingress_root_ns); |
932 |
++ steering->esw_ingress_root_ns = NULL; |
933 |
+ } |
934 |
+ |
935 |
+ void mlx5_cleanup_fs(struct mlx5_core_dev *dev) |
936 |
+@@ -2505,6 +2507,7 @@ cleanup_root_ns: |
937 |
+ for (i--; i >= 0; i--) |
938 |
+ cleanup_root_ns(steering->esw_egress_root_ns[i]); |
939 |
+ kfree(steering->esw_egress_root_ns); |
940 |
++ steering->esw_egress_root_ns = NULL; |
941 |
+ return err; |
942 |
+ } |
943 |
+ |
944 |
+@@ -2532,6 +2535,7 @@ cleanup_root_ns: |
945 |
+ for (i--; i >= 0; i--) |
946 |
+ cleanup_root_ns(steering->esw_ingress_root_ns[i]); |
947 |
+ kfree(steering->esw_ingress_root_ns); |
948 |
++ steering->esw_ingress_root_ns = NULL; |
949 |
+ return err; |
950 |
+ } |
951 |
+ |
952 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |
953 |
+index 5debe93ea4eb..50c00822b2d8 100644 |
954 |
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |
955 |
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |
956 |
+@@ -2195,6 +2195,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv) |
957 |
+ if (priv->plat->axi) |
958 |
+ stmmac_axi(priv, priv->ioaddr, priv->plat->axi); |
959 |
+ |
960 |
++ /* DMA CSR Channel configuration */ |
961 |
++ for (chan = 0; chan < dma_csr_ch; chan++) |
962 |
++ stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan); |
963 |
++ |
964 |
+ /* DMA RX Channel Configuration */ |
965 |
+ for (chan = 0; chan < rx_channels_count; chan++) { |
966 |
+ rx_q = &priv->rx_queue[chan]; |
967 |
+@@ -2220,10 +2224,6 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv) |
968 |
+ tx_q->tx_tail_addr, chan); |
969 |
+ } |
970 |
+ |
971 |
+- /* DMA CSR Channel configuration */ |
972 |
+- for (chan = 0; chan < dma_csr_ch; chan++) |
973 |
+- stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan); |
974 |
+- |
975 |
+ return ret; |
976 |
+ } |
977 |
+ |
978 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |
979 |
+index bdd351597b55..093a223fe408 100644 |
980 |
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |
981 |
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |
982 |
+@@ -267,7 +267,8 @@ int stmmac_mdio_reset(struct mii_bus *bus) |
983 |
+ of_property_read_u32_array(np, |
984 |
+ "snps,reset-delays-us", data->delays, 3); |
985 |
+ |
986 |
+- if (gpio_request(data->reset_gpio, "mdio-reset")) |
987 |
++ if (devm_gpio_request(priv->device, data->reset_gpio, |
988 |
++ "mdio-reset")) |
989 |
+ return 0; |
990 |
+ } |
991 |
+ |
992 |
+diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c |
993 |
+index f77a2d9e7f9d..456a1f882b09 100644 |
994 |
+--- a/drivers/net/phy/marvell10g.c |
995 |
++++ b/drivers/net/phy/marvell10g.c |
996 |
+@@ -27,6 +27,9 @@ |
997 |
+ #include <linux/phy.h> |
998 |
+ |
999 |
+ enum { |
1000 |
++ MV_PMA_BOOT = 0xc050, |
1001 |
++ MV_PMA_BOOT_FATAL = BIT(0), |
1002 |
++ |
1003 |
+ MV_PCS_BASE_T = 0x0000, |
1004 |
+ MV_PCS_BASE_R = 0x1000, |
1005 |
+ MV_PCS_1000BASEX = 0x2000, |
1006 |
+@@ -226,6 +229,16 @@ static int mv3310_probe(struct phy_device *phydev) |
1007 |
+ (phydev->c45_ids.devices_in_package & mmd_mask) != mmd_mask) |
1008 |
+ return -ENODEV; |
1009 |
+ |
1010 |
++ ret = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MV_PMA_BOOT); |
1011 |
++ if (ret < 0) |
1012 |
++ return ret; |
1013 |
++ |
1014 |
++ if (ret & MV_PMA_BOOT_FATAL) { |
1015 |
++ dev_warn(&phydev->mdio.dev, |
1016 |
++ "PHY failed to boot firmware, status=%04x\n", ret); |
1017 |
++ return -ENODEV; |
1018 |
++ } |
1019 |
++ |
1020 |
+ priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); |
1021 |
+ if (!priv) |
1022 |
+ return -ENOMEM; |
1023 |
+diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c |
1024 |
+index 770aa624147f..10854977c55f 100644 |
1025 |
+--- a/drivers/net/usb/usbnet.c |
1026 |
++++ b/drivers/net/usb/usbnet.c |
1027 |
+@@ -506,6 +506,7 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) |
1028 |
+ |
1029 |
+ if (netif_running (dev->net) && |
1030 |
+ netif_device_present (dev->net) && |
1031 |
++ test_bit(EVENT_DEV_OPEN, &dev->flags) && |
1032 |
+ !test_bit (EVENT_RX_HALT, &dev->flags) && |
1033 |
+ !test_bit (EVENT_DEV_ASLEEP, &dev->flags)) { |
1034 |
+ switch (retval = usb_submit_urb (urb, GFP_ATOMIC)) { |
1035 |
+@@ -1431,6 +1432,11 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, |
1036 |
+ spin_unlock_irqrestore(&dev->txq.lock, flags); |
1037 |
+ goto drop; |
1038 |
+ } |
1039 |
++ if (netif_queue_stopped(net)) { |
1040 |
++ usb_autopm_put_interface_async(dev->intf); |
1041 |
++ spin_unlock_irqrestore(&dev->txq.lock, flags); |
1042 |
++ goto drop; |
1043 |
++ } |
1044 |
+ |
1045 |
+ #ifdef CONFIG_PM |
1046 |
+ /* if this triggers the device is still a sleep */ |
1047 |
+diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c |
1048 |
+index ea4a08b83fa0..787966f44589 100644 |
1049 |
+--- a/drivers/xen/xen-pciback/pciback_ops.c |
1050 |
++++ b/drivers/xen/xen-pciback/pciback_ops.c |
1051 |
+@@ -127,8 +127,6 @@ void xen_pcibk_reset_device(struct pci_dev *dev) |
1052 |
+ if (pci_is_enabled(dev)) |
1053 |
+ pci_disable_device(dev); |
1054 |
+ |
1055 |
+- pci_write_config_word(dev, PCI_COMMAND, 0); |
1056 |
+- |
1057 |
+ dev->is_busmaster = 0; |
1058 |
+ } else { |
1059 |
+ pci_read_config_word(dev, PCI_COMMAND, &cmd); |
1060 |
+diff --git a/include/linux/compiler.h b/include/linux/compiler.h |
1061 |
+index 81c2238b884c..bb22908c79e8 100644 |
1062 |
+--- a/include/linux/compiler.h |
1063 |
++++ b/include/linux/compiler.h |
1064 |
+@@ -319,29 +319,14 @@ static inline void *offset_to_ptr(const int *off) |
1065 |
+ #endif |
1066 |
+ #ifndef __compiletime_error |
1067 |
+ # define __compiletime_error(message) |
1068 |
+-/* |
1069 |
+- * Sparse complains of variable sized arrays due to the temporary variable in |
1070 |
+- * __compiletime_assert. Unfortunately we can't just expand it out to make |
1071 |
+- * sparse see a constant array size without breaking compiletime_assert on old |
1072 |
+- * versions of GCC (e.g. 4.2.4), so hide the array from sparse altogether. |
1073 |
+- */ |
1074 |
+-# ifndef __CHECKER__ |
1075 |
+-# define __compiletime_error_fallback(condition) \ |
1076 |
+- do { ((void)sizeof(char[1 - 2 * condition])); } while (0) |
1077 |
+-# endif |
1078 |
+-#endif |
1079 |
+-#ifndef __compiletime_error_fallback |
1080 |
+-# define __compiletime_error_fallback(condition) do { } while (0) |
1081 |
+ #endif |
1082 |
+ |
1083 |
+ #ifdef __OPTIMIZE__ |
1084 |
+ # define __compiletime_assert(condition, msg, prefix, suffix) \ |
1085 |
+ do { \ |
1086 |
+- int __cond = !(condition); \ |
1087 |
+ extern void prefix ## suffix(void) __compiletime_error(msg); \ |
1088 |
+- if (__cond) \ |
1089 |
++ if (!(condition)) \ |
1090 |
+ prefix ## suffix(); \ |
1091 |
+- __compiletime_error_fallback(__cond); \ |
1092 |
+ } while (0) |
1093 |
+ #else |
1094 |
+ # define __compiletime_assert(condition, msg, prefix, suffix) do { } while (0) |
1095 |
+diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h |
1096 |
+index db192becfec4..c2ded31a4cec 100644 |
1097 |
+--- a/include/linux/compiler_types.h |
1098 |
++++ b/include/linux/compiler_types.h |
1099 |
+@@ -151,6 +151,10 @@ struct ftrace_likely_data { |
1100 |
+ #define __assume_aligned(a, ...) |
1101 |
+ #endif |
1102 |
+ |
1103 |
++#ifndef asm_volatile_goto |
1104 |
++#define asm_volatile_goto(x...) asm goto(x) |
1105 |
++#endif |
1106 |
++ |
1107 |
+ /* Are two types/vars the same type (ignoring qualifiers)? */ |
1108 |
+ #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) |
1109 |
+ |
1110 |
+diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h |
1111 |
+index 2fd8006153c3..b3419da1a776 100644 |
1112 |
+--- a/include/linux/dynamic_debug.h |
1113 |
++++ b/include/linux/dynamic_debug.h |
1114 |
+@@ -2,7 +2,7 @@ |
1115 |
+ #ifndef _DYNAMIC_DEBUG_H |
1116 |
+ #define _DYNAMIC_DEBUG_H |
1117 |
+ |
1118 |
+-#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) |
1119 |
++#if defined(CONFIG_JUMP_LABEL) |
1120 |
+ #include <linux/jump_label.h> |
1121 |
+ #endif |
1122 |
+ |
1123 |
+@@ -38,7 +38,7 @@ struct _ddebug { |
1124 |
+ #define _DPRINTK_FLAGS_DEFAULT 0 |
1125 |
+ #endif |
1126 |
+ unsigned int flags:8; |
1127 |
+-#ifdef HAVE_JUMP_LABEL |
1128 |
++#ifdef CONFIG_JUMP_LABEL |
1129 |
+ union { |
1130 |
+ struct static_key_true dd_key_true; |
1131 |
+ struct static_key_false dd_key_false; |
1132 |
+@@ -83,7 +83,7 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor, |
1133 |
+ dd_key_init(key, init) \ |
1134 |
+ } |
1135 |
+ |
1136 |
+-#ifdef HAVE_JUMP_LABEL |
1137 |
++#ifdef CONFIG_JUMP_LABEL |
1138 |
+ |
1139 |
+ #define dd_key_init(key, init) key = (init) |
1140 |
+ |
1141 |
+diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h |
1142 |
+index 1a0b6f17a5d6..4c3e77687d4e 100644 |
1143 |
+--- a/include/linux/jump_label.h |
1144 |
++++ b/include/linux/jump_label.h |
1145 |
+@@ -71,10 +71,6 @@ |
1146 |
+ * Additional babbling in: Documentation/static-keys.txt |
1147 |
+ */ |
1148 |
+ |
1149 |
+-#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) |
1150 |
+-# define HAVE_JUMP_LABEL |
1151 |
+-#endif |
1152 |
+- |
1153 |
+ #ifndef __ASSEMBLY__ |
1154 |
+ |
1155 |
+ #include <linux/types.h> |
1156 |
+@@ -86,7 +82,7 @@ extern bool static_key_initialized; |
1157 |
+ "%s(): static key '%pS' used before call to jump_label_init()", \ |
1158 |
+ __func__, (key)) |
1159 |
+ |
1160 |
+-#ifdef HAVE_JUMP_LABEL |
1161 |
++#ifdef CONFIG_JUMP_LABEL |
1162 |
+ |
1163 |
+ struct static_key { |
1164 |
+ atomic_t enabled; |
1165 |
+@@ -114,10 +110,10 @@ struct static_key { |
1166 |
+ struct static_key { |
1167 |
+ atomic_t enabled; |
1168 |
+ }; |
1169 |
+-#endif /* HAVE_JUMP_LABEL */ |
1170 |
++#endif /* CONFIG_JUMP_LABEL */ |
1171 |
+ #endif /* __ASSEMBLY__ */ |
1172 |
+ |
1173 |
+-#ifdef HAVE_JUMP_LABEL |
1174 |
++#ifdef CONFIG_JUMP_LABEL |
1175 |
+ #include <asm/jump_label.h> |
1176 |
+ #endif |
1177 |
+ |
1178 |
+@@ -130,7 +126,7 @@ enum jump_label_type { |
1179 |
+ |
1180 |
+ struct module; |
1181 |
+ |
1182 |
+-#ifdef HAVE_JUMP_LABEL |
1183 |
++#ifdef CONFIG_JUMP_LABEL |
1184 |
+ |
1185 |
+ #define JUMP_TYPE_FALSE 0UL |
1186 |
+ #define JUMP_TYPE_TRUE 1UL |
1187 |
+@@ -184,7 +180,7 @@ extern void static_key_disable_cpuslocked(struct static_key *key); |
1188 |
+ { .enabled = { 0 }, \ |
1189 |
+ { .entries = (void *)JUMP_TYPE_FALSE } } |
1190 |
+ |
1191 |
+-#else /* !HAVE_JUMP_LABEL */ |
1192 |
++#else /* !CONFIG_JUMP_LABEL */ |
1193 |
+ |
1194 |
+ #include <linux/atomic.h> |
1195 |
+ #include <linux/bug.h> |
1196 |
+@@ -271,7 +267,7 @@ static inline void static_key_disable(struct static_key *key) |
1197 |
+ #define STATIC_KEY_INIT_TRUE { .enabled = ATOMIC_INIT(1) } |
1198 |
+ #define STATIC_KEY_INIT_FALSE { .enabled = ATOMIC_INIT(0) } |
1199 |
+ |
1200 |
+-#endif /* HAVE_JUMP_LABEL */ |
1201 |
++#endif /* CONFIG_JUMP_LABEL */ |
1202 |
+ |
1203 |
+ #define STATIC_KEY_INIT STATIC_KEY_INIT_FALSE |
1204 |
+ #define jump_label_enabled static_key_enabled |
1205 |
+@@ -335,7 +331,7 @@ extern bool ____wrong_branch_error(void); |
1206 |
+ static_key_count((struct static_key *)x) > 0; \ |
1207 |
+ }) |
1208 |
+ |
1209 |
+-#ifdef HAVE_JUMP_LABEL |
1210 |
++#ifdef CONFIG_JUMP_LABEL |
1211 |
+ |
1212 |
+ /* |
1213 |
+ * Combine the right initial value (type) with the right branch order |
1214 |
+@@ -417,12 +413,12 @@ extern bool ____wrong_branch_error(void); |
1215 |
+ unlikely(branch); \ |
1216 |
+ }) |
1217 |
+ |
1218 |
+-#else /* !HAVE_JUMP_LABEL */ |
1219 |
++#else /* !CONFIG_JUMP_LABEL */ |
1220 |
+ |
1221 |
+ #define static_branch_likely(x) likely(static_key_enabled(&(x)->key)) |
1222 |
+ #define static_branch_unlikely(x) unlikely(static_key_enabled(&(x)->key)) |
1223 |
+ |
1224 |
+-#endif /* HAVE_JUMP_LABEL */ |
1225 |
++#endif /* CONFIG_JUMP_LABEL */ |
1226 |
+ |
1227 |
+ /* |
1228 |
+ * Advanced usage; refcount, branch is enabled when: count != 0 |
1229 |
+diff --git a/include/linux/jump_label_ratelimit.h b/include/linux/jump_label_ratelimit.h |
1230 |
+index baa8eabbaa56..a49f2b45b3f0 100644 |
1231 |
+--- a/include/linux/jump_label_ratelimit.h |
1232 |
++++ b/include/linux/jump_label_ratelimit.h |
1233 |
+@@ -5,21 +5,19 @@ |
1234 |
+ #include <linux/jump_label.h> |
1235 |
+ #include <linux/workqueue.h> |
1236 |
+ |
1237 |
+-#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) |
1238 |
++#if defined(CONFIG_JUMP_LABEL) |
1239 |
+ struct static_key_deferred { |
1240 |
+ struct static_key key; |
1241 |
+ unsigned long timeout; |
1242 |
+ struct delayed_work work; |
1243 |
+ }; |
1244 |
+-#endif |
1245 |
+ |
1246 |
+-#ifdef HAVE_JUMP_LABEL |
1247 |
+ extern void static_key_slow_dec_deferred(struct static_key_deferred *key); |
1248 |
+ extern void static_key_deferred_flush(struct static_key_deferred *key); |
1249 |
+ extern void |
1250 |
+ jump_label_rate_limit(struct static_key_deferred *key, unsigned long rl); |
1251 |
+ |
1252 |
+-#else /* !HAVE_JUMP_LABEL */ |
1253 |
++#else /* !CONFIG_JUMP_LABEL */ |
1254 |
+ struct static_key_deferred { |
1255 |
+ struct static_key key; |
1256 |
+ }; |
1257 |
+@@ -38,5 +36,5 @@ jump_label_rate_limit(struct static_key_deferred *key, |
1258 |
+ { |
1259 |
+ STATIC_KEY_CHECK_USE(key); |
1260 |
+ } |
1261 |
+-#endif /* HAVE_JUMP_LABEL */ |
1262 |
++#endif /* CONFIG_JUMP_LABEL */ |
1263 |
+ #endif /* _LINUX_JUMP_LABEL_RATELIMIT_H */ |
1264 |
+diff --git a/include/linux/module.h b/include/linux/module.h |
1265 |
+index 904f94628132..c71044644979 100644 |
1266 |
+--- a/include/linux/module.h |
1267 |
++++ b/include/linux/module.h |
1268 |
+@@ -433,7 +433,7 @@ struct module { |
1269 |
+ unsigned int num_tracepoints; |
1270 |
+ tracepoint_ptr_t *tracepoints_ptrs; |
1271 |
+ #endif |
1272 |
+-#ifdef HAVE_JUMP_LABEL |
1273 |
++#ifdef CONFIG_JUMP_LABEL |
1274 |
+ struct jump_entry *jump_entries; |
1275 |
+ unsigned int num_jump_entries; |
1276 |
+ #endif |
1277 |
+diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h |
1278 |
+index bbe99d2b28b4..72cb19c3db6a 100644 |
1279 |
+--- a/include/linux/netfilter.h |
1280 |
++++ b/include/linux/netfilter.h |
1281 |
+@@ -176,7 +176,7 @@ void nf_unregister_net_hooks(struct net *net, const struct nf_hook_ops *reg, |
1282 |
+ int nf_register_sockopt(struct nf_sockopt_ops *reg); |
1283 |
+ void nf_unregister_sockopt(struct nf_sockopt_ops *reg); |
1284 |
+ |
1285 |
+-#ifdef HAVE_JUMP_LABEL |
1286 |
++#ifdef CONFIG_JUMP_LABEL |
1287 |
+ extern struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; |
1288 |
+ #endif |
1289 |
+ |
1290 |
+@@ -198,7 +198,7 @@ static inline int nf_hook(u_int8_t pf, unsigned int hook, struct net *net, |
1291 |
+ struct nf_hook_entries *hook_head = NULL; |
1292 |
+ int ret = 1; |
1293 |
+ |
1294 |
+-#ifdef HAVE_JUMP_LABEL |
1295 |
++#ifdef CONFIG_JUMP_LABEL |
1296 |
+ if (__builtin_constant_p(pf) && |
1297 |
+ __builtin_constant_p(hook) && |
1298 |
+ !static_key_false(&nf_hooks_needed[pf][hook])) |
1299 |
+diff --git a/include/linux/netfilter_ingress.h b/include/linux/netfilter_ingress.h |
1300 |
+index 554c920691dd..a13774be2eb5 100644 |
1301 |
+--- a/include/linux/netfilter_ingress.h |
1302 |
++++ b/include/linux/netfilter_ingress.h |
1303 |
+@@ -8,7 +8,7 @@ |
1304 |
+ #ifdef CONFIG_NETFILTER_INGRESS |
1305 |
+ static inline bool nf_hook_ingress_active(const struct sk_buff *skb) |
1306 |
+ { |
1307 |
+-#ifdef HAVE_JUMP_LABEL |
1308 |
++#ifdef CONFIG_JUMP_LABEL |
1309 |
+ if (!static_key_false(&nf_hooks_needed[NFPROTO_NETDEV][NF_NETDEV_INGRESS])) |
1310 |
+ return false; |
1311 |
+ #endif |
1312 |
+diff --git a/include/linux/siphash.h b/include/linux/siphash.h |
1313 |
+index fa7a6b9cedbf..bf21591a9e5e 100644 |
1314 |
+--- a/include/linux/siphash.h |
1315 |
++++ b/include/linux/siphash.h |
1316 |
+@@ -21,6 +21,11 @@ typedef struct { |
1317 |
+ u64 key[2]; |
1318 |
+ } siphash_key_t; |
1319 |
+ |
1320 |
++static inline bool siphash_key_is_zero(const siphash_key_t *key) |
1321 |
++{ |
1322 |
++ return !(key->key[0] | key->key[1]); |
1323 |
++} |
1324 |
++ |
1325 |
+ u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key); |
1326 |
+ #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS |
1327 |
+ u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key); |
1328 |
+diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h |
1329 |
+index e47503b4e4d1..622db6bc2f02 100644 |
1330 |
+--- a/include/net/netns/ipv4.h |
1331 |
++++ b/include/net/netns/ipv4.h |
1332 |
+@@ -9,6 +9,7 @@ |
1333 |
+ #include <linux/uidgid.h> |
1334 |
+ #include <net/inet_frag.h> |
1335 |
+ #include <linux/rcupdate.h> |
1336 |
++#include <linux/siphash.h> |
1337 |
+ |
1338 |
+ struct tcpm_hash_bucket; |
1339 |
+ struct ctl_table_header; |
1340 |
+@@ -214,5 +215,6 @@ struct netns_ipv4 { |
1341 |
+ unsigned int ipmr_seq; /* protected by rtnl_mutex */ |
1342 |
+ |
1343 |
+ atomic_t rt_genid; |
1344 |
++ siphash_key_t ip_id_key; |
1345 |
+ }; |
1346 |
+ #endif |
1347 |
+diff --git a/include/uapi/linux/tipc_config.h b/include/uapi/linux/tipc_config.h |
1348 |
+index 4b2c93b1934c..4955e1a9f1bc 100644 |
1349 |
+--- a/include/uapi/linux/tipc_config.h |
1350 |
++++ b/include/uapi/linux/tipc_config.h |
1351 |
+@@ -307,8 +307,10 @@ static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len) |
1352 |
+ tlv_ptr = (struct tlv_desc *)tlv; |
1353 |
+ tlv_ptr->tlv_type = htons(type); |
1354 |
+ tlv_ptr->tlv_len = htons(tlv_len); |
1355 |
+- if (len && data) |
1356 |
+- memcpy(TLV_DATA(tlv_ptr), data, tlv_len); |
1357 |
++ if (len && data) { |
1358 |
++ memcpy(TLV_DATA(tlv_ptr), data, len); |
1359 |
++ memset(TLV_DATA(tlv_ptr) + len, 0, TLV_SPACE(len) - tlv_len); |
1360 |
++ } |
1361 |
+ return TLV_SPACE(len); |
1362 |
+ } |
1363 |
+ |
1364 |
+@@ -405,8 +407,10 @@ static inline int TCM_SET(void *msg, __u16 cmd, __u16 flags, |
1365 |
+ tcm_hdr->tcm_len = htonl(msg_len); |
1366 |
+ tcm_hdr->tcm_type = htons(cmd); |
1367 |
+ tcm_hdr->tcm_flags = htons(flags); |
1368 |
+- if (data_len && data) |
1369 |
++ if (data_len && data) { |
1370 |
+ memcpy(TCM_DATA(msg), data, data_len); |
1371 |
++ memset(TCM_DATA(msg) + data_len, 0, TCM_SPACE(data_len) - msg_len); |
1372 |
++ } |
1373 |
+ return TCM_SPACE(data_len); |
1374 |
+ } |
1375 |
+ |
1376 |
+diff --git a/init/Kconfig b/init/Kconfig |
1377 |
+index 864af10bb1b9..47035b5a46f6 100644 |
1378 |
+--- a/init/Kconfig |
1379 |
++++ b/init/Kconfig |
1380 |
+@@ -23,6 +23,9 @@ config CLANG_VERSION |
1381 |
+ int |
1382 |
+ default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) |
1383 |
+ |
1384 |
++config CC_HAS_ASM_GOTO |
1385 |
++ def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC)) |
1386 |
++ |
1387 |
+ config CONSTRUCTORS |
1388 |
+ bool |
1389 |
+ depends on !UML |
1390 |
+diff --git a/kernel/jump_label.c b/kernel/jump_label.c |
1391 |
+index 2e62503bea0d..7c8262635b29 100644 |
1392 |
+--- a/kernel/jump_label.c |
1393 |
++++ b/kernel/jump_label.c |
1394 |
+@@ -18,8 +18,6 @@ |
1395 |
+ #include <linux/cpu.h> |
1396 |
+ #include <asm/sections.h> |
1397 |
+ |
1398 |
+-#ifdef HAVE_JUMP_LABEL |
1399 |
+- |
1400 |
+ /* mutex to protect coming/going of the the jump_label table */ |
1401 |
+ static DEFINE_MUTEX(jump_label_mutex); |
1402 |
+ |
1403 |
+@@ -60,13 +58,13 @@ jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop) |
1404 |
+ static void jump_label_update(struct static_key *key); |
1405 |
+ |
1406 |
+ /* |
1407 |
+- * There are similar definitions for the !HAVE_JUMP_LABEL case in jump_label.h. |
1408 |
++ * There are similar definitions for the !CONFIG_JUMP_LABEL case in jump_label.h. |
1409 |
+ * The use of 'atomic_read()' requires atomic.h and its problematic for some |
1410 |
+ * kernel headers such as kernel.h and others. Since static_key_count() is not |
1411 |
+- * used in the branch statements as it is for the !HAVE_JUMP_LABEL case its ok |
1412 |
++ * used in the branch statements as it is for the !CONFIG_JUMP_LABEL case its ok |
1413 |
+ * to have it be a function here. Similarly, for 'static_key_enable()' and |
1414 |
+ * 'static_key_disable()', which require bug.h. This should allow jump_label.h |
1415 |
+- * to be included from most/all places for HAVE_JUMP_LABEL. |
1416 |
++ * to be included from most/all places for CONFIG_JUMP_LABEL. |
1417 |
+ */ |
1418 |
+ int static_key_count(struct static_key *key) |
1419 |
+ { |
1420 |
+@@ -796,5 +794,3 @@ static __init int jump_label_test(void) |
1421 |
+ } |
1422 |
+ early_initcall(jump_label_test); |
1423 |
+ #endif /* STATIC_KEYS_SELFTEST */ |
1424 |
+- |
1425 |
+-#endif /* HAVE_JUMP_LABEL */ |
1426 |
+diff --git a/kernel/module.c b/kernel/module.c |
1427 |
+index f797c6ace712..b8f37376856b 100644 |
1428 |
+--- a/kernel/module.c |
1429 |
++++ b/kernel/module.c |
1430 |
+@@ -3100,7 +3100,7 @@ static int find_module_sections(struct module *mod, struct load_info *info) |
1431 |
+ sizeof(*mod->tracepoints_ptrs), |
1432 |
+ &mod->num_tracepoints); |
1433 |
+ #endif |
1434 |
+-#ifdef HAVE_JUMP_LABEL |
1435 |
++#ifdef CONFIG_JUMP_LABEL |
1436 |
+ mod->jump_entries = section_objs(info, "__jump_table", |
1437 |
+ sizeof(*mod->jump_entries), |
1438 |
+ &mod->num_jump_entries); |
1439 |
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c |
1440 |
+index 6138754e5030..6859ea1d5c04 100644 |
1441 |
+--- a/kernel/sched/core.c |
1442 |
++++ b/kernel/sched/core.c |
1443 |
+@@ -24,7 +24,7 @@ |
1444 |
+ |
1445 |
+ DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); |
1446 |
+ |
1447 |
+-#if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL) |
1448 |
++#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_JUMP_LABEL) |
1449 |
+ /* |
1450 |
+ * Debugging: various feature bits |
1451 |
+ * |
1452 |
+diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c |
1453 |
+index 141ea9ff210e..78fadf0438ea 100644 |
1454 |
+--- a/kernel/sched/debug.c |
1455 |
++++ b/kernel/sched/debug.c |
1456 |
+@@ -73,7 +73,7 @@ static int sched_feat_show(struct seq_file *m, void *v) |
1457 |
+ return 0; |
1458 |
+ } |
1459 |
+ |
1460 |
+-#ifdef HAVE_JUMP_LABEL |
1461 |
++#ifdef CONFIG_JUMP_LABEL |
1462 |
+ |
1463 |
+ #define jump_label_key__true STATIC_KEY_INIT_TRUE |
1464 |
+ #define jump_label_key__false STATIC_KEY_INIT_FALSE |
1465 |
+@@ -99,7 +99,7 @@ static void sched_feat_enable(int i) |
1466 |
+ #else |
1467 |
+ static void sched_feat_disable(int i) { }; |
1468 |
+ static void sched_feat_enable(int i) { }; |
1469 |
+-#endif /* HAVE_JUMP_LABEL */ |
1470 |
++#endif /* CONFIG_JUMP_LABEL */ |
1471 |
+ |
1472 |
+ static int sched_feat_set(char *cmp) |
1473 |
+ { |
1474 |
+diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c |
1475 |
+index 7a1e9db617f7..4a433608ba74 100644 |
1476 |
+--- a/kernel/sched/fair.c |
1477 |
++++ b/kernel/sched/fair.c |
1478 |
+@@ -4209,7 +4209,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) |
1479 |
+ |
1480 |
+ #ifdef CONFIG_CFS_BANDWIDTH |
1481 |
+ |
1482 |
+-#ifdef HAVE_JUMP_LABEL |
1483 |
++#ifdef CONFIG_JUMP_LABEL |
1484 |
+ static struct static_key __cfs_bandwidth_used; |
1485 |
+ |
1486 |
+ static inline bool cfs_bandwidth_used(void) |
1487 |
+@@ -4226,7 +4226,7 @@ void cfs_bandwidth_usage_dec(void) |
1488 |
+ { |
1489 |
+ static_key_slow_dec_cpuslocked(&__cfs_bandwidth_used); |
1490 |
+ } |
1491 |
+-#else /* HAVE_JUMP_LABEL */ |
1492 |
++#else /* CONFIG_JUMP_LABEL */ |
1493 |
+ static bool cfs_bandwidth_used(void) |
1494 |
+ { |
1495 |
+ return true; |
1496 |
+@@ -4234,7 +4234,7 @@ static bool cfs_bandwidth_used(void) |
1497 |
+ |
1498 |
+ void cfs_bandwidth_usage_inc(void) {} |
1499 |
+ void cfs_bandwidth_usage_dec(void) {} |
1500 |
+-#endif /* HAVE_JUMP_LABEL */ |
1501 |
++#endif /* CONFIG_JUMP_LABEL */ |
1502 |
+ |
1503 |
+ /* |
1504 |
+ * default period for cfs group bandwidth. |
1505 |
+diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h |
1506 |
+index 4c7a837d7c14..9a7c3d08b39f 100644 |
1507 |
+--- a/kernel/sched/sched.h |
1508 |
++++ b/kernel/sched/sched.h |
1509 |
+@@ -1359,7 +1359,7 @@ enum { |
1510 |
+ |
1511 |
+ #undef SCHED_FEAT |
1512 |
+ |
1513 |
+-#if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL) |
1514 |
++#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_JUMP_LABEL) |
1515 |
+ |
1516 |
+ /* |
1517 |
+ * To support run-time toggling of sched features, all the translation units |
1518 |
+@@ -1379,7 +1379,7 @@ static __always_inline bool static_branch_##name(struct static_key *key) \ |
1519 |
+ extern struct static_key sched_feat_keys[__SCHED_FEAT_NR]; |
1520 |
+ #define sched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x])) |
1521 |
+ |
1522 |
+-#else /* !(SCHED_DEBUG && HAVE_JUMP_LABEL) */ |
1523 |
++#else /* !(SCHED_DEBUG && CONFIG_JUMP_LABEL) */ |
1524 |
+ |
1525 |
+ /* |
1526 |
+ * Each translation unit has its own copy of sysctl_sched_features to allow |
1527 |
+@@ -1395,7 +1395,7 @@ static const_debug __maybe_unused unsigned int sysctl_sched_features = |
1528 |
+ |
1529 |
+ #define sched_feat(x) (sysctl_sched_features & (1UL << __SCHED_FEAT_##x)) |
1530 |
+ |
1531 |
+-#endif /* SCHED_DEBUG && HAVE_JUMP_LABEL */ |
1532 |
++#endif /* SCHED_DEBUG && CONFIG_JUMP_LABEL */ |
1533 |
+ |
1534 |
+ extern struct static_key_false sched_numa_balancing; |
1535 |
+ extern struct static_key_false sched_schedstats; |
1536 |
+diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c |
1537 |
+index c7c96bc7654a..dbf2b457e47e 100644 |
1538 |
+--- a/lib/dynamic_debug.c |
1539 |
++++ b/lib/dynamic_debug.c |
1540 |
+@@ -188,7 +188,7 @@ static int ddebug_change(const struct ddebug_query *query, |
1541 |
+ newflags = (dp->flags & mask) | flags; |
1542 |
+ if (newflags == dp->flags) |
1543 |
+ continue; |
1544 |
+-#ifdef HAVE_JUMP_LABEL |
1545 |
++#ifdef CONFIG_JUMP_LABEL |
1546 |
+ if (dp->flags & _DPRINTK_FLAGS_PRINT) { |
1547 |
+ if (!(flags & _DPRINTK_FLAGS_PRINT)) |
1548 |
+ static_branch_disable(&dp->key.dd_key_true); |
1549 |
+diff --git a/net/core/dev.c b/net/core/dev.c |
1550 |
+index 13a82744a00a..138951d28643 100644 |
1551 |
+--- a/net/core/dev.c |
1552 |
++++ b/net/core/dev.c |
1553 |
+@@ -1821,7 +1821,7 @@ EXPORT_SYMBOL_GPL(net_dec_egress_queue); |
1554 |
+ #endif |
1555 |
+ |
1556 |
+ static DEFINE_STATIC_KEY_FALSE(netstamp_needed_key); |
1557 |
+-#ifdef HAVE_JUMP_LABEL |
1558 |
++#ifdef CONFIG_JUMP_LABEL |
1559 |
+ static atomic_t netstamp_needed_deferred; |
1560 |
+ static atomic_t netstamp_wanted; |
1561 |
+ static void netstamp_clear(struct work_struct *work) |
1562 |
+@@ -1840,7 +1840,7 @@ static DECLARE_WORK(netstamp_work, netstamp_clear); |
1563 |
+ |
1564 |
+ void net_enable_timestamp(void) |
1565 |
+ { |
1566 |
+-#ifdef HAVE_JUMP_LABEL |
1567 |
++#ifdef CONFIG_JUMP_LABEL |
1568 |
+ int wanted; |
1569 |
+ |
1570 |
+ while (1) { |
1571 |
+@@ -1860,7 +1860,7 @@ EXPORT_SYMBOL(net_enable_timestamp); |
1572 |
+ |
1573 |
+ void net_disable_timestamp(void) |
1574 |
+ { |
1575 |
+-#ifdef HAVE_JUMP_LABEL |
1576 |
++#ifdef CONFIG_JUMP_LABEL |
1577 |
+ int wanted; |
1578 |
+ |
1579 |
+ while (1) { |
1580 |
+@@ -5725,7 +5725,6 @@ static struct sk_buff *napi_frags_skb(struct napi_struct *napi) |
1581 |
+ skb_reset_mac_header(skb); |
1582 |
+ skb_gro_reset_offset(skb); |
1583 |
+ |
1584 |
+- eth = skb_gro_header_fast(skb, 0); |
1585 |
+ if (unlikely(skb_gro_header_hard(skb, hlen))) { |
1586 |
+ eth = skb_gro_header_slow(skb, hlen, 0); |
1587 |
+ if (unlikely(!eth)) { |
1588 |
+@@ -5735,6 +5734,7 @@ static struct sk_buff *napi_frags_skb(struct napi_struct *napi) |
1589 |
+ return NULL; |
1590 |
+ } |
1591 |
+ } else { |
1592 |
++ eth = (const struct ethhdr *)skb->data; |
1593 |
+ gro_pull_from_frag0(skb, hlen); |
1594 |
+ NAPI_GRO_CB(skb)->frag0 += hlen; |
1595 |
+ NAPI_GRO_CB(skb)->frag0_len -= hlen; |
1596 |
+diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c |
1597 |
+index 4da39446da2d..d187ee8156a1 100644 |
1598 |
+--- a/net/ipv4/igmp.c |
1599 |
++++ b/net/ipv4/igmp.c |
1600 |
+@@ -190,6 +190,17 @@ static void ip_ma_put(struct ip_mc_list *im) |
1601 |
+ pmc != NULL; \ |
1602 |
+ pmc = rtnl_dereference(pmc->next_rcu)) |
1603 |
+ |
1604 |
++static void ip_sf_list_clear_all(struct ip_sf_list *psf) |
1605 |
++{ |
1606 |
++ struct ip_sf_list *next; |
1607 |
++ |
1608 |
++ while (psf) { |
1609 |
++ next = psf->sf_next; |
1610 |
++ kfree(psf); |
1611 |
++ psf = next; |
1612 |
++ } |
1613 |
++} |
1614 |
++ |
1615 |
+ #ifdef CONFIG_IP_MULTICAST |
1616 |
+ |
1617 |
+ /* |
1618 |
+@@ -635,6 +646,13 @@ static void igmpv3_clear_zeros(struct ip_sf_list **ppsf) |
1619 |
+ } |
1620 |
+ } |
1621 |
+ |
1622 |
++static void kfree_pmc(struct ip_mc_list *pmc) |
1623 |
++{ |
1624 |
++ ip_sf_list_clear_all(pmc->sources); |
1625 |
++ ip_sf_list_clear_all(pmc->tomb); |
1626 |
++ kfree(pmc); |
1627 |
++} |
1628 |
++ |
1629 |
+ static void igmpv3_send_cr(struct in_device *in_dev) |
1630 |
+ { |
1631 |
+ struct ip_mc_list *pmc, *pmc_prev, *pmc_next; |
1632 |
+@@ -671,7 +689,7 @@ static void igmpv3_send_cr(struct in_device *in_dev) |
1633 |
+ else |
1634 |
+ in_dev->mc_tomb = pmc_next; |
1635 |
+ in_dev_put(pmc->interface); |
1636 |
+- kfree(pmc); |
1637 |
++ kfree_pmc(pmc); |
1638 |
+ } else |
1639 |
+ pmc_prev = pmc; |
1640 |
+ } |
1641 |
+@@ -1201,14 +1219,18 @@ static void igmpv3_del_delrec(struct in_device *in_dev, struct ip_mc_list *im) |
1642 |
+ im->interface = pmc->interface; |
1643 |
+ if (im->sfmode == MCAST_INCLUDE) { |
1644 |
+ im->tomb = pmc->tomb; |
1645 |
++ pmc->tomb = NULL; |
1646 |
++ |
1647 |
+ im->sources = pmc->sources; |
1648 |
++ pmc->sources = NULL; |
1649 |
++ |
1650 |
+ for (psf = im->sources; psf; psf = psf->sf_next) |
1651 |
+ psf->sf_crcount = in_dev->mr_qrv ?: net->ipv4.sysctl_igmp_qrv; |
1652 |
+ } else { |
1653 |
+ im->crcount = in_dev->mr_qrv ?: net->ipv4.sysctl_igmp_qrv; |
1654 |
+ } |
1655 |
+ in_dev_put(pmc->interface); |
1656 |
+- kfree(pmc); |
1657 |
++ kfree_pmc(pmc); |
1658 |
+ } |
1659 |
+ spin_unlock_bh(&im->lock); |
1660 |
+ } |
1661 |
+@@ -1229,21 +1251,18 @@ static void igmpv3_clear_delrec(struct in_device *in_dev) |
1662 |
+ nextpmc = pmc->next; |
1663 |
+ ip_mc_clear_src(pmc); |
1664 |
+ in_dev_put(pmc->interface); |
1665 |
+- kfree(pmc); |
1666 |
++ kfree_pmc(pmc); |
1667 |
+ } |
1668 |
+ /* clear dead sources, too */ |
1669 |
+ rcu_read_lock(); |
1670 |
+ for_each_pmc_rcu(in_dev, pmc) { |
1671 |
+- struct ip_sf_list *psf, *psf_next; |
1672 |
++ struct ip_sf_list *psf; |
1673 |
+ |
1674 |
+ spin_lock_bh(&pmc->lock); |
1675 |
+ psf = pmc->tomb; |
1676 |
+ pmc->tomb = NULL; |
1677 |
+ spin_unlock_bh(&pmc->lock); |
1678 |
+- for (; psf; psf = psf_next) { |
1679 |
+- psf_next = psf->sf_next; |
1680 |
+- kfree(psf); |
1681 |
+- } |
1682 |
++ ip_sf_list_clear_all(psf); |
1683 |
+ } |
1684 |
+ rcu_read_unlock(); |
1685 |
+ } |
1686 |
+@@ -2114,7 +2133,7 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, |
1687 |
+ |
1688 |
+ static void ip_mc_clear_src(struct ip_mc_list *pmc) |
1689 |
+ { |
1690 |
+- struct ip_sf_list *psf, *nextpsf, *tomb, *sources; |
1691 |
++ struct ip_sf_list *tomb, *sources; |
1692 |
+ |
1693 |
+ spin_lock_bh(&pmc->lock); |
1694 |
+ tomb = pmc->tomb; |
1695 |
+@@ -2126,14 +2145,8 @@ static void ip_mc_clear_src(struct ip_mc_list *pmc) |
1696 |
+ pmc->sfcount[MCAST_EXCLUDE] = 1; |
1697 |
+ spin_unlock_bh(&pmc->lock); |
1698 |
+ |
1699 |
+- for (psf = tomb; psf; psf = nextpsf) { |
1700 |
+- nextpsf = psf->sf_next; |
1701 |
+- kfree(psf); |
1702 |
+- } |
1703 |
+- for (psf = sources; psf; psf = nextpsf) { |
1704 |
+- nextpsf = psf->sf_next; |
1705 |
+- kfree(psf); |
1706 |
+- } |
1707 |
++ ip_sf_list_clear_all(tomb); |
1708 |
++ ip_sf_list_clear_all(sources); |
1709 |
+ } |
1710 |
+ |
1711 |
+ /* Join a multicast group |
1712 |
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c |
1713 |
+index 8bacbcd2db90..40bf19f7ae1a 100644 |
1714 |
+--- a/net/ipv4/route.c |
1715 |
++++ b/net/ipv4/route.c |
1716 |
+@@ -500,15 +500,17 @@ EXPORT_SYMBOL(ip_idents_reserve); |
1717 |
+ |
1718 |
+ void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) |
1719 |
+ { |
1720 |
+- static u32 ip_idents_hashrnd __read_mostly; |
1721 |
+ u32 hash, id; |
1722 |
+ |
1723 |
+- net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd)); |
1724 |
++ /* Note the following code is not safe, but this is okay. */ |
1725 |
++ if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key))) |
1726 |
++ get_random_bytes(&net->ipv4.ip_id_key, |
1727 |
++ sizeof(net->ipv4.ip_id_key)); |
1728 |
+ |
1729 |
+- hash = jhash_3words((__force u32)iph->daddr, |
1730 |
++ hash = siphash_3u32((__force u32)iph->daddr, |
1731 |
+ (__force u32)iph->saddr, |
1732 |
+- iph->protocol ^ net_hash_mix(net), |
1733 |
+- ip_idents_hashrnd); |
1734 |
++ iph->protocol, |
1735 |
++ &net->ipv4.ip_id_key); |
1736 |
+ id = ip_idents_reserve(hash, segs); |
1737 |
+ iph->id = htons(id); |
1738 |
+ } |
1739 |
+diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c |
1740 |
+index 4fe7c90962dd..868ae23dbae1 100644 |
1741 |
+--- a/net/ipv6/output_core.c |
1742 |
++++ b/net/ipv6/output_core.c |
1743 |
+@@ -10,15 +10,25 @@ |
1744 |
+ #include <net/secure_seq.h> |
1745 |
+ #include <linux/netfilter.h> |
1746 |
+ |
1747 |
+-static u32 __ipv6_select_ident(struct net *net, u32 hashrnd, |
1748 |
++static u32 __ipv6_select_ident(struct net *net, |
1749 |
+ const struct in6_addr *dst, |
1750 |
+ const struct in6_addr *src) |
1751 |
+ { |
1752 |
++ const struct { |
1753 |
++ struct in6_addr dst; |
1754 |
++ struct in6_addr src; |
1755 |
++ } __aligned(SIPHASH_ALIGNMENT) combined = { |
1756 |
++ .dst = *dst, |
1757 |
++ .src = *src, |
1758 |
++ }; |
1759 |
+ u32 hash, id; |
1760 |
+ |
1761 |
+- hash = __ipv6_addr_jhash(dst, hashrnd); |
1762 |
+- hash = __ipv6_addr_jhash(src, hash); |
1763 |
+- hash ^= net_hash_mix(net); |
1764 |
++ /* Note the following code is not safe, but this is okay. */ |
1765 |
++ if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key))) |
1766 |
++ get_random_bytes(&net->ipv4.ip_id_key, |
1767 |
++ sizeof(net->ipv4.ip_id_key)); |
1768 |
++ |
1769 |
++ hash = siphash(&combined, sizeof(combined), &net->ipv4.ip_id_key); |
1770 |
+ |
1771 |
+ /* Treat id of 0 as unset and if we get 0 back from ip_idents_reserve, |
1772 |
+ * set the hight order instead thus minimizing possible future |
1773 |
+@@ -41,7 +51,6 @@ static u32 __ipv6_select_ident(struct net *net, u32 hashrnd, |
1774 |
+ */ |
1775 |
+ __be32 ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) |
1776 |
+ { |
1777 |
+- static u32 ip6_proxy_idents_hashrnd __read_mostly; |
1778 |
+ struct in6_addr buf[2]; |
1779 |
+ struct in6_addr *addrs; |
1780 |
+ u32 id; |
1781 |
+@@ -53,11 +62,7 @@ __be32 ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) |
1782 |
+ if (!addrs) |
1783 |
+ return 0; |
1784 |
+ |
1785 |
+- net_get_random_once(&ip6_proxy_idents_hashrnd, |
1786 |
+- sizeof(ip6_proxy_idents_hashrnd)); |
1787 |
+- |
1788 |
+- id = __ipv6_select_ident(net, ip6_proxy_idents_hashrnd, |
1789 |
+- &addrs[1], &addrs[0]); |
1790 |
++ id = __ipv6_select_ident(net, &addrs[1], &addrs[0]); |
1791 |
+ return htonl(id); |
1792 |
+ } |
1793 |
+ EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident); |
1794 |
+@@ -66,12 +71,9 @@ __be32 ipv6_select_ident(struct net *net, |
1795 |
+ const struct in6_addr *daddr, |
1796 |
+ const struct in6_addr *saddr) |
1797 |
+ { |
1798 |
+- static u32 ip6_idents_hashrnd __read_mostly; |
1799 |
+ u32 id; |
1800 |
+ |
1801 |
+- net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd)); |
1802 |
+- |
1803 |
+- id = __ipv6_select_ident(net, ip6_idents_hashrnd, daddr, saddr); |
1804 |
++ id = __ipv6_select_ident(net, daddr, saddr); |
1805 |
+ return htonl(id); |
1806 |
+ } |
1807 |
+ EXPORT_SYMBOL(ipv6_select_ident); |
1808 |
+diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c |
1809 |
+index 5e0efd3954e9..5833d4af7311 100644 |
1810 |
+--- a/net/ipv6/raw.c |
1811 |
++++ b/net/ipv6/raw.c |
1812 |
+@@ -288,7 +288,9 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) |
1813 |
+ /* Binding to link-local address requires an interface */ |
1814 |
+ if (!sk->sk_bound_dev_if) |
1815 |
+ goto out_unlock; |
1816 |
++ } |
1817 |
+ |
1818 |
++ if (sk->sk_bound_dev_if) { |
1819 |
+ err = -ENODEV; |
1820 |
+ dev = dev_get_by_index_rcu(sock_net(sk), |
1821 |
+ sk->sk_bound_dev_if); |
1822 |
+diff --git a/net/ipv6/route.c b/net/ipv6/route.c |
1823 |
+index bf0940c42810..24f7b2cf504b 100644 |
1824 |
+--- a/net/ipv6/route.c |
1825 |
++++ b/net/ipv6/route.c |
1826 |
+@@ -2480,6 +2480,12 @@ static struct rt6_info *__ip6_route_redirect(struct net *net, |
1827 |
+ struct fib6_info *rt; |
1828 |
+ struct fib6_node *fn; |
1829 |
+ |
1830 |
++ /* l3mdev_update_flow overrides oif if the device is enslaved; in |
1831 |
++ * this case we must match on the real ingress device, so reset it |
1832 |
++ */ |
1833 |
++ if (fl6->flowi6_flags & FLOWI_FLAG_SKIP_NH_OIF) |
1834 |
++ fl6->flowi6_oif = skb->dev->ifindex; |
1835 |
++ |
1836 |
+ /* Get the "current" route for this destination and |
1837 |
+ * check if the redirect has come from appropriate router. |
1838 |
+ * |
1839 |
+diff --git a/net/llc/llc_output.c b/net/llc/llc_output.c |
1840 |
+index 94425e421213..9e4b6bcf6920 100644 |
1841 |
+--- a/net/llc/llc_output.c |
1842 |
++++ b/net/llc/llc_output.c |
1843 |
+@@ -72,6 +72,8 @@ int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, |
1844 |
+ rc = llc_mac_hdr_init(skb, skb->dev->dev_addr, dmac); |
1845 |
+ if (likely(!rc)) |
1846 |
+ rc = dev_queue_xmit(skb); |
1847 |
++ else |
1848 |
++ kfree_skb(skb); |
1849 |
+ return rc; |
1850 |
+ } |
1851 |
+ |
1852 |
+diff --git a/net/netfilter/core.c b/net/netfilter/core.c |
1853 |
+index dc240cb47ddf..93aaec3a54ec 100644 |
1854 |
+--- a/net/netfilter/core.c |
1855 |
++++ b/net/netfilter/core.c |
1856 |
+@@ -33,7 +33,7 @@ EXPORT_SYMBOL_GPL(nf_ipv6_ops); |
1857 |
+ DEFINE_PER_CPU(bool, nf_skb_duplicated); |
1858 |
+ EXPORT_SYMBOL_GPL(nf_skb_duplicated); |
1859 |
+ |
1860 |
+-#ifdef HAVE_JUMP_LABEL |
1861 |
++#ifdef CONFIG_JUMP_LABEL |
1862 |
+ struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; |
1863 |
+ EXPORT_SYMBOL(nf_hooks_needed); |
1864 |
+ #endif |
1865 |
+@@ -347,7 +347,7 @@ static int __nf_register_net_hook(struct net *net, int pf, |
1866 |
+ if (pf == NFPROTO_NETDEV && reg->hooknum == NF_NETDEV_INGRESS) |
1867 |
+ net_inc_ingress_queue(); |
1868 |
+ #endif |
1869 |
+-#ifdef HAVE_JUMP_LABEL |
1870 |
++#ifdef CONFIG_JUMP_LABEL |
1871 |
+ static_key_slow_inc(&nf_hooks_needed[pf][reg->hooknum]); |
1872 |
+ #endif |
1873 |
+ BUG_ON(p == new_hooks); |
1874 |
+@@ -405,7 +405,7 @@ static void __nf_unregister_net_hook(struct net *net, int pf, |
1875 |
+ if (pf == NFPROTO_NETDEV && reg->hooknum == NF_NETDEV_INGRESS) |
1876 |
+ net_dec_ingress_queue(); |
1877 |
+ #endif |
1878 |
+-#ifdef HAVE_JUMP_LABEL |
1879 |
++#ifdef CONFIG_JUMP_LABEL |
1880 |
+ static_key_slow_dec(&nf_hooks_needed[pf][reg->hooknum]); |
1881 |
+ #endif |
1882 |
+ } else { |
1883 |
+diff --git a/net/sched/act_api.c b/net/sched/act_api.c |
1884 |
+index e12f8ef7baa4..7c4a4b874248 100644 |
1885 |
+--- a/net/sched/act_api.c |
1886 |
++++ b/net/sched/act_api.c |
1887 |
+@@ -744,7 +744,7 @@ int tcf_action_dump(struct sk_buff *skb, struct tc_action *actions[], |
1888 |
+ |
1889 |
+ for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) { |
1890 |
+ a = actions[i]; |
1891 |
+- nest = nla_nest_start(skb, a->order); |
1892 |
++ nest = nla_nest_start(skb, i + 1); |
1893 |
+ if (nest == NULL) |
1894 |
+ goto nla_put_failure; |
1895 |
+ err = tcf_action_dump_1(skb, a, bind, ref); |
1896 |
+@@ -1257,7 +1257,6 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n, |
1897 |
+ ret = PTR_ERR(act); |
1898 |
+ goto err; |
1899 |
+ } |
1900 |
+- act->order = i; |
1901 |
+ attr_size += tcf_action_fill_size(act); |
1902 |
+ actions[i - 1] = act; |
1903 |
+ } |
1904 |
+diff --git a/net/tipc/core.c b/net/tipc/core.c |
1905 |
+index d7b0688c98dd..3ecca3b88bf8 100644 |
1906 |
+--- a/net/tipc/core.c |
1907 |
++++ b/net/tipc/core.c |
1908 |
+@@ -66,10 +66,6 @@ static int __net_init tipc_init_net(struct net *net) |
1909 |
+ INIT_LIST_HEAD(&tn->node_list); |
1910 |
+ spin_lock_init(&tn->node_list_lock); |
1911 |
+ |
1912 |
+- err = tipc_socket_init(); |
1913 |
+- if (err) |
1914 |
+- goto out_socket; |
1915 |
+- |
1916 |
+ err = tipc_sk_rht_init(net); |
1917 |
+ if (err) |
1918 |
+ goto out_sk_rht; |
1919 |
+@@ -79,9 +75,6 @@ static int __net_init tipc_init_net(struct net *net) |
1920 |
+ goto out_nametbl; |
1921 |
+ |
1922 |
+ INIT_LIST_HEAD(&tn->dist_queue); |
1923 |
+- err = tipc_topsrv_start(net); |
1924 |
+- if (err) |
1925 |
+- goto out_subscr; |
1926 |
+ |
1927 |
+ err = tipc_bcast_init(net); |
1928 |
+ if (err) |
1929 |
+@@ -90,25 +83,19 @@ static int __net_init tipc_init_net(struct net *net) |
1930 |
+ return 0; |
1931 |
+ |
1932 |
+ out_bclink: |
1933 |
+- tipc_bcast_stop(net); |
1934 |
+-out_subscr: |
1935 |
+ tipc_nametbl_stop(net); |
1936 |
+ out_nametbl: |
1937 |
+ tipc_sk_rht_destroy(net); |
1938 |
+ out_sk_rht: |
1939 |
+- tipc_socket_stop(); |
1940 |
+-out_socket: |
1941 |
+ return err; |
1942 |
+ } |
1943 |
+ |
1944 |
+ static void __net_exit tipc_exit_net(struct net *net) |
1945 |
+ { |
1946 |
+- tipc_topsrv_stop(net); |
1947 |
+ tipc_net_stop(net); |
1948 |
+ tipc_bcast_stop(net); |
1949 |
+ tipc_nametbl_stop(net); |
1950 |
+ tipc_sk_rht_destroy(net); |
1951 |
+- tipc_socket_stop(); |
1952 |
+ } |
1953 |
+ |
1954 |
+ static struct pernet_operations tipc_net_ops = { |
1955 |
+@@ -118,6 +105,11 @@ static struct pernet_operations tipc_net_ops = { |
1956 |
+ .size = sizeof(struct tipc_net), |
1957 |
+ }; |
1958 |
+ |
1959 |
++static struct pernet_operations tipc_topsrv_net_ops = { |
1960 |
++ .init = tipc_topsrv_init_net, |
1961 |
++ .exit = tipc_topsrv_exit_net, |
1962 |
++}; |
1963 |
++ |
1964 |
+ static int __init tipc_init(void) |
1965 |
+ { |
1966 |
+ int err; |
1967 |
+@@ -144,6 +136,14 @@ static int __init tipc_init(void) |
1968 |
+ if (err) |
1969 |
+ goto out_pernet; |
1970 |
+ |
1971 |
++ err = tipc_socket_init(); |
1972 |
++ if (err) |
1973 |
++ goto out_socket; |
1974 |
++ |
1975 |
++ err = register_pernet_subsys(&tipc_topsrv_net_ops); |
1976 |
++ if (err) |
1977 |
++ goto out_pernet_topsrv; |
1978 |
++ |
1979 |
+ err = tipc_bearer_setup(); |
1980 |
+ if (err) |
1981 |
+ goto out_bearer; |
1982 |
+@@ -151,6 +151,10 @@ static int __init tipc_init(void) |
1983 |
+ pr_info("Started in single node mode\n"); |
1984 |
+ return 0; |
1985 |
+ out_bearer: |
1986 |
++ unregister_pernet_subsys(&tipc_topsrv_net_ops); |
1987 |
++out_pernet_topsrv: |
1988 |
++ tipc_socket_stop(); |
1989 |
++out_socket: |
1990 |
+ unregister_pernet_subsys(&tipc_net_ops); |
1991 |
+ out_pernet: |
1992 |
+ tipc_unregister_sysctl(); |
1993 |
+@@ -166,6 +170,8 @@ out_netlink: |
1994 |
+ static void __exit tipc_exit(void) |
1995 |
+ { |
1996 |
+ tipc_bearer_cleanup(); |
1997 |
++ unregister_pernet_subsys(&tipc_topsrv_net_ops); |
1998 |
++ tipc_socket_stop(); |
1999 |
+ unregister_pernet_subsys(&tipc_net_ops); |
2000 |
+ tipc_netlink_stop(); |
2001 |
+ tipc_netlink_compat_stop(); |
2002 |
+diff --git a/net/tipc/subscr.h b/net/tipc/subscr.h |
2003 |
+index d793b4343885..aa015c233898 100644 |
2004 |
+--- a/net/tipc/subscr.h |
2005 |
++++ b/net/tipc/subscr.h |
2006 |
+@@ -77,8 +77,9 @@ void tipc_sub_report_overlap(struct tipc_subscription *sub, |
2007 |
+ u32 found_lower, u32 found_upper, |
2008 |
+ u32 event, u32 port, u32 node, |
2009 |
+ u32 scope, int must); |
2010 |
+-int tipc_topsrv_start(struct net *net); |
2011 |
+-void tipc_topsrv_stop(struct net *net); |
2012 |
++ |
2013 |
++int __net_init tipc_topsrv_init_net(struct net *net); |
2014 |
++void __net_exit tipc_topsrv_exit_net(struct net *net); |
2015 |
+ |
2016 |
+ void tipc_sub_put(struct tipc_subscription *subscription); |
2017 |
+ void tipc_sub_get(struct tipc_subscription *subscription); |
2018 |
+diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c |
2019 |
+index 2301b09df234..35558656fe02 100644 |
2020 |
+--- a/net/tipc/topsrv.c |
2021 |
++++ b/net/tipc/topsrv.c |
2022 |
+@@ -643,7 +643,7 @@ static void tipc_topsrv_work_stop(struct tipc_topsrv *s) |
2023 |
+ destroy_workqueue(s->send_wq); |
2024 |
+ } |
2025 |
+ |
2026 |
+-int tipc_topsrv_start(struct net *net) |
2027 |
++static int tipc_topsrv_start(struct net *net) |
2028 |
+ { |
2029 |
+ struct tipc_net *tn = tipc_net(net); |
2030 |
+ const char name[] = "topology_server"; |
2031 |
+@@ -677,7 +677,7 @@ int tipc_topsrv_start(struct net *net) |
2032 |
+ return ret; |
2033 |
+ } |
2034 |
+ |
2035 |
+-void tipc_topsrv_stop(struct net *net) |
2036 |
++static void tipc_topsrv_stop(struct net *net) |
2037 |
+ { |
2038 |
+ struct tipc_topsrv *srv = tipc_topsrv(net); |
2039 |
+ struct socket *lsock = srv->listener; |
2040 |
+@@ -702,3 +702,13 @@ void tipc_topsrv_stop(struct net *net) |
2041 |
+ idr_destroy(&srv->conn_idr); |
2042 |
+ kfree(srv); |
2043 |
+ } |
2044 |
++ |
2045 |
++int __net_init tipc_topsrv_init_net(struct net *net) |
2046 |
++{ |
2047 |
++ return tipc_topsrv_start(net); |
2048 |
++} |
2049 |
++ |
2050 |
++void __net_exit tipc_topsrv_exit_net(struct net *net) |
2051 |
++{ |
2052 |
++ tipc_topsrv_stop(net); |
2053 |
++} |
2054 |
+diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c |
2055 |
+index fdf22cb0b3e6..8035bf495eb2 100644 |
2056 |
+--- a/net/tls/tls_device.c |
2057 |
++++ b/net/tls/tls_device.c |
2058 |
+@@ -916,12 +916,6 @@ void tls_device_offload_cleanup_rx(struct sock *sk) |
2059 |
+ if (!netdev) |
2060 |
+ goto out; |
2061 |
+ |
2062 |
+- if (!(netdev->features & NETIF_F_HW_TLS_RX)) { |
2063 |
+- pr_err_ratelimited("%s: device is missing NETIF_F_HW_TLS_RX cap\n", |
2064 |
+- __func__); |
2065 |
+- goto out; |
2066 |
+- } |
2067 |
+- |
2068 |
+ netdev->tlsdev_ops->tls_dev_del(netdev, tls_ctx, |
2069 |
+ TLS_OFFLOAD_CTX_DIR_RX); |
2070 |
+ |
2071 |
+@@ -980,7 +974,8 @@ static int tls_dev_event(struct notifier_block *this, unsigned long event, |
2072 |
+ { |
2073 |
+ struct net_device *dev = netdev_notifier_info_to_dev(ptr); |
2074 |
+ |
2075 |
+- if (!(dev->features & (NETIF_F_HW_TLS_RX | NETIF_F_HW_TLS_TX))) |
2076 |
++ if (!dev->tlsdev_ops && |
2077 |
++ !(dev->features & (NETIF_F_HW_TLS_RX | NETIF_F_HW_TLS_TX))) |
2078 |
+ return NOTIFY_DONE; |
2079 |
+ |
2080 |
+ switch (event) { |
2081 |
+diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh |
2082 |
+index 083c526073ef..8b980fb2270a 100755 |
2083 |
+--- a/scripts/gcc-goto.sh |
2084 |
++++ b/scripts/gcc-goto.sh |
2085 |
+@@ -3,7 +3,7 @@ |
2086 |
+ # Test for gcc 'asm goto' support |
2087 |
+ # Copyright (C) 2010, Jason Baron <jbaron@××××××.com> |
2088 |
+ |
2089 |
+-cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y" |
2090 |
++cat << "END" | $@ -x c - -fno-PIE -c -o /dev/null |
2091 |
+ int main(void) |
2092 |
+ { |
2093 |
+ #if defined(__arm__) || defined(__aarch64__) |
2094 |
+diff --git a/tools/arch/x86/include/asm/rmwcc.h b/tools/arch/x86/include/asm/rmwcc.h |
2095 |
+index dc90c0c2fae3..fee7983a90b4 100644 |
2096 |
+--- a/tools/arch/x86/include/asm/rmwcc.h |
2097 |
++++ b/tools/arch/x86/include/asm/rmwcc.h |
2098 |
+@@ -2,7 +2,7 @@ |
2099 |
+ #ifndef _TOOLS_LINUX_ASM_X86_RMWcc |
2100 |
+ #define _TOOLS_LINUX_ASM_X86_RMWcc |
2101 |
+ |
2102 |
+-#ifdef CC_HAVE_ASM_GOTO |
2103 |
++#ifdef CONFIG_CC_HAS_ASM_GOTO |
2104 |
+ |
2105 |
+ #define __GEN_RMWcc(fullop, var, cc, ...) \ |
2106 |
+ do { \ |
2107 |
+@@ -20,7 +20,7 @@ cc_label: \ |
2108 |
+ #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ |
2109 |
+ __GEN_RMWcc(op " %1, " arg0, var, cc, vcon (val)) |
2110 |
+ |
2111 |
+-#else /* !CC_HAVE_ASM_GOTO */ |
2112 |
++#else /* !CONFIG_CC_HAS_ASM_GOTO */ |
2113 |
+ |
2114 |
+ #define __GEN_RMWcc(fullop, var, cc, ...) \ |
2115 |
+ do { \ |
2116 |
+@@ -37,6 +37,6 @@ do { \ |
2117 |
+ #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ |
2118 |
+ __GEN_RMWcc(op " %2, " arg0, var, cc, vcon (val)) |
2119 |
+ |
2120 |
+-#endif /* CC_HAVE_ASM_GOTO */ |
2121 |
++#endif /* CONFIG_CC_HAS_ASM_GOTO */ |
2122 |
+ |
2123 |
+ #endif /* _TOOLS_LINUX_ASM_X86_RMWcc */ |