lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 5 Jan 2020 11:49:51 +0000
From:   "Bshara, Saeed" <>
To:     "" <>
CC:     "Kiyanovski, Arthur" <>,
        "Tzalik, Guy" <>,
        "Matushevsky, Alexander" <>,
        "Jubran, Samih" <>,
        "" <>,
        "Pressman, Gal" <>,
        "Dagan, Noam" <>,
        "Machulsky, Zorik" <>,
        "Schmeilin, Evgeny" <>,
        "" <>,
        "" <>,
        "Belgazal, Netanel" <>,
        "Chauskin, Igor" <>
Subject: Re: [PATCH 2/2] net: AWS ENA: Flush WCBs before writing new SQ tail
 to doorbell

On Sun, 2020-01-05 at 12:22 +0200, Liran Alon wrote:
> Hi Saeed,
> If I understand correctly, the device is only aware of new
> descriptors once the tail is updated by ena_com_write_sq_doorbell()
> using writel().
> If that’s the case, then writel() guarantees all previous writes to
> WB/UC memory is visible to device before the write done by writel().
device fetches packet only after doorbell notification.
you are right, writel() includes the needed barrier (
so indeed we should be ok without any explicit wmb() or dma_wmb().

> If device is allowed to fetch packet payload at the moment the
> transmit descriptor is written into device-memory using LLQ,
> then ena_com_write_bounce_buffer_to_dev() should dma_wmb() before
> __iowrite64_copy(). Instead of wmb(). And comment
> is wrong and should be updated accordingly.
> For example, this will optimise x86 to only have a compiler-barrier
> instead of executing a SFENCE.
> Can you clarify what is device behaviour on when it is allowed to
> read the packet payload?
> i.e. Is it only after writing to doorbell or is it from the moment
> the transmit descriptor is written to LLQ?
> -Liran

Powered by blists - more mailing lists