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: <1192689875.21509.24.camel@caritas-dev.intel.com>
Date:	Thu, 18 Oct 2007 14:44:35 +0800
From:	"Huang, Ying" <ying.huang@...el.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	akpm@...ux-foundation.org, Yinghai Lu <yhlu.kernel@...il.com>,
	Chandramouli Narayanan <mouli@...ux.intel.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm -v5 0/3] i386/x86_64 boot: 32-bit boot protocol

On Wed, 2007-10-17 at 11:24 +0200, Andi Kleen wrote:
> > Can you tell me what that early reservation interface is? What I find in
> > x86_64 that does early memory allocation is alloc_low_page, which gets
> > non-conflict memory area through e820 map.
> 
> It's a new interface I only recently wrote:
> 
> ftp://ftp.firstfloor.org/pub/ak/x86_64/quilt/patches/early-reserve
> 
> Then you can use early_reserve() and the e820 allocator will not touch
> it.
> 
> > Because setup data is allocated by bootloader or kernel 16-bit setup
> > code, and the e820 map is created there too, the memory area used by
> > setup data can be made reserved memory area in e820 map by bootloader or
> > kernel 16-bit setup code. This way, they will not be overwritten by
> > kernel. Do you think this works.
> 
> It has a little of a chicken'n'egg problem because the e820 map will
> be actually in the area you want to reserve. But it might work too.
> Boot data is normally copied before other allocations in head64.c
> If you do variable size boot data that might not work though.  And might
> be a little fragile overall.

Although variable size boot data (such as setup data) can be reserved
via early_reserve or e820 map, they may conflict with hard-coded memory
area used by kernel. This means boot loader must know the hard-coded
memory area used by kernel.

Another possible solution is as follow:
1. Bootloader allocates memory for setup data. Just avoid the memory
area after kernel loaded address.
2. In the very early stage of kernel boot (head64.c). Copy all the setup
data to the memory area after _end. And reserve that memory area with
early_reserve (or bad_addr for old code).

In this solution, the only unsafe memory area for setup data from
bootloader is memory area after _end. And kernel can use hard coded
memory area without the risk of conflicting with setup data from
bootloader.

Do you think this solution is better?

Best Regards,
Huang Ying
-
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