函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\microcode\amd.c Create Date:2022-07-27 09:09:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Check whether the passed remaining file @buf_size is large enough to contain* a patch of the indicated @sh_psize (and also whether this size does not* exceed the per-family maximum). @sh_psize is the size read from the section* header.

函数原型:static unsigned int __verify_patch_size(u8 family, unsigned int sh_psize, size_t buf_size)

返回类型:unsigned int

参数:

类型参数名称
u8family
unsigned intsh_psize
size_tbuf_size
202  如果family大于等于0x15则返回:min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, sh_psize, buf_size)
209  :family == 0x10...0x12
210  max_size等于Check whether the passed remaining file @buf_size is large enough to contain* a patch of the indicated @sh_psize (and also whether this size does not* exceed the per-family maximum). @sh_psize is the size read from the section* header.
211  退出
212  :family恒等于0x14
213  max_size等于F14H_MPB_MAX_SIZE
214  退出
215  默认
216  WARN(1, "%s: WTF family: 0x%x\n", __func__, family)
217  返回:0
218  退出
221  如果sh_psize大于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, buf_size, max_size)则返回:0
224  返回:sh_psize
调用者
名称描述
verify_patchVerify the patch in @buf.* Returns:* negative: on error* positive: patch is not for this family, skip it* 0: success