Home
last modified time | relevance | path

Searched refs:slen (Results 1 – 25 of 125) sorted by relevance

12345

/linux-6.1.9/drivers/crypto/nx/
Dnx-842.c88 unsigned int slen, unsigned int dlen) in update_param() argument
90 if (p->iremain < slen) in update_param()
95 p->in += slen; in update_param()
96 p->iremain -= slen; in update_param()
165 unsigned int slen = p->iremain, dlen = p->oremain, tmplen; in compress() local
166 unsigned int adj_slen = slen; in compress()
177 if (slen % c->multiple) in compress()
178 adj_slen = round_up(slen, c->multiple); in compress()
179 if (slen < c->minimum) in compress()
181 if (slen > c->maximum) in compress()
[all …]
/linux-6.1.9/drivers/crypto/allwinner/sun8i-ce/
Dsun8i-ce-prng.c31 ctx->slen = 0; in sun8i_ce_prng_exit()
35 unsigned int slen) in sun8i_ce_prng_seed() argument
39 if (ctx->seed && ctx->slen != slen) { in sun8i_ce_prng_seed()
41 ctx->slen = 0; in sun8i_ce_prng_seed()
45 ctx->seed = kmalloc(slen, GFP_KERNEL | GFP_DMA); in sun8i_ce_prng_seed()
49 memcpy(ctx->seed, seed, slen); in sun8i_ce_prng_seed()
50 ctx->slen = slen; in sun8i_ce_prng_seed()
56 unsigned int slen, u8 *dst, unsigned int dlen) in sun8i_ce_prng_generate() argument
74 if (ctx->slen == 0) { in sun8i_ce_prng_generate()
80 todo = dlen + ctx->slen + PRNG_DATA_SIZE * 2; in sun8i_ce_prng_generate()
[all …]
/linux-6.1.9/drivers/crypto/allwinner/sun8i-ss/
Dsun8i-ss-prng.c18 unsigned int slen) in sun8i_ss_prng_seed() argument
22 if (ctx->seed && ctx->slen != slen) { in sun8i_ss_prng_seed()
24 ctx->slen = 0; in sun8i_ss_prng_seed()
28 ctx->seed = kmalloc(slen, GFP_KERNEL | GFP_DMA); in sun8i_ss_prng_seed()
32 memcpy(ctx->seed, seed, slen); in sun8i_ss_prng_seed()
33 ctx->slen = slen; in sun8i_ss_prng_seed()
52 ctx->slen = 0; in sun8i_ss_prng_exit()
56 unsigned int slen, u8 *dst, unsigned int dlen) in sun8i_ss_prng_generate() argument
72 if (ctx->slen == 0) { in sun8i_ss_prng_generate()
101 dma_iv = dma_map_single(ss->dev, ctx->seed, ctx->slen, DMA_TO_DEVICE); in sun8i_ss_prng_generate()
[all …]
/linux-6.1.9/crypto/
Dlz4.c53 static int __lz4_compress_crypto(const u8 *src, unsigned int slen, in __lz4_compress_crypto() argument
57 slen, *dlen, ctx); in __lz4_compress_crypto()
67 unsigned int slen, u8 *dst, unsigned int *dlen, in lz4_scompress() argument
70 return __lz4_compress_crypto(src, slen, dst, dlen, ctx); in lz4_scompress()
74 unsigned int slen, u8 *dst, unsigned int *dlen) in lz4_compress_crypto() argument
78 return __lz4_compress_crypto(src, slen, dst, dlen, ctx->lz4_comp_mem); in lz4_compress_crypto()
81 static int __lz4_decompress_crypto(const u8 *src, unsigned int slen, in __lz4_decompress_crypto() argument
84 int out_len = LZ4_decompress_safe(src, dst, slen, *dlen); in __lz4_decompress_crypto()
94 unsigned int slen, u8 *dst, unsigned int *dlen, in lz4_sdecompress() argument
97 return __lz4_decompress_crypto(src, slen, dst, dlen, NULL); in lz4_sdecompress()
[all …]
Dlz4hc.c52 static int __lz4hc_compress_crypto(const u8 *src, unsigned int slen, in __lz4hc_compress_crypto() argument
55 int out_len = LZ4_compress_HC(src, dst, slen, in __lz4hc_compress_crypto()
66 unsigned int slen, u8 *dst, unsigned int *dlen, in lz4hc_scompress() argument
69 return __lz4hc_compress_crypto(src, slen, dst, dlen, ctx); in lz4hc_scompress()
73 unsigned int slen, u8 *dst, in lz4hc_compress_crypto() argument
78 return __lz4hc_compress_crypto(src, slen, dst, dlen, in lz4hc_compress_crypto()
82 static int __lz4hc_decompress_crypto(const u8 *src, unsigned int slen, in __lz4hc_decompress_crypto() argument
85 int out_len = LZ4_decompress_safe(src, dst, slen, *dlen); in __lz4hc_decompress_crypto()
95 unsigned int slen, u8 *dst, unsigned int *dlen, in lz4hc_sdecompress() argument
98 return __lz4hc_decompress_crypto(src, slen, dst, dlen, NULL); in lz4hc_sdecompress()
[all …]
Dlzo.c52 static int __lzo_compress(const u8 *src, unsigned int slen, in __lzo_compress() argument
58 err = lzo1x_1_compress(src, slen, dst, &tmp_len, ctx); in __lzo_compress()
68 unsigned int slen, u8 *dst, unsigned int *dlen) in lzo_compress() argument
72 return __lzo_compress(src, slen, dst, dlen, ctx->lzo_comp_mem); in lzo_compress()
76 unsigned int slen, u8 *dst, unsigned int *dlen, in lzo_scompress() argument
79 return __lzo_compress(src, slen, dst, dlen, ctx); in lzo_scompress()
82 static int __lzo_decompress(const u8 *src, unsigned int slen, in __lzo_decompress() argument
88 err = lzo1x_decompress_safe(src, slen, dst, &tmp_len); in __lzo_decompress()
98 unsigned int slen, u8 *dst, unsigned int *dlen) in lzo_decompress() argument
100 return __lzo_decompress(src, slen, dst, dlen); in lzo_decompress()
[all …]
Dlzo-rle.c52 static int __lzorle_compress(const u8 *src, unsigned int slen, in __lzorle_compress() argument
58 err = lzorle1x_1_compress(src, slen, dst, &tmp_len, ctx); in __lzorle_compress()
68 unsigned int slen, u8 *dst, unsigned int *dlen) in lzorle_compress() argument
72 return __lzorle_compress(src, slen, dst, dlen, ctx->lzorle_comp_mem); in lzorle_compress()
76 unsigned int slen, u8 *dst, unsigned int *dlen, in lzorle_scompress() argument
79 return __lzorle_compress(src, slen, dst, dlen, ctx); in lzorle_scompress()
82 static int __lzorle_decompress(const u8 *src, unsigned int slen, in __lzorle_decompress() argument
88 err = lzo1x_decompress_safe(src, slen, dst, &tmp_len); in __lzorle_decompress()
98 unsigned int slen, u8 *dst, unsigned int *dlen) in lzorle_decompress() argument
100 return __lzorle_decompress(src, slen, dst, dlen); in lzorle_decompress()
[all …]
Dzstd.c150 static int __zstd_compress(const u8 *src, unsigned int slen, in __zstd_compress() argument
157 out_len = zstd_compress_cctx(zctx->cctx, dst, *dlen, src, slen, &params); in __zstd_compress()
165 unsigned int slen, u8 *dst, unsigned int *dlen) in zstd_compress() argument
169 return __zstd_compress(src, slen, dst, dlen, ctx); in zstd_compress()
173 unsigned int slen, u8 *dst, unsigned int *dlen, in zstd_scompress() argument
176 return __zstd_compress(src, slen, dst, dlen, ctx); in zstd_scompress()
179 static int __zstd_decompress(const u8 *src, unsigned int slen, in __zstd_decompress() argument
185 out_len = zstd_decompress_dctx(zctx->dctx, dst, *dlen, src, slen); in __zstd_decompress()
193 unsigned int slen, u8 *dst, unsigned int *dlen) in zstd_decompress() argument
197 return __zstd_decompress(src, slen, dst, dlen, ctx); in zstd_decompress()
[all …]
D842.c66 const u8 *src, unsigned int slen, in crypto842_compress() argument
71 return sw842_compress(src, slen, dst, dlen, ctx->wmem); in crypto842_compress()
75 const u8 *src, unsigned int slen, in crypto842_scompress() argument
78 return sw842_compress(src, slen, dst, dlen, ctx); in crypto842_scompress()
82 const u8 *src, unsigned int slen, in crypto842_decompress() argument
85 return sw842_decompress(src, slen, dst, dlen); in crypto842_decompress()
89 const u8 *src, unsigned int slen, in crypto842_sdecompress() argument
92 return sw842_decompress(src, slen, dst, dlen); in crypto842_sdecompress()
Ddeflate.c176 static int __deflate_compress(const u8 *src, unsigned int slen, in __deflate_compress() argument
190 stream->avail_in = slen; in __deflate_compress()
206 unsigned int slen, u8 *dst, unsigned int *dlen) in deflate_compress() argument
210 return __deflate_compress(src, slen, dst, dlen, dctx); in deflate_compress()
214 unsigned int slen, u8 *dst, unsigned int *dlen, in deflate_scompress() argument
217 return __deflate_compress(src, slen, dst, dlen, ctx); in deflate_scompress()
220 static int __deflate_decompress(const u8 *src, unsigned int slen, in __deflate_decompress() argument
235 stream->avail_in = slen; in __deflate_decompress()
262 unsigned int slen, u8 *dst, unsigned int *dlen) in deflate_decompress() argument
266 return __deflate_decompress(src, slen, dst, dlen, dctx); in deflate_decompress()
[all …]
Dcompress.c13 const u8 *src, unsigned int slen, in crypto_comp_compress() argument
18 return tfm->__crt_alg->cra_compress.coa_compress(tfm, src, slen, dst, in crypto_comp_compress()
24 const u8 *src, unsigned int slen, in crypto_comp_decompress() argument
29 return tfm->__crt_alg->cra_compress.coa_decompress(tfm, src, slen, dst, in crypto_comp_decompress()
Dansi_cprng.c350 const u8 *src, unsigned int slen, in cprng_get_random() argument
365 const u8 *seed, unsigned int slen) in cprng_reset() argument
371 if (slen < DEFAULT_PRNG_KSZ + DEFAULT_BLK_SZ) in cprng_reset()
374 if (slen >= (2 * DEFAULT_BLK_SZ + DEFAULT_PRNG_KSZ)) in cprng_reset()
386 const u8 *src, unsigned int slen, in fips_cprng_get_random() argument
395 const u8 *seed, unsigned int slen) in fips_cprng_reset() argument
403 if (slen < DEFAULT_PRNG_KSZ + DEFAULT_BLK_SZ) in fips_cprng_reset()
410 rc = cprng_reset(tfm, seed, slen); in fips_cprng_reset()
Drng.c31 int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) in crypto_rng_reset() argument
37 if (!seed && slen) { in crypto_rng_reset()
38 buf = kmalloc(slen, GFP_KERNEL); in crypto_rng_reset()
42 err = get_random_bytes_wait(buf, slen); in crypto_rng_reset()
49 err = crypto_rng_alg(tfm)->seed(tfm, seed, slen); in crypto_rng_reset()
/linux-6.1.9/drivers/crypto/cavium/zip/
Dzip_crypto.c122 static int zip_compress(const u8 *src, unsigned int slen, in zip_compress() argument
144 zip_ops->input_len = slen; in zip_compress()
146 memcpy(zip_ops->input, src, slen); in zip_compress()
158 static int zip_decompress(const u8 *src, unsigned int slen, in zip_decompress() argument
179 memcpy(zip_ops->input, src, slen); in zip_decompress()
183 zip_ops->input[slen++] = 0; in zip_decompress()
185 zip_ops->input_len = slen; in zip_decompress()
221 const u8 *src, unsigned int slen, in zip_comp_compress() argument
226 return zip_compress(src, slen, dst, dlen, zip_ctx); in zip_comp_compress()
230 const u8 *src, unsigned int slen, in zip_comp_decompress() argument
[all …]
Dzip_crypto.h64 const u8 *src, unsigned int slen,
67 const u8 *src, unsigned int slen,
74 const u8 *src, unsigned int slen,
77 const u8 *src, unsigned int slen,
/linux-6.1.9/include/crypto/
Dacompress.h30 unsigned int slen; member
240 unsigned int slen, in acomp_request_set_params() argument
245 req->slen = slen; in acomp_request_set_params()
265 unsigned int slen = req->slen; in crypto_acomp_compress() local
270 crypto_stats_compress(slen, ret, alg); in crypto_acomp_compress()
287 unsigned int slen = req->slen; in crypto_acomp_decompress() local
292 crypto_stats_decompress(slen, ret, alg); in crypto_acomp_decompress()
Drng.h43 const u8 *src, unsigned int slen,
45 int (*seed)(struct crypto_rng *tfm, const u8 *seed, unsigned int slen);
137 const u8 *src, unsigned int slen, in crypto_rng_generate() argument
144 ret = crypto_rng_alg(tfm)->generate(tfm, src, slen, dst, dlen); in crypto_rng_generate()
184 unsigned int slen);
/linux-6.1.9/include/crypto/internal/
Dscompress.h32 unsigned int slen, u8 *dst, unsigned int *dlen,
35 unsigned int slen, u8 *dst, unsigned int *dlen,
77 const u8 *src, unsigned int slen, in crypto_scomp_compress() argument
80 return crypto_scomp_alg(tfm)->compress(tfm, src, slen, dst, dlen, ctx); in crypto_scomp_compress()
84 const u8 *src, unsigned int slen, in crypto_scomp_decompress() argument
88 return crypto_scomp_alg(tfm)->decompress(tfm, src, slen, dst, dlen, in crypto_scomp_decompress()
/linux-6.1.9/scripts/basic/
Dfixdep.c164 static void use_config(const char *m, int slen) in use_config() argument
166 unsigned int hash = strhash(m, slen); in use_config()
168 if (is_defined_config(m, slen, hash)) in use_config()
171 define_config(m, slen, hash); in use_config()
173 printf(" $(wildcard include/config/%.*s) \\\n", slen, m); in use_config()
177 static int str_ends_with(const char *s, int slen, const char *sub) in str_ends_with() argument
181 if (sublen > slen) in str_ends_with()
184 return !memcmp(s + slen - sublen, sub, sublen); in str_ends_with()
/linux-6.1.9/net/ipv4/
Dfib_trie.c124 unsigned char slen; member
367 l->slen = fa->fa_slen; in leaf_new()
401 tn->slen = pos; in tnode_new()
440 if (n && (tn->slen < n->slen)) in put_child()
441 tn->slen = n->slen; in put_child()
710 unsigned char slen = tn->pos; in update_suffix() local
718 slen_max = min_t(unsigned char, tn->pos + tn->bits - 1, tn->slen); in update_suffix()
728 if (!n || (n->slen <= slen)) in update_suffix()
732 stride <<= (n->slen - slen); in update_suffix()
733 slen = n->slen; in update_suffix()
[all …]
/linux-6.1.9/drivers/isdn/hardware/mISDN/
Disdnhdlc.c118 int isdnhdlc_decode(struct isdnhdlc_vars *hdlc, const u8 *src, int slen, in isdnhdlc_decode() argument
159 *count = slen; in isdnhdlc_decode()
161 while (slen > 0) { in isdnhdlc_decode()
168 slen--; in isdnhdlc_decode()
276 *count -= slen; in isdnhdlc_decode()
318 *count -= slen; in isdnhdlc_decode()
341 int isdnhdlc_encode(struct isdnhdlc_vars *hdlc, const u8 *src, u16 slen, in isdnhdlc_encode() argument
350 *count = slen; in isdnhdlc_encode()
353 if ((slen == 1) && (hdlc->state == HDLC_SEND_FAST_FLAG)) in isdnhdlc_encode()
357 if (slen && !hdlc->do_closing) { in isdnhdlc_encode()
[all …]
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Dcls_redirect.c97 socklen_t slen = sizeof(ss); in set_up_conn() local
104 if (CHECK_FAIL(getsockname(*server, sa, &slen))) in set_up_conn()
107 *conn = connect_to_server(sa, slen, type); in set_up_conn()
114 slen = sizeof(ss); in set_up_conn()
115 if (CHECK_FAIL(getsockname(*conn, sa, &slen))) in set_up_conn()
121 slen = sizeof(ss); in set_up_conn()
122 if (CHECK_FAIL(getpeername(*conn, sa, &slen))) in set_up_conn()
374 socklen_t slen; in test_cls_redirect_common() local
382 slen = prepare_addr(&ss, families[i]); in test_cls_redirect_common()
383 if (CHECK_FAIL(!slen)) in test_cls_redirect_common()
[all …]
/linux-6.1.9/net/dns_resolver/
Ddns_key.c245 int slen, dlen, ret = 0; in dns_resolver_cmp() local
256 slen = strlen(src); in dns_resolver_cmp()
258 if (slen <= 0 || dlen <= 0) in dns_resolver_cmp()
260 if (src[slen - 1] == '.') in dns_resolver_cmp()
261 slen--; in dns_resolver_cmp()
264 if (slen != dlen || strncasecmp(src, dsp, slen) != 0) in dns_resolver_cmp()
/linux-6.1.9/drivers/crypto/
Dexynos-rng.c98 const u8 *seed, unsigned int slen) in exynos_rng_set_seed() argument
104 slen = ALIGN_DOWN(slen, 4); in exynos_rng_set_seed()
106 if (slen < EXYNOS_RNG_SEED_SIZE) in exynos_rng_set_seed()
109 for (i = 0; i < slen ; i += 4) { in exynos_rng_set_seed()
195 const u8 *src, unsigned int slen, in exynos_rng_generate() argument
226 unsigned int slen) in exynos_rng_seed() argument
237 ret = exynos_rng_set_seed(ctx->rng, seed, slen); in exynos_rng_seed()
/linux-6.1.9/net/ipv6/
Dseg6.c161 u8 slen; in seg6_genl_sethmac() local
171 slen = nla_get_u8(info->attrs[SEG6_ATTR_SECRETLEN]); in seg6_genl_sethmac()
177 if (slen > SEG6_HMAC_SECRET_LEN) in seg6_genl_sethmac()
183 if (!slen) { in seg6_genl_sethmac()
194 if (slen > nla_len(info->attrs[SEG6_ATTR_SECRET])) { in seg6_genl_sethmac()
213 memcpy(hinfo->secret, secret, slen); in seg6_genl_sethmac()
214 hinfo->slen = slen; in seg6_genl_sethmac()
305 nla_put_u8(msg, SEG6_ATTR_SECRETLEN, hinfo->slen) || in __seg6_hmac_fill_info()
306 nla_put(msg, SEG6_ATTR_SECRET, hinfo->slen, hinfo->secret) || in __seg6_hmac_fill_info()

12345