Re: patch for mmap MAP_ANON|MAP_SHARED

From: Christoph Rohland (hans-christoph.rohland@sap.com)
Date: Sat Apr 22 2000 - 11:31:12 EDT

  • Next message: Manfred Spraul: "Re: Oops with 2.3.99pre6 (pre3), procfs related ?"

    kanoj@google.engr.sgi.com (Kanoj Sarcar) writes:

    > The patch looks good. I would just ask you to illustrate with a small
    > program that mmaps /dev/zero MAP_SHARED and then does a "cat /proc/pid/maps"
    > on itself. I think instead of reporting the root device numbers for the
    > /dev/zero mapping, it will report the shmfs device numbers.
    >
    > Ie,
    >
    > instead of
    >
    > 08048000-0804e000 r-xp 00000000 08:01 XXXXXXXX /dev/zero
    >
    > it will say something like
    >
    > 08048000-0804e000 r-xp 00000000 AB:CD XXXXXXXX /dev/zero

    Yes, that's right.

    > I can't think of a problem this would cause, unless you claim an
    > user might be confused to see /dev/zero, but a different device
    > for the file.

    I think this is reasonable since /dev/zero is a special device itself.

    > Btw, even for MAP_ANON|MAP_SHARED, the filename reported via
    > "cat /proc/pid/maps" will show up as /dev/zero (I _think_), did
    > you want to change that?

    No, the I think the current behaviour is fine since mmap /dev/zero and
    mmmap MAP_ANON are semantically the same. So they can just show up the
    same.

    Greetings
                    Christoph

    -- 
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Apr 22 2000 - 11:35:18 EDT