Lines Matching refs:apqns

200 	u32 nr_apqns, *apqns = NULL;  in pkey_clr2ep11key()  local
205 rc = ep11_findcard2(&apqns, &nr_apqns, 0xFFFF, 0xFFFF, in pkey_clr2ep11key()
212 card = apqns[i] >> 16; in pkey_clr2ep11key()
213 dom = apqns[i] & 0xFFFF; in pkey_clr2ep11key()
221 kfree(apqns); in pkey_clr2ep11key()
234 u32 nr_apqns, *apqns = NULL; in pkey_ep11key2pkey() local
240 rc = ep11_findcard2(&apqns, &nr_apqns, 0xFFFF, 0xFFFF, in pkey_ep11key2pkey()
247 card = apqns[i] >> 16; in pkey_ep11key2pkey()
248 dom = apqns[i] & 0xFFFF; in pkey_ep11key2pkey()
257 kfree(apqns); in pkey_ep11key2pkey()
547 static int pkey_genseckey2(const struct pkey_apqn *apqns, size_t nr_apqns, in pkey_genseckey2() argument
554 if (!apqns || !nr_apqns) in pkey_genseckey2()
582 card = apqns[i].card; in pkey_genseckey2()
583 dom = apqns[i].domain; in pkey_genseckey2()
602 static int pkey_clr2seckey2(const struct pkey_apqn *apqns, size_t nr_apqns, in pkey_clr2seckey2() argument
610 if (!apqns || !nr_apqns) in pkey_clr2seckey2()
640 card = apqns[i].card; in pkey_clr2seckey2()
641 dom = apqns[i].domain; in pkey_clr2seckey2()
772 static int pkey_keyblob2pkey2(const struct pkey_apqn *apqns, size_t nr_apqns, in pkey_keyblob2pkey2() argument
780 if (!apqns || !nr_apqns) in pkey_keyblob2pkey2()
821 card = apqns[i].card; in pkey_keyblob2pkey2()
822 dom = apqns[i].domain; in pkey_keyblob2pkey2()
848 struct pkey_apqn *apqns, size_t *nr_apqns) in pkey_apqns4key() argument
943 if (apqns) { in pkey_apqns4key()
947 memcpy(apqns, _apqns, _nr_apqns * sizeof(u32)); in pkey_apqns4key()
958 struct pkey_apqn *apqns, size_t *nr_apqns) in pkey_apqns4keytype() argument
1009 if (apqns) { in pkey_apqns4keytype()
1013 memcpy(apqns, _apqns, _nr_apqns * sizeof(u32)); in pkey_apqns4keytype()
1022 static int pkey_keyblob2pkey3(const struct pkey_apqn *apqns, size_t nr_apqns, in pkey_keyblob2pkey3() argument
1030 if (!apqns || !nr_apqns) in pkey_keyblob2pkey3()
1096 card = apqns[i].card; in pkey_keyblob2pkey3()
1097 dom = apqns[i].domain; in pkey_keyblob2pkey3()
1306 struct pkey_apqn *apqns; in pkey_unlocked_ioctl() local
1312 apqns = _copy_apqns_from_user(kgs.apqns, kgs.apqn_entries); in pkey_unlocked_ioctl()
1313 if (IS_ERR(apqns)) in pkey_unlocked_ioctl()
1314 return PTR_ERR(apqns); in pkey_unlocked_ioctl()
1317 kfree(apqns); in pkey_unlocked_ioctl()
1320 rc = pkey_genseckey2(apqns, kgs.apqn_entries, in pkey_unlocked_ioctl()
1324 kfree(apqns); in pkey_unlocked_ioctl()
1348 struct pkey_apqn *apqns; in pkey_unlocked_ioctl() local
1354 apqns = _copy_apqns_from_user(kcs.apqns, kcs.apqn_entries); in pkey_unlocked_ioctl()
1355 if (IS_ERR(apqns)) in pkey_unlocked_ioctl()
1356 return PTR_ERR(apqns); in pkey_unlocked_ioctl()
1359 kfree(apqns); in pkey_unlocked_ioctl()
1362 rc = pkey_clr2seckey2(apqns, kcs.apqn_entries, in pkey_unlocked_ioctl()
1366 kfree(apqns); in pkey_unlocked_ioctl()
1412 struct pkey_apqn *apqns = NULL; in pkey_unlocked_ioctl() local
1417 apqns = _copy_apqns_from_user(ktp.apqns, ktp.apqn_entries); in pkey_unlocked_ioctl()
1418 if (IS_ERR(apqns)) in pkey_unlocked_ioctl()
1419 return PTR_ERR(apqns); in pkey_unlocked_ioctl()
1422 kfree(apqns); in pkey_unlocked_ioctl()
1425 rc = pkey_keyblob2pkey2(apqns, ktp.apqn_entries, in pkey_unlocked_ioctl()
1428 kfree(apqns); in pkey_unlocked_ioctl()
1439 struct pkey_apqn *apqns = NULL; in pkey_unlocked_ioctl() local
1447 apqns = kmalloc_array(nr_apqns, in pkey_unlocked_ioctl()
1450 if (!apqns) in pkey_unlocked_ioctl()
1455 kfree(apqns); in pkey_unlocked_ioctl()
1459 apqns, &nr_apqns); in pkey_unlocked_ioctl()
1463 kfree(apqns); in pkey_unlocked_ioctl()
1466 if (!rc && kak.apqns) { in pkey_unlocked_ioctl()
1468 kfree(apqns); in pkey_unlocked_ioctl()
1473 if (copy_to_user(kak.apqns, apqns, len)) { in pkey_unlocked_ioctl()
1474 kfree(apqns); in pkey_unlocked_ioctl()
1482 kfree(apqns); in pkey_unlocked_ioctl()
1488 struct pkey_apqn *apqns = NULL; in pkey_unlocked_ioctl() local
1495 apqns = kmalloc_array(nr_apqns, in pkey_unlocked_ioctl()
1498 if (!apqns) in pkey_unlocked_ioctl()
1502 kat.flags, apqns, &nr_apqns); in pkey_unlocked_ioctl()
1505 kfree(apqns); in pkey_unlocked_ioctl()
1508 if (!rc && kat.apqns) { in pkey_unlocked_ioctl()
1510 kfree(apqns); in pkey_unlocked_ioctl()
1515 if (copy_to_user(kat.apqns, apqns, len)) { in pkey_unlocked_ioctl()
1516 kfree(apqns); in pkey_unlocked_ioctl()
1524 kfree(apqns); in pkey_unlocked_ioctl()
1530 struct pkey_apqn *apqns = NULL; in pkey_unlocked_ioctl() local
1536 apqns = _copy_apqns_from_user(ktp.apqns, ktp.apqn_entries); in pkey_unlocked_ioctl()
1537 if (IS_ERR(apqns)) in pkey_unlocked_ioctl()
1538 return PTR_ERR(apqns); in pkey_unlocked_ioctl()
1541 kfree(apqns); in pkey_unlocked_ioctl()
1546 kfree(apqns); in pkey_unlocked_ioctl()
1550 rc = pkey_keyblob2pkey3(apqns, ktp.apqn_entries, kkey, in pkey_unlocked_ioctl()
1554 kfree(apqns); in pkey_unlocked_ioctl()
1825 u32 nr_apqns, *apqns = NULL; in pkey_ccacipher_aes_attr_read() local
1835 rc = cca_findcard2(&apqns, &nr_apqns, 0xFFFF, 0xFFFF, in pkey_ccacipher_aes_attr_read()
1844 card = apqns[i] >> 16; in pkey_ccacipher_aes_attr_read()
1845 dom = apqns[i] & 0xFFFF; in pkey_ccacipher_aes_attr_read()
1948 u32 nr_apqns, *apqns = NULL; in pkey_ep11_aes_attr_read() local
1958 rc = ep11_findcard2(&apqns, &nr_apqns, 0xFFFF, 0xFFFF, in pkey_ep11_aes_attr_read()
1967 card = apqns[i] >> 16; in pkey_ep11_aes_attr_read()
1968 dom = apqns[i] & 0xFFFF; in pkey_ep11_aes_attr_read()