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