Re: [PATCH v5 2/3] seccomp_filters: system call filtering using BPF

From: Will Drewry
Date: Mon Jan 30 2012 - 17:42:14 EST


On Mon, Jan 30, 2012 at 4:29 PM, Andrew Lutomirski <luto@xxxxxxx> wrote:
> [not quoting anything because this is a more general question]
>
> How portable across architectures is this supposed to be?  At least
> syscall numbering varies widely, and calling conventions can be
> different (x86_64 has four of them, for example).  For all I know,
> argument order might be different in some cases.

>From my perspective, the raw filter ABI shouldn't strive to be
arch-independent. However, it'd be really nice to minimize the user
pain, but I don't know that there is any guarantee that any given
syscall will exist on all arches nor that it will treat its arguments
the same way.

Since glibc already does mapping of syscall args and numbers, we know
that userspace can fill in any arch-specific gaps, but it is nice if
the filters "just work" for the majority of cases if __NR_* defines
are used.

cheers!
will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/