Function report | 
Source Code:fs\userfaultfd.c | 
Create Date:2022-07-28 20:20:33 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:The locking rules involved in returning VM_FAULT_RETRY depending on* FAULT_FLAG_ALLOW_RETRY, FAULT_FLAG_RETRY_NOWAIT and* FAULT_FLAG_KILLABLE are not straightforward
Proto:vm_fault_t handle_userfault(struct vm_fault *vmf, unsigned long reason)
Type:vm_fault_t
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct vm_fault * | vmf | |
| unsigned long | reason | 
| 357 | ret = VM_FAULT_SIGBUS | 
| 372 | If flags & (Getting shut down | Dumped core ) Then Go to out | 
| 387 | VM_BUG_ON(reason & ~(missing pages tracking | wrprotect pages tracking )) | 
| 388 | VM_BUG_ON(!(reason & missing pages tracking ) ^ !!(reason & wrprotect pages tracking )) | 
| 390 | If atures requested from the userspace & UFFD_FEATURE_SIGBUS Then Go to out | 
| 415 | ret = VM_FAULT_NOPAGE | 
| 416 | Go to out | 
| 444 | Go to out | 
| 451 | ret = VM_FAULT_RETRY | 
| 452 | If flags & Don't drop mmap_sem and wait when retrying Then Go to out | 
| 459 | private = current process | 
| 463 | waken = false | 
| 468 | blocking_state = If return_to_userland Then TASK_INTERRUPTIBLE Else Convenience macros for the sake of set_current_state: | 
| 471 | spin_lock_irq( & lock) | 
| 483 | spin_unlock_irq( & lock) | 
| 488 | Else must_wait = Same functionality as userfaultfd_must_wait below with modifications for* hugepmd ranges. | 
| 494 | If Value is more likely to compile time(must_wait && !READ_ONCE(leased ) && (return_to_userland ? !signal_pending(current process) : !fatal_signal_pending(current process))) Then | 
| 498 | schedule() | 
| 499 | ret |= VM_FAULT_MAJOR | 
| 516 | If READ_ONCE(waken) || READ_ONCE(leased ) || If return_to_userland Then signal_pending(current process) Else fatal_signal_pending(current process) Then Break | 
| 521 | schedule() | 
| 527 | If return_to_userland Then | 
| 528 | If signal_pending(current process) && Not fatal_signal_pending(current process) Then | 
| 546 | lock for reading | 
| 547 | ret = VM_FAULT_NOPAGE | 
| 580 | out : | 
| 581 | Return ret | 
| Name | Describe | 
|---|---|
| do_anonymous_page | We enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults), and pte mapped but not yet locked.* We return with mmap_sem still held, but pte unmapped and unlocked. | 
| hugetlb_no_page | |
| __do_huge_pmd_anonymous_page | |
| do_huge_pmd_anonymous_page | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |