PING: [PATCH] Don't overflow when writing a key

Richard Weinberger richard at nod.at
Thu Oct 7 13:48:35 PDT 2021


----- Ursprüngliche Mail -----
> Von: "Jan-Benedict Glaw" <jbglaw at lug-owl.de>
> An: "richard" <richard at nod.at>
> CC: "linux-mtd" <linux-mtd at lists.infradead.org>, "Artem Bityutskiy" <artem.bityutskiy at linux.intel.com>
> Gesendet: Donnerstag, 7. Oktober 2021 19:45:10
> Betreff: Re: PING: [PATCH] Don't overflow when writing a key

> On Thu, 2021-10-07 17:20:47 +0200, Richard Weinberger <richard at nod.at> wrote:
>> > So ...  The code does _not_ overflow, that's good first of all. It's
>> > just a bit confusing how the key bytes are written to the buffer. At
>> > least I was easily distracted by the two different sizes.
>> 
>> If you find a better way to write the function, I'm all open for a patch.
>> But please make sure the generated code is sane.
> 
> That wouldn't be terribly complicated, but I have no way to actually
> *test* that.  It's just an issue I found while doing mass-builds for

You can test it.

$ modprobe nandsim
$ modprobe ubi
$ modprobe ubifs
$ ubiattach -m0
$ ubimkvol -m -N test /dev/ubi0
$ mount -t ubifs /dev/ubi0_0 /mnt

Now you have a shiny ubifs on /mnt. :-)

Thanks,
//richard



More information about the linux-mtd mailing list