Hello Atul Gupta,
The patch 36bedb3f2e5b: "crypto: chtls - Inline TLS record Tx" from
Mar 31, 2018, leads to the following static checker warning:
drivers/crypto/chelsio/chtls/chtls_io.c:1036 chtls_sendmsg()
warn: assigning signed to unsigned: 'csk->tlshws.txleft = recordsz'
'(-14),0-u16max'
drivers/crypto/chelsio/chtls/chtls_io.c
1018
1019 while (msg_data_left(msg)) {
1020 int copy = 0;
1021
1022 skb = skb_peek_tail(&csk->txq);
1023 if (skb) {
1024 copy = mss - skb->len;
1025 skb->ip_summed = CHECKSUM_UNNECESSARY;
1026 }
1027 if (!csk_mem_free(cdev, sk))
1028 goto wait_for_sndbuf;
1029
1030 if (is_tls_tx(csk) && !csk->tlshws.txleft) {
1031 struct tls_hdr hdr;
1032
1033 recordsz = tls_header_read(&hdr,
&msg->msg_iter);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What if "recordsz" is -EFAULT?
1034 size -= TLS_HEADER_LENGTH;
1035 hdrlen += TLS_HEADER_LENGTH;
1036 csk->tlshws.txleft = recordsz;
1037 csk->tlshws.type = hdr.type;
1038 if (skb)
1039 ULP_SKB_CB(skb)->ulp.tls.type =
hdr.type;
1040 }
1041
1042 if (!skb || (ULP_SKB_CB(skb)->flags &
ULPCB_FLAG_NO_APPEND) ||
1043 copy <= 0) {
1044 new_buf:
1045 if (skb) {
1046 tx_skb_finalize(skb);
1047 push_frames_if_head(sk);
1048 }
regards,
dan carpenter