Skip to content

Commit f8a9bc6

Browse files
Matthew GarrettJames Morris
authored andcommitted
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]> Signed-off-by: James Morris <[email protected]>
1 parent b602614 commit f8a9bc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

security/lockdown/lockdown.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
static enum lockdown_reason kernel_locked_down;
1818

19-
static char *lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = {
19+
static const char *const lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = {
2020
[LOCKDOWN_NONE] = "none",
2121
[LOCKDOWN_MODULE_SIGNATURE] = "unsigned module loading",
2222
[LOCKDOWN_DEV_MEM] = "/dev/mem,kmem,port",
@@ -40,7 +40,7 @@ static char *lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = {
4040
[LOCKDOWN_CONFIDENTIALITY_MAX] = "confidentiality",
4141
};
4242

43-
static enum lockdown_reason lockdown_levels[] = {LOCKDOWN_NONE,
43+
static const enum lockdown_reason lockdown_levels[] = {LOCKDOWN_NONE,
4444
LOCKDOWN_INTEGRITY_MAX,
4545
LOCKDOWN_CONFIDENTIALITY_MAX};
4646

0 commit comments

Comments
 (0)