From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbdHFKaI (ORCPT ); Sun, 6 Aug 2017 06:30:08 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:37669 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbdHFKaG (ORCPT ); Sun, 6 Aug 2017 06:30:06 -0400 From: Pali =?utf-8?q?Roh=C3=A1r?= To: Richard Weinberger Subject: Re: [PATCH 5/5] ubi: Allow to use read-only UBI volume with not enough PEBs Date: Sun, 6 Aug 2017 12:30:02 +0200 User-Agent: KMail/1.13.7 (Linux/3.13.0-117-generic; KDE/4.14.2; x86_64; ; ) Cc: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Artem Bityutskiy , "linux-mtd@lists.infradead.org" , LKML References: <1496418222-23483-1-git-send-email-pali.rohar@gmail.com> <20170725142729.GL30901@pali> <0527d020-95aa-80e5-978c-fa9b6761a273@nod.at> In-Reply-To: <0527d020-95aa-80e5-978c-fa9b6761a273@nod.at> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1676084.rBHTOKRZuN"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201708061230.02997@pali> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart1676084.rBHTOKRZuN Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sunday 06 August 2017 11:43:25 Richard Weinberger wrote: > Pali, >=20 > Am 25.07.2017 um 16:27 schrieb Pali Roh=C3=A1r: > >> 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. > >>=20 > >> Especially when dealing with nanddumps, truncation is a common > >> problem. > >=20 > > Any idea how to fix it? Or how to handle read-only images which are > > marked for auto-resize? >=20 > 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? >=20 > 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=20 kernel should be able to read it too, even in R/O mode. =2D-=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nextPart1676084.rBHTOKRZuN Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAlmG76oACgkQi/DJPQPkQ1LSjwCfffCHL9wwkppFScy5slbndr1D zmYAoLYlG4N4QTdZwNyn2jw/VMGHAx7L =DHYv -----END PGP SIGNATURE----- --nextPart1676084.rBHTOKRZuN--