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:   Sat, 05 Jun 2021 14:28:27 +0200
From:   "Sven Peter" <sven@...npeter.dev>
To:     "Rouven Czerwinski" <r.czerwinski@...gutronix.de>,
        "Will Deacon" <will@...nel.org>,
        "Robin Murphy" <robin.murphy@....com>,
        "Joerg Roedel" <joro@...tes.org>,
        "Rob Herring" <robh+dt@...nel.org>
Cc:     "Arnd Bergmann" <arnd@...nel.org>, devicetree@...r.kernel.org,
        "Hector Martin" <marcan@...can.st>, linux-kernel@...r.kernel.org,
        "Marc Zyngier" <maz@...nel.org>,
        "Mohamed Mediouni" <mohamed.mediouni@...amail.com>,
        "Stan Skowronek" <stan@...ellium.com>,
        linux-arm-kernel@...ts.infradead.org,
        "Mark Kettenis" <mark.kettenis@...all.nl>,
        "Petr Mladek via iommu" <iommu@...ts.linux-foundation.org>,
        "Alexander Graf" <graf@...zon.com>
Subject: Re: [PATCH v3 3/3] iommu: dart: Add DART iommu driver

Hi Rouven,

On Sat, Jun 5, 2021, at 13:50, Rouven Czerwinski wrote:
> Hi Sven,
> 
> just a small comment, see inline.
> 
> On Thu, 2021-06-03 at 10:50 +0200, Sven Peter wrote:
> > +
> > +/* must be called with held dart_domain->lock */
> 
> You can remove this comment, include lockdep.h and…
> 
> > +static int apple_dart_finalize_domain(struct iommu_domain *domain)
> > +{
> > +	struct apple_dart_domain *dart_domain = to_dart_domain(domain);
> > +	struct apple_dart *dart = dart_domain->dart;
> > +	struct io_pgtable_cfg pgtbl_cfg;
> > +
> 
> 	lockdep_assert_held(&dart_domain->lock);
> 
> A lockdep enabled kernel will warn if this function is called without
> the lock held, otherwise this gets optimized out. Same for the similar
> comments below.
> 

That looks very useful, thanks! Will use it for v4.

I only found assert_spin_locked originally but didn't want to have that
performance overhead for code that (I hope :-)) correctly uses these functions
with a held lock right now.


Thanks,


Sven

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ