1 |
commit: deed6d022f135f1d22002563967a813fe56de4c2 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 20 13:39:46 2022 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 20 13:39:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=deed6d02 |
7 |
|
8 |
Linux patch 5.15.16 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1015_linux-5.15.16.patch | 1200 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 1204 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 425166ce..7901341f 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -103,6 +103,10 @@ Patch: 1014_linux-5.15.15.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 5.15.15 |
23 |
|
24 |
+Patch: 1015_linux-5.15.16.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 5.15.16 |
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/1015_linux-5.15.16.patch b/1015_linux-5.15.16.patch |
33 |
new file mode 100644 |
34 |
index 00000000..bd0fef69 |
35 |
--- /dev/null |
36 |
+++ b/1015_linux-5.15.16.patch |
37 |
@@ -0,0 +1,1200 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index aed26e228ddef..af173c9df9422 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 5 |
45 |
+ PATCHLEVEL = 15 |
46 |
+-SUBLEVEL = 15 |
47 |
++SUBLEVEL = 16 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Trick or Treat |
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 2245f4b8d3629..8ce03a5ca8634 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 1c97493d21e10..24e42bd7d3b7a 100644 |
298 |
+--- a/arch/s390/kvm/kvm-s390.c |
299 |
++++ b/arch/s390/kvm/kvm-s390.c |
300 |
+@@ -4642,10 +4642,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 52bc8fbaa60ac..1539dd981104f 100644 |
320 |
+--- a/arch/s390/kvm/kvm-s390.h |
321 |
++++ b/arch/s390/kvm/kvm-s390.h |
322 |
+@@ -418,6 +418,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 683036c1c92a8..3dc921e853b6e 100644 |
332 |
+--- a/arch/s390/kvm/sigp.c |
333 |
++++ b/arch/s390/kvm/sigp.c |
334 |
+@@ -288,6 +288,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 6dfa8ddaa60f7..81d5e0a1f48cd 100644 |
371 |
+--- a/arch/x86/events/core.c |
372 |
++++ b/arch/x86/events/core.c |
373 |
+@@ -2762,10 +2762,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 |
+@@ -2865,10 +2866,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 |
+@@ -2945,18 +2947,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 c7f1cc433a6aa..03e6555aa8f1d 100644 |
427 |
+--- a/arch/x86/events/intel/core.c |
428 |
++++ b/arch/x86/events/intel/core.c |
429 |
+@@ -2788,6 +2788,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 |
+@@ -2854,9 +2855,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 75e21715ecb46..77ab14bcd4777 100644 |
454 |
+--- a/arch/x86/include/asm/kvm_host.h |
455 |
++++ b/arch/x86/include/asm/kvm_host.h |
456 |
+@@ -1509,6 +1509,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 95f5527646e4a..d8f9aa2605e66 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 7d280e6f5488a..2ab0e997e39fa 100644 |
508 |
+--- a/arch/x86/kvm/vmx/vmx.c |
509 |
++++ b/arch/x86/kvm/vmx/vmx.c |
510 |
+@@ -7899,6 +7899,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 ccb256c377a6e..2b80edffe02cd 100644 |
520 |
+--- a/arch/x86/kvm/x86.c |
521 |
++++ b/arch/x86/kvm/x86.c |
522 |
+@@ -1323,7 +1323,7 @@ static const u32 msrs_to_save_all[] = { |
523 |
+ MSR_IA32_UMWAIT_CONTROL, |
524 |
+ |
525 |
+ MSR_ARCH_PERFMON_FIXED_CTR0, MSR_ARCH_PERFMON_FIXED_CTR1, |
526 |
+- MSR_ARCH_PERFMON_FIXED_CTR0 + 2, MSR_ARCH_PERFMON_FIXED_CTR0 + 3, |
527 |
++ MSR_ARCH_PERFMON_FIXED_CTR0 + 2, |
528 |
+ MSR_CORE_PERF_FIXED_CTR_CTRL, MSR_CORE_PERF_GLOBAL_STATUS, |
529 |
+ MSR_CORE_PERF_GLOBAL_CTRL, MSR_CORE_PERF_GLOBAL_OVF_CTRL, |
530 |
+ MSR_ARCH_PERFMON_PERFCTR0, MSR_ARCH_PERFMON_PERFCTR1, |
531 |
+@@ -8430,7 +8430,7 @@ static struct perf_guest_info_callbacks kvm_guest_cbs = { |
532 |
+ .is_in_guest = kvm_is_in_guest, |
533 |
+ .is_user_mode = kvm_is_user_mode, |
534 |
+ .get_guest_ip = kvm_get_guest_ip, |
535 |
+- .handle_intel_pt_intr = kvm_handle_intel_pt_intr, |
536 |
++ .handle_intel_pt_intr = NULL, |
537 |
+ }; |
538 |
+ |
539 |
+ #ifdef CONFIG_X86_64 |
540 |
+@@ -8551,8 +8551,6 @@ int kvm_arch_init(void *opaque) |
541 |
+ |
542 |
+ kvm_timer_init(); |
543 |
+ |
544 |
+- perf_register_guest_info_callbacks(&kvm_guest_cbs); |
545 |
+- |
546 |
+ if (boot_cpu_has(X86_FEATURE_XSAVE)) { |
547 |
+ host_xcr0 = xgetbv(XCR_XFEATURE_ENABLED_MASK); |
548 |
+ supported_xcr0 = host_xcr0 & KVM_SUPPORTED_XCR0; |
549 |
+@@ -8586,7 +8584,6 @@ void kvm_arch_exit(void) |
550 |
+ clear_hv_tscchange_cb(); |
551 |
+ #endif |
552 |
+ kvm_lapic_exit(); |
553 |
+- perf_unregister_guest_info_callbacks(&kvm_guest_cbs); |
554 |
+ |
555 |
+ if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) |
556 |
+ cpufreq_unregister_notifier(&kvmclock_cpufreq_notifier_block, |
557 |
+@@ -11186,6 +11183,10 @@ int kvm_arch_hardware_setup(void *opaque) |
558 |
+ memcpy(&kvm_x86_ops, ops->runtime_ops, sizeof(kvm_x86_ops)); |
559 |
+ kvm_ops_static_call_update(); |
560 |
+ |
561 |
++ if (ops->intel_pt_intr_in_guest && ops->intel_pt_intr_in_guest()) |
562 |
++ kvm_guest_cbs.handle_intel_pt_intr = kvm_handle_intel_pt_intr; |
563 |
++ perf_register_guest_info_callbacks(&kvm_guest_cbs); |
564 |
++ |
565 |
+ if (!kvm_cpu_cap_has(X86_FEATURE_XSAVES)) |
566 |
+ supported_xss = 0; |
567 |
+ |
568 |
+@@ -11213,6 +11214,9 @@ int kvm_arch_hardware_setup(void *opaque) |
569 |
+ |
570 |
+ void kvm_arch_hardware_unsetup(void) |
571 |
+ { |
572 |
++ perf_unregister_guest_info_callbacks(&kvm_guest_cbs); |
573 |
++ kvm_guest_cbs.handle_intel_pt_intr = NULL; |
574 |
++ |
575 |
+ static_call(kvm_x86_hardware_unsetup)(); |
576 |
+ } |
577 |
+ |
578 |
+diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c |
579 |
+index 8be352ab4ddbf..fa13ad49d2116 100644 |
580 |
+--- a/drivers/base/devtmpfs.c |
581 |
++++ b/drivers/base/devtmpfs.c |
582 |
+@@ -59,8 +59,15 @@ static struct dentry *public_dev_mount(struct file_system_type *fs_type, int fla |
583 |
+ const char *dev_name, void *data) |
584 |
+ { |
585 |
+ struct super_block *s = mnt->mnt_sb; |
586 |
++ int err; |
587 |
++ |
588 |
+ atomic_inc(&s->s_active); |
589 |
+ down_write(&s->s_umount); |
590 |
++ err = reconfigure_single(s, flags, data); |
591 |
++ if (err < 0) { |
592 |
++ deactivate_locked_super(s); |
593 |
++ return ERR_PTR(err); |
594 |
++ } |
595 |
+ return dget(s->s_root); |
596 |
+ } |
597 |
+ |
598 |
+diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c |
599 |
+index 172c751a4f6c2..f08e056ed0ae4 100644 |
600 |
+--- a/drivers/firmware/qemu_fw_cfg.c |
601 |
++++ b/drivers/firmware/qemu_fw_cfg.c |
602 |
+@@ -388,9 +388,7 @@ static void fw_cfg_sysfs_cache_cleanup(void) |
603 |
+ struct fw_cfg_sysfs_entry *entry, *next; |
604 |
+ |
605 |
+ list_for_each_entry_safe(entry, next, &fw_cfg_entry_cache, list) { |
606 |
+- /* will end up invoking fw_cfg_sysfs_cache_delist() |
607 |
+- * via each object's release() method (i.e. destructor) |
608 |
+- */ |
609 |
++ fw_cfg_sysfs_cache_delist(entry); |
610 |
+ kobject_put(&entry->kobj); |
611 |
+ } |
612 |
+ } |
613 |
+@@ -448,7 +446,6 @@ static void fw_cfg_sysfs_release_entry(struct kobject *kobj) |
614 |
+ { |
615 |
+ struct fw_cfg_sysfs_entry *entry = to_entry(kobj); |
616 |
+ |
617 |
+- fw_cfg_sysfs_cache_delist(entry); |
618 |
+ kfree(entry); |
619 |
+ } |
620 |
+ |
621 |
+@@ -601,20 +598,18 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f) |
622 |
+ /* set file entry information */ |
623 |
+ entry->size = be32_to_cpu(f->size); |
624 |
+ entry->select = be16_to_cpu(f->select); |
625 |
+- memcpy(entry->name, f->name, FW_CFG_MAX_FILE_PATH); |
626 |
++ strscpy(entry->name, f->name, FW_CFG_MAX_FILE_PATH); |
627 |
+ |
628 |
+ /* register entry under "/sys/firmware/qemu_fw_cfg/by_key/" */ |
629 |
+ err = kobject_init_and_add(&entry->kobj, &fw_cfg_sysfs_entry_ktype, |
630 |
+ fw_cfg_sel_ko, "%d", entry->select); |
631 |
+- if (err) { |
632 |
+- kobject_put(&entry->kobj); |
633 |
+- return err; |
634 |
+- } |
635 |
++ if (err) |
636 |
++ goto err_put_entry; |
637 |
+ |
638 |
+ /* add raw binary content access */ |
639 |
+ err = sysfs_create_bin_file(&entry->kobj, &fw_cfg_sysfs_attr_raw); |
640 |
+ if (err) |
641 |
+- goto err_add_raw; |
642 |
++ goto err_del_entry; |
643 |
+ |
644 |
+ /* try adding "/sys/firmware/qemu_fw_cfg/by_name/" symlink */ |
645 |
+ fw_cfg_build_symlink(fw_cfg_fname_kset, &entry->kobj, entry->name); |
646 |
+@@ -623,9 +618,10 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f) |
647 |
+ fw_cfg_sysfs_cache_enlist(entry); |
648 |
+ return 0; |
649 |
+ |
650 |
+-err_add_raw: |
651 |
++err_del_entry: |
652 |
+ kobject_del(&entry->kobj); |
653 |
+- kfree(entry); |
654 |
++err_put_entry: |
655 |
++ kobject_put(&entry->kobj); |
656 |
+ return err; |
657 |
+ } |
658 |
+ |
659 |
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |
660 |
+index fef13e93a99fd..2fbaf6f869bfb 100644 |
661 |
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |
662 |
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |
663 |
+@@ -5604,6 +5604,7 @@ static void update_dsc_caps(struct amdgpu_dm_connector *aconnector, |
664 |
+ struct dsc_dec_dpcd_caps *dsc_caps) |
665 |
+ { |
666 |
+ stream->timing.flags.DSC = 0; |
667 |
++ dsc_caps->is_dsc_supported = false; |
668 |
+ |
669 |
+ if (aconnector->dc_link && sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT) { |
670 |
+ dc_dsc_parse_dsc_dpcd(aconnector->dc_link->ctx->dc, |
671 |
+diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c |
672 |
+index 9f37eaf28ce7e..1b4cc934109e8 100644 |
673 |
+--- a/drivers/media/usb/uvc/uvc_video.c |
674 |
++++ b/drivers/media/usb/uvc/uvc_video.c |
675 |
+@@ -1963,6 +1963,10 @@ static int uvc_video_start_transfer(struct uvc_streaming *stream, |
676 |
+ if (ep == NULL) |
677 |
+ return -EIO; |
678 |
+ |
679 |
++ /* Reject broken descriptors. */ |
680 |
++ if (usb_endpoint_maxp(&ep->desc) == 0) |
681 |
++ return -EIO; |
682 |
++ |
683 |
+ ret = uvc_init_video_bulk(stream, ep, gfp_flags); |
684 |
+ } |
685 |
+ |
686 |
+diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig |
687 |
+index aef14990e5f7c..19726ebd973d0 100644 |
688 |
+--- a/drivers/mtd/chips/Kconfig |
689 |
++++ b/drivers/mtd/chips/Kconfig |
690 |
+@@ -55,12 +55,14 @@ choice |
691 |
+ LITTLE_ENDIAN_BYTE, if the bytes are reversed. |
692 |
+ |
693 |
+ config MTD_CFI_NOSWAP |
694 |
++ depends on !ARCH_IXP4XX || CPU_BIG_ENDIAN |
695 |
+ bool "NO" |
696 |
+ |
697 |
+ config MTD_CFI_BE_BYTE_SWAP |
698 |
+ bool "BIG_ENDIAN_BYTE" |
699 |
+ |
700 |
+ config MTD_CFI_LE_BYTE_SWAP |
701 |
++ depends on !ARCH_IXP4XX |
702 |
+ bool "LITTLE_ENDIAN_BYTE" |
703 |
+ |
704 |
+ endchoice |
705 |
+diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig |
706 |
+index aaa164b977fe8..4945caa88345b 100644 |
707 |
+--- a/drivers/mtd/maps/Kconfig |
708 |
++++ b/drivers/mtd/maps/Kconfig |
709 |
+@@ -302,7 +302,7 @@ config MTD_DC21285 |
710 |
+ |
711 |
+ config MTD_IXP4XX |
712 |
+ tristate "CFI Flash device mapped on Intel IXP4xx based systems" |
713 |
+- depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX |
714 |
++ depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX && MTD_CFI_ADV_OPTIONS |
715 |
+ help |
716 |
+ This enables MTD access to flash devices on platforms based |
717 |
+ on Intel's IXP4xx family of network processors such as the |
718 |
+diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c |
719 |
+index 6312fddd9c00a..eaba661133280 100644 |
720 |
+--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c |
721 |
++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c |
722 |
+@@ -1000,6 +1000,7 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw) |
723 |
+ _initpabias(hw); |
724 |
+ rtl92c_dm_init(hw); |
725 |
+ exit: |
726 |
++ local_irq_disable(); |
727 |
+ local_irq_restore(flags); |
728 |
+ return err; |
729 |
+ } |
730 |
+diff --git a/drivers/remoteproc/qcom_pil_info.c b/drivers/remoteproc/qcom_pil_info.c |
731 |
+index 7c007dd7b2000..aca21560e20b8 100644 |
732 |
+--- a/drivers/remoteproc/qcom_pil_info.c |
733 |
++++ b/drivers/remoteproc/qcom_pil_info.c |
734 |
+@@ -104,7 +104,7 @@ int qcom_pil_info_store(const char *image, phys_addr_t base, size_t size) |
735 |
+ return -ENOMEM; |
736 |
+ |
737 |
+ found_unused: |
738 |
+- memcpy_toio(entry, image, PIL_RELOC_NAME_LEN); |
739 |
++ memcpy_toio(entry, image, strnlen(image, PIL_RELOC_NAME_LEN)); |
740 |
+ found_existing: |
741 |
+ /* Use two writel() as base is only aligned to 4 bytes on odd entries */ |
742 |
+ writel(base, entry + PIL_RELOC_NAME_LEN); |
743 |
+diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c |
744 |
+index 401b1ec907852..699eaac5b760e 100644 |
745 |
+--- a/drivers/remoteproc/qcom_q6v5_pas.c |
746 |
++++ b/drivers/remoteproc/qcom_q6v5_pas.c |
747 |
+@@ -661,6 +661,7 @@ static const struct adsp_data sm8350_cdsp_resource = { |
748 |
+ }, |
749 |
+ .proxy_pd_names = (char*[]){ |
750 |
+ "cx", |
751 |
++ "mxc", |
752 |
+ NULL |
753 |
+ }, |
754 |
+ .ssr_name = "cdsp", |
755 |
+diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c |
756 |
+index e2757ff1c23d2..96e312a3eac75 100644 |
757 |
+--- a/drivers/video/fbdev/vga16fb.c |
758 |
++++ b/drivers/video/fbdev/vga16fb.c |
759 |
+@@ -184,6 +184,25 @@ static inline void setindex(int index) |
760 |
+ vga_io_w(VGA_GFX_I, index); |
761 |
+ } |
762 |
+ |
763 |
++/* Check if the video mode is supported by the driver */ |
764 |
++static inline int check_mode_supported(void) |
765 |
++{ |
766 |
++ /* non-x86 architectures treat orig_video_isVGA as a boolean flag */ |
767 |
++#if defined(CONFIG_X86) |
768 |
++ /* only EGA and VGA in 16 color graphic mode are supported */ |
769 |
++ if (screen_info.orig_video_isVGA != VIDEO_TYPE_EGAC && |
770 |
++ screen_info.orig_video_isVGA != VIDEO_TYPE_VGAC) |
771 |
++ return -ENODEV; |
772 |
++ |
773 |
++ if (screen_info.orig_video_mode != 0x0D && /* 320x200/4 (EGA) */ |
774 |
++ screen_info.orig_video_mode != 0x0E && /* 640x200/4 (EGA) */ |
775 |
++ screen_info.orig_video_mode != 0x10 && /* 640x350/4 (EGA) */ |
776 |
++ screen_info.orig_video_mode != 0x12) /* 640x480/4 (VGA) */ |
777 |
++ return -ENODEV; |
778 |
++#endif |
779 |
++ return 0; |
780 |
++} |
781 |
++ |
782 |
+ static void vga16fb_pan_var(struct fb_info *info, |
783 |
+ struct fb_var_screeninfo *var) |
784 |
+ { |
785 |
+@@ -1422,6 +1441,11 @@ static int __init vga16fb_init(void) |
786 |
+ |
787 |
+ vga16fb_setup(option); |
788 |
+ #endif |
789 |
++ |
790 |
++ ret = check_mode_supported(); |
791 |
++ if (ret) |
792 |
++ return ret; |
793 |
++ |
794 |
+ ret = platform_driver_register(&vga16fb_driver); |
795 |
+ |
796 |
+ if (!ret) { |
797 |
+diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c |
798 |
+index 01b9e1281a297..a61df2e0ae521 100644 |
799 |
+--- a/fs/9p/vfs_inode_dotl.c |
800 |
++++ b/fs/9p/vfs_inode_dotl.c |
801 |
+@@ -553,7 +553,10 @@ int v9fs_vfs_setattr_dotl(struct user_namespace *mnt_userns, |
802 |
+ { |
803 |
+ int retval, use_dentry = 0; |
804 |
+ struct p9_fid *fid = NULL; |
805 |
+- struct p9_iattr_dotl p9attr; |
806 |
++ struct p9_iattr_dotl p9attr = { |
807 |
++ .uid = INVALID_UID, |
808 |
++ .gid = INVALID_GID, |
809 |
++ }; |
810 |
+ struct inode *inode = d_inode(dentry); |
811 |
+ |
812 |
+ p9_debug(P9_DEBUG_VFS, "\n"); |
813 |
+@@ -563,14 +566,22 @@ int v9fs_vfs_setattr_dotl(struct user_namespace *mnt_userns, |
814 |
+ return retval; |
815 |
+ |
816 |
+ p9attr.valid = v9fs_mapped_iattr_valid(iattr->ia_valid); |
817 |
+- p9attr.mode = iattr->ia_mode; |
818 |
+- p9attr.uid = iattr->ia_uid; |
819 |
+- p9attr.gid = iattr->ia_gid; |
820 |
+- p9attr.size = iattr->ia_size; |
821 |
+- p9attr.atime_sec = iattr->ia_atime.tv_sec; |
822 |
+- p9attr.atime_nsec = iattr->ia_atime.tv_nsec; |
823 |
+- p9attr.mtime_sec = iattr->ia_mtime.tv_sec; |
824 |
+- p9attr.mtime_nsec = iattr->ia_mtime.tv_nsec; |
825 |
++ if (iattr->ia_valid & ATTR_MODE) |
826 |
++ p9attr.mode = iattr->ia_mode; |
827 |
++ if (iattr->ia_valid & ATTR_UID) |
828 |
++ p9attr.uid = iattr->ia_uid; |
829 |
++ if (iattr->ia_valid & ATTR_GID) |
830 |
++ p9attr.gid = iattr->ia_gid; |
831 |
++ if (iattr->ia_valid & ATTR_SIZE) |
832 |
++ p9attr.size = iattr->ia_size; |
833 |
++ if (iattr->ia_valid & ATTR_ATIME_SET) { |
834 |
++ p9attr.atime_sec = iattr->ia_atime.tv_sec; |
835 |
++ p9attr.atime_nsec = iattr->ia_atime.tv_nsec; |
836 |
++ } |
837 |
++ if (iattr->ia_valid & ATTR_MTIME_SET) { |
838 |
++ p9attr.mtime_sec = iattr->ia_mtime.tv_sec; |
839 |
++ p9attr.mtime_nsec = iattr->ia_mtime.tv_nsec; |
840 |
++ } |
841 |
+ |
842 |
+ if (iattr->ia_valid & ATTR_FILE) { |
843 |
+ fid = iattr->ia_file->private_data; |
844 |
+diff --git a/fs/fs_context.c b/fs/fs_context.c |
845 |
+index b7e43a780a625..24ce12f0db32e 100644 |
846 |
+--- a/fs/fs_context.c |
847 |
++++ b/fs/fs_context.c |
848 |
+@@ -548,7 +548,7 @@ static int legacy_parse_param(struct fs_context *fc, struct fs_parameter *param) |
849 |
+ param->key); |
850 |
+ } |
851 |
+ |
852 |
+- if (len > PAGE_SIZE - 2 - size) |
853 |
++ if (size + len + 2 > PAGE_SIZE) |
854 |
+ return invalf(fc, "VFS: Legacy: Cumulative options too large"); |
855 |
+ if (strchr(param->key, ',') || |
856 |
+ (param->type == fs_value_is_string && |
857 |
+diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c |
858 |
+index 538e839590ef5..b501dc07f9222 100644 |
859 |
+--- a/fs/orangefs/orangefs-bufmap.c |
860 |
++++ b/fs/orangefs/orangefs-bufmap.c |
861 |
+@@ -176,7 +176,7 @@ orangefs_bufmap_free(struct orangefs_bufmap *bufmap) |
862 |
+ { |
863 |
+ kfree(bufmap->page_array); |
864 |
+ kfree(bufmap->desc_array); |
865 |
+- kfree(bufmap->buffer_index_array); |
866 |
++ bitmap_free(bufmap->buffer_index_array); |
867 |
+ kfree(bufmap); |
868 |
+ } |
869 |
+ |
870 |
+@@ -226,8 +226,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc) |
871 |
+ bufmap->desc_size = user_desc->size; |
872 |
+ bufmap->desc_shift = ilog2(bufmap->desc_size); |
873 |
+ |
874 |
+- bufmap->buffer_index_array = |
875 |
+- kzalloc(DIV_ROUND_UP(bufmap->desc_count, BITS_PER_LONG), GFP_KERNEL); |
876 |
++ bufmap->buffer_index_array = bitmap_zalloc(bufmap->desc_count, GFP_KERNEL); |
877 |
+ if (!bufmap->buffer_index_array) |
878 |
+ goto out_free_bufmap; |
879 |
+ |
880 |
+@@ -250,7 +249,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc) |
881 |
+ out_free_desc_array: |
882 |
+ kfree(bufmap->desc_array); |
883 |
+ out_free_index_array: |
884 |
+- kfree(bufmap->buffer_index_array); |
885 |
++ bitmap_free(bufmap->buffer_index_array); |
886 |
+ out_free_bufmap: |
887 |
+ kfree(bufmap); |
888 |
+ out: |
889 |
+diff --git a/fs/super.c b/fs/super.c |
890 |
+index bcef3a6f4c4b5..a1f82dfd1b39a 100644 |
891 |
+--- a/fs/super.c |
892 |
++++ b/fs/super.c |
893 |
+@@ -1421,8 +1421,8 @@ struct dentry *mount_nodev(struct file_system_type *fs_type, |
894 |
+ } |
895 |
+ EXPORT_SYMBOL(mount_nodev); |
896 |
+ |
897 |
+-static int reconfigure_single(struct super_block *s, |
898 |
+- int flags, void *data) |
899 |
++int reconfigure_single(struct super_block *s, |
900 |
++ int flags, void *data) |
901 |
+ { |
902 |
+ struct fs_context *fc; |
903 |
+ int ret; |
904 |
+diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h |
905 |
+index 6b54982fc5f37..13fa6f3df8e46 100644 |
906 |
+--- a/include/linux/fs_context.h |
907 |
++++ b/include/linux/fs_context.h |
908 |
+@@ -142,6 +142,8 @@ extern void put_fs_context(struct fs_context *fc); |
909 |
+ extern int vfs_parse_fs_param_source(struct fs_context *fc, |
910 |
+ struct fs_parameter *param); |
911 |
+ extern void fc_drop_locked(struct fs_context *fc); |
912 |
++int reconfigure_single(struct super_block *s, |
913 |
++ int flags, void *data); |
914 |
+ |
915 |
+ /* |
916 |
+ * sget() wrappers to be called from the ->get_tree() op. |
917 |
+diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h |
918 |
+index 9b60bb89d86ab..ae1f0c8b75623 100644 |
919 |
+--- a/include/linux/perf_event.h |
920 |
++++ b/include/linux/perf_event.h |
921 |
+@@ -1239,7 +1239,18 @@ extern void perf_event_bpf_event(struct bpf_prog *prog, |
922 |
+ enum perf_bpf_event_type type, |
923 |
+ u16 flags); |
924 |
+ |
925 |
+-extern struct perf_guest_info_callbacks *perf_guest_cbs; |
926 |
++extern struct perf_guest_info_callbacks __rcu *perf_guest_cbs; |
927 |
++static inline struct perf_guest_info_callbacks *perf_get_guest_cbs(void) |
928 |
++{ |
929 |
++ /* |
930 |
++ * Callbacks are RCU-protected and must be READ_ONCE to avoid reloading |
931 |
++ * the callbacks between a !NULL check and dereferences, to ensure |
932 |
++ * pending stores/changes to the callback pointers are visible before a |
933 |
++ * non-NULL perf_guest_cbs is visible to readers, and to prevent a |
934 |
++ * module from unloading callbacks while readers are active. |
935 |
++ */ |
936 |
++ return rcu_dereference(perf_guest_cbs); |
937 |
++} |
938 |
+ extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); |
939 |
+ extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); |
940 |
+ |
941 |
+diff --git a/kernel/events/core.c b/kernel/events/core.c |
942 |
+index 2931faf92a76f..0fe6a65bbd58f 100644 |
943 |
+--- a/kernel/events/core.c |
944 |
++++ b/kernel/events/core.c |
945 |
+@@ -6526,18 +6526,25 @@ static void perf_pending_event(struct irq_work *entry) |
946 |
+ * Later on, we might change it to a list if there is |
947 |
+ * another virtualization implementation supporting the callbacks. |
948 |
+ */ |
949 |
+-struct perf_guest_info_callbacks *perf_guest_cbs; |
950 |
++struct perf_guest_info_callbacks __rcu *perf_guest_cbs; |
951 |
+ |
952 |
+ int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) |
953 |
+ { |
954 |
+- perf_guest_cbs = cbs; |
955 |
++ if (WARN_ON_ONCE(rcu_access_pointer(perf_guest_cbs))) |
956 |
++ return -EBUSY; |
957 |
++ |
958 |
++ rcu_assign_pointer(perf_guest_cbs, cbs); |
959 |
+ return 0; |
960 |
+ } |
961 |
+ EXPORT_SYMBOL_GPL(perf_register_guest_info_callbacks); |
962 |
+ |
963 |
+ int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) |
964 |
+ { |
965 |
+- perf_guest_cbs = NULL; |
966 |
++ if (WARN_ON_ONCE(rcu_access_pointer(perf_guest_cbs) != cbs)) |
967 |
++ return -EINVAL; |
968 |
++ |
969 |
++ rcu_assign_pointer(perf_guest_cbs, NULL); |
970 |
++ synchronize_rcu(); |
971 |
+ return 0; |
972 |
+ } |
973 |
+ EXPORT_SYMBOL_GPL(perf_unregister_guest_info_callbacks); |
974 |
+diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c |
975 |
+index ea700395bef40..773f4903550a0 100644 |
976 |
+--- a/sound/pci/hda/hda_tegra.c |
977 |
++++ b/sound/pci/hda/hda_tegra.c |
978 |
+@@ -68,14 +68,20 @@ |
979 |
+ */ |
980 |
+ #define TEGRA194_NUM_SDO_LINES 4 |
981 |
+ |
982 |
++struct hda_tegra_soc { |
983 |
++ bool has_hda2codec_2x_reset; |
984 |
++}; |
985 |
++ |
986 |
+ struct hda_tegra { |
987 |
+ struct azx chip; |
988 |
+ struct device *dev; |
989 |
+- struct reset_control *reset; |
990 |
++ struct reset_control_bulk_data resets[3]; |
991 |
+ struct clk_bulk_data clocks[3]; |
992 |
++ unsigned int nresets; |
993 |
+ unsigned int nclocks; |
994 |
+ void __iomem *regs; |
995 |
+ struct work_struct probe_work; |
996 |
++ const struct hda_tegra_soc *soc; |
997 |
+ }; |
998 |
+ |
999 |
+ #ifdef CONFIG_PM |
1000 |
+@@ -170,7 +176,7 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev) |
1001 |
+ int rc; |
1002 |
+ |
1003 |
+ if (!chip->running) { |
1004 |
+- rc = reset_control_assert(hda->reset); |
1005 |
++ rc = reset_control_bulk_assert(hda->nresets, hda->resets); |
1006 |
+ if (rc) |
1007 |
+ return rc; |
1008 |
+ } |
1009 |
+@@ -187,7 +193,7 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev) |
1010 |
+ } else { |
1011 |
+ usleep_range(10, 100); |
1012 |
+ |
1013 |
+- rc = reset_control_deassert(hda->reset); |
1014 |
++ rc = reset_control_bulk_deassert(hda->nresets, hda->resets); |
1015 |
+ if (rc) |
1016 |
+ return rc; |
1017 |
+ } |
1018 |
+@@ -427,9 +433,17 @@ static int hda_tegra_create(struct snd_card *card, |
1019 |
+ return 0; |
1020 |
+ } |
1021 |
+ |
1022 |
++static const struct hda_tegra_soc tegra30_data = { |
1023 |
++ .has_hda2codec_2x_reset = true, |
1024 |
++}; |
1025 |
++ |
1026 |
++static const struct hda_tegra_soc tegra194_data = { |
1027 |
++ .has_hda2codec_2x_reset = false, |
1028 |
++}; |
1029 |
++ |
1030 |
+ static const struct of_device_id hda_tegra_match[] = { |
1031 |
+- { .compatible = "nvidia,tegra30-hda" }, |
1032 |
+- { .compatible = "nvidia,tegra194-hda" }, |
1033 |
++ { .compatible = "nvidia,tegra30-hda", .data = &tegra30_data }, |
1034 |
++ { .compatible = "nvidia,tegra194-hda", .data = &tegra194_data }, |
1035 |
+ {}, |
1036 |
+ }; |
1037 |
+ MODULE_DEVICE_TABLE(of, hda_tegra_match); |
1038 |
+@@ -449,6 +463,8 @@ static int hda_tegra_probe(struct platform_device *pdev) |
1039 |
+ hda->dev = &pdev->dev; |
1040 |
+ chip = &hda->chip; |
1041 |
+ |
1042 |
++ hda->soc = of_device_get_match_data(&pdev->dev); |
1043 |
++ |
1044 |
+ err = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, |
1045 |
+ THIS_MODULE, 0, &card); |
1046 |
+ if (err < 0) { |
1047 |
+@@ -456,11 +472,20 @@ static int hda_tegra_probe(struct platform_device *pdev) |
1048 |
+ return err; |
1049 |
+ } |
1050 |
+ |
1051 |
+- hda->reset = devm_reset_control_array_get_exclusive(&pdev->dev); |
1052 |
+- if (IS_ERR(hda->reset)) { |
1053 |
+- err = PTR_ERR(hda->reset); |
1054 |
++ hda->resets[hda->nresets++].id = "hda"; |
1055 |
++ hda->resets[hda->nresets++].id = "hda2hdmi"; |
1056 |
++ /* |
1057 |
++ * "hda2codec_2x" reset is not present on Tegra194. Though DT would |
1058 |
++ * be updated to reflect this, but to have backward compatibility |
1059 |
++ * below is necessary. |
1060 |
++ */ |
1061 |
++ if (hda->soc->has_hda2codec_2x_reset) |
1062 |
++ hda->resets[hda->nresets++].id = "hda2codec_2x"; |
1063 |
++ |
1064 |
++ err = devm_reset_control_bulk_get_exclusive(&pdev->dev, hda->nresets, |
1065 |
++ hda->resets); |
1066 |
++ if (err) |
1067 |
+ goto out_free; |
1068 |
+- } |
1069 |
+ |
1070 |
+ hda->clocks[hda->nclocks++].id = "hda"; |
1071 |
+ hda->clocks[hda->nclocks++].id = "hda2hdmi"; |
1072 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
1073 |
+index 28255e752c4a1..fa80a79e9f966 100644 |
1074 |
+--- a/sound/pci/hda/patch_realtek.c |
1075 |
++++ b/sound/pci/hda/patch_realtek.c |
1076 |
+@@ -1924,6 +1924,7 @@ enum { |
1077 |
+ ALC887_FIXUP_ASUS_BASS, |
1078 |
+ ALC887_FIXUP_BASS_CHMAP, |
1079 |
+ ALC1220_FIXUP_GB_DUAL_CODECS, |
1080 |
++ ALC1220_FIXUP_GB_X570, |
1081 |
+ ALC1220_FIXUP_CLEVO_P950, |
1082 |
+ ALC1220_FIXUP_CLEVO_PB51ED, |
1083 |
+ ALC1220_FIXUP_CLEVO_PB51ED_PINS, |
1084 |
+@@ -2113,6 +2114,29 @@ static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec, |
1085 |
+ } |
1086 |
+ } |
1087 |
+ |
1088 |
++static void alc1220_fixup_gb_x570(struct hda_codec *codec, |
1089 |
++ const struct hda_fixup *fix, |
1090 |
++ int action) |
1091 |
++{ |
1092 |
++ static const hda_nid_t conn1[] = { 0x0c }; |
1093 |
++ static const struct coef_fw gb_x570_coefs[] = { |
1094 |
++ WRITE_COEF(0x1a, 0x01c1), |
1095 |
++ WRITE_COEF(0x1b, 0x0202), |
1096 |
++ WRITE_COEF(0x43, 0x3005), |
1097 |
++ {} |
1098 |
++ }; |
1099 |
++ |
1100 |
++ switch (action) { |
1101 |
++ case HDA_FIXUP_ACT_PRE_PROBE: |
1102 |
++ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); |
1103 |
++ snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1); |
1104 |
++ break; |
1105 |
++ case HDA_FIXUP_ACT_INIT: |
1106 |
++ alc_process_coef_fw(codec, gb_x570_coefs); |
1107 |
++ break; |
1108 |
++ } |
1109 |
++} |
1110 |
++ |
1111 |
+ static void alc1220_fixup_clevo_p950(struct hda_codec *codec, |
1112 |
+ const struct hda_fixup *fix, |
1113 |
+ int action) |
1114 |
+@@ -2415,6 +2439,10 @@ static const struct hda_fixup alc882_fixups[] = { |
1115 |
+ .type = HDA_FIXUP_FUNC, |
1116 |
+ .v.func = alc1220_fixup_gb_dual_codecs, |
1117 |
+ }, |
1118 |
++ [ALC1220_FIXUP_GB_X570] = { |
1119 |
++ .type = HDA_FIXUP_FUNC, |
1120 |
++ .v.func = alc1220_fixup_gb_x570, |
1121 |
++ }, |
1122 |
+ [ALC1220_FIXUP_CLEVO_P950] = { |
1123 |
+ .type = HDA_FIXUP_FUNC, |
1124 |
+ .v.func = alc1220_fixup_clevo_p950, |
1125 |
+@@ -2517,7 +2545,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
1126 |
+ SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD), |
1127 |
+ SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE), |
1128 |
+ SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), |
1129 |
+- SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_CLEVO_P950), |
1130 |
++ SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570), |
1131 |
+ SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_CLEVO_P950), |
1132 |
+ SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950), |
1133 |
+ SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950), |
1134 |
+@@ -6784,6 +6812,8 @@ enum { |
1135 |
+ ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE, |
1136 |
+ ALC233_FIXUP_NO_AUDIO_JACK, |
1137 |
+ ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME, |
1138 |
++ ALC285_FIXUP_LEGION_Y9000X_SPEAKERS, |
1139 |
++ ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, |
1140 |
+ }; |
1141 |
+ |
1142 |
+ static const struct hda_fixup alc269_fixups[] = { |
1143 |
+@@ -8380,6 +8410,18 @@ static const struct hda_fixup alc269_fixups[] = { |
1144 |
+ .chained = true, |
1145 |
+ .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, |
1146 |
+ }, |
1147 |
++ [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = { |
1148 |
++ .type = HDA_FIXUP_FUNC, |
1149 |
++ .v.func = alc285_fixup_ideapad_s740_coef, |
1150 |
++ .chained = true, |
1151 |
++ .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, |
1152 |
++ }, |
1153 |
++ [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = { |
1154 |
++ .type = HDA_FIXUP_FUNC, |
1155 |
++ .v.func = alc287_fixup_legion_15imhg05_speakers, |
1156 |
++ .chained = true, |
1157 |
++ .chain_id = ALC269_FIXUP_THINKPAD_ACPI, |
1158 |
++ }, |
1159 |
+ [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = { |
1160 |
+ .type = HDA_FIXUP_VERBS, |
1161 |
+ //.v.verbs = legion_15imhg05_coefs, |
1162 |
+@@ -8730,6 +8772,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1163 |
+ SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED), |
1164 |
+ SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), |
1165 |
+ SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED), |
1166 |
++ SND_PCI_QUIRK(0x103c, 0x89c3, "HP", ALC285_FIXUP_HP_GPIO_LED), |
1167 |
+ SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), |
1168 |
+ SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), |
1169 |
+ SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), |
1170 |
+@@ -8921,13 +8964,16 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1171 |
+ SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
1172 |
+ SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
1173 |
+ SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), |
1174 |
++ SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), |
1175 |
+ SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME), |
1176 |
++ SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), |
1177 |
++ SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), |
1178 |
+ SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), |
1179 |
++ SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
1180 |
+ SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP), |
1181 |
+- SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), |
1182 |
++ SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
1183 |
+ SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
1184 |
+ SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
1185 |
+- SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), |
1186 |
+ SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), |
1187 |
+ SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), |
1188 |
+ SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), |
1189 |
+diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c |
1190 |
+index e81c2493efdf9..44ba900828f6c 100644 |
1191 |
+--- a/tools/perf/ui/browsers/annotate.c |
1192 |
++++ b/tools/perf/ui/browsers/annotate.c |
1193 |
+@@ -966,6 +966,7 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel, |
1194 |
+ .opts = opts, |
1195 |
+ }; |
1196 |
+ int ret = -1, err; |
1197 |
++ int not_annotated = list_empty(¬es->src->source); |
1198 |
+ |
1199 |
+ if (sym == NULL) |
1200 |
+ return -1; |
1201 |
+@@ -973,13 +974,15 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel, |
1202 |
+ if (ms->map->dso->annotate_warned) |
1203 |
+ return -1; |
1204 |
+ |
1205 |
+- err = symbol__annotate2(ms, evsel, opts, &browser.arch); |
1206 |
+- if (err) { |
1207 |
+- char msg[BUFSIZ]; |
1208 |
+- ms->map->dso->annotate_warned = true; |
1209 |
+- symbol__strerror_disassemble(ms, err, msg, sizeof(msg)); |
1210 |
+- ui__error("Couldn't annotate %s:\n%s", sym->name, msg); |
1211 |
+- goto out_free_offsets; |
1212 |
++ if (not_annotated) { |
1213 |
++ err = symbol__annotate2(ms, evsel, opts, &browser.arch); |
1214 |
++ if (err) { |
1215 |
++ char msg[BUFSIZ]; |
1216 |
++ ms->map->dso->annotate_warned = true; |
1217 |
++ symbol__strerror_disassemble(ms, err, msg, sizeof(msg)); |
1218 |
++ ui__error("Couldn't annotate %s:\n%s", sym->name, msg); |
1219 |
++ goto out_free_offsets; |
1220 |
++ } |
1221 |
+ } |
1222 |
+ |
1223 |
+ ui_helpline__push("Press ESC to exit"); |
1224 |
+@@ -994,9 +997,11 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel, |
1225 |
+ |
1226 |
+ ret = annotate_browser__run(&browser, evsel, hbt); |
1227 |
+ |
1228 |
+- annotated_source__purge(notes->src); |
1229 |
++ if(not_annotated) |
1230 |
++ annotated_source__purge(notes->src); |
1231 |
+ |
1232 |
+ out_free_offsets: |
1233 |
+- zfree(¬es->offsets); |
1234 |
++ if(not_annotated) |
1235 |
++ zfree(¬es->offsets); |
1236 |
+ return ret; |
1237 |
+ } |