Skip to content

Commit

Permalink
seccomp: support riscv64
Browse files Browse the repository at this point in the history
Corresponds to containerd PR 6882

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed May 2, 2022
1 parent 2ed904c commit 4c2f18f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions profiles/seccomp/default.json
Expand Up @@ -48,6 +48,10 @@
"subArchitectures": [
"SCMP_ARCH_S390"
]
},
{
"architecture": "SCMP_ARCH_RISCV64",
"subArchitectures": null
}
],
"syscalls": [
Expand Down Expand Up @@ -540,6 +544,17 @@
]
}
},
{
"names": [
"riscv_flush_icache"
],
"action": "SCMP_ACT_ALLOW",
"includes": {
"arches": [
"riscv64"
]
}
},
{
"names": [
"open_by_handle_at"
Expand Down
15 changes: 15 additions & 0 deletions profiles/seccomp/default_linux.go
Expand Up @@ -38,6 +38,10 @@ func arches() []Architecture {
Arch: specs.ArchS390X,
SubArches: []specs.Arch{specs.ArchS390},
},
{
Arch: specs.ArchRISCV64,
SubArches: nil,
},
}
}

Expand Down Expand Up @@ -533,6 +537,17 @@ func DefaultProfile() *Seccomp {
Arches: []string{"s390", "s390x"},
},
},
{
LinuxSyscall: specs.LinuxSyscall{
Names: []string{
"riscv_flush_icache",
},
Action: specs.ActAllow,
},
Includes: &Filter{
Arches: []string{"riscv64"},
},
},
{
LinuxSyscall: specs.LinuxSyscall{
Names: []string{
Expand Down

0 comments on commit 4c2f18f

Please sign in to comment.