kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
@ 2024-03-28 15:44 ` Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 01/10] kernel misc: Remove the now superfluous sentinel elements from ctl_table array Joel Granados via B4 Relay
                     ` (11 more replies)
  0 siblings, 12 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

What?
These commits remove the sentinel element (last empty element) from the
sysctl arrays of all the files under the "kernel/" directory that use a
sysctl array for registration. The merging of the preparation patches
[1] to mainline allows us to remove sentinel elements without changing
behavior. This is safe because the sysctl registration code
(register_sysctl() and friends) use the array size in addition to
checking for a sentinel [2].

Why?
By removing the sysctl sentinel elements we avoid kernel bloat as
ctl_table arrays get moved out of kernel/sysctl.c into their own
respective subsystems. This move was started long ago to avoid merge
conflicts; the sentinel removal bit came after Mathew Wilcox suggested
it to avoid bloating the kernel by one element as arrays moved out. This
patchset will reduce the overall build time size of the kernel and run
time memory bloat by about ~64 bytes per declared ctl_table array (more
info here [5]).

When are we done?
There are 4 patchests (25 commits [3]) that are still outstanding to
completely remove the sentinels: files under "net/", files under
"kernel/" (this patchset) dir, misc dirs (files under mm/ security/ and
others) and the final set that removes the unneeded check for ->procname
== NULL.

Testing:
* Ran sysctl selftests (./tools/testing/selftests/sysctl/sysctl.sh)
* Ran this through 0-day with no errors or warnings

Savings in vmlinux:
  A total of 64 bytes per sentinel is saved after removal; I measured in
  x86_64 to give an idea of the aggregated savings. The actual savings
  will depend on individual kernel configuration.
    * bloat-o-meter
        - The "yesall" config saves 1984 bytes [6]
        - A reduced config [4] saves 1027 bytes [7]

Savings in allocated memory:
  None in this set but will occur when the superfluous allocations are
  removed from proc_sysctl.c. I include it here for context. The
  estimated savings during boot for config [3] are 6272 bytes. See [8]
  for how to measure it.

Comments/feedback greatly appreciated

Changes in v3:
- Rebased to v6.9-rc1
- wrote a shorter cover letter
- Removed willy@infradead.org from cc
- Link to v2: https://lore.kernel.org/r/20240104-jag-sysctl_remove_empty_elem_kernel-v2-0-836cc04e00ec@samsung.com

Changes in v2:
- No functional changes; I resent it as I did not see it in the latest
  sysctl-next. It might be a bit too late to include it in 6.7 version,
  but this v2 can be used for 6.8 when it comes out.
- Rebased on top of v6.7-rc6
- Added trailers to the relevant commits.
- Link to v1: https://lore.kernel.org/r/20231107-jag-sysctl_remove_empty_elem_kernel-v1-0-e4ce1388dfa0@samsung.com
Best

Joel

[1] https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/
[2] https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/
[3] https://git.kernel.org/pub/scm/linux/kernel/git/joel.granados/linux.git/tag/?h=sysctl_remove_empty_elem_v5
[4] https://gist.github.com/Joelgranados/feaca7af5537156ca9b73aeaec093171

[5]
Links Related to the ctl_table sentinel removal:
* Good summaries from Luis:
  https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/
  https://lore.kernel.org/all/ZMFizKFkVxUFtSqa@bombadil.infradead.org/
* Patches adjusting sysctl register calls:
  https://lore.kernel.org/all/20230302204612.782387-1-mcgrof@kernel.org/
  https://lore.kernel.org/all/20230302202826.776286-1-mcgrof@kernel.org/
* Discussions about expectations and approach
  https://lore.kernel.org/all/20230321130908.6972-1-frank.li@vivo.com
  https://lore.kernel.org/all/20220220060626.15885-1-tangmeng@uniontech.com

[6]
add/remove: 0/0 grow/shrink: 0/31 up/down: 0/-1984 (-1984)
Function                                     old     new   delta
watchdog_sysctls                             576     512     -64
watchdog_hardlockup_sysctl                   128      64     -64
vm_table                                    1344    1280     -64
uts_kern_table                               448     384     -64
usermodehelper_table                         192     128     -64
user_table                                   832     768     -64
user_event_sysctls                           128      64     -64
timer_sysctl                                 128      64     -64
signal_debug_table                           128      64     -64
seccomp_sysctl_table                         192     128     -64
sched_rt_sysctls                             256     192     -64
sched_fair_sysctls                           256     192     -64
sched_energy_aware_sysctls                   128      64     -64
sched_dl_sysctls                             192     128     -64
sched_core_sysctls                           384     320     -64
sched_autogroup_sysctls                      128      64     -64
printk_sysctls                               512     448     -64
pid_ns_ctl_table_vm                          128      64     -64
pid_ns_ctl_table                             128      64     -64
latencytop_sysctl                            128      64     -64
kprobe_sysctls                               128      64     -64
kexec_core_sysctls                           256     192     -64
kern_table                                  2560    2496     -64
kern_reboot_table                            192     128     -64
kern_panic_table                             192     128     -64
kern_exit_table                              128      64     -64
kern_delayacct_table                         128      64     -64
kern_acct_table                              128      64     -64
hung_task_sysctls                            448     384     -64
ftrace_sysctls                               128      64     -64
bpf_syscall_table                            192     128     -64
Total: Before=429912331, After=429910347, chg -0.00%

[7]
add/remove: 0/1 grow/shrink: 0/16 up/down: 0/-1027 (-1027)
Function                                     old     new   delta
sched_core_sysctl_init                        39      36      -3
vm_table                                    1024     960     -64
uts_kern_table                               448     384     -64
usermodehelper_table                         192     128     -64
user_table                                   704     640     -64
signal_debug_table                           128      64     -64
seccomp_sysctl_table                         192     128     -64
sched_rt_sysctls                             256     192     -64
sched_fair_sysctls                           128      64     -64
sched_dl_sysctls                             192     128     -64
sched_core_sysctls                            64       -     -64
printk_sysctls                               512     448     -64
pid_ns_ctl_table_vm                          128      64     -64
kern_table                                  1920    1856     -64
kern_reboot_table                            192     128     -64
kern_panic_table                             128      64     -64
kern_exit_table                              128      64     -64
Total: Before=8522228, After=8521201, chg -0.01%

[8]
To measure the in memory savings apply this on top of this patchset.

"
"
diff --git i/fs/proc/proc_sysctl.c w/fs/proc/proc_sysctl.c
index 37cde0efee57..896c498600e8 100644
--- i/fs/proc/proc_sysctl.c
+++ w/fs/proc/proc_sysctl.c
@@ -966,6 +966,7 @@ static struct ctl_dir *new_dir(struct ctl_table_set *set,
        table[0].procname = new_name;
        table[0].mode = S_IFDIR|S_IRUGO|S_IXUGO;
        init_header(&new->header, set->dir.header.root, set, node, table, 1);
+       printk("%ld sysctl saved mem kzalloc\n", sizeof(struct ctl_table));

        return new;
 }
@@ -1189,6 +1190,7 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, s>
                link_name += len;
                link++;
        }
+       printk("%ld sysctl saved mem kzalloc\n", sizeof(struct ctl_table));
        init_header(links, dir->header.root, dir->header.set, node, link_table,
                    head->ctl_table_size);
        links->nreg = nr_entries;
"
and then run the following bash script in the kernel:

accum=0
for n in $(dmesg | grep kzalloc | awk '{print $3}') ; do
    accum=$(calc "$accum + $n")
done
echo $accum

---
Signed-off-by: Joel Granados <j.granados@samsung.com>

---
Joel Granados (10):
      kernel misc:  Remove the now superfluous sentinel elements from ctl_table array
      umh:  Remove the now superfluous sentinel elements from ctl_table array
      ftrace: Remove the now superfluous sentinel elements from ctl_table array
      timekeeping:  Remove the now superfluous sentinel elements from ctl_table array
      seccomp: Remove the now superfluous sentinel elements from ctl_table array
      scheduler: Remove the now superfluous sentinel elements from ctl_table array
      printk: Remove the now superfluous sentinel elements from ctl_table array
      kprobes: Remove the now superfluous sentinel elements from ctl_table array
      delayacct:  Remove the now superfluous sentinel elements from ctl_table array
      bpf: Remove the now superfluous sentinel elements from ctl_table array

 kernel/acct.c                    | 1 -
 kernel/bpf/syscall.c             | 1 -
 kernel/delayacct.c               | 1 -
 kernel/exit.c                    | 1 -
 kernel/hung_task.c               | 1 -
 kernel/kexec_core.c              | 1 -
 kernel/kprobes.c                 | 1 -
 kernel/latencytop.c              | 1 -
 kernel/panic.c                   | 1 -
 kernel/pid_namespace.c           | 1 -
 kernel/pid_sysctl.h              | 1 -
 kernel/printk/sysctl.c           | 1 -
 kernel/reboot.c                  | 1 -
 kernel/sched/autogroup.c         | 1 -
 kernel/sched/core.c              | 1 -
 kernel/sched/deadline.c          | 1 -
 kernel/sched/fair.c              | 1 -
 kernel/sched/rt.c                | 1 -
 kernel/sched/topology.c          | 1 -
 kernel/seccomp.c                 | 1 -
 kernel/signal.c                  | 1 -
 kernel/stackleak.c               | 1 -
 kernel/sysctl.c                  | 2 --
 kernel/time/timer.c              | 1 -
 kernel/trace/ftrace.c            | 1 -
 kernel/trace/trace_events_user.c | 1 -
 kernel/ucount.c                  | 3 +--
 kernel/umh.c                     | 1 -
 kernel/utsname_sysctl.c          | 1 -
 kernel/watchdog.c                | 2 --
 30 files changed, 1 insertion(+), 33 deletions(-)
---
base-commit: 4cece764965020c22cff7665b18a012006359095
change-id: 20231107-jag-sysctl_remove_empty_elem_kernel-7de90cfd0c0a

Best regards,
-- 
Joel Granados <j.granados@samsung.com>



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 01/10] kernel misc: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 02/10] umh: " Joel Granados via B4 Relay
                     ` (10 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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 ctl_table arrays. Reduce by one the values used
to compare the size of the adjusted arrays.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/acct.c           | 1 -
 kernel/exit.c           | 1 -
 kernel/hung_task.c      | 1 -
 kernel/kexec_core.c     | 1 -
 kernel/latencytop.c     | 1 -
 kernel/panic.c          | 1 -
 kernel/pid_namespace.c  | 1 -
 kernel/pid_sysctl.h     | 1 -
 kernel/reboot.c         | 1 -
 kernel/signal.c         | 1 -
 kernel/stackleak.c      | 1 -
 kernel/sysctl.c         | 2 --
 kernel/ucount.c         | 3 +--
 kernel/utsname_sysctl.c | 1 -
 kernel/watchdog.c       | 2 --
 15 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/kernel/acct.c b/kernel/acct.c
index 986c8214dabf..179848ad33e9 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -84,7 +84,6 @@ static struct ctl_table kern_acct_table[] = {
 		.mode           = 0644,
 		.proc_handler   = proc_dointvec,
 	},
-	{ }
 };
 
 static __init int kernel_acct_sysctls_init(void)
diff --git a/kernel/exit.c b/kernel/exit.c
index 41a12630cbbc..cd3aa9042f1a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -94,7 +94,6 @@ static struct ctl_table kern_exit_table[] = {
 		.mode           = 0644,
 		.proc_handler   = proc_douintvec,
 	},
-	{ }
 };
 
 static __init int kernel_exit_sysctls_init(void)
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index b2fc2727d654..1d92016b0b3c 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -314,7 +314,6 @@ static struct ctl_table hung_task_sysctls[] = {
 		.proc_handler	= proc_dointvec_minmax,
 		.extra1		= SYSCTL_NEG_ONE,
 	},
-	{}
 };
 
 static void __init hung_task_sysctl_init(void)
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index 0e96f6b24344..9112d69d68b0 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -948,7 +948,6 @@ static struct ctl_table kexec_core_sysctls[] = {
 		.mode		= 0644,
 		.proc_handler	= kexec_limit_handler,
 	},
-	{ }
 };
 
 static int __init kexec_core_sysctl_init(void)
diff --git a/kernel/latencytop.c b/kernel/latencytop.c
index 781249098cb6..84c53285f499 100644
--- a/kernel/latencytop.c
+++ b/kernel/latencytop.c
@@ -85,7 +85,6 @@ static struct ctl_table latencytop_sysctl[] = {
 		.mode       = 0644,
 		.proc_handler   = sysctl_latencytop,
 	},
-	{}
 };
 #endif
 
diff --git a/kernel/panic.c b/kernel/panic.c
index 747c3f3d289a..8bff183d6180 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -100,7 +100,6 @@ static struct ctl_table kern_panic_table[] = {
 		.mode           = 0644,
 		.proc_handler   = proc_douintvec,
 	},
-	{ }
 };
 
 static __init int kernel_panic_sysctls_init(void)
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 7ade20e95232..dc48fecfa1dc 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -307,7 +307,6 @@ static struct ctl_table pid_ns_ctl_table[] = {
 		.extra1 = SYSCTL_ZERO,
 		.extra2 = &pid_max,
 	},
-	{ }
 };
 #endif	/* CONFIG_CHECKPOINT_RESTORE */
 
diff --git a/kernel/pid_sysctl.h b/kernel/pid_sysctl.h
index 2ee41a3a1dfd..fe9fb991dc42 100644
--- a/kernel/pid_sysctl.h
+++ b/kernel/pid_sysctl.h
@@ -41,7 +41,6 @@ static struct ctl_table pid_ns_ctl_table_vm[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_TWO,
 	},
-	{ }
 };
 static inline void register_pid_ns_sysctl_table_vm(void)
 {
diff --git a/kernel/reboot.c b/kernel/reboot.c
index 22c16e2564cc..f05dbde2c93f 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -1295,7 +1295,6 @@ static struct ctl_table kern_reboot_table[] = {
 		.mode           = 0644,
 		.proc_handler   = proc_dointvec,
 	},
-	{ }
 };
 
 static void __init kernel_reboot_sysctls_init(void)
diff --git a/kernel/signal.c b/kernel/signal.c
index 7bdbcf1b78d0..01c4c46a51a8 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -4840,7 +4840,6 @@ static struct ctl_table signal_debug_table[] = {
 		.proc_handler	= proc_dointvec
 	},
 #endif
-	{ }
 };
 
 static int __init init_signal_sysctls(void)
diff --git a/kernel/stackleak.c b/kernel/stackleak.c
index 34c9d81eea94..d099f3affcf1 100644
--- a/kernel/stackleak.c
+++ b/kernel/stackleak.c
@@ -54,7 +54,6 @@ static struct ctl_table stackleak_sysctls[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static int __init stackleak_sysctls_init(void)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 81cc974913bb..e0b917328cf9 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2034,7 +2034,6 @@ static struct ctl_table kern_table[] = {
 		.extra2		= SYSCTL_INT_MAX,
 	},
 #endif
-	{ }
 };
 
 static struct ctl_table vm_table[] = {
@@ -2240,7 +2239,6 @@ static struct ctl_table vm_table[] = {
 		.extra2		= (void *)&mmap_rnd_compat_bits_max,
 	},
 #endif
-	{ }
 };
 
 int __init sysctl_init_bases(void)
diff --git a/kernel/ucount.c b/kernel/ucount.c
index 4aa6166cb856..e196da0204dc 100644
--- a/kernel/ucount.c
+++ b/kernel/ucount.c
@@ -87,7 +87,6 @@ static struct ctl_table user_table[] = {
 	UCOUNT_ENTRY("max_fanotify_groups"),
 	UCOUNT_ENTRY("max_fanotify_marks"),
 #endif
-	{ }
 };
 #endif /* CONFIG_SYSCTL */
 
@@ -96,7 +95,7 @@ bool setup_userns_sysctls(struct user_namespace *ns)
 #ifdef CONFIG_SYSCTL
 	struct ctl_table *tbl;
 
-	BUILD_BUG_ON(ARRAY_SIZE(user_table) != UCOUNT_COUNTS + 1);
+	BUILD_BUG_ON(ARRAY_SIZE(user_table) != UCOUNT_COUNTS);
 	setup_sysctl_set(&ns->set, &set_root, set_is_seen);
 	tbl = kmemdup(user_table, sizeof(user_table), GFP_KERNEL);
 	if (tbl) {
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
index 019e3a1566cf..76a772072557 100644
--- a/kernel/utsname_sysctl.c
+++ b/kernel/utsname_sysctl.c
@@ -120,7 +120,6 @@ static struct ctl_table uts_kern_table[] = {
 		.proc_handler	= proc_do_uts_string,
 		.poll		= &domainname_poll,
 	},
-	{}
 };
 
 #ifdef CONFIG_PROC_SYSCTL
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index d7b2125503af..4e472d416525 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -950,7 +950,6 @@ static struct ctl_table watchdog_sysctls[] = {
 	},
 #endif /* CONFIG_SMP */
 #endif
-	{}
 };
 
 static struct ctl_table watchdog_hardlockup_sysctl[] = {
@@ -963,7 +962,6 @@ static struct ctl_table watchdog_hardlockup_sysctl[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static void __init watchdog_sysctl_init(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 02/10] umh: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 01/10] kernel misc: Remove the now superfluous sentinel elements from ctl_table array Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 03/10] ftrace: " Joel Granados via B4 Relay
                     ` (9 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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 sentinel element from usermodehelper_table

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/umh.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/umh.c b/kernel/umh.c
index 1b13c5d34624..598b3ffe1522 100644
--- a/kernel/umh.c
+++ b/kernel/umh.c
@@ -560,7 +560,6 @@ static struct ctl_table usermodehelper_table[] = {
 		.mode		= 0600,
 		.proc_handler	= proc_cap_handler,
 	},
-	{ }
 };
 
 static int __init init_umh_sysctls(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 03/10] ftrace: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 01/10] kernel misc: Remove the now superfluous sentinel elements from ctl_table array Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 02/10] umh: " Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 04/10] timekeeping: " Joel Granados via B4 Relay
                     ` (8 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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 sentinel elements from ftrace_sysctls and user_event_sysctls

Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Acked-by: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/trace/ftrace.c            | 1 -
 kernel/trace/trace_events_user.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index da1710499698..6cec53aa45a6 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -8270,7 +8270,6 @@ static struct ctl_table ftrace_sysctls[] = {
 		.mode           = 0644,
 		.proc_handler   = ftrace_enable_sysctl,
 	},
-	{}
 };
 
 static int __init ftrace_sysctl_init(void)
diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
index 70d428c394b6..304ceed9fd7d 100644
--- a/kernel/trace/trace_events_user.c
+++ b/kernel/trace/trace_events_user.c
@@ -2833,7 +2833,6 @@ static struct ctl_table user_event_sysctls[] = {
 		.mode		= 0644,
 		.proc_handler	= set_max_user_events_sysctl,
 	},
-	{}
 };
 
 static int __init trace_events_user_init(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 04/10] timekeeping: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
                     ` (2 preceding siblings ...)
  2024-03-28 15:44   ` [PATCH v3 03/10] ftrace: " Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 05/10] seccomp: " Joel Granados via B4 Relay
                     ` (7 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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 sentinel element from time_sysctl

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/time/timer.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index dee29f1f5b75..9d107f4b506c 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -312,7 +312,6 @@ static struct ctl_table timer_sysctl[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static int __init timer_sysctl_init(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 05/10] seccomp: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
                     ` (3 preceding siblings ...)
  2024-03-28 15:44   ` [PATCH v3 04/10] timekeeping: " Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 06/10] scheduler: " Joel Granados via B4 Relay
                     ` (6 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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 sentinel element from seccomp_sysctl_table.

Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/seccomp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index aca7b437882e..7ed72723fb8a 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -2445,7 +2445,6 @@ static struct ctl_table seccomp_sysctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= seccomp_actions_logged_handler,
 	},
-	{ }
 };
 
 static int __init seccomp_sysctl_init(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 06/10] scheduler: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
                     ` (4 preceding siblings ...)
  2024-03-28 15:44   ` [PATCH v3 05/10] seccomp: " Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-04-09  9:02     ` Valentin Schneider
  2024-03-28 15:44   ` [PATCH v3 07/10] printk: " Joel Granados via B4 Relay
                     ` (5 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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/)

rm sentinel element from ctl_table arrays

Acked-by: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/sched/autogroup.c | 1 -
 kernel/sched/core.c      | 1 -
 kernel/sched/deadline.c  | 1 -
 kernel/sched/fair.c      | 1 -
 kernel/sched/rt.c        | 1 -
 kernel/sched/topology.c  | 1 -
 6 files changed, 6 deletions(-)

diff --git a/kernel/sched/autogroup.c b/kernel/sched/autogroup.c
index 991fc9002535..db68a964e34e 100644
--- a/kernel/sched/autogroup.c
+++ b/kernel/sched/autogroup.c
@@ -19,7 +19,6 @@ static struct ctl_table sched_autogroup_sysctls[] = {
 		.extra1         = SYSCTL_ZERO,
 		.extra2         = SYSCTL_ONE,
 	},
-	{}
 };
 
 static void __init sched_autogroup_sysctl_init(void)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7019a40457a6..7ce76620a308 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4741,7 +4741,6 @@ static struct ctl_table sched_core_sysctls[] = {
 		.extra2		= SYSCTL_FOUR,
 	},
 #endif /* CONFIG_NUMA_BALANCING */
-	{}
 };
 static int __init sched_core_sysctl_init(void)
 {
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index a04a436af8cc..c75d1307d86d 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -43,7 +43,6 @@ static struct ctl_table sched_dl_sysctls[] = {
 		.proc_handler   = proc_douintvec_minmax,
 		.extra2         = (void *)&sysctl_sched_dl_period_max,
 	},
-	{}
 };
 
 static int __init sched_dl_sysctl_init(void)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 03be0d1330a6..4ac2cf7a918e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -157,7 +157,6 @@ static struct ctl_table sched_fair_sysctls[] = {
 		.extra1		= SYSCTL_ZERO,
 	},
 #endif /* CONFIG_NUMA_BALANCING */
-	{}
 };
 
 static int __init sched_fair_sysctl_init(void)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 3261b067b67e..aa4c1c874fa4 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -56,7 +56,6 @@ static struct ctl_table sched_rt_sysctls[] = {
 		.mode           = 0644,
 		.proc_handler   = sched_rr_handler,
 	},
-	{}
 };
 
 static int __init sched_rt_sysctl_init(void)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 99ea5986038c..42c22648d124 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -322,7 +322,6 @@ static struct ctl_table sched_energy_aware_sysctls[] = {
 		.extra1         = SYSCTL_ZERO,
 		.extra2         = SYSCTL_ONE,
 	},
-	{}
 };
 
 static int __init sched_energy_aware_sysctl_init(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 07/10] printk: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
                     ` (5 preceding siblings ...)
  2024-03-28 15:44   ` [PATCH v3 06/10] scheduler: " Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 08/10] kprobes: " Joel Granados via B4 Relay
                     ` (4 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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/)

rm sentinel element from printk_sysctls

Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/printk/sysctl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/printk/sysctl.c b/kernel/printk/sysctl.c
index c228343eeb97..3e47dedce9e5 100644
--- a/kernel/printk/sysctl.c
+++ b/kernel/printk/sysctl.c
@@ -76,7 +76,6 @@ static struct ctl_table printk_sysctls[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_TWO,
 	},
-	{}
 };
 
 void __init printk_sysctl_init(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 08/10] kprobes: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
                     ` (6 preceding siblings ...)
  2024-03-28 15:44   ` [PATCH v3 07/10] printk: " Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 09/10] delayacct: " Joel Granados via B4 Relay
                     ` (3 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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 sentinel element from kprobe_sysclts

Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/kprobes.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 9d9095e81792..85af0e05a38f 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -968,7 +968,6 @@ static struct ctl_table kprobe_sysctls[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static void __init kprobe_sysctls_init(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 09/10] delayacct: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
                     ` (7 preceding siblings ...)
  2024-03-28 15:44   ` [PATCH v3 08/10] kprobes: " Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-03-28 15:44   ` [PATCH v3 10/10] bpf: " Joel Granados via B4 Relay
                     ` (2 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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 sentinel element from kern_delayacct_table

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/delayacct.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/delayacct.c b/kernel/delayacct.c
index 6f0c358e73d8..e039b0f99a0b 100644
--- a/kernel/delayacct.c
+++ b/kernel/delayacct.c
@@ -74,7 +74,6 @@ static struct ctl_table kern_delayacct_table[] = {
 		.extra1         = SYSCTL_ZERO,
 		.extra2         = SYSCTL_ONE,
 	},
-	{ }
 };
 
 static __init int kernel_delayacct_sysctls_init(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v3 10/10] bpf: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
                     ` (8 preceding siblings ...)
  2024-03-28 15:44   ` [PATCH v3 09/10] delayacct: " Joel Granados via B4 Relay
@ 2024-03-28 15:44   ` Joel Granados via B4 Relay
  2024-04-15 13:12   ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados
  2024-04-22 14:27   ` Konrad Dybcio
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:44 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

From: Joel Granados <j.granados@samsung.com>

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 sentinel element from bpf_syscall_table.

Acked-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 kernel/bpf/syscall.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index ae2ff73bde7e..c7e805087b06 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -5979,7 +5979,6 @@ static struct ctl_table bpf_syscall_table[] = {
 		.mode		= 0644,
 		.proc_handler	= bpf_stats_handler,
 	},
-	{ }
 };
 
 static int __init bpf_syscall_sysctl_init(void)

-- 
2.43.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 06/10] scheduler: Remove the now superfluous sentinel elements from ctl_table array
  2024-03-28 15:44   ` [PATCH v3 06/10] scheduler: " Joel Granados via B4 Relay
@ 2024-04-09  9:02     ` Valentin Schneider
  0 siblings, 0 replies; 21+ messages in thread
From: Valentin Schneider @ 2024-04-09  9:02 UTC (permalink / raw)
  To: Joel Granados via B4 Relay, Luis Chamberlain, josh, Kees Cook,
	Eric Biederman, Iurii Zaikin, Steven Rostedt, Masami Hiramatsu,
	Mark Rutland, Thomas Gleixner, John Stultz, Stephen Boyd,
	Andy Lutomirski, Will Drewry, Ingo Molnar, Peter Zijlstra,
	Juri Lelli, Vincent Guittot, Dietmar Eggemann, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Petr Mladek, John Ogness,
	Sergey Senozhatsky, Naveen N. Rao, Anil S Keshavamurthy,
	David S. Miller, Balbir Singh, Alexei Starovoitov,
	Daniel Borkmann, John Fastabend, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, KP Singh,
	Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	Joel Granados

On 28/03/24 16:44, Joel Granados via B4 Relay wrote:
> From: Joel Granados <j.granados@samsung.com>
>
> 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/)
>
> rm sentinel element from ctl_table arrays
>
> Acked-by: "Peter Zijlstra (Intel)" <peterz@infradead.org>

Tested-by: Valentin Schneider <vschneid@redhat.com>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>

> Signed-off-by: Joel Granados <j.granados@samsung.com>


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
                     ` (9 preceding siblings ...)
  2024-03-28 15:44   ` [PATCH v3 10/10] bpf: " Joel Granados via B4 Relay
@ 2024-04-15 13:12   ` Joel Granados
  2024-04-22 14:27   ` Konrad Dybcio
  11 siblings, 0 replies; 21+ messages in thread
From: Joel Granados @ 2024-04-15 13:12 UTC (permalink / raw)
  To: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, linux-kernel,
	kexec, linux-fsdevel, linux-trace-kernel, bpf


[-- Attachment #1.1: Type: text/plain, Size: 967 bytes --]

Just a heads up: will add this to the sysctl-next tree
https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/log/?h=sysctl-next
so it has time to soak there for next merge window. If you are a
maintainer and are thinking of including any of these patches in your
tree, let me know and I'll remove when upstreaming

On Thu, Mar 28, 2024 at 04:44:01PM +0100, Joel Granados via B4 Relay wrote:
> From: Joel Granados <j.granados@samsung.com>
> 
> What?
> These commits remove the sentinel element (last empty element) from the
> sysctl arrays of all the files under the "kernel/" directory that use a
> sysctl array for registration. The merging of the preparation patches
> [1] to mainline allows us to remove sentinel elements without changing
> behavior. This is safe because the sysctl registration code
> (register_sysctl() and friends) use the array size in addition to
> checking for a sentinel [2].
...

Best
-- 

Joel Granados

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
  2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
                     ` (10 preceding siblings ...)
  2024-04-15 13:12   ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados
@ 2024-04-22 14:27   ` Konrad Dybcio
  2024-04-22 14:49     ` Krzysztof Kozlowski
                       ` (2 more replies)
  11 siblings, 3 replies; 21+ messages in thread
From: Konrad Dybcio @ 2024-04-22 14:27 UTC (permalink / raw)
  To: Joel Granados, Luis Chamberlain, josh, Kees Cook, Eric Biederman,
	Iurii Zaikin, Steven Rostedt, Masami Hiramatsu, Mark Rutland,
	Thomas Gleixner, John Stultz, Stephen Boyd, Andy Lutomirski,
	Will Drewry, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf, tools



On 3/28/24 16:44, Joel Granados wrote:
> What?
> These commits remove the sentinel element (last empty element) from the
> sysctl arrays of all the files under the "kernel/" directory that use a
> sysctl array for registration. The merging of the preparation patches
> [1] to mainline allows us to remove sentinel elements without changing
> behavior. This is safe because the sysctl registration code
> (register_sysctl() and friends) use the array size in addition to
> checking for a sentinel [2].

Hi,

looks like *this* "patch" made it to the sysctl tree [1], breaking b4
for everyone else (as there's a "--- b4-submit-tracking ---" magic in
the tree history now) on next-20240422

Please drop it (again, I'm only talking about this empty cover letter).

Konrad

[1] https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/commit/?h=sysctl-next&id=ec04a7fa09ddedc1d6c8b86ae281897256c7fdf0

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
  2024-04-22 14:27   ` Konrad Dybcio
@ 2024-04-22 14:49     ` Krzysztof Kozlowski
  2024-04-22 14:57       ` Konstantin Ryabitsev
  2024-04-24  7:46       ` Joel Granados
  2024-04-24  7:41     ` Joel Granados
  2024-04-24  7:52     ` Joel Granados
  2 siblings, 2 replies; 21+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-22 14:49 UTC (permalink / raw)
  To: Konrad Dybcio, Joel Granados, Luis Chamberlain, josh, Kees Cook,
	Eric Biederman, Iurii Zaikin, Steven Rostedt, Masami Hiramatsu,
	Mark Rutland, Thomas Gleixner, John Stultz, Stephen Boyd,
	Andy Lutomirski, Will Drewry, Ingo Molnar, Peter Zijlstra,
	Juri Lelli, Vincent Guittot, Dietmar Eggemann, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Valentin Schneider,
	Petr Mladek, John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf, tools

On 22/04/2024 16:27, Konrad Dybcio wrote:
> 
> 
> On 3/28/24 16:44, Joel Granados wrote:
>> What?
>> These commits remove the sentinel element (last empty element) from the
>> sysctl arrays of all the files under the "kernel/" directory that use a
>> sysctl array for registration. The merging of the preparation patches
>> [1] to mainline allows us to remove sentinel elements without changing
>> behavior. This is safe because the sysctl registration code
>> (register_sysctl() and friends) use the array size in addition to
>> checking for a sentinel [2].
> 
> Hi,
> 
> looks like *this* "patch" made it to the sysctl tree [1], breaking b4
> for everyone else (as there's a "--- b4-submit-tracking ---" magic in
> the tree history now) on next-20240422
> 
> Please drop it (again, I'm only talking about this empty cover letter).

Just to clarify, in case it is not obvious:
Please *do not merge your own trees* into kernel.org repos. Instead use
b4 shazam to pick up entire patchset, even if it is yours. b4 allows to
merge/apply also the cover letter, if this is your intention.

With b4 shazam you would get proper Link tags and not break everyone's
b4 workflow on next. :/

Best regards,
Krzysztof


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
  2024-04-22 14:49     ` Krzysztof Kozlowski
@ 2024-04-22 14:57       ` Konstantin Ryabitsev
  2024-04-22 15:07         ` Krzysztof Kozlowski
  2024-04-24  7:46       ` Joel Granados
  1 sibling, 1 reply; 21+ messages in thread
From: Konstantin Ryabitsev @ 2024-04-22 14:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Konrad Dybcio, Joel Granados, Luis Chamberlain, josh, Kees Cook,
	Eric Biederman, Iurii Zaikin, Steven Rostedt, Masami Hiramatsu,
	Mark Rutland, Thomas Gleixner, John Stultz, Stephen Boyd,
	Andy Lutomirski, Will Drewry, Ingo Molnar, Peter Zijlstra,
	Juri Lelli, Vincent Guittot, Dietmar Eggemann, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Valentin Schneider,
	Petr Mladek, John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, linux-kernel,
	kexec, linux-fsdevel, linux-trace-kernel, bpf, tools

On Mon, Apr 22, 2024 at 04:49:27PM +0200, Krzysztof Kozlowski wrote:
> >> These commits remove the sentinel element (last empty element) from 
> >> the
> >> sysctl arrays of all the files under the "kernel/" directory that use a
> >> sysctl array for registration. The merging of the preparation patches
> >> [1] to mainline allows us to remove sentinel elements without changing
> >> behavior. This is safe because the sysctl registration code
> >> (register_sysctl() and friends) use the array size in addition to
> >> checking for a sentinel [2].
> > 
> > Hi,
> > 
> > looks like *this* "patch" made it to the sysctl tree [1], breaking b4
> > for everyone else (as there's a "--- b4-submit-tracking ---" magic in
> > the tree history now) on next-20240422
> > 
> > Please drop it (again, I'm only talking about this empty cover letter).
> 
> Just to clarify, in case it is not obvious:
> Please *do not merge your own trees* into kernel.org repos. Instead use
> b4 shazam to pick up entire patchset, even if it is yours. b4 allows to
> merge/apply also the cover letter, if this is your intention.
> 
> With b4 shazam you would get proper Link tags and not break everyone's
> b4 workflow on next. :/

I was expecting this to happen at some point. :/

Note, that you can still use b4 and merge your own trees, but you need 
to switch to using a different cover letter strategy:

  [b4]
  prep-cover-strategy = branch-description

-K

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
  2024-04-22 14:57       ` Konstantin Ryabitsev
@ 2024-04-22 15:07         ` Krzysztof Kozlowski
  2024-04-24  7:55           ` Joel Granados
  0 siblings, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-22 15:07 UTC (permalink / raw)
  To: Konstantin Ryabitsev
  Cc: Konrad Dybcio, Joel Granados, Luis Chamberlain, josh, Kees Cook,
	Eric Biederman, Iurii Zaikin, Steven Rostedt, Masami Hiramatsu,
	Mark Rutland, Thomas Gleixner, John Stultz, Stephen Boyd,
	Andy Lutomirski, Will Drewry, Ingo Molnar, Peter Zijlstra,
	Juri Lelli, Vincent Guittot, Dietmar Eggemann, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Valentin Schneider,
	Petr Mladek, John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, linux-kernel,
	kexec, linux-fsdevel, linux-trace-kernel, bpf, tools

On 22/04/2024 16:57, Konstantin Ryabitsev wrote:
> On Mon, Apr 22, 2024 at 04:49:27PM +0200, Krzysztof Kozlowski wrote:
>>>> These commits remove the sentinel element (last empty element) from 
>>>> the
>>>> sysctl arrays of all the files under the "kernel/" directory that use a
>>>> sysctl array for registration. The merging of the preparation patches
>>>> [1] to mainline allows us to remove sentinel elements without changing
>>>> behavior. This is safe because the sysctl registration code
>>>> (register_sysctl() and friends) use the array size in addition to
>>>> checking for a sentinel [2].
>>>
>>> Hi,
>>>
>>> looks like *this* "patch" made it to the sysctl tree [1], breaking b4
>>> for everyone else (as there's a "--- b4-submit-tracking ---" magic in
>>> the tree history now) on next-20240422
>>>
>>> Please drop it (again, I'm only talking about this empty cover letter).
>>
>> Just to clarify, in case it is not obvious:
>> Please *do not merge your own trees* into kernel.org repos. Instead use
>> b4 shazam to pick up entire patchset, even if it is yours. b4 allows to
>> merge/apply also the cover letter, if this is your intention.
>>
>> With b4 shazam you would get proper Link tags and not break everyone's
>> b4 workflow on next. :/
> 
> I was expecting this to happen at some point. :/
> 
> Note, that you can still use b4 and merge your own trees, but you need 
> to switch to using a different cover letter strategy:
> 
>   [b4]
>   prep-cover-strategy = branch-description

Yes, but you still won't have:
1. Link tags
2. Nice thank-you letters
3. Auto-collecting review/tested/ack tags

So sure, maintainer can even cherry-pick patches, use patch or manually
edit git objects and then update git refs, but that's not the point. :)

Just use b4 shazam, it's so awesome tool.

Best regards,
Krzysztof


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
  2024-04-22 14:27   ` Konrad Dybcio
  2024-04-22 14:49     ` Krzysztof Kozlowski
@ 2024-04-24  7:41     ` Joel Granados
  2024-04-24  7:52     ` Joel Granados
  2 siblings, 0 replies; 21+ messages in thread
From: Joel Granados @ 2024-04-24  7:41 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, linux-kernel,
	kexec, linux-fsdevel, linux-trace-kernel, bpf, tools


[-- Attachment #1.1: Type: text/plain, Size: 1144 bytes --]

On Mon, Apr 22, 2024 at 04:27:47PM +0200, Konrad Dybcio wrote:
> 
> 
> On 3/28/24 16:44, Joel Granados wrote:
> > What?
> > These commits remove the sentinel element (last empty element) from the
> > sysctl arrays of all the files under the "kernel/" directory that use a
> > sysctl array for registration. The merging of the preparation patches
> > [1] to mainline allows us to remove sentinel elements without changing
> > behavior. This is safe because the sysctl registration code
> > (register_sysctl() and friends) use the array size in addition to
> > checking for a sentinel [2].
> 
> Hi,
> 
> looks like *this* "patch" made it to the sysctl tree [1], breaking b4
> for everyone else (as there's a "--- b4-submit-tracking ---" magic in
> the tree history now) on next-20240422
> 
> Please drop it (again, I'm only talking about this empty cover letter).
I see it. Will remove it from sysctl-next

Thx for pointing it out.

Best

> 
> Konrad
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/commit/?h=sysctl-next&id=ec04a7fa09ddedc1d6c8b86ae281897256c7fdf0

-- 

Joel Granados

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
  2024-04-22 14:49     ` Krzysztof Kozlowski
  2024-04-22 14:57       ` Konstantin Ryabitsev
@ 2024-04-24  7:46       ` Joel Granados
  1 sibling, 0 replies; 21+ messages in thread
From: Joel Granados @ 2024-04-24  7:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Konrad Dybcio, Luis Chamberlain, josh, Kees Cook, Eric Biederman,
	Iurii Zaikin, Steven Rostedt, Masami Hiramatsu, Mark Rutland,
	Thomas Gleixner, John Stultz, Stephen Boyd, Andy Lutomirski,
	Will Drewry, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, linux-kernel,
	kexec, linux-fsdevel, linux-trace-kernel, bpf, tools


[-- Attachment #1.1: Type: text/plain, Size: 1516 bytes --]

On Mon, Apr 22, 2024 at 04:49:27PM +0200, Krzysztof Kozlowski wrote:
> On 22/04/2024 16:27, Konrad Dybcio wrote:
> > 
> > 
> > On 3/28/24 16:44, Joel Granados wrote:
> >> What?
> >> These commits remove the sentinel element (last empty element) from the
> >> sysctl arrays of all the files under the "kernel/" directory that use a
> >> sysctl array for registration. The merging of the preparation patches
> >> [1] to mainline allows us to remove sentinel elements without changing
> >> behavior. This is safe because the sysctl registration code
> >> (register_sysctl() and friends) use the array size in addition to
> >> checking for a sentinel [2].
> > 
> > Hi,
> > 
> > looks like *this* "patch" made it to the sysctl tree [1], breaking b4
> > for everyone else (as there's a "--- b4-submit-tracking ---" magic in
> > the tree history now) on next-20240422
> > 
> > Please drop it (again, I'm only talking about this empty cover letter).
> 
> Just to clarify, in case it is not obvious:
> Please *do not merge your own trees* into kernel.org repos. Instead use
> b4 shazam to pick up entire patchset, even if it is yours. b4 allows to
> merge/apply also the cover letter, if this is your intention.
Noted. Will adjust my workflow to just use B4 to bring stuff into the
sysctl-next tree.

> 
> With b4 shazam you would get proper Link tags and not break everyone's
> b4 workflow on next. :/
Ok. Sorry for the noise.

> 
> Best regards,
> Krzysztof
> 

-- 

Joel Granados

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
  2024-04-22 14:27   ` Konrad Dybcio
  2024-04-22 14:49     ` Krzysztof Kozlowski
  2024-04-24  7:41     ` Joel Granados
@ 2024-04-24  7:52     ` Joel Granados
  2 siblings, 0 replies; 21+ messages in thread
From: Joel Granados @ 2024-04-24  7:52 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Luis Chamberlain, josh, Kees Cook, Eric Biederman, Iurii Zaikin,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Thomas Gleixner,
	John Stultz, Stephen Boyd, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Petr Mladek,
	John Ogness, Sergey Senozhatsky, Naveen N. Rao,
	Anil S Keshavamurthy, David S. Miller, Balbir Singh,
	Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, linux-kernel,
	kexec, linux-fsdevel, linux-trace-kernel, bpf, tools


[-- Attachment #1.1: Type: text/plain, Size: 1289 bytes --]

On Mon, Apr 22, 2024 at 04:27:47PM +0200, Konrad Dybcio wrote:
> 
> 
> On 3/28/24 16:44, Joel Granados wrote:
> > What?
> > These commits remove the sentinel element (last empty element) from the
> > sysctl arrays of all the files under the "kernel/" directory that use a
> > sysctl array for registration. The merging of the preparation patches
> > [1] to mainline allows us to remove sentinel elements without changing
> > behavior. This is safe because the sysctl registration code
> > (register_sysctl() and friends) use the array size in addition to
> > checking for a sentinel [2].
> 
> Hi,
> 
> looks like *this* "patch" made it to the sysctl tree [1], breaking b4
> for everyone else (as there's a "--- b4-submit-tracking ---" magic in
> the tree history now) on next-20240422
> 
> Please drop it (again, I'm only talking about this empty cover letter).
Here do you mean revert? or do you mean force-push without the cover
letter commit?

I did the later, but if the former is necessary I can always go back to
the old HEAD, add a revert commit and then push that.

Best

> 
> Konrad
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/commit/?h=sysctl-next&id=ec04a7fa09ddedc1d6c8b86ae281897256c7fdf0

-- 

Joel Granados

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir
  2024-04-22 15:07         ` Krzysztof Kozlowski
@ 2024-04-24  7:55           ` Joel Granados
  0 siblings, 0 replies; 21+ messages in thread
From: Joel Granados @ 2024-04-24  7:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Konstantin Ryabitsev, Konrad Dybcio, Luis Chamberlain, josh,
	Kees Cook, Eric Biederman, Iurii Zaikin, Steven Rostedt,
	Masami Hiramatsu, Mark Rutland, Thomas Gleixner, John Stultz,
	Stephen Boyd, Andy Lutomirski, Will Drewry, Ingo Molnar,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Petr Mladek, John Ogness, Sergey Senozhatsky,
	Naveen N. Rao, Anil S Keshavamurthy, David S. Miller,
	Balbir Singh, Alexei Starovoitov, Daniel Borkmann,
	John Fastabend, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	linux-kernel, kexec, linux-fsdevel, linux-trace-kernel, bpf,
	tools


[-- Attachment #1.1: Type: text/plain, Size: 2131 bytes --]

On Mon, Apr 22, 2024 at 05:07:59PM +0200, Krzysztof Kozlowski wrote:
> On 22/04/2024 16:57, Konstantin Ryabitsev wrote:
> > On Mon, Apr 22, 2024 at 04:49:27PM +0200, Krzysztof Kozlowski wrote:
> >>>> These commits remove the sentinel element (last empty element) from 
> >>>> the
> >>>> sysctl arrays of all the files under the "kernel/" directory that use a
> >>>> sysctl array for registration. The merging of the preparation patches
> >>>> [1] to mainline allows us to remove sentinel elements without changing
> >>>> behavior. This is safe because the sysctl registration code
> >>>> (register_sysctl() and friends) use the array size in addition to
> >>>> checking for a sentinel [2].
> >>>
> >>> Hi,
> >>>
> >>> looks like *this* "patch" made it to the sysctl tree [1], breaking b4
> >>> for everyone else (as there's a "--- b4-submit-tracking ---" magic in
> >>> the tree history now) on next-20240422
> >>>
> >>> Please drop it (again, I'm only talking about this empty cover letter).
> >>
> >> Just to clarify, in case it is not obvious:
> >> Please *do not merge your own trees* into kernel.org repos. Instead use
> >> b4 shazam to pick up entire patchset, even if it is yours. b4 allows to
> >> merge/apply also the cover letter, if this is your intention.
> >>
> >> With b4 shazam you would get proper Link tags and not break everyone's
> >> b4 workflow on next. :/
> > 
> > I was expecting this to happen at some point. :/
> > 
> > Note, that you can still use b4 and merge your own trees, but you need 
> > to switch to using a different cover letter strategy:
> > 
> >   [b4]
> >   prep-cover-strategy = branch-description
> 
> Yes, but you still won't have:
> 1. Link tags
> 2. Nice thank-you letters
> 3. Auto-collecting review/tested/ack tags
> 
> So sure, maintainer can even cherry-pick patches, use patch or manually
> edit git objects and then update git refs, but that's not the point. :)
> 
> Just use b4 shazam, it's so awesome tool.
I'll try this out going forward (instead of chaning the cover letter
strategy)

Thx again.

Best

-- 

Joel Granados

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-04-30 18:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20240328154421eucas1p14e2a43b2894dd706aa4e2affc54f3143@eucas1p1.samsung.com>
2024-03-28 15:44 ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados via B4 Relay
2024-03-28 15:44   ` [PATCH v3 01/10] kernel misc: Remove the now superfluous sentinel elements from ctl_table array Joel Granados via B4 Relay
2024-03-28 15:44   ` [PATCH v3 02/10] umh: " Joel Granados via B4 Relay
2024-03-28 15:44   ` [PATCH v3 03/10] ftrace: " Joel Granados via B4 Relay
2024-03-28 15:44   ` [PATCH v3 04/10] timekeeping: " Joel Granados via B4 Relay
2024-03-28 15:44   ` [PATCH v3 05/10] seccomp: " Joel Granados via B4 Relay
2024-03-28 15:44   ` [PATCH v3 06/10] scheduler: " Joel Granados via B4 Relay
2024-04-09  9:02     ` Valentin Schneider
2024-03-28 15:44   ` [PATCH v3 07/10] printk: " Joel Granados via B4 Relay
2024-03-28 15:44   ` [PATCH v3 08/10] kprobes: " Joel Granados via B4 Relay
2024-03-28 15:44   ` [PATCH v3 09/10] delayacct: " Joel Granados via B4 Relay
2024-03-28 15:44   ` [PATCH v3 10/10] bpf: " Joel Granados via B4 Relay
2024-04-15 13:12   ` [PATCH v3 00/10] sysctl: Remove sentinel elements from kernel dir Joel Granados
2024-04-22 14:27   ` Konrad Dybcio
2024-04-22 14:49     ` Krzysztof Kozlowski
2024-04-22 14:57       ` Konstantin Ryabitsev
2024-04-22 15:07         ` Krzysztof Kozlowski
2024-04-24  7:55           ` Joel Granados
2024-04-24  7:46       ` Joel Granados
2024-04-24  7:41     ` Joel Granados
2024-04-24  7:52     ` Joel Granados

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).