trace_landl...force_domain(9)
πΈ trace_landlock_enforce_domain(9) β from the Kernel API Manual
okay so bestie, this page lives in the Kernel API Manual and it's literally about the moment a Landlock domain gets enforced on a thread β like the actual clamping-down moment, not the setup. it's a tracepoint, it's iconic, let's go π
β¨ NAME β¨
trace_landlock_enforce_domain β the domain that's now enforced on a thread π«Ά
β¨ SYNOPSIS β¨
void trace_landlock_enforce_domain (const struct landlock_domain *domain
, bool complete , bool process_wide , bool no_new_privs );
that's the whole signature, no notes π
β¨ ARGUMENTS β¨
domainβ the domain that's now enforced on the current thread. it's neverNULL, it's immutable, and you read it locklessly, so no locking drama π. to correlate it tolandlock_create_domain, go throughdomain->hierarchy->idfor the source ruleset and the requesting thread, or readdomain->hierarchy->detailsif you want the requesting process.completeβ this one's set on the single event that concludes the operation, right after all of the operation's other enforcements. like, filter on this if you want exactly one event per operation, periodt β¨process_wideβ the enforcement covers every eligible (non-exiting) thread of the process. it's set when the caller usedLANDLOCK_RESTRICT_SELF_TSYNC, or when the process is single-threaded.
π¨ careful bestie: a lone thread whose group still holds a zombie leader is not counted as single-threaded. so process_wide == 0 never proves the opposite. do not read that as a green light, fr fr π
no_new_privsβ the enforcing thread'sno_new_privsstate at enforcement time. it's1if it was set (either by a prior:manpage:prctl(2)``PR_SET_NO_NEW_PRIVSor byLANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS), and0if the domain was enforced withCAP_SYS_ADMINinstead. two paths, two vibes π
β¨ DESCRIPTION β¨
so this event is emitted for each thread that sys_landlock_restrict_self enforces the domain on β in that thread's own context, right after its commit_creds. which means it only fires once the thread is irreversibly enforcing the domain. aborted operations emit none. no half-sends, no "oops nvm", none of that π
this tracepoint is not balanced β know that going in. every enforcement falls between the domain's landlock_create_domain and landlock_free_domain events, so it's bracketed, it's accounted for, it's fine πΈ
and the big one: complete == 1 && process_wide == 1 means the whole process is sandboxed by domain, durably π₯. Landlock domains are monotonic and inherited on :manpage:clone(2)``, so that lock-in? it stays. main character energy honestly π
β¨ SEE ALSO β¨
Kernel file ./include/trace/events/landlock.h Landlock trace events(9), trace_landlock_create_ruleset(9), trace_landlock_free_ruleset(9), trace_landlock_add_rule_path_beneath(9), trace_landlock_add_rule_net_port(9), trace_landlock_create_domain(9), trace_landlock_free_domain(9), trace_landlock_check_rule_inode(9), trace_landlock_check_rule_net_port(9), trace_landlock_deny_access_fs(9), trace_landlock_deny_access_net(9), trace_landlock_deny_ptrace(9), trace_landlock_deny_scope_signal(9), trace_landlock_deny_scope_abstract_unix_socket(9)
and that's the whole page, bestie π¦ it comes from the ./include/trace/events source, dated October 2026 β so go forth, filter your tracepoints, and slay πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms