* [PATCH 1/7] memory: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Joel Granados via B4 Relay
@ 2024-03-28 15:57 ` Joel Granados via B4 Relay
2024-04-01 3:21 ` Muchun Song
2024-04-01 3:41 ` Miaohe Lin
2024-03-28 15:57 ` [PATCH 2/7] security: " Joel Granados via B4 Relay
` (7 subsequent siblings)
8 siblings, 2 replies; 18+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:57 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Jens Axboe, Pavel Begunkov, Atish Patra,
Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
Palmer Dabbelt, Albert Ou
Cc: Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel, Joel Granados
From: Joel Granados <[email protected]>
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%[email protected]/)
Remove sentinel from all files under mm/ that register a sysctl table.
Signed-off-by: Joel Granados <[email protected]>
---
mm/compaction.c | 1 -
mm/hugetlb.c | 1 -
mm/hugetlb_vmemmap.c | 1 -
mm/memory-failure.c | 1 -
mm/oom_kill.c | 1 -
mm/page-writeback.c | 1 -
mm/page_alloc.c | 1 -
7 files changed, 7 deletions(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index 807b58e6eb68..e8a047afca22 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -3345,7 +3345,6 @@ static struct ctl_table vm_compaction[] = {
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE,
},
- { }
};
static int __init kcompactd_init(void)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 23ef240ba48a..7ac5240a197d 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5045,7 +5045,6 @@ static struct ctl_table hugetlb_table[] = {
.mode = 0644,
.proc_handler = hugetlb_overcommit_handler,
},
- { }
};
static void hugetlb_sysctl_init(void)
diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
index da177e49d956..b9a55322e52c 100644
--- a/mm/hugetlb_vmemmap.c
+++ b/mm/hugetlb_vmemmap.c
@@ -679,7 +679,6 @@ static struct ctl_table hugetlb_vmemmap_sysctls[] = {
.mode = 0644,
.proc_handler = proc_dobool,
},
- { }
};
static int __init hugetlb_vmemmap_init(void)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 9349948f1abf..6a112f9ecf91 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -141,7 +141,6 @@ static struct ctl_table memory_failure_table[] = {
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE,
},
- { }
};
/*
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 8d6a207c3c59..4d7a0004df2c 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -724,7 +724,6 @@ static struct ctl_table vm_oom_kill_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
- {}
};
#endif
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 3e19b87049db..fba324e1a010 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2291,7 +2291,6 @@ static struct ctl_table vm_page_writeback_sysctls[] = {
.mode = 0644,
.proc_handler = proc_dointvec_jiffies,
},
- {}
};
#endif
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 14d39f34d336..8b9820620fe3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6211,7 +6211,6 @@ static struct ctl_table page_alloc_sysctl_table[] = {
.extra2 = SYSCTL_ONE_HUNDRED,
},
#endif
- {}
};
void __init page_alloc_sysctl_init(void)
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/7] memory: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 ` [PATCH 1/7] memory: Remove the now superfluous sentinel element from ctl_table array Joel Granados via B4 Relay
@ 2024-04-01 3:21 ` Muchun Song
2024-04-01 3:41 ` Miaohe Lin
1 sibling, 0 replies; 18+ messages in thread
From: Muchun Song @ 2024-04-01 3:21 UTC (permalink / raw)
To: j.granados
Cc: Andrew Morton, Miaohe Lin, Naoya Horiguchi, John Johansen,
Paul Moore, James Morris, Serge E. Hallyn, David Howells,
Jarkko Sakkinen, Kees Cook, Herbert Xu, David S. Miller,
Jens Axboe, Pavel Begunkov, Atish Patra, Anup Patel, Will Deacon,
Mark Rutland, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel
> On Mar 28, 2024, at 23:57, Joel Granados via B4 Relay <[email protected]> wrote:
>
> From: Joel Granados <[email protected]>
>
> 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%[email protected]/)
>
> Remove sentinel from all files under mm/ that register a sysctl table.
>
> Signed-off-by: Joel Granados <[email protected]>
Reviewed-by: Muchun Song <[email protected]>
THanks.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/7] memory: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 ` [PATCH 1/7] memory: Remove the now superfluous sentinel element from ctl_table array Joel Granados via B4 Relay
2024-04-01 3:21 ` Muchun Song
@ 2024-04-01 3:41 ` Miaohe Lin
1 sibling, 0 replies; 18+ messages in thread
From: Miaohe Lin @ 2024-04-01 3:41 UTC (permalink / raw)
To: j.granados
Cc: Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel, Andrew Morton, Muchun Song,
Naoya Horiguchi, John Johansen, Paul Moore, James Morris,
Serge E. Hallyn, David Howells, Jarkko Sakkinen, Kees Cook,
Herbert Xu, David S. Miller, Jens Axboe, Pavel Begunkov,
Atish Patra, Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
Palmer Dabbelt, Albert Ou
On 2024/3/28 23:57, Joel Granados via B4 Relay wrote:
> From: Joel Granados <[email protected]>
>
> 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%[email protected]/)
>
> Remove sentinel from all files under mm/ that register a sysctl table.
>
> Signed-off-by: Joel Granados <[email protected]>
Reviewed-by: Miaohe Lin <[email protected]>
Thanks.
> ---
> mm/compaction.c | 1 -
> mm/hugetlb.c | 1 -
> mm/hugetlb_vmemmap.c | 1 -
> mm/memory-failure.c | 1 -
> mm/oom_kill.c | 1 -
> mm/page-writeback.c | 1 -
> mm/page_alloc.c | 1 -
> 7 files changed, 7 deletions(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 807b58e6eb68..e8a047afca22 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -3345,7 +3345,6 @@ static struct ctl_table vm_compaction[] = {
> .extra1 = SYSCTL_ZERO,
> .extra2 = SYSCTL_ONE,
> },
> - { }
> };
>
> static int __init kcompactd_init(void)
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 23ef240ba48a..7ac5240a197d 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -5045,7 +5045,6 @@ static struct ctl_table hugetlb_table[] = {
> .mode = 0644,
> .proc_handler = hugetlb_overcommit_handler,
> },
> - { }
> };
>
> static void hugetlb_sysctl_init(void)
> diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
> index da177e49d956..b9a55322e52c 100644
> --- a/mm/hugetlb_vmemmap.c
> +++ b/mm/hugetlb_vmemmap.c
> @@ -679,7 +679,6 @@ static struct ctl_table hugetlb_vmemmap_sysctls[] = {
> .mode = 0644,
> .proc_handler = proc_dobool,
> },
> - { }
> };
>
> static int __init hugetlb_vmemmap_init(void)
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 9349948f1abf..6a112f9ecf91 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -141,7 +141,6 @@ static struct ctl_table memory_failure_table[] = {
> .extra1 = SYSCTL_ZERO,
> .extra2 = SYSCTL_ONE,
> },
> - { }
> };
>
> /*
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 8d6a207c3c59..4d7a0004df2c 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -724,7 +724,6 @@ static struct ctl_table vm_oom_kill_table[] = {
> .mode = 0644,
> .proc_handler = proc_dointvec,
> },
> - {}
> };
> #endif
>
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 3e19b87049db..fba324e1a010 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -2291,7 +2291,6 @@ static struct ctl_table vm_page_writeback_sysctls[] = {
> .mode = 0644,
> .proc_handler = proc_dointvec_jiffies,
> },
> - {}
> };
> #endif
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 14d39f34d336..8b9820620fe3 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -6211,7 +6211,6 @@ static struct ctl_table page_alloc_sysctl_table[] = {
> .extra2 = SYSCTL_ONE_HUNDRED,
> },
> #endif
> - {}
> };
>
> void __init page_alloc_sysctl_init(void)
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/7] security: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Joel Granados via B4 Relay
2024-03-28 15:57 ` [PATCH 1/7] memory: Remove the now superfluous sentinel element from ctl_table array Joel Granados via B4 Relay
@ 2024-03-28 15:57 ` Joel Granados via B4 Relay
2024-04-15 13:44 ` Joel Granados
2024-04-15 16:06 ` Kees Cook
2024-03-28 15:57 ` [PATCH 3/7] crypto: " Joel Granados via B4 Relay
` (6 subsequent siblings)
8 siblings, 2 replies; 18+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:57 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Jens Axboe, Pavel Begunkov, Atish Patra,
Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
Palmer Dabbelt, Albert Ou
Cc: Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel, Joel Granados
From: Joel Granados <[email protected]>
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%[email protected]/)
Remove the sentinel from all files under security/ that register a
sysctl table.
Signed-off-by: Joel Granados <[email protected]>
---
security/apparmor/lsm.c | 1 -
security/keys/sysctl.c | 1 -
security/loadpin/loadpin.c | 1 -
security/yama/yama_lsm.c | 1 -
4 files changed, 4 deletions(-)
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index cef8c466af80..6239777090c4 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -2064,7 +2064,6 @@ static struct ctl_table apparmor_sysctl_table[] = {
.mode = 0600,
.proc_handler = apparmor_dointvec,
},
- { }
};
static int __init apparmor_init_sysctl(void)
diff --git a/security/keys/sysctl.c b/security/keys/sysctl.c
index b348e1679d5d..91f000eef3ad 100644
--- a/security/keys/sysctl.c
+++ b/security/keys/sysctl.c
@@ -66,7 +66,6 @@ static struct ctl_table key_sysctls[] = {
.extra2 = (void *) SYSCTL_INT_MAX,
},
#endif
- { }
};
static int __init init_security_keys_sysctls(void)
diff --git a/security/loadpin/loadpin.c b/security/loadpin/loadpin.c
index 8e93cda130f1..93fd4d47b334 100644
--- a/security/loadpin/loadpin.c
+++ b/security/loadpin/loadpin.c
@@ -63,7 +63,6 @@ static struct ctl_table loadpin_sysctl_table[] = {
.extra1 = SYSCTL_ONE,
.extra2 = SYSCTL_ONE,
},
- { }
};
static void set_sysctl(bool is_writable)
diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c
index 49dc52b454ef..b6684a074a59 100644
--- a/security/yama/yama_lsm.c
+++ b/security/yama/yama_lsm.c
@@ -463,7 +463,6 @@ static struct ctl_table yama_sysctl_table[] = {
.extra1 = SYSCTL_ZERO,
.extra2 = &max_scope,
},
- { }
};
static void __init yama_init_sysctl(void)
{
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/7] security: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 ` [PATCH 2/7] security: " Joel Granados via B4 Relay
@ 2024-04-15 13:44 ` Joel Granados
2024-04-15 14:17 ` Paul Moore
2024-04-15 16:06 ` Kees Cook
1 sibling, 1 reply; 18+ messages in thread
From: Joel Granados @ 2024-04-15 13:44 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Jens Axboe, Pavel Begunkov, Atish Patra,
Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Luis Chamberlain, linux-mm,
linux-kernel, linux-fsdevel, apparmor, linux-security-module,
keyrings, linux-crypto, io-uring, linux-riscv, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
Hey
This is the only patch that I have not seen added to the next tree.
I'll put this in the sysctl-next
https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/log/?h=sysctl-next
for testing. Please let me know if It is lined up to be upstream through
another path.
Best
On Thu, Mar 28, 2024 at 04:57:49PM +0100, Joel Granados via B4 Relay wrote:
> From: Joel Granados <[email protected]>
>
> 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%[email protected]/)
>
...
--
Joel Granados
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/7] security: Remove the now superfluous sentinel element from ctl_table array
2024-04-15 13:44 ` Joel Granados
@ 2024-04-15 14:17 ` Paul Moore
2024-04-15 19:02 ` Paul Moore
0 siblings, 1 reply; 18+ messages in thread
From: Paul Moore @ 2024-04-15 14:17 UTC (permalink / raw)
To: Joel Granados
Cc: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, James Morris, Serge E. Hallyn, David Howells,
Jarkko Sakkinen, Kees Cook, Herbert Xu, David S. Miller,
Jens Axboe, Pavel Begunkov, Atish Patra, Anup Patel, Will Deacon,
Mark Rutland, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel
On Mon, Apr 15, 2024 at 9:44 AM Joel Granados <[email protected]> wrote:
>
> Hey
>
> This is the only patch that I have not seen added to the next tree.
> I'll put this in the sysctl-next
> https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/log/?h=sysctl-next
> for testing. Please let me know if It is lined up to be upstream through
> another path.
I was hoping to see some ACKs from the associated LSM maintainers, but
it's minor enough I'll go ahead and pull it into the lsm/dev tree this
week. I'll send a note later when I do the merge.
--
paul-moore.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/7] security: Remove the now superfluous sentinel element from ctl_table array
2024-04-15 14:17 ` Paul Moore
@ 2024-04-15 19:02 ` Paul Moore
2024-04-16 7:53 ` Joel Granados
0 siblings, 1 reply; 18+ messages in thread
From: Paul Moore @ 2024-04-15 19:02 UTC (permalink / raw)
To: Joel Granados
Cc: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, James Morris, Serge E. Hallyn, David Howells,
Jarkko Sakkinen, Kees Cook, Herbert Xu, David S. Miller,
Jens Axboe, Pavel Begunkov, Atish Patra, Anup Patel, Will Deacon,
Mark Rutland, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel
On Mon, Apr 15, 2024 at 10:17 AM Paul Moore <[email protected]> wrote:
> On Mon, Apr 15, 2024 at 9:44 AM Joel Granados <[email protected]> wrote:
> >
> > Hey
> >
> > This is the only patch that I have not seen added to the next tree.
> > I'll put this in the sysctl-next
> > https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/log/?h=sysctl-next
> > for testing. Please let me know if It is lined up to be upstream through
> > another path.
>
> I was hoping to see some ACKs from the associated LSM maintainers, but
> it's minor enough I'll go ahead and pull it into the lsm/dev tree this
> week. I'll send a note later when I do the merge.
... and now it's merged, it should be in the next cut of the
linux-next tree. Thanks!
--
paul-moore.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/7] security: Remove the now superfluous sentinel element from ctl_table array
2024-04-15 19:02 ` Paul Moore
@ 2024-04-16 7:53 ` Joel Granados
0 siblings, 0 replies; 18+ messages in thread
From: Joel Granados @ 2024-04-16 7:53 UTC (permalink / raw)
To: Paul Moore
Cc: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, James Morris, Serge E. Hallyn, David Howells,
Jarkko Sakkinen, Kees Cook, Herbert Xu, David S. Miller,
Jens Axboe, Pavel Begunkov, Atish Patra, Anup Patel, Will Deacon,
Mark Rutland, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 980 bytes --]
On Mon, Apr 15, 2024 at 03:02:43PM -0400, Paul Moore wrote:
> On Mon, Apr 15, 2024 at 10:17 AM Paul Moore <[email protected]> wrote:
> > On Mon, Apr 15, 2024 at 9:44 AM Joel Granados <[email protected]> wrote:
> > >
> > > Hey
> > >
> > > This is the only patch that I have not seen added to the next tree.
> > > I'll put this in the sysctl-next
> > > https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/log/?h=sysctl-next
> > > for testing. Please let me know if It is lined up to be upstream through
> > > another path.
> >
> > I was hoping to see some ACKs from the associated LSM maintainers, but
> > it's minor enough I'll go ahead and pull it into the lsm/dev tree this
> > week. I'll send a note later when I do the merge.
>
> ... and now it's merged, it should be in the next cut of the
> linux-next tree. Thanks!
Awesome. I'll remove it from sysctl-next then to avoid any potential
crashes.
Thx
--
Joel Granados
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/7] security: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 ` [PATCH 2/7] security: " Joel Granados via B4 Relay
2024-04-15 13:44 ` Joel Granados
@ 2024-04-15 16:06 ` Kees Cook
1 sibling, 0 replies; 18+ messages in thread
From: Kees Cook @ 2024-04-15 16:06 UTC (permalink / raw)
To: j.granados
Cc: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Herbert Xu, David S. Miller,
Jens Axboe, Pavel Begunkov, Atish Patra, Anup Patel, Will Deacon,
Mark Rutland, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel
On Thu, Mar 28, 2024 at 04:57:49PM +0100, Joel Granados via B4 Relay wrote:
> From: Joel Granados <[email protected]>
>
> 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%[email protected]/)
>
> Remove the sentinel from all files under security/ that register a
> sysctl table.
>
> Signed-off-by: Joel Granados <[email protected]>
Acked-by: Kees Cook <[email protected]> # loadpin & yama
--
Kees Cook
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 3/7] crypto: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Joel Granados via B4 Relay
2024-03-28 15:57 ` [PATCH 1/7] memory: Remove the now superfluous sentinel element from ctl_table array Joel Granados via B4 Relay
2024-03-28 15:57 ` [PATCH 2/7] security: " Joel Granados via B4 Relay
@ 2024-03-28 15:57 ` Joel Granados via B4 Relay
2024-04-05 7:56 ` Herbert Xu
2024-03-28 15:57 ` [PATCH 4/7] initrd: " Joel Granados via B4 Relay
` (5 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:57 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Jens Axboe, Pavel Begunkov, Atish Patra,
Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
Palmer Dabbelt, Albert Ou
Cc: Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel, Joel Granados
From: Joel Granados <[email protected]>
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%[email protected]/)
Remove sentinel from crypto_sysctl_table
Signed-off-by: Joel Granados <[email protected]>
---
crypto/fips.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/crypto/fips.c b/crypto/fips.c
index 92fd506abb21..8a784018ebfc 100644
--- a/crypto/fips.c
+++ b/crypto/fips.c
@@ -63,7 +63,6 @@ static struct ctl_table crypto_sysctl_table[] = {
.mode = 0444,
.proc_handler = proc_dostring
},
- {}
};
static struct ctl_table_header *crypto_sysctls;
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 3/7] crypto: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 ` [PATCH 3/7] crypto: " Joel Granados via B4 Relay
@ 2024-04-05 7:56 ` Herbert Xu
0 siblings, 0 replies; 18+ messages in thread
From: Herbert Xu @ 2024-04-05 7:56 UTC (permalink / raw)
To: j.granados
Cc: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, David S. Miller,
Jens Axboe, Pavel Begunkov, Atish Patra, Anup Patel, Will Deacon,
Mark Rutland, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel
On Thu, Mar 28, 2024 at 04:57:50PM +0100, Joel Granados via B4 Relay wrote:
> From: Joel Granados <[email protected]>
>
> 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%[email protected]/)
>
> Remove sentinel from crypto_sysctl_table
>
> Signed-off-by: Joel Granados <[email protected]>
> ---
> crypto/fips.c | 1 -
> 1 file changed, 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 4/7] initrd: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Joel Granados via B4 Relay
` (2 preceding siblings ...)
2024-03-28 15:57 ` [PATCH 3/7] crypto: " Joel Granados via B4 Relay
@ 2024-03-28 15:57 ` Joel Granados via B4 Relay
2024-03-28 15:57 ` [PATCH 5/7] ipc: " Joel Granados via B4 Relay
` (4 subsequent siblings)
8 siblings, 0 replies; 18+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:57 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Jens Axboe, Pavel Begunkov, Atish Patra,
Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
Palmer Dabbelt, Albert Ou
Cc: Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel, Joel Granados
From: Joel Granados <[email protected]>
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%[email protected]/)
Remove sentinel from kern_do_mounts_initrd_table.
Signed-off-by: Joel Granados <[email protected]>
---
init/do_mounts_initrd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 425f4bcf4b77..22c7f41ff642 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -29,7 +29,6 @@ static struct ctl_table kern_do_mounts_initrd_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
- { }
};
static __init int kernel_do_mounts_initrd_sysctls_init(void)
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/7] ipc: Remove the now superfluous sentinel element from ctl_table array
2024-03-28 15:57 [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Joel Granados via B4 Relay
` (3 preceding siblings ...)
2024-03-28 15:57 ` [PATCH 4/7] initrd: " Joel Granados via B4 Relay
@ 2024-03-28 15:57 ` Joel Granados via B4 Relay
2024-03-28 15:57 ` [PATCH 6/7] io_uring: Remove the now superfluous sentinel elements " Joel Granados via B4 Relay
` (3 subsequent siblings)
8 siblings, 0 replies; 18+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:57 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Jens Axboe, Pavel Begunkov, Atish Patra,
Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
Palmer Dabbelt, Albert Ou
Cc: Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel, Joel Granados
From: Joel Granados <[email protected]>
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%[email protected]/)
Remove the sentinels from ipc_sysctls and mq_sysctls
Signed-off-by: Joel Granados <[email protected]>
---
ipc/ipc_sysctl.c | 1 -
ipc/mq_sysctl.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 45cb1dabce29..0867535af96f 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -178,7 +178,6 @@ static struct ctl_table ipc_sysctls[] = {
.extra2 = SYSCTL_INT_MAX,
},
#endif
- {}
};
static struct ctl_table_set *set_lookup(struct ctl_table_root *root)
diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c
index 21fba3a6edaf..22ec532c7fa1 100644
--- a/ipc/mq_sysctl.c
+++ b/ipc/mq_sysctl.c
@@ -64,7 +64,6 @@ static struct ctl_table mq_sysctls[] = {
.extra1 = &msg_maxsize_limit_min,
.extra2 = &msg_maxsize_limit_max,
},
- {}
};
static struct ctl_table_set *set_lookup(struct ctl_table_root *root)
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/7] io_uring: Remove the now superfluous sentinel elements from ctl_table array
2024-03-28 15:57 [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Joel Granados via B4 Relay
` (4 preceding siblings ...)
2024-03-28 15:57 ` [PATCH 5/7] ipc: " Joel Granados via B4 Relay
@ 2024-03-28 15:57 ` Joel Granados via B4 Relay
2024-03-28 15:57 ` [PATCH 7/7] drivers: perf: " Joel Granados via B4 Relay
` (2 subsequent siblings)
8 siblings, 0 replies; 18+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:57 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Jens Axboe, Pavel Begunkov, Atish Patra,
Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
Palmer Dabbelt, Albert Ou
Cc: Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel, Joel Granados
From: Joel Granados <[email protected]>
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%[email protected]/)
Remove sentinel element from kernel_io_uring_disabled_table
Signed-off-by: Joel Granados <[email protected]>
---
io_uring/io_uring.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 5d4b448fdc50..fe3c93e21e2c 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -169,7 +169,6 @@ static struct ctl_table kernel_io_uring_disabled_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
- {},
};
#endif
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 7/7] drivers: perf: Remove the now superfluous sentinel elements from ctl_table array
2024-03-28 15:57 [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Joel Granados via B4 Relay
` (5 preceding siblings ...)
2024-03-28 15:57 ` [PATCH 6/7] io_uring: Remove the now superfluous sentinel elements " Joel Granados via B4 Relay
@ 2024-03-28 15:57 ` Joel Granados via B4 Relay
2024-03-28 23:05 ` (subset) [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Jens Axboe
2024-04-09 16:59 ` Will Deacon
8 siblings, 0 replies; 18+ messages in thread
From: Joel Granados via B4 Relay @ 2024-03-28 15:57 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Jens Axboe, Pavel Begunkov, Atish Patra,
Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
Palmer Dabbelt, Albert Ou
Cc: Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel, Joel Granados
From: Joel Granados <[email protected]>
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%[email protected]/)
Remove sentinel from sbi_pmu_sysctl_table
Signed-off-by: Joel Granados <[email protected]>
---
drivers/perf/riscv_pmu_sbi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c
index 8cbe6e5f9c39..5aef5a8737b2 100644
--- a/drivers/perf/riscv_pmu_sbi.c
+++ b/drivers/perf/riscv_pmu_sbi.c
@@ -1043,7 +1043,6 @@ static struct ctl_table sbi_pmu_sysctl_table[] = {
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_TWO,
},
- { }
};
static int pmu_sbi_device_probe(struct platform_device *pdev)
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: (subset) [PATCH 0/7] sysctl: Remove sentinel elements from misc directories
2024-03-28 15:57 [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Joel Granados via B4 Relay
` (6 preceding siblings ...)
2024-03-28 15:57 ` [PATCH 7/7] drivers: perf: " Joel Granados via B4 Relay
@ 2024-03-28 23:05 ` Jens Axboe
2024-04-09 16:59 ` Will Deacon
8 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2024-03-28 23:05 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Pavel Begunkov, Atish Patra, Anup Patel,
Will Deacon, Mark Rutland, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Joel Granados
Cc: Luis Chamberlain, linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel
On Thu, 28 Mar 2024 16:57:47 +0100, Joel Granados wrote:
> What?
> These commits remove the sentinel element (last empty element) from the
> sysctl arrays of all the files under the "mm/", "security/", "ipc/",
> "init/", "io_uring/", "drivers/perf/" and "crypto/" directories that
> register a sysctl array. The inclusion of [4] to mainline allows the
> removal of sentinel elements without behavioral change. This is safe
> because the sysctl registration code (register_sysctl() and friends) use
> the array size in addition to checking for a sentinel [1].
>
> [...]
Applied, thanks!
[6/7] io_uring: Remove the now superfluous sentinel elements from ctl_table array
(no commit info)
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/7] sysctl: Remove sentinel elements from misc directories
2024-03-28 15:57 [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Joel Granados via B4 Relay
` (7 preceding siblings ...)
2024-03-28 23:05 ` (subset) [PATCH 0/7] sysctl: Remove sentinel elements from misc directories Jens Axboe
@ 2024-04-09 16:59 ` Will Deacon
8 siblings, 0 replies; 18+ messages in thread
From: Will Deacon @ 2024-04-09 16:59 UTC (permalink / raw)
To: Andrew Morton, Muchun Song, Miaohe Lin, Naoya Horiguchi,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
David Howells, Jarkko Sakkinen, Kees Cook, Herbert Xu,
David S. Miller, Jens Axboe, Pavel Begunkov, Atish Patra,
Anup Patel, Mark Rutland, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Joel Granados
Cc: catalin.marinas, kernel-team, Will Deacon, Luis Chamberlain,
linux-mm, linux-kernel, linux-fsdevel, apparmor,
linux-security-module, keyrings, linux-crypto, io-uring,
linux-riscv, linux-arm-kernel
On Thu, 28 Mar 2024 16:57:47 +0100, Joel Granados wrote:
> What?
> These commits remove the sentinel element (last empty element) from the
> sysctl arrays of all the files under the "mm/", "security/", "ipc/",
> "init/", "io_uring/", "drivers/perf/" and "crypto/" directories that
> register a sysctl array. The inclusion of [4] to mainline allows the
> removal of sentinel elements without behavioral change. This is safe
> because the sysctl registration code (register_sysctl() and friends) use
> the array size in addition to checking for a sentinel [1].
>
> [...]
Applied drivers/perf change to will (for-next/perf), thanks!
[7/7] drivers: perf: Remove the now superfluous sentinel elements from ctl_table array
https://git.kernel.org/will/c/f66ae597411c
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 18+ messages in thread