<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/ubifs, branch next</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>fs: ubifs: remove dead code</title>
<updated>2026-05-18T07:19:56+00:00</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2026-05-12T05:50:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0646ee0ed86bd2809e10cff1f8ca3310ad7bf33b'/>
<id>0646ee0ed86bd2809e10cff1f8ca3310ad7bf33b</id>
<content type='text'>
This code is dead because it appears after an infinite loop; remove it.

Fixes: d5888d509cc4 ("fs: ubifs: fix bugs involving symlinks in ubifs_findfile")
Signed-off-by: Peter Collingbourne &lt;peter@pcc.me.uk&gt;
Reviewed-by: Heiko Schocher &lt;hs@nabladev.com&gt;

hs: corrected the commit ID
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This code is dead because it appears after an infinite loop; remove it.

Fixes: d5888d509cc4 ("fs: ubifs: fix bugs involving symlinks in ubifs_findfile")
Signed-off-by: Peter Collingbourne &lt;peter@pcc.me.uk&gt;
Reviewed-by: Heiko Schocher &lt;hs@nabladev.com&gt;

hs: corrected the commit ID
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: ubifs: fix bugs involving symlinks in ubifs_findfile</title>
<updated>2026-05-11T18:18:56+00:00</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2026-05-05T10:38:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d5888d509cc43942ec98d993f2d129f5c8ddc432'/>
<id>d5888d509cc43942ec98d993f2d129f5c8ddc432</id>
<content type='text'>
When encountering a symlink pointing to an absolute path, ubifs_findfile
would return the target of the symlink as the result instead of resolving
any following components in the original path. Fix it by following the
same code path that is used for relative paths except that we set the
next inode to the root if we see a leading slash.

The existing code used memcpy and sprintf to copy the symlink target
into a fixed size stack buffer and was therefore vulnerable to buffer
overflows with a sufficiently long symlink target. Fix it by using a
heap buffer for the temporary path during path resolution.

Signed-off-by: Peter Collingbourne &lt;peter@pcc.me.uk&gt;
Fixes: 9d7952e4c636 ("ubifs: Add support for looking up directory and relative symlinks")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When encountering a symlink pointing to an absolute path, ubifs_findfile
would return the target of the symlink as the result instead of resolving
any following components in the original path. Fix it by following the
same code path that is used for relative paths except that we set the
next inode to the root if we see a leading slash.

The existing code used memcpy and sprintf to copy the symlink target
into a fixed size stack buffer and was therefore vulnerable to buffer
overflows with a sufficiently long symlink target. Fix it by using a
heap buffer for the temporary path during path resolution.

Signed-off-by: Peter Collingbourne &lt;peter@pcc.me.uk&gt;
Fixes: 9d7952e4c636 ("ubifs: Add support for looking up directory and relative symlinks")
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage</title>
<updated>2026-02-17T19:50:22+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-02-09T01:30:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0f90b1e715f8abe41b0875752eb184f46032ff11'/>
<id>0f90b1e715f8abe41b0875752eb184f46032ff11</id>
<content type='text'>
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and
drop the unnecessary inclusion of asm/global_data.h.

Headers should be included directly by the files that need them,
rather than indirectly via global_data.h.

Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt; #STMicroelectronics boards and STM32MP1 ram test driver
Tested-by: Anshul Dalal &lt;anshuld@ti.com&gt; #TI boards
Acked-by: Yao Zi &lt;me@ziyao.cc&gt; #TH1520
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and
drop the unnecessary inclusion of asm/global_data.h.

Headers should be included directly by the files that need them,
rather than indirectly via global_data.h.

Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt; #STMicroelectronics boards and STM32MP1 ram test driver
Tested-by: Anshul Dalal &lt;anshuld@ti.com&gt; #TI boards
Acked-by: Yao Zi &lt;me@ziyao.cc&gt; #TH1520
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: ubifs: Fix and rework error handling in ubifs_finddir</title>
<updated>2025-10-08T09:36:05+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-10-03T10:42:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0cab29ff467e297064a9fc30200347bda06ee0c4'/>
<id>0cab29ff467e297064a9fc30200347bda06ee0c4</id>
<content type='text'>
Add a null check for 'file' before dereferencing it and also rework the
error handling to be a bit more sane.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a null check for 'file' before dereferencing it and also rework the
error handling to be a bit more sane.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: ubifs: Need to check return for being an error pointer</title>
<updated>2025-10-08T09:36:00+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-10-03T10:42:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=51615eb4f7bcd3367aecdeaea3638058ef5407f3'/>
<id>51615eb4f7bcd3367aecdeaea3638058ef5407f3</id>
<content type='text'>
The return value from alloc_super can be an error pointer so the error
check needs to detect this as well as checking the pointer for being
NULL.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The return value from alloc_super can be an error pointer so the error
check needs to detect this as well as checking the pointer for being
NULL.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: ubifs: Ensure buf is freed before return</title>
<updated>2025-10-08T09:35:47+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-10-03T10:42:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d23ddd5dee570e625e0fd76bba1e155f4cc1248c'/>
<id>d23ddd5dee570e625e0fd76bba1e155f4cc1248c</id>
<content type='text'>
Returning directly after buf has been allocated will result in a memory
leak. Instead set the error code and goto the common unwind code to
ensure that buf will be freed before returning.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Returning directly after buf has been allocated will result in a memory
leak. Instead set the error code and goto the common unwind code to
ensure that buf will be freed before returning.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: ubifs: Remove unnecessary assignment</title>
<updated>2025-01-28T05:44:18+00:00</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@amd.com</email>
</author>
<published>2025-01-24T13:17:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=14e02d6c6180f85114cc0a90469e010a5d68b2ee'/>
<id>14e02d6c6180f85114cc0a90469e010a5d68b2ee</id>
<content type='text'>
Variable self assignment has been found by clang. But Linux kernel already
fixed this problem by commit 2a068daf5742 ("ubifs: Remove unnecessary
assignment") and commit ae4c8081eb77 ("ubifs: remove unnecessary
assignment").

Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Reviewed-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Reviewed-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Variable self assignment has been found by clang. But Linux kernel already
fixed this problem by commit 2a068daf5742 ("ubifs: Remove unnecessary
assignment") and commit ae4c8081eb77 ("ubifs: remove unnecessary
assignment").

Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Reviewed-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Reviewed-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ubifs: Call ubifs_iput when ubifs_iget is used</title>
<updated>2024-08-11T04:52:15+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>michael@amarulasolutions.com</email>
</author>
<published>2024-08-10T12:57:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d16bda85ff0762aa96e36fa65d2e3b5342d73d7a'/>
<id>d16bda85ff0762aa96e36fa65d2e3b5342d73d7a</id>
<content type='text'>
The inode should be freed after a reference is get to avoid
memory leak

Tested-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Link: https://lore.kernel.org/u-boot/b698ec3e-d857-6512-8cc9-4edcab0a41b9@denx.de/T/#t
Link: https://lore.kernel.org/all/8f3a7059-6330-f332-8e9f-729b853e001e@denx.de/T/
Co-developed-by: Heiko Schocher &lt;hs@denx.de&gt;
Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The inode should be freed after a reference is get to avoid
memory leak

Tested-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Link: https://lore.kernel.org/u-boot/b698ec3e-d857-6512-8cc9-4edcab0a41b9@denx.de/T/#t
Link: https://lore.kernel.org/all/8f3a7059-6330-f332-8e9f-729b853e001e@denx.de/T/
Co-developed-by: Heiko Schocher &lt;hs@denx.de&gt;
Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ubifs: mount fails after power cycle</title>
<updated>2024-08-10T09:56:53+00:00</updated>
<author>
<name>Ravi Minnikanti</name>
<email>rminnikanti@marvell.com</email>
</author>
<published>2024-07-30T09:14:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cf7ea719ce60cd885cce5023dfaf7833d9fc1442'/>
<id>cf7ea719ce60cd885cce5023dfaf7833d9fc1442</id>
<content type='text'>
When kernel uses file system encryption, fscrypt on UBIFS v5,
after a hard power cycle UBIFS journal replay fails which results in mount failure.

Failure logs:
UBIFS: recovery needed
UBIFS error (pid 0): ubifs_validate_entry: bad directory entry node
UBIFS error (pid 0): replay_bud: bad node is at LEB 890:24576
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'ubi0:rootfs' errno=-22!

This change is ported from kernel:
commit id: 304790c038bc4af4f19774705409db27eafb09fc

Kernel commit description:
    Kernel commit description:
    ubifs: Relax checks in ubifs_validate_entry()

    With encrypted filenames we store raw binary data, doing
    string tests is no longer possible.

Signed-off-by: rminnikanti &lt;rminnikanti@marvell.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When kernel uses file system encryption, fscrypt on UBIFS v5,
after a hard power cycle UBIFS journal replay fails which results in mount failure.

Failure logs:
UBIFS: recovery needed
UBIFS error (pid 0): ubifs_validate_entry: bad directory entry node
UBIFS error (pid 0): replay_bud: bad node is at LEB 890:24576
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'ubi0:rootfs' errno=-22!

This change is ported from kernel:
commit id: 304790c038bc4af4f19774705409db27eafb09fc

Kernel commit description:
    Kernel commit description:
    ubifs: Relax checks in ubifs_validate_entry()

    With encrypted filenames we store raw binary data, doing
    string tests is no longer possible.

Signed-off-by: rminnikanti &lt;rminnikanti@marvell.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: ubifs: Add volume mounted check</title>
<updated>2024-08-10T09:54:28+00:00</updated>
<author>
<name>Alexander Dahl</name>
<email>ada@thorsis.com</email>
</author>
<published>2024-07-03T10:12:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ca1f11d8c11dacd91c3bfd8e39d41db349e83f8b'/>
<id>ca1f11d8c11dacd91c3bfd8e39d41db349e83f8b</id>
<content type='text'>
Safety guard in the U-Boot filesystem glue code, because these functions
are called from different parts of the codebase.  For generic filesystem
handling this should have been checked in blk_get_device_part_str()
already.  Commands from cmd/ubifs.c should also check this before
calling those functions, but you never know?!

Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Safety guard in the U-Boot filesystem glue code, because these functions
are called from different parts of the codebase.  For generic filesystem
handling this should have been checked in blk_get_device_part_str()
already.  Commands from cmd/ubifs.c should also check this before
calling those functions, but you never know?!

Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
