Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



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.


+--------------------+--------------------------+----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:    |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost    |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost  |
| & Network Engineer |                          | pgoyette99%gmail.com@localhost |
+--------------------+--------------------------+----------------------+


Home | Main Index | Thread Index | Old Index