linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, david.laight@aculab.com,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	open list <linux-kernel@vger.kernel.org>,
	opendmb@gmail.com, davem@davemloft.net
Subject: Re: [PATCH v2 0/4] net: Use strlcpy() for ethtool::get_strings
Date: Sun, 4 Mar 2018 16:40:54 +0100	[thread overview]
Message-ID: <20180304154054.GB19623@lunn.ch> (raw)
In-Reply-To: <20180302230839.31468-1-f.fainelli@gmail.com>

On Fri, Mar 02, 2018 at 03:08:35PM -0800, Florian Fainelli wrote:
> Hi all,
> 
> After turning on KASAN on one of my systems, I started getting lots of out of
> bounds errors while fetching a given port's statistics, and indeed using
> memcpy() is unsafe for copying strings which have not been declared as an array
> of ETH_GSTRING_LEN bytes, so let's use strlcpy() instead. This allows the best
> of both worlds: we still keep the efficient memory usage of variably sized
> strings, but we don't copy more than we need to.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  parent reply	other threads:[~2018-03-04 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02 23:08 [PATCH v2 0/4] net: Use strlcpy() for ethtool::get_strings Florian Fainelli
2018-03-02 23:08 ` [PATCH v2 1/4] net: dsa: b53: " Florian Fainelli
2018-03-02 23:08 ` [PATCH v2 2/4] net: phy: marvell: " Florian Fainelli
2018-03-02 23:08 ` [PATCH v2 3/4] net: phy: micrel: " Florian Fainelli
2018-03-02 23:08 ` [PATCH v2 4/4] net: phy: broadcom: " Florian Fainelli
2018-03-04 15:40 ` Andrew Lunn [this message]
2018-03-06 16:13 ` [PATCH v2 0/4] net: " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180304154054.GB19623@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=david.laight@aculab.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=opendmb@gmail.com \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).