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->version, rec->iv_data + iv_offset, 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, prot->rec_seq_size, in tls_push_record()
764 tls_fill_prepend(tls_ctx, in tls_push_record()
770 tls_ctx->pending_open_record_frags = false; in tls_push_record()
772 rc = tls_do_encryption(sk, tls_ctx, ctx, req, in tls_push_record()
778 tls_ctx->pending_open_record_frags = true; in tls_push_record()
788 tls_ctx->pending_open_record_frags = true; in tls_push_record()
799 struct tls_context *tls_ctx = tls_get_ctx(sk); in bpf_exec_tx_verdict() local
800 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in bpf_exec_tx_verdict()
907 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_push_pending_record() local
908 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_push_pending_record()
928 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_sendmsg() local
929 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_sw_sendmsg()
930 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_sendmsg()
952 mutex_lock(&tls_ctx->tx_lock); in tls_sw_sendmsg()
1074 tls_ctx->pending_open_record_frags = true; in tls_sw_sendmsg()
1145 mutex_unlock(&tls_ctx->tx_lock); in tls_sw_sendmsg()
1153 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_do_sendpage() local
1154 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_do_sendpage()
1155 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_sw_do_sendpage()
1222 tls_ctx->pending_open_record_frags = true; in tls_sw_do_sendpage()
1279 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_sendpage() local
1286 mutex_lock(&tls_ctx->tx_lock); in tls_sw_sendpage()
1290 mutex_unlock(&tls_ctx->tx_lock); in tls_sw_sendpage()
1297 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_wait_data() local
1298 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_wait_data()
1415 struct tls_context *tls_ctx = tls_get_ctx(sk); in decrypt_internal() local
1416 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in decrypt_internal()
1417 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->version, iv + iv_offset, tls_ctx->rx.rec_seq); in decrypt_internal()
1495 tls_ctx->rx.rec_seq, prot->rec_seq_size, in decrypt_internal()
1551 struct tls_context *tls_ctx = tls_get_ctx(sk); in decrypt_skb_update() local
1552 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in decrypt_skb_update()
1553 struct tls_prot_info *prot = &tls_ctx->prot_info; in decrypt_skb_update()
1558 if (tls_ctx->rx_conf == TLS_HW) { in decrypt_skb_update()
1559 err = tls_device_decrypted(sk, tls_ctx, skb, rxm); in decrypt_skb_update()
1571 &tls_ctx->rx); in decrypt_skb_update()
1588 tls_advance_record_sn(sk, prot, &tls_ctx->rx); in decrypt_skb_update()
1610 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_advance_skb() local
1611 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_advance_skb()
1747 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_recvmsg() local
1748 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_recvmsg()
1749 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_sw_recvmsg()
1991 struct tls_context *tls_ctx = tls_get_ctx(sock->sk); in tls_sw_splice_read() local
1992 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_splice_read()
2039 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_stream_read() local
2040 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_stream_read()
2056 struct tls_context *tls_ctx = tls_get_ctx(strp->sk); in tls_read_size() local
2057 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_read_size()
2058 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_read_size()
2118 struct tls_context *tls_ctx = tls_get_ctx(strp->sk); in tls_queue() local
2119 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_queue()
2131 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_data_ready() local
2132 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_data_ready()
2145 void tls_sw_cancel_work_tx(struct tls_context *tls_ctx) in tls_sw_cancel_work_tx() argument
2147 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_cancel_work_tx()
2156 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_release_resources_tx() local
2157 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_release_resources_tx()
2175 if (tls_ctx->partially_sent_record) { in tls_sw_release_resources_tx()
2176 tls_free_partial_record(sk, tls_ctx); in tls_sw_release_resources_tx()
2195 void tls_sw_free_ctx_tx(struct tls_context *tls_ctx) in tls_sw_free_ctx_tx() argument
2197 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_free_ctx_tx()
2204 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_release_resources_rx() local
2205 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_release_resources_rx()
2207 kfree(tls_ctx->rx.rec_seq); in tls_sw_release_resources_rx()
2208 kfree(tls_ctx->rx.iv); in tls_sw_release_resources_rx()
2228 void tls_sw_strparser_done(struct tls_context *tls_ctx) in tls_sw_strparser_done() argument
2230 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_strparser_done()
2235 void tls_sw_free_ctx_rx(struct tls_context *tls_ctx) in tls_sw_free_ctx_rx() argument
2237 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_free_ctx_rx()
2244 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_free_resources_rx() local
2247 tls_sw_free_ctx_rx(tls_ctx); in tls_sw_free_resources_rx()
2257 struct tls_context *tls_ctx = tls_get_ctx(sk); in tx_work_handler() local
2260 if (unlikely(!tls_ctx)) in tx_work_handler()
2263 ctx = tls_sw_ctx_tx(tls_ctx); in tx_work_handler()
2269 mutex_lock(&tls_ctx->tx_lock); in tx_work_handler()
2273 mutex_unlock(&tls_ctx->tx_lock); in tx_work_handler()
2286 void tls_sw_strparser_arm(struct sock *sk, struct tls_context *tls_ctx) in tls_sw_strparser_arm() argument
2288 struct tls_sw_context_rx *rx_ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_strparser_arm()
2300 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_set_sw_offload() local
2301 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_set_sw_offload()