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  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]
Date:	Sun, 01 Mar 2009 15:29:32 -0800
From:	"H. Peter Anvin" <>
To:	Yinghai Lu <>
CC:	Ingo Molnar <>,
	Andrew Morton <>,
	Thomas Gleixner <>,
	Linux Kernel Mailing List <>,
	Jeremy Fitzhardinge <>
Subject: Re: [PATCH] x86: put initial_pg_tables into bss -v2

Yinghai Lu wrote:
>> No, this is garbage.  If you're insisting on getting rid of the brk-like
>> allocation patterns,> YH
  then you have to get an alternative dynamic
>> allocator available to the pre-paging code.  Now, there is no reason we
>> couldn't execute C code before enabling paging, although the code would
>> either have to be PIC or linked at the physical address.
> you can use find_e820_area()/reserve_early() pair to find right position for that.

This stuff is currently done before paging is enabled, and existing C 
code can't be run as-is.  There are three ways to deal with that:

a) compile some of the code with -fPIC/-fPIE.
b) link some code twice with different offsets.
c) play really ugly games with segments (thus making the virtualization
    guys unhappy.)

Pretty much, these options all suck.  Another option, of course, is to 
generate a fixed amount of page tables just to get us into the C 
environment, generate a new set, *and reclaim the old ones*.  That way 
we're not wasting memory if we're on a small-RAM machine.

It's still really ugly, though.  A much easier and cleaner way would 
seem to be to calculate a far limit on the brk and then marking it as a 
formal (non-alloc) section in the linker script and vmlinux file.  That 
way anything that examines the vmlinux file will see it as an exclusion 
section.  We can (and should) even verify that we don't overflow the brk 
and panic if we do.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists