linux/arch
Paul Mackerras 1bd79336a4 powerpc: Fix various syscall/signal/swapcontext bugs
A careful reading of the recent changes to the system call entry/exit
paths revealed several problems, plus some things that could be
simplified and improved:

* 32-bit wasn't testing the _TIF_NOERROR bit in the syscall fast exit
  path, so it was only doing anything with it once it saw some other
  bit being set.  In other words, the noerror behaviour would apply to
  the next system call where we had to reschedule or deliver a signal,
  which is not necessarily the current system call.

* 32-bit wasn't doing the call to ptrace_notify in the syscall exit
  path when the _TIF_SINGLESTEP bit was set.

* _TIF_RESTOREALL was in both _TIF_USER_WORK_MASK and
  _TIF_PERSYSCALL_MASK, which is odd since _TIF_RESTOREALL is only set
  by system calls.  I took it out of _TIF_USER_WORK_MASK.

* On 64-bit, _TIF_RESTOREALL wasn't causing the non-volatile registers
  to be restored (unless perhaps a signal was delivered or the syscall
  was traced or single-stepped).  Thus the non-volatile registers
  weren't restored on exit from a signal handler.  We probably got
  away with it mostly because signal handlers written in C wouldn't
  alter the non-volatile registers.

* On 32-bit I simplified the code and made it more like 64-bit by
  making the syscall exit path jump to ret_from_except to handle
  preemption and signal delivery.

* 32-bit was calling do_signal unnecessarily when _TIF_RESTOREALL was
  set - but I think because of that 32-bit was actually restoring the
  non-volatile registers on exit from a signal handler.

* I changed the order of enabling interrupts and saving the
  non-volatile registers before calling do_syscall_trace_leave; now we
  enable interrupts first.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-03-08 13:24:22 +11:00
..
alpha [PATCH] alpha: set cpu_possible_map much earlier 2006-02-08 07:57:37 -08:00
arm [ARM] 3348/1: Disable GPIO interrupts 2006-02-24 22:27:50 +00:00
arm26 [PATCH] arm26: select BLK_DEV_FD only on A5K 2006-02-01 08:53:22 -08:00
cris [PATCH] fallout from ptrace consolidation patch: cris/arch-v10 2006-02-07 20:57:19 -05:00
frv [PATCH] FRV: Use virtual interrupt disablement 2006-02-14 16:09:35 -08:00
h8300 [PATCH] H8/300: CONFIG_CONFIG_ doesn't fly. 2006-02-20 20:04:19 -08:00
i386 [PATCH] x86 microcode driver vs hotplug CPUs. 2006-02-28 20:53:43 -08:00
ia64 [IA64] sysctl option to silence unaligned trap warnings 2006-02-28 09:42:23 -08:00
m32r [PATCH] m32r: fix and update for gcc-4.0 2006-02-24 14:31:36 -08:00
m68k [PATCH] m68k: pm_power_off() breakage 2006-02-18 16:30:20 -05:00
m68knommu [PATCH] hrtimer: round up relative start time on low-res arches 2006-02-14 16:09:35 -08:00
mips [MIPS] Use USECS_PER_SEC / HZ instead of tick_usec in do_gettimeofday. 2006-03-01 19:22:22 +00:00
parisc [PATCH] hrtimer: round up relative start time on low-res arches 2006-02-14 16:09:35 -08:00
powerpc powerpc: Fix various syscall/signal/swapcontext bugs 2006-03-08 13:24:22 +11:00
ppc powerpc: Fix various syscall/signal/swapcontext bugs 2006-03-08 13:24:22 +11:00
s390 [PATCH] flags parameter for linkat 2006-02-24 14:31:39 -08:00
sh [PATCH] arch/sh/Kconfig: fix the ISA_DMA_API dependencies 2006-02-17 13:59:26 -08:00
sh64 [PATCH] drive_info removal outside of arch/i386 2006-02-07 20:56:47 -05:00
sparc [SPARC]: sys_newfstatat --> sys_fstatat64 2006-02-12 23:30:11 -08:00
sparc64 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2006-02-26 20:27:11 -08:00
um [PATCH] uml: tidying COW code 2006-02-24 14:31:37 -08:00
v850 [PATCH] hrtimer: round up relative start time on low-res arches 2006-02-14 16:09:35 -08:00
x86_64 Revert "[PATCH] x86_64: Only do the clustered systems have unsynchronized TSC assumption on IBM systems" 2006-02-27 20:41:56 -08:00
xtensa [PATCH] Fix some ucLinux breakage from the tty updates 2006-02-03 08:32:04 -08:00