From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 16:05:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD57F106566B; Mon, 15 Mar 2010 16:05:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 776D28FC13; Mon, 15 Mar 2010 16:05:29 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2243046B89; Mon, 15 Mar 2010 12:05:29 -0400 (EDT) Received: from zion.baldwin.cx (pool-98-109-181-99.nwrknj.fios.verizon.net [98.109.181.99]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 21BC38A01F; Mon, 15 Mar 2010 12:05:24 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Date: Mon, 15 Mar 2010 11:13:38 -0400 User-Agent: KMail/1.12.4 (FreeBSD/7.3-PRERELEASE; KDE/4.3.4; i386; ; ) References: <20100313090844.GV8200@hoeg.nl> <20100313170725.GW8200@hoeg.nl> <20100313.121932.997044077387131740.imp@bsdimp.com> In-Reply-To: <20100313.121932.997044077387131740.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003151113.38968.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 15 Mar 2010 12:05:24 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.1 required=4.2 tests=AWL,BAYES_00, FH_HOST_EQ_VERIZON_P,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: unixmania@gmail.com, ed@80386.nl, src-committers@freebsd.org, svn-src-all@freebsd.org, nwhitehorn@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 16:05:29 -0000 On Saturday 13 March 2010 02:19:32 pm M. Warner Losh wrote: > In message: <20100313170725.GW8200@hoeg.nl> > > Ed Schouten writes: > : * M. Warner Losh wrote: > : > that sounds like a good idea. But it isn't as simple as changing all > : > the COMPAT_FREEBSDX in the .c code. There's also hooks in the syscall > : > glue generation that would be affected. > : > : Hmmm... Indeed. > : > : I thought a bit more about this and I realized it would be better if we > : wouldn't use a FreeBSD major number for this, but the actual > : __FreeBSD_version. > > Hmmm, that might be harder. The problem is that when I want to run a > program from FreeBSD 3.0, I may need an interface that was in 3.0, but > was removed prior to 5.0 shipping. This means the kernel needs the > COMPAT_FREEBSD4 option right now to work. So things are kind of > confusing. This isn't completely theoretical. Old (<= 4.x) i386 binaries use the foosys() methods for SYSV IPC (e.g. msgsys()) rather than msgget, msgctl, etc., so this is a case that would have to be correctly handled by any new organization of these options. I do think it makes the most sense to have the setting be the oldest major rev, and I also think that using __FreeBSD_version values rather than major versions would be too fine-grained (not very user- friendly). It would also enforce the rule of mandating COMPAT_FREEBSD4 implying COMPAT_FREEBSD5, etc. It just means you can't try to build a stripped kernel that only includes FreeBSD4 support without including FreeBSD5 (which is a way to solve Warner's problem). Trying to enumerate "ranges" of supported compat releases would be too confusing and error-prone I think. Also, the syscall generation bit would not be that hard. You would just replace the code that generates '#ifdef COMPAT_FREEBSD4' with '#if FREEBSD_COMPAT_VERSION <= 4'. Of course, you would probably want to special case version 0 so that you could remove all compat support if the option isn't defined, so it would maybe have to be '#if define(FREEBSD_COMPAT_VERSION) && FREEBSD_COMPAT_VERSION <= 4'. -- John Baldwin