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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190906060544.GA2264@nanopsycho.orion>
Date:   Fri, 6 Sep 2019 08:05:44 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, idosch@...lanox.com,
        dsahern@...il.com, mlxsw@...lanox.com
Subject: Re: [patch net-next] net: fib_notifier: move fib_notifier_ops from
 struct net into per-net struct

Fri, Sep 06, 2019 at 07:54:39AM CEST, eric.dumazet@...il.com wrote:
>
>
>On 9/5/19 8:06 PM, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@...lanox.com>
>> 
>> No need for fib_notifier_ops to be in struct net. It is used only by
>> fib_notifier as a private data. Use net_generic to introduce per-net
>> fib_notifier struct and move fib_notifier_ops there.
>> 
>>
>
>...
>
>>  static struct pernet_operations fib_notifier_net_ops = {
>>  	.init = fib_notifier_net_init,
>>  	.exit = fib_notifier_net_exit,
>> +	.id = &fib_notifier_net_id,
>> +	.size = sizeof(struct fib_notifier_net),
>>  };
>>  
>>  static int __init fib_notifier_init(void)
>> 
>
>Note that this will allocate a block of memory (in ops_init()) to hold this,
>plus a second one to hold the pointer to this block.
>
>Due to kmalloc() constraints, this block will use more memory.

I'm aware. But we have net_generic for exactly this purpose not to
pullute struct net.


>
>Not sure your patch is a win, since it makes things a bit more complex.
>
>Is it a preparation patch so that you can add later other fields in struct fib_notifier_net ?

Yes.


>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ