<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/fat, branch v2018.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/fs/fat?h=v2018.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/fs/fat?h=v2018.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2017-11-30T03:36:59Z</updated>
<entry>
<title>fat: Use cache aligned buffers for fat_opendir</title>
<updated>2017-11-30T03:36:59Z</updated>
<author>
<name>Neil Armstrong</name>
<email>narmstrong@baylibre.com</email>
</author>
<published>2017-11-24T08:54:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=34dd853ce5f44d34bfb0358c73da2fe9f2a4e5d1'/>
<id>urn:sha1:34dd853ce5f44d34bfb0358c73da2fe9f2a4e5d1</id>
<content type='text'>
Before this patch one could receive following errors when executing "fatls"
command on machine with cache enabled (ex i.MX6Q) :

=&gt; fatls mmc 0:1
CACHE: Misaligned operation at range [4f59dfc8, 4f59e7c8]
CACHE: Misaligned operation at range [4f59dfc8, 4f59e7c8]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x4f59dfc8
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x4f59e7c8
CACHE: Misaligned operation at range [4f59dfc8, 4f59e7c8]
CACHE: Misaligned operation at range [4f59dfc8, 4f59e7c8]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x4f59dfc8
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x4f59e7c8

To alleviate this problem - the calloc()s have been replaced with
malloc_cache_aligned() and memset().

After those changes the buffers are properly aligned (with both start
address and size) to SoC cache line.

Fixes: 09fa964bba80 ("fs/fat: Fix 'CACHE: Misaligned operation at range' warnings")
Suggested-by: Lukasz Majewski &lt;lukma@denx.de&gt;
Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Reviewed-by: Lukasz Majewski &lt;lukma@denx.de&gt;
Reviewed-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
</content>
</entry>
<entry>
<title>fs/fat: Check malloc return values and fix memory leaks</title>
<updated>2017-10-08T20:19:56Z</updated>
<author>
<name>Tuomas Tynkkynen</name>
<email>tuomas.tynkkynen@iki.fi</email>
</author>
<published>2017-09-30T23:25:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=af609e3764ea3ed7c0ccad8e57f9d9671c81c3e8'/>
<id>urn:sha1:af609e3764ea3ed7c0ccad8e57f9d9671c81c3e8</id>
<content type='text'>
Check malloc() return values and properly unwind on errors so
memory allocated for fat_itr structures get freed properly.

Also fixes a leak of fsdata.fatbuf in fat_size().

Fixes: 2460098cffacd1 ("fs/fat: Reduce stack usage")
Reported-by: Coverity (CID: 167225, 167233, 167234)
Signed-off-by: Tuomas Tynkkynen &lt;tuomas.tynkkynen@iki.fi&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>fs/fat: Fix 'CACHE: Misaligned operation at range' warnings</title>
<updated>2017-10-08T20:19:56Z</updated>
<author>
<name>Tuomas Tynkkynen</name>
<email>tuomas.tynkkynen@iki.fi</email>
</author>
<published>2017-09-30T23:25:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=09fa964bba80c45432660f0e64362181900a5aef'/>
<id>urn:sha1:09fa964bba80c45432660f0e64362181900a5aef</id>
<content type='text'>
The 'block' field of fat_itr needs to be properly aligned for DMA and
while it does have '__aligned(ARCH_DMA_MINALIGN)', the fat_itr structure
itself needs to be properly aligned as well.

While at it use malloc_cache_aligned() for the other aligned allocations
in the file as well.

Fixes: 2460098cffacd1 ("fs/fat: Reduce stack usage")
Signed-off-by: Tuomas Tynkkynen &lt;tuomas.tynkkynen@iki.fi&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>fs/fat: Fix pathnames using '..' that lead to the root directory</title>
<updated>2017-10-06T15:28:19Z</updated>
<author>
<name>Tuomas Tynkkynen</name>
<email>tuomas.tynkkynen@iki.fi</email>
</author>
<published>2017-09-25T19:06:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8df8731474467782c6126f41da87618bcb84852a'/>
<id>urn:sha1:8df8731474467782c6126f41da87618bcb84852a</id>
<content type='text'>
If we end up back in the root directory via a '..' directory entry, set
itr-&gt;is_root accordingly. Failing to do that gives spews like
"Invalid FAT entry" and being unable to access directory entries located
past the first cluster of the root directory.

Fixes: 8eafae209c35 ("fat/fs: convert to directory iterators")
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Tuomas Tynkkynen &lt;tuomas.tynkkynen@iki.fi&gt;
</content>
</entry>
<entry>
<title>fs/fat: Reduce stack usage</title>
<updated>2017-09-22T11:37:43Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2017-09-22T11:37:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2460098cffacd18729262e3ed36656e6943783ed'/>
<id>urn:sha1:2460098cffacd18729262e3ed36656e6943783ed</id>
<content type='text'>
We have limited stack in SPL builds.  Drop itrblock and move to
malloc/free of itr to move this off of the stack.  As part of this fix a
double-free issue in fat_size().

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
---
Rework to use malloc/free as moving this to a global overflows some SH
targets.
</content>
</entry>
<entry>
<title>fs/fat: fix fatbuf leak</title>
<updated>2017-09-15T13:03:15Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2017-09-12T20:40:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=725ffdb5cbcc4b8a9726a68cc6ae0713266ba5a9'/>
<id>urn:sha1:725ffdb5cbcc4b8a9726a68cc6ae0713266ba5a9</id>
<content type='text'>
A new fatbuf was allocated by get_fs_info() (called by fat_itr_root()),
but not freed, resulting in eventually running out of memory.  Spotted
by running 'ls -r' in a large FAT filesystem from Shell.efi.

fatbuf is mainly used to cache FAT entry lookups (get_fatent())..
possibly once fat_write.c it can move into the iterator to simplify
this.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Łukasz Majewski &lt;lukma@denx.de&gt;
</content>
</entry>
<entry>
<title>fs/fat: Clean up open-coded sector &lt;-&gt; cluster conversions</title>
<updated>2017-09-15T13:03:15Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2017-09-09T17:16:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=265edc03d5a19550d92cbd6e10631d5a15bdd1d5'/>
<id>urn:sha1:265edc03d5a19550d92cbd6e10631d5a15bdd1d5</id>
<content type='text'>
Use the clust_to_sect() helper that was introduced earlier, and add an
inverse sect_to_clust(), plus update the various spots that open-coded
this conversion previously.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>fs/fat: fix case for FAT shortnames</title>
<updated>2017-09-15T13:03:14Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2017-09-09T17:15:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=21a24c3bf35bac83d66ce4a48eb0c7dd8a7227cb'/>
<id>urn:sha1:21a24c3bf35bac83d66ce4a48eb0c7dd8a7227cb</id>
<content type='text'>
Noticed when comparing our output to linux.  There are some lcase bits
which control whether filename and/or extension should be downcase'd.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Łukasz Majewski &lt;lukma@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>fat/fs: move ls to generic implementation</title>
<updated>2017-09-15T13:03:13Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2017-09-09T17:15:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=89191d626793490b579e1d36e7d7a4464a20f9f6'/>
<id>urn:sha1:89191d626793490b579e1d36e7d7a4464a20f9f6</id>
<content type='text'>
Add a generic implementation of 'ls' using opendir/readdir/closedir, and
replace fat's custom implementation.  Other filesystems should move to
the generic implementation after they add opendir/readdir/closedir
support.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Łukasz Majewski &lt;lukma@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>fat/fs: remove a bunch of dead code</title>
<updated>2017-09-15T13:03:12Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2017-09-09T17:15:57Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=41fa83d1a6cdd8ddfb3fbe332252193ff8fb8b71'/>
<id>urn:sha1:41fa83d1a6cdd8ddfb3fbe332252193ff8fb8b71</id>
<content type='text'>
Spotted by chance, when trying to remove file_fat_ls(), I noticed there
were some dead users of the API.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Acked-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
