From owner-freebsd-arch Wed Oct 16 9: 8: 0 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7260C37B401; Wed, 16 Oct 2002 09:07:59 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FBF943EAF; Wed, 16 Oct 2002 09:07:57 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.4/8.12.4) with SMTP id g9GG7HOo045971; Wed, 16 Oct 2002 12:07:17 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Wed, 16 Oct 2002 12:07:16 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Maxim Sobolev Cc: Terry Lambert , "Danny J. Zerkel" , "Vladimir B. Grebenschikov,Moscow,408-7227,123-4567,Some-info" , freebsd-arch@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: short uid/gid In-Reply-To: <3DAD8084.C60C5C0F@FreeBSD.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 16 Oct 2002, Maxim Sobolev wrote: > > And it's not like the approach you've described makes it any easier to > > implement: you still have to break out the old and new structures since > > changing ipc_perm breaks the ABI for all of the System V interfaces, > > rewrite the kernel code, etc. You might as well have added the > > compatibility system calls since you still have to do all the mapping. > > I don't quite understand what you are trying to say. Linux does the > following on the beginning and the end of each {shm,sem,msg}ctl call: > > {shm,sem,msg}ctl(...) > { > if (IPC_64 flag is not set) { > convert user-supplied structure to a new 64-bit format > } > proceed as usual using 64-bit structure > if (IPC_64 flag is not set) { > convert result to be transferred back to user into old format > } > return > } > > This is apparently much more compact, ABI-safe and easier to implement > and maintain since we don't have two versions of mostly the same code. What you are missing here is that the same structures used in kernel are used in userspace, so an important step to "fixing" the SysVIPC problem is to divorce those structures, which means you need two sets of internalize and externalize functions. Your proposed solution involves exactly as much code as the other solution, it just happens to do the compatibility above the system call layer rather than at the system call layer. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message