Re: [PATCH RFC 0/1] UAPI,x86: export syscall numbers for all x86 archs

From: David Drysdale
Date: Tue Jul 28 2015 - 11:32:40 EST


On Tue, Jul 28, 2015 at 1:20 PM, Paul Moore <paul@xxxxxxxxxxxxxx> wrote:
> On Tue, Jul 28, 2015 at 4:05 AM, David Drysdale <drysdale@xxxxxxxxxx> wrote:
>> A while ago I was trying to build a seccomp-bpf filter program that would
>> survive a change of x86 architecture. This was complicated for all sorts of
>> reasons, but one of the problems was that the different syscall numbers aren't
>> all available at the same time -- hence this patch.
>
> Or just use libseccomp and let it take care of all the different ABI
> specific warts for you. The library handles the undefined syscalls
> you describe, but also multiplexed syscalls (e.g. socket related
> syscalls on x86) and proper invalid arch/ABI filtering

Ah, I hadn't realized that libseccomp handled cross-architecture
stuff and the socketcall multiplexing -- very neat. I'll look into whether
I can convert my stuff to use it.

I still think exporting all the sub-arch syscall numbers is a good idea
though (even if my need for it is potentially reduced by libseccomp)...

> (you are
> filtering x32 correctly on x86-64 right?).

Yep, I think so, but it's fiddly. If I can leave the fiddliness
to libseccomp, so much the better...

Thanks for the pointer,
David

> * https://github.com/seccomp/libseccomp
>
> --
> paul moore
> www.paul-moore.com
--
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/