函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Allocate a buffer consisting of a set of pages with a virtual mapping* applied over them.

函数原型:static void *big_key_alloc_buffer(size_t len)

返回类型:void

参数:

类型参数名称
size_tlen
162  npg等于lenPAGE_SIZE减1右移PAGE_SHIFT determines the page size
165  buf等于分配内存并置零
169  如果非buf则返回:NULL
172  nr_pages等于npg
173  sg等于pagesnpg
174  初始化散列表
176 i小于nr_pages循环
177  pages[i]等于alloc_page(GFP_KERNEL)
178  如果非pages[i]则转到:nomem
181  l等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, len, PAGE_SIZE)
182  sg_set_page - Set sg entry to point at given page*@sg: SG entry*@page: The page*@len: Length of data*@offset: Offset into page* Description:* Use this function to set an sg entry pointing at a page, never assign* the page directly
183  len减等于l
186  virt等于vmap(pages, nr_pages, vmap()ed pages , PAGE_KERNEL)
187  如果非virt则转到:nomem
190  返回:buf
192  nomem :
193  Free up the buffer.
194  返回:NULL
调用者
名称描述
big_key_preparsePreparse a big key
big_key_readad the key data* - the key's semaphore is read-locked