public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
	"David S . Miller" <davem@davemloft.net>
Cc: Tobias Waldekranz <tobias@waldekranz.com>,
	Brendan Gregg <brendan.d.gregg@gmail.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<kernel-team@fb.com>
Subject: Re: [PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm()
Date: Fri, 11 Mar 2016 10:35:10 -0800	[thread overview]
Message-ID: <56E30FDE.3050702@fb.com> (raw)
In-Reply-To: <56E3083E.6010001@iogearbox.net>

On 3/11/16 10:02 AM, Daniel Borkmann wrote:
> Would strscpy() help in this case (see 30035e45753b ("string: provide
> strscpy()"))?

I've looked at it too, but 990486c8af04 scared me a little,
it's not easily backport-able and mainly I don't think
it's faster than strlcpy for small strings like comm.
memcpy going to be faster for sure.

      reply	other threads:[~2016-03-11 18:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10  4:02 [PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm() Alexei Starovoitov
2016-03-10  4:28 ` David Miller
2016-03-11 10:24 ` Daniel Borkmann
2016-03-11 17:20   ` Alexei Starovoitov
2016-03-11 18:02     ` Daniel Borkmann
2016-03-11 18:35       ` Alexei Starovoitov [this message]

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=56E30FDE.3050702@fb.com \
    --to=ast@fb.com \
    --cc=brendan.d.gregg@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tobias@waldekranz.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