mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
This removes the interface indirection from BPF evaluation, which is
a very hot path (runs for every application syscall for seccomp'd containers)
and simplifies the code in general.
```
│ initial │ hey_look_no_interfaces │
│ sec/op │ sec/op vs base │
Interpreter 26.31n ± 0% 21.12n ± 0% -19.73% (p=0.000 n=21+20)
```
PiperOrigin-RevId: 576375947
46 lines
873 B
Python
46 lines
873 B
Python
load("//tools:defs.bzl", "bzl_library", "go_binary", "go_library")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
go_library(
|
|
name = "secbench",
|
|
testonly = 1,
|
|
srcs = ["secbench.go"],
|
|
data = [
|
|
":runner",
|
|
],
|
|
visibility = [
|
|
"//:sandbox",
|
|
],
|
|
deps = [
|
|
"//pkg/abi/linux",
|
|
"//pkg/bpf",
|
|
"//pkg/seccomp",
|
|
"//pkg/test/testutil",
|
|
"//test/secbench/secbenchdef",
|
|
"@org_golang_x_sys//unix:go_default_library",
|
|
],
|
|
)
|
|
|
|
go_binary(
|
|
name = "runner",
|
|
testonly = 1,
|
|
srcs = ["runner.go"],
|
|
deps = [
|
|
"//pkg/abi/linux",
|
|
"//pkg/bpf",
|
|
"//pkg/gohacks",
|
|
"//pkg/seccomp",
|
|
"//test/secbench/secbenchdef",
|
|
],
|
|
)
|
|
|
|
bzl_library(
|
|
name = "defs",
|
|
srcs = ["defs.bzl"],
|
|
deps = ["//tools:defs_bzl"],
|
|
)
|