On the "SHM segment handle" side of things, I often feel that making
vma descriptors available at user level like file descriptors would be
a nice idea. Currently, file descriptors are "first class objects" at
user level and can be passed between processes via Unix domain
sockets. However, for some things it would be nice to have "mmap"
granularity where you map a region of memory (visible kernel-side as a
vma) and get a descriptor for it. Then you could set protections on it
(say) and "send" it to another process. That process could map it via
the descriptor. Note that SysV shm handles aren't quite the same:
they're equivalent to sending a filename to another process since the
other process has to "reopen" it and the permissions check happens at
that point. A first class vma descriptor would be the sort of thing
you'd want to pass to your pseudo-read call. Whether or not the
networking side could make use of it with its hardware, the semantics
would mean that the kernel would be allowed to optimise any transfers
however it liked because it knows the entire object it's working on.
For passing vma descriptors to other processes, an analogue of
SCM_RIGHTS would do the trick.
-- Malcolm Beattie <email@example.com> Unix Systems Programmer Oxford University Computing Services
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html