• Home
  • Raw
  • Download

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()
548 static int pkey_genseckey2(const struct pkey_apqn *apqns, size_t nr_apqns, in pkey_genseckey2() argument
555 if (!apqns || !nr_apqns) in pkey_genseckey2()
583 card = apqns[i].card; in pkey_genseckey2()
584 dom = apqns[i].domain; in pkey_genseckey2()
601 static int pkey_clr2seckey2(const struct pkey_apqn *apqns, size_t nr_apqns, in pkey_clr2seckey2() argument
609 if (!apqns || !nr_apqns) in pkey_clr2seckey2()
639 card = apqns[i].card; in pkey_clr2seckey2()
640 dom = apqns[i].domain; in pkey_clr2seckey2()
768 static int pkey_keyblob2pkey2(const struct pkey_apqn *apqns, size_t nr_apqns, in pkey_keyblob2pkey2() argument
776 if (!apqns || !nr_apqns) in pkey_keyblob2pkey2()
817 card = apqns[i].card; in pkey_keyblob2pkey2()
818 dom = apqns[i].domain; in pkey_keyblob2pkey2()
843 struct pkey_apqn *apqns, size_t *nr_apqns) in pkey_apqns4key() argument
937 if (apqns) { in pkey_apqns4key()
941 memcpy(apqns, _apqns, _nr_apqns * sizeof(u32)); in pkey_apqns4key()
952 struct pkey_apqn *apqns, size_t *nr_apqns) in pkey_apqns4keytype() argument
1002 if (apqns) { in pkey_apqns4keytype()
1006 memcpy(apqns, _apqns, _nr_apqns * sizeof(u32)); in pkey_apqns4keytype()
1015 static int pkey_keyblob2pkey3(const struct pkey_apqn *apqns, size_t nr_apqns, in pkey_keyblob2pkey3() argument
1023 if (!apqns || !nr_apqns) in pkey_keyblob2pkey3()
1089 card = apqns[i].card; in pkey_keyblob2pkey3()
1090 dom = apqns[i].domain; in pkey_keyblob2pkey3()
1300 struct pkey_apqn *apqns; in pkey_unlocked_ioctl() local
1306 apqns = _copy_apqns_from_user(kgs.apqns, kgs.apqn_entries); in pkey_unlocked_ioctl()
1307 if (IS_ERR(apqns)) in pkey_unlocked_ioctl()
1308 return PTR_ERR(apqns); in pkey_unlocked_ioctl()
1311 kfree(apqns); in pkey_unlocked_ioctl()
1314 rc = pkey_genseckey2(apqns, kgs.apqn_entries, in pkey_unlocked_ioctl()
1318 kfree(apqns); in pkey_unlocked_ioctl()
1342 struct pkey_apqn *apqns; in pkey_unlocked_ioctl() local
1348 apqns = _copy_apqns_from_user(kcs.apqns, kcs.apqn_entries); in pkey_unlocked_ioctl()
1349 if (IS_ERR(apqns)) in pkey_unlocked_ioctl()
1350 return PTR_ERR(apqns); in pkey_unlocked_ioctl()
1353 kfree(apqns); in pkey_unlocked_ioctl()
1356 rc = pkey_clr2seckey2(apqns, kcs.apqn_entries, in pkey_unlocked_ioctl()
1360 kfree(apqns); in pkey_unlocked_ioctl()
1406 struct pkey_apqn *apqns = NULL; in pkey_unlocked_ioctl() local
1411 apqns = _copy_apqns_from_user(ktp.apqns, ktp.apqn_entries); in pkey_unlocked_ioctl()
1412 if (IS_ERR(apqns)) in pkey_unlocked_ioctl()
1413 return PTR_ERR(apqns); in pkey_unlocked_ioctl()
1416 kfree(apqns); in pkey_unlocked_ioctl()
1419 rc = pkey_keyblob2pkey2(apqns, ktp.apqn_entries, in pkey_unlocked_ioctl()
1422 kfree(apqns); in pkey_unlocked_ioctl()
1434 struct pkey_apqn *apqns = NULL; in pkey_unlocked_ioctl() local
1442 apqns = kmalloc_array(nr_apqns, in pkey_unlocked_ioctl()
1445 if (!apqns) in pkey_unlocked_ioctl()
1450 kfree(apqns); in pkey_unlocked_ioctl()
1454 apqns, &nr_apqns); in pkey_unlocked_ioctl()
1458 kfree(apqns); in pkey_unlocked_ioctl()
1461 if (!rc && kak.apqns) { in pkey_unlocked_ioctl()
1463 kfree(apqns); in pkey_unlocked_ioctl()
1468 if (copy_to_user(kak.apqns, apqns, len)) { in pkey_unlocked_ioctl()
1469 kfree(apqns); in pkey_unlocked_ioctl()
1477 kfree(apqns); in pkey_unlocked_ioctl()
1483 struct pkey_apqn *apqns = NULL; in pkey_unlocked_ioctl() local
1490 apqns = kmalloc_array(nr_apqns, in pkey_unlocked_ioctl()
1493 if (!apqns) in pkey_unlocked_ioctl()
1497 kat.flags, apqns, &nr_apqns); in pkey_unlocked_ioctl()
1500 kfree(apqns); in pkey_unlocked_ioctl()
1503 if (!rc && kat.apqns) { in pkey_unlocked_ioctl()
1505 kfree(apqns); in pkey_unlocked_ioctl()
1510 if (copy_to_user(kat.apqns, apqns, len)) { in pkey_unlocked_ioctl()
1511 kfree(apqns); in pkey_unlocked_ioctl()
1519 kfree(apqns); in pkey_unlocked_ioctl()
1525 struct pkey_apqn *apqns = NULL; in pkey_unlocked_ioctl() local
1531 apqns = _copy_apqns_from_user(ktp.apqns, ktp.apqn_entries); in pkey_unlocked_ioctl()
1532 if (IS_ERR(apqns)) in pkey_unlocked_ioctl()
1533 return PTR_ERR(apqns); in pkey_unlocked_ioctl()
1536 kfree(apqns); in pkey_unlocked_ioctl()
1541 kfree(apqns); in pkey_unlocked_ioctl()
1545 rc = pkey_keyblob2pkey3(apqns, ktp.apqn_entries, kkey, in pkey_unlocked_ioctl()
1549 kfree(apqns); in pkey_unlocked_ioctl()
1821 u32 nr_apqns, *apqns = NULL; in pkey_ccacipher_aes_attr_read() local
1831 rc = cca_findcard2(&apqns, &nr_apqns, 0xFFFF, 0xFFFF, in pkey_ccacipher_aes_attr_read()
1840 card = apqns[i] >> 16; in pkey_ccacipher_aes_attr_read()
1841 dom = apqns[i] & 0xFFFF; in pkey_ccacipher_aes_attr_read()
1944 u32 nr_apqns, *apqns = NULL; in pkey_ep11_aes_attr_read() local
1954 rc = ep11_findcard2(&apqns, &nr_apqns, 0xFFFF, 0xFFFF, in pkey_ep11_aes_attr_read()
1963 card = apqns[i] >> 16; in pkey_ep11_aes_attr_read()
1964 dom = apqns[i] & 0xFFFF; in pkey_ep11_aes_attr_read()