lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 8 Nov 2023 19:29:49 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     <j.granados@...sung.com>
Cc:     Joel Granados via B4 Relay 
        <devnull+j.granados.samsung.com@...nel.org>,
        Luis Chamberlain <mcgrof@...nel.org>, willy@...radead.org,
        josh@...htriplett.org, Kees Cook <keescook@...omium.org>,
        Eric Biederman <ebiederm@...ssion.com>,
        Iurii Zaikin <yzaikin@...gle.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mark Rutland <mark.rutland@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        John Stultz <jstultz@...gle.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Andy Lutomirski <luto@...capital.net>,
        Will Drewry <wad@...omium.org>, Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Valentin Schneider <vschneid@...hat.com>,
        Petr Mladek <pmladek@...e.com>,
        John Ogness <john.ogness@...utronix.de>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        "Naveen N. Rao" <naveen.n.rao@...ux.ibm.com>,
        Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
        "David S. Miller" <davem@...emloft.net>,
        Balbir Singh <bsingharora@...il.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        John Fastabend <john.fastabend@...il.com>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>,
        Yonghong Song <yonghong.song@...ux.dev>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        linux-kernel@...r.kernel.org, kexec@...ts.infradead.org,
        linux-fsdevel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
        bpf@...r.kernel.org
Subject: Re: [PATCH 03/10] ftrace: Remove the now superfluous sentinel
 elements from ctl_table array

On Tue, 07 Nov 2023 14:45:03 +0100
Joel Granados via B4 Relay <devnull+j.granados.samsung.com@...nel.org> wrote:

> From: Joel Granados <j.granados@...sung.com>
> 
> This commit comes at the tail end of a greater effort to remove the
> empty elements at the end of the ctl_table arrays (sentinels) which
> will reduce the overall build time size of the kernel and run time
> memory bloat by ~64 bytes per sentinel (further information Link :
> https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)
> 
> Remove sentinel elements from ftrace_sysctls and user_event_sysctls
> 

Both looks good to me. (since register_sysctl_init() uses ARRAY_SIZE()
macro to get the array size.)

Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

> Signed-off-by: Joel Granados <j.granados@...sung.com>
> ---
>  kernel/trace/ftrace.c            | 1 -
>  kernel/trace/trace_events_user.c | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 8de8bec5f366..fd40d02a23c7 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -8264,7 +8264,6 @@ static struct ctl_table ftrace_sysctls[] = {
>  		.mode           = 0644,
>  		.proc_handler   = ftrace_enable_sysctl,
>  	},
> -	{}
>  };
>  
>  static int __init ftrace_sysctl_init(void)
> diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
> index 6f046650e527..bef1bdc62acf 100644
> --- a/kernel/trace/trace_events_user.c
> +++ b/kernel/trace/trace_events_user.c
> @@ -2694,7 +2694,6 @@ static struct ctl_table user_event_sysctls[] = {
>  		.mode		= 0644,
>  		.proc_handler	= set_max_user_events_sysctl,
>  	},
> -	{}
>  };
>  
>  static int __init trace_events_user_init(void)
> 
> -- 
> 2.30.2
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ