Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147401098
D14825.id40688.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
D14825.id40688.diff
View Options
Index: sys/vm/vm.h
===================================================================
--- sys/vm/vm.h
+++ sys/vm/vm.h
@@ -80,7 +80,9 @@
#define VM_PROT_WRITE ((vm_prot_t) 0x02)
#define VM_PROT_EXECUTE ((vm_prot_t) 0x04)
#define VM_PROT_COPY ((vm_prot_t) 0x08) /* copy-on-read */
-#define VM_PROT_FAULT_LOOKUP ((vm_prot_t) 0x010)
+#define VM_PROT_PRIV_FLAG ((vm_prot_t) 0x010)
+#define VM_PROT_FAULT_LOOKUP VM_PROT_PRIV_FLAG
+#define VM_PROT_QUICK_NOFAULT VM_PROT_PRIV_FLAG /* same to save bits */
#define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
#define VM_PROT_RW (VM_PROT_READ|VM_PROT_WRITE)
Index: sys/vm/vm_fault.c
===================================================================
--- sys/vm/vm_fault.c
+++ sys/vm/vm_fault.c
@@ -1525,6 +1525,9 @@
* mapping had insufficient permissions. Attempt to fault in
* and hold these pages.
*/
+ if ((prot & VM_PROT_QUICK_NOFAULT) != 0 &&
+ (curthread->td_pflags & TDP_NOFAULTING) != 0)
+ goto error;
for (mp = ma, va = addr; va < end; mp++, va += PAGE_SIZE)
if (*mp == NULL && vm_fault_hold(map, va, prot,
VM_FAULT_NORMAL, mp) != KERN_SUCCESS)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 11, 4:36 PM (9 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29536464
Default Alt Text
D14825.id40688.diff (1 KB)
Attached To
Mode
D14825: Allow vm_fault_quick_hold_pages() to specify that nofault mode should be honored.
Attached
Detach File
Event Timeline
Log In to Comment