kernel-fxtec-pro1x/arch/ppc/kernel
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
..
asm-offsets.c powerpc: Fix various syscall/signal/swapcontext bugs 2006-03-08 13:24:22 +11:00
cpu_setup_6xx.S ppc32: use L1_CACHE_SHIFT/L1_CACHE_BYTES 2005-10-17 11:50:32 +10:00
cpu_setup_power4.S ppc32: use L1_CACHE_SHIFT/L1_CACHE_BYTES 2005-10-17 11:50:32 +10:00
dma-mapping.c [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
entry.S powerpc: Fix various syscall/signal/swapcontext bugs 2006-03-08 13:24:22 +11:00
head.S [PATCH] powerpc: fix altivec_unavailable_exception Oopses 2006-02-24 11:36:23 +11:00
head_4xx.S [PATCH] ppc32: replace use of _GLOBAL with .globl for ppc32 2005-10-20 09:43:34 +10:00
head_8xx.S [PATCH] powerpc/8xx: last two 8MB D-TLB entries are incorrectly set 2006-02-07 21:28:37 +11:00
head_44x.S [PATCH] ppc32: Allow ERPN for early serial to depend on CPU type 2005-11-07 07:53:26 -08:00
head_booke.h [PATCH] ppc32: fix ppc44x fpu build 2005-11-10 11:24:06 +11:00
head_fsl_booke.S [PATCH] Update email address for Kumar 2005-11-13 18:14:10 -08:00
idle.c [PATCH] arch/ppc/kernel/idle.c: don't declare cpu variable in non-SMP kernels 2006-01-06 08:33:30 -08:00
idle_6xx.S kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h support 2005-09-09 20:57:26 +02:00
idle_power4.S kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h support 2005-09-09 20:57:26 +02:00
l2cr.S ppc32: use L1_CACHE_SHIFT/L1_CACHE_BYTES 2005-10-17 11:50:32 +10:00
machine_kexec.c [PATCH] kdump: dynamic per cpu allocation of memory for saving cpu registers 2006-01-10 08:01:26 -08:00
Makefile powerpc/32: Restore previous version of 32-bit PCI code 2006-01-15 22:05:47 +11:00
misc.S ppc: Use the system call table from arch/powerpc/kernel/systbl.S 2006-02-10 16:02:20 +11:00
module.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci.c [PATCH] ppc: Remove powermac support from ARCH=ppc 2006-01-15 17:30:44 +11:00
perfmon_fsl_booke.c [PATCH] powerpc: Merge ppc64 pmc.[ch] with ppc32 perfmon.[ch] 2005-10-20 16:22:24 +10:00
ppc-stub.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ppc_htab.c [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
ppc_ksyms.c [PATCH] powerpc: remove duplicate exports 2006-02-20 10:44:31 +11:00
relocate_kernel.S [PATCH] ppc32: use correct register names in arch/ppc/kernel/relocate_kernel.S 2005-06-30 08:45:09 -07:00
rio.c [PATCH] RapidIO support: ppc32 2005-11-07 07:53:47 -08:00
semaphore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup.c [PATCH] ppc: Remove powermac support from ARCH=ppc 2006-01-15 17:30:44 +11:00
smp-tbsync.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
smp.c [PATCH] powerpc: task_thread_info() 2006-01-12 09:08:57 -08:00
softemu8xx.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
swsusp.S kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h support 2005-09-09 20:57:26 +02:00
temp.c [PATCH] ppc32: remove use of asm/segment.h 2005-09-13 08:22:28 -07:00
time.c Merge ../linux-2.6 by hand 2005-10-31 13:37:12 +11:00
traps.c [PATCH] ppc: Remove powermac support from ARCH=ppc 2006-01-15 17:30:44 +11:00
vmlinux.lds.S [PATCH] powerpc: Remove section free() and linker script bits 2005-09-19 09:38:49 +10:00