Skip to content

Commit 745dc07

Browse files
committed
seccomp: support riscv64
Signed-off-by: Akihiro Suda <[email protected]> (cherry picked from commit 4b412b8) Signed-off-by: Akihiro Suda <[email protected]>
1 parent c2f841f commit 745dc07

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

contrib/seccomp/seccomp_default.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func arches() []specs.Arch {
4444
return []specs.Arch{specs.ArchMIPSEL, specs.ArchMIPSEL64, specs.ArchMIPSEL64N32}
4545
case "s390x":
4646
return []specs.Arch{specs.ArchS390, specs.ArchS390X}
47+
case "riscv64":
48+
// ArchRISCV32 (SCMP_ARCH_RISCV32) does not exist
49+
return []specs.Arch{specs.ArchRISCV64}
4750
default:
4851
return []specs.Arch{}
4952
}
@@ -531,6 +534,14 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
531534
Action: specs.ActAllow,
532535
Args: []specs.LinuxSeccompArg{},
533536
})
537+
case "riscv64":
538+
s.Syscalls = append(s.Syscalls, specs.LinuxSyscall{
539+
Names: []string{
540+
"riscv_flush_icache",
541+
},
542+
Action: specs.ActAllow,
543+
Args: []specs.LinuxSeccompArg{},
544+
})
534545
}
535546

536547
admin := false

0 commit comments

Comments
 (0)