Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\verity\open.c Create Date:2022-07-28 20:24:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Ensure the inode has an ->i_verity_info

Proto:static int ensure_verity_info(struct inode *inode)

Type:int

Parameter:

TypeParameterName
struct inode *inode
241  vi = fsverity_get_info(inode)
245  If vi Then Return 0
248  res = get_verity_descriptor(inode, NULL, 0)
249  If res < 0 Then
250  fsverity_err(inode, "Error %d getting verity descriptor size", res)
252  Return res
254  If res > Arbitrary limit to bound the kmalloc() size. Can be changed. Then
255  fsverity_err(inode, "Verity descriptor is too large (%d bytes)", res)
257  Return -EMSGSIZE
259  desc = Allocation memory
260  If Not desc Then Return -ENOMEM
262  res = get_verity_descriptor(inode, desc, res)
263  If res < 0 Then
264  fsverity_err(inode, "Error %d reading verity descriptor", res)
265  Go to 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  If IS_ERR(vi) Then
270  res = PTR_ERR(vi)
271  Go to out_free_desc
274  fsverity_set_info(inode, vi)
275  res = 0
276  out_free_desc :
277  kfree(desc)
278  Return res
Caller
NameDescribe
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.