[lkml]   [2004]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: can device drivers return non-ram via vm_ops->nopage?
    On Sat, Mar 20, 2004 at 09:39:51AM -0800, Linus Torvalds wrote:
    > On Sat, 20 Mar 2004, Andrea Arcangeli wrote:
    > >
    > > The only bugreport I've got so far for the latest anon_vma code is from
    > > Jens, and it's a device driver bug in my opinion, but I'd like to have a
    > > definitive confirmation from you about the ->nopage API.
    > I'd say that this is definitely a driver bug.
    > If a driver wants to map non-RAM pages, that's perfectly ok, but it MUST
    > NOT happen through "nopage()". The driver should map them with
    > "remap_page_range()", and thus never take a page fault for such pages at
    > all.
    > There is no reason to ever lazily map non-RAM pages - clearly they aren't
    > using any "real memory", so there is no reason to not fill the page tables
    > at mmap() time.
    > In other words, the driver is horribly broken.

    thanks for the clarification.

    At the moment I'm not sure anymore if this was non-ram or a
    VM_FAULT_SIGBUS because I noticed I was doing BUG_ON(!pfn_valid)
    _before_ checking new_page == VM_FAULT_SIGBUS. Though my theory about
    do_no_page working fine with non-ram page_t with >=128m machines up to
    2.6.4 still holds, and it's not obvious that Jens triggered a SIGBUS
    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 14:01    [W:0.034 / U:3.944 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site