diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-07-25 17:19:33 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-07-31 22:35:21 +0200 |
commit | 293c5bd13f124c325f74f89ad26edf5612ce7235 (patch) | |
tree | 6de7ce919a10c58e29093776c02e61d7127ed12b /arch/mips/kernel/syscall.c | |
parent | [MIPS] tx49xx: Add mach specific headers (diff) | |
download | linux-293c5bd13f124c325f74f89ad26edf5612ce7235.tar.xz linux-293c5bd13f124c325f74f89ad26edf5612ce7235.zip |
[MIPS] Fixup secure computing stuff.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/syscall.c')
-rw-r--r-- | arch/mips/kernel/syscall.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 541b5005957e..7c800ec3ff55 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -281,16 +281,24 @@ asmlinkage int sys_set_thread_area(unsigned long addr) asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) { - int tmp; - - switch(cmd) { + switch (cmd) { case MIPS_ATOMIC_SET: printk(KERN_CRIT "How did I get here?\n"); return -EINVAL; case MIPS_FIXADE: - tmp = current->thread.mflags & ~3; - current->thread.mflags = tmp | (arg1 & 3); + if (arg1 & ~3) + return -EINVAL; + + if (arg1 & 1) + set_thread_flag(TIF_FIXADE); + else + clear_thread_flag(TIF_FIXADE); + if (arg1 & 2) + set_thread_flag(TIF_LOGADE); + else + clear_thread_flag(TIF_FIXADE); + return 0; case FLUSH_CACHE: |