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:   Mon, 11 Jan 2021 14:08:29 -0800
From:   Saeed Mahameed <saeed@...nel.org>
To:     Vladimir Oltean <olteanv@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Eric Dumazet <edumazet@...gle.com>,
        George McCollister <george.mccollister@...il.com>,
        Oleksij Rempel <o.rempel@...gutronix.de>,
        Jay Vosburgh <j.vosburgh@...il.com>,
        Veaceslav Falico <vfalico@...il.com>,
        Andy Gospodarek <andy@...yhouse.net>,
        Arnd Bergmann <arnd@...db.de>, Taehee Yoo <ap420073@...il.com>,
        Jiri Pirko <jiri@...nulli.us>, Florian Westphal <fw@...len.de>,
        Nikolay Aleksandrov <nikolay@...dia.com>,
        Pravin B Shelar <pshelar@....org>,
        Sridhar Samudrala <sridhar.samudrala@...el.com>
Subject: Re: [PATCH v6 net-next 07/15] net: remove return value from
 dev_get_stats

On Sat, 2021-01-09 at 19:26 +0200, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> After commit 28172739f0a2 ("net: fix 64 bit counters on 32 bit
> arches"),
> dev_get_stats got an additional argument for storage of statistics.
> At
> this point, dev_get_stats could return either the passed "storage"
> argument, or the output of .ndo_get_stats64.
> 
> Then commit caf586e5f23c ("net: add a core netdev->rx_dropped
> counter")
> came, and the output of .ndo_get_stats64 (still returning a pointer
> to
> struct rtnl_link_stats64) started being ignored.
> 
> Then came commit bc1f44709cf2 ("net: make ndo_get_stats64 a void
> function") which made .ndo_get_stats64 stop returning anything.
> 
> So now, dev_get_stats always reports the "storage" pointer received
> as
> argument. This is useless. Some drivers are dealing with unnecessary
> complexity due to this, using another pointer to poke around the
> returned statistics, when they can do that directly through the
> stack-allocated struct rtnl_link_stats64.
> 
> Refactor these callers to ignore the return value completely and just
> access the values from their struct rtnl_link_stats64 local variable.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> 

Reviewed-by: Saeed Mahameed <saeedm@...dia.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ