Kernels before v6.16 (missing commit 1271a40eeafa "bpf: Allow access to const void pointer arguments in tracing programs") have a bug in btf_ctx_access() where const void * parameters in LSM hook signatures are not recognized as void pointers. The function checks t->type == 0 to detect void *, but for const void * the BTF chain is PTR -> CONST -> void, so t->type points to the CONST node rather than directly to type_id 0. This causes the verifier to reject any BPF program that reads the const void *value argument of bdev_setintegrity: func 'bpf_lsm_bdev_setintegrity' arg2 type UNKNOWN is not a struct invalid bpf_context access off=16 size=8 Work around this by providing a compat variant of the bdev_setintegrity BPF program that avoids reading the const void *value argument entirely. Instead it reads the size argument (a scalar integer) directly from the raw BPF context (ctx[3]), which is not subject to the broken type check. This is safe because dm-verity guarantees that value and size are always in lockstep: both NULL/0 for unsigned devices, both non-zero for signed devices. The loader tries the full version first (which reads both value and size for defense-in-depth) and falls back to the compat variant if loading fails. bpf_program__set_autoload(false) disables whichever variant is not needed so the verifier never sees it. This compat logic can be removed once the minimum kernel baseline includes the 1271a40eeafa fix. Signed-off-by: Christian Brauner <brauner@kernel.org>
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS, and also repositories with packages built from the latest stable release
