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]
Date:	Fri, 07 Feb 2014 17:31:06 +0900
From:	Jingoo Han <jg1.han@...sung.com>
To:	'Lars-Peter Clausen' <lars@...afoo.de>
Cc:	'Andrew Morton' <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	'Alessandro Zummo' <a.zummo@...ertech.it>,
	rtc-linux@...glegroups.com, 'Jingoo Han' <jg1.han@...sung.com>,
	'Thierry Reding' <thierry.reding@...il.com>
Subject: Re: [PATCH 3/4] rtc: rtc-jz4740: Use devm_ioremap_resource()

On Friday, February 07, 2014 5:13 PM, Lars-Peter Clausen wrote:
> On 02/07/2014 08:58 AM, Jingoo Han wrote:
> [...]
> > -	rtc->base = devm_ioremap_nocache(&pdev->dev, rtc->mem->start,
> > -					resource_size(rtc->mem));
> > -	if (!rtc->base) {
> > -		dev_err(&pdev->dev, "Failed to ioremap mmio memory\n");
> > -		return -EBUSY;
> > -	}
> > +	mem->flags &= ~IORESOURCE_CACHEABLE;
> 
> You shouldn't be modifying the resource, strictly speaking it is not owned
> by the device. And IORESOURCE_CACHEABLE is never set for this device anyway.

(+cc Thierry Reding)

Hi Lars-Peter Clausen,

Do you mean that resource's flags should NOT be modified by the
device driver, right?
Then, without 'mem->flags &= ~IORESOURCE_CACHEABLE', is it possible 
that devm_ioremap_nocache() can be called at devm_ioremap_resource()?

Thierry,
Do you have any comments on this?

Thank you.

Best regards,
Jingoo Han

> 
> > +	rtc->base = devm_ioremap_resource(&pdev->dev, mem);
> > +	if (IS_ERR(rtc->base))
> > +		return PTR_ERR(rtc->base);
> >
> >   	spin_lock_init(&rtc->lock);
> >
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ