Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\domain.c Create Date:2022-07-28 19:40:37
Last Modify:2022-05-23 20:14:46 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_dump_page - Dump a page to buffer.*@bprm: Pointer to "struct linux_binprm".*@pos: Location to dump.*@dump: Poiner to "struct tomoyo_page_dump".* Returns true on success, false otherwise.

Proto:bool tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos, struct tomoyo_page_dump *dump)

Type:bool

Parameter:

TypeParameterName
struct linux_binprm *bprm
unsigned longpos
struct tomoyo_page_dump *dump
904  If Not Contents of "page". Size is PAGE_SIZE. Then
905  Contents of "page". Size is PAGE_SIZE. = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
906  If Not Contents of "page". Size is PAGE_SIZE. Then Return false
917  If get_user_pages_remote() - pin user pages in memory*@tsk: the task_struct to use for page fault accounting, or* NULL if faults are not to be recorded <= 0 Then Return false
923  If page != Previously dumped page. Then
924  offset = pos % PAGE_SIZE
930  kaddr = kmap_atomic(page)
932  Previously dumped page. = page
933  memcpy(Contents of "page". Size is PAGE_SIZE. + offset, kaddr + offset, PAGE_SIZE - offset)
935  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.(kaddr)
939  put_page(page)
941  Return true
Caller
NameDescribe
tomoyo_scan_bprmmoyo_scan_bprm - Scan "struct linux_binprm".*@ee: Pointer to "struct tomoyo_execve".*@argc: Length of @argc.*@argv: Pointer to "struct tomoyo_argv".*@envc: Length of @envp.*@envp: Poiner to "struct tomoyo_envp".* Returns true on success, false otherwise.
tomoyo_environmoyo_environ - Check permission for environment variable names.*@ee: Pointer to "struct tomoyo_execve".* Returns 0 on success, negative value otherwise.