LSM: Ignore "security=" when "lsm=" is specified
Subsystems (3)
PATCH v2 1/1 LSM: Ignore "security=" when "lsm=" is specified
To avoid potential confusion, explicitly ignore "security=" when "lsm=" is used on the command line, and report that it is happening.
--- Documentation/admin-guide/kernel-parameters.txt | 10 ++++------ security/security.c | 8 ++++++-- 2 files changed, 10 insertions(+), 8 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +4 -6
@@ -2340,7 +2340,7 @@ lsm=lsm1,...,lsmN [SECURITY] Choose order of LSM initialization. This - overrides CONFIG_LSM. + overrides CONFIG_LSM, and the "security=" parameter. machvec= [IA-64] Force the use of a particular machine-vector (machvec) in a generic kernel.
@@ -4129,11 +4129,9 @@ Note: increases power consumption, thus should only be enabled if running jitter sensitive (HPC/RT) workloads. - security= [SECURITY] Choose a security module to enable at boot. - If this boot parameter is not specified, only the first - security module asking for security registration will be - loaded. An invalid security module name will be treated - as if no module has been chosen. + security= [SECURITY] Choose a legacy "major" security module to + enable at boot. This has been deprecated by the + "lsm=" parameter. selinux= [SELINUX] Disable or enable SELinux at boot time. Format: { "0" | "1" }
security/security.c +6 -2
@@ -288,9 +288,13 @@ static void __init ordered_lsm_init(void) ordered_lsms =kcalloc (LSM_COUNT +1 ,sizeof (*ordered_lsms),GFP_KERNEL ); -if (chosen_lsm_order) +if (chosen_lsm_order) { +if (chosen_major_lsm) { +pr_info ("security= is ignored because it is superseded by lsm=\n" ); + chosen_major_lsm =NULL ; + }ordered_lsm_parse (chosen_lsm_order,"cmdline" ); -else + }else ordered_lsm_parse (builtin_lsm_order,"builtin" );for (lsm = ordered_lsms; *lsm; lsm++)
Signature · 5 lines
2.17.1 -- Kees Cook
Quoted 5 lines · Kees Cook
To avoid potential confusion, explicitly ignore "security=" when "lsm=" is used on the command line, and report that it is happening.
Suggested-by Tetsuo Handa <[email protected]>Signed-off-by Kees Cook <[email protected]>
Quoted 53 lines
--- Documentation/admin-guide/kernel-parameters.txt | 10 ++++------ security/security.c | 8 ++++++-- 2 files changed, 10 insertions(+), 8 deletions(-)Documentation/admin-guide/kernel-parameters.txt +4
-6@@ -2340,7 +2340,7 @@ lsm=lsm1,...,lsmN [SECURITY] Choose order of LSM initialization. This - overrides CONFIG_LSM. + overrides CONFIG_LSM, and the "security=" parameter. machvec= [IA-64] Force the use of a particular machine-vector (machvec) in a generic kernel.@@ -4129,11 +4129,9 @@ Note: increases power consumption, thus should only be enabled if running jitter sensitive (HPC/RT) workloads. - security= [SECURITY] Choose a security module to enable at boot. - If this boot parameter is not specified, only the first - security module asking for security registration will be - loaded. An invalid security module name will be treated - as if no module has been chosen. + security= [SECURITY] Choose a legacy "major" security module to + enable at boot. This has been deprecated by the + "lsm=" parameter. selinux= [SELINUX] Disable or enable SELinux at boot time. Format: { "0" | "1" }security/security.c +6
-2@@ -288,9 +288,13 @@ static void __init ordered_lsm_init(void) ordered_lsms =kcalloc (LSM_COUNT +1 ,sizeof (*ordered_lsms),GFP_KERNEL ); -if (chosen_lsm_order) +if (chosen_lsm_order) { +if (chosen_major_lsm) { +pr_info ("security= is ignored because it is superseded by lsm=\n" ); + chosen_major_lsm =NULL ; + }ordered_lsm_parse (chosen_lsm_order,"cmdline" ); -else + }else ordered_lsm_parse (builtin_lsm_order,"builtin" );for (lsm = ordered_lsms; *lsm; lsm++)
Quoted 9 lines · Casey Schaufler
Quoted 5 lines · Kees Cook
To avoid potential confusion, explicitly ignore "security=" when "lsm=" is used on the command line, and report that it is happening.
Suggested-by Tetsuo Handa <[email protected]>Signed-off-by Kees Cook <[email protected]>Acked-by Casey Schaufler <[email protected]>
The manual for TOMOYO was updated to follow this change. SELinux folks and AppArmor folks, can we apply this change?
Paul Moore
maintainerQuoted 5 lines · Tetsuo Handa
Quoted 4 lines · Casey Schaufler
Quoted 3 lines · Kees Cook
To avoid potential confusion, explicitly ignore "security=" when "lsm=" is used on the command line, and report that it is happening.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Suggested-by Tetsuo Handa <[email protected]>Signed-off-by Kees Cook <[email protected]>Acked-by Casey Schaufler <[email protected]>The manual for TOMOYO was updated to follow this change. SELinux folks and AppArmor folks, can we apply this change?
My main concern is that "selinux={0|1}" continues to work as it has for years. It doesn't look like this affects that, but I can't say I've dug into these changes very far.
Signature · 2 lines
paul moore www.paul-moore.com
Quoted 3 lines · Paul Moore
My main concern is that "selinux={0|1}" continues to work as it has for years. It doesn't look like this affects that, but I can't say I've dug into these changes very far.
Yup, no worries; it does. :)
Signature · 1 line
Kees Cook
Quoted 5 lines · Tetsuo Handa
Quoted 4 lines · Casey Schaufler
Quoted 3 lines · Kees Cook
To avoid potential confusion, explicitly ignore "security=" when "lsm=" is used on the command line, and report that it is happening.
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
Suggested-by Tetsuo Handa <[email protected]>Signed-off-by Kees Cook <[email protected]>Acked-by Casey Schaufler <[email protected]>The manual for TOMOYO was updated to follow this change. SELinux folks and AppArmor folks, can we apply this change?
No response from Ubuntu kernel team. Redirecting to AppArmor list...
John Johansen
Acked-byQuoted 9 lines · Tetsuo Handa
Quoted 8 lines · Tetsuo Handa
Quoted 7 lines · Casey Schaufler
Quoted 5 lines · Kees Cook
To avoid potential confusion, explicitly ignore "security=" when "lsm=" is used on the command line, and report that it is happening.
Suggested-by Tetsuo Handa <[email protected]>Signed-off-by Kees Cook <[email protected]>
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Acked-by Casey Schaufler <[email protected]>The manual for TOMOYO was updated to follow this change. SELinux folks and AppArmor folks, can we apply this change?
No response from Ubuntu kernel team. Redirecting to AppArmor list...
yeah this is okay
James Morris
maintainerQuoted 5 lines · Kees Cook
To avoid potential confusion, explicitly ignore "security=" when "lsm=" is used on the command line, and report that it is happening.
Suggested-by Tetsuo Handa <[email protected]>Signed-off-by Kees Cook <[email protected]>
Applied togit://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general
Signature · 2 lines
James Morris <[email protected]>