From owner-freebsd-arch@FreeBSD.ORG Mon Jan 21 21:01:49 2008 Return-Path: Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32B2A16A419; Mon, 21 Jan 2008 21:01:49 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.freebsd.org (Postfix) with ESMTP id DF6F013C457; Mon, 21 Jan 2008 21:01:48 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.14.2/8.14.1) with ESMTP id m0LL1jQd009419; Mon, 21 Jan 2008 16:01:45 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.14.2/8.14.1/Submit) id m0LL1jBP009418; Mon, 21 Jan 2008 16:01:45 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Mon, 21 Jan 2008 16:01:45 -0500 From: David Schultz To: Jung-uk Kim Message-ID: <20080121210145.GA9107@VARK.MIT.EDU> Mail-Followup-To: Jung-uk Kim , freebsd-current@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG References: <200801181217.52788.jkim@FreeBSD.org> <20080119121316.GA21917@VARK.MIT.EDU> <200801211152.07680.jkim@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200801211152.07680.jkim@FreeBSD.org> Cc: freebsd-current@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG Subject: Re: [RFC] SysV SHM on 64-bit platforms X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jan 2008 21:01:49 -0000 On Mon, Jan 21, 2008, Jung-uk Kim wrote: > On Saturday 19 January 2008 07:13 am, David Schultz wrote: > > For 8-CURRENT, I'd say go ahead and fix it and add the syscall > > compat goop. Then I guess backport it to 7-STABLE after a while if > > nothing important breaks and nobody has any objections to that > > plan. > > Well, since the policy is 'no seat belt for -CURRENT', I think that is > aceptable, too. Right, but you need the compat shims to avoid breaking the ABI when 8.0 is released anyway. > > It would also be cool if struct ipcperm got fixed at the same time > > so we only have to do this once. I think that only entails adding > > compat crud to semctl and maybe one or two other syscalls. Those > > changes aren't urgent enough to make it worthwhile to backport to > > 7.X IMO, though. > > So, you are in between option 1 and 4, i.e., bigger fix goes to HEAD > and partial MFC to RELENG_7, right? I'd say try to fix everything once and for all in HEAD, including struct ipcperm, but only MFC the shmid_ds changes to minimize the chance that anything breaks between 7.X releases. Others may have different opinions... > Actually, the arch check is > done like this: > > if (sizeof(size_t) != sizeof(int) && td->td_proc->p_osrel <= WHATEVER) > > I am hoping the compiler is smart enough to optimize away > 'sizeof(size_t) != sizeof(int)'. Yes, gcc does basic dead code elimination like this at all optimization levels, including -O0. Of course the code within the if block still has to be syntactically valid on all architectures; if it isn't, then you need ifdefs. > > - The 8.X version needs to take the p_osrel for the equivalent > > change in 7.X into account. > > I thought it did, didn't it? Oops, maybe you did and I was looking at one of the other versions of the patch.