[SSI] openssi/kernel/include/cluster/gen ipc.svc,1.3,1.4

Roger Tsang <[email protected]> Mon, 05 Apr 2010 05:10:52 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/include/cluster/gen
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv7945/kernel/include/cluster/gen

Modified Files:
      Tag: OPENSSI-FC
	ipc.svc 
Log Message:
- Fix memory corruption in sys_msgsnd() due to double kfree of msg_msgseg structures after sending to remote message queue. ssi_msgpack() already freed msg_msgseg. The second kfree is done in free_msg() prior returning to user space.
- Eliminate unnecessary struct msgbuf de-serialization in sys_msgsnd() at remote clients. The existing implementation de-serializes the user's buffer into msg_msg structure for the local message queue first. Then if it determines the queue is remote the msg_msg structure is re-serialized for transport. The new implementation skips all that and instead sends a copy of the user's buffer to the server.
- Remove ssi_msgpack() it is no longer used.
- Create ssi_load_msg() based on ipc/msgutil.c:load_msg() to load kernel space buffer.
- ssi_remote_msgrcv() to skip zero'ing of kernel space receive buffer. There is no security issue since the contents of buffer is not copied to user space unless the remote operation is successful.

 cluster/ssi/ipc/ipcmsg_svr.c |   80 +++++----------------
 include/cluster/gen/ipc.svc  |    4 -
 ipc/msg.c                    |  133 +++++++++++++++++++++--------------
 3 files changed, 102 insertions(+), 115 deletions(-)


Index: ipc.svc
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/gen/ipc.svc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ipc.svc	28 Mar 2009 23:44:16 -0000	1.3
+++ ipc.svc	5 Apr 2010 05:10:50 -0000	1.4
@@ -139,8 +139,8 @@
 
 operation ripc_msgsnd {
 	param IN int			msqid
-	param IN:OOL:VAR:NOFREE:NOGEN struct msg_msg	*msgp
-	param IN:OOL:VAR char		*msgsegs
+	param IN long			mtype
+	param IN:OOL:VAR char		*msgtxt
 	param IN int			msgflg
 }
 


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev