[PATCH 08/11] sysctl: Add size to register_sysctl_init

Joel Granados j.granados at samsung.com
Thu Jun 22 06:59:22 PDT 2023


On Thu, Jun 22, 2023 at 06:25:15AM +0200, Jiri Slaby wrote:
> On 21. 06. 23, 15:11, Joel Granados wrote:
> > On Wed, Jun 21, 2023 at 11:56:03AM +0200, Jiri Slaby wrote:
> > > On 21. 06. 23, 11:09, Joel Granados wrote:
> > > > In order to remove the end element from the ctl_table struct arrays, we
> > > > explicitly define the size when registering the targes. We add a size
> > > > argument to the register_sysctl_init call and pass an ARRAY_SIZE for all
> > > > the callers.
> > > 
> > > Hi, I am missing here (or in 00/00) _why_ you are doing that. Is it by a
> > Not sure what happened. I used the kernels get_maintainers.pl script
> > together with git-send-email. These are my settings:
> > 
> > "
> > tocmd ="`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --m --nol --nor"
> > cccmd ="`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --l --r --nom"
> > "
> > 
> > Could it be that there is an error in MAINTAINERS?
> 
> Sorry, I don't see what you are asking about. I was asking about motivation
I thought you were telling me that you were missing in the 00/00 :). I
misread, sorry.

> behind the series. That is a must in commit logs.
I see now that just saying "this is part of the effort to remove the
last empty element", does not put all this in to context. I spent some
time looking into the lists for some context and I think Luis summarizes
it quite nicely here
https://lore.kernel.org/all/20230302204612.782387-1-mcgrof@kernel.org/.

As I read it removing the last empty element from the ctl_table arrays
is part of a greater effort to remove the clutter in kernel/sysctl.c.

Here is one that actually hints at the ARRAY_SIZE solution.
https://lore.kernel.org/all/20230302202826.776286-1-mcgrof@kernel.org/

Here are some other threads that mention the overall effort:
https://lore.kernel.org/all/20230321130908.6972-1-frank.li@vivo.com
https://lore.kernel.org/all/20220220060626.15885-1-tangmeng@uniontech.com

I will add a better motivational part to V2

Thx for the feedback

--

Joel Granados
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/kexec/attachments/20230622/460d8061/attachment-0001.sig>


More information about the kexec mailing list