From owner-p4-projects@FreeBSD.ORG Tue Nov 14 19:46:16 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 4215E16A47B; Tue, 14 Nov 2006 19:46:16 +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 DADA016A403; Tue, 14 Nov 2006 19:46:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80B6A43D76; Tue, 14 Nov 2006 19:46:07 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kAEJjqQN024703; Tue, 14 Nov 2006 14:46:00 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Jung-uk Kim Date: Tue, 14 Nov 2006 12:41:31 -0500 User-Agent: KMail/1.9.1 References: <200611102300.kAAN0Cn1045678@repoman.freebsd.org> <200611131606.21477.jhb@freebsd.org> <200611131812.15858.jkim@FreeBSD.org> In-Reply-To: <200611131812.15858.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611141241.33587.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 14 Nov 2006 14:46:01 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2194/Tue Nov 14 12:26:01 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx 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: Tue, 14 Nov 2006 19:46:16 -0000 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