Skip to content

Commit 4c2f18f

Browse files
committed
seccomp: support riscv64
Corresponds to containerd PR 6882 Signed-off-by: Akihiro Suda <[email protected]>
1 parent 2ed904c commit 4c2f18f

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

profiles/seccomp/default.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
"subArchitectures": [
4949
"SCMP_ARCH_S390"
5050
]
51+
},
52+
{
53+
"architecture": "SCMP_ARCH_RISCV64",
54+
"subArchitectures": null
5155
}
5256
],
5357
"syscalls": [
@@ -540,6 +544,17 @@
540544
]
541545
}
542546
},
547+
{
548+
"names": [
549+
"riscv_flush_icache"
550+
],
551+
"action": "SCMP_ACT_ALLOW",
552+
"includes": {
553+
"arches": [
554+
"riscv64"
555+
]
556+
}
557+
},
543558
{
544559
"names": [
545560
"open_by_handle_at"

profiles/seccomp/default_linux.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ func arches() []Architecture {
3838
Arch: specs.ArchS390X,
3939
SubArches: []specs.Arch{specs.ArchS390},
4040
},
41+
{
42+
Arch: specs.ArchRISCV64,
43+
SubArches: nil,
44+
},
4145
}
4246
}
4347

@@ -533,6 +537,17 @@ func DefaultProfile() *Seccomp {
533537
Arches: []string{"s390", "s390x"},
534538
},
535539
},
540+
{
541+
LinuxSyscall: specs.LinuxSyscall{
542+
Names: []string{
543+
"riscv_flush_icache",
544+
},
545+
Action: specs.ActAllow,
546+
},
547+
Includes: &Filter{
548+
Arches: []string{"riscv64"},
549+
},
550+
},
536551
{
537552
LinuxSyscall: specs.LinuxSyscall{
538553
Names: []string{

0 commit comments

Comments
 (0)