• Paul Burton's avatar
    MIPS: Flush highmem pages in __flush_dcache_page · 7b35229a
    Paul Burton authored
    commit 234859e4 upstream.
    
    When flush_dcache_page is called on an executable page, that page is
    about to be provided to userland & we can presume that the icache
    contains no valid entries for its address range. However if the icache
    does not fill from the dcache then we cannot presume that the pages
    content has been written back as far as the memories that the dcache
    will fill from (ie. L2 or further out).
    
    This was being done for lowmem pages, but not for highmem which can lead
    to icache corruption. Fix this by mapping highmem pages & flushing their
    content from the dcache in __flush_dcache_page before providing the page
    to userland, just as is done for lowmem pages.
    Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
    Cc: Lars Persson <lars.persson@axis.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/12720/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    7b35229a
cache.c 7.17 KB