Re: receive side CRC computation in siw.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 11, 2019 at 11:11:08AM -0400, Tom Talpey wrote:
> On 6/11/2019 9:21 AM, Bernard Metzler wrote:
> > Hi all,
> > 
> > If enabled for siw, during receive operation, a crc32c over
> > header and data is being generated and checked. So far, siw
> > was generating that CRC from the content of the just written
> > target buffer. What kept me busy last weekend were spurious
> > CRC errors, if running qperf. I finally found the application
> > is constantly writing the target buffer while data are placed
> > concurrently, which sometimes races with the CRC computation
> > for that buffer, and yields a broken CRC.
> 
> Well, that's a clear bug in the application, assuming siw has
> not yet delivered a send completion for the operation using
> the buffer. This is a basic Verbs API contract.

May be so, but a kernel driver must not make any assumptions about the
content of memory controlled by user. So it is clearly wrong to write
data to a user buffer and then read it again to compute a CRC.

All the applications touching buffers without waiting for a completion
are relying on some extended behavior outside the specification, but
they cannot cause the kernel to malfunction and report bogus data
integrity errors.

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux