Lines Matching full:kcs

117 	struct pkey_clr2seck kcs;  in pkey_ioctl_clr2seck()  local
122 if (copy_from_user(&kcs, ucs, sizeof(kcs))) in pkey_ioctl_clr2seck()
125 apqn.card = kcs.cardnr; in pkey_ioctl_clr2seck()
126 apqn.domain = kcs.domain; in pkey_ioctl_clr2seck()
127 keybuflen = sizeof(kcs.seckey.seckey); in pkey_ioctl_clr2seck()
129 kcs.keytype, PKEY_TYPE_CCA_DATA, 0, 0, in pkey_ioctl_clr2seck()
130 kcs.clrkey.clrkey, in pkey_ioctl_clr2seck()
131 pkey_keytype_aes_to_size(kcs.keytype), in pkey_ioctl_clr2seck()
132 kcs.seckey.seckey, &keybuflen, NULL); in pkey_ioctl_clr2seck()
134 if (!rc && copy_to_user(ucs, &kcs, sizeof(kcs))) in pkey_ioctl_clr2seck()
136 memzero_explicit(&kcs, sizeof(kcs)); in pkey_ioctl_clr2seck()
445 struct pkey_clr2seck2 kcs; in pkey_ioctl_clr2seck2() local
451 if (copy_from_user(&kcs, ucs, sizeof(kcs))) in pkey_ioctl_clr2seck2()
453 u = pkey_aes_bitsize_to_keytype(kcs.size); in pkey_ioctl_clr2seck2()
456 __func__, kcs.size); in pkey_ioctl_clr2seck2()
457 memzero_explicit(&kcs, sizeof(kcs)); in pkey_ioctl_clr2seck2()
460 apqns = _copy_apqns_from_user(kcs.apqns, kcs.apqn_entries); in pkey_ioctl_clr2seck2()
462 memzero_explicit(&kcs, sizeof(kcs)); in pkey_ioctl_clr2seck2()
468 memzero_explicit(&kcs, sizeof(kcs)); in pkey_ioctl_clr2seck2()
471 rc = pkey_handler_clr_to_key(apqns, kcs.apqn_entries, in pkey_ioctl_clr2seck2()
472 u, kcs.type, kcs.size, kcs.keygenflags, in pkey_ioctl_clr2seck2()
473 kcs.clrkey.clrkey, kcs.size / 8, in pkey_ioctl_clr2seck2()
479 memzero_explicit(&kcs, sizeof(kcs)); in pkey_ioctl_clr2seck2()
482 if (kcs.key) { in pkey_ioctl_clr2seck2()
483 if (kcs.keylen < klen) { in pkey_ioctl_clr2seck2()
485 memzero_explicit(&kcs, sizeof(kcs)); in pkey_ioctl_clr2seck2()
488 if (copy_to_user(kcs.key, kkey, klen)) { in pkey_ioctl_clr2seck2()
490 memzero_explicit(&kcs, sizeof(kcs)); in pkey_ioctl_clr2seck2()
494 kcs.keylen = klen; in pkey_ioctl_clr2seck2()
495 if (copy_to_user(ucs, &kcs, sizeof(kcs))) in pkey_ioctl_clr2seck2()
497 memzero_explicit(&kcs, sizeof(kcs)); in pkey_ioctl_clr2seck2()