From: Richard Weinberger <richard@nod.at>
To: Willy Tarreau <w@1wt.eu>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Benson Young <benson6877@gmail.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
David Gstir <david@sigma-star.at>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: ubiblock RW
Date: Fri, 25 Mar 2016 21:28:57 +0100 [thread overview]
Message-ID: <56F59F89.1030705@nod.at> (raw)
In-Reply-To: <20160324213950.GA8300@1wt.eu>
Am 24.03.2016 um 22:39 schrieb Willy Tarreau:
> On Thu, Mar 24, 2016 at 06:26:44PM -0300, Ezequiel Garcia wrote:
>> On 24 March 2016 at 17:38, Richard Weinberger <richard@nod.at> wrote:
>>> Hi!
>>>
>>> Am 24.03.2016 um 15:23 schrieb Ezequiel Garcia:
>>>> +MTD
>>>>
>>>> On 23 March 2016 at 14:40, Benson Young <benson6877@gmail.com> wrote:
>>>>> Hello Ezequiel,
>>>>>
>>>>> I came upon the discussion about block device emulation over UBI.
>>>>> http://linux-mtd.infradead.narkive.com/YF0XOFxY/block-device-emulation-on-top-of-ubi-volumes-with-read-write-support
>>>>>
>>>>> I understand the most recent implementation is read-only emulation for
>>>>> mounting squashfs based file system.
>>>>> However, I would really like to see the write option be brought back. If
>>>>> not, can you please help me about enabling the write option in my build?
>>>>> I have used the patch listed in the following link
>>>>> https://lwn.net/Articles/525957/
>>>>> but i couldn't find any accompanying util that allows me to create the ubi
>>>>> block volume.
>>>>>
>>>>
>>>> You should be able to use mtd-utils' ubiblock tool (maybe you'll need to do
>>>> some modifications).
>>>>
>>>> http://www.linux-mtd.infradead.org/doc/ubi.html#L_ubiblock
>>>>
>>>>> Reason for this request is that I am looking into root file system
>>>>> encryption over un-managed NAND flash. Now the mainline method of disk
>>>>> encryption in Linux revolves around
>>>>> dm-crypt module which requires a block device. i am under the impression
>>>>> that using mtdblock works to an extent until the partition you try to
>>>>> map/encrypt has bad blocks in it.
>>>>> I have seen discussion about using UBIFS, and I have seen a paper discussing
>>>>> it, where the author embeds the encryption engine within UBI layer, so each
>>>>> write and read is encrypted. However, its a path I would take when I have no
>>>>> choice. Right now dm-crypt is my first choice basically because of the
>>>>> availability of support/discussion/information.
>>>>>
>>>>> I also saw you mentioned that you don't have NAND flash for testing, this is
>>>>> something that I can help with. I have an abundance of NAND flash devices.
>>>>
>>>> I have some devices with SLC NANDs now, but thanks for the offer.
>>>>
>>>>> For simplicity sake, I work with SLC because of better endurance compared to
>>>>> MLC. I am also curious about flash endurance with EXT4 over UBI. Destructive
>>>>> erase/write will definitely on my to-do list.
>>>>>
>>>>
>>>> So, like I said here:
>>>>
>>>> http://linux-mtd.infradead.narkive.com/YF0XOFxY/block-device-emulation-on-top-of-ubi-volumes-with-read-write-support
>>>>
>>>> We can definitely implement write support if we have a good use case for it.
>>>> Encryption might be one.
>>>>
>>>> Richard, what do you think?
>>>
>>> I'm definitely not fond of adding write support to ubiblock without turning it into a proper FTL.
>>> Otherwise it will be abused and will cause serious damage.
>>>
>>
>> I'm not sure this statement makes much sense without actual numbers.
>>
>> Of course, eraseblocks will be erased much more often with a regular
>> block-oriented
>> filesystem. But a user could agressively control write access and prevent this.
>>
>> Would it be that bad to add write support and add some big warning to
>> prevent users about potential damage?
>
> +1, we're on linux, we're supposed to let the user shoot himself in the foot
> if he really *wants* to do so. But we must warn him so that it's not an
> accident. There are many other ways to destroy a flash anyway, I guess that
> running flash_erase in loops will achieve the same result, so we're not
> protecting much against stupid actions by removing useful features and we're
> only inciting users to work around them by employing possibly even uglier
> solutions (FS directly on mtdblock maybe ?).
Okay, that's a good point.
A parameter for the ubiblock tool a la "--enable-rw-i-know-what-im-doing" should be fine.
Thanks,
//richard
next prev parent reply other threads:[~2016-03-25 20:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABJ+KKu2RJuHXE3LpmzSYtE0i57sHDUHWOxPxufCP94RTa=eBA@mail.gmail.com>
2016-03-24 14:23 ` ubiblock RW Ezequiel Garcia
2016-03-24 20:38 ` Richard Weinberger
2016-03-24 21:26 ` Ezequiel Garcia
2016-03-24 21:39 ` Willy Tarreau
2016-03-25 20:28 ` Richard Weinberger [this message]
2016-03-25 11:51 ` Artem Bityutskiy
2016-03-25 20:50 ` Ezequiel Garcia
2016-03-25 20:51 ` Ezequiel Garcia
2016-03-25 21:25 ` Richard Weinberger
2016-03-26 6:01 ` Willy Tarreau
2016-03-27 22:01 ` Richard Weinberger
2016-03-28 6:56 ` Artem Bityutskiy
2016-03-28 8:17 ` Willy Tarreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56F59F89.1030705@nod.at \
--to=richard@nod.at \
--cc=benson6877@gmail.com \
--cc=david@sigma-star.at \
--cc=dedekind1@gmail.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=linux-mtd@lists.infradead.org \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox