]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 months agohwdb: sensor: geo add in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 21:24:31 +0000 (22:24 +0100)] 
hwdb: sensor: geo add in-line comment

5 months agohwdb: sensor: exo add in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:53:10 +0000 (21:53 +0100)] 
hwdb: sensor: exo add in-line comment

5 months agohwdb: sensor: eve in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:46:40 +0000 (21:46 +0100)] 
hwdb: sensor: eve in-line comment

5 months agohwdb: sensor: estar add comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:32:19 +0000 (21:32 +0100)] 
hwdb: sensor: estar add comment

5 months agohwdb: sensor: endless add comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:21:56 +0000 (21:21 +0100)] 
hwdb: sensor: endless add comment

5 months agohwdb: sensor: digma in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:18:43 +0000 (21:18 +0100)] 
hwdb: sensor: digma in-line comment

5 months agohwdb: sensor: digibras in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:17:52 +0000 (21:17 +0100)] 
hwdb: sensor: digibras in-line comment

5 months agohwdb: sensor: dexp rework
David Santamaría Rogado [Mon, 16 Feb 2026 20:14:46 +0000 (21:14 +0100)] 
hwdb: sensor: dexp rework

5 months agohwdb: sensor: dere add comments
David Santamaría Rogado [Mon, 16 Feb 2026 19:59:03 +0000 (20:59 +0100)] 
hwdb: sensor: dere add comments

5 months agohwdb: sensor: dell rework
David Santamaría Rogado [Sun, 15 Feb 2026 09:28:57 +0000 (10:28 +0100)] 
hwdb: sensor: dell rework

Change Vostro5581 to use its sku to match the rest, I suppouse it was
added before we had sku in dmi modalias.

Fix OCB4 sku instead a begining O letter needs to be a beggining zero,
checked in original bug report.

Reorder entries.

Use proper formatting.

5 months agohwdb: sensor: cube refactor
David Santamaría Rogado [Fri, 13 Feb 2026 13:17:32 +0000 (14:17 +0100)] 
hwdb: sensor: cube refactor

5 months agohwdb: sensor: cytrix fix
David Santamaría Rogado [Mon, 16 Feb 2026 19:53:25 +0000 (20:53 +0100)] 
hwdb: sensor: cytrix fix

5 months agohwdb: sensor: cyberbook add comment
David Santamaría Rogado [Mon, 16 Feb 2026 19:47:26 +0000 (20:47 +0100)] 
hwdb: sensor: cyberbook add comment

5 months agohwdb: sensor: csl fix
David Santamaría Rogado [Mon, 16 Feb 2026 19:14:07 +0000 (20:14 +0100)] 
hwdb: sensor: csl fix

5 months agohwdb: sensor: connect fix
David Santamaría Rogado [Mon, 16 Feb 2026 19:13:45 +0000 (20:13 +0100)] 
hwdb: sensor: connect fix

5 months agohwdb: sensor: chuwi refactor
David Santamaría Rogado [Fri, 13 Feb 2026 13:07:38 +0000 (14:07 +0100)] 
hwdb: sensor: chuwi refactor

At least one too generic dmi string is there.

5 months agohwdb: sensor: bush minor changes
David Santamaría Rogado [Sun, 15 Feb 2026 08:58:58 +0000 (09:58 +0100)] 
hwdb: sensor: bush minor changes

5 months agohwdv: sensor: bmax add fixme notes
David Santamaría Rogado [Sun, 15 Feb 2026 08:47:14 +0000 (09:47 +0100)] 
hwdv: sensor: bmax add fixme notes

Comment that more research about the two accelerometer should be done.

5 months agohwdb: sensor: ayaneo refactor and rework
David Santamaría Rogado [Fri, 13 Feb 2026 12:45:50 +0000 (13:45 +0100)] 
hwdb: sensor: ayaneo refactor and rework

This one is a real mess, spaces in dmi modalias, minus zeroes.

Needs a little more love.

fix whitespaces and comment in-line.

5 months agohwdb: sensor: axxo fix previous search and replace
David Santamaría Rogado [Fri, 13 Feb 2026 12:37:20 +0000 (13:37 +0100)] 
hwdb: sensor: axxo fix previous search and replace

5 months agohwdb: sensor: asus refactor and rework
David Santamaría Rogado [Fri, 13 Feb 2026 12:34:00 +0000 (13:34 +0100)] 
hwdb: sensor: asus refactor and rework

For safety, prefer board product name, that always has the short name,
over system product name, that in few models has a very long string with
the short name at the end.

The following models added at the time of this commit BR1100FKA, RC72LA
and TP412UA needs a wildcard before when using pn.

Unmerged Q502LAB, Q551LB and Q551LN, in the merged match there are many
more unreported models.

Sort by the first model in every group.

5 months agohwdb: sensor: archos in-line commenting
David Santamaría Rogado [Sun, 15 Feb 2026 05:01:26 +0000 (06:01 +0100)] 
hwdb: sensor: archos in-line commenting

5 months agohwdb: sensor: aquarius rework
David Santamaría Rogado [Sun, 15 Feb 2026 04:55:01 +0000 (05:55 +0100)] 
hwdb: sensor: aquarius rework

5 months agohwdb: sensor: acer refactor and rework
David Santamaría Rogado [Fri, 13 Feb 2026 10:21:53 +0000 (11:21 +0100)] 
hwdb: sensor: acer refactor and rework

Rework acer matches to use system vendor with board name.

Is the most reliable way to deal with Acer.

While doing it discover that matches SP111-32N and SP111-34N broke in
c0443b97b7 (hwdb: add trailing ":*" everywhere, 2020-10-15)

Sort by the first model of every group.

5 months agohwdb: sensor: say that model sort is groupped
David Santamaría Rogado [Sun, 15 Feb 2026 04:06:03 +0000 (05:06 +0100)] 
hwdb: sensor: say that model sort is groupped

5 months agoUpdate hwdb and autosuspend rules (#40710)
Luca Boccassi [Tue, 17 Feb 2026 12:13:18 +0000 (12:13 +0000)] 
Update hwdb and autosuspend rules (#40710)

5 months agohwdb: update autosuspend rules 40710/head
Zbigniew Jędrzejewski-Szmek [Tue, 17 Feb 2026 10:51:58 +0000 (11:51 +0100)] 
hwdb: update autosuspend rules

5 months agohwdb: update
Zbigniew Jędrzejewski-Szmek [Tue, 17 Feb 2026 10:51:14 +0000 (11:51 +0100)] 
hwdb: update

As always, a spattering of additions and updates.

5 months agonspawn: Join network namespace with setns()
Daan De Meyer [Mon, 16 Feb 2026 21:12:34 +0000 (22:12 +0100)] 
nspawn: Join network namespace with setns()

We don't have /proc mounted which means namespace_enter() won't work
on older kernels, so use setns() instead.

5 months agomeson: update man rules
Zbigniew Jędrzejewski-Szmek [Tue, 17 Feb 2026 10:29:32 +0000 (11:29 +0100)] 
meson: update man rules

Why oh why do people forget to do this?
Fixup for 563b5dedb77affe619290d5eab34fe6b39d52915.

5 months agocore: add SetProperties varlink method (#40356)
Zbigniew Jędrzejewski-Szmek [Tue, 17 Feb 2026 09:57:09 +0000 (10:57 +0100)] 
core: add SetProperties varlink method (#40356)

Start with Markers as a property, more can be added in the future as
needed

5 months agoSeveral fixlets for issues found by Coverity (#40707)
Yu Watanabe [Tue, 17 Feb 2026 09:26:46 +0000 (18:26 +0900)] 
Several fixlets for issues found by Coverity (#40707)

5 months agooomd: Fix unnecessary delays during OOM kills with pending kills present
Chris Down [Tue, 17 Feb 2026 06:58:44 +0000 (14:58 +0800)] 
oomd: Fix unnecessary delays during OOM kills with pending kills present

Let's say a user has two services with ManagedOOMMemoryPressure=kill,
perhaps a web server under system.slice and a batch job under
user.slice. Both exceed their pressure limits. On the previous timer
tick, oomd has already queued the web server's candidate for killing,
but the prekill hook has not yet responded, so the kill is still
pending.

In the code, monitor_memory_pressure_contexts_handler() iterates over
all pressure targets that have exceeded their limits. When it reaches
the web server target and calls oomd_cgroup_kill_mark(), which returns 0
because that cgroup is already queued. The code treats this the same as
a successful new kill: it resets the 15 second delay timer and returns
from the function, exiting the loop.

This loop is handled by SET_FOREACH and the iteration order is
hash-dependent. As such, if the web server target happens coincidentally
to be visited first, oomd never evaluates the batch job target at all.

The effect is twofold:

1. oomd stalls for 15 seconds despite not having initiated any new kill.
   That can unnecessarily delay further action to stem increases in
   memory pressure. The delay exists to let stale pressure counters
   settle after a kill, but no kill has happened here.
2. It non-deterministically skips pressure targets that may have
   unqueued candidates, dangerously allowing memory pressure to persist
   for longer than it should.

Fix this by skipping cgroups that are already queued so the loop
proceeds to try other pressure targets. We should only delay when a new
kill mark is actually created.

5 months agooomd: Fix silent failure to find bad cgroups when another cgroup dies
Chris Down [Tue, 17 Feb 2026 06:30:16 +0000 (14:30 +0800)] 
oomd: Fix silent failure to find bad cgroups when another cgroup dies

Consider a workload slice with several sibling cgroups. Imagine that one
of those cgroups is removed between the moment oomd enumerates the
directory and the moment it reads memory.oom.group. This is actually
relatively plausible under the high memory pressure conditions where
oomd is most needed.

In this case, the failed read prompts us to `return 0`, which exits the
entire enumeration loop in recursively_get_cgroup_context(). As a
result, all remaining sibling cgroups are silently dropped from the
candidate list for that monitoring cycle.

The effect is that oomd can fail to identify and kill the actual
offending cgroup, allowing memory pressure to persist until a subsequent
cycle where the race doesn't occur.

Fix this by instead proceeding to evaluate further sibling cgroups.

5 months agooomd: Fix silent, non-deterministic dropped OOM kills
Chris Down [Tue, 17 Feb 2026 05:46:49 +0000 (13:46 +0800)] 
oomd: Fix silent, non-deterministic dropped OOM kills

Let's say a user has two services with ManagedOOMMemoryPressure=kill,
one for a web server under system.slice, and one for a batch job under
user.slice. The batch job is causing severe memory pressure, whereas the
web server's cgroup has no processes with significant pgscan activity.

In the code, monitor_memory_pressure_contexts_handler() iterates over
all pressure targets that have exceeded their limits. When
oomd_select_by_pgscan_rate() returns 0 (that is, no candidates) for a
target, we return from the entire SET_FOREACH loop instead of moving to
the next target. Since SET_FOREACH iteration order is hash-dependent, if
the web server target happens to be visited first, oomd will find no
kill candidates for it and exit the loop. The batch job target that is
actually slamming the machine will never even be evaluated, and can
continue to wreak havoc without any intervention.

The effect is that oomd non-deterministically and silently fails to kill
cgroups that it should actually kill, allowing memory pressure to
persist and dangerously build up on the machine.

The fix is simple, keep evaluating remaining targets when one does not
match.

5 months agonetwork/wwan: fix memleak in failure path 40707/head
Yu Watanabe [Tue, 17 Feb 2026 08:02:05 +0000 (17:02 +0900)] 
network/wwan: fix memleak in failure path

Fixes CID#1645018.

5 months agonetwork/wwan: add missing error check
Yu Watanabe [Tue, 17 Feb 2026 07:50:48 +0000 (16:50 +0900)] 
network/wwan: add missing error check

Fixes CID#1645015.

5 months agosd-bus: use bus_error_message() at several more places
Yu Watanabe [Tue, 17 Feb 2026 07:44:36 +0000 (16:44 +0900)] 
sd-bus: use bus_error_message() at several more places

For CID#1645014, CID#1645016, and CID#1645017.

5 months agobus-polkit: add one more assertion
Yu Watanabe [Tue, 17 Feb 2026 07:39:35 +0000 (16:39 +0900)] 
bus-polkit: add one more assertion

For CID#1645013.

5 months agosocket-util: remove unused {send,receive}_many_fds*()
Mike Yuan [Sun, 15 Jun 2025 19:35:36 +0000 (21:35 +0200)] 
socket-util: remove unused {send,receive}_many_fds*()

These were introduced as part of the effort of sd-executor
worker pool (#29566), which never landed due to unsignificant
performance improvement. Let's just remove the unused
helpers. If that work ever gets resurrected they can be
restored from this commit pretty easily.

5 months agooomd: Fix Killed signal reason being lost (#40689)
Yu Watanabe [Tue, 17 Feb 2026 05:53:46 +0000 (14:53 +0900)] 
oomd: Fix Killed signal reason being lost (#40689)

Emitting "oom" doesn't mesh with the org.freedesktop.oom1.Manager
Killed() API contract, which defines "memory-used" and "memory-pressure"
as possible reasons. Consumers that key off reason thus will either lose
policy attribution or may reject the unknown value completely.

Plumb the reason through so it is visible to consumers.

5 months agooomd: Add regression tests to check Killed notification gives a reason 40689/head
Chris Down [Sun, 15 Feb 2026 16:25:31 +0000 (00:25 +0800)] 
oomd: Add regression tests to check Killed notification gives a reason

5 months agooomd: Fix Killed signal reason being lost
Chris Down [Sun, 15 Feb 2026 17:42:51 +0000 (01:42 +0800)] 
oomd: Fix Killed signal reason being lost

Emitting "oom" doesn't mesh with the org.freedesktop.oom1.Manager
Killed() API contract, which defines "memory-used" and "memory-pressure"
as possible reasons. Consumers that key off reason thus will either lose
policy attribution or may reject the unknown value completely.

Plumb the reason through so it is visible to consumers.

5 months agonspawn-mount: Use setns() in wipe_fully_visible_api_fs()
Daan De Meyer [Mon, 16 Feb 2026 18:59:10 +0000 (19:59 +0100)] 
nspawn-mount: Use setns() in wipe_fully_visible_api_fs()

namespace_enter() now does a is_our_namespace() check, which requires
/proc on older kernels, which is not available anymore after we call
do_wipe_fully_visible_api_fs() in wipe_fully_visible_api_fs().

Let's just call setns() instead as namespace_enter() is overkill to
enter a single namespace anyway.

5 months agoreport: enforce metric prefix (#40647)
Yu Watanabe [Mon, 16 Feb 2026 21:47:50 +0000 (06:47 +0900)] 
report: enforce metric prefix (#40647)

Addressing
> we should enforce that metrics ids begin with the varlink service name

from #40633

5 months agomkosi: Set CacheOnly=metadata for test images (#40699)
Daan De Meyer [Mon, 16 Feb 2026 14:42:35 +0000 (15:42 +0100)] 
mkosi: Set CacheOnly=metadata for test images (#40699)

The default behavior is to sync repository metadata for every image
that does not have a cache and we recently changed behavior to
invalidate
all cached images whenever we decide the repository metadata needs to
be resynced.

In systemd we have two images that are not cached because they use
BaseTrees=
hence set CacheOnly=metadata to explicitly indicate these two images
should never cause a repository metadata if resync even though they are
not cached.

5 months agoreport: validate metric name by socket 40647/head
Ivan Kruglov [Wed, 11 Feb 2026 15:48:58 +0000 (07:48 -0800)] 
report: validate metric name by socket

5 months agomeson: read more progs from PATH
nikstur [Tue, 10 Feb 2026 11:53:40 +0000 (12:53 +0100)] 
meson: read more progs from PATH

Find more progs on PATH instead of hardcoding them.

5 months agomkosi: Set CacheOnly=metadata for test images 40699/head
Daan De Meyer [Mon, 16 Feb 2026 12:28:22 +0000 (13:28 +0100)] 
mkosi: Set CacheOnly=metadata for test images

The default behavior is to sync repository metadata for every image
that does not have a cache and we recently changed behavior to invalidate
all cached images whenever we decide the repository metadata needs to
be resynced.

In systemd we have two images that are not cached because they use BaseTrees=
hence set CacheOnly=metadata to explicitly indicate these two images
should never cause a repository metadata if resync even though they are
not cached.

5 months agomkosi: update mkosi ref to 66d51024b7149f40be4702e84275c936373ace97
Daan De Meyer [Mon, 16 Feb 2026 12:28:13 +0000 (13:28 +0100)] 
mkosi: update mkosi ref to 66d51024b7149f40be4702e84275c936373ace97

66d51024b7 man: Update caching section
4eac60f168 Remove all cached images if repository metadata will be synced
025c6c0150 Move Incremental= to inherited settings in docs
427970d8fd Make MakeScriptsExecutable= a multiversal setting
53bd2da6fe Look at all CacheOnly= settings to determine if we need to sync metadata
114ae558ef config / qemu: add Console=headless

5 months agobacklight: also change clamp percentage on ID_BACKLIGHT_CLAMP/ID_LEDS_CLAMP=yes
Yu Watanabe [Mon, 16 Feb 2026 10:16:35 +0000 (19:16 +0900)] 
backlight: also change clamp percentage on ID_BACKLIGHT_CLAMP/ID_LEDS_CLAMP=yes

Follow-up for 4ed1e2ea17e0f29a23d7a3dd65af192def9b3214.

5 months agonetworkctl: use varlink method to bring up/down interfaces (#40693)
Yu Watanabe [Mon, 16 Feb 2026 11:35:29 +0000 (20:35 +0900)] 
networkctl: use varlink method to bring up/down interfaces (#40693)

Closes #38538.
Closes #40017.

5 months agoask-password-api: several modernizations for ask_password_agent(); use CLEANUP_TMPFIL...
Yu Watanabe [Mon, 16 Feb 2026 11:07:32 +0000 (20:07 +0900)] 
ask-password-api: several modernizations for ask_password_agent(); use CLEANUP_TMPFILE_AT more (#40631)

5 months agoreport: rearrange handling connection drop when skipping metrics
Ivan Kruglov [Wed, 11 Feb 2026 12:44:00 +0000 (04:44 -0800)] 
report: rearrange handling connection drop when skipping metrics

5 months agonamespace-util: Merge namespace_enter_delegated() into namespace_enter() (#40669)
Daan De Meyer [Mon, 16 Feb 2026 10:26:41 +0000 (11:26 +0100)] 
namespace-util: Merge namespace_enter_delegated() into namespace_enter() (#40669)

There's no need to pass in a boolean to decide whether we use
namespace_enter_delegated() or not. Instead, we can just check if we
have CAP_SYS_ADMIN in our own user namespace. If we don't, then we have
to insist on a child user namespace being passed in and we have to enter
it first to get CAP_SYS_ADMIN as without CAP_SYS_ADMIN we wouldn't be
able
to call setns() in the first place. If we do have CAP_SYS_ADMIN, we can
always enter the other namespaces first before entering the user
namespace.

Additionally, we don't fail anymore if we can't reset the UID/GID since
a
root user might not always be available in every user namespace we might
enter.

5 months agodns-delegates: add support for setting a firewall mark
r-vdp [Thu, 12 Feb 2026 21:52:54 +0000 (23:52 +0200)] 
dns-delegates: add support for setting a firewall mark

This makes it possible to have DNS requests for certain domains routed
differently than normal requests, which is for instance useful when
using policy routing to route traffic over a VPN but DNS requests for
the VPN endpoint itself, should be routed differently.

It doesn't make much sense to configure a firewall mark at the level of
a network interface, but at the level of a DNS delegate it can be very
useful.

5 months agoVarlink fixlets and several other follow-ups (#40687)
Daan De Meyer [Mon, 16 Feb 2026 10:02:08 +0000 (11:02 +0100)] 
Varlink fixlets and several other follow-ups (#40687)

5 months agooomd: Fix bug where we drop queued kill state on duplicate cgroup (#40690)
Daan De Meyer [Mon, 16 Feb 2026 09:52:49 +0000 (10:52 +0100)] 
oomd: Fix bug where we drop queued kill state on duplicate cgroup (#40690)

5 months agonetworkctl: use varlink methods to bring up/down interfaces 40693/head
Yu Watanabe [Mon, 16 Feb 2026 03:47:25 +0000 (12:47 +0900)] 
networkctl: use varlink methods to bring up/down interfaces

Then,
- polkit authentication can be used,
- dynamic configuration engine can be safely stopped before bringing
  down interfaces.

Fixes #38538.

5 months agonetworkctl: merge three functions for calling D-Bus methods
Yu Watanabe [Mon, 16 Feb 2026 04:10:41 +0000 (13:10 +0900)] 
networkctl: merge three functions for calling D-Bus methods

5 months agonetworkctl: use parse_interfaces() at one more place
Yu Watanabe [Mon, 16 Feb 2026 04:07:19 +0000 (13:07 +0900)] 
networkctl: use parse_interfaces() at one more place

5 months agonetworkctl: split out parse_interfaces()
Yu Watanabe [Mon, 16 Feb 2026 04:04:42 +0000 (13:04 +0900)] 
networkctl: split out parse_interfaces()

Also, this makes interfaces stored in OrderedSet rather than Set,
so interfaces becomes up/down in the specified order.

This also makes when multiple interfaces are specified, networkctl tries
to up/down all specfied interfaces even if some of them are failed.

Fixes #40017.

5 months agonamespace-util: Merge namespace_enter_delegated() into namespace_enter() 40669/head
Daan De Meyer [Sun, 15 Feb 2026 13:22:44 +0000 (14:22 +0100)] 
namespace-util: Merge namespace_enter_delegated() into namespace_enter()

There's no need to pass in a boolean to decide whether we use
namespace_enter_delegated() or not. Instead, we can just check if we
have CAP_SYS_ADMIN in our own user namespace. If we don't, then we have
to insist on a child user namespace being passed in and we have to enter
it first to get CAP_SYS_ADMIN as without CAP_SYS_ADMIN we wouldn't be able
to call setns() in the first place. If we do have CAP_SYS_ADMIN, we can
always enter the other namespaces first before entering the user namespace.

Additionally, we don't fail anymore if we can't reset the UID/GID since a
root user might not always be available in every user namespace we might
enter.

5 months agotimesync: fix parsing FallbackNTP= (#40692)
Zbigniew Jędrzejewski-Szmek [Mon, 16 Feb 2026 09:16:21 +0000 (10:16 +0100)] 
timesync: fix parsing FallbackNTP= (#40692)

Follow-up for 3745770ae4dcf262707882a38f6c5ba2684329a3.
Fixes #40621.

5 months agoprofile/systemd-osc-context: Enforce length limits 40696/head
Chris Lindee [Mon, 16 Feb 2026 06:08:31 +0000 (00:08 -0600)] 
profile/systemd-osc-context: Enforce length limits

UAPI.15 limits the length of fields; adhere to them.

References:
 [0] https://uapi-group.org/specifications/specs/osc_context/#syntax-in-abnf

5 months agoprofile/systemd-osc-context: Remove invalid octets
Chris Lindee [Mon, 16 Feb 2026 06:08:31 +0000 (00:08 -0600)] 
profile/systemd-osc-context: Remove invalid octets

UAPI.15 requires:
* No C0 Control Characters (`\x00-\x1f`)
* No DEL character (`\x7f`)

The following would be nice, but requires a `sed` implementation that is
aware of UTF-8: `-e $'y/\x00-\x1f\x7f/␀-␟␡/'`.

References:
 [0] https://uapi-group.org/specifications/specs/osc_context/#general-syntax

5 months agoprofile/systemd-osc-context: Bring escape up to spec
Chris Lindee [Mon, 16 Feb 2026 06:08:31 +0000 (00:08 -0600)] 
profile/systemd-osc-context: Bring escape up to spec

UAPI.15 requires:
* `\` to be replaced with `\x5c`
* `;` to be replaced with `\x3b`

References:
 [0] https://uapi-group.org/specifications/specs/osc_context/#general-syntax

5 months agoprofile/systemd-osc-context: Acknowledge uncertainty
Chris Lindee [Mon, 16 Feb 2026 06:47:15 +0000 (00:47 -0600)] 
profile/systemd-osc-context: Acknowledge uncertainty

Bash does not provide an easy way to discern if an exit status came from
a signal, or was a legitimate non-zero exit (i.e. a failure).  It can be
done, by using job control or by invoking another program; however, such
approaches require modifying the command entered by a user and are, thus,
invasive and risky.

Since an exit status of 129 on a command could either indicate it exited
cleanly with `exit(129)` or was interrupted by `SIGHUP`, the osc context
should report both possibilities, to acknowledge our uncertainty.  Given
we have no idea what happened, besides an unsuccessful exit, the exit is
described as `exit=failure`.

Moreover, discerning between an `interrupt` and a `crash` with a command
likely involves categorizing every signal.  It is fairly obvious `SIGINT`
is an interrupt and also obvious, IMO, that `SIGSEGV` is a crash.  Avoid
the complication (and potential disagreements) by using the encompassing,
generic value — one that remains true if no signal occurred.

References:
 [0] https://stackoverflow.com/a/66431355

5 months agoprofile/systemd-osc-context: Bring exit up to spec
Chris Lindee [Mon, 16 Feb 2026 06:08:31 +0000 (00:08 -0600)] 
profile/systemd-osc-context: Bring exit up to spec

The exit status should be compared against 128 — not 127 — as the Bash
manual, under the EXIT STATUS section, states [0]:

    When a command terminates on a fatal signal N, bash uses the value
    of 128+N as the exit status.

    If a command is not found, the child process created to execute it
    returns a status of 127.  If a command is found but is not
    executable, the return status is 126.

Furthermore, UAPI.15 specifies the `signal` value must be the symbolic
signal name, not a numerical value [1].  Luckily, POSIX.1-2008 ensures
the shell must supply `kill -l`, which must be able to convert `$?` to
the signal that could cause such an exit in that shell [2].  It should
be noted that only a select handful of signals have a standard numeric
value; all others are implementation-defined [3].  This is why UAPI.15
requires the symbolic name, as the value may differ across systems.

Notably, not every value above 128 needs to correspond to a signal; on
my Linux system, only exit codes 129–192 indicate a signal.  Again, we
can use `kill -l`, which will exit non-zero when an exit code does not
come from a signal (plus 128) [4].

Signal 0 (which would correspond to exit code 128) is reserved for the
null signal, per POSIX.1-2008 [5], and therefore will never be an exit
signal.

This change brings the implementation into compliance.

References:
 [0] https://www.man7.org/linux/man-pages//man1/bash.1.html#EXIT_STATUS
 [1] https://uapi-group.org/specifications/specs/osc_context/
 [2] https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/utilities/kill.html#:~:text=The%20letter%20ell
 [3] https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/utilities/kill.html#:~:text=The%20effects%20of%20specifying%20any%20signal_number
 [4] https://www.man7.org/linux/man-pages//man1/bash.1.html#:~:text=false%20if%20an%20error%20occurs%20or%20an%20invalid%20option%20is%20encountered
 [5] https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/basedefs/signal.h.html#:~:text=The%20value%200%20is%20reserved%20for%20use%20as%20the%20null%20signal

5 months agocore: serialize metrics varlink server as well 40687/head
Mike Yuan [Fri, 13 Feb 2026 19:22:13 +0000 (20:22 +0100)] 
core: serialize metrics varlink server as well

5 months agocore/manager-serialize: discern daemon-reload/reexec via objective
Mike Yuan [Fri, 13 Feb 2026 19:36:39 +0000 (20:36 +0100)] 
core/manager-serialize: discern daemon-reload/reexec via objective

5 months agovarlink-serialize: deserialize to correct event priority
Mike Yuan [Sun, 15 Feb 2026 02:21:01 +0000 (03:21 +0100)] 
varlink-serialize: deserialize to correct event priority

5 months agocore/varlink: several cleanups for metrics varlink server
Mike Yuan [Fri, 13 Feb 2026 16:37:10 +0000 (17:37 +0100)] 
core/varlink: several cleanups for metrics varlink server

Follow-up for bb1ef2edf7d62de35291702635067ee85f09bad5

The commit introduced a new "metrics" varlink server, but for
user scope stuff it is not bound anywhere. The copy-pasted
"fresh" handling for deserialization is also essentially
meaningless as metrics_setup_varlink_server() doesn't even report
whether the varlink server is fresh (let alone that no serialization
is being done at all right now). Moreover, currently the event
priority is hardcoded, while event loop and associated priority
assignment ought to be subject to each daemon.

While fixing the mentioned issues I took the chance to restructure
the existing code a bit for readability. Note that serialization
for the metrics server is still missing - it will be tackled
in subsequent commits.

5 months agoshared/metrics: add two more assertions
Yu Watanabe [Mon, 16 Feb 2026 06:26:21 +0000 (15:26 +0900)] 
shared/metrics: add two more assertions

5 months agoshared/metrics: name the sd_varlink_server in our usual fashion
Mike Yuan [Fri, 13 Feb 2026 16:31:33 +0000 (17:31 +0100)] 
shared/metrics: name the sd_varlink_server in our usual fashion

This is used for internal reference, in debug logging and such,
hence let's do nothing fancy but instead make it identifiable.

5 months agocore/varlink-metrics: suffix metrics methods with _metrics
Mike Yuan [Fri, 13 Feb 2026 17:14:34 +0000 (18:14 +0100)] 
core/varlink-metrics: suffix metrics methods with _metrics

This is not even the prominent "Describe" method in pid1,
as typically one would be looking for _describe_manager().

5 months agocore/varlink-metrics: include core-forward.h
Mike Yuan [Fri, 13 Feb 2026 16:48:15 +0000 (17:48 +0100)] 
core/varlink-metrics: include core-forward.h

5 months agocore/varlink-cgroup: add BindNetworkInterface to varlink CGContext
Mike Yuan [Sun, 15 Feb 2026 01:05:07 +0000 (02:05 +0100)] 
core/varlink-cgroup: add BindNetworkInterface to varlink CGContext

Follow-up for c1c787651b34c0a0f1082b9d32cf47ea3abe0af2

5 months agosd-varlink: fail if a method call wasn't replied to and the callback didn't store it
Mike Yuan [Thu, 12 Feb 2026 00:09:49 +0000 (01:09 +0100)] 
sd-varlink: fail if a method call wasn't replied to and the callback didn't store it

5 months agosd-varlink: take output queue into account in sd_varlink_flush()
Mike Yuan [Thu, 12 Feb 2026 00:11:30 +0000 (01:11 +0100)] 
sd-varlink: take output queue into account in sd_varlink_flush()

5 months agosd-varlink: _reset_fds() should reset fds for the reply being constructed
Mike Yuan [Wed, 11 Feb 2026 17:02:04 +0000 (18:02 +0100)] 
sd-varlink: _reset_fds() should reset fds for the reply being constructed

... (aka pushed_fds), not what's already enqueued to be sent out.

5 months agosd-varlink: use free_and_replace at one more place
Mike Yuan [Wed, 11 Feb 2026 15:29:37 +0000 (16:29 +0100)] 
sd-varlink: use free_and_replace at one more place

5 months agosd-varlink: replace manual move_fd() with FORK_PACK_FDS + FORK_CLOEXEC_OFF
Mike Yuan [Sun, 15 Feb 2026 02:45:26 +0000 (03:45 +0100)] 
sd-varlink: replace manual move_fd() with FORK_PACK_FDS + FORK_CLOEXEC_OFF

Note that this actually matters: we might otherwise clobber
the logging fds reopened when rearranging fd '3'.

While at it, avoid logging from library functions.

5 months agosd-varlink: also validate peer ucred for SD_VARLINK_SERVER_MYSELF_ONLY
Mike Yuan [Sun, 15 Feb 2026 04:24:56 +0000 (05:24 +0100)] 
sd-varlink: also validate peer ucred for SD_VARLINK_SERVER_MYSELF_ONLY

5 months agosd-varlink: log about client uid that hit connection limit
Mike Yuan [Sun, 15 Feb 2026 04:36:56 +0000 (05:36 +0100)] 
sd-varlink: log about client uid that hit connection limit

5 months agosd-varlink: shorten the code a bit
Mike Yuan [Sun, 15 Feb 2026 04:56:50 +0000 (05:56 +0100)] 
sd-varlink: shorten the code a bit

5 months agorepart: io.systemd.Repart.ListCandidateDevices requires 'more'
Mike Yuan [Sun, 15 Feb 2026 02:08:12 +0000 (03:08 +0100)] 
repart: io.systemd.Repart.ListCandidateDevices requires 'more'

5 months agoresolve: io.systemd.Resolve.BrowseServices requires 'more'
Mike Yuan [Sun, 15 Feb 2026 02:04:28 +0000 (03:04 +0100)] 
resolve: io.systemd.Resolve.BrowseServices requires 'more'

5 months agomute-console: io.systemd.MuteConsole requires 'more'
Mike Yuan [Sun, 8 Feb 2026 20:57:01 +0000 (21:57 +0100)] 
mute-console: io.systemd.MuteConsole requires 'more'

5 months agotree-wide: drop redundant check for SD_VARLINK_METHOD_MORE flag
Mike Yuan [Sun, 8 Feb 2026 20:47:38 +0000 (21:47 +0100)] 
tree-wide: drop redundant check for SD_VARLINK_METHOD_MORE flag

If the IDL declares the method requires 'more' yet the call doesn't
have it set, varlink_idl_validate_method_call() should have rejected
it and the callback shouldn't be reached.

5 months agovarlink-io.systemd.Network: minor coding style cleanups
Mike Yuan [Wed, 4 Feb 2026 18:51:28 +0000 (19:51 +0100)] 
varlink-io.systemd.Network: minor coding style cleanups

Follow-up for cf27c70d70f5912078f68b66869d16198aaa36a5

5 months agosd-json: unify JSON_BUILD_PAIR_IN?_ADDR_*
Mike Yuan [Sun, 15 Feb 2026 01:06:19 +0000 (02:06 +0100)] 
sd-json: unify JSON_BUILD_PAIR_IN?_ADDR_*

This also swaps family and address params for
plain JSON_BUILD(_PAIR)_IN_ADDR, aligning with
_WITH_STRING flavors.

5 months agojson-util: sort includes
Mike Yuan [Sun, 8 Feb 2026 16:12:21 +0000 (17:12 +0100)] 
json-util: sort includes

5 months agosd-json: use FOREACH_ARRAY more
Mike Yuan [Sun, 15 Feb 2026 00:45:50 +0000 (01:45 +0100)] 
sd-json: use FOREACH_ARRAY more

5 months agoshared: conditionalize build of apparmor-util.c in meson
Mike Yuan [Mon, 16 Feb 2026 01:50:29 +0000 (02:50 +0100)] 
shared: conditionalize build of apparmor-util.c in meson

5 months agoprocess-util: drop unused TAKE_PID
Mike Yuan [Sat, 14 Feb 2026 23:25:42 +0000 (00:25 +0100)] 
process-util: drop unused TAKE_PID

Follow-up for fbd276cb86a2f0292cc19fd57ee3d72bf73592dc

We now track helper processes via PidRef throughout the codebase.

5 months agoprocess-util: group oom_score_adjust_is_valid() with getter/setter
Mike Yuan [Sat, 14 Feb 2026 23:21:34 +0000 (00:21 +0100)] 
process-util: group oom_score_adjust_is_valid() with getter/setter

5 months agolog-context: drop redundant forward decl
Mike Yuan [Sat, 14 Feb 2026 23:39:05 +0000 (00:39 +0100)] 
log-context: drop redundant forward decl

We consolidated all these into forward.h.

5 months agobacklight: update comment to match the new clamp value
Mike Yuan [Mon, 16 Feb 2026 05:18:09 +0000 (06:18 +0100)] 
backlight: update comment to match the new clamp value

Follow-up for 4ed1e2ea17e0f29a23d7a3dd65af192def9b3214

5 months agouser-util: Don't setgroups() if /proc/self/gid_map is empty
Daan De Meyer [Fri, 13 Feb 2026 11:24:49 +0000 (12:24 +0100)] 
user-util: Don't setgroups() if /proc/self/gid_map is empty

If /proc/self/gid_map is empty, the kernel will refuse setgroups(),
so don't attempt it if that's the case on top of the /proc/self/setgroups
check we already have.