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:   Wed, 24 Nov 2021 18:00:23 +0000
From:   Robin Murphy <robin.murphy@....com>
To:     John Garry <john.garry@...wei.com>, joro@...tes.org,
        will@...nel.org
Cc:     iommu@...ts.linux-foundation.org, suravee.suthikulpanit@....com,
        baolu.lu@...ux.intel.com, willy@...radead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 9/9] iommu: Move flush queue data into iommu_dma_cookie

On 2021-11-24 17:25, John Garry wrote:
> On 23/11/2021 14:10, Robin Murphy wrote:
>> ruct iommu_dma_msi_page {
>>       struct list_head    list;
>> @@ -41,7 +43,19 @@ struct iommu_dma_cookie {
>>       enum iommu_dma_cookie_type    type;
>>       union {
>>           /* Full allocator for IOMMU_DMA_IOVA_COOKIE */
>> -        struct iova_domain    iovad;
>> +        struct {
>> +            struct iova_domain    iovad;
>> +
>> +            struct iova_fq __percpu *fq;    /* Flush queue */
>> +            /* Number of TLB flushes that have been started */
>> +            atomic64_t        fq_flush_start_cnt;
>> +            /* Number of TLB flushes that have been finished */
>> +            atomic64_t        fq_flush_finish_cnt;
>> +            /* Timer to regularily empty the flush queues */
>> +            struct timer_list    fq_timer;
>> +            /* 1 when timer is active, 0 when not */
>> +            atomic_t        fq_timer_on;
> 
> I thought that putting all the FQ stuff in its own structure would be 
> neater, but that's just personal preference.

But look, it is! ;)

The iova_domain is still a fundamental part of the flush queue built 
around it; the rest of the machinery can't stand in isolation. It's just 
an anonymous structure because I don't feel like needlessly cluttering 
up the code with "cookie->fq.fq" silliness.

Cheers,
Robin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ