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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 6 Jan 2020 09:37:21 -0700
From:   David Ahern <dsahern@...il.com>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        jakub.kicinski@...ronome.com, saeedm@...lanox.com, leon@...nel.org,
        tariqt@...lanox.com, ayal@...lanox.com, vladbu@...lanox.com,
        michaelgur@...lanox.com, moshe@...lanox.com, mlxsw@...lanox.com
Subject: Re: [patch net-next 0/4] net: allow per-net notifier to follow netdev
 into namespace

On 1/6/20 2:15 AM, Jiri Pirko wrote:
> 
> I do not follow. This patchset assures that driver does not get
> notification of namespace it does not care about. I'm not sure what do
> you mean by "half of the problem".

originally, notifiers were only global. drivers registered for them, got
the replay of existing data, and notifications across namespaces.

You added code to allow drivers to register for events in a specific
namespace.

Now you are saying that is not enough as devices can be moved from one
namespace to another and you want core code to automagically register a
driver for events as its devices are moved.

My point is if a driver is trying to be efficient and not handle events
in namespaces it does not care about (the argument for per-namespace
notifiers) then something needs to track that a driver no longer cares
about events in a given namespace once all devices are moved out of Only
the driver knows that and IMHO the driver should be the one managing
what namespaces it wants events.

Example:
driver A has 2 devices eth0, eth1. It registers for events ONLY in
init_net. eth0 is moved to ns0. eth1 is moved to ns1. On the move, core
code registers driver A for events in ns0 and ns1.

Driver A now no longer cares about events in init_net, yet it still
receives them. If this is not a big concern for driver A, then why the
namespace only registration? ie., just use the global and move on. If it
is a concern (your point in this thread), you have not solved the
unregister problem.

ie., I don't like the automagic registration in the new namespace.
drivers should be explicit about what it wants.

> 
> 
>> driver cares for granularity, it can deal with namespace changes on its
>> own. If that's too much, use the global registration.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ