public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Joel Granados <j.granados@samsung.com>
Cc: mcgrof@kernel.org, Kees Cook <keescook@chromium.org>,
	Iurii Zaikin <yzaikin@google.com>,
	willy@infradead.org, josh@joshtriplett.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 07/14] sysctl: Add size arg to __register_sysctl_init
Date: Fri, 28 Jul 2023 12:56:36 +0200	[thread overview]
Message-ID: <ZMOe5FE3VETYsmdX@kernel.org> (raw)
In-Reply-To: <20230726140635.2059334-8-j.granados@samsung.com>

On Wed, Jul 26, 2023 at 04:06:27PM +0200, Joel Granados wrote:
> This is part of the effort to remove the sentinel element from the
> ctl_table array at register time. We add a size argument to
> __register_sysctl_init and modify the register_sysctl_init macro to
> calculate the array size with ARRAY_SIZE. The original callers do not
> need to be updated as they will go through the new macro.
> 
> Signed-off-by: Joel Granados <j.granados@samsung.com>
> ---
>  fs/proc/proc_sysctl.c  | 11 ++---------
>  include/linux/sysctl.h |  5 +++--
>  2 files changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
> index c04293911e7e..6c0721cd35f3 100644
> --- a/fs/proc/proc_sysctl.c
> +++ b/fs/proc/proc_sysctl.c
> @@ -1444,16 +1444,9 @@ EXPORT_SYMBOL(register_sysctl_sz);
>   * Context: if your base directory does not exist it will be created for you.
>   */
>  void __init __register_sysctl_init(const char *path, struct ctl_table *table,
> -				 const char *table_name)
> +				 const char *table_name, size_t table_size)

Hi Joel,

in the same vein as my comment on another patch.
Please add table_size to the kernel doc for this function.

  reply	other threads:[~2023-07-28 10:56 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230726140648eucas1p29a92c80fb28550e2087cd0ae190d29bd@eucas1p2.samsung.com>
2023-07-26 14:06 ` [PATCH 00/14] sysctl: Add a size argument to register functions in sysctl Joel Granados
2023-07-26 14:06   ` [PATCH 01/14] sysctl: Prefer ctl_table_header in proc_sysctl Joel Granados
2023-07-26 14:06   ` [PATCH 02/14] sysctl: Use ctl_table_header in list_for_each_table_entry Joel Granados
2023-07-26 14:06   ` [PATCH 03/14] sysctl: Add ctl_table_size to ctl_table_header Joel Granados
2023-07-28 10:48     ` Simon Horman
2023-07-31 12:10       ` Joel Granados
2023-07-26 14:06   ` [PATCH 04/14] sysctl: Add size argument to init_header Joel Granados
2023-07-26 14:06   ` [PATCH 05/14] sysctl: Add a size arg to __register_sysctl_table Joel Granados
2023-07-28 10:51     ` Simon Horman
2023-07-28 16:08       ` Joel Granados
2023-07-26 14:06   ` [PATCH 06/14] sysctl: Add size to register_sysctl Joel Granados
2023-07-26 17:58     ` Luis Chamberlain
2023-07-27 12:22       ` Joel Granados
2023-07-27 15:42         ` Luis Chamberlain
2023-07-28  7:41           ` Joel Granados
2023-07-26 14:06   ` [PATCH 07/14] sysctl: Add size arg to __register_sysctl_init Joel Granados
2023-07-28 10:56     ` Simon Horman [this message]
2023-07-28 16:11       ` Joel Granados
2023-07-26 14:06   ` [PATCH 08/14] sysctl: Add size to register_net_sysctl function Joel Granados
2023-07-26 14:06   ` [PATCH 09/14] ax.25: Update to register_net_sysctl_sz Joel Granados
2023-07-26 18:00     ` Luis Chamberlain
2023-07-27 12:31       ` Joel Granados
2023-07-27 15:44         ` Luis Chamberlain
2023-07-28  7:35           ` Joel Granados
2023-07-28 18:16             ` Luis Chamberlain
2023-07-31  7:09               ` Joel Granados
2023-07-27 15:38       ` Joel Granados
2023-07-27 15:50         ` Luis Chamberlain
2023-07-26 14:06   ` [PATCH 10/14] netfilter: " Joel Granados
2023-07-26 18:01     ` Luis Chamberlain
2023-07-26 14:06   ` [PATCH 11/14] networking: " Joel Granados
2023-07-26 18:05     ` Luis Chamberlain
2023-07-27  0:33       ` David Ahern
2023-07-27 12:33       ` Joel Granados
2023-07-28  7:08       ` Joel Granados
2023-07-26 14:06   ` [PATCH 12/14] vrf: " Joel Granados
2023-07-26 14:06   ` [PATCH 13/14] sysctl: SIZE_MAX->ARRAY_SIZE in register_net_sysctl Joel Granados
2023-07-26 14:06   ` [PATCH 14/14] sysctl: Use size as stopping criteria for list macro Joel Granados
2023-07-26 18:15   ` [PATCH 00/14] sysctl: Add a size argument to register functions in sysctl Luis Chamberlain
2023-07-27 11:43     ` Joel Granados
2023-07-27 15:39       ` Luis Chamberlain
2023-07-28  7:04         ` Joel Granados

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZMOe5FE3VETYsmdX@kernel.org \
    --to=horms@kernel.org \
    --cc=j.granados@samsung.com \
    --cc=josh@joshtriplett.org \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=willy@infradead.org \
    --cc=yzaikin@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox