<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs, branch v2025.07</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>Revert "ext4fs: Fix: Read outside partition error"</title>
<updated>2025-05-27T16:09:12+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-05-26T22:29:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e04d137231f2e9e14708a32448c879125b8e308f'/>
<id>e04d137231f2e9e14708a32448c879125b8e308f</id>
<content type='text'>
The issue here is that the function read_allocated_block() will report
problems via a negative return value. If we say the return value is
stored in an lbaint_t that can no longer happen (and Coverity discovered
this by reporting a no effect comparison and then dead code). The
problem being fixed by allowing for storing a larger block number will
have to be solved in some other manner.

This reverts commit df2ed552f0b05591090369a7fe7ddc92439dea5c.

Addresses-Coverity-ID: 131183
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The issue here is that the function read_allocated_block() will report
problems via a negative return value. If we say the return value is
stored in an lbaint_t that can no longer happen (and Coverity discovered
this by reporting a no effect comparison and then dead code). The
problem being fixed by allowing for storing a larger block number will
have to be solved in some other manner.

This reverts commit df2ed552f0b05591090369a7fe7ddc92439dea5c.

Addresses-Coverity-ID: 131183
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4fs: Fix: Read outside partition error</title>
<updated>2025-05-23T16:42:49+00:00</updated>
<author>
<name>Tony Dinh</name>
<email>mibodhi@gmail.com</email>
</author>
<published>2025-05-23T05:02:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=df2ed552f0b05591090369a7fe7ddc92439dea5c'/>
<id>df2ed552f0b05591090369a7fe7ddc92439dea5c</id>
<content type='text'>
Use lbaint_t for blknr to avoid overflow in ext4fs_read_file().

Background:

blknr (block number) used in ext4fs_read_file() could be increased to a
very large value and causes a wrap around at 32 bit signed integer max,
thus becomes negative. This results in an out-of-normal range for sector
number (during the assignment delayed_start = blknr) where delayed_start
sector is typed uint64 lbaint_t. This causes the "Read outside partition"
error.

This patch was tested on the Synology DS116 (Armada 385) board, and a
4TB Seagate HDD.

Signed-off-by: Tony Dinh &lt;mibodhi@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use lbaint_t for blknr to avoid overflow in ext4fs_read_file().

Background:

blknr (block number) used in ext4fs_read_file() could be increased to a
very large value and causes a wrap around at 32 bit signed integer max,
thus becomes negative. This results in an out-of-normal range for sector
number (during the assignment delayed_start = blknr) where delayed_start
sector is typed uint64 lbaint_t. This causes the "Read outside partition"
error.

This patch was tested on the Synology DS116 (Armada 385) board, and a
4TB Seagate HDD.

Signed-off-by: Tony Dinh &lt;mibodhi@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: fs_devread should log error when read outside partition</title>
<updated>2025-05-23T16:42:31+00:00</updated>
<author>
<name>Tony Dinh</name>
<email>mibodhi@gmail.com</email>
</author>
<published>2025-05-20T23:49:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ec3ce603cd9840492d60230f164533ad4574489f'/>
<id>ec3ce603cd9840492d60230f164533ad4574489f</id>
<content type='text'>
Log the error if fs_devread() fails when trying to reading outside
partition. This will make bug reporting easier.

Signed-off-by: Tony Dinh &lt;mibodhi@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Log the error if fs_devread() fails when trying to reading outside
partition. This will make bug reporting easier.

Signed-off-by: Tony Dinh &lt;mibodhi@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>EXT4: add CRC16 dependency</title>
<updated>2025-05-23T14:01:15+00:00</updated>
<author>
<name>Marius Dinu</name>
<email>m95d+git@psihoexpert.ro</email>
</author>
<published>2025-05-08T12:05:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ba57d85e771db791f814f89df9933dbe70c21cf7'/>
<id>ba57d85e771db791f814f89df9933dbe70c21cf7</id>
<content type='text'>
CRC16 is used in ext4_common.c. Build fails without it.

PS:
This is my first patch sent to a mailing list.
If there is anything wrong with it (email format, whitespace, etc.)
please let me know.

Signed-off-by: Marius Dinu &lt;m95d+git@psihoexpert.ro&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CRC16 is used in ext4_common.c. Build fails without it.

PS:
This is my first patch sent to a mailing list.
If there is anything wrong with it (email format, whitespace, etc.)
please let me know.

Signed-off-by: Marius Dinu &lt;m95d+git@psihoexpert.ro&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: exfat: Inhibit unused exfat_humanize_bytes() and exfat_print_info()</title>
<updated>2025-05-05T20:19:20+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2025-04-30T16:45:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4d3b5c679bc9d5c6cbbeedcc1e4a186f1cc35541'/>
<id>4d3b5c679bc9d5c6cbbeedcc1e4a186f1cc35541</id>
<content type='text'>
Make sure unused exfat_humanize_bytes() and exfat_print_info()
functions are not compiled into U-Boot code base. This also removes
CID 550300:  Integer handling issues  (INTEGER_OVERFLOW)
in exfat_humanize_bytes() , which is now surely unreachable.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure unused exfat_humanize_bytes() and exfat_print_info()
functions are not compiled into U-Boot code base. This also removes
CID 550300:  Integer handling issues  (INTEGER_OVERFLOW)
in exfat_humanize_bytes() , which is now surely unreachable.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: exfat: Use strncpy() and bail on too long filenames</title>
<updated>2025-05-05T20:19:20+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2025-04-30T16:45:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4ba2fe14f2cecf7b614220e8e19c1fcdda92b748'/>
<id>4ba2fe14f2cecf7b614220e8e19c1fcdda92b748</id>
<content type='text'>
In case the filename is too long, longer than PATH_MAX - 1, it
would overflow dirs-&gt;dirname array. Add missing check and also
use strncpy() to prevent the overflow in any case.

Fixes CID 550305:  Security best practices violations  (STRING_OVERFLOW)

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case the filename is too long, longer than PATH_MAX - 1, it
would overflow dirs-&gt;dirname array. Add missing check and also
use strncpy() to prevent the overflow in any case.

Fixes CID 550305:  Security best practices violations  (STRING_OVERFLOW)

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/squashfs: avoid illegal free() in sqfs_opendir()</title>
<updated>2025-04-21T17:08:03+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-04-14T13:19:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=185fdf5e94731df05748b1c576effb52ff7a3ec5'/>
<id>185fdf5e94731df05748b1c576effb52ff7a3ec5</id>
<content type='text'>
* Use calloc() to allocate token_list. This avoids an illegal free if
  sqfs_tokenize() fails.
* Do not iterate over token_list if it has not been allocated.

Addresses-Coverity-ID: 510453:  Null pointer dereferences  (FORWARD_NULL)
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Joao Marcos Costa &lt;joaomarcos.costa@bootlin.com&gt;
Reviewed-by: Joao Marcos Costa &lt;jmcosta944@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use calloc() to allocate token_list. This avoids an illegal free if
  sqfs_tokenize() fails.
* Do not iterate over token_list if it has not been allocated.

Addresses-Coverity-ID: 510453:  Null pointer dereferences  (FORWARD_NULL)
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Joao Marcos Costa &lt;joaomarcos.costa@bootlin.com&gt;
Reviewed-by: Joao Marcos Costa &lt;jmcosta944@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: exfat: Implement trivial 'rename' support</title>
<updated>2025-04-21T17:07:04+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2025-04-13T08:55:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e5cbc3d2874ff5ec80f4a5c92b5db61769670d5f'/>
<id>e5cbc3d2874ff5ec80f4a5c92b5db61769670d5f</id>
<content type='text'>
Implement exfat_fs_rename() to rename or move files. This is used
by the 'mv' generic FS interface command. The rename implementation
for other filesystems was added recently and was not part of exfat
porting layer due to merge issue, which made 'mv' command crash,
fix this by adding the missing implementation.

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement exfat_fs_rename() to rename or move files. This is used
by the 'mv' generic FS interface command. The rename implementation
for other filesystems was added recently and was not part of exfat
porting layer due to merge issue, which made 'mv' command crash,
fix this by adding the missing implementation.

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: exfat: Fix exfat_fs_exists() return value</title>
<updated>2025-04-21T17:07:04+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2025-04-13T08:55:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e168a57c3532487b24348351f71f9f6ce7d671ee'/>
<id>e168a57c3532487b24348351f71f9f6ce7d671ee</id>
<content type='text'>
The exfat_fs_exists() should return 0 in case the path does not exist,
and 1 in case the path does exist. Fix the inverted return value. This
fixes 'test -e' command with exfat.

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The exfat_fs_exists() should return 0 in case the path does not exist,
and 1 in case the path does exist. Fix the inverted return value. This
fixes 'test -e' command with exfat.

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: exfat: Rework exfat_fs_readdir() to behave like exfat_fs_ls()</title>
<updated>2025-04-21T17:07:04+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2025-04-13T08:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=01a8121b7daa68767fe88fa92d436b95a1662bed'/>
<id>01a8121b7daa68767fe88fa92d436b95a1662bed</id>
<content type='text'>
The exfat_fs_readdir() depends on state created in exfat_fs_opendir(),
but that state may be disrupted by fs_close() called by the FS layer
in fs_opendir(), because exfat porting layer unmounts the filesystem
in -&gt;close() callback.

To avoid this disruption, avoid creating state in exfat_fs_opendir(),
cache only the directory name to list there, and rework exfat_fs_readdir()
to work in a similar way to exfat_fs_ls(). That is, make exfat_fs_readdir()
open the directory, look up specific entry, extract its properties to be
reported to FS layer, and close the directory. This is slow, but avoids
the disruption. The slowness does not affect regular 'ls' command, which
uses exfat_fs_ls() fast path.

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The exfat_fs_readdir() depends on state created in exfat_fs_opendir(),
but that state may be disrupted by fs_close() called by the FS layer
in fs_opendir(), because exfat porting layer unmounts the filesystem
in -&gt;close() callback.

To avoid this disruption, avoid creating state in exfat_fs_opendir(),
cache only the directory name to list there, and rework exfat_fs_readdir()
to work in a similar way to exfat_fs_ls(). That is, make exfat_fs_readdir()
open the directory, look up specific entry, extract its properties to be
reported to FS layer, and close the directory. This is slow, but avoids
the disruption. The slowness does not affect regular 'ls' command, which
uses exfat_fs_ls() fast path.

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
