[lkml]   [2003]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: EFAULT reading /dev/mem... - broken x86info
    Petr Vandrovec wrote:

    >On Mon, Nov 10, 2003 at 06:17:37PM +0100, Manfred Spraul wrote:
    >>DEBUG_PAGEALLOC unmaps pages on kmem_cache_free and __free_pages(). The
    >>pages are mapped again during get_free_pages and kmem_cache_alloc.
    >>0x86000 looks like a normal page - what guarantees that it's not used by
    >>the kernel?
    >With DEBUG_PAGEALLOC there is no problem with page if it is USED by the kernel.
    >Problem is if page is NOT USED - in this case kernel does not have it in its
    >mapping, and bad thing happen.
    If the page is used by AGP, then it won't have a mapping either.

    >x86info (and other simillar tools for dumping different BIOS structures) just
    >scans physical memory for some well known signatures - hoping that kernel did
    >not smash these structures.
    Scanning physical memory is very dangerous: it's undefined what happens
    if a page is mapped multiple times with different cache settings. Athlon
    cpus prefetch whatever they see, and they speculatively set the dirty
    bit in cachelines for WB cacheable pages.

    >Up to now it was possible to read whole physical memory from userspace - some
    >pages by reading /dev/mem, some pages by mmaping /dev/mem. Now it is not possible
    >anymore - which I think is bad, as /dev/mem has semantic of it.
    I think /dev/mem should lie and return 0x00 for pages that are not in
    the linear mapping.

    Or /dev/mem users should expect random holes.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:58    [W:0.020 / U:6.828 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site