| /linux/drivers/md/ |
| H A D | dm-switch.c | 63 struct switch_ctx *sctx; in alloc_switch_ctx() local 65 sctx = kzalloc_flex(*sctx, path_list, nr_paths); in alloc_switch_ctx() 66 if (!sctx) in alloc_switch_ctx() 69 sctx->ti = ti; in alloc_switch_ctx() 70 sctx->region_size = region_size; in alloc_switch_ctx() 72 ti->private = sctx; in alloc_switch_ctx() 74 return sctx; in alloc_switch_ctx() 79 struct switch_ctx *sctx = ti->private; in alloc_region_table() local 83 if (!(sctx->region_size & (sctx->region_size - 1))) in alloc_region_table() 84 sctx->region_size_bits = __ffs(sctx->region_size); in alloc_region_table() [all …]
|
| /linux/fs/btrfs/ |
| H A D | send.c | 373 static void inconsistent_snapshot_error(struct send_ctx *sctx, in inconsistent_snapshot_error() argument 398 btrfs_err(sctx->send_root->fs_info, in inconsistent_snapshot_error() 400 result_string, what, sctx->cmp_key->objectid, in inconsistent_snapshot_error() 401 btrfs_root_id(sctx->send_root), in inconsistent_snapshot_error() 402 (sctx->parent_root ? btrfs_root_id(sctx->parent_root) : 0)); in inconsistent_snapshot_error() 406 static bool proto_cmd_ok(const struct send_ctx *sctx, int cmd) in proto_cmd_ok() argument 408 switch (sctx->proto) { in proto_cmd_ok() 416 static int is_waiting_for_move(struct send_ctx *sctx, u64 ino); 419 get_waiting_dir_move(struct send_ctx *sctx, u64 ino); 421 static int is_waiting_for_rm(struct send_ctx *sctx, u64 dir_ino, u64 gen); [all …]
|
| H A D | scrub.c | 138 struct scrub_ctx *sctx; member 350 stripe->sctx = NULL; in release_scrub_stripe() 396 static void scrub_put_ctx(struct scrub_ctx *sctx); 430 static noinline_for_stack void scrub_free_ctx(struct scrub_ctx *sctx) in scrub_free_ctx() argument 434 if (!sctx) in scrub_free_ctx() 438 release_scrub_stripe(&sctx->stripes[i]); in scrub_free_ctx() 440 kvfree(sctx); in scrub_free_ctx() 443 static void scrub_put_ctx(struct scrub_ctx *sctx) in scrub_put_ctx() argument 445 if (refcount_dec_and_test(&sctx->refs)) in scrub_put_ctx() 446 scrub_free_ctx(sctx); in scrub_put_ctx() [all …]
|
| /linux/drivers/crypto/nx/ |
| H A D | nx-sha512.c | 47 struct sha512_state_be *sctx = shash_desc_ctx(desc); in nx_sha512_init() local 49 sctx->state[0] = __cpu_to_be64(SHA512_H0); in nx_sha512_init() 50 sctx->state[1] = __cpu_to_be64(SHA512_H1); in nx_sha512_init() 51 sctx->state[2] = __cpu_to_be64(SHA512_H2); in nx_sha512_init() 52 sctx->state[3] = __cpu_to_be64(SHA512_H3); in nx_sha512_init() 53 sctx->state[4] = __cpu_to_be64(SHA512_H4); in nx_sha512_init() 54 sctx->state[5] = __cpu_to_be64(SHA512_H5); in nx_sha512_init() 55 sctx->state[6] = __cpu_to_be64(SHA512_H6); in nx_sha512_init() 56 sctx->state[7] = __cpu_to_be64(SHA512_H7); in nx_sha512_init() 57 sctx->count[0] = 0; in nx_sha512_init() [all …]
|
| H A D | nx-sha256.c | 47 struct sha256_state_be *sctx = shash_desc_ctx(desc); in nx_sha256_init() local 49 sctx->state[0] = __cpu_to_be32(SHA256_H0); in nx_sha256_init() 50 sctx->state[1] = __cpu_to_be32(SHA256_H1); in nx_sha256_init() 51 sctx->state[2] = __cpu_to_be32(SHA256_H2); in nx_sha256_init() 52 sctx->state[3] = __cpu_to_be32(SHA256_H3); in nx_sha256_init() 53 sctx->state[4] = __cpu_to_be32(SHA256_H4); in nx_sha256_init() 54 sctx->state[5] = __cpu_to_be32(SHA256_H5); in nx_sha256_init() 55 sctx->state[6] = __cpu_to_be32(SHA256_H6); in nx_sha256_init() 56 sctx->state[7] = __cpu_to_be32(SHA256_H7); in nx_sha256_init() 57 sctx->count = 0; in nx_sha256_init() [all …]
|
| H A D | nx-aes-xcbc.c | 157 struct xcbc_state *sctx = shash_desc_ctx(desc); in nx_xcbc_init() local 159 memset(sctx, 0, sizeof *sctx); in nx_xcbc_init() 169 struct xcbc_state *sctx = shash_desc_ctx(desc); in nx_xcbc_update() local 181 memcpy(csbcpb->cpb.aes_xcbc.out_cv_mac, sctx->state, AES_BLOCK_SIZE); in nx_xcbc_update() 194 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state, in nx_xcbc_update() 237 memcpy(sctx->state, csbcpb->cpb.aes_xcbc.out_cv_mac, AES_BLOCK_SIZE); in nx_xcbc_update() 248 struct xcbc_state *sctx = shash_desc_ctx(desc); in nx_xcbc_finup() local 259 memcpy(csbcpb->cpb.aes_xcbc.cv, sctx->state, AES_BLOCK_SIZE); in nx_xcbc_finup()
|
| /linux/include/crypto/ |
| H A D | sm3.h | 49 static inline void sm3_init(struct sm3_state *sctx) in sm3_init() argument 51 sctx->state[0] = SM3_IVA; in sm3_init() 52 sctx->state[1] = SM3_IVB; in sm3_init() 53 sctx->state[2] = SM3_IVC; in sm3_init() 54 sctx->state[3] = SM3_IVD; in sm3_init() 55 sctx->state[4] = SM3_IVE; in sm3_init() 56 sctx->state[5] = SM3_IVF; in sm3_init() 57 sctx->state[6] = SM3_IVG; in sm3_init() 58 sctx->state[7] = SM3_IVH; in sm3_init() 59 sctx->count = 0; in sm3_init() [all …]
|
| H A D | sm3_base.h | 33 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_base_do_update_blocks() local 35 sctx->count += len - remain; in sm3_base_do_update_blocks() 36 block_fn(sctx, data, len / SM3_BLOCK_SIZE); in sm3_base_do_update_blocks() 45 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_base_do_finup() local 63 sctx->count += len; in sm3_base_do_finup() 64 block.b64[bit_offset] = cpu_to_be64(sctx->count << 3); in sm3_base_do_finup() 65 block_fn(sctx, block.u8, (bit_offset + 1) * 8 / SM3_BLOCK_SIZE); in sm3_base_do_finup() 73 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_base_finish() local 78 put_unaligned_be32(sctx->state[i], digest++); in sm3_base_finish()
|
| H A D | sha2.h | 74 static inline void sha224_block_init(struct crypto_sha256_state *sctx) in sha224_block_init() argument 76 sctx->state[0] = SHA224_H0; in sha224_block_init() 77 sctx->state[1] = SHA224_H1; in sha224_block_init() 78 sctx->state[2] = SHA224_H2; in sha224_block_init() 79 sctx->state[3] = SHA224_H3; in sha224_block_init() 80 sctx->state[4] = SHA224_H4; in sha224_block_init() 81 sctx->state[5] = SHA224_H5; in sha224_block_init() 82 sctx->state[6] = SHA224_H6; in sha224_block_init() 83 sctx->state[7] = SHA224_H7; in sha224_block_init() 84 sctx->count = 0; in sha224_block_init() [all …]
|
| /linux/arch/s390/crypto/ |
| H A D | aes_s390.c | 76 struct s390_aes_ctx *sctx = crypto_skcipher_ctx(tfm); in setkey_fallback_skcipher() local 78 crypto_skcipher_clear_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher() 80 crypto_skcipher_set_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher() 83 return crypto_skcipher_setkey(sctx->fallback.skcipher, key, len); in setkey_fallback_skcipher() 86 static int fallback_skcipher_crypt(struct s390_aes_ctx *sctx, in fallback_skcipher_crypt() argument 93 skcipher_request_set_tfm(subreq, sctx->fallback.skcipher); in fallback_skcipher_crypt() 102 struct s390_aes_ctx *sctx = crypto_skcipher_ctx(tfm); in ecb_aes_set_key() local 111 sctx->fc = (fc && cpacf_test_func(&km_functions, fc)) ? fc : 0; in ecb_aes_set_key() 112 if (!sctx->fc) in ecb_aes_set_key() 115 sctx->key_len = key_len; in ecb_aes_set_key() [all …]
|
| /linux/lib/crypto/ |
| H A D | sm3.c | 75 static void sm3_transform(struct sm3_state *sctx, u8 const *data, u32 W[16]) in sm3_transform() argument 79 a = sctx->state[0]; in sm3_transform() 80 b = sctx->state[1]; in sm3_transform() 81 c = sctx->state[2]; in sm3_transform() 82 d = sctx->state[3]; in sm3_transform() 83 e = sctx->state[4]; in sm3_transform() 84 f = sctx->state[5]; in sm3_transform() 85 g = sctx->state[6]; in sm3_transform() 86 h = sctx->state[7]; in sm3_transform() 156 sctx->state[0] ^= a; in sm3_transform() [all …]
|
| /linux/security/apparmor/ |
| H A D | crypto.c | 39 struct sha256_ctx sctx; in aa_calc_profile_hash() local 49 sha256_init(&sctx); in aa_calc_profile_hash() 50 sha256_update(&sctx, (u8 *)&le32_version, 4); in aa_calc_profile_hash() 51 sha256_update(&sctx, (u8 *)start, len); in aa_calc_profile_hash() 52 sha256_final(&sctx, profile->hash); in aa_calc_profile_hash()
|
| /linux/tools/perf/util/ |
| H A D | expr.l | 85 static int literal(yyscan_t scanner, const struct expr_scanner_ctx *sctx) in literal() argument 89 yylval->num = expr__get_literal(expr_get_text(scanner), sctx); in literal() 91 if (!sctx->is_test) in literal() 116 struct expr_scanner_ctx *sctx = expr_get_extra(yyscanner); variable 127 {literal} { return literal(yyscanner, sctx); } 129 {symbol} { return str(yyscanner, ID, sctx->runtime); }
|
| H A D | stat-shadow.c | 151 pctx->sctx.user_requested_cpu_list = strdup(config->user_requested_cpu_list); in generic_metric() 152 pctx->sctx.runtime = runtime; in generic_metric() 153 pctx->sctx.system_wide = config->system_wide; in generic_metric()
|
| /linux/arch/s390/purgatory/ |
| H A D | purgatory.c | 19 struct sha256_ctx sctx; in verify_sha256_digest() local 21 sha256_init(&sctx); in verify_sha256_digest() 25 sha256_update(&sctx, (uint8_t *)(ptr->start), ptr->len); in verify_sha256_digest() 27 sha256_final(&sctx, digest); in verify_sha256_digest()
|
| /linux/arch/riscv/purgatory/ |
| H A D | purgatory.c | 23 struct sha256_ctx sctx; in verify_sha256_digest() local 26 sha256_init(&sctx); in verify_sha256_digest() 29 sha256_update(&sctx, (uint8_t *)(ptr->start), ptr->len); in verify_sha256_digest() 30 sha256_final(&sctx, digest); in verify_sha256_digest()
|
| /linux/arch/x86/purgatory/ |
| H A D | purgatory.c | 28 struct sha256_ctx sctx; in verify_sha256_digest() local 30 sha256_init(&sctx); in verify_sha256_digest() 34 sha256_update(&sctx, (uint8_t *)(ptr->start), ptr->len); in verify_sha256_digest() 36 sha256_final(&sctx, digest); in verify_sha256_digest()
|
| /linux/drivers/char/tpm/ |
| H A D | tpm2-sessions.c | 469 struct sha256_ctx sctx; in tpm2_KDFe() local 477 sha256_init(&sctx); in tpm2_KDFe() 479 sha256_update(&sctx, (u8 *)&c, sizeof(c)); in tpm2_KDFe() 481 sha256_update(&sctx, z, EC_PT_SZ); in tpm2_KDFe() 483 sha256_update(&sctx, str, strlen(str)+1); in tpm2_KDFe() 484 sha256_update(&sctx, pt_u, EC_PT_SZ); in tpm2_KDFe() 485 sha256_update(&sctx, pt_v, EC_PT_SZ); in tpm2_KDFe() 486 sha256_final(&sctx, out); in tpm2_KDFe() 592 struct sha256_ctx sctx; in tpm_buf_fill_hmac_session() local 688 sha256_init(&sctx); in tpm_buf_fill_hmac_session() [all …]
|
| /linux/drivers/misc/ |
| H A D | fastrpc.c | 303 struct fastrpc_session_ctx *sctx; member 328 struct fastrpc_session_ctx *sctx) in fastrpc_sid_offset() argument 330 return (u64)sctx->sid << cctx->soc_data->sid_pos; in fastrpc_sid_offset() 351 dev_err(map->fl->sctx->dev, in fastrpc_free_map() 467 if (fl->sctx && fl->sctx->sid) in fastrpc_buf_alloc() 468 buf->dma_addr += fastrpc_sid_offset(fl->cctx, fl->sctx); in fastrpc_buf_alloc() 776 return sg_dma_addr + fastrpc_sid_offset(fl->cctx, fl->sctx); in fastrpc_compute_dma_addr() 782 struct fastrpc_session_ctx *sess = fl->sctx; in fastrpc_map_attach() 874 struct fastrpc_session_ctx *sess = fl->sctx; in fastrpc_map_create() 952 struct device *dev = ctx->fl->sctx->dev; in fastrpc_create_maps() [all …]
|
| /linux/drivers/staging/rtl8723bs/core/ |
| H A D | rtw_xmit.c | 1448 if (pxmitbuf->sctx) in __rtw_alloc_cmd_xmitbuf() 1449 rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC); in __rtw_alloc_cmd_xmitbuf() 1513 if (pxmitbuf->sctx) in rtw_alloc_xmitbuf_ext() 1514 rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC); in rtw_alloc_xmitbuf_ext() 1574 if (pxmitbuf->sctx) in rtw_alloc_xmitbuf() 1575 rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC); in rtw_alloc_xmitbuf() 1591 if (pxmitbuf->sctx) in rtw_free_xmitbuf() 1592 rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_FREE); in rtw_free_xmitbuf() 2537 void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms) in rtw_sctx_init() argument 2539 sctx->timeout_ms = timeout_ms; in rtw_sctx_init() [all …]
|
| H A D | rtw_cmd.c | 466 if (pcmd->sctx) { in rtw_cmd_thread() 472 rtw_sctx_done(&pcmd->sctx); in rtw_cmd_thread() 474 rtw_sctx_done_err(&pcmd->sctx, RTW_SCTX_DONE_CMD_ERROR); in rtw_cmd_thread() 629 struct submit_ctx sctx; in rtw_startbss_cmd() local 651 pcmd->sctx = &sctx; in rtw_startbss_cmd() 652 rtw_sctx_init(&sctx, 2000); in rtw_startbss_cmd() 658 rtw_sctx_wait(&sctx); in rtw_startbss_cmd() 660 if (sctx.status == RTW_SCTX_SUBMITTED) in rtw_startbss_cmd() 661 pcmd->sctx = NULL; in rtw_startbss_cmd()
|
| /linux/drivers/staging/rtl8723bs/include/ |
| H A D | rtw_xmit.h | 226 void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms); 227 int rtw_sctx_wait(struct submit_ctx *sctx); 228 void rtw_sctx_done_err(struct submit_ctx **sctx, int status); 229 void rtw_sctx_done(struct submit_ctx **sctx); 248 struct submit_ctx *sctx; member
|
| /linux/drivers/crypto/ |
| H A D | padlock-sha.c | 34 struct sha1_state *sctx = padlock_shash_desc_ctx(desc); in padlock_sha1_init() local 36 *sctx = (struct sha1_state){ in padlock_sha1_init() 45 struct crypto_sha256_state *sctx = padlock_shash_desc_ctx(desc); in padlock_sha256_init() local 47 sha256_block_init(sctx); in padlock_sha256_init()
|
| /linux/arch/powerpc/perf/ |
| H A D | callchain_32.c | 43 struct sigcontext32 sctx; member 85 if (read_user_stack_32((unsigned int __user *) &sf->sctx.regs, ®s)) in sane_signal_32_frame()
|
| /linux/crypto/ |
| H A D | hmac.c | 163 struct hmac_ctx *sctx = crypto_shash_ctx(src); in hmac_clone_tfm() local 167 hash = crypto_clone_shash(sctx->hash); in hmac_clone_tfm() 429 struct ahash_hmac_ctx *sctx = crypto_ahash_ctx(src); in hmac_clone_ahash_tfm() local 433 hash = crypto_clone_ahash(sctx->hash); in hmac_clone_ahash_tfm()
|