android_kernel_google_msm/arch/powerpc/kernel
Anton Blanchard b1873077c5 powerpc: do_notify_resume can be called with bad thread_info flags argument
commit 808be31426 upstream.

Back in 7230c56441 ("powerpc: Rework lazy-interrupt handling") we
added a call out to restore_interrupts() (written in c) before calling
do_notify_resume:

        bl      restore_interrupts
        addi    r3,r1,STACK_FRAME_OVERHEAD
        bl      do_notify_resume

Unfortunately do_notify_resume takes two arguments, the second one
being the thread_info flags:

void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)

We do populate r4 (the second argument) earlier, but
restore_interrupts() is free to muck it up all it wants. My guess is
the gcc compiler gods shone down on us and its register allocator
never used r4. Sometimes, rarely, luck is on our side.

LLVM on the other hand did trample r4.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-02-02 17:05:10 +08:00
..
vdso32
vdso64
.gitignore
align.c powerpc: Handle unaligned ldbrx/stdbrx 2013-09-26 17:15:30 -07:00
asm-offsets.c powerpc: Restore correct DSCR in context switch 2012-09-14 10:00:22 -07:00
audit.c
btext.c
cacheinfo.c powerpc: Make sure "cache" directory is removed when offlining cpu 2014-02-06 11:05:48 -08:00
cacheinfo.h
clock.c
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_a2.S
cpu_setup_fsl_booke.S
cpu_setup_pa6t.S
cpu_setup_power7.S
cpu_setup_ppc970.S
cputable.c powerpc: Fix cputable entry for 970MP rev 1.0 2013-03-20 13:04:59 -07:00
crash.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
crash_dump.c powerpc/crashdump : Fix page frame number check in copy_oldmem_page 2014-03-11 16:10:00 -07:00
dbell.c powerpc: Make sure IPI handlers see data written by IPI senders 2012-09-14 10:00:22 -07:00
dma-iommu.c PowerPC: adapt for dma_map_ops changes 2012-03-28 16:36:33 +02:00
dma-swiotlb.c PowerPC: adapt for dma_map_ops changes 2012-03-28 16:36:33 +02:00
dma.c PowerPC: adapt for dma_map_ops changes 2012-03-28 16:36:33 +02:00
entry_32.S powerpc: Fix page fault with lockdep regression 2012-04-10 17:21:35 +10:00
entry_64.S powerpc: do_notify_resume can be called with bad thread_info flags argument 2015-02-02 17:05:10 +08:00
exceptions-64e.S powerpc: Rework lazy-interrupt handling 2012-03-09 13:25:06 +11:00
exceptions-64s.S powerpc: Fix emulation of illegal instructions on PowerNV platform 2014-07-09 10:51:21 -07:00
fadump.c powerpc: Fix fallout from system.h split up 2012-04-02 14:00:03 +10:00
firmware.c
fpu.S
fsl_booke_entry_mapping.S
ftrace.c powerpc/ftrace: Fix assembly trampoline register usage 2012-08-09 08:31:27 -07:00
head_8xx.S powerpc: Call do_page_fault() with interrupts off 2012-03-09 10:55:08 +11:00
head_32.S powerpc: Call do_page_fault() with interrupts off 2012-03-09 10:55:08 +11:00
head_40x.S powerpc: Call do_page_fault() with interrupts off 2012-03-09 10:55:08 +11:00
head_44x.S powerpc/44x: Enable CONFIG_RELOCATABLE for PPC44x 2011-12-20 10:21:57 -05:00
head_64.S powerpc: Align p_end 2014-01-08 09:42:11 -08:00
head_booke.h powerpc: Call do_page_fault() with interrupts off 2012-03-09 10:55:08 +11:00
head_fsl_booke.S powerpc: Call do_page_fault() with interrupts off 2012-03-09 10:55:08 +11:00
hw_breakpoint.c
ibmebus.c Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-04-04 17:13:43 -07:00
idle.c powerpc: Fix broken cpu_idle_wait() implementation 2012-06-01 15:18:16 +08:00
idle_6xx.S
idle_book3e.S powerpc: Rework lazy-interrupt handling 2012-03-09 13:25:06 +11:00
idle_e500.S
idle_power4.S powerpc: Fix power4/970 idle code regression with lockdep 2012-03-16 09:28:17 +11:00
idle_power7.S powerpc: Rework lazy-interrupt handling 2012-03-09 13:25:06 +11:00
init_task.c
io-workarounds.c
io.c
iomap.c powerpc: switch to GENERIC_PCI_IOMAP 2011-11-28 21:13:18 +02:00
iommu.c powerpc/iommu: Use GFP_KERNEL instead of GFP_ATOMIC in iommu_init_table() 2013-10-13 15:42:48 -07:00
irq.c powerpc: Fix missing/delayed calls to irq_work 2013-06-20 11:58:47 -07:00
isa-bridge.c powerpc: Remove FW_FEATURE ISERIES from arch code 2012-03-21 11:16:11 +11:00
jump_label.c
kgdb.c powerpc: Fix fallout from system.h split up 2012-04-02 14:00:03 +10:00
kprobes.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
kvm.c KVM: PPC: Avoid patching paravirt template code 2012-03-05 14:52:34 +02:00
kvm_emul.S KVM: PPC: Avoid patching paravirt template code 2012-03-05 14:52:34 +02:00
l2cr_6xx.S
legacy_serial.c powerpc: Fix build on some non-freescale platforms 2012-01-25 13:33:22 +11:00
lparcfg.c powerpc/pseries/lparcfg: Fix possible overflow are more than 1026 2014-07-09 10:51:21 -07:00
machine_kexec.c powerpc/irqdomain: Fix broken NR_IRQ references 2012-04-30 10:45:26 +10:00
machine_kexec_32.c treewide: convert uses of ATTRIB_NORETURN to __noreturn 2012-01-12 20:13:03 -08:00
machine_kexec_64.c powerpc/kexec: Disable hard IRQ before kexec 2013-02-28 06:59:04 -08:00
Makefile powerpc/perf: Move perf core & PMU code into a subdirectory 2012-02-23 10:50:04 +11:00
misc.S powerpc: Remove legacy iSeries bits from assembly files 2012-03-09 10:54:59 +11:00
misc_32.S
misc_64.S
module.c
module_32.c powerpc: Fix kernel panic during kernel module load 2012-06-17 11:21:22 -07:00
module_64.c
msi.c
nvram_64.c
of_platform.c powerpc/eeh: Introduce EEH device 2012-03-09 11:39:29 +11:00
paca.c powerpc: Remove FW_FEATURE ISERIES from arch code 2012-03-21 11:16:11 +11:00
pci-common.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-03-23 14:02:12 -07:00
pci_32.c powerpc/PCI: compute I/O space bus-to-resource offset consistently 2012-03-20 10:41:44 -07:00
pci_64.c powerpc/PCI: compute I/O space bus-to-resource offset consistently 2012-03-20 10:41:44 -07:00
pci_dn.c powerpc/powernv: PCI support for p7IOC under OPAL v2 2011-11-25 14:53:15 +11:00
pci_of_scan.c powerpc/PCI: convert devtree bus addresses to resource 2012-03-20 10:41:51 -07:00
pmc.c bug.h: add include of it to various implicit C users 2012-02-29 17:15:08 -05:00
ppc32.h
ppc_ksyms.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
ppc_save_regs.S
proc_powerpc.c
process.c powerpc: Fix stack overflow crash in resume_kernel when ftracing 2013-06-20 11:58:47 -07:00
prom.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
prom_init.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
prom_init_check.sh
prom_parse.c
ptrace.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
ptrace32.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
reloc_32.S powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00
reloc_64.S powerpc: Align p_dyn, p_rela and p_st symbols 2014-03-23 21:37:05 -07:00
rtas-proc.c
rtas-rtc.c
rtas.c powerpc: Bring all threads online prior to migration/hibernation 2013-05-19 10:54:40 -07:00
rtas_flash.c
rtas_pci.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-03-23 14:02:12 -07:00
rtasd.c
setup-common.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
setup.h
setup_32.c powerpc: fix build when CONFIG_BOOKE_WDT is enabled 2012-04-19 14:55:43 -05:00
setup_64.c powerpc/smp: Section mismatch from smp_release_cpus to __initdata spinning_secondaries 2014-07-09 10:51:21 -07:00
signal.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
signal.h powerpc: Fix various issues with return to userspace 2012-02-22 16:48:53 +11:00
signal_32.c powerpc/signals: Improved mark VSX not saved with small contexts fix 2013-12-04 10:50:33 -08:00
signal_64.c powerpc/signals: Improved mark VSX not saved with small contexts fix 2013-12-04 10:50:33 -08:00
smp-tbsync.c
smp.c powerpc: Make sure IPI handlers see data written by IPI senders 2012-09-14 10:00:22 -07:00
softemu8xx.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
stacktrace.c
suspend.c
swsusp.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
swsusp_32.S
swsusp_64.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
swsusp_asm64.S
swsusp_booke.S
sys_ppc32.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
syscalls.c
sysfs.c powerpc/sysfs: Disable writing to PURR in guest mode 2014-07-09 10:51:22 -07:00
systbl.S
systbl_chk.c
systbl_chk.sh
tau_6xx.c
time.c powerpc/pseries: Duplicate dtl entries sometimes sent to userspace 2014-07-09 10:51:22 -07:00
traps.c powerpc: Fix emulation of illegal instructions on PowerNV platform 2014-07-09 10:51:21 -07:00
udbg.c powerpc: Random little legacy iSeries removal tidy ups 2012-03-28 11:33:23 +11:00
udbg_16550.c
vdso.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
vecemu.c
vector.S
vio.c powerpc/vio: use strcpy in modalias_show 2013-11-29 10:50:36 -08:00
vmlinux.lds.S powerpc/modules: Module CRC relocation fix causes perf issues 2013-08-04 16:25:55 +08:00