diff options
author | Rahat Mahmood <rahat@google.com> | 2020-10-02 12:22:34 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-02 12:24:24 -0700 |
commit | 4f462b0ed9912fa19b3a3eab6d2f08a98d364574 (patch) | |
tree | a887953e9483b7026b58538ab35b5251af7ac116 /pkg/abi/linux/seccomp.go | |
parent | ed94c0de51412a41e6657e23685dda876df31d15 (diff) |
Convert uses of the binary package in kernel to go-marshal.
PiperOrigin-RevId: 335077195
Diffstat (limited to 'pkg/abi/linux/seccomp.go')
-rw-r--r-- | pkg/abi/linux/seccomp.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pkg/abi/linux/seccomp.go b/pkg/abi/linux/seccomp.go index b07cafe12..5be3f10f9 100644 --- a/pkg/abi/linux/seccomp.go +++ b/pkg/abi/linux/seccomp.go @@ -83,3 +83,22 @@ type SockFprog struct { pad [6]byte Filter *BPFInstruction } + +// SeccompData is equivalent to struct seccomp_data, which contains the data +// passed to seccomp-bpf filters. +// +// +marshal +type SeccompData struct { + // Nr is the system call number. + Nr int32 + + // Arch is an AUDIT_ARCH_* value indicating the system call convention. + Arch uint32 + + // InstructionPointer is the value of the instruction pointer at the time + // of the system call. + InstructionPointer uint64 + + // Args contains the first 6 system call arguments. + Args [6]uint64 +} |