tech-kern archive

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

Re: Proposal, again: Disable autoload of compat_xyz modules



On Fri, 27 Sep 2019, Valery Ushakov wrote:

On Fri, Sep 27, 2019 at 11:36:08 -0000, Christos Zoulas wrote:

} I propose something very slightly different that can preserve the current
} functionality with user action:
}
} 1. Remove them from standard kernels in architectures where modules are
}    supported. Users can add them back or just use modules.
} 2. Disable autoloading, but provide a sysctl to enable autoloading
}    (1 global sysctl for all compat modules). Users can change the default
}    in /etc/sysctl.conf (adds sysctl to the proposal)

    You mean this (first line):

i386devel: {31} sysctl kern.module
kern.module.autoload = 0
kern.module.verbose = 0
kern.module.path = /stand/amd64-xen/8.99.26/modules
kern.module.autotime = 10

Perhaps:

kern.module.autoload.disable = linux,linux32

May be we should take a look at how SNMP did tables in MIB, b/c we are
trying to create just such a table indexed by module name.

Also, I'm not that sure about autoload of compat stuff especially
since iirc it currently implies auto-unload too.  I vaguely remember
when I was debugging something in sh3 kobj_machdep.c I had some
printfs there that made the autoloads visibile and (iirc) each vi
invocation would trigger an autoload of compat ioctl code (which
wouldn't recognize the ioctl, and that would be auto-unloaded a few
seconds later).

kern.module.autotime controls the delay before the auto-unload takes
place.  I think if you set it to zero, it will never auto-unload.


+--------------------+--------------------------+-----------------------+
| 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   |
+--------------------+--------------------------+-----------------------+


Home | Main Index | Thread Index | Old Index