From owner-freebsd-usb@FreeBSD.ORG Sun Jul 11 20:08:37 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C5A51065676; Sun, 11 Jul 2010 20:08:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1038B8FC0C; Sun, 11 Jul 2010 20:08:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o6BK3Qro020493; Sun, 11 Jul 2010 14:03:26 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 11 Jul 2010 14:03:44 -0600 (MDT) Message-Id: <20100711.140344.239525524663396359.imp@bsdimp.com> To: yanefbsd@gmail.com From: "M. Warner Losh" In-Reply-To: References: <20100707185928.GA16180@icarus.home.lan> <4C34E0E6.9070801@aldan.algebra.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: re@freebsd.org, tom@hur.st, freebsd-usb@freebsd.org, freebsd-stable@freebsd.org, mi+thun@aldan.algebra.com, freebsd@jdc.parodius.com Subject: Re: 8.x grudges X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:08:37 -0000 In message: Garrett Cooper writes: : On Wed, Jul 7, 2010 at 1:17 PM, Mikhail T. wrote: : > 07.07.2010 14:59, Jeremy Chadwick ???????(??): : >>> : >>> =A0 =A0 =A0FREEBSD_COMPAT7 kernel option is, apparently, a requir= ement (and : >>> =A0 =A0 =A0thus not an "option") -- the kernel-config files, that= worked with : >>> =A0 =A0 =A07.x, break without this option in them (in addition to= all the : >>> =A0 =A0 =A0nuisance, that's documented in UPDATING -- which, some= how, makes : >>> =A0 =A0 =A0the breakage acceptable). config(8) would not warn abo= ut this, but : >>> =A0 =A0 =A0kernel build fails. : >>> : >> : >> We don't use this option (meaning it's removed from our kernels). = =A0It's : >> definitely not required. =A0All it does is ensure your kernel can : >> comprehend executables/binaries built on 7.x. : >> : > : > Attached is the kernel config-file (i386), that worked fine under 7= .x. The : > kernel-compile will break (some *freebsd7* structs undefined), with= out the : > COMPAT_FREEBSD7 option. Try it for yourself... : = : options SYSVSHM # SYSV-style shared memory : options SYSVMSG # SYSV-style message queues : options SYSVSEM # SYSV-style semaphores : = : Those require COMPAT_FREEBSD7. This does seem like a bug: : = : static struct syscall_helper_data shm_syscalls[] =3D { : SYSCALL_INIT_HELPER(shmat), : SYSCALL_INIT_HELPER(shmctl), : SYSCALL_INIT_HELPER(shmdt), : SYSCALL_INIT_HELPER(shmget), : #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ : defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) : SYSCALL_INIT_HELPER(freebsd7_shmctl), : #endif : = : The check should be for COMPAT_FREEBSD7 only I would think. : = : Apart from that, everything else should work without it I would think= .= You would think that, but you'd be wrong. In general, if you have COMPAT_FREEBSDx defined, you need all COMPAT_FREEBSDy for y > x defined. The reason for this is that we name the compat shim for the version where it was removed, but it is needed for all prior versions. freebsd7_shmctl is needed to emulate the earlier versions as well... This is why we'd like to move to something more like COMPAT_MIN_FREEBSD=3Dz, but there's hooks into the config system and syscall tables that make it tricky... Warner