<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mtd/cmdlinepart.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-12-29T12:42:45Z</updated>
<entry>
<title>mtd: parser: cmdline: Fix parsing of part-names with colons</title>
<updated>2020-12-29T12:42:45Z</updated>
<author>
<name>Sven Eckelmann</name>
</author>
<published>2020-11-24T06:25:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=970756b8867b89354de57599de8038abac0e1299'/>
<id>urn:sha1:970756b8867b89354de57599de8038abac0e1299</id>
<content type='text'>
commit 639a82434f16a6df0ce0e7c8595976f1293940fd upstream.

Some devices (especially QCA ones) are already using hardcoded partition
names with colons in it. The OpenMesh A62 for example provides following
mtd relevant information via cmdline:

  root=31:11 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(custom),64k(0:KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) rootfsname=rootfs rootwait

The change to split only on the last colon between mtd-id and partitions
will cause newpart to see following string for the first partition:

  KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive)

Such a partition list cannot be parsed and thus the device fails to boot.

Avoid this behavior by making sure that the start of the first part-name
("(") will also be the last byte the mtd-id split algorithm is using for
its colon search.

Fixes: eb13fa022741 ("mtd: parser: cmdline: Support MTD names containing one or more colons")
Cc: stable@vger.kernel.org
Cc: Ron Minnich &lt;rminnich@google.com&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20201124062506.185392-1-sven@narfation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: parser: cmdline: Support MTD names containing one or more colons</title>
<updated>2020-10-01T09:11:56Z</updated>
<author>
<name>Boris Brezillon</name>
</author>
<published>2020-04-29T16:53:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17fd0a642bbc15dec94c50e35c80c9e0fab590ea'/>
<id>urn:sha1:17fd0a642bbc15dec94c50e35c80c9e0fab590ea</id>
<content type='text'>
[ Upstream commit eb13fa0227417e84aecc3bd9c029d376e33474d3 ]

Looks like some drivers define MTD names with a colon in it, thus
making mtdpart= parsing impossible. Let's fix the parser to gracefully
handle that case: the last ':' in a partition definition sequence is
considered instead of the first one.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Signed-off-by: Ron Minnich &lt;rminnich@google.com&gt;
Tested-by: Ron Minnich &lt;rminnich@google.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: cmdlinepart: convert printk() to pr_*()</title>
<updated>2015-09-29T01:37:32Z</updated>
<author>
<name>Brian Norris</name>
</author>
<published>2015-06-19T20:10:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecb43e0a5f72379095892660c4e1601904ab1949'/>
<id>urn:sha1:ecb43e0a5f72379095892660c4e1601904ab1949</id>
<content type='text'>
This driver uses some custom macros for printing. Let's use the standard
pr_fmt()/pr_{err,warn}().

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: cmdlinepart: allow small partitions</title>
<updated>2015-09-29T01:37:31Z</updated>
<author>
<name>Brian Norris</name>
</author>
<published>2015-06-19T20:10:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d855d23b56a5d67a7727dc275a86aaba290d7c55'/>
<id>urn:sha1:d855d23b56a5d67a7727dc275a86aaba290d7c55</id>
<content type='text'>
I'm not sure why we have a PAGE_SIZE restriction on this partition
parser.

If we really wanted the restriction, I would expect it to be a
restriction for *all* parsers, so we'd move it to the MTD core

At any rate, while small partitions may not be useful (they'll often be
smaller than the eraseblock size and therefore can only be used
read-only), they still have use as a read-only partition.

This restriction is especially annoying because it aborts the entire
MTD's cmdline parsing, leaving it unpartitioned.

So, let's kill the restriction and only check for zero-sized partitions,
which I expect we don't want to allow.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: cmdlinepart: Spelling s/trucate/truncate/</title>
<updated>2014-07-02T22:17:15Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2014-06-29T10:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=29f63f65cc327d87e7ced987d9e4c58b1ede9bf7'/>
<id>urn:sha1:29f63f65cc327d87e7ced987d9e4c58b1ede9bf7</id>
<content type='text'>
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: make register_mtd_parser return void</title>
<updated>2014-01-03T19:22:22Z</updated>
<author>
<name>Axel Lin</name>
</author>
<published>2013-12-01T11:01:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e14a61d412eb87ef7bdcec8b08a95bead771a78'/>
<id>urn:sha1:6e14a61d412eb87ef7bdcec8b08a95bead771a78</id>
<content type='text'>
register_mtd_parser never fails; hence make it return void.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: Allow removal of partitioning modules</title>
<updated>2013-02-04T07:27:33Z</updated>
<author>
<name>Lubomir Rintel</name>
</author>
<published>2013-01-16T01:12:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=422f3890a68333cfd39f2133cf7255ed067e92e6'/>
<id>urn:sha1:422f3890a68333cfd39f2133cf7255ed067e92e6</id>
<content type='text'>
Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: cmdlinepart: Make it into a module</title>
<updated>2013-02-04T07:27:33Z</updated>
<author>
<name>Lubomir Rintel</name>
</author>
<published>2013-01-16T01:12:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f5f172dc031ace288c5bb5d18f0b956db08241c2'/>
<id>urn:sha1:f5f172dc031ace288c5bb5d18f0b956db08241c2</id>
<content type='text'>
All other partitioning schemes can be compiled as modules

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: cmdlinepart: update /proc/mtd comment</title>
<updated>2013-02-04T07:26:28Z</updated>
<author>
<name>Christopher Cordahi</name>
</author>
<published>2012-12-18T21:11:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd6ce5ef913a7b4dfe5cd5028309346d32a8c404'/>
<id>urn:sha1:bd6ce5ef913a7b4dfe5cd5028309346d32a8c404</id>
<content type='text'>
/proc/mtd doesn't contain the mtd-id of the device, but the part name from the
command line.  This corrects what I believe is an obsolete comment from commit
a0ee24a03b1c06813c814b9f70946c8984752f01.

Signed-off-by: Christopher Cordahi &lt;christophercordahi@nanometrics.ca&gt;
Cc: Philip Rakity &lt;prakity@yahoo.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: cmdlinepart: describe mtd ordering</title>
<updated>2013-02-04T07:26:28Z</updated>
<author>
<name>Christopher Cordahi</name>
</author>
<published>2012-12-18T21:11:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea8b8e27fecd44c4fb7b3c6f8f72ea7b92f87fe8'/>
<id>urn:sha1:ea8b8e27fecd44c4fb7b3c6f8f72ea7b92f87fe8</id>
<content type='text'>
The mtd documentation makes no mention of the useful feature whereby
partitions' logical ordering need not match their physical ordering.
Truncation of parts, skipping of zero sized parts, and handling of
overlapping parts are similarly not mentioned.

This updates the comments at the top of file describing the command
line parsing as currently implemented.   I proposed this in
http://lists.infradead.org/pipermail/linux-mtd/2012-December/045314.html

Signed-off-by: Christopher Cordahi &lt;christophercordahi@nanometrics.ca&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
</feed>
