diff options
Diffstat (limited to 'include/linux/key.h')
-rw-r--r-- | include/linux/key.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index ae1177302d70..abc68555bac3 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -82,9 +82,16 @@ struct cred; | |||
82 | 82 | ||
83 | struct key_type; | 83 | struct key_type; |
84 | struct key_owner; | 84 | struct key_owner; |
85 | struct key_tag; | ||
85 | struct keyring_list; | 86 | struct keyring_list; |
86 | struct keyring_name; | 87 | struct keyring_name; |
87 | 88 | ||
89 | struct key_tag { | ||
90 | struct rcu_head rcu; | ||
91 | refcount_t usage; | ||
92 | bool removed; /* T when subject removed */ | ||
93 | }; | ||
94 | |||
88 | struct keyring_index_key { | 95 | struct keyring_index_key { |
89 | /* [!] If this structure is altered, the union in struct key must change too! */ | 96 | /* [!] If this structure is altered, the union in struct key must change too! */ |
90 | unsigned long hash; /* Hash value */ | 97 | unsigned long hash; /* Hash value */ |
@@ -101,6 +108,7 @@ struct keyring_index_key { | |||
101 | unsigned long x; | 108 | unsigned long x; |
102 | }; | 109 | }; |
103 | struct key_type *type; | 110 | struct key_type *type; |
111 | struct key_tag *domain_tag; /* Domain of operation */ | ||
104 | const char *description; | 112 | const char *description; |
105 | }; | 113 | }; |
106 | 114 | ||
@@ -218,6 +226,7 @@ struct key { | |||
218 | unsigned long hash; | 226 | unsigned long hash; |
219 | unsigned long len_desc; | 227 | unsigned long len_desc; |
220 | struct key_type *type; /* type of key */ | 228 | struct key_type *type; /* type of key */ |
229 | struct key_tag *domain_tag; /* Domain of operation */ | ||
221 | char *description; | 230 | char *description; |
222 | }; | 231 | }; |
223 | }; | 232 | }; |
@@ -268,6 +277,7 @@ extern struct key *key_alloc(struct key_type *type, | |||
268 | extern void key_revoke(struct key *key); | 277 | extern void key_revoke(struct key *key); |
269 | extern void key_invalidate(struct key *key); | 278 | extern void key_invalidate(struct key *key); |
270 | extern void key_put(struct key *key); | 279 | extern void key_put(struct key *key); |
280 | extern bool key_put_tag(struct key_tag *tag); | ||
271 | 281 | ||
272 | static inline struct key *__key_get(struct key *key) | 282 | static inline struct key *__key_get(struct key *key) |
273 | { | 283 | { |