Re: writable swap cache explained (it's weird)

Bill Hawes (whawes@transmeta.com)
Thu, 30 Jul 1998 12:49:17 -0700


Benjamin C.R. LaHaise wrote:

> There are two options:
>
> a) disallow MAP_SHARED mappings of anonymous memory from
> /proc/self/mem
>
> b) implement shared anon mappings
>
> (a) sounds like the Obvious Thing To Do in the mmap method for /proc, but
> will break xdos. Wtf were they thinking in writing that insane code?
> Hmmm, this bug probably applies to 2.0 too.... in a much more subtle
> fashion.
>
> As for (b), I'll try to present code by Saturday, as it is a nice feature
> to add to our cap. =) (No, it's not going to be anything like the awful
> shm code.)

For implementing shared anon mapping, why can't you just mmap a temp file
and then unlink it? This should provide the expected capabilities, and the
disk image would disappear when the last mapping closes.

Seems like that should work for the xdos case, though it would require a few
changes to the code.

Regards,
Bill

-
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.altern.org/andrebalsa/doc/lkml-faq.html