summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal32.c
Commit message (Collapse)AuthorAgeFilesLines
* MIPS: Cleanup signal code initializationRalf Baechle2009-12-171-0/+24
| | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/709/
* MIPS: CVE-2009-0029: Enable syscall wrappers.Ralf Baechle2009-02-271-14/+14
| | | | | | | Thanks to David Daney helping with debugging and testing. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Daney <ddaney@caviumnetworks.com>
* MIPS: Use compat_sys_ptraceThomas Bogendoerfer2008-10-111-0/+12
| | | | | | | | This replaces mips's sys_ptrace32 with a compat_arch_ptrace and enables the new generic definition of compat_sys_ptrace instead. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fix "no space between function name and open parenthesis" warnings.Ralf Baechle2007-10-111-22/+22
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] remove some duplicate includesJesper Juhl2007-07-311-1/+0
| | | | | | | This patch removes some duplicate includes from arch/mips/ Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] use compat_siginfo in rt_sigframe_n32Pavel Kiryukhin2007-06-261-62/+0
| | | | | Signed-off-by: Pavel Kiryukhin <vksavl@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* header cleaning: don't include smp_lock.h when not usedRandy Dunlap2007-05-081-1/+0
| | | | | | | | | | | | Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [MIPS] Retry {save,restore}_fp_context if failed in atomic context.Atsushi Nemoto2007-04-201-9/+43
| | | | | | | | | | | | | | | The save_fp_context()/restore_fp_context() might sleep on accessing user stack and therefore might lose FPU ownership in middle of them. If these function failed due to "in_atomic" test in do_page_fault, touch the sigcontext area in non-atomic context and retry these save/restore operation. This is a replacement of a (broken) fix which was titled "Allow CpU exception in kernel partially". Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Disallow CpU exception in kernel again.Atsushi Nemoto2007-04-201-5/+5
| | | | | | | | | The commit 4d40bff7110e9e1a97ff8c01bdd6350e9867cc10 ("Allow CpU exception in kernel partially") was broken. The commit was to fix theoretical problem but broke usual case. Revert it for now. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] FPU ownership management & preemption fixesAtsushi Nemoto2007-03-171-17/+12
| | | | | Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Check FCSR for pending interrupts, alternative versionAtsushi Nemoto2007-03-171-3/+24
| | | | | | | | | | | Commit 6d6671066a311703bca1b91645bb1e04cc983387 is incomplete and misses non-r4k CPUs. This patch reverts the commit and fixes in other way. o Do FCSR checking in caller of restore_fp_context. o Send SIGFPE if the signal handler set any FPU exception bits. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] sigset_32 has been made redundand by compat_sigset_t.Ralf Baechle2007-02-201-8/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] signals: Share even more code.Ralf Baechle2007-02-181-107/+11
| | | | | | | native and compat do_signal and handle_signal are identical and can easily be unified. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.Atsushi Nemoto2007-02-181-2/+2
| | | | | | | | | | access_ok in compat-signal.h is wrong (checking destination instead of source) and redundant (already checked before calling this function). Also sf_mask in struct sigframe32 should be compat_sigset_t type. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.Ralf Baechle2007-02-131-4/+7
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] signals: make common _BLOCKABLE macroFranck Bui-Huu2007-02-131-2/+0
| | | | | Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] signal: Fix warnings in o32 compat code.Ralf Baechle2007-02-131-3/+23
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] signal: do not use save_static_function() anymoreFranck Bui-Huu2007-02-101-12/+4
| | | | | | | | | | | | | | This macro was used to save static registers before calling sys_sigsuspend() and sys_sigreturn(). For the sys_sigreturn() case, there's no point to save them since they have been already saved by setup_sigcontext() before calling the signal handler. For the sys_sigsuspend() case, I don't see any reasons... Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] signal32: no need to save c0_status register in setup_sigcontext32()Franck Bui-Huu2007-02-101-1/+0
| | | | | | | | | | | | | | | All the information in the MIPS c0_status register is priviledged. Nothing that would constitute part of the thread context. The one flag one could possibly argument about might be c0_status.fr but none of the ABIs or tools or application software can make use of it. So for consistency with restore_sigcontext32(), which does not restore c0_status register, this patch remove the saving part. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] signal32: reduce {setup,restore}_sigcontext32 sizesFranck Bui-Huu2007-02-101-114/+97
| | | | | | | | This trivial changes should decrease a lot the size of these 2 functions. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] signal: factorize debug codeFranck Bui-Huu2007-02-101-10/+6
| | | | | Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] signal32: remove duplicate codeFranck Bui-Huu2007-02-101-46/+4
| | | | | | | | | | There's no point for signal32.c to redefine get_sigframe(). It should use the one define in signal.c instead. The same stands for install_sigtramp(). Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] signal: clean up sigframe structureFranck Bui-Huu2007-02-101-28/+21
| | | | | | | | | | | This patch makes 'struct sigframe' declaration avalaible for all signals code. It allows signal32 to not have its own declaration. This patch also removes all ICACHE_REFILLS_WORKAROUND_WAR tests in structure declaration and hopefully make them more readable. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Avoid double signal restarting.Ralf Baechle2006-09-271-0/+1
| | | | | | | | | | | | | | | In entry.S resume_userspace ... jal do_notify_resume form a loop through which the kernel will iterate as long as work is pending. If we iterate through this loop more than once with no signal pending for at least one but the last iteration we will take do the syscall restarting multiple times resulting in a syscall return prior to the the syscall instruction in userspace. This may happen when debugging a multithreaded program. Debugging and original fix by Maciej; extended to other ABIs by me. Signed-off-by: Maciej W. Rozycki <macro@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Add missing returns in signal code.Ralf Baechle2006-09-271-0/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Don't call try_to_freeze in do_signal & co.Ralf Baechle2006-09-271-4/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] War on whitespace: cleanup initial spaces followed by tabs.Ralf Baechle2006-03-211-5/+5
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Signal cleanupAtsushi Nemoto2006-03-211-12/+12
| | | | | | | | | Move function prototypes to asm/signal.h to detect trivial errors and add some __user tags to get rid of sparse warnings. Generated code should not be changed. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Reformat all of signal32.c with tabs instead of space for consistencyMartin Michlmayr2006-03-211-6/+6
| | | | | Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Reformat _sys32_rt_sigsuspend with tabs instead of space for consistency.Ralf Baechle2006-02-211-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make do_signal32 return void.Martin Michlmayr2006-02-211-5/+3
| | | | | | | | do_signal has been changed to return void since the "return value is ignored everywhere". Convert do_signal32 accordingly. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Add support for TIF_RESTORE_SIGMASK for signal32Martin Michlmayr2006-02-211-27/+41
| | | | | | | | | | Following the recent implementation of TIF_RESTORE_SIGMASK in arch/mips/kernel/signal.c, 64-bit kernels with 32-bit user-land compatibility oops when starting init. signal32.c needs to be converted to use TIF_RESTORE_SIGMASK too. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fix typo in _sys32_rt_sigreturn and _sysn32_rt_sigreturn.Atsushi Nemoto2006-02-141-1/+1
| | | | | Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Add support for TIF_RESTORE_SIGMASK.Ralf Baechle2006-02-081-4/+4
| | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org> ---
* [MIPS] Fix minor sparse warningsAtsushi Nemoto2006-02-071-1/+1
| | | | | Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Sparse: Add some __user tags to signal functions.Atsushi Nemoto2006-02-071-27/+30
| | | | | Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: DSP: Put DSPcontrol register into the right place in the signal frame.Ralf Baechle2006-01-101-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Avoid duplicate do_syscall_trace calls on return from sigreturn.Ralf Baechle2005-12-011-2/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Fix return type of setup_frame variantsAtsushi Nemoto2005-11-071-5/+8
| | | | | | | | Since 2.6.13-rc1 setup_frame and its variants return int. But some bits were missed in the conversion. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Setup_frame is now returning a success value.Ralf Baechle2005-10-291-7/+9
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Redo RM9000 workaround which along with other DSP ASE changes wasRalf Baechle2005-10-291-0/+16
| | | | | | causing some headache for debuggers knowing about signal frames. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Support the MIPS32 / MIPS64 DSP ASE.Ralf Baechle2005-10-291-9/+25
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* We pass a kernel pointer to do_sigaltstack in sys32_sigaltstack, soRalf Baechle2005-10-291-0/+4
| | | | | | we need to do the set_fs(KERNEL_DS) thing around this call. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Use compat_sigval_t in struct compat_siginfo.Ralf Baechle2005-10-291-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Gcc 4.0 fixes.Ralf Baechle2005-10-291-4/+6
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Update to match the native siginfo structure and code.Ralf Baechle2005-10-291-2/+9
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Implement 32-bit compatibility for waitid(2).Ralf Baechle2005-10-291-0/+27
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [PATCH] mips: nuke trailing whitespaceRalf Baechle2005-09-051-1/+1
| | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] convert signal handling of NODEFER to act like other Unix boxes.Steven Rostedt2005-08-291-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been reported that the way Linux handles NODEFER for signals is not consistent with the way other Unix boxes handle it. I've written a program to test the behavior of how this flag affects signals and had several reports from people who ran this on various Unix boxes, confirming that Linux seems to be unique on the way this is handled. The way NODEFER affects signals on other Unix boxes is as follows: 1) If NODEFER is set, other signals in sa_mask are still blocked. 2) If NODEFER is set and the signal is in sa_mask, then the signal is still blocked. (Note: this is the behavior of all tested but Linux _and_ NetBSD 2.0 *). The way NODEFER affects signals on Linux: 1) If NODEFER is set, other signals are _not_ blocked regardless of sa_mask (Even NetBSD doesn't do this). 2) If NODEFER is set and the signal is in sa_mask, then the signal being handled is not blocked. The patch converts signal handling in all current Linux architectures to the way most Unix boxes work. Unix boxes that were tested: DU4, AIX 5.2, Irix 6.5, NetBSD 2.0, SFU 3.5 on WinXP, AIX 5.3, Mac OSX, and of course Linux 2.6.13-rcX. * NetBSD was the only other Unix to behave like Linux on point #2. The main concern was brought up by point #1 which even NetBSD isn't like Linux. So with this patch, we leave NetBSD as the lonely one that behaves differently here with #2. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] try_to_freeze() call fixesNigel Cunningham2005-07-271-1/+1
| | | | | | | | | Here are fixes for four try_to_freeze calls that are still (incorrectly) using a parameter after the recent try_to_freeze() changes. Signed-off-by: Nigel Cunningham <nigel@suspend2.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
OpenPOWER on IntegriCloud