All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Martin Lau <kafai@fb.com>, Yafang Shao <laoar.shao@gmail.com>,
	Lawrence Brakmo <brakmo@fb.com>
Cc: "ast@kernel.org" <ast@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"shaoyafang@didiglobal.com" <shaoyafang@didiglobal.com>
Subject: Re: [PATCH bpf-next] bpf: use the proper optlen when doing strncpy in bpf_getsockopt()
Date: Wed, 23 Jan 2019 14:53:14 +0100	[thread overview]
Message-ID: <87f0153e-9d4c-b8ee-e2f0-ac12a430e92a@iogearbox.net> (raw)
In-Reply-To: <20190122180457.goq4xgtbi5cuxzwz@kafai-mbp.dhcp.thefacebook.com>

On 01/22/2019 07:04 PM, Martin Lau wrote:
> On Sat, Jan 19, 2019 at 02:20:52PM +0800, Yafang Shao wrote:
>> As the last character of optval will be set with 0, so just copying
>> (optlen - 1) characters is enough.
> I am not sure this optimization is needed but I think it will

Yeah, it's totally fine as is.

      parent reply	other threads:[~2019-01-23 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-19  6:20 [PATCH bpf-next] bpf: use the proper optlen when doing strncpy in bpf_getsockopt() Yafang Shao
2019-01-22 18:04 ` Martin Lau
2019-01-22 18:39   ` Lawrence Brakmo
2019-01-23 13:53   ` Daniel Borkmann [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=87f0153e-9d4c-b8ee-e2f0-ac12a430e92a@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=brakmo@fb.com \
    --cc=kafai@fb.com \
    --cc=laoar.shao@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=shaoyafang@didiglobal.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.