From owner-p4-projects@FreeBSD.ORG Mon Nov 13 23:13:12 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A319516A4E8; Mon, 13 Nov 2006 23:13:11 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A42B16A4CA; Mon, 13 Nov 2006 23:13:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9E9C43DC6; Mon, 13 Nov 2006 23:12:50 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id kADNCaPw077341; Mon, 13 Nov 2006 18:12:36 -0500 (EST) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: John Baldwin Date: Mon, 13 Nov 2006 18:12:13 -0500 User-Agent: KMail/1.6.2 References: <200611102300.kAAN0Cn1045678@repoman.freebsd.org> <200611131606.21477.jhb@freebsd.org> In-Reply-To: <200611131606.21477.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200611131812.15858.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88.6/2191/Mon Nov 13 13:37:53 2006 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Perforce Change Reviews Subject: Re: PERFORCE change 109706 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 23:13:12 -0000 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. JK