Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jul 2010 14:03:44 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        yanefbsd@gmail.com
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
Message-ID:  <20100711.140344.239525524663396359.imp@bsdimp.com>
In-Reply-To: <AANLkTikdJ39LiaFfibdwkFa1VgT4w7M8tOXeVJYkHF_W@mail.gmail.com>
References:  <20100707185928.GA16180@icarus.home.lan> <4C34E0E6.9070801@aldan.algebra.com> <AANLkTikdJ39LiaFfibdwkFa1VgT4w7M8tOXeVJYkHF_W@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <AANLkTikdJ39LiaFfibdwkFa1VgT4w7M8tOXeVJYkHF_W@mail.gmail.c=
om>
            Garrett Cooper <yanefbsd@gmail.com> writes:
: On Wed, Jul 7, 2010 at 1:17 PM, Mikhail T. <mi+thun@aldan.algebra.com=
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100711.140344.239525524663396359.imp>