mirror of
https://github.com/aya-rs/aya.git
synced 2026-05-31 11:18:53 +02:00
b0c4c40f46
Add `inode_storage.rs` and `cgrp_storage.rs` eBPF test binaries. The inode probe attaches to the LSM `inode_permission` hook, filters on a tgid the userspace test sets, and stores a sentinel in the storage of the inode whose permission was checked. The cgrp probe attaches to the `cgroup_mkdir` BTF tracepoint and stores the same sentinel in the new cgroup's storage. The userspace tests load each program and trigger it: the inode test opens a temporary file, the cgrp test creates a child cgroup. They then read the sentinel back by the object's file descriptor. The inode test skips when LSM programs are unsupported or the BPF LSM module is inactive; the cgrp test skips when tracing program attach is unsupported or the system is not cgroup2.