Skip to content

Commit

Permalink
kernel.modules: Reference boot.kernel-parameters for module options
Browse files Browse the repository at this point in the history
Users of Bottlerocket had asked for an easy way to set module parameters
through user data [0]. That way already exists through kernel-parameters.
Document that settings.boot.kernel-parameters is to be used to set
module options.

Details on why adding extra settings under settings.kernel.modules to
achieve this can be found on the issue [1]

[0] bottlerocket-os/bottlerocket#3747
[1] bottlerocket-os/bottlerocket#3747 (comment)

Signed-off-by: Leonard Foerster <foersleo@amazon.com>
  • Loading branch information
foersleo committed Feb 23, 2024
1 parent 18744aa commit 14bbe06
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
11 changes: 11 additions & 0 deletions data/settings/1.16.x/kernel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ warning = "This setting only affects *loading* of kernel modules at boot time. C
description = """
Allows (`true`) or disallows (`false`) the loading of kernel module `<name>`.
"""
see = [
[ "settings", "boot", "kernel-parameters" ]
]
note = """
Use [`settings.boot.kernel-parameters`](../boot/#kernel-parameters) to set module parameters through the kernel command line.
"""
accepted_values = [
"`true`",
"`false`"
Expand Down Expand Up @@ -61,9 +67,14 @@ direct_toml = """
[[docs.ref.modules_autoload]]
name_override = "modules.<name>.autoload"
description = "If `true`, the kernel `<name>` module loads automatically on boot."
see = [
[ "settings", "boot", "kernel-parameters" ]
]
note = """
You must use this setting in conjuction with [`settings.kernel.modules.<name>.allowed`](#modules_allowed) on the same module.
This ensures that the OS doesn't auto-load a blocked module.
Use [`settings.boot.kernel-parameters`](../boot/#kernel-parameters) to set module parameters through the kernel command line.
"""
accepted_values = [
"`true`",
Expand Down
11 changes: 11 additions & 0 deletions data/settings/1.17.x/kernel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ warning = "This setting only affects *loading* of kernel modules at boot time. C
description = """
Allows (`true`) or disallows (`false`) the loading of kernel module `<name>`.
"""
see = [
[ "settings", "boot", "kernel-parameters" ]
]
note = """
Use [`settings.boot.kernel-parameters`](../boot/#kernel-parameters) to set module parameters through the kernel command line.
"""
accepted_values = [
"`true`",
"`false`"
Expand Down Expand Up @@ -61,9 +67,14 @@ direct_toml = """
[[docs.ref.modules_autoload]]
name_override = "modules.<name>.autoload"
description = "If `true`, the kernel `<name>` module loads automatically on boot."
see = [
[ "settings", "boot", "kernel-parameters" ]
]
note = """
You must use this setting in conjuction with [`settings.kernel.modules.<name>.allowed`](#modules_allowed) on the same module.
This ensures that the OS doesn't auto-load a blocked module.
Use [`settings.boot.kernel-parameters`](../boot/#kernel-parameters) to set module parameters through the kernel command line.
"""
accepted_values = [
"`true`",
Expand Down
11 changes: 11 additions & 0 deletions data/settings/1.18.x/kernel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ warning = "This setting only affects *loading* of kernel modules at boot time. C
description = """
Allows (`true`) or disallows (`false`) the loading of kernel module `<name>`.
"""
see = [
[ "settings", "boot", "kernel-parameters" ]
]
note = """
Use [`settings.boot.kernel-parameters`](../boot/#kernel-parameters) to set module parameters through the kernel command line.
"""
accepted_values = [
"`true`",
"`false`"
Expand Down Expand Up @@ -61,9 +67,14 @@ direct_toml = """
[[docs.ref.modules_autoload]]
name_override = "modules.<name>.autoload"
description = "If `true`, the kernel `<name>` module loads automatically on boot."
see = [
[ "settings", "boot", "kernel-parameters" ]
]
note = """
You must use this setting in conjuction with [`settings.kernel.modules.<name>.allowed`](#modules_allowed) on the same module.
This ensures that the OS doesn't auto-load a blocked module.
Use [`settings.boot.kernel-parameters`](../boot/#kernel-parameters) to set module parameters through the kernel command line.
"""
accepted_values = [
"`true`",
Expand Down
11 changes: 11 additions & 0 deletions data/settings/1.19.x/kernel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ warning = "This setting only affects *loading* of kernel modules at boot time. C
description = """
Allows (`true`) or disallows (`false`) the loading of kernel module `<name>`.
"""
see = [
[ "settings", "boot", "kernel-parameters" ]
]
note = """
Use [`settings.boot.kernel-parameters`](../boot/#kernel-parameters) to set module parameters through the kernel command line.
"""
accepted_values = [
"`true`",
"`false`"
Expand Down Expand Up @@ -61,9 +67,14 @@ direct_toml = """
[[docs.ref.modules_autoload]]
name_override = "modules.<name>.autoload"
description = "If `true`, the kernel `<name>` module loads automatically on boot."
see = [
[ "settings", "boot", "kernel-parameters" ]
]
note = """
You must use this setting in conjuction with [`settings.kernel.modules.<name>.allowed`](#modules_allowed) on the same module.
This ensures that the OS doesn't auto-load a blocked module.
Use [`settings.boot.kernel-parameters`](../boot/#kernel-parameters) to set module parameters through the kernel command line.
"""
accepted_values = [
"`true`",
Expand Down

0 comments on commit 14bbe06

Please sign in to comment.