Lines Matching refs:zip_ctx

72 static int zip_ctx_init(struct zip_kernel_ctx *zip_ctx, int lzs_flag)  in zip_ctx_init()  argument
74 struct zip_operation *comp_ctx = &zip_ctx->zip_comp; in zip_ctx_init()
75 struct zip_operation *decomp_ctx = &zip_ctx->zip_decomp; in zip_ctx_init()
110 static void zip_ctx_exit(struct zip_kernel_ctx *zip_ctx) in zip_ctx_exit() argument
112 struct zip_operation *comp_ctx = &zip_ctx->zip_comp; in zip_ctx_exit()
113 struct zip_operation *dec_ctx = &zip_ctx->zip_decomp; in zip_ctx_exit()
124 struct zip_kernel_ctx *zip_ctx) in zip_compress() argument
131 if (!zip_ctx || !src || !dst || !dlen) in zip_compress()
142 zip_ops = &zip_ctx->zip_comp; in zip_compress()
160 struct zip_kernel_ctx *zip_ctx) in zip_decompress() argument
167 if (!zip_ctx || !src || !dst || !dlen) in zip_decompress()
178 zip_ops = &zip_ctx->zip_decomp; in zip_decompress()
202 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_alloc_comp_ctx_deflate() local
204 ret = zip_ctx_init(zip_ctx, 0); in zip_alloc_comp_ctx_deflate()
212 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_alloc_comp_ctx_lzs() local
214 ret = zip_ctx_init(zip_ctx, 1); in zip_alloc_comp_ctx_lzs()
221 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_free_comp_ctx() local
223 zip_ctx_exit(zip_ctx); in zip_free_comp_ctx()
231 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_comp_compress() local
233 ret = zip_compress(src, slen, dst, dlen, zip_ctx); in zip_comp_compress()
243 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_comp_decompress() local
245 ret = zip_decompress(src, slen, dst, dlen, zip_ctx); in zip_comp_decompress()
254 struct zip_kernel_ctx *zip_ctx; in zip_alloc_scomp_ctx_deflate() local
256 zip_ctx = kzalloc(sizeof(*zip_ctx), GFP_KERNEL); in zip_alloc_scomp_ctx_deflate()
257 if (!zip_ctx) in zip_alloc_scomp_ctx_deflate()
260 ret = zip_ctx_init(zip_ctx, 0); in zip_alloc_scomp_ctx_deflate()
263 kfree_sensitive(zip_ctx); in zip_alloc_scomp_ctx_deflate()
267 return zip_ctx; in zip_alloc_scomp_ctx_deflate()
273 struct zip_kernel_ctx *zip_ctx; in zip_alloc_scomp_ctx_lzs() local
275 zip_ctx = kzalloc(sizeof(*zip_ctx), GFP_KERNEL); in zip_alloc_scomp_ctx_lzs()
276 if (!zip_ctx) in zip_alloc_scomp_ctx_lzs()
279 ret = zip_ctx_init(zip_ctx, 1); in zip_alloc_scomp_ctx_lzs()
282 kfree_sensitive(zip_ctx); in zip_alloc_scomp_ctx_lzs()
286 return zip_ctx; in zip_alloc_scomp_ctx_lzs()
291 struct zip_kernel_ctx *zip_ctx = ctx; in zip_free_scomp_ctx() local
293 zip_ctx_exit(zip_ctx); in zip_free_scomp_ctx()
294 kfree_sensitive(zip_ctx); in zip_free_scomp_ctx()
302 struct zip_kernel_ctx *zip_ctx = ctx; in zip_scomp_compress() local
304 ret = zip_compress(src, slen, dst, dlen, zip_ctx); in zip_scomp_compress()
314 struct zip_kernel_ctx *zip_ctx = ctx; in zip_scomp_decompress() local
316 ret = zip_decompress(src, slen, dst, dlen, zip_ctx); in zip_scomp_decompress()