#43964·systemd

nsresourced now treats BPF-LSM attach failure as fatal

Author: craftyguyCreated Oct 1, 2026Updated Oct 1, 2026
Labelsbug 🐛

systemd version the issue has been seen with

262

Used distribution

nura (postmarketOS)

Linux kernel version used

6.18.54 (or any kernel prior to 7.2)

CPU architectures issue was seen on

aarch64

Component

No response

Expected behaviour you didn't see

nsresourced shouldn't fail if it can't attach to BPF-LSM

Unexpected behaviour you saw

When this happens, this actually blocks booting the system for some reason. systemctl mask systemd-nsresourced gets the system booting again, but this is not ideal. We did not have to do this on aarch64 with systemd <262 when booting with a kernel that doesn't have the ftrace patch referenced below.

I tried to trace this through the source code, not sure if this is helpful or not:

  • manager_startup calls manager_attach_bpf, which calls userns_restrict_attach, which fails
  • the error bubbles up through manager_attach_bpf to manager_startup, which returns early
  • nsresourced.c:run logs "Failed to start up daemon" and the process exits 1

It might be related to 7eb016d, but I don't want to blame it since I haven't had a chance to bisect yet

This was reported downstream: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items/4910

Steps to reproduce the problem

run systemd 262 with a <7.2 kernel on aarch64, without this patch that was first available in 7.2: https://lkml.org/lkml/2026/6/9/314

Additional program output to the terminal or log subsystem illustrating the issue

bash
Oct 01 06:46:21 foo systemd-nsresourced[372]: Failed to attach LSM BPF program: Not supported
Oct 01 06:46:21 foo systemd-nsresourced[372]: Failed to attach BPF programs: Not supported
Oct 01 06:46:21 foo systemd-nsresourced[372]: Failed to start up daemon: Not supported
Oct 01 06:46:21 foo systemd[1]: systemd-nsresourced.service: Main process exited, code=exited, status=1/FAILURE
Oct 01 06:46:21 foo systemd[1]: systemd-nsresourced.service: Failed with result 'exit-code'.
Oct 01 06:46:21 foo systemd[1]: Failed to start Namespace Resource Manager.