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] [day] [month] [year] [list]
Message-ID: <CACQ1gAj2NFQRhBP3Po4H9SZJgsSDrG97Qk68kiw3aKjQMnFg-Q@mail.gmail.com>
Date:	Fri, 27 Sep 2013 13:12:36 +0200
From:	Richard Genoud <richard.genoud@...il.com>
To:	Richard Weinberger <richard@....at>
Cc:	Artem Bityutskiy <dedekind1@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	linux-mtd <linux-mtd@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] UBI: Fix error path in scan_pool()

2013/9/27 Richard Weinberger <richard@....at>:
> Am 26.09.2013 11:25, schrieb Richard Genoud:
>> I added some traces and I found that : (dumping ec_header after
>> "ubi_io_read_ec_hdr(ubi, pnum, ech, 0); " in ubi_scan_fastmap())
>> [    0.812500] UBI: default fastmap pool size: 95
>> [    0.820312] UBI: default fastmap WL pool size: 25
>> [    0.828125] UBI: attaching mtd2 to ubi0
>> [    0.851562] ubi_scan_fastmap:
>> [    0.859375] Erase counter header dump:
>> [    0.859375]  magic          0x55424923
>> [    0.867187]  version        1
>> [    0.867187]  ec             1
>> [    0.867187]  vid_hdr_offset 2048
>> [    0.875000]  data_offset    4096
>> [    0.875000]  image_seq      891983656 <- image seq is good.
>> [    0.875000]  hdr_crc        0x13cc9a78
>> [    0.882812] erase counter header hexdump:
>> [    0.882812] 00000000: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00
>> 01 00 00 08 00 00 00 10 00 35 2a 97
>> 28 00 00 00 00  UBI#....................5*.(....
>> [    0.890625] 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 00 00 00 00 00 00 00 00 00 00 00 00
>> 00 13 cc 9a 78  ...............................x
>> [    0.960937] UBI error: scan_pool: bad image seq: 0x0, expected: 0x352a9728
>
> BTW: Do you really print the same PEB as scan_pool() complains about?
No, those debug traces were dumb, sorry...
I understand fastmap code better now :)
> Do you know how many PEBs for one fastmap are needed on your target?

Actually, I just found the problem.
U-boot has an old UBI implementation that was not aware of image_seq.
So when I write the ubifs volume, some PEB got erased by UBI(in uboot)
and written with a image_seq==0.
and fastmap doesn't pay attention to this use case.

I'll have to test a patch I made and I'll send it in a while.


Richard.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ