Maxime Villard writes: > Le 22/03/2015 19:27, Jean-Yves Migeon a écrit : > > Le 20/03/2015 17:44, Maxime Villard a écrit : > >> In fact, I have a better solution. > >> > >> What about adding a .enabled={0;1} sysctl to each compat module? This way > >> the Linux/FreeBSD modules are available by default, but not enabled. > > > > What do you mean by "enabled"? > > - Enabling explicit module use by root? > > - Enabling module autoload when a FreeBSD binary is called? > > - Enabling syscalls? (Modules are loaded but all syscall return an error > > otherwise) > > > > Ah yes! Modules can be autoloaded. My sysctl idea does not work.
sure it could work. if you made ELFNAME2(freebsd,probe) look at your proposed sysctl and return an error if not enabled, then the whole module would not be accessible. nothing would ever be able to execute with the freebsd exec_package. > I'll remove COMPAT_FREEBSD from GENERIC. i have an even better idea: mark the compat_freebsd module with a "noautoload" property and then it *won't* be autoloaded, and people can easily load it manually to enable running tw_cli. and another suggestion that i hope isn't also a problem: remove the freebsd a.out compat support, as we don't have anything that actually matters here. thanks. .mrg.