tech-kern archive

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

Re: Proposal: Disable autoload of compat_xyz modules



Le 31/07/2017 à 23:39, Taylor R Campbell a écrit :
Many of our binary compatibility modules are notoriously ridden with
bugs.  We currently have no way to automatically test them.  Some of
them are maintained; some of them are not.  The value of having NetBSD
automatically try to execute a SCO Unix binary, for example, seems
rather weak compared to the security risk of the attack surface.

So I propose to exclude all non-NetBSD, non-ELF/a.out compat modules
from autoloading by exec, and remove them from all GENERIC kernels.
Under this proposal, if you want them in your system, you can add them
to your kernel config or modload them explicitly.

Yes, that's the right thing to do.

I haven't rechecked, but as far as I remember, there will be some issues with
the compat layers that have several #ifdefs deep into the machdep code.

Apart from that, several files could usefully be moved into the appropriate
compat_xyz directory, instead of polluting sys/arch/. For example:

	sys/arch/amd64/amd64/linux_*    ->   sys/compat/linux/arch/amd64/
	sys/arch/amd64/amd64/linux32_*  ->   sys/compat/linux32/arch/amd64/

This would provide a better encapsulation.


Home | Main Index | Thread Index | Old Index