Skip to content

Commit 2abaabf

Browse files
seccomp: add missing syscall to tests whitelist
In the seccomp tests the action for non-whitelisted syscalls is SeccompAction::Errno. With the updated version of Rust a new syscall is called when running the tests (SYS_futex). Because we are returning an error for non-whitelisted syscalls, the tests were hanging as the futex would never be executed successfuly. Added SYS_futex to the syscall list. Signed-off-by: Andreea Florescu <[email protected]>
1 parent 8412d6f commit 2abaabf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

seccomp/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,6 @@ impl SeccompFilter {
950950
filter: bpf_filter.as_ptr(),
951951
};
952952
let bpf_prog_ptr = &bpf_prog as *const sock_fprog;
953-
954953
{
955954
let rc = libc::prctl(
956955
libc::PR_SET_SECCOMP,
@@ -1152,12 +1151,13 @@ mod tests {
11521151
const KVM_GET_PIT2_MSB: u64 = 0x0000_ae9f;
11531152
const KVM_GET_PIT2_LSB: u64 = 0x8070_0000;
11541153

1155-
const EXTRA_SYSCALLS: [i64; 5] = [
1154+
const EXTRA_SYSCALLS: [i64; 6] = [
11561155
libc::SYS_rt_sigprocmask,
11571156
libc::SYS_sigaltstack,
11581157
libc::SYS_munmap,
11591158
libc::SYS_exit,
11601159
libc::SYS_rt_sigreturn,
1160+
libc::SYS_futex,
11611161
];
11621162

11631163
fn validate_seccomp_filter(

0 commit comments

Comments
 (0)