Lines Matching refs:tls_ctx
167 struct tls_context *tls_ctx; in tls_decrypt_done() local
175 tls_ctx = tls_get_ctx(skb->sk); in tls_decrypt_done()
176 ctx = tls_sw_ctx_rx(tls_ctx); in tls_decrypt_done()
177 prot = &tls_ctx->prot_info; in tls_decrypt_done()
236 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_do_decryption() local
237 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_do_decryption()
238 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_do_decryption()
281 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_trim_both_msgs() local
282 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_trim_both_msgs()
283 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_trim_both_msgs()
294 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_alloc_encrypted_msg() local
295 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_alloc_encrypted_msg()
304 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_clone_plaintext_msg() local
305 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_clone_plaintext_msg()
306 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_clone_plaintext_msg()
328 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_get_rec() local
329 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_get_rec()
330 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_get_rec()
367 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_free_open_rec() local
368 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_free_open_rec()
379 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_tx_records() local
380 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_tx_records()
385 if (tls_is_partially_sent_record(tls_ctx)) { in tls_tx_records()
394 rc = tls_push_partial_record(sk, tls_ctx, tx_flags); in tls_tx_records()
415 rc = tls_push_sg(sk, tls_ctx, in tls_tx_records()
440 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_encrypt_done() local
441 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_encrypt_done()
442 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_encrypt_done()
498 struct tls_context *tls_ctx, in tls_do_encryption() argument
503 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_do_encryption()
515 memcpy(&rec->iv_data[iv_offset], tls_ctx->tx.iv, in tls_do_encryption()
518 xor_iv_with_seq(prot, rec->iv_data, tls_ctx->tx.rec_seq); in tls_do_encryption()
554 tls_advance_record_sn(sk, prot, &tls_ctx->tx); in tls_do_encryption()
679 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_push_record() local
680 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_push_record()
681 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_push_record()
761 tls_ctx->tx.rec_seq, record_type, prot); in tls_push_record()
763 tls_fill_prepend(tls_ctx, in tls_push_record()
769 tls_ctx->pending_open_record_frags = false; in tls_push_record()
771 rc = tls_do_encryption(sk, tls_ctx, ctx, req, in tls_push_record()
777 tls_ctx->pending_open_record_frags = true; in tls_push_record()
787 tls_ctx->pending_open_record_frags = true; in tls_push_record()
798 struct tls_context *tls_ctx = tls_get_ctx(sk); in bpf_exec_tx_verdict() local
799 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in bpf_exec_tx_verdict()
906 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_push_pending_record() local
907 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_push_pending_record()
927 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_sendmsg() local
928 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_sw_sendmsg()
929 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_sendmsg()
951 mutex_lock(&tls_ctx->tx_lock); in tls_sw_sendmsg()
1073 tls_ctx->pending_open_record_frags = true; in tls_sw_sendmsg()
1144 mutex_unlock(&tls_ctx->tx_lock); in tls_sw_sendmsg()
1152 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_do_sendpage() local
1153 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_do_sendpage()
1154 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_sw_do_sendpage()
1221 tls_ctx->pending_open_record_frags = true; in tls_sw_do_sendpage()
1278 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_sendpage() local
1285 mutex_lock(&tls_ctx->tx_lock); in tls_sw_sendpage()
1289 mutex_unlock(&tls_ctx->tx_lock); in tls_sw_sendpage()
1296 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_wait_data() local
1297 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_wait_data()
1414 struct tls_context *tls_ctx = tls_get_ctx(sk); in decrypt_internal() local
1415 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in decrypt_internal()
1416 struct tls_prot_info *prot = &tls_ctx->prot_info; in decrypt_internal()
1485 memcpy(iv + iv_offset, tls_ctx->rx.iv, in decrypt_internal()
1488 memcpy(iv + iv_offset, tls_ctx->rx.iv, prot->salt_size); in decrypt_internal()
1490 xor_iv_with_seq(prot, iv, tls_ctx->rx.rec_seq); in decrypt_internal()
1495 tls_ctx->rx.rec_seq, ctx->control, prot); in decrypt_internal()
1550 struct tls_context *tls_ctx = tls_get_ctx(sk); in decrypt_skb_update() local
1551 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in decrypt_skb_update()
1552 struct tls_prot_info *prot = &tls_ctx->prot_info; in decrypt_skb_update()
1557 if (tls_ctx->rx_conf == TLS_HW) { in decrypt_skb_update()
1558 err = tls_device_decrypted(sk, tls_ctx, skb, rxm); in decrypt_skb_update()
1570 &tls_ctx->rx); in decrypt_skb_update()
1587 tls_advance_record_sn(sk, prot, &tls_ctx->rx); in decrypt_skb_update()
1609 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_advance_skb() local
1610 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_advance_skb()
1746 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_recvmsg() local
1747 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_recvmsg()
1748 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_sw_recvmsg()
1990 struct tls_context *tls_ctx = tls_get_ctx(sock->sk); in tls_sw_splice_read() local
1991 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_splice_read()
2040 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_sock_is_readable() local
2041 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_sock_is_readable()
2057 struct tls_context *tls_ctx = tls_get_ctx(strp->sk); in tls_read_size() local
2058 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_read_size()
2059 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_read_size()
2120 struct tls_context *tls_ctx = tls_get_ctx(strp->sk); in tls_queue() local
2121 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_queue()
2133 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_data_ready() local
2134 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_data_ready()
2147 void tls_sw_cancel_work_tx(struct tls_context *tls_ctx) in tls_sw_cancel_work_tx() argument
2149 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_cancel_work_tx()
2158 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_release_resources_tx() local
2159 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_release_resources_tx()
2177 if (tls_ctx->partially_sent_record) { in tls_sw_release_resources_tx()
2178 tls_free_partial_record(sk, tls_ctx); in tls_sw_release_resources_tx()
2197 void tls_sw_free_ctx_tx(struct tls_context *tls_ctx) in tls_sw_free_ctx_tx() argument
2199 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_free_ctx_tx()
2206 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_release_resources_rx() local
2207 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_release_resources_rx()
2209 kfree(tls_ctx->rx.rec_seq); in tls_sw_release_resources_rx()
2210 kfree(tls_ctx->rx.iv); in tls_sw_release_resources_rx()
2230 void tls_sw_strparser_done(struct tls_context *tls_ctx) in tls_sw_strparser_done() argument
2232 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_strparser_done()
2237 void tls_sw_free_ctx_rx(struct tls_context *tls_ctx) in tls_sw_free_ctx_rx() argument
2239 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_free_ctx_rx()
2246 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_free_resources_rx() local
2249 tls_sw_free_ctx_rx(tls_ctx); in tls_sw_free_resources_rx()
2259 struct tls_context *tls_ctx = tls_get_ctx(sk); in tx_work_handler() local
2262 if (unlikely(!tls_ctx)) in tx_work_handler()
2265 ctx = tls_sw_ctx_tx(tls_ctx); in tx_work_handler()
2271 mutex_lock(&tls_ctx->tx_lock); in tx_work_handler()
2275 mutex_unlock(&tls_ctx->tx_lock); in tx_work_handler()
2288 void tls_sw_strparser_arm(struct sock *sk, struct tls_context *tls_ctx) in tls_sw_strparser_arm() argument
2290 struct tls_sw_context_rx *rx_ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_strparser_arm()
2302 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_set_sw_offload() local
2303 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_set_sw_offload()