<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/ext4, branch v2018.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>ext4: recover from filesystem corruption when reading</title>
<updated>2017-11-20T08:58:31+00:00</updated>
<author>
<name>Ian Ray</name>
<email>ian.ray@ge.com</email>
</author>
<published>2017-11-08T15:35:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ecdfb4195b20eb2dcde3c4083170016c13c69e8b'/>
<id>ecdfb4195b20eb2dcde3c4083170016c13c69e8b</id>
<content type='text'>
Some fixes when reading EXT files and directory entries were identified
after using e2fuzz to corrupt an EXT3 filesystem:

 - Stop reading directory entries if the offset becomes badly aligned.

 - Avoid overwriting memory by clamping the length used to zero the buffer
   in ext4fs_read_file.  Also sanity check blocksize.

Signed-off-by: Ian Ray &lt;ian.ray@ge.com&gt;
Signed-off-by: Martyn Welch &lt;martyn.welch@collabora.co.uk&gt;
Reviewed-by: Stefano Babic &lt;sbabic@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some fixes when reading EXT files and directory entries were identified
after using e2fuzz to corrupt an EXT3 filesystem:

 - Stop reading directory entries if the offset becomes badly aligned.

 - Avoid overwriting memory by clamping the length used to zero the buffer
   in ext4fs_read_file.  Also sanity check blocksize.

Signed-off-by: Ian Ray &lt;ian.ray@ge.com&gt;
Signed-off-by: Martyn Welch &lt;martyn.welch@collabora.co.uk&gt;
Reviewed-by: Stefano Babic &lt;sbabic@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls</title>
<updated>2017-10-06T15:28:22+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2017-09-27T02:43:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fa9ca8a5d271e0533f61222df2bd6fd512687dbd'/>
<id>fa9ca8a5d271e0533f61222df2bd6fd512687dbd</id>
<content type='text'>
As reported by Coverity, we did not free dirnode in the case of failure.
Do so now.

Reported-by: Coverity (CID: 131221)
Cc: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As reported by Coverity, we did not free dirnode in the case of failure.
Do so now.

Reported-by: Coverity (CID: 131221)
Cc: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ext4: Fix group descriptor checksum calculation</title>
<updated>2017-10-06T15:28:18+00:00</updated>
<author>
<name>Tuomas Tynkkynen</name>
<email>tuomas.tynkkynen@iki.fi</email>
</author>
<published>2017-09-25T19:06:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=385b73185596cfc9e2acb74ab66abe91c06177f3'/>
<id>385b73185596cfc9e2acb74ab66abe91c06177f3</id>
<content type='text'>
The current code doesn't compute the group descriptor checksum correctly
for the filesystems that e2fsprogs 1.43.4 creates (they have
'Group descriptor size: 64' as reported by tune2fs). Extend the checksum
calculation to be done as ext4_group_desc_csum() does in Linux.

This fixes these errors in dmesg from running fs-test.sh and makes it
succeed again:

[1671902.620699] EXT4-fs (loop1): ext4_check_descriptors: Checksum for group 0 failed (35782!=10965)
[1671902.620706] EXT4-fs (loop1): group descriptors corrupted!

Signed-off-by: Tuomas Tynkkynen &lt;tuomas.tynkkynen@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current code doesn't compute the group descriptor checksum correctly
for the filesystems that e2fsprogs 1.43.4 creates (they have
'Group descriptor size: 64' as reported by tune2fs). Extend the checksum
calculation to be done as ext4_group_desc_csum() does in Linux.

This fixes these errors in dmesg from running fs-test.sh and makes it
succeed again:

[1671902.620699] EXT4-fs (loop1): ext4_check_descriptors: Checksum for group 0 failed (35782!=10965)
[1671902.620706] EXT4-fs (loop1): group descriptors corrupted!

Signed-off-by: Tuomas Tynkkynen &lt;tuomas.tynkkynen@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: Create a common fs_devread for ext4/reiserfs/zfs</title>
<updated>2017-10-03T01:51:50+00:00</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2017-09-03T15:00:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5994e8b6432d1c6df1cad44771f02054dba893ff'/>
<id>5994e8b6432d1c6df1cad44771f02054dba893ff</id>
<content type='text'>
The ext4, reiserfs and zfs filesystems all have their own implementation
of the same function, *_devread. Generalize this function into fs_devread
and put the code into fs/fs_internal.c.

Signed-off-by: Marek Behun &lt;marek.behun@nic.cz&gt;
[trini: Move fs/fs_internal.o hunk to the end of fs/Makefile as all
cases need it]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ext4, reiserfs and zfs filesystems all have their own implementation
of the same function, *_devread. Generalize this function into fs_devread
and put the code into fs/fs_internal.c.

Signed-off-by: Marek Behun &lt;marek.behun@nic.cz&gt;
[trini: Move fs/fs_internal.o hunk to the end of fs/Makefile as all
cases need it]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: ext4: Fix journal overrun issue reported by Coverity</title>
<updated>2017-08-26T18:56:13+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2017-08-21T02:30:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=10b078d83674ab0ced812da490f3c6d2261e1b79'/>
<id>10b078d83674ab0ced812da490f3c6d2261e1b79</id>
<content type='text'>
While &amp;p_jdb[fs-&gt;blksz] is a valid expression (it points *one* char
sized element past the end of the array, e.g. &amp;p_jdb[fs-&gt;blksz + 1] is
invalid (according to the C standard (C99/C11)).

Changing this to tag = (struct ext3_journal_block_tag *)(p_jdb + ofs);

Cc: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Suggested-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Reported-by: Coverity (CID: 165117, 165110)
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While &amp;p_jdb[fs-&gt;blksz] is a valid expression (it points *one* char
sized element past the end of the array, e.g. &amp;p_jdb[fs-&gt;blksz + 1] is
invalid (according to the C standard (C99/C11)).

Changing this to tag = (struct ext3_journal_block_tag *)(p_jdb + ofs);

Cc: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Suggested-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Reported-by: Coverity (CID: 165117, 165110)
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: Fix comparision of unsigned expression with &lt; 0</title>
<updated>2017-04-27T20:49:09+00:00</updated>
<author>
<name>Lokesh Vutla</name>
<email>lokeshvutla@ti.com</email>
</author>
<published>2017-04-26T11:28:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=509b498a500afab1111d69f789b630c699b071a3'/>
<id>509b498a500afab1111d69f789b630c699b071a3</id>
<content type='text'>
In file ext4fs.c funtion ext4fs_read_file() compares an
unsigned expression with &lt; 0 like below

	lbaint_t blknr;
	blknr = read_allocated_block(&amp;(node-&gt;inode), i);
	if (blknr &lt; 0)
		return -1;

blknr is of type ulong/uint64_t. read_allocated_block() returns
long int. So comparing blknr with &lt; 0 will always be false. Instead
declare blknr as long int.

Similarly ext4/dev.c does a similar comparison. Drop the redundant
comparison.

Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In file ext4fs.c funtion ext4fs_read_file() compares an
unsigned expression with &lt; 0 like below

	lbaint_t blknr;
	blknr = read_allocated_block(&amp;(node-&gt;inode), i);
	if (blknr &lt; 0)
		return -1;

blknr is of type ulong/uint64_t. read_allocated_block() returns
long int. So comparing blknr with &lt; 0 will always be false. Instead
declare blknr as long int.

Similarly ext4/dev.c does a similar comparison. Drop the redundant
comparison.

Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ext4: Initialize group descriptor size for revision level 0 filesystems</title>
<updated>2016-12-27T16:24:18+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2016-12-27T01:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3cc5bbb8e68dc67b7c3d2fdebef69408e5271469'/>
<id>3cc5bbb8e68dc67b7c3d2fdebef69408e5271469</id>
<content type='text'>
genext2fs creates revision level 0 filesystems, which are not readable
by u-boot due to the initialized group descriptor size field.
f798b1dda1c5de818b806189e523d1b75db7e72d

Reported-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Reported-by: FrostyBytes@protonmail.com
Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Tested-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
genext2fs creates revision level 0 filesystems, which are not readable
by u-boot due to the initialized group descriptor size field.
f798b1dda1c5de818b806189e523d1b75db7e72d

Reported-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Reported-by: FrostyBytes@protonmail.com
Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Tested-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: Allow reading files with non-zero offset, clamp read len</title>
<updated>2016-11-21T19:07:27+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2016-11-06T17:33:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=66a47ff2d8f037e1e9d641623257894a9975c325'/>
<id>66a47ff2d8f037e1e9d641623257894a9975c325</id>
<content type='text'>
Support was already implemented, but not hooked up. This fixes several
fails in the test cases.

Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support was already implemented, but not hooked up. This fixes several
fails in the test cases.

Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: Fix handling of sparse files</title>
<updated>2016-11-21T19:07:27+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2016-11-05T21:17:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f81db56f2fd6dc16efeaec2961121244765a1f11'/>
<id>f81db56f2fd6dc16efeaec2961121244765a1f11</id>
<content type='text'>
A sparse file may have regions not mapped by any extents, at the start
or at the end of the file, or anywhere between, thus not finding a
matching extent region is never an error.

Found by python filesystem tests.

Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A sparse file may have regions not mapped by any extents, at the start
or at the end of the file, or anywhere between, thus not finding a
matching extent region is never an error.

Found by python filesystem tests.

Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: Only write journal entries for modified blocks in unlink_filename</title>
<updated>2016-10-24T12:04:37+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2016-10-09T18:15:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=805e3e00f24cf5d7f922a0e5a0cd0e08ce9a8c7b'/>
<id>805e3e00f24cf5d7f922a0e5a0cd0e08ce9a8c7b</id>
<content type='text'>
Instead of creating a journal entry for each directory block, even
if the block is unmodified, only log the modified block.

Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of creating a journal entry for each directory block, even
if the block is unmodified, only log the modified block.

Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
