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: <86802c440805271435l744eab84xe55ac9ce6196c03b@mail.gmail.com>
Date:	Tue, 27 May 2008 14:35:23 -0700
From:	"Yinghai Lu" <yhlu.kernel@...il.com>
To:	"Jeremy Fitzhardinge" <jeremy@...p.org>
Cc:	"Thomas Gleixner" <tglx@...utronix.de>,
	"Ingo Molnar" <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2

On Tue, May 27, 2008 at 2:22 PM, Jeremy Fitzhardinge <jeremy@...p.org> wrote:
> Yinghai Lu wrote:
>>
>> Can you send out your boot log?
>>
>
> I've included it below.
>
>> I still can not figure out INIT_PG_TABLE and RAMDISK could overlap? or
>> only one byte? or the same page?
>>
>
> Perhaps my explanation in the patch description wasn't clear enough.
>
> When Xen builds the domain, it's responsible for layout of the kernel, the
> initrd and the initial pagetable (the kernel does not create its own
> pagetable like it does when booting directly on x86).
>
> The layout is (from low to high addresses):
>
>    kernel start ->+-------+
>                   |.text  |
>                   + - - - +
>                   |.data  |
>                   + - - - +
>                   |.bss   |
>             _end->+-------+
>                   :padding:
>                   +-------+<-ramdisk_image
>                   :       :
>                   |initrd |
>                   :       :
>                   +-------+<-ramdisk_end
>                   :padding:
>                   +-------+
>                   |pgtable|
> init_pg_tables_end->+-------+
>
>
> Therefore, when you call early_reserve(&end, init_pg_tables_end) to reserve
> the inital pagetable, you also implicitly reserve the whole ramdisk area.
>  Since your code currently reserves the ramdisk first, the reservation of
> the pagetable fails because it overlaps the ramdisk.
>
> My patch does two things:
>
>  1. reserve the initial pagetable first
>  2. skip reserving the ramdisk if it is within the pagetable range
>
> This makes sure that all the important memory is reserved from early in
> boot.
>
> There are two alternate fixes:
>
>  1. try to precisely reserve *just* the pagetable, rather than
>     assuming it starts at &_end.  I'm not sure there's currently a way
>     to do this, but it would be easy enough to add.  Or,
>  2. Make early reservation cope with overlapping ranges, and deal with
>     them appropriately.

thanks for the explanation...

method 1 need to be done.

BTW, XEN PV only support 32 bit?

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