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]
Date:   Wed, 16 May 2018 22:36:49 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     roopa@...ulusnetworks.com
Cc:     netdev@...r.kernel.org, dsa@...ulusnetworks.com,
        nikolay@...ulusnetworks.com, idosch@...lanox.com
Subject: Re: [PATCH net-next v3 1/3] ipv4: support sport, dport and
 ip_proto in RTM_GETROUTE

From: Roopa Prabhu <roopa@...ulusnetworks.com>
Date: Wed, 16 May 2018 13:30:28 -0700

> yes, but we hold rcu read lock before calling the reply function for
> fib result.  I did consider allocating the skb before the read
> lock..but then the refactoring (into a separate netlink reply func)
> would seem unnecessary.
> 
> I am fine with pre-allocating and undoing the refactoring if that works better.

Hmmm... I also notice that with this change we end up doing the
rtnl_unicast() under the RCU lock which is unnecessary too.

So yes, please pull the "out_skb" allocation before the
rcu_read_lock(), and push the rtnl_unicast() after the
rcu_read_unlock().

It really is a shame that sharing the ETH_P_IP skb between the route
route lookup and the netlink response doesn't work properly.

I was using RTM_GETROUTE at one point for route/fib lookup performance
measurements.  It never was great at that, but now that there is going
to be two SKB allocations instead of one it is going to be even less
useful for that kind of usage.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ