PERFORCE change 109706 for review

Jung-uk Kim jkim at FreeBSD.org
Mon Nov 13 23:13:12 UTC 2006


On Monday 13 November 2006 04:06 pm, John Baldwin wrote:
> On Friday 10 November 2006 18:00, Jung-uk Kim wrote:
> > http://perforce.freebsd.org/chv.cgi?CH=109706
> >
> > Change 109706 by jkim at jkim_hammer on 2006/11/10 22:59:53
> >
> > 	Add (ugly) 32-bit msgsnd/msgrcv support for amd64.
> > 	msgp points to msghdr and msghdr contains msg_type, which is
> > long. When we copyin/copyout, we copy the correct msg_type and
> > advance msgp by msg_type size.
> >
> > 	This fixes LTP test cases msgget01, msgrcv01, msgrcv02,
> > msgrcv04, and msgsnd03.
> >
> > 	Note: There is only one test case blocked in msgwait state after
> > this change, which seems to be arch-independent issue.
> >
> > Affected files ...
> >
> > ..
> > //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#3
> > edit .. //depot/projects/linuxolator/src/sys/kern/sysv_msg.c#5
> > edit
>
> Why not add kern_msgfoo() functions and do the copyout/copyin in
> other places instead?

Unfortunately there are two different types of copyin/copyout's in 
each msgsnd/msgrcv, i.e., message type and actual message.  Only the 
first one (i.e., message type) is affected.  It is quite hard to 
separate them because of that reason.  I thought about using one 
copyin/copyout instead of two.  I thought about passing function 
pointer to a copy function.  I even thought about making 
msgsnd32/msgrcv32 syscalls.  But these are overkill for this, I 
think.  As I noted in the commit log, I don't like this but I think 
this is the simplest fix without breaking existing APIs.

JK


More information about the p4-projects mailing list