• Z
    [PATCH] i386: Profile pc badness · 7b355202
    Zachary Amsden 提交于
    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: NZachary Amsden <zach@vmware.com>
    Signed-off-by: NAndi Kleen <ak@suse.de>
    7b355202
time.c 9.8 KB