Skip to content

Commit 74560bb

Browse files
Joelgranadospcmoore
authored andcommitted
lsm: remove the now superfluous sentinel element from ctl_table array
This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Remove the sentinel from all files under security/ that register a sysctl table. Signed-off-by: Joel Granados <j.granados@samsung.com> Acked-by: Kees Cook <keescook@chromium.org> # loadpin & yama Tested-by: Valentin Schneider <vschneid@redhat.com> Reviewed-by: Valentin Schneider <vschneid@redhat.com> [PM: subject line tweaks] Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 4cece76 commit 74560bb

File tree

4 files changed

+0
-4
lines changed

4 files changed

+0
-4
lines changed

security/apparmor/lsm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,6 @@ static struct ctl_table apparmor_sysctl_table[] = {
20642064
.mode = 0600,
20652065
.proc_handler = apparmor_dointvec,
20662066
},
2067-
{ }
20682067
};
20692068

20702069
static int __init apparmor_init_sysctl(void)

security/keys/sysctl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ static struct ctl_table key_sysctls[] = {
6666
.extra2 = (void *) SYSCTL_INT_MAX,
6767
},
6868
#endif
69-
{ }
7069
};
7170

7271
static int __init init_security_keys_sysctls(void)

security/loadpin/loadpin.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ static struct ctl_table loadpin_sysctl_table[] = {
6363
.extra1 = SYSCTL_ONE,
6464
.extra2 = SYSCTL_ONE,
6565
},
66-
{ }
6766
};
6867

6968
static void set_sysctl(bool is_writable)

security/yama/yama_lsm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ static struct ctl_table yama_sysctl_table[] = {
463463
.extra1 = SYSCTL_ZERO,
464464
.extra2 = &max_scope,
465465
},
466-
{ }
467466
};
468467
static void __init yama_init_sysctl(void)
469468
{

0 commit comments

Comments
 (0)