函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Get parameters from userspace. Callers must always call the free function* on params, even if an error is returned.

函数原型:static int keyctl_pkey_params_get_2(const struct keyctl_pkey_params __user *_params, const char __user *_info, int op, struct kernel_pkey_params *params)

返回类型:int

参数:

类型参数名称
const struct keyctl_pkey_params __user *_params
const char __user *_info
intop
struct kernel_pkey_params *params
122  memset(params, 0, params的长度)
123  Encoding (eg. "oaep" or "raw" for none) 等于"raw"
125  如果copy_from_user( & uparams, _params, uparams的长度)不等于0则返回:负EFAULT
128  ret等于Interpret parameters. Callers must always call the free function* on params, even if an error is returned.
129  如果ret小于0则返回:ret
132  ret等于asym_query(params, & info)
133  如果ret小于0则返回:ret
137  :op恒等于Encrypt a blob using a public key
138  :op恒等于Decrypt a blob using a public key
139  如果 Input data size 大于 Maximum size of encrypted blob in bytes Output buffer size (encrypt/decrypt/sign) 大于 Maximum size of decrypted blob in bytes 则返回:负EINVAL
142  退出
143  :op恒等于Create a public key signature
144  :op恒等于Verify a public key signature
145  如果 Input data size 大于 Maximum size of signature in bytes Output buffer size (encrypt/decrypt/sign) 大于 Maximum size of raw data to sign in bytes 则返回:负EINVAL
148  退出
149  默认
150  BUG()
153  Input data size 等于 Input data size
154  Output buffer size (enc/dec/sign) 等于 Output buffer size (encrypt/decrypt/sign)
155  返回:0
调用者
名称描述
keyctl_pkey_e_d_sEncrypt/decrypt/sign* Encrypt data, decrypt data or sign data using a public key
keyctl_pkey_verifyVerify a signature