Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151525101
D17063.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17063.diff
View Options
Index: head/sys/amd64/amd64/support.S
===================================================================
--- head/sys/amd64/amd64/support.S
+++ head/sys/amd64/amd64/support.S
@@ -914,6 +914,8 @@
subq %rsi,%rax
jbe cpystrflt
+ stac
+
/* restrict maxlen to <= VM_MAXUSER_ADDRESS-from */
cmpq %rdx,%rax
jae 1f
@@ -924,32 +926,20 @@
2:
decq %rdx
- jz copyinstr_toolong
+ jz copyinstr_toolong_smap
- stac
lodsb
stosb
- clac
orb %al,%al
jnz 2b
+ clac
+
copyinstr_succ:
/* Success -- 0 byte reached */
decq %rdx
xorl %eax,%eax
- jmp cpystrflt_x
-copyinstr_toolong:
- /* rdx is zero - return ENAMETOOLONG or EFAULT */
- movq $VM_MAXUSER_ADDRESS,%rax
- cmpq %rax,%rsi
- jae cpystrflt
- movq $ENAMETOOLONG,%rax
- jmp cpystrflt_x
- /* Fault entry clears PSL.AC */
-cpystrflt:
- movq $EFAULT,%rax
-
cpystrflt_x:
/* set *lencopied and return %eax */
movq PCPU(CURPCB),%rcx
@@ -962,6 +952,21 @@
1:
POP_FRAME_POINTER
ret
+ /* Fault entry clears PSL.AC */
+cpystrflt:
+ movq $EFAULT,%rax
+ jmp cpystrflt_x
+
+copyinstr_toolong_smap:
+ clac
+copyinstr_toolong:
+ /* rdx is zero - return ENAMETOOLONG or EFAULT */
+ movq $VM_MAXUSER_ADDRESS,%rax
+ cmpq %rax,%rsi
+ jae cpystrflt
+ movq $ENAMETOOLONG,%rax
+ jmp cpystrflt_x
+
END(copyinstr_smap)
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 12:39 AM (5 m, 32 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31182640
Default Alt Text
D17063.diff (1 KB)
Attached To
Mode
D17063: depessimize copyinstr_smap
Attached
Detach File
Event Timeline
Log In to Comment