<feed xmlns='http://www.w3.org/2005/Atom'>
<title>procd/plug, branch master</title>
<subtitle>OpenWrt service / process manager</subtitle>
<id>https://git-03.infra.openwrt.org/project/procd/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/project/procd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/'/>
<updated>2026-09-27T16:12:22Z</updated>
<entry>
<title>hotplug: reload rule files when any of them changes</title>
<updated>2026-09-27T16:12:22Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-27T16:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=675942be0e25fd4a4abb030820de432c1dd37a0a'/>
<id>urn:sha1:675942be0e25fd4a4abb030820de432c1dd37a0a</id>
<content type='text'>
Parsed rule files are cached for the lifetime of procd, so editing
/etc/hotplug.json, or adding a fragment to a directory it includes,
only takes effect after a reboot.

Watch the directory holding every file the rule engine loads, set up
from rule_handle_file() so the watched set follows the include graph
and procd needs no path of its own, and drop the cache when an entry
matching the requested name changes. The watch sits on the directory,
so it survives a rule file replaced by rename, which is how both a
package manager and an editor write one. Reloading is a free and an
init: json_script parses a file on first use, so the cost falls on the
next uevent and is paid once however many files an installation
touches. A directory that is absent takes no watch and needs none: an
unmatched glob is never cached, so it is retried on every uevent.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>hotplug: support glob patterns in rule file names</title>
<updated>2026-09-25T23:20:28Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-20T16:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=d56de8de9e34f3d0227efae08a2ec243450a0bbe'/>
<id>urn:sha1:d56de8de9e34f3d0227efae08a2ec243450a0bbe</id>
<content type='text'>
There is no way for a package to extend the hotplug rules short of
editing the single /etc/hotplug.json it shares with everyone else.
json_script already caters for this: its handle_file callback may
return a chain of files linked through ::next, which the interpreter
runs in order, but no caller ever built one.

Build that chain from glob(3) whenever the requested name contains a
wildcard, so an "include" of /etc/hotplug.json.d/*.json runs every
fragment in sorted order. json_script_get_file() caches by the
requested name and ignores a failed avl_insert(), so the head of the
chain carries the pattern as its key; keying it by its own path would
reparse and leak every fragment on every uevent.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>hotplug: release the JSON object after parsing a rule file</title>
<updated>2026-09-25T23:20:28Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-20T16:22:00Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=daa7bb065de7acd0f7fd0b261a888af6330f5a20'/>
<id>urn:sha1:daa7bb065de7acd0f7fd0b261a888af6330f5a20</id>
<content type='text'>
rule_handle_file() converts the parsed json-c object into a blobmsg
buffer but never drops its reference, so the object tree stays
allocated for the lifetime of procd. Only one rule file is ever
loaded, so a single object is leaked rather than one per uevent.

Fixes: 54108c71df64 ("fix hotplug")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>coldplug: fix missing header include</title>
<updated>2026-02-09T11:31:44Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-02-09T11:29:58Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=96c827fe5f04c8871c086e9d8205bc32371add9e'/>
<id>urn:sha1:96c827fe5f04c8871c086e9d8205bc32371add9e</id>
<content type='text'>
makedev() is defined in header sys/sysmacros.h which needs to be included
to not break the build.

Fixes: 58d7aaa ("initd/coldplug: create /dev/null before running udevtrigger")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>initd/coldplug: create /dev/null before running udevtrigger</title>
<updated>2026-02-09T11:09:58Z</updated>
<author>
<name>Steev Klimaszewski</name>
</author>
<published>2026-01-17T04:10:22Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=58d7aaa686979eb852139915a30df33adcb08665'/>
<id>urn:sha1:58d7aaa686979eb852139915a30df33adcb08665</id>
<content type='text'>
When procd_coldplug() runs, it unmounts /dev and mounts a fresh empty
tmpfs before forking udevtrigger to populate device nodes via hotplug
events. Since udevtrigger runs asynchronously, there is a race window
between the fresh mount and when the "null" device uevent is processed.

If any code executes a shell redirect to /dev/null during this window
(e.g., from hotplug handlers or other event processing), the shell
creates /dev/null as a regular file. When the null device uevent is
later processed, makedev()'s mknod() fails silently with EEXIST,
leaving /dev/null as a regular file permanently.

This causes all subsequent redirections to /dev/null to append to the
file instead of discarding output, eventually filling up the tmpfs.

Fix by explicitly creating /dev/null immediately after mounting the
fresh tmpfs, before any other code can run.

Signed-off-by: Steev Klimaszewski &lt;threeway@gmail.com&gt;
</content>
</entry>
<entry>
<title>hotplug: send event notifications</title>
<updated>2025-08-07T13:44:21Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2025-08-07T11:27:05Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=4d023b8a8c510d5e8b4c616fb0ba4561d472587c'/>
<id>urn:sha1:4d023b8a8c510d5e8b4c616fb0ba4561d472587c</id>
<content type='text'>
Sent to per-subsystem ubus objects

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>udebug: add support for logging via udebug</title>
<updated>2023-11-28T11:48:13Z</updated>
<author>
<name>John Crispin</name>
</author>
<published>2023-11-28T07:48:33Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=7e6c6efd6fbcc7955801c5e2ac915a90697e1fd9'/>
<id>urn:sha1:7e6c6efd6fbcc7955801c5e2ac915a90697e1fd9</id>
<content type='text'>
Signed-off-by: John Crispin &lt;john@phrozen.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>procd: clean up /dev/pts mounts</title>
<updated>2022-01-11T16:23:25Z</updated>
<author>
<name>Rui Salvaterra</name>
</author>
<published>2022-01-09T23:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=ac2b8b365bdbcbf292f77409d180ec3c0963faf3'/>
<id>urn:sha1:ac2b8b365bdbcbf292f77409d180ec3c0963faf3</id>
<content type='text'>
The default mode is already 600, no need to specify it. Access times are also
irrelevant.

Signed-off-by: Rui Salvaterra &lt;rsalvaterra@gmail.com&gt;
</content>
</entry>
<entry>
<title>procd: mount /dev with noexec</title>
<updated>2022-01-11T16:23:05Z</updated>
<author>
<name>Rui Salvaterra</name>
</author>
<published>2022-01-09T23:27:27Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=3b3ac648f48dda5269852994d42c70f61e9db4fe'/>
<id>urn:sha1:3b3ac648f48dda5269852994d42c70f61e9db4fe</id>
<content type='text'>
/dev is writable. Allowing execution inside it makes it a possible attack
vector. Kees Cook recently sent a kernel patch [1] in order to mount /dev as
noexec and nosuid for systems which rely on CONFIG_DEVTMPFS_MOUNT=y to
create/populate /dev, which isn't our case (it's procd's responsibility).

Add noexec to the /dev mount flags, since we already use nosuid (and keep the
coldplug flags symmetric, while at it). This carries the risk of breaking very
old, pre-KMS graphics drivers [2], but it shouldn't be a problem for systems
built in the last ~15 years. The vast majority of our targets doesn't have a
GPU, anyway. :)

[1] https://lore.kernel.org/all/YcMfDOyrg647RCmd@debian-BULLSEYE-live-builder-AMD64/
[2] https://lore.kernel.org/all/CAPXgP12e5LpN6XVxaXOHhH=u8XXN==2reTaJDCoCk4tP4QduDQ@mail.gmail.com/

Signed-off-by: Rui Salvaterra &lt;rsalvaterra@gmail.com&gt;
</content>
</entry>
<entry>
<title>hotplug.c: set nl_pid to zero</title>
<updated>2021-01-26T10:16:18Z</updated>
<author>
<name>Stefan Eichenberger</name>
</author>
<published>2021-01-24T22:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/procd/commit/?id=0aee1c30c046219b8cbd17492f1cb60c68d7e4f3'/>
<id>urn:sha1:0aee1c30c046219b8cbd17492f1cb60c68d7e4f3</id>
<content type='text'>
With the current solution where nl_pid is set through getpid we run into
problems when running procd in a different PID namespace (e.g.
container). The PID number inside the active PID namespace will be set
which doesn't match the global PID. Therefore, procd will never receive
any netlink messages.

By setting nl_pid to zero the kernel will assign the global PID
automatically and fixes the issue.

Signed-off-by: Stefan Eichenberger &lt;eichest@gmail.com&gt;
Acked-by: John Crispin &lt;john@phrozen.org&gt;
</content>
</entry>
</feed>
