svn commit: r357761 - head/sys/netinet

Conrad Meyer cem at freebsd.org
Tue Feb 11 18:18:57 UTC 2020


Hi Michael,

On Tue, Feb 11, 2020 at 6:00 AM Michael Tuexen <tuexen at freebsd.org> wrote:
>
> Author: tuexen
> Date: Tue Feb 11 14:00:27 2020
> New Revision: 357761
> URL: https://svnweb.freebsd.org/changeset/base/357761
>
> Log:
>   Use an int instead of a bool variable, since bool is not supported
>   on all platforms the stack is running on in userland.

Maybe the platforms stuck in time before 1999 can be worked around
with something trivial like:

#if __STDC_VERSION__ < 199901L
# warn Really really consider getting a new compiler
typedef unsigned char _Bool;
# define bool _Bool
# define true ((_Bool)1)
# define false ((_Bool)0)
#endif

Rather than inflicting the 80s on FreeBSD tree code?  This commit
seems like a step in the wrong direction and just for example,
contravenes style(9).

SCTP is already one of the buggiest areas of the kernel, and it can't
be touched by outsiders for fear of breaking compatibility with the
purported myriad other platforms it is also ported to.  By transitive
property, it also prevents modifying _any_ APIs SCTP consumes that
happen to be implemented on other platforms.  This hamstrings the
kernel for what is obviously not functional code (throw a dart at a
syzkaller report and better than 90% odds it's a SCTP panic), much
less code a reasonable person would want to use in a
security-sensitive context.

If SCTP is intended to be a port from some legacy platform, perhaps it
should live in ports rather than base?

Thanks,
Conrad


More information about the svn-src-all mailing list