Lines Matching full:h
11 #include <linux/cpufeature.h>
12 #include <linux/init.h>
13 #include <linux/list.h>
14 #include <linux/module.h>
15 #include <linux/rculist.h>
17 #include "pkey_base.h"
38 const struct pkey_handler *h; in pkey_handler_register() local
51 list_for_each_entry_rcu(h, &handler_list, list) { in pkey_handler_register()
52 if (h == handler) { in pkey_handler_register()
95 const struct pkey_handler *h; in pkey_handler_get_keybased() local
98 list_for_each_entry_rcu(h, &handler_list, list) { in pkey_handler_get_keybased()
99 if (!try_module_get(h->module)) in pkey_handler_get_keybased()
101 if (h->is_supported_key(key, keylen)) { in pkey_handler_get_keybased()
103 return h; in pkey_handler_get_keybased()
105 module_put(h->module); in pkey_handler_get_keybased()
115 const struct pkey_handler *h; in pkey_handler_get_keytypebased() local
118 list_for_each_entry_rcu(h, &handler_list, list) { in pkey_handler_get_keytypebased()
119 if (!try_module_get(h->module)) in pkey_handler_get_keytypebased()
121 if (h->is_supported_keytype(kt)) { in pkey_handler_get_keytypebased()
123 return h; in pkey_handler_get_keytypebased()
125 module_put(h->module); in pkey_handler_get_keytypebased()
135 const struct pkey_handler *h; in pkey_handler_put() local
141 list_for_each_entry_rcu(h, &handler_list, list) { in pkey_handler_put()
142 if (h == handler) { in pkey_handler_put()
143 module_put(h->module); in pkey_handler_put()
155 const struct pkey_handler *h; in pkey_handler_key_to_protkey() local
158 h = pkey_handler_get_keybased(key, keylen); in pkey_handler_key_to_protkey()
159 if (h && h->key_to_protkey) { in pkey_handler_key_to_protkey()
160 rc = h->key_to_protkey(apqns, nr_apqns, key, keylen, in pkey_handler_key_to_protkey()
164 pkey_handler_put(h); in pkey_handler_key_to_protkey()
182 const struct pkey_handler *h, *htmp[10]; in pkey_handler_slowpath_key_to_protkey() local
186 list_for_each_entry_rcu(h, &handler_list, list) { in pkey_handler_slowpath_key_to_protkey()
187 if (!try_module_get(h->module)) in pkey_handler_slowpath_key_to_protkey()
189 if (h->slowpath_key_to_protkey && n < ARRAY_SIZE(htmp)) in pkey_handler_slowpath_key_to_protkey()
190 htmp[n++] = h; in pkey_handler_slowpath_key_to_protkey()
192 module_put(h->module); in pkey_handler_slowpath_key_to_protkey()
197 h = htmp[i]; in pkey_handler_slowpath_key_to_protkey()
199 rc = h->slowpath_key_to_protkey(apqns, nr_apqns, in pkey_handler_slowpath_key_to_protkey()
203 module_put(h->module); in pkey_handler_slowpath_key_to_protkey()
215 const struct pkey_handler *h; in pkey_handler_gen_key() local
218 h = pkey_handler_get_keytypebased(keysubtype); in pkey_handler_gen_key()
219 if (h && h->gen_key) { in pkey_handler_gen_key()
220 rc = h->gen_key(apqns, nr_apqns, keytype, keysubtype, in pkey_handler_gen_key()
224 pkey_handler_put(h); in pkey_handler_gen_key()
236 const struct pkey_handler *h; in pkey_handler_clr_to_key() local
239 h = pkey_handler_get_keytypebased(keysubtype); in pkey_handler_clr_to_key()
240 if (h && h->clr_to_key) { in pkey_handler_clr_to_key()
241 rc = h->clr_to_key(apqns, nr_apqns, keytype, keysubtype, in pkey_handler_clr_to_key()
245 pkey_handler_put(h); in pkey_handler_clr_to_key()
255 const struct pkey_handler *h; in pkey_handler_verify_key() local
258 h = pkey_handler_get_keybased(key, keylen); in pkey_handler_verify_key()
259 if (h && h->verify_key) { in pkey_handler_verify_key()
260 rc = h->verify_key(key, keylen, card, dom, in pkey_handler_verify_key()
263 pkey_handler_put(h); in pkey_handler_verify_key()
272 const struct pkey_handler *h; in pkey_handler_apqns_for_key() local
275 h = pkey_handler_get_keybased(key, keylen); in pkey_handler_apqns_for_key()
276 if (h && h->apqns_for_key) in pkey_handler_apqns_for_key()
277 rc = h->apqns_for_key(key, keylen, flags, apqns, nr_apqns); in pkey_handler_apqns_for_key()
278 pkey_handler_put(h); in pkey_handler_apqns_for_key()
288 const struct pkey_handler *h; in pkey_handler_apqns_for_keytype() local
291 h = pkey_handler_get_keytypebased(keysubtype); in pkey_handler_apqns_for_keytype()
292 if (h && h->apqns_for_keytype) { in pkey_handler_apqns_for_keytype()
293 rc = h->apqns_for_keytype(keysubtype, in pkey_handler_apqns_for_keytype()
297 pkey_handler_put(h); in pkey_handler_apqns_for_keytype()
323 const struct pkey_handler *h; in pkey_handler_request_modules() local
327 list_for_each_entry_rcu(h, &handler_list, list) { in pkey_handler_request_modules()
328 if (h->module && in pkey_handler_request_modules()
329 !strcmp(h->module->name, pkey_handler_modules[i])) { in pkey_handler_request_modules()