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

Linus Torvalds (torvalds@transmeta.com)
Wed, 29 Jul 1998 12:41:59 -0700 (PDT)


On Wed, 29 Jul 1998, Bill Hawes wrote:
>
> The trick that xdos is using to get the shared writable pages uses
> /proc/self/mem as a "file", so that a writable shared mapping appears to
> be backed by a file. An strace shows the following calls:

Oh, damn.

I wanted to remove mmap() support from /proc/self/mem a long time ago
exactly because it's almost impossible to maintain sane semantics for
re-mapping it. I guess it's time to do this now (this problem is
essentially impossible to fix without really ugly hacks - it can turn
"private" pages into a very perverse sort of "shared" pages which is
impossible to do any other way.

DOSEMU should be able to just do a shared memory mapping with SysV shared
memory instead fo get the same behaviour.

And no, we can't just mark it unswappable, as that would open us up to
some rather nasty security problems.

Anybody on the DOSEMU team listening? How hard would it be for you to just
do a shared memory mapping instead?

Linus

-
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