Lines Matching refs:tsgls
747 struct cipher_test_sglists *tsgls; in alloc_cipher_test_sglists() local
749 tsgls = kmalloc(sizeof(*tsgls), GFP_KERNEL); in alloc_cipher_test_sglists()
750 if (!tsgls) in alloc_cipher_test_sglists()
753 if (init_test_sglist(&tsgls->src) != 0) in alloc_cipher_test_sglists()
755 if (init_test_sglist(&tsgls->dst) != 0) in alloc_cipher_test_sglists()
758 return tsgls; in alloc_cipher_test_sglists()
761 destroy_test_sglist(&tsgls->src); in alloc_cipher_test_sglists()
763 kfree(tsgls); in alloc_cipher_test_sglists()
767 static void free_cipher_test_sglists(struct cipher_test_sglists *tsgls) in free_cipher_test_sglists() argument
769 if (tsgls) { in free_cipher_test_sglists()
770 destroy_test_sglist(&tsgls->src); in free_cipher_test_sglists()
771 destroy_test_sglist(&tsgls->dst); in free_cipher_test_sglists()
772 kfree(tsgls); in free_cipher_test_sglists()
777 static int build_cipher_test_sglists(struct cipher_test_sglists *tsgls, in build_cipher_test_sglists() argument
789 err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask, in build_cipher_test_sglists()
804 tsgls->dst.sgl_ptr = tsgls->src.sgl; in build_cipher_test_sglists()
805 tsgls->dst.nents = tsgls->src.nents; in build_cipher_test_sglists()
814 memcpy(tsgls->dst.sgl, tsgls->src.sgl, in build_cipher_test_sglists()
815 tsgls->src.nents * sizeof(tsgls->src.sgl[0])); in build_cipher_test_sglists()
816 memcpy(tsgls->dst.sgl_saved, tsgls->src.sgl, in build_cipher_test_sglists()
817 tsgls->src.nents * sizeof(tsgls->src.sgl[0])); in build_cipher_test_sglists()
818 tsgls->dst.sgl_ptr = tsgls->dst.sgl; in build_cipher_test_sglists()
819 tsgls->dst.nents = tsgls->src.nents; in build_cipher_test_sglists()
823 return build_test_sglist(&tsgls->dst, in build_cipher_test_sglists()
2065 struct cipher_test_sglists *tsgls) in test_aead_vec_cfg() argument
2131 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_aead_vec_cfg()
2146 aead_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_aead_vec_cfg()
2160 req->src != tsgls->src.sgl_ptr || in test_aead_vec_cfg()
2161 req->dst != tsgls->dst.sgl_ptr || in test_aead_vec_cfg()
2174 if (req->src != tsgls->src.sgl_ptr) in test_aead_vec_cfg()
2176 if (req->dst != tsgls->dst.sgl_ptr) in test_aead_vec_cfg()
2188 if (is_test_sglist_corrupted(&tsgls->src)) { in test_aead_vec_cfg()
2193 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_aead_vec_cfg()
2194 is_test_sglist_corrupted(&tsgls->dst)) { in test_aead_vec_cfg()
2227 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_aead_vec_cfg()
2247 struct cipher_test_sglists *tsgls) in test_aead_vec() argument
2261 req, tsgls); in test_aead_vec()
2278 &cfg, req, tsgls); in test_aead_vec()
2295 struct cipher_test_sglists *tsgls; member
2507 ctx->req, ctx->tsgls); in test_aead_inauthentic_inputs()
2604 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2611 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2626 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2642 ctx->tsgls = tsgls; in test_aead_extra()
2677 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2685 struct cipher_test_sglists *tsgls) in test_aead() argument
2691 err = test_aead_vec(enc, &suite->vecs[i], i, req, tsgls); in test_aead()
2705 struct cipher_test_sglists *tsgls = NULL; in alg_test_aead() local
2731 tsgls = alloc_cipher_test_sglists(); in alg_test_aead()
2732 if (!tsgls) { in alg_test_aead()
2739 err = test_aead(ENCRYPT, suite, req, tsgls); in alg_test_aead()
2743 err = test_aead(DECRYPT, suite, req, tsgls); in alg_test_aead()
2747 err = test_aead_extra(desc, req, tsgls); in alg_test_aead()
2749 free_cipher_test_sglists(tsgls); in alg_test_aead()
2846 struct cipher_test_sglists *tsgls) in test_skcipher_vec_cfg() argument
2899 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_skcipher_vec_cfg()
2910 skcipher_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_skcipher_vec_cfg()
2922 req->src != tsgls->src.sgl_ptr || in test_skcipher_vec_cfg()
2923 req->dst != tsgls->dst.sgl_ptr || in test_skcipher_vec_cfg()
2934 if (req->src != tsgls->src.sgl_ptr) in test_skcipher_vec_cfg()
2936 if (req->dst != tsgls->dst.sgl_ptr) in test_skcipher_vec_cfg()
2948 if (is_test_sglist_corrupted(&tsgls->src)) { in test_skcipher_vec_cfg()
2953 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_skcipher_vec_cfg()
2954 is_test_sglist_corrupted(&tsgls->dst)) { in test_skcipher_vec_cfg()
2975 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_skcipher_vec_cfg()
3002 struct cipher_test_sglists *tsgls) in test_skcipher_vec() argument
3016 req, tsgls); in test_skcipher_vec()
3033 &cfg, req, tsgls); in test_skcipher_vec()
3106 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3222 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3226 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3245 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3253 struct cipher_test_sglists *tsgls) in test_skcipher() argument
3259 err = test_skcipher_vec(enc, &suite->vecs[i], i, req, tsgls); in test_skcipher()
3273 struct cipher_test_sglists *tsgls = NULL; in alg_test_skcipher() local
3299 tsgls = alloc_cipher_test_sglists(); in alg_test_skcipher()
3300 if (!tsgls) { in alg_test_skcipher()
3307 err = test_skcipher(ENCRYPT, suite, req, tsgls); in alg_test_skcipher()
3311 err = test_skcipher(DECRYPT, suite, req, tsgls); in alg_test_skcipher()
3315 err = test_skcipher_vs_generic_impl(desc->generic_driver, req, tsgls); in alg_test_skcipher()
3317 free_cipher_test_sglists(tsgls); in alg_test_skcipher()