函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\verity\open.c Create Date:2022-07-29 10:58:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Ensure the inode has an ->i_verity_info

函数原型:static int ensure_verity_info(struct inode *inode)

返回类型:int

参数:

类型参数名称
struct inode *inode
241  vi等于fsverity_get_info(inode)
245  如果vi则返回:0
248  res等于get_verity_descriptor(inode, NULL, 0)
249  如果res小于0则
250  fsverity_err(inode, "Error %d getting verity descriptor size", res)
252  返回:res
254  如果res大于Arbitrary limit to bound the kmalloc() size. Can be changed.
255  fsverity_err(inode, "Verity descriptor is too large (%d bytes)", res)
257  返回:负EMSGSIZE
259  desc等于开辟内存
260  如果非desc则返回:负ENOMEM
262  res等于get_verity_descriptor(inode, desc, res)
263  如果res小于0则
264  fsverity_err(inode, "Error %d reading verity descriptor", res)
265  转到:out_free_desc
268  vi等于Validate the given fsverity_descriptor and create a new fsverity_info from* it. The signature (if present) is also checked.
269  如果是错误
270  res等于错误
271  转到:out_free_desc
274  fsverity_set_info(inode, vi)
275  res等于0
276  out_free_desc :
277  释放内存
278  返回:res
调用者
名称描述
fsverity_file_opensverity_file_open() - prepare to open a verity file*@inode: the inode being opened*@filp: the struct file being set up* When opening a verity file, deny the open if it is for writing. Otherwise,* set up the inode's ->i_verity_info if not already done.