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: <48AE7B7E.1010503@atmel.com>
Date:	Fri, 22 Aug 2008 10:40:30 +0200
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	David Brownell <david-b@...bell.net>,
	Pierre Ossman <drzeus-mmc@...eus.cx>,
	Andrew Morton <akpm@...ux-foundation.org>
CC:	Nicolas Ferre <nicolas.ferre@...el.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Andrew Victor <linux@...im.org.za>,
	Russell King <rmk@....linux.org.uk>
Subject: Re: [patch 2.6.27-rc3] at91_mci: don't use coherent dma buffers

Pierre, Andrew,

Based on Andrew comments, I rewrite this email..

You can add my...

> David Brownell :
>> From: David Brownell <dbrownell@...rs.sourceforge.net>
>>
>> At91_mci is abusing dma_free_coherent(), which may not be called
>> with IRQs disabled.  I saw "mkfs.ext3" on an MMC card objecting
>> voluminously as each write completed:
>>
>>  WARNING: at arch/arm/mm/consistent.c:368 dma_free_coherent+0x2c/0x224()
>>  [<c002726c>] (dump_stack+0x0/0x14) from [<c00387d4>] 
>> (warn_on_slowpath+0x4c/0x68)
>>  [<c0038788>] (warn_on_slowpath+0x0/0x68) from [<c0028768>] 
>> (dma_free_coherent+0x2c/0x224)
>>   r6:00008008 r5:ffc06000 r4:00000000
>>  [<c002873c>] (dma_free_coherent+0x0/0x224) from [<c01918ac>] 
>> (at91_mci_irq+0x374/0x420)
>>  [<c0191538>] (at91_mci_irq+0x0/0x420) from [<c0065d9c>] 
>> (handle_IRQ_event+0x2c/0x6c)
>>  ...
>>
>> This bug has been around for a LONG time.  The MM warning is
>> from late 2005, but the driver merged a year later ... so I'm
>> puzzled why nobody noticed this before now.
>>
>> The fix involves noting that this buffer shouldn't be DMA-coherent;
>> it's just used for normal DMA writes.  So replace it with standard
>> kmalloc() buffering and DMA mapping calls.
>>
>> This is the quickie fix.  A better one would not rely on allocating
>> large bounce buffers.  (Note that dma_alloc_coherent could have failed
>> too, but that case was ignored... kmalloc is a bit more likely to
>> fail though.)
>>
>> Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>
> 
> ...

Acked-by: Nicolas Ferre <nicolas.ferre@...el.com>


Kind regards,
-- 
Nicolas Ferre

--
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