Linux 5.10.41
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.41 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 | 2 - arch/x86/kvm/svm/svm.c | 6 ++--- arch/x86/kvm/vmx/vmx.c | 6 ++--- arch/x86/kvm/x86.c | 9 +++++++ include/linux/context_tracking.h | 25 +++++++++++++++++---- include/net/nfc/nci_core.h | 1 kernel/bpf/verifier.c | 46 +++++++++++++++++++++++---------------- net/nfc/nci/core.c | 1 net/nfc/nci/hci.c | 5 ++++ tools/perf/util/unwind-libdw.c | 35 ++++++++++++++++++++++++++--- 10 files changed, 103 insertions(+), 33 deletions(-)
Daniel Borkmann (3):
bpf: Wrap aux data inside bpf_sanitize_info container
bpf: Fix mask direction swap upon off reg sign change
bpf: No need to simulate speculative domain for immediates
Dave Rigby (1):
perf unwind: Set userdata for all __report_module() paths
Dongliang Mu (1):
NFC: nci: fix memory leak in nci_allocate_device
Greg Kroah-Hartman (1):
Linux 5.10.41
Jan Kratochvil (1):
perf unwind: Fix separate debug info files when using elfutils' libdw's unwinder
Wanpeng Li (3):
context_tracking: Move guest exit context tracking to separate helpers
context_tracking: Move guest exit vtime accounting to separate helpers
KVM: x86: Defer vtime accounting 'til after IRQ handling
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 40 +SUBLEVEL = 41 EXTRAVERSION = NAME = Dare mighty things
arch/x86/kvm/svm/svm.c +3 -3
@@ -3532,15 +3532,15 @@ static noinstr void svm_vcpu_enter_exit(struct kvm_vcpu *vcpu,* have them in state 'on' as recorded before entering guest mode. * Same as enter_from_user_mode(). * -* guest_exit_irqoff() restores host context and reinstates RCU if -* enabled and required. +* context_tracking_guest_exit() restores host context and reinstates +* RCU if enabled and required. * * This needs to be done before the below as native_read_msr() * contains a tracepoint and x86_spec_ctrl_restore_host() calls * into world and some more. */ lockdep_hardirqs_off (CALLER_ADDR0 ); -guest_exit_irqoff (); +context_tracking_guest_exit ();instrumentation_begin ();trace_hardirqs_off_finish ();
arch/x86/kvm/vmx/vmx.c +3 -3
@@ -6640,15 +6640,15 @@ static noinstr void vmx_vcpu_enter_exit(struct kvm_vcpu *vcpu,* have them in state 'on' as recorded before entering guest mode. * Same as enter_from_user_mode(). * -* guest_exit_irqoff() restores host context and reinstates RCU if -* enabled and required. +* context_tracking_guest_exit() restores host context and reinstates +* RCU if enabled and required. * * This needs to be done before the below as native_read_msr() * contains a tracepoint and x86_spec_ctrl_restore_host() calls * into world and some more. */ lockdep_hardirqs_off (CALLER_ADDR0 ); -guest_exit_irqoff (); +context_tracking_guest_exit ();instrumentation_begin ();trace_hardirqs_off_finish ();
arch/x86/kvm/x86.c +9 -0
@@ -9063,6 +9063,15 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)local_irq_disable ();kvm_after_interrupt (vcpu); +/* +* Wait until after servicing IRQs to account guest time so that any +* ticks that occurred while running the guest are properly accounted +* to the guest. Waiting until IRQs are enabled degrades the accuracy +* of accounting via context tracking, but the loss of accuracy is +* acceptable for all known use cases. +*/ +vtime_account_guest_exit (); +if (lapic_in_kernel (vcpu)) {s64 delta = vcpu->arch.apic->lapic_timer.advance_expire_delta;if (delta !=S64_MIN ) {
include/linux/context_tracking.h +21 -4
@@ -129,16 +129,26 @@ static __always_inline void guest_enter_irqoff(void) } } -static __always_inline void guest_exit_irqoff(void) +static __always_inline void context_tracking_guest_exit(void) {if (context_tracking_enabled ())__context_tracking_exit (CONTEXT_GUEST ); +} -instrumentation_begin (); +static __always_inline void vtime_account_guest_exit(void) +{if (vtime_accounting_enabled_this_cpu ())vtime_guest_exit (current);else current->flags &= ~PF_VCPU ; +} + +static __always_inline void guest_exit_irqoff(void) +{ +context_tracking_guest_exit (); + +instrumentation_begin (); +vtime_account_guest_exit ();instrumentation_end (); }
@@ -157,12 +167,19 @@ static __always_inline void guest_enter_irqoff(void)instrumentation_end (); } +static __always_inline void context_tracking_guest_exit(void) { } + +static __always_inline void vtime_account_guest_exit(void) +{ +vtime_account_kernel (current); + current->flags &= ~PF_VCPU ; +} + static __always_inline void guest_exit_irqoff(void) {instrumentation_begin ();/* Flush the guest cputime we spent on the guest */ -vtime_account_kernel (current); - current->flags &= ~PF_VCPU ; +vtime_account_guest_exit ();instrumentation_end (); }#endif /* CONFIG_VIRT_CPU_ACCOUNTING_GEN */
include/net/nfc/nci_core.h +1 -0
@@ -298,6 +298,7 @@ int nci_nfcc_loopback(struct nci_dev *ndev, void *data, size_t data_len, struct sk_buff **resp);struct nci_hci_dev *nci_hci_allocate (struct nci_dev *ndev); +void nci_hci_deallocate (struct nci_dev *ndev);int nci_hci_send_event (struct nci_dev *ndev,u8 gate,u8 event,const u8 *param,size_t param_len); int nci_hci_send_cmd(struct nci_dev *ndev, u8 gate,
kernel/bpf/verifier.c +28 -18
105 lines not on this page · raw message
net/nfc/nci/core.c +1 -0
@@ -1175,6 +1175,7 @@ EXPORT_SYMBOL(nci_allocate_device);void nci_free_device (struct nci_dev *ndev) {nfc_free_device (ndev->nfc_dev); +nci_hci_deallocate (ndev);kfree (ndev); }EXPORT_SYMBOL (nci_free_device);
net/nfc/nci/hci.c +5 -0
@@ -795,3 +795,8 @@ struct nci_hci_dev *nci_hci_allocate(struct nci_dev *ndev)return hdev; } + +void nci_hci_deallocate (struct nci_dev *ndev) +{ +kfree (ndev->hci_dev); +}
tools/perf/util/unwind-libdw.c +31 -4
@@ -20,10 +20,24 @@static char *debuginfo_path; +static int __find_debuginfo (Dwfl_Module *mod__maybe_unused ,void **userdata, +const char *modname__maybe_unused ,Dwarf_Addr base__maybe_unused , +const char *file_name,const char *debuglink_file__maybe_unused , +GElf_Word debuglink_crc__maybe_unused ,char **debuginfo_file_name) +{ +const struct dso *dso = *userdata; + +assert (dso); +if (dso->symsrc_filename &&strcmp (file_name, dso->symsrc_filename)) + *debuginfo_file_name =strdup (dso->symsrc_filename); +return -1 ; +} +static const Dwfl_Callbacks offline_callbacks = { - .find_debuginfo = dwfl_standard_find_debuginfo, + .find_debuginfo = __find_debuginfo, .debuginfo_path = &debuginfo_path, .section_address = dwfl_offline_section_address, +// .find_elf is not set as we use dwfl_report_elf() instead. }; static int __report_module(struct addr_location *al, u64 ip,
@@ -53,9 +67,22 @@ static int __report_module(struct addr_location *al, u64 ip, }if (!mod) - mod =dwfl_report_elf (ui->dwfl, dso->short_name, - (dso->symsrc_filename ? dso->symsrc_filename : dso->long_name),-1 , al->map->start - al->map->pgoff, - false); + mod =dwfl_report_elf (ui->dwfl, dso->short_name, dso->long_name,-1 , + al->map->start - al->map->pgoff, false); +if (!mod) { +char filename[PATH_MAX ]; + +if (dso__build_id_filename (dso, filename,sizeof (filename), false)) + mod =dwfl_report_elf (ui->dwfl, dso->short_name, filename,-1 , + al->map->start - al->map->pgoff, false); + } + +if (mod) { +void **userdatap; + +dwfl_module_info (mod, &userdatap,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ); + *userdatap = dso; + }return mod &&dwfl_addrmodule (ui->dwfl, ip) == mod ?0 :-1 ; }