Lines Matching refs:tsgls
712 struct cipher_test_sglists *tsgls; in alloc_cipher_test_sglists() local
714 tsgls = kmalloc(sizeof(*tsgls), GFP_KERNEL); in alloc_cipher_test_sglists()
715 if (!tsgls) in alloc_cipher_test_sglists()
718 if (init_test_sglist(&tsgls->src) != 0) in alloc_cipher_test_sglists()
720 if (init_test_sglist(&tsgls->dst) != 0) in alloc_cipher_test_sglists()
723 return tsgls; in alloc_cipher_test_sglists()
726 destroy_test_sglist(&tsgls->src); in alloc_cipher_test_sglists()
728 kfree(tsgls); in alloc_cipher_test_sglists()
732 static void free_cipher_test_sglists(struct cipher_test_sglists *tsgls) in free_cipher_test_sglists() argument
734 if (tsgls) { in free_cipher_test_sglists()
735 destroy_test_sglist(&tsgls->src); in free_cipher_test_sglists()
736 destroy_test_sglist(&tsgls->dst); in free_cipher_test_sglists()
737 kfree(tsgls); in free_cipher_test_sglists()
742 static int build_cipher_test_sglists(struct cipher_test_sglists *tsgls, in build_cipher_test_sglists() argument
754 err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask, in build_cipher_test_sglists()
763 tsgls->dst.sgl_ptr = tsgls->src.sgl; in build_cipher_test_sglists()
764 tsgls->dst.nents = tsgls->src.nents; in build_cipher_test_sglists()
767 return build_test_sglist(&tsgls->dst, in build_cipher_test_sglists()
1924 struct cipher_test_sglists *tsgls) in test_aead_vec_cfg() argument
1990 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_aead_vec_cfg()
2005 aead_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_aead_vec_cfg()
2019 req->src != tsgls->src.sgl_ptr || in test_aead_vec_cfg()
2020 req->dst != tsgls->dst.sgl_ptr || in test_aead_vec_cfg()
2033 if (req->src != tsgls->src.sgl_ptr) in test_aead_vec_cfg()
2035 if (req->dst != tsgls->dst.sgl_ptr) in test_aead_vec_cfg()
2047 if (is_test_sglist_corrupted(&tsgls->src)) { in test_aead_vec_cfg()
2052 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_aead_vec_cfg()
2053 is_test_sglist_corrupted(&tsgls->dst)) { in test_aead_vec_cfg()
2086 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_aead_vec_cfg()
2105 struct cipher_test_sglists *tsgls) in test_aead_vec() argument
2119 req, tsgls); in test_aead_vec()
2133 &cfg, req, tsgls); in test_aead_vec()
2149 struct cipher_test_sglists *tsgls; member
2355 ctx->req, ctx->tsgls); in test_aead_inauthentic_inputs()
2451 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2458 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2473 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2488 ctx->tsgls = tsgls; in test_aead_extra()
2523 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2531 struct cipher_test_sglists *tsgls) in test_aead() argument
2537 err = test_aead_vec(enc, &suite->vecs[i], i, req, tsgls); in test_aead()
2551 struct cipher_test_sglists *tsgls = NULL; in alg_test_aead() local
2575 tsgls = alloc_cipher_test_sglists(); in alg_test_aead()
2576 if (!tsgls) { in alg_test_aead()
2583 err = test_aead(ENCRYPT, suite, req, tsgls); in alg_test_aead()
2587 err = test_aead(DECRYPT, suite, req, tsgls); in alg_test_aead()
2591 err = test_aead_extra(desc, req, tsgls); in alg_test_aead()
2593 free_cipher_test_sglists(tsgls); in alg_test_aead()
2690 struct cipher_test_sglists *tsgls) in test_skcipher_vec_cfg() argument
2750 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_skcipher_vec_cfg()
2761 skcipher_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_skcipher_vec_cfg()
2773 req->src != tsgls->src.sgl_ptr || in test_skcipher_vec_cfg()
2774 req->dst != tsgls->dst.sgl_ptr || in test_skcipher_vec_cfg()
2785 if (req->src != tsgls->src.sgl_ptr) in test_skcipher_vec_cfg()
2787 if (req->dst != tsgls->dst.sgl_ptr) in test_skcipher_vec_cfg()
2799 if (is_test_sglist_corrupted(&tsgls->src)) { in test_skcipher_vec_cfg()
2804 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_skcipher_vec_cfg()
2805 is_test_sglist_corrupted(&tsgls->dst)) { in test_skcipher_vec_cfg()
2826 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_skcipher_vec_cfg()
2853 struct cipher_test_sglists *tsgls) in test_skcipher_vec() argument
2867 req, tsgls); in test_skcipher_vec()
2881 &cfg, req, tsgls); in test_skcipher_vec()
2953 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3068 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3072 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3091 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3099 struct cipher_test_sglists *tsgls) in test_skcipher() argument
3105 err = test_skcipher_vec(enc, &suite->vecs[i], i, req, tsgls); in test_skcipher()
3119 struct cipher_test_sglists *tsgls = NULL; in alg_test_skcipher() local
3143 tsgls = alloc_cipher_test_sglists(); in alg_test_skcipher()
3144 if (!tsgls) { in alg_test_skcipher()
3151 err = test_skcipher(ENCRYPT, suite, req, tsgls); in alg_test_skcipher()
3155 err = test_skcipher(DECRYPT, suite, req, tsgls); in alg_test_skcipher()
3159 err = test_skcipher_vs_generic_impl(desc->generic_driver, req, tsgls); in alg_test_skcipher()
3161 free_cipher_test_sglists(tsgls); in alg_test_skcipher()