<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libgeom, 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>2026-01-03T20:37:18Z</updated>
<entry>
<title>libgeom: Fix 32-bit gcc build</title>
<updated>2026-01-03T20:37:18Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-01-03T20:34:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=17355cf50fcbd0d8ddb638e1f2fd5861b526edbe'/>
<id>urn:sha1:17355cf50fcbd0d8ddb638e1f2fd5861b526edbe</id>
<content type='text'>
MFC after:	1 week
Fixes:		27894e20f140 ("libgeom: Fix segfault in 32-on-64 case")
</content>
</entry>
<entry>
<title>libgeom: Improve type safety of xml2tree code</title>
<updated>2026-01-03T09:10:23Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-01-03T09:10:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4b0d5d1d6a7c9773e38882feb4747a76b37a645c'/>
<id>urn:sha1:4b0d5d1d6a7c9773e38882feb4747a76b37a645c</id>
<content type='text'>
When resolving references, assert that the type of the object we find
is what we expect.  This will help prevent memory corruption if two
objects of different types somehow end up with the same identifier.

MFC after:	1 week
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D54454
</content>
</entry>
<entry>
<title>libgeom: Clean up xml2tree code</title>
<updated>2026-01-03T09:10:23Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-01-03T09:09:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fad6707e2589d8557ceb6b6bf11f22323b265f01'/>
<id>urn:sha1:fad6707e2589d8557ceb6b6bf11f22323b265f01</id>
<content type='text'>
MFC after:	1 week
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D54453
</content>
</entry>
<entry>
<title>libgeom: Fix segfault in 32-on-64 case</title>
<updated>2026-01-03T09:10:23Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-01-03T09:09:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=27894e20f140ee2729c14b589035870c8185b87d'/>
<id>urn:sha1:27894e20f140ee2729c14b589035870c8185b87d</id>
<content type='text'>
We were using strtoul() to parse object identifiers, which are kernel
pointers.  This works fine as long as the kernel and userland match,
but in a 32-bit libgeom on a 64-bit kernel this will return ULONG_MAX
for all objects, resulting in memory corruption when we later pick the
wrong object while resolving consumer-producer references.

MFC after:	1 week
PR:		292127
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D54452
</content>
</entry>
<entry>
<title>libgeom: Avoid fixed remappings of the devstat device</title>
<updated>2024-08-19T16:02:59Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2024-08-19T16:02:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d06fe346eccf0919a29d43599548e49c0d6a7a17'/>
<id>urn:sha1:d06fe346eccf0919a29d43599548e49c0d6a7a17</id>
<content type='text'>
libgeom maintains a quasi-private mapping of /dev/devstat, which might
grow over time if new devices appear.  When the mapping needs to be
expanded, the old mapping is passed as a hint, but this appears to be
unnecessary.

Simplify and improve things a bit:
- stop passing a hint when remapping,
- don't creat a mapping in geom_stats_open(), as geom_stats_resync() will
  create it for us,
- check for errors from munmap().

Reviewed by:	imp, asomers
Tested by:	asomers
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D46294
</content>
</entry>
<entry>
<title>libgeom: Consistently use item count as the first argument to calloc</title>
<updated>2024-07-19T17:06:03Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-07-19T17:02:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bf3b889a5be141f3abadcfc5a1d1cbdc50273d72'/>
<id>urn:sha1:bf3b889a5be141f3abadcfc5a1d1cbdc50273d72</id>
<content type='text'>
Reported by:	GCC 14 -Wcalloc-transposed-args
Reviewed by:	rlibby, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D46006
</content>
</entry>
<entry>
<title>Remove residual blank line at start of Makefile</title>
<updated>2024-07-15T22:43:39Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-15T04:46:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800'/>
<id>urn:sha1:e9ac41698b2f322d55ccf9da50a3596edb2c1800</id>
<content type='text'>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>lib: 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=a2f733abcff64628b7771a47089628b7327a88bd'/>
<id>urn:sha1:a2f733abcff64628b7771a47089628b7327a88bd</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>Remove $FreeBSD$: two-line nroff pattern</title>
<updated>2023-08-16T17:55:10Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fa9896e082a1046ff4fbc75fcba4d18d1f2efc19'/>
<id>urn:sha1:fa9896e082a1046ff4fbc75fcba4d18d1f2efc19</id>
<content type='text'>
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>urn:sha1:d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
</entry>
</feed>
