Minor lockdown fixups
Subsystems (4)
cover Minor lockdown fixups
Constify some arrays and fix an #ifdef that I typoed.
PATCH 1/2 security: constify some arrays in lockdown LSM
No reason for these not to be const.
Signed-off-by Matthew Garrett <[email protected]>
Suggested-by David Howells <[email protected]>
--- security/lockdown/lockdown.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
security/lockdown/lockdown.c +2 -2
@@ -16,7 +16,7 @@static enum lockdown_reason kernel_locked_down; -static char *lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX +1 ] = { +static const char *const lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX +1 ] = { [LOCKDOWN_NONE ] ="none" , [LOCKDOWN_MODULE_SIGNATURE ] ="unsigned module loading" , [LOCKDOWN_DEV_MEM ] ="/dev/mem,kmem,port" ,
@@ -40,7 +40,7 @@ static char *lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = { [LOCKDOWN_CONFIDENTIALITY_MAX] = "confidentiality", }; -static enum lockdown_reason lockdown_levels[] = {LOCKDOWN_NONE , +static const enum lockdown_reason lockdown_levels[] = {LOCKDOWN_NONE ,LOCKDOWN_INTEGRITY_MAX ,LOCKDOWN_CONFIDENTIALITY_MAX };
Signature · 1 line
2.23.0.162.g0b9fbb3734-goog
PATCH 2/2 kexec: Fix file verification on S390
In reply to Matthew GarrettI accidentally typoed this #ifdef, so verification would always be disabled.
Signed-off-by Matthew Garrett <[email protected]>
Reported-by Philipp Rudo <[email protected]>
--- arch/s390/kernel/kexec_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/kexec_elf.c +1 -1
@@ -130,7 +130,7 @@ static int s390_elf_probe(const char *buf, unsigned long len)const struct kexec_file_ops s390_kexec_elf_ops = { .probe = s390_elf_probe, .load = s390_elf_load, -#ifdef CONFIG_KEXEC__SIG +#ifdef CONFIG_KEXEC_SIG .verify_sig = s390_verify_sig, #endif /* CONFIG_KEXEC_SIG */ };
Signature · 1 line
2.23.0.162.g0b9fbb3734-goog
James Morris
maintainerQuoted 2 lines · Matthew Garrett
Constify some arrays and fix an #ifdef that I typoed.
Applied togit://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-lockdown and next-testing
Signature · 2 lines
James Morris <[email protected]>