-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add loong64 support for seccomp #1187
base: main
Are you sure you want to change the base?
Conversation
@@ -726,6 +726,7 @@ The following parameters can be specified to set up seccomp: | |||
* `SCMP_ARCH_PARISC` | |||
* `SCMP_ARCH_PARISC64` | |||
* `SCMP_ARCH_RISCV64` | |||
* `SCMP_ARCH_LOONGARCH64` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L708: A valid list of constants as of libseccomp v2.5.0 is shown below.
This has to be updated to v2.6.0 (and we have to wait for v2.6.0 to be released)
specs-go/config.go
Outdated
@@ -692,6 +692,7 @@ const ( | |||
ArchPARISC Arch = "SCMP_ARCH_PARISC" | |||
ArchPARISC64 Arch = "SCMP_ARCH_PARISC64" | |||
ArchRISCV64 Arch = "SCMP_ARCH_RISCV64" | |||
ArchLOONG64 Arch = "SCMP_ARCH_LOONGARCH64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ArchLOONG64 Arch = "SCMP_ARCH_LOONGARCH64" | |
ArchLOONGARCH64 Arch = "SCMP_ARCH_LOONGARCH64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi AkihiroSuda,
ArchLOONG64 is used here, because the GOARCH name corresponding to the LoongArch64 architecture in golang is loong64.
The support for loong64 will also be integrated into libseccomp-go, and the corresponding PR is: seccomp/libseccomp-golang#106
I understand that it should be a better solution to keep the name of Arch consistent in these two projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable name here must correspond to the seccomp arch name, not the GOARCH name.
See ArchX86_64
vs amd64
, ArchAARCH64
vs arm64
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable name here must correspond to the seccomp arch name, not the GOARCH name. See
ArchX86_64
vsamd64
,ArchAARCH64
vsarm64
.
Thanks
Signed-off-by: zhaixiaojuan <zhaixiaojuan@loongson.cn>
|
libseccomp v2.6.0 does not appear to be released yet |
The LoongArch architecture (LoongArch) is an Instruction Set Architecture (ISA) that has a RISC style.
Documentations:
ISA:
https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html
ABI:
https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html
More docs can be found at:
https://loongson.github.io/LoongArch-Documentation/README-EN.html