Conversation
This patch adds seccomp support to the riscv64 architecture. seccomp support is available in the riscv64 kernel since version 5.5, and it has just been added to the libseccomp library. riscv64 uses generic syscalls like aarch64, so I used that architecture as a reference to find which code has to be modified. With this patch, the testsuite passes successfully, including the test-seccomp test. The system boots and works fine with kernel 5.4 (i.e. without seccomp support) and kernel 5.5 (i.e. with seccomp support). I have also verified that the "SystemCallFilter=~socket" option prevents a service to use the ping utility when running on kernel 5.5.
|
semaphoreci: azure and centos ci fail similarly. |
|
This needs the above commit in libseccomp. Afaics there is no official release yet of libseccomp with that commit though (in Debian it was cherry-picked). |
|
If this is too be merged anytime soon, it'll have to be amended to not break with older libseccomp and kernels. |
|
@aurel32 ^ |
|
Let's postpone this until we have a libseccomp upstream release support riscv64. I hope it's ok to leave this PR open. |
|
where are we with this? |
|
so an uptsream libseccomp version has long been released. Either way this patch requires some ifdeffery so that we don't use the definition if it isn't there. We have similar ifdeffery for PARISC, it's not difficult to add to RISCV too. Dropping the "postponed" flag, since it's not really about that anymore. The patch just needs some ifdeffery now. |
|
/cc @aurel32 |
|
It appears that support for PARISC is limited to |
|
I have just done that there: aurel32@f81ee95 As I am not the creator of this PR, not sure how to continue further. Should I just create a new one? |
|
Yes, please create a new PR. |
Done, it's PR #16807. Please close this one. |
This patch adds seccomp support to the riscv64 architecture. seccomp
support is available in the riscv64 kernel since version 5.5, and it
has just been added to the libseccomp library.
riscv64 uses generic syscalls like aarch64, so I used that architecture
as a reference to find which code has to be modified.
With this patch, the testsuite passes successfully, including the
test-seccomp test. The system boots and works fine with kernel 5.4 (i.e.
without seccomp support) and kernel 5.5 (i.e. with seccomp support). I
have also verified that the "SystemCallFilter=~socket" option prevents a
service to use the ping utility when running on kernel 5.5.
Patch courtesy of Aurelien Jarno [email protected]