kernel-fxtec-pro1x/arch/powerpc
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
..
boot powerpc/32: Generate miboot images with ARCH=powerpc 2006-01-15 13:00:08 +11:00
configs [PATCH] powerpc: Update {g5,pseries,ppc64}_defconfig 2006-02-24 11:36:35 +11:00
kernel powerpc: Fix various syscall/signal/swapcontext bugs 2006-03-08 13:24:22 +11:00
lib [PATCH] powerpc: Remove lppaca structure from the PACA 2006-01-13 21:17:39 +11:00
mm [PATCH] powerpc/iseries: Fix double phys_to_abs bug in htab_bolt_mapping 2006-02-28 16:25:55 +11:00
oprofile [PATCH] powerpc: disable OProfile for iSeries 2006-02-24 11:36:27 +11:00
platforms powerpc32: Fix timebase synchronization on 32-bit powermacs 2006-03-03 21:31:25 +11:00
sysdev [PATCH] powerpc: Fix some MPIC + HT APIC buglets 2006-02-24 11:36:37 +11:00
xmon [PATCH] powerpc: xmon namespace cleanups 2006-01-12 20:39:14 +11:00
Kconfig Make Kprobes depend on modules 2006-02-26 20:24:40 -08:00
Kconfig.debug [PATCH] powerpc: Make early debugging configurable via Kconfig 2006-01-11 14:48:26 +11:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2006-02-10 14:52:31 -08:00