函数逻辑报告 |
Source Code:fs\userfaultfd.c |
Create Date:2022-07-29 10:52:30 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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
函数原型:vm_fault_t handle_userfault(struct vm_fault *vmf, unsigned long reason)
返回类型:vm_fault_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct vm_fault * | vmf | |
unsigned long | reason |
357 | ret等于VM_FAULT_SIGBUS |
372 | 如果flags按位与Getting shut down 按位或Dumped core 的值则转到:out |
387 | VM_BUG_ON(reason & ~(missing pages tracking | wrprotect pages tracking )) |
388 | VM_BUG_ON(!(reason & missing pages tracking ) ^ !!(reason & wrprotect pages tracking )) |
398 | 如果此条件成立可能性小(为编译器优化)(READ_ONCE(leased ))则 |
415 | ret等于VM_FAULT_NOPAGE |
416 | 转到:out |
429 | 如果此条件成立可能性小(为编译器优化)(!(flags & Retry fault if blocking ))则 |
444 | 转到:out |
451 | ret等于VM_FAULT_RETRY |
452 | 如果flags按位与Don't drop mmap_sem and wait when retrying 则转到:out |
463 | waken = false |
471 | spin_lock_irq( & lock) |
483 | spin_unlock_irq( & lock) |
488 | 否则must_wait等于Same functionality as userfaultfd_must_wait below with modifications for* hugepmd ranges. |
494 | 如果此条件成立可能性大(为编译器优化)(must_wait && !READ_ONCE(leased ) && (return_to_userland ? !signal_pending(当前进程) : !fatal_signal_pending(当前进程)))则 |
498 | 进程调度 |
499 | ret或等于VM_FAULT_MAJOR |
516 | 如果READ_ONCE(waken)或READ_ONCE(leased )或如果return_to_userland则signal_pending(当前进程)否则fatal_signal_pending(当前进程)则退出 |
521 | 进程调度 |
527 | 如果return_to_userland则 |
528 | 如果signal_pending(当前进程)且非fatal_signal_pending(当前进程)则 |
546 | lock for reading |
547 | ret等于VM_FAULT_NOPAGE |
564 | 如果非链表为空且不修改则 |
580 | out : |
581 | 返回:ret |
名称 | 描述 |
---|---|
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 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |