Module Name: src Committed By: riastradh Date: Wed Feb 12 01:09:27 UTC 2020
Modified Files: src/external/cddl/osnet/dev/fbt/aarch64: fbt_isa.c Log Message: Use db_write_bytes to overwrite kernel text. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c diff -u src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.1 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.2 --- src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.1 Tue Dec 3 22:10:56 2019 +++ src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c Wed Feb 12 01:09:27 2020 @@ -36,6 +36,9 @@ #include <sys/cpu.h> #include <sys/module.h> #include <sys/kmem.h> + +#include <ddb/ddb.h> + #include <machine/cpufunc.h> #include <sys/dtrace.h> @@ -78,8 +81,9 @@ void fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val) { - *fbt->fbtp_patchpoint = val; - cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4); + db_write_bytes((db_addr_t)fbt->fbtp_patchpoint, sizeof(val), + (const void *)&val); + cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, sizeof(val)); } #if defined(__FreeBSD__)