From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seth Forshee Subject: BUG in xennet_make_frags with paged skb data Date: Thu, 6 Nov 2014 15:49:40 -0600 Message-ID: <20141106214940.GD44162@ubuntu-hedt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S. Miller" , Konrad Rzeszutek Wilk , Boris Ostrovsky , David Vrabel , Stefan Bader , Jay Vosburgh , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, seth.forshee@canonical.com To: netdev@vger.kernel.org Return-path: Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org We've had several reports of hitting the following BUG_ON in xennet_make_frags with 3.2 and 3.13 kernels (I'm currently awaiting results of testing with 3.17): /* Grant backend access to each skb fragment page. */ for (i = 0; i < frags; i++) { skb_frag_t *frag = skb_shinfo(skb)->frags + i; struct page *page = skb_frag_page(frag); len = skb_frag_size(frag); offset = frag->page_offset; /* Data must not cross a page boundary. */ BUG_ON(len + offset > PAGE_SIZE<page.p which could fail with data that extends into another page. Can anyone explain what the rules are here? My best guess based on skb_copy_bits is that paged data should never cross the hardware page boundary, but I'm not really sure how all of this works out when dealing with compound pages. Thanks, Seth