函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Negatively instantiate the key with the given timeout (in seconds) and error* code and link the key into the destination keyring if one is given.* The caller must have the appropriate instantiation permit set for this to

函数原型:long keyctl_reject_key(key_serial_t id, unsigned timeout, unsigned error, key_serial_t ringid)

返回类型:long

参数:

类型参数名称
key_serial_tid
unsignedtimeout
unsignederror
key_serial_tringid
1265  cred等于current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()
1270  kenter("%d,%u,%u,%d", id, timeout, error, ringid)
1273  如果error小于等于0或error大于等于Kernel pointers have redundant information, so we can use a* scheme where we can return either an error code or a normal* pointer with the same return value.* This should be a per-architecture thing, to allow different* error and pointer decisions.error恒等于These should never be seen by user programs. To return one of ERESTART** codes, signal_pending() MUST be set. Note that ptrace can observe these* at syscall exit tracing, but they will never be left for the debugged user* process to see.error恒等于ERESTARTNOINTRerror恒等于start if no handler.. error恒等于start by calling sys_restart_syscall 则返回:负EINVAL
1283  ret等于负EPERM
1284  instkey等于 assumed request_key authority
1285  如果非instkey则转到:error
1288  rka等于data[0]
1289  如果 key serial number 不等于id则转到:error
1294  ret等于Get the destination keyring for instantiation and check that the caller has* Write permission on it.
1295  如果ret小于0则转到:error
1299  ret等于key_reject_and_link - Negatively instantiate a key and link it into the keyring.*@key: The key to instantiate.*@timeout: The timeout on the negative key.*@error: The error to return when the key is hit.
1302  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
1306  如果ret恒等于0则Change the request_key authorisation key on the current process.
1309  error :
1310  返回:ret
调用者
名称描述
keyctl_negate_keyNegatively instantiate the key with the given timeout (in seconds) and link* the key into the destination keyring if one is given.* The caller must have the appropriate instantiation permit set for this to* work (see keyctl_assume_authority)
SYSCALL_DEFINE5The key control system call
COMPAT_SYSCALL_DEFINE5The key control system call, 32-bit compatibility version for 64-bit archs