函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyctl.c Create Date:2022-07-27 19:54:20
Last Modify:2020-03-18 07:59:52 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Invalidate a key.* The key must be grant the caller Invalidate permission for this to work.* The key and any links to the key will be automatically garbage collected* immediately.* Keys with KEY_FLAG_KEEP set should not be invalidated.

函数原型:long keyctl_invalidate_key(key_serial_t id)

返回类型:long

参数:

类型参数名称
key_serial_tid
427  kenter("%d", id)
429  key_ref等于Look up a key ID given us by userspace with a given permissions mask to get* the key it refers to.* Flags can be passed to request that special keyrings be created if referred* to directly, to permit partially constructed keys to be found and to skip
430  如果是错误
431  ret等于错误
434  如果操作权限检查
436  如果是错误则转到:error
441  转到:error_put
444  转到:error
447  invalidate :
448  key等于key_ref_to_ptr(key_ref)
449  ret等于0
450  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting fromret等于负EPERM
452  否则key_invalidate - Invalidate a key.*@key: The key to be invalidated.* Mark a key as being invalidated and have it cleaned up immediately. The key* is ignored by all searches and other operations from this point.
454  error_put :
455  key_ref_put(key_ref)
456  error :
457  kleave(" = %ld", ret)
458  返回:ret
调用者
名称描述
SYSCALL_DEFINE5The key control system call
COMPAT_SYSCALL_DEFINE5The key control system call, 32-bit compatibility version for 64-bit archs