bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
	Daniel Borkmann <borkmann@iogearbox.net>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH bpf-next] bpf: fix too large copy from user in bpf_test_init
Date: Tue, 19 May 2020 19:22:08 +0200	[thread overview]
Message-ID: <169a1b10-4bb8-6ba1-4f5f-e74dd273107a@iogearbox.net> (raw)
In-Reply-To: <158980712729.256597.6115007718472928659.stgit@firesoul>

On 5/18/20 3:05 PM, Jesper Dangaard Brouer wrote:
> Commit bc56c919fce7 ("bpf: Add xdp.frame_sz in bpf_prog_test_run_xdp().")
> recently changed bpf_prog_test_run_xdp() to use larger frames for XDP in
> order to test tail growing frames (via bpf_xdp_adjust_tail) and to have
> memory backing frame better resemble drivers.
> 
> The commit contains a bug, as it tries to copy the max data size from
> userspace, instead of the size provided by userspace.  This cause XDP
> unit tests to fail sporadically with EFAULT, an unfortunate behavior.
> The fix is to only copy the size specified by userspace.
> 
> Fixes: bc56c919fce7 ("bpf: Add xdp.frame_sz in bpf_prog_test_run_xdp().")
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>

Applied, thanks!

      parent reply	other threads:[~2020-05-19 17:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 13:05 [PATCH bpf-next] bpf: fix too large copy from user in bpf_test_init Jesper Dangaard Brouer
2020-05-19  0:15 ` Andrii Nakryiko
2020-05-19 17:22 ` 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=169a1b10-4bb8-6ba1-4f5f-e74dd273107a@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=borkmann@iogearbox.net \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).