Lines Matching refs:tsgls

736 	struct cipher_test_sglists *tsgls;  in alloc_cipher_test_sglists()  local
738 tsgls = kmalloc(sizeof(*tsgls), GFP_KERNEL); in alloc_cipher_test_sglists()
739 if (!tsgls) in alloc_cipher_test_sglists()
742 if (init_test_sglist(&tsgls->src) != 0) in alloc_cipher_test_sglists()
744 if (init_test_sglist(&tsgls->dst) != 0) in alloc_cipher_test_sglists()
747 return tsgls; in alloc_cipher_test_sglists()
750 destroy_test_sglist(&tsgls->src); in alloc_cipher_test_sglists()
752 kfree(tsgls); in alloc_cipher_test_sglists()
756 static void free_cipher_test_sglists(struct cipher_test_sglists *tsgls) in free_cipher_test_sglists() argument
758 if (tsgls) { in free_cipher_test_sglists()
759 destroy_test_sglist(&tsgls->src); in free_cipher_test_sglists()
760 destroy_test_sglist(&tsgls->dst); in free_cipher_test_sglists()
761 kfree(tsgls); in free_cipher_test_sglists()
766 static int build_cipher_test_sglists(struct cipher_test_sglists *tsgls, in build_cipher_test_sglists() argument
778 err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask, in build_cipher_test_sglists()
793 tsgls->dst.sgl_ptr = tsgls->src.sgl; in build_cipher_test_sglists()
794 tsgls->dst.nents = tsgls->src.nents; in build_cipher_test_sglists()
803 memcpy(tsgls->dst.sgl, tsgls->src.sgl, in build_cipher_test_sglists()
804 tsgls->src.nents * sizeof(tsgls->src.sgl[0])); in build_cipher_test_sglists()
805 memcpy(tsgls->dst.sgl_saved, tsgls->src.sgl, in build_cipher_test_sglists()
806 tsgls->src.nents * sizeof(tsgls->src.sgl[0])); in build_cipher_test_sglists()
807 tsgls->dst.sgl_ptr = tsgls->dst.sgl; in build_cipher_test_sglists()
808 tsgls->dst.nents = tsgls->src.nents; in build_cipher_test_sglists()
812 return build_test_sglist(&tsgls->dst, in build_cipher_test_sglists()
2033 struct cipher_test_sglists *tsgls) in test_aead_vec_cfg() argument
2099 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_aead_vec_cfg()
2114 aead_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_aead_vec_cfg()
2128 req->src != tsgls->src.sgl_ptr || in test_aead_vec_cfg()
2129 req->dst != tsgls->dst.sgl_ptr || in test_aead_vec_cfg()
2142 if (req->src != tsgls->src.sgl_ptr) in test_aead_vec_cfg()
2144 if (req->dst != tsgls->dst.sgl_ptr) in test_aead_vec_cfg()
2156 if (is_test_sglist_corrupted(&tsgls->src)) { in test_aead_vec_cfg()
2161 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_aead_vec_cfg()
2162 is_test_sglist_corrupted(&tsgls->dst)) { in test_aead_vec_cfg()
2195 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_aead_vec_cfg()
2215 struct cipher_test_sglists *tsgls) in test_aead_vec() argument
2229 req, tsgls); in test_aead_vec()
2246 &cfg, req, tsgls); in test_aead_vec()
2263 struct cipher_test_sglists *tsgls; member
2475 ctx->req, ctx->tsgls); in test_aead_inauthentic_inputs()
2572 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2579 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2594 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2610 ctx->tsgls = tsgls; in test_aead_extra()
2645 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2653 struct cipher_test_sglists *tsgls) in test_aead() argument
2659 err = test_aead_vec(enc, &suite->vecs[i], i, req, tsgls); in test_aead()
2673 struct cipher_test_sglists *tsgls = NULL; in alg_test_aead() local
2697 tsgls = alloc_cipher_test_sglists(); in alg_test_aead()
2698 if (!tsgls) { in alg_test_aead()
2705 err = test_aead(ENCRYPT, suite, req, tsgls); in alg_test_aead()
2709 err = test_aead(DECRYPT, suite, req, tsgls); in alg_test_aead()
2713 err = test_aead_extra(desc, req, tsgls); in alg_test_aead()
2715 free_cipher_test_sglists(tsgls); in alg_test_aead()
2812 struct cipher_test_sglists *tsgls) in test_skcipher_vec_cfg() argument
2872 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_skcipher_vec_cfg()
2883 skcipher_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_skcipher_vec_cfg()
2895 req->src != tsgls->src.sgl_ptr || in test_skcipher_vec_cfg()
2896 req->dst != tsgls->dst.sgl_ptr || in test_skcipher_vec_cfg()
2907 if (req->src != tsgls->src.sgl_ptr) in test_skcipher_vec_cfg()
2909 if (req->dst != tsgls->dst.sgl_ptr) in test_skcipher_vec_cfg()
2921 if (is_test_sglist_corrupted(&tsgls->src)) { in test_skcipher_vec_cfg()
2926 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_skcipher_vec_cfg()
2927 is_test_sglist_corrupted(&tsgls->dst)) { in test_skcipher_vec_cfg()
2948 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_skcipher_vec_cfg()
2975 struct cipher_test_sglists *tsgls) in test_skcipher_vec() argument
2989 req, tsgls); in test_skcipher_vec()
3006 &cfg, req, tsgls); in test_skcipher_vec()
3079 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3199 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3203 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3222 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3230 struct cipher_test_sglists *tsgls) in test_skcipher() argument
3236 err = test_skcipher_vec(enc, &suite->vecs[i], i, req, tsgls); in test_skcipher()
3250 struct cipher_test_sglists *tsgls = NULL; in alg_test_skcipher() local
3274 tsgls = alloc_cipher_test_sglists(); in alg_test_skcipher()
3275 if (!tsgls) { in alg_test_skcipher()
3282 err = test_skcipher(ENCRYPT, suite, req, tsgls); in alg_test_skcipher()
3286 err = test_skcipher(DECRYPT, suite, req, tsgls); in alg_test_skcipher()
3290 err = test_skcipher_vs_generic_impl(desc->generic_driver, req, tsgls); in alg_test_skcipher()
3292 free_cipher_test_sglists(tsgls); in alg_test_skcipher()