[PATCH] nvmet_tcp: fix header digest verification

Engel, Amit Amit.Engel at Dell.com
Tue Oct 26 23:50:32 PDT 2021


Thank you Sagi. I just sent the patch

Amit

-----Original Message-----
From: Sagi Grimberg <sagi at grimberg.me> 
Sent: Tuesday, October 26, 2021 6:35 PM
To: Engel, Amit; linux-nvme at lists.infradead.org; hch at 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...


More information about the Linux-nvme mailing list