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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120919133648.GB6106@arwen.pp.htv.fi>
Date:	Wed, 19 Sep 2012 16:36:50 +0300
From:	Felipe Balbi <balbi@...com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Tony Lindgren <tony@...mide.com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Will Deacon <will.deacon@....com>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Nicolas Pitre <nico@...aro.org>,
	Felipe Balbi <felipe.balbi@...ia.com>,
	Lokesh Vutla <lokeshvutla@...com>,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Shubhrajyoti D <shubhrajyoti@...com>,
	sricharan <r.sricharan@...com>
Subject: Re: [PATCH 17/24] ARM: OMAP: use __iomem pointers for MMIO

On Wed, Sep 19, 2012 at 01:35:47PM +0000, Arnd Bergmann wrote:
> On Monday 17 September 2012, Tony Lindgren wrote:
> > * Tony Lindgren <tony@...mide.com> [120916 13:39]:
> > > * Arnd Bergmann <arnd@...db.de> [120915 13:15]:
> > > > On Saturday 15 September 2012, Tony Lindgren wrote:
> > > > > With my patches, this is now all omap1 specific and
> > > > > moved to arch/arm/mach-omap1/include/mach/hardware.h.
> > > > > It's probably easiest to just update this patch on
> > > > > top of the hardware.h changes I've done.
> > > > 
> > > > Yes, sounds good. Do you want to send a patch for that
> > > > and let me drop this one then?
> > > 
> > > Yes I can pick this one and update it against one of my
> > > branches to avoid merge conflicts.
> > 
> > This applies against mach-omap1/include/mach/hardware.h
> > with some fuzz so no issues there.
> > 
> > But I think we should not apply it as these are physical
> > addresses, not virtual addresses for omap1.
> 
> Right, I misread what is actually going on here because the
> only driver I looked at treated the address as a virtual
> address pointer.
> 
> > We have IOMEM already in use for omap_read/write because of:
> > 
> > #define OMAP1_IO_ADDRESS(pa)    IOMEM((pa) - OMAP1_IO_OFFSET)
> > 
> > I think the right solution is to eventually get rid of
> > omap_read/write for omap1 also and replace them with ioremap
> > + readl/writel.
> 
> Agreed.
> 
> > Or am I missing something?
> 
> I did not see any new warnings for omap1, but I did see this
> on omap2plus_defconfig:
> 
> drivers/watchdog/omap_wdt.c: In function 'omap_wdt_ioctl':
> drivers/watchdog/omap_wdt.c:222:4: error: passing argument 1 of '__raw_readw' makes pointer from integer without a cast [-Werror]
> arch/arm/include/asm/io.h:71:90: note: expected 'const volatile void *' but argument is of type 'unsigned int'
> 
> It seems I misinterpreted this, and it's actually a bug in the watchdog
> driver that should be fixed using this patch instead (and backport it
> to stable)
> 
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index fceec4f..7b45802 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -218,9 +218,11 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
>  	case WDIOC_GETSTATUS:
>  		return put_user(0, (int __user *)arg);
>  	case WDIOC_GETBOOTSTATUS:
> +#ifdef CONFIG_ARCH_OMAP1
>  		if (cpu_is_omap16xx())
> -			return put_user(__raw_readw(ARM_SYSST),
> +			return put_user(omap_readw(ARM_SYSST),
>  					(int __user *)arg);
> +#endif

indeed... my bad. I agree this should be changed by something better
though.

cheers

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ