Linux 5.10.93
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.93 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.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 | 4 - 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/powerpc/include/asm/hvcall.h | 2 arch/powerpc/platforms/pseries/setup.c | 6 ++ 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/vmx/vmx.c | 1 arch/x86/kvm/x86.c | 7 +- drivers/base/devtmpfs.c | 7 ++ drivers/firmware/qemu_fw_cfg.c | 20 +++---- 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/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/patch_realtek.c | 51 ++++++++++++++++++-- 33 files changed, 266 insertions(+), 74 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()
Eric Farman (1):
KVM: s390: Clarify SIGP orders versus STOP/RESTART
Greg Kroah-Hartman (1):
Linux 5.10.93
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
Larry Finger (1):
rtlwifi: rtl8192cu: Fix WARNING when calling local_irq_restore() with interrupts enabled
Nathan Chancellor (1):
kbuild: Add $(KBUILD_HOSTLDFLAGS) to 'has_libelf' test
NeilBrown (1):
devtmpfs regression fix: reconfigure on each mount
Nicholas Piggin (1):
powerpc/pseries: Get entry and uaccess flush required bits from H_GET_CPU_CHARACTERISTICS
Sean Christopherson (2):
perf: Protect perf_guest_cbs with RCU
KVM: x86: Register Processor Trace interrupt hook iff PT enabled in guest
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 +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 92 +SUBLEVEL = 93 EXTRAVERSION = NAME = Dare mighty things
@@ -1073,7 +1073,7 @@ export mod_sign_cmd HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf) has_libelf = $(call try-run,\ - echo "int main() {}" | $(HOSTCC) -xc -o /dev/null $(HOST_LIBELF_LIBS) -,1,0) + echo "int main() {}" | $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -xc -o /dev/null $(HOST_LIBELF_LIBS) -,1,0) ifdef CONFIG_STACK_VALIDATION ifeq ($(has_libelf),1)
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/powerpc/include/asm/hvcall.h +2 -0
@@ -382,6 +382,8 @@#define H_CPU_BEHAV_BNDS_CHK_SPEC_BAR (1ull << 61) // IBM bit 2#define H_CPU_BEHAV_FLUSH_COUNT_CACHE (1ull << 58) // IBM bit 5#define H_CPU_BEHAV_FLUSH_LINK_STACK (1ull << 57) // IBM bit 6 +#define H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY (1ull << 56) // IBM bit 7 +#define H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS (1ull << 55) // IBM bit 8/* Flag values used in H_REGISTER_PROC_TBL hcall */ #define PROC_TABLE_OP_MASK 0x18
arch/powerpc/platforms/pseries/setup.c +6 -0
@@ -538,6 +538,12 @@ static void init_cpu_char_feature_flags(struct h_cpu_char_result *result)if (!(result->behaviour &H_CPU_BEHAV_L1D_FLUSH_PR ))security_ftr_clear (SEC_FTR_L1D_FLUSH_PR ); +if (result->behaviour &H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY ) +security_ftr_clear (SEC_FTR_L1D_FLUSH_ENTRY ); + +if (result->behaviour &H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS ) +security_ftr_clear (SEC_FTR_L1D_FLUSH_UACCESS ); +if (!(result->behaviour &H_CPU_BEHAV_BNDS_CHK_SPEC_BAR ))security_ftr_clear (SEC_FTR_BNDS_CHK_SPEC_BAR ); }
arch/riscv/kernel/perf_callchain.c +5 -2
@@ -60,10 +60,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;
@@ -84,8 +85,10 @@ void notrace walk_stackframe(struct task_struct *task,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
@@ -4588,10 +4588,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
@@ -2545,10 +2545,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 ; }
@@ -2648,10 +2649,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 ; }
@@ -2728,18 +2730,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
@@ -2586,6 +2586,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 ;
@@ -2651,9 +2652,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
@@ -1306,6 +1306,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/vmx/vmx.c +1 -0
@@ -7915,6 +7915,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 +5 -2
@@ -1229,7 +1229,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,
@@ -7882,7 +7882,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
@@ -8005,6 +8005,8 @@ int kvm_arch_init(void *opaque) PT_PRESENT_MASK, 0, sme_me_mask);kvm_timer_init (); +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 (boot_cpu_has (X86_FEATURE_XSAVE )) {
@@ -8042,6 +8044,7 @@ void kvm_arch_exit(void)#endif kvm_lapic_exit ();perf_unregister_guest_info_callbacks (&kvm_guest_cbs); + kvm_guest_cbs.handle_intel_pt_intr =NULL ;if (!boot_cpu_has (X86_FEATURE_CONSTANT_TSC )) cpufreq_unregister_notifier(&kvmclock_cpufreq_notifier_block,
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/media/usb/uvc/uvc_video.c +4 -0
@@ -1915,6 +1915,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
@@ -325,7 +325,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/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
@@ -541,7 +541,10 @@ int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr) {int retval;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" );
@@ -551,14 +554,22 @@ int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr)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
@@ -530,7 +530,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
@@ -1472,8 +1472,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
@@ -140,6 +140,8 @@ extern int generic_parse_monolithic(struct fs_context *fc, void *data);extern int vfs_get_tree (struct fs_context *fc);extern void put_fs_context (struct fs_context *fc);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
@@ -1235,7 +1235,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
@@ -6395,18 +6395,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/patch_realtek.c +48 -3
98 lines not on this page · raw message