helper/seccomp: seccomp_load on negative fd

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-03-12 15:18:52 +09:00
parent df266527f1
commit be16970e77
5 changed files with 25 additions and 12 deletions

View File

@@ -11,6 +11,9 @@ import (
// New returns an inactive Encoder instance.
func New(opts SyscallOpts) *Encoder { return &Encoder{newExporter(opts)} }
// Load loads a filter into the kernel.
func Load(opts SyscallOpts) error { return buildFilter(-1, opts) }
/*
An Encoder writes a BPF program to an output stream.