Re: COMPAT_FREEBSD<ancient>

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Tue, 16 Sep 2025 13:06:56 UTC
On Tue, Sep 16, 2025 at 08:36:11AM -0400, Josef 'Jeff' Sipek wrote:
> Greetings,
> 
> A couple of months ago I was looking through some random kernel code and I
> noticed COMPAT_FREEBSD4 and friends.  I was curious how much code was behind
> those so I whipped up a couple of quick and dirty patches to remove
> COMPAT_FREEBSD4 and COMPAT_43.  The answer is about 1300 and 1800 loc,
> respectively.
> 
> Which brings up a question - at what point does it make sense to remove some
> of this code?
Never.

> IIUC, this code falls well outside the current policy around
> ABI compatibility.
How so?

> So the only thing that the removal of these compat
> layers should affect is source compatibility, but since this compat code is
You do not understand what ABI compat is.

> about syscalls (at least according to sys/conf/NOTES) any code still using
> these interfaces would have to explicitly invoke these compat syscalls and
> not their new replacements.  IOW, this should be a vanishingly small number
> of programs.  (As an additional data point, on amd64 GENERIC defines all of
> them but MINIMAL starts with COMPAT_FREEBSD10.)

We do run FreeBSD 1.0 binaries on HEAD, with the right config.  I do not see
a reason to break this.

> 
> I'm happy to clean up my diffs and get them into 16.0-CURRENT if there is
> interest.
I am not happy.