LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH 06/11] sysctl: Add size to register_net_sysctl function

To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Subject: Re: [PATCH 06/11] sysctl: Add size to register_net_sysctl function
Cc: <mcgrof@xxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Leon Romanovsky <leon@xxxxxxxxxx>, David Ahern <dsahern@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Joerg Reuter <jreuter@xxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxx>, "Florian Westphal" <fw@xxxxxxxxx>, Roopa Prabhu <roopa@xxxxxxxxxx>, Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>, Alexander Aring <alex.aring@xxxxxxxxx>, Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx>, Miquel Raynal <miquel.raynal@xxxxxxxxxxx>, Steffen Klassert <steffen.klassert@xxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx>, Mat Martineau <martineau@xxxxxxxxxx>, "Simon Horman" <horms@xxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, "Remi Denis-Courmont" <courmisch@xxxxxxxxx>, Santosh Shilimkar <santosh.shilimkar@xxxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, "Marc Dionne" <marc.dionne@xxxxxxxxxxxx>, Neil Horman <nhorman@xxxxxxxxxxxxx>, Marcelo Ricardo Leitner <marcelo.leitner@xxxxxxxxx>, Xin Long <lucien.xin@xxxxxxxxx>, Karsten Graul <kgraul@xxxxxxxxxxxxx>, Wenjia Zhang <wenjia@xxxxxxxxxxxxx>, Jan Karcher <jaka@xxxxxxxxxxxxx>, Jon Maloy <jmaloy@xxxxxxxxxx>, Ying Xue <ying.xue@xxxxxxxxxxxxx>, Martin Schiller <ms@xxxxxxxxxx>, <linux-rdma@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxxxxxx>, <linux-hams@xxxxxxxxxxxxxxx>, <netfilter-devel@xxxxxxxxxxxxxxx>, <coreteam@xxxxxxxxxxxxx>, <bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx>, <dccp@xxxxxxxxxxxxxxx>, <linux-wpan@xxxxxxxxxxxxxxx>, <mptcp@xxxxxxxxxxxxxxx>, <lvs-devel@xxxxxxxxxxxxxxx>, <rds-devel@xxxxxxxxxxxxxx>, <linux-afs@xxxxxxxxxxxxxxxxxxx>, <linux-sctp@xxxxxxxxxxxxxxx>, <linux-s390@xxxxxxxxxxxxxxx>, <tipc-discussion@xxxxxxxxxxxxxxxxxxxxx>, <linux-x25@xxxxxxxxxxxxxxx>
From: Joel Granados <j.granados@xxxxxxxxxxx>
Date: Wed, 21 Jun 2023 13:49:27 +0200
On Wed, Jun 21, 2023 at 01:49:54PM +0300, Dan Carpenter wrote:
> On Wed, Jun 21, 2023 at 12:47:30PM +0300, Dan Carpenter wrote:
> > The patchset doesn't include the actual interesting changes, just a
> > bunch of mechanical prep work.
> > 
> 
> I was wrong here, the patchset just hadn't all hit the mailing lists.
not even. It was that the patch got mangled by some error on my side.

> I can't apply this patchset to anything.  I tried linux-next, net, and
> net-next.  So it's hard to review.
All this applies cleanly to mcgrof's sysctl-next branch here
https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/log/?h=sysctl-next

> 
> It looks like ensure_safe_net_sysctl() never got update to use
> table_size...
Done. I realized this while checking out your other comments. thx.

> 
> You could easily write a static checker test to print a warning any time
> that ->procname is checked for NULL.  I have attached a Smatch check.
> You would need to added to check_list.h and recompile.
Awesome!!!, I had been doing this with coccinelle, I'll recompile with
smatch and see if I get extra hits. Thx!
> 
> net/sysctl_net.c:130 ensure_safe_net_sysctl() warn: checking ->procname 
> 'ent->procname'
Done. Will be available in V2

> 
> regards,
> dan carpenter
> 

Best
-- 

Joel Granados

Attachment: signature.asc
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>