<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/rc/rc.d/devmatch, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>rc.d: Convert more service to Use startmsg</title>
<updated>2026-02-08T20:58:44+00:00</updated>
<author>
<name>Thibault Payet</name>
<email>contact@thibaultpayet.fr</email>
</author>
<published>2026-02-03T09:27:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d3ed0e0ab06a1434032abd7f013d02611567fd43'/>
<id>d3ed0e0ab06a1434032abd7f013d02611567fd43</id>
<content type='text'>
Signed-off-by: Thibault Payet &lt;contact@thibaultpayet.fr&gt;
Reviewed by: imp,mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/2001
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Thibault Payet &lt;contact@thibaultpayet.fr&gt;
Reviewed by: imp,mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/2001
</pre>
</div>
</content>
</entry>
<entry>
<title>devmatch: do nothing if booted in safe mode</title>
<updated>2024-12-14T04:31:38+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2024-12-14T04:31:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=17aec740b0b2112eb1803ca6d5ec8c8161f8dcae'/>
<id>17aec740b0b2112eb1803ca6d5ec8c8161f8dcae</id>
<content type='text'>
Safe mode may be enabled because of some problem discovered with a kmod,
thus wanting to avoid devmatch.  Honor it and let the user deal with
the fallout of not autoloading modules.  We've at least made it to
userland and the user demonstrably has a local console as they selected
safe mode in the first place, so this shouldn't be fatal if we don't,
e.g., load a necessary NIC driver.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Safe mode may be enabled because of some problem discovered with a kmod,
thus wanting to avoid devmatch.  Honor it and let the user deal with
the fallout of not autoloading modules.  We've at least made it to
userland and the user demonstrably has a local console as they selected
safe mode in the first place, so this shouldn't be fatal if we don't,
e.g., load a necessary NIC driver.
</pre>
</div>
</content>
</entry>
<entry>
<title>rc.d/devmatch: Silence sysctl hw.bus.devctl_nomatch_enabled=1</title>
<updated>2024-08-28T23:26:26+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2024-08-28T23:26:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=62775aebf725a79703592f3276118245a74afdac'/>
<id>62775aebf725a79703592f3276118245a74afdac</id>
<content type='text'>
As with various other rc scripts, we don't want the output from this
being visible in the boot log.

Fixes:		6437872c1d66 ("New sysctl to disable NOMATCH until devmatch runs")
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As with various other rc scripts, we don't want the output from this
being visible in the boot log.

Fixes:		6437872c1d66 ("New sysctl to disable NOMATCH until devmatch runs")
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>rc.d: add a service jails config to all base system services</title>
<updated>2024-05-22T13:41:49+00:00</updated>
<author>
<name>Alexander Leidinger</name>
<email>netchild@FreeBSD.org</email>
</author>
<published>2024-05-22T13:31:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f99f0ee14e3af81c23150a6a340259ca8a33d01a'/>
<id>f99f0ee14e3af81c23150a6a340259ca8a33d01a</id>
<content type='text'>
This gives more permissions to services (e.g. network access to
services which require this) when they are started as an automatic
service jail.

The sshd patch is important for the sshd-related functionality as
described in the man-page in the service jails part.

The location of the added env vars is supposed to allow overriding them
in rc.conf, and to hard-disable the use of svcj for some parts where it
doesn't make sense or will not work.

Only a subset of all of the services are fully tested (I'm running this
since more than a year with various services started as service jails).
The untested parts should be most of the time ok, in some edge-cases
more permissions are needed inside the service jail.
Differential Revision:	https://reviews.freebsd.org/D40371
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This gives more permissions to services (e.g. network access to
services which require this) when they are started as an automatic
service jail.

The sshd patch is important for the sshd-related functionality as
described in the man-page in the service jails part.

The location of the added env vars is supposed to allow overriding them
in rc.conf, and to hard-disable the use of svcj for some parts where it
doesn't make sense or will not work.

Only a subset of all of the services are fully tested (I'm running this
since more than a year with various services started as service jails).
The untested parts should be most of the time ok, in some edge-cases
more permissions are needed inside the service jail.
Differential Revision:	https://reviews.freebsd.org/D40371
</pre>
</div>
</content>
</entry>
<entry>
<title>New sysctl to disable NOMATCH until devmatch runs</title>
<updated>2024-05-10T00:56:40+00:00</updated>
<author>
<name>Isaac Cilia Attard</name>
<email>iciliaat@gmail.com</email>
</author>
<published>2024-04-29T20:44:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6437872c1d665c2605f54e8ff040b0ba41edad07'/>
<id>6437872c1d665c2605f54e8ff040b0ba41edad07</id>
<content type='text'>
Introduce hw.bus.devctl_nomatch_enabled and use it to suppress NOMATCH
until devmatch runs

There's a lot of NOMATCH events generated at boot. We also run devmatch
once during early boot to load unmatched devices. To avoid redundant
work, don't start generating NOMATCH events until after devmatch runs.
Set hw.bus.devctl_nomatch_enabled=1 just before we run devmatch. The
kernel will suppress NOMATCH events until this is set to true.

This saves about 170ms from the boot on aarch64 running atop Apple
M-series processors and the VMWare Fusion hypervisor.

Reviewed by:    imp, cperciva
MFC after:      3 days
Sponsored by:   Google Summer of Code
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1213
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce hw.bus.devctl_nomatch_enabled and use it to suppress NOMATCH
until devmatch runs

There's a lot of NOMATCH events generated at boot. We also run devmatch
once during early boot to load unmatched devices. To avoid redundant
work, don't start generating NOMATCH events until after devmatch runs.
Set hw.bus.devctl_nomatch_enabled=1 just before we run devmatch. The
kernel will suppress NOMATCH events until this is set to true.

This saves about 170ms from the boot on aarch64 running atop Apple
M-series processors and the VMWare Fusion hypervisor.

Reviewed by:    imp, cperciva
MFC after:      3 days
Sponsored by:   Google Summer of Code
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1213
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>devmatch: Allow devmatch_blocklist to be set in kenv too</title>
<updated>2021-11-21T15:54:45+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2021-11-21T15:50:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a8935083b5181b0a56d26cad7191ef138228befd'/>
<id>a8935083b5181b0a56d26cad7191ef138228befd</id>
<content type='text'>
Add in all the variables set in the kenv variable devmatch_blocklist
too. This allows blocking autoloading from the boot loader.

Sponsored by:		Netflix
Reviewed by:		0mp
Differential Revision:	https://reviews.freebsd.org/D32171
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add in all the variables set in the kenv variable devmatch_blocklist
too. This allows blocking autoloading from the boot loader.

Sponsored by:		Netflix
Reviewed by:		0mp
Differential Revision:	https://reviews.freebsd.org/D32171
</pre>
</div>
</content>
</entry>
<entry>
<title>devmatch: don't announce autoloading so much</title>
<updated>2021-07-08T21:22:22+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2021-07-08T19:53:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5549c6a62f0f4fc5d7e80973b28ebcf7f556edf8'/>
<id>5549c6a62f0f4fc5d7e80973b28ebcf7f556edf8</id>
<content type='text'>
devmatch rc script would announce it was loading a module multiple
times. It used kldload -n so it really wasn't loading it that many
times, but the message is confusing. Use kldstat to see if we need to
load the module before saying we do. This fixes the vast majority of the
problems. It may be possible to race devmatch with a user invocation and
devd, though quite hard. In that case we'll announce things twice, but
still only load it once. No attempt is made to fix this.

PR:			232782
MFC After:		2 weeks
Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
devmatch rc script would announce it was loading a module multiple
times. It used kldload -n so it really wasn't loading it that many
times, but the message is confusing. Use kldstat to see if we need to
load the module before saying we do. This fixes the vast majority of the
problems. It may be possible to race devmatch with a user invocation and
devd, though quite hard. In that case we'll announce things twice, but
still only load it once. No attempt is made to fix this.

PR:			232782
MFC After:		2 weeks
Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>devmatch: Be tolerant of .ko being present.</title>
<updated>2021-07-08T21:22:22+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2021-07-08T19:44:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b29ebb9c65b350e78aedfc790bfcaf9717059b70'/>
<id>b29ebb9c65b350e78aedfc790bfcaf9717059b70</id>
<content type='text'>
We document that we did not need .ko on the module names in
devmatch_blocklist, but we really needed them. Keep the documentation
the same, but strip the .ko when we need to use the names so you can
specify either.

PR:			256240
MFC After:		2 weeks
Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We document that we did not need .ko on the module names in
devmatch_blocklist, but we really needed them. Keep the documentation
the same, but strip the .ko when we need to use the names so you can
specify either.

PR:			256240
MFC After:		2 weeks
Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>devmatch: defer until after kld</title>
<updated>2021-07-07T20:48:40+00:00</updated>
<author>
<name>Helge Oldach</name>
<email>freebsd@oldach.net</email>
</author>
<published>2021-07-07T20:43:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f68e3ea831b76a8927eed7f7abfea55ee5a193c4'/>
<id>f68e3ea831b76a8927eed7f7abfea55ee5a193c4</id>
<content type='text'>
devmatch loads a number of things automatically. Allow the list of
things to load to happen first in case those drivers affect what would
be loaded. Normally, this will produce the same results, but there's
some special cases that may not when drivers are loaded that report
other drivers missing, like virtio_pci.

PR:		253287
Reviewed by:	imp
MFC After:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
devmatch loads a number of things automatically. Allow the list of
things to load to happen first in case those drivers affect what would
be loaded. Normally, this will produce the same results, but there's
some special cases that may not when drivers are loaded that report
other drivers missing, like virtio_pci.

PR:		253287
Reviewed by:	imp
MFC After:	2 weeks
</pre>
</div>
</content>
</entry>
</feed>
