1
linux/arch/mips
David Daney 484889fc85 MIPS: Avoid clobbering struct pt_regs in kthreads
The resume() implementation octeon_switch.S examines the saved cp0_status
register.  We were clobbering the entire pt_regs structure in kernel
threads leading to random crashes.

When switching away from a kernel thread, the saved cp0_status is examined
and if bit 30 is set it is cleared and the CP2 state saved into the pt_regs
structure.  Since the kernel thread stack overlaid the pt_regs structure
this resulted in a corrupt stack.  When the kthread with the corrupt stack
was resumed, it could crash if it used any of the data in the stack that was
clobbered.

We fix it by moving the kernel thread stack down so it doesn't overlay
pt_regs.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-08-03 17:52:41 +01:00
..
alchemy MIPS: Alchemy: devboards: Convert to gpio calls. 2009-06-17 11:06:29 +01:00
ar7 MIPS: AR7: Remove unused inclusions of <linux/version.h>. 2009-08-03 17:52:41 +01:00
basler/excite
bcm47xx
boot
cavium-octeon MIPS: Reorganize Cavium OCTEON PCI support. 2009-07-03 15:45:29 +01:00
cobalt Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
configs MIPS: Add support for Texas Instruments AR7 System-on-a-Chip 2009-07-03 15:45:23 +01:00
dec MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
emma MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
fw MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
gt64120/wrppmc Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
include/asm MIPS: Avoid clobbering struct pt_regs in kthreads 2009-08-03 17:52:41 +01:00
jazz MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users. 2009-06-24 18:34:39 +01:00
kernel MIPS: Avoid clobbering struct pt_regs in kthreads 2009-08-03 17:52:41 +01:00
lasat cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
lemote/lm2e cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
lib MIPS: Fix __ndelay build error and add 'ull' suffix for 32-bit kernel 2009-06-17 11:06:24 +01:00
math-emu
mipssim MIPS: MIPSsim: Fix unbalance brace in mipssim get_c0_compare_int() 2009-08-03 17:52:41 +01:00
mm MIPS: Drop mmap_sem in pagefault oom path 2009-08-03 17:52:40 +01:00
mti-malta MIPS: CMP: Move gcmp_probe to before the SMP ops 2009-07-03 15:45:26 +01:00
nxp clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
oprofile
pci MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
pmc-sierra MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
power MIPS: Hibernation: Remove SMP TLB and cacheflushing code. 2009-06-24 18:34:39 +01:00
rb532 MIPS: RB532: Check irq number when handling GPIO interrupts 2009-06-17 11:06:27 +01:00
sgi-ip22 MIPS: IP22: Fix hang in power button interrupt handler 2009-05-20 18:53:13 +01:00
sgi-ip27 MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users. 2009-06-24 18:34:39 +01:00
sgi-ip32 MIPS: IP32: Remove unnecessary if not even harmful volatile keywords. 2009-05-22 13:52:06 +01:00
sibyte MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
sni MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users. 2009-06-24 18:34:39 +01:00
txx9 MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
vr41xx Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
Kconfig MIPS: Allow suspend and hibernation again on uniprocessor kernels. 2009-07-03 15:45:28 +01:00
Kconfig.debug
Makefile MIPS: Add support for Texas Instruments AR7 System-on-a-Chip 2009-07-03 15:45:23 +01:00