On Fri, Nov 30, 2018 at 11:53 PM Anssi Hannula <[email protected]> wrote: > > 64-bit DMA addresses are split in upper and lower halves that are > written in separate fields on GEM. For RX, bit 0 of the address is used > as the ownership bit (RX_USED). When the RX_USED bit is unset the > controller is allowed to write data to the buffer. > > The driver does not guarantee that the controller already sees the upper > half when the RX_USED bit is cleared, possibly resulting in the > controller writing an incoming frame to an address with an incorrect > upper half and therefore possibly corrupting unrelated system memory. > > Fix that by adding the necessary DMA memory barrier between the writes. > > This corruption was observed on a ZynqMP based system. > > Signed-off-by: Anssi Hannula <[email protected]> > Fixes: fff8019a08b6 ("net: macb: Add 64 bit addressing support for GEM") > Cc: Nicolas Ferre <[email protected]> > Cc: Harini Katakam <[email protected]> > Cc: Michal Simek <[email protected]>
Acked-by: Harini Katakam <[email protected]> Regards, Harini
