Lines Matching +full:function +full:- +full:off

1 // SPDX-License-Identifier: GPL-2.0
34 if (rc == -ENODEV) { in sys_pkey_handler_gen_key()
46 * Sysfs attribute read function for all protected key binary attributes.
49 * (i.e. off != 0 or count < key blob size) -EINVAL is returned.
52 loff_t off, size_t count) in pkey_protkey_aes_attr_read() argument
58 if (off != 0 || count < sizeof(protkeytoken)) in pkey_protkey_aes_attr_read()
59 return -EINVAL; in pkey_protkey_aes_attr_read()
62 return -EINVAL; in pkey_protkey_aes_attr_read()
103 * Sysfs attribute read function for the AES XTS prot key binary attributes.
106 * (i.e. off != 0 or count < key blob size) -EINVAL is returned.
109 loff_t off, size_t count) in pkey_protkey_aes_xts_attr_read() argument
123 return -EINVAL; in pkey_protkey_aes_xts_attr_read()
126 if (off != 0 || count < sizeof(*t) + protlen) in pkey_protkey_aes_xts_attr_read()
127 return -EINVAL; in pkey_protkey_aes_xts_attr_read()
130 t->type = TOKTYPE_NON_CCA; in pkey_protkey_aes_xts_attr_read()
131 t->version = TOKVER_PROTECTED_KEY; in pkey_protkey_aes_xts_attr_read()
132 t->keytype = keytype; in pkey_protkey_aes_xts_attr_read()
135 t->protkey, &protlen, &prottype); in pkey_protkey_aes_xts_attr_read()
139 t->len = protlen; in pkey_protkey_aes_xts_attr_read()
145 * Sysfs attribute read function for the HMAC prot key binary attributes.
148 * (i.e. off != 0 or count < key blob size) -EINVAL is returned.
151 loff_t off, size_t count) in pkey_protkey_hmac_attr_read() argument
165 return -EINVAL; in pkey_protkey_hmac_attr_read()
168 if (off != 0 || count < sizeof(*t) + protlen) in pkey_protkey_hmac_attr_read()
169 return -EINVAL; in pkey_protkey_hmac_attr_read()
172 t->type = TOKTYPE_NON_CCA; in pkey_protkey_hmac_attr_read()
173 t->version = TOKVER_PROTECTED_KEY; in pkey_protkey_hmac_attr_read()
174 t->keytype = keytype; in pkey_protkey_hmac_attr_read()
177 t->protkey, &protlen, &prottype); in pkey_protkey_hmac_attr_read()
181 t->len = protlen; in pkey_protkey_hmac_attr_read()
189 char *buf, loff_t off, in protkey_aes_128_read() argument
193 off, count); in protkey_aes_128_read()
199 char *buf, loff_t off, in protkey_aes_192_read() argument
203 off, count); in protkey_aes_192_read()
209 char *buf, loff_t off, in protkey_aes_256_read() argument
213 off, count); in protkey_aes_256_read()
219 char *buf, loff_t off, in protkey_aes_128_xts_read() argument
223 off, count); in protkey_aes_128_xts_read()
229 char *buf, loff_t off, in protkey_aes_256_xts_read() argument
233 off, count); in protkey_aes_256_xts_read()
239 char *buf, loff_t off, in protkey_aes_xts_128_read() argument
243 buf, off, count); in protkey_aes_xts_128_read()
249 char *buf, loff_t off, in protkey_aes_xts_256_read() argument
253 buf, off, count); in protkey_aes_xts_256_read()
259 char *buf, loff_t off, in protkey_hmac_512_read() argument
263 buf, off, count); in protkey_hmac_512_read()
269 char *buf, loff_t off, in protkey_hmac_1024_read() argument
273 buf, off, count); in protkey_hmac_1024_read()
305 * Sysfs attribute read function for all secure key ccadata binary attributes.
308 * (i.e. off != 0 or count < key blob size) -EINVAL is returned.
311 loff_t off, size_t count) in pkey_ccadata_aes_attr_read() argument
317 if (off != 0 || count < sizeof(struct secaeskeytoken)) in pkey_ccadata_aes_attr_read()
318 return -EINVAL; in pkey_ccadata_aes_attr_read()
321 return -EINVAL; in pkey_ccadata_aes_attr_read()
323 buflen = sizeof(seckey->seckey); in pkey_ccadata_aes_attr_read()
325 seckey->seckey, &buflen, NULL); in pkey_ccadata_aes_attr_read()
331 buflen = sizeof(seckey->seckey); in pkey_ccadata_aes_attr_read()
333 seckey->seckey, &buflen, NULL); in pkey_ccadata_aes_attr_read()
346 char *buf, loff_t off, in ccadata_aes_128_read() argument
350 off, count); in ccadata_aes_128_read()
356 char *buf, loff_t off, in ccadata_aes_192_read() argument
360 off, count); in ccadata_aes_192_read()
366 char *buf, loff_t off, in ccadata_aes_256_read() argument
370 off, count); in ccadata_aes_256_read()
376 char *buf, loff_t off, in ccadata_aes_128_xts_read() argument
380 off, count); in ccadata_aes_128_xts_read()
386 char *buf, loff_t off, in ccadata_aes_256_xts_read() argument
390 off, count); in ccadata_aes_256_xts_read()
416 * Sysfs attribute read function for all secure key ccacipher binary attributes.
419 * (i.e. off != 0 or count < key blob size) -EINVAL is returned.
422 bool is_xts, char *buf, loff_t off, in pkey_ccacipher_aes_attr_read() argument
428 if (off != 0 || count < CCACIPHERTOKENSIZE) in pkey_ccacipher_aes_attr_read()
429 return -EINVAL; in pkey_ccacipher_aes_attr_read()
432 return -EINVAL; in pkey_ccacipher_aes_attr_read()
460 char *buf, loff_t off, in ccacipher_aes_128_read() argument
464 off, count); in ccacipher_aes_128_read()
470 char *buf, loff_t off, in ccacipher_aes_192_read() argument
474 off, count); in ccacipher_aes_192_read()
480 char *buf, loff_t off, in ccacipher_aes_256_read() argument
484 off, count); in ccacipher_aes_256_read()
490 char *buf, loff_t off, in ccacipher_aes_128_xts_read() argument
494 off, count); in ccacipher_aes_128_xts_read()
500 char *buf, loff_t off, in ccacipher_aes_256_xts_read() argument
504 off, count); in ccacipher_aes_256_xts_read()
528 * Sysfs attribute read function for all ep11 aes key binary attributes.
531 * (i.e. off != 0 or count < key blob size) -EINVAL is returned.
532 * This function and the sysfs attributes using it provide EP11 key blobs
537 bool is_xts, char *buf, loff_t off, in pkey_ep11_aes_attr_read() argument
543 if (off != 0 || count < MAXEP11AESKEYBLOBSIZE) in pkey_ep11_aes_attr_read()
544 return -EINVAL; in pkey_ep11_aes_attr_read()
547 return -EINVAL; in pkey_ep11_aes_attr_read()
575 char *buf, loff_t off, in ep11_aes_128_read() argument
579 off, count); in ep11_aes_128_read()
585 char *buf, loff_t off, in ep11_aes_192_read() argument
589 off, count); in ep11_aes_192_read()
595 char *buf, loff_t off, in ep11_aes_256_read() argument
599 off, count); in ep11_aes_256_read()
605 char *buf, loff_t off, in ep11_aes_128_xts_read() argument
609 off, count); in ep11_aes_128_xts_read()
615 char *buf, loff_t off, in ep11_aes_256_xts_read() argument
619 off, count); in ep11_aes_256_xts_read()