Skip to content

Use systemd for cgroup2 split-tunneling#9588

Draft
hulthe wants to merge 9 commits intomainfrom
systemd-cgroup-v2
Draft

Use systemd for cgroup2 split-tunneling#9588
hulthe wants to merge 9 commits intomainfrom
systemd-cgroup-v2

Conversation

@hulthe
Copy link
Contributor

@hulthe hulthe commented Dec 30, 2025


This change is Reviewable

@dkwo
Copy link

dkwo commented Jan 1, 2026

Would this change imply that mullvad-exclude will only work with systemd?
is there any other solution that would not require that?
cc: @meator @MarkusPettersson98

@hulthe
Copy link
Contributor Author

hulthe commented Jan 2, 2026

@dkwo This change requires systemd, yes.

We will have a fallback to the old net_cls cgroup. This would apply to distros with old kernels, or without systemd. This fallback might be removed in the future though, since we don't really want to maintain support for deprecated kernel interfaces.

We're thinking about adding a fallback to some other non-systemd mechanism, but no decision yet.

@dkwo
Copy link

dkwo commented Jan 9, 2026

I see. Just keep in mind that the current net_cls cgroup method is already broken e.g. on runit, so I would not bother keeping it around.

@hulthe hulthe force-pushed the systemd-cgroup-v2 branch 2 times, most recently from 8a021d4 to 720222a Compare January 22, 2026 08:49
hulthe and others added 2 commits January 27, 2026 16:49
Co-authored-by: David Lönnhager <david.l@mullvad.net>
This can be used with flatpak to "atomically" install our BPF hook in the new cgroup when the process is moved

Co-authored-by: Joakim Hulthe <joakim.hulthe@mullvad.net>
@dlon dlon force-pushed the systemd-cgroup-v2 branch from 720222a to 887b7cd Compare January 27, 2026 15:51
@dlon dlon force-pushed the systemd-cgroup-v2 branch from 8946adc to e589091 Compare January 29, 2026 16:09
@dlon dlon force-pushed the systemd-cgroup-v2 branch from e589091 to 20ff581 Compare January 29, 2026 16:27
@dkwo
Copy link

dkwo commented Jan 29, 2026

Another clarification: is the requirement for the init/service manager to implement cgroups v2, or specifically to have systemd as pid1? in the former case, runit also has support for cgroups v2, and others too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants