<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/geom, branch releng/14.3</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.3</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.3'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-05-13T12:41:33Z</updated>
<entry>
<title>sysctl(9): Ease exporting struct sizes; Discourage doing that</title>
<updated>2025-05-13T12:41:33Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce@FreeBSD.org</email>
</author>
<published>2025-05-01T16:02:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=de6a4418eec91dc8802defce0159c126a2c7b6d2'/>
<id>urn:sha1:de6a4418eec91dc8802defce0159c126a2c7b6d2</id>
<content type='text'>
Introduce two helpers, the more general SYSCTL_SIZEOF() and
a struct-specific one SYSCTL_SIZEOF_STRUCT() which prepends 'struct' in
the description and in the use of sizeof() but uses the raw structure
name as the knob's name.  The size of the object/structure is exported
under 'debug.sizeof'.

Existing knobs under 'debug.sizeof' were all converted to use the
helpers.

Add a note before the helpers discouraging the introduction of new
leaves for ad-hoc reasons.  List alternative means for developers to
obtain the size of arbitrary kernel structures easily (thanks to markj@
for providing these).

No functional change (intended).

Reviewed by:    kib, markj
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50121

(cherry picked from commit 713abc9880aabe0ff924ff644bceb6ff404ed3cd)
(cherry picked from commit efce9f8a510b60736994e50288b78fc7b32b5d90)

Approved by:    re (cperciva)
</content>
</entry>
<entry>
<title>g_dev_orphan(): Return early if the device is already gone</title>
<updated>2025-03-14T17:51:03Z</updated>
<author>
<name>Fabian Keil</name>
<email>fk@fabiankeil.de</email>
</author>
<published>2025-03-13T23:13:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b9296d4d85bbc4f84c21615e760c5e12d1c81406'/>
<id>urn:sha1:b9296d4d85bbc4f84c21615e760c5e12d1c81406</id>
<content type='text'>
The following panic was the result of running "cdcontrol eject" after
using the physical ejection key on the device before the tray was
actually ejected. So we have hardware racing software.

The device was loaded with a DVD.

Resulted in a NULL pointer dereference

g_dev_orphan() at g_dev_orphan+0x2e/frame 0xfffffe01eba0a9f0
g_resize_provider_event() at g_resize_provider_event+0x71/frame 0xfffffe01eba0aa20
g_run_events() at g_run_events+0x20e/frame 0xfffffe01eba0aa70
fork_exit() at fork_exit+0x85/frame 0xfffffe01eba0aab0
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe01eba0aab0

Avoid this possibility and return early of dev is NULL already.

PR:  215856
Reviewed by: imp (I've triggered this once or twice over the years too)
Sponsored by: Netflix

(cherry picked from commit f7856fe81df2df3c4355e674d34a4c15a095a33c)
</content>
</entry>
<entry>
<title>gvinum: Emit deprecation notice upon drive tasting</title>
<updated>2025-02-04T13:35:32Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2022-12-12T21:07:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=22d06df419e0fdf7670e96d4ba88e33933cab6da'/>
<id>urn:sha1:22d06df419e0fdf7670e96d4ba88e33933cab6da</id>
<content type='text'>
Reviewed by:	phk, jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38607

(cherry picked from commit 127b443124d1e720b246ad381648c436c3d240de)
</content>
</entry>
<entry>
<title>geom: Allow BSD type '!0' partitions</title>
<updated>2024-12-21T17:04:07Z</updated>
<author>
<name>Jose Luis Duran</name>
<email>jlduran@FreeBSD.org</email>
</author>
<published>2024-11-17T23:55:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a7d56527c2fd0730eea2551087c3b785691603b2'/>
<id>urn:sha1:a7d56527c2fd0730eea2551087c3b785691603b2</id>
<content type='text'>
Allow the creation of '!0' partition types.

Fix it by not considering "0" an invalid partition type.

Reviewed by:	emaste
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47652

(cherry picked from commit accf71534c612b76ee2701f2dfcaa464748e527a)
</content>
</entry>
<entry>
<title>kern: Make fileops and filterops tables const where possible</title>
<updated>2024-12-03T01:03:42Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2024-11-25T22:39:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=48155c983c4ba7158e738bd1d4b3144751bd1d86'/>
<id>urn:sha1:48155c983c4ba7158e738bd1d4b3144751bd1d86</id>
<content type='text'>
No functional change intended.

MFC after:	1 week

(cherry picked from commit ef9ffb8594eee294334ced627755bf5b46b48f9f)
</content>
</entry>
<entry>
<title>g_eli: update comment for bool return type</title>
<updated>2024-11-16T14:59:52Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2024-11-13T20:07:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=df1b835333ff520aaad0d5458a2a951c6b3a90ee'/>
<id>urn:sha1:df1b835333ff520aaad0d5458a2a951c6b3a90ee</id>
<content type='text'>
Fixes: 68eadcec0f7c8 ("Give a couple of predication functions a bool return type.")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 01e186731a141d106ff5bee5a41412e7e2582a78)
</content>
</entry>
<entry>
<title>geom_flashmap: Rename the kernel module</title>
<updated>2024-11-05T00:55:43Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2024-10-29T15:11:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=26d85a5aba3439092e73dfe33234a5687d5c70b9'/>
<id>urn:sha1:26d85a5aba3439092e73dfe33234a5687d5c70b9</id>
<content type='text'>
Absent a linker.hints, if a module dependency exists on disk, the loader
will automatically load it.  That is, if something depends on module
foo, and foo.ko exists, we'll load foo.ko even though the linker hints
file is missing.  It's a bit of a hack but it's handy.

This breaks with geom_flashmap though, since it's geom_flashmap.ko on
disk but the module is called g_flashmap.  However, pretty much every
other GEOM module is given a "geom_" prefix, so for consistency's sake
alone, it seems nice to rename the module.

PR:		274388
Reviewed by:	jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47311

(cherry picked from commit 2352336ad9b26fd21d9b0013e195e41d6d02b914)
</content>
</entry>
<entry>
<title>ggate: Avoid dropping the GEOM topology lock in dumpconf</title>
<updated>2024-10-18T12:27:13Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2024-10-04T14:53:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=23b44ad101ca2381186aa565b6c04a978c02a35e'/>
<id>urn:sha1:23b44ad101ca2381186aa565b6c04a978c02a35e</id>
<content type='text'>
In general it's not safe to drop the topology lock in these routines, as
GEOM assumes that the mesh will be consistent during traversal.
However, there's no reason we can't hold the topology lock across calls
to g_gate_release().  (Note that g_gate_hold() can be called with the
topology lock held.)

PR:		238814
MFC after:	2 weeks

(cherry picked from commit b37b2543a23b44c78f6d78823dcfcedba46570db)
</content>
</entry>
<entry>
<title>pkcs5v2: Add pkcs5v2_genkey_raw function</title>
<updated>2024-09-29T15:24:52Z</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2024-09-18T11:02:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8d2d49bdb5ce070a5e954baa59ad6a7d0e3514cd'/>
<id>urn:sha1:8d2d49bdb5ce070a5e954baa59ad6a7d0e3514cd</id>
<content type='text'>
This is like pkcs5v2_genkey but takes a "passphrase" as a buffer and
length rather than a NUL-terminated string.

Reviwed by:	pjd
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46633

(cherry picked from commit 8ce291a335bc751e7a89691eebfb9f9da65b82ac)
</content>
</entry>
<entry>
<title>geli: allocate a UMA pool earlier</title>
<updated>2024-05-23T06:00:57Z</updated>
<author>
<name>Mariusz Zaborski</name>
<email>oshogbo@FreeBSD.org</email>
</author>
<published>2024-05-19T12:53:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ea5a708625e5b5c89333e3e3e9a48fe588f05361'/>
<id>urn:sha1:ea5a708625e5b5c89333e3e3e9a48fe588f05361</id>
<content type='text'>
The functions g_eli_init_uma and g_eli_fini_uma are used to trace
the number of devices in GELI. There is an issue where the g_eli_create
function may fail before g_eli_init_uma is called, however
g_eli_fini_uma is still executed in the fail path. This can
incorrectly decrease the device count to zero, potentially leading to
the UMA pool being freed. Accessing the device after the pool has been
freed causes a system panic.

This commit resolves the issue by ensuring devices count is increassed
eariler.

PR:		278828
Reported by:	Andre Albsmeier &lt;mail@fbsd2.e4m.org&gt;
Reviewed by:	asomers
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D45225

(cherry picked from commit 4b3141f5d5373989598f9447ab5a9f87e2d1c9fb)
</content>
</entry>
</feed>
