Re: [PATCH 3.5 1/2] seccomp: Make syscall skipping and nr changesmore consistent

From: Andy Lutomirski
Date: Thu Jul 26 2012 - 11:44:06 EST


On Tue, Jul 17, 2012 at 4:19 PM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
> This fixes two issues that could cause incompatibility between
> kernel versions:
>
> - If a tracer uses SECCOMP_RET_TRACE to select a syscall number
> higher than the largest known syscall, emulate the unknown
> vsyscall by returning -ENOSYS. (This is unlikely to make a
> noticeable difference on x86-64 due to the way the system call
> entry works.)
>
> - On x86-64 with vsyscall=emulate, skipped vsyscalls were buggy.
>
> This updates the documentation accordingly.
>
> Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
> Cc: Will Drewry <wad@xxxxxxxxxxxx>
> ---
> Documentation/prctl/seccomp_filter.txt | 74 ++++++++++++++++++++--
> arch/x86/kernel/vsyscall_64.c | 110 +++++++++++++++++---------------
> kernel/seccomp.c | 13 +++-
> 3 files changed, 137 insertions(+), 60 deletions(-)

This is still necessary for vsyscall emulation to play nicely with
fancy seccomp tricks. Can any of you (James?) send it toward Linus?

We might want to tag this for -stable as well if it survives in the
3.6 tree for a while.

--Andy
--
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/