Skip to content

Commit

Permalink
MIPS: compat: Implement is_compat_task.
Browse files Browse the repository at this point in the history
This is a build fix required after "x86-64: seccomp: fix 32/64 syscall
hole" (commit 5b10174).  MIPS doesn't
have the issue that was fixed for x86-64 by that patch.

This also doesn't solve the N32 issue which is that N32 seccomp processes
will be treated as non-compat processes thus only have access to N64
syscalls.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Ralf Baechle authored and Linus Torvalds committed Mar 8, 2009
1 parent 559595a commit 4302e5d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/mips/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
/*
* Architecture specific compatibility types
*/
#include <linux/seccomp.h>
#include <linux/thread_info.h>
#include <linux/types.h>
#include <asm/page.h>
#include <asm/ptrace.h>
Expand Down Expand Up @@ -218,4 +220,9 @@ struct compat_shmid64_ds {
compat_ulong_t __unused2;
};

static inline int is_compat_task(void)
{
return test_thread_flag(TIF_32BIT);
}

#endif /* _ASM_COMPAT_H */

0 comments on commit 4302e5d

Please sign in to comment.