Subject: Re: direct copy() between two proc address spaces
To: None <email@example.com>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 06/21/2004 19:25:27
[Pulling together messages from Thor Lancelot Simon <firstname.lastname@example.org>,
Jonathan Stone <email@example.com>, and Jason Thorpe
> Here's a question: what happens if you pass an fd to /dev/zero to an
> unrelated process, then mmap it MAP_SHARED on each side?
Given how mmap on /dev/zero actually works, I feel sure it's the same
as if the unrelated process opens its own fd on /dev/zero and then
maps: two unrelated, unshared, memory sections.
> If we made /dev/zero cloning, [...]
Possibly. But that makes /dev/zero a much more complicated thing than
it currently is. It also doesn't address one of the major reasons I
wanted to pass memory through AF_LOCAL sockets in the first place, that
being that it doesn't require that the memory be created as shared.
> If you want "named" "anonymous" memory, [...]
I don't. The only naming scheme I want for the memory is "this
address, this many bytes" on send, and "here's an address and byte
count" on receive.
Not that I expect any such thing to go into NetBSD. It's a pipe-dream
item, not one I care about even enough to implement it myself for just
my own systems. But it'd be cool to have - I suspect that if I had it,
I'd find myself finding uses for it, just as I have for AF_TIMER
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML firstname.lastname@example.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B