linux/arch/x86/kernel
Torok Edwin 257ef9d21f perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels
When profiling a 32-bit process on a 64-bit kernel, callgraph tracing
stopped after the first function, because it has seen a garbage memory
address (tried to interpret the frame pointer, and return address as a
64-bit pointer).

Fix this by using a struct stack_frame with 32-bit pointers when the
TIF_IA32 flag is set.

Note that TIF_IA32 flag must be used, and not is_compat_task(), because
the latter is only set when the 32-bit process is executing a syscall,
which may not always be the case (when tracing page fault events for
example).

Signed-off-by: Török Edwin <edwintorok@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
LKML-Reference: <1268820436-13145-1-git-send-email-edwintorok@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-04-02 19:30:03 +02:00
..
acpi Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release 2010-03-14 21:30:17 -04:00
apic x86: Handle legacy PIC interrupts on all the cpu's 2010-03-16 06:36:35 +01:00
cpu perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels 2010-04-02 19:30:03 +02:00
.gitignore
alternative.c Merge branch 'perf-probes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-05 10:50:22 -08:00
amd_iommu_init.c x86/amd-iommu: Fix IOMMU-API initialization for iommu=pt 2010-01-22 17:44:35 +01:00
amd_iommu.c x86/amd-iommu: Fix deassignment of a device from the pt_domain 2010-01-22 17:56:49 +01:00
apb_timer.c Merge branch 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-07 15:59:39 -08:00
aperture_64.c x86/gart: Unexport gart_iommu_aperture 2010-02-16 22:05:09 +01:00
apm_32.c x86: Remove trailing spaces in messages 2010-02-07 17:47:51 +01:00
asm-offsets_32.c
asm-offsets_64.c
asm-offsets.c
audit_64.c
bios_uv.c Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-02-28 11:00:55 -08:00
bootflag.c
check.c
cpuid.c x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers. 2010-01-26 23:52:38 -08:00
crash_dump_32.c
crash_dump_64.c
crash.c
doublefault_32.c
ds_selftest.c
ds_selftest.h
ds.c
dumpstack_32.c perf: Drop useless check for ignored frame 2010-01-13 10:09:08 +01:00
dumpstack_64.c perf/x86-64: Use frame pointer to walk on irq and process stacks 2010-03-10 14:26:40 +01:00
dumpstack.c perf: Stop stack frame walking off kernel addresses boundaries 2010-01-13 09:32:54 +01:00
dumpstack.h perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels 2010-04-02 19:30:03 +02:00
e820.c Merge branch 'linus' into x86/mm 2010-02-17 18:28:05 +01:00
early_printk.c
early-quirks.c
efi_32.c
efi_64.c
efi_stub_32.S
efi_stub_64.S
efi.c x86: Remove trailing spaces in messages 2010-02-07 17:47:51 +01:00
entry_32.S
entry_64.S
ftrace.c Merge branch 'tracing/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into tracing/core 2010-02-27 10:06:10 +01:00
head32.c x86: Make sure free_init_pages() frees pages on page boundary 2010-03-29 18:55:33 +02:00
head64.c x86: Make sure free_init_pages() frees pages on page boundary 2010-03-29 18:55:33 +02:00
head_32.S Merge branch 'master' into percpu 2010-01-05 09:17:33 +09:00
head_64.S tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
head.c
hpet.c clocksource: add argument to resume callback 2010-02-05 14:54:10 +01:00
hw_breakpoint.c Merge branch 'perf/core' into perf/urgent 2010-03-04 11:47:52 +01:00
i386_ksyms_32.c
i387.c x86, ptrace: Remove set_stopped_child_used_math() in [x]fpregs_set 2010-02-23 13:45:27 -08:00
i8237.c
i8253.c
i8259.c x86, pic: Fix section mismatch in legacy pic 2010-02-23 23:13:19 -08:00
init_task.c
io_delay.c
ioport.c
irq_32.c
irq_64.c
irq.c
irqinit.c x86: Handle legacy PIC interrupts on all the cpu's 2010-03-16 06:36:35 +01:00
k8.c x86, k8 nb: Fix boot crash: enable k8_northbridges unconditionally on AMD systems 2010-03-13 08:36:16 +01:00
kdebugfs.c
kgdb.c x86,kgdb: Always initialize the hw breakpoint attribute 2010-04-01 08:26:32 +02:00
kprobes.c kprobes/x86: Support kprobes jump optimization on x86 2010-02-25 17:49:26 +01:00
kvm.c
kvmclock.c
ldt.c
machine_kexec_32.c
machine_kexec_64.c
Makefile x86, apbt: Moorestown APB system timer driver 2010-02-24 11:01:21 -08:00
mca_32.c
microcode_amd.c Revert "x86: ucode-amd: Load ucode-patches once ..." 2010-01-23 06:21:59 +01:00
microcode_core.c Revert "x86: ucode-amd: Load ucode-patches once ..." 2010-01-23 06:21:59 +01:00
microcode_intel.c x86: Remove trailing spaces in messages 2010-02-07 17:47:51 +01:00
mmconf-fam10h_64.c x86: Move range related operation to one file 2010-02-10 17:47:17 -08:00
module.c
mpparse.c x86, apic: Don't use logical-flat mode when CPU hotplug may exceed 8 CPUs 2010-02-09 20:51:11 -08:00
mrst.c x86, mrst: Platform clock setup code 2010-02-24 11:01:33 -08:00
msr.c x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers. 2010-01-26 23:52:38 -08:00
olpc.c x86, olpc: Use pci subarch init for OLPC 2010-02-25 19:26:23 -08:00
paravirt_patch_32.c
paravirt_patch_64.c
paravirt-spinlocks.c
paravirt.c x86, paravirt: Remove kmap_atomic_pte paravirt op. 2010-02-27 14:41:35 -08:00
pci-calgary_64.c tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
pci-dma.c Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
pci-gart_64.c x86, k8 nb: Fix boot crash: enable k8_northbridges unconditionally on AMD systems 2010-03-13 08:36:16 +01:00
pci-nommu.c
pci-swiotlb.c
pcspeaker.c
pmtimer_64.c
probe_roms_32.c
process_32.c Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-02-28 10:35:09 -08:00
process_64.c Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-02-28 10:35:09 -08:00
process.c x86, amd: Restrict usage of c1e_idle() 2010-03-19 14:43:36 -07:00
ptrace.c Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
pvclock.c
quirks.c x86: Disable HPET MSI on ATI SB700/SB800 2010-01-23 06:21:58 +01:00
reboot_fixups_32.c
reboot.c x86: Add iMac9,1 to pci_reboot_dmi_table 2010-02-17 08:08:21 +01:00
relocate_kernel_32.S
relocate_kernel_64.S
rtc.c
scx200_32.c
setup_percpu.c early_res: Add free_early_partial() 2010-02-26 08:25:35 +01:00
setup.c x86: Make sure free_init_pages() frees pages on page boundary 2010-03-29 18:55:33 +02:00
sfi.c
signal.c
smp.c
smpboot.c x86: Move notify_cpu_starting() callback to a later stage 2010-04-02 19:30:01 +02:00
stacktrace.c perf events, x86/stacktrace: Make stack walking optional 2009-12-17 09:56:19 +01:00
step.c
sys_i386_32.c Add generic sys_olduname() 2010-03-12 15:52:32 -08:00
sys_x86_64.c improve sys_newuname() for compat architectures 2010-03-12 15:52:32 -08:00
syscall_64.c
syscall_table_32.S Add generic sys_old_mmap() 2010-03-12 15:52:32 -08:00
tboot.c
tce_64.c
test_nx.c
test_rodata.c
time.c x86: Convert i8259_lock to raw_spinlock 2010-02-16 18:21:32 +01:00
tlb_uv.c
tls.c
tls.h
topology.c
trampoline_32.S
trampoline_64.S
trampoline.c
traps.c x86/debug: Clear reserved bits of DR6 in do_debug() 2010-01-29 02:26:10 +01:00
tsc_sync.c
tsc.c Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
uv_irq.c x86, irq: Allow 0xff for /proc/irq/[n]/smp_affinity on an 8-cpu system 2009-12-17 22:03:06 -08:00
uv_sysfs.c x86: Remove trailing spaces in messages 2010-02-07 17:47:51 +01:00
uv_time.c x86, UV: Fix RTC latency bug by reading replicated cachelines 2010-01-27 11:33:53 +01:00
verify_cpu_64.S
visws_quirks.c Merge remote branch 'origin/x86/apic' into x86/mrst 2010-02-22 16:25:18 -08:00
vm86_32.c
vmi_32.c x86, paravirt: Remove kmap_atomic_pte paravirt op. 2010-02-27 14:41:35 -08:00
vmiclock_32.c Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
vmlinux.lds.S x86: Make smp_locks end with page alignment 2010-03-29 18:42:30 +02:00
vsmp_64.c
vsyscall_64.c x86: Raise vsyscall priority on hotplug notifier chain 2010-03-01 12:35:40 -03:00
x86_init.c Merge branch 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-07 15:59:39 -08:00
x8664_ksyms_64.c x86-64: Modify copy_user_generic() alternatives mechanism 2009-12-30 11:57:31 +01:00
xsave.c x86, ptrace: regset extensions to support xstate 2010-02-11 15:08:17 -08:00