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] [day] [month] [year] [list]
Message-ID: <20241014173538.66247-1-kuniyu@amazon.com>
Date: Mon, 14 Oct 2024 10:35:38 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <edumazet@...gle.com>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <kuni1840@...il.com>,
	<kuniyu@...zon.com>, <netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH v1 net-next 03/11] neighbour: Use rtnl_register_many().

From: Eric Dumazet <edumazet@...gle.com>
Date: Mon, 14 Oct 2024 10:01:54 +0200
> > +static const struct rtnl_msg_handler neigh_rtnl_msg_handlers[] = {
> > +       {NULL, PF_UNSPEC, RTM_NEWNEIGH, neigh_add, NULL, 0},
> > +       {NULL, PF_UNSPEC, RTM_DELNEIGH, neigh_delete, NULL, 0},
> > +       {NULL, PF_UNSPEC, RTM_GETNEIGH, neigh_get, neigh_dump_info,
> > +        RTNL_FLAG_DUMP_UNLOCKED},
> > +       {NULL, PF_UNSPEC, RTM_GETNEIGHTBL, NULL, neightbl_dump_info, 0},
> > +       {NULL, PF_UNSPEC, RTM_SETNEIGHTBL, neightbl_set, NULL, 0},
> > +};
> > +
> 
> Please add __initconst qualifier.

Sure, will add it for other built-in files too.


> 
> Also C99 initializations look better to me.

Exactly, I just double-checked PF_UNSPEC is 0 :)

For some modules that already have the older style,
I'll change them to C99 style when I convert each handlers.

Thanks!

> 
> +static const struct rtnl_msg_handler neigh_rtnl_msg_handlers[] __initconst = {
> +       {.msgtype = RTM_NEWNEIGH, .doit = neigh_add},
> +       {.msgtype = RTM_DELNEIGH, .doit = neigh_delete},
> +       {.msgtype = RTM_GETNEIGH, .doit = neigh_get,
> +       .dumpit = neigh_dump_info, .flags = RTNL_FLAG_DUMP_UNLOCKED},
> +       {.msgtype = RTM_GETNEIGHTBL, .dumpit = neightbl_dump_info},
> +       {.msgtype = RTM_SETNEIGHTBL, .doit = neightbl_set},
> +};
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ