[lkml]   [2012]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: mtd: kernel BUG at arch/x86/mm/pat.c:279!
    On 09/09/2012 06:56 PM, H. Peter Anvin wrote:
    >> Anyway, that means that the BUG_ON() is likely bogus, but so is the
    >> whole calling convention.
    >> The 4kB range starting at 0xfffffffffffff000 sounds like a *valid*
    >> range, but that requires that we fix the calling convention to not
    >> have that "end" (exclusive) thing. It should either be "end"
    >> (inclusive), or just "len".
    > On x86, it is definitely NOT a valid range. There is no physical addresses
    > there, and there will never be any.

    This reminds me a similar issue: If you try to mmap /dev/kmem at an offset which
    is not kernel owned (such as 0), you'll get all the way to __pa() before getting
    a BUG() about addresses not making sense.

    How come there's no arch-specific validation of attempts to access
    virtual/physical addresses? In the kmem example I'd assume that something very
    early on should be yelling at me about doing something like that, but for some
    reason I get all the way to __pa() before getting a BUG() (!).


     \ /
      Last update: 2012-09-10 08:01    [W:0.022 / U:18.004 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site