kernel_samsung_a53x/arch
Adrian Hunter 8cfe7610cd perf/x86/intel/pt: Fix sampling synchronization
commit d92792a4b26e50b96ab734cbe203d8a4c932a7a9 upstream.

pt_event_snapshot_aux() uses pt->handle_nmi to determine if tracing
needs to be stopped, however tracing can still be going because
pt->handle_nmi is set to zero before tracing is stopped in pt_event_stop,
whereas pt_event_snapshot_aux() requires that tracing must be stopped in
order to copy a sample of trace from the buffer.

Instead call pt_config_stop() always, which anyway checks config for
RTIT_CTL_TRACEEN and does nothing if it is already clear.

Note pt_event_snapshot_aux() can continue to use pt->handle_nmi to
determine if the trace needs to be restarted afterwards.

Fixes: 25e8920b301c ("perf/x86/intel/pt: Add sampling support")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20240715160712.127117-2-adrian.hunter@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:21:31 +01:00
..
alpha Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arc ARC: [plat-hsdk]: Remove misplaced interrupt-cells property 2024-11-19 11:32:36 +01:00
arm ARM: versatile: fix OF node leak in CPUs prepare 2024-11-23 23:21:19 +01:00
arm64 arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry 2024-11-23 23:21:08 +01:00
c6x Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
csky csky, hexagon: fix broken sys_sync_file_range 2024-11-19 14:19:34 +01:00
h8300 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hexagon hexagon: fix fadvise64_64 calling conventions 2024-11-19 14:19:34 +01:00
ia64 efi: ia64: move IA64-only declarations to new asm/efi.h header 2024-11-19 14:19:45 +01:00
m68k m68k: Fix kernel_clone_args.flags in m68k_clone() 2024-11-23 23:21:20 +01:00
microblaze microblaze: don't treat zero reserved memory regions as error 2024-11-23 23:21:14 +01:00
mips MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed 2024-11-23 23:21:06 +01:00
nds32 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nios2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
openrisc openrisc: Call setup_memory() earlier in the init sequence 2024-11-23 23:20:47 +01:00
parisc parisc: Use irq_enter_rcu() to fix warning at kernel/context_tracking.c:367 2024-11-23 23:20:46 +01:00
powerpc powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL 2024-11-23 23:21:10 +01:00
riscv riscv: Fix fp alignment bug in perf_callchain_user() 2024-11-23 23:21:26 +01:00
s390 s390/vmlinux.lds.S: Move ro_after_init section behind rodata section 2024-11-23 23:21:06 +01:00
sh Revert "sh: Handle calling csum_partial with misaligned data" 2024-11-19 12:26:56 +01:00
sparc sparc64: Fix incorrect function signature and add prototype for prom_cif_init 2024-11-23 23:20:10 +01:00
um um: line: always fill *error_out in setup_one_line() 2024-11-23 23:21:05 +01:00
x86 perf/x86/intel/pt: Fix sampling synchronization 2024-11-23 23:21:31 +01:00
xtensa Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-11-19 11:32:38 +01:00