<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/ubifs-utils, branch v2.3.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2026-04-13T05:32:41+00:00</updated>
<entry>
<title>fsck.ubifs: fix platform dependant ino_t and loff_t formatting</title>
<updated>2026-04-13T05:32:41+00:00</updated>
<author>
<name>Yuta Hayama</name>
<email>hayama@lineo.co.jp</email>
</author>
<published>2026-02-13T13:55:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a505a2cc56acf493607fdf24cbf129393a0873fa'/>
<id>urn:sha1:a505a2cc56acf493607fdf24cbf129393a0873fa</id>
<content type='text'>
On architectures such as armv7-a, ino_t and loff_t are unsigned long long rather than
unsigned long. In such cases, the printf format specifier "%lu" is not
appropriate and causes an incorrect address offset.

  mtd-utils/ubifs-utils/fsck.ubifs/problem.c:224
  		log_out(c, "problem: %s, ino %lu, unreachable dentry %s, type %s%s",
  			problem-&gt;desc, ifp-&gt;file-&gt;inum,
  			c-&gt;encrypted &amp;&amp; !ifp-&gt;file-&gt;ino.is_xattr ? "&lt;encrypted&gt;" : dent_node-&gt;name,
  			ubifs_get_type_name(dent_node-&gt;type),
  			key_type(c, &amp;dent_node-&gt;key) == UBIFS_XENT_KEY ? "(xattr)" : "");

  fsck.ubifs[484] (/dev/ubi0_0,danger mode): problem: Dentry is unreachable, ino 917, unreachable dentry (null), type checksum_typefile

Furthermore, running fsck.ubifs with the --debug=4 option will almost
certainly cause a SEGV at the following point.

  mtd-utils/ubifs-utils/fsck.ubifs/check_files.c:103
  	dbg_fsck("construct file(%lu) for %s node, TNC location %d:%d, in %s",
  		 inum, ubifs_get_key_name(key_type(c, key)), sn-&gt;lnum, sn-&gt;offs,
  		 c-&gt;dev_name);

To ensure functionality regardless of environment, cast ino_t to unsigned
long, since it will never be more than 4 bytes.

For loff_t, use %lld and cast accordingly.

Signed-off-by: Yuta Hayama &lt;hayama@lineo.co.jp&gt;
Signed-off-by: Tomas Alvarez Vanoli &lt;tomas.alvarez-vanoli@hitachienergy.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: don't use pointers that reference out-of-scope variables</title>
<updated>2026-04-13T05:32:41+00:00</updated>
<author>
<name>Yuta Hayama</name>
<email>hayama@lineo.co.jp</email>
</author>
<published>2025-11-13T08:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a75782ee97eb5940c865fd560d846b9a93ed9122'/>
<id>urn:sha1:a75782ee97eb5940c865fd560d846b9a93ed9122</id>
<content type='text'>
sn is a reference to either an ino_node, dent_node, or data_node. When sn
is actually used in calls to dbg_fsck() or insert_or_update_file(), these
variables must not be out of scope.

Signed-off-by: Yuta Hayama &lt;hayama@lineo.co.jp&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: extract_files: Include &lt;linux/limits.h&gt;</title>
<updated>2025-06-02T05:33:29+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@gmail.com</email>
</author>
<published>2025-02-19T13:02:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=77981a2888c711268b0e7f32af6af159c2288e23'/>
<id>urn:sha1:77981a2888c711268b0e7f32af6af159c2288e23</id>
<content type='text'>
Include &lt;linux/limits.h&gt; to fix the following build error when building
with musl:

| ../git/ubifs-utils/fsck.ubifs/extract_files.c: In function 'parse_ino_node':
| ../git/ubifs-utils/fsck.ubifs/extract_files.c:144:47: error: 'XATTR_LIST_MAX' undeclared (first use in this function)
|   144 |         if (ino_node-&gt;xnms + ino_node-&gt;xcnt &gt; XATTR_LIST_MAX) {
|       |                                               ^~~~~~~~~~~~~~
| ../git/ubifs-utils/fsck.ubifs/extract_files.c:144:47: note: each undeclared identifier is reported only once for each function it appears in
| make: *** [Makefile:4374: ubifs-utils/fsck.ubifs/fsck_ubifs-extract_files.o] Error 1

Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: journal: Include &lt;sys/stat.h&gt;</title>
<updated>2025-06-02T05:33:24+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@gmail.com</email>
</author>
<published>2025-02-19T13:02:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=173f9714c8da1d685bfa951d43b9310d16bbab3c'/>
<id>urn:sha1:173f9714c8da1d685bfa951d43b9310d16bbab3c</id>
<content type='text'>
Include the &lt;sys/stat.h&gt; header file to fix the following error
when building with musl:

| ../git/ubifs-utils/libubifs/journal.c: In function 'ubifs_get_dent_type':
| ../git/ubifs-utils/libubifs/journal.c:414:24: error: 'S_IFMT' undeclared (first use in this function)
|   414 |         switch (mode &amp; S_IFMT) {
|       |                        ^~~~~~
| ../git/ubifs-utils/libubifs/journal.c:414:24: note: each undeclared identifier is reported only once for each function it appears in
| ../git/ubifs-utils/libubifs/journal.c:415:14: error: 'S_IFREG' undeclared (first use in this function)
|   415 |         case S_IFREG:

Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: ubifs.h: Include &lt;fcntl.h&gt;</title>
<updated>2025-06-02T05:33:11+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@gmail.com</email>
</author>
<published>2025-02-19T13:02:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=12bc9ad824bd8f18a5ec9c7154ad2374cf8c7ae3'/>
<id>urn:sha1:12bc9ad824bd8f18a5ec9c7154ad2374cf8c7ae3</id>
<content type='text'>
Include the &lt;fcntl.h&gt; header file to fix the following error
when building with musl:

| In file included from ../git/ubifs-utils/common/compr.c:42:
| ../git/ubifs-utils/libubifs/ubifs.h:313:9: error: unknown type name 'loff_t'; did you mean 'off_t'?
|   313 |         loff_t ui_size;
|       |         ^~~~~~
|       |         off_t
| ../git/ubifs-utils/libubifs/ubifs.h:1341:9: error: unknown type name 'loff_t'; did you mean 'off_t'?
|  1341 |         loff_t i_size;
|       |         ^~~~~~
|       |         off_t
| ../git/ubifs-utils/libubifs/ubifs.h:1342:9: error: unknown type name 'loff_t'; did you mean 'off_t'?
|  1342 |         loff_t d_size;
|       |         ^~~~~~
|       |         off_t
| ../git/ubifs-utils/libubifs/ubifs.h:1899:44: error: unknown type name 'loff_t'; did you mean 'off_t'?
|  1899 |                              int deletion, loff_t new_size);
|       |                                            ^~~~~~
|       |                                            off_t
| make: *** [Makefile:4878: ubifs-utils/common/mkfs_ubifs-compr.o] Error 1

Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Reviewed-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Improve check for GCC compiler version</title>
<updated>2025-06-02T05:27:40+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2025-03-23T04:01:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ac0ab65ebcd7b11739986b81343457469fbb43b0'/>
<id>urn:sha1:ac0ab65ebcd7b11739986b81343457469fbb43b0</id>
<content type='text'>
When using unreleased compiler has version like
15.0.1 and that test fails because __GNUC_MINOR__ &lt; 1
becomes true, therefore check for full version string
which is more rubust.

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: common: fix memory leak in devtable.c</title>
<updated>2025-06-02T05:23:41+00:00</updated>
<author>
<name>AntonMoryakov</name>
<email>ant.v.moryakov@gmail.com</email>
</author>
<published>2025-04-24T18:19:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=2669111e3c60b8e146c174db5d2e7e9991f3dd87'/>
<id>urn:sha1:2669111e3c60b8e146c174db5d2e7e9991f3dd87</id>
<content type='text'>
Report of the static analyzer:
Dynamic memory, referenced by 'line', is allocated at devtable.c:356
by calling function 'getline' and lost at devtable.c:388.
(line: while (getline(&amp;line, &amp;len, f) != -1) {)

Correct explained:
Now line is freed in any exit scenario via out_close which eliminates this error.

Triggers found by static analyzer Svace.

Signed-off-by: Anton Moryakov &lt;ant.v.moryakov@gmail.co
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: link libmissing.a in case execinfo.h isn't present</title>
<updated>2025-06-02T05:22:10+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2025-02-26T18:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=8a83b306db64d6f60186d4396b0b770163b85b6e'/>
<id>urn:sha1:8a83b306db64d6f60186d4396b0b770163b85b6e</id>
<content type='text'>
On musl execinfo.h doesn't exist, but ubifs-utils uses backtrace() when
reporting errors.  This results in build failures under musl.

Handily, libmissing.a already exists with a stub implementation of
backtrace().

Guard the execinfo.h include and if it isn't available instead include
libmissing.h, and link to libmissing.a to provide backtrace() if needed.

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: libubifs: Update source files from linux kernel 6.13-rc7</title>
<updated>2025-01-30T17:30:17+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2025-01-26T06:42:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=556cc634641342e789b42773e7beacd3b8f959e0'/>
<id>urn:sha1:556cc634641342e789b42773e7beacd3b8f959e0</id>
<content type='text'>
Update source files from linux kernel 6.13-rc7 aa22f4da2a46.
Following changes since 6.8-rc2 41bccc98fb7931d63:
 1) 60f16e912a53a ("ubifs: fix sort function prototype")
 2) ec724e534dfdd ("ubifs: fix function pointer cast warnings")
 3) 39986148bc2ab ("ubifs: fix kernel-doc warnings")
 4) 94f5b1571ec8d ("ubifs: Convert to use ERR_CAST()")
 5) 4617fb8fc15ef ("ubifs: authentication: Fix use-after-free in
		   ubifs_tnc_end_commit")

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: common: Add descritpions for linux kernel resource files</title>
<updated>2025-01-30T17:30:16+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2025-01-26T06:42:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=99614daab640927a6061c99fd17a9c22a66c405d'/>
<id>urn:sha1:99614daab640927a6061c99fd17a9c22a66c405d</id>
<content type='text'>
Add descritpions for kernel resource files.
Remove crc32 related descritpions, there is no crc32 related files
imported from the linux kernel.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
