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] [day] [month] [year] [list]
Date:   Wed, 7 Sep 2022 14:22:01 +0100
From:   Robin Murphy <robin.murphy@....com>
To:     John Garry <john.garry@...wei.com>, joro@...tes.org,
        will@...nel.org
Cc:     iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
        linuxarm@...wei.com, jsnitsel@...hat.com,
        haifeng.zhao@...ux.intel.com
Subject: Re: [PATCH v3 3/3] iova: Remove iovad->rcaches check in
 iova_rcache_get()

On 2022-09-07 14:02, John Garry wrote:
> The iovad->rcaches check in iova_rcache_get() is pretty much useless
> without the same check in iova_rcache_insert().
> 
> Instead of adding this symmetric check to fathpath iova_rcache_insert(),

Nit: "fastpath"

> drop the check in iova_rcache_get() in favour of making the IOVA domain
> rcache init more robust to failure in future.

Reviewed-by: Robin Murphy <robin.murphy@....com>

> Signed-off-by: John Garry <john.garry@...wei.com>
> ---
>   drivers/iommu/iova.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
> index 8aece052ce72..a44ad92fc5eb 100644
> --- a/drivers/iommu/iova.c
> +++ b/drivers/iommu/iova.c
> @@ -875,7 +875,7 @@ static unsigned long iova_rcache_get(struct iova_domain *iovad,
>   {
>   	unsigned int log_size = order_base_2(size);
>   
> -	if (log_size >= IOVA_RANGE_CACHE_MAX_SIZE || !iovad->rcaches)
> +	if (log_size >= IOVA_RANGE_CACHE_MAX_SIZE)
>   		return 0;
>   
>   	return __iova_rcache_get(&iovad->rcaches[log_size], limit_pfn - size);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ