git: 88092966381c - stable/15 - dtrace/arm: Really trap translation faults
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 22 Oct 2026 17:31:51 UTC
The branch stable/15 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=88092966381c760a5e36cdaead4347250d36251e
commit 88092966381c760a5e36cdaead4347250d36251e
Author: Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2026-09-03 13:52:24 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-10-22 15:45:40 +0000
dtrace/arm: Really trap translation faults
Fix the constant case label to properly handle translation faults
caused by DTrace probes. Alignment errors are not expected to be
generated, so stop handling them.
While at it, correct an amd64-specific comment and add a comment
regarding the missing faulting address which could be addressed by a
later improvement.
PR: 298064
MFC after: 1 month
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D59281
(cherry picked from commit 00678f5e5c08ec7949e2f57d78faeaf266a0f17a)
---
sys/cddl/dev/dtrace/arm/dtrace_subr.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/sys/cddl/dev/dtrace/arm/dtrace_subr.c b/sys/cddl/dev/dtrace/arm/dtrace_subr.c
index 10e9281709b6..2cf308fb9f77 100644
--- a/sys/cddl/dev/dtrace/arm/dtrace_subr.c
+++ b/sys/cddl/dev/dtrace/arm/dtrace_subr.c
@@ -166,7 +166,7 @@ dtrace_gethrestime(void)
return (current_time.tv_sec * 1000000000UL + current_time.tv_nsec);
}
-/* Function to handle DTrace traps during probes. See amd64/amd64/trap.c */
+/* Function to handle DTrace traps during probes. See arm/arm/trap-v6.c */
int
dtrace_trap(struct trapframe *frame, u_int type)
{
@@ -187,8 +187,12 @@ dtrace_trap(struct trapframe *frame, u_int type)
*/
switch (type) {
/* Page fault. */
- case FAULT_ALIGN:
+ case FAULT_PERM_L1:
+ case FAULT_PERM_L2:
+ case FAULT_TRAN_L1:
+ case FAULT_TRAN_L2:
/* Flag a bad address. */
+ /* XXX FAR is missing from the trapframe */
cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR;
cpu_core[curcpu].cpuc_dtrace_illval = 0;