All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-02 11:30 ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados,
	Ingo Molnar

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 "arch/" directory that use a
sysctl array for registration. The merging of the preparation patches
(in https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)
to mainline allows us to just remove sentinel elements without changing
behavior. This is now safe because the sysctl registration code
(register_sysctl() and friends) use the array size in addition to
checking for a sentinel ([1] for more info).

These commits are part of a bigger set (bigger patchset here
https://github.com/Joelgranados/linux/tree/tag/sysctl_remove_empty_elem_V4)
that remove the ctl_table sentinel. The idea is to make the review
process easier by chunking the 52 commits into manageable pieces. By
sending out one chunk at a time, they can be reviewed separately without
noise from parallel sets. After the "arch/" commits in this set are
reviewed, I will continue with drivers/*, fs/*, kernel/*, net/* and
miscellaneous. The final set will remove the unneeded check for
->procname == NULL.

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. I
have consolidated some links that shed light on the history of this
effort [2].

V2:
* Added clarification both in the commit messages and the coverletter as
  to why this patch is safe to apply.
* Added {Acked,Reviewed,Tested}-by from list
* Link to v1: https://lore.kernel.org/r/20230906-jag-sysctl_remove_empty_elem_arch-v1-0-3935d4854248@samsung.com

V3:
* Removed the ia64 patch to avoid conflicts with the ia64 removal
* Rebased onto v6.6-rc4
* Kept/added the trailing comma for the ctl_table arrays. This was a comment
  that we received "drivers/*" patch set.
* Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com

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

Size saving after removing all sentinels:
  A consequence of eventually removing all the sentinels (64 bytes per
  sentinel) is the bytes we save. These are *not* numbers that we will
  get after this patch set; these are the numbers that we will get after
  removing all the sentinels. I included them here because they are
  relevant and to get an idea of just how much memory we are talking
  about.
    * bloat-o-meter:
        - The "yesall" configuration results save 9158 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230621091000.424843-1-j.granados@samsung.com/)
        - The "tiny" config + CONFIG_SYSCTL save 1215 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/)
    * memory usage:
        we save some bytes in main memory as well. In my testing kernel
        I measured a difference of 7296 bytes. I include the way to
        measure in [3]

Size saving after this patchset:
  Here I give the values that I measured for the architecture that I'm
  running (x86_64). This can give an approximation of how many bytes are
  saved for each arch. I won't publish for all the archs because I don't
  have access to all of them.
    * bloat-o-meter
        - The "yesall" config saves 192 bytes (bloat-o-meter output [4])
        - The "tiny" config saves 64 bytes (bloat-o-meter output [5])
    * memory usage:
        In this case there were no bytes saved. To measure it comment the
        printk in `new_dir` and uncomment the if conditional in `new_links`
        [3].

Comments/feedback greatly appreciated

Best
Joel

[1]
https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/

[2]
Links Related to the ctl_table sentinel removal:
* Good summary from Luis sent with the "pull request" for the
  preparation patches.
  https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/
* Another very good summary from Luis.
  https://lore.kernel.org/all/ZMFizKFkVxUFtSqa@bombadil.infradead.org/
* This is a patch set that replaces register_sysctl_table with register_sysctl
  https://lore.kernel.org/all/20230302204612.782387-1-mcgrof@kernel.org/
* Patch set to deprecate register_sysctl_paths()
  https://lore.kernel.org/all/20230302202826.776286-1-mcgrof@kernel.org/
* Here there is an explicit expectation for the removal of the sentinel element.
  https://lore.kernel.org/all/20230321130908.6972-1-frank.li@vivo.com
* The "ARRAY_SIZE" approach was mentioned (proposed?) in this thread
  https://lore.kernel.org/all/20220220060626.15885-1-tangmeng@uniontech.com

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

"
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index c88854df0b62..e0073a627bac 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -976,6 +976,8 @@ 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);
+       // Counts additional sentinel used for each new dir.
+       printk("%ld sysctl saved mem kzalloc \n", sizeof(struct ctl_table));

        return new;
 }
@@ -1199,6 +1201,9 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table_
                link_name += len;
                link++;
        }
+       // Counts additional sentinel used for each new registration
+       //if ((head->ctl_table + head->ctl_table_size)->procname)
+               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
    echo $n
    accum=$(calc "$accum + $n")
done
echo $accum

[4]
add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-192 (-192)
Function                                     old     new   delta
sld_sysctls                                  128      64     -64
itmt_kern_table                              128      64     -64
abi_table2                                   128      64     -64
Total: Before=429173594, After=429173402, chg -0.00%

[5]
add/remove: 0/0 grow/shrink: 1/0 up/down: 64/0 (64)
Function                                     old     new   delta
sld_sysctls                                   64     128     +64
Total: Before=1886119, After=1886183, chg +0.00%

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

---

---
Joel Granados (7):
      S390: Remove now superfluous sentinel elem from ctl_table arrays
      arm: Remove now superfluous sentinel elem from ctl_table arrays
      arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
      x86/vdso: Remove now superfluous sentinel element from ctl_table array
      riscv: Remove now superfluous sentinel element from ctl_table array
      powerpc: Remove now superfluous sentinel element from ctl_table arrays
      c-sky: Remove now superfluous sentinel element from ctl_talbe array

 arch/arm/kernel/isa.c                     | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c      | 8 +++-----
 arch/arm64/kernel/fpsimd.c                | 2 --
 arch/arm64/kernel/process.c               | 1 -
 arch/csky/abiv1/alignment.c               | 1 -
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 arch/riscv/kernel/vector.c                | 1 -
 arch/s390/appldata/appldata_base.c        | 4 +---
 arch/s390/kernel/debug.c                  | 1 -
 arch/s390/kernel/topology.c               | 1 -
 arch/s390/mm/cmm.c                        | 1 -
 arch/s390/mm/pgalloc.c                    | 1 -
 arch/x86/entry/vdso/vdso32-setup.c        | 1 -
 arch/x86/kernel/cpu/intel.c               | 1 -
 arch/x86/kernel/itmt.c                    | 1 -
 drivers/perf/arm_pmuv3.c                  | 1 -
 17 files changed, 6 insertions(+), 25 deletions(-)
---
base-commit: 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa
change-id: 20230904-jag-sysctl_remove_empty_elem_arch-81db0a6e6cc4

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


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

* [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-02 11:30 ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados,
	Ingo Molnar

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 "arch/" directory that use a
sysctl array for registration. The merging of the preparation patches
(in https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)
to mainline allows us to just remove sentinel elements without changing
behavior. This is now safe because the sysctl registration code
(register_sysctl() and friends) use the array size in addition to
checking for a sentinel ([1] for more info).

These commits are part of a bigger set (bigger patchset here
https://github.com/Joelgranados/linux/tree/tag/sysctl_remove_empty_elem_V4)
that remove the ctl_table sentinel. The idea is to make the review
process easier by chunking the 52 commits into manageable pieces. By
sending out one chunk at a time, they can be reviewed separately without
noise from parallel sets. After the "arch/" commits in this set are
reviewed, I will continue with drivers/*, fs/*, kernel/*, net/* and
miscellaneous. The final set will remove the unneeded check for
->procname == NULL.

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. I
have consolidated some links that shed light on the history of this
effort [2].

V2:
* Added clarification both in the commit messages and the coverletter as
  to why this patch is safe to apply.
* Added {Acked,Reviewed,Tested}-by from list
* Link to v1: https://lore.kernel.org/r/20230906-jag-sysctl_remove_empty_elem_arch-v1-0-3935d4854248@samsung.com

V3:
* Removed the ia64 patch to avoid conflicts with the ia64 removal
* Rebased onto v6.6-rc4
* Kept/added the trailing comma for the ctl_table arrays. This was a comment
  that we received "drivers/*" patch set.
* Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com

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

Size saving after removing all sentinels:
  A consequence of eventually removing all the sentinels (64 bytes per
  sentinel) is the bytes we save. These are *not* numbers that we will
  get after this patch set; these are the numbers that we will get after
  removing all the sentinels. I included them here because they are
  relevant and to get an idea of just how much memory we are talking
  about.
    * bloat-o-meter:
        - The "yesall" configuration results save 9158 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230621091000.424843-1-j.granados@samsung.com/)
        - The "tiny" config + CONFIG_SYSCTL save 1215 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/)
    * memory usage:
        we save some bytes in main memory as well. In my testing kernel
        I measured a difference of 7296 bytes. I include the way to
        measure in [3]

Size saving after this patchset:
  Here I give the values that I measured for the architecture that I'm
  running (x86_64). This can give an approximation of how many bytes are
  saved for each arch. I won't publish for all the archs because I don't
  have access to all of them.
    * bloat-o-meter
        - The "yesall" config saves 192 bytes (bloat-o-meter output [4])
        - The "tiny" config saves 64 bytes (bloat-o-meter output [5])
    * memory usage:
        In this case there were no bytes saved. To measure it comment the
        printk in `new_dir` and uncomment the if conditional in `new_links`
        [3].

Comments/feedback greatly appreciated

Best
Joel

[1]
https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/

[2]
Links Related to the ctl_table sentinel removal:
* Good summary from Luis sent with the "pull request" for the
  preparation patches.
  https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/
* Another very good summary from Luis.
  https://lore.kernel.org/all/ZMFizKFkVxUFtSqa@bombadil.infradead.org/
* This is a patch set that replaces register_sysctl_table with register_sysctl
  https://lore.kernel.org/all/20230302204612.782387-1-mcgrof@kernel.org/
* Patch set to deprecate register_sysctl_paths()
  https://lore.kernel.org/all/20230302202826.776286-1-mcgrof@kernel.org/
* Here there is an explicit expectation for the removal of the sentinel element.
  https://lore.kernel.org/all/20230321130908.6972-1-frank.li@vivo.com
* The "ARRAY_SIZE" approach was mentioned (proposed?) in this thread
  https://lore.kernel.org/all/20220220060626.15885-1-tangmeng@uniontech.com

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

"
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index c88854df0b62..e0073a627bac 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -976,6 +976,8 @@ 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);
+       // Counts additional sentinel used for each new dir.
+       printk("%ld sysctl saved mem kzalloc \n", sizeof(struct ctl_table));

        return new;
 }
@@ -1199,6 +1201,9 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table_
                link_name += len;
                link++;
        }
+       // Counts additional sentinel used for each new registration
+       //if ((head->ctl_table + head->ctl_table_size)->procname)
+               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
    echo $n
    accum=$(calc "$accum + $n")
done
echo $accum

[4]
add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-192 (-192)
Function                                     old     new   delta
sld_sysctls                                  128      64     -64
itmt_kern_table                              128      64     -64
abi_table2                                   128      64     -64
Total: Before=429173594, After=429173402, chg -0.00%

[5]
add/remove: 0/0 grow/shrink: 1/0 up/down: 64/0 (64)
Function                                     old     new   delta
sld_sysctls                                   64     128     +64
Total: Before=1886119, After=1886183, chg +0.00%

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

---

---
Joel Granados (7):
      S390: Remove now superfluous sentinel elem from ctl_table arrays
      arm: Remove now superfluous sentinel elem from ctl_table arrays
      arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
      x86/vdso: Remove now superfluous sentinel element from ctl_table array
      riscv: Remove now superfluous sentinel element from ctl_table array
      powerpc: Remove now superfluous sentinel element from ctl_table arrays
      c-sky: Remove now superfluous sentinel element from ctl_talbe array

 arch/arm/kernel/isa.c                     | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c      | 8 +++-----
 arch/arm64/kernel/fpsimd.c                | 2 --
 arch/arm64/kernel/process.c               | 1 -
 arch/csky/abiv1/alignment.c               | 1 -
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 arch/riscv/kernel/vector.c                | 1 -
 arch/s390/appldata/appldata_base.c        | 4 +---
 arch/s390/kernel/debug.c                  | 1 -
 arch/s390/kernel/topology.c               | 1 -
 arch/s390/mm/cmm.c                        | 1 -
 arch/s390/mm/pgalloc.c                    | 1 -
 arch/x86/entry/vdso/vdso32-setup.c        | 1 -
 arch/x86/kernel/cpu/intel.c               | 1 -
 arch/x86/kernel/itmt.c                    | 1 -
 drivers/perf/arm_pmuv3.c                  | 1 -
 17 files changed, 6 insertions(+), 25 deletions(-)
---
base-commit: 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa
change-id: 20230904-jag-sysctl_remove_empty_elem_arch-81db0a6e6cc4

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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-02 11:30 ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: Joel Granados, linux-s390, linux-ia64, linux-kernel, linux-csky,
	linux-fsdevel, linux-riscv, linuxppc-dev, Ingo Molnar,
	linux-arm-kernel

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 "arch/" directory that use a
sysctl array for registration. The merging of the preparation patches
(in https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)
to mainline allows us to just remove sentinel elements without changing
behavior. This is now safe because the sysctl registration code
(register_sysctl() and friends) use the array size in addition to
checking for a sentinel ([1] for more info).

These commits are part of a bigger set (bigger patchset here
https://github.com/Joelgranados/linux/tree/tag/sysctl_remove_empty_elem_V4)
that remove the ctl_table sentinel. The idea is to make the review
process easier by chunking the 52 commits into manageable pieces. By
sending out one chunk at a time, they can be reviewed separately without
noise from parallel sets. After the "arch/" commits in this set are
reviewed, I will continue with drivers/*, fs/*, kernel/*, net/* and
miscellaneous. The final set will remove the unneeded check for
->procname == NULL.

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. I
have consolidated some links that shed light on the history of this
effort [2].

V2:
* Added clarification both in the commit messages and the coverletter as
  to why this patch is safe to apply.
* Added {Acked,Reviewed,Tested}-by from list
* Link to v1: https://lore.kernel.org/r/20230906-jag-sysctl_remove_empty_elem_arch-v1-0-3935d4854248@samsung.com

V3:
* Removed the ia64 patch to avoid conflicts with the ia64 removal
* Rebased onto v6.6-rc4
* Kept/added the trailing comma for the ctl_table arrays. This was a comment
  that we received "drivers/*" patch set.
* Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com

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

Size saving after removing all sentinels:
  A consequence of eventually removing all the sentinels (64 bytes per
  sentinel) is the bytes we save. These are *not* numbers that we will
  get after this patch set; these are the numbers that we will get after
  removing all the sentinels. I included them here because they are
  relevant and to get an idea of just how much memory we are talking
  about.
    * bloat-o-meter:
        - The "yesall" configuration results save 9158 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230621091000.424843-1-j.granados@samsung.com/)
        - The "tiny" config + CONFIG_SYSCTL save 1215 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/)
    * memory usage:
        we save some bytes in main memory as well. In my testing kernel
        I measured a difference of 7296 bytes. I include the way to
        measure in [3]

Size saving after this patchset:
  Here I give the values that I measured for the architecture that I'm
  running (x86_64). This can give an approximation of how many bytes are
  saved for each arch. I won't publish for all the archs because I don't
  have access to all of them.
    * bloat-o-meter
        - The "yesall" config saves 192 bytes (bloat-o-meter output [4])
        - The "tiny" config saves 64 bytes (bloat-o-meter output [5])
    * memory usage:
        In this case there were no bytes saved. To measure it comment the
        printk in `new_dir` and uncomment the if conditional in `new_links`
        [3].

Comments/feedback greatly appreciated

Best
Joel

[1]
https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/

[2]
Links Related to the ctl_table sentinel removal:
* Good summary from Luis sent with the "pull request" for the
  preparation patches.
  https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/
* Another very good summary from Luis.
  https://lore.kernel.org/all/ZMFizKFkVxUFtSqa@bombadil.infradead.org/
* This is a patch set that replaces register_sysctl_table with register_sysctl
  https://lore.kernel.org/all/20230302204612.782387-1-mcgrof@kernel.org/
* Patch set to deprecate register_sysctl_paths()
  https://lore.kernel.org/all/20230302202826.776286-1-mcgrof@kernel.org/
* Here there is an explicit expectation for the removal of the sentinel element.
  https://lore.kernel.org/all/20230321130908.6972-1-frank.li@vivo.com
* The "ARRAY_SIZE" approach was mentioned (proposed?) in this thread
  https://lore.kernel.org/all/20220220060626.15885-1-tangmeng@uniontech.com

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

"
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index c88854df0b62..e0073a627bac 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -976,6 +976,8 @@ 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);
+       // Counts additional sentinel used for each new dir.
+       printk("%ld sysctl saved mem kzalloc \n", sizeof(struct ctl_table));

        return new;
 }
@@ -1199,6 +1201,9 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table_
                link_name += len;
                link++;
        }
+       // Counts additional sentinel used for each new registration
+       //if ((head->ctl_table + head->ctl_table_size)->procname)
+               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
    echo $n
    accum=$(calc "$accum + $n")
done
echo $accum

[4]
add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-192 (-192)
Function                                     old     new   delta
sld_sysctls                                  128      64     -64
itmt_kern_table                              128      64     -64
abi_table2                                   128      64     -64
Total: Before=429173594, After=429173402, chg -0.00%

[5]
add/remove: 0/0 grow/shrink: 1/0 up/down: 64/0 (64)
Function                                     old     new   delta
sld_sysctls                                   64     128     +64
Total: Before=1886119, After=1886183, chg +0.00%

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

---

---
Joel Granados (7):
      S390: Remove now superfluous sentinel elem from ctl_table arrays
      arm: Remove now superfluous sentinel elem from ctl_table arrays
      arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
      x86/vdso: Remove now superfluous sentinel element from ctl_table array
      riscv: Remove now superfluous sentinel element from ctl_table array
      powerpc: Remove now superfluous sentinel element from ctl_table arrays
      c-sky: Remove now superfluous sentinel element from ctl_talbe array

 arch/arm/kernel/isa.c                     | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c      | 8 +++-----
 arch/arm64/kernel/fpsimd.c                | 2 --
 arch/arm64/kernel/process.c               | 1 -
 arch/csky/abiv1/alignment.c               | 1 -
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 arch/riscv/kernel/vector.c                | 1 -
 arch/s390/appldata/appldata_base.c        | 4 +---
 arch/s390/kernel/debug.c                  | 1 -
 arch/s390/kernel/topology.c               | 1 -
 arch/s390/mm/cmm.c                        | 1 -
 arch/s390/mm/pgalloc.c                    | 1 -
 arch/x86/entry/vdso/vdso32-setup.c        | 1 -
 arch/x86/kernel/cpu/intel.c               | 1 -
 arch/x86/kernel/itmt.c                    | 1 -
 drivers/perf/arm_pmuv3.c                  | 1 -
 17 files changed, 6 insertions(+), 25 deletions(-)
---
base-commit: 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa
change-id: 20230904-jag-sysctl_remove_empty_elem_arch-81db0a6e6cc4

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


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

* [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-02 11:30 ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados,
	Ingo Molnar

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 "arch/" directory that use a
sysctl array for registration. The merging of the preparation patches
(in https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)
to mainline allows us to just remove sentinel elements without changing
behavior. This is now safe because the sysctl registration code
(register_sysctl() and friends) use the array size in addition to
checking for a sentinel ([1] for more info).

These commits are part of a bigger set (bigger patchset here
https://github.com/Joelgranados/linux/tree/tag/sysctl_remove_empty_elem_V4)
that remove the ctl_table sentinel. The idea is to make the review
process easier by chunking the 52 commits into manageable pieces. By
sending out one chunk at a time, they can be reviewed separately without
noise from parallel sets. After the "arch/" commits in this set are
reviewed, I will continue with drivers/*, fs/*, kernel/*, net/* and
miscellaneous. The final set will remove the unneeded check for
->procname == NULL.

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. I
have consolidated some links that shed light on the history of this
effort [2].

V2:
* Added clarification both in the commit messages and the coverletter as
  to why this patch is safe to apply.
* Added {Acked,Reviewed,Tested}-by from list
* Link to v1: https://lore.kernel.org/r/20230906-jag-sysctl_remove_empty_elem_arch-v1-0-3935d4854248@samsung.com

V3:
* Removed the ia64 patch to avoid conflicts with the ia64 removal
* Rebased onto v6.6-rc4
* Kept/added the trailing comma for the ctl_table arrays. This was a comment
  that we received "drivers/*" patch set.
* Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com

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

Size saving after removing all sentinels:
  A consequence of eventually removing all the sentinels (64 bytes per
  sentinel) is the bytes we save. These are *not* numbers that we will
  get after this patch set; these are the numbers that we will get after
  removing all the sentinels. I included them here because they are
  relevant and to get an idea of just how much memory we are talking
  about.
    * bloat-o-meter:
        - The "yesall" configuration results save 9158 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230621091000.424843-1-j.granados@samsung.com/)
        - The "tiny" config + CONFIG_SYSCTL save 1215 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/)
    * memory usage:
        we save some bytes in main memory as well. In my testing kernel
        I measured a difference of 7296 bytes. I include the way to
        measure in [3]

Size saving after this patchset:
  Here I give the values that I measured for the architecture that I'm
  running (x86_64). This can give an approximation of how many bytes are
  saved for each arch. I won't publish for all the archs because I don't
  have access to all of them.
    * bloat-o-meter
        - The "yesall" config saves 192 bytes (bloat-o-meter output [4])
        - The "tiny" config saves 64 bytes (bloat-o-meter output [5])
    * memory usage:
        In this case there were no bytes saved. To measure it comment the
        printk in `new_dir` and uncomment the if conditional in `new_links`
        [3].

Comments/feedback greatly appreciated

Best
Joel

[1]
https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/

[2]
Links Related to the ctl_table sentinel removal:
* Good summary from Luis sent with the "pull request" for the
  preparation patches.
  https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/
* Another very good summary from Luis.
  https://lore.kernel.org/all/ZMFizKFkVxUFtSqa@bombadil.infradead.org/
* This is a patch set that replaces register_sysctl_table with register_sysctl
  https://lore.kernel.org/all/20230302204612.782387-1-mcgrof@kernel.org/
* Patch set to deprecate register_sysctl_paths()
  https://lore.kernel.org/all/20230302202826.776286-1-mcgrof@kernel.org/
* Here there is an explicit expectation for the removal of the sentinel element.
  https://lore.kernel.org/all/20230321130908.6972-1-frank.li@vivo.com
* The "ARRAY_SIZE" approach was mentioned (proposed?) in this thread
  https://lore.kernel.org/all/20220220060626.15885-1-tangmeng@uniontech.com

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

"
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index c88854df0b62..e0073a627bac 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -976,6 +976,8 @@ 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);
+       // Counts additional sentinel used for each new dir.
+       printk("%ld sysctl saved mem kzalloc \n", sizeof(struct ctl_table));

        return new;
 }
@@ -1199,6 +1201,9 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table_
                link_name += len;
                link++;
        }
+       // Counts additional sentinel used for each new registration
+       //if ((head->ctl_table + head->ctl_table_size)->procname)
+               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
    echo $n
    accum=$(calc "$accum + $n")
done
echo $accum

[4]
add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-192 (-192)
Function                                     old     new   delta
sld_sysctls                                  128      64     -64
itmt_kern_table                              128      64     -64
abi_table2                                   128      64     -64
Total: Before=429173594, After=429173402, chg -0.00%

[5]
add/remove: 0/0 grow/shrink: 1/0 up/down: 64/0 (64)
Function                                     old     new   delta
sld_sysctls                                   64     128     +64
Total: Before=1886119, After=1886183, chg +0.00%

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

---

---
Joel Granados (7):
      S390: Remove now superfluous sentinel elem from ctl_table arrays
      arm: Remove now superfluous sentinel elem from ctl_table arrays
      arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
      x86/vdso: Remove now superfluous sentinel element from ctl_table array
      riscv: Remove now superfluous sentinel element from ctl_table array
      powerpc: Remove now superfluous sentinel element from ctl_table arrays
      c-sky: Remove now superfluous sentinel element from ctl_talbe array

 arch/arm/kernel/isa.c                     | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c      | 8 +++-----
 arch/arm64/kernel/fpsimd.c                | 2 --
 arch/arm64/kernel/process.c               | 1 -
 arch/csky/abiv1/alignment.c               | 1 -
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 arch/riscv/kernel/vector.c                | 1 -
 arch/s390/appldata/appldata_base.c        | 4 +---
 arch/s390/kernel/debug.c                  | 1 -
 arch/s390/kernel/topology.c               | 1 -
 arch/s390/mm/cmm.c                        | 1 -
 arch/s390/mm/pgalloc.c                    | 1 -
 arch/x86/entry/vdso/vdso32-setup.c        | 1 -
 arch/x86/kernel/cpu/intel.c               | 1 -
 arch/x86/kernel/itmt.c                    | 1 -
 drivers/perf/arm_pmuv3.c                  | 1 -
 17 files changed, 6 insertions(+), 25 deletions(-)
---
base-commit: 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa
change-id: 20230904-jag-sysctl_remove_empty_elem_arch-81db0a6e6cc4

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-02 11:30 ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados,
	Ingo Molnar

What?
These commits remove the sentinel element (last empty element) from the
sysctl arrays of all the files under the "arch/" directory that use a
sysctl array for registration. The merging of the preparation patches
(in https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)
to mainline allows us to just remove sentinel elements without changing
behavior. This is now safe because the sysctl registration code
(register_sysctl() and friends) use the array size in addition to
checking for a sentinel ([1] for more info).

These commits are part of a bigger set (bigger patchset here
https://github.com/Joelgranados/linux/tree/tag/sysctl_remove_empty_elem_V4)
that remove the ctl_table sentinel. The idea is to make the review
process easier by chunking the 52 commits into manageable pieces. By
sending out one chunk at a time, they can be reviewed separately without
noise from parallel sets. After the "arch/" commits in this set are
reviewed, I will continue with drivers/*, fs/*, kernel/*, net/* and
miscellaneous. The final set will remove the unneeded check for
->procname == NULL.

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. I
have consolidated some links that shed light on the history of this
effort [2].

V2:
* Added clarification both in the commit messages and the coverletter as
  to why this patch is safe to apply.
* Added {Acked,Reviewed,Tested}-by from list
* Link to v1: https://lore.kernel.org/r/20230906-jag-sysctl_remove_empty_elem_arch-v1-0-3935d4854248@samsung.com

V3:
* Removed the ia64 patch to avoid conflicts with the ia64 removal
* Rebased onto v6.6-rc4
* Kept/added the trailing comma for the ctl_table arrays. This was a comment
  that we received "drivers/*" patch set.
* Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com

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

Size saving after removing all sentinels:
  A consequence of eventually removing all the sentinels (64 bytes per
  sentinel) is the bytes we save. These are *not* numbers that we will
  get after this patch set; these are the numbers that we will get after
  removing all the sentinels. I included them here because they are
  relevant and to get an idea of just how much memory we are talking
  about.
    * bloat-o-meter:
        - The "yesall" configuration results save 9158 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230621091000.424843-1-j.granados@samsung.com/)
        - The "tiny" config + CONFIG_SYSCTL save 1215 bytes (bloat-o-meter output here
          https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/)
    * memory usage:
        we save some bytes in main memory as well. In my testing kernel
        I measured a difference of 7296 bytes. I include the way to
        measure in [3]

Size saving after this patchset:
  Here I give the values that I measured for the architecture that I'm
  running (x86_64). This can give an approximation of how many bytes are
  saved for each arch. I won't publish for all the archs because I don't
  have access to all of them.
    * bloat-o-meter
        - The "yesall" config saves 192 bytes (bloat-o-meter output [4])
        - The "tiny" config saves 64 bytes (bloat-o-meter output [5])
    * memory usage:
        In this case there were no bytes saved. To measure it comment the
        printk in `new_dir` and uncomment the if conditional in `new_links`
        [3].

Comments/feedback greatly appreciated

Best
Joel

[1]
https://lore.kernel.org/all/20230809105006.1198165-1-j.granados@samsung.com/

[2]
Links Related to the ctl_table sentinel removal:
* Good summary from Luis sent with the "pull request" for the
  preparation patches.
  https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/
* Another very good summary from Luis.
  https://lore.kernel.org/all/ZMFizKFkVxUFtSqa@bombadil.infradead.org/
* This is a patch set that replaces register_sysctl_table with register_sysctl
  https://lore.kernel.org/all/20230302204612.782387-1-mcgrof@kernel.org/
* Patch set to deprecate register_sysctl_paths()
  https://lore.kernel.org/all/20230302202826.776286-1-mcgrof@kernel.org/
* Here there is an explicit expectation for the removal of the sentinel element.
  https://lore.kernel.org/all/20230321130908.6972-1-frank.li@vivo.com
* The "ARRAY_SIZE" approach was mentioned (proposed?) in this thread
  https://lore.kernel.org/all/20220220060626.15885-1-tangmeng@uniontech.com

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

"
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index c88854df0b62..e0073a627bac 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -976,6 +976,8 @@ 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);
+       // Counts additional sentinel used for each new dir.
+       printk("%ld sysctl saved mem kzalloc \n", sizeof(struct ctl_table));

        return new;
 }
@@ -1199,6 +1201,9 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table_
                link_name += len;
                link++;
        }
+       // Counts additional sentinel used for each new registration
+       //if ((head->ctl_table + head->ctl_table_size)->procname)
+               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
    echo $n
    accum=$(calc "$accum + $n")
done
echo $accum

[4]
add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-192 (-192)
Function                                     old     new   delta
sld_sysctls                                  128      64     -64
itmt_kern_table                              128      64     -64
abi_table2                                   128      64     -64
Total: Before=429173594, After=429173402, chg -0.00%

[5]
add/remove: 0/0 grow/shrink: 1/0 up/down: 64/0 (64)
Function                                     old     new   delta
sld_sysctls                                   64     128     +64
Total: Before=1886119, After=1886183, chg +0.00%

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

---

---
Joel Granados (7):
      S390: Remove now superfluous sentinel elem from ctl_table arrays
      arm: Remove now superfluous sentinel elem from ctl_table arrays
      arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
      x86/vdso: Remove now superfluous sentinel element from ctl_table array
      riscv: Remove now superfluous sentinel element from ctl_table array
      powerpc: Remove now superfluous sentinel element from ctl_table arrays
      c-sky: Remove now superfluous sentinel element from ctl_talbe array

 arch/arm/kernel/isa.c                     | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c      | 8 +++-----
 arch/arm64/kernel/fpsimd.c                | 2 --
 arch/arm64/kernel/process.c               | 1 -
 arch/csky/abiv1/alignment.c               | 1 -
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 arch/riscv/kernel/vector.c                | 1 -
 arch/s390/appldata/appldata_base.c        | 4 +---
 arch/s390/kernel/debug.c                  | 1 -
 arch/s390/kernel/topology.c               | 1 -
 arch/s390/mm/cmm.c                        | 1 -
 arch/s390/mm/pgalloc.c                    | 1 -
 arch/x86/entry/vdso/vdso32-setup.c        | 1 -
 arch/x86/kernel/cpu/intel.c               | 1 -
 arch/x86/kernel/itmt.c                    | 1 -
 drivers/perf/arm_pmuv3.c                  | 1 -
 17 files changed, 6 insertions(+), 25 deletions(-)
---
base-commit: 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa
change-id: 20230904-jag-sysctl_remove_empty_elem_arch-81db0a6e6cc4

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


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

* [PATCH v3 1/7] S390: Remove now superfluous sentinel elem from ctl_table arrays
  2023-10-02 11:30 ` Joel Granados via B4 Relay
                     ` (2 preceding siblings ...)
  (?)
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  -1 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 element from appldata_table, s390dbf_table,
topology_ctl_table, cmm_table and page_table_sysctl. Reduced the memory
allocation in appldata_register_ops by 1 effectively removing the
sentinel from ops->ctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/s390/appldata/appldata_base.c | 4 +---
 arch/s390/kernel/debug.c           | 1 -
 arch/s390/kernel/topology.c        | 1 -
 arch/s390/mm/cmm.c                 | 1 -
 arch/s390/mm/pgalloc.c             | 1 -
 5 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 3b0994625652..c2978cb03b36 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -63,7 +63,6 @@ static struct ctl_table appldata_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= appldata_interval_handler,
 	},
-	{ },
 };
 
 /*
@@ -351,8 +350,7 @@ int appldata_register_ops(struct appldata_ops *ops)
 	if (ops->size > APPLDATA_MAX_REC_SIZE)
 		return -EINVAL;
 
-	/* The last entry must be an empty one */
-	ops->ctl_table = kcalloc(2, sizeof(struct ctl_table), GFP_KERNEL);
+	ops->ctl_table = kcalloc(1, sizeof(struct ctl_table), GFP_KERNEL);
 	if (!ops->ctl_table)
 		return -ENOMEM;
 
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index a85e0c3e7027..85328a0ef3b6 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -978,7 +978,6 @@ static struct ctl_table s390dbf_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= s390dbf_procactive,
 	},
-	{ }
 };
 
 static struct ctl_table_header *s390dbf_sysctl_header;
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 68adf1de8888..be8467b25953 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -636,7 +636,6 @@ static struct ctl_table topology_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= topology_ctl_handler,
 	},
-	{ },
 };
 
 static int __init topology_init(void)
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index f47515313226..f8b13f247646 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -332,7 +332,6 @@ static struct ctl_table cmm_table[] = {
 		.mode		= 0644,
 		.proc_handler	= cmm_timeout_handler,
 	},
-	{ }
 };
 
 #ifdef CONFIG_CMM_IUCV
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
index 07fc660a24aa..75e1039f2ec5 100644
--- a/arch/s390/mm/pgalloc.c
+++ b/arch/s390/mm/pgalloc.c
@@ -30,7 +30,6 @@ static struct ctl_table page_table_sysctl[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init page_table_register_sysctl(void)

-- 
2.30.2


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

* [PATCH v3 1/7] S390: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 element from appldata_table, s390dbf_table,
topology_ctl_table, cmm_table and page_table_sysctl. Reduced the memory
allocation in appldata_register_ops by 1 effectively removing the
sentinel from ops->ctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/s390/appldata/appldata_base.c | 4 +---
 arch/s390/kernel/debug.c           | 1 -
 arch/s390/kernel/topology.c        | 1 -
 arch/s390/mm/cmm.c                 | 1 -
 arch/s390/mm/pgalloc.c             | 1 -
 5 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 3b0994625652..c2978cb03b36 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -63,7 +63,6 @@ static struct ctl_table appldata_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= appldata_interval_handler,
 	},
-	{ },
 };
 
 /*
@@ -351,8 +350,7 @@ int appldata_register_ops(struct appldata_ops *ops)
 	if (ops->size > APPLDATA_MAX_REC_SIZE)
 		return -EINVAL;
 
-	/* The last entry must be an empty one */
-	ops->ctl_table = kcalloc(2, sizeof(struct ctl_table), GFP_KERNEL);
+	ops->ctl_table = kcalloc(1, sizeof(struct ctl_table), GFP_KERNEL);
 	if (!ops->ctl_table)
 		return -ENOMEM;
 
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index a85e0c3e7027..85328a0ef3b6 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -978,7 +978,6 @@ static struct ctl_table s390dbf_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= s390dbf_procactive,
 	},
-	{ }
 };
 
 static struct ctl_table_header *s390dbf_sysctl_header;
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 68adf1de8888..be8467b25953 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -636,7 +636,6 @@ static struct ctl_table topology_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= topology_ctl_handler,
 	},
-	{ },
 };
 
 static int __init topology_init(void)
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index f47515313226..f8b13f247646 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -332,7 +332,6 @@ static struct ctl_table cmm_table[] = {
 		.mode		= 0644,
 		.proc_handler	= cmm_timeout_handler,
 	},
-	{ }
 };
 
 #ifdef CONFIG_CMM_IUCV
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
index 07fc660a24aa..75e1039f2ec5 100644
--- a/arch/s390/mm/pgalloc.c
+++ b/arch/s390/mm/pgalloc.c
@@ -30,7 +30,6 @@ static struct ctl_table page_table_sysctl[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init page_table_register_sysctl(void)

-- 
2.30.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH v3 1/7] S390: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 element from appldata_table, s390dbf_table,
topology_ctl_table, cmm_table and page_table_sysctl. Reduced the memory
allocation in appldata_register_ops by 1 effectively removing the
sentinel from ops->ctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/s390/appldata/appldata_base.c | 4 +---
 arch/s390/kernel/debug.c           | 1 -
 arch/s390/kernel/topology.c        | 1 -
 arch/s390/mm/cmm.c                 | 1 -
 arch/s390/mm/pgalloc.c             | 1 -
 5 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 3b0994625652..c2978cb03b36 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -63,7 +63,6 @@ static struct ctl_table appldata_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= appldata_interval_handler,
 	},
-	{ },
 };
 
 /*
@@ -351,8 +350,7 @@ int appldata_register_ops(struct appldata_ops *ops)
 	if (ops->size > APPLDATA_MAX_REC_SIZE)
 		return -EINVAL;
 
-	/* The last entry must be an empty one */
-	ops->ctl_table = kcalloc(2, sizeof(struct ctl_table), GFP_KERNEL);
+	ops->ctl_table = kcalloc(1, sizeof(struct ctl_table), GFP_KERNEL);
 	if (!ops->ctl_table)
 		return -ENOMEM;
 
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index a85e0c3e7027..85328a0ef3b6 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -978,7 +978,6 @@ static struct ctl_table s390dbf_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= s390dbf_procactive,
 	},
-	{ }
 };
 
 static struct ctl_table_header *s390dbf_sysctl_header;
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 68adf1de8888..be8467b25953 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -636,7 +636,6 @@ static struct ctl_table topology_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= topology_ctl_handler,
 	},
-	{ },
 };
 
 static int __init topology_init(void)
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index f47515313226..f8b13f247646 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -332,7 +332,6 @@ static struct ctl_table cmm_table[] = {
 		.mode		= 0644,
 		.proc_handler	= cmm_timeout_handler,
 	},
-	{ }
 };
 
 #ifdef CONFIG_CMM_IUCV
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
index 07fc660a24aa..75e1039f2ec5 100644
--- a/arch/s390/mm/pgalloc.c
+++ b/arch/s390/mm/pgalloc.c
@@ -30,7 +30,6 @@ static struct ctl_table page_table_sysctl[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init page_table_register_sysctl(void)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 1/7] S390: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: Joel Granados, linux-s390, linux-ia64, linux-kernel, linux-csky,
	linux-fsdevel, linux-riscv, linuxppc-dev, linux-arm-kernel

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 element from appldata_table, s390dbf_table,
topology_ctl_table, cmm_table and page_table_sysctl. Reduced the memory
allocation in appldata_register_ops by 1 effectively removing the
sentinel from ops->ctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/s390/appldata/appldata_base.c | 4 +---
 arch/s390/kernel/debug.c           | 1 -
 arch/s390/kernel/topology.c        | 1 -
 arch/s390/mm/cmm.c                 | 1 -
 arch/s390/mm/pgalloc.c             | 1 -
 5 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 3b0994625652..c2978cb03b36 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -63,7 +63,6 @@ static struct ctl_table appldata_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= appldata_interval_handler,
 	},
-	{ },
 };
 
 /*
@@ -351,8 +350,7 @@ int appldata_register_ops(struct appldata_ops *ops)
 	if (ops->size > APPLDATA_MAX_REC_SIZE)
 		return -EINVAL;
 
-	/* The last entry must be an empty one */
-	ops->ctl_table = kcalloc(2, sizeof(struct ctl_table), GFP_KERNEL);
+	ops->ctl_table = kcalloc(1, sizeof(struct ctl_table), GFP_KERNEL);
 	if (!ops->ctl_table)
 		return -ENOMEM;
 
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index a85e0c3e7027..85328a0ef3b6 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -978,7 +978,6 @@ static struct ctl_table s390dbf_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= s390dbf_procactive,
 	},
-	{ }
 };
 
 static struct ctl_table_header *s390dbf_sysctl_header;
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 68adf1de8888..be8467b25953 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -636,7 +636,6 @@ static struct ctl_table topology_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= topology_ctl_handler,
 	},
-	{ },
 };
 
 static int __init topology_init(void)
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index f47515313226..f8b13f247646 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -332,7 +332,6 @@ static struct ctl_table cmm_table[] = {
 		.mode		= 0644,
 		.proc_handler	= cmm_timeout_handler,
 	},
-	{ }
 };
 
 #ifdef CONFIG_CMM_IUCV
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
index 07fc660a24aa..75e1039f2ec5 100644
--- a/arch/s390/mm/pgalloc.c
+++ b/arch/s390/mm/pgalloc.c
@@ -30,7 +30,6 @@ static struct ctl_table page_table_sysctl[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init page_table_register_sysctl(void)

-- 
2.30.2


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

* [PATCH v3 1/7] S390: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados

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 element from appldata_table, s390dbf_table,
topology_ctl_table, cmm_table and page_table_sysctl. Reduced the memory
allocation in appldata_register_ops by 1 effectively removing the
sentinel from ops->ctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/s390/appldata/appldata_base.c | 4 +---
 arch/s390/kernel/debug.c           | 1 -
 arch/s390/kernel/topology.c        | 1 -
 arch/s390/mm/cmm.c                 | 1 -
 arch/s390/mm/pgalloc.c             | 1 -
 5 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 3b0994625652..c2978cb03b36 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -63,7 +63,6 @@ static struct ctl_table appldata_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= appldata_interval_handler,
 	},
-	{ },
 };
 
 /*
@@ -351,8 +350,7 @@ int appldata_register_ops(struct appldata_ops *ops)
 	if (ops->size > APPLDATA_MAX_REC_SIZE)
 		return -EINVAL;
 
-	/* The last entry must be an empty one */
-	ops->ctl_table = kcalloc(2, sizeof(struct ctl_table), GFP_KERNEL);
+	ops->ctl_table = kcalloc(1, sizeof(struct ctl_table), GFP_KERNEL);
 	if (!ops->ctl_table)
 		return -ENOMEM;
 
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index a85e0c3e7027..85328a0ef3b6 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -978,7 +978,6 @@ static struct ctl_table s390dbf_table[] = {
 		.mode		= S_IRUGO | S_IWUSR,
 		.proc_handler	= s390dbf_procactive,
 	},
-	{ }
 };
 
 static struct ctl_table_header *s390dbf_sysctl_header;
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 68adf1de8888..be8467b25953 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -636,7 +636,6 @@ static struct ctl_table topology_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= topology_ctl_handler,
 	},
-	{ },
 };
 
 static int __init topology_init(void)
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index f47515313226..f8b13f247646 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -332,7 +332,6 @@ static struct ctl_table cmm_table[] = {
 		.mode		= 0644,
 		.proc_handler	= cmm_timeout_handler,
 	},
-	{ }
 };
 
 #ifdef CONFIG_CMM_IUCV
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
index 07fc660a24aa..75e1039f2ec5 100644
--- a/arch/s390/mm/pgalloc.c
+++ b/arch/s390/mm/pgalloc.c
@@ -30,7 +30,6 @@ static struct ctl_table page_table_sysctl[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init page_table_register_sysctl(void)

-- 
2.30.2


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

* [PATCH v3 2/7] arm: Remove now superfluous sentinel elem from ctl_table arrays
  2023-10-02 11:30 ` Joel Granados via B4 Relay
                     ` (2 preceding siblings ...)
  (?)
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  -1 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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/)

Removed the sentinel as well as the explicit size from ctl_isa_vars. The
size is redundant as the initialization sets it. Changed
insn_emulation->sysctl from a 2 element array of struct ctl_table to a
simple struct. This has no consequence for the sysctl registration as it
is forwarded as a pointer. Removed sentinel from sve_defatul_vl_table,
sme_default_vl_table, tagged_addr_sysctl_table and
armv8_pmu_sysctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/arm/kernel/isa.c                | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c | 8 +++-----
 arch/arm64/kernel/fpsimd.c           | 2 --
 arch/arm64/kernel/process.c          | 1 -
 drivers/perf/arm_pmuv3.c             | 1 -
 5 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
index 20218876bef2..905b1b191546 100644
--- a/arch/arm/kernel/isa.c
+++ b/arch/arm/kernel/isa.c
@@ -16,7 +16,7 @@
 
 static unsigned int isa_membase, isa_portbase, isa_portshift;
 
-static struct ctl_table ctl_isa_vars[4] = {
+static struct ctl_table ctl_isa_vars[] = {
 	{
 		.procname	= "membase",
 		.data		= &isa_membase, 
@@ -35,7 +35,7 @@ static struct ctl_table ctl_isa_vars[4] = {
 		.maxlen		= sizeof(isa_portshift),
 		.mode		= 0444,
 		.proc_handler	= proc_dointvec,
-	}, {}
+	},
 };
 
 static struct ctl_table_header *isa_sysctl_header;
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c
index e459cfd33711..dd6ce86d4332 100644
--- a/arch/arm64/kernel/armv8_deprecated.c
+++ b/arch/arm64/kernel/armv8_deprecated.c
@@ -52,10 +52,8 @@ struct insn_emulation {
 	int min;
 	int max;
 
-	/*
-	 * sysctl for this emulation + a sentinal entry.
-	 */
-	struct ctl_table sysctl[2];
+	/* sysctl for this emulation */
+	struct ctl_table sysctl;
 };
 
 #define ARM_OPCODE_CONDTEST_FAIL   0
@@ -558,7 +556,7 @@ static void __init register_insn_emulation(struct insn_emulation *insn)
 	update_insn_emulation_mode(insn, INSN_UNDEF);
 
 	if (insn->status != INSN_UNAVAILABLE) {
-		sysctl = &insn->sysctl[0];
+		sysctl = &insn->sysctl;
 
 		sysctl->mode = 0644;
 		sysctl->maxlen = sizeof(int);
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 91e44ac7150f..9afd0eb0cf88 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -589,7 +589,6 @@ static struct ctl_table sve_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SVE],
 	},
-	{ }
 };
 
 static int __init sve_sysctl_init(void)
@@ -613,7 +612,6 @@ static struct ctl_table sme_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SME],
 	},
-	{ }
 };
 
 static int __init sme_sysctl_init(void)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 0fcc4eb1a7ab..610e13c3d41b 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -724,7 +724,6 @@ static struct ctl_table tagged_addr_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init tagged_addr_init(void)
diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c
index 8fcaa26f0f8a..c0307b9181c3 100644
--- a/drivers/perf/arm_pmuv3.c
+++ b/drivers/perf/arm_pmuv3.c
@@ -1175,7 +1175,6 @@ static struct ctl_table armv8_pmu_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static void armv8_pmu_register_sysctl_table(void)

-- 
2.30.2


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

* [PATCH v3 2/7] arm: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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/)

Removed the sentinel as well as the explicit size from ctl_isa_vars. The
size is redundant as the initialization sets it. Changed
insn_emulation->sysctl from a 2 element array of struct ctl_table to a
simple struct. This has no consequence for the sysctl registration as it
is forwarded as a pointer. Removed sentinel from sve_defatul_vl_table,
sme_default_vl_table, tagged_addr_sysctl_table and
armv8_pmu_sysctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/arm/kernel/isa.c                | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c | 8 +++-----
 arch/arm64/kernel/fpsimd.c           | 2 --
 arch/arm64/kernel/process.c          | 1 -
 drivers/perf/arm_pmuv3.c             | 1 -
 5 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
index 20218876bef2..905b1b191546 100644
--- a/arch/arm/kernel/isa.c
+++ b/arch/arm/kernel/isa.c
@@ -16,7 +16,7 @@
 
 static unsigned int isa_membase, isa_portbase, isa_portshift;
 
-static struct ctl_table ctl_isa_vars[4] = {
+static struct ctl_table ctl_isa_vars[] = {
 	{
 		.procname	= "membase",
 		.data		= &isa_membase, 
@@ -35,7 +35,7 @@ static struct ctl_table ctl_isa_vars[4] = {
 		.maxlen		= sizeof(isa_portshift),
 		.mode		= 0444,
 		.proc_handler	= proc_dointvec,
-	}, {}
+	},
 };
 
 static struct ctl_table_header *isa_sysctl_header;
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c
index e459cfd33711..dd6ce86d4332 100644
--- a/arch/arm64/kernel/armv8_deprecated.c
+++ b/arch/arm64/kernel/armv8_deprecated.c
@@ -52,10 +52,8 @@ struct insn_emulation {
 	int min;
 	int max;
 
-	/*
-	 * sysctl for this emulation + a sentinal entry.
-	 */
-	struct ctl_table sysctl[2];
+	/* sysctl for this emulation */
+	struct ctl_table sysctl;
 };
 
 #define ARM_OPCODE_CONDTEST_FAIL   0
@@ -558,7 +556,7 @@ static void __init register_insn_emulation(struct insn_emulation *insn)
 	update_insn_emulation_mode(insn, INSN_UNDEF);
 
 	if (insn->status != INSN_UNAVAILABLE) {
-		sysctl = &insn->sysctl[0];
+		sysctl = &insn->sysctl;
 
 		sysctl->mode = 0644;
 		sysctl->maxlen = sizeof(int);
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 91e44ac7150f..9afd0eb0cf88 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -589,7 +589,6 @@ static struct ctl_table sve_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SVE],
 	},
-	{ }
 };
 
 static int __init sve_sysctl_init(void)
@@ -613,7 +612,6 @@ static struct ctl_table sme_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SME],
 	},
-	{ }
 };
 
 static int __init sme_sysctl_init(void)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 0fcc4eb1a7ab..610e13c3d41b 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -724,7 +724,6 @@ static struct ctl_table tagged_addr_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init tagged_addr_init(void)
diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c
index 8fcaa26f0f8a..c0307b9181c3 100644
--- a/drivers/perf/arm_pmuv3.c
+++ b/drivers/perf/arm_pmuv3.c
@@ -1175,7 +1175,6 @@ static struct ctl_table armv8_pmu_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static void armv8_pmu_register_sysctl_table(void)

-- 
2.30.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH v3 2/7] arm: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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/)

Removed the sentinel as well as the explicit size from ctl_isa_vars. The
size is redundant as the initialization sets it. Changed
insn_emulation->sysctl from a 2 element array of struct ctl_table to a
simple struct. This has no consequence for the sysctl registration as it
is forwarded as a pointer. Removed sentinel from sve_defatul_vl_table,
sme_default_vl_table, tagged_addr_sysctl_table and
armv8_pmu_sysctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/arm/kernel/isa.c                | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c | 8 +++-----
 arch/arm64/kernel/fpsimd.c           | 2 --
 arch/arm64/kernel/process.c          | 1 -
 drivers/perf/arm_pmuv3.c             | 1 -
 5 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
index 20218876bef2..905b1b191546 100644
--- a/arch/arm/kernel/isa.c
+++ b/arch/arm/kernel/isa.c
@@ -16,7 +16,7 @@
 
 static unsigned int isa_membase, isa_portbase, isa_portshift;
 
-static struct ctl_table ctl_isa_vars[4] = {
+static struct ctl_table ctl_isa_vars[] = {
 	{
 		.procname	= "membase",
 		.data		= &isa_membase, 
@@ -35,7 +35,7 @@ static struct ctl_table ctl_isa_vars[4] = {
 		.maxlen		= sizeof(isa_portshift),
 		.mode		= 0444,
 		.proc_handler	= proc_dointvec,
-	}, {}
+	},
 };
 
 static struct ctl_table_header *isa_sysctl_header;
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c
index e459cfd33711..dd6ce86d4332 100644
--- a/arch/arm64/kernel/armv8_deprecated.c
+++ b/arch/arm64/kernel/armv8_deprecated.c
@@ -52,10 +52,8 @@ struct insn_emulation {
 	int min;
 	int max;
 
-	/*
-	 * sysctl for this emulation + a sentinal entry.
-	 */
-	struct ctl_table sysctl[2];
+	/* sysctl for this emulation */
+	struct ctl_table sysctl;
 };
 
 #define ARM_OPCODE_CONDTEST_FAIL   0
@@ -558,7 +556,7 @@ static void __init register_insn_emulation(struct insn_emulation *insn)
 	update_insn_emulation_mode(insn, INSN_UNDEF);
 
 	if (insn->status != INSN_UNAVAILABLE) {
-		sysctl = &insn->sysctl[0];
+		sysctl = &insn->sysctl;
 
 		sysctl->mode = 0644;
 		sysctl->maxlen = sizeof(int);
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 91e44ac7150f..9afd0eb0cf88 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -589,7 +589,6 @@ static struct ctl_table sve_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SVE],
 	},
-	{ }
 };
 
 static int __init sve_sysctl_init(void)
@@ -613,7 +612,6 @@ static struct ctl_table sme_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SME],
 	},
-	{ }
 };
 
 static int __init sme_sysctl_init(void)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 0fcc4eb1a7ab..610e13c3d41b 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -724,7 +724,6 @@ static struct ctl_table tagged_addr_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init tagged_addr_init(void)
diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c
index 8fcaa26f0f8a..c0307b9181c3 100644
--- a/drivers/perf/arm_pmuv3.c
+++ b/drivers/perf/arm_pmuv3.c
@@ -1175,7 +1175,6 @@ static struct ctl_table armv8_pmu_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static void armv8_pmu_register_sysctl_table(void)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 2/7] arm: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados

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

Removed the sentinel as well as the explicit size from ctl_isa_vars. The
size is redundant as the initialization sets it. Changed
insn_emulation->sysctl from a 2 element array of struct ctl_table to a
simple struct. This has no consequence for the sysctl registration as it
is forwarded as a pointer. Removed sentinel from sve_defatul_vl_table,
sme_default_vl_table, tagged_addr_sysctl_table and
armv8_pmu_sysctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/arm/kernel/isa.c                | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c | 8 +++-----
 arch/arm64/kernel/fpsimd.c           | 2 --
 arch/arm64/kernel/process.c          | 1 -
 drivers/perf/arm_pmuv3.c             | 1 -
 5 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
index 20218876bef2..905b1b191546 100644
--- a/arch/arm/kernel/isa.c
+++ b/arch/arm/kernel/isa.c
@@ -16,7 +16,7 @@
 
 static unsigned int isa_membase, isa_portbase, isa_portshift;
 
-static struct ctl_table ctl_isa_vars[4] = {
+static struct ctl_table ctl_isa_vars[] = {
 	{
 		.procname	= "membase",
 		.data		= &isa_membase, 
@@ -35,7 +35,7 @@ static struct ctl_table ctl_isa_vars[4] = {
 		.maxlen		= sizeof(isa_portshift),
 		.mode		= 0444,
 		.proc_handler	= proc_dointvec,
-	}, {}
+	},
 };
 
 static struct ctl_table_header *isa_sysctl_header;
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c
index e459cfd33711..dd6ce86d4332 100644
--- a/arch/arm64/kernel/armv8_deprecated.c
+++ b/arch/arm64/kernel/armv8_deprecated.c
@@ -52,10 +52,8 @@ struct insn_emulation {
 	int min;
 	int max;
 
-	/*
-	 * sysctl for this emulation + a sentinal entry.
-	 */
-	struct ctl_table sysctl[2];
+	/* sysctl for this emulation */
+	struct ctl_table sysctl;
 };
 
 #define ARM_OPCODE_CONDTEST_FAIL   0
@@ -558,7 +556,7 @@ static void __init register_insn_emulation(struct insn_emulation *insn)
 	update_insn_emulation_mode(insn, INSN_UNDEF);
 
 	if (insn->status != INSN_UNAVAILABLE) {
-		sysctl = &insn->sysctl[0];
+		sysctl = &insn->sysctl;
 
 		sysctl->mode = 0644;
 		sysctl->maxlen = sizeof(int);
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 91e44ac7150f..9afd0eb0cf88 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -589,7 +589,6 @@ static struct ctl_table sve_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SVE],
 	},
-	{ }
 };
 
 static int __init sve_sysctl_init(void)
@@ -613,7 +612,6 @@ static struct ctl_table sme_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SME],
 	},
-	{ }
 };
 
 static int __init sme_sysctl_init(void)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 0fcc4eb1a7ab..610e13c3d41b 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -724,7 +724,6 @@ static struct ctl_table tagged_addr_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init tagged_addr_init(void)
diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c
index 8fcaa26f0f8a..c0307b9181c3 100644
--- a/drivers/perf/arm_pmuv3.c
+++ b/drivers/perf/arm_pmuv3.c
@@ -1175,7 +1175,6 @@ static struct ctl_table armv8_pmu_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static void armv8_pmu_register_sysctl_table(void)

-- 
2.30.2


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

* [PATCH v3 2/7] arm: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: Joel Granados, linux-s390, linux-ia64, linux-kernel, linux-csky,
	linux-fsdevel, linux-riscv, linuxppc-dev, linux-arm-kernel

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

Removed the sentinel as well as the explicit size from ctl_isa_vars. The
size is redundant as the initialization sets it. Changed
insn_emulation->sysctl from a 2 element array of struct ctl_table to a
simple struct. This has no consequence for the sysctl registration as it
is forwarded as a pointer. Removed sentinel from sve_defatul_vl_table,
sme_default_vl_table, tagged_addr_sysctl_table and
armv8_pmu_sysctl_table.

This removal is safe because register_sysctl_sz and register_sysctl use
the array size in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/arm/kernel/isa.c                | 4 ++--
 arch/arm64/kernel/armv8_deprecated.c | 8 +++-----
 arch/arm64/kernel/fpsimd.c           | 2 --
 arch/arm64/kernel/process.c          | 1 -
 drivers/perf/arm_pmuv3.c             | 1 -
 5 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
index 20218876bef2..905b1b191546 100644
--- a/arch/arm/kernel/isa.c
+++ b/arch/arm/kernel/isa.c
@@ -16,7 +16,7 @@
 
 static unsigned int isa_membase, isa_portbase, isa_portshift;
 
-static struct ctl_table ctl_isa_vars[4] = {
+static struct ctl_table ctl_isa_vars[] = {
 	{
 		.procname	= "membase",
 		.data		= &isa_membase, 
@@ -35,7 +35,7 @@ static struct ctl_table ctl_isa_vars[4] = {
 		.maxlen		= sizeof(isa_portshift),
 		.mode		= 0444,
 		.proc_handler	= proc_dointvec,
-	}, {}
+	},
 };
 
 static struct ctl_table_header *isa_sysctl_header;
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c
index e459cfd33711..dd6ce86d4332 100644
--- a/arch/arm64/kernel/armv8_deprecated.c
+++ b/arch/arm64/kernel/armv8_deprecated.c
@@ -52,10 +52,8 @@ struct insn_emulation {
 	int min;
 	int max;
 
-	/*
-	 * sysctl for this emulation + a sentinal entry.
-	 */
-	struct ctl_table sysctl[2];
+	/* sysctl for this emulation */
+	struct ctl_table sysctl;
 };
 
 #define ARM_OPCODE_CONDTEST_FAIL   0
@@ -558,7 +556,7 @@ static void __init register_insn_emulation(struct insn_emulation *insn)
 	update_insn_emulation_mode(insn, INSN_UNDEF);
 
 	if (insn->status != INSN_UNAVAILABLE) {
-		sysctl = &insn->sysctl[0];
+		sysctl = &insn->sysctl;
 
 		sysctl->mode = 0644;
 		sysctl->maxlen = sizeof(int);
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 91e44ac7150f..9afd0eb0cf88 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -589,7 +589,6 @@ static struct ctl_table sve_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SVE],
 	},
-	{ }
 };
 
 static int __init sve_sysctl_init(void)
@@ -613,7 +612,6 @@ static struct ctl_table sme_default_vl_table[] = {
 		.proc_handler	= vec_proc_do_default_vl,
 		.extra1		= &vl_info[ARM64_VEC_SME],
 	},
-	{ }
 };
 
 static int __init sme_sysctl_init(void)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 0fcc4eb1a7ab..610e13c3d41b 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -724,7 +724,6 @@ static struct ctl_table tagged_addr_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static int __init tagged_addr_init(void)
diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c
index 8fcaa26f0f8a..c0307b9181c3 100644
--- a/drivers/perf/arm_pmuv3.c
+++ b/drivers/perf/arm_pmuv3.c
@@ -1175,7 +1175,6 @@ static struct ctl_table armv8_pmu_sysctl_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{ }
 };
 
 static void armv8_pmu_register_sysctl_table(void)

-- 
2.30.2


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

* [PATCH v3 3/7] arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
  2023-10-02 11:30 ` Joel Granados via B4 Relay
                     ` (2 preceding siblings ...)
  (?)
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  -1 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados,
	Ingo Molnar

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 sld_sysctl and itmt_kern_table. This
removal is safe because register_sysctl_init and register_sysctl
implicitly use the array size in addition to checking for the sentinel.

Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com> # for x86
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/kernel/cpu/intel.c | 1 -
 arch/x86/kernel/itmt.c      | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index be4045628fd3..d9bb53f49a4d 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -1016,7 +1016,6 @@ static struct ctl_table sld_sysctls[] = {
 		.extra1         = SYSCTL_ZERO,
 		.extra2         = SYSCTL_ONE,
 	},
-	{}
 };
 
 static int __init sld_mitigate_sysctl_init(void)
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index ee4fe8cdb857..9a7c03d47861 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -74,7 +74,6 @@ static struct ctl_table itmt_kern_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static struct ctl_table_header *itmt_sysctl_header;

-- 
2.30.2


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

* [PATCH v3 3/7] arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados,
	Ingo Molnar

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 sld_sysctl and itmt_kern_table. This
removal is safe because register_sysctl_init and register_sysctl
implicitly use the array size in addition to checking for the sentinel.

Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com> # for x86
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/kernel/cpu/intel.c | 1 -
 arch/x86/kernel/itmt.c      | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index be4045628fd3..d9bb53f49a4d 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -1016,7 +1016,6 @@ static struct ctl_table sld_sysctls[] = {
 		.extra1         = SYSCTL_ZERO,
 		.extra2         = SYSCTL_ONE,
 	},
-	{}
 };
 
 static int __init sld_mitigate_sysctl_init(void)
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index ee4fe8cdb857..9a7c03d47861 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -74,7 +74,6 @@ static struct ctl_table itmt_kern_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static struct ctl_table_header *itmt_sysctl_header;

-- 
2.30.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH v3 3/7] arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados,
	Ingo Molnar

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 sld_sysctl and itmt_kern_table. This
removal is safe because register_sysctl_init and register_sysctl
implicitly use the array size in addition to checking for the sentinel.

Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com> # for x86
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/kernel/cpu/intel.c | 1 -
 arch/x86/kernel/itmt.c      | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index be4045628fd3..d9bb53f49a4d 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -1016,7 +1016,6 @@ static struct ctl_table sld_sysctls[] = {
 		.extra1         = SYSCTL_ZERO,
 		.extra2         = SYSCTL_ONE,
 	},
-	{}
 };
 
 static int __init sld_mitigate_sysctl_init(void)
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index ee4fe8cdb857..9a7c03d47861 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -74,7 +74,6 @@ static struct ctl_table itmt_kern_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static struct ctl_table_header *itmt_sysctl_header;

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 3/7] arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: Joel Granados, linux-s390, linux-ia64, linux-kernel, linux-csky,
	linux-fsdevel, linux-riscv, linuxppc-dev, Ingo Molnar,
	linux-arm-kernel

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 sld_sysctl and itmt_kern_table. This
removal is safe because register_sysctl_init and register_sysctl
implicitly use the array size in addition to checking for the sentinel.

Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com> # for x86
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/kernel/cpu/intel.c | 1 -
 arch/x86/kernel/itmt.c      | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index be4045628fd3..d9bb53f49a4d 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -1016,7 +1016,6 @@ static struct ctl_table sld_sysctls[] = {
 		.extra1         = SYSCTL_ZERO,
 		.extra2         = SYSCTL_ONE,
 	},
-	{}
 };
 
 static int __init sld_mitigate_sysctl_init(void)
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index ee4fe8cdb857..9a7c03d47861 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -74,7 +74,6 @@ static struct ctl_table itmt_kern_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static struct ctl_table_header *itmt_sysctl_header;

-- 
2.30.2


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

* [PATCH v3 3/7] arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados,
	Ingo Molnar

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 sld_sysctl and itmt_kern_table. This
removal is safe because register_sysctl_init and register_sysctl
implicitly use the array size in addition to checking for the sentinel.

Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com> # for x86
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/kernel/cpu/intel.c | 1 -
 arch/x86/kernel/itmt.c      | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index be4045628fd3..d9bb53f49a4d 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -1016,7 +1016,6 @@ static struct ctl_table sld_sysctls[] = {
 		.extra1         = SYSCTL_ZERO,
 		.extra2         = SYSCTL_ONE,
 	},
-	{}
 };
 
 static int __init sld_mitigate_sysctl_init(void)
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index ee4fe8cdb857..9a7c03d47861 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -74,7 +74,6 @@ static struct ctl_table itmt_kern_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static struct ctl_table_header *itmt_sysctl_header;

-- 
2.30.2


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

* [PATCH v3 4/7] x86/vdso: Remove now superfluous sentinel element from ctl_table array
  2023-10-02 11:30 ` Joel Granados via B4 Relay
                     ` (2 preceding siblings ...)
  (?)
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  -1 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 abi_table2. This removal is safe because
register_sysctl implicitly uses ARRAY_SIZE() in addition to checking for
the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/entry/vdso/vdso32-setup.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
index f3b3cacbcbb0..76e4e74f35b5 100644
--- a/arch/x86/entry/vdso/vdso32-setup.c
+++ b/arch/x86/entry/vdso/vdso32-setup.c
@@ -67,7 +67,6 @@ static struct ctl_table abi_table2[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static __init int ia32_binfmt_init(void)

-- 
2.30.2


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

* [PATCH v3 4/7] x86/vdso: Remove now superfluous sentinel element from ctl_table array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 abi_table2. This removal is safe because
register_sysctl implicitly uses ARRAY_SIZE() in addition to checking for
the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/entry/vdso/vdso32-setup.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
index f3b3cacbcbb0..76e4e74f35b5 100644
--- a/arch/x86/entry/vdso/vdso32-setup.c
+++ b/arch/x86/entry/vdso/vdso32-setup.c
@@ -67,7 +67,6 @@ static struct ctl_table abi_table2[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static __init int ia32_binfmt_init(void)

-- 
2.30.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH v3 4/7] x86/vdso: Remove now superfluous sentinel element from ctl_table array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 abi_table2. This removal is safe because
register_sysctl implicitly uses ARRAY_SIZE() in addition to checking for
the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/entry/vdso/vdso32-setup.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
index f3b3cacbcbb0..76e4e74f35b5 100644
--- a/arch/x86/entry/vdso/vdso32-setup.c
+++ b/arch/x86/entry/vdso/vdso32-setup.c
@@ -67,7 +67,6 @@ static struct ctl_table abi_table2[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static __init int ia32_binfmt_init(void)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 4/7] x86/vdso: Remove now superfluous sentinel element from ctl_table array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados

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 abi_table2. This removal is safe because
register_sysctl implicitly uses ARRAY_SIZE() in addition to checking for
the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/entry/vdso/vdso32-setup.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
index f3b3cacbcbb0..76e4e74f35b5 100644
--- a/arch/x86/entry/vdso/vdso32-setup.c
+++ b/arch/x86/entry/vdso/vdso32-setup.c
@@ -67,7 +67,6 @@ static struct ctl_table abi_table2[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static __init int ia32_binfmt_init(void)

-- 
2.30.2


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

* [PATCH v3 4/7] x86/vdso: Remove now superfluous sentinel element from ctl_table array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: Joel Granados, linux-s390, linux-ia64, linux-kernel, linux-csky,
	linux-fsdevel, linux-riscv, linuxppc-dev, linux-arm-kernel

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 abi_table2. This removal is safe because
register_sysctl implicitly uses ARRAY_SIZE() in addition to checking for
the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/x86/entry/vdso/vdso32-setup.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
index f3b3cacbcbb0..76e4e74f35b5 100644
--- a/arch/x86/entry/vdso/vdso32-setup.c
+++ b/arch/x86/entry/vdso/vdso32-setup.c
@@ -67,7 +67,6 @@ static struct ctl_table abi_table2[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-	{}
 };
 
 static __init int ia32_binfmt_init(void)

-- 
2.30.2


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

* [PATCH v3 5/7] riscv: Remove now superfluous sentinel element from ctl_table array
  2023-10-02 11:30 ` Joel Granados via B4 Relay
                     ` (2 preceding siblings ...)
  (?)
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  -1 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 riscv_v_default_vstate_table. This removal
is safe because register_sysctl implicitly uses ARRAY_SIZE() in addition
to checking for the sentinel.

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

diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
index 8d92fb6c522c..578b6292487e 100644
--- a/arch/riscv/kernel/vector.c
+++ b/arch/riscv/kernel/vector.c
@@ -255,7 +255,6 @@ static struct ctl_table riscv_v_default_vstate_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dobool,
 	},
-	{ }
 };
 
 static int __init riscv_v_sysctl_init(void)

-- 
2.30.2


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

* [PATCH v3 5/7] riscv: Remove now superfluous sentinel element from ctl_table array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 riscv_v_default_vstate_table. This removal
is safe because register_sysctl implicitly uses ARRAY_SIZE() in addition
to checking for the sentinel.

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

diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
index 8d92fb6c522c..578b6292487e 100644
--- a/arch/riscv/kernel/vector.c
+++ b/arch/riscv/kernel/vector.c
@@ -255,7 +255,6 @@ static struct ctl_table riscv_v_default_vstate_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dobool,
 	},
-	{ }
 };
 
 static int __init riscv_v_sysctl_init(void)

-- 
2.30.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH v3 5/7] riscv: Remove now superfluous sentinel element from ctl_table array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 riscv_v_default_vstate_table. This removal
is safe because register_sysctl implicitly uses ARRAY_SIZE() in addition
to checking for the sentinel.

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

diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
index 8d92fb6c522c..578b6292487e 100644
--- a/arch/riscv/kernel/vector.c
+++ b/arch/riscv/kernel/vector.c
@@ -255,7 +255,6 @@ static struct ctl_table riscv_v_default_vstate_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dobool,
 	},
-	{ }
 };
 
 static int __init riscv_v_sysctl_init(void)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 5/7] riscv: Remove now superfluous sentinel element from ctl_table array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados

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 riscv_v_default_vstate_table. This removal
is safe because register_sysctl implicitly uses ARRAY_SIZE() in addition
to checking for the sentinel.

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

diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
index 8d92fb6c522c..578b6292487e 100644
--- a/arch/riscv/kernel/vector.c
+++ b/arch/riscv/kernel/vector.c
@@ -255,7 +255,6 @@ static struct ctl_table riscv_v_default_vstate_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dobool,
 	},
-	{ }
 };
 
 static int __init riscv_v_sysctl_init(void)

-- 
2.30.2


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

* [PATCH v3 5/7] riscv: Remove now superfluous sentinel element from ctl_table array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: Joel Granados, linux-s390, linux-ia64, linux-kernel, linux-csky,
	linux-fsdevel, linux-riscv, linuxppc-dev, linux-arm-kernel

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 riscv_v_default_vstate_table. This removal
is safe because register_sysctl implicitly uses ARRAY_SIZE() in addition
to checking for the sentinel.

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

diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
index 8d92fb6c522c..578b6292487e 100644
--- a/arch/riscv/kernel/vector.c
+++ b/arch/riscv/kernel/vector.c
@@ -255,7 +255,6 @@ static struct ctl_table riscv_v_default_vstate_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dobool,
 	},
-	{ }
 };
 
 static int __init riscv_v_sysctl_init(void)

-- 
2.30.2


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

* [PATCH v3 6/7] powerpc: Remove now superfluous sentinel element from ctl_table arrays
  2023-10-02 11:30 ` Joel Granados via B4 Relay
                     ` (2 preceding siblings ...)
  (?)
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  -1 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 from powersave_nap_ctl_table and nmi_wd_lpm_factor_ctl_table.
This removal is safe because register_sysctl implicitly uses ARRAY_SIZE()
in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index b1c0418b25c8..30b56c67fa61 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -105,7 +105,6 @@ static struct ctl_table powersave_nap_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec,
 	},
-	{}
 };
 
 static int __init
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index 0161226d8fec..1798f0f14d58 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -61,7 +61,6 @@ static struct ctl_table nmi_wd_lpm_factor_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_douintvec_minmax,
 	},
-	{}
 };
 
 static int __init register_nmi_wd_lpm_factor_sysctl(void)

-- 
2.30.2


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

* [PATCH v3 6/7] powerpc: Remove now superfluous sentinel element from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 from powersave_nap_ctl_table and nmi_wd_lpm_factor_ctl_table.
This removal is safe because register_sysctl implicitly uses ARRAY_SIZE()
in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index b1c0418b25c8..30b56c67fa61 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -105,7 +105,6 @@ static struct ctl_table powersave_nap_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec,
 	},
-	{}
 };
 
 static int __init
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index 0161226d8fec..1798f0f14d58 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -61,7 +61,6 @@ static struct ctl_table nmi_wd_lpm_factor_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_douintvec_minmax,
 	},
-	{}
 };
 
 static int __init register_nmi_wd_lpm_factor_sysctl(void)

-- 
2.30.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH v3 6/7] powerpc: Remove now superfluous sentinel element from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 from powersave_nap_ctl_table and nmi_wd_lpm_factor_ctl_table.
This removal is safe because register_sysctl implicitly uses ARRAY_SIZE()
in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index b1c0418b25c8..30b56c67fa61 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -105,7 +105,6 @@ static struct ctl_table powersave_nap_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec,
 	},
-	{}
 };
 
 static int __init
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index 0161226d8fec..1798f0f14d58 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -61,7 +61,6 @@ static struct ctl_table nmi_wd_lpm_factor_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_douintvec_minmax,
 	},
-	{}
 };
 
 static int __init register_nmi_wd_lpm_factor_sysctl(void)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 6/7] powerpc: Remove now superfluous sentinel element from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados

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 from powersave_nap_ctl_table and nmi_wd_lpm_factor_ctl_table.
This removal is safe because register_sysctl implicitly uses ARRAY_SIZE()
in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index b1c0418b25c8..30b56c67fa61 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -105,7 +105,6 @@ static struct ctl_table powersave_nap_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec,
 	},
-	{}
 };
 
 static int __init
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index 0161226d8fec..1798f0f14d58 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -61,7 +61,6 @@ static struct ctl_table nmi_wd_lpm_factor_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_douintvec_minmax,
 	},
-	{}
 };
 
 static int __init register_nmi_wd_lpm_factor_sysctl(void)

-- 
2.30.2


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

* [PATCH v3 6/7] powerpc: Remove now superfluous sentinel element from ctl_table arrays
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: Joel Granados, linux-s390, linux-ia64, linux-kernel, linux-csky,
	linux-fsdevel, linux-riscv, linuxppc-dev, linux-arm-kernel

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 from powersave_nap_ctl_table and nmi_wd_lpm_factor_ctl_table.
This removal is safe because register_sysctl implicitly uses ARRAY_SIZE()
in addition to checking for the sentinel.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/powerpc/kernel/idle.c                | 1 -
 arch/powerpc/platforms/pseries/mobility.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index b1c0418b25c8..30b56c67fa61 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -105,7 +105,6 @@ static struct ctl_table powersave_nap_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec,
 	},
-	{}
 };
 
 static int __init
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index 0161226d8fec..1798f0f14d58 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -61,7 +61,6 @@ static struct ctl_table nmi_wd_lpm_factor_ctl_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_douintvec_minmax,
 	},
-	{}
 };
 
 static int __init register_nmi_wd_lpm_factor_sysctl(void)

-- 
2.30.2


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

* [PATCH v3 7/7] c-sky: Remove now superfluous sentinel element from ctl_talbe array
  2023-10-02 11:30 ` Joel Granados via B4 Relay
                     ` (2 preceding siblings ...)
  (?)
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  -1 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 from alignment_tbl ctl_table array. This removal is safe
because register_sysctl_init implicitly uses ARRAY_SIZE() in addition to
checking for the sentinel.

Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/csky/abiv1/alignment.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/csky/abiv1/alignment.c b/arch/csky/abiv1/alignment.c
index b60259daed1b..e5b8b4b2109a 100644
--- a/arch/csky/abiv1/alignment.c
+++ b/arch/csky/abiv1/alignment.c
@@ -329,7 +329,6 @@ static struct ctl_table alignment_tbl[5] = {
 		.mode = 0666,
 		.proc_handler = &proc_dointvec
 	},
-	{}
 };
 
 static int __init csky_alignment_init(void)

-- 
2.30.2


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

* [PATCH v3 7/7] c-sky: Remove now superfluous sentinel element from ctl_talbe array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 from alignment_tbl ctl_table array. This removal is safe
because register_sysctl_init implicitly uses ARRAY_SIZE() in addition to
checking for the sentinel.

Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/csky/abiv1/alignment.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/csky/abiv1/alignment.c b/arch/csky/abiv1/alignment.c
index b60259daed1b..e5b8b4b2109a 100644
--- a/arch/csky/abiv1/alignment.c
+++ b/arch/csky/abiv1/alignment.c
@@ -329,7 +329,6 @@ static struct ctl_table alignment_tbl[5] = {
 		.mode = 0666,
 		.proc_handler = &proc_dointvec
 	},
-	{}
 };
 
 static int __init csky_alignment_init(void)

-- 
2.30.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH v3 7/7] c-sky: Remove now superfluous sentinel element from ctl_talbe array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, 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 from alignment_tbl ctl_table array. This removal is safe
because register_sysctl_init implicitly uses ARRAY_SIZE() in addition to
checking for the sentinel.

Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/csky/abiv1/alignment.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/csky/abiv1/alignment.c b/arch/csky/abiv1/alignment.c
index b60259daed1b..e5b8b4b2109a 100644
--- a/arch/csky/abiv1/alignment.c
+++ b/arch/csky/abiv1/alignment.c
@@ -329,7 +329,6 @@ static struct ctl_table alignment_tbl[5] = {
 		.mode = 0666,
 		.proc_handler = &proc_dointvec
 	},
-	{}
 };
 
 static int __init csky_alignment_init(void)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 7/7] c-sky: Remove now superfluous sentinel element from ctl_talbe array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: linux-fsdevel, linux-s390, linux-kernel, linux-arm-kernel,
	linux-riscv, linuxppc-dev, linux-ia64, linux-csky, Joel Granados

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 from alignment_tbl ctl_table array. This removal is safe
because register_sysctl_init implicitly uses ARRAY_SIZE() in addition to
checking for the sentinel.

Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/csky/abiv1/alignment.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/csky/abiv1/alignment.c b/arch/csky/abiv1/alignment.c
index b60259daed1b..e5b8b4b2109a 100644
--- a/arch/csky/abiv1/alignment.c
+++ b/arch/csky/abiv1/alignment.c
@@ -329,7 +329,6 @@ static struct ctl_table alignment_tbl[5] = {
 		.mode = 0666,
 		.proc_handler = &proc_dointvec
 	},
-	{}
 };
 
 static int __init csky_alignment_init(void)

-- 
2.30.2


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

* [PATCH v3 7/7] c-sky: Remove now superfluous sentinel element from ctl_talbe array
@ 2023-10-02 11:30   ` Joel Granados via B4 Relay
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados via B4 Relay @ 2023-10-02 11:30 UTC (permalink / raw)
  To: Luis Chamberlain, willy, josh, Kees Cook, Iurii Zaikin,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Gerald Schaefer,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Andy Lutomirski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Guo Ren, Alexey Gladkov
  Cc: Joel Granados, linux-s390, linux-ia64, linux-kernel, linux-csky,
	linux-fsdevel, linux-riscv, linuxppc-dev, linux-arm-kernel

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 from alignment_tbl ctl_table array. This removal is safe
because register_sysctl_init implicitly uses ARRAY_SIZE() in addition to
checking for the sentinel.

Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 arch/csky/abiv1/alignment.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/csky/abiv1/alignment.c b/arch/csky/abiv1/alignment.c
index b60259daed1b..e5b8b4b2109a 100644
--- a/arch/csky/abiv1/alignment.c
+++ b/arch/csky/abiv1/alignment.c
@@ -329,7 +329,6 @@ static struct ctl_table alignment_tbl[5] = {
 		.mode = 0666,
 		.proc_handler = &proc_dointvec
 	},
-	{}
 };
 
 static int __init csky_alignment_init(void)

-- 
2.30.2


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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
  2023-10-02 11:30 ` Joel Granados via B4 Relay
                   ` (10 preceding siblings ...)
  (?)
@ 2023-10-04 15:12 ` Frank Scheiner
  2023-10-05  7:50   ` Joel Granados
  -1 siblings, 1 reply; 50+ messages in thread
From: Frank Scheiner @ 2023-10-04 15:12 UTC (permalink / raw)
  To: j.granados; +Cc: linux-fsdevel, linux-ia64, Tomáš Glozar

Dear Joel,

On 02.10.23 13:30, Joel Granados via B4 Relay wrote:
> [...]

I successfully "Build-n-Boot-to-login" tested the following patchset
(together with the ia64 patch from V2 changed to:

```
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index 88b3ce3e66cd..65b0781f83ab 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -232,7 +232,6 @@ static struct ctl_table kdump_ctl_table[] = {
  		.mode = 0644,
  		.proc_handler = proc_dointvec,
  	},
-	{ }
  };
  #endif

```

...) on top of v6.6-rc4 on my rx2620. I also applied the measurement
patch (commented the printk in `new_dir` and uncommented the if
conditional).

I used a bash arithmetic expression (`accum=$(( accum + n ))`) in your
script to calculate the total memory savings, because `calc` is not
available as package for Debian on ia64.

There are no memory savings for this configuration.

But using the measurement patch with the printk in `new_dir` uncommented
and the if conditional also uncommented I see the following savings (I
assume this is the same as your measurement patch because the other
configuration didn't yield any savings):

```
root@rx2620:~/bin# ./check-mem-savings.bash
64
[...]
64
5888
```

> Joel Granados (7):
>        S390: Remove now superfluous sentinel elem from ctl_table arrays
>        arm: Remove now superfluous sentinel elem from ctl_table arrays
>        arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
>        x86/vdso: Remove now superfluous sentinel element from ctl_table array
>        riscv: Remove now superfluous sentinel element from ctl_table array
>        powerpc: Remove now superfluous sentinel element from ctl_table arrays
>        c-sky: Remove now superfluous sentinel element from ctl_talbe array
>
>   arch/arm/kernel/isa.c                     | 4 ++--
>   arch/arm64/kernel/armv8_deprecated.c      | 8 +++-----
>   arch/arm64/kernel/fpsimd.c                | 2 --
>   arch/arm64/kernel/process.c               | 1 -
>   arch/csky/abiv1/alignment.c               | 1 -
>   arch/powerpc/kernel/idle.c                | 1 -
>   arch/powerpc/platforms/pseries/mobility.c | 1 -
>   arch/riscv/kernel/vector.c                | 1 -
>   arch/s390/appldata/appldata_base.c        | 4 +---
>   arch/s390/kernel/debug.c                  | 1 -
>   arch/s390/kernel/topology.c               | 1 -
>   arch/s390/mm/cmm.c                        | 1 -
>   arch/s390/mm/pgalloc.c                    | 1 -
>   arch/x86/entry/vdso/vdso32-setup.c        | 1 -
>   arch/x86/kernel/cpu/intel.c               | 1 -
>   arch/x86/kernel/itmt.c                    | 1 -
>   drivers/perf/arm_pmuv3.c                  | 1 -
>   17 files changed, 6 insertions(+), 25 deletions(-)
> ---
> base-commit: 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa
> change-id: 20230904-jag-sysctl_remove_empty_elem_arch-81db0a6e6cc4

Tested-by: Frank Scheiner <frank.scheiner@web.de> # ia64

Cheers,
Frank

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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
  2023-10-04 15:12 ` [PATCH v3 0/7] sysctl: Remove sentinel elements from arch Frank Scheiner
@ 2023-10-05  7:50   ` Joel Granados
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-05  7:50 UTC (permalink / raw)
  To: Frank Scheiner; +Cc: linux-fsdevel, linux-ia64, Tomáš Glozar

[-- Attachment #1: Type: text/plain, Size: 3452 bytes --]

On Wed, Oct 04, 2023 at 05:12:17PM +0200, Frank Scheiner wrote:
> Dear Joel,
> 
> On 02.10.23 13:30, Joel Granados via B4 Relay wrote:
> > [...]
> 
> I successfully "Build-n-Boot-to-login" tested the following patchset
> (together with the ia64 patch from V2 changed to:
> 
> ```
> diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
> index 88b3ce3e66cd..65b0781f83ab 100644
> --- a/arch/ia64/kernel/crash.c
> +++ b/arch/ia64/kernel/crash.c
> @@ -232,7 +232,6 @@ static struct ctl_table kdump_ctl_table[] = {
>  		.mode = 0644,
>  		.proc_handler = proc_dointvec,
>  	},
> -	{ }
>  };
>  #endif
> 
> ```
> 
> ...) on top of v6.6-rc4 on my rx2620. I also applied the measurement
> patch (commented the printk in `new_dir` and uncommented the if
> conditional).
> 
> I used a bash arithmetic expression (`accum=$(( accum + n ))`) in your
> script to calculate the total memory savings, because `calc` is not
> available as package for Debian on ia64.
> 
> There are no memory savings for this configuration.
> 
> But using the measurement patch with the printk in `new_dir` uncommented
> and the if conditional also uncommented I see the following savings (I
> assume this is the same as your measurement patch because the other
> configuration didn't yield any savings):
> 
> ```
> root@rx2620:~/bin# ./check-mem-savings.bash
> 64
> [...]
> 64
> 5888
> ```
Thankyou very much for all this verification, but the ia64 patch was
dropped from the set. Please see https://lore.kernel.org/all/20230921115034.5461f62f@canb.auug.org.au

Best

> 
> > Joel Granados (7):
> >        S390: Remove now superfluous sentinel elem from ctl_table arrays
> >        arm: Remove now superfluous sentinel elem from ctl_table arrays
> >        arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
> >        x86/vdso: Remove now superfluous sentinel element from ctl_table array
> >        riscv: Remove now superfluous sentinel element from ctl_table array
> >        powerpc: Remove now superfluous sentinel element from ctl_table arrays
> >        c-sky: Remove now superfluous sentinel element from ctl_talbe array
> > 
> >   arch/arm/kernel/isa.c                     | 4 ++--
> >   arch/arm64/kernel/armv8_deprecated.c      | 8 +++-----
> >   arch/arm64/kernel/fpsimd.c                | 2 --
> >   arch/arm64/kernel/process.c               | 1 -
> >   arch/csky/abiv1/alignment.c               | 1 -
> >   arch/powerpc/kernel/idle.c                | 1 -
> >   arch/powerpc/platforms/pseries/mobility.c | 1 -
> >   arch/riscv/kernel/vector.c                | 1 -
> >   arch/s390/appldata/appldata_base.c        | 4 +---
> >   arch/s390/kernel/debug.c                  | 1 -
> >   arch/s390/kernel/topology.c               | 1 -
> >   arch/s390/mm/cmm.c                        | 1 -
> >   arch/s390/mm/pgalloc.c                    | 1 -
> >   arch/x86/entry/vdso/vdso32-setup.c        | 1 -
> >   arch/x86/kernel/cpu/intel.c               | 1 -
> >   arch/x86/kernel/itmt.c                    | 1 -
> >   drivers/perf/arm_pmuv3.c                  | 1 -
> >   17 files changed, 6 insertions(+), 25 deletions(-)
> > ---
> > base-commit: 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa
> > change-id: 20230904-jag-sysctl_remove_empty_elem_arch-81db0a6e6cc4
> 
> Tested-by: Frank Scheiner <frank.scheiner@web.de> # ia64
> 
> Cheers,
> Frank

-- 

Joel Granados

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

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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
  2023-10-02 11:30 ` Joel Granados via B4 Relay
  (?)
  (?)
@ 2023-10-10 22:22   ` Luis Chamberlain
  -1 siblings, 0 replies; 50+ messages in thread
From: Luis Chamberlain @ 2023-10-10 22:22 UTC (permalink / raw)
  To: j.granados
  Cc: willy, josh, Kees Cook, Iurii Zaikin, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Gerald Schaefer, Russell King, Catalin Marinas,
	Will Deacon, Mark Rutland, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Andy Lutomirski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy, Guo Ren,
	Alexey Gladkov, linux-fsdevel, linux-s390, linux-kernel,
	linux-arm-kernel, linux-riscv, linuxppc-dev, linux-ia64,
	linux-csky, Ingo Molnar

On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote:
> V3:
> * Removed the ia64 patch to avoid conflicts with the ia64 removal
> * Rebased onto v6.6-rc4
> * Kept/added the trailing comma for the ctl_table arrays. This was a comment
>   that we received "drivers/*" patch set.
> * Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com

Thanks! I replaced the v2 with this v3 on sysctl-next.

  Luis

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-10 22:22   ` Luis Chamberlain
  0 siblings, 0 replies; 50+ messages in thread
From: Luis Chamberlain @ 2023-10-10 22:22 UTC (permalink / raw)
  To: j.granados
  Cc: willy, josh, Kees Cook, Iurii Zaikin, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Gerald Schaefer, Russell King, Catalin Marinas,
	Will Deacon, Mark Rutland, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Andy Lutomirski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy, Guo Ren,
	Alexey Gladkov, linux-fsdevel, linux-s390, linux-kernel,
	linux-arm-kernel, linux-riscv, linuxppc-dev, linux-ia64,
	linux-csky, Ingo Molnar

On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote:
> V3:
> * Removed the ia64 patch to avoid conflicts with the ia64 removal
> * Rebased onto v6.6-rc4
> * Kept/added the trailing comma for the ctl_table arrays. This was a comment
>   that we received "drivers/*" patch set.
> * Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com

Thanks! I replaced the v2 with this v3 on sysctl-next.

  Luis

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-10 22:22   ` Luis Chamberlain
  0 siblings, 0 replies; 50+ messages in thread
From: Luis Chamberlain @ 2023-10-10 22:22 UTC (permalink / raw)
  To: j.granados
  Cc: willy, josh, Kees Cook, Iurii Zaikin, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Gerald Schaefer, Russell King, Catalin Marinas,
	Will Deacon, Mark Rutland, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Andy Lutomirski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy, Guo Ren,
	Alexey Gladkov, linux-fsdevel, linux-s390, linux-kernel,
	linux-arm-kernel, linux-riscv, linuxppc-dev, linux-ia64,
	linux-csky, Ingo Molnar

On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote:
> V3:
> * Removed the ia64 patch to avoid conflicts with the ia64 removal
> * Rebased onto v6.6-rc4
> * Kept/added the trailing comma for the ctl_table arrays. This was a comment
>   that we received "drivers/*" patch set.
> * Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com

Thanks! I replaced the v2 with this v3 on sysctl-next.

  Luis

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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-10 22:22   ` Luis Chamberlain
  0 siblings, 0 replies; 50+ messages in thread
From: Luis Chamberlain @ 2023-10-10 22:22 UTC (permalink / raw)
  To: j.granados
  Cc: Mark Rutland, linux-ia64, Catalin Marinas, Dave Hansen, Guo Ren,
	H. Peter Anvin, Alexander Gordeev, Will Deacon, linux-riscv,
	linux-s390, x86, Russell King, willy, Ingo Molnar, Ingo Molnar,
	Gerald Schaefer, Christian Borntraeger, Albert Ou, Kees Cook,
	Vasily Gorbik, Heiko Carstens, josh, Nicholas Piggin, linux-csky,
	Borislav Petkov, Andy Lutomirski, Paul Walmsley, Thomas Gleixner,
	linux-arm-kernel

On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote:
> V3:
> * Removed the ia64 patch to avoid conflicts with the ia64 removal
> * Rebased onto v6.6-rc4
> * Kept/added the trailing comma for the ctl_table arrays. This was a comment
>   that we received "drivers/*" patch set.
> * Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com

Thanks! I replaced the v2 with this v3 on sysctl-next.

  Luis

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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
  2023-10-10 22:22   ` Luis Chamberlain
  (?)
  (?)
@ 2023-10-11  8:21     ` Joel Granados
  -1 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-11  8:21 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: willy, josh, Kees Cook, Iurii Zaikin, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Gerald Schaefer, Russell King, Catalin Marinas,
	Will Deacon, Mark Rutland, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Andy Lutomirski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy, Guo Ren,
	Alexey Gladkov, linux-fsdevel, linux-s390, linux-kernel,
	linux-arm-kernel, linux-riscv, linuxppc-dev, linux-ia64,
	linux-csky, Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

On Tue, Oct 10, 2023 at 03:22:34PM -0700, Luis Chamberlain wrote:
> On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote:
> > V3:
> > * Removed the ia64 patch to avoid conflicts with the ia64 removal
> > * Rebased onto v6.6-rc4
> > * Kept/added the trailing comma for the ctl_table arrays. This was a comment
> >   that we received "drivers/*" patch set.
> > * Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com
> 
> Thanks! I replaced the v2 with this v3 on sysctl-next.
perfect
> 
>   Luis

-- 

Joel Granados

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

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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-11  8:21     ` Joel Granados
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-11  8:21 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: willy, josh, Kees Cook, Iurii Zaikin, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Gerald Schaefer, Russell King, Catalin Marinas,
	Will Deacon, Mark Rutland, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Andy Lutomirski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy, Guo Ren,
	Alexey Gladkov, linux-fsdevel, linux-s390, linux-kernel,
	linux-arm-kernel, linux-riscv, linuxppc-dev, linux-ia64,
	linux-csky, Ingo Molnar


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

On Tue, Oct 10, 2023 at 03:22:34PM -0700, Luis Chamberlain wrote:
> On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote:
> > V3:
> > * Removed the ia64 patch to avoid conflicts with the ia64 removal
> > * Rebased onto v6.6-rc4
> > * Kept/added the trailing comma for the ctl_table arrays. This was a comment
> >   that we received "drivers/*" patch set.
> > * Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com
> 
> Thanks! I replaced the v2 with this v3 on sysctl-next.
perfect
> 
>   Luis

-- 

Joel Granados

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

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

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-11  8:21     ` Joel Granados
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-11  8:21 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: willy, josh, Kees Cook, Iurii Zaikin, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Gerald Schaefer, Russell King, Catalin Marinas,
	Will Deacon, Mark Rutland, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Andy Lutomirski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy, Guo Ren,
	Alexey Gladkov, linux-fsdevel, linux-s390, linux-kernel,
	linux-arm-kernel, linux-riscv, linuxppc-dev, linux-ia64,
	linux-csky, Ingo Molnar


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

On Tue, Oct 10, 2023 at 03:22:34PM -0700, Luis Chamberlain wrote:
> On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote:
> > V3:
> > * Removed the ia64 patch to avoid conflicts with the ia64 removal
> > * Rebased onto v6.6-rc4
> > * Kept/added the trailing comma for the ctl_table arrays. This was a comment
> >   that we received "drivers/*" patch set.
> > * Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com
> 
> Thanks! I replaced the v2 with this v3 on sysctl-next.
perfect
> 
>   Luis

-- 

Joel Granados

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

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch
@ 2023-10-11  8:21     ` Joel Granados
  0 siblings, 0 replies; 50+ messages in thread
From: Joel Granados @ 2023-10-11  8:21 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: Mark Rutland, linux-ia64, Catalin Marinas, Dave Hansen, Guo Ren,
	H. Peter Anvin, Alexander Gordeev, Will Deacon, linux-riscv,
	linux-s390, x86, Russell King, willy, Ingo Molnar, Ingo Molnar,
	Gerald Schaefer, Christian Borntraeger, Albert Ou, Kees Cook,
	Vasily Gorbik, Heiko Carstens, josh, Nicholas Piggin, linux-csky,
	Borislav Petkov, Andy Lutomirski, Paul Walmsley, Thomas Gleixner,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

On Tue, Oct 10, 2023 at 03:22:34PM -0700, Luis Chamberlain wrote:
> On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote:
> > V3:
> > * Removed the ia64 patch to avoid conflicts with the ia64 removal
> > * Rebased onto v6.6-rc4
> > * Kept/added the trailing comma for the ctl_table arrays. This was a comment
> >   that we received "drivers/*" patch set.
> > * Link to v2: https://lore.kernel.org/r/20230913-jag-sysctl_remove_empty_elem_arch-v2-0-d1bd13a29bae@samsung.com
> 
> Thanks! I replaced the v2 with this v3 on sysctl-next.
perfect
> 
>   Luis

-- 

Joel Granados

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

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

end of thread, other threads:[~2023-10-11  8:17 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-02 11:30 [PATCH v3 0/7] sysctl: Remove sentinel elements from arch Joel Granados via B4 Relay
2023-10-02 11:30 ` Joel Granados
2023-10-02 11:30 ` Joel Granados via B4 Relay
2023-10-02 11:30 ` Joel Granados via B4 Relay
2023-10-02 11:30 ` Joel Granados via B4 Relay
2023-10-02 11:30 ` [PATCH v3 1/7] S390: Remove now superfluous sentinel elem from ctl_table arrays Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30 ` [PATCH v3 2/7] arm: " Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30 ` [PATCH v3 3/7] arch/x86: " Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30 ` [PATCH v3 4/7] x86/vdso: Remove now superfluous sentinel element from ctl_table array Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30 ` [PATCH v3 5/7] riscv: " Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30 ` [PATCH v3 6/7] powerpc: Remove now superfluous sentinel element from ctl_table arrays Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30 ` [PATCH v3 7/7] c-sky: Remove now superfluous sentinel element from ctl_talbe array Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-02 11:30   ` Joel Granados via B4 Relay
2023-10-04 15:12 ` [PATCH v3 0/7] sysctl: Remove sentinel elements from arch Frank Scheiner
2023-10-05  7:50   ` Joel Granados
2023-10-10 22:22 ` Luis Chamberlain
2023-10-10 22:22   ` Luis Chamberlain
2023-10-10 22:22   ` Luis Chamberlain
2023-10-10 22:22   ` Luis Chamberlain
2023-10-11  8:21   ` Joel Granados
2023-10-11  8:21     ` Joel Granados
2023-10-11  8:21     ` Joel Granados
2023-10-11  8:21     ` Joel Granados

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.