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: <20120521141152.GA21513@avionic-0098.mockup.avionic-design.de>
Date:	Mon, 21 May 2012 16:11:52 +0200
From:	Thierry Reding <thierry.reding@...onic-design.de>
To:	Hiroshi DOYU <hdoyu@...dia.com>
Cc:	linux-tegra@...r.kernel.org, Joerg Roedel <joerg.roedel@....com>,
	Stephen Warren <swarren@...dotorg.org>,
	Bharat Nihalani <bnihalani@...dia.com>,
	Vandana Salve <vsalve@...dia.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] iommu/tegra: gart: Reserve iomem resource

* Hiroshi DOYU wrote:
> GART Register/Aperture range should be reserved.
> 
> Signed-off-by: Hiroshi DOYU <hdoyu@...dia.com>
> ---
>  drivers/iommu/tegra-gart.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
> index 33a23b6..a431006 100644
> --- a/drivers/iommu/tegra-gart.c
> +++ b/drivers/iommu/tegra-gart.c
> @@ -366,12 +366,18 @@ static int tegra_gart_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  	}
>  
> -	gart_regs = devm_ioremap(dev, res->start, resource_size(res));
> +	gart_regs = devm_request_and_ioremap(dev, res);
>  	if (!gart_regs) {
>  		dev_err(dev, "failed to remap GART registers\n");
>  		return -ENXIO;
>  	}
>  
> +	if (!devm_request_mem_region(dev, res_remap->start,
> +				     resource_size(res_remap), dev_name(dev))) {
> +		dev_err(dev, "failed to reserve GART aperture\n");
> +		return -EBUSY;
> +	}
> +

I'm not so sure that this is a good idea. If the GART driver requests the
GART aperture, then users of the GART aperture (e.g. the DRM driver) will no
longer be able to use it.

Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ