Lines Matching defs:key
10 * checking the validity of a key and the key's semaphore being taken,
11 * then the key type read method will see a revoked key.
13 * This causes a problem for the user-defined key type because it
15 * in a non-revoked key and doesn't check for a NULL pointer.
42 key_serial_t key = (unsigned long)arg;
45 keyctl(KEYCTL_READ, key, buffer, 4);
52 key_serial_t key = (unsigned long)arg;
54 keyctl(KEYCTL_REVOKE, key);
62 key_serial_t key, key_inv;
66 key = add_key("user", "ltptestkey", "foo", 3,
68 if (key == -1)
69 tst_brk(TBROK | TERRNO, "Failed to add key");
72 (void *)(unsigned long)key);
74 (void *)(unsigned long)key);
76 (void *)(unsigned long)key);
78 (void *)(unsigned long)key);
92 * Kernel should start garbage collect when last reference to key
97 * We create extra key here, to remove reference to last revoked key.
102 tst_brk(TBROK | TERRNO, "Failed to add key");
105 * If we have invalidate, we can drop extra key immediately as well,
109 tst_brk(TBROK | TERRNO, "Failed to invalidate key");
113 * so we wait and periodically check for last test key to be removed.
116 ret = keyctl(KEYCTL_REVOKE, key);
123 tst_res(TINFO, "waiting for key gc took: %d ms", i);