android_kernel_xiaomi_sm8450/arch/x86
Adrian Hunter a49321257f perf/x86/intel/pt: Fix a topa_entry base address calculation
commit ad97196379d0b8cb24ef3d5006978a6554e6467f upstream.

topa_entry->base is a bit-field. Bit-fields are not promoted to a 64-bit
type, even if the underlying type is 64-bit, and so, if necessary, must
be cast to a larger type when calculations are done.

Fix a topa_entry->base address calculation by adding a cast.

Without the cast, the address was limited to 36-bits i.e. 64GiB.

The address calculation is used on systems that do not support Multiple
Entry ToPA (only Broadwell), and affects physical addresses on or above
64GiB. Instead of writing to the correct address, the address comprising
the first 36 bits would be written to.

Intel PT snapshot and sampling modes are not affected.

Fixes: 52ca9ced3f ("perf/x86/intel/pt: Add Intel PT PMU driver")
Reported-by: Dave Hansen <dave.hansen@linux.intel.com>
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://lore.kernel.org/r/20240624201101.60186-3-adrian.hunter@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-19 05:41:01 +02:00
..
boot x86/boot: Ignore NMIs during very early boot 2024-02-23 08:42:02 +01:00
configs x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs 2022-01-27 10:54:21 +01:00
crypto crypto: x86/sha256-avx2 - add missing vzeroupper 2024-06-16 13:32:02 +02:00
entry syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-07-05 09:12:55 +02:00
events perf/x86/intel/pt: Fix a topa_entry base address calculation 2024-08-19 05:41:01 +02:00
hyperv x86/hyperv: Remove unregister syscore call from Hyper-V cleanup 2023-01-14 10:16:13 +01:00
ia32 x86: remove address space overrides using set_fs() 2020-09-08 22:21:36 -04:00
include efi/x86: Free EFI memory map only when installing a new one. 2024-07-05 09:12:56 +02:00
kernel x86/of: Return consistent error type from x86_of_pci_irq_enable() 2024-08-19 05:40:40 +02:00
kvm KVM: VMX: Split out the non-virtualization part of vmx_interrupt_blocked() 2024-08-19 05:40:58 +02:00
lib x86/retpoline: Move a NOENDBR annotation to the SRSO dummy return thunk 2024-07-18 13:05:50 +02:00
math-emu x86: Prepare asm files for straight-line-speculation 2022-07-25 11:26:28 +02:00
mm x86/mm: Remove broken vsyscall emulation code from the page fault code 2024-06-16 13:32:31 +02:00
net x86/returnthunk: Allow different return thunks 2024-03-01 13:16:49 +01:00
oprofile
pci x86/pci/xen: Fix PCIBIOS_* return code handling 2024-08-19 05:40:40 +02:00
platform x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos 2024-08-19 05:40:40 +02:00
power x86/stackprotector/32: Make the canary into a regular percpu variable 2024-04-13 12:58:45 +02:00
purgatory x86/purgatory: Switch to the position-independent small code model 2024-06-16 13:32:06 +02:00
ras
realmode x86/mm: Flush global TLB when switching to trampoline page-table 2022-01-27 10:54:14 +01:00
tools x86/boot: Ignore relocations in .notes sections in walk_relocs() too 2024-06-16 13:32:03 +02:00
um x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list 2023-03-11 16:40:11 +01:00
video
xen x86/xen: Convert comma to semicolon 2024-08-19 05:40:43 +02:00
.gitignore
Kbuild
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-05-02 16:23:44 +02:00
Kconfig.assembler
Kconfig.cpu x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 2024-02-23 08:42:28 +01:00
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-06-16 13:32:26 +02:00
Makefile x86/stackprotector/32: Make the canary into a regular percpu variable 2024-04-13 12:58:45 +02:00
Makefile_32.cpu
Makefile.um um: allow not setting extra rpaths in the linux binary 2024-03-15 10:48:18 -04:00