* [PATCH] xen-netfront: Remove BUGs on paged skb data which crosses a page boundary
@ 2014-11-26 2:28 Seth Forshee
2014-11-26 17:28 ` David Miller
2014-12-03 3:25 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Seth Forshee @ 2014-11-26 2:28 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, Boris Ostrovsky, David Vrabel
Cc: Zoltan Kiss, Eric Dumazet, Stefan Bader, Seth Forshee, xen-devel,
netdev, linux-kernel
These BUGs can be erroneously triggered by frags which refer to
tail pages within a compound page. The data in these pages may
overrun the hardware page while still being contained within the
compound page, but since compound_order() evaluates to 0 for tail
pages the assertion fails. The code already iterates through
subsequent pages correctly in this scenario, so the BUGs are
unnecessary and can be removed.
Fixes: f36c374782e4 ("xen/netfront: handle compound page fragments on transmit")
Cc: <stable@vger.kernel.org> # 3.7+
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
drivers/net/xen-netfront.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index cca871346a0f..ece8d1804d13 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -496,9 +496,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct netfront_queue *queue,
len = skb_frag_size(frag);
offset = frag->page_offset;
- /* Data must not cross a page boundary. */
- BUG_ON(len + offset > PAGE_SIZE<<compound_order(page));
-
/* Skip unused frames from start of page */
page += offset >> PAGE_SHIFT;
offset &= ~PAGE_MASK;
@@ -506,8 +503,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct netfront_queue *queue,
while (len > 0) {
unsigned long bytes;
- BUG_ON(offset >= PAGE_SIZE);
-
bytes = PAGE_SIZE - offset;
if (bytes > len)
bytes = len;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] xen-netfront: Remove BUGs on paged skb data which crosses a page boundary
2014-11-26 2:28 [PATCH] xen-netfront: Remove BUGs on paged skb data which crosses a page boundary Seth Forshee
@ 2014-11-26 17:28 ` David Miller
2014-11-27 3:53 ` Seth Forshee
2014-12-01 13:27 ` [Xen-devel] " David Vrabel
2014-12-03 3:25 ` David Miller
1 sibling, 2 replies; 6+ messages in thread
From: David Miller @ 2014-11-26 17:28 UTC (permalink / raw)
To: seth.forshee
Cc: konrad.wilk, boris.ostrovsky, david.vrabel, zoltan.kiss,
eric.dumazet, stefan.bader, xen-devel, netdev, linux-kernel
From: Seth Forshee <seth.forshee@canonical.com>
Date: Tue, 25 Nov 2014 20:28:24 -0600
> These BUGs can be erroneously triggered by frags which refer to
> tail pages within a compound page. The data in these pages may
> overrun the hardware page while still being contained within the
> compound page, but since compound_order() evaluates to 0 for tail
> pages the assertion fails. The code already iterates through
> subsequent pages correctly in this scenario, so the BUGs are
> unnecessary and can be removed.
>
> Fixes: f36c374782e4 ("xen/netfront: handle compound page fragments on transmit")
> Cc: <stable@vger.kernel.org> # 3.7+
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Can I get some Xen developer reviews?
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen-netfront: Remove BUGs on paged skb data which crosses a page boundary
2014-11-26 17:28 ` David Miller
@ 2014-11-27 3:53 ` Seth Forshee
2014-11-30 4:43 ` David Miller
2014-12-01 13:27 ` [Xen-devel] " David Vrabel
1 sibling, 1 reply; 6+ messages in thread
From: Seth Forshee @ 2014-11-27 3:53 UTC (permalink / raw)
To: David Miller
Cc: konrad.wilk, boris.ostrovsky, david.vrabel, zoltan.kiss,
eric.dumazet, stefan.bader, xen-devel, netdev, linux-kernel
On Wed, Nov 26, 2014 at 12:28:12PM -0500, David Miller wrote:
> From: Seth Forshee <seth.forshee@canonical.com>
> Date: Tue, 25 Nov 2014 20:28:24 -0600
>
> > These BUGs can be erroneously triggered by frags which refer to
> > tail pages within a compound page. The data in these pages may
> > overrun the hardware page while still being contained within the
> > compound page, but since compound_order() evaluates to 0 for tail
> > pages the assertion fails. The code already iterates through
> > subsequent pages correctly in this scenario, so the BUGs are
> > unnecessary and can be removed.
> >
> > Fixes: f36c374782e4 ("xen/netfront: handle compound page fragments on transmit")
> > Cc: <stable@vger.kernel.org> # 3.7+
> > Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
>
> Can I get some Xen developer reviews?
Fwiw this issue was discussed previously and this was the recommended
fix.
http://article.gmane.org/gmane.linux.kernel/1825381
Since then I got some feedback from a tester that he didn't see any
problems with the BUGs removed (actually replaced with a WARN so I know
that he actually saw the condition which triggered the BUG).
Thanks,
Seth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen-netfront: Remove BUGs on paged skb data which crosses a page boundary
2014-11-27 3:53 ` Seth Forshee
@ 2014-11-30 4:43 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2014-11-30 4:43 UTC (permalink / raw)
To: seth.forshee
Cc: konrad.wilk, boris.ostrovsky, david.vrabel, zoltan.kiss,
eric.dumazet, stefan.bader, xen-devel, netdev, linux-kernel
From: Seth Forshee <seth.forshee@canonical.com>
Date: Wed, 26 Nov 2014 21:53:50 -0600
> On Wed, Nov 26, 2014 at 12:28:12PM -0500, David Miller wrote:
>> From: Seth Forshee <seth.forshee@canonical.com>
>> Date: Tue, 25 Nov 2014 20:28:24 -0600
>>
>> > These BUGs can be erroneously triggered by frags which refer to
>> > tail pages within a compound page. The data in these pages may
>> > overrun the hardware page while still being contained within the
>> > compound page, but since compound_order() evaluates to 0 for tail
>> > pages the assertion fails. The code already iterates through
>> > subsequent pages correctly in this scenario, so the BUGs are
>> > unnecessary and can be removed.
>> >
>> > Fixes: f36c374782e4 ("xen/netfront: handle compound page fragments on transmit")
>> > Cc: <stable@vger.kernel.org> # 3.7+
>> > Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
>>
>> Can I get some Xen developer reviews?
>
> Fwiw this issue was discussed previously and this was the recommended
> fix.
>
> http://article.gmane.org/gmane.linux.kernel/1825381
>
> Since then I got some feedback from a tester that he didn't see any
> problems with the BUGs removed (actually replaced with a WARN so I know
> that he actually saw the condition which triggered the BUG).
That's fine, but I still want a xen-netfront developer to review and
ACK this.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xen-devel] [PATCH] xen-netfront: Remove BUGs on paged skb data which crosses a page boundary
2014-11-26 17:28 ` David Miller
2014-11-27 3:53 ` Seth Forshee
@ 2014-12-01 13:27 ` David Vrabel
1 sibling, 0 replies; 6+ messages in thread
From: David Vrabel @ 2014-12-01 13:27 UTC (permalink / raw)
To: David Miller, seth.forshee
Cc: zoltan.kiss, eric.dumazet, netdev, linux-kernel, stefan.bader,
david.vrabel, xen-devel, boris.ostrovsky
On 26/11/14 17:28, David Miller wrote:
> From: Seth Forshee <seth.forshee@canonical.com>
> Date: Tue, 25 Nov 2014 20:28:24 -0600
>
>> These BUGs can be erroneously triggered by frags which refer to
>> tail pages within a compound page. The data in these pages may
>> overrun the hardware page while still being contained within the
>> compound page, but since compound_order() evaluates to 0 for tail
>> pages the assertion fails. The code already iterates through
>> subsequent pages correctly in this scenario, so the BUGs are
>> unnecessary and can be removed.
>>
>> Fixes: f36c374782e4 ("xen/netfront: handle compound page fragments on transmit")
>> Cc: <stable@vger.kernel.org> # 3.7+
>> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
>
> Can I get some Xen developer reviews?
Sorry for the delay, I've been on holiday.
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Thanks.
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen-netfront: Remove BUGs on paged skb data which crosses a page boundary
2014-11-26 2:28 [PATCH] xen-netfront: Remove BUGs on paged skb data which crosses a page boundary Seth Forshee
2014-11-26 17:28 ` David Miller
@ 2014-12-03 3:25 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2014-12-03 3:25 UTC (permalink / raw)
To: seth.forshee
Cc: konrad.wilk, boris.ostrovsky, david.vrabel, zoltan.kiss,
eric.dumazet, stefan.bader, xen-devel, netdev, linux-kernel
From: Seth Forshee <seth.forshee@canonical.com>
Date: Tue, 25 Nov 2014 20:28:24 -0600
> These BUGs can be erroneously triggered by frags which refer to
> tail pages within a compound page. The data in these pages may
> overrun the hardware page while still being contained within the
> compound page, but since compound_order() evaluates to 0 for tail
> pages the assertion fails. The code already iterates through
> subsequent pages correctly in this scenario, so the BUGs are
> unnecessary and can be removed.
>
> Fixes: f36c374782e4 ("xen/netfront: handle compound page fragments on transmit")
> Cc: <stable@vger.kernel.org> # 3.7+
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-03 3:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-26 2:28 [PATCH] xen-netfront: Remove BUGs on paged skb data which crosses a page boundary Seth Forshee
2014-11-26 17:28 ` David Miller
2014-11-27 3:53 ` Seth Forshee
2014-11-30 4:43 ` David Miller
2014-12-01 13:27 ` [Xen-devel] " David Vrabel
2014-12-03 3:25 ` David Miller
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).