summaryrefslogtreecommitdiffhomepage
path: root/pkg/seccomp
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2020-04-22 17:48:59 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-22 17:50:10 -0700
commit0c586946ea26610b87c4ff7bda783a5a9ca11ec0 (patch)
tree224308d37aa7a9d146c8cfb851d8b081fb5f8442 /pkg/seccomp
parent37f863f62813f76b05979494c1bc2fe102629321 (diff)
Specify a memory file in platform.New().
PiperOrigin-RevId: 307941984
Diffstat (limited to 'pkg/seccomp')
-rw-r--r--pkg/seccomp/seccomp_unsafe.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/pkg/seccomp/seccomp_unsafe.go b/pkg/seccomp/seccomp_unsafe.go
index be328db12..f7e986589 100644
--- a/pkg/seccomp/seccomp_unsafe.go
+++ b/pkg/seccomp/seccomp_unsafe.go
@@ -21,13 +21,6 @@ import (
"gvisor.dev/gvisor/pkg/abi/linux"
)
-// sockFprog is sock_fprog taken from <linux/filter.h>.
-type sockFprog struct {
- Len uint16
- pad [6]byte
- Filter *linux.BPFInstruction
-}
-
// SetFilter installs the given BPF program.
//
// This is safe to call from an afterFork context.
@@ -39,7 +32,7 @@ func SetFilter(instrs []linux.BPFInstruction) syscall.Errno {
return errno
}
- sockProg := sockFprog{
+ sockProg := linux.SockFprog{
Len: uint16(len(instrs)),
Filter: (*linux.BPFInstruction)(unsafe.Pointer(&instrs[0])),
}