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]
Message-ID: <20210119152641.GA3453587@infradead.org>
Date:   Tue, 19 Jan 2021 15:26:41 +0000
From:   Christoph Hellwig <hch@...radead.org>
To:     Lianbo Jiang <lijiang@...hat.com>
Cc:     linux-kernel@...r.kernel.org, thomas.lendacky@....com,
        will@...nel.org, iommu@...ts.linux-foundation.org,
        robin.murphy@....com
Subject: Re: [PATCH 1/2 v2] dma-iommu: use static-key to minimize the impact
 in the fast-path

On Tue, Jan 19, 2021 at 07:16:15PM +0800, Lianbo Jiang wrote:
> +static DEFINE_STATIC_KEY_FALSE(__deferred_attach);

Why the strange underscores?  Wouldn't iommu_deferred_attach_enabled
be a better name?

> -	if (unlikely(iommu_dma_deferred_attach(dev, domain)))
> +	if (static_branch_unlikely(&__deferred_attach) &&
> +	    iommu_dma_deferred_attach(dev, domain))

Also insted of duplicating this logic in three places, maybe rename
iommu_dma_deferred_attach to __iommu_dma_deferred_attach and create
a small inline wrapper for it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ