Page MenuHomeFreeBSD

D38298.diff
No OneTemporary

D38298.diff

diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_asm.S b/sys/cddl/dev/dtrace/riscv/dtrace_asm.S
--- a/sys/cddl/dev/dtrace/riscv/dtrace_asm.S
+++ b/sys/cddl/dev/dtrace/riscv/dtrace_asm.S
@@ -74,7 +74,9 @@
dtrace_fuword8_nocheck(void *addr)
*/
ENTRY(dtrace_fuword8_nocheck)
+ ENTER_USER_ACCESS(t0)
lb a0, 0(a0)
+ EXIT_USER_ACCESS(t0)
RET
END(dtrace_fuword8_nocheck)
@@ -83,7 +85,9 @@
dtrace_fuword16_nocheck(void *addr)
*/
ENTRY(dtrace_fuword16_nocheck)
+ ENTER_USER_ACCESS(t0)
lh a0, 0(a0)
+ EXIT_USER_ACCESS(t0)
RET
END(dtrace_fuword16_nocheck)
@@ -92,7 +96,9 @@
dtrace_fuword32_nocheck(void *addr)
*/
ENTRY(dtrace_fuword32_nocheck)
+ ENTER_USER_ACCESS(t0)
lw a0, 0(a0)
+ EXIT_USER_ACCESS(t0)
RET
END(dtrace_fuword32_nocheck)
@@ -101,7 +107,9 @@
dtrace_fuword64_nocheck(void *addr)
*/
ENTRY(dtrace_fuword64_nocheck)
+ ENTER_USER_ACCESS(t0)
ld a0, 0(a0)
+ EXIT_USER_ACCESS(t0)
RET
END(dtrace_fuword64_nocheck)
@@ -111,6 +119,7 @@
*/
ENTRY(dtrace_copy)
beqz a2, 2f /* If len == 0 then skip loop */
+ ENTER_USER_ACCESS(t0)
1:
lb a4, 0(a0) /* Load from uaddr */
addi a0, a0, 1
@@ -118,6 +127,7 @@
addi a1, a1, 1
addi a2, a2, -1 /* len-- */
bnez a2, 1b
+ EXIT_USER_ACCESS(t0)
2:
RET
END(dtrace_copy)
@@ -129,7 +139,9 @@
XXX: Check for flags?
*/
ENTRY(dtrace_copystr)
- beqz a2, 2f /* If len == 0 then skip loop */
+ beqz a2, 3f /* If len == 0 then skip loop */
+ ENTER_USER_ACCESS(t0)
+1:
lb a4, 0(a0) /* Load from uaddr */
addi a0, a0, 1
sb a4, 0(a1) /* Store in kaddr */
@@ -138,6 +150,8 @@
addi a2, a2, -1 /* len-- */
bnez a2, 1b
2:
+ EXIT_USER_ACCESS(t0)
+3:
RET
END(dtrace_copystr)

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 10:24 AM (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14509663
Default Alt Text
D38298.diff (1 KB)

Event Timeline