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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 14 Feb 2013 21:52:17 -0500
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Roger Pau Monné <roger.pau@...rix.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"xen-devel@...ts.xen.org" <xen-devel@...ts.xen.org>
Subject: Re: [PATCH] xen-blkback: use balloon pages for persistent grants

On Thu, Feb 14, 2013 at 04:02:43PM +0100, Roger Pau Monné wrote:
> On 14/02/13 14:23, Konrad Rzeszutek Wilk wrote:
> > On Thu, Feb 14, 2013 at 11:12:09AM +0100, Roger Pau Monne wrote:
> >> With current persistent grants implementation we are not freeing the
> >> persistent grants after we disconnect the device. Since grant map
> > 
> > Can you explain this in more details please? Isn't gnttab_set_unmap_op
> > in free_persistent_gnts doing the right job of putting in the right
> > mfn in? And then we could free the page?
> 
> No, after gnttab_unmap_refs the page still points to the grant frame
> mfn. All the users of grant frames either have an internal buffer of
> pages that are reused (like blkback), or use balloon pages (like gntdev).
> 
> I could probably modify gnttab_map to store the mfn and set it back at
> gnttab_unmap, but that will surely require more work than this simple fix.

Simple fix is what we want right now.
> 
> > 
> > 
> >> operations change the mfn of the allocated page, and we can no longer
> >> pass it to __free_page without setting the mfn to a sane value, use
> >> balloon grant pages instead, as the gntdev device does.
> > 
> > 
> > Wow. I did not realize that we leaving such a huge memory leak behind!
> > But I guess that was never an issue as we would recycle those persistent
> > grants to other domains.
> 
> No, we didn't recycle them AFAIK, we allocated them using alloc_page,
> passed them to gnttab_map, used them, and when closing the backend we
> only unmapped them, but they where never freed.

Ghastly!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ