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: <75d52b42-0a26-44d5-b64d-60b762c858b5@infradead.org>
Date:   Mon, 4 Dec 2023 22:55:45 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Ashish Mhetre <amhetre@...dia.com>, krzysztof.kozlowski@...aro.org,
        thierry.reding@...il.com, jonathanh@...dia.com
Cc:     linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
        sfr@...b.auug.org.au
Subject: Re: [PATCH] memory: tegra: Protect SID override call under
 CONFIG_IOMMU_API



On 12/4/23 22:00, Ashish Mhetre wrote:
> tegra186_mc_client_sid_override() is protected under CONFIG_IOMMU_API.
> Call to this function is being made from tegra186_mc_resume() without
> any protection which is leading to build failure when CONFIG_IOMMU_API
> is not set. Fix this by protecting SID override function call from
> tegra186_mc_resume() under CONFIG_IOMMU_API.
> 
> Fixes: fe3b082a6eb8 ("memory: tegra: Add SID override programming for MC clients")
> Signed-off-by: Ashish Mhetre <amhetre@...dia.com>

Reported-by: Randy Dunlap <rdunlap@...radead.org>
Acked-by: Randy Dunlap <rdunlap@...radead.org>
Tested-by: Randy Dunlap <rdunlap@...radead.org> # build-tested

Thanks.

> ---
>  drivers/memory/tegra/tegra186.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c
> index d1f1dfb42716..0ff014a9d3cd 100644
> --- a/drivers/memory/tegra/tegra186.c
> +++ b/drivers/memory/tegra/tegra186.c
> @@ -141,6 +141,7 @@ static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev)
>  
>  static int tegra186_mc_resume(struct tegra_mc *mc)
>  {
> +#if IS_ENABLED(CONFIG_IOMMU_API)
>  	unsigned int i;
>  
>  	for (i = 0; i < mc->soc->num_clients; i++) {
> @@ -148,6 +149,7 @@ static int tegra186_mc_resume(struct tegra_mc *mc)
>  
>  		tegra186_mc_client_sid_override(mc, client, client->sid);
>  	}
> +#endif
>  
>  	return 0;
>  }

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ