函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This function is called to print an error when a bad pte* is found. For example, we might have a PFN-mapped pte in* a region that doesn't allow it.* The calling function must still handle the error.

函数原型:static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr, pte_t pte, struct page *page)

返回类型:void

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longaddr
pte_tpte
struct page *page
502  pgd等于a shortcut to get a pgd_t in a given mm(The address space we belong to. , addr)
503  p4d等于p4d_offset(pgd, addr)
504  pud等于pud_offset(p4d, addr)
505  pmd等于pmd_offset(pud, addr)
516  如果nr_shown恒等于60则
517  如果time_before(jiffies, resume)则
518  nr_unshown自加
519  返回
521  如果nr_unshown
522  打印警报信息("BUG: Bad page map: %lu messages suppressed\n", nr_unshown)
524  nr_unshown等于0
526  nr_shown等于0
528  如果nr_shown自加恒等于0则resume等于jiffies加60乘HZ
531  mapping = File we map to (can be NULL). ? f_mapping : NULL
532  index等于linear_page_index(vma, addr)
534  打印警报信息("BUG: Bad page map in process %s pte:%08llx pmd:%08llx\n", comm, (longlong)pte_val(pte), (longlong)pmd_val( * pmd))
537  如果pagedump_page(page, "bad pte")
539  打印警报信息("addr:%px vm_flags:%08lx anon_vma:%px mapping:%px index:%lx\n", (void * )addr, Flags, see mm.h. , Serialized by page_table_lock , mapping, index)
541  打印警报信息("file:%pD fault:%ps mmap:%ps readpage:%ps\n", File we map to (can be NULL). , Function pointers to deal with this struct. ? fault : NULL, File we map to (can be NULL). ? mmap : NULL, mapping ? readpage : NULL)
546  dump_stack()
547  add_taint: add a taint flag if not already set.*@flag: one of the TAINT_* constants.*@lockdep_ok: whether lock debugging is still OK.* If something bad has gone wrong, you'll want @lockdebug_ok = false, but for
调用者
名称描述
vm_normal_pagevm_normal_page -- This function gets the "struct page" associated with a pte.* "Special" mappings do not wish to be associated with a "struct page" (either* it doesn't exist, or it exists but they don't want to touch it). In this
zap_pte_range
do_swap_pageWe enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults), and pte mapped but not yet locked.* We return with pte unmapped and unlocked.* We return with the mmap_sem locked or unlocked in the same cases