<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/nand-utils, branch v2.1.5</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.5</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.5'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2022-06-27T05:58:48+00:00</updated>
<entry>
<title>nandflipbits: fix corrupted oob</title>
<updated>2022-06-27T05:58:48+00:00</updated>
<author>
<name>Christophe Kerello</name>
<email>christophe.kerello@foss.st.com</email>
</author>
<published>2022-06-16T07:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a315011bd3c237660436e0c796743d61acf4a7b6'/>
<id>urn:sha1:a315011bd3c237660436e0c796743d61acf4a7b6</id>
<content type='text'>
If a bit is flipped in block 1 or higher, the OOB is corrupted with the
OOB of block 0. Mtd_read_oob API has to take into account the block number
to be able to calculate the right offset.

Fixes: 9fc8db29cf62 ("mtd-utils: Add nandflipbits tool")
Signed-off-by: Christophe Kerello &lt;christophe.kerello@foss.st.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: nanddump: fix writing big images on 32bit machines</title>
<updated>2022-06-08T07:53:51+00:00</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2022-06-08T07:51:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f79d2b21614f11ea9f99dc5a3155d23439cec773'/>
<id>urn:sha1:f79d2b21614f11ea9f99dc5a3155d23439cec773</id>
<content type='text'>
When writing a full 4GiB NAND to a file end_addr becomes 0x100000000.
With that writing out the first page to the file doesn't happen
because size_left is calculated to 0x100000000 - 0 = 0x100000000
which is then truncated to 32bit and becomes zero. Fix this by
using an appropriate 64bit type for size_left.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>nandwrite: warn about writing 0xff blocks</title>
<updated>2022-03-28T06:49:40+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2022-03-25T12:00:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=e62ea740c5e4edb37065193c400a3a82d5479c15'/>
<id>urn:sha1:e62ea740c5e4edb37065193c400a3a82d5479c15</id>
<content type='text'>
Such blocks may be incorrectly treated as empty (even though they may
have non-erase OOB). Warn about it so people may start useing
--skip-all-ffs .

Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix test binary installation</title>
<updated>2021-01-20T11:01:53+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-10-19T10:14:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=7170a28d46d5db1e7a9da24a5555a194a233ef0b'/>
<id>urn:sha1:7170a28d46d5db1e7a9da24a5555a194a233ef0b</id>
<content type='text'>
 - Remove "install tests" configure option, we already have an option
   whether to build tests or not. Don't try to work around autotools
   semantics that people building the package expect.
 - Fix the installation path by propperly defining it and using the
   correct name for the libexec path.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: Automake: remove single use variables</title>
<updated>2021-01-20T10:53:58+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-10-19T09:40:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a888044525d9f03290cc1afe62dcfa3bec4bc0b9'/>
<id>urn:sha1:a888044525d9f03290cc1afe62dcfa3bec4bc0b9</id>
<content type='text'>
Throughout the Automake files, there is a consistent pattern somewhat
like this:

    FOO_BINS = ....

    sbin_PROGRAMS += $(FOO_BINS)

This commit all such patterns whenever the variable is not used anywhere
else and appends to the target directly.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Remove headers from EXTRA_DIST</title>
<updated>2021-01-20T10:53:51+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-10-19T09:12:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c41808cdc3a2c3c8ca5f73707745f48aae49e17e'/>
<id>urn:sha1:c41808cdc3a2c3c8ca5f73707745f48aae49e17e</id>
<content type='text'>
This commit removes the C header files from the EXTRA_DIST variables
and instead assigns them to the SOURCE variable of the respective
components they belong to.

This takes care of having them distributed in the release tar ball and
helps with dependency tracking a little.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: Add nandflipbits tool</title>
<updated>2020-10-18T20:23:16+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@collabora.com</email>
</author>
<published>2020-04-24T16:32:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=9fc8db29cf624b40cd2abeadc882eff8dd4ca65a'/>
<id>urn:sha1:9fc8db29cf624b40cd2abeadc882eff8dd4ca65a</id>
<content type='text'>
The nandflipbits tool is intended to be used when one need to flip one or
several specific bits on a NAND media.
It can be useful to manually recover from an unexpected bit flip on a flash
device, though the main purpose of this tool is to provide a way to test
ECC algorithms robustness.

One typical example I used this tool for is testing HW ECC engines behavior
when bitflips occur in an erased page: most HW engines do not correctly
handle this case, because, most of the time, ECC bits generated for an
empty page are not all 1s, and, empty page detection embedded in such
engines is only validating that all bits are set to 1s (which is not true
when a bit-flip has occurred).

Another use of this tool is replacing nandbiterrs test which
absolutely do not work with MLC-like chips because of the rewriting of
the pages in raw mode to toggle ones into zeroes.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
[miquel: Took Boris' work from 2014, addressed comments from Brian made
         in 2015, updated it, tested more extensively and fixed issues]
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: Fix wrong argument to sizeof in nanddump</title>
<updated>2020-02-09T21:13:18+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-01-24T22:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=7d40c1a1420bc95af20624aa22e254a8eb3356f0'/>
<id>urn:sha1:7d40c1a1420bc95af20624aa22e254a8eb3356f0</id>
<content type='text'>
Some temporary buffers are allocated with "sizeof(pointer) * count" as
size argument, which cannot possibly be correct.

Assuming what was meant was "sizeof(pointer[0]) * count" makes sense
in the context of how the buffers are used, but is actually pretty
pointless, since the buffers are unsigend char.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: Fix potential negative arguments passed to close(2)</title>
<updated>2020-02-09T21:13:18+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-01-24T22:01:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=b636250e211198210ab996671bccc2983300c6f5'/>
<id>urn:sha1:b636250e211198210ab996671bccc2983300c6f5</id>
<content type='text'>
Many tools open a file descriptor, close it a the end and have some
form of error path in between that jumps to the end.

In some cases, if opening the file fails the error path is taken and
the utility ends up closing one or more invalid file descriptors. It's
technically not a real issue but something that pretty much any static
analysis tool barks at.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>nanddump: don't leak copied command line arguments</title>
<updated>2019-11-10T14:30:04+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-11-10T13:56:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c890094638880072cfa95a06cb1353f0214a11a0'/>
<id>urn:sha1:c890094638880072cfa95a06cb1353f0214a11a0</id>
<content type='text'>
For some command line flags, the argument string is copied. Simply
writing over the buffer leads to a resource leak if the same flag
is specified on the command line more than once.

This patch adds a free() call to the old buffer before overwriting
it with the new copy.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
