函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Encrypt/decrypt/sign* Encrypt data, decrypt data or sign data using a public key

函数原型:long keyctl_pkey_e_d_s(int op, const struct keyctl_pkey_params __user *_params, const char __user *_info, const void __user *_in, void __user *_out)

返回类型:long

参数:

类型参数名称
intop
const struct keyctl_pkey_params __user *_params
const char __user *_info
const void __user *_in
void __user *_out
216  ret等于Get parameters from userspace. Callers must always call the free function* on params, even if an error is returned.
217  如果ret小于0则转到:error_params
220  ret等于负EOPNOTSUPP
221  如果非asym_eds_op则转到:error_params
225  :op恒等于Encrypt a blob using a public key
226  op等于kernel_pkey_encrypt
227  退出
228  :op恒等于Decrypt a blob using a public key
229  op等于kernel_pkey_decrypt
230  退出
231  :op恒等于Create a public key signature
232  op等于kernel_pkey_sign
233  退出
234  默认
235  BUG()
238  in等于memdup_user - duplicate memory region from user space*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. Result is physically* contiguous, to be freed by kfree().
239  如果是错误
240  ret等于错误
241  转到:error_params
244  ret等于负ENOMEM
245  out等于开辟内存
246  如果非out则转到:error_in
249  ret等于asym_eds_op( & params, in, out)
250  如果ret小于0则转到:error_out
253  如果copy_to_user(_out, out, ret)不等于0则ret等于负EFAULT
256  error_out :
257  释放内存
258  error_in :
259  释放内存
260  error_params :
261  keyctl_pkey_params_free( & params)
262  返回:ret
调用者
名称描述
COMPAT_SYSCALL_DEFINE5The key control system call, 32-bit compatibility version for 64-bit archs