Skip to content

Commit

Permalink
seccomp: Check if syscall is supported on compat architecture.
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Jenster <r.jenster@drachenfels.de>
  • Loading branch information
r10r committed Oct 13, 2020
1 parent 11d123b commit fbec5f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lxc/seccomp.c
Expand Up @@ -531,6 +531,11 @@ static bool do_resolve_add_rule(uint32_t arch, char *line, scmp_filter_ctx ctx,
return true;
}

if (arch != SCMP_ARCH_NATIVE && seccomp_syscall_resolve_name_arch(arch, line) < 0) {
INFO("The syscall \"%s\" nr:%d is not supported on compat arch:%d", line, nr, arch);
return true;
}

memset(&arg_cmp, 0, sizeof(arg_cmp));
for (i = 0; i < rule->args_num; i++) {
INFO("arg_cmp[%d]: SCMP_CMP(%u, %llu, %llu, %llu)", i,
Expand Down

0 comments on commit fbec5f8

Please sign in to comment.