Lines Matching refs:key

2 /* procfs files for key database enumeration
51 p = proc_create_seq("key-users", 0, NULL, &proc_key_users_ops);
53 panic("Cannot create /proc/key-users\n");
70 struct key *key = rb_entry(n, struct key, serial_node);
71 if (kuid_has_mapping(user_ns, key->user->uid))
78 static struct key *find_ge_key(struct seq_file *p, key_serial_t id)
82 struct key *minkey = NULL;
85 struct key *key = rb_entry(n, struct key, serial_node);
86 if (id < key->serial) {
87 if (!minkey || minkey->serial > key->serial)
88 minkey = key;
90 } else if (id > key->serial) {
93 minkey = key;
96 key = NULL;
108 minkey = rb_entry(n, struct key, serial_node);
116 struct key *key;
122 key = find_ge_key(p, pos);
123 if (!key)
125 *_pos = key->serial;
126 return &key->serial_node;
131 struct key *key = rb_entry(n, struct key, serial_node);
132 return key->serial;
156 struct key *key = rb_entry(_p, struct key, serial_node);
166 .index_key = key->index_key,
169 .match_data.raw_data = key,
175 key_ref = make_key_ref(key, 0);
177 /* determine if the key is possessed by this process (a test we can
178 * skip if the key does not indicate the possessor can view it
180 if (key->perm & KEY_POS_VIEW) {
186 key_ref = make_key_ref(key, 1);
190 /* check whether the current task is allowed to view the key */
200 expiry = READ_ONCE(key->expiry);
220 state = key_read_state(key);
225 flags = READ_ONCE(key->flags);
227 key->serial,
235 refcount_read(&key->usage),
237 key->perm,
238 from_kuid_munged(seq_user_ns(m), key->uid),
239 from_kgid_munged(seq_user_ns(m), key->gid),
240 key->type->name);
244 if (key->type->describe)
245 key->type->describe(key, m);