linux-stable/arch
Ravi Bangoria 3d75e58eca perf/amd/ibs: Use interrupt regs ip for stack unwinding
[ Upstream commit 3d47083b9f ]

IbsOpRip is recorded when IBS interrupt is triggered. But there is
a skid from the time IBS interrupt gets triggered to the time the
interrupt is presented to the core. Meanwhile processor would have
moved ahead and thus IbsOpRip will be inconsistent with rsp and rbp
recorded as part of the interrupt regs. This causes issues while
unwinding stack using the ORC unwinder as it needs consistent rip,
rsp and rbp. Fix this by using rip from interrupt regs instead of
IbsOpRip for stack unwinding.

Fixes: ee9f8fce99 ("x86/unwind: Add the ORC unwinder")
Reported-by: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220429051441.14251-1-ravi.bangoria@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:25:49 +02:00
..
alpha alpha: fix alloc_zeroed_user_highpage_movable() 2022-06-09 10:25:34 +02:00
arc ARC: entry: fix syscall_trace_exit argument 2022-04-27 14:41:15 +02:00
arm signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:25:41 +02:00
arm64 arm64: stackleak: fix current_top_of_stack() 2022-06-09 10:25:48 +02:00
csky uaccess: fix type mismatch warnings from access_ok() 2022-04-08 13:58:44 +02:00
h8300 bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
hexagon uaccess: fix integer overflow on access_ok() 2022-03-28 10:03:21 +02:00
ia64 ia64: define get_cycles macro for arch-override 2022-05-30 09:27:13 +02:00
m68k signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:25:41 +02:00
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-08 13:57:49 +02:00
mips mips: use fallback for random_get_entropy() instead of just c0 random 2022-05-30 09:27:14 +02:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 10:03:22 +02:00
nios2 nios2: use fallback for random_get_entropy() instead of zero 2022-05-30 09:27:14 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-09 10:25:28 +02:00
parisc parisc/stifb: Implement fb_is_primary_device() 2022-06-09 10:25:12 +02:00
powerpc powerpc/iommu: Add missing of_node_put in iommu_init_early_dart 2022-06-09 10:25:35 +02:00
riscv riscv: Move alternative length validation into subsection 2022-06-09 10:25:13 +02:00
s390 s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES 2022-06-09 10:25:25 +02:00
sh bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
sparc signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:25:41 +02:00
um ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP 2022-06-09 10:25:16 +02:00
x86 perf/amd/ibs: Use interrupt regs ip for stack unwinding 2022-06-09 10:25:49 +02:00
xtensa xtensa: move trace_hardirqs_off call back to entry.S 2022-06-09 10:25:23 +02:00
.gitignore
Kconfig stack: Constrain and fix stack offset randomization with Clang builds 2022-04-08 13:57:34 +02:00