diff options
author | Bin Lu <bin.lu@arm.com> | 2019-05-03 22:02:51 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-05-03 22:03:59 -0700 |
commit | ebe2f78d9bc8639f0967c08777a3c9431ac44700 (patch) | |
tree | fd0df799dc3dff06549d7c7fedfb04d24ef5f31f /pkg/seccomp/seccomp.go | |
parent | bf0ac565d2873069799082ad7bc3e3c43acbc593 (diff) |
Add arm64 support to pkg/seccomp
Signed-off-by: Bin Lu <bin.lu@arm.com>
PiperOrigin-RevId: 246622505
Change-Id: I803639a0c5b0f75959c64fee5385314214834d10
Diffstat (limited to 'pkg/seccomp/seccomp.go')
-rw-r--r-- | pkg/seccomp/seccomp.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/seccomp/seccomp.go b/pkg/seccomp/seccomp.go index 50c9409e4..cc142a497 100644 --- a/pkg/seccomp/seccomp.go +++ b/pkg/seccomp/seccomp.go @@ -123,11 +123,11 @@ func BuildProgram(rules []RuleSet, defaultAction linux.BPFAction) ([]linux.BPFIn // Be paranoid and check that syscall is done in the expected architecture. // // A = seccomp_data.arch - // if (A != AUDIT_ARCH_X86_64) goto defaultAction. + // if (A != AUDIT_ARCH) goto defaultAction. program.AddStmt(bpf.Ld|bpf.Abs|bpf.W, seccompDataOffsetArch) // defaultLabel is at the bottom of the program. The size of program // may exceeds 255 lines, which is the limit of a condition jump. - program.AddJump(bpf.Jmp|bpf.Jeq|bpf.K, linux.AUDIT_ARCH_X86_64, skipOneInst, 0) + program.AddJump(bpf.Jmp|bpf.Jeq|bpf.K, LINUX_AUDIT_ARCH, skipOneInst, 0) program.AddDirectJumpLabel(defaultLabel) if err := buildIndex(rules, program); err != nil { return nil, err |