函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\pagewalk.c Create Date:2022-07-27 16:24:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:walk_page_mapping - walk all memory areas mapped into a struct address_space

函数原型:int walk_page_mapping(struct address_space *mapping, unsigned long first_index, unsigned long nr, const struct mm_walk_ops *ops, void *private)

返回类型:int

参数:

类型参数名称
struct address_space *mapping
unsigned longfirst_index
unsigned longnr
const struct mm_walk_ops *ops
void *private
430  struct mm_walk walk = {ops = ops, private = private, }
437  err等于0
439  lockdep_assert_held( & i_mmap_rwsem)
443  vba等于Offset (within vm_file) in PAGE_SIZEunits
444  vea等于vbavma_pages(vma)
445  cba等于first_index
446  cba等于两数取大(cba, vba)
447  cea等于first_indexnr
448  cea等于两数取小(cea, vea)
450  start_addr等于cbavba左移PAGE_SHIFT determines the page size 位的值加Our start address within vm_mm.
451  end_addr等于ceavba左移PAGE_SHIFT determines the page size 位的值加Our start address within vm_mm.
452  如果start_addr大于等于end_addr则继续下一循环
455  vma等于vma
456  mm等于The address space we belong to.
458  err等于Decide whether we really walk over the current vma on [@start, @end)* or skip it via the returned value. Return 0 if we do walk over the* current vma, and return 1 if we skip the vma. Negative values means* error, where we abort the current walk.
459  如果err大于0则
460  err等于0
461  退出
462  否则如果err小于0则退出
465  err等于__walk_page_range(start_addr, end_addr, & walk)
466  如果err退出
470  返回:err
调用者
名称描述
wp_shared_mapping_rangewp_shared_mapping_range - Write-protect all ptes in an address space range*@mapping: The address_space we want to write protect*@first_index: The first page offset in the range*@nr: Number of incremental page offsets to cover* Note: This function
clean_record_shared_mapping_rangelean_record_shared_mapping_range - Clean and record all ptes in an* address space range*@mapping: The address_space we want to clean*@first_index: The first page offset in the range*@nr: Number of incremental page offsets to cover*@bitmap_pgoff: The page