Lines Matching +full:function +full:- +full:mask
1 /* SPDX-License-Identifier: GPL-2.0 */
15 #include <linux/kmsan-checks.h>
41 * Function codes for the KM (CIPHER MESSAGE) instruction
61 * Function codes for the KMC (CIPHER MESSAGE WITH CHAINING)
77 * Function codes for the KMCTR (CIPHER MESSAGE WITH COUNTER)
92 * Function codes for the KIMD (COMPUTE INTERMEDIATE MESSAGE DIGEST)
106 * Function codes for the KLMD (COMPUTE LAST MESSAGE DIGEST)
119 * function codes for the KMAC (COMPUTE MESSAGE AUTHENTICATION CODE)
132 * Function codes for the PCKMO (PERFORM CRYPTOGRAPHIC KEY MANAGEMENT)
153 * Function codes for the PRNO (PERFORM RANDOM NUMBER OPERATION)
163 * Function codes for the KMA (CIPHER MESSAGE WITH AUTHENTICATION)
174 #define CPACF_KMA_LPC 0x100 /* Last-Plaintext/Ciphertext */
175 #define CPACF_KMA_LAAD 0x200 /* Last-AAD */
176 #define CPACF_KMA_HS 0x400 /* Hash-subkey Supplied */
187 * Function codes for KDSA (COMPUTE DIGITAL SIGNATURE AUTHENTICATION)
214 * Prototype for a not existing function to produce a link
295 cpacf_mask_t *mask) in __cpacf_query() argument
297 __cpacf_query_insn(opcode, mask, CPACF_FC_QUERY); in __cpacf_query()
329 * cpacf_query() - Query the function code mask for this CPACF opcode
331 * @mask: ptr to struct cpacf_mask_t
333 * Executes the query function for the given crypto instruction @opcode
336 * On success 1 is returned and the mask is filled with the function
337 * code mask for this CPACF opcode, otherwise 0 is returned.
339 static __always_inline int cpacf_query(unsigned int opcode, cpacf_mask_t *mask) in cpacf_query() argument
342 __cpacf_query(opcode, mask); in cpacf_query()
345 memset(mask, 0, sizeof(*mask)); in cpacf_query()
349 static inline int cpacf_test_func(cpacf_mask_t *mask, unsigned int func) in cpacf_test_func() argument
351 return (mask->bytes[func >> 3] & (0x80 >> (func & 7))) != 0; in cpacf_test_func()
357 cpacf_mask_t mask; in cpacf_query_func() local
359 if (cpacf_query(opcode, &mask)) in cpacf_query_func()
360 return cpacf_test_func(&mask, func); in cpacf_query_func()
370 * cpacf_qai() - Get the query authentication information for a CPACF opcode
372 * @mask: ptr to struct cpacf_qai_t
374 * Executes the query authentication information function for the given crypto
377 * On success 1 is returned and the mask is filled with the query authentication
391 * cpacf_km() - executes the KM (CIPHER MESSAGE) instruction
392 * @func: the function code passed to KM; see CPACF_KM_xxx defines
419 return src_len - s.odd; in cpacf_km()
423 * cpacf_kmc() - executes the KMC (CIPHER MESSAGE WITH CHAINING) instruction
424 * @func: the function code passed to KM; see CPACF_KMC_xxx defines
451 return src_len - s.odd; in cpacf_kmc()
455 * cpacf_kimd() - executes the KIMD (COMPUTE INTERMEDIATE MESSAGE DIGEST)
457 * @func: the function code passed to KM; see CPACF_KIMD_xxx defines
481 * cpacf_klmd() - executes the KLMD (COMPUTE LAST MESSAGE DIGEST) instruction
482 * @func: the function code passed to KM; see CPACF_KLMD_xxx defines
506 * _cpacf_kmac() - executes the KMAC (COMPUTE MESSAGE AUTHENTICATION CODE)
533 return src_len - s.odd; in _cpacf_kmac()
537 * cpacf_kmac() - executes the KMAC (COMPUTE MESSAGE AUTHENTICATION CODE)
539 * @func: function code passed to KMAC; see CPACF_KMAC_xxx defines
553 * cpacf_kmctr() - executes the KMCTR (CIPHER MESSAGE WITH COUNTER) instruction
554 * @func: the function code passed to KMCTR; see CPACF_KMCTR_xxx defines
584 return src_len - s.odd; in cpacf_kmctr()
588 * cpacf_prno() - executes the PRNO (PERFORM RANDOM NUMBER OPERATION)
590 * @func: the function code passed to PRNO; see CPACF_PRNO_xxx defines
619 * cpacf_trng() - executes the TRNG subfunction of the PRNO instruction
646 * cpacf_pcc() - executes the PCC (PERFORM CRYPTOGRAPHIC COMPUTATION)
648 * @func: the function code passed to PCC; see CPACF_KM_xxx defines
665 * cpacf_pckmo() - executes the PCKMO (PERFORM CRYPTOGRAPHIC KEY
667 * @func: the function code passed to PCKMO; see CPACF_PCKMO_xxx defines
685 * cpacf_kma() - executes the KMA (CIPHER MESSAGE WITH AUTHENTICATION)
687 * @func: the function code passed to KMA; see CPACF_KMA_xxx defines