Page MenuHomeFreeBSD

emulators/virtualbox-ose-kmod*: Tie to a specific release branch.
ClosedPublic

Authored by jhb on Jul 3 2018, 11:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 16, 10:37 AM
Unknown Object (File)
Sun, Jul 14, 3:34 AM
Unknown Object (File)
Sat, Jul 13, 12:00 PM
Unknown Object (File)
Tue, Jul 9, 11:22 PM
Unknown Object (File)
Sat, Jul 6, 10:45 AM
Unknown Object (File)
Wed, Jul 3, 8:14 PM
Unknown Object (File)
Wed, Jul 3, 11:33 AM
Unknown Object (File)
Thu, Jun 27, 11:12 AM

Details

Summary

Use a more restricted range of supported FreeBSD_version values
for the virtualbox kernel module since it uses internal KPIs for
which KBI stability is not guaranteed. DECLARE_MODULE_TIED would
tie the module to a specific
FreeBSD_version which would cause
the module to stop loading when an SA or EN is pushed on a release
branch. Instead, use DECLARE_MODULE_MAXVER with an upper bound
that is limited to the range of a releng branch so that a module
built on X.Y will load on X.Y with SAs or ENs applied but will
fail to load on X.Y-1 or X.Y+1.

Test Plan
  • only compiled, would be good to do runtime testing. This came up at BSDCan as the package built on 11.1 panics when loaded on an 11.2 kernel. This just avoids the panic in that case.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 43131
Build 40019: arc lint + arc unit

Event Timeline

linimon retitled this revision from Tie the virtualbox kernel module to a specific release branch. to emulators/virtualbox-ose-kmod: Tie the virtualbox kernel module to a specific release branch..Jul 18 2018, 1:03 PM
This revision is now accepted and ready to land.Sep 22 2020, 2:33 PM

I will rebase this. @imp and @manu. We might want to do something similar for drm kmods? Not sure if we would want to add KERNEL_RELBRANCHEND upstream in FreeBSD itself at some point? If DRM uses some wrapper around DECLARE_MODULE like DEV_MODULE then it might be simpler to add a dummy module that can use DECLARE_MODULE_WITH_MAXVER directly rather than plumbing through a variant of DEV_MODULE.

jhb retitled this revision from emulators/virtualbox-ose-kmod: Tie the virtualbox kernel module to a specific release branch. to emulators/virtualbox-ose-kmod*: Tie to a specific release branch..Nov 19 2021, 11:23 PM
  • Rebase to current main.
  • Patch legacy port.
This revision now requires review to proceed.Nov 19 2021, 11:38 PM
In D16119#746914, @jhb wrote:

I will rebase this. @imp and @manu. We might want to do something similar for drm kmods? Not sure if we would want to add KERNEL_RELBRANCHEND upstream in FreeBSD itself at some point? If DRM uses some wrapper around DECLARE_MODULE like DEV_MODULE then it might be simpler to add a dummy module that can use DECLARE_MODULE_WITH_MAXVER directly rather than plumbing through a variant of DEV_MODULE.

I wasn't aware that this could be possible, I like this a lot. I'll do test and adapt drm-kmod.

Any thoughts from any of the port maintainers?

kevans added a subscriber: kevans.

LGTM; I kind of wonder if we should also have a message at install-time about this.

This revision is now accepted and ready to land.Dec 3 2021, 7:55 PM

I like the idea.

I also think this should be mentioned in the pkg-message to make sure users are informed.

This revision now requires review to proceed.Dec 3 2021, 11:38 PM
This revision is now accepted and ready to land.May 10 2022, 8:43 PM

Fix the pkg-message to actually work.

This revision now requires review to proceed.May 10 2022, 8:47 PM
This revision was not accepted when it landed; it landed in state Needs Review.May 10 2022, 8:50 PM
This revision was automatically updated to reflect the committed changes.