Source-Changes-HG archive

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

[src/trunk]: src/share/man module(9), sysctl(7): Document kern.module.autounl...



details:   https://anonhg.NetBSD.org/src/rev/e51f63fd1bef
branches:  trunk
changeset: 368909:e51f63fd1bef
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Aug 12 15:43:38 2022 +0000

description:
module(9), sysctl(7): Document kern.module.autounload_unsafe.

diffstat:

 share/man/man7/sysctl.7 |  15 +++++++++++----
 share/man/man9/module.9 |   9 +++++++--
 2 files changed, 18 insertions(+), 6 deletions(-)

diffs (70 lines):

diff -r b5dda10f1d29 -r e51f63fd1bef share/man/man7/sysctl.7
--- a/share/man/man7/sysctl.7   Fri Aug 12 15:30:41 2022 +0000
+++ b/share/man/man7/sysctl.7   Fri Aug 12 15:43:38 2022 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sysctl.7,v 1.158 2022/08/09 08:03:22 knakahara Exp $
+.\"    $NetBSD: sysctl.7,v 1.159 2022/08/12 15:43:38 riastradh Exp $
 .\"
 .\" Copyright (c) 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -842,20 +842,27 @@
 .It Li kern.module
 Settings related to kernel modules.
 The third level names for the settings are described below.
-.Bl -column "kern.module.autoload" "integer" "Changeable" -offset indent
+.Bl -column "kern.module.autounload_unsafe" "integer" "Changeable" -offset indent
 .It Sy Third level name Ta Sy Type Ta Sy Changeable
 .It kern.module.autoload       integer yes
+.It kern.module.autounload_unsafe      integer yes
 .It kern.module.autotime       integer yes
 .It kern.module.verbose        boolean yes
 .El
 .Pp
 The variables are as follows:
-.Bl -tag -width "123456"
+.Bl -tag -width 6n
 .It Li kern.module.autoload
 A boolean that controls whether kernel modules are loaded automatically.
 See
 .Xr module 7
-for additional details.
+for details.
+.It Li kern.module.autounload_unsafe
+A boolean that controls whether the kernel will autounload modules that
+were automatically loaded and have not been audited for autounload.
+.Pp
+By default, only modules that have been audited will be autounloaded,
+and only if they were autoloaded to begin with.
 .It Li kern.module.autotime
 An integer that controls the delay before an attempt is made to
 automatically unload a module that was auto-loaded.
diff -r b5dda10f1d29 -r e51f63fd1bef share/man/man9/module.9
--- a/share/man/man9/module.9   Fri Aug 12 15:30:41 2022 +0000
+++ b/share/man/man9/module.9   Fri Aug 12 15:43:38 2022 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: module.9,v 1.53 2021/07/22 01:38:45 pgoyette Exp $
+.\"    $NetBSD: module.9,v 1.54 2022/08/12 15:43:38 riastradh Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -347,7 +347,7 @@
 The module subsystem uses a kernel thread to attempt to automatically
 unload modules a short time (currently, 10 seconds) after being loaded by
 .Fn module_autoload .
-Before the module is unloaded, its
+Before the module is unloaded by this thread, its
 .Fn modcmd
 is called with the
 .Fa cmd
@@ -355,6 +355,11 @@
 .Dv MODULE_CMD_AUTOUNLOAD .
 A module can prevent itself from being unloaded by returning a non-zero
 value.
+Exception: If
+.Li kern.module.autounload_unsafe
+is set, a module that returns
+.Er ENOTTY ,
+meaning it does not understand the command, may still be autounloaded.
 .Pp
 The
 .Fn module_autoload



Home | Main Index | Thread Index | Old Index