Repository navigation
feat(filter): Add Linux filter fields and accessors - #731
Merged
rabbitstack merged 4 commits intoSep 16, 2026
Merged
Conversation
Keep deprecated kevt aliases on Windows so they never enter the Linux catalog, and register process, file, network, memory, and thread fields for the captured syscalls.
…ad fields Wire accessors for the syscall event matrix, gate file/net/mem on the existing enable flags, and expose syscall return, number, and truncation on evt fields.
…uncation Prove shared-name semantics, missing-value defaults, truncation bits, and that Windows-only and kevt fields cannot compile.
rabbitstack
approved these changes
Sep 16, 2026
rabbitstack
left a comment
Owner
There was a problem hiding this comment.
LGTM, after addressing the changes!
Drop first-class truncated fields so callers inspect the truncated parameter through evt.arg.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this PR / why it is needed?
Makes the syscall telemetry introduced on
linux-portfilterable. The Linux field catalog grows from five identity fields to the full event matrix, and real accessors replace the noop stubs for the file, network, memory, and thread families.Shared field names are reused only where the semantics match the Windows counterpart:
file.path,file.name,file.extension,file.path.stem,net.dip/net.sip/net.dport/net.sport,mem.address/mem.size/mem.protection,ps.uuid, and the parent process fields. Windows-specific fields (mem.type,mem.alloc,registry.*,pe.*,handle.*,dns.*, and the deprecatedkevt.*aliases) do not enter the Linux catalog and fail to compile in a filter expression. Linux-native concepts get their own names:ps.uid/ps.gid,ps.signal,ps.target.pid,ps.ptrace.request,ps.prctl.option,ps.clone.flags,file.new_path/file.dirfd/file.fd/file.flags/file.mode/file.truncated,net.family/net.path/net.fd,mem.flags/mem.fd/mem.offset/mem.target.pid,thread.tid/thread.pid, andevt.retval/evt.syscall/evt.truncated.The deprecated
kevt.*aliases move from the common catalog into the Windows platform catalog, so Windows behavior is unchanged while new Linux filters use the supportedevt.*names from the start.What type of change does this PR introduce?
/kind feature
Any specific area of the project related to this PR?
/area filters
/area tests
Special notes for the reviewer
linux-port, notmaster.enable-fileio,enable-net, andenable-mem, mirroring how the Windows constructor gates its accessors. The thread accessor is always on and only answers for thread-creating clones.evt.retval,evt.syscall, andevt.truncatedthrough a platform hook because the backing parameter names exist only on Linux; the Windows hook is a noop, so the shared accessor compiles on both platforms.file.truncatedreports either truncation bit for file events, since the aux buffer holds the rename destination path there.mem.protection,mem.flags, andfile.flags/file.modeexpose the raw bitmask/mode values captured by the eBPF programs; symbolic rendering can layer on top later without changing field identity.go test ./pkg/filter/... ./pkg/rules/GOOS=windows go build ./pkg/...andgo vet ./pkg/filter/...kevt.*fields are rejected at compile time.Does this PR introduce a user-facing change?
Yes. On Linux, filter expressions and rules can now reference process, file, network, memory, and thread fields for all captured syscall events, for example
fibratus run evt.name = 'connect' and net.dport = 443.