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]
Message-ID: <b517b9a54761a0ee650d6d64712844606cf8a631.camel@kernel.org>
Date:   Mon, 11 Jan 2021 14:54:50 -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 11/15] net: catch errors from dev_get_stats

On Sat, 2021-01-09 at 19:26 +0200, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> dev_get_stats can now return error codes. Convert all remaining call
> sites to look at that error code and stop processing.
> 
> The effects of simulating a kernel error (returning -ENOMEM) upon
> existing programs or kernel interfaces:
> 
> - ifconfig and "cat /proc/net/dev" print up until the interface that
>   failed, and there they return:
> cat: read error: Cannot allocate memory
> 
> - ifstat and "ip -s -s link show":
> RTNETLINK answers: Cannot allocate memory
> Dump terminated
> 
> Some call sites are coming from a context that returns void (ethtool
> stats, workqueue context). So since we can't report to the upper
> layer,
> do the next best thing: print an error to the console.
> 

another concern, one buggy netdev driver in a system will cause
unnecessary global failures when reading stats via netlink/procfs for
all the netdev in a netns, when other drivers will be happy to report.

can't we just show a message in that driver's stats line about the
occurred err ? and show the normal stats line of all others ?

> This patch wraps up the conversion of existing dev_get_stats callers,
> so
> we can add the __must_check attribute now to ensure that future
> callers
> keep doing this too.
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ