Date: Tue, 14 Nov 2006 12:41:31 -0500 From: John Baldwin <jhb@freebsd.org> To: Jung-uk Kim <jkim@freebsd.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 109706 for review Message-ID: <200611141241.33587.jhb@freebsd.org> In-Reply-To: <200611131812.15858.jkim@FreeBSD.org> References: <200611102300.kAAN0Cn1045678@repoman.freebsd.org> <200611131606.21477.jhb@freebsd.org> <200611131812.15858.jkim@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 13 November 2006 18:12, Jung-uk Kim wrote: > 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@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. Use uio_seg's for each item. Then the wrappers only have to explicitly copy in the one that is different from normal and use UIO_SYSSPACE for that one. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611141241.33587.jhb>