Function report |
Source Code:mm\memory.c |
Create Date:2022-07-28 14:44:12 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:copy_huge_page_from_user
Proto:long copy_huge_page_from_user(struct page *dst_page, const void __user *usr_src, unsigned int pages_per_huge_page, bool allow_pagefault)
Type:long
Parameter:
Type | Parameter | Name |
---|---|---|
struct page * | dst_page | |
const void __user * | usr_src | |
unsigned int | pages_per_huge_page | |
bool | allow_pagefault |
4770 | rc = 0 |
4771 | ret_val = pages_per_huge_page * PAGE_SIZE |
4773 | When i < pages_per_huge_page cycle |
4774 | If allow_pagefault Then page_kaddr = kmap(dst_page + i) |
4776 | Else page_kaddr = kmap_atomic(dst_page + i) |
4778 | rc = copy_from_user(page_kaddr, (constvoid__user * )(src + i * PAGE_SIZE), PAGE_SIZE) |
4781 | If allow_pagefault Then kunmap(dst_page + i) |
4783 | Else 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.(page_kaddr) |
4787 | If rc Then Break |
4790 | cond_resched() |
4792 | Return ret_val |
Name | Describe |
---|---|
hugetlb_mcopy_atomic_pte | Used by userfaultfd UFFDIO_COPY. Based on mcopy_atomic_pte with* modifications for huge pages. |
__mcopy_atomic_hugetlb | __mcopy_atomic processing for HUGETLB vmas. Note that this routine is* called with mmap_sem held, it will release mmap_sem before returning. |
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 |