The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=94fb5ab9043cbe6188cf30f51f7e85739ba41503
commit 94fb5ab9043cbe6188cf30f51f7e85739ba41503 Author: Mark Johnston <ma...@freebsd.org> AuthorDate: 2025-01-29 03:11:48 +0000 Commit: Mark Johnston <ma...@freebsd.org> CommitDate: 2025-01-29 03:12:46 +0000 Revert "dtrace/arm64: Simplify dtrace_getarg() slightly" The change is clearly wrong as it removes a dereference of the pointer into the stack. Just revert for now. This reverts commit 70c067062217a5295ed321427b91cfd857c18b77. Reported by: jrtc27 --- sys/cddl/dev/dtrace/aarch64/dtrace_isa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c b/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c index 3e36004c6f0d..ff0e068006bd 100644 --- a/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c @@ -256,6 +256,7 @@ dtrace_getarg(int arg, int aframes __unused) return (tf->tf_x[arg]); } else { uintptr_t p; + uint64_t val; p = (tf->tf_sp + (arg - 8) * sizeof(uint64_t)); if ((p & 7) != 0) { @@ -268,7 +269,8 @@ dtrace_getarg(int arg, int aframes __unused) cpu_core[curcpu].cpuc_dtrace_illval = p; return (0); } - return (p); + memcpy(&val, (void *)p, sizeof(uint64_t)); + return (val); } }