alistair23-linux/arch
Chris Metcalf 81711cee93 arch/tile: handle rt_sigreturn() more cleanly
The current tile rt_sigreturn() syscall pattern uses the common idiom
of loading up pt_regs with all the saved registers from the time of
the signal, then anticipating the fact that we will clobber the ABI
"return value" register (r0) as we return from the syscall by setting
the rt_sigreturn return value to whatever random value was in the pt_regs
for r0.

However, this breaks in our 64-bit kernel when running "compat" tasks,
since we always sign-extend the "return value" register to properly
handle returned pointers that are in the upper 2GB of the 32-bit compat
address space.  Doing this to the sigreturn path then causes occasional
random corruption of the 64-bit r0 register.

Instead, we stop doing the crazy "load the return-value register"
hack in sigreturn.  We already have some sigreturn-specific assembly
code that we use to pass the pt_regs pointer to C code.  We extend that
code to also set the link register to point to a spot a few instructions
after the usual syscall return address so we don't clobber the saved r0.
Now it no longer matters what the rt_sigreturn syscall returns, and the
pt_regs structure can be cleanly and completely reloaded.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2010-12-17 16:59:29 -05:00
..
alpha
arm Merge branch 'fixes/2637-rc5/s3c24xx' of git://git.fluff.org/bjdooks/linux 2010-12-07 17:13:50 -08:00
avr32
blackfin BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
cris
frv BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
h8300 BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
ia64 SCSI host lock push-down 2010-11-16 13:33:23 -08:00
m32r
m68k BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
m68knommu BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
microblaze
mips Merge git://git.infradead.org/mtd-2.6 2010-10-30 08:31:35 -07:00
mn10300 MN10300: Fix interrupt mask alteration function call name in gdbstub 2010-12-07 11:29:14 -08:00
parisc parisc: convert the rest of the irq handlers to simple/percpu 2010-12-04 11:15:19 -05:00
powerpc powerpc: Use call_rcu_sched() for pagetables 2010-11-30 10:42:20 +11:00
s390 [S390] nohz/s390: fix arch_needs_cpu() return value on offline cpus 2010-12-01 10:08:17 +01:00
score
sh Merge branch 'sh/urgent' into sh-fixes-for-linus 2010-12-03 14:42:29 +09:00
sparc BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
tile arch/tile: handle rt_sigreturn() more cleanly 2010-12-17 16:59:29 -05:00
um uml: disable winch irq before freeing handler data 2010-11-25 06:50:39 +09:00
x86 Merge branches 'x86-fixes-for-linus', 'perf-fixes-for-linus' and 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-12-08 06:40:59 -08:00
xtensa
.gitignore
Kconfig