Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 May 2022 03:51:52 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Ed Maste <emaste@freebsd.org>
Cc:        FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: breaking modules
Message-ID:  <dd949a29-07ef-004b-4fe6-60ad3ff732ad@grosbein.net>
In-Reply-To: <CAPyFy2DwP8FFJeezhmvwRRY%2BRtcJ49puU0fsoDXasbu5Lv8giQ@mail.gmail.com>
References:  <202204281527.23SFRbKU090763@fire.js.berklix.net> <CAPyFy2BAazqi9vqjWwM94qEeF%2Bh5MBTTy94PbbNH-N-5w4_9_w@mail.gmail.com> <5a9a751e-4042-57cb-5f34-e300e0050ad1@grosbein.net> <CAPyFy2DwP8FFJeezhmvwRRY%2BRtcJ49puU0fsoDXasbu5Lv8giQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
04.05.2022 2:42, Ed Maste wrote:

> On Fri, 29 Apr 2022 at 14:43, Eugene Grosbein <eugen@grosbein.net> wrote:
>>
>> For example:
>>
>> if_em           https://cgit.freebsd.org/src/commit/?id=c0460cf2e42d2819c1f191a1d6e1b3dc0c7ea010
>> if_epair        https://cgit.freebsd.org/src/commit/?id=7a382e744b0b0ba9b51dc34bfa0cd1515f744f25
>> linuxkpi        https://cgit.freebsd.org/src/commit/?id=f5a2e7b0e8483bf51519046fd149a6a31acef6b1
> 
> Ah, yes. We should add a CI task to build all modules outside of the
> kernel tree.

Also, there are multiple modules that can be built standalone just fine
but cannot be loaded with GENERIC kernel. In case of stable/12 examples are:

ipfw.ko;
if_lagg.ko;
if_bridge.ko and bridgestp.ko;
linux_common.ko, linprocfs.ko, linux.ko and linux64.ko;
h_ertt.ko and cc_chd.ko and surely many others.

Noted modules are built standalone without VIMAGE support but GENERIC has options VIMAGE,
hence ABI incompatibility. Somewhat hackish workaround is the following line added to /etc/src.conf:

CFLAGS+=        -DVIMAGE=1

This restores ABI compatibility. Unfortunately, we have no VIMAGE= nor WITH_VIMAGE= knob.
See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230009
that contains a patch by ae@ 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?dd949a29-07ef-004b-4fe6-60ad3ff732ad>