<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/fat, branch v2018.03</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.03</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/fs/fat?h=v2018.03'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2018-01-22T21:43:31Z</updated>
<entry>
<title>fs: fat: Drop CONFIG_SUPPORT_VFAT</title>
<updated>2018-01-22T21:43:31Z</updated>
<author>
<name>Tuomas Tynkkynen</name>
<email>tuomas@tuxera.com</email>
</author>
<published>2018-01-05T00:45:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8bad6cb176a0e92ac8e7771fb68e5e0713edbf8e'/>
<id>urn:sha1:8bad6cb176a0e92ac8e7771fb68e5e0713edbf8e</id>
<content type='text'>
fat.h unconditionally defines CONFIG_SUPPORT_VFAT (and has done since
2003), so as a result VFAT support is always enabled regardless of
whether a board config defines it or not. Drop this unnecessary option.

Signed-off-by: Tuomas Tynkkynen &lt;tuomas@tuxera.com&gt;
</content>
</entry>
<entry>
<title>fs: FAT: Fix typo in FS_FAT_MAX_CLUSTSIZE description</title>
<updated>2018-01-22T21:43:31Z</updated>
<author>
<name>Tuomas Tynkkynen</name>
<email>tuomas@tuxera.com</email>
</author>
<published>2018-01-05T00:45:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e8df14d216f483d32f9daaf236686d1613b3f871'/>
<id>urn:sha1:e8df14d216f483d32f9daaf236686d1613b3f871</id>
<content type='text'>
Signed-off-by: Tuomas Tynkkynen &lt;tuomas@tuxera.com&gt;
</content>
</entry>
<entry>
<title>fs/fat: remove distractive message in file_fat_read_at()</title>
<updated>2018-01-19T20:49:28Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2018-01-01T20:31:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d2f715802833d636513dcd3c156632e35bd04454'/>
<id>urn:sha1:d2f715802833d636513dcd3c156632e35bd04454</id>
<content type='text'>
The message "reading %s\n" may be interesting when
debugging but otherwise it is superfluous.

Only output the message when debugging.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>fat write: Fixed a problem with the case of file names when writing files</title>
<updated>2018-01-10T13:05:51Z</updated>
<author>
<name>Jean-Jacques Hiblot</name>
<email>jjhiblot@ti.com</email>
</author>
<published>2017-12-21T11:49:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c33b0c7d8deca7e9a907365a59fcbcde531c70d'/>
<id>urn:sha1:2c33b0c7d8deca7e9a907365a59fcbcde531c70d</id>
<content type='text'>
commit 21a24c3bf35b ("fs/fat: fix case for FAT shortnames") made it
possible that get_name() returns file names with some upper cases.
find_directory_entry() must be updated to take this account, and use
case-insensitive functions to compare file names.

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
</content>
</entry>
<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>
</feed>
