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: <18f05dd3-4305-e607-57bb-dea086481bb8@samsung.com>
Date:   Mon, 28 Aug 2017 15:13:43 +0200
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Arvind Yadav <arvind.yadav.cs@...il.com>, joro@...tes.org,
        kgene@...nel.org, krzk@...nel.org, matthias.bgg@...il.com,
        gerald.schaefer@...ibm.com
Cc:     linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 1/3] iommu: exynos: constify iommu_ops

Hi Arvind,

On 2017-08-28 14:12, Arvind Yadav wrote:
> iommu_ops are not supposed to change at runtime.
> Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with
> const iommu_ops provided by <linux/iommu.h>. So mark the non-const
> structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>

Acked-by: Marek Szyprowski <m.szyprowski@...sung.com>

I remember that in the past there were a reason for non-const iommu_ops 
in the
IOMMU API, but I hope it has been finally resolved.

> ---
>   drivers/iommu/exynos-iommu.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
> index 2395478..a540016 100644
> --- a/drivers/iommu/exynos-iommu.c
> +++ b/drivers/iommu/exynos-iommu.c
> @@ -569,7 +569,7 @@ static void sysmmu_tlb_invalidate_entry(struct sysmmu_drvdata *data,
>   	spin_unlock_irqrestore(&data->lock, flags);
>   }
>   
> -static struct iommu_ops exynos_iommu_ops;
> +static const struct iommu_ops exynos_iommu_ops;
>   
>   static int __init exynos_sysmmu_probe(struct platform_device *pdev)
>   {
> @@ -1323,7 +1323,7 @@ static int exynos_iommu_of_xlate(struct device *dev,
>   	return 0;
>   }
>   
> -static struct iommu_ops exynos_iommu_ops = {
> +static const struct iommu_ops exynos_iommu_ops = {
>   	.domain_alloc = exynos_iommu_domain_alloc,
>   	.domain_free = exynos_iommu_domain_free,
>   	.attach_dev = exynos_iommu_attach_device,

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ