]> bbs.cooldavid.org Git - net-next-2.6.git/commit
[PATCH] i386: Profile pc badness
authorZachary Amsden <zach@vmware.com>
Tue, 13 Feb 2007 12:26:21 +0000 (13:26 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Tue, 13 Feb 2007 12:26:21 +0000 (13:26 +0100)
commit7b3552024380f306a6c50d5105d18d9d4258fa4e
tree904a408768b216be7f759b4a190809f851a914d5
parentbbab4f3bb7f528d2b8ccb5de9ae5f6ff3fb29684
[PATCH] i386: Profile pc badness

Profile_pc was broken when using paravirtualization because the
assumption the kernel was running at CPL 0 was violated, causing
bad logic to read a random value off the stack.

The only way to be in kernel lock functions is to be in kernel
code, so validate that assumption explicitly by checking the CS
value.  We don't want to be fooled by BIOS / APM segments and
try to read those stacks, so only match KERNEL_CS.

I moved some stuff in segment.h to make it prettier.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
arch/i386/kernel/time.c
include/asm-i386/ptrace.h
include/asm-i386/segment.h