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

    > Hi Dave,
    > today I attempted to run 'x86info' on my system, and I was awarded by
    > a bit unexpected answer:
    > ppc:~/x# x86info -v
    > x86info v1.12b. Dave Jones 2001-2003
    > Feedback to <>.
    > readEntry: Bad address
    > Found 1 CPUppc:~/x
    > After some tweaking around I found that I cannot read some pages from /dev/mem -
    > - I get -EFAULT on them. x86info run to the 0x86000 and 0x87000 pages, as it
    > scans 0x80000-0x8FFFF range for mptable.

    Your code works on 2.4.22 and probably somewhat higher versions. However,
    as I understand it, the new kernels no longer mmap everything by default.
    In other words, there are no PTEs unless you or a driver sets them.
    In user-mode, you need to mmap() and in kernel mode, you use ioremap_*().

    Since you can mmap() something that is already mmapped() without any
    problem, the code should probably be "fixed" to mmap everything it
    tries to read, page-by-page.

    If this is not correct, I'm sure somebody will respond.

    Dick Johnson
    Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
    Note 96.31% of all statistics are fiction.

    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.036 / U:17.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site