Lines Matching refs:flags
226 key_perm_t perm, unsigned long flags, in key_alloc() argument
257 if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) { in key_alloc()
264 if (!(flags & KEY_ALLOC_QUOTA_OVERRUN)) { in key_alloc()
301 key->flags |= 1 << KEY_FLAG_USER_ALIVE; in key_alloc()
302 if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) in key_alloc()
303 key->flags |= 1 << KEY_FLAG_IN_QUOTA; in key_alloc()
304 if (flags & KEY_ALLOC_BUILT_IN) in key_alloc()
305 key->flags |= 1 << KEY_FLAG_BUILTIN; in key_alloc()
306 if (flags & KEY_ALLOC_UID_KEYRING) in key_alloc()
307 key->flags |= 1 << KEY_FLAG_UID_KEYRING; in key_alloc()
308 if (flags & KEY_ALLOC_SET_KEEP) in key_alloc()
309 key->flags |= 1 << KEY_FLAG_KEEP; in key_alloc()
316 ret = security_key_alloc(key, cred, flags); in key_alloc()
331 if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) { in key_alloc()
344 if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) { in key_alloc()
382 if (delta != 0 && test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) { in key_payload_reserve()
385 unsigned long flags; in key_payload_reserve() local
387 spin_lock_irqsave(&key->user->lock, flags); in key_payload_reserve()
398 spin_unlock_irqrestore(&key->user->lock, flags); in key_payload_reserve()
454 if (test_and_clear_bit(KEY_FLAG_USER_CONSTRUCT, &key->flags)) in __key_instantiate_and_link()
459 if (test_bit(KEY_FLAG_KEEP, &keyring->flags)) in __key_instantiate_and_link()
460 set_bit(KEY_FLAG_KEEP, &key->flags); in __key_instantiate_and_link()
478 wake_up_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT); in __key_instantiate_and_link()
612 if (test_and_clear_bit(KEY_FLAG_USER_CONSTRUCT, &key->flags)) in key_reject_and_link()
633 wake_up_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT); in key_reject_and_link()
653 unsigned long flags; in key_put() local
656 if (test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) { in key_put()
657 spin_lock_irqsave(&key->user->lock, flags); in key_put()
660 spin_unlock_irqrestore(&key->user->lock, flags); in key_put()
663 clear_bit_unlock(KEY_FLAG_USER_ALIVE, &key->flags); in key_put()
812 unsigned long flags, in __key_create_or_update() argument
843 if (!(flags & KEY_ALLOC_BYPASS_RESTRICTION)) in __key_create_or_update()
934 cred->fsuid, cred->fsgid, cred, perm, flags, NULL); in __key_create_or_update()
948 security_key_post_create_or_update(keyring, key, payload, plen, flags, in __key_create_or_update()
970 if (test_bit(KEY_FLAG_USER_CONSTRUCT, &key->flags)) { in __key_create_or_update()
983 flags, false); in __key_create_or_update()
1019 unsigned long flags) in key_create_or_update() argument
1022 plen, perm, flags, true); in key_create_or_update()
1056 unsigned long flags) in key_create() argument
1059 plen, perm, flags, false); in key_create()
1143 if (!test_and_set_bit(KEY_FLAG_REVOKED, &key->flags)) { in key_revoke()
1173 if (!test_bit(KEY_FLAG_INVALIDATED, &key->flags)) { in key_invalidate()
1175 if (!test_and_set_bit(KEY_FLAG_INVALIDATED, &key->flags)) { in key_invalidate()