Lines Matching refs:apqns
25 static int key2protkey(const struct pkey_apqn *apqns, size_t nr_apqns, in key2protkey() argument
32 rc = pkey_handler_key_to_protkey(apqns, nr_apqns, in key2protkey()
39 rc = pkey_handler_slowpath_key_to_protkey(apqns, nr_apqns, in key2protkey()
216 struct pkey_apqn *apqns; in pkey_ioctl_findcard() local
224 apqns = kmalloc_array(nr_apqns, sizeof(struct pkey_apqn), GFP_KERNEL); in pkey_ioctl_findcard()
225 if (!apqns) in pkey_ioctl_findcard()
231 apqns, &nr_apqns); in pkey_ioctl_findcard()
236 apqns, &nr_apqns); in pkey_ioctl_findcard()
239 kfree(apqns); in pkey_ioctl_findcard()
242 kfc.cardnr = apqns[0].card; in pkey_ioctl_findcard()
243 kfc.domain = apqns[0].domain; in pkey_ioctl_findcard()
244 kfree(apqns); in pkey_ioctl_findcard()
394 struct pkey_apqn *apqns; in pkey_ioctl_genseck2() local
407 apqns = _copy_apqns_from_user(kgs.apqns, kgs.apqn_entries); in pkey_ioctl_genseck2()
408 if (IS_ERR(apqns)) in pkey_ioctl_genseck2()
409 return PTR_ERR(apqns); in pkey_ioctl_genseck2()
412 kfree(apqns); in pkey_ioctl_genseck2()
415 rc = pkey_handler_gen_key(apqns, kgs.apqn_entries, in pkey_ioctl_genseck2()
419 kfree(apqns); in pkey_ioctl_genseck2()
446 struct pkey_apqn *apqns; in pkey_ioctl_clr2seck2() local
460 apqns = _copy_apqns_from_user(kcs.apqns, kcs.apqn_entries); in pkey_ioctl_clr2seck2()
461 if (IS_ERR(apqns)) { in pkey_ioctl_clr2seck2()
463 return PTR_ERR(apqns); in pkey_ioctl_clr2seck2()
467 kfree(apqns); in pkey_ioctl_clr2seck2()
471 rc = pkey_handler_clr_to_key(apqns, kcs.apqn_entries, in pkey_ioctl_clr2seck2()
476 kfree(apqns); in pkey_ioctl_clr2seck2()
529 struct pkey_apqn *apqns = NULL; in pkey_ioctl_kblob2protk2() local
536 apqns = _copy_apqns_from_user(ktp.apqns, ktp.apqn_entries); in pkey_ioctl_kblob2protk2()
537 if (IS_ERR(apqns)) in pkey_ioctl_kblob2protk2()
538 return PTR_ERR(apqns); in pkey_ioctl_kblob2protk2()
541 kfree(apqns); in pkey_ioctl_kblob2protk2()
545 rc = key2protkey(apqns, ktp.apqn_entries, kkey, ktp.keylen, in pkey_ioctl_kblob2protk2()
549 kfree(apqns); in pkey_ioctl_kblob2protk2()
560 struct pkey_apqn *apqns = NULL; in pkey_ioctl_apqns4k() local
570 apqns = kmalloc_array(nr_apqns, in pkey_ioctl_apqns4k()
573 if (!apqns) in pkey_ioctl_apqns4k()
578 kfree(apqns); in pkey_ioctl_apqns4k()
582 apqns, &nr_apqns); in pkey_ioctl_apqns4k()
586 kfree(apqns); in pkey_ioctl_apqns4k()
589 if (!rc && kak.apqns) { in pkey_ioctl_apqns4k()
591 kfree(apqns); in pkey_ioctl_apqns4k()
596 if (copy_to_user(kak.apqns, apqns, len)) { in pkey_ioctl_apqns4k()
597 kfree(apqns); in pkey_ioctl_apqns4k()
605 kfree(apqns); in pkey_ioctl_apqns4k()
612 struct pkey_apqn *apqns = NULL; in pkey_ioctl_apqns4kt() local
621 apqns = kmalloc_array(nr_apqns, in pkey_ioctl_apqns4kt()
624 if (!apqns) in pkey_ioctl_apqns4kt()
629 kat.flags, apqns, &nr_apqns); in pkey_ioctl_apqns4kt()
632 kfree(apqns); in pkey_ioctl_apqns4kt()
635 if (!rc && kat.apqns) { in pkey_ioctl_apqns4kt()
637 kfree(apqns); in pkey_ioctl_apqns4kt()
642 if (copy_to_user(kat.apqns, apqns, len)) { in pkey_ioctl_apqns4kt()
643 kfree(apqns); in pkey_ioctl_apqns4kt()
651 kfree(apqns); in pkey_ioctl_apqns4kt()
659 struct pkey_apqn *apqns = NULL; in pkey_ioctl_kblob2protk3() local
666 apqns = _copy_apqns_from_user(ktp.apqns, ktp.apqn_entries); in pkey_ioctl_kblob2protk3()
667 if (IS_ERR(apqns)) in pkey_ioctl_kblob2protk3()
668 return PTR_ERR(apqns); in pkey_ioctl_kblob2protk3()
671 kfree(apqns); in pkey_ioctl_kblob2protk3()
676 kfree(apqns); in pkey_ioctl_kblob2protk3()
680 rc = key2protkey(apqns, ktp.apqn_entries, kkey, ktp.keylen, in pkey_ioctl_kblob2protk3()
683 kfree(apqns); in pkey_ioctl_kblob2protk3()