lkml.org 
[lkml]   [2021]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [PATCH] RDMA/siw: Fix missing check in siw_get_hdr


"Bernard Metzler" <BMT@zurich.ibm.com>写道:
> -----"Dinghao Liu" <dinghao.liu@zju.edu.cn> wrote: -----
>
> >To: dinghao.liu@zju.edu.cn, kjlu@umn.edu
> >From: "Dinghao Liu" <dinghao.liu@zju.edu.cn>
> >Date: 02/26/2021 08:56AM
> >Cc: "Bernard Metzler" <bmt@zurich.ibm.com>, "Doug Ledford"
> ><dledford@redhat.com>, "Jason Gunthorpe" <jgg@ziepe.ca>,
> >linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
> >Subject: [EXTERNAL] [PATCH] RDMA/siw: Fix missing check in
> >siw_get_hdr
> >
> >We should also check the range of opcode after calling
> >__rdmap_get_opcode() in the else branch to prevent potential
> >overflow.
>
> Hi Dinghao,
> No this is not needed. We always first read the minimum
> header information (MPA len, DDP flags, RDMAP opcode,
> STag, target offset). Only if we have received that
> into local buffer, we check for the opcode this one time.
> Now the opcode determines the remaining length of the
> variably sized part of the header to be received.
>
> We do not have to check the opcode again, since we
> already received and checked it.
>

It's clear to me, thanks!

Regards,
Dinghao
\
 
 \ /
  Last update: 2021-02-26 13:35    [W:0.049 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site