Skip to content

Commit 9702970

Browse files
committed
Revert "ARM64: unwind: Fix PC calculation"
This reverts commit e306dfd. With this patch applied, we were the only architecture making this sort of adjustment to the PC calculation in the unwinder. This causes problems for ftrace, where the PC values are matched against the contents of the stack frames in the callchain and fail to match any records after the address adjustment. Whilst there has been some effort to change ftrace to workaround this, those patches are not yet ready for mainline and, since we're the odd architecture in this regard, let's just step in line with other architectures (like arch/arm/) for now. Cc: <stable@vger.kernel.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent e13d918 commit 9702970

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

arch/arm64/kernel/stacktrace.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ int notrace unwind_frame(struct stackframe *frame)
4848

4949
frame->sp = fp + 0x10;
5050
frame->fp = *(unsigned long *)(fp);
51-
/*
52-
* -4 here because we care about the PC at time of bl,
53-
* not where the return will go.
54-
*/
55-
frame->pc = *(unsigned long *)(fp + 8) - 4;
51+
frame->pc = *(unsigned long *)(fp + 8);
5652

5753
return 0;
5854
}

0 commit comments

Comments
 (0)