Re: Query about M_READ

From: Andrew Valencia <vandys_at_nospam.org>
Date: Sun Oct 30 1994 - 11:35:20 PST

[Dave Hudson <dave@humbug.demon.co.uk> writes:]

>Perhaps it's just a bit late in the morning for me, but why do we need
>M_READ? Is it a security issue? (I can see that a server would be able to
>read data from a client's buffer as well as write it)

If M_READ is set, the segments are not sent across to the server. The
server has to send back segments, whose contents are copied out to the
buffers from the client's msg_send() request.

Being a DMA server process merely determines whether, *if* a message does
not have M_READ set, whether the segments sent across are attached to the
server process read-only or read-write.

An optimization for filesystems TBD is to have them realize that they're
talking to a DMA-capable block server, and never set M_READ. This avoids
the extra copy from server segment to filesystem buffer cache.

Better yet, since we have allowed our file descriptor layer to handle
unaligned I/O, we could have the file descriptor layer detect this and
implement it transparently to users of read()/write().

                                                        Andy
Received on Sun Oct 30 10:23:19 1994

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:10 PDT