Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.16 commit in: /
Date: Thu, 20 Jan 2022 13:45:25
Message-Id: 1642686308.bac505d232815166e38c0d9ca27763fb12fc664d.mpagano@gentoo
1 commit: bac505d232815166e38c0d9ca27763fb12fc664d
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 20 13:45:08 2022 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 20 13:45:08 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=bac505d2
7
8 Linux patch 5.16.2
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1001_linux-5.16.2.patch | 1219 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 1223 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 4a1aa215..41c5d786 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -47,6 +47,10 @@ Patch: 1000_linux-5.16.1.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.16.1
23
24 +Patch: 1001_linux-5.16.2.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.16.2
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/1001_linux-5.16.2.patch b/1001_linux-5.16.2.patch
33 new file mode 100644
34 index 00000000..33650f08
35 --- /dev/null
36 +++ b/1001_linux-5.16.2.patch
37 @@ -0,0 +1,1219 @@
38 +diff --git a/Makefile b/Makefile
39 +index fdbd06daf2af1..dd98debc26048 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 16
46 +-SUBLEVEL = 1
47 ++SUBLEVEL = 2
48 + EXTRAVERSION =
49 + NAME = Gobble Gobble
50 +
51 +diff --git a/arch/arm/kernel/perf_callchain.c b/arch/arm/kernel/perf_callchain.c
52 +index 3b69a76d341e7..1626dfc6f6ce6 100644
53 +--- a/arch/arm/kernel/perf_callchain.c
54 ++++ b/arch/arm/kernel/perf_callchain.c
55 +@@ -62,9 +62,10 @@ user_backtrace(struct frame_tail __user *tail,
56 + void
57 + perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
58 + {
59 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
60 + struct frame_tail __user *tail;
61 +
62 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
63 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
64 + /* We don't support guest os callchain now */
65 + return;
66 + }
67 +@@ -98,9 +99,10 @@ callchain_trace(struct stackframe *fr,
68 + void
69 + perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
70 + {
71 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
72 + struct stackframe fr;
73 +
74 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
75 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
76 + /* We don't support guest os callchain now */
77 + return;
78 + }
79 +@@ -111,18 +113,21 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
80 +
81 + unsigned long perf_instruction_pointer(struct pt_regs *regs)
82 + {
83 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
84 +- return perf_guest_cbs->get_guest_ip();
85 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
86 ++
87 ++ if (guest_cbs && guest_cbs->is_in_guest())
88 ++ return guest_cbs->get_guest_ip();
89 +
90 + return instruction_pointer(regs);
91 + }
92 +
93 + unsigned long perf_misc_flags(struct pt_regs *regs)
94 + {
95 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
96 + int misc = 0;
97 +
98 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
99 +- if (perf_guest_cbs->is_user_mode())
100 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
101 ++ if (guest_cbs->is_user_mode())
102 + misc |= PERF_RECORD_MISC_GUEST_USER;
103 + else
104 + misc |= PERF_RECORD_MISC_GUEST_KERNEL;
105 +diff --git a/arch/arm64/kernel/perf_callchain.c b/arch/arm64/kernel/perf_callchain.c
106 +index 4a72c27273097..86d9f20131723 100644
107 +--- a/arch/arm64/kernel/perf_callchain.c
108 ++++ b/arch/arm64/kernel/perf_callchain.c
109 +@@ -102,7 +102,9 @@ compat_user_backtrace(struct compat_frame_tail __user *tail,
110 + void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
111 + struct pt_regs *regs)
112 + {
113 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
114 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
115 ++
116 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
117 + /* We don't support guest os callchain now */
118 + return;
119 + }
120 +@@ -147,9 +149,10 @@ static bool callchain_trace(void *data, unsigned long pc)
121 + void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
122 + struct pt_regs *regs)
123 + {
124 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
125 + struct stackframe frame;
126 +
127 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
128 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
129 + /* We don't support guest os callchain now */
130 + return;
131 + }
132 +@@ -160,18 +163,21 @@ void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
133 +
134 + unsigned long perf_instruction_pointer(struct pt_regs *regs)
135 + {
136 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
137 +- return perf_guest_cbs->get_guest_ip();
138 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
139 ++
140 ++ if (guest_cbs && guest_cbs->is_in_guest())
141 ++ return guest_cbs->get_guest_ip();
142 +
143 + return instruction_pointer(regs);
144 + }
145 +
146 + unsigned long perf_misc_flags(struct pt_regs *regs)
147 + {
148 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
149 + int misc = 0;
150 +
151 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
152 +- if (perf_guest_cbs->is_user_mode())
153 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
154 ++ if (guest_cbs->is_user_mode())
155 + misc |= PERF_RECORD_MISC_GUEST_USER;
156 + else
157 + misc |= PERF_RECORD_MISC_GUEST_KERNEL;
158 +diff --git a/arch/csky/kernel/perf_callchain.c b/arch/csky/kernel/perf_callchain.c
159 +index ab55e98ee8f62..35318a635a5fa 100644
160 +--- a/arch/csky/kernel/perf_callchain.c
161 ++++ b/arch/csky/kernel/perf_callchain.c
162 +@@ -86,10 +86,11 @@ static unsigned long user_backtrace(struct perf_callchain_entry_ctx *entry,
163 + void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
164 + struct pt_regs *regs)
165 + {
166 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
167 + unsigned long fp = 0;
168 +
169 + /* C-SKY does not support virtualization. */
170 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
171 ++ if (guest_cbs && guest_cbs->is_in_guest())
172 + return;
173 +
174 + fp = regs->regs[4];
175 +@@ -110,10 +111,11 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
176 + void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
177 + struct pt_regs *regs)
178 + {
179 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
180 + struct stackframe fr;
181 +
182 + /* C-SKY does not support virtualization. */
183 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
184 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
185 + pr_warn("C-SKY does not support perf in guest mode!");
186 + return;
187 + }
188 +diff --git a/arch/nds32/kernel/perf_event_cpu.c b/arch/nds32/kernel/perf_event_cpu.c
189 +index 0ce6f9f307e6a..f387919607813 100644
190 +--- a/arch/nds32/kernel/perf_event_cpu.c
191 ++++ b/arch/nds32/kernel/perf_event_cpu.c
192 +@@ -1363,6 +1363,7 @@ void
193 + perf_callchain_user(struct perf_callchain_entry_ctx *entry,
194 + struct pt_regs *regs)
195 + {
196 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
197 + unsigned long fp = 0;
198 + unsigned long gp = 0;
199 + unsigned long lp = 0;
200 +@@ -1371,7 +1372,7 @@ perf_callchain_user(struct perf_callchain_entry_ctx *entry,
201 +
202 + leaf_fp = 0;
203 +
204 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
205 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
206 + /* We don't support guest os callchain now */
207 + return;
208 + }
209 +@@ -1479,9 +1480,10 @@ void
210 + perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
211 + struct pt_regs *regs)
212 + {
213 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
214 + struct stackframe fr;
215 +
216 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
217 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
218 + /* We don't support guest os callchain now */
219 + return;
220 + }
221 +@@ -1493,20 +1495,23 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
222 +
223 + unsigned long perf_instruction_pointer(struct pt_regs *regs)
224 + {
225 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
226 ++
227 + /* However, NDS32 does not support virtualization */
228 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
229 +- return perf_guest_cbs->get_guest_ip();
230 ++ if (guest_cbs && guest_cbs->is_in_guest())
231 ++ return guest_cbs->get_guest_ip();
232 +
233 + return instruction_pointer(regs);
234 + }
235 +
236 + unsigned long perf_misc_flags(struct pt_regs *regs)
237 + {
238 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
239 + int misc = 0;
240 +
241 + /* However, NDS32 does not support virtualization */
242 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
243 +- if (perf_guest_cbs->is_user_mode())
244 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
245 ++ if (guest_cbs->is_user_mode())
246 + misc |= PERF_RECORD_MISC_GUEST_USER;
247 + else
248 + misc |= PERF_RECORD_MISC_GUEST_KERNEL;
249 +diff --git a/arch/riscv/kernel/perf_callchain.c b/arch/riscv/kernel/perf_callchain.c
250 +index 0bb1854dce833..8ecfc4c128bc5 100644
251 +--- a/arch/riscv/kernel/perf_callchain.c
252 ++++ b/arch/riscv/kernel/perf_callchain.c
253 +@@ -56,10 +56,11 @@ static unsigned long user_backtrace(struct perf_callchain_entry_ctx *entry,
254 + void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
255 + struct pt_regs *regs)
256 + {
257 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
258 + unsigned long fp = 0;
259 +
260 + /* RISC-V does not support perf in guest mode. */
261 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
262 ++ if (guest_cbs && guest_cbs->is_in_guest())
263 + return;
264 +
265 + fp = regs->s0;
266 +@@ -78,8 +79,10 @@ static bool fill_callchain(void *entry, unsigned long pc)
267 + void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
268 + struct pt_regs *regs)
269 + {
270 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
271 ++
272 + /* RISC-V does not support perf in guest mode. */
273 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
274 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
275 + pr_warn("RISC-V does not support perf in guest mode!");
276 + return;
277 + }
278 +diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
279 +index c3bd993fdd0cf..0576d5c991384 100644
280 +--- a/arch/s390/kvm/interrupt.c
281 ++++ b/arch/s390/kvm/interrupt.c
282 +@@ -2115,6 +2115,13 @@ int kvm_s390_is_stop_irq_pending(struct kvm_vcpu *vcpu)
283 + return test_bit(IRQ_PEND_SIGP_STOP, &li->pending_irqs);
284 + }
285 +
286 ++int kvm_s390_is_restart_irq_pending(struct kvm_vcpu *vcpu)
287 ++{
288 ++ struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
289 ++
290 ++ return test_bit(IRQ_PEND_RESTART, &li->pending_irqs);
291 ++}
292 ++
293 + void kvm_s390_clear_stop_irq(struct kvm_vcpu *vcpu)
294 + {
295 + struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
296 +diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
297 +index 14a18ba5ff2c8..ef299aad40090 100644
298 +--- a/arch/s390/kvm/kvm-s390.c
299 ++++ b/arch/s390/kvm/kvm-s390.c
300 +@@ -4645,10 +4645,15 @@ int kvm_s390_vcpu_stop(struct kvm_vcpu *vcpu)
301 + }
302 + }
303 +
304 +- /* SIGP STOP and SIGP STOP AND STORE STATUS has been fully processed */
305 ++ /*
306 ++ * Set the VCPU to STOPPED and THEN clear the interrupt flag,
307 ++ * now that the SIGP STOP and SIGP STOP AND STORE STATUS orders
308 ++ * have been fully processed. This will ensure that the VCPU
309 ++ * is kept BUSY if another VCPU is inquiring with SIGP SENSE.
310 ++ */
311 ++ kvm_s390_set_cpuflags(vcpu, CPUSTAT_STOPPED);
312 + kvm_s390_clear_stop_irq(vcpu);
313 +
314 +- kvm_s390_set_cpuflags(vcpu, CPUSTAT_STOPPED);
315 + __disable_ibs_on_vcpu(vcpu);
316 +
317 + for (i = 0; i < online_vcpus; i++) {
318 +diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h
319 +index c07a050d757d3..1876ab0c293fe 100644
320 +--- a/arch/s390/kvm/kvm-s390.h
321 ++++ b/arch/s390/kvm/kvm-s390.h
322 +@@ -427,6 +427,7 @@ void kvm_s390_destroy_adapters(struct kvm *kvm);
323 + int kvm_s390_ext_call_pending(struct kvm_vcpu *vcpu);
324 + extern struct kvm_device_ops kvm_flic_ops;
325 + int kvm_s390_is_stop_irq_pending(struct kvm_vcpu *vcpu);
326 ++int kvm_s390_is_restart_irq_pending(struct kvm_vcpu *vcpu);
327 + void kvm_s390_clear_stop_irq(struct kvm_vcpu *vcpu);
328 + int kvm_s390_set_irq_state(struct kvm_vcpu *vcpu,
329 + void __user *buf, int len);
330 +diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
331 +index cf4de80bd5410..8aaee2892ec35 100644
332 +--- a/arch/s390/kvm/sigp.c
333 ++++ b/arch/s390/kvm/sigp.c
334 +@@ -276,6 +276,34 @@ static int handle_sigp_dst(struct kvm_vcpu *vcpu, u8 order_code,
335 + if (!dst_vcpu)
336 + return SIGP_CC_NOT_OPERATIONAL;
337 +
338 ++ /*
339 ++ * SIGP RESTART, SIGP STOP, and SIGP STOP AND STORE STATUS orders
340 ++ * are processed asynchronously. Until the affected VCPU finishes
341 ++ * its work and calls back into KVM to clear the (RESTART or STOP)
342 ++ * interrupt, we need to return any new non-reset orders "busy".
343 ++ *
344 ++ * This is important because a single VCPU could issue:
345 ++ * 1) SIGP STOP $DESTINATION
346 ++ * 2) SIGP SENSE $DESTINATION
347 ++ *
348 ++ * If the SIGP SENSE would not be rejected as "busy", it could
349 ++ * return an incorrect answer as to whether the VCPU is STOPPED
350 ++ * or OPERATING.
351 ++ */
352 ++ if (order_code != SIGP_INITIAL_CPU_RESET &&
353 ++ order_code != SIGP_CPU_RESET) {
354 ++ /*
355 ++ * Lockless check. Both SIGP STOP and SIGP (RE)START
356 ++ * properly synchronize everything while processing
357 ++ * their orders, while the guest cannot observe a
358 ++ * difference when issuing other orders from two
359 ++ * different VCPUs.
360 ++ */
361 ++ if (kvm_s390_is_stop_irq_pending(dst_vcpu) ||
362 ++ kvm_s390_is_restart_irq_pending(dst_vcpu))
363 ++ return SIGP_CC_BUSY;
364 ++ }
365 ++
366 + switch (order_code) {
367 + case SIGP_SENSE:
368 + vcpu->stat.instruction_sigp_sense++;
369 +diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
370 +index 38b2c779146f1..32cec290d3ad6 100644
371 +--- a/arch/x86/events/core.c
372 ++++ b/arch/x86/events/core.c
373 +@@ -2768,10 +2768,11 @@ static bool perf_hw_regs(struct pt_regs *regs)
374 + void
375 + perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
376 + {
377 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
378 + struct unwind_state state;
379 + unsigned long addr;
380 +
381 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
382 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
383 + /* TODO: We don't support guest os callchain now */
384 + return;
385 + }
386 +@@ -2871,10 +2872,11 @@ perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry_ctx *ent
387 + void
388 + perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
389 + {
390 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
391 + struct stack_frame frame;
392 + const struct stack_frame __user *fp;
393 +
394 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
395 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
396 + /* TODO: We don't support guest os callchain now */
397 + return;
398 + }
399 +@@ -2951,18 +2953,21 @@ static unsigned long code_segment_base(struct pt_regs *regs)
400 +
401 + unsigned long perf_instruction_pointer(struct pt_regs *regs)
402 + {
403 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
404 +- return perf_guest_cbs->get_guest_ip();
405 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
406 ++
407 ++ if (guest_cbs && guest_cbs->is_in_guest())
408 ++ return guest_cbs->get_guest_ip();
409 +
410 + return regs->ip + code_segment_base(regs);
411 + }
412 +
413 + unsigned long perf_misc_flags(struct pt_regs *regs)
414 + {
415 ++ struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();
416 + int misc = 0;
417 +
418 +- if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
419 +- if (perf_guest_cbs->is_user_mode())
420 ++ if (guest_cbs && guest_cbs->is_in_guest()) {
421 ++ if (guest_cbs->is_user_mode())
422 + misc |= PERF_RECORD_MISC_GUEST_USER;
423 + else
424 + misc |= PERF_RECORD_MISC_GUEST_KERNEL;
425 +diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
426 +index ec6444f2c9dcb..1e33c75ffa260 100644
427 +--- a/arch/x86/events/intel/core.c
428 ++++ b/arch/x86/events/intel/core.c
429 +@@ -2835,6 +2835,7 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
430 + {
431 + struct perf_sample_data data;
432 + struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
433 ++ struct perf_guest_info_callbacks *guest_cbs;
434 + int bit;
435 + int handled = 0;
436 + u64 intel_ctrl = hybrid(cpuc->pmu, intel_ctrl);
437 +@@ -2901,9 +2902,11 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
438 + */
439 + if (__test_and_clear_bit(GLOBAL_STATUS_TRACE_TOPAPMI_BIT, (unsigned long *)&status)) {
440 + handled++;
441 +- if (unlikely(perf_guest_cbs && perf_guest_cbs->is_in_guest() &&
442 +- perf_guest_cbs->handle_intel_pt_intr))
443 +- perf_guest_cbs->handle_intel_pt_intr();
444 ++
445 ++ guest_cbs = perf_get_guest_cbs();
446 ++ if (unlikely(guest_cbs && guest_cbs->is_in_guest() &&
447 ++ guest_cbs->handle_intel_pt_intr))
448 ++ guest_cbs->handle_intel_pt_intr();
449 + else
450 + intel_pt_interrupt();
451 + }
452 +diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
453 +index 555f4de47ef29..59fc339ba5282 100644
454 +--- a/arch/x86/include/asm/kvm_host.h
455 ++++ b/arch/x86/include/asm/kvm_host.h
456 +@@ -1519,6 +1519,7 @@ struct kvm_x86_init_ops {
457 + int (*disabled_by_bios)(void);
458 + int (*check_processor_compatibility)(void);
459 + int (*hardware_setup)(void);
460 ++ bool (*intel_pt_intr_in_guest)(void);
461 +
462 + struct kvm_x86_ops *runtime_ops;
463 + };
464 +diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
465 +index f206fc35deff6..7c009867d6f23 100644
466 +--- a/arch/x86/kvm/lapic.c
467 ++++ b/arch/x86/kvm/lapic.c
468 +@@ -676,31 +676,25 @@ static inline bool pv_eoi_enabled(struct kvm_vcpu *vcpu)
469 + static bool pv_eoi_get_pending(struct kvm_vcpu *vcpu)
470 + {
471 + u8 val;
472 +- if (pv_eoi_get_user(vcpu, &val) < 0) {
473 +- printk(KERN_WARNING "Can't read EOI MSR value: 0x%llx\n",
474 +- (unsigned long long)vcpu->arch.pv_eoi.msr_val);
475 ++ if (pv_eoi_get_user(vcpu, &val) < 0)
476 + return false;
477 +- }
478 ++
479 + return val & KVM_PV_EOI_ENABLED;
480 + }
481 +
482 + static void pv_eoi_set_pending(struct kvm_vcpu *vcpu)
483 + {
484 +- if (pv_eoi_put_user(vcpu, KVM_PV_EOI_ENABLED) < 0) {
485 +- printk(KERN_WARNING "Can't set EOI MSR value: 0x%llx\n",
486 +- (unsigned long long)vcpu->arch.pv_eoi.msr_val);
487 ++ if (pv_eoi_put_user(vcpu, KVM_PV_EOI_ENABLED) < 0)
488 + return;
489 +- }
490 ++
491 + __set_bit(KVM_APIC_PV_EOI_PENDING, &vcpu->arch.apic_attention);
492 + }
493 +
494 + static void pv_eoi_clr_pending(struct kvm_vcpu *vcpu)
495 + {
496 +- if (pv_eoi_put_user(vcpu, KVM_PV_EOI_DISABLED) < 0) {
497 +- printk(KERN_WARNING "Can't clear EOI MSR value: 0x%llx\n",
498 +- (unsigned long long)vcpu->arch.pv_eoi.msr_val);
499 ++ if (pv_eoi_put_user(vcpu, KVM_PV_EOI_DISABLED) < 0)
500 + return;
501 +- }
502 ++
503 + __clear_bit(KVM_APIC_PV_EOI_PENDING, &vcpu->arch.apic_attention);
504 + }
505 +
506 +diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
507 +index 0dbf94eb954fd..7f4e6f625abcf 100644
508 +--- a/arch/x86/kvm/vmx/vmx.c
509 ++++ b/arch/x86/kvm/vmx/vmx.c
510 +@@ -7905,6 +7905,7 @@ static struct kvm_x86_init_ops vmx_init_ops __initdata = {
511 + .disabled_by_bios = vmx_disabled_by_bios,
512 + .check_processor_compatibility = vmx_check_processor_compat,
513 + .hardware_setup = hardware_setup,
514 ++ .intel_pt_intr_in_guest = vmx_pt_mode_is_host_guest,
515 +
516 + .runtime_ops = &vmx_x86_ops,
517 + };
518 +diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
519 +index e50e97ac44084..0b5c61bb24a17 100644
520 +--- a/arch/x86/kvm/x86.c
521 ++++ b/arch/x86/kvm/x86.c
522 +@@ -8560,7 +8560,7 @@ static struct perf_guest_info_callbacks kvm_guest_cbs = {
523 + .is_in_guest = kvm_is_in_guest,
524 + .is_user_mode = kvm_is_user_mode,
525 + .get_guest_ip = kvm_get_guest_ip,
526 +- .handle_intel_pt_intr = kvm_handle_intel_pt_intr,
527 ++ .handle_intel_pt_intr = NULL,
528 + };
529 +
530 + #ifdef CONFIG_X86_64
531 +@@ -8676,8 +8676,6 @@ int kvm_arch_init(void *opaque)
532 +
533 + kvm_timer_init();
534 +
535 +- perf_register_guest_info_callbacks(&kvm_guest_cbs);
536 +-
537 + if (boot_cpu_has(X86_FEATURE_XSAVE)) {
538 + host_xcr0 = xgetbv(XCR_XFEATURE_ENABLED_MASK);
539 + supported_xcr0 = host_xcr0 & KVM_SUPPORTED_XCR0;
540 +@@ -8709,7 +8707,6 @@ void kvm_arch_exit(void)
541 + clear_hv_tscchange_cb();
542 + #endif
543 + kvm_lapic_exit();
544 +- perf_unregister_guest_info_callbacks(&kvm_guest_cbs);
545 +
546 + if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC))
547 + cpufreq_unregister_notifier(&kvmclock_cpufreq_notifier_block,
548 +@@ -11269,6 +11266,10 @@ int kvm_arch_hardware_setup(void *opaque)
549 + memcpy(&kvm_x86_ops, ops->runtime_ops, sizeof(kvm_x86_ops));
550 + kvm_ops_static_call_update();
551 +
552 ++ if (ops->intel_pt_intr_in_guest && ops->intel_pt_intr_in_guest())
553 ++ kvm_guest_cbs.handle_intel_pt_intr = kvm_handle_intel_pt_intr;
554 ++ perf_register_guest_info_callbacks(&kvm_guest_cbs);
555 ++
556 + if (!kvm_cpu_cap_has(X86_FEATURE_XSAVES))
557 + supported_xss = 0;
558 +
559 +@@ -11296,6 +11297,9 @@ int kvm_arch_hardware_setup(void *opaque)
560 +
561 + void kvm_arch_hardware_unsetup(void)
562 + {
563 ++ perf_unregister_guest_info_callbacks(&kvm_guest_cbs);
564 ++ kvm_guest_cbs.handle_intel_pt_intr = NULL;
565 ++
566 + static_call(kvm_x86_hardware_unsetup)();
567 + }
568 +
569 +diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
570 +index 8be352ab4ddbf..fa13ad49d2116 100644
571 +--- a/drivers/base/devtmpfs.c
572 ++++ b/drivers/base/devtmpfs.c
573 +@@ -59,8 +59,15 @@ static struct dentry *public_dev_mount(struct file_system_type *fs_type, int fla
574 + const char *dev_name, void *data)
575 + {
576 + struct super_block *s = mnt->mnt_sb;
577 ++ int err;
578 ++
579 + atomic_inc(&s->s_active);
580 + down_write(&s->s_umount);
581 ++ err = reconfigure_single(s, flags, data);
582 ++ if (err < 0) {
583 ++ deactivate_locked_super(s);
584 ++ return ERR_PTR(err);
585 ++ }
586 + return dget(s->s_root);
587 + }
588 +
589 +diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
590 +index 172c751a4f6c2..f08e056ed0ae4 100644
591 +--- a/drivers/firmware/qemu_fw_cfg.c
592 ++++ b/drivers/firmware/qemu_fw_cfg.c
593 +@@ -388,9 +388,7 @@ static void fw_cfg_sysfs_cache_cleanup(void)
594 + struct fw_cfg_sysfs_entry *entry, *next;
595 +
596 + list_for_each_entry_safe(entry, next, &fw_cfg_entry_cache, list) {
597 +- /* will end up invoking fw_cfg_sysfs_cache_delist()
598 +- * via each object's release() method (i.e. destructor)
599 +- */
600 ++ fw_cfg_sysfs_cache_delist(entry);
601 + kobject_put(&entry->kobj);
602 + }
603 + }
604 +@@ -448,7 +446,6 @@ static void fw_cfg_sysfs_release_entry(struct kobject *kobj)
605 + {
606 + struct fw_cfg_sysfs_entry *entry = to_entry(kobj);
607 +
608 +- fw_cfg_sysfs_cache_delist(entry);
609 + kfree(entry);
610 + }
611 +
612 +@@ -601,20 +598,18 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)
613 + /* set file entry information */
614 + entry->size = be32_to_cpu(f->size);
615 + entry->select = be16_to_cpu(f->select);
616 +- memcpy(entry->name, f->name, FW_CFG_MAX_FILE_PATH);
617 ++ strscpy(entry->name, f->name, FW_CFG_MAX_FILE_PATH);
618 +
619 + /* register entry under "/sys/firmware/qemu_fw_cfg/by_key/" */
620 + err = kobject_init_and_add(&entry->kobj, &fw_cfg_sysfs_entry_ktype,
621 + fw_cfg_sel_ko, "%d", entry->select);
622 +- if (err) {
623 +- kobject_put(&entry->kobj);
624 +- return err;
625 +- }
626 ++ if (err)
627 ++ goto err_put_entry;
628 +
629 + /* add raw binary content access */
630 + err = sysfs_create_bin_file(&entry->kobj, &fw_cfg_sysfs_attr_raw);
631 + if (err)
632 +- goto err_add_raw;
633 ++ goto err_del_entry;
634 +
635 + /* try adding "/sys/firmware/qemu_fw_cfg/by_name/" symlink */
636 + fw_cfg_build_symlink(fw_cfg_fname_kset, &entry->kobj, entry->name);
637 +@@ -623,9 +618,10 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)
638 + fw_cfg_sysfs_cache_enlist(entry);
639 + return 0;
640 +
641 +-err_add_raw:
642 ++err_del_entry:
643 + kobject_del(&entry->kobj);
644 +- kfree(entry);
645 ++err_put_entry:
646 ++ kobject_put(&entry->kobj);
647 + return err;
648 + }
649 +
650 +diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
651 +index e727f1dd2a9a7..05f7ffd6a28da 100644
652 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
653 ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
654 +@@ -6065,6 +6065,7 @@ static void update_dsc_caps(struct amdgpu_dm_connector *aconnector,
655 + struct dsc_dec_dpcd_caps *dsc_caps)
656 + {
657 + stream->timing.flags.DSC = 0;
658 ++ dsc_caps->is_dsc_supported = false;
659 +
660 + if (aconnector->dc_link && sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT) {
661 + dc_dsc_parse_dsc_dpcd(aconnector->dc_link->ctx->dc,
662 +diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
663 +index 9f37eaf28ce7e..1b4cc934109e8 100644
664 +--- a/drivers/media/usb/uvc/uvc_video.c
665 ++++ b/drivers/media/usb/uvc/uvc_video.c
666 +@@ -1963,6 +1963,10 @@ static int uvc_video_start_transfer(struct uvc_streaming *stream,
667 + if (ep == NULL)
668 + return -EIO;
669 +
670 ++ /* Reject broken descriptors. */
671 ++ if (usb_endpoint_maxp(&ep->desc) == 0)
672 ++ return -EIO;
673 ++
674 + ret = uvc_init_video_bulk(stream, ep, gfp_flags);
675 + }
676 +
677 +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
678 +index 6312fddd9c00a..eaba661133280 100644
679 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
680 ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
681 +@@ -1000,6 +1000,7 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
682 + _initpabias(hw);
683 + rtl92c_dm_init(hw);
684 + exit:
685 ++ local_irq_disable();
686 + local_irq_restore(flags);
687 + return err;
688 + }
689 +diff --git a/drivers/remoteproc/qcom_pil_info.c b/drivers/remoteproc/qcom_pil_info.c
690 +index 7c007dd7b2000..aca21560e20b8 100644
691 +--- a/drivers/remoteproc/qcom_pil_info.c
692 ++++ b/drivers/remoteproc/qcom_pil_info.c
693 +@@ -104,7 +104,7 @@ int qcom_pil_info_store(const char *image, phys_addr_t base, size_t size)
694 + return -ENOMEM;
695 +
696 + found_unused:
697 +- memcpy_toio(entry, image, PIL_RELOC_NAME_LEN);
698 ++ memcpy_toio(entry, image, strnlen(image, PIL_RELOC_NAME_LEN));
699 + found_existing:
700 + /* Use two writel() as base is only aligned to 4 bytes on odd entries */
701 + writel(base, entry + PIL_RELOC_NAME_LEN);
702 +diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
703 +index 03857dc9cdc12..120c16b14223b 100644
704 +--- a/drivers/remoteproc/qcom_q6v5_pas.c
705 ++++ b/drivers/remoteproc/qcom_q6v5_pas.c
706 +@@ -652,6 +652,7 @@ static const struct adsp_data sm8350_cdsp_resource = {
707 + .auto_boot = true,
708 + .proxy_pd_names = (char*[]){
709 + "cx",
710 ++ "mxc",
711 + NULL
712 + },
713 + .load_state = "cdsp",
714 +diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c
715 +index e2757ff1c23d2..96e312a3eac75 100644
716 +--- a/drivers/video/fbdev/vga16fb.c
717 ++++ b/drivers/video/fbdev/vga16fb.c
718 +@@ -184,6 +184,25 @@ static inline void setindex(int index)
719 + vga_io_w(VGA_GFX_I, index);
720 + }
721 +
722 ++/* Check if the video mode is supported by the driver */
723 ++static inline int check_mode_supported(void)
724 ++{
725 ++ /* non-x86 architectures treat orig_video_isVGA as a boolean flag */
726 ++#if defined(CONFIG_X86)
727 ++ /* only EGA and VGA in 16 color graphic mode are supported */
728 ++ if (screen_info.orig_video_isVGA != VIDEO_TYPE_EGAC &&
729 ++ screen_info.orig_video_isVGA != VIDEO_TYPE_VGAC)
730 ++ return -ENODEV;
731 ++
732 ++ if (screen_info.orig_video_mode != 0x0D && /* 320x200/4 (EGA) */
733 ++ screen_info.orig_video_mode != 0x0E && /* 640x200/4 (EGA) */
734 ++ screen_info.orig_video_mode != 0x10 && /* 640x350/4 (EGA) */
735 ++ screen_info.orig_video_mode != 0x12) /* 640x480/4 (VGA) */
736 ++ return -ENODEV;
737 ++#endif
738 ++ return 0;
739 ++}
740 ++
741 + static void vga16fb_pan_var(struct fb_info *info,
742 + struct fb_var_screeninfo *var)
743 + {
744 +@@ -1422,6 +1441,11 @@ static int __init vga16fb_init(void)
745 +
746 + vga16fb_setup(option);
747 + #endif
748 ++
749 ++ ret = check_mode_supported();
750 ++ if (ret)
751 ++ return ret;
752 ++
753 + ret = platform_driver_register(&vga16fb_driver);
754 +
755 + if (!ret) {
756 +diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
757 +index fac918ccb3051..1d554d0b6e583 100644
758 +--- a/fs/9p/vfs_addr.c
759 ++++ b/fs/9p/vfs_addr.c
760 +@@ -42,6 +42,11 @@ static void v9fs_req_issue_op(struct netfs_read_subrequest *subreq)
761 + iov_iter_xarray(&to, READ, &rreq->mapping->i_pages, pos, len);
762 +
763 + total = p9_client_read(fid, pos, &to, &err);
764 ++
765 ++ /* if we just extended the file size, any portion not in
766 ++ * cache won't be on server and is zeroes */
767 ++ __set_bit(NETFS_SREQ_CLEAR_TAIL, &subreq->flags);
768 ++
769 + netfs_subreq_terminated(subreq, err ?: total, false);
770 + }
771 +
772 +diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
773 +index 7dee89ba32e7b..52f8ae79db219 100644
774 +--- a/fs/9p/vfs_inode_dotl.c
775 ++++ b/fs/9p/vfs_inode_dotl.c
776 +@@ -551,7 +551,10 @@ int v9fs_vfs_setattr_dotl(struct user_namespace *mnt_userns,
777 + {
778 + int retval, use_dentry = 0;
779 + struct p9_fid *fid = NULL;
780 +- struct p9_iattr_dotl p9attr;
781 ++ struct p9_iattr_dotl p9attr = {
782 ++ .uid = INVALID_UID,
783 ++ .gid = INVALID_GID,
784 ++ };
785 + struct inode *inode = d_inode(dentry);
786 +
787 + p9_debug(P9_DEBUG_VFS, "\n");
788 +@@ -561,14 +564,22 @@ int v9fs_vfs_setattr_dotl(struct user_namespace *mnt_userns,
789 + return retval;
790 +
791 + p9attr.valid = v9fs_mapped_iattr_valid(iattr->ia_valid);
792 +- p9attr.mode = iattr->ia_mode;
793 +- p9attr.uid = iattr->ia_uid;
794 +- p9attr.gid = iattr->ia_gid;
795 +- p9attr.size = iattr->ia_size;
796 +- p9attr.atime_sec = iattr->ia_atime.tv_sec;
797 +- p9attr.atime_nsec = iattr->ia_atime.tv_nsec;
798 +- p9attr.mtime_sec = iattr->ia_mtime.tv_sec;
799 +- p9attr.mtime_nsec = iattr->ia_mtime.tv_nsec;
800 ++ if (iattr->ia_valid & ATTR_MODE)
801 ++ p9attr.mode = iattr->ia_mode;
802 ++ if (iattr->ia_valid & ATTR_UID)
803 ++ p9attr.uid = iattr->ia_uid;
804 ++ if (iattr->ia_valid & ATTR_GID)
805 ++ p9attr.gid = iattr->ia_gid;
806 ++ if (iattr->ia_valid & ATTR_SIZE)
807 ++ p9attr.size = iattr->ia_size;
808 ++ if (iattr->ia_valid & ATTR_ATIME_SET) {
809 ++ p9attr.atime_sec = iattr->ia_atime.tv_sec;
810 ++ p9attr.atime_nsec = iattr->ia_atime.tv_nsec;
811 ++ }
812 ++ if (iattr->ia_valid & ATTR_MTIME_SET) {
813 ++ p9attr.mtime_sec = iattr->ia_mtime.tv_sec;
814 ++ p9attr.mtime_nsec = iattr->ia_mtime.tv_nsec;
815 ++ }
816 +
817 + if (iattr->ia_valid & ATTR_FILE) {
818 + fid = iattr->ia_file->private_data;
819 +diff --git a/fs/fs_context.c b/fs/fs_context.c
820 +index b7e43a780a625..24ce12f0db32e 100644
821 +--- a/fs/fs_context.c
822 ++++ b/fs/fs_context.c
823 +@@ -548,7 +548,7 @@ static int legacy_parse_param(struct fs_context *fc, struct fs_parameter *param)
824 + param->key);
825 + }
826 +
827 +- if (len > PAGE_SIZE - 2 - size)
828 ++ if (size + len + 2 > PAGE_SIZE)
829 + return invalf(fc, "VFS: Legacy: Cumulative options too large");
830 + if (strchr(param->key, ',') ||
831 + (param->type == fs_value_is_string &&
832 +diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
833 +index 15dac36ca852e..8ef53f6726ec8 100644
834 +--- a/fs/nfsd/nfs3proc.c
835 ++++ b/fs/nfsd/nfs3proc.c
836 +@@ -202,15 +202,11 @@ nfsd3_proc_write(struct svc_rqst *rqstp)
837 + fh_copy(&resp->fh, &argp->fh);
838 + resp->committed = argp->stable;
839 + nvecs = svc_fill_write_vector(rqstp, &argp->payload);
840 +- if (!nvecs) {
841 +- resp->status = nfserr_io;
842 +- goto out;
843 +- }
844 ++
845 + resp->status = nfsd_write(rqstp, &resp->fh, argp->offset,
846 + rqstp->rq_vec, nvecs, &cnt,
847 + resp->committed, resp->verf);
848 + resp->count = cnt;
849 +-out:
850 + return rpc_success;
851 + }
852 +
853 +diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
854 +index de282f3273c50..312fd289be583 100644
855 +--- a/fs/nfsd/nfsproc.c
856 ++++ b/fs/nfsd/nfsproc.c
857 +@@ -235,10 +235,6 @@ nfsd_proc_write(struct svc_rqst *rqstp)
858 + argp->len, argp->offset);
859 +
860 + nvecs = svc_fill_write_vector(rqstp, &argp->payload);
861 +- if (!nvecs) {
862 +- resp->status = nfserr_io;
863 +- goto out;
864 +- }
865 +
866 + resp->status = nfsd_write(rqstp, fh_copy(&resp->fh, &argp->fh),
867 + argp->offset, rqstp->rq_vec, nvecs,
868 +@@ -247,7 +243,6 @@ nfsd_proc_write(struct svc_rqst *rqstp)
869 + resp->status = fh_getattr(&resp->fh, &resp->stat);
870 + else if (resp->status == nfserr_jukebox)
871 + return rpc_drop_reply;
872 +-out:
873 + return rpc_success;
874 + }
875 +
876 +diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c
877 +index 538e839590ef5..b501dc07f9222 100644
878 +--- a/fs/orangefs/orangefs-bufmap.c
879 ++++ b/fs/orangefs/orangefs-bufmap.c
880 +@@ -176,7 +176,7 @@ orangefs_bufmap_free(struct orangefs_bufmap *bufmap)
881 + {
882 + kfree(bufmap->page_array);
883 + kfree(bufmap->desc_array);
884 +- kfree(bufmap->buffer_index_array);
885 ++ bitmap_free(bufmap->buffer_index_array);
886 + kfree(bufmap);
887 + }
888 +
889 +@@ -226,8 +226,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc)
890 + bufmap->desc_size = user_desc->size;
891 + bufmap->desc_shift = ilog2(bufmap->desc_size);
892 +
893 +- bufmap->buffer_index_array =
894 +- kzalloc(DIV_ROUND_UP(bufmap->desc_count, BITS_PER_LONG), GFP_KERNEL);
895 ++ bufmap->buffer_index_array = bitmap_zalloc(bufmap->desc_count, GFP_KERNEL);
896 + if (!bufmap->buffer_index_array)
897 + goto out_free_bufmap;
898 +
899 +@@ -250,7 +249,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc)
900 + out_free_desc_array:
901 + kfree(bufmap->desc_array);
902 + out_free_index_array:
903 +- kfree(bufmap->buffer_index_array);
904 ++ bitmap_free(bufmap->buffer_index_array);
905 + out_free_bufmap:
906 + kfree(bufmap);
907 + out:
908 +diff --git a/fs/super.c b/fs/super.c
909 +index 3bfc0f8fbd5bc..a6405d44d4ca2 100644
910 +--- a/fs/super.c
911 ++++ b/fs/super.c
912 +@@ -1423,8 +1423,8 @@ struct dentry *mount_nodev(struct file_system_type *fs_type,
913 + }
914 + EXPORT_SYMBOL(mount_nodev);
915 +
916 +-static int reconfigure_single(struct super_block *s,
917 +- int flags, void *data)
918 ++int reconfigure_single(struct super_block *s,
919 ++ int flags, void *data)
920 + {
921 + struct fs_context *fc;
922 + int ret;
923 +diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h
924 +index 6b54982fc5f37..13fa6f3df8e46 100644
925 +--- a/include/linux/fs_context.h
926 ++++ b/include/linux/fs_context.h
927 +@@ -142,6 +142,8 @@ extern void put_fs_context(struct fs_context *fc);
928 + extern int vfs_parse_fs_param_source(struct fs_context *fc,
929 + struct fs_parameter *param);
930 + extern void fc_drop_locked(struct fs_context *fc);
931 ++int reconfigure_single(struct super_block *s,
932 ++ int flags, void *data);
933 +
934 + /*
935 + * sget() wrappers to be called from the ->get_tree() op.
936 +diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
937 +index 0dcfd265beed5..318c489b735bc 100644
938 +--- a/include/linux/perf_event.h
939 ++++ b/include/linux/perf_event.h
940 +@@ -1240,7 +1240,18 @@ extern void perf_event_bpf_event(struct bpf_prog *prog,
941 + enum perf_bpf_event_type type,
942 + u16 flags);
943 +
944 +-extern struct perf_guest_info_callbacks *perf_guest_cbs;
945 ++extern struct perf_guest_info_callbacks __rcu *perf_guest_cbs;
946 ++static inline struct perf_guest_info_callbacks *perf_get_guest_cbs(void)
947 ++{
948 ++ /*
949 ++ * Callbacks are RCU-protected and must be READ_ONCE to avoid reloading
950 ++ * the callbacks between a !NULL check and dereferences, to ensure
951 ++ * pending stores/changes to the callback pointers are visible before a
952 ++ * non-NULL perf_guest_cbs is visible to readers, and to prevent a
953 ++ * module from unloading callbacks while readers are active.
954 ++ */
955 ++ return rcu_dereference(perf_guest_cbs);
956 ++}
957 + extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
958 + extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
959 +
960 +diff --git a/kernel/events/core.c b/kernel/events/core.c
961 +index 30d94f68c5bdb..63f0414666438 100644
962 +--- a/kernel/events/core.c
963 ++++ b/kernel/events/core.c
964 +@@ -6526,18 +6526,25 @@ static void perf_pending_event(struct irq_work *entry)
965 + * Later on, we might change it to a list if there is
966 + * another virtualization implementation supporting the callbacks.
967 + */
968 +-struct perf_guest_info_callbacks *perf_guest_cbs;
969 ++struct perf_guest_info_callbacks __rcu *perf_guest_cbs;
970 +
971 + int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs)
972 + {
973 +- perf_guest_cbs = cbs;
974 ++ if (WARN_ON_ONCE(rcu_access_pointer(perf_guest_cbs)))
975 ++ return -EBUSY;
976 ++
977 ++ rcu_assign_pointer(perf_guest_cbs, cbs);
978 + return 0;
979 + }
980 + EXPORT_SYMBOL_GPL(perf_register_guest_info_callbacks);
981 +
982 + int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs)
983 + {
984 +- perf_guest_cbs = NULL;
985 ++ if (WARN_ON_ONCE(rcu_access_pointer(perf_guest_cbs) != cbs))
986 ++ return -EINVAL;
987 ++
988 ++ rcu_assign_pointer(perf_guest_cbs, NULL);
989 ++ synchronize_rcu();
990 + return 0;
991 + }
992 + EXPORT_SYMBOL_GPL(perf_unregister_guest_info_callbacks);
993 +diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
994 +index ea700395bef40..773f4903550a0 100644
995 +--- a/sound/pci/hda/hda_tegra.c
996 ++++ b/sound/pci/hda/hda_tegra.c
997 +@@ -68,14 +68,20 @@
998 + */
999 + #define TEGRA194_NUM_SDO_LINES 4
1000 +
1001 ++struct hda_tegra_soc {
1002 ++ bool has_hda2codec_2x_reset;
1003 ++};
1004 ++
1005 + struct hda_tegra {
1006 + struct azx chip;
1007 + struct device *dev;
1008 +- struct reset_control *reset;
1009 ++ struct reset_control_bulk_data resets[3];
1010 + struct clk_bulk_data clocks[3];
1011 ++ unsigned int nresets;
1012 + unsigned int nclocks;
1013 + void __iomem *regs;
1014 + struct work_struct probe_work;
1015 ++ const struct hda_tegra_soc *soc;
1016 + };
1017 +
1018 + #ifdef CONFIG_PM
1019 +@@ -170,7 +176,7 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev)
1020 + int rc;
1021 +
1022 + if (!chip->running) {
1023 +- rc = reset_control_assert(hda->reset);
1024 ++ rc = reset_control_bulk_assert(hda->nresets, hda->resets);
1025 + if (rc)
1026 + return rc;
1027 + }
1028 +@@ -187,7 +193,7 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev)
1029 + } else {
1030 + usleep_range(10, 100);
1031 +
1032 +- rc = reset_control_deassert(hda->reset);
1033 ++ rc = reset_control_bulk_deassert(hda->nresets, hda->resets);
1034 + if (rc)
1035 + return rc;
1036 + }
1037 +@@ -427,9 +433,17 @@ static int hda_tegra_create(struct snd_card *card,
1038 + return 0;
1039 + }
1040 +
1041 ++static const struct hda_tegra_soc tegra30_data = {
1042 ++ .has_hda2codec_2x_reset = true,
1043 ++};
1044 ++
1045 ++static const struct hda_tegra_soc tegra194_data = {
1046 ++ .has_hda2codec_2x_reset = false,
1047 ++};
1048 ++
1049 + static const struct of_device_id hda_tegra_match[] = {
1050 +- { .compatible = "nvidia,tegra30-hda" },
1051 +- { .compatible = "nvidia,tegra194-hda" },
1052 ++ { .compatible = "nvidia,tegra30-hda", .data = &tegra30_data },
1053 ++ { .compatible = "nvidia,tegra194-hda", .data = &tegra194_data },
1054 + {},
1055 + };
1056 + MODULE_DEVICE_TABLE(of, hda_tegra_match);
1057 +@@ -449,6 +463,8 @@ static int hda_tegra_probe(struct platform_device *pdev)
1058 + hda->dev = &pdev->dev;
1059 + chip = &hda->chip;
1060 +
1061 ++ hda->soc = of_device_get_match_data(&pdev->dev);
1062 ++
1063 + err = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
1064 + THIS_MODULE, 0, &card);
1065 + if (err < 0) {
1066 +@@ -456,11 +472,20 @@ static int hda_tegra_probe(struct platform_device *pdev)
1067 + return err;
1068 + }
1069 +
1070 +- hda->reset = devm_reset_control_array_get_exclusive(&pdev->dev);
1071 +- if (IS_ERR(hda->reset)) {
1072 +- err = PTR_ERR(hda->reset);
1073 ++ hda->resets[hda->nresets++].id = "hda";
1074 ++ hda->resets[hda->nresets++].id = "hda2hdmi";
1075 ++ /*
1076 ++ * "hda2codec_2x" reset is not present on Tegra194. Though DT would
1077 ++ * be updated to reflect this, but to have backward compatibility
1078 ++ * below is necessary.
1079 ++ */
1080 ++ if (hda->soc->has_hda2codec_2x_reset)
1081 ++ hda->resets[hda->nresets++].id = "hda2codec_2x";
1082 ++
1083 ++ err = devm_reset_control_bulk_get_exclusive(&pdev->dev, hda->nresets,
1084 ++ hda->resets);
1085 ++ if (err)
1086 + goto out_free;
1087 +- }
1088 +
1089 + hda->clocks[hda->nclocks++].id = "hda";
1090 + hda->clocks[hda->nclocks++].id = "hda2hdmi";
1091 +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
1092 +index 28255e752c4a1..fa80a79e9f966 100644
1093 +--- a/sound/pci/hda/patch_realtek.c
1094 ++++ b/sound/pci/hda/patch_realtek.c
1095 +@@ -1924,6 +1924,7 @@ enum {
1096 + ALC887_FIXUP_ASUS_BASS,
1097 + ALC887_FIXUP_BASS_CHMAP,
1098 + ALC1220_FIXUP_GB_DUAL_CODECS,
1099 ++ ALC1220_FIXUP_GB_X570,
1100 + ALC1220_FIXUP_CLEVO_P950,
1101 + ALC1220_FIXUP_CLEVO_PB51ED,
1102 + ALC1220_FIXUP_CLEVO_PB51ED_PINS,
1103 +@@ -2113,6 +2114,29 @@ static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec,
1104 + }
1105 + }
1106 +
1107 ++static void alc1220_fixup_gb_x570(struct hda_codec *codec,
1108 ++ const struct hda_fixup *fix,
1109 ++ int action)
1110 ++{
1111 ++ static const hda_nid_t conn1[] = { 0x0c };
1112 ++ static const struct coef_fw gb_x570_coefs[] = {
1113 ++ WRITE_COEF(0x1a, 0x01c1),
1114 ++ WRITE_COEF(0x1b, 0x0202),
1115 ++ WRITE_COEF(0x43, 0x3005),
1116 ++ {}
1117 ++ };
1118 ++
1119 ++ switch (action) {
1120 ++ case HDA_FIXUP_ACT_PRE_PROBE:
1121 ++ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
1122 ++ snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1);
1123 ++ break;
1124 ++ case HDA_FIXUP_ACT_INIT:
1125 ++ alc_process_coef_fw(codec, gb_x570_coefs);
1126 ++ break;
1127 ++ }
1128 ++}
1129 ++
1130 + static void alc1220_fixup_clevo_p950(struct hda_codec *codec,
1131 + const struct hda_fixup *fix,
1132 + int action)
1133 +@@ -2415,6 +2439,10 @@ static const struct hda_fixup alc882_fixups[] = {
1134 + .type = HDA_FIXUP_FUNC,
1135 + .v.func = alc1220_fixup_gb_dual_codecs,
1136 + },
1137 ++ [ALC1220_FIXUP_GB_X570] = {
1138 ++ .type = HDA_FIXUP_FUNC,
1139 ++ .v.func = alc1220_fixup_gb_x570,
1140 ++ },
1141 + [ALC1220_FIXUP_CLEVO_P950] = {
1142 + .type = HDA_FIXUP_FUNC,
1143 + .v.func = alc1220_fixup_clevo_p950,
1144 +@@ -2517,7 +2545,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
1145 + SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
1146 + SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
1147 + SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
1148 +- SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_CLEVO_P950),
1149 ++ SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570),
1150 + SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_CLEVO_P950),
1151 + SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950),
1152 + SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950),
1153 +@@ -6784,6 +6812,8 @@ enum {
1154 + ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
1155 + ALC233_FIXUP_NO_AUDIO_JACK,
1156 + ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME,
1157 ++ ALC285_FIXUP_LEGION_Y9000X_SPEAKERS,
1158 ++ ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
1159 + };
1160 +
1161 + static const struct hda_fixup alc269_fixups[] = {
1162 +@@ -8380,6 +8410,18 @@ static const struct hda_fixup alc269_fixups[] = {
1163 + .chained = true,
1164 + .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
1165 + },
1166 ++ [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = {
1167 ++ .type = HDA_FIXUP_FUNC,
1168 ++ .v.func = alc285_fixup_ideapad_s740_coef,
1169 ++ .chained = true,
1170 ++ .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
1171 ++ },
1172 ++ [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = {
1173 ++ .type = HDA_FIXUP_FUNC,
1174 ++ .v.func = alc287_fixup_legion_15imhg05_speakers,
1175 ++ .chained = true,
1176 ++ .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
1177 ++ },
1178 + [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = {
1179 + .type = HDA_FIXUP_VERBS,
1180 + //.v.verbs = legion_15imhg05_coefs,
1181 +@@ -8730,6 +8772,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1182 + SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
1183 + SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
1184 + SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
1185 ++ SND_PCI_QUIRK(0x103c, 0x89c3, "HP", ALC285_FIXUP_HP_GPIO_LED),
1186 + SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
1187 + SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
1188 + SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
1189 +@@ -8921,13 +8964,16 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1190 + SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
1191 + SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
1192 + SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
1193 ++ SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
1194 + SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
1195 ++ SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
1196 ++ SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
1197 + SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
1198 ++ SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
1199 + SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP),
1200 +- SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
1201 ++ SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
1202 + SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
1203 + SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
1204 +- SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
1205 + SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
1206 + SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
1207 + SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
1208 +diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
1209 +index e81c2493efdf9..44ba900828f6c 100644
1210 +--- a/tools/perf/ui/browsers/annotate.c
1211 ++++ b/tools/perf/ui/browsers/annotate.c
1212 +@@ -966,6 +966,7 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel,
1213 + .opts = opts,
1214 + };
1215 + int ret = -1, err;
1216 ++ int not_annotated = list_empty(&notes->src->source);
1217 +
1218 + if (sym == NULL)
1219 + return -1;
1220 +@@ -973,13 +974,15 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel,
1221 + if (ms->map->dso->annotate_warned)
1222 + return -1;
1223 +
1224 +- err = symbol__annotate2(ms, evsel, opts, &browser.arch);
1225 +- if (err) {
1226 +- char msg[BUFSIZ];
1227 +- ms->map->dso->annotate_warned = true;
1228 +- symbol__strerror_disassemble(ms, err, msg, sizeof(msg));
1229 +- ui__error("Couldn't annotate %s:\n%s", sym->name, msg);
1230 +- goto out_free_offsets;
1231 ++ if (not_annotated) {
1232 ++ err = symbol__annotate2(ms, evsel, opts, &browser.arch);
1233 ++ if (err) {
1234 ++ char msg[BUFSIZ];
1235 ++ ms->map->dso->annotate_warned = true;
1236 ++ symbol__strerror_disassemble(ms, err, msg, sizeof(msg));
1237 ++ ui__error("Couldn't annotate %s:\n%s", sym->name, msg);
1238 ++ goto out_free_offsets;
1239 ++ }
1240 + }
1241 +
1242 + ui_helpline__push("Press ESC to exit");
1243 +@@ -994,9 +997,11 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel,
1244 +
1245 + ret = annotate_browser__run(&browser, evsel, hbt);
1246 +
1247 +- annotated_source__purge(notes->src);
1248 ++ if(not_annotated)
1249 ++ annotated_source__purge(notes->src);
1250 +
1251 + out_free_offsets:
1252 +- zfree(&notes->offsets);
1253 ++ if(not_annotated)
1254 ++ zfree(&notes->offsets);
1255 + return ret;
1256 + }