lkml.org 
[lkml]   [2009]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] x86-64: seccomp: fix 32/64 syscall hole


On Fri, 27 Feb 2009, Roland McGrath wrote:
> --- a/arch/x86/include/asm/seccomp_64.h
> +++ b/arch/x86/include/asm/seccomp_64.h
> +/*
> + * This indicates we are inside a 32-bit system call (only testable
> + * synchronously by current), whereas TIF_IA32 indicates we are a 32-bit
> + * task. A 32-bit task can make a 64-bit syscall by ljmp into 64-bit
> + * USER_CS, and a 64-bit task can make a 32-bit syscall by int $0x80.
> + */
> +#define IS_COMPAT_TASK is_compat_task()
> +
> --- a/kernel/seccomp.c
> +++ b/kernel/seccomp.c
> +#if defined TIF_32BIT && !defined IS_COMPAT_TASK
> +# define IS_COMPAT_TASK test_thread_flag(TIF_32BIT)
> +#endif
> +
> +#ifdef IS_COMPAT_TASK

Ok, please explain this madness.

The whole crazy IS_COMPAT_TASK dance seems to be too messy for words. Why?
What's going on?

Linus


\
 
 \ /
  Last update: 2009-02-28 04:39    [W:0.742 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site