Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyctl.c Create Date:2022-07-28 18:19:40
Last Modify:2020-03-18 07:59:52 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:long keyctl_invalidate_key(key_serial_t id)

Type:long

Parameter:

TypeParameterName
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  If IS_ERR(key_ref) Then
431  ret = PTR_ERR(key_ref)
436  If IS_ERR(key_ref) Then Go to error
441  Go to error_put
444  Go to error
447  invalidate :
448  key = key_ref_to_ptr(key_ref)
449  ret = 0
450  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then ret = -EPERM
452  Else 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  Return ret
Caller
NameDescribe
SYSCALL_DEFINE5The key control system call
COMPAT_SYSCALL_DEFINE5The key control system call, 32-bit compatibility version for 64-bit archs