lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140530123818.GE2655@zion.uk.xensource.com>
Date:	Fri, 30 May 2014 13:38:18 +0100
From:	Wei Liu <wei.liu2@...rix.com>
To:	Stefan Bader <stefan.bader@...onical.com>
CC:	Wei Liu <wei.liu2@...rix.com>,
	Zoltan Kiss <zoltan.kiss@...rix.com>,
	"Eric Dumazet" <eric.dumazet@...il.com>, <netdev@...r.kernel.org>,
	<xen-devel@...ts.xen.org>, David Vrabel <david.vrabel@...rix.com>,
	"Konrad Wilk" <konrad.wilk@...cle.com>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>
Subject: Re: [PATCH net-next] xen-netfront: try linearizing SKB if it
 occupies too many slots

On Fri, May 30, 2014 at 02:28:17PM +0200, Stefan Bader wrote:
> On 30.05.2014 14:11, Wei Liu wrote:
> > On Fri, May 30, 2014 at 10:06:48AM +0200, Stefan Bader wrote:
> > [...]
> >> I had been idly wondering about this onwards. And trying to understand the whole
> >> skb handling environment, I tried to come up with some idea as well. It may be
> >> totally stupid and using the wrong assumptions. It seems to work in the sense
> >> that things did not blow up into my face immediately and somehow I did not see
> >> dropped packages due to the number of slots either.
> >> But again, I am not sure I am doing the right thing. The idea was to just try to
> >> get rid of so many compound pages (which I believe are the only ones that can
> >> have an offset big enough to allow some alignment savings)...
> >>
> >> -Stefan
> >>
> > 
> > Thanks. I think the general idea is OK, but it still involves
> > unnecessary page allocation. We don't actually need to get rid of
> > compound page by replacing it with a new page, we just need to make sure
> > the data inside is aligned.
> > 
> > If you look at xennet_make_frags, it only grants the 4K page which
> > contains data. I presume a simple memove would be better than alloc_page
> > + memcpy. What do you think?
> > 
> > Like:
> >    memmove(page_address(fpage), page_address(fpage)+offset, size);
> >    frag->page_offset = 0;
> 
> I was hesitating to do that as I could not really tell whether I can make any
> assumptions about those memory areas. So my cautious guess was to leave the
> original pages alone altogether (maybe whoever owns those has something
> important in the starting area). If I did it right, my new page potentially
> could be a smaller allocation unit than the original, since I only ask for
> something big enough to hold the frag size (ignoring a potential offset over
> full 4K areas).
> 

Thanks for the explanation.

Wei.

> -Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ