On Fri, Oct 08, 2021 at 12:17:26AM +0800, Xuan Zhuo wrote:> On Thu, 7 Oct 2021 17:25:02 +0200, Greg KH <gregkh at linuxfoundation.org> wrote: > > On Thu, Oct 07, 2021 at 11:06:12PM +0800, Xuan Zhuo wrote: > > > On Thu, 07 Oct 2021 14:04:22 +0200, Corentin No?l <corentin.noel at collabora.com> wrote: > > > > I've been experiencing crashes with 5.14-rc1 and above that do not > > > > occur with 5.13, > > > > > > I should have fixed this problem before. I don't know why, I just looked at the > > > latest net code, and this commit seems to be lost. > > > > > > 1a8024239dacf53fcf39c0f07fbf2712af22864f virtio-net: fix for skb_over_panic inside big mode > > > > > > Can you test this patch again? > > > > That commit showed up in 5.13-rc5, so 5.14-rc1 and 5.13 should have had > > it in it, right? > > > > Yes, it may be lost due to conflicts during a certain merge.Really? I tried to apply that again to 5.14 and it did not work. So I do not understand what to do here, can you try to explain it better? thanks, greg k-h
On Fri, Oct 08, 2021 at 10:06:57AM +0200, Greg KH wrote:> On Fri, Oct 08, 2021 at 12:17:26AM +0800, Xuan Zhuo wrote: > > On Thu, 7 Oct 2021 17:25:02 +0200, Greg KH <gregkh at linuxfoundation.org> wrote: > > > On Thu, Oct 07, 2021 at 11:06:12PM +0800, Xuan Zhuo wrote: > > > > On Thu, 07 Oct 2021 14:04:22 +0200, Corentin No?l <corentin.noel at collabora.com> wrote: > > > > > I've been experiencing crashes with 5.14-rc1 and above that do not > > > > > occur with 5.13, > > > > > > > > I should have fixed this problem before. I don't know why, I just looked at the > > > > latest net code, and this commit seems to be lost. > > > > > > > > 1a8024239dacf53fcf39c0f07fbf2712af22864f virtio-net: fix for skb_over_panic inside big mode > > > > > > > > Can you test this patch again? > > > > > > That commit showed up in 5.13-rc5, so 5.14-rc1 and 5.13 should have had > > > it in it, right? > > > > > > > Yes, it may be lost due to conflicts during a certain merge. > > Really? I tried to apply that again to 5.14 and it did not work. So I > do not understand what to do here, can you try to explain it better? > > thanks, > > greg k-hHmm, something like the following perhaps then? Corentin would you like to try this? Warning: untested. diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 096c2ac6b7a6..18dd9f6d107d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -406,12 +406,13 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi, * add_recvbuf_mergeable() + get_mergeable_buf_len() */ truesize = headroom ? PAGE_SIZE : truesize; - tailroom = truesize - len - headroom; + tailroom = truesize - headroom; buf = p - headroom; len -= hdr_len; offset += hdr_padded_len; p += hdr_padded_len; + tailroom -= hdr_padded_len + len; shinfo_size = SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
On Fri, 8 Oct 2021 10:06:57 +0200, Greg KH <gregkh at linuxfoundation.org> wrote:> On Fri, Oct 08, 2021 at 12:17:26AM +0800, Xuan Zhuo wrote: > > On Thu, 7 Oct 2021 17:25:02 +0200, Greg KH <gregkh at linuxfoundation.org> wrote: > > > On Thu, Oct 07, 2021 at 11:06:12PM +0800, Xuan Zhuo wrote: > > > > On Thu, 07 Oct 2021 14:04:22 +0200, Corentin No?l <corentin.noel at collabora.com> wrote: > > > > > I've been experiencing crashes with 5.14-rc1 and above that do not > > > > > occur with 5.13, > > > > > > > > I should have fixed this problem before. I don't know why, I just looked at the > > > > latest net code, and this commit seems to be lost. > > > > > > > > 1a8024239dacf53fcf39c0f07fbf2712af22864f virtio-net: fix for skb_over_panic inside big mode > > > > > > > > Can you test this patch again? > > > > > > That commit showed up in 5.13-rc5, so 5.14-rc1 and 5.13 should have had > > > it in it, right? > > > > > > > Yes, it may be lost due to conflicts during a certain merge. > > Really? I tried to apply that again to 5.14 and it did not work. So I > do not understand what to do here, can you try to explain it better?I took a look, and there is actually another missing patch: A. 8fb7da9e990793299c89ed7a4281c235bfdd31f8 virtio_net: get build_skb() buf by data ptr B. 1a8024239dacf53fcf39c0f07fbf2712af22864f virtio-net: fix for skb_over_panic inside big mode A is replaced by another patch: commit c32325b8fdf2f979befb9fd5587918c0d5412db3 Author: Jakub Kicinski <kuba at kernel.org> Date: Mon Aug 2 10:57:29 2021 -0700 virtio-net: realign page_to_skb() after merges We ended up merging two versions of the same patch set: commit 8fb7da9e9907 ("virtio_net: get build_skb() buf by data ptr") commit 5c37711d9f27 ("virtio-net: fix for unable to handle page fault for address") into net, and commit 7bf64460e3b2 ("virtio-net: get build_skb() buf by data ptr") commit 6c66c147b9a4 ("virtio-net: fix for unable to handle page fault for address") into net-next. Redo the merge from commit 126285651b7f ("Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net"), so that the most recent code remains. Acked-by: Michael S. Tsirkin <mst at redhat.com> Signed-off-by: Jakub Kicinski <kuba at kernel.org> Acked-by: Jason Wang <jasowang at redhat.com> Signed-off-by: David S. Miller <davem at davemloft.net> So after this patch, patch B can be applied normally. So on the latest net branch, only lost 1a8024239dacf53fcf39c0f07fbf2712af22864f virtio-net: fix for skb_over_panic inside big mode Thanks.> > thanks, > > greg k-h