perf/amd/ibs: Use interrupt regs ip for stack unwinding
stable inclusion from stable-v5.10.121 commit 779d41c80b10043cfb6d2cd70a7b45c4e5ac883c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=779d41c80b10043cfb6d2cd70a7b45c4e5ac883c -------------------------------- [ Upstream commit 3d47083b ] 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: ee9f8fce ("x86/unwind: Add the ORC unwinder") Reported-by: NDmitry Monakhov <dmtrmonakhov@yandex-team.ru> Suggested-by: NPeter Zijlstra <peterz@infradead.org> Signed-off-by: NRavi Bangoria <ravi.bangoria@amd.com> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20220429051441.14251-1-ravi.bangoria@amd.comSigned-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录