tech-net archive

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

Re: Overflow bugs in m_get &c.



mouse%Rodents-Montreal.ORG@localhost (Mouse) writes:

>> We've had a class of bugs that works like this:

>> [...network drivers assuming MCLBYTES can hold any packet...]

>This gets especially bad with jumbograms, I wokuld imagine.  Or are
>jumbogram-capable drivers smarter about this because they got bit
>already by getting sloppy?

Drivers that support jumbograms are well aware of this. You can't
just pump out a big frame and expect it to work :)

For input, the drivers allocate private DMA buffers and attach them
to mbufs as external storage. Or for small packets, they just copy
the data to a regular mbuf.

For output, you usually have a chain of mbufs and these are either
used for a scatter/gather DMA engine or copied to linear DMA buffers.

Jumbograms also rarely make sense. Modern systems have a couple of
offloading engines that are more flexible and efficient. Not that we
actually support these.




Home | Main Index | Thread Index | Old Index