diff options
| author | Mickaël Salaün <mic@digikod.net> | 2026-08-11 11:43:31 +0200 |
|---|---|---|
| committer | Mickaël Salaün <mic@digikod.net> | 2026-08-17 10:17:18 +0200 |
| commit | aef2dd32ddedcbd85ddec02d662af6f56b5ac309 (patch) | |
| tree | 466074e06c195f99657711e3204f1a03f9b598bb /scripts/objdiff | |
| parent | 6e2df0117b6b23f88755d7397270cdaa2ac99a92 (diff) | |
| download | linux-aef2dd32ddedcbd85ddec02d662af6f56b5ac309.tar.gz linux-aef2dd32ddedcbd85ddec02d662af6f56b5ac309.zip | |
selftests/landlock: Add scope and ptrace tracepoint tests
Add trace tests for the landlock_deny_ptrace,
landlock_deny_scope_signal, and landlock_deny_scope_abstract_unix_socket
tracepoints, each placed alongside the functional tests for its
subsystem, mirroring the audit test layout.
Each tracepoint is exercised by a fixture with three variants that pin
both branches of the other-party domain field: denied against an
unsandboxed other party (other-party domain ID 0), denied against a
sandboxed other party (non-zero ID), and an allowed baseline that
records no event. A second fixture per type exercises an alternate LSM
hook that reaches the same tracepoint with the same other-party domain
ID, since each denial type can be reached through more than one hook.
The datagram abstract-unix variant does not assert peer_pid, which is 0
for a datagram peer (no SO_PEERCRED); sun_path is the reliable peer
identifier. The ptrace fixtures install a plain domain-creating ruleset
rather than a dedicated flag, since ptrace denial relies on domain
ancestry, not on a specific scoped flag. The fixtures unshare the mount
namespace and remount / as MS_PRIVATE before mounting tracefs so the
helper instance is visible only to the test process.
Cc: Günther Noack <gnoack@google.com>
Cc: Tingmao Wang <m@maowtm.org>
Link: https://patch.msgid.link/20260811094338.288094-18-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
