Linux 5.15.16
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.16 kernel.
All users of the 5.15 kernel series must upgrade.
The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/kernel/perf_callchain.c | 17 ++++-- arch/arm64/kernel/perf_callchain.c | 18 ++++-- arch/csky/kernel/perf_callchain.c | 6 +- arch/nds32/kernel/perf_event_cpu.c | 17 ++++-- arch/riscv/kernel/perf_callchain.c | 7 +- arch/s390/kvm/interrupt.c | 7 ++ arch/s390/kvm/kvm-s390.c | 9 ++- arch/s390/kvm/kvm-s390.h | 1 arch/s390/kvm/sigp.c | 28 ++++++++++ arch/x86/events/core.c | 17 ++++-- arch/x86/events/intel/core.c | 9 ++- arch/x86/include/asm/kvm_host.h | 1 arch/x86/kvm/lapic.c | 18 ++---- arch/x86/kvm/vmx/vmx.c | 1 arch/x86/kvm/x86.c | 14 +++-- drivers/base/devtmpfs.c | 7 ++ drivers/firmware/qemu_fw_cfg.c | 20 +++---- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 drivers/media/usb/uvc/uvc_video.c | 4 + drivers/mtd/chips/Kconfig | 2 drivers/mtd/maps/Kconfig | 2 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 1 drivers/remoteproc/qcom_pil_info.c | 2 drivers/remoteproc/qcom_q6v5_pas.c | 1 drivers/video/fbdev/vga16fb.c | 24 +++++++++ fs/9p/vfs_inode_dotl.c | 29 +++++++---- fs/fs_context.c | 2 fs/orangefs/orangefs-bufmap.c | 7 +- fs/super.c | 4 - include/linux/fs_context.h | 2 include/linux/perf_event.h | 13 ++++- kernel/events/core.c | 13 +++-- sound/pci/hda/hda_tegra.c | 43 +++++++++++++--- sound/pci/hda/patch_realtek.c | 52 ++++++++++++++++++-- tools/perf/ui/browsers/annotate.c | 23 +++++--- 36 files changed, 318 insertions(+), 106 deletions(-)
Arie Geiger (1):
ALSA: hda/realtek: Add speaker fixup for some Yoga 15ITL5 devices
Arnd Bergmann (1):
mtd: fixup CFI on ixp4xx
Baole Fang (1):
ALSA: hda/realtek: Add quirk for Legion Y9000X 2020
Bart Kroon (1):
ALSA: hda: ALC287: Add Lenovo IdeaPad Slim 9i 14ITL5 speaker quirk
Christian Brauner (1):
9p: only copy valid iattrs in 9P2000.L setattr implementation
Christian Lachner (1):
ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master after reboot from Windows
Christophe JAILLET (1):
orangefs: Fix the size of a memory allocation in orangefs_bufmap_alloc()
Dario Petrillo (1):
perf annotate: Avoid TUI crash when navigating in the annotation of recursive functions
Eric Farman (1):
KVM: s390: Clarify SIGP orders versus STOP/RESTART
Greg Kroah-Hartman (1):
Linux 5.15.16
Jamie Hill-Daniel (1):
vfs: fs_context: fix up param length parsing in legacy_parse_param
Javier Martinez Canillas (1):
video: vga16fb: Only probe for EGA and VGA 16 color graphic cards
Johan Hovold (4):
media: uvcvideo: fix division by zero at stream start
firmware: qemu_fw_cfg: fix sysfs information leak
firmware: qemu_fw_cfg: fix NULL-pointer deref on duplicate entries
firmware: qemu_fw_cfg: fix kobject leak in probe error path
Kai-Heng Feng (1):
ALSA: hda/realtek: Use ALC285_FIXUP_HP_GPIO_LED on another HP laptop
Larry Finger (1):
rtlwifi: rtl8192cu: Fix WARNING when calling local_irq_restore() with interrupts enabled
Li RongQing (1):
KVM: x86: don't print when fail to read/write pv eoi memory
Mario Limonciello (1):
drm/amd/display: explicitly set is_dsc_supported to false before use
NeilBrown (1):
devtmpfs regression fix: reconfigure on each mount
Sameer Pujar (1):
ALSA: hda/tegra: Fix Tegra194 HDA reset failure
Sean Christopherson (3):
perf: Protect perf_guest_cbs with RCU
KVM: x86: Register perf callbacks after calling vendor's hardware_setup()
KVM: x86: Register Processor Trace interrupt hook iff PT enabled in guest
Sibi Sankar (1):
remoteproc: qcom: pas: Add missing power-domain "mxc" for CDSP
Stephen Boyd (1):
remoteproc: qcom: pil_info: Don't memcpy_toio more than is provided
Takashi Iwai (1):
ALSA: hda/realtek: Re-order quirk entries for Lenovo
Wei Wang (1):
KVM: x86: remove PMU FIXED_CTR3 from msrs_to_save_all
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 15 +SUBLEVEL = 16 EXTRAVERSION = NAME = Trick or Treat
arch/arm/kernel/perf_callchain.c +11 -6
@@ -62,9 +62,10 @@ user_backtrace(struct frame_tail __user *tail,void perf_callchain_user (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();struct frame_tail __user *tail; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +if (guest_cbs && guest_cbs->is_in_guest ()) {/* We don't support guest os callchain now */ return ; }
@@ -98,9 +99,10 @@ callchain_trace(struct stackframe *fr,void perf_callchain_kernel (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();struct stackframe fr; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +if (guest_cbs && guest_cbs->is_in_guest ()) {/* We don't support guest os callchain now */ return ; }
@@ -111,18 +113,21 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *reunsigned long perf_instruction_pointer (struct pt_regs *regs) { -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) -return perf_guest_cbs->get_guest_ip (); +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs (); + +if (guest_cbs && guest_cbs->is_in_guest ()) +return guest_cbs->get_guest_ip ();return instruction_pointer (regs); }unsigned long perf_misc_flags (struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();int misc =0 ; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { -if (perf_guest_cbs->is_user_mode ()) +if (guest_cbs && guest_cbs->is_in_guest ()) { +if (guest_cbs->is_user_mode ()) misc |=PERF_RECORD_MISC_GUEST_USER ;else misc |=PERF_RECORD_MISC_GUEST_KERNEL ;
arch/arm64/kernel/perf_callchain.c +12 -6
@@ -102,7 +102,9 @@ compat_user_backtrace(struct compat_frame_tail __user *tail,void perf_callchain_user (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs (); + +if (guest_cbs && guest_cbs->is_in_guest ()) {/* We don't support guest os callchain now */ return ; }
@@ -147,9 +149,10 @@ static bool callchain_trace(void *data, unsigned long pc)void perf_callchain_kernel (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();struct stackframe frame; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +if (guest_cbs && guest_cbs->is_in_guest ()) {/* We don't support guest os callchain now */ return ; }
@@ -160,18 +163,21 @@ void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,unsigned long perf_instruction_pointer (struct pt_regs *regs) { -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) -return perf_guest_cbs->get_guest_ip (); +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs (); + +if (guest_cbs && guest_cbs->is_in_guest ()) +return guest_cbs->get_guest_ip ();return instruction_pointer (regs); }unsigned long perf_misc_flags (struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();int misc =0 ; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { -if (perf_guest_cbs->is_user_mode ()) +if (guest_cbs && guest_cbs->is_in_guest ()) { +if (guest_cbs->is_user_mode ()) misc |=PERF_RECORD_MISC_GUEST_USER ;else misc |=PERF_RECORD_MISC_GUEST_KERNEL ;
arch/csky/kernel/perf_callchain.c +4 -2
@@ -86,10 +86,11 @@ static unsigned long user_backtrace(struct perf_callchain_entry_ctx *entry,void perf_callchain_user (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();unsigned long fp =0 ;/* C-SKY does not support virtualization. */ -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) +if (guest_cbs && guest_cbs->is_in_guest ())return ; fp = regs->regs[4 ];
@@ -110,10 +111,11 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry,void perf_callchain_kernel (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();struct stackframe fr;/* C-SKY does not support virtualization. */ -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +if (guest_cbs && guest_cbs->is_in_guest ()) {pr_warn ("C-SKY does not support perf in guest mode!" );return ; }
arch/nds32/kernel/perf_event_cpu.c +11 -6
@@ -1363,6 +1363,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs) { + struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();unsigned long fp =0 ;unsigned long gp =0 ;unsigned long lp =0 ;
@@ -1371,7 +1372,7 @@ perf_callchain_user(struct perf_callchain_entry_ctx *entry, leaf_fp =0 ; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +if (guest_cbs && guest_cbs->is_in_guest ()) {/* We don't support guest os callchain now */ return ; }
@@ -1479,9 +1480,10 @@ void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs) { + struct perf_guest_info_callbacks *guest_cbs = perf_get_guest_cbs();struct stackframe fr; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +if (guest_cbs && guest_cbs->is_in_guest ()) {/* We don't support guest os callchain now */ return ; }
@@ -1493,20 +1495,23 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,unsigned long perf_instruction_pointer (struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs (); +/* However, NDS32 does not support virtualization */ -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) -return perf_guest_cbs->get_guest_ip (); +if (guest_cbs && guest_cbs->is_in_guest ()) +return guest_cbs->get_guest_ip ();return instruction_pointer (regs); }unsigned long perf_misc_flags (struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();int misc =0 ;/* However, NDS32 does not support virtualization */ -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { -if (perf_guest_cbs->is_user_mode ()) +if (guest_cbs && guest_cbs->is_in_guest ()) { +if (guest_cbs->is_user_mode ()) misc |=PERF_RECORD_MISC_GUEST_USER ;else misc |=PERF_RECORD_MISC_GUEST_KERNEL ;
arch/riscv/kernel/perf_callchain.c +5 -2
@@ -56,10 +56,11 @@ static unsigned long user_backtrace(struct perf_callchain_entry_ctx *entry,void perf_callchain_user (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();unsigned long fp =0 ;/* RISC-V does not support perf in guest mode. */ -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) +if (guest_cbs && guest_cbs->is_in_guest ())return ; fp = regs->s0;
@@ -78,8 +79,10 @@ static bool fill_callchain(void *entry, unsigned long pc)void perf_callchain_kernel (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs (); +/* RISC-V does not support perf in guest mode. */ -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +if (guest_cbs && guest_cbs->is_in_guest ()) {pr_warn ("RISC-V does not support perf in guest mode!" );return ; }
arch/s390/kvm/interrupt.c +7 -0
@@ -2115,6 +2115,13 @@ int kvm_s390_is_stop_irq_pending(struct kvm_vcpu *vcpu)return test_bit (IRQ_PEND_SIGP_STOP , &li->pending_irqs); } +int kvm_s390_is_restart_irq_pending (struct kvm_vcpu *vcpu) +{ +struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int; + +return test_bit (IRQ_PEND_RESTART , &li->pending_irqs); +} +void kvm_s390_clear_stop_irq (struct kvm_vcpu *vcpu) {struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
arch/s390/kvm/kvm-s390.c +7 -2
@@ -4642,10 +4642,15 @@ int kvm_s390_vcpu_stop(struct kvm_vcpu *vcpu) } } -/* SIGP STOP and SIGP STOP AND STORE STATUS has been fully processed */ +/* +* Set the VCPU to STOPPED and THEN clear the interrupt flag, +* now that the SIGP STOP and SIGP STOP AND STORE STATUS orders +* have been fully processed. This will ensure that the VCPU +* is kept BUSY if another VCPU is inquiring with SIGP SENSE. +*/ +kvm_s390_set_cpuflags (vcpu,CPUSTAT_STOPPED );kvm_s390_clear_stop_irq (vcpu); -kvm_s390_set_cpuflags (vcpu,CPUSTAT_STOPPED );__disable_ibs_on_vcpu (vcpu);for (i =0 ; i < online_vcpus; i++) {
arch/s390/kvm/kvm-s390.h +1 -0
@@ -418,6 +418,7 @@ void kvm_s390_destroy_adapters(struct kvm *kvm);int kvm_s390_ext_call_pending (struct kvm_vcpu *vcpu);extern struct kvm_device_ops kvm_flic_ops;int kvm_s390_is_stop_irq_pending (struct kvm_vcpu *vcpu); +int kvm_s390_is_restart_irq_pending (struct kvm_vcpu *vcpu);void kvm_s390_clear_stop_irq (struct kvm_vcpu *vcpu);int kvm_s390_set_irq_state (struct kvm_vcpu *vcpu,void __user *buf,int len);
arch/s390/kvm/sigp.c +28 -0
@@ -288,6 +288,34 @@ static int handle_sigp_dst(struct kvm_vcpu *vcpu, u8 order_code,if (!dst_vcpu)return SIGP_CC_NOT_OPERATIONAL ; +/* +* SIGP RESTART, SIGP STOP, and SIGP STOP AND STORE STATUS orders +* are processed asynchronously. Until the affected VCPU finishes +* its work and calls back into KVM to clear the (RESTART or STOP) +* interrupt, we need to return any new non-reset orders "busy". +* +* This is important because a single VCPU could issue: +* 1) SIGP STOP $DESTINATION +* 2) SIGP SENSE $DESTINATION +* +* If the SIGP SENSE would not be rejected as "busy", it could +* return an incorrect answer as to whether the VCPU is STOPPED +* or OPERATING. +*/ +if (order_code !=SIGP_INITIAL_CPU_RESET && + order_code !=SIGP_CPU_RESET ) { +/* +* Lockless check. Both SIGP STOP and SIGP (RE)START +* properly synchronize everything while processing +* their orders, while the guest cannot observe a +* difference when issuing other orders from two +* different VCPUs. +*/ +if (kvm_s390_is_stop_irq_pending (dst_vcpu) || +kvm_s390_is_restart_irq_pending (dst_vcpu)) +return SIGP_CC_BUSY ; + } +switch (order_code) {case SIGP_SENSE : vcpu->stat.instruction_sigp_sense++;
arch/x86/events/core.c +11 -6
@@ -2762,10 +2762,11 @@ static bool perf_hw_regs(struct pt_regs *regs)void perf_callchain_kernel (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();struct unwind_state state;unsigned long addr; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +if (guest_cbs && guest_cbs->is_in_guest ()) {/* TODO: We don't support guest os callchain now */ return ; }
@@ -2865,10 +2866,11 @@ perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry_ctx *entvoid perf_callchain_user (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();struct stack_frame frame;const struct stack_frame __user *fp; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { +if (guest_cbs && guest_cbs->is_in_guest ()) {/* TODO: We don't support guest os callchain now */ return ; }
@@ -2945,18 +2947,21 @@ static unsigned long code_segment_base(struct pt_regs *regs)unsigned long perf_instruction_pointer (struct pt_regs *regs) { -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) -return perf_guest_cbs->get_guest_ip (); +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs (); + +if (guest_cbs && guest_cbs->is_in_guest ()) +return guest_cbs->get_guest_ip ();return regs->ip +code_segment_base (regs); }unsigned long perf_misc_flags (struct pt_regs *regs) { +struct perf_guest_info_callbacks *guest_cbs =perf_get_guest_cbs ();int misc =0 ; -if (perf_guest_cbs && perf_guest_cbs->is_in_guest ()) { -if (perf_guest_cbs->is_user_mode ()) +if (guest_cbs && guest_cbs->is_in_guest ()) { +if (guest_cbs->is_user_mode ()) misc |=PERF_RECORD_MISC_GUEST_USER ;else misc |=PERF_RECORD_MISC_GUEST_KERNEL ;
arch/x86/events/intel/core.c +6 -3
@@ -2788,6 +2788,7 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status) {struct perf_sample_data data;struct cpu_hw_events *cpuc =this_cpu_ptr (&cpu_hw_events); +struct perf_guest_info_callbacks *guest_cbs;int bit;int handled =0 ;u64 intel_ctrl =hybrid (cpuc->pmu, intel_ctrl);
@@ -2854,9 +2855,11 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)*/ if (__test_and_clear_bit (GLOBAL_STATUS_TRACE_TOPAPMI_BIT , (unsigned long *)&status)) { handled++; -if (unlikely (perf_guest_cbs && perf_guest_cbs->is_in_guest () && - perf_guest_cbs->handle_intel_pt_intr)) - perf_guest_cbs->handle_intel_pt_intr (); + + guest_cbs =perf_get_guest_cbs (); +if (unlikely (guest_cbs && guest_cbs->is_in_guest () && + guest_cbs->handle_intel_pt_intr)) + guest_cbs->handle_intel_pt_intr ();else intel_pt_interrupt (); }
arch/x86/include/asm/kvm_host.h +1 -0
@@ -1509,6 +1509,7 @@ struct kvm_x86_init_ops {int (*disabled_by_bios)(void );int (*check_processor_compatibility)(void );int (*hardware_setup)(void ); +bool (*intel_pt_intr_in_guest)(void );struct kvm_x86_ops *runtime_ops; };
arch/x86/kvm/lapic.c +6 -12
@@ -676,31 +676,25 @@ static inline bool pv_eoi_enabled(struct kvm_vcpu *vcpu)static bool pv_eoi_get_pending (struct kvm_vcpu *vcpu) {u8 val; -if (pv_eoi_get_user (vcpu, &val) <0 ) { -printk (KERN_WARNING "Can't read EOI MSR value: 0x%llx\n" , - (unsigned long long )vcpu->arch.pv_eoi.msr_val); +if (pv_eoi_get_user (vcpu, &val) <0 )return false; - } +return val &KVM_PV_EOI_ENABLED ; }static void pv_eoi_set_pending (struct kvm_vcpu *vcpu) { -if (pv_eoi_put_user (vcpu,KVM_PV_EOI_ENABLED ) <0 ) { -printk (KERN_WARNING "Can't set EOI MSR value: 0x%llx\n" , - (unsigned long long )vcpu->arch.pv_eoi.msr_val); +if (pv_eoi_put_user (vcpu,KVM_PV_EOI_ENABLED ) <0 )return ; - } +__set_bit (KVM_APIC_PV_EOI_PENDING , &vcpu->arch.apic_attention); }static void pv_eoi_clr_pending (struct kvm_vcpu *vcpu) { -if (pv_eoi_put_user (vcpu,KVM_PV_EOI_DISABLED ) <0 ) { -printk (KERN_WARNING "Can't clear EOI MSR value: 0x%llx\n" , - (unsigned long long )vcpu->arch.pv_eoi.msr_val); +if (pv_eoi_put_user (vcpu,KVM_PV_EOI_DISABLED ) <0 )return ; - } +__clear_bit (KVM_APIC_PV_EOI_PENDING , &vcpu->arch.apic_attention); }
arch/x86/kvm/vmx/vmx.c +1 -0
@@ -7899,6 +7899,7 @@ static struct kvm_x86_init_ops vmx_init_ops __initdata = { .disabled_by_bios = vmx_disabled_by_bios, .check_processor_compatibility = vmx_check_processor_compat, .hardware_setup = hardware_setup, + .intel_pt_intr_in_guest = vmx_pt_mode_is_host_guest, .runtime_ops = &vmx_x86_ops, };
arch/x86/kvm/x86.c +9 -5
@@ -1323,7 +1323,7 @@ static const u32 msrs_to_save_all[] = {MSR_IA32_UMWAIT_CONTROL ,MSR_ARCH_PERFMON_FIXED_CTR0 ,MSR_ARCH_PERFMON_FIXED_CTR1 , -MSR_ARCH_PERFMON_FIXED_CTR0 +2 ,MSR_ARCH_PERFMON_FIXED_CTR0 +3 , +MSR_ARCH_PERFMON_FIXED_CTR0 +2 ,MSR_CORE_PERF_FIXED_CTR_CTRL ,MSR_CORE_PERF_GLOBAL_STATUS ,MSR_CORE_PERF_GLOBAL_CTRL ,MSR_CORE_PERF_GLOBAL_OVF_CTRL , MSR_ARCH_PERFMON_PERFCTR0, MSR_ARCH_PERFMON_PERFCTR1,
@@ -8430,7 +8430,7 @@ static struct perf_guest_info_callbacks kvm_guest_cbs = { .is_in_guest = kvm_is_in_guest, .is_user_mode = kvm_is_user_mode, .get_guest_ip = kvm_get_guest_ip, - .handle_intel_pt_intr = kvm_handle_intel_pt_intr, + .handle_intel_pt_intr = NULL, };#ifdef CONFIG_X86_64
@@ -8551,8 +8551,6 @@ int kvm_arch_init(void *opaque)kvm_timer_init (); -perf_register_guest_info_callbacks (&kvm_guest_cbs); -if (boot_cpu_has (X86_FEATURE_XSAVE )) { host_xcr0 =xgetbv (XCR_XFEATURE_ENABLED_MASK ); supported_xcr0 = host_xcr0 &KVM_SUPPORTED_XCR0 ;
@@ -8586,7 +8584,6 @@ void kvm_arch_exit(void)clear_hv_tscchange_cb ();#endif kvm_lapic_exit (); -perf_unregister_guest_info_callbacks (&kvm_guest_cbs);if (!boot_cpu_has (X86_FEATURE_CONSTANT_TSC )) cpufreq_unregister_notifier(&kvmclock_cpufreq_notifier_block,
@@ -11186,6 +11183,10 @@ int kvm_arch_hardware_setup(void *opaque)memcpy (&kvm_x86_ops, ops->runtime_ops,sizeof (kvm_x86_ops));kvm_ops_static_call_update (); +if (ops->intel_pt_intr_in_guest && ops->intel_pt_intr_in_guest ()) + kvm_guest_cbs.handle_intel_pt_intr = kvm_handle_intel_pt_intr; +perf_register_guest_info_callbacks (&kvm_guest_cbs); +if (!kvm_cpu_cap_has (X86_FEATURE_XSAVES )) supported_xss =0 ;
@@ -11213,6 +11214,9 @@ int kvm_arch_hardware_setup(void *opaque)void kvm_arch_hardware_unsetup (void ) { +perf_unregister_guest_info_callbacks (&kvm_guest_cbs); + kvm_guest_cbs.handle_intel_pt_intr =NULL ; +static_call (kvm_x86_hardware_unsetup)(); }
drivers/base/devtmpfs.c +7 -0
@@ -59,8 +59,15 @@ static struct dentry *public_dev_mount(struct file_system_type *fs_type, int fla const char *dev_name, void *data) { struct super_block *s = mnt->mnt_sb; +int err; +atomic_inc (&s->s_active);down_write (&s->s_umount); + err =reconfigure_single (s, flags, data); +if (err <0 ) { +deactivate_locked_super (s); +return ERR_PTR (err); + }return dget (s->s_root); }
drivers/firmware/qemu_fw_cfg.c +8 -12
@@ -388,9 +388,7 @@ static void fw_cfg_sysfs_cache_cleanup(void)struct fw_cfg_sysfs_entry *entry, *next;list_for_each_entry_safe (entry, next, &fw_cfg_entry_cache, list) { -/* will end up invoking fw_cfg_sysfs_cache_delist() -* via each object's release() method (i.e. destructor) -*/ +fw_cfg_sysfs_cache_delist (entry);kobject_put (&entry->kobj); } }
@@ -448,7 +446,6 @@ static void fw_cfg_sysfs_release_entry(struct kobject *kobj) {struct fw_cfg_sysfs_entry *entry =to_entry (kobj); -fw_cfg_sysfs_cache_delist (entry);kfree (entry); }
@@ -601,20 +598,18 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)/* set file entry information */ entry->size =be32_to_cpu (f->size); entry->select =be16_to_cpu (f->select); -memcpy (entry->name, f->name,FW_CFG_MAX_FILE_PATH ); +strscpy (entry->name, f->name,FW_CFG_MAX_FILE_PATH );/* register entry under "/sys/firmware/qemu_fw_cfg/by_key/" */ err =kobject_init_and_add (&entry->kobj, &fw_cfg_sysfs_entry_ktype, fw_cfg_sel_ko,"%d" , entry->select); -if (err) { -kobject_put (&entry->kobj); -return err; - } +if (err) + goto err_put_entry;/* add raw binary content access */ err =sysfs_create_bin_file (&entry->kobj, &fw_cfg_sysfs_attr_raw);if (err) - goto err_add_raw; + goto err_del_entry;/* try adding "/sys/firmware/qemu_fw_cfg/by_name/" symlink */ fw_cfg_build_symlink (fw_cfg_fname_kset, &entry->kobj, entry->name);
@@ -623,9 +618,10 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)fw_cfg_sysfs_cache_enlist (entry);return 0 ; -err_add_raw: +err_del_entry:kobject_del (&entry->kobj); -kfree (entry); +err_put_entry: +kobject_put (&entry->kobj);return err; }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
@@ -5604,6 +5604,7 @@ static void update_dsc_caps(struct amdgpu_dm_connector *aconnector, struct dsc_dec_dpcd_caps *dsc_caps) { stream->timing.flags.DSC =0 ; + dsc_caps->is_dsc_supported = false;if (aconnector->dc_link && sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT ) { dc_dsc_parse_dsc_dpcd(aconnector->dc_link->ctx->dc,
drivers/media/usb/uvc/uvc_video.c +4 -0
@@ -1963,6 +1963,10 @@ static int uvc_video_start_transfer(struct uvc_streaming *stream,if (ep ==NULL )return -EIO ; +/* Reject broken descriptors. */ +if (usb_endpoint_maxp (&ep->desc) ==0 ) +return -EIO ; + ret =uvc_init_video_bulk (stream, ep, gfp_flags); }
drivers/mtd/chips/Kconfig +2 -0
@@ -55,12 +55,14 @@ choice LITTLE_ENDIAN_BYTE, if the bytes are reversed. config MTD_CFI_NOSWAP + depends on !ARCH_IXP4XX || CPU_BIG_ENDIAN bool "NO" config MTD_CFI_BE_BYTE_SWAP bool "BIG_ENDIAN_BYTE" config MTD_CFI_LE_BYTE_SWAP + depends on !ARCH_IXP4XX bool "LITTLE_ENDIAN_BYTE" endchoice
drivers/mtd/maps/Kconfig +1 -1
@@ -302,7 +302,7 @@ config MTD_DC21285 config MTD_IXP4XX tristate "CFI Flash device mapped on Intel IXP4xx based systems" - depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX + depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX && MTD_CFI_ADV_OPTIONS help This enables MTD access to flash devices on platforms based on Intel's IXP4xx family of network processors such as the
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c +1 -0
@@ -1000,6 +1000,7 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)_initpabias (hw);rtl92c_dm_init (hw); exit: +local_irq_disable ();local_irq_restore (flags);return err; }
drivers/remoteproc/qcom_pil_info.c +1 -1
@@ -104,7 +104,7 @@ int qcom_pil_info_store(const char *image, phys_addr_t base, size_t size)return -ENOMEM ; found_unused: -memcpy_toio (entry, image,PIL_RELOC_NAME_LEN ); +memcpy_toio (entry, image,strnlen (image,PIL_RELOC_NAME_LEN )); found_existing:/* Use two writel() as base is only aligned to 4 bytes on odd entries */ writel (base, entry +PIL_RELOC_NAME_LEN );
drivers/remoteproc/qcom_q6v5_pas.c +1 -0
@@ -661,6 +661,7 @@ static const struct adsp_data sm8350_cdsp_resource = { }, .proxy_pd_names = (char*[]){"cx" , +"mxc" ,NULL }, .ssr_name = "cdsp",
drivers/video/fbdev/vga16fb.c +24 -0
@@ -184,6 +184,25 @@ static inline void setindex(int index)vga_io_w (VGA_GFX_I , index); } +/* Check if the video mode is supported by the driver */ +static inline int check_mode_supported (void ) +{ +/* non-x86 architectures treat orig_video_isVGA as a boolean flag */ +#if defined(CONFIG_X86 ) +/* only EGA and VGA in 16 color graphic mode are supported */ +if (screen_info.orig_video_isVGA !=VIDEO_TYPE_EGAC && + screen_info.orig_video_isVGA !=VIDEO_TYPE_VGAC ) +return -ENODEV ; + +if (screen_info.orig_video_mode !=0x0D &&/* 320x200/4 (EGA) */ + screen_info.orig_video_mode !=0x0E &&/* 640x200/4 (EGA) */ + screen_info.orig_video_mode !=0x10 &&/* 640x350/4 (EGA) */ + screen_info.orig_video_mode !=0x12 )/* 640x480/4 (VGA) */ +return -ENODEV ; +#endif +return 0 ; +} +static void vga16fb_pan_var (struct fb_info *info,struct fb_var_screeninfo *var) {
@@ -1422,6 +1441,11 @@ static int __init vga16fb_init(void)vga16fb_setup (option);#endif + + ret =check_mode_supported (); +if (ret) +return ret; + ret =platform_driver_register (&vga16fb_driver);if (!ret) {
fs/9p/vfs_inode_dotl.c +20 -9
@@ -553,7 +553,10 @@ int v9fs_vfs_setattr_dotl(struct user_namespace *mnt_userns, {int retval, use_dentry =0 ;struct p9_fid *fid =NULL ; -struct p9_iattr_dotl p9attr; +struct p9_iattr_dotl p9attr = { + .uid =INVALID_UID , + .gid =INVALID_GID , + };struct inode *inode =d_inode (dentry);p9_debug (P9_DEBUG_VFS ,"\n" );
@@ -563,14 +566,22 @@ int v9fs_vfs_setattr_dotl(struct user_namespace *mnt_userns,return retval; p9attr.valid =v9fs_mapped_iattr_valid (iattr->ia_valid); - p9attr.mode = iattr->ia_mode; - p9attr.uid = iattr->ia_uid; - p9attr.gid = iattr->ia_gid; - p9attr.size = iattr->ia_size; - p9attr.atime_sec = iattr->ia_atime.tv_sec; - p9attr.atime_nsec = iattr->ia_atime.tv_nsec; - p9attr.mtime_sec = iattr->ia_mtime.tv_sec; - p9attr.mtime_nsec = iattr->ia_mtime.tv_nsec; +if (iattr->ia_valid &ATTR_MODE ) + p9attr.mode = iattr->ia_mode; +if (iattr->ia_valid &ATTR_UID ) + p9attr.uid = iattr->ia_uid; +if (iattr->ia_valid &ATTR_GID ) + p9attr.gid = iattr->ia_gid; +if (iattr->ia_valid &ATTR_SIZE ) + p9attr.size = iattr->ia_size; +if (iattr->ia_valid &ATTR_ATIME_SET ) { + p9attr.atime_sec = iattr->ia_atime.tv_sec; + p9attr.atime_nsec = iattr->ia_atime.tv_nsec; + } +if (iattr->ia_valid &ATTR_MTIME_SET ) { + p9attr.mtime_sec = iattr->ia_mtime.tv_sec; + p9attr.mtime_nsec = iattr->ia_mtime.tv_nsec; + }if (iattr->ia_valid &ATTR_FILE ) { fid = iattr->ia_file->private_data;
fs/fs_context.c +1 -1
@@ -548,7 +548,7 @@ static int legacy_parse_param(struct fs_context *fc, struct fs_parameter *param) param->key); } -if (len >PAGE_SIZE -2 - size) +if (size + len +2 >PAGE_SIZE )return invalf (fc,"VFS: Legacy: Cumulative options too large" ); if (strchr(param->key, ',') || (param->type == fs_value_is_string &&
fs/orangefs/orangefs-bufmap.c +3 -4
@@ -176,7 +176,7 @@ orangefs_bufmap_free(struct orangefs_bufmap *bufmap) {kfree (bufmap->page_array);kfree (bufmap->desc_array); -kfree (bufmap->buffer_index_array); +bitmap_free (bufmap->buffer_index_array);kfree (bufmap); }
@@ -226,8 +226,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc) bufmap->desc_size = user_desc->size; bufmap->desc_shift =ilog2 (bufmap->desc_size); - bufmap->buffer_index_array = -kzalloc (DIV_ROUND_UP (bufmap->desc_count,BITS_PER_LONG ),GFP_KERNEL ); + bufmap->buffer_index_array =bitmap_zalloc (bufmap->desc_count,GFP_KERNEL );if (!bufmap->buffer_index_array) goto out_free_bufmap;
@@ -250,7 +249,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc) out_free_desc_array:kfree (bufmap->desc_array); out_free_index_array: -kfree (bufmap->buffer_index_array); +bitmap_free (bufmap->buffer_index_array); out_free_bufmap:kfree (bufmap); out:
fs/super.c +2 -2
@@ -1421,8 +1421,8 @@ struct dentry *mount_nodev(struct file_system_type *fs_type, }EXPORT_SYMBOL (mount_nodev); -static int reconfigure_single (struct super_block *s, -int flags,void *data) +int reconfigure_single (struct super_block *s, +int flags,void *data) {struct fs_context *fc;int ret;
include/linux/fs_context.h +2 -0
@@ -142,6 +142,8 @@ extern void put_fs_context(struct fs_context *fc);extern int vfs_parse_fs_param_source (struct fs_context *fc,struct fs_parameter *param);extern void fc_drop_locked (struct fs_context *fc); +int reconfigure_single (struct super_block *s, +int flags,void *data);/* * sget() wrappers to be called from the ->get_tree() op.
include/linux/perf_event.h +12 -1
@@ -1239,7 +1239,18 @@ extern void perf_event_bpf_event(struct bpf_prog *prog,enum perf_bpf_event_type type, u16 flags); -extern struct perf_guest_info_callbacks *perf_guest_cbs; +extern struct perf_guest_info_callbacks __rcu *perf_guest_cbs; +static inline struct perf_guest_info_callbacks *perf_get_guest_cbs (void ) +{ +/* +* Callbacks are RCU-protected and must be READ_ONCE to avoid reloading +* the callbacks between a !NULL check and dereferences, to ensure +* pending stores/changes to the callback pointers are visible before a +* non-NULL perf_guest_cbs is visible to readers, and to prevent a +* module from unloading callbacks while readers are active. +*/ +return rcu_dereference (perf_guest_cbs); +}extern int perf_register_guest_info_callbacks (struct perf_guest_info_callbacks *callbacks);extern int perf_unregister_guest_info_callbacks (struct perf_guest_info_callbacks *callbacks);
kernel/events/core.c +10 -3
@@ -6526,18 +6526,25 @@ static void perf_pending_event(struct irq_work *entry)* Later on, we might change it to a list if there is * another virtualization implementation supporting the callbacks. */ -struct perf_guest_info_callbacks *perf_guest_cbs; +struct perf_guest_info_callbacks __rcu *perf_guest_cbs;int perf_register_guest_info_callbacks (struct perf_guest_info_callbacks *cbs) { - perf_guest_cbs = cbs; +if (WARN_ON_ONCE (rcu_access_pointer (perf_guest_cbs))) +return -EBUSY ; + +rcu_assign_pointer (perf_guest_cbs, cbs);return 0 ; }EXPORT_SYMBOL_GPL (perf_register_guest_info_callbacks);int perf_unregister_guest_info_callbacks (struct perf_guest_info_callbacks *cbs) { - perf_guest_cbs =NULL ; +if (WARN_ON_ONCE (rcu_access_pointer (perf_guest_cbs) != cbs)) +return -EINVAL ; + +rcu_assign_pointer (perf_guest_cbs,NULL ); +synchronize_rcu ();return 0 ; }EXPORT_SYMBOL_GPL (perf_unregister_guest_info_callbacks);
sound/pci/hda/hda_tegra.c +34 -9
88 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +49 -3
105 lines not on this page · raw message
tools/perf/ui/browsers/annotate.c +14 -9
@@ -966,6 +966,7 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel, .opts = opts, };int ret =-1 , err; +int not_annotated =list_empty (¬es->src->source);if (sym ==NULL )return -1 ;
@@ -973,13 +974,15 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel,if (ms->map->dso->annotate_warned)return -1 ; - err =symbol__annotate2 (ms, evsel, opts, &browser.arch); -if (err) { -char msg[BUFSIZ ]; - ms->map->dso->annotate_warned = true; -symbol__strerror_disassemble (ms, err, msg,sizeof (msg)); -ui__error ("Couldn't annotate %s:\n%s" , sym->name, msg); - goto out_free_offsets; +if (not_annotated) { + err =symbol__annotate2 (ms, evsel, opts, &browser.arch); +if (err) { +char msg[BUFSIZ ]; + ms->map->dso->annotate_warned = true; +symbol__strerror_disassemble (ms, err, msg,sizeof (msg)); +ui__error ("Couldn't annotate %s:\n%s" , sym->name, msg); + goto out_free_offsets; + } }ui_helpline__push ("Press ESC to exit" );
@@ -994,9 +997,11 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel, ret =annotate_browser__run (&browser, evsel, hbt); -annotated_source__purge (notes->src); +if (not_annotated) +annotated_source__purge (notes->src); out_free_offsets: -zfree (¬es->offsets); +if (not_annotated) +zfree (¬es->offsets);return ret; }