From: Daniel Borkmann <daniel@iogearbox.net>
To: Jesper Dangaard Brouer <brouer@redhat.com>, netdev@vger.kernel.org
Subject: Re: [net-next PATCH] bpf/cpumap: make sure frame_size for build_skb is aligned if headroom isn't
Date: Thu, 20 Dec 2018 23:25:46 +0100 [thread overview]
Message-ID: <5cd8471e-527c-7273-b3a4-f6fe3fe238aa@iogearbox.net> (raw)
In-Reply-To: <154523522306.21104.9074815363480240934.stgit@firesoul>
On 12/19/2018 05:00 PM, Jesper Dangaard Brouer wrote:
> The frame_size passed to build_skb must be aligned, else it is
> possible that the embedded struct skb_shared_info gets unaligned.
>
> For correctness make sure that xdpf->headroom in included in the
> alignment. No upstream drivers can hit this, as all XDP drivers provide
> an aligned headroom. This was discovered when playing with implementing
> XDP support for mvneta, which have a 2 bytes DSA header, and this
> Marvell ARM64 platform didn't like doing atomic operations on an
> unaligned skb_shinfo(skb)->dataref addresses.
>
> Fixes: 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation")
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Applied to bpf-next, thanks!
prev parent reply other threads:[~2018-12-20 22:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 16:00 [net-next PATCH] bpf/cpumap: make sure frame_size for build_skb is aligned if headroom isn't Jesper Dangaard Brouer
2018-12-20 22:25 ` 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=5cd8471e-527c-7273-b3a4-f6fe3fe238aa@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=brouer@redhat.com \
--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