Documented in 1 files:

Defined in 1 files as a prototype:

Defined in 1 files as a function:

Referenced in 7 files:

Smatch caller information:

security/keys/request_key.c key_permission() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 0 key_ref 4097-18446744073709547521
PARAM_VALUE 2 need_perm 3
DATA_SOURCE 0 key_ref $0
DATA_SOURCE 2 need_perm $1
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &idmap->idmap_mutex
HALF_LOCKED2 global &key_types_sem

security/keys/request_key.c request_key_and_link() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 0 key_ref 4096-ptr_max
PARAM_VALUE 2 need_perm 5
DATA_SOURCE 0 key_ref r search_process_keyrings_rcu
RX_PATH
LOCK2 global &key_types_sem

security/keys/proc.c proc_keys_show() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 0 key_ref 4096-18446744073709547521
PARAM_VALUE 2 need_perm 1
RX_PATH
TASK_NOT_RUNNING
LOCK2 &m->lock
TYPE_LOCK (struct seq_file)->lock

security/keys/keyctl.c key_permission() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 0 key_ref 0-ptr_max
PARAM_VALUE 2 need_perm 2,5
BUF_SIZE 0 key_ref (-1)-s32max
BUF_SIZE 0 key_ref (-1)-s32max
DATA_SOURCE 0 key_ref $0
DATA_SOURCE 2 need_perm $1
HARD_MAX 2 need_perm 5
HALF_LOCKED2 global &key_types_sem

security/keys/persistent.c key_get_persistent() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 0 key_ref 1-u64max
PARAM_VALUE 2 need_perm 5

security/keys/key.c key_permission() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 2 need_perm 3
BUF_SIZE 0 key_ref (-1)-s32max
BUF_SIZE 0 key_ref (-1)-s32max
DATA_SOURCE 0 key_ref $0
DATA_SOURCE 2 need_perm $1
STR_LEN 0 key_ref (-1),3-4,7,9-10
STR_LEN 0 key_ref (-1),3-4,7,9-10
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &keyring->sem
HALF_LOCKED2 global &key_types_sem

security/keys/keyring.c key_permission() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 0 key_ref 4096-ptr_max
PARAM_VALUE 2 need_perm 4
DATA_SOURCE 0 key_ref $0
DATA_SOURCE 2 need_perm $1
RX_PATH
LOCK2 global &key_session_mutex
LOCK2 global &keyring_name_lock

security/keys/keyring.c keyring_search_iterator() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 2 need_perm 4
RX_PATH
TASK_NOT_RUNNING

security/keys/keyring.c keyring_search_rcu() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 2 need_perm 4
BUF_SIZE 0 key_ref (-1)-s32max
BUF_SIZE 0 key_ref (-1)-s32max
DATA_SOURCE 0 key_ref $0
STR_LEN 0 key_ref (-1),13,19,456
STR_LEN 0 key_ref (-1),13,19,456
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 rcu_read

security/keys/keyring.c search_nested_keyrings() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 2 need_perm 4
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 rcu_read

security/keys/process_keys.c lookup_user_key() -> key_task_permission()

Type Parameter Key Value
PARAM_VALUE 0 key_ref 4096-18446744073709547521
PARAM_VALUE 1 cred 0,4096-ptr_max
PARAM_VALUE 1 cred->process_keyring->user->lock.rlock.dep_map->name 0-255
PARAM_VALUE 1 cred->request_key_auth 4096-ptr_max
PARAM_VALUE 1 cred->request_key_auth->sem.first_waiter->handoff_set 0-1
PARAM_VALUE 1 cred->request_key_auth->sem.first_waiter->type 0-1
PARAM_VALUE 1 cred->request_key_auth->user->lock.rlock.dep_map->name 0-255
PARAM_VALUE 1 cred->session_keyring->user->lock.rlock.dep_map->name 0-255
PARAM_VALUE 1 cred->thread_keyring->user->lock.rlock.dep_map->name 0-255
PARAM_VALUE 1 cred->ucounts->ns->work.entry.next 4096-ptr_max
PARAM_VALUE 1 cred->ucounts->ns->work.entry.next->prev 4096-ptr_max
PARAM_VALUE 1 cred->user->uidhash_node->next->pprev 1-u64max
PARAM_VALUE 1 cred->user->uidhash_node.next 0
PARAM_VALUE 1 cred->user->uidhash_node.next->pprev 1-u64max
PARAM_VALUE 1 cred->user->uidhash_node.pprev 0
PARAM_VALUE 1 cred->user_ns->work.entry.next->prev 4096-ptr_max
PARAM_VALUE 2 need_perm 1-10
DATA_SOURCE 2 need_perm $2
HARD_MAX 2 need_perm 10
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &buffer->mutex
HALF_LOCKED2 &dev->mutex
HALF_LOCKED2 &frag->frag_sem
HALF_LOCKED2 &of->mutex
HALF_LOCKED2 sk