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: <513882ED.8040208@citrix.com>
Date:	Thu, 7 Mar 2013 12:07:09 +0000
From:	David Vrabel <david.vrabel@...rix.com>
To:	Daniel Kiper <daniel.kiper@...cle.com>
CC:	"carsten@...iers.de" <carsten@...iers.de>,
	"darren.s.shepherd@...il.com" <darren.s.shepherd@...il.com>,
	"james-xen@...gwall.me.uk" <james-xen@...gwall.me.uk>,
	"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>
Subject: Re: [PATCH 1/1] xen/balloon: Enforce various limits on target

On 07/03/13 11:28, Daniel Kiper wrote:
> On Wed, Mar 06, 2013 at 05:52:28PM +0000, David Vrabel wrote:
>
>> If you set the target above d->max_pages you won't be able to populate them.
>>
>> So, using the maximum_reservation call seems like the right thing to me.
> 
> Please look above. If you use this value you would not
> be able to increase reservation.

I don't think I'm understanding the use case you're talking about.

Do you mean we should allow a target <= d->tot_pages even if this is
above d->max_pages?  I agree with this.

Something like this:

void balloon_set_new_target(unsigned long target)
{
	domid_t domid = DOMID_SELF;
	int rc;
	unsigned long host_limit;

	target = min(target, MAX_DOMAIN_PAGES);

	/* Prevent target from attempting the expand the reservation
	   above the max enforced by the hypervisor. */
	rc = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid);
	if (rc > 0) {
		host_limit = rc;
		target = min(target,
			max(host_limit, balloon_stats.current_pages));
	}

	balloon_stats.target_pages = target;
	schedule_delayed_work(&balloon_worker, 0);
}

David
--
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