<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sbin/dump/traverse.c, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-01-28T01:39:45Z</updated>
<entry>
<title>Standardize the definition of a UFS dinode.</title>
<updated>2025-01-28T01:39:45Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2025-01-28T01:39:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=aa90fbed151de512ab6e59f75df009533a15751f'/>
<id>urn:sha1:aa90fbed151de512ab6e59f75df009533a15751f</id>
<content type='text'>
Each program that operates on UFS on-disk inodes defines its own
version of a dinode. They all (of necessity) define the same
layout but use different names. This change adds a definition of
a dinode (a union of a UFS1 on-disk inode and a UFS2 on-disk inode)
as well as a dinodep (a union of a pointer to a UFS1 on-disk inode
and a pointer to a UFS2 on-disk inode) in sys/ufs/ufs/dinode.h.
It then deletes the definitions of dinode and dinodep in all the
programs that operate on them and instead uses these standard
definitions.

No functional change intended.

MFC-after: 1 week
</content>
</entry>
<entry>
<title>sbin: Automated cleanup of cdefs and other formatting</title>
<updated>2023-11-27T05:23:59Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-24T20:12:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=32e86a82f54826f14ea381affa6674db3aa3b5ae'/>
<id>urn:sha1:32e86a82f54826f14ea381affa6674db3aa3b5ae</id>
<content type='text'>
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+&lt;sys/cdefs.h&gt;.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/types.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/param.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/capsicum.h&gt;/

Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>sbin: Remove ancient SCCS tags.</title>
<updated>2023-11-27T05:23:29Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-23T17:21:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=51e16cb8fc536913f490ac6bc9c17e92ebd0411b'/>
<id>urn:sha1:51e16cb8fc536913f490ac6bc9c17e92ebd0411b</id>
<content type='text'>
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>Purge more stray embedded $FreeBSD$ strings</title>
<updated>2023-09-25T14:54:56Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2023-09-25T14:54:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eba230afba4932f02a1ca44efc797cf7499a5cb0'/>
<id>urn:sha1:eba230afba4932f02a1ca44efc797cf7499a5cb0</id>
<content type='text'>
These do not use __FBSDID but instead use bare char arrays.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41957
</content>
</entry>
<entry>
<title>ufs: Rework shortlink handling to avoid subobject overflows</title>
<updated>2022-01-02T20:55:36Z</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2022-01-02T20:55:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5b13fa7987c13aa7b5a67cc6b465475912de2d14'/>
<id>urn:sha1:5b13fa7987c13aa7b5a67cc6b465475912de2d14</id>
<content type='text'>
Shortlinks occupy the space of both di_db and di_ib when used. However,
everywhere that wants to read or write a shortlink takes a pointer do
di_db and promptly runs off the end of it into di_ib. This is fine on
most architectures, if a little dodgy. However, on CHERI, the compiler
can optionally restrict the bounds on pointers to subobjects to just
that subobject, in order to mitigate intra-object buffer overflows, and
this is enabled in CheriBSD's pure-capability kernels.

Instead, clean this up by inserting a union such that a new di_shortlink
can be added with the right size and element type, avoiding the need to
cast and allowing the use of the DIP macro to access the field. This
also mirrors how the ext2fs code implements extents support, with the
exact same structure other than having a uint32_t i_data[] instead of a
char di_shortlink[].

Reviewed by:	mckusick, jhb
Differential Revision:	https://reviews.freebsd.org/D33650
</content>
</entry>
<entry>
<title>Correct assert added to dump program.</title>
<updated>2021-05-17T23:34:53Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2021-05-17T23:33:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=efe145a7453e4208f032816ce3f80e9fb6b0e4ee'/>
<id>urn:sha1:efe145a7453e4208f032816ce3f80e9fb6b0e4ee</id>
<content type='text'>
The dump program was exiting with the message:

Assertion failed: (spcl.c_count + blks &lt; TP_NINDIR), function appendextdata, file /usr/src/sbin/dump/traverse.c, line 759.

The problem arose when dumping external attributes.

This assertion was added in this commit with no review by someone
with expertise in the dump program:

    commit 2d518c6518cdb256ff6f2c463e6b115d89c104c3
    Author:     Warner Losh &lt;imp@FreeBSD.org&gt;
    AuthorDate: Mon Jun 11 19:32:36 2018 +0000
    Commit:     Warner Losh &lt;imp@FreeBSD.org&gt;
    CommitDate: Mon Jun 11 19:32:36 2018 +0000

	Add asserts to prevent overflows of c_addr.

It is clearly wrong as the statement immediately above it in the
code which is deciding if the data will fit is:

	if (spcl.c_count + blks &gt; TP_NINDIR)
		return (0);

As is pointed out in the bug report, the assert should be:

	(spcl.c_count + blks &lt;= TP_NINDIR)

This commit corrects the assert. I am sorry that it took so long to
be brought to my attention and get fixed.

Reported by:  Hampton Finger
PR:           244470
MFC after:    3 days
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>Fix build break from dump incompatibility I introduced in -r340411</title>
<updated>2018-11-14T00:21:52Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2018-11-14T00:21:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=07436eeb490ec89202b2d484afca4eadf348cb88'/>
<id>urn:sha1:07436eeb490ec89202b2d484afca4eadf348cb88</id>
<content type='text'>
Pointy-hat to: mckusick
</content>
</entry>
<entry>
<title>Plug build break after r340411.</title>
<updated>2018-11-13T23:44:27Z</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2018-11-13T23:44:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d4f7db47642344bc7b746a9571d08b0fb4d8c9dd'/>
<id>urn:sha1:d4f7db47642344bc7b746a9571d08b0fb4d8c9dd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add asserts to prevent overflows of c_addr.</title>
<updated>2018-06-11T19:32:36Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2018-06-11T19:32:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2d518c6518cdb256ff6f2c463e6b115d89c104c3'/>
<id>urn:sha1:2d518c6518cdb256ff6f2c463e6b115d89c104c3</id>
<content type='text'>
Add some asserts that prevents the overflows of c_addr. This can't
happen, absent bugs. However, certain large filesystems can cause
problems. These have been prevented by r334968, but a solution
is needed. These asserts will help assure that solution is correct.

PR: 228807
Reviewed by: db
</content>
</entry>
<entry>
<title>Revert r313780 (UFS_ prefix)</title>
<updated>2018-03-17T12:59:55Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2018-03-17T12:59:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d8ba45e21358ccd9c50991e62cf863bc19699756'/>
<id>urn:sha1:d8ba45e21358ccd9c50991e62cf863bc19699756</id>
<content type='text'>
</content>
</entry>
</feed>
