函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_crypto.c Create Date:2022-07-27 22:00:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ma_alloc_pages() - Allocate contiguous pages

函数原型:static void *ima_alloc_pages(loff_t max_size, size_t *allocated_size, int last_warn)

返回类型:void

参数:

类型参数名称
loff_tmax_size
size_t *allocated_size
intlast_warn
122  order等于default is 0 - 1 page.
123  gfp_mask等于__GFP_RECLAIM按位或DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.按位或__GFP_NORETRY
125  如果orderorder等于两数取小(get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory, order)
128 order循环
129  ptr等于Common helper functions. Never use with __GFP_HIGHMEM because the returned* address cannot represent highmem pages. Use alloc_pages and then kmap if* you need to access high mem.
130  如果ptr
131  allocated_size等于PAGE_SIZE左移order
132  返回:ptr
138  gfp_mask等于GFP_KERNEL
140  如果非last_warngfp_mask或等于DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.
143  ptr等于Common helper functions. Never use with __GFP_HIGHMEM because the returned* address cannot represent highmem pages. Use alloc_pages and then kmap if* you need to access high mem.
144  如果ptr
145  allocated_size等于PAGE_SIZE
146  返回:ptr
149  allocated_size等于0
150  返回:NULL
调用者
名称描述
ima_calc_file_hash_atfm