dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/ppc
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
..
4xx_io [PATCH] remove unused tmp_buf_sem's 2006-01-14 10:41:42 -08:00
8xx_io [PATCH] kfree cleanup: arch 2005-11-07 07:54:06 -08:00
8260_io [PATCH] ppc: fix-up schedule_timeout() usage 2005-11-07 07:53:56 -08:00
amiga [PATCH] m68k: kill mach_floppy_setup, convert to proper __setup() in drivers 2006-01-12 09:09:05 -08:00
boot [PATCH] ppc: Remove powermac support from ARCH=ppc 2006-01-15 17:30:44 +11:00
configs [PATCH] e1000: Added disable packet split capability 2006-01-18 16:17:57 -05:00
kernel powerpc: Fix various syscall/signal/swapcontext bugs 2006-03-08 13:24:22 +11:00
lib ppc32: use L1_CACHE_SHIFT/L1_CACHE_BYTES 2005-10-17 11:50:32 +10:00
math-emu [PATCH] powerpc: Fix handling of fpscr on 64-bit 2005-10-27 20:48:50 +10:00
mm [PATCH] ppc: Remove powermac support from ARCH=ppc 2006-01-15 17:30:44 +11:00
platforms [SERIAL] uart_port flags member should use UPF_* 2006-02-05 10:52:29 +00:00
syslib Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-02-08 15:21:22 -08:00
xmon [PATCH] ppc: fix adb breakage in xmon 2006-02-24 11:36:20 +11:00
Kconfig [PATCH] ppc: Remove powermac support from ARCH=ppc 2006-01-15 17:30:44 +11:00
Kconfig.debug [PATCH] ppc32: mv64x60 updates & enhancements 2005-09-05 00:06:00 -07:00
Makefile kbuild: remove GCC_VERSION 2006-01-08 19:58:51 +01:00