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: <20121221223824.GC1102@phenom.dumpdata.com>
Date:	Fri, 21 Dec 2012 17:38:24 -0500
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Yinghai Lu <yinghai@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Stefano Stabellini <Stefano.Stabellini@...citrix.com>
Subject: Re: [PATCH v6 00/27] x86, boot, 64bit: Add support for loading
 ramdisk and bzImage above 4G

On Thu, Dec 13, 2012 at 03:47:36PM -0800, H. Peter Anvin wrote:
> There are obviously good bits to this patchset, but I'm really
> starting to think the "pseudo-linear mode" via a trap handler --
> meaning we can access all of memory without any extra effort --
> makes more sense.  In fact, that way we could just build the full
> page tables without worrying about incremental bootstrap, depending
> on if that is a complexity win or not.
> 
> Either way, this is for native only: the Xen domain builder or other
> similar entry paths should be setting up page tables that cover all
> of memory; I'm hoping Konrad and Stefano can confirm this.

We do setup __ka space for everything everything we need to a fault.

Prior to 3.5 we could have blown over to the MODULES_SPACE if the guest
was booted with more than 128GB. That is now fixed so most of the
space _after_ the ramdisk in the __ka space can be blown away
and we use __va. We do this "cleanup" in xen_pagetable_init stage.


Which works as a long as cleanup_highmap only cleans up to
max_pfn_mapped (which in Xen case covers up to the RAMdisk).

The layout of __ka space is as follow:

 kernel
 ramdisk
 an array called P2M for which we use __ka address until xen_pagetable_init
          at which point we blow away any __ka entries for it.
 start_info (we swap over to use __va before generic code is run).
 the initial page-tables (for which the kernel uses __va address). we blow
         away the __ka entries when  xen_pagetable_init is called.

This __ka cleanup business was done for 64-bit only as the 32-bit
code scared me.


Hm, why that function is called xen_pagetable_init seems a bit silly.
> 
> The only reason to go with another approach I can think of is if it
> makes 32/64-bit unification cleaner.
> 
> 	-hpa
> 
> --
> 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/
> 
--
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