Lines Matching refs:tsgls
709 struct cipher_test_sglists *tsgls; in alloc_cipher_test_sglists() local
711 tsgls = kmalloc(sizeof(*tsgls), GFP_KERNEL); in alloc_cipher_test_sglists()
712 if (!tsgls) in alloc_cipher_test_sglists()
715 if (init_test_sglist(&tsgls->src) != 0) in alloc_cipher_test_sglists()
717 if (init_test_sglist(&tsgls->dst) != 0) in alloc_cipher_test_sglists()
720 return tsgls; in alloc_cipher_test_sglists()
723 destroy_test_sglist(&tsgls->src); in alloc_cipher_test_sglists()
725 kfree(tsgls); in alloc_cipher_test_sglists()
729 static void free_cipher_test_sglists(struct cipher_test_sglists *tsgls) in free_cipher_test_sglists() argument
731 if (tsgls) { in free_cipher_test_sglists()
732 destroy_test_sglist(&tsgls->src); in free_cipher_test_sglists()
733 destroy_test_sglist(&tsgls->dst); in free_cipher_test_sglists()
734 kfree(tsgls); in free_cipher_test_sglists()
739 static int build_cipher_test_sglists(struct cipher_test_sglists *tsgls, in build_cipher_test_sglists() argument
751 err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask, in build_cipher_test_sglists()
760 tsgls->dst.sgl_ptr = tsgls->src.sgl; in build_cipher_test_sglists()
761 tsgls->dst.nents = tsgls->src.nents; in build_cipher_test_sglists()
764 return build_test_sglist(&tsgls->dst, in build_cipher_test_sglists()
1931 struct cipher_test_sglists *tsgls) in test_aead_vec_cfg() argument
1996 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_aead_vec_cfg()
2011 aead_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_aead_vec_cfg()
2025 req->src != tsgls->src.sgl_ptr || in test_aead_vec_cfg()
2026 req->dst != tsgls->dst.sgl_ptr || in test_aead_vec_cfg()
2039 if (req->src != tsgls->src.sgl_ptr) in test_aead_vec_cfg()
2041 if (req->dst != tsgls->dst.sgl_ptr) in test_aead_vec_cfg()
2053 if (is_test_sglist_corrupted(&tsgls->src)) { in test_aead_vec_cfg()
2058 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_aead_vec_cfg()
2059 is_test_sglist_corrupted(&tsgls->dst)) { in test_aead_vec_cfg()
2092 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_aead_vec_cfg()
2112 struct cipher_test_sglists *tsgls) in test_aead_vec() argument
2126 req, tsgls); in test_aead_vec()
2140 &cfg, req, tsgls); in test_aead_vec()
2157 struct cipher_test_sglists *tsgls; member
2363 ctx->req, ctx->tsgls); in test_aead_inauthentic_inputs()
2459 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2466 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2482 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2498 ctx->tsgls = tsgls; in test_aead_extra()
2534 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2543 struct cipher_test_sglists *tsgls) in test_aead() argument
2550 tsgls); in test_aead()
2564 struct cipher_test_sglists *tsgls = NULL; in alg_test_aead() local
2587 tsgls = alloc_cipher_test_sglists(); in alg_test_aead()
2588 if (!tsgls) { in alg_test_aead()
2595 err = test_aead(driver, ENCRYPT, suite, req, tsgls); in alg_test_aead()
2599 err = test_aead(driver, DECRYPT, suite, req, tsgls); in alg_test_aead()
2603 err = test_aead_extra(driver, desc, req, tsgls); in alg_test_aead()
2605 free_cipher_test_sglists(tsgls); in alg_test_aead()
2703 struct cipher_test_sglists *tsgls) in test_skcipher_vec_cfg() argument
2762 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_skcipher_vec_cfg()
2773 skcipher_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_skcipher_vec_cfg()
2785 req->src != tsgls->src.sgl_ptr || in test_skcipher_vec_cfg()
2786 req->dst != tsgls->dst.sgl_ptr || in test_skcipher_vec_cfg()
2797 if (req->src != tsgls->src.sgl_ptr) in test_skcipher_vec_cfg()
2799 if (req->dst != tsgls->dst.sgl_ptr) in test_skcipher_vec_cfg()
2811 if (is_test_sglist_corrupted(&tsgls->src)) { in test_skcipher_vec_cfg()
2816 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_skcipher_vec_cfg()
2817 is_test_sglist_corrupted(&tsgls->dst)) { in test_skcipher_vec_cfg()
2838 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_skcipher_vec_cfg()
2866 struct cipher_test_sglists *tsgls) in test_skcipher_vec() argument
2880 req, tsgls); in test_skcipher_vec()
2894 &cfg, req, tsgls); in test_skcipher_vec()
2967 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3081 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3085 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3105 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3114 struct cipher_test_sglists *tsgls) in test_skcipher() argument
3121 tsgls); in test_skcipher()
3135 struct cipher_test_sglists *tsgls = NULL; in alg_test_skcipher() local
3158 tsgls = alloc_cipher_test_sglists(); in alg_test_skcipher()
3159 if (!tsgls) { in alg_test_skcipher()
3166 err = test_skcipher(driver, ENCRYPT, suite, req, tsgls); in alg_test_skcipher()
3170 err = test_skcipher(driver, DECRYPT, suite, req, tsgls); in alg_test_skcipher()
3175 tsgls); in alg_test_skcipher()
3177 free_cipher_test_sglists(tsgls); in alg_test_skcipher()