[PATCH] nvmet_tcp: fix header digest verification
Sagi Grimberg
sagi at grimberg.me
Tue Oct 26 08:34:42 PDT 2021
> 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...
More information about the Linux-nvme
mailing list