On Sun, 7 Aug 2022, Paul Goyette wrote:
On Sun, 7 Aug 2022, Taylor R Campbell wrote:Module Name: src Committed By: riastradh Date: Sun Aug 7 21:17:18 UTC 2022 Modified Files: src/sys/kern: kern_module.c Log Message: module(9): Disable module autounload by default. I don't know why this was ever enabled by default; many modules are still not safe to unload, let alone autounload. If any autounload is to happen by default, it should only be for modules that have opted into it in some way after audit.One reason for the current behavior involves the modules used for various emulations. When a file is executed, and none of the currently-loaded modules can "deal" with it, we load _all_ of the available emulation modules with the hope that one of them will "deal with" the new executable, and with the expectation that the remaining emulation modules will just "go away". Modules that are known to be unsafe to unload should declare that in their modcmd() unload (by returning EBUSY). After all, one might well expect that the module itself is the most likely place that the unloadable status would be known. Making no-autounload as the default seems like using a 20-pound sledge hammer on a carpet tack.
I might also note that making such a fundamental behavior change when we're so close to the -10 release, without actually providing the suggested "opt-in" mechanism to retain current behavior, is not very user friendly. :-) At least this should be discussed (on tech-kern@, perhaps) before being unilaterally decided and committed. IIRC, we had this discussion some time ago, and the decision at that time was to retain current behavior. Unfortunately, I didn't save any pointer to that old discussion. :-(
+--------------------+--------------------------+----------------------+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | [email protected] | | Software Developer | 0786 F758 55DE 53BA 7731 | [email protected] | | & Network Engineer | | [email protected] | +--------------------+--------------------------+----------------------+ !DSPAM:62f0321a29502088639869!
+--------------------+--------------------------+----------------------+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | [email protected] | | Software Developer | 0786 F758 55DE 53BA 7731 | [email protected] | | & Network Engineer | | [email protected] | +--------------------+--------------------------+----------------------+
