函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:py_oldmem_page - copy one page from "oldmem"*@pfn: page frame number to be copied*@buf: target memory address for the copy; this can be in kernel address* space or user address space (see @userbuf)*@csize: number of bytes to copy*@offset: offset in bytes

函数原型:ssize_t copy_oldmem_page(unsigned long pfn, char *buf, size_t csize, unsigned long offset, int userbuf)

返回类型:ssize_t

参数:

类型参数名称
unsigned longpfn
char *buf
size_tcsize
unsigned longoffset
intuserbuf
56  如果非csize则返回:0
59  如果非is_crashed_pfn_valid(pfn)则返回:负EFAULT
62  vaddr等于kmap_atomic_pfn(pfn)
64  如果非userbuf
65  memcpy(buf, (vaddr + offset), csize)
66  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(vaddr)
67  否则
68  如果非kdump_buf_page
69  printk(warning conditions "Kdump: Kdump buffer page not allocated\n")
72  返回:负EFAULT
74  copy_page(kdump_buf_page, vaddr)
75  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(vaddr)
76  如果copy_to_user(buf, (kdump_buf_page + offset), csize)则返回:负EFAULT
80  返回:csize