[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/11] sysctl: Add size to register_sysctl_init
 
- To: Jiri Slaby <jirislaby@xxxxxxxxxx>
 
- From: Joel Granados <j.granados@xxxxxxxxxxx>
 
- Date: Thu, 22 Jun 2023 15:59:22 +0200
 
- Cc: <mcgrof@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar	<mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen	<dave.hansen@xxxxxxxxxxxxxxx>, <x86@xxxxxxxxxx>, Theodore Ts'o	<tytso@xxxxxxx>, "Jason A. Donenfeld" <Jason@xxxxxxxxx>, Greg Kroah-Hartman	<gregkh@xxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano	Stabellini <sstabellini@xxxxxxxxxx>, Benjamin LaHaise <bcrl@xxxxxxxxx>,	Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Christian Brauner	<brauner@xxxxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxx>, Chuck Lever	<chuck.lever@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, Kees Cook	<keescook@xxxxxxxxxxxx>, Iurii Zaikin <yzaikin@xxxxxxxxxx>, Alexei	Starovoitov <ast@xxxxxxxxxx>, Daniel Borkmann <daniel@xxxxxxxxxxxxx>, Andrii	Nakryiko <andrii@xxxxxxxxxx>, Balbir Singh <bsingharora@xxxxxxxxx>, Eric	Biederman <ebiederm@xxxxxxxxxxxx>, "Naveen N. Rao"	<naveen.n.rao@xxxxxxxxxxxxx>, Anil S Keshavamurthy	<anil.s.keshavamurthy@xxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>,	Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Peter Zijlstra	<peterz@xxxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Petr Mladek	<pmladek@xxxxxxxx>, Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>, Juri	Lelli <juri.lelli@xxxxxxxxxx>, Vincent Guittot <vincent.guittot@xxxxxxxxxx>,	Steven Rostedt <rostedt@xxxxxxxxxxx>, Andrew Morton	<akpm@xxxxxxxxxxxxxxxxxxxx>, Mike Kravetz <mike.kravetz@xxxxxxxxxx>, Muchun	Song <muchun.song@xxxxxxxxx>, Naoya Horiguchi <naoya.horiguchi@xxxxxxx>,	"Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx>, David Howells	<dhowells@xxxxxxxxxx>, Jarkko Sakkinen <jarkko@xxxxxxxxxx>, Paul Moore	<paul@xxxxxxxxxxxxxx>, James Morris <jmorris@xxxxxxxxx>, "Serge E. Hallyn"	<serge@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Oleksandr Tyshchenko	<oleksandr_tyshchenko@xxxxxxxx>, Amir Goldstein <amir73il@xxxxxxxxx>, John	Fastabend <john.fastabend@xxxxxxxxx>, Martin KaFai Lau	<martin.lau@xxxxxxxxx>, Song Liu <song@xxxxxxxxxx>, Yonghong Song	<yhs@xxxxxx>, KP Singh <kpsingh@xxxxxxxxxx>, Stanislav Fomichev	<sdf@xxxxxxxxxx>, Hao Luo <haoluo@xxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>,	Waiman Long <longman@xxxxxxxxxx>, Boqun Feng <boqun.feng@xxxxxxxxx>, John	Ogness <john.ogness@xxxxxxxxxxxxx>, Dietmar Eggemann	<dietmar.eggemann@xxxxxxx>, Ben Segall <bsegall@xxxxxxxxxx>, Mel Gorman	<mgorman@xxxxxxx>, Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>, Valentin	Schneider <vschneid@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxxxxxx>, Will	Drewry <wad@xxxxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Miaohe Lin	<linmiaohe@xxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,	<xen-devel@xxxxxxxxxxxxxxxxxxxx>, <linux-aio@xxxxxxxxx>,	<linux-fsdevel@xxxxxxxxxxxxxxx>, <linux-mm@xxxxxxxxx>,	<bpf@xxxxxxxxxxxxxxx>, <kexec@xxxxxxxxxxxxxxxxxxx>,	<linux-trace-kernel@xxxxxxxxxxxxxxx>, <keyrings@xxxxxxxxxxxxxxx>,	<linux-security-module@xxxxxxxxxxxxxxx>
 
- Cms-type: 201P
 
- Delivery-date: Thu, 22 Jun 2023 13:59:39 +0000
 
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230622135925euoutp0193c764677365193732cff7102e07abf0~q-_QYCpHV1007310073euoutp01i
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
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@xxxxxxxxxx/.
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@xxxxxxxxxx/
Here are some other threads that mention the overall effort:
https://lore.kernel.org/all/20230321130908.6972-1-frank.li@xxxxxxxx
https://lore.kernel.org/all/20220220060626.15885-1-tangmeng@xxxxxxxxxxxxx
I will add a better motivational part to V2
Thx for the feedback
--
Joel Granados
 Attachment:
signature.asc 
Description: PGP signature 
 
    
     |