From: Daniel Borkmann <daniel@iogearbox.net> To: Nikolay Aleksandrov <razor@blackwall.org>, netdev@vger.kernel.org Cc: kuba@kernel.org, davem@davemloft.net, stable@vger.kernel.org, Jason Wang <jasowang@redhat.com>, Xuan Zhuo <xuanzhuo@linux.alibaba.com>, "Michael S. Tsirkin" <mst@redhat.com>, virtualization@lists.linux-foundation.org Subject: Re: [PATCH net v3] virtio_net: fix wrong buf address calculation when using xdp Date: Mon, 25 Apr 2022 15:10:33 +0200 [thread overview] Message-ID: <00a5d84e-298e-3ca4-c6da-826e6fe586de@iogearbox.net> (raw) In-Reply-To: <20220425103703.3067292-1-razor@blackwall.org> On 4/25/22 12:37 PM, Nikolay Aleksandrov wrote: > We received a report[1] of kernel crashes when Cilium is used in XDP > mode with virtio_net after updating to newer kernels. After > investigating the reason it turned out that when using mergeable bufs > with an XDP program which adjusts xdp.data or xdp.data_meta page_to_buf() > calculates the build_skb address wrong because the offset can become less > than the headroom so it gets the address of the previous page (-X bytes > depending on how lower offset is): > page_to_skb: page addr ffff9eb2923e2000 buf ffff9eb2923e1ffc offset 252 headroom 256 [...] > CC: stable@vger.kernel.org > CC: Jason Wang <jasowang@redhat.com> > CC: Xuan Zhuo <xuanzhuo@linux.alibaba.com> > CC: Daniel Borkmann <daniel@iogearbox.net> > CC: "Michael S. Tsirkin" <mst@redhat.com> > CC: virtualization@lists.linux-foundation.org > Fixes: 8fb7da9e9907 ("virtio_net: get build_skb() buf by data ptr") > Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org> Thanks everyone! Acked-by: Daniel Borkmann <daniel@iogearbox.net>
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Borkmann <daniel@iogearbox.net> To: Nikolay Aleksandrov <razor@blackwall.org>, netdev@vger.kernel.org Cc: "Michael S. Tsirkin" <mst@redhat.com>, stable@vger.kernel.org, virtualization@lists.linux-foundation.org, kuba@kernel.org, davem@davemloft.net Subject: Re: [PATCH net v3] virtio_net: fix wrong buf address calculation when using xdp Date: Mon, 25 Apr 2022 15:10:33 +0200 [thread overview] Message-ID: <00a5d84e-298e-3ca4-c6da-826e6fe586de@iogearbox.net> (raw) In-Reply-To: <20220425103703.3067292-1-razor@blackwall.org> On 4/25/22 12:37 PM, Nikolay Aleksandrov wrote: > We received a report[1] of kernel crashes when Cilium is used in XDP > mode with virtio_net after updating to newer kernels. After > investigating the reason it turned out that when using mergeable bufs > with an XDP program which adjusts xdp.data or xdp.data_meta page_to_buf() > calculates the build_skb address wrong because the offset can become less > than the headroom so it gets the address of the previous page (-X bytes > depending on how lower offset is): > page_to_skb: page addr ffff9eb2923e2000 buf ffff9eb2923e1ffc offset 252 headroom 256 [...] > CC: stable@vger.kernel.org > CC: Jason Wang <jasowang@redhat.com> > CC: Xuan Zhuo <xuanzhuo@linux.alibaba.com> > CC: Daniel Borkmann <daniel@iogearbox.net> > CC: "Michael S. Tsirkin" <mst@redhat.com> > CC: virtualization@lists.linux-foundation.org > Fixes: 8fb7da9e9907 ("virtio_net: get build_skb() buf by data ptr") > Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org> Thanks everyone! Acked-by: Daniel Borkmann <daniel@iogearbox.net> _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2022-04-25 13:10 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-25 10:37 [PATCH net v3] virtio_net: fix wrong buf address calculation when using xdp Nikolay Aleksandrov 2022-04-25 10:37 ` Nikolay Aleksandrov 2022-04-25 11:37 ` Xuan Zhuo 2022-04-25 11:37 ` Xuan Zhuo 2022-04-25 13:10 ` Daniel Borkmann [this message] 2022-04-25 13:10 ` Daniel Borkmann 2022-04-25 13:52 ` Michael S. Tsirkin 2022-04-25 13:52 ` Michael S. Tsirkin 2022-04-26 2:22 ` Jason Wang 2022-04-26 2:22 ` Jason Wang 2022-04-26 13:00 ` patchwork-bot+netdevbpf
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=00a5d84e-298e-3ca4-c6da-826e6fe586de@iogearbox.net \ --to=daniel@iogearbox.net \ --cc=davem@davemloft.net \ --cc=jasowang@redhat.com \ --cc=kuba@kernel.org \ --cc=mst@redhat.com \ --cc=netdev@vger.kernel.org \ --cc=razor@blackwall.org \ --cc=stable@vger.kernel.org \ --cc=virtualization@lists.linux-foundation.org \ --cc=xuanzhuo@linux.alibaba.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: linkBe 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.