Skip to content
  • Ingo Molnar's avatar
    ecf5d430
    x86_64: CPA, fix cache attribute inconsistency bug · ecf5d430
    Ingo Molnar authored
    
    
    no upstream git id as the code has been rewritten.
    
    fix CPA cache attribute bug in v2.6.23. When phys_base is nonzero
    (when CONFIG_RELOCATABLE=y) then change_page_attr_addr() miscalculates
    the secondary alias address by -14 MB (depending on the configured
    offset).
    
    The default 64-bit kernels of Fedora and Ubuntu are affected:
    
       $ grep RELOCA /boot/config-2.6.23.9-85.fc8
         CONFIG_RELOCATABLE=y
    
       $ grep RELOC /boot/config-2.6.22-14-generic
         CONFIG_RELOCATABLE=y
    
    and probably on many other distros as well.
    
    the bug affects all pages in the first 40 MB of physical RAM that
    are allocated by some subsystem that does ioremap_nocache() on them:
    
           if (__pa(address) < KERNEL_TEXT_SIZE) {
    
    Hence we might leave page table entries with inconsistent cache
    attributes around (pages mapped at both UnCacheable and Write-Back),
    and we can also set the wrong kernel text pages to UnCacheable.
    
    the effects of this bug can be random slowdowns and other misbehavior.
    If for example AGP allocates its aperture pages into the first 40 MB
    of physical RAM, then the -14 MB bug might mark random kernel texto
    pages as uncacheable, slowing down a random portion of the 64-bit
    kernel until the AGP driver is unloaded.
    
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    ecf5d430
    x86_64: CPA, fix cache attribute inconsistency bug
    Ingo Molnar authored
    
    
    no upstream git id as the code has been rewritten.
    
    fix CPA cache attribute bug in v2.6.23. When phys_base is nonzero
    (when CONFIG_RELOCATABLE=y) then change_page_attr_addr() miscalculates
    the secondary alias address by -14 MB (depending on the configured
    offset).
    
    The default 64-bit kernels of Fedora and Ubuntu are affected:
    
       $ grep RELOCA /boot/config-2.6.23.9-85.fc8
         CONFIG_RELOCATABLE=y
    
       $ grep RELOC /boot/config-2.6.22-14-generic
         CONFIG_RELOCATABLE=y
    
    and probably on many other distros as well.
    
    the bug affects all pages in the first 40 MB of physical RAM that
    are allocated by some subsystem that does ioremap_nocache() on them:
    
           if (__pa(address) < KERNEL_TEXT_SIZE) {
    
    Hence we might leave page table entries with inconsistent cache
    attributes around (pages mapped at both UnCacheable and Write-Back),
    and we can also set the wrong kernel text pages to UnCacheable.
    
    the effects of this bug can be random slowdowns and other misbehavior.
    If for example AGP allocates its aperture pages into the first 40 MB
    of physical RAM, then the -14 MB bug might mark random kernel texto
    pages as uncacheable, slowing down a random portion of the 64-bit
    kernel until the AGP driver is unloaded.
    
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Loading