History log of /arch/cris/arch-v10/kernel/signal.c
Revision Date Author Comments
8215ade82d699be33a2fa545bceca29c95fcfa47 05-Mar-2014 Richard Weinberger <richard@nod.at> cris: Use sigsp()

Use sigsp() instead of the open coded variant.

Signed-off-by: Richard Weinberger <richard@nod.at>
fa0197722eb7559a6a9733881bbb8d9e76364f33 07-Oct-2013 Richard Weinberger <richard@nod.at> cris: Use get_signal() signal_setup_done()

Use the more generic functions get_signal() signal_setup_done()
for signal delivery.

Signed-off-by: Richard Weinberger <richard@nod.at>
e6a6d210e0c2ad95047e2922394fb6e73bf438ab 27-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> cris: kill weird arguments of sys_{rt_,}sigreturn()

It's cheaper to call current_pt_regs() than bother fetching the damn
thing from stack.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
eb2f256682e5af4b890d1f3cce4a4d4b62ffa655 26-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> cris: switch to generic old sigaction()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
86df89a0845a80aa765f3e5e0da43fdf9287029f 25-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> cris: switch to generic old sigsuspend

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9df794d9275d41012909aaff3cab759e37871974 23-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> cris: don't leave ->uc_stack unitialized - we'll use its contents on sigreturn

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
d970e42897525adc836207b44ef64347e59d613e 23-Dec-2012 Al Viro <viro@zeniv.linux.org.uk> cris: switch to generic sigaltstack

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
efee984c27b67e3ebef40410f35671997441b57c 28-Apr-2012 Al Viro <viro@zeniv.linux.org.uk> new helper: signal_delivered()

Does block_sigmask() + tracehook_signal_handler(); called when
sigframe has been successfully built. All architectures converted
to it; block_sigmask() itself is gone now (merged into this one).

I'm still not too happy with the signature, but that's a separate
story (IMO we need a structure that would contain signal number +
siginfo + k_sigaction, so that get_signal_to_deliver() would fill one,
signal_delivered(), handle_signal() and probably setup...frame() -
take one).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
77097ae503b170120ab66dd1d547f8577193f91f 27-Apr-2012 Al Viro <viro@zeniv.linux.org.uk> most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set

Only 3 out of 63 do not. Renamed the current variant to __set_current_blocked(),
added set_current_blocked() that will exclude unblockable signals, switched
open-coded instances to it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
a610d6e672d6d3723e8da257ad4a8a288a8f2f89 22-May-2012 Al Viro <viro@zeniv.linux.org.uk> pull clearing RESTORE_SIGMASK into block_sigmask()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
b7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14 02-May-2012 Al Viro <viro@zeniv.linux.org.uk> new helper: sigmask_to_save()

replace boilerplate "should we use ->saved_sigmask or ->blocked?"
with calls of obvious inlined helper...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
51a7b448d4134e3e8eec633435e3e8faee14a828 22-May-2012 Al Viro <viro@zeniv.linux.org.uk> new helper: restore_saved_sigmask()

first fruits of ..._restore_sigmask() helpers: now we can take
boilerplate "signal didn't have a handler, clear RESTORE_SIGMASK
and restore the blocked mask from ->saved_mask" into a common
helper. Open-coded instances switched...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
24d696a776e27268a52cb4ff1060337f409d5789 22-Apr-2012 Al Viro <viro@zeniv.linux.org.uk> cris: missing checks of __get_user()/__put_user() return values

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
f3b5e822739c70663aee8584b7993afe055431c9 11-May-2012 Matt Fleming <matt.fleming@intel.com> cris: use set_current_blocked() and block_sigmask()

As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures. In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Mikael Starvik <starvik@axis.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
68f3f16d9ad0f1e28ab3fd0001ab5798c41f15a3 22-May-2012 Al Viro <viro@zeniv.linux.org.uk> new helper: sigsuspend()

guts of saved_sigmask-based sigsuspend/rt_sigsuspend. Takes
kernel sigset_t *.

Open-coded instances replaced with calling it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
b1a154dbf9ddbf396578642299ce75aa73d01763 28-Mar-2012 David Howells <dhowells@redhat.com> Disintegrate asm/system.h for CRIS

Disintegrate asm/system.h for CRIS.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
cc: linux-cris-kernel@axis.com
33dc0ad78a961dfbbb2fb65fd9df3b66ba119f57 21-Mar-2011 Jesper Nilsson <jespern@axis.com> Correct auto-restart of syscalls via restartblock

This would for example be poll(2)

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
a4858d4dab4580ec8b1fb7576f91522b6962502c 14-Jan-2008 Jesper Nilsson <jesper.nilsson@axis.com> CRIS v10: correct do_signal to fix oops and clean up signal handling in general

This fixes a kernel panic on boot due to do_signal not being compatible
with it's callers.

- do_signal now returns void, and does not have the previous signal set
as a parameter.
- Remove sys_rt_sigsuspend, we can use the common one instead.
- Change sys_sigsuspend to be more like x86, don't call do_signal here.
- handle_signal, setup_frame and setup_rt_frame now return -EFAULT
if we've delivered a segfault, which is used by callers to perform
necessary cleanup.
- Break long lines, correct whitespace and formatting errors.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
e63340ae6b6205fef26b40a75673d1c9c0c8bb90 08-May-2007 Randy Dunlap <randy.dunlap@oracle.com> header cleaning: don't include smp_lock.h when not used

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>
d9b5444eeb3a663ca4a625878b1421c9e9b18e8b 07-Nov-2005 Adrian Bunk <bunk@stusta.de> [PATCH] cris: "extern inline" -> "static inline"

"extern inline" doesn't make much sense.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
69be8f189653cd81aae5a74e26615b12871bb72e 29-Aug-2005 Steven Rostedt <rostedt@goodmis.org> [PATCH] convert signal handling of NODEFER to act like other Unix boxes.

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>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!