-
Notifications
You must be signed in to change notification settings - Fork 177
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
RFE: add RISC-V support #108
Conversation
On newer architectures renameat syscall has been superseded by renameat2 syscall. Add pseudo syscall number for renameat. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
The RISC-V architecture port of Linux has a arch-specific syscall for flushing I-cache. Add this syscall and its pseudo number. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
RISC-V is a brand new architecture, which gained mainline Linux support at 4.15. Add syscalls for it. A hack in tools/util.c is also added as the RISC-V architecture has not yet audit support. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
@@ -0,0 +1,528 @@ | |||
/** | |||
* Enhanced Seccomp AArch64 Syscall Table |
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.
Copy-paste error?
@@ -0,0 +1,36 @@ | |||
/** | |||
* Enhanced Seccomp AArch64 Syscall Table |
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.
Ditto
@@ -376,6 +376,47 @@ function dump_lib_ppc64() { | |||
dump_lib_arch ppc64 | |||
} | |||
|
|||
# | |||
# Dump the aarch64 system syscall table |
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.
Ditto
@@ -152,6 +155,8 @@ const struct arch_def *arch_def_lookup(uint32_t token) | |||
return &arch_def_ppc64; | |||
case SCMP_ARCH_PPC64LE: | |||
return &arch_def_ppc64le; | |||
case SCMP_ARCH_RISCV64: | |||
return &arch_def_ppc64; |
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.
Ditto
Awesome! I have a use case that needs to block setuid binary creation, I'll hopefully test that in qemu-system and qemu-user this week (hardware is coming in a few months 😄 ) |
@pcmoore Kernel support is upstream in 4.15.0. (More drivers are needed to boot, they are expected in 4.17, but 4.15 has the complete uapi) |
@sorear I'm looking at Linus' tree right now (v4.16-rc2+) and I don't see |
@Icenowy I haven't looked closely, but it looks like you are missing a lot of the test bits needed to verify the RISC-V support. |
Ah, sorry, I thought you meant the port in general. I don't know about seccomp status. |
@sorear while the general Linux RISC-V support is important, for the purposes of libseccomp, if the If you, or someone else, is planning on adding the Linux Kernel support soon we can consider reviewing this PR and possibly merging it into a development branch if it would help you, but if the kernel support is not in progress I'm going to recommend we close this PR. Please note that closing this PR doesn't mean I'm rejecting the idea of libseccomp on RISC-V, it's just the opposite, I would be very happy to add RISC-V support! See #110 for the tracking issue. |
Looking at Linus' tree today, it appears that kernel support is still missing, I'm going to close this PR, please reopen or resubmit when the kernel has the necessary seccomp-bpf support (see above). |
No description provided.