kernel mmap() and friends.

From: linux-os (linux-os_at_analogic.com)
Date: 03/08/05

  • Next message: Dominik Brodowski: "PCMCIA product id strings -> hashes generation at compilation time? [Was: Re: [patch 14/38] pcmcia: id_table for wavelan_cs]"
    Date:	Tue, 8 Mar 2005 14:04:47 -0500 (EST)
    To: Linux kernel <linux-kernel@vger.kernel.org>
    
    

    Hello mem-map gurus,

    If one uses x = __get_dma_pages(GFP_KERNEL, nr), finds the physical
    address with b = virt_to_bus(x), then attempts to mmap(,,b,,,) the result
    _does_not_fail_, yet the user ends up with memory ...somewhere....
    that is R/W able and WRONG.

    Yet, if the code executes SetPageReserved(virt_to_page(x)), the
    mmap() works and the user gets the CORRECT page(s).

    I think that if mmap() needs a physical buffer to be reserved
    then that's fine. However, silently returning some different
    buffer is a BUG.

    Is anyone aware of this BUG? Does anybody else care?

    Cheers,
    *** Johnson
    Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips).
      Notice : All mail here is now cached for review by Dictator Bush.
                      98.36% of all statistics are fiction.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Dominik Brodowski: "PCMCIA product id strings -> hashes generation at compilation time? [Was: Re: [patch 14/38] pcmcia: id_table for wavelan_cs]"