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
| ||
|
Message-ID: <9c9fda240804041829r5a768b39n340926485aa12687@mail.gmail.com> Date: Sat, 5 Apr 2008 10:29:25 +0900 From: "Kyungmin Park" <kmpark@...radead.org> To: "Josh Boyer" <jwboyer@...il.com> Cc: "David Brownell" <david-b@...bell.net>, linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org, "Michael Trimarchi" <trimarchimichael@...oo.it>, spi-devel-general@...ts.sourceforge.net, "Andrew Morton" <akpm@...ux-foundation.org>, dwmw2@...radead.org, linux-arm-kernel@...ts.arm.linux.org.uk Subject: Re: [PATCH] jffs2 summary allocation On Sat, Apr 5, 2008 at 10:11 AM, Josh Boyer <jwboyer@...il.com> wrote: > On Fri, 2008-04-04 at 16:58 -0700, David Brownell wrote: > > On Friday 04 April 2008, Josh Boyer wrote: > > > > > > > ... This means specifically that you may _not_ use the > > > > memory/addresses returned from vmalloc() for DMA. ... > > > > > > > > So I'm rather surprised to see *ANY* kernel code trying to do > > > > that. That rule has been in effect for many, many years now. > > > > > > I don't think it was intentional. You're going through several layers > > > here: > > > > > > JFFS2 -> mtd parts -> mtd dataflash -> atmel_spi. > > > > > > Typically MTD drivers aren't doing DMAs to flash and JFFS2 has no idea > > > which particular chip driver is being used because it's abstracted by > > > MTD. > > > > That's true ... although I can imagine using DMA to > > avoid dcache trashing if its setup cost is low enough, > > with either NAND or NOR chips. > > > > Still: in this context vmalloc() is wrong. > > Agreed. One issue is that the summary code allocates a buffer that > equals the eraseblock size of the underlying MTD device. For larger > NAND chips, that may be up to 256KiB. I believe this is within the > allowable kmalloc size for most architectures these days, but the > summary code is 3 years old and was likely expecting a smaller limit. > And there is always the question on whether finding that much contiguous > memory will be an issue. In MLC chips it goes up to 512KiB. It means it can't allocate the eraseblock size memory with kmalloc(). In ARM environment I can't see the 256KiB or more memory allocation with kmalloc(). So I now changed the kmalloc eraseblock to vmalloc at both jffs2 and mtd-utils. Thank you, Kyungmin Park -- 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