From owner-freebsd-arch Tue May 7 7:33:38 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by hub.freebsd.org (Postfix) with ESMTP id 641E737B404 for ; Tue, 7 May 2002 07:33:29 -0700 (PDT) Received: (qmail 32155 invoked from network); 7 May 2002 14:33:28 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 7 May 2002 14:33:28 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g47EXRF29010; Tue, 7 May 2002 10:33:27 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200205070815.g478Fn180961@apollo.backplane.com> Date: Tue, 07 May 2002 10:33:20 -0400 (EDT) From: John Baldwin To: Matthew Dillon Subject: Re: syscall changes to deal with 32->64 changes. Cc: arch@FreeBSD.ORG, Poul-Henning Kamp 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 07-May-2002 Matthew Dillon wrote: > As a person who has already spent several days playing with > 64 bit time_t's and associated syscalls I would say that > creating a new syscall vector for FreeBSD 5.0 (and leaving the > existing one intact for compatibility) is the correct solution. I agree completely. > I tried to add new syscalls to the existing vector but so many > syscalls had to be changed to support 64 bit time_t's that it > became a huge mess... so much so that I would expect the other > BSD's to cry foul on us if we tried to do it with the existing > vector. It will be far, far cleaner to simply implement an > entirely new syscall vector / ELF identifier. Right. I would like to use the ELF_ABI_OSVERSION thingie, but according to O'Brien it violates the ELF spec to use any value other than 0. But then why does it exist if we can't use it? :( One idea being thrown about is that for the new ABI (It would be FreeBSD ABI 2) there would be a syscall at syscall 0 that would never change that could be used to select what "minor" version of the ABI you wanted to use, so if we wanted to add a new ABI at some point in the future we could stick that syscall in crt.c (or whatever the proper startup file is) to change to ABI 2.1 or 2.2 or something. However, for the current change, I think bumping the ELF OS version and adding a new ABI front-end for ABI 2 is the way to go. Another advantage of this is that if our tools handle the OS version bit properly, we can actually not have to worry about much of a flag day. Instead we can gradually add the new ABI and support for it and then just quietly throw the switch to change the default ABI in current one day. Old binaries would still run fine. The only tricky part is for libc.so since you would really need two version of it (unless we also bumped to libc.so.6 for this..) and we would need to make sure we linked to the right OSVERSION of the lib when doing runtime linking, whcih could get ugly. > In regards to other things that may need to change size: A complete > audit will have to be performed. I would be happy to take a run through. > Getting it right the first time is extremely important. A bunch of > things starting leaking out of the woodwork as I was playing around > with 64 bit time_t's. At the very least I would pad the structures > to handle things like 64 bit dev_t, ino_t, and file flags, and I would > even consider padding now 96 bit structures like timespec (on IA32 with > 64 bit time_t's + nanoseconds long = 96 bits) to 128 bits across the > board. It might also be worthwhile to make uid_t, gid_t, and pid_t > 64 bits to support probable future work in those areas. I agree, here, too. > In regards to the 5.0R question that comes up later in the thread... > I just don't know. I will say that creating a new syscall vector > cannot be done piecemeal... you have to get it *all* in from the > get-go or you create huge issues with things like bootstrapping new > systems and general compatibility and useability, etc.. I think we can gradually overhaul it internally in the kernel before we throw the switch to turn it on by default since all we would be breaking would be test binaries and not "real" ones. Once the new ABI is golden, then we would throw the switch to change the default. I'm also not sure if we shouldn't wait to do this until 6.0. > -Matt > >:We have some 32 to 64 bit changes outstanding, which are necessary >:to complete the UFS2 DARPA project. >:... >: >:1. Are there anything else that needs to change size while we're >: at it ? >: >:2. Is this a good occation to create a new syscall vector for >: FreeBSD 5.0 rather than embellish the existing one with even >: more variations ? >: >:-- >:Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message