Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1704803 > unrolled thread

Re: [PATCH 5/5] ubi: Allow to use read-only UBI volume with not enough PEBs

Started byRichard Weinberger <richard@nod.at>
First post2017-08-06 11:50 +0200
Last post2017-08-06 12:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 5/5] ubi: Allow to use read-only UBI volume with not  enough PEBs Richard Weinberger <richard@nod.at> - 2017-08-06 11:50 +0200
    Re: [PATCH 5/5] ubi: Allow to use read-only UBI volume with not enough PEBs Pali Rohár <pali.rohar@gmail.com> - 2017-08-06 12:40 +0200

#1704803 — Re: [PATCH 5/5] ubi: Allow to use read-only UBI volume with not enough PEBs

FromRichard Weinberger <richard@nod.at>
Date2017-08-06 11:50 +0200
SubjectRe: [PATCH 5/5] ubi: Allow to use read-only UBI volume with not enough PEBs
Message-ID<ubqm6-tU-17@gated-at.bofh.it>
Pali,

Am 25.07.2017 um 16:27 schrieb Pali Rohár:
>> I fear this is not correct, it will disable a legit self-check of UBI volumes.
>> If the read-only volume is corrupted/truncated and you miss PEBs, this
>> check will no longer
>> trigger.
>>
>> Especially when dealing with nanddumps, truncation is a common problem.
> 
> Any idea how to fix it? Or how to handle read-only images which are
> marked for auto-resize?

I'd vote for rejecting images that have auto-resize set when the MTD is read-only.
In fact, using UBI on top of a read-only MTD is very uncommon and not recommended (for NAND).
The auto-resize flag should be also only set when you just have created it using mkfs.ubifs.
Why would you inspect such an image with the kernel UBIFS unless you're hunting down a bug
in mkfs.ubifs?

Thanks,
//richard

[toc] | [next] | [standalone]


#1704812 — Re: [PATCH 5/5] ubi: Allow to use read-only UBI volume with not enough PEBs

FromPali Rohár <pali.rohar@gmail.com>
Date2017-08-06 12:40 +0200
SubjectRe: [PATCH 5/5] ubi: Allow to use read-only UBI volume with not enough PEBs
Message-ID<ubr8t-10S-7@gated-at.bofh.it>
In reply to#1704803

[Multipart message — attachments visible in raw view] — view raw

On Sunday 06 August 2017 11:43:25 Richard Weinberger wrote:
> Pali,
> 
> Am 25.07.2017 um 16:27 schrieb Pali Rohár:
> >> I fear this is not correct, it will disable a legit self-check of
> >> UBI volumes. If the read-only volume is corrupted/truncated and
> >> you miss PEBs, this check will no longer
> >> trigger.
> >> 
> >> Especially when dealing with nanddumps, truncation is a common
> >> problem.
> > 
> > Any idea how to fix it? Or how to handle read-only images which are
> > marked for auto-resize?
> 
> I'd vote for rejecting images that have auto-resize set when the MTD
> is read-only. In fact, using UBI on top of a read-only MTD is very
> uncommon and not recommended (for NAND). The auto-resize flag should
> be also only set when you just have created it using mkfs.ubifs. Why
> would you inspect such an image with the kernel UBIFS unless you're
> hunting down a bug in mkfs.ubifs?
> 
> Thanks,
> //richard

E.g. because when I get UBIFS image and I want to unpack it.

IMO UBIFS image which have auto-resize set is also valid UBIFS image and 
kernel should be able to read it too, even in R/O mode.

-- 
Pali Rohár
pali.rohar@gmail.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web