git: 9ab9e138f30e - stable/14 - dtrace/arm64: Fix enumeration of FBT return probes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Feb 2025 19:25:33 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=9ab9e138f30e9590f40cfce40f7a4075d5bbdac0
commit 9ab9e138f30e9590f40cfce40f7a4075d5bbdac0
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-01-29 02:03:02 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-02-14 19:25:19 +0000
dtrace/arm64: Fix enumeration of FBT return probes
On arm64, the FBT provider treats tail calls as return probes. Ignoring
the question of whether this is really correct, the implementation is
wrong: instr is a pointer to uint32_t, so the removed multiplication by
the instruction size is wrong. As a result, FBT would create return
probes for intra-function branches.
MFC after: 2 weeks
Sponsored by: Innovate UK
(cherry picked from commit 4da070ce6c015a994ec4ecf3d31ee94810ea19f1)
---
sys/cddl/dev/fbt/aarch64/fbt_isa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c
index 44690b97f77a..fd666770d3a2 100644
--- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c
+++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c
@@ -178,8 +178,7 @@ again:
break;
else if ((*instr & B_MASK) == B_INSTR) {
offs = (*instr & B_DATA_MASK);
- offs *= 4;
- target = (instr + offs);
+ target = instr + offs;
start = (uint32_t *)symval->value;
if (target >= limit || target < start)
break;