"Bernard Metzler" <[email protected]>写道: > -----"Dinghao Liu" <[email protected]> wrote: ----- > > >To: [email protected], [email protected] > >From: "Dinghao Liu" <[email protected]> > >Date: 02/26/2021 08:56AM > >Cc: "Bernard Metzler" <[email protected]>, "Doug Ledford" > ><[email protected]>, "Jason Gunthorpe" <[email protected]>, > >[email protected], [email protected] > >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

