linux/arch/arc/include/asm
Vineet Gupta 55bb9480f9 ARC: [Review] Prevent incorrect syscall restarts
Per Al Viro's "signals for dummies" https://lkml.org/lkml/2012/12/6/366
there are 3 golden rules for (not) restarting syscalls:

"	What we need to guarantee is
* restarts do not happen on signals caught in interrupts or exceptions
* restarts do not happen on signals caught in sigreturn()
* restart should happen only once, even if we get through do_signal()
  many times."

ARC Port already handled #1, this patch fixes #2 and #3.

We use the additional state in pt_regs->orig_r8 to ckh if restarting
has already been done once.

Thanks to Al Viro for spotting this.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
2013-02-15 23:15:50 +05:30
..
arcregs.h ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
asm-offsets.h
atomic.h ARC: Atomic/bitops/cmpxchg/barriers 2013-02-11 20:00:30 +05:30
barrier.h ARC: Atomic/bitops/cmpxchg/barriers 2013-02-11 20:00:30 +05:30
bitops.h ARC: Atomic/bitops/cmpxchg/barriers 2013-02-11 20:00:30 +05:30
bug.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
byteorder.h ARC: Checksum/byteorder/swab routines 2013-02-11 20:00:34 +05:30
cache.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
checksum.h ARC: Checksum/byteorder/swab routines 2013-02-11 20:00:34 +05:30
clk.h ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
cmpxchg.h ARC: Atomic/bitops/cmpxchg/barriers 2013-02-11 20:00:30 +05:30
delay.h ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
elf.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
entry.h ARC: [Review] Preparing to fix incorrect syscall restarts due to signals 2013-02-15 23:15:49 +05:30
exec.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
irq.h ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
irqflags.h ARC: irqflags - Interrupt enabling/disabling at in-core intc 2013-02-11 20:00:30 +05:30
Kbuild ARC: Build system: Makefiles, Kconfig, Linker script 2013-02-11 20:00:25 +05:30
kdebug.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
linkage.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
module.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
mutex.h ARC: Spinlock/rwlock/mutex primitives 2013-02-11 20:00:35 +05:30
page.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
processor.h ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
ptrace.h ARC: [Review] Prevent incorrect syscall restarts 2013-02-15 23:15:50 +05:30
sections.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
segment.h ARC: uaccess friends 2013-02-11 20:00:31 +05:30
sigcontext.h ARC: Signal handling 2013-02-15 23:03:30 +05:30
signal.h ARC: Signal handling 2013-02-15 23:03:30 +05:30
smp.h ARC: Atomic/bitops/cmpxchg/barriers 2013-02-11 20:00:30 +05:30
spinlock_types.h ARC: Spinlock/rwlock/mutex primitives 2013-02-11 20:00:35 +05:30
spinlock.h ARC: Spinlock/rwlock/mutex primitives 2013-02-11 20:00:35 +05:30
string.h ARC: String library 2013-02-11 20:00:35 +05:30
swab.h ARC: Checksum/byteorder/swab routines 2013-02-11 20:00:34 +05:30
switch_to.h ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
syscall.h ARC: Syscall support (no-legacy-syscall ABI) 2013-02-11 20:00:38 +05:30
syscalls.h ARC: Syscall support (no-legacy-syscall ABI) 2013-02-11 20:00:38 +05:30
thread_info.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
timex.h ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
uaccess.h ARC: [optim] uaccess __{get,put}_user() optimised 2013-02-11 20:00:32 +05:30
unistd.h ARC: Syscall support (no-legacy-syscall ABI) 2013-02-11 20:00:38 +05:30