Home
last modified time | relevance | path

Searched refs:sctx (Results 1 – 25 of 73) sorted by relevance

123

/linux-6.1.9/drivers/md/ !
Ddm-switch.c62 struct switch_ctx *sctx; in alloc_switch_ctx() local
64 sctx = kzalloc(struct_size(sctx, path_list, nr_paths), GFP_KERNEL); in alloc_switch_ctx()
65 if (!sctx) in alloc_switch_ctx()
68 sctx->ti = ti; in alloc_switch_ctx()
69 sctx->region_size = region_size; in alloc_switch_ctx()
71 ti->private = sctx; in alloc_switch_ctx()
73 return sctx; in alloc_switch_ctx()
78 struct switch_ctx *sctx = ti->private; in alloc_region_table() local
82 if (!(sctx->region_size & (sctx->region_size - 1))) in alloc_region_table()
83 sctx->region_size_bits = __ffs(sctx->region_size); in alloc_region_table()
[all …]
/linux-6.1.9/include/crypto/ !
Dsha512_base.h24 struct sha512_state *sctx = shash_desc_ctx(desc); in sha384_base_init() local
26 sctx->state[0] = SHA384_H0; in sha384_base_init()
27 sctx->state[1] = SHA384_H1; in sha384_base_init()
28 sctx->state[2] = SHA384_H2; in sha384_base_init()
29 sctx->state[3] = SHA384_H3; in sha384_base_init()
30 sctx->state[4] = SHA384_H4; in sha384_base_init()
31 sctx->state[5] = SHA384_H5; in sha384_base_init()
32 sctx->state[6] = SHA384_H6; in sha384_base_init()
33 sctx->state[7] = SHA384_H7; in sha384_base_init()
34 sctx->count[0] = sctx->count[1] = 0; in sha384_base_init()
[all …]
Dsm3_base.h23 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_base_init() local
25 sctx->state[0] = SM3_IVA; in sm3_base_init()
26 sctx->state[1] = SM3_IVB; in sm3_base_init()
27 sctx->state[2] = SM3_IVC; in sm3_base_init()
28 sctx->state[3] = SM3_IVD; in sm3_base_init()
29 sctx->state[4] = SM3_IVE; in sm3_base_init()
30 sctx->state[5] = SM3_IVF; in sm3_base_init()
31 sctx->state[6] = SM3_IVG; in sm3_base_init()
32 sctx->state[7] = SM3_IVH; in sm3_base_init()
33 sctx->count = 0; in sm3_base_init()
[all …]
Dsha1_base.h23 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_base_init() local
25 sctx->state[0] = SHA1_H0; in sha1_base_init()
26 sctx->state[1] = SHA1_H1; in sha1_base_init()
27 sctx->state[2] = SHA1_H2; in sha1_base_init()
28 sctx->state[3] = SHA1_H3; in sha1_base_init()
29 sctx->state[4] = SHA1_H4; in sha1_base_init()
30 sctx->count = 0; in sha1_base_init()
40 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_base_do_update() local
41 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; in sha1_base_do_update()
43 sctx->count += len; in sha1_base_do_update()
[all …]
Dsha256_base.h24 struct sha256_state *sctx = shash_desc_ctx(desc); in sha224_base_init() local
26 sha224_init(sctx); in sha224_base_init()
32 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_base_init() local
34 sha256_init(sctx); in sha256_base_init()
43 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_base_do_update() local
44 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE; in sha256_base_do_update()
46 sctx->count += len; in sha256_base_do_update()
54 memcpy(sctx->buf + partial, data, p); in sha256_base_do_update()
58 block_fn(sctx, sctx->buf, 1); in sha256_base_do_update()
65 block_fn(sctx, data, blocks); in sha256_base_do_update()
[all …]
Dsha2.h103 static inline void sha256_init(struct sha256_state *sctx) in sha256_init() argument
105 sctx->state[0] = SHA256_H0; in sha256_init()
106 sctx->state[1] = SHA256_H1; in sha256_init()
107 sctx->state[2] = SHA256_H2; in sha256_init()
108 sctx->state[3] = SHA256_H3; in sha256_init()
109 sctx->state[4] = SHA256_H4; in sha256_init()
110 sctx->state[5] = SHA256_H5; in sha256_init()
111 sctx->state[6] = SHA256_H6; in sha256_init()
112 sctx->state[7] = SHA256_H7; in sha256_init()
113 sctx->count = 0; in sha256_init()
[all …]
/linux-6.1.9/fs/btrfs/ !
Dsend.c312 static void inconsistent_snapshot_error(struct send_ctx *sctx, in inconsistent_snapshot_error() argument
337 btrfs_err(sctx->send_root->fs_info, in inconsistent_snapshot_error()
339 result_string, what, sctx->cmp_key->objectid, in inconsistent_snapshot_error()
340 sctx->send_root->root_key.objectid, in inconsistent_snapshot_error()
341 (sctx->parent_root ? in inconsistent_snapshot_error()
342 sctx->parent_root->root_key.objectid : 0)); in inconsistent_snapshot_error()
346 static bool proto_cmd_ok(const struct send_ctx *sctx, int cmd) in proto_cmd_ok() argument
348 switch (sctx->proto) { in proto_cmd_ok()
356 static int is_waiting_for_move(struct send_ctx *sctx, u64 ino);
359 get_waiting_dir_move(struct send_ctx *sctx, u64 ino);
[all …]
Dscrub.c82 struct scrub_ctx *sctx; member
113 struct scrub_ctx *sctx; member
130 struct scrub_ctx *sctx; member
255 static struct scrub_block *alloc_scrub_block(struct scrub_ctx *sctx, in alloc_scrub_block() argument
267 sblock->sctx = sctx; in alloc_scrub_block()
329 sblock->len += sblock->sctx->fs_info->sectorsize; in alloc_scrub_sector()
405 static int scrub_sectors(struct scrub_ctx *sctx, u64 logical, u32 len,
417 static int scrub_add_sector_to_wr_bio(struct scrub_ctx *sctx,
419 static void scrub_wr_submit(struct scrub_ctx *sctx);
422 static void scrub_put_ctx(struct scrub_ctx *sctx);
[all …]
/linux-6.1.9/arch/powerpc/crypto/ !
Dmd5-glue.c20 static inline void ppc_md5_clear_context(struct md5_state *sctx) in ppc_md5_clear_context() argument
23 u32 *ptr = (u32 *)sctx; in ppc_md5_clear_context()
32 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_init() local
34 sctx->hash[0] = MD5_H0; in ppc_md5_init()
35 sctx->hash[1] = MD5_H1; in ppc_md5_init()
36 sctx->hash[2] = MD5_H2; in ppc_md5_init()
37 sctx->hash[3] = MD5_H3; in ppc_md5_init()
38 sctx->byte_count = 0; in ppc_md5_init()
46 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_update() local
47 const unsigned int offset = sctx->byte_count & 0x3f; in ppc_md5_update()
[all …]
Dsha1-spe-glue.c49 static inline void ppc_sha1_clear_context(struct sha1_state *sctx) in ppc_sha1_clear_context() argument
52 u32 *ptr = (u32 *)sctx; in ppc_sha1_clear_context()
62 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_update() local
63 const unsigned int offset = sctx->count & 0x3f; in ppc_spe_sha1_update()
69 sctx->count += len; in ppc_spe_sha1_update()
70 memcpy((char *)sctx->buffer + offset, src, len); in ppc_spe_sha1_update()
74 sctx->count += len; in ppc_spe_sha1_update()
77 memcpy((char *)sctx->buffer + offset, src, avail); in ppc_spe_sha1_update()
80 ppc_spe_sha1_transform(sctx->state, (const u8 *)sctx->buffer, 1); in ppc_spe_sha1_update()
92 ppc_spe_sha1_transform(sctx->state, src, bytes >> 6); in ppc_spe_sha1_update()
[all …]
Dsha256-spe-glue.c50 static inline void ppc_sha256_clear_context(struct sha256_state *sctx) in ppc_sha256_clear_context() argument
53 u32 *ptr = (u32 *)sctx; in ppc_sha256_clear_context()
63 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha256_update() local
64 const unsigned int offset = sctx->count & 0x3f; in ppc_spe_sha256_update()
70 sctx->count += len; in ppc_spe_sha256_update()
71 memcpy((char *)sctx->buf + offset, src, len); in ppc_spe_sha256_update()
75 sctx->count += len; in ppc_spe_sha256_update()
78 memcpy((char *)sctx->buf + offset, src, avail); in ppc_spe_sha256_update()
81 ppc_spe_sha256_transform(sctx->state, (const u8 *)sctx->buf, 1); in ppc_spe_sha256_update()
94 ppc_spe_sha256_transform(sctx->state, src, bytes >> 6); in ppc_spe_sha256_update()
[all …]
/linux-6.1.9/arch/mips/cavium-octeon/crypto/ !
Docteon-sha512.c32 static void octeon_sha512_store_hash(struct sha512_state *sctx) in octeon_sha512_store_hash() argument
34 write_octeon_64bit_hash_sha512(sctx->state[0], 0); in octeon_sha512_store_hash()
35 write_octeon_64bit_hash_sha512(sctx->state[1], 1); in octeon_sha512_store_hash()
36 write_octeon_64bit_hash_sha512(sctx->state[2], 2); in octeon_sha512_store_hash()
37 write_octeon_64bit_hash_sha512(sctx->state[3], 3); in octeon_sha512_store_hash()
38 write_octeon_64bit_hash_sha512(sctx->state[4], 4); in octeon_sha512_store_hash()
39 write_octeon_64bit_hash_sha512(sctx->state[5], 5); in octeon_sha512_store_hash()
40 write_octeon_64bit_hash_sha512(sctx->state[6], 6); in octeon_sha512_store_hash()
41 write_octeon_64bit_hash_sha512(sctx->state[7], 7); in octeon_sha512_store_hash()
44 static void octeon_sha512_read_hash(struct sha512_state *sctx) in octeon_sha512_read_hash() argument
[all …]
Docteon-sha1.c32 static void octeon_sha1_store_hash(struct sha1_state *sctx) in octeon_sha1_store_hash() argument
34 u64 *hash = (u64 *)sctx->state; in octeon_sha1_store_hash()
38 } hash_tail = { { sctx->state[4], } }; in octeon_sha1_store_hash()
46 static void octeon_sha1_read_hash(struct sha1_state *sctx) in octeon_sha1_read_hash() argument
48 u64 *hash = (u64 *)sctx->state; in octeon_sha1_read_hash()
57 sctx->state[4] = hash_tail.word[0]; in octeon_sha1_read_hash()
75 static void __octeon_sha1_update(struct sha1_state *sctx, const u8 *data, in __octeon_sha1_update() argument
82 partial = sctx->count % SHA1_BLOCK_SIZE; in __octeon_sha1_update()
83 sctx->count += len; in __octeon_sha1_update()
90 memcpy(sctx->buffer + partial, data, in __octeon_sha1_update()
[all …]
Docteon-sha256.c33 static void octeon_sha256_store_hash(struct sha256_state *sctx) in octeon_sha256_store_hash() argument
35 u64 *hash = (u64 *)sctx->state; in octeon_sha256_store_hash()
43 static void octeon_sha256_read_hash(struct sha256_state *sctx) in octeon_sha256_read_hash() argument
45 u64 *hash = (u64 *)sctx->state; in octeon_sha256_read_hash()
67 static void __octeon_sha256_update(struct sha256_state *sctx, const u8 *data, in __octeon_sha256_update() argument
74 partial = sctx->count % SHA256_BLOCK_SIZE; in __octeon_sha256_update()
75 sctx->count += len; in __octeon_sha256_update()
82 memcpy(sctx->buf + partial, data, in __octeon_sha256_update()
84 src = sctx->buf; in __octeon_sha256_update()
95 memcpy(sctx->buf + partial, src, len - done); in __octeon_sha256_update()
[all …]
/linux-6.1.9/arch/s390/crypto/ !
Dsha256_s390.c22 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in s390_sha256_init() local
24 sctx->state[0] = SHA256_H0; in s390_sha256_init()
25 sctx->state[1] = SHA256_H1; in s390_sha256_init()
26 sctx->state[2] = SHA256_H2; in s390_sha256_init()
27 sctx->state[3] = SHA256_H3; in s390_sha256_init()
28 sctx->state[4] = SHA256_H4; in s390_sha256_init()
29 sctx->state[5] = SHA256_H5; in s390_sha256_init()
30 sctx->state[6] = SHA256_H6; in s390_sha256_init()
31 sctx->state[7] = SHA256_H7; in s390_sha256_init()
32 sctx->count = 0; in s390_sha256_init()
[all …]
Dsha3_512_s390.c21 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_512_init() local
23 memset(sctx->state, 0, sizeof(sctx->state)); in sha3_512_init()
24 sctx->count = 0; in sha3_512_init()
25 sctx->func = CPACF_KIMD_SHA3_512; in sha3_512_init()
32 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_512_export() local
35 octx->rsiz = sctx->count; in sha3_512_export()
36 octx->rsizw = sctx->count >> 32; in sha3_512_export()
38 memcpy(octx->st, sctx->state, sizeof(octx->st)); in sha3_512_export()
39 memcpy(octx->buf, sctx->buf, sizeof(octx->buf)); in sha3_512_export()
46 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_512_import() local
[all …]
Dsha3_256_s390.c22 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_256_init() local
24 memset(sctx->state, 0, sizeof(sctx->state)); in sha3_256_init()
25 sctx->count = 0; in sha3_256_init()
26 sctx->func = CPACF_KIMD_SHA3_256; in sha3_256_init()
33 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_256_export() local
36 octx->rsiz = sctx->count; in sha3_256_export()
37 memcpy(octx->st, sctx->state, sizeof(octx->st)); in sha3_256_export()
38 memcpy(octx->buf, sctx->buf, sizeof(octx->buf)); in sha3_256_export()
45 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_256_import() local
48 sctx->count = ictx->rsiz; in sha3_256_import()
[all …]
/linux-6.1.9/arch/arm64/crypto/ !
Dsha3-ce-glue.c37 struct sha3_state *sctx = shash_desc_ctx(desc); in sha3_update() local
43 if ((sctx->partial + len) >= sctx->rsiz) { in sha3_update()
46 if (sctx->partial) { in sha3_update()
47 int p = sctx->rsiz - sctx->partial; in sha3_update()
49 memcpy(sctx->buf + sctx->partial, data, p); in sha3_update()
51 sha3_ce_transform(sctx->st, sctx->buf, 1, digest_size); in sha3_update()
56 sctx->partial = 0; in sha3_update()
59 blocks = len / sctx->rsiz; in sha3_update()
60 len %= sctx->rsiz; in sha3_update()
66 rem = sha3_ce_transform(sctx->st, data, blocks, in sha3_update()
[all …]
/linux-6.1.9/arch/sparc/crypto/ !
Dsha1_glue.c30 static void __sha1_sparc64_update(struct sha1_state *sctx, const u8 *data, in __sha1_sparc64_update() argument
35 sctx->count += len; in __sha1_sparc64_update()
38 memcpy(sctx->buffer + partial, data, done); in __sha1_sparc64_update()
39 sha1_sparc64_transform(sctx->state, sctx->buffer, 1); in __sha1_sparc64_update()
44 sha1_sparc64_transform(sctx->state, data + done, rounds); in __sha1_sparc64_update()
48 memcpy(sctx->buffer, data + done, len - done); in __sha1_sparc64_update()
54 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_sparc64_update() local
55 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; in sha1_sparc64_update()
59 sctx->count += len; in sha1_sparc64_update()
60 memcpy(sctx->buffer + partial, data, len); in sha1_sparc64_update()
[all …]
Dmd5_glue.c46 static void __md5_sparc64_update(struct md5_state *sctx, const u8 *data, in __md5_sparc64_update() argument
51 sctx->byte_count += len; in __md5_sparc64_update()
54 memcpy((u8 *)sctx->block + partial, data, done); in __md5_sparc64_update()
55 md5_sparc64_transform(sctx->hash, (u8 *)sctx->block, 1); in __md5_sparc64_update()
60 md5_sparc64_transform(sctx->hash, data + done, rounds); in __md5_sparc64_update()
64 memcpy(sctx->block, data + done, len - done); in __md5_sparc64_update()
70 struct md5_state *sctx = shash_desc_ctx(desc); in md5_sparc64_update() local
71 unsigned int partial = sctx->byte_count % MD5_HMAC_BLOCK_SIZE; in md5_sparc64_update()
75 sctx->byte_count += len; in md5_sparc64_update()
76 memcpy((u8 *)sctx->block + partial, data, len); in md5_sparc64_update()
[all …]
Dsha256_glue.c30 static void __sha256_sparc64_update(struct sha256_state *sctx, const u8 *data, in __sha256_sparc64_update() argument
35 sctx->count += len; in __sha256_sparc64_update()
38 memcpy(sctx->buf + partial, data, done); in __sha256_sparc64_update()
39 sha256_sparc64_transform(sctx->state, sctx->buf, 1); in __sha256_sparc64_update()
44 sha256_sparc64_transform(sctx->state, data + done, rounds); in __sha256_sparc64_update()
48 memcpy(sctx->buf, data + done, len - done); in __sha256_sparc64_update()
54 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_sparc64_update() local
55 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE; in sha256_sparc64_update()
59 sctx->count += len; in sha256_sparc64_update()
60 memcpy(sctx->buf + partial, data, len); in sha256_sparc64_update()
[all …]
Dsha512_glue.c29 static void __sha512_sparc64_update(struct sha512_state *sctx, const u8 *data, in __sha512_sparc64_update() argument
34 if ((sctx->count[0] += len) < len) in __sha512_sparc64_update()
35 sctx->count[1]++; in __sha512_sparc64_update()
38 memcpy(sctx->buf + partial, data, done); in __sha512_sparc64_update()
39 sha512_sparc64_transform(sctx->state, sctx->buf, 1); in __sha512_sparc64_update()
44 sha512_sparc64_transform(sctx->state, data + done, rounds); in __sha512_sparc64_update()
48 memcpy(sctx->buf, data + done, len - done); in __sha512_sparc64_update()
54 struct sha512_state *sctx = shash_desc_ctx(desc); in sha512_sparc64_update() local
55 unsigned int partial = sctx->count[0] % SHA512_BLOCK_SIZE; in sha512_sparc64_update()
59 if ((sctx->count[0] += len) < len) in sha512_sparc64_update()
[all …]
/linux-6.1.9/crypto/ !
Dsha3_generic.c163 struct sha3_state *sctx = shash_desc_ctx(desc); in crypto_sha3_init() local
166 sctx->rsiz = 200 - 2 * digest_size; in crypto_sha3_init()
167 sctx->rsizw = sctx->rsiz / 8; in crypto_sha3_init()
168 sctx->partial = 0; in crypto_sha3_init()
170 memset(sctx->st, 0, sizeof(sctx->st)); in crypto_sha3_init()
178 struct sha3_state *sctx = shash_desc_ctx(desc); in crypto_sha3_update() local
185 if ((sctx->partial + len) > (sctx->rsiz - 1)) { in crypto_sha3_update()
186 if (sctx->partial) { in crypto_sha3_update()
187 done = -sctx->partial; in crypto_sha3_update()
188 memcpy(sctx->buf + sctx->partial, data, in crypto_sha3_update()
[all …]
/linux-6.1.9/drivers/crypto/nx/ !
Dnx-sha256.c44 struct sha256_state_be *sctx = shash_desc_ctx(desc); in nx_sha256_init() local
46 memset(sctx, 0, sizeof *sctx); in nx_sha256_init()
48 sctx->state[0] = __cpu_to_be32(SHA256_H0); in nx_sha256_init()
49 sctx->state[1] = __cpu_to_be32(SHA256_H1); in nx_sha256_init()
50 sctx->state[2] = __cpu_to_be32(SHA256_H2); in nx_sha256_init()
51 sctx->state[3] = __cpu_to_be32(SHA256_H3); in nx_sha256_init()
52 sctx->state[4] = __cpu_to_be32(SHA256_H4); in nx_sha256_init()
53 sctx->state[5] = __cpu_to_be32(SHA256_H5); in nx_sha256_init()
54 sctx->state[6] = __cpu_to_be32(SHA256_H6); in nx_sha256_init()
55 sctx->state[7] = __cpu_to_be32(SHA256_H7); in nx_sha256_init()
[all …]
Dnx-sha512.c44 struct sha512_state_be *sctx = shash_desc_ctx(desc); in nx_sha512_init() local
46 memset(sctx, 0, sizeof *sctx); in nx_sha512_init()
48 sctx->state[0] = __cpu_to_be64(SHA512_H0); in nx_sha512_init()
49 sctx->state[1] = __cpu_to_be64(SHA512_H1); in nx_sha512_init()
50 sctx->state[2] = __cpu_to_be64(SHA512_H2); in nx_sha512_init()
51 sctx->state[3] = __cpu_to_be64(SHA512_H3); in nx_sha512_init()
52 sctx->state[4] = __cpu_to_be64(SHA512_H4); in nx_sha512_init()
53 sctx->state[5] = __cpu_to_be64(SHA512_H5); in nx_sha512_init()
54 sctx->state[6] = __cpu_to_be64(SHA512_H6); in nx_sha512_init()
55 sctx->state[7] = __cpu_to_be64(SHA512_H7); in nx_sha512_init()
[all …]

123