trace_landlo...reate_domain(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, this is the trace_landlock_create_domain page from the Kernel API Manual. The official name vibe is New domain created β€” that's the whole mood. πŸ’…

✨ SYNOPSIS ✨

Here's the signature, exactly as it stands:

void trace_landlock_create_domain (const struct landlock_domain *domain
       , const struct landlock_ruleset *ruleset );

πŸŽ€ ARGUMENTS πŸŽ€

Two args, both absolutely not nullable, and they're both kind of the main character:

  • domain β€” the newly created domain (never NULL, immutable after creation). Its domain->hierarchy->id is its unique ID, shared with the landlock_enforce_domain and landlock_free_domain events; domain->hierarchy->details holds the requesting process. 🫢
  • ruleset β€” the source ruleset frozen into the domain (never NULL). The ruleset lock is held across the emission, so a BPF program reading it via BTF sees the exact merged ruleset; ruleset->id / ruleset->version identify it. πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

So this event is emitted by sys_landlock_restrict_self once, in the requesting thread's context, right after the merge and before thread-sync. It's giving very specific timing, and we respect it.

The flags-only path (ruleset_fd == -1) creates no domain and does not emit this event. Important! No domain, no event, no drama.

It's paired with the per-thread landlock_enforce_domain (join on domain->hierarchy->id) and balanced by a matching landlock_free_domain event. 🌈

πŸ’… SEE ALSO πŸ’…

go read these next, bestie β€” the whole landlock trace-event friend group is here:


xoxo bestie πŸ’– source/version: ./include/trace/events, date: October 2026 β€” catch you in the Kernel API Manual, periodt. 🧚

πŸ“¦ where this page comes from