Lines Matching refs:key

33 struct key;
149 static inline key_ref_t make_key_ref(const struct key *key, in make_key_ref() argument
152 return (key_ref_t) ((unsigned long) key | possession); in make_key_ref()
155 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr()
157 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr()
165 typedef int (*key_restrict_link_func_t)(struct key *dest_keyring,
168 struct key *restriction_key);
172 struct key *key; member
189 struct key { struct
277 extern struct key *key_alloc(struct key_type *type,
294 extern void key_revoke(struct key *key);
295 extern void key_invalidate(struct key *key);
296 extern void key_put(struct key *key);
300 static inline struct key *__key_get(struct key *key) in __key_get() argument
302 refcount_inc(&key->usage); in __key_get()
303 return key; in __key_get()
306 static inline struct key *key_get(struct key *key) in key_get() argument
308 return key ? __key_get(key) : key; in key_get()
316 extern struct key *request_key_tag(struct key_type *type,
321 extern struct key *request_key_rcu(struct key_type *type,
325 extern struct key *request_key_with_auxdata(struct key_type *type,
340 static inline struct key *request_key(struct key_type *type, in request_key()
379 extern int wait_for_key_construction(struct key *key, bool intr);
381 extern int key_validate(const struct key *key);
391 extern int key_update(key_ref_t key,
395 extern int key_link(struct key *keyring,
396 struct key *key);
398 extern int key_move(struct key *key,
399 struct key *from_keyring,
400 struct key *to_keyring,
403 extern int key_unlink(struct key *keyring,
404 struct key *key);
406 extern struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid,
411 struct key *dest);
413 extern int restrict_link_reject(struct key *keyring,
416 struct key *restriction_key);
418 extern int keyring_clear(struct key *keyring);
425 extern int keyring_add_key(struct key *keyring,
426 struct key *key);
431 extern struct key *key_lookup(key_serial_t id);
433 static inline key_serial_t key_serial(const struct key *key) in key_serial() argument
435 return key ? key->serial : 0; in key_serial()
438 extern void key_set_timeout(struct key *, unsigned);
444 static inline short key_read_state(const struct key *key) in key_read_state() argument
447 return smp_load_acquire(&key->state); in key_read_state()
457 static inline bool key_is_positive(const struct key *key) in key_is_positive() argument
459 return key_read_state(key) == KEY_IS_POSITIVE; in key_is_positive()
462 static inline bool key_is_negative(const struct key *key) in key_is_negative() argument
464 return key_read_state(key) < 0; in key_is_negative()
472 rwsem_is_locked(&((struct key *)(KEY))->sem)))