• Linus Torvalds's avatar
    vfs: make word-at-a-time accesses handle a non-existing page · e419b4cc
    Linus Torvalds authored
    It turns out that there are more cases than CONFIG_DEBUG_PAGEALLOC that
    can have holes in the kernel address space: it seems to happen easily
    with Xen, and it looks like the AMD gart64 code will also punch holes
    dynamically.
    
    Actually hitting that case is still very unlikely, so just do the
    access, and take an exception and fix it up for the very unlikely case
    of it being a page-crosser with no next page.
    
    And hey, this abstraction might even help other architectures that have
    other issues with unaligned word accesses than the possible missing next
    page.  IOW, this could do the byte order magic too.
    
    Peter Anvin fixed a thinko in the shifting for the exception case.
    Reported-and-tested-by: default avatarJana Saout <jana@saout.de>
    Cc:  Peter Anvin <hpa@zytor.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e419b4cc
dcache.c 77.8 KB