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: <47EC1E75.6090102@goop.org>
Date:	Thu, 27 Mar 2008 15:23:49 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Dave Hansen <dave@...ux.vnet.ibm.com>
CC:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Yasunori Goto <y-goto@...fujitsu.com>,
	Christoph Lameter <clameter@....com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Anthony Liguori <anthony@...emonkey.ws>,
	Chris Wright <chrisw@...s-sol.org>
Subject: Re: Trying to make use of hotplug memory for xen balloon driver

Dave Hansen wrote:
> The flags being all null looks highly suspicious to me.
>
> Once you've done an add_memory(), the new sections should show up
> in /sys.  Do you see them in there?
>
> Once they show up, you can online them with:
>
> 	echo online > /sys/devices/system/memory/memoryXXX/state
>
> That's what actually goes and mucks with the 'struct zone's and the
> pgdats to expand them.  It will also call online_page() on the whole
> range.  I think you're trying to do this manually, and missing part of
> it.  

Hm, actually this is precisely the wrong thing to do in this case.  When 
the balloon driver adds a new section of hotplug memory, its doing it to 
get the page structures, but there's no actual memory backing those 
pages.  The memory only comes into existence on a page-by-page basis 
when the balloon driver gets memory from the hypervisor and attaches it 
to each page (the balloon driver uses online_page() on each page as its 
ready).

If the user does a mass online via /sys the system explodes because it 
onlines a large number of pages which have no backing memory.  Since 
none of those pages can be mapped, the kernel explodes in a variety of 
interesting ways.

So I'd really like to inhibit the sysfs interface on these sections.  
Thoughts?

Thanks,
    J
--
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