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
F102067596: D16119.id105823.diff
Thu, Nov 7, 5:24 AM
F102063858: D16119.diff
Thu, Nov 7, 4:17 AM
F102037755: D16119.diff
Wed, Nov 6, 8:06 PM
Unknown Object (File)
Sun, Oct 27, 6:00 PM
Unknown Object (File)
Fri, Oct 25, 1:55 PM
Unknown Object (File)
Thu, Oct 17, 1:54 PM
Unknown Object (File)
Thu, Oct 17, 2:50 AM
Unknown Object (File)
Mon, Oct 14, 12:03 PM

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
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.