• Home
  • Raw
  • Download

Lines Matching refs:tls_ctx

157 	struct tls_context *tls_ctx;  in tls_decrypt_done()  local
165 tls_ctx = tls_get_ctx(skb->sk); in tls_decrypt_done()
166 ctx = tls_sw_ctx_rx(tls_ctx); in tls_decrypt_done()
167 prot = &tls_ctx->prot_info; in tls_decrypt_done()
221 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_do_decryption() local
222 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_do_decryption()
223 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_do_decryption()
266 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_trim_both_msgs() local
267 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_trim_both_msgs()
268 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_trim_both_msgs()
279 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_alloc_encrypted_msg() local
280 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_alloc_encrypted_msg()
289 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_clone_plaintext_msg() local
290 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_clone_plaintext_msg()
291 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_clone_plaintext_msg()
313 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_get_rec() local
314 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_get_rec()
315 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_get_rec()
352 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_free_open_rec() local
353 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_free_open_rec()
364 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_tx_records() local
365 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_tx_records()
370 if (tls_is_partially_sent_record(tls_ctx)) { in tls_tx_records()
379 rc = tls_push_partial_record(sk, tls_ctx, tx_flags); in tls_tx_records()
400 rc = tls_push_sg(sk, tls_ctx, in tls_tx_records()
425 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_encrypt_done() local
426 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_encrypt_done()
427 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_encrypt_done()
481 struct tls_context *tls_ctx, in tls_do_encryption() argument
486 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_do_encryption()
498 memcpy(&rec->iv_data[iv_offset], tls_ctx->tx.iv, in tls_do_encryption()
501 xor_iv_with_seq(prot->version, rec->iv_data, tls_ctx->tx.rec_seq); in tls_do_encryption()
537 tls_advance_record_sn(sk, prot, &tls_ctx->tx); in tls_do_encryption()
662 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_push_record() local
663 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_push_record()
664 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_push_record()
744 tls_ctx->tx.rec_seq, prot->rec_seq_size, in tls_push_record()
747 tls_fill_prepend(tls_ctx, in tls_push_record()
753 tls_ctx->pending_open_record_frags = false; in tls_push_record()
755 rc = tls_do_encryption(sk, tls_ctx, ctx, req, in tls_push_record()
761 tls_ctx->pending_open_record_frags = true; in tls_push_record()
771 tls_ctx->pending_open_record_frags = true; in tls_push_record()
782 struct tls_context *tls_ctx = tls_get_ctx(sk); in bpf_exec_tx_verdict() local
783 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in bpf_exec_tx_verdict()
886 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_push_pending_record() local
887 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_push_pending_record()
907 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_sendmsg() local
908 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_sw_sendmsg()
909 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_sendmsg()
928 mutex_lock(&tls_ctx->tx_lock); in tls_sw_sendmsg()
1050 tls_ctx->pending_open_record_frags = true; in tls_sw_sendmsg()
1115 mutex_unlock(&tls_ctx->tx_lock); in tls_sw_sendmsg()
1123 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_do_sendpage() local
1124 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_do_sendpage()
1125 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_sw_do_sendpage()
1192 tls_ctx->pending_open_record_frags = true; in tls_sw_do_sendpage()
1249 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_sendpage() local
1256 mutex_lock(&tls_ctx->tx_lock); in tls_sw_sendpage()
1260 mutex_unlock(&tls_ctx->tx_lock); in tls_sw_sendpage()
1267 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_wait_data() local
1268 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_wait_data()
1379 struct tls_context *tls_ctx = tls_get_ctx(sk); in decrypt_internal() local
1380 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in decrypt_internal()
1381 struct tls_prot_info *prot = &tls_ctx->prot_info; in decrypt_internal()
1449 memcpy(iv + iv_offset, tls_ctx->rx.iv, in decrypt_internal()
1452 memcpy(iv + iv_offset, tls_ctx->rx.iv, prot->salt_size); in decrypt_internal()
1454 xor_iv_with_seq(prot->version, iv, tls_ctx->rx.rec_seq); in decrypt_internal()
1459 tls_ctx->rx.rec_seq, prot->rec_seq_size, in decrypt_internal()
1515 struct tls_context *tls_ctx = tls_get_ctx(sk); in decrypt_skb_update() local
1516 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in decrypt_skb_update()
1517 struct tls_prot_info *prot = &tls_ctx->prot_info; in decrypt_skb_update()
1522 if (tls_ctx->rx_conf == TLS_HW) { in decrypt_skb_update()
1535 &tls_ctx->rx); in decrypt_skb_update()
1550 tls_advance_record_sn(sk, prot, &tls_ctx->rx); in decrypt_skb_update()
1572 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_advance_skb() local
1573 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_advance_skb()
1709 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_recvmsg() local
1710 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_recvmsg()
1711 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_sw_recvmsg()
1929 struct tls_context *tls_ctx = tls_get_ctx(sock->sk); in tls_sw_splice_read() local
1930 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_splice_read()
1980 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_stream_read() local
1981 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_stream_read()
1997 struct tls_context *tls_ctx = tls_get_ctx(strp->sk); in tls_read_size() local
1998 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_read_size()
1999 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_read_size()
2059 struct tls_context *tls_ctx = tls_get_ctx(strp->sk); in tls_queue() local
2060 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_queue()
2072 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_data_ready() local
2073 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_data_ready()
2085 void tls_sw_cancel_work_tx(struct tls_context *tls_ctx) in tls_sw_cancel_work_tx() argument
2087 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_cancel_work_tx()
2096 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_release_resources_tx() local
2097 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_release_resources_tx()
2110 if (tls_ctx->partially_sent_record) { in tls_sw_release_resources_tx()
2111 tls_free_partial_record(sk, tls_ctx); in tls_sw_release_resources_tx()
2130 void tls_sw_free_ctx_tx(struct tls_context *tls_ctx) in tls_sw_free_ctx_tx() argument
2132 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); in tls_sw_free_ctx_tx()
2139 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_release_resources_rx() local
2140 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_release_resources_rx()
2142 kfree(tls_ctx->rx.rec_seq); in tls_sw_release_resources_rx()
2143 kfree(tls_ctx->rx.iv); in tls_sw_release_resources_rx()
2163 void tls_sw_strparser_done(struct tls_context *tls_ctx) in tls_sw_strparser_done() argument
2165 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_strparser_done()
2170 void tls_sw_free_ctx_rx(struct tls_context *tls_ctx) in tls_sw_free_ctx_rx() argument
2172 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_free_ctx_rx()
2179 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_sw_free_resources_rx() local
2182 tls_sw_free_ctx_rx(tls_ctx); in tls_sw_free_resources_rx()
2192 struct tls_context *tls_ctx = tls_get_ctx(sk); in tx_work_handler() local
2195 if (unlikely(!tls_ctx)) in tx_work_handler()
2198 ctx = tls_sw_ctx_tx(tls_ctx); in tx_work_handler()
2204 mutex_lock(&tls_ctx->tx_lock); in tx_work_handler()
2208 mutex_unlock(&tls_ctx->tx_lock); in tx_work_handler()
2221 void tls_sw_strparser_arm(struct sock *sk, struct tls_context *tls_ctx) in tls_sw_strparser_arm() argument
2223 struct tls_sw_context_rx *rx_ctx = tls_sw_ctx_rx(tls_ctx); in tls_sw_strparser_arm()
2235 struct tls_context *tls_ctx = tls_get_ctx(sk); in tls_set_sw_offload() local
2236 struct tls_prot_info *prot = &tls_ctx->prot_info; in tls_set_sw_offload()