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: <1587089.0XMyH6e1Ic@acer>
Date:	Wed, 25 Apr 2012 19:01:14 +0200
From:	Janusz Krzysztofik <jkrzyszt@....icnet.pl>
To:	dedekind1@...il.com
Cc:	David Woodhouse <dwmw2@...radead.org>,
	Tony Lindgren <tony@...mide.com>,
	Artem Bityutskiy <Artem.Bityutskiy@...ux.intel.com>,
	linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
	linux-omap@...r.kernel.org
Subject: Re: [PATCH v3.4-rc3] MTD: NAND: ams-delta: Fix request_mem_region() failure

Dnia środa, 25 kwietnia 2012 18:13:38 Artem Bityutskiy pisze:
> On Tue, 2012-04-17 at 15:49 +0200, Janusz Krzysztofik wrote:
> > A call to request_mem_region() has been introduced in the omap-gpio
> > driver recently (commit 96751fcbe5438e95514b025e9cee7a6d38038f40,
> > "gpio/omap: Use devm_ API and add request_mem_region"). This change
> > prevented the Amstrad Delta NAND driver, which was doing the same in
> > order to take control over OMAP MPU I/O lines that the NAND device 
hangs
> > off, from loading successfully.
> > 
> > There is another driver, omap-keypad, which also manipulates OMAP 
MPUIO
> > registers, but has never been calling request_mem_region() on 
startup,
> > so it's not affected by the change in the gpio-omap and works 
correctly.
> > 
> > Drop request_mem_region() call and related bits from ams-delta NAND
> > driver.
> > 
> > Created and tested against linux-3.4-rc3.
> > 
> > Signed-off-by: Janusz Krzysztofik <jkrzyszt@....icnet.pl>
> 
> How about race conditions? Where is the guarantee that these 2 drivers
> won't affect each other when doing I/O at the same time to the same HW
> resources?

Both drivers use separate subsets of registers that belong to the OMAP1 
MPU I/O device, but are used for controlling different sets of I/O pins. 
The NAND driver reads/writes the folowing registers:
- OMAP_MPUIO_INPUT_LATCH,
- OMAP_MPUIO_OUTPUT,
- OMAP_MPUIO_IO_CNTL,
while the keypad driver - the following:
- OMAP_MPUIO_KBR_LATCH,
- OMAP_MPUIO_KBC,
- OMAP_MPUIO_KBD_MASKIT
- OMAP_MPUIO_GPIO_DEBOUNCING.
Both subsets are non-overlapping, and we rely on the drivers being free 
of bugs and doing their job correctly, not stepping on each others' 
feet, I guess.

Thanks,
Janusz
--
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