Lines Matching refs:ktp

368 	struct pkey_kblob2pkey ktp;  in pkey_ioctl_kblob2protk()  local
372 if (copy_from_user(&ktp, utp, sizeof(ktp))) in pkey_ioctl_kblob2protk()
374 kkey = _copy_key_from_user(ktp.key, ktp.keylen); in pkey_ioctl_kblob2protk()
377 ktp.protkey.len = sizeof(ktp.protkey.protkey); in pkey_ioctl_kblob2protk()
378 rc = key2protkey(NULL, 0, kkey, ktp.keylen, in pkey_ioctl_kblob2protk()
379 ktp.protkey.protkey, &ktp.protkey.len, in pkey_ioctl_kblob2protk()
380 &ktp.protkey.type); in pkey_ioctl_kblob2protk()
383 if (!rc && copy_to_user(utp, &ktp, sizeof(ktp))) in pkey_ioctl_kblob2protk()
385 memzero_explicit(&ktp, sizeof(ktp)); in pkey_ioctl_kblob2protk()
530 struct pkey_kblob2pkey2 ktp; in pkey_ioctl_kblob2protk2() local
534 if (copy_from_user(&ktp, utp, sizeof(ktp))) in pkey_ioctl_kblob2protk2()
536 apqns = _copy_apqns_from_user(ktp.apqns, ktp.apqn_entries); in pkey_ioctl_kblob2protk2()
539 kkey = _copy_key_from_user(ktp.key, ktp.keylen); in pkey_ioctl_kblob2protk2()
544 ktp.protkey.len = sizeof(ktp.protkey.protkey); in pkey_ioctl_kblob2protk2()
545 rc = key2protkey(apqns, ktp.apqn_entries, kkey, ktp.keylen, in pkey_ioctl_kblob2protk2()
546 ktp.protkey.protkey, &ktp.protkey.len, in pkey_ioctl_kblob2protk2()
547 &ktp.protkey.type); in pkey_ioctl_kblob2protk2()
551 if (!rc && copy_to_user(utp, &ktp, sizeof(ktp))) in pkey_ioctl_kblob2protk2()
553 memzero_explicit(&ktp, sizeof(ktp)); in pkey_ioctl_kblob2protk2()
660 struct pkey_kblob2pkey3 ktp; in pkey_ioctl_kblob2protk3() local
664 if (copy_from_user(&ktp, utp, sizeof(ktp))) in pkey_ioctl_kblob2protk3()
666 apqns = _copy_apqns_from_user(ktp.apqns, ktp.apqn_entries); in pkey_ioctl_kblob2protk3()
669 kkey = _copy_key_from_user(ktp.key, ktp.keylen); in pkey_ioctl_kblob2protk3()
680 rc = key2protkey(apqns, ktp.apqn_entries, kkey, ktp.keylen, in pkey_ioctl_kblob2protk3()
681 protkey, &protkeylen, &ktp.pkeytype); in pkey_ioctl_kblob2protk3()
689 if (ktp.pkey && ktp.pkeylen) { in pkey_ioctl_kblob2protk3()
690 if (protkeylen > ktp.pkeylen) { in pkey_ioctl_kblob2protk3()
694 if (copy_to_user(ktp.pkey, protkey, protkeylen)) { in pkey_ioctl_kblob2protk3()
700 ktp.pkeylen = protkeylen; in pkey_ioctl_kblob2protk3()
701 if (copy_to_user(utp, &ktp, sizeof(ktp))) in pkey_ioctl_kblob2protk3()