feat(seccomp): Add support for LoongArch64 architecture #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this change?
This pull request adds support for the LoongArch64 architecture to the default Seccomp profile.
LoongArch64 is a modern instruction set architecture developed by Loongson Technology. Adding it to the default profile is essential for ensuring containers running on LoongArch64 systems have a secure, functional default Seccomp policy.
Why is this needed?
Without this change, containers running on LoongArch64 hosts might default to an overly restrictive or non-functional Seccomp profile, potentially leading to runtime issues or requiring users to manually configure a policy. This patch ensures parity with other supported architectures like RISCV64, ARM64, etc.
How does this address the need?
The change modifies three files to incorporate LoongArch64 support:
seccomp/default.json: AddsSCMP_ARCH_LOONGARCH64to the list of supported architectures in the JSON profile.seccomp/default_linux.go: Addsspecs.ArchLOONGARCH64to the list of default architectures for Linux.seccomp/seccomp_linux.go: Maps the Go environment'sloong64string to the appropriatespecs.ArchLOONGARCH64and maps it back to the nativeloongarch64string, allowing the runtime to correctly identify and use the architecture's profile./cc @moby/profiles-maintainers