Skip to content

Commit 426ee51

Browse files
committed
Merge tag 'sysctl-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux
Pull sysctl updates from Luis Chamberlain: "To help make the move of sysctls out of kernel/sysctl.c not incur a size penalty sysctl has been changed to allow us to not require the sentinel, the final empty element on the sysctl array. Joel Granados has been doing all this work. On the v6.6 kernel we got the major infrastructure changes required to support this. For v6.7-rc1 we have all arch/ and drivers/ modified to remove the sentinel. Both arch and driver changes have been on linux-next for a bit less than a month. It is worth re-iterating the value: - this helps reduce the overall build time size of the kernel and run time memory consumed by the kernel by about ~64 bytes per array - the extra 64-byte penalty is no longer inncurred now when we move sysctls out from kernel/sysctl.c to their own files For v6.8-rc1 expect removal of all the sentinels and also then the unneeded check for procname == NULL. The last two patches are fixes recently merged by Krister Johansen which allow us again to use softlockup_panic early on boot. This used to work but the alias work broke it. This is useful for folks who want to detect softlockups super early rather than wait and spend money on cloud solutions with nothing but an eventual hung kernel. Although this hadn't gone through linux-next it's also a stable fix, so we might as well roll through the fixes now" * tag 'sysctl-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: (23 commits) watchdog: move softlockup_panic back to early_param proc: sysctl: prevent aliased sysctls from getting passed to init intel drm: Remove now superfluous sentinel element from ctl_table array Drivers: hv: Remove now superfluous sentinel element from ctl_table array raid: Remove now superfluous sentinel element from ctl_table array fw loader: Remove the now superfluous sentinel element from ctl_table array sgi-xp: Remove the now superfluous sentinel element from ctl_table array vrf: Remove the now superfluous sentinel element from ctl_table array char-misc: Remove the now superfluous sentinel element from ctl_table array infiniband: Remove the now superfluous sentinel element from ctl_table array macintosh: Remove the now superfluous sentinel element from ctl_table array parport: Remove the now superfluous sentinel element from ctl_table array scsi: Remove now superfluous sentinel element from ctl_table array tty: Remove now superfluous sentinel element from ctl_table array xen: Remove now superfluous sentinel element from ctl_table array hpet: Remove now superfluous sentinel element from ctl_table array c-sky: Remove now superfluous sentinel element from ctl_talbe array powerpc: Remove now superfluous sentinel element from ctl_table arrays riscv: Remove now superfluous sentinel element from ctl_table array x86/vdso: Remove now superfluous sentinel element from ctl_table array ...
2 parents babe393 + 8b793bc commit 426ee51

File tree

38 files changed

+41
-60
lines changed

38 files changed

+41
-60
lines changed

arch/arm/kernel/isa.c

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

1717
static unsigned int isa_membase, isa_portbase, isa_portshift;
1818

19-
static struct ctl_table ctl_isa_vars[4] = {
19+
static struct ctl_table ctl_isa_vars[] = {
2020
{
2121
.procname = "membase",
2222
.data = &isa_membase,
@@ -35,7 +35,7 @@ static struct ctl_table ctl_isa_vars[4] = {
3535
.maxlen = sizeof(isa_portshift),
3636
.mode = 0444,
3737
.proc_handler = proc_dointvec,
38-
}, {}
38+
},
3939
};
4040

4141
static struct ctl_table_header *isa_sysctl_header;

arch/arm64/kernel/armv8_deprecated.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ struct insn_emulation {
5252
int min;
5353
int max;
5454

55-
/*
56-
* sysctl for this emulation + a sentinal entry.
57-
*/
58-
struct ctl_table sysctl[2];
55+
/* sysctl for this emulation */
56+
struct ctl_table sysctl;
5957
};
6058

6159
#define ARM_OPCODE_CONDTEST_FAIL 0
@@ -558,7 +556,7 @@ static void __init register_insn_emulation(struct insn_emulation *insn)
558556
update_insn_emulation_mode(insn, INSN_UNDEF);
559557

560558
if (insn->status != INSN_UNAVAILABLE) {
561-
sysctl = &insn->sysctl[0];
559+
sysctl = &insn->sysctl;
562560

563561
sysctl->mode = 0644;
564562
sysctl->maxlen = sizeof(int);

arch/arm64/kernel/fpsimd.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,6 @@ static struct ctl_table sve_default_vl_table[] = {
589589
.proc_handler = vec_proc_do_default_vl,
590590
.extra1 = &vl_info[ARM64_VEC_SVE],
591591
},
592-
{ }
593592
};
594593

595594
static int __init sve_sysctl_init(void)
@@ -613,7 +612,6 @@ static struct ctl_table sme_default_vl_table[] = {
613612
.proc_handler = vec_proc_do_default_vl,
614613
.extra1 = &vl_info[ARM64_VEC_SME],
615614
},
616-
{ }
617615
};
618616

619617
static int __init sme_sysctl_init(void)

arch/arm64/kernel/process.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,6 @@ static struct ctl_table tagged_addr_sysctl_table[] = {
724724
.extra1 = SYSCTL_ZERO,
725725
.extra2 = SYSCTL_ONE,
726726
},
727-
{ }
728727
};
729728

730729
static int __init tagged_addr_init(void)

arch/csky/abiv1/alignment.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ static struct ctl_table alignment_tbl[5] = {
329329
.mode = 0666,
330330
.proc_handler = &proc_dointvec
331331
},
332-
{}
333332
};
334333

335334
static int __init csky_alignment_init(void)

arch/powerpc/kernel/idle.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ static struct ctl_table powersave_nap_ctl_table[] = {
105105
.mode = 0644,
106106
.proc_handler = proc_dointvec,
107107
},
108-
{}
109108
};
110109

111110
static int __init

arch/powerpc/platforms/pseries/mobility.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ static struct ctl_table nmi_wd_lpm_factor_ctl_table[] = {
6161
.mode = 0644,
6262
.proc_handler = proc_douintvec_minmax,
6363
},
64-
{}
6564
};
6665

6766
static int __init register_nmi_wd_lpm_factor_sysctl(void)

arch/riscv/kernel/vector.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ static struct ctl_table riscv_v_default_vstate_table[] = {
255255
.mode = 0644,
256256
.proc_handler = proc_dobool,
257257
},
258-
{ }
259258
};
260259

261260
static int __init riscv_v_sysctl_init(void)

arch/s390/appldata/appldata_base.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ static struct ctl_table appldata_table[] = {
6363
.mode = S_IRUGO | S_IWUSR,
6464
.proc_handler = appldata_interval_handler,
6565
},
66-
{ },
6766
};
6867

6968
/*
@@ -351,8 +350,7 @@ int appldata_register_ops(struct appldata_ops *ops)
351350
if (ops->size > APPLDATA_MAX_REC_SIZE)
352351
return -EINVAL;
353352

354-
/* The last entry must be an empty one */
355-
ops->ctl_table = kcalloc(2, sizeof(struct ctl_table), GFP_KERNEL);
353+
ops->ctl_table = kcalloc(1, sizeof(struct ctl_table), GFP_KERNEL);
356354
if (!ops->ctl_table)
357355
return -ENOMEM;
358356

arch/s390/kernel/debug.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,6 @@ static struct ctl_table s390dbf_table[] = {
978978
.mode = S_IRUGO | S_IWUSR,
979979
.proc_handler = s390dbf_procactive,
980980
},
981-
{ }
982981
};
983982

984983
static struct ctl_table_header *s390dbf_sysctl_header;

0 commit comments

Comments
 (0)