Thread (6 messages) 6 messages, 2 authors, 2021-10-27

RE: [PATCH] nvmet_tcp: fix header digest verification

From: Engel, Amit <hidden>
Date: 2021-10-27 06:50:50

Thank you Sagi. I just sent the patch

Amit

-----Original Message-----
From: Sagi Grimberg <sagi@grimberg.me> 
Sent: Tuesday, October 26, 2021 6:35 PM
To: Engel, Amit; linux-nvme@lists.infradead.org; hch@lst.de
Subject: Re: [PATCH] nvmet_tcp: fix header digest verification


[EXTERNAL EMAIL] 

In nvmet_tcp_try_recv_pdu:
1. After kernel_recvmsg, 'queue->offset' is equal to 'sizeof(struct nvme_tcp_hdr)'

2. update queue->left = hdr->hlen - queue->offset + hdgst and 'goto recv'

3. after recvmsg , the offset is greater than the digest.

So , In this case offset != hdr->hlen

This will lead to nvmet_tcp_verify_hdgst to always pass, which
I see, so the patch should modify the call-site to nvmet_tcp_verify_hdgst to pass in hdr->hlen.
Thanks
Amit


Internal Use - Confidential
You should remove this footer from your emails to the public mailing list...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help