lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 25 Mar 2022 10:21:24 +0100
From:   Thorsten Leemhuis <regressions@...mhuis.info>
To:     Oleksandr Natalenko <oleksandr@...alenko.name>,
        Robin Murphy <robin.murphy@....com>,
        Christoph Hellwig <hch@....de>,
        Maxime Bizon <mbizon@...ebox.fr>,
        Toke Høiland-Jørgensen 
        <toke@...e.dk>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Halil Pasic <pasic@...ux.ibm.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Kalle Valo <kvalo@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Olha Cherevyk <olha.cherevyk@...il.com>,
        iommu <iommu@...ts.linux-foundation.org>,
        linux-wireless <linux-wireless@...r.kernel.org>,
        Netdev <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable <stable@...r.kernel.org>
Subject: Re: [REGRESSION] Recent swiotlb DMA_FROM_DEVICE fixes break
 ath9k-based AP

On 25.03.22 08:12, Oleksandr Natalenko wrote:
> On čtvrtek 24. března 2022 18:07:29 CET Toke Høiland-Jørgensen wrote:
>> Right, but is that sync_for_device call really needed? AFAICT, that
>> ath9k_hw_process_rxdesc_edma() invocation doesn't actually modify any of
>> the data when it returns EINPROGRESS, so could we just skip it? Like
>> the patch below? Or am I misunderstanding the semantics here?
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>> index 0c0624a3b40d..19244d4c0ada 100644
>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>> @@ -647,12 +647,8 @@ static bool ath_edma_get_buffers(struct ath_softc *sc,
>>                                 common->rx_bufsize, DMA_FROM_DEVICE);
>>  
>>         ret = ath9k_hw_process_rxdesc_edma(ah, rs, skb->data);
>> -       if (ret == -EINPROGRESS) {
>> -               /*let device gain the buffer again*/
>> -               dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
>> -                               common->rx_bufsize, DMA_FROM_DEVICE);
>> +       if (ret == -EINPROGRESS)
>>                 return false;
>> -       }
>>  
>>         __skb_unlink(skb, &rx_edma->rx_fifo);
>>         if (ret == -EINVAL) {
> 
> With this patch and both ddbd89deb7d3+aa6f8dcbab47 in place the AP works for me.

TWIMC: If anyone needs more testers or something, I noticed two bug
report in bko about this problem:

https://bugzilla.kernel.org/show_bug.cgi?id=215703
https://bugzilla.kernel.org/show_bug.cgi?id=215698

I'll point both to this discussion and the patch.

Ciao, Thorsten

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ