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:   Mon, 5 Dec 2016 09:23:40 +0100
From:   Boris Brezillon <boris.brezillon@...e-electrons.com>
To:     Artem Bityutskiy <dedekind1@...il.com>
Cc:     Richard Weinberger <richard@....at>, Joe Perches <joe@...ches.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Pan Bian <bianpan201604@....com>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Cyrille Pitchen <cyrille.pitchen@...el.com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Pan Bian <bianpan2016@....com>
Subject: Re: [PATCH 1/1] mtd: ubi: fix improper return value

On Mon, 05 Dec 2016 09:09:34 +0200
Artem Bityutskiy <dedekind1@...il.com> wrote:

> On Sun, 2016-12-04 at 21:52 +0100, Richard Weinberger wrote:
> > We should better think about how to get ubi_self_check_all_ff()
> > fixed.
> > When enabled on a modern NAND, vmalloc() is likely to fail now and
> > then
> > since len is the erase block size and can be up to a few mega bytes.  
> 
> I did an attempt to switch from virtually continuous buffers to an
> array of page pointers, but never finished.

I started to implement that too but unfortunately never had the time to
finish it :-(.
Don't know why you were trying to move to kzalloc-ed buffer, but my
goal was to avoid the extra copy when the controller transfers data
using DMA, and the recent posts regarding vmalloc-ed buffers and DMA
might solve the issue.

This being said, UBI and UBIFS tend to allocate big portions of
memory (usually a full eraseblock), and sometime this is
overkill.
For example, I'm not sure we need to allocate that much memory to do
things like 'check if this portion is all filled with 0xff'. Allocating
a ->max_write_size buffer and iterating over write-units should be
almost as efficient and still consume less memory. But this has nothing
to do with the vmalloc vs kmalloc debate ;-).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ